diff --git a/docs/08-styling/04-icons.md b/docs/08-styling/04-icons.md index cb9e764abf..070a15e9ba 100644 --- a/docs/08-styling/04-icons.md +++ b/docs/08-styling/04-icons.md @@ -94,8 +94,8 @@ To replace an icon, you can use the `FilamentIcon` facade. It has a `register()` use Filament\Support\Facades\FilamentIcon; FilamentIcon::register([ - 'panels::topbar.global-search.field' => 'fas-magnifying-glass', - 'panels::sidebar.group.collapse-button' => view('icons.chevron-up'), + 'PanelsIconAlias::GLOBAL_SEARCH_FIELD' => 'fas-magnifying-glass', + 'PanelsIconAlias::SIDEBAR_GROUP_COLLAPSE_BUTTON' => view('icons.chevron-up'), ]); ``` diff --git a/packages/forms/src/Components/FileUpload.php b/packages/forms/src/Components/FileUpload.php index c1b49d767e..3075887575 100644 --- a/packages/forms/src/Components/FileUpload.php +++ b/packages/forms/src/Components/FileUpload.php @@ -529,7 +529,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.drag_move.label'), 'iconHtml' => generate_icon_html( 'fi-o-arrows-move', - alias: 'forms::components.file-upload.editor.actions.drag-move', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_DRAG_MOVE, ), 'alpineClickHandler' => "editor.setDragMode('move')", ], @@ -537,7 +537,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.drag_crop.label'), 'iconHtml' => generate_icon_html( 'fi-o-crop', - alias: 'forms::components.file-upload.editor.actions.drag-crop', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_DRAG_CROP, ), 'alpineClickHandler' => "editor.setDragMode('crop')", ], @@ -545,7 +545,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.zoom_in.label'), 'iconHtml' => generate_icon_html( Heroicon::MagnifyingGlassPlus, - alias: 'forms::components.file-upload.editor.actions.zoom-in', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_ZOOM_IN, ), 'alpineClickHandler' => 'editor.zoom(0.1)', ], @@ -553,7 +553,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.zoom_out.label'), 'iconHtml' => generate_icon_html( Heroicon::MagnifyingGlassMinus, - alias: 'forms::components.file-upload.editor.actions.zoom-out', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_ZOOM_OUT, ), 'alpineClickHandler' => 'editor.zoom(-0.1)', ], @@ -561,7 +561,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.zoom_100.label'), 'iconHtml' => generate_icon_html( Heroicon::ArrowsPointingOut, - alias: 'forms::components.file-upload.editor.actions.zoom-100', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_ZOOM_100, ), 'alpineClickHandler' => 'editor.zoomTo(1)', ], @@ -571,7 +571,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.move_left.label'), 'iconHtml' => generate_icon_html( Heroicon::ArrowLeftCircle, - alias: 'forms::components.file-upload.editor.actions.move-left', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_MOVE_LEFT, ), 'alpineClickHandler' => 'editor.move(-10, 0)', ], @@ -579,7 +579,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.move_right.label'), 'iconHtml' => generate_icon_html( Heroicon::ArrowRightCircle, - alias: 'forms::components.file-upload.editor.actions.move-right', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_MOVE_RIGHT, ), 'alpineClickHandler' => 'editor.move(10, 0)', ], @@ -587,7 +587,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.move_up.label'), 'iconHtml' => generate_icon_html( Heroicon::ArrowUpCircle, - alias: 'forms::components.file-upload.editor.actions.move-up', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_MOVE_UP, ), 'alpineClickHandler' => 'editor.move(0, -10)', ], @@ -595,7 +595,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.move_down.label'), 'iconHtml' => generate_icon_html( Heroicon::ArrowDownCircle, - alias: 'forms::components.file-upload.editor.actions.move-down', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_MOVE_DOWN, ), 'alpineClickHandler' => 'editor.move(0, 10)', ], @@ -605,7 +605,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.rotate_left.label'), 'iconHtml' => generate_icon_html( Heroicon::ArrowUturnLeft, - alias: 'forms::components.file-upload.editor.actions.rotate-left', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_ROTATE_LEFT, ), 'alpineClickHandler' => 'editor.rotate(-90)', ], @@ -613,7 +613,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.rotate_right.label'), 'iconHtml' => generate_icon_html( Heroicon::ArrowUturnRight, - alias: 'forms::components.file-upload.editor.actions.rotate-right', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_ROTATE_RIGHT, ), 'alpineClickHandler' => 'editor.rotate(90)', ], @@ -621,7 +621,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.flip_horizontal.label'), 'iconHtml' => generate_icon_html( 'fi-o-flip-horizontal', - alias: 'forms::components.file-upload.editor.actions.flip-horizontal', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_FLIP_HORIZONTAL, ), 'alpineClickHandler' => 'editor.scaleX(-editor.getData().scaleX || -1)', ], @@ -629,7 +629,7 @@ class FileUpload extends BaseFileUpload 'label' => __('filament-forms::components.file_upload.editor.actions.flip_vertical.label'), 'iconHtml' => generate_icon_html( 'fi-o-flip-vertical', - alias: 'forms::components.file-upload.editor.actions.flip-vertical', + alias: \Filament\Forms\View\FormsIconAlias::COMPONENTS_FILE_UPLOAD_EDITOR_ACTIONS_FLIP_VERTICAL, ), 'alpineClickHandler' => 'editor.scaleY(-editor.getData().scaleY || -1)', ], diff --git a/packages/notifications/src/Notification.php b/packages/notifications/src/Notification.php index 7eac890376..7fe33337f1 100644 --- a/packages/notifications/src/Notification.php +++ b/packages/notifications/src/Notification.php @@ -392,7 +392,7 @@ class Notification extends ViewComponent implements Arrayable, HasEmbeddedView x-on:click="close" class="fi-icon-btn fi-no-notification-close-btn" > - = generate_icon_html(Heroicon::XMark, alias: 'notifications::notification.close-button')->toHtml() ?> + = generate_icon_html(Heroicon::XMark, alias: \Filament\Notifications\View\NotificationsIconAlias::NOTIFICATION_CLOSE_BUTTON)->toHtml() ?> diff --git a/packages/panels/resources/views/components/tenant-menu.blade.php b/packages/panels/resources/views/components/tenant-menu.blade.php index 11f1627fb4..19c9985da4 100644 --- a/packages/panels/resources/views/components/tenant-menu.blade.php +++ b/packages/panels/resources/views/components/tenant-menu.blade.php @@ -69,7 +69,7 @@ {{ - \Filament\Support\generate_icon_html(\Filament\Support\Icons\Heroicon::ChevronDown, alias: 'panels::tenant-menu.toggle-button', attributes: new \Illuminate\View\ComponentAttributeBag([ + \Filament\Support\generate_icon_html(\Filament\Support\Icons\Heroicon::ChevronDown, alias: \Filament\Panels\View\PanelsIconAlias::TENANT_MENU_TOGGLE_BUTTON, attributes: new \Illuminate\View\ComponentAttributeBag([ 'x-show' => $isSidebarCollapsibleOnDesktop ? '$store.sidebar.isOpen' : null, ])) }} diff --git a/packages/panels/resources/views/components/topbar/item.blade.php b/packages/panels/resources/views/components/topbar/item.blade.php index 0fc008fa25..3c7687c12a 100644 --- a/packages/panels/resources/views/components/topbar/item.blade.php +++ b/packages/panels/resources/views/components/topbar/item.blade.php @@ -44,7 +44,7 @@ @endif @if (! $url) - {{ \Filament\Support\generate_icon_html(\Filament\Support\Icons\Heroicon::ChevronDown, alias: 'panels::topbar.group.toggle-button', attributes: (new \Illuminate\View\ComponentAttributeBag)->class(['fi-topbar-group-toggle-icon'])) }} + {{ \Filament\Support\generate_icon_html(\Filament\Support\Icons\Heroicon::ChevronDown, alias: \Filament\Panels\View\PanelsIconAlias::TOPBAR_GROUP_TOGGLE_BUTTON, attributes: (new \Illuminate\View\ComponentAttributeBag)->class(['fi-topbar-group-toggle-icon'])) }} @endif {{ $tag }}> diff --git a/packages/schemas/resources/views/components/wizard.blade.php b/packages/schemas/resources/views/components/wizard.blade.php index 1a9a51a007..28bc1ae9aa 100644 --- a/packages/schemas/resources/views/components/wizard.blade.php +++ b/packages/schemas/resources/views/components/wizard.blade.php @@ -79,7 +79,7 @@ {{ \Filament\Support\generate_icon_html( $completedIcon ?? \Filament\Support\Icons\Heroicon::OutlinedCheck, - alias: filled($completedIcon) ? null : 'schema::components.wizard.completed-step', + alias: filled($completedIcon) ? null : \Filament\Schemas\View\SchemaIconAlias::COMPONENTS_WIZARD_COMPLETED_STEP, attributes: new \Illuminate\View\ComponentAttributeBag([ 'x-cloak' => 'x-cloak', 'x-show' => "getStepIndex(step) > {$loop->index}", diff --git a/packages/support/resources/views/components/badge.blade.php b/packages/support/resources/views/components/badge.blade.php index d3d2efcb04..ea27884cf7 100644 --- a/packages/support/resources/views/components/badge.blade.php +++ b/packages/support/resources/views/components/badge.blade.php @@ -139,7 +139,7 @@ }} > {{ - \Filament\Support\generate_icon_html(\Filament\Support\Icons\Heroicon::XMark, alias: 'badge.delete-button', attributes: (new \Illuminate\View\ComponentAttributeBag([ + \Filament\Support\generate_icon_html(\Filament\Support\Icons\Heroicon::XMark, alias: \Filament\Support\View\SupportIconAlias::BADGE_DELETE_BUTTON, attributes: (new \Illuminate\View\ComponentAttributeBag([ 'wire:loading.remove.delay.' . config('filament.livewire_loading_delay', 'default') => $deleteButtonHasLoadingIndicator, 'wire:target' => $deleteButtonHasLoadingIndicator ? $deleteButtonLoadingIndicatorTarget : false, ])), size: \Filament\Support\Enums\IconSize::ExtraSmall) diff --git a/packages/support/resources/views/components/breadcrumbs.blade.php b/packages/support/resources/views/components/breadcrumbs.blade.php index 8d91c03d4b..1fe8911478 100644 --- a/packages/support/resources/views/components/breadcrumbs.blade.php +++ b/packages/support/resources/views/components/breadcrumbs.blade.php @@ -14,13 +14,13 @@