diff --git a/packages/forms/resources/views/components/field-wrapper/hint.blade.php b/packages/forms/resources/views/components/field-wrapper/hint.blade.php index 092db5be84..4555abbd56 100644 --- a/packages/forms/resources/views/components/field-wrapper/hint.blade.php +++ b/packages/forms/resources/views/components/field-wrapper/hint.blade.php @@ -17,9 +17,10 @@ @class([ 'fi-fo-field-wrp-hint-label', match ($color) { - 'gray' => 'fi-color-gray text-gray-500', + 'gray' => 'text-gray-500', default => 'fi-color-custom text-custom-600 dark:text-custom-400', }, + is_string($color) ? "fi-color-{$color}" : null, ]) @style([ \Filament\Support\get_color_css_variables( diff --git a/packages/forms/resources/views/components/toggle.blade.php b/packages/forms/resources/views/components/toggle.blade.php index 607fa22bfc..7cbaafea6a 100644 --- a/packages/forms/resources/views/components/toggle.blade.php +++ b/packages/forms/resources/views/components/toggle.blade.php @@ -19,16 +19,22 @@ x-bind:class=" state ? '{{ - match ($onColor) { - 'gray' => 'fi-color-gray bg-gray-200 dark:bg-gray-700', - default => 'fi-color-custom bg-custom-600', - } + \Illuminate\Support\Arr::toCssClasses([ + match ($onColor) { + 'gray' => 'bg-gray-200 dark:bg-gray-700', + default => 'fi-color-custom bg-custom-600', + }, + is_string($onColor) ? "fi-color-{$onColor}" : null, + ]) }}' : '{{ - match ($offColor) { - 'gray' => 'fi-color-gray bg-gray-200 dark:bg-gray-700', - default => 'fi-color-custom bg-custom-600', - } + \Illuminate\Support\Arr::toCssClasses([ + match ($offColor) { + 'gray' => 'bg-gray-200 dark:bg-gray-700', + default => 'fi-color-custom bg-custom-600', + }, + is_string($offColor) ? "fi-color-{$offColor}" : null, + ]) }}' " x-bind:style=" diff --git a/packages/infolists/resources/views/components/entry-wrapper/hint.blade.php b/packages/infolists/resources/views/components/entry-wrapper/hint.blade.php index e70842aaae..d13075c9b5 100644 --- a/packages/infolists/resources/views/components/entry-wrapper/hint.blade.php +++ b/packages/infolists/resources/views/components/entry-wrapper/hint.blade.php @@ -17,9 +17,10 @@ @class([ 'fi-in-entry-wrp-hint-label', match ($color) { - 'gray' => 'fi-color-gray text-gray-500', + 'gray' => 'text-gray-500', default => 'fi-color-custom text-custom-600 dark:text-custom-400', }, + is_string($color) ? "fi-color-{$color}" : null, ]) @style([ \Filament\Support\get_color_css_variables( diff --git a/packages/infolists/resources/views/components/icon-entry.blade.php b/packages/infolists/resources/views/components/icon-entry.blade.php index f5a06a6cb0..35b588f8e1 100644 --- a/packages/infolists/resources/views/components/icon-entry.blade.php +++ b/packages/infolists/resources/views/components/icon-entry.blade.php @@ -34,9 +34,10 @@ default => $size, }, match ($color) { - 'gray' => 'fi-color-gray text-gray-400 dark:text-gray-500', + 'gray' => 'text-gray-400 dark:text-gray-500', default => 'fi-color-custom text-custom-500 dark:text-custom-400', }, + is_string($color) ? "fi-color-{$color}" : null, ]) @style([ \Filament\Support\get_color_css_variables( diff --git a/packages/infolists/resources/views/components/text-entry.blade.php b/packages/infolists/resources/views/components/text-entry.blade.php index aeb90ceb01..24a1c507ba 100644 --- a/packages/infolists/resources/views/components/text-entry.blade.php +++ b/packages/infolists/resources/views/components/text-entry.blade.php @@ -183,10 +183,10 @@ 'fi-in-text-item inline-flex items-center gap-1.5', 'group/item' => $url, match ($color) { - null => null, - 'gray' => 'fi-color-gray', + null, 'gray' => null, default => 'fi-color-custom', }, + is_string($color) ? "fi-color-{$color}" : null, ]) > @if ($icon && in_array($iconPosition, [IconPosition::Before, 'before'])) diff --git a/packages/notifications/resources/views/components/icon.blade.php b/packages/notifications/resources/views/components/icon.blade.php index 0c8428e695..0837d08c88 100644 --- a/packages/notifications/resources/views/components/icon.blade.php +++ b/packages/notifications/resources/views/components/icon.blade.php @@ -15,9 +15,10 @@ ->class([ 'fi-no-notification-icon', match ($color) { - 'gray' => 'fi-color-gray text-gray-400', + 'gray' => 'text-gray-400', default => 'fi-color-custom text-custom-400', }, + is_string($color) ? "fi-color-{$color}" : null, match ($size) { IconSize::Small, 'sm' => 'h-4 w-4', IconSize::Medium, 'md' => 'h-5 w-5', diff --git a/packages/notifications/resources/views/notification.blade.php b/packages/notifications/resources/views/notification.blade.php index 84de81f1ee..4fc478e9f9 100644 --- a/packages/notifications/resources/views/notification.blade.php +++ b/packages/notifications/resources/views/notification.blade.php @@ -40,9 +40,10 @@ false => [ 'max-w-sm rounded-xl bg-white shadow-lg ring-1 dark:bg-gray-900', match ($color) { - 'gray' => 'fi-color-gray ring-gray-950/5 dark:ring-white/10', + 'gray' => 'ring-gray-950/5 dark:ring-white/10', default => 'fi-color-custom ring-custom-600/20 dark:ring-custom-400/30', }, + is_string($color) ? "fi-color-{$color}" : null, ], }, ]) diff --git a/packages/support/resources/views/components/badge.blade.php b/packages/support/resources/views/components/badge.blade.php index 663c26979f..1c173229e0 100644 --- a/packages/support/resources/views/components/badge.blade.php +++ b/packages/support/resources/views/components/badge.blade.php @@ -105,7 +105,7 @@ default => $size, }, match ($color) { - 'gray' => 'fi-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', + '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, diff --git a/packages/support/resources/views/components/button/index.blade.php b/packages/support/resources/views/components/button/index.blade.php index a2e0ca80f4..783b6c75a4 100644 --- a/packages/support/resources/views/components/button/index.blade.php +++ b/packages/support/resources/views/components/button/index.blade.php @@ -54,10 +54,10 @@ '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' => 'fi-color-gray', + 'gray' => null, default => 'fi-color-custom', }, - // @deprecated `fi-btn-color-*` has been replaced by `fi-color-gray` and `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, "fi-size-{$size->value}" => $size instanceof ActionSize, diff --git a/packages/support/resources/views/components/dropdown/header.blade.php b/packages/support/resources/views/components/dropdown/header.blade.php index 3c34c2079e..dab46838a4 100644 --- a/packages/support/resources/views/components/dropdown/header.blade.php +++ b/packages/support/resources/views/components/dropdown/header.blade.php @@ -15,10 +15,10 @@ ->class([ 'fi-dropdown-header flex w-full gap-2 p-3 text-sm', match ($color) { - 'gray' => 'fi-color-gray', + 'gray' => null, default => 'fi-color-custom', }, - // @deprecated `fi-dropdown-header-color-*` has been replaced by `fi-color-gray` and `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, ]) diff --git a/packages/support/resources/views/components/dropdown/list/item.blade.php b/packages/support/resources/views/components/dropdown/list/item.blade.php index 97330f020a..b722bb2834 100644 --- a/packages/support/resources/views/components/dropdown/list/item.blade.php +++ b/packages/support/resources/views/components/dropdown/list/item.blade.php @@ -25,16 +25,12 @@ $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' => 'fi-color-gray', - default => 'fi-color-custom', - }, - // @deprecated `fi-dropdown-list-item-color-*` has been replaced by `fi-color-gray` and `fi-color-custom`. - is_string($color) ? "fi-dropdown-list-item-color-{$color}" : null, match ($color) { 'gray' => 'hover:bg-gray-50 focus-visible:bg-gray-50 dark:hover:bg-white/5 dark:focus-visible:bg-white/5', - default => 'hover:bg-custom-50 focus-visible:bg-custom-50 dark:hover:bg-custom-400/10 dark:focus-visible:bg-custom-400/10', + 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, ]); diff --git a/packages/support/resources/views/components/icon-button.blade.php b/packages/support/resources/views/components/icon-button.blade.php index 50da7353a6..eb39c9d611 100644 --- a/packages/support/resources/views/components/icon-button.blade.php +++ b/packages/support/resources/views/components/icon-button.blade.php @@ -84,7 +84,7 @@ ], }, match ($color) { - 'gray' => 'fi-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', + '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, diff --git a/packages/support/resources/views/components/link.blade.php b/packages/support/resources/views/components/link.blade.php index 5d41b82627..e42e6449c8 100644 --- a/packages/support/resources/views/components/link.blade.php +++ b/packages/support/resources/views/components/link.blade.php @@ -58,11 +58,7 @@ ActionSize::ExtraLarge => 'gap-1.5', default => $size, }, - match ($color) { - 'gray' => 'fi-color-gray', - default => 'fi-color-custom', - }, - is_string($color) ? "fi-color-{$color}" : null, + is_string($color) ? "fi-color-{$color}" : 'fi-color-custom', ]); $labelClasses = \Illuminate\Support\Arr::toCssClasses([ diff --git a/packages/support/resources/views/components/modal/index.blade.php b/packages/support/resources/views/components/modal/index.blade.php index 9576926aea..2033c306aa 100644 --- a/packages/support/resources/views/components/modal/index.blade.php +++ b/packages/support/resources/views/components/modal/index.blade.php @@ -248,9 +248,10 @@ @class([ 'rounded-full', match ($iconColor) { - 'gray' => 'fi-color-gray bg-gray-100 dark:bg-gray-500/20', + 'gray' => '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', diff --git a/packages/support/resources/views/components/section/index.blade.php b/packages/support/resources/views/components/section/index.blade.php index aaa9ccd19d..2ade073070 100644 --- a/packages/support/resources/views/components/section/index.blade.php +++ b/packages/support/resources/views/components/section/index.blade.php @@ -73,9 +73,10 @@ @class([ 'fi-section-header-icon self-start', match ($iconColor) { - 'gray' => 'fi-color-gray text-gray-400 dark:text-gray-500', + 'gray' => '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', diff --git a/packages/tables/resources/views/columns/icon-column.blade.php b/packages/tables/resources/views/columns/icon-column.blade.php index 862dceeb1e..2a7b919d06 100644 --- a/packages/tables/resources/views/columns/icon-column.blade.php +++ b/packages/tables/resources/views/columns/icon-column.blade.php @@ -36,9 +36,10 @@ default => $size, }, match ($color) { - 'gray' => 'fi-color-gray text-gray-400 dark:text-gray-500', + 'gray' => 'text-gray-400 dark:text-gray-500', default => 'fi-color-custom text-custom-500 dark:text-custom-400', }, + is_string($color) ? "fi-color-{$color}" : null, ]) @style([ \Filament\Support\get_color_css_variables( diff --git a/packages/tables/resources/views/columns/summaries/icon-count.blade.php b/packages/tables/resources/views/columns/summaries/icon-count.blade.php index a5222cf534..c3155f96bf 100644 --- a/packages/tables/resources/views/columns/summaries/icon-count.blade.php +++ b/packages/tables/resources/views/columns/summaries/icon-count.blade.php @@ -32,9 +32,10 @@ @class([ 'fi-ta-icon-count-summary-icon h-6 w-6', match ($color) { - 'gray' => 'fi-color-gray text-gray-400 dark:text-gray-500', + 'gray' => 'text-gray-400 dark:text-gray-500', default => 'fi-color-custom text-custom-500 dark:text-custom-400', }, + is_string($color) ? "fi-color-{$color}" : null, ]) @style([ \Filament\Support\get_color_css_variables( diff --git a/packages/tables/resources/views/columns/text-column.blade.php b/packages/tables/resources/views/columns/text-column.blade.php index 210ee18c11..a52a979a9e 100644 --- a/packages/tables/resources/views/columns/text-column.blade.php +++ b/packages/tables/resources/views/columns/text-column.blade.php @@ -180,10 +180,10 @@ 'fi-ta-text-item inline-flex items-center gap-1.5', 'group/item' => $url, match ($color) { - null => null, - 'gray' => 'fi-color-gray', + null, 'gray' => null, default => 'fi-color-custom', }, + is_string($color) ? "fi-color-{$color}" : null, ]) > @if ($icon && in_array($iconPosition, [IconPosition::Before, 'before'])) diff --git a/packages/tables/resources/views/columns/toggle-column.blade.php b/packages/tables/resources/views/columns/toggle-column.blade.php index 0c325f69fd..676d782fe1 100644 --- a/packages/tables/resources/views/columns/toggle-column.blade.php +++ b/packages/tables/resources/views/columns/toggle-column.blade.php @@ -75,17 +75,23 @@ @endif x-bind:class=" (state - ? '{{ - match ($onColor) { - 'gray' => 'fi-color-gray bg-gray-200 dark:bg-gray-700', - default => 'fi-color-custom bg-custom-600', - } + ? '{{{ + \Illuminate\Support\Arr::toCssClasses([ + match ($onColor) { + 'gray' => 'bg-gray-200 dark:bg-gray-700', + default => 'fi-color-custom bg-custom-600', + }, + is_string($onColor) ? "fi-color-{$onColor}" : null, + ]) }}' : '{{ - match ($offColor) { - 'gray' => 'fi-color-gray bg-gray-200 dark:bg-gray-700', - default => 'fi-color-custom bg-custom-600', - } + \Illuminate\Support\Arr::toCssClasses([ + match ($offColor) { + 'gray' => 'bg-gray-200 dark:bg-gray-700', + default => 'fi-color-custom bg-custom-600', + }, + is_string($offColor) ? "fi-color-{$offColor}" : null, + ]) }}') + (isLoading ? ' opacity-70 pointer-events-none' : '') " diff --git a/packages/widgets/resources/views/chart-widget.blade.php b/packages/widgets/resources/views/chart-widget.blade.php index 18290a4112..83a2473239 100644 --- a/packages/widgets/resources/views/chart-widget.blade.php +++ b/packages/widgets/resources/views/chart-widget.blade.php @@ -51,9 +51,10 @@ x-ignore @class([ match ($color) { - 'gray' => 'fi-color-gray', + 'gray' => null, default => 'fi-color-custom', }, + is_string($color) ? "fi-color-{$color}" : null, ]) > 'fi-color-gray text-gray-500 dark:text-gray-400', + 'gray' => 'text-gray-500 dark:text-gray-400', default => 'fi-color-custom text-custom-600 dark:text-custom-400', }, + is_string($descriptionColor) ? "fi-color-{$descriptionColor}" : null, ]) @style([ \Filament\Support\get_color_css_variables( @@ -116,9 +117,10 @@ @class([ 'fi-wi-stats-overview-stat-chart absolute inset-x-0 bottom-0 overflow-hidden rounded-b-xl', match ($chartColor) { - 'gray' => 'fi-color-gray', + 'gray' => null, default => 'fi-color-custom', }, + is_string($chartColor) ? "fi-color-{$chartColor}" : null, ]) @style([ \Filament\Support\get_color_css_variables(