mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
prettier
This commit is contained in:
@@ -79,6 +79,7 @@ trait CanOpenModal
|
||||
protected bool | Closure | null $hasModalCloseButton = null;
|
||||
|
||||
protected bool | Closure | null $isModalClosedByClickingAway = null;
|
||||
|
||||
protected bool | Closure | null $isModalClosedByHittingEscape = null;
|
||||
|
||||
protected string | Closure | null $modalIcon = null;
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
'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'),
|
||||
]
|
||||
]
|
||||
),
|
||||
]);
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
'id' => null,
|
||||
'openEventName' => 'open-modal',
|
||||
'slideOver' => false,
|
||||
'closeToAction' => true,
|
||||
'stickyFooter' => false,
|
||||
'stickyHeader' => false,
|
||||
'trigger' => null,
|
||||
@@ -160,7 +159,6 @@
|
||||
@if ($closeByHittingEscape)
|
||||
x-on:keydown.window.escape="{{ $closeEventHandler }}"
|
||||
@endif
|
||||
|
||||
x-show="isShown"
|
||||
x-transition:enter="duration-300"
|
||||
x-transition:leave="duration-300"
|
||||
@@ -180,10 +178,9 @@
|
||||
($extraModalWindowAttributeBag ?? new \Illuminate\View\ComponentAttributeBag())->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,
|
||||
'p-10 border border-red-300 shadow shadow-4xl' => $closeToAction,
|
||||
// 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)) && !$closeToAction,
|
||||
'h-[100dvh]' => $slideOver || ($width === MaxWidth::Screen),
|
||||
'mx-auto rounded-xl' => ! ($slideOver || ($width === MaxWidth::Screen)),
|
||||
'hidden' => ! $visible,
|
||||
match ($width) {
|
||||
|
||||
@@ -7,6 +7,7 @@ class Modal
|
||||
public static bool $hasCloseButton = true;
|
||||
|
||||
public static bool $isClosedByClickingAway = true;
|
||||
|
||||
public static bool $isClosedByHittingEscape = true;
|
||||
|
||||
public static function closeButton(bool $condition = true): void
|
||||
|
||||
Reference in New Issue
Block a user