mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Add more missing icon aliases
This commit is contained in:
@@ -8,6 +8,7 @@ use Filament\Support\Concerns\HasBadge;
|
||||
use Filament\Support\Concerns\HasColor;
|
||||
use Filament\Support\Concerns\HasExtraAttributes;
|
||||
use Filament\Support\Concerns\HasIcon;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Livewire\Component;
|
||||
|
||||
class ActionGroup extends ViewComponent implements HasLivewire
|
||||
@@ -194,7 +195,7 @@ class ActionGroup extends ViewComponent implements HasLivewire
|
||||
|
||||
public function getIcon(): string
|
||||
{
|
||||
return $this->getBaseIcon() ?? 'heroicon-m-ellipsis-vertical';
|
||||
return $this->getBaseIcon() ?? FilamentIcon::resolve('actions::action-group') ?? 'heroicon-m-ellipsis-vertical';
|
||||
}
|
||||
|
||||
public function isHidden(): bool
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Filament\Actions\Concerns;
|
||||
use Closure;
|
||||
use Filament\Actions\MountableAction;
|
||||
use Filament\Support\Enums\Alignment;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
|
||||
trait CanRequireConfirmation
|
||||
{
|
||||
@@ -12,7 +13,7 @@ trait CanRequireConfirmation
|
||||
{
|
||||
$this->modalAlignment(fn (MountableAction $action): ?Alignment => $action->evaluate($condition) ? Alignment::Center : null);
|
||||
$this->modalFooterActionsAlignment(fn (MountableAction $action): ?Alignment => $action->evaluate($condition) ? Alignment::Center : null);
|
||||
$this->modalIcon(fn (MountableAction $action): ?string => $action->evaluate($condition) ? 'heroicon-o-exclamation-triangle' : null);
|
||||
$this->modalIcon(fn (MountableAction $action): ?string => $action->evaluate($condition) ? (FilamentIcon::resolve('actions::modal.confirmation') ?? 'heroicon-o-exclamation-triangle') : null);
|
||||
$this->modalDescription(fn (MountableAction $action): ?string => $action->evaluate($condition) ? __('filament-actions::modal.confirmation') : null);
|
||||
$this->modalSubmitActionLabel(fn (MountableAction $action): ?string => $action->evaluate($condition) ? __('filament-actions::modal.actions.confirm.label') : null);
|
||||
$this->modalWidth(fn (MountableAction $action): ?string => $action->evaluate($condition) ? 'md' : null);
|
||||
|
||||
@@ -6,6 +6,7 @@ use Closure;
|
||||
use Filament\Actions\Concerns\CanCustomizeProcess;
|
||||
use Filament\Actions\Contracts\HasActions;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
@@ -42,7 +43,7 @@ class CreateAction extends Action
|
||||
|
||||
$this->successNotificationTitle(__('filament-actions::create.single.notifications.created.title'));
|
||||
|
||||
$this->groupedIcon('heroicon-m-plus');
|
||||
$this->groupedIcon(FilamentIcon::resolve('actions::create-action.grouped') ?? 'heroicon-m-plus');
|
||||
|
||||
$this->record(null);
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Filament\Actions;
|
||||
use Closure;
|
||||
use Filament\Actions\Concerns\CanCustomizeProcess;
|
||||
use Filament\Actions\Contracts\HasActions;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class EditAction extends Action
|
||||
@@ -30,7 +31,7 @@ class EditAction extends Action
|
||||
|
||||
$this->successNotificationTitle(__('filament-actions::edit.single.notifications.saved.title'));
|
||||
|
||||
$this->groupedIcon('heroicon-m-pencil-square');
|
||||
$this->groupedIcon(FilamentIcon::resolve('actions::edit-action.grouped') ?? 'heroicon-m-pencil-square');
|
||||
|
||||
$this->fillForm(function (HasActions $livewire, Model $record): array {
|
||||
if ($translatableContentDriver = $livewire->makeFilamentTranslatableContentDriver()) {
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Filament\Actions;
|
||||
|
||||
use Closure;
|
||||
use Filament\Actions\Contracts\HasActions;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ViewAction extends Action
|
||||
@@ -28,7 +29,7 @@ class ViewAction extends Action
|
||||
|
||||
$this->color('gray');
|
||||
|
||||
$this->groupedIcon('heroicon-m-eye');
|
||||
$this->groupedIcon(FilamentIcon::resolve('actions::view-action.grouped') ?? 'heroicon-m-eye');
|
||||
|
||||
$this->disabledForm();
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ use Filament\Forms\ComponentContainer;
|
||||
use Filament\Forms\Components\Actions\Action;
|
||||
use Filament\Forms\Components\Builder\Block;
|
||||
use Filament\Support\Enums\ActionSize;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
@@ -228,7 +229,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getCloneActionName())
|
||||
->label(__('filament-forms::components.builder.actions.clone.label'))
|
||||
->icon('heroicon-m-square-2-stack')
|
||||
->icon(FilamentIcon::resolve('forms::components.builder.actions.clone') ?? 'heroicon-m-square-2-stack')
|
||||
->color('gray')
|
||||
->action(function (array $arguments, Builder $component): void {
|
||||
$newUuid = $component->generateUuid();
|
||||
@@ -271,7 +272,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getDeleteActionName())
|
||||
->label(__('filament-forms::components.builder.actions.delete.label'))
|
||||
->icon('heroicon-m-trash')
|
||||
->icon(FilamentIcon::resolve('forms::components.builder.actions.delete') ?? 'heroicon-m-trash')
|
||||
->color('danger')
|
||||
->action(function (array $arguments, Builder $component): void {
|
||||
$items = $component->getState();
|
||||
@@ -310,7 +311,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getMoveDownActionName())
|
||||
->label(__('filament-forms::components.builder.actions.move_down.label'))
|
||||
->icon('heroicon-m-arrow-down')
|
||||
->icon(FilamentIcon::resolve('forms::components.builder.actions.move-down') ?? 'heroicon-m-arrow-down')
|
||||
->color('gray')
|
||||
->action(function (array $arguments, Builder $component): void {
|
||||
$items = array_move_after($component->getState(), $arguments['item']);
|
||||
@@ -348,7 +349,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getMoveUpActionName())
|
||||
->label(__('filament-forms::components.builder.actions.move_up.label'))
|
||||
->icon('heroicon-m-arrow-up')
|
||||
->icon(FilamentIcon::resolve('forms::components.builder.actions.move-up') ?? 'heroicon-m-arrow-up')
|
||||
->color('gray')
|
||||
->action(function (array $arguments, Builder $component): void {
|
||||
$items = array_move_before($component->getState(), $arguments['item']);
|
||||
@@ -393,7 +394,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getReorderActionName())
|
||||
->label(__('filament-forms::components.builder.actions.reorder.label'))
|
||||
->icon('heroicon-m-arrows-up-down')
|
||||
->icon(FilamentIcon::resolve('forms::components.builder.actions.reorder') ?? 'heroicon-m-arrows-up-down')
|
||||
->color('gray')
|
||||
->action(function (array $arguments, Builder $component): void {
|
||||
$items = [
|
||||
@@ -435,7 +436,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getCollapseActionName())
|
||||
->label(__('filament-forms::components.builder.actions.collapse.label'))
|
||||
->icon('heroicon-m-chevron-up')
|
||||
->icon(FilamentIcon::resolve('forms::components.builder.actions.collapse') ?? 'heroicon-m-chevron-up')
|
||||
->color('gray')
|
||||
->livewireClickHandlerEnabled(false)
|
||||
->iconButton()
|
||||
@@ -466,7 +467,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getExpandActionName())
|
||||
->label(__('filament-forms::components.builder.actions.expand.label'))
|
||||
->icon('heroicon-m-chevron-down')
|
||||
->icon(FilamentIcon::resolve('forms::components.builder.actions.expand') ?? 'heroicon-m-chevron-down')
|
||||
->color('gray')
|
||||
->livewireClickHandlerEnabled(false)
|
||||
->iconButton()
|
||||
|
||||
@@ -6,6 +6,7 @@ use Closure;
|
||||
use Exception;
|
||||
use Filament\Support\Concerns\HasAlignment;
|
||||
use Filament\Support\Concerns\HasExtraAlpineAttributes;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
@@ -474,71 +475,71 @@ class FileUpload extends BaseFileUpload
|
||||
'zoom' => [
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.drag_move.label'),
|
||||
'iconHtml' => new HtmlString('<svg class="' . $iconSizeClasses . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M13 6v5h5V7.75L22.25 12L18 16.25V13h-5v5h3.25L12 22.25L7.75 18H11v-5H6v3.25L1.75 12L6 7.75V11h5V6H7.75L12 1.75L16.25 6H13Z"/></svg>'),
|
||||
'iconHtml' => ($icon = FilamentIcon::resolve('forms::components.file-upload.editor.actions.drag-move')) ? svg($icon, $iconSizeClasses)->toHtml() : new HtmlString('<svg class="' . $iconSizeClasses . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M13 6v5h5V7.75L22.25 12L18 16.25V13h-5v5h3.25L12 22.25L7.75 18H11v-5H6v3.25L1.75 12L6 7.75V11h5V6H7.75L12 1.75L16.25 6H13Z"/></svg>'),
|
||||
'alpineClickHandler' => "editor.setDragMode('move')",
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.drag_crop.label'),
|
||||
'iconHtml' => new HtmlString('<svg class="' . $iconSizeClasses . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17 23v-4H7q-.825 0-1.412-.587Q5 17.825 5 17V7H1V5h4V1h2v16h16v2h-4v4Zm0-8V7H9V5h8q.825 0 1.413.588Q19 6.175 19 7v8Z"/></svg>'),
|
||||
'iconHtml' => ($icon = FilamentIcon::resolve('forms::components.file-upload.editor.actions.drag-crop')) ? svg($icon, $iconSizeClasses)->toHtml() : new HtmlString('<svg class="' . $iconSizeClasses . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17 23v-4H7q-.825 0-1.412-.587Q5 17.825 5 17V7H1V5h4V1h2v16h16v2h-4v4Zm0-8V7H9V5h8q.825 0 1.413.588Q19 6.175 19 7v8Z"/></svg>'),
|
||||
'alpineClickHandler' => "editor.setDragMode('crop')",
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.zoom_in.label'),
|
||||
'iconHtml' => svg('heroicon-o-magnifying-glass-plus', $iconSizeClasses)->toHtml(),
|
||||
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.zoom-in') ?? 'heroicon-o-magnifying-glass-plus', $iconSizeClasses)->toHtml(),
|
||||
'alpineClickHandler' => 'editor.zoom(0.1)',
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.zoom_out.label'),
|
||||
'iconHtml' => svg('heroicon-o-magnifying-glass-minus', $iconSizeClasses)->toHtml(),
|
||||
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.zoom-out') ?? 'heroicon-o-magnifying-glass-minus', $iconSizeClasses)->toHtml(),
|
||||
'alpineClickHandler' => 'editor.zoom(-0.1)',
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.zoom_100.label'),
|
||||
'iconHtml' => svg('heroicon-o-arrows-pointing-out', $iconSizeClasses)->toHtml(),
|
||||
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.zoom-100') ?? 'heroicon-o-arrows-pointing-out', $iconSizeClasses)->toHtml(),
|
||||
'alpineClickHandler' => 'editor.zoomTo(1)',
|
||||
],
|
||||
],
|
||||
'move' => [
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.move_left.label'),
|
||||
'iconHtml' => svg('heroicon-o-arrow-left-circle', $iconSizeClasses)->toHtml(),
|
||||
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.move-left') ?? 'heroicon-o-arrow-left-circle', $iconSizeClasses)->toHtml(),
|
||||
'alpineClickHandler' => 'editor.move(-10, 0)',
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.move_right.label'),
|
||||
'iconHtml' => svg('heroicon-o-arrow-right-circle', $iconSizeClasses)->toHtml(),
|
||||
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.move-right') ?? 'heroicon-o-arrow-right-circle', $iconSizeClasses)->toHtml(),
|
||||
'alpineClickHandler' => 'editor.move(10, 0)',
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.move_up.label'),
|
||||
'iconHtml' => svg('heroicon-o-arrow-up-circle', $iconSizeClasses)->toHtml(),
|
||||
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.move-up') ?? 'heroicon-o-arrow-up-circle', $iconSizeClasses)->toHtml(),
|
||||
'alpineClickHandler' => 'editor.move(0, -10)',
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.move_down.label'),
|
||||
'iconHtml' => svg('heroicon-o-arrow-down-circle', $iconSizeClasses)->toHtml(),
|
||||
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.move-down') ?? 'heroicon-o-arrow-down-circle', $iconSizeClasses)->toHtml(),
|
||||
'alpineClickHandler' => 'editor.move(0, 10)',
|
||||
],
|
||||
],
|
||||
'transform' => [
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.rotate_left.label'),
|
||||
'iconHtml' => svg('heroicon-o-arrow-uturn-left', $iconSizeClasses)->toHtml(),
|
||||
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.rotate-left') ?? 'heroicon-o-arrow-uturn-left', $iconSizeClasses)->toHtml(),
|
||||
'alpineClickHandler' => 'editor.rotate(-90)',
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.rotate_right.label'),
|
||||
'iconHtml' => svg('heroicon-o-arrow-uturn-right', $iconSizeClasses)->toHtml(),
|
||||
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.rotate-right') ?? 'heroicon-o-arrow-uturn-right', $iconSizeClasses)->toHtml(),
|
||||
'alpineClickHandler' => 'editor.rotate(90)',
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.flip_horizontal.label'),
|
||||
'iconHtml' => new HtmlString('<svg class="' . $iconSizeClasses . '" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m3 7l5 5l-5 5V7m18 0l-5 5l5 5V7m-9 13v2m0-8v2m0-8v2m0-8v2"/></svg>'),
|
||||
'iconHtml' => ($icon = FilamentIcon::resolve('forms::components.file-upload.editor.actions.flip-horizontal')) ? svg($icon, $iconSizeClasses)->toHtml() : new HtmlString('<svg class="' . $iconSizeClasses . '" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m3 7l5 5l-5 5V7m18 0l-5 5l5 5V7m-9 13v2m0-8v2m0-8v2m0-8v2"/></svg>'),
|
||||
'alpineClickHandler' => 'editor.scaleX(-editor.getData().scaleX || -1)',
|
||||
],
|
||||
[
|
||||
'label' => __('filament-forms::components.file_upload.editor.actions.flip_vertical.label'),
|
||||
'iconHtml' => new HtmlString('<svg class="' . $iconSizeClasses . '" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m17 3l-5 5l-5-5h10m0 18l-5-5l-5 5h10M4 12H2m8 0H8m8 0h-2m8 0h-2"/></svg>'),
|
||||
'iconHtml' => ($icon = FilamentIcon::resolve('forms::components.file-upload.editor.actions.flip-vertical')) ? svg($icon, $iconSizeClasses)->toHtml() : new HtmlString('<svg class="' . $iconSizeClasses . '" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m17 3l-5 5l-5-5h10m0 18l-5-5l-5 5h10M4 12H2m8 0H8m8 0h-2m8 0h-2"/></svg>'),
|
||||
'alpineClickHandler' => 'editor.scaleY(-editor.getData().scaleY || -1)',
|
||||
],
|
||||
],
|
||||
|
||||
@@ -6,6 +6,7 @@ use Closure;
|
||||
use Filament\Forms\Components\Actions\Action;
|
||||
use Filament\Support\Concerns\HasExtraAlpineAttributes;
|
||||
use Filament\Support\Enums\ActionSize;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
|
||||
class KeyValue extends Field
|
||||
{
|
||||
@@ -100,7 +101,7 @@ class KeyValue extends Field
|
||||
{
|
||||
$action = Action::make($this->getDeleteActionName())
|
||||
->label(__('filament-forms::components.key_value.actions.delete.label'))
|
||||
->icon('heroicon-m-trash')
|
||||
->icon(FilamentIcon::resolve('forms::components.key-value.actions.delete') ?? 'heroicon-m-trash')
|
||||
->color('danger')
|
||||
->livewireClickHandlerEnabled(false)
|
||||
->iconButton()
|
||||
@@ -132,7 +133,7 @@ class KeyValue extends Field
|
||||
{
|
||||
$action = Action::make($this->getReorderActionName())
|
||||
->label(__('filament-forms::components.key_value.actions.reorder.label'))
|
||||
->icon('heroicon-m-arrows-up-down')
|
||||
->icon(FilamentIcon::resolve('forms::components.key-value.actions.reorder') ?? 'heroicon-m-arrows-up-down')
|
||||
->color('gray')
|
||||
->livewireClickHandlerEnabled(false)
|
||||
->iconButton()
|
||||
|
||||
@@ -7,6 +7,7 @@ use Filament\Forms\ComponentContainer;
|
||||
use Filament\Forms\Components\Actions\Action;
|
||||
use Filament\Forms\Contracts\HasForms;
|
||||
use Filament\Support\Enums\ActionSize;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -253,7 +254,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getCloneActionName())
|
||||
->label(__('filament-forms::components.repeater.actions.clone.label'))
|
||||
->icon('heroicon-m-square-2-stack')
|
||||
->icon(FilamentIcon::resolve('forms::components.repeater.actions.clone') ?? 'heroicon-m-square-2-stack')
|
||||
->color('gray')
|
||||
->action(function (array $arguments, Repeater $component): void {
|
||||
$newUuid = $component->generateUuid();
|
||||
@@ -296,7 +297,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getDeleteActionName())
|
||||
->label(__('filament-forms::components.repeater.actions.delete.label'))
|
||||
->icon('heroicon-m-trash')
|
||||
->icon(FilamentIcon::resolve('forms::components.repeater.actions.delete') ?? 'heroicon-m-trash')
|
||||
->color('danger')
|
||||
->action(function (array $arguments, Repeater $component): void {
|
||||
$items = $component->getState();
|
||||
@@ -335,7 +336,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getMoveDownActionName())
|
||||
->label(__('filament-forms::components.repeater.actions.move_down.label'))
|
||||
->icon('heroicon-m-arrow-down')
|
||||
->icon(FilamentIcon::resolve('forms::components.repeater.actions.move-down') ?? 'heroicon-m-arrow-down')
|
||||
->color('gray')
|
||||
->action(function (array $arguments, Repeater $component): void {
|
||||
$items = array_move_after($component->getState(), $arguments['item']);
|
||||
@@ -373,7 +374,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getMoveUpActionName())
|
||||
->label(__('filament-forms::components.repeater.actions.move_up.label'))
|
||||
->icon('heroicon-m-arrow-up')
|
||||
->icon(FilamentIcon::resolve('forms::components.repeater.actions.move-up') ?? 'heroicon-m-arrow-up')
|
||||
->color('gray')
|
||||
->action(function (array $arguments, Repeater $component): void {
|
||||
$items = array_move_before($component->getState(), $arguments['item']);
|
||||
@@ -411,7 +412,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getReorderActionName())
|
||||
->label(__('filament-forms::components.repeater.actions.reorder.label'))
|
||||
->icon('heroicon-m-arrows-up-down')
|
||||
->icon(FilamentIcon::resolve('forms::components.repeater.actions.reorder') ?? 'heroicon-m-arrows-up-down')
|
||||
->color('gray')
|
||||
->action(function (array $arguments, Repeater $component): void {
|
||||
$items = [
|
||||
@@ -453,7 +454,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getCollapseActionName())
|
||||
->label(__('filament-forms::components.repeater.actions.collapse.label'))
|
||||
->icon('heroicon-m-chevron-up')
|
||||
->icon(FilamentIcon::resolve('forms::components.repeater.actions.collapse') ?? 'heroicon-m-chevron-up')
|
||||
->color('gray')
|
||||
->livewireClickHandlerEnabled(false)
|
||||
->iconButton()
|
||||
@@ -484,7 +485,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
|
||||
{
|
||||
$action = Action::make($this->getExpandActionName())
|
||||
->label(__('filament-forms::components.repeater.actions.expand.label'))
|
||||
->icon('heroicon-m-chevron-down')
|
||||
->icon(FilamentIcon::resolve('forms::components.repeater.actions.expand') ?? 'heroicon-m-chevron-down')
|
||||
->color('gray')
|
||||
->livewireClickHandlerEnabled(false)
|
||||
->iconButton()
|
||||
|
||||
@@ -8,6 +8,7 @@ use Filament\Forms\ComponentContainer;
|
||||
use Filament\Forms\Components\Actions\Action;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Support\Concerns\HasExtraAlpineAttributes;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Filament\Support\Services\RelationshipJoiner;
|
||||
use Illuminate\Contracts\Support\Arrayable;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
@@ -304,7 +305,7 @@ class Select extends Field implements Contracts\HasAffixActions, Contracts\HasNe
|
||||
$action->halt();
|
||||
})
|
||||
->color('gray')
|
||||
->icon('heroicon-m-plus')
|
||||
->icon(FilamentIcon::resolve('forms::components.select.actions.create-option') ?? 'heroicon-m-plus')
|
||||
->iconButton()
|
||||
->modalHeading($this->getCreateOptionModalHeading() ?? __('filament-forms::components.select.actions.create_option.modal.heading'))
|
||||
->modalSubmitActionLabel(__('filament-forms::components.select.actions.create_option.modal.actions.create.label'))
|
||||
@@ -445,7 +446,7 @@ class Select extends Field implements Contracts\HasAffixActions, Contracts\HasNe
|
||||
$livewire->dispatch('filament-forms::select.refreshSelectedOptionLabel', livewireId: $livewire->getId(), statePath: $statePath);
|
||||
})
|
||||
->color('gray')
|
||||
->icon('heroicon-m-pencil-square')
|
||||
->icon(FilamentIcon::resolve('forms::components.select.actions.edit-option') ?? 'heroicon-m-pencil-square')
|
||||
->iconButton()
|
||||
->modalHeading($this->getEditOptionModalHeading() ?? __('filament-forms::components.select.actions.edit_option.modal.heading'))
|
||||
->modalSubmitActionLabel(__('filament-forms::components.select.actions.edit_option.modal.actions.save.label'));
|
||||
|
||||
@@ -10,6 +10,7 @@ use Filament\Support\Components\ViewComponent;
|
||||
use Filament\Support\Concerns\HasColor;
|
||||
use Filament\Support\Concerns\HasIcon;
|
||||
use Filament\Support\Concerns\HasIconColor;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Illuminate\Contracts\Auth\Authenticatable;
|
||||
use Illuminate\Contracts\Support\Arrayable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -237,7 +238,7 @@ class Notification extends ViewComponent implements Arrayable
|
||||
|
||||
public function danger(): static
|
||||
{
|
||||
$this->icon('heroicon-o-x-circle');
|
||||
$this->icon(FilamentIcon::resolve('notifications::notification.danger') ?? 'heroicon-o-x-circle');
|
||||
$this->iconColor('danger');
|
||||
|
||||
return $this;
|
||||
@@ -245,7 +246,7 @@ class Notification extends ViewComponent implements Arrayable
|
||||
|
||||
public function info(): static
|
||||
{
|
||||
$this->icon('heroicon-o-information-circle');
|
||||
$this->icon(FilamentIcon::resolve('notifications::notification.info') ?? 'heroicon-o-information-circle');
|
||||
$this->iconColor('info');
|
||||
|
||||
return $this;
|
||||
@@ -253,7 +254,7 @@ class Notification extends ViewComponent implements Arrayable
|
||||
|
||||
public function success(): static
|
||||
{
|
||||
$this->icon('heroicon-o-check-circle');
|
||||
$this->icon(FilamentIcon::resolve('notifications::notification.success') ?? 'heroicon-o-check-circle');
|
||||
$this->iconColor('success');
|
||||
|
||||
return $this;
|
||||
@@ -261,7 +262,7 @@ class Notification extends ViewComponent implements Arrayable
|
||||
|
||||
public function warning(): static
|
||||
{
|
||||
$this->icon('heroicon-o-exclamation-circle');
|
||||
$this->icon(FilamentIcon::resolve('notifications::notification.warning') ?? 'heroicon-o-exclamation-circle');
|
||||
$this->iconColor('warning');
|
||||
|
||||
return $this;
|
||||
|
||||
@@ -91,9 +91,10 @@
|
||||
<x-filament::dropdown.list.item
|
||||
:color="$profileItem?->getColor()"
|
||||
:href="$profileItemUrl ?? filament()->getTenantProfileUrl()"
|
||||
:target="($profileItem?->shouldOpenUrlInNewTab() ?? false) ? '_blank' : null"
|
||||
:icon="$profileItem?->getIcon() ?? 'heroicon-m-cog-6-tooth'"
|
||||
icon-alias="panels::tenant-menu.profile-button"
|
||||
tag="a"
|
||||
:target="($profileItem?->shouldOpenUrlInNewTab() ?? false) ? '_blank' : null"
|
||||
>
|
||||
{{ $profileItem?->getLabel() ?? filament()->getTenantProfilePage()::getLabel() }}
|
||||
</x-filament::dropdown.list.item>
|
||||
@@ -103,9 +104,10 @@
|
||||
<x-filament::dropdown.list.item
|
||||
:color="$billingItem?->getColor() ?? 'gray'"
|
||||
:href="$billingItemUrl ?? filament()->getTenantBillingUrl()"
|
||||
:target="($billingItem?->shouldOpenUrlInNewTab() ?? false) ? '_blank' : null"
|
||||
:icon="$billingItem?->getIcon() ?? 'heroicon-m-credit-card'"
|
||||
icon-alias="panels::tenant-menu.billing-button"
|
||||
tag="a"
|
||||
:target="($billingItem?->shouldOpenUrlInNewTab() ?? false) ? '_blank' : null"
|
||||
>
|
||||
{{ $billingItem?->getLabel() ?? __('filament-panels::layout.actions.billing.label') }}
|
||||
</x-filament::dropdown.list.item>
|
||||
@@ -148,9 +150,10 @@
|
||||
<x-filament::dropdown.list.item
|
||||
:color="$registrationItem?->getColor()"
|
||||
:href="$registrationItemUrl ?? filament()->getTenantRegistrationUrl()"
|
||||
:target="($registrationItem?->shouldOpenUrlInNewTab() ?? false) ? '_blank' : null"
|
||||
:icon="$registrationItem?->getIcon() ?? 'heroicon-m-plus'"
|
||||
icon-alias="panels::tenant-menu.registration-button"
|
||||
tag="a"
|
||||
:target="($registrationItem?->shouldOpenUrlInNewTab() ?? false) ? '_blank' : null"
|
||||
>
|
||||
{{ $registrationItem?->getLabel() ?? filament()->getTenantRegistrationPage()::getLabel() }}
|
||||
</x-filament::dropdown.list.item>
|
||||
|
||||
@@ -15,6 +15,7 @@ use Filament\Notifications\Auth\ResetPassword as ResetPasswordNotification;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Pages\Concerns\InteractsWithFormActions;
|
||||
use Filament\Pages\SimplePage;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Illuminate\Contracts\Auth\CanResetPassword;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
@@ -138,8 +139,8 @@ class RequestPasswordReset extends SimplePage
|
||||
->link()
|
||||
->label(__('filament-panels::pages/auth/password-reset/request-password-reset.actions.login.label'))
|
||||
->icon(match (__('filament-panels::layout.direction')) {
|
||||
'rtl' => 'heroicon-m-arrow-right',
|
||||
default => 'heroicon-m-arrow-left',
|
||||
'rtl' => FilamentIcon::resolve('panels::pages.password-reset.request-password-reset.actions.login.rtl') ?? 'heroicon-m-arrow-right',
|
||||
default => FilamentIcon::resolve('panels::pages.password-reset.request-password-reset.actions.login') ?? 'heroicon-m-arrow-left',
|
||||
})
|
||||
->url(filament()->getLoginUrl());
|
||||
}
|
||||
|
||||
@@ -9,11 +9,13 @@ use Filament\Actions\ForceDeleteAction;
|
||||
use Filament\Actions\ReplicateAction;
|
||||
use Filament\Actions\RestoreAction;
|
||||
use Filament\Actions\ViewAction;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Infolists\Infolist;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Pages\Concerns\InteractsWithFormActions;
|
||||
use Filament\Support\Exceptions\Halt;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Filament\Support\Facades\FilamentView;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -41,7 +43,12 @@ class EditRecord extends Page
|
||||
|
||||
public ?string $previousUrl = null;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-pencil';
|
||||
public static function getNavigationIcon(): ?string
|
||||
{
|
||||
return static::$navigationIcon
|
||||
?? FilamentIcon::resolve('panels::resources.pages.edit-record.navigation-item')
|
||||
?? (Filament::hasTopNavigation() ? 'heroicon-m-pencil-square' : 'heroicon-o-pencil-square');
|
||||
}
|
||||
|
||||
public function getBreadcrumb(): string
|
||||
{
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
|
||||
namespace Filament\Resources\Pages;
|
||||
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Infolists\Infolist;
|
||||
use Filament\Resources\Concerns\InteractsWithRelationshipTable;
|
||||
use Filament\Resources\RelationManagers\RelationGroup;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Resources\RelationManagers\RelationManagerConfiguration;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Actions\BulkAction;
|
||||
use Illuminate\Auth\Access\AuthorizationException;
|
||||
@@ -59,7 +61,12 @@ class ManageRelatedRecords extends Page implements Tables\Contracts\HasTable
|
||||
#[Url]
|
||||
public ?string $activeTab = null;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
public static function getNavigationIcon(): ?string
|
||||
{
|
||||
return static::$navigationIcon
|
||||
?? FilamentIcon::resolve('panels::resources.pages.manage-related-records.navigation-item')
|
||||
?? (Filament::hasTopNavigation() ? 'heroicon-m-rectangle-stack' : 'heroicon-o-rectangle-stack');
|
||||
}
|
||||
|
||||
public function mount(int | string $record): void
|
||||
{
|
||||
|
||||
@@ -8,9 +8,11 @@ use Filament\Actions\EditAction;
|
||||
use Filament\Actions\ForceDeleteAction;
|
||||
use Filament\Actions\ReplicateAction;
|
||||
use Filament\Actions\RestoreAction;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Infolists\Infolist;
|
||||
use Filament\Pages\Concerns\InteractsWithFormActions;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -28,13 +30,18 @@ class ViewRecord extends Page
|
||||
*/
|
||||
protected static string $view = 'filament-panels::resources.pages.view-record';
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-eye';
|
||||
|
||||
/**
|
||||
* @var array<string, mixed> | null
|
||||
*/
|
||||
public ?array $data = [];
|
||||
|
||||
public static function getNavigationIcon(): ?string
|
||||
{
|
||||
return static::$navigationIcon
|
||||
?? FilamentIcon::resolve('panels::resources.pages.view-record.navigation-item')
|
||||
?? (Filament::hasTopNavigation() ? 'heroicon-m-eye' : 'heroicon-o-eye');
|
||||
}
|
||||
|
||||
public function getBreadcrumb(): string
|
||||
{
|
||||
return static::$breadcrumb ?? __('filament-panels::resources/pages/view-record.breadcrumb');
|
||||
|
||||
@@ -69,12 +69,20 @@ Alternatively, you may pass an SVG element into the component's slot instead of
|
||||
### Panel Builder icon aliases
|
||||
|
||||
- `panels::global-search.field` - Global search field
|
||||
- `panels::pages.dashboard.navigation-item` - Dashboard navigation item
|
||||
- `panels::pages.dashboard.navigation-item` - Dashboard page navigation item
|
||||
- `panels::resources.pages.edit-record.navigation-item` - Resource edit record page navigation item
|
||||
- `panels::resources.pages.manage-related-records.navigation-item` - Resource manage related records page navigation item
|
||||
- `panels::resources.pages.view-record.navigation-item` - Resource view record page navigation item
|
||||
- `panels::pages.password-reset.request-password-reset.actions.login` - Trigger button of the login action on the request password reset page
|
||||
- `panels::pages.password-reset.request-password-reset.actions.login.rtl` - Trigger button of the login action on the request password reset page (right-to-left direction)
|
||||
- `panels::sidebar.collapse-button` - Button to collapse the sidebar
|
||||
- `panels::sidebar.collapse-button.rtl` - Button to collapse the sidebar (right-to-left direction)
|
||||
- `panels::sidebar.expand-button` - Button to expand the sidebar
|
||||
- `panels::sidebar.expand-button.rtl` - Button to expand the sidebar (right-to-left direction)
|
||||
- `panels::sidebar.group.collapse-button` - Collapse button for a sidebar group
|
||||
- `panels::tenant-menu.billing-button` - Billing button in the tenant menu
|
||||
- `panels::tenant-menu.profile-button` - Profile button in the tenant menu
|
||||
- `panels::tenant-menu.registration-button` - Registration button in the tenant menu
|
||||
- `panels::tenant-menu.toggle-button` - Button to toggle the tenant menu
|
||||
- `panels::theme-switcher.light-button` - Button to switch to the light theme from the theme switcher
|
||||
- `panels::theme-switcher.dark-button` - Button to switch to the dark theme from the theme switcher
|
||||
@@ -91,11 +99,48 @@ Alternatively, you may pass an SVG element into the component's slot instead of
|
||||
|
||||
### Form Builder icon aliases
|
||||
|
||||
- `forms::components.builder.actions.clone` - Trigger button of a clone action in a builder item
|
||||
- `forms::components.builder.actions.collapse` - Trigger button of a collapse action in a builder item
|
||||
- `forms::components.builder.actions.delete` - Trigger button of a delete action in a builder item
|
||||
- `forms::components.builder.actions.expand` - Trigger button of an expand action in a builder item
|
||||
- `forms::components.builder.actions.move-down` - Trigger button of a move down action in a builder item
|
||||
- `forms::components.builder.actions.move-up` - Trigger button of a move up action in a builder item
|
||||
- `forms::components.builder.actions.reorder` - Trigger button of a reorder action in a builder item
|
||||
- `forms::components.checkbox-list.search-field` - Search input in a checkbox list
|
||||
- `forms::components.file-upload.editor.actions.drag-crop` - Trigger button of a drag crop action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.drag-move` - Trigger button of a drag move action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.flip-horizontal` - Trigger button of a flip horizontal action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.flip-vertical` - Trigger button of a flip vertical action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.move-down` - Trigger button of a move down action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.move-left` - Trigger button of a move left action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.move-right` - Trigger button of a move right action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.move-up` - Trigger button of a move up action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.rotate-left` - Trigger button of a rotate left action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.rotate-right` - Trigger button of a rotate right action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.zoom-100` - Trigger button of a zoom 100 action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.zoom-in` - Trigger button of a zoom in action in a file upload editor
|
||||
- `forms::components.file-upload.editor.actions.zoom-out` - Trigger button of a zoom out action in a file upload editor
|
||||
- `forms::components.key-value.actions.delete` - Trigger button of a delete action in a key-value field item
|
||||
- `forms::components.key-value.actions.reorder` - Trigger button of a reorder action in a key-value field item
|
||||
- `forms::components.repeater.actions.clone` - Trigger button of a clone action in a repeater item
|
||||
- `forms::components.repeater.actions.collapse` - Trigger button of a collapse action in a repeater item
|
||||
- `forms::components.repeater.actions.delete` - Trigger button of a delete action in a repeater item
|
||||
- `forms::components.repeater.actions.expand` - Trigger button of an expand action in a repeater item
|
||||
- `forms::components.repeater.actions.move-down` - Trigger button of a move down action in a repeater item
|
||||
- `forms::components.repeater.actions.move-up` - Trigger button of a move up action in a repeater item
|
||||
- `forms::components.repeater.actions.reorder` - Trigger button of a reorder action in a repeater item
|
||||
- `forms::components.select.actions.create-option` - Trigger button of a create option action in a select field
|
||||
- `forms::components.select.actions.edit-option` - Trigger button of an edit option action in a select field
|
||||
- `forms::components.wizard.completed-step` - Completed step in a wizard
|
||||
|
||||
### Table Builder icon aliases
|
||||
|
||||
- `tables::actions.disable-reordering` - Trigger button of the disable reordering action
|
||||
- `tables::actions.enable-reordering` - Trigger button of the enable reordering action
|
||||
- `tables::actions.filter` - Trigger button of the filter action
|
||||
- `tables::actions.group` - Trigger button of a group records action
|
||||
- `tables::actions.open-bulk-actions` - Trigger button of an open bulk actions action
|
||||
- `tables::actions.toggle-columns` - Trigger button of the toggle columns action
|
||||
- `tables::columns.collapse-button` - Button to collapse a column
|
||||
- `tables::columns.icon-column.false` - Falsy state of an icon column
|
||||
- `tables::columns.icon-column.true` - Truthy state of an icon column
|
||||
@@ -111,9 +156,15 @@ Alternatively, you may pass an SVG element into the component's slot instead of
|
||||
|
||||
- `notifications::database.modal.empty-state` - Empty state of the database notifications modal
|
||||
- `notifications::notification.close-button` - Button to close a notification
|
||||
- `notifications::notification.danger` - Danger notification
|
||||
- `notifications::notification.info` - Info notification
|
||||
- `notifications::notification.success` - Success notification
|
||||
- `notifications::notification.warning` - Warning notification
|
||||
|
||||
### Actions icon aliases
|
||||
|
||||
- `actions::action-group` - Trigger button of an action group
|
||||
- `actions::create-action.grouped` - Trigger button of a grouped create action
|
||||
- `actions::delete-action` - Trigger button of a delete action
|
||||
- `actions::delete-action.grouped` - Trigger button of a grouped delete action
|
||||
- `actions::delete-action.modal` - Modal of a delete action
|
||||
@@ -121,14 +172,19 @@ Alternatively, you may pass an SVG element into the component's slot instead of
|
||||
- `actions::detach-action.modal` - Modal of a detach action
|
||||
- `actions::dissociate-action` - Trigger button of a dissociate action
|
||||
- `actions::dissociate-action.modal` - Modal of a dissociate action
|
||||
- `actions::edit-action` - Trigger button of an edit action
|
||||
- `actions::edit-action.grouped` - Trigger button of a grouped edit action
|
||||
- `actions::force-delete-action` - Trigger button of a force delete action
|
||||
- `actions::force-delete-action.grouped` - Trigger button of a grouped force delete action
|
||||
- `actions::force-delete-action.modal` - Modal of a force delete action
|
||||
- `actions::modal.confirmation` - Modal of an action that requires confirmation
|
||||
- `actions::replicate-action` - Trigger button of a replicate action
|
||||
- `actions::replicate-action.grouped` - Trigger button of a grouped replicate action
|
||||
- `actions::restore-action` - Trigger button of a restore action
|
||||
- `actions::restore-action.grouped` - Trigger button of a grouped restore action
|
||||
- `actions::restore-action.modal` - Modal of a restore action
|
||||
- `actions::view-action` - Trigger button of a view action
|
||||
- `actions::view-action.grouped` - Trigger button of a grouped view action
|
||||
|
||||
### Infolist Builder icon aliases
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Filament\Tables\Actions;
|
||||
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
|
||||
class BulkActionGroup extends ActionGroup
|
||||
{
|
||||
protected function setUp(): void
|
||||
@@ -10,7 +12,7 @@ class BulkActionGroup extends ActionGroup
|
||||
|
||||
$this->label(__('filament-tables::table.actions.open_bulk_actions.label'));
|
||||
|
||||
$this->icon('heroicon-m-ellipsis-vertical');
|
||||
$this->icon(FilamentIcon::resolve('tables::actions.open-bulk-actions') ?? 'heroicon-m-ellipsis-vertical');
|
||||
|
||||
$this->color('gray');
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Filament\Tables\Actions;
|
||||
|
||||
use Closure;
|
||||
use Filament\Actions\Concerns\CanCustomizeProcess;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
@@ -32,7 +33,7 @@ class EditAction extends Action
|
||||
|
||||
$this->successNotificationTitle(__('filament-actions::edit.single.notifications.saved.title'));
|
||||
|
||||
$this->icon('heroicon-m-pencil-square');
|
||||
$this->icon(FilamentIcon::resolve('actions::edit-action') ?? 'heroicon-m-pencil-square');
|
||||
|
||||
$this->fillForm(function (Model $record, Table $table): array {
|
||||
if ($translatableContentDriver = $table->makeTranslatableContentDriver()) {
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Filament\Tables\Actions;
|
||||
|
||||
use Closure;
|
||||
use Filament\Actions\StaticAction;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -29,7 +30,7 @@ class ViewAction extends Action
|
||||
|
||||
$this->color('gray');
|
||||
|
||||
$this->icon('heroicon-m-eye');
|
||||
$this->icon(FilamentIcon::resolve('actions::view-action') ?? 'heroicon-m-eye');
|
||||
|
||||
$this->disabledForm();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Filament\Tables\Table\Concerns;
|
||||
|
||||
use Closure;
|
||||
use Filament\Support\Enums\ActionSize;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Filament\Tables\Actions\Action;
|
||||
use Filament\Tables\Grouping\Group;
|
||||
|
||||
@@ -71,7 +72,7 @@ trait CanGroupRecords
|
||||
$action = Action::make('groupRecords')
|
||||
->label(__('filament-tables::table.actions.group.label'))
|
||||
->iconButton()
|
||||
->icon('heroicon-m-rectangle-stack')
|
||||
->icon(FilamentIcon::resolve('tables::actions.group') ?? 'heroicon-m-rectangle-stack')
|
||||
->color('gray')
|
||||
->livewireClickHandlerEnabled(false)
|
||||
->table($this);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Filament\Tables\Table\Concerns;
|
||||
|
||||
use Closure;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Filament\Tables\Actions\Action;
|
||||
|
||||
trait CanReorderRecords
|
||||
@@ -36,7 +37,7 @@ trait CanReorderRecords
|
||||
$action = Action::make('reorderRecords')
|
||||
->label($isReordering ? __('filament-tables::table.actions.disable_reordering.label') : __('filament-tables::table.actions.enable_reordering.label'))
|
||||
->iconButton()
|
||||
->icon($isReordering ? 'heroicon-m-check' : 'heroicon-m-arrows-up-down')
|
||||
->icon($isReordering ? (FilamentIcon::resolve('tables::actions.disable-reordering') ?? 'heroicon-m-check') : (FilamentIcon::resolve('tables::actions.enable-reordering') ?? 'heroicon-m-arrows-up-down'))
|
||||
->color('gray')
|
||||
->action('toggleTableReordering')
|
||||
->table($this);
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Filament\Tables\Table\Concerns;
|
||||
use Closure;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Support\Enums\ActionSize;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Filament\Tables\Actions\Action;
|
||||
|
||||
trait CanToggleColumns
|
||||
@@ -56,7 +57,7 @@ trait CanToggleColumns
|
||||
$action = Action::make('toggleColumns')
|
||||
->label(__('filament-tables::table.actions.toggle_columns.label'))
|
||||
->iconButton()
|
||||
->icon('heroicon-m-view-columns')
|
||||
->icon(FilamentIcon::resolve('tables::actions.toggle-columns') ?? 'heroicon-m-view-columns')
|
||||
->color('gray')
|
||||
->livewireClickHandlerEnabled(false)
|
||||
->table($this);
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Filament\Tables\Table\Concerns;
|
||||
use Closure;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Support\Enums\ActionSize;
|
||||
use Filament\Support\Facades\FilamentIcon;
|
||||
use Filament\Tables\Actions\Action;
|
||||
use Filament\Tables\Enums\FiltersLayout;
|
||||
use Filament\Tables\Filters\BaseFilter;
|
||||
@@ -140,7 +141,7 @@ trait HasFilters
|
||||
$action = Action::make('openFilters')
|
||||
->label(__('filament-tables::table.actions.filter.label'))
|
||||
->iconButton()
|
||||
->icon('heroicon-m-funnel')
|
||||
->icon(FilamentIcon::resolve('tables::actions.filter') ?? 'heroicon-m-funnel')
|
||||
->color('gray')
|
||||
->livewireClickHandlerEnabled(false)
|
||||
->modalSubmitAction(false)
|
||||
|
||||
Reference in New Issue
Block a user