tall-forms

Laravel Livewire (TALL-stack) form generator with realtime validation, file uploads, array fields, blade form input components and more.

MIT License

Downloads
35.3K
Stars
688
Committers
18

Bot releases are visible (Hide)

tall-forms - TallFormComponent

Published by tanthammar almost 4 years ago

New: TallFormComponent

Now there are two ways to use this package.

  • Extend the TallFormComponent
  • or use the TallForm Trait

This is to avoid use cases where you get Trait method naming, collisions

tall-forms - Blade directive @tfonce

Published by tanthammar almost 4 years ago

new blade directive @tfonce replaces Laravel @once, because scripts and styles were included twice on the page
improved installer with option for tailwindcss 1.8 and 1.9

tall-forms - Package Artisan command

Published by tanthammar almost 4 years ago

tall-forms - v6 Nested KeyVal

Published by tanthammar almost 4 years ago

New

  • Nested KeyVal fields
  • Multiselect, Checkboxes can be added to both Repeaters and KeyVal fields
  • Artisan installation command for Laravel 7 and 8 (with and without Jetstream)
    • Installs tailwind.config.js, webpack.mix.js, theme.css, custom.css, app.css, wrapper view and more.
  • Svg Blade component
    • <x-tall-svg :path="path.blade-view" class="..." />
    • All required icons are provided with the package
  • Several icon methods for Input field
    • ->icon() Blade UI Icon
    • ->tallIcon() Blade view file
    • ->htmlIcon() any valid html

Breaking changes

  • Removed $tem_key from all views and Blade Components, use $field->key instead
  • If you published your view files you must compare/merge them with the new files.
  • Removed deprecated v3 methods, custom_data() and relations(), use saveFoo() instead
  • Removed $custom_data, all data is available in the $form_data property

Improved

  • Better styling for Repeater on smaller screen
  • Removed Blade UI Icon dependency
    • Icons are now plain blade files

Upgrade from v5 to v6

  • Publish the new icon blade files (does not overwrite current icons)
    • php artisan vendor:publish --tag=tall-form-icons
  • Republish the config or compare/merge with your existing
    • php artisan vendor:publish --tag=tall-form-config
  • $temp_key isn't used anymore. If you published your view files you must compare/merge them with the new files.
  • Search and replace deprecated methods; custom_data() and relations(), use saveFoo() instead.
  • Search and replace any reference to $custom_data, all data is available in the $form_data property
    • Examples:
    • $this->custom_data becomes $this->form_data
    • data_get($this->custom_data, ...) becomes data_get($this->form_data, ...)
tall-forms - Temporary Livewire dependency v.2.3.0

Published by tanthammar almost 4 years ago

Livewire v2.3.1 breaks some fields due to a change in the Livewire code.
Until this issue is resolved, this package cannot allow higher versions than v.2.3.0

https://github.com/livewire/livewire/issues/1982

tall-forms - Fix rules() before $model is hydrated

Published by tanthammar almost 4 years ago

reverted back $this->rules() to $this->get_rules()

tall-forms - Fixed Repeater realtime labels as validation attributes

Published by tanthammar almost 4 years ago

Refactored validation to fix custom attribute using labels for Repeater field

tall-forms - Realtime validation Repeater and KeyVal

Published by tanthammar almost 4 years ago

fixes $realtimeValidationOn for Repeater and KeyVal fields.

tall-forms - Multiselect validate each option

Published by tanthammar almost 4 years ago

Multiselect:

  • added x-cloak
  • now supports validation for each selected value
tall-forms - No items found

Published by tanthammar almost 4 years ago

Changed the @forelse @empty text in multiselect from "No items found" to "..."

tall-forms - Multiselect

Published by tanthammar almost 4 years ago

New:

  • Multiselect
  • pass true/false to fields with ->options() method, to avoid flip key => value in arrays.

Fix:

  • wire:key where multiple fields with options may get the same key
tall-forms - Layout property

Published by tanthammar almost 4 years ago

New: $layout property

Livewire expects an app.blade.php, when rendering full-page component.

If you want to use another layout you don't have to override the render() method anymore.

Just set the $layout property in the mount() method.

public function mount()
{
    $this->layout = 'layouts/guest'; // 'path/file-name'
}
tall-forms - Search and DatePicker done

Published by tanthammar almost 4 years ago

update Search field to use the options() method instead of optionsKey()

tall-forms - Field width fix

Published by tanthammar almost 4 years ago

Fix theme css, default field width

When refactoring to themes there was a change in the load order of the classes.
This release changes .tf-field-width in the tall-theme.css to fix it.

.tf-field-width { /* for inline form layout */
-        @apply sm:w-2/3 md:w-4/5;
+        @apply w-full sm:w-2/3 md:w-4/5;
}

Also changes the fieldWidth() method in the LabelFieldWrapper component

tall-forms - Fix Trix

Published by tanthammar almost 4 years ago

fix: Trix, include scripts conditional

tall-forms - onKeyDownEnter = onSubmit

Published by tanthammar almost 4 years ago

New

  • Trix attachments, new features:
    • allowed mime types
    • max allowed attachments
    • prevent multiple file uploads at the same time.

Improved

  • Component property $onKeyDownEnter is now applied to wire:submit.prevent instead of wire:keydown.enter.prevent, to avoid conflict on some field types.

Fix

ImageCropper script method name, now uses md5($field->name)

Changed

config/tall-forms.php: added new config items for Trix with attachments, see field documentation

tall-forms - Custom Themes

Published by tanthammar almost 4 years ago

This release contains breaking changes.

Credits to @maxeckel

Max volunteered to help me refactor the TailwindUI markup to pure TailwindCss and he has been a great support during the development of this release. Thank you !!!

Upgrade guide

  • config/tall-themes.php
    • save a copy of your current config file
    • republish the config file: php artisan vendor:publish --tag=tall-form-config
  • publish the theme, se note below
    • if you made changes to the css markup in your old config file, copy/paste to the tall-theme css file
  • backup your icons
    • publish the new icons, see note below
    • if you have custom icons, change the new config file and put your custom icons in the correct folder.
  • remove .svg-icon class from your current css (included in the default theme file)
  • remove Nord theme colors from tailwind.config.js - if you don't use them. Not required in the default theme.
  • add support for @apply with complex classes to tailwind.config.js - see Theme wiki page
  • if you extended any Blade component classes, review them
  • if you replaced/published any view files, review them

New: Custom Themes

  • There has been some changes to the styling of all fields to avoid TailwindUI license violation.
  • Classes are moved from config/tall-forms.php to tall-theme
  • Most classes are moved from the Blade component classes to tall-theme
  • Most classes are moved from the view files to tall-theme
  • Theme classes use tf prefix. example .tf-bg-primary or .tf-text-primary
  • Nord theme is moved to separate tall-nord-theme file - sponsors only
  • New classes and colors for success, danger, warning, info, primary, secondary
  • Publish the theme files:
    • Laravel 8, css: php artisan vendor:publish --tag=tall-form-theme-css
    • Laravel 7, scss: php artisan vendor:publish --tag=tall-form-theme-sass
    • Import @import 'tall-theme' to app.css or app.scss (read wiki about nested css setup)
    • npm run dev

New: Search field

  • Two versions, one with a simple dropdown and one with labels and info. (docs coming)

New Trix

  • Two versions, with and without attachments. Supports native Livewire file-uploads.

New Icons

  • New icons for trash, sort and more.
  • All required icons are included in the package.
  • Apply styling to the icons in the theme file.
  • Publish the icons:
    • php artisan vendor:publish --tag=tall-form-icons

ImageCropper

  • new icons, new button sizes, new button colors

Repeater

  • new icons, new button sizes, new button colors

FileUpload

  • new icons, new button sizes, new button colors

Other

  • php dependency change to v7.4, PR #33

Fixes

  • added some wire:keys to loops
  • ImageCropper js error removed (Thanks to @maxeckel )
tall-forms - php v 7.4.0

Published by tanthammar about 4 years ago

Change php v dependency as requested in PR #33

tall-forms - Trix field

Published by tanthammar about 4 years ago

New: Trix field

  • This version only supports text input
  • Native Livewire file upload is supported but I'm unable to release it, waiting for Livewire bug to be resolved.

Enhancements:

  • ImageCropper in modal
  • set default wire:model in config

Upcoming: Search field

  • The search field is complete but I'm unable to release it, waiting for Livewire bug to be resolved.
tall-forms - Hide/Show the save button

Published by tanthammar about 4 years ago

New: option to hide the default save/submit button. with $showSave component parameter.

  • see component properties wiki page
Package Rankings
Top 4.81% on Packagist.org
Badges
Extracted from project README
Latest Stable Version Total Downloads Latest Unstable Version License
Related Projects