This commit is contained in:
Dan Harrin
2023-07-01 21:32:18 +01:00
6 changed files with 89 additions and 94 deletions
@@ -8,7 +8,6 @@ use Filament\Forms\Components\CheckboxList;
use Filament\Forms\Components\ColorPicker;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Fieldset;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Group;
use Filament\Forms\Components\KeyValue;
@@ -1013,7 +1012,7 @@ class Fields extends Component implements HasForms
],
])
->reorderableWithButtons(),
]),
]),
Group::make()
->id('collapsedBuilder')
->extraAttributes([
@@ -1130,66 +1129,66 @@ class Fields extends Component implements HasForms
],
])
->inset(),
]),
Group::make()
->id('tagsInput')
->extraAttributes([
'class' => 'p-16 max-w-xl',
])
->schema([
TagsInput::make('tagsInput')
->label('Tags')
->default(['Tailwind CSS', 'Alpine.js']),
]),
Group::make()
->id('textarea')
->extraAttributes([
'class' => 'p-16 max-w-xl',
])
->schema([
Textarea::make('textarea')
->label('Description')
->default('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam euismod, nisl eget aliquam ultricies, quam sapien aliquet nunc, eget aliquam velit nisl quis nunc.'),
]),
Group::make()
->id('keyValue')
->extraAttributes([
'class' => 'p-16 max-w-5xl',
])
->schema([
KeyValue::make('keyValue')
->label('Meta')
->default([
'description' => 'Filament is a collection of Laravel packages',
'og:type' => 'website',
'og:site_name' => 'Filament',
]),
]),
Group::make()
->id('reorderableKeyValue')
->extraAttributes([
'class' => 'p-16 max-w-5xl',
])
->schema([
KeyValue::make('reorderableKeyValue')
->label('Meta')
->default([
'description' => 'Filament is a collection of Laravel packages',
'og:type' => 'website',
'og:site_name' => 'Filament',
])
->reorderable(),
]),
Group::make()
->id('colorPicker')
->extraAttributes([
'class' => 'p-16 max-w-xl',
])
->schema([
ColorPicker::make('colorPicker')
->label('Color')
->default('#3490dc'),
]),
]),
Group::make()
->id('tagsInput')
->extraAttributes([
'class' => 'p-16 max-w-xl',
])
->schema([
TagsInput::make('tagsInput')
->label('Tags')
->default(['Tailwind CSS', 'Alpine.js']),
]),
Group::make()
->id('textarea')
->extraAttributes([
'class' => 'p-16 max-w-xl',
])
->schema([
Textarea::make('textarea')
->label('Description')
->default('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam euismod, nisl eget aliquam ultricies, quam sapien aliquet nunc, eget aliquam velit nisl quis nunc.'),
]),
Group::make()
->id('keyValue')
->extraAttributes([
'class' => 'p-16 max-w-5xl',
])
->schema([
KeyValue::make('keyValue')
->label('Meta')
->default([
'description' => 'Filament is a collection of Laravel packages',
'og:type' => 'website',
'og:site_name' => 'Filament',
]),
]),
Group::make()
->id('reorderableKeyValue')
->extraAttributes([
'class' => 'p-16 max-w-5xl',
])
->schema([
KeyValue::make('reorderableKeyValue')
->label('Meta')
->default([
'description' => 'Filament is a collection of Laravel packages',
'og:type' => 'website',
'og:site_name' => 'Filament',
])
->reorderable(),
]),
Group::make()
->id('colorPicker')
->extraAttributes([
'class' => 'p-16 max-w-xl',
])
->schema([
ColorPicker::make('colorPicker')
->label('Color')
->default('#3490dc'),
]),
]);
}
@@ -2,30 +2,17 @@
namespace App\Http\Livewire\Forms;
use Filament\Forms\Components\Builder;
use Filament\Forms\Components\Card;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\CheckboxList;
use Filament\Forms\Components\ColorPicker;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Fieldset;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Group;
use Filament\Forms\Components\KeyValue;
use Filament\Forms\Components\MarkdownEditor;
use Filament\Forms\Components\Placeholder;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\Repeater;
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Tabs;
use Filament\Forms\Components\TagsInput;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\TimePicker;
use Filament\Forms\Components\Toggle;
use Filament\Forms\Components\Wizard;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
@@ -134,7 +121,7 @@ class Layout extends Component implements HasForms
->schema([
Tabs\Tab::make('Notifications')
->icon('heroicon-m-bell')
->iconPosition('after')
->iconPosition('after')
->schema([
Checkbox::make('enabled')
->default(true),
@@ -1,8 +1,11 @@
<div {{ $attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
}}>
<div
{{
$attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
}}
>
{{ $getChildComponentContainer() }}
</div>
@@ -1,8 +1,11 @@
<div {{ $attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
}}>
<div
{{
$attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
}}
>
{{ $getChildComponentContainer() }}
</div>
@@ -11,13 +11,15 @@
:icon="$getIcon()"
:icon-color="$getIconColor()"
:icon-size="$getIconSize()"
{{ $attributes
{{
$attributes
->merge([
'id' => $getId(),
], escape: false)
->merge($getExtraAttributes(), escape: false)
->merge($getExtraAlpineAttributes(), escape: false)
->class(['filament-forms-section-component']) }}
->class(['filament-forms-section-component'])
}}
>
<x-slot name="heading">
{{ $getHeading() }}
@@ -26,7 +26,7 @@
@if ($alpineActive)
x-bind:class="{
'hover:text-gray-800 focus:text-primary-600 dark:text-gray-400 dark:hover:text-gray-300 dark:focus:text-gray-400':
! ({{ $alpineActive }}),
! {{ $alpineActive }},
'text-primary-600 shadow bg-white dark:text-white dark:bg-primary-600':
{{ $alpineActive }},
}"
@@ -78,14 +78,15 @@
<span
@if ($alpineActive)
x-bind:class="{
'bg-white dark:bg-gray-600': ! ({{ $alpineActive }}),
'bg-primary-600 text-white font-medium dark:bg-white dark:text-primary-600': {{ $alpineActive }},
'bg-white dark:bg-gray-600': ! {{ $alpineActive }},
'bg-primary-600 text-white font-medium dark:bg-white dark:text-primary-600':
{{ $alpineActive }},
}"
@endif
@class([
'min-h-4 inline-flex items-center justify-center whitespace-normal rounded-xl px-2 py-0.5 text-xs font-medium tracking-tight',
'bg-white dark:bg-gray-600' => (! $active) && (! $alpineActive),
'bg-primary-600 text-white font-medium dark:bg-white dark:text-primary-600' => $active && (! $alpineActive),
'bg-primary-600 font-medium text-white dark:bg-white dark:text-primary-600' => $active && (! $alpineActive),
])
>
{{ $badge }}