From 33f1cd84c15210a3c2da86bf447cfb26f1d94152 Mon Sep 17 00:00:00 2001 From: hildaaaevs <149044919+hildaaaevs@users.noreply.github.com> Date: Mon, 26 May 2025 21:39:59 +0700 Subject: [PATCH] filter dan stats --- app/Filament/Resources/PaketFotoResource.php | 13 +- app/Filament/Resources/PromoResource.php | 7 + app/Filament/Resources/ReservasiiResource.php | 36 +- .../Pages/CreateReservasii.php | 2 +- .../Pages/ListReservasiis.php | 16 +- .../Widgets/ReservasiiStats.php | 7 +- app/Filament/Resources/UserResource.php | 14 +- app/Filament/Widgets/CalendarWidget.php | 33 -- app/Providers/Filament/AdminPanelProvider.php | 7 +- .../views/vendor/filament/assets.blade.php | 17 + .../filament/components/actions.blade.php | 64 +++ .../filament/components/avatar.blade.php | 21 + .../filament/components/badge.blade.php | 238 +++++++++++ .../filament/components/breadcrumbs.blade.php | 50 +++ .../components/button/group.blade.php | 9 + .../components/button/index.blade.php | 332 ++++++++++++++++ .../vendor/filament/components/card.blade.php | 3 + .../components/dropdown/header.blade.php | 71 ++++ .../components/dropdown/index.blade.php | 87 ++++ .../components/dropdown/list/index.blade.php | 3 + .../components/dropdown/list/item.blade.php | 275 +++++++++++++ .../filament/components/fieldset.blade.php | 25 ++ .../filament/components/grid/column.blade.php | 62 +++ .../filament/components/grid/index.blade.php | 53 +++ .../filament/components/icon-button.blade.php | 242 +++++++++++ .../vendor/filament/components/icon.blade.php | 29 ++ .../components/input/checkbox.blade.php | 29 ++ .../filament/components/input/index.blade.php | 22 + .../filament/components/input/radio.blade.php | 15 + .../components/input/select.blade.php | 16 + .../components/input/wrapper.blade.php | 212 ++++++++++ .../vendor/filament/components/link.blade.php | 304 ++++++++++++++ .../components/loading-indicator.blade.php | 18 + .../components/loading-section.blade.php | 33 ++ .../components/modal/description.blade.php | 5 + .../components/modal/heading.blade.php | 5 + .../filament/components/modal/index.blade.php | 376 ++++++++++++++++++ .../components/pagination/index.blade.php | 190 +++++++++ .../components/pagination/item.blade.php | 50 +++ .../components/section/description.blade.php | 5 + .../components/section/heading.blade.php | 5 + .../components/section/index.blade.php | 213 ++++++++++ .../filament/components/tabs/index.blade.php | 21 + .../filament/components/tabs/item.blade.php | 123 ++++++ 44 files changed, 3288 insertions(+), 70 deletions(-) delete mode 100644 app/Filament/Widgets/CalendarWidget.php create mode 100644 resources/views/vendor/filament/assets.blade.php create mode 100644 resources/views/vendor/filament/components/actions.blade.php create mode 100644 resources/views/vendor/filament/components/avatar.blade.php create mode 100644 resources/views/vendor/filament/components/badge.blade.php create mode 100644 resources/views/vendor/filament/components/breadcrumbs.blade.php create mode 100644 resources/views/vendor/filament/components/button/group.blade.php create mode 100644 resources/views/vendor/filament/components/button/index.blade.php create mode 100644 resources/views/vendor/filament/components/card.blade.php create mode 100644 resources/views/vendor/filament/components/dropdown/header.blade.php create mode 100644 resources/views/vendor/filament/components/dropdown/index.blade.php create mode 100644 resources/views/vendor/filament/components/dropdown/list/index.blade.php create mode 100644 resources/views/vendor/filament/components/dropdown/list/item.blade.php create mode 100644 resources/views/vendor/filament/components/fieldset.blade.php create mode 100644 resources/views/vendor/filament/components/grid/column.blade.php create mode 100644 resources/views/vendor/filament/components/grid/index.blade.php create mode 100644 resources/views/vendor/filament/components/icon-button.blade.php create mode 100644 resources/views/vendor/filament/components/icon.blade.php create mode 100644 resources/views/vendor/filament/components/input/checkbox.blade.php create mode 100644 resources/views/vendor/filament/components/input/index.blade.php create mode 100644 resources/views/vendor/filament/components/input/radio.blade.php create mode 100644 resources/views/vendor/filament/components/input/select.blade.php create mode 100644 resources/views/vendor/filament/components/input/wrapper.blade.php create mode 100644 resources/views/vendor/filament/components/link.blade.php create mode 100644 resources/views/vendor/filament/components/loading-indicator.blade.php create mode 100644 resources/views/vendor/filament/components/loading-section.blade.php create mode 100644 resources/views/vendor/filament/components/modal/description.blade.php create mode 100644 resources/views/vendor/filament/components/modal/heading.blade.php create mode 100644 resources/views/vendor/filament/components/modal/index.blade.php create mode 100644 resources/views/vendor/filament/components/pagination/index.blade.php create mode 100644 resources/views/vendor/filament/components/pagination/item.blade.php create mode 100644 resources/views/vendor/filament/components/section/description.blade.php create mode 100644 resources/views/vendor/filament/components/section/heading.blade.php create mode 100644 resources/views/vendor/filament/components/section/index.blade.php create mode 100644 resources/views/vendor/filament/components/tabs/index.blade.php create mode 100644 resources/views/vendor/filament/components/tabs/item.blade.php diff --git a/app/Filament/Resources/PaketFotoResource.php b/app/Filament/Resources/PaketFotoResource.php index 1db0b82..a36a468 100644 --- a/app/Filament/Resources/PaketFotoResource.php +++ b/app/Filament/Resources/PaketFotoResource.php @@ -33,6 +33,13 @@ class PaketFotoResource extends Resource protected static ?string $model = PaketFoto::class; protected static ?string $navigationIcon = 'heroicon-o-camera'; + protected static ?string $navigationLabel = 'Paket Foto'; + public static function getPluralLabel(): string{ + return 'Paket Foto';} + public static function getModelLabel(): string +{ + return 'Paket Foto'; +} public static function form(Form $form): Form { @@ -87,9 +94,9 @@ public static function table(Table $table): Table ]) ]) ->bulkActions([ - Tables\Actions\BulkActionGroup::make([ - Tables\Actions\DeleteBulkAction::make(), - ]), + // Tables\Actions\BulkActionGroup::make([ + // Tables\Actions\DeleteBulkAction::make(), + //]), ]); } diff --git a/app/Filament/Resources/PromoResource.php b/app/Filament/Resources/PromoResource.php index d8b2e98..70a2e96 100644 --- a/app/Filament/Resources/PromoResource.php +++ b/app/Filament/Resources/PromoResource.php @@ -27,6 +27,13 @@ class PromoResource extends Resource protected static ?string $model = Promo::class; protected static ?string $navigationIcon = 'heroicon-o-currency-dollar'; + protected static ?string $navigationLabel = 'Promo'; + public static function getPluralLabel(): string{ + return 'Promo';} + public static function getModelLabel(): string +{ + return 'Promo'; +} public static function form(Form $form): Form { diff --git a/app/Filament/Resources/ReservasiiResource.php b/app/Filament/Resources/ReservasiiResource.php index 2ca3208..69cfa91 100644 --- a/app/Filament/Resources/ReservasiiResource.php +++ b/app/Filament/Resources/ReservasiiResource.php @@ -38,6 +38,13 @@ class ReservasiiResource extends Resource protected static ?string $model = Reservasii::class; protected static ?string $navigationIcon = 'heroicon-o-squares-plus'; + protected static ?string $navigationLabel = 'Reservasi'; + public static function getPluralLabel(): string{ + return 'Reservasi';} + public static function getModelLabel(): string +{ + return 'Reservasi'; +} public static function form(Form $form): Form { @@ -214,36 +221,17 @@ public static function table(Table $table): Table Tables\Columns\TextColumn::make('metode_pembayaran') ->badge(), - - Tables\Columns\TextColumn::make('created_at') - ->label('Tanggal Dibuat') - ->dateTime('d F Y - H:i') - ->sortable() - ->toggleable(isToggledHiddenByDefault: true), ]) ->filters([ - Tables\Filters\SelectFilter::make('tipe_pembayaran') - ->options([ - 'full' => 'Full Payment', - 'dp' => 'Down Payment', - ]) - ->label('Status Pembayaran'), - Tables\Filters\Filter::make('tanggal') ->form([ - Forms\Components\DatePicker::make('tanggal_from')->label('Dari Tanggal'), - Forms\Components\DatePicker::make('tanggal_until')->label('Sampai Tanggal'), + DatePicker::make('tanggal')->label('Tanggal'), ]) ->query(function (Builder $query, array $data): Builder { - return $query - ->when( - $data['tanggal_from'], - fn (Builder $query, $date): Builder => $query->whereDate('tanggal', '>=', $date), - ) - ->when( - $data['tanggal_until'], - fn (Builder $query, $date): Builder => $query->whereDate('tanggal', '<=', $date), - ); + return $query->when( + $data['tanggal'], + fn (Builder $query, $date): Builder => $query->whereDate('tanggal', $date), + ); }), ]) ->actions([ diff --git a/app/Filament/Resources/ReservasiiResource/Pages/CreateReservasii.php b/app/Filament/Resources/ReservasiiResource/Pages/CreateReservasii.php index 1a35e33..f4a0d3a 100644 --- a/app/Filament/Resources/ReservasiiResource/Pages/CreateReservasii.php +++ b/app/Filament/Resources/ReservasiiResource/Pages/CreateReservasii.php @@ -9,4 +9,4 @@ class CreateReservasii extends CreateRecord { protected static string $resource = ReservasiiResource::class; -} +} \ No newline at end of file diff --git a/app/Filament/Resources/ReservasiiResource/Pages/ListReservasiis.php b/app/Filament/Resources/ReservasiiResource/Pages/ListReservasiis.php index ec1dcfb..31bcf6b 100644 --- a/app/Filament/Resources/ReservasiiResource/Pages/ListReservasiis.php +++ b/app/Filament/Resources/ReservasiiResource/Pages/ListReservasiis.php @@ -5,6 +5,8 @@ use App\Filament\Resources\ReservasiiResource; use App\Filament\Resources\ReservasiiResource\Widgets\ReservasiiStats; use Filament\Actions; +use Filament\Forms\Components\Tabs\Tab; +use Filament\Resources\Components\Tabs; use Filament\Resources\Pages\ListRecords; class ListReservasiis extends ListRecords @@ -18,9 +20,19 @@ protected function getHeaderActions(): array ]; } - protected function getHeaderWidgets(): array{ + //protected function getHeaderWidgets(): array{ + // return[ + // ReservasiiStats::class + //]; + //} + + public function getTabs(): array{ return[ - ReservasiiStats::class + null => \Filament\Resources\Components\Tab::make('Semua'), + 'Paket Pasangan' => \Filament\Resources\Components\Tab::make()->query(fn($query) => $query->whereRelation('detail.paketFoto', 'nama_paket_foto', 'Paket Pasangan')), + 'Paket 5 orang' => \Filament\Resources\Components\Tab::make()->query(fn($query) => $query->whereRelation('detail.paketFoto', 'nama_paket_foto', 'Paket 5 Orang')), + 'Widebox Couple' => \Filament\Resources\Components\Tab::make()->query(fn($query) => $query->whereRelation('detail.paketFoto', 'nama_paket_foto', 'Widebox Couple')), + 'Widebox Group' => \Filament\Resources\Components\Tab::make()->query(fn($query) => $query->whereRelation('detail.paketFoto', 'nama_paket_foto', 'Widebox Group')), ]; } } diff --git a/app/Filament/Resources/ReservasiiResource/Widgets/ReservasiiStats.php b/app/Filament/Resources/ReservasiiResource/Widgets/ReservasiiStats.php index bbdc554..0cf16a8 100644 --- a/app/Filament/Resources/ReservasiiResource/Widgets/ReservasiiStats.php +++ b/app/Filament/Resources/ReservasiiResource/Widgets/ReservasiiStats.php @@ -13,10 +13,15 @@ protected function getStats(): array{ $todayEarnings = Reservasii::query() ->whereDate('tanggal', Carbon::today()) ->sum('total'); + $mounthEarnings = Reservasii::whereMonth('created_at', now()->month) + ->whereYear('created_at', now()->year) + ->sum('total'); return [ Stat::make('Reservasi Hari Ini', Reservasii::query()->whereDate('tanggal', Carbon::today())->count()), - Stat::make('Pendapatan Hari Ini', 'Rp ' . number_format($todayEarnings, 0, ',', '.')) + Stat::make('Pendapatan Hari Ini', 'Rp' . number_format($todayEarnings, 0, ',', '.')), + Stat::make('Pendapatan Per Bulan','Rp' . number_format($mounthEarnings, 0,',', '.')) ]; + } } diff --git a/app/Filament/Resources/UserResource.php b/app/Filament/Resources/UserResource.php index cc7f7e2..fb8fc2a 100644 --- a/app/Filament/Resources/UserResource.php +++ b/app/Filament/Resources/UserResource.php @@ -26,7 +26,13 @@ class UserResource extends Resource { protected static ?string $model = User::class; protected static ?string $recordTitleAttribute = 'name'; - + protected static ?string $navigationLabel = 'User'; + public static function getPluralLabel(): string{ + return 'User';} + public static function getModelLabel(): string + { + return 'User'; + } protected static ?string $navigationIcon = 'heroicon-o-user-group'; public static function form(Form $form): Form @@ -78,9 +84,9 @@ public static function table(Table $table): Table ]) ]) ->bulkActions([ - Tables\Actions\BulkActionGroup::make([ - Tables\Actions\DeleteBulkAction::make(), - ]), + // Tables\Actions\BulkActionGroup::make([ + // Tables\Actions\DeleteBulkAction::make(), + //]), ]); } diff --git a/app/Filament/Widgets/CalendarWidget.php b/app/Filament/Widgets/CalendarWidget.php deleted file mode 100644 index 61c7efb..0000000 --- a/app/Filament/Widgets/CalendarWidget.php +++ /dev/null @@ -1,33 +0,0 @@ -select('tanggal', 'waktu') - ->get() - ->groupBy(function($item) { - return Carbon::parse($item->tanggal)->format('Y-m-d'); - }) - ->map(function ($items) { - return $items->pluck('waktu')->toArray(); - }); - - return $data; - } -} diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index a86875a..3de14c7 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -31,8 +31,11 @@ public function panel(Panel $panel): Panel ->path('admin') ->login() ->colors([ - 'primary' => Color::Amber, + 'primary' => Color::Gray, ]) + ->brandName('Ko-La Self') + ->brandLogo(asset('images/logo.png')) + ->favicon(asset('images/logo.png')) ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources') ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages') ->pages([ @@ -41,7 +44,7 @@ public function panel(Panel $panel): Panel ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets') ->widgets([ ReservasiiStats::class, - CalendarWidget::class + //CalendarWidget::class //Widgets\AccountWidget::class, //Widgets\FilamentInfoWidget::class, ]) diff --git a/resources/views/vendor/filament/assets.blade.php b/resources/views/vendor/filament/assets.blade.php new file mode 100644 index 0000000..1cf3bde --- /dev/null +++ b/resources/views/vendor/filament/assets.blade.php @@ -0,0 +1,17 @@ +@if (isset($data)) + +@endif + +@foreach ($assets as $asset) + @if (! $asset->isLoadedOnRequest()) + {{ $asset->getHtml() }} + @endif +@endforeach + + diff --git a/resources/views/vendor/filament/components/actions.blade.php b/resources/views/vendor/filament/components/actions.blade.php new file mode 100644 index 0000000..607d546 --- /dev/null +++ b/resources/views/vendor/filament/components/actions.blade.php @@ -0,0 +1,64 @@ +@php + use Filament\Support\Enums\Alignment; +@endphp + +@props([ + 'actions' => [], + 'alignment' => Alignment::Start, + 'fullWidth' => false, +]) + +@php + if (is_array($actions)) { + $actions = array_filter( + $actions, + fn ($action): bool => $action->isVisible(), + ); + } + + if (! $alignment instanceof Alignment) { + $alignment = filled($alignment) ? (Alignment::tryFrom($alignment) ?? $alignment) : null; + } + + $hasActions = false; + + $hasSlot = ! \Filament\Support\is_slot_empty($slot); + $actionsAreHtmlable = $actions instanceof \Illuminate\Contracts\Support\Htmlable; + + if ($hasSlot) { + $hasActions = true; + } elseif ($actionsAreHtmlable) { + $hasActions = ! \Filament\Support\is_slot_empty($actions); + } else { + $hasActions = filled($actions); + } +@endphp + +@if ($hasActions) +
class([ + 'fi-ac gap-3', + 'flex flex-wrap items-center' => ! $fullWidth, + match ($alignment) { + Alignment::Start, Alignment::Left => 'justify-start', + Alignment::Center => 'justify-center', + Alignment::End, Alignment::Right => 'flex-row-reverse', + Alignment::Between, Alignment::Justify => 'justify-between', + default => $alignment, + } => ! $fullWidth, + 'grid grid-cols-[repeat(auto-fit,minmax(0,1fr))]' => $fullWidth, + ]) + }} + > + @if ($hasSlot) + {{ $slot }} + @elseif ($actionsAreHtmlable) + {{ $actions }} + @else + @foreach ($actions as $action) + {{ $action }} + @endforeach + @endif +
+@endif diff --git a/resources/views/vendor/filament/components/avatar.blade.php b/resources/views/vendor/filament/components/avatar.blade.php new file mode 100644 index 0000000..aa81aae --- /dev/null +++ b/resources/views/vendor/filament/components/avatar.blade.php @@ -0,0 +1,21 @@ +@props([ + 'circular' => true, + 'size' => 'md', +]) + +class([ + 'fi-avatar object-cover object-center', + 'rounded-md' => ! $circular, + 'fi-circular rounded-full' => $circular, + match ($size) { + 'sm' => 'h-6 w-6', + 'md' => 'h-8 w-8', + 'lg' => 'h-10 w-10', + default => $size, + }, + ]) + }} +/> diff --git a/resources/views/vendor/filament/components/badge.blade.php b/resources/views/vendor/filament/components/badge.blade.php new file mode 100644 index 0000000..bc6bcc8 --- /dev/null +++ b/resources/views/vendor/filament/components/badge.blade.php @@ -0,0 +1,238 @@ +@php + use Filament\Support\Enums\ActionSize; + use Filament\Support\Enums\IconPosition; + use Filament\Support\Enums\IconSize; +@endphp + +@props([ + 'color' => 'primary', + 'deleteButton' => null, + 'disabled' => false, + 'form' => null, + 'formId' => null, + 'href' => null, + 'icon' => null, + 'iconAlias' => null, + 'iconPosition' => IconPosition::Before, + 'iconSize' => IconSize::Small, + 'keyBindings' => null, + 'loadingIndicator' => true, + 'size' => ActionSize::Medium, + 'spaMode' => null, + 'tag' => 'span', + 'target' => null, + 'tooltip' => null, + 'type' => 'button', +]) + +@php + if (! $iconPosition instanceof IconPosition) { + $iconPosition = filled($iconPosition) ? (IconPosition::tryFrom($iconPosition) ?? $iconPosition) : null; + } + + if (! $size instanceof ActionSize) { + $size = filled($size) ? (ActionSize::tryFrom($size) ?? $size) : null; + } + + if (! $iconSize instanceof IconSize) { + $iconSize = filled($iconSize) ? (IconSize::tryFrom($iconSize) ?? $iconSize) : null; + } + + $isDeletable = count($deleteButton?->attributes->getAttributes() ?? []) > 0; + + $iconClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-badge-icon h-4 w-4', + match ($iconSize) { + IconSize::Small => 'h-4 w-4', + IconSize::Medium => 'h-5 w-5', + IconSize::Large => 'h-6 w-6', + default => $iconSize, + }, + match ($color) { + 'gray' => 'text-gray-400 dark:text-gray-500', + default => 'text-custom-500', + }, + ]); + + $iconStyles = \Illuminate\Support\Arr::toCssStyles([ + \Filament\Support\get_color_css_variables( + $color, + shades: [500], + alias: 'badge.icon', + ) => $color !== 'gray', + ]); + + $wireTarget = $loadingIndicator ? $attributes->whereStartsWith(['wire:target', 'wire:click'])->filter(fn ($value): bool => filled($value))->first() : null; + + $hasLoadingIndicator = filled($wireTarget) || ($type === 'submit' && filled($form)); + + if ($hasLoadingIndicator) { + $loadingIndicatorTarget = html_entity_decode($wireTarget ?: $form, ENT_QUOTES); + } + + $hasTooltip = filled($tooltip); +@endphp + +<{{ $tag }} + @if ($tag === 'a') + {{ \Filament\Support\generate_href_html($href, $target === '_blank', $spaMode) }} + @endif + @if ($keyBindings || $hasTooltip) + x-data="{}" + @endif + @if ($keyBindings) + x-bind:id="$id('key-bindings')" + x-mousetrap.global.{{ collect($keyBindings)->map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.') }}="document.getElementById($el.id).click()" + @endif + @if ($hasTooltip) + x-tooltip="{ + content: @js($tooltip), + theme: $store.theme, + }" + @endif + {{ + $attributes + ->merge([ + 'disabled' => $disabled, + 'form' => $tag === 'button' ? $formId : null, + 'type' => $tag === 'button' ? $type : null, + 'wire:loading.attr' => $tag === 'button' ? 'disabled' : null, + 'wire:target' => ($hasLoadingIndicator && $loadingIndicatorTarget) ? $loadingIndicatorTarget : null, + ], escape: false) + ->class([ + 'fi-badge flex items-center justify-center gap-x-1 rounded-md text-xs font-medium ring-1 ring-inset', + 'pointer-events-none opacity-70' => $disabled, + match ($size) { + ActionSize::ExtraSmall => 'px-0.5 min-w-[theme(spacing.4)] tracking-tighter', + ActionSize::Small => 'px-1.5 min-w-[theme(spacing.5)] py-0.5 tracking-tight', + ActionSize::Medium, ActionSize::Large, ActionSize::ExtraLarge => 'px-2 min-w-[theme(spacing.6)] py-1', + default => $size, + }, + match ($color) { + 'gray' => 'bg-gray-50 text-gray-600 ring-gray-600/10 dark:bg-gray-400/10 dark:text-gray-400 dark:ring-gray-400/20', + default => 'fi-color-custom bg-custom-50 text-custom-600 ring-custom-600/10 dark:bg-custom-400/10 dark:text-custom-400 dark:ring-custom-400/30', + }, + is_string($color) ? "fi-color-{$color}" : null, + ]) + ->style([ + \Filament\Support\get_color_css_variables( + $color, + shades: [ + 50, + 400, + 600, + ], + alias: 'badge', + ) => $color !== 'gray', + ]) + }} +> + @if ($iconPosition === IconPosition::Before) + @if ($icon) + + @endif + + @if ($hasLoadingIndicator) + + @endif + @endif + + + + {{ $slot }} + + + + @if ($isDeletable) + + @elseif ($iconPosition === IconPosition::After) + @if ($icon) + + @endif + + @if ($hasLoadingIndicator) + + @endif + @endif + diff --git a/resources/views/vendor/filament/components/breadcrumbs.blade.php b/resources/views/vendor/filament/components/breadcrumbs.blade.php new file mode 100644 index 0000000..92a31d2 --- /dev/null +++ b/resources/views/vendor/filament/components/breadcrumbs.blade.php @@ -0,0 +1,50 @@ +@props([ + 'breadcrumbs' => [], +]) + +@php + $iconClasses = 'fi-breadcrumbs-item-separator flex h-5 w-5 text-gray-400 dark:text-gray-500'; + $itemLabelClasses = 'fi-breadcrumbs-item-label text-sm font-medium text-gray-500 dark:text-gray-400'; +@endphp + + diff --git a/resources/views/vendor/filament/components/button/group.blade.php b/resources/views/vendor/filament/components/button/group.blade.php new file mode 100644 index 0000000..d06423b --- /dev/null +++ b/resources/views/vendor/filament/components/button/group.blade.php @@ -0,0 +1,9 @@ +
class([ + 'fi-btn-group grid grid-flow-col rounded-lg shadow-sm ring-1 ring-gray-950/10 dark:ring-white/20', + ]) + }} +> + {{ $slot }} +
diff --git a/resources/views/vendor/filament/components/button/index.blade.php b/resources/views/vendor/filament/components/button/index.blade.php new file mode 100644 index 0000000..1928120 --- /dev/null +++ b/resources/views/vendor/filament/components/button/index.blade.php @@ -0,0 +1,332 @@ +@php + use Filament\Support\Enums\ActionSize; + use Filament\Support\Enums\IconPosition; + use Filament\Support\Enums\IconSize; +@endphp + +@props([ + 'badge' => null, + 'badgeColor' => 'primary', + 'badgeSize' => 'xs', + 'color' => 'primary', + 'disabled' => false, + 'form' => null, + 'formId' => null, + 'grouped' => false, + 'href' => null, + 'icon' => null, + 'iconAlias' => null, + 'iconPosition' => IconPosition::Before, + 'iconSize' => null, + 'keyBindings' => null, + 'labeledFrom' => null, + 'labelSrOnly' => false, + 'loadingIndicator' => true, + 'outlined' => false, + 'size' => ActionSize::Medium, + 'spaMode' => null, + 'tag' => 'button', + 'target' => null, + 'tooltip' => null, + 'type' => 'button', +]) + +@php + if (! $iconPosition instanceof IconPosition) { + $iconPosition = filled($iconPosition) ? (IconPosition::tryFrom($iconPosition) ?? $iconPosition) : null; + } + + if (! $size instanceof ActionSize) { + $size = filled($size) ? (ActionSize::tryFrom($size) ?? $size) : null; + } + + $iconSize ??= match ($size) { + ActionSize::ExtraSmall, ActionSize::Small => IconSize::Small, + default => IconSize::Medium, + }; + + if (! $iconSize instanceof IconSize) { + $iconSize = filled($iconSize) ? (IconSize::tryFrom($iconSize) ?? $iconSize) : null; + } + + $buttonClasses = \Illuminate\Support\Arr::toCssClasses([ + ...[ + 'fi-btn relative grid-flow-col items-center justify-center font-semibold outline-none transition duration-75 focus-visible:ring-2', + 'pointer-events-none opacity-70' => $disabled, + 'rounded-lg' => ! $grouped, + 'flex-1 [&:nth-child(1_of_.fi-btn)]:rounded-s-lg [&:nth-last-child(1_of_.fi-btn)]:rounded-e-lg [&:not(:nth-child(1_of_.fi-btn))]:shadow-[-1px_0_0_0_theme(colors.gray.200)] [&:not(:nth-last-child(1_of_.fi-btn))]:me-px dark:[&:not(:nth-child(1_of_.fi-btn))]:shadow-[-1px_0_0_0_theme(colors.white/20%)]' => $grouped, + 'cursor-pointer' => $tag === 'label', + match ($color) { + 'gray' => null, + default => 'fi-color-custom', + }, + // @deprecated `fi-btn-color-*` has been replaced by `fi-color-*` and `fi-color-custom`. + is_string($color) ? "fi-btn-color-{$color}" : null, + is_string($color) ? "fi-color-{$color}" : null, + ($size instanceof ActionSize) ? "fi-size-{$size->value}" : null, + // @deprecated `fi-btn-size-*` has been replaced by `fi-size-*`. + ($size instanceof ActionSize) ? "fi-btn-size-{$size->value}" : null, + match ($size) { + ActionSize::ExtraSmall => 'gap-1 px-2 py-1.5 text-xs', + ActionSize::Small => 'gap-1 px-2.5 py-1.5 text-sm', + ActionSize::Medium => 'gap-1.5 px-3 py-2 text-sm', + ActionSize::Large => 'gap-1.5 px-3.5 py-2.5 text-sm', + ActionSize::ExtraLarge => 'gap-1.5 px-4 py-3 text-sm', + default => $size, + }, + 'hidden' => $labeledFrom, + match ($labeledFrom) { + 'sm' => 'sm:inline-grid', + 'md' => 'md:inline-grid', + 'lg' => 'lg:inline-grid', + 'xl' => 'xl:inline-grid', + '2xl' => '2xl:inline-grid', + default => 'inline-grid', + }, + ], + ...( + $outlined ? + [ + 'fi-btn-outlined ring-1', + match ($color) { + 'gray' => 'text-gray-950 ring-gray-300 hover:bg-gray-400/10 focus-visible:ring-gray-400/40 dark:text-white dark:ring-gray-700', + default => 'text-custom-600 ring-custom-600 hover:bg-custom-400/10 dark:text-custom-400 dark:ring-custom-500', + }, + ] : + [ + 'shadow-sm' => ! $grouped, + 'bg-white text-gray-950 hover:bg-gray-50 dark:bg-white/5 dark:text-white dark:hover:bg-white/10' => ($color === 'gray') || ($tag === 'label'), + 'ring-1 ring-gray-950/10 dark:ring-white/20' => (($color === 'gray') || ($tag === 'label')) && (! $grouped), + 'bg-custom-600 text-white hover:bg-custom-500 focus-visible:ring-custom-500/50 dark:bg-custom-500 dark:hover:bg-custom-400 dark:focus-visible:ring-custom-400/50' => ($color !== 'gray') && ($tag !== 'label'), + '[input:checked+&]:bg-custom-600 [input:checked+&]:text-white [input:checked+&]:ring-0 [input:checked+&]:hover:bg-custom-500 dark:[input:checked+&]:bg-custom-500 dark:[input:checked+&]:hover:bg-custom-400 [input:checked:focus-visible+&]:ring-custom-500/50 dark:[input:checked:focus-visible+&]:ring-custom-400/50 [input:focus-visible+&]:z-10 [input:focus-visible+&]:ring-2 [input:focus-visible+&]:ring-gray-950/10 dark:[input:focus-visible+&]:ring-white/20' => ($color !== 'gray') && ($tag === 'label'), + '[input:checked+&]:bg-gray-400 [input:checked+&]:text-white [input:checked+&]:ring-0 [input:checked+&]:hover:bg-gray-300 dark:[input:checked+&]:bg-gray-600 dark:[input:checked+&]:hover:bg-gray-500' => ($color === 'gray'), + ] + ), + ]); + + $buttonStyles = \Illuminate\Support\Arr::toCssStyles([ + \Filament\Support\get_color_css_variables( + $color, + shades: [400, 500, 600], + alias: 'button', + ) => $color !== 'gray', + ]); + + $iconClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-btn-icon transition duration-75', + match ($iconSize) { + IconSize::Small => 'h-4 w-4', + IconSize::Medium => 'h-5 w-5', + IconSize::Large => 'h-6 w-6', + default => $iconSize, + }, + 'text-gray-400 dark:text-gray-500' => ($color === 'gray') || ($tag === 'label'), + 'text-white' => ($color !== 'gray') && ($tag !== 'label') && (! $outlined), + '[:checked+*>&]:text-white' => $tag === 'label', + ]); + + $badgeContainerClasses = 'fi-btn-badge-ctn absolute start-full top-0 z-[1] w-max -translate-x-1/2 -translate-y-1/2 rounded-md bg-white dark:bg-gray-900 rtl:translate-x-1/2'; + + $labelClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-btn-label', + 'sr-only' => $labelSrOnly, + ]); + + $wireTarget = $loadingIndicator ? $attributes->whereStartsWith(['wire:target', 'wire:click'])->filter(fn ($value): bool => filled($value))->first() : null; + + $hasFormProcessingLoadingIndicator = $type === 'submit' && filled($form); + $hasLoadingIndicator = filled($wireTarget) || $hasFormProcessingLoadingIndicator; + + if ($hasLoadingIndicator) { + $loadingIndicatorTarget = html_entity_decode($wireTarget ?: $form, ENT_QUOTES); + } + + $hasTooltip = filled($tooltip); +@endphp + +@if ($labeledFrom) + +@endif + +<{{ $tag }} + @if ($tag === 'a') + {{ \Filament\Support\generate_href_html($href, $target === '_blank', $spaMode) }} + @endif + @if (($keyBindings || $hasTooltip) && (! $hasFormProcessingLoadingIndicator)) + x-data="{}" + @endif + @if ($keyBindings) + x-bind:id="$id('key-bindings')" + x-mousetrap.global.{{ collect($keyBindings)->map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.') }}="document.getElementById($el.id).click()" + @endif + @if ($hasTooltip) + x-tooltip="{ + content: @js($tooltip), + theme: $store.theme, + }" + @endif + @if ($hasFormProcessingLoadingIndicator) + x-data="{ + form: null, + isProcessing: false, + processingMessage: null, + }" + x-init=" + form = $el.closest('form') + + form?.addEventListener('form-processing-started', (event) => { + isProcessing = true + processingMessage = event.detail.message + }) + + form?.addEventListener('form-processing-finished', () => { + isProcessing = false + }) + " + x-bind:class="{ 'enabled:opacity-70 enabled:cursor-wait': isProcessing }" + @endif + {{ + $attributes + ->merge([ + 'disabled' => $disabled, + 'form' => $formId, + 'type' => $tag === 'button' ? $type : null, + 'wire:loading.attr' => $tag === 'button' ? 'disabled' : null, + 'wire:target' => ($hasLoadingIndicator && $loadingIndicatorTarget) ? $loadingIndicatorTarget : null, + 'x-bind:disabled' => $hasFormProcessingLoadingIndicator ? 'isProcessing' : null, + ], escape: false) + ->class([$buttonClasses]) + ->style([$buttonStyles]) + }} +> + @if ($iconPosition === IconPosition::Before) + @if ($icon) + + @endif + + @if ($hasLoadingIndicator) + + @endif + + @if ($hasFormProcessingLoadingIndicator) + + @endif + @endif + + + {{ $slot }} + + + @if ($hasFormProcessingLoadingIndicator) + + @endif + + @if ($iconPosition === IconPosition::After) + @if ($icon) + + @endif + + @if ($hasLoadingIndicator) + + @endif + + @if ($hasFormProcessingLoadingIndicator) + + @endif + @endif + + @if (filled($badge)) +
+ + {{ $badge }} + +
+ @endif + diff --git a/resources/views/vendor/filament/components/card.blade.php b/resources/views/vendor/filament/components/card.blade.php new file mode 100644 index 0000000..141f864 --- /dev/null +++ b/resources/views/vendor/filament/components/card.blade.php @@ -0,0 +1,3 @@ + + {{ $slot }} + diff --git a/resources/views/vendor/filament/components/dropdown/header.blade.php b/resources/views/vendor/filament/components/dropdown/header.blade.php new file mode 100644 index 0000000..dab4683 --- /dev/null +++ b/resources/views/vendor/filament/components/dropdown/header.blade.php @@ -0,0 +1,71 @@ +@php + use Filament\Support\Enums\IconSize; +@endphp + +@props([ + 'color' => 'gray', + 'icon' => null, + 'iconSize' => IconSize::Medium, + 'tag' => 'div', +]) + +<{{ $tag }} + {{ + $attributes + ->class([ + 'fi-dropdown-header flex w-full gap-2 p-3 text-sm', + match ($color) { + 'gray' => null, + default => 'fi-color-custom', + }, + // @deprecated `fi-dropdown-header-color-*` has been replaced by `fi-color-*` and `fi-color-custom`. + is_string($color) ? "fi-dropdown-header-color-{$color}" : null, + is_string($color) ? "fi-color-{$color}" : null, + ]) + }} +> + @if (filled($icon)) + 'h-4 w-4', + IconSize::Medium, 'md' => 'h-5 w-5', + IconSize::Large, 'lg' => 'h-6 w-6', + default => $iconSize, + }, + match ($color) { + 'gray' => 'text-gray-400 dark:text-gray-500', + default => 'text-custom-500 dark:text-custom-400', + }, + ]) + @style([ + \Filament\Support\get_color_css_variables( + $color, + shades: [400, 500], + alias: 'dropdown.header.icon', + ) => $color !== 'gray', + ]) + /> + @endif + + 'text-gray-700 dark:text-gray-200', + default => 'text-custom-600 dark:text-custom-400', + }, + ]) + @style([ + \Filament\Support\get_color_css_variables( + $color, + shades: [400, 600], + alias: 'dropdown.header.label', + ) => $color !== 'gray', + ]) + > + {{ $slot }} + + diff --git a/resources/views/vendor/filament/components/dropdown/index.blade.php b/resources/views/vendor/filament/components/dropdown/index.blade.php new file mode 100644 index 0000000..551571a --- /dev/null +++ b/resources/views/vendor/filament/components/dropdown/index.blade.php @@ -0,0 +1,87 @@ +@props([ + 'availableHeight' => null, + 'availableWidth' => null, + 'flip' => true, + 'maxHeight' => null, + 'offset' => 8, + 'placement' => null, + 'shift' => false, + 'size' => false, + 'sizePadding' => 16, + 'teleport' => false, + 'trigger' => null, + 'width' => null, +]) + +@php + use Filament\Support\Enums\MaxWidth; + + $sizeConfig = collect([ + 'availableHeight' => $availableHeight, + 'availableWidth' => $availableWidth, + 'padding' => $sizePadding, + ])->filter()->toJson(); +@endphp + +
class(['fi-dropdown']) }} +> +
attributes->class(['fi-dropdown-trigger flex cursor-pointer']) }} + > + {{ $trigger }} +
+ + @if (! \Filament\Support\is_slot_empty($slot)) +
has('wire:key')) + wire:ignore.self + wire:key="{{ $attributes->get('wire:key') }}.panel" + @endif + @class([ + 'fi-dropdown-panel absolute z-10 w-screen divide-y divide-gray-100 rounded-lg bg-white shadow-lg ring-1 ring-gray-950/5 transition dark:divide-white/5 dark:bg-gray-900 dark:ring-white/10', + match ($width) { + // These max width classes need to be `!important` otherwise they will be usurped by the Floating UI "size" middleware. + MaxWidth::ExtraSmall, 'xs' => '!max-w-xs', + MaxWidth::Small, 'sm' => '!max-w-sm', + MaxWidth::Medium, 'md' => '!max-w-md', + MaxWidth::Large, 'lg' => '!max-w-lg', + MaxWidth::ExtraLarge, 'xl' => '!max-w-xl', + MaxWidth::TwoExtraLarge, '2xl' => '!max-w-2xl', + MaxWidth::ThreeExtraLarge, '3xl' => '!max-w-3xl', + MaxWidth::FourExtraLarge, '4xl' => '!max-w-4xl', + MaxWidth::FiveExtraLarge, '5xl' => '!max-w-5xl', + MaxWidth::SixExtraLarge, '6xl' => '!max-w-6xl', + MaxWidth::SevenExtraLarge, '7xl' => '!max-w-7xl', + null => '!max-w-[14rem]', + default => $width, + }, + 'overflow-y-auto' => $maxHeight || $size, + ]) + @style([ + "max-height: {$maxHeight}" => $maxHeight, + ]) + > + {{ $slot }} +
+ @endif +
diff --git a/resources/views/vendor/filament/components/dropdown/list/index.blade.php b/resources/views/vendor/filament/components/dropdown/list/index.blade.php new file mode 100644 index 0000000..fceb894 --- /dev/null +++ b/resources/views/vendor/filament/components/dropdown/list/index.blade.php @@ -0,0 +1,3 @@ +
class(['fi-dropdown-list p-1']) }}> + {{ $slot }} +
diff --git a/resources/views/vendor/filament/components/dropdown/list/item.blade.php b/resources/views/vendor/filament/components/dropdown/list/item.blade.php new file mode 100644 index 0000000..99b9cf7 --- /dev/null +++ b/resources/views/vendor/filament/components/dropdown/list/item.blade.php @@ -0,0 +1,275 @@ +@php + use Filament\Support\Enums\IconSize; +@endphp + +@props([ + 'badge' => null, + 'badgeColor' => null, + 'badgeTooltip' => null, + 'color' => 'gray', + 'disabled' => false, + 'href' => null, + 'icon' => null, + 'iconAlias' => null, + 'iconColor' => null, + 'iconSize' => IconSize::Medium, + 'image' => null, + 'keyBindings' => null, + 'loadingIndicator' => true, + 'spaMode' => null, + 'tag' => 'button', + 'target' => null, + 'tooltip' => null, +]) + +@php + $buttonClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-dropdown-list-item flex w-full items-center gap-2 whitespace-nowrap rounded-md p-2 text-sm transition-colors duration-75 outline-none disabled:pointer-events-none disabled:opacity-70', + 'pointer-events-none opacity-70' => $disabled, + match ($color) { + 'gray' => 'hover:bg-gray-50 focus-visible:bg-gray-50 dark:hover:bg-white/5 dark:focus-visible:bg-white/5', + default => 'fi-color-custom hover:bg-custom-50 focus-visible:bg-custom-50 dark:hover:bg-custom-400/10 dark:focus-visible:bg-custom-400/10', + }, + // @deprecated `fi-dropdown-list-item-color-*` has been replaced by `fi-color-*` and `fi-color-custom`. + is_string($color) ? "fi-dropdown-list-item-color-{$color}" : null, + is_string($color) ? "fi-color-{$color}" : null, + ]); + + $buttonStyles = \Illuminate\Support\Arr::toCssStyles([ + \Filament\Support\get_color_css_variables( + $color, + shades: [50, 400], + alias: 'dropdown.list.item', + ) => $color !== 'gray', + ]); + + $iconColor ??= $color; + + $iconClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-dropdown-list-item-icon', + match ($iconSize) { + IconSize::Small, 'sm' => 'h-4 w-4', + IconSize::Medium, 'md' => 'h-5 w-5', + IconSize::Large, 'lg' => 'h-6 w-6', + default => $iconSize, + }, + match ($iconColor) { + 'gray' => 'text-gray-400 dark:text-gray-500', + default => 'text-custom-500 dark:text-custom-400', + }, + ]); + + $iconStyles = \Illuminate\Support\Arr::toCssStyles([ + \Filament\Support\get_color_css_variables( + $iconColor, + shades: [400, 500], + alias: 'dropdown.list.item.icon', + ) => $iconColor !== 'gray', + ]); + + $imageClasses = 'fi-dropdown-list-item-image h-5 w-5 rounded-full bg-cover bg-center'; + + $labelClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-dropdown-list-item-label flex-1 truncate text-start', + match ($color) { + 'gray' => 'text-gray-700 dark:text-gray-200', + default => 'text-custom-600 dark:text-custom-400 ', + }, + ]); + + $labelStyles = \Illuminate\Support\Arr::toCssStyles([ + \Filament\Support\get_color_css_variables( + $color, + shades: [400, 600], + alias: 'dropdown.list.item.label', + ) => $color !== 'gray', + ]); + + $wireTarget = $loadingIndicator ? $attributes->whereStartsWith(['wire:target', 'wire:click'])->filter(fn ($value): bool => filled($value))->first() : null; + + $hasLoadingIndicator = filled($wireTarget); + + if ($hasLoadingIndicator) { + $loadingIndicatorTarget = html_entity_decode($wireTarget, ENT_QUOTES); + } + + $hasTooltip = filled($tooltip); +@endphp + +@if ($tag === 'button') + +@elseif ($tag === 'a') + map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.') }}="document.getElementById($el.id).click()" + @endif + @if ($hasTooltip) + x-tooltip="{ + content: @js($tooltip), + theme: $store.theme, + }" + @endif + {{ + $attributes + ->class([$buttonClasses]) + ->style([$buttonStyles]) + }} + > + @if ($icon) + + @endif + + @if ($image) +
+ @endif + + + {{ $slot }} + + + @if (filled($badge)) + + {{ $badge }} + + @endif +
+@elseif ($tag === 'form') +
only(['action', 'class', 'method', 'wire:submit']) }} + > + @csrf + + +
+@endif diff --git a/resources/views/vendor/filament/components/fieldset.blade.php b/resources/views/vendor/filament/components/fieldset.blade.php new file mode 100644 index 0000000..7c8370f --- /dev/null +++ b/resources/views/vendor/filament/components/fieldset.blade.php @@ -0,0 +1,25 @@ +@props([ + 'label' => null, + 'labelHidden' => false, +]) + +
class([ + 'fi-fieldset rounded-xl border border-gray-200 p-6 dark:border-white/10', + ]) + }} +> + @if (filled($label)) + $labelHidden, + ]) + > + {{ $label }} + + @endif + + {{ $slot }} +
diff --git a/resources/views/vendor/filament/components/grid/column.blade.php b/resources/views/vendor/filament/components/grid/column.blade.php new file mode 100644 index 0000000..119dbcf --- /dev/null +++ b/resources/views/vendor/filament/components/grid/column.blade.php @@ -0,0 +1,62 @@ +@props([ + 'default' => 1, + 'sm' => null, + 'md' => null, + 'lg' => null, + 'xl' => null, + 'twoXl' => null, + 'defaultStart' => null, + 'smStart' => null, + 'mdStart' => null, + 'lgStart' => null, + 'xlStart' => null, + 'twoXlStart' => null, + 'hidden' => false, +]) + +@php + $getSpanValue = function ($span): string { + if ($span === 'full') { + return '1 / -1'; + } + + return "span {$span} / span {$span}"; + }; +@endphp + +
class([ + 'hidden' => $hidden || $default === 'hidden', + 'col-[--col-span-default]' => $default && (! $hidden), + 'sm:col-[--col-span-sm]' => $sm && (! $hidden), + 'md:col-[--col-span-md]' => $md && (! $hidden), + 'lg:col-[--col-span-lg]' => $lg && (! $hidden), + 'xl:col-[--col-span-xl]' => $xl && (! $hidden), + '2xl:col-[--col-span-2xl]' => $twoXl && (! $hidden), + 'col-start-[--col-start-default]' => $defaultStart && (! $hidden), + 'sm:col-start-[--col-start-sm]' => $smStart && (! $hidden), + 'md:col-start-[--col-start-md]' => $mdStart && (! $hidden), + 'lg:col-start-[--col-start-lg]' => $lgStart && (! $hidden), + 'xl:col-start-[--col-start-xl]' => $xlStart && (! $hidden), + '2xl:col-start-[--col-start-2xl]' => $twoXlStart && (! $hidden), + ]) + ->style([ + "--col-span-default: {$getSpanValue($default)}" => $default, + "--col-span-sm: {$getSpanValue($sm)}" => $sm, + "--col-span-md: {$getSpanValue($md)}" => $md, + "--col-span-lg: {$getSpanValue($lg)}" => $lg, + "--col-span-xl: {$getSpanValue($xl)}" => $xl, + "--col-span-2xl: {$getSpanValue($twoXl)}" => $twoXl, + "--col-start-default: {$defaultStart}" => $defaultStart, + "--col-start-sm: {$smStart}" => $smStart, + "--col-start-md: {$mdStart}" => $mdStart, + "--col-start-lg: {$lgStart}" => $lgStart, + "--col-start-xl: {$xlStart}" => $xlStart, + "--col-start-2xl: {$twoXlStart}" => $twoXlStart, + ]) + }} +> + {{ $slot }} +
diff --git a/resources/views/vendor/filament/components/grid/index.blade.php b/resources/views/vendor/filament/components/grid/index.blade.php new file mode 100644 index 0000000..c4fba7b --- /dev/null +++ b/resources/views/vendor/filament/components/grid/index.blade.php @@ -0,0 +1,53 @@ +@props([ + 'isGrid' => true, + 'default' => 1, + 'direction' => 'row', + 'sm' => null, + 'md' => null, + 'lg' => null, + 'xl' => null, + 'twoXl' => null, +]) + +
class([ + 'grid' => $isGrid && $direction === 'row', + 'grid-cols-[--cols-default]' => $default && ($direction === 'row'), + 'columns-[--cols-default]' => $default && ($direction === 'column'), + 'sm:grid-cols-[--cols-sm]' => $sm && ($direction === 'row'), + 'sm:columns-[--cols-sm]' => $sm && ($direction === 'column'), + 'md:grid-cols-[--cols-md]' => $md && ($direction === 'row'), + 'md:columns-[--cols-md]' => $md && ($direction === 'column'), + 'lg:grid-cols-[--cols-lg]' => $lg && ($direction === 'row'), + 'lg:columns-[--cols-lg]' => $lg && ($direction === 'column'), + 'xl:grid-cols-[--cols-xl]' => $xl && ($direction === 'row'), + 'xl:columns-[--cols-xl]' => $xl && ($direction === 'column'), + '2xl:grid-cols-[--cols-2xl]' => $twoXl && ($direction === 'row'), + '2xl:columns-[--cols-2xl]' => $twoXl && ($direction === 'column'), + ]) + ->style( + match ($direction) { + 'column' => [ + "--cols-default: {$default}" => $default, + "--cols-sm: {$sm}" => $sm, + "--cols-md: {$md}" => $md, + "--cols-lg: {$lg}" => $lg, + "--cols-xl: {$xl}" => $xl, + "--cols-2xl: {$twoXl}" => $twoXl, + ], + 'row' => [ + "--cols-default: repeat({$default}, minmax(0, 1fr))" => $default, + "--cols-sm: repeat({$sm}, minmax(0, 1fr))" => $sm, + "--cols-md: repeat({$md}, minmax(0, 1fr))" => $md, + "--cols-lg: repeat({$lg}, minmax(0, 1fr))" => $lg, + "--cols-xl: repeat({$xl}, minmax(0, 1fr))" => $xl, + "--cols-2xl: repeat({$twoXl}, minmax(0, 1fr))" => $twoXl, + ], + }, + ) + }} +> + {{ $slot }} +
diff --git a/resources/views/vendor/filament/components/icon-button.blade.php b/resources/views/vendor/filament/components/icon-button.blade.php new file mode 100644 index 0000000..f700788 --- /dev/null +++ b/resources/views/vendor/filament/components/icon-button.blade.php @@ -0,0 +1,242 @@ +@php + use Filament\Support\Enums\ActionSize; + use Filament\Support\Enums\IconSize; +@endphp + +@props([ + 'badge' => null, + 'badgeColor' => 'primary', + 'badgeSize' => 'xs', + 'color' => 'primary', + 'disabled' => false, + 'form' => null, + 'formId' => null, + 'href' => null, + 'icon' => null, + 'iconAlias' => null, + 'iconSize' => null, + 'keyBindings' => null, + 'label' => null, + 'loadingIndicator' => true, + 'size' => ActionSize::Medium, + 'spaMode' => null, + 'tag' => 'button', + 'target' => null, + 'tooltip' => null, + 'type' => 'button', +]) + +@php + if (! $size instanceof ActionSize) { + $size = filled($size) ? (ActionSize::tryFrom($size) ?? $size) : null; + } + + $iconSize ??= match ($size) { + ActionSize::ExtraSmall => IconSize::Small, + ActionSize::Small, ActionSize::Medium => IconSize::Medium, + ActionSize::Large, ActionSize::ExtraLarge => IconSize::Large, + default => IconSize::Medium, + }; + + if (! $iconSize instanceof IconSize) { + $iconSize = filled($iconSize) ? (IconSize::tryFrom($iconSize) ?? $iconSize) : null; + } + + $buttonClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-icon-btn relative flex items-center justify-center rounded-lg outline-none transition duration-75 focus-visible:ring-2', + 'pointer-events-none opacity-70' => $disabled, + ...match ($size) { + ActionSize::ExtraSmall => [ + match ($iconSize) { + IconSize::Small => '-m-1.5', + IconSize::Medium => '-m-1', + IconSize::Large => '-m-0.5', + }, + 'h-7 w-7', + ], + ActionSize::Small => [ + match ($iconSize) { + IconSize::Small => '-m-2', + IconSize::Medium => '-m-1.5', + IconSize::Large => '-m-1', + }, + 'h-8 w-8', + ], + ActionSize::Medium => [ + match ($iconSize) { + IconSize::Small => '-m-2.5', + IconSize::Medium => '-m-2', + IconSize::Large => '-m-1.5', + }, + 'h-9 w-9', + ], + ActionSize::Large => [ + match ($iconSize) { + IconSize::Small => '-m-3', + IconSize::Medium => '-m-2.5', + IconSize::Large => '-m-2', + }, + 'h-10 w-10', + ], + ActionSize::ExtraLarge => [ + match ($iconSize) { + IconSize::Small => '-m-3.5', + IconSize::Medium => '-m-3', + IconSize::Large => '-m-2.5', + }, + 'h-11 w-11', + ], + }, + match ($color) { + 'gray' => 'text-gray-400 hover:text-gray-500 focus-visible:ring-primary-600 dark:text-gray-500 dark:hover:text-gray-400 dark:focus-visible:ring-primary-500', + default => 'fi-color-custom text-custom-500 hover:text-custom-600 focus-visible:ring-custom-600 dark:text-custom-400 dark:hover:text-custom-300 dark:focus-visible:ring-custom-500', + }, + is_string($color) ? "fi-color-{$color}" : null, + ]); + + $buttonStyles = \Filament\Support\get_color_css_variables( + $color, + shades: [300, 400, 500, 600], + alias: 'icon-button', + ); + + $iconClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-icon-btn-icon', + match ($iconSize) { + IconSize::Small => 'h-4 w-4', + IconSize::Medium => 'h-5 w-5', + IconSize::Large => 'h-6 w-6', + default => $iconSize, + }, + ]); + + $badgeContainerClasses = 'fi-icon-btn-badge-ctn absolute start-full top-1 z-[1] w-max -translate-x-1/2 -translate-y-1/2 rounded-md bg-white dark:bg-gray-900 rtl:translate-x-1/2'; + + $wireTarget = $loadingIndicator ? $attributes->whereStartsWith(['wire:target', 'wire:click'])->filter(fn ($value): bool => filled($value))->first() : null; + + $hasLoadingIndicator = filled($wireTarget) || ($type === 'submit' && filled($form)); + + if ($hasLoadingIndicator) { + $loadingIndicatorTarget = html_entity_decode($wireTarget ?: $form, ENT_QUOTES); + } + + $hasTooltip = filled($tooltip); +@endphp + +@if ($tag === 'button') + +@elseif ($tag === 'a') + map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.') }}="document.getElementById($el.id).click()" + @endif + @if ($hasTooltip) + x-tooltip="{ + content: @js($tooltip), + theme: $store.theme, + }" + @endif + {{ + $attributes + ->merge([ + 'title' => $hasTooltip ? null : $label, + ], escape: true) + ->class([$buttonClasses]) + ->style([$buttonStyles]) + }} + > + @if ($label) + + {{ $label }} + + @endif + + + + @if (filled($badge)) +
+ + {{ $badge }} + +
+ @endif +
+@endif diff --git a/resources/views/vendor/filament/components/icon.blade.php b/resources/views/vendor/filament/components/icon.blade.php new file mode 100644 index 0000000..86a4a3d --- /dev/null +++ b/resources/views/vendor/filament/components/icon.blade.php @@ -0,0 +1,29 @@ +@props([ + 'alias' => null, + 'class' => '', + 'icon' => null, +]) + +@php + $icon = ($alias ? \Filament\Support\Facades\FilamentIcon::resolve($alias) : null) ?: ($icon ?? $slot); +@endphp + +@if ($icon instanceof \Illuminate\Contracts\Support\Htmlable) + class($class) }}> + {{ $icon }} + +@elseif (str_contains($icon, '/')) + merge(['src' => $icon]) + ->class($class) + }} + /> +@else + @svg( + $icon, + $class, + array_filter($attributes->getAttributes()), + ) +@endif diff --git a/resources/views/vendor/filament/components/input/checkbox.blade.php b/resources/views/vendor/filament/components/input/checkbox.blade.php new file mode 100644 index 0000000..8f5c2c0 --- /dev/null +++ b/resources/views/vendor/filament/components/input/checkbox.blade.php @@ -0,0 +1,29 @@ +@props([ + 'alpineValid' => null, + 'valid' => true, +]) + +@php + $hasAlpineValidClasses = filled($alpineValid); + + $validInputClasses = 'text-primary-600 ring-gray-950/10 focus:ring-primary-600 checked:focus:ring-primary-500/50 dark:text-primary-500 dark:ring-white/20 dark:checked:bg-primary-500 dark:focus:ring-primary-500 dark:checked:focus:ring-primary-400/50 dark:disabled:ring-white/10'; + $invalidInputClasses = 'fi-invalid text-danger-600 ring-danger-600 focus:ring-danger-600 checked:focus:ring-danger-500/50 dark:text-danger-500 dark:ring-danger-500 dark:checked:bg-danger-500 dark:focus:ring-danger-500 dark:checked:focus:ring-danger-400/50'; +@endphp + +class([ + 'fi-checkbox-input rounded border-none bg-white shadow-sm ring-1 transition duration-75 checked:ring-0 focus:ring-2 focus:ring-offset-0 disabled:pointer-events-none disabled:bg-gray-50 disabled:text-gray-50 disabled:checked:bg-gray-400 disabled:checked:text-gray-400 dark:bg-white/5 dark:disabled:bg-transparent dark:disabled:checked:bg-gray-600', + $validInputClasses => (! $hasAlpineValidClasses) && $valid, + $invalidInputClasses => (! $hasAlpineValidClasses) && (! $valid), + ]) + }} +/> diff --git a/resources/views/vendor/filament/components/input/index.blade.php b/resources/views/vendor/filament/components/input/index.blade.php new file mode 100644 index 0000000..7b458b5 --- /dev/null +++ b/resources/views/vendor/filament/components/input/index.blade.php @@ -0,0 +1,22 @@ +@props([ + 'inlinePrefix' => false, + 'inlineSuffix' => false, +]) + +class([ + 'fi-input block w-full border-none py-1.5 text-base text-gray-950 transition duration-75 placeholder:text-gray-400 focus:ring-0 disabled:text-gray-500 disabled:[-webkit-text-fill-color:theme(colors.gray.500)] disabled:placeholder:[-webkit-text-fill-color:theme(colors.gray.400)] dark:text-white dark:placeholder:text-gray-500 dark:disabled:text-gray-400 dark:disabled:[-webkit-text-fill-color:theme(colors.gray.400)] dark:disabled:placeholder:[-webkit-text-fill-color:theme(colors.gray.500)] sm:text-sm sm:leading-6', + // A fully transparent white background color is used + // instead of transparent to fix a Safari bug + // where the date/time input "placeholder" colors too dark. + // + // https://github.com/filamentphp/filament/issues/7087 + 'bg-white/0', + 'ps-0' => $inlinePrefix, + 'ps-3' => ! $inlinePrefix, + 'pe-0' => $inlineSuffix, + 'pe-3' => ! $inlineSuffix, + ]) + }} +/> diff --git a/resources/views/vendor/filament/components/input/radio.blade.php b/resources/views/vendor/filament/components/input/radio.blade.php new file mode 100644 index 0000000..3a1e61c --- /dev/null +++ b/resources/views/vendor/filament/components/input/radio.blade.php @@ -0,0 +1,15 @@ +@props([ + 'valid' => true, +]) + +class([ + 'fi-radio-input border-none bg-white shadow-sm ring-1 transition duration-75 checked:ring-0 focus:ring-2 focus:ring-offset-0 disabled:bg-gray-50 disabled:text-gray-50 disabled:checked:bg-gray-400 disabled:checked:text-gray-400 dark:bg-white/5 dark:disabled:bg-transparent dark:disabled:checked:bg-gray-600', + 'text-primary-600 ring-gray-950/10 focus:ring-primary-600 checked:focus:ring-primary-500/50 dark:text-primary-500 dark:ring-white/20 dark:checked:bg-primary-500 dark:focus:ring-primary-500 dark:checked:focus:ring-primary-400/50 dark:disabled:ring-white/10' => $valid, + 'fi-invalid text-danger-600 ring-danger-600 focus:ring-danger-600 checked:focus:ring-danger-500/50 dark:text-danger-500 dark:ring-danger-500 dark:checked:bg-danger-500 dark:focus:ring-danger-500 dark:checked:focus:ring-danger-400/50' => ! $valid, + ]) + }} +/> diff --git a/resources/views/vendor/filament/components/input/select.blade.php b/resources/views/vendor/filament/components/input/select.blade.php new file mode 100644 index 0000000..b15bd89 --- /dev/null +++ b/resources/views/vendor/filament/components/input/select.blade.php @@ -0,0 +1,16 @@ +@props([ + 'inlinePrefix' => false, + 'inlineSuffix' => false, +]) + + diff --git a/resources/views/vendor/filament/components/input/wrapper.blade.php b/resources/views/vendor/filament/components/input/wrapper.blade.php new file mode 100644 index 0000000..c8f869f --- /dev/null +++ b/resources/views/vendor/filament/components/input/wrapper.blade.php @@ -0,0 +1,212 @@ +@props([ + 'alpineDisabled' => null, + 'alpineValid' => null, + 'disabled' => false, + 'inlinePrefix' => false, + 'inlineSuffix' => false, + 'prefix' => null, + 'prefixActions' => [], + 'prefixIcon' => null, + 'prefixIconColor' => 'gray', + 'prefixIconAlias' => null, + 'suffix' => null, + 'suffixActions' => [], + 'suffixIcon' => null, + 'suffixIconColor' => 'gray', + 'suffixIconAlias' => null, + 'valid' => true, +]) + +@php + $prefixActions = array_filter( + $prefixActions, + fn (\Filament\Forms\Components\Actions\Action $prefixAction): bool => $prefixAction->isVisible(), + ); + + $suffixActions = array_filter( + $suffixActions, + fn (\Filament\Forms\Components\Actions\Action $suffixAction): bool => $suffixAction->isVisible(), + ); + + $hasPrefix = count($prefixActions) || $prefixIcon || filled($prefix); + $hasSuffix = count($suffixActions) || $suffixIcon || filled($suffix); + + $hasAlpineDisabledClasses = filled($alpineDisabled); + $hasAlpineValidClasses = filled($alpineValid); + $hasAlpineClasses = $hasAlpineDisabledClasses || $hasAlpineValidClasses; + + $enabledWrapperClasses = 'bg-white dark:bg-white/5 [&:not(:has(.fi-ac-action:focus))]:focus-within:ring-2'; + $disabledWrapperClasses = 'fi-disabled bg-gray-50 dark:bg-transparent'; + $validWrapperClasses = 'ring-gray-950/10'; + $invalidWrapperClasses = 'fi-invalid ring-danger-600 dark:ring-danger-500'; + $enabledValidWrapperClasses = 'dark:ring-white/20 [&:not(:has(.fi-ac-action:focus))]:focus-within:ring-primary-600 dark:[&:not(:has(.fi-ac-action:focus))]:focus-within:ring-primary-500'; + $enabledInvalidWrapperClasses = '[&:not(:has(.fi-ac-action:focus))]:focus-within:ring-danger-600 dark:[&:not(:has(.fi-ac-action:focus))]:focus-within:ring-danger-500'; + $disabledValidWrapperClasses = 'dark:ring-white/10'; + + $actionsClasses = 'flex items-center gap-3'; + $labelClasses = 'fi-input-wrp-label whitespace-nowrap text-sm text-gray-500 dark:text-gray-400'; + + $getIconClasses = fn (string | array $color = 'gray'): string => \Illuminate\Support\Arr::toCssClasses([ + 'fi-input-wrp-icon h-5 w-5', + match ($color) { + 'gray' => 'text-gray-400 dark:text-gray-500', + default => 'text-custom-500', + }, + ]); + + $getIconStyles = fn (string | array $color = 'gray'): string => \Illuminate\Support\Arr::toCssStyles([ + \Filament\Support\get_color_css_variables( + $color, + shades: [500], + alias: 'input-wrapper.icon', + ) => $color !== 'gray', + ]); + + $wireTarget = $attributes->whereStartsWith(['wire:target'])->first(); + + $hasLoadingIndicator = filled($wireTarget); + + if ($hasLoadingIndicator) { + $loadingIndicatorTarget = html_entity_decode($wireTarget, ENT_QUOTES); + } +@endphp + +
except(['wire:target', 'tabindex']) + ->class([ + 'fi-input-wrp flex rounded-lg shadow-sm ring-1 transition duration-75', + $enabledWrapperClasses => (! $hasAlpineClasses) && (! $disabled), + $disabledWrapperClasses => (! $hasAlpineClasses) && $disabled, + $validWrapperClasses => (! $hasAlpineClasses) && $valid, + $invalidWrapperClasses => (! $hasAlpineClasses) && (! $valid), + $enabledValidWrapperClasses => (! $hasAlpineClasses) && (! $disabled) && $valid, + $enabledInvalidWrapperClasses => (! $hasAlpineClasses) && (! $disabled) && (! $valid), + $disabledValidWrapperClasses => (! $hasAlpineClasses) && $disabled && $valid, + ]) + }} +> + @if ($hasPrefix || $hasLoadingIndicator) + + @endif + +
$hasLoadingIndicator && (! $hasPrefix) && $inlinePrefix, + ]) + > + {{ $slot }} +
+ + @if ($hasSuffix) +
$inlineSuffix && filled($suffix), + 'ps-2' => $inlineSuffix && blank($suffix), + 'border-s border-gray-200 ps-3 dark:border-white/10' => ! $inlineSuffix, + ]) + > + @if (filled($suffix)) + + {{ $suffix }} + + @endif + + @if ($suffixIcon) + + @endif + + @if (count($suffixActions)) +
+ @foreach ($suffixActions as $suffixAction) + {{ $suffixAction }} + @endforeach +
+ @endif +
+ @endif +
diff --git a/resources/views/vendor/filament/components/link.blade.php b/resources/views/vendor/filament/components/link.blade.php new file mode 100644 index 0000000..4d7c2ea --- /dev/null +++ b/resources/views/vendor/filament/components/link.blade.php @@ -0,0 +1,304 @@ +@php + use Filament\Support\Enums\ActionSize; + use Filament\Support\Enums\FontWeight; + use Filament\Support\Enums\IconPosition; + use Filament\Support\Enums\IconSize; +@endphp + +@props([ + 'badge' => null, + 'badgeColor' => 'primary', + 'badgeSize' => 'xs', + 'color' => 'primary', + 'disabled' => false, + 'form' => null, + 'formId' => null, + 'href' => null, + 'icon' => null, + 'iconAlias' => null, + 'iconPosition' => IconPosition::Before, + 'iconSize' => null, + 'keyBindings' => null, + 'labelSrOnly' => false, + 'loadingIndicator' => true, + 'size' => ActionSize::Medium, + 'spaMode' => null, + 'tag' => 'a', + 'target' => null, + 'tooltip' => null, + 'type' => 'button', + 'weight' => FontWeight::SemiBold, +]) + +@php + if (! $iconPosition instanceof IconPosition) { + $iconPosition = filled($iconPosition) ? (IconPosition::tryFrom($iconPosition) ?? $iconPosition) : null; + } + + if (! $size instanceof ActionSize) { + $size = filled($size) ? (ActionSize::tryFrom($size) ?? $size) : null; + } + + $iconSize ??= match ($size) { + ActionSize::ExtraSmall, ActionSize::Small => IconSize::Small, + default => IconSize::Medium, + }; + + if (! $iconSize instanceof IconSize) { + $iconSize = filled($iconSize) ? (IconSize::tryFrom($iconSize) ?? $iconSize) : null; + } + + $linkClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-link group/link relative inline-flex items-center justify-center outline-none', + 'pointer-events-none opacity-70' => $disabled, + ($size instanceof ActionSize) ? "fi-size-{$size->value}" : null, + // @deprecated `fi-link-size-*` has been replaced by `fi-size-*`. + ($size instanceof ActionSize) ? "fi-link-size-{$size->value}" : null, + match ($size) { + ActionSize::ExtraSmall => 'gap-1', + ActionSize::Small => 'gap-1', + ActionSize::Medium => 'gap-1.5', + ActionSize::Large => 'gap-1.5', + ActionSize::ExtraLarge => 'gap-1.5', + default => $size, + }, + match ($color) { + 'gray' => null, + default => 'fi-color-custom', + }, + is_string($color) ? "fi-color-{$color}" : null, + ]); + + if (! $labelSrOnly) { + $labelClasses = \Illuminate\Support\Arr::toCssClasses([ + match ($weight) { + FontWeight::Thin, 'thin' => 'font-thin', + FontWeight::ExtraLight, 'extralight' => 'font-extralight', + FontWeight::Light, 'light' => 'font-light', + FontWeight::Medium, 'medium' => 'font-medium', + FontWeight::Normal, 'normal' => 'font-normal', + FontWeight::SemiBold, 'semibold' => 'font-semibold', + FontWeight::Bold, 'bold' => 'font-bold', + FontWeight::ExtraBold, 'extrabold' => 'font-extrabold', + FontWeight::Black, 'black' => 'font-black', + default => $weight, + }, + match ($size) { + ActionSize::ExtraSmall => 'text-xs', + ActionSize::Small => 'text-sm', + ActionSize::Medium => 'text-sm', + ActionSize::Large => 'text-sm', + ActionSize::ExtraLarge => 'text-sm', + default => null, + }, + match ($color) { + 'gray' => 'text-gray-700 dark:text-gray-200', + default => 'text-custom-600 dark:text-custom-400', + }, + 'group-hover/link:underline group-focus-visible/link:underline', + ]); + } else { + $labelClasses = 'sr-only'; + } + + $labelStyles = \Illuminate\Support\Arr::toCssStyles([ + \Filament\Support\get_color_css_variables( + $color, + shades: [400, 600], + alias: 'link.label', + ) => $color !== 'gray', + ]); + + $iconClasses = \Illuminate\Support\Arr::toCssClasses([ + 'fi-link-icon', + match ($iconSize) { + IconSize::Small => 'h-4 w-4', + IconSize::Medium => 'h-5 w-5', + IconSize::Large => 'h-6 w-6', + default => $iconSize, + }, + match ($color) { + 'gray' => 'text-gray-400 dark:text-gray-500', + default => 'text-custom-600 dark:text-custom-400', + }, + ]); + + $iconStyles = \Illuminate\Support\Arr::toCssStyles([ + \Filament\Support\get_color_css_variables( + $color, + shades: [400, 600], + alias: 'link.icon', + ) => $color !== 'gray', + ]); + + $badgeContainerClasses = 'fi-link-badge-ctn absolute start-full top-0 z-[1] w-max -translate-x-1/4 -translate-y-3/4 rounded-md bg-white dark:bg-gray-900 rtl:translate-x-1/4'; + + $wireTarget = $loadingIndicator ? $attributes->whereStartsWith(['wire:target', 'wire:click'])->filter(fn ($value): bool => filled($value))->first() : null; + + $hasLoadingIndicator = filled($wireTarget) || ($type === 'submit' && filled($form)); + + if ($hasLoadingIndicator) { + $loadingIndicatorTarget = html_entity_decode($wireTarget ?: $form, ENT_QUOTES); + } + + $hasTooltip = filled($tooltip); +@endphp + +@if ($tag === 'a') + map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.') }}="document.getElementById($el.id).click()" + @endif + @if ($hasTooltip) + x-tooltip="{ + content: @js($tooltip), + theme: $store.theme, + }" + @endif + {{ $attributes->class([$linkClasses]) }} + > + @if ($icon && $iconPosition === IconPosition::Before) + + @endif + + + {{ $slot }} + + + @if ($icon && $iconPosition === IconPosition::After) + + @endif + + @if (filled($badge)) +
+ + {{ $badge }} + +
+ @endif +
+ @trim +@elseif ($tag === 'button') + + @trim +@endif diff --git a/resources/views/vendor/filament/components/loading-indicator.blade.php b/resources/views/vendor/filament/components/loading-indicator.blade.php new file mode 100644 index 0000000..c8929da --- /dev/null +++ b/resources/views/vendor/filament/components/loading-indicator.blade.php @@ -0,0 +1,18 @@ +class(['animate-spin']) }} +> + + + diff --git a/resources/views/vendor/filament/components/loading-section.blade.php b/resources/views/vendor/filament/components/loading-section.blade.php new file mode 100644 index 0000000..3e77c0a --- /dev/null +++ b/resources/views/vendor/filament/components/loading-section.blade.php @@ -0,0 +1,33 @@ +@php + if ((! isset($columnSpan)) || (! is_array($columnSpan))) { + $columnSpan = [ + 'default' => $columnSpan ?? null, + ]; + } + + if ((! isset($columnStart)) || (! is_array($columnStart))) { + $columnStart = [ + 'default' => $columnStart ?? null, + ]; + } + + $height ??= '8rem'; +@endphp + + + + diff --git a/resources/views/vendor/filament/components/modal/description.blade.php b/resources/views/vendor/filament/components/modal/description.blade.php new file mode 100644 index 0000000..343fdef --- /dev/null +++ b/resources/views/vendor/filament/components/modal/description.blade.php @@ -0,0 +1,5 @@ +

class(['fi-modal-description text-sm text-gray-500 dark:text-gray-400']) }} +> + {{ $slot }} +

diff --git a/resources/views/vendor/filament/components/modal/heading.blade.php b/resources/views/vendor/filament/components/modal/heading.blade.php new file mode 100644 index 0000000..be4fadc --- /dev/null +++ b/resources/views/vendor/filament/components/modal/heading.blade.php @@ -0,0 +1,5 @@ +

class(['fi-modal-heading text-base font-semibold leading-6 text-gray-950 dark:text-white']) }} +> + {{ $slot }} +

diff --git a/resources/views/vendor/filament/components/modal/index.blade.php b/resources/views/vendor/filament/components/modal/index.blade.php new file mode 100644 index 0000000..5561c04 --- /dev/null +++ b/resources/views/vendor/filament/components/modal/index.blade.php @@ -0,0 +1,376 @@ +@php + use Filament\Support\Enums\Alignment; + use Filament\Support\Enums\MaxWidth; + use Filament\Support\Facades\FilamentView; +@endphp + +@props([ + 'alignment' => Alignment::Start, + 'ariaLabelledby' => null, + 'autofocus' => \Filament\Support\View\Components\Modal::$isAutofocused, + 'closeButton' => \Filament\Support\View\Components\Modal::$hasCloseButton, + 'closeByClickingAway' => \Filament\Support\View\Components\Modal::$isClosedByClickingAway, + 'closeByEscaping' => \Filament\Support\View\Components\Modal::$isClosedByEscaping, + 'closeEventName' => 'close-modal', + 'description' => null, + 'displayClasses' => 'inline-block', + 'extraModalWindowAttributeBag' => null, + 'footer' => null, + 'footerActions' => [], + 'footerActionsAlignment' => Alignment::Start, + 'header' => null, + 'heading' => null, + 'icon' => null, + 'iconAlias' => null, + 'iconColor' => 'primary', + 'id' => null, + 'openEventName' => 'open-modal', + 'slideOver' => false, + 'stickyFooter' => false, + 'stickyHeader' => false, + 'trigger' => null, + 'visible' => true, + 'width' => 'sm', +]) + +@php + $hasDescription = filled($description); + $hasFooter = (! \Filament\Support\is_slot_empty($footer)) || (is_array($footerActions) && count($footerActions)) || (! is_array($footerActions) && (! \Filament\Support\is_slot_empty($footerActions))); + $hasHeading = filled($heading); + $hasIcon = filled($icon); + $hasSlot = ! \Filament\Support\is_slot_empty($slot); + + if (! $alignment instanceof Alignment) { + $alignment = filled($alignment) ? (Alignment::tryFrom($alignment) ?? $alignment) : null; + } + + if (! $footerActionsAlignment instanceof Alignment) { + $footerActionsAlignment = filled($footerActionsAlignment) ? (Alignment::tryFrom($footerActionsAlignment) ?? $footerActionsAlignment) : null; + } + + if (! $width instanceof MaxWidth) { + $width = filled($width) ? (MaxWidth::tryFrom($width) ?? $width) : null; + } + + $closeEventHandler = filled($id) ? '$dispatch(' . \Illuminate\Support\Js::from($closeEventName) . ', { id: ' . \Illuminate\Support\Js::from($id) . ' })' : 'close()'; +@endphp + +
$width === MaxWidth::Screen, + $displayClasses, + ]) +> + @if ($trigger) +
attributes->class(['fi-modal-trigger flex cursor-pointer']) }} + > + {{ $trigger }} +
+ @endif + +
+ + +
! ($slideOver || ($width === MaxWidth::Screen)), + 'cursor-pointer' => $closeByClickingAway, + ]) + > +
class([ + 'relative grid min-h-full grid-rows-[1fr_auto_1fr] justify-items-center sm:grid-rows-[1fr_auto_3fr]', + 'p-4' => ! ($slideOver || ($width === MaxWidth::Screen)), + ]) + }} + > +
class([ + 'fi-modal-window pointer-events-auto relative row-start-2 flex w-full cursor-default flex-col bg-white shadow-xl ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10', + 'fi-modal-slide-over-window ms-auto overflow-y-auto' => $slideOver, + // Using an arbitrary value instead of the h-dvh class that was added in Tailwind CSS v3.4.0 + // to ensure compatibility with custom themes that may use an older version of Tailwind CSS. + 'h-[100dvh]' => $slideOver || ($width === MaxWidth::Screen), + 'mx-auto rounded-xl' => ! ($slideOver || ($width === MaxWidth::Screen)), + 'hidden' => ! $visible, + match ($width) { + MaxWidth::ExtraSmall => 'max-w-xs', + MaxWidth::Small => 'max-w-sm', + MaxWidth::Medium => 'max-w-md', + MaxWidth::Large => 'max-w-lg', + MaxWidth::ExtraLarge => 'max-w-xl', + MaxWidth::TwoExtraLarge => 'max-w-2xl', + MaxWidth::ThreeExtraLarge => 'max-w-3xl', + MaxWidth::FourExtraLarge => 'max-w-4xl', + MaxWidth::FiveExtraLarge => 'max-w-5xl', + MaxWidth::SixExtraLarge => 'max-w-6xl', + MaxWidth::SevenExtraLarge => 'max-w-7xl', + MaxWidth::Full => 'max-w-full', + MaxWidth::MinContent => 'max-w-min', + MaxWidth::MaxContent => 'max-w-max', + MaxWidth::FitContent => 'max-w-fit', + MaxWidth::Prose => 'max-w-prose', + MaxWidth::ScreenSmall => 'max-w-screen-sm', + MaxWidth::ScreenMedium => 'max-w-screen-md', + MaxWidth::ScreenLarge => 'max-w-screen-lg', + MaxWidth::ScreenExtraLarge => 'max-w-screen-xl', + MaxWidth::ScreenTwoExtraLarge => 'max-w-screen-2xl', + MaxWidth::Screen => 'fixed inset-0', + default => $width, + }, + ]) + }} + > + @if ($heading || $header) +
(! $hasSlot) && (! $hasFooter), + 'fi-sticky sticky top-0 z-10 border-b border-gray-200 bg-white pb-6 dark:border-white/10 dark:bg-gray-900' => $stickyHeader, + 'rounded-t-xl' => $stickyHeader && ! ($slideOver || ($width === MaxWidth::Screen)), + match ($alignment) { + Alignment::Start, Alignment::Left => 'gap-x-5', + Alignment::Center => 'flex-col', + default => null, + }, + 'items-center' => $hasIcon && $hasHeading && (! $hasDescription) && in_array($alignment, [Alignment::Start, Alignment::Left]), + ]) + > + @if ($closeButton) +
! $slideOver, + 'end-6 top-6' => $slideOver, + ]) + > + +
+ @endif + + @if ($header) + {{ $header }} + @else + @if ($hasIcon) +
$alignment === Alignment::Center, + ]) + > +
'bg-gray-100 dark:bg-gray-500/20', + default => 'fi-color-custom bg-custom-100 dark:bg-custom-500/20', + }, + is_string($iconColor) ? "fi-color-{$iconColor}" : null, + match ($alignment) { + Alignment::Start, Alignment::Left => 'p-2', + Alignment::Center => 'p-3', + default => null, + }, + ]) + @style([ + \Filament\Support\get_color_css_variables( + $iconColor, + shades: [100, 400, 500, 600], + alias: 'modal.icon', + ) => $iconColor !== 'gray', + ]) + > + 'text-gray-500 dark:text-gray-400', + default => 'text-custom-600 dark:text-custom-400', + }, + ]) + /> +
+
+ @endif + +
$alignment === Alignment::Center, + ]) + > + $closeButton && ((! $hasIcon) || in_array($alignment, [Alignment::Start, Alignment::Left])), + 'ms-6' => $closeButton && (! $hasIcon) && ($alignment === Alignment::Center), + ]) + > + {{ $heading }} + + + @if ($hasDescription) + + {{ $description }} + + @endif +
+ @endif +
+ @endif + + @if ($hasSlot) +
($width === MaxWidth::Screen) || $slideOver, + 'pe-6 ps-[5.25rem]' => $hasIcon && ($alignment === Alignment::Start) && (! $stickyHeader), + 'px-6' => ! ($hasIcon && ($alignment === Alignment::Start) && (! $stickyHeader)), + ]) + > + {{ $slot }} +
+ @endif + + @if ($hasFooter) +
$hasIcon && ($alignment === Alignment::Start) && ($footerActionsAlignment !== Alignment::Center) && (! $stickyFooter), + 'px-6' => ! ($hasIcon && ($alignment === Alignment::Start) && ($footerActionsAlignment !== Alignment::Center) && (! $stickyFooter)), + 'fi-sticky sticky bottom-0 border-t border-gray-200 bg-white py-5 dark:border-white/10 dark:bg-gray-900' => $stickyFooter, + 'rounded-b-xl' => $stickyFooter && ! ($slideOver || ($width === MaxWidth::Screen)), + 'pb-6' => ! $stickyFooter, + 'mt-6' => (! $stickyFooter) && (! $hasSlot), + 'mt-auto' => $slideOver, + ]) + > + @if (! \Filament\Support\is_slot_empty($footer)) + {{ $footer }} + @else +
'flex flex-wrap items-center', + Alignment::Center => 'flex flex-col-reverse sm:grid sm:grid-cols-[repeat(auto-fit,minmax(0,1fr))]', + Alignment::End, Alignment::Right => 'flex flex-row-reverse flex-wrap items-center', + default => null, + }, + ]) + > + @if (is_array($footerActions)) + @foreach ($footerActions as $action) + {{ $action }} + @endforeach + @else + {{ $footerActions }} + @endif +
+ @endif +
+ @endif +
+
+
+
+
diff --git a/resources/views/vendor/filament/components/pagination/index.blade.php b/resources/views/vendor/filament/components/pagination/index.blade.php new file mode 100644 index 0000000..4768d5b --- /dev/null +++ b/resources/views/vendor/filament/components/pagination/index.blade.php @@ -0,0 +1,190 @@ +@props([ + 'currentPageOptionProperty' => 'tableRecordsPerPage', + 'extremeLinks' => false, + 'paginator', + 'pageOptions' => [], +]) + +@php + use Illuminate\Contracts\Pagination\CursorPaginator; + + $isRtl = __('filament-panels::layout.direction') === 'rtl'; + $isSimple = ! $paginator instanceof \Illuminate\Pagination\LengthAwarePaginator; +@endphp + + diff --git a/resources/views/vendor/filament/components/pagination/item.blade.php b/resources/views/vendor/filament/components/pagination/item.blade.php new file mode 100644 index 0000000..d997d70 --- /dev/null +++ b/resources/views/vendor/filament/components/pagination/item.blade.php @@ -0,0 +1,50 @@ +@props([ + 'active' => false, + 'ariaLabel' => null, + 'disabled' => false, + 'icon' => null, + 'iconAlias' => null, + 'label' => null, +]) + +
  • class([ + 'fi-pagination-item group/item border-x-[0.5px] border-gray-200 first:border-s-0 last:border-e-0 dark:border-white/10', + 'fi-disabled' => $disabled, + 'fi-active' => $active, + ]) + }} +> + +
  • diff --git a/resources/views/vendor/filament/components/section/description.blade.php b/resources/views/vendor/filament/components/section/description.blade.php new file mode 100644 index 0000000..b6b8644 --- /dev/null +++ b/resources/views/vendor/filament/components/section/description.blade.php @@ -0,0 +1,5 @@ +

    class(['fi-section-header-description overflow-hidden break-words text-sm text-gray-500 dark:text-gray-400']) }} +> + {{ $slot }} +

    diff --git a/resources/views/vendor/filament/components/section/heading.blade.php b/resources/views/vendor/filament/components/section/heading.blade.php new file mode 100644 index 0000000..d0b550c --- /dev/null +++ b/resources/views/vendor/filament/components/section/heading.blade.php @@ -0,0 +1,5 @@ +

    class(['fi-section-header-heading text-base font-semibold leading-6 text-gray-950 dark:text-white']) }} +> + {{ $slot }} +

    diff --git a/resources/views/vendor/filament/components/section/index.blade.php b/resources/views/vendor/filament/components/section/index.blade.php new file mode 100644 index 0000000..3b8a75a --- /dev/null +++ b/resources/views/vendor/filament/components/section/index.blade.php @@ -0,0 +1,213 @@ +@php + use Filament\Support\Enums\Alignment; + use Filament\Support\Enums\IconSize; +@endphp + +@props([ + 'aside' => false, + 'collapsed' => false, + 'collapsible' => false, + 'compact' => false, + 'contentBefore' => false, + 'description' => null, + 'footerActions' => [], + 'footerActionsAlignment' => Alignment::Start, + 'headerActions' => [], + 'headerEnd' => null, + 'heading' => null, + 'icon' => null, + 'iconColor' => 'gray', + 'iconSize' => IconSize::Large, + 'persistCollapsed' => false, +]) + +@php + $hasDescription = filled((string) $description); + $hasHeading = filled($heading); + $hasIcon = filled($icon); + + if (is_array($headerActions)) { + $headerActions = array_filter( + $headerActions, + fn ($headerAction): bool => $headerAction->isVisible(), + ); + } + + if (is_array($footerActions)) { + $footerActions = array_filter( + $footerActions, + fn ($footerAction): bool => $footerAction->isVisible(), + ); + } + + $hasHeaderActions = $headerActions instanceof \Illuminate\Contracts\Support\Htmlable + ? ! \Filament\Support\is_slot_empty($headerActions) + : filled($headerActions); + + $hasFooterActions = $footerActions instanceof \Illuminate\Contracts\Support\Htmlable + ? ! \Filament\Support\is_slot_empty($footerActions) + : filled($footerActions); + + $hasHeader = $hasIcon || $hasHeading || $hasDescription || $collapsible || $hasHeaderActions || filled((string) $headerEnd); +@endphp + +
    class([ + 'fi-section', + match ($aside) { + true => 'fi-aside grid grid-cols-1 items-start gap-x-6 gap-y-4 md:grid-cols-3', + false => 'rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10', + }, + ]) + }} +> + @if ($hasHeader) +
    $collapsible, + match ($compact) { + true => 'px-4 py-2.5', + false => 'px-6 py-4', + } => ! $aside, + ]) + > +
    + @if ($hasIcon) + 'text-gray-400 dark:text-gray-500', + default => 'fi-color-custom text-custom-500 dark:text-custom-400', + }, + is_string($iconColor) ? "fi-color-{$iconColor}" : null, + match ($iconSize) { + IconSize::Small, 'sm' => 'h-4 w-4 mt-1', + IconSize::Medium, 'md' => 'h-5 w-5 mt-0.5', + IconSize::Large, 'lg' => 'h-6 w-6', + default => $iconSize, + }, + ]) + @style([ + \Filament\Support\get_color_css_variables( + $iconColor, + shades: [400, 500], + alias: 'section.header.icon', + ) => $iconColor !== 'gray', + ]) + /> + @endif + + @if ($hasHeading || $hasDescription) +
    + @if ($hasHeading) + + {{ $heading }} + + @endif + + @if ($hasDescription) + + {{ $description }} + + @endif +
    + @endif + + @if ($hasHeaderActions) + + @endif + + {{ $headerEnd }} + + @if ($collapsible) + + @endif +
    + + @if ($hasHeaderActions) +
    + +
    + @endif +
    + @endif + +
    $hasHeader && (! $aside), + 'rounded-xl bg-white shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10 md:col-span-2' => $aside, + 'md:order-first' => $contentBefore, + ]) + > +
    'p-4', + false => 'p-6', + }, + ]) + > + {{ $slot }} +
    + + @if ($hasFooterActions) +
    ! $compact, + 'px-4 py-2.5' => $compact, + ]) + > + +
    + @endif +
    +
    diff --git a/resources/views/vendor/filament/components/tabs/index.blade.php b/resources/views/vendor/filament/components/tabs/index.blade.php new file mode 100644 index 0000000..d57c7fe --- /dev/null +++ b/resources/views/vendor/filament/components/tabs/index.blade.php @@ -0,0 +1,21 @@ +@props([ + 'contained' => false, + 'label' => null, +]) + + diff --git a/resources/views/vendor/filament/components/tabs/item.blade.php b/resources/views/vendor/filament/components/tabs/item.blade.php new file mode 100644 index 0000000..9e4ddd6 --- /dev/null +++ b/resources/views/vendor/filament/components/tabs/item.blade.php @@ -0,0 +1,123 @@ +@php + use Filament\Support\Enums\IconPosition; +@endphp + +@props([ + 'active' => false, + 'alpineActive' => null, + 'badge' => null, + 'badgeColor' => null, + 'badgeTooltip' => null, + 'badgeIcon' => null, + 'badgeIconPosition' => IconPosition::Before, + 'href' => null, + 'icon' => null, + 'iconColor' => 'gray', + 'iconPosition' => IconPosition::Before, + 'spaMode' => null, + 'tag' => 'button', + 'target' => null, + 'type' => 'button', +]) + +@php + if (! $iconPosition instanceof IconPosition) { + $iconPosition = filled($iconPosition) ? (IconPosition::tryFrom($iconPosition) ?? $iconPosition) : null; + } + + $hasAlpineActiveClasses = filled($alpineActive); + + $inactiveItemClasses = 'hover:bg-gray-50 focus-visible:bg-gray-50 dark:hover:bg-white/5 dark:focus-visible:bg-white/5'; + + // @deprecated `fi-tabs-item-active` has been replaced by `fi-active`. + $activeItemClasses = 'fi-active fi-tabs-item-active bg-gray-50 dark:bg-white/5'; + + $inactiveLabelClasses = 'text-gray-500 group-hover:text-gray-700 group-focus-visible:text-gray-700 dark:text-gray-400 dark:group-hover:text-gray-200 dark:group-focus-visible:text-gray-200'; + + $activeLabelClasses = 'text-primary-600 dark:text-primary-400'; + + $iconClasses = 'fi-tabs-item-icon h-5 w-5 shrink-0 transition duration-75'; + + $inactiveIconClasses = 'text-gray-400 dark:text-gray-500'; + + $activeIconClasses = 'text-primary-600 dark:text-primary-400'; +@endphp + +<{{ $tag }} + @if ($tag === 'button') + type="{{ $type }}" + @elseif ($tag === 'a') + {{ \Filament\Support\generate_href_html($href, $target === '_blank', $spaMode) }} + @endif + @if ($hasAlpineActiveClasses) + x-bind:class="{ + @js($inactiveItemClasses): {{-- format-ignore-start --}} ! ({{ $alpineActive }}) {{-- format-ignore-end --}}, + @js($activeItemClasses): {{ $alpineActive }}, + }" + @endif + {{ + $attributes + ->merge([ + 'aria-selected' => $active, + 'role' => 'tab', + ]) + ->class([ + 'fi-tabs-item group flex items-center justify-center gap-x-2 whitespace-nowrap rounded-lg px-3 py-2 text-sm font-medium outline-none transition duration-75', + $inactiveItemClasses => (! $hasAlpineActiveClasses) && (! $active), + $activeItemClasses => (! $hasAlpineActiveClasses) && $active, + ]) + }} +> + @if ($icon && $iconPosition === IconPosition::Before) + (! $hasAlpineActiveClasses) && (! $active), + $activeIconClasses => (! $hasAlpineActiveClasses) && $active, + ]) + /> + @endif + + (! $hasAlpineActiveClasses) && (! $active), + $activeLabelClasses => (! $hasAlpineActiveClasses) && $active, + ]) + > + {{ $slot }} + + + @if ($icon && $iconPosition === IconPosition::After) + (! $hasAlpineActiveClasses) && (! $active), + $activeIconClasses => (! $hasAlpineActiveClasses) && $active, + ]) + /> + @endif + + @if (filled($badge)) + + {{ $badge }} + + @endif +