From e173aa7f5d3044d4781cff4d8c149de6d9bc70bb Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Fri, 7 Mar 2025 08:33:25 +0000 Subject: [PATCH 01/84] chore: remove unused files --- .../tailwind/components/modal1.blade.php | 129 ------------------ .../tailwind/components/notify1.blade.php | 112 --------------- 2 files changed, 241 deletions(-) delete mode 100644 resources/views/themes/tailwind/components/modal1.blade.php delete mode 100644 resources/views/themes/tailwind/components/notify1.blade.php diff --git a/resources/views/themes/tailwind/components/modal1.blade.php b/resources/views/themes/tailwind/components/modal1.blade.php deleted file mode 100644 index 16f83d52..00000000 --- a/resources/views/themes/tailwind/components/modal1.blade.php +++ /dev/null @@ -1,129 +0,0 @@ -
- @inject('alert', 'Digitlimit\Alert\Alert') - @php - $modal = $alert->fromArray($data); - $header = $header ?? null; - $body = $body ?? null; - $footer = $footer ?? null; - $hasBody = !is_null($body); - $hasHeader = !is_null($header); - $hasFooter = !is_null($footer); - - $hasTitle = $hasHeader || $modal->getTitle(); - @endphp -
-
- - -
-
- - -
- - -
- @if($modal->hasTitle()) -

{{ $modal->getTitle() }}

- @endif - -
- - @if($modal->hasView()) - {!! $modal->getView() !!} - @else -
- @if($hasBody) - {{ $body }} - @elseif($modal->getMessage()) - {{ $modal->getMessage() }} - @endif -
- @endif - -
- @foreach($modal->getButtons() as $button) - @if($button->isAction()) - @if($button->isLink()) - actionLinkAttributes($button->getAttributes()) !!}> - {{ $button->getLabel() }} - - @else - - @endif - @elseif($button->isCancel()) - @if($button->isLink()) - cancelLinkAttributes($button->getAttributes()) !!}> - {{ $button->getLabel() }} - - @else - - @endif - @else - @if($button->isLink()) - getAttributes() !!}> - {{ $button->getLabel() }} - - @else - - @endif - @endif - @endforeach -
-
-
-
-
diff --git a/resources/views/themes/tailwind/components/notify1.blade.php b/resources/views/themes/tailwind/components/notify1.blade.php deleted file mode 100644 index f530315a..00000000 --- a/resources/views/themes/tailwind/components/notify1.blade.php +++ /dev/null @@ -1,112 +0,0 @@ -
- @inject('alert', 'Digitlimit\Alert\Alert') - @php - $notify = $alert->fromArray($data); - $position = config('alert.tailwind.classes.notify.position.' . $notify->getPosition()); - $container = config('alert.tailwind.classes.notify.levels.' . $notify->getLevel() . '.container'); - @endphp -
From e2a94dca0161794a5697b4234aa15610644f1255 Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Fri, 7 Mar 2025 08:39:21 +0000 Subject: [PATCH 02/84] chore: remove comments --- src/Themes/Tailwind/Components/Modal.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Themes/Tailwind/Components/Modal.php b/src/Themes/Tailwind/Components/Modal.php index 114eb7cf..8669788e 100644 --- a/src/Themes/Tailwind/Components/Modal.php +++ b/src/Themes/Tailwind/Components/Modal.php @@ -59,7 +59,6 @@ public function refresh(string $tag, array $data): void */ public function actionAttributes(array $attributes = []): string { -// $button = config('alert.tailwind.classes.buttons.primary'); $buttonAttributes = config('alert.tailwind.attributes.buttons.action'); $buttonAttributes['class'] = 'modal-action-button'; @@ -76,7 +75,6 @@ public function actionAttributes(array $attributes = []): string */ public function cancelAttributes(array $attributes = []): string { -// $button = config('alert.tailwind.classes.buttons.secondary'); $buttonAttributes = config('alert.tailwind.attributes.buttons.cancel'); $buttonAttributes['class'] = 'modal-cancel-button'; From 13c73925addf05aa2da4e1dda34a945b67161c53 Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Fri, 7 Mar 2025 08:42:08 +0000 Subject: [PATCH 03/84] chore: remove comment --- src/Themes/Tailwind/Components/Modal.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Themes/Tailwind/Components/Modal.php b/src/Themes/Tailwind/Components/Modal.php index 8669788e..9e2e88f5 100644 --- a/src/Themes/Tailwind/Components/Modal.php +++ b/src/Themes/Tailwind/Components/Modal.php @@ -91,7 +91,6 @@ public function cancelAttributes(array $attributes = []): string */ public function actionLinkAttributes(array $attributes = []): string { -// $button = config('alert.tailwind.classes.buttons.primary'); $linkAttributes = config('alert.tailwind.attributes.links.action'); $linkAttributes['class'] = 'modal-action-button'; @@ -108,7 +107,6 @@ public function actionLinkAttributes(array $attributes = []): string */ public function cancelLinkAttributes(array $attributes = []): string { -// $button = config('alert.tailwind.classes.buttons.secondary'); $linkAttributes = config('alert.tailwind.attributes.links.cancel'); $linkAttributes['class'] = 'modal-cancel-button';; From 5554c471a47ce0f14288a4ecbd581ce1ebb8a7f8 Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Fri, 7 Mar 2025 09:07:26 +0000 Subject: [PATCH 04/84] load modal on mount --- src/Themes/Tailwind/Components/Modal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Themes/Tailwind/Components/Modal.php b/src/Themes/Tailwind/Components/Modal.php index 9e2e88f5..98215a4a 100644 --- a/src/Themes/Tailwind/Components/Modal.php +++ b/src/Themes/Tailwind/Components/Modal.php @@ -41,6 +41,8 @@ public function mount(): void if (empty($this->data)) { $this->skipRender(); } + + $this->dispatch('open-alert-modal'); } #[On('refresh-alert-modal')] @@ -125,5 +127,4 @@ public function render(): View { return view('alert::themes.tailwind.components.modal'); } - } From bbbc95c59e04b05ea1644148c2931ec37f111986 Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Fri, 7 Mar 2025 09:19:13 +0000 Subject: [PATCH 05/84] feat: set default tag --- src/Themes/Tailwind/Components/Modal.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Themes/Tailwind/Components/Modal.php b/src/Themes/Tailwind/Components/Modal.php index 98215a4a..7e7001b6 100644 --- a/src/Themes/Tailwind/Components/Modal.php +++ b/src/Themes/Tailwind/Components/Modal.php @@ -15,15 +15,10 @@ */ class Modal extends Component implements LivewireInterface { - /** - * The default alert tag. - */ - public string $defaultTag = Alert::DEFAULT_TAG; - /** * The alert tag. */ - public string $tag; + public string $tag = Alert::DEFAULT_TAG; /** * The alert @@ -35,7 +30,6 @@ class Modal extends Component implements LivewireInterface */ public function mount(): void { - $this->tag = $this->tag ?? $this->defaultTag; $this->data = Alert::taggedModal($this->tag)?->toArray() ?? []; if (empty($this->data)) { From 9eeee20896cdfba79e3adc2ac492e94fc8b7376b Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Fri, 7 Mar 2025 12:43:00 +0000 Subject: [PATCH 06/84] feat: set default tag --- src/Themes/Tailwind/Components/Message.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Themes/Tailwind/Components/Message.php b/src/Themes/Tailwind/Components/Message.php index e0bdb659..a20a2a47 100644 --- a/src/Themes/Tailwind/Components/Message.php +++ b/src/Themes/Tailwind/Components/Message.php @@ -14,15 +14,10 @@ */ class Message extends Component implements LivewireInterface { - /** - * The default alert tag. - */ - public string $defaultTag = Alert::DEFAULT_TAG; - /** * The alert tag. */ - public string $tag; + public string $tag = Alert::DEFAULT_TAG; /** * The alert From e0da0771cde33a3052ec35d0b50c5382fa6a7a74 Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Sat, 8 Mar 2025 00:03:03 +0000 Subject: [PATCH 07/84] feat: fix config --- config/alert.php | 79 ------------------------------------------------ 1 file changed, 79 deletions(-) diff --git a/config/alert.php b/config/alert.php index f722eb26..9db5fb46 100644 --- a/config/alert.php +++ b/config/alert.php @@ -84,84 +84,5 @@ ], ], ], - 'classes' => [ - 'buttons' => [ - 'primary' => 'inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900', - 'secondary' => 'inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2', - - 'success' => 'inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-green-700 focus:ring-offset-2 bg-green-600 hover:bg-green-700', - 'error' => 'inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-red-700 focus:ring-offset-2 bg-red-600 hover:bg-red-700', - 'warning' => 'inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-black transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-yellow-600 focus:ring-offset-2 bg-yellow-400 hover:bg-yellow-500', - 'info' => 'inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-blue-700 focus:ring-offset-2 bg-blue-600 hover:bg-blue-700', - 'light' => 'inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-black transition-colors border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 bg-white hover:bg-gray-100', - 'dark' => 'inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 bg-gray-800 hover:bg-gray-900', - 'link' => 'inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-blue-600 transition-colors rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 hover:underline', - ], - - 'field' => [ - 'levels' => [ - 'success' => [ - 'container' => 'p-3 text-green-800', - ], - 'error' => [ - 'container' => 'p-3 text-red-800', - ], - 'warning' => [ - 'container' => 'p-3 text-yellow-800', - ], - 'info' => [ - 'container' => 'p-3 text-blue-800', - ], - ], - ], - - 'notify' => [ - 'levels' => [ - 'success' => [ - 'container' => 'bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center from-green-400 to-green-500', - ], - 'error' => [ - 'container' => 'bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center from-red-400 to-pink-500', - ], - 'warning' => [ - 'container' => 'bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center from-yellow-400 to-yellow-500', - ], - 'info' => [ - 'container' => 'bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center from-blue-400 to-blue-500', - ], - ], - - 'position' => [ - 'top-right' => 'top-0 right-0', - 'top-left' => 'top-0 left-0', - 'bottom-right' => 'bottom-0 right-0', - 'bottom-left' => 'bottom-0 left-0', - 'top-center' => 'top-0 left-1/2 transform -translate-x-1/2', - 'bottom-center' => 'bottom-0 left-1/2 transform -translate-x-1/2', - 'center' => 'top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2', - ], - ], - - 'message' => [ - 'levels' => [ - 'success' => [ - 'container' => 'flex items-center p-4 mb-4 text-green-800 rounded-lg bg-green-50 dark:bg-gray-800 dark:text-green-400', - 'close' => 'ms-auto -mx-1.5 -my-1.5 bg-blue-50 text-blue-500 rounded-lg focus:ring-2 focus:ring-blue-400 p-1.5 hover:bg-blue-200 inline-flex items-center justify-center h-8 w-8 dark:bg-gray-800 dark:text-blue-400 dark:hover:bg-gray-700', - ], - 'error' => [ - 'container' => 'flex items-center p-4 mb-4 text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400', - 'close' => 'ms-auto -mx-1.5 -my-1.5 bg-red-50 text-red-500 rounded-lg focus:ring-2 focus:ring-red-400 p-1.5 hover:bg-red-200 inline-flex items-center justify-center h-8 w-8 dark:bg-gray-800 dark:text-red-400 dark:hover:bg-gray-700', - ], - 'warning' => [ - 'container' => 'flex items-center p-4 mb-4 text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300', - 'close' => 'ms-auto -mx-1.5 -my-1.5 bg-yellow-50 text-yellow-500 rounded-lg focus:ring-2 focus:ring-yellow-400 p-1.5 hover:bg-yellow-200 inline-flex items-center justify-center h-8 w-8 dark:bg-gray-800 dark:text-yellow-400 dark:hover:bg-gray-700', - ], - 'info' => [ - 'container' => 'flex items-center p-4 mb-4 text-blue-800 rounded-lg bg-blue-50 dark:bg-gray-800 dark:text-blue-400', - 'close' => 'ms-auto -mx-1.5 -my-1.5 bg-blue-50 text-blue-500 rounded-lg focus:ring-2 focus:ring-blue-400 p-1.5 hover:bg-blue-200 inline-flex items-center justify-center h-8 w-8 dark:bg-gray-800 dark:text-blue-400 dark:hover:bg-gray-700', - ], - ], - ], - ], ], ]; From 4e03c3600be1255bc11f0b42561492c966096952 Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Sat, 8 Mar 2025 11:24:58 +0000 Subject: [PATCH 08/84] feat: add alert retrieval nethods --- src/Alert.php | 59 +++++++++------------- src/AlertServiceProvider.php | 5 +- src/Facades/Alert.php | 2 - src/Themes/Tailwind/Components/Field.php | 2 +- src/Themes/Tailwind/Components/Message.php | 3 +- src/Themes/Tailwind/Components/Modal.php | 4 +- src/Themes/Tailwind/Components/Notify.php | 2 +- 7 files changed, 29 insertions(+), 48 deletions(-) diff --git a/src/Alert.php b/src/Alert.php index 5906661a..d1aec8ef 100644 --- a/src/Alert.php +++ b/src/Alert.php @@ -21,16 +21,6 @@ class Alert */ const DEFAULT_TAG = 'default'; - /** - * Fetch an alert based on the default tag. - * - * @throws Exception - */ - public function default(string $type): ?Taggable - { - return self::tagged($type, self::DEFAULT_TAG); - } - /** * Fetch an alert based on the type and named. * @@ -72,65 +62,62 @@ public static function tagged(string $type, string $tag): ?Taggable } /** + * Fetch an alert from the given alert type. + * * @throws Exception */ - public static function taggedField(string $tag): ?Taggable + public static function from(string $type, ...$args): AlertInterface { - return self::tagged('field', $tag); + if (! Type::exists($type)) { + throw new Exception("Invalid alert type '$type'. Check the alert config"); + } + + return AlertFactory::make($type, ...$args); } - /** - * @throws Exception - */ - public static function namedField(string $name, string $tag): ?AlertInterface + public static function forget(string $type, string $tag = Alert::DEFAULT_TAG): void { - return self::named('field', $name, $tag); + Session::forget(SessionKey::key($type, $tag)); } /** + * Fetch an alert based on the type and named. + * * @throws Exception */ - public static function fieldBag(string $tag): ?Taggable + public static function getField(string $name, string $tag = Alert::DEFAULT_TAG): ?HasName { - return self::tagged('bag', $tag); + return self::named('field', $name, $tag); } /** + * Fetch an alert based on the type and named. + * * @throws Exception */ - public static function taggedMessage(string $tag): ?Taggable + public static function getMessage(string $tag = Alert::DEFAULT_TAG): ?Taggable { return self::tagged('message', $tag); } /** + * Fetch an alert based on the type and named. + * * @throws Exception */ - public static function taggedModal(string $tag): ?Taggable + public static function getModal(string $tag = Alert::DEFAULT_TAG): ?Taggable { return self::tagged('modal', $tag); } /** - * @throws Exception - */ - public static function taggedNotify(string $tag): ?Taggable - { - return self::tagged('notify', $tag); - } - - /** - * Fetch an alert from the given alert type. + * Fetch an alert based on the type and named. * * @throws Exception */ - public static function from(string $type, ...$args): AlertInterface + public static function getNotify(string $tag = Alert::DEFAULT_TAG): ?Taggable { - if (! Type::exists($type)) { - throw new Exception("Invalid alert type '$type'. Check the alert config"); - } - - return AlertFactory::make($type, ...$args); + return self::tagged('notify', $tag); } /** diff --git a/src/AlertServiceProvider.php b/src/AlertServiceProvider.php index 50da161b..4690f55b 100644 --- a/src/AlertServiceProvider.php +++ b/src/AlertServiceProvider.php @@ -66,10 +66,9 @@ protected function bootForConsole(): void */ protected function registerMacros(): void { - Alert::macro('stickForget', function (?string $tag = null) { + Alert::macro('forget', function (string $tag = Alert::DEFAULT_TAG) { app(Alert::class) - ->sticky() ->forget($tag); }); } -} +} \ No newline at end of file diff --git a/src/Facades/Alert.php b/src/Facades/Alert.php index ea9c5ab0..6162629f 100644 --- a/src/Facades/Alert.php +++ b/src/Facades/Alert.php @@ -7,12 +7,10 @@ /** * @method static named(string $string, string $string1) * @method static message(string $string) - * @method static default(string $string) * @method static modal(string $string) * @method static notify(string $string) * @method static sticky(string $string) * @method static field(string $name, string $message) - * @method static fieldBag($bag) * @method static form(string $string, string $string1) * @method static success(string $string) * @method static error(string $string) diff --git a/src/Themes/Tailwind/Components/Field.php b/src/Themes/Tailwind/Components/Field.php index 2198aa73..65a36f26 100644 --- a/src/Themes/Tailwind/Components/Field.php +++ b/src/Themes/Tailwind/Components/Field.php @@ -55,7 +55,7 @@ public function mount(): void } if (! empty($this->name) && ! empty($this->tag)) { - $data = Alert::namedField($this->name, $this->tag)?->toArray(); + $data = Alert::getField($this->name, $this->tag)?->toArray() ?? []; if (! empty($data)) { $this->setUp($data); diff --git a/src/Themes/Tailwind/Components/Message.php b/src/Themes/Tailwind/Components/Message.php index a20a2a47..2ad74f2a 100644 --- a/src/Themes/Tailwind/Components/Message.php +++ b/src/Themes/Tailwind/Components/Message.php @@ -39,8 +39,7 @@ public function setUp(array $data): void */ public function mount(): void { - $this->tag = $this->tag ?? $this->defaultTag; - $data = Alert::taggedModal($this->tag)?->toArray() ?? []; + $data = Alert::getModal($this->tag)?->toArray() ?? []; if (empty($data)) { $this->skipRender(); diff --git a/src/Themes/Tailwind/Components/Modal.php b/src/Themes/Tailwind/Components/Modal.php index 7e7001b6..7e6f1394 100644 --- a/src/Themes/Tailwind/Components/Modal.php +++ b/src/Themes/Tailwind/Components/Modal.php @@ -30,13 +30,11 @@ class Modal extends Component implements LivewireInterface */ public function mount(): void { - $this->data = Alert::taggedModal($this->tag)?->toArray() ?? []; + $this->data = Alert::getModal($this->tag)?->toArray() ?? []; if (empty($this->data)) { $this->skipRender(); } - - $this->dispatch('open-alert-modal'); } #[On('refresh-alert-modal')] diff --git a/src/Themes/Tailwind/Components/Notify.php b/src/Themes/Tailwind/Components/Notify.php index aa2beee5..794e2c73 100644 --- a/src/Themes/Tailwind/Components/Notify.php +++ b/src/Themes/Tailwind/Components/Notify.php @@ -39,7 +39,7 @@ public function setUp(array $data): void */ public function mount(): void { - $data = Alert::taggedNotify($this->tag)?->toArray() ?? []; + $data = Alert::getNotify($this->tag)?->toArray() ?? []; if (empty($data)) { $this->skipRender(); From f384be387ac578180b6157f38e2f0e33bffb2c90 Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Sat, 8 Mar 2025 11:30:04 +0000 Subject: [PATCH 09/84] feat: add alert retrieval nethods --- src/Themes/Tailwind/Components/Message.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Themes/Tailwind/Components/Message.php b/src/Themes/Tailwind/Components/Message.php index 2ad74f2a..ac91fa5d 100644 --- a/src/Themes/Tailwind/Components/Message.php +++ b/src/Themes/Tailwind/Components/Message.php @@ -39,7 +39,7 @@ public function setUp(array $data): void */ public function mount(): void { - $data = Alert::getModal($this->tag)?->toArray() ?? []; + $data = Alert::getMessage($this->tag)?->toArray() ?? []; if (empty($data)) { $this->skipRender(); From 34c4b516708c9263e860870615ed781a6b39d0e8 Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Sun, 9 Mar 2025 16:03:46 +0000 Subject: [PATCH 10/84] feat: add svg icons --- resources/views/themes/tailwind/icons/error.blade.php | 3 +++ resources/views/themes/tailwind/icons/info.blade.php | 3 +++ resources/views/themes/tailwind/icons/success.blade.php | 3 +++ resources/views/themes/tailwind/icons/warning.blade.php | 4 ++++ src/Themes/Tailwind/TailwindServiceProvider.php | 5 +++++ 5 files changed, 18 insertions(+) create mode 100644 resources/views/themes/tailwind/icons/error.blade.php create mode 100644 resources/views/themes/tailwind/icons/info.blade.php create mode 100644 resources/views/themes/tailwind/icons/success.blade.php create mode 100644 resources/views/themes/tailwind/icons/warning.blade.php diff --git a/resources/views/themes/tailwind/icons/error.blade.php b/resources/views/themes/tailwind/icons/error.blade.php new file mode 100644 index 00000000..18339a80 --- /dev/null +++ b/resources/views/themes/tailwind/icons/error.blade.php @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/resources/views/themes/tailwind/icons/info.blade.php b/resources/views/themes/tailwind/icons/info.blade.php new file mode 100644 index 00000000..3f5f0365 --- /dev/null +++ b/resources/views/themes/tailwind/icons/info.blade.php @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/resources/views/themes/tailwind/icons/success.blade.php b/resources/views/themes/tailwind/icons/success.blade.php new file mode 100644 index 00000000..c33b3062 --- /dev/null +++ b/resources/views/themes/tailwind/icons/success.blade.php @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/resources/views/themes/tailwind/icons/warning.blade.php b/resources/views/themes/tailwind/icons/warning.blade.php new file mode 100644 index 00000000..7bc59af2 --- /dev/null +++ b/resources/views/themes/tailwind/icons/warning.blade.php @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/Themes/Tailwind/TailwindServiceProvider.php b/src/Themes/Tailwind/TailwindServiceProvider.php index 6c3bca14..ee7d6654 100644 --- a/src/Themes/Tailwind/TailwindServiceProvider.php +++ b/src/Themes/Tailwind/TailwindServiceProvider.php @@ -19,6 +19,11 @@ class TailwindServiceProvider extends ServiceProvider */ public function boot(): void { + Blade::anonymousComponentPath( + __DIR__.'/../../../themes/tailwind/icons', + 'alert-icons' + ); + Tailwind::registerComponents(); Tailwind::dehydrate(); From 4b8a14eae4d67b64d96e95be05de53318a0d86e2 Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Sun, 9 Mar 2025 17:30:00 +0000 Subject: [PATCH 11/84] feat: add alert icons --- config/alert.php | 8 ++++++ .../tailwind => }/icons/error.blade.php | 0 .../tailwind => }/icons/info.blade.php | 0 .../tailwind => }/icons/success.blade.php | 0 .../tailwind => }/icons/warning.blade.php | 0 src/AlertServiceProvider.php | 6 +++++ src/Component/Icons/Error.php | 26 +++++++++++++++++++ src/Component/Icons/Info.php | 26 +++++++++++++++++++ src/Component/Icons/Success.php | 26 +++++++++++++++++++ src/Component/Icons/Warning.php | 26 +++++++++++++++++++ .../Tailwind/TailwindServiceProvider.php | 5 ---- 11 files changed, 118 insertions(+), 5 deletions(-) rename resources/views/{themes/tailwind => }/icons/error.blade.php (100%) rename resources/views/{themes/tailwind => }/icons/info.blade.php (100%) rename resources/views/{themes/tailwind => }/icons/success.blade.php (100%) rename resources/views/{themes/tailwind => }/icons/warning.blade.php (100%) create mode 100644 src/Component/Icons/Error.php create mode 100644 src/Component/Icons/Info.php create mode 100644 src/Component/Icons/Success.php create mode 100644 src/Component/Icons/Warning.php diff --git a/config/alert.php b/config/alert.php index 9db5fb46..b61acf5e 100644 --- a/config/alert.php +++ b/config/alert.php @@ -28,6 +28,13 @@ 'tailwind' => Themes\Tailwind\Tailwind::class, ], + 'icons' => [ + 'success' => \Digitlimit\Alert\Component\Icons\Success::class, + 'error' => \Digitlimit\Alert\Component\Icons\Error::class, + 'warning' => \Digitlimit\Alert\Component\Icons\Warning::class, + 'info' => \Digitlimit\Alert\Component\Icons\Info::class, + ], + /* |-------------------------------------------------------------------------- | Themes Settings @@ -62,6 +69,7 @@ 'component' => Themes\Tailwind\Components\Notify::class, ], ], + 'attributes' => [ 'buttons' => [ 'action' => [ diff --git a/resources/views/themes/tailwind/icons/error.blade.php b/resources/views/icons/error.blade.php similarity index 100% rename from resources/views/themes/tailwind/icons/error.blade.php rename to resources/views/icons/error.blade.php diff --git a/resources/views/themes/tailwind/icons/info.blade.php b/resources/views/icons/info.blade.php similarity index 100% rename from resources/views/themes/tailwind/icons/info.blade.php rename to resources/views/icons/info.blade.php diff --git a/resources/views/themes/tailwind/icons/success.blade.php b/resources/views/icons/success.blade.php similarity index 100% rename from resources/views/themes/tailwind/icons/success.blade.php rename to resources/views/icons/success.blade.php diff --git a/resources/views/themes/tailwind/icons/warning.blade.php b/resources/views/icons/warning.blade.php similarity index 100% rename from resources/views/themes/tailwind/icons/warning.blade.php rename to resources/views/icons/warning.blade.php diff --git a/src/AlertServiceProvider.php b/src/AlertServiceProvider.php index 4690f55b..8cdf8a9f 100644 --- a/src/AlertServiceProvider.php +++ b/src/AlertServiceProvider.php @@ -3,6 +3,7 @@ namespace Digitlimit\Alert; use Exception; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; class AlertServiceProvider extends ServiceProvider @@ -16,6 +17,11 @@ public function boot(): void { $this->loadViewsFrom(__DIR__.'/../resources/views', 'alert'); + Blade::componentNamespace( + 'Digitlimit\\Alert\\Component\\Icons', + 'alert-icon' + ); + $this->registerMacros(); $this->bootForConsole(); diff --git a/src/Component/Icons/Error.php b/src/Component/Icons/Error.php new file mode 100644 index 00000000..e0429a62 --- /dev/null +++ b/src/Component/Icons/Error.php @@ -0,0 +1,26 @@ + Date: Sun, 9 Mar 2025 20:14:30 +0000 Subject: [PATCH 12/84] feat: add toastr --- resources/scss/themes/tailwind/alert.css | 11 ++++ resources/scss/themes/tailwind/alert.css.map | 2 +- .../themes/tailwind/components/notify.scss | 9 +++ .../themes/tailwind/components/toastr.css | 49 ++++++++++++++++ .../themes/tailwind/components/toastr.css.map | 1 + .../themes/tailwind/components/toastr.scss | 56 +++++++++++++++++++ 6 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 resources/scss/themes/tailwind/components/toastr.css create mode 100644 resources/scss/themes/tailwind/components/toastr.css.map create mode 100644 resources/scss/themes/tailwind/components/toastr.scss diff --git a/resources/scss/themes/tailwind/alert.css b/resources/scss/themes/tailwind/alert.css index 1f3c93b0..3ed83f32 100644 --- a/resources/scss/themes/tailwind/alert.css +++ b/resources/scss/themes/tailwind/alert.css @@ -149,6 +149,17 @@ .alert-notify.center { @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; } +@keyframes progress-bar { + from { + width: 0%; + } + to { + width: 100%; + } +} +.alert-notify .animate-width { + animation: progress-bar 5s linear forwards; +} .alert-modal { @apply fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen; diff --git a/resources/scss/themes/tailwind/alert.css.map b/resources/scss/themes/tailwind/alert.css.map index d41e73e7..eed003c7 100644 --- a/resources/scss/themes/tailwind/alert.css.map +++ b/resources/scss/themes/tailwind/alert.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["components/button.scss","components/position.scss","components/field.scss","components/message.scss","components/notify.scss","components/modal.scss"],"names":[],"mappings":"AACI;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;;AClCR;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;AC3BF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;ACdJ;EAEE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAEA;EACI;;AAIN;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;AC5DN;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;AC5CJ;EACE;;AAEA;EACE;;AAGF;EACE;;AAEA;EAAU;;AACV;EAAW;;AACX;EAAU;;AACV;EAAgB;;AAChB;EAAe;;AACf;EAAe;;AAGjB;EACE;;AAEA;EAAiB;;AACjB;EAAe;;AACf;EAAiB;;AACjB;EAAc;;AAEd;EACE;;AAGF;EACE;;AAGF;EACE;;AAIJ;EACE;;AAGF;EACE;;AAEA;EACE;;AAGF;EACE","file":"alert.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["components/button.scss","components/position.scss","components/field.scss","components/message.scss","components/notify.scss","components/modal.scss"],"names":[],"mappings":"AACI;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;;AClCR;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;AC3BF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;ACdJ;EAEE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAEA;EACI;;AAIN;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;AC5DN;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;IAAO;;EACP;IAAK;;;AAGP;EACE;;;ACrDJ;EACE;;AAEA;EACE;;AAGF;EACE;;AAEA;EAAU;;AACV;EAAW;;AACX;EAAU;;AACV;EAAgB;;AAChB;EAAe;;AACf;EAAe;;AAGjB;EACE;;AAEA;EAAiB;;AACjB;EAAe;;AACf;EAAiB;;AACjB;EAAc;;AAEd;EACE;;AAGF;EACE;;AAGF;EACE;;AAIJ;EACE;;AAGF;EACE;;AAEA;EACE;;AAGF;EACE","file":"alert.css"} \ No newline at end of file diff --git a/resources/scss/themes/tailwind/components/notify.scss b/resources/scss/themes/tailwind/components/notify.scss index 42366f91..cc1aaf38 100644 --- a/resources/scss/themes/tailwind/components/notify.scss +++ b/resources/scss/themes/tailwind/components/notify.scss @@ -44,4 +44,13 @@ &.center { @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; } + + @keyframes progress-bar { + from { width: 0%; } + to { width: 100%; } + } + + .animate-width { + animation: progress-bar 5s linear forwards; + } } diff --git a/resources/scss/themes/tailwind/components/toastr.css b/resources/scss/themes/tailwind/components/toastr.css new file mode 100644 index 00000000..8837d85a --- /dev/null +++ b/resources/scss/themes/tailwind/components/toastr.css @@ -0,0 +1,49 @@ +.alert-toastr { + @apply bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center; +} +.alert-toastr.success { + @apply from-green-400 to-green-500; +} +.alert-toastr.error { + @apply from-red-400 to-pink-500; +} +.alert-toastr.warning { + @apply from-yellow-400 to-yellow-500; +} +.alert-toastr.info { + @apply from-blue-400 to-blue-500; +} +.alert-toastr.top-right { + @apply top-0 right-0; +} +.alert-toastr.top-left { + @apply top-0 left-0; +} +.alert-toastr.bottom-right { + @apply bottom-0 right-0; +} +.alert-toastr.bottom-left { + @apply bottom-0 left-0; +} +.alert-toastr.top-center { + @apply top-0 left-1/2 transform -translate-x-1/2; +} +.alert-toastr.bottom-center { + @apply bottom-0 left-1/2 transform -translate-x-1/2; +} +.alert-toastr.center { + @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; +} +@keyframes progress-bar { + from { + width: 0%; + } + to { + width: 100%; + } +} +.alert-toastr .animate-width { + animation: progress-bar 5s linear forwards; +} + +/*# sourceMappingURL=toastr.css.map */ diff --git a/resources/scss/themes/tailwind/components/toastr.css.map b/resources/scss/themes/tailwind/components/toastr.css.map new file mode 100644 index 00000000..817972ec --- /dev/null +++ b/resources/scss/themes/tailwind/components/toastr.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["toastr.scss"],"names":[],"mappings":"AAAA;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;IAAO;;EACP;IAAK;;;AAGP;EACE","file":"toastr.css"} \ No newline at end of file diff --git a/resources/scss/themes/tailwind/components/toastr.scss b/resources/scss/themes/tailwind/components/toastr.scss new file mode 100644 index 00000000..1aafe3fe --- /dev/null +++ b/resources/scss/themes/tailwind/components/toastr.scss @@ -0,0 +1,56 @@ +.alert-toastr { + @apply bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center; + + &.success { + @apply from-green-400 to-green-500; + } + + &.error { + @apply from-red-400 to-pink-500; + } + + &.warning { + @apply from-yellow-400 to-yellow-500; + } + + &.info { + @apply from-blue-400 to-blue-500; + } + + &.top-right { + @apply top-0 right-0; + } + + &.top-left { + @apply top-0 left-0; + } + + &.bottom-right { + @apply bottom-0 right-0; + } + + &.bottom-left { + @apply bottom-0 left-0; + } + + &.top-center { + @apply top-0 left-1/2 transform -translate-x-1/2; + } + + &.bottom-center { + @apply bottom-0 left-1/2 transform -translate-x-1/2; + } + + &.center { + @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; + } + + @keyframes progress-bar { + from { width: 0%; } + to { width: 100%; } + } + + .animate-width { + animation: progress-bar 5s linear forwards; + } +} From 8b9b4f5d1a33d04365f694227f4d073f61e366bb Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Sun, 9 Mar 2025 20:25:11 +0000 Subject: [PATCH 13/84] feat: rename notify to toastr --- config/alert.php | 8 +- resources/css/themes/tailwind/alert.css | 281 ------------------ .../css/themes/tailwind/components/button.css | 27 -- .../css/themes/tailwind/components/field.css | 12 - .../themes/tailwind/components/message.css | 48 --- .../css/themes/tailwind/components/modal.css | 63 ---- .../css/themes/tailwind/components/notify.css | 36 --- .../themes/tailwind/components/position.css | 24 -- resources/scss/themes/tailwind/alert.css | 228 -------------- resources/scss/themes/tailwind/alert.css.map | 1 - resources/scss/themes/tailwind/alert.scss | 2 +- .../themes/tailwind/components/notify.scss | 56 ---- .../themes/tailwind/components/position.scss | 2 +- .../themes/tailwind/components/toastr.css | 49 --- .../themes/tailwind/components/toastr.css.map | 1 - .../{notify.blade.php => toastr.blade.php} | 38 +-- src/Alert.php | 4 +- src/Events/Notify/Flashed.php | 6 +- src/Facades/Alert.php | 2 +- src/Helpers.php | 10 +- src/Themes/Tailwind/Components/Notify.php | 12 +- src/Types/{Notify.php => Toastr.php} | 32 +- tests/Feature/.gitkeep | 0 tests/Unit/Helpers/SessionKeyTest.php | 4 +- 24 files changed, 60 insertions(+), 886 deletions(-) delete mode 100644 resources/css/themes/tailwind/alert.css delete mode 100644 resources/css/themes/tailwind/components/button.css delete mode 100644 resources/css/themes/tailwind/components/field.css delete mode 100644 resources/css/themes/tailwind/components/message.css delete mode 100644 resources/css/themes/tailwind/components/modal.css delete mode 100644 resources/css/themes/tailwind/components/notify.css delete mode 100644 resources/css/themes/tailwind/components/position.css delete mode 100644 resources/scss/themes/tailwind/alert.css delete mode 100644 resources/scss/themes/tailwind/alert.css.map delete mode 100644 resources/scss/themes/tailwind/components/notify.scss delete mode 100644 resources/scss/themes/tailwind/components/toastr.css delete mode 100644 resources/scss/themes/tailwind/components/toastr.css.map rename resources/views/themes/tailwind/components/{notify.blade.php => toastr.blade.php} (79%) rename src/Types/{Notify.php => Toastr.php} (75%) create mode 100644 tests/Feature/.gitkeep diff --git a/config/alert.php b/config/alert.php index b61acf5e..aea1eea7 100644 --- a/config/alert.php +++ b/config/alert.php @@ -63,10 +63,10 @@ 'component' => Themes\Tailwind\Components\Modal::class, ], - 'notify' => [ - 'view' => 'alert-notify', - 'alert' => Types\Notify::class, - 'component' => Themes\Tailwind\Components\Notify::class, + 'toastr' => [ + 'view' => 'alert-toastr', + 'alert' => Types\Toastr::class, + 'component' => Themes\Tailwind\Components\Toastr::class, ], ], diff --git a/resources/css/themes/tailwind/alert.css b/resources/css/themes/tailwind/alert.css deleted file mode 100644 index 259159f8..00000000 --- a/resources/css/themes/tailwind/alert.css +++ /dev/null @@ -1,281 +0,0 @@ -.alert-button.primary { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900; -} - -.alert-button.secondary { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2; -} - -.alert-button.success { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-green-700 focus:ring-offset-2 bg-green-600 hover:bg-green-700; -} - -.alert-button.error { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-red-700 focus:ring-offset-2 bg-red-600 hover:bg-red-700; -} - -.alert-button.warning { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-black transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-yellow-600 focus:ring-offset-2 bg-yellow-400 hover:bg-yellow-500; -} - -.alert-button.info { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-blue-700 focus:ring-offset-2 bg-blue-600 hover:bg-blue-700; -} - -.alert-button.light { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-black transition-colors border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 bg-white hover:bg-gray-100; -} - -.alert-button.dark { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 bg-gray-800 hover:bg-gray-900; -} - -.alert-button.link { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-blue-600 transition-colors rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 hover:underline; -} - -.alert-notify-position { - @apply fixed px-2 mt-3 overflow-x-hidden z-50; -} - -.alert-notify-position.top-right { - @apply top-0 right-0; -} - -.alert-notify-position.top-left { - @apply top-0 left-0; -} - -.alert-notify-position.bottom-right { - @apply bottom-0 right-0; -} - -.alert-notify-position.bottom-left { - @apply bottom-0 left-0; -} - -.alert-notify-position.top-center { - @apply top-0 left-1/2 transform -translate-x-1/2; -} - -.alert-notify-position.bottom-center { - @apply bottom-0 left-1/2 transform -translate-x-1/2; -} - -.alert-notify-position.center { - @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; -} - -.alert-field.success { - @apply p-3 text-green-800; -} - -.alert-field.error { - @apply p-3 text-red-800; -} - -.alert-field.warning { - @apply p-3 text-yellow-800; -} - -.alert-field.info { - @apply p-3 text-blue-800; -} - -.alert-message { - @apply flex items-center p-4 mb-4 rounded-lg; -} - -.alert-message .sr-only-fix { - @apply sr-only; -} - -.alert-message.success { - @apply text-green-800 bg-green-50 dark:bg-gray-800 dark:text-green-400; -} - -.alert-message.error { - @apply text-red-800 bg-red-50 dark:bg-gray-800 dark:text-red-400; -} - -.alert-message.warning { - @apply text-yellow-800 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300; -} - -.alert-message.info { - @apply text-blue-800 bg-blue-50 dark:bg-gray-800 dark:text-blue-400; -} - -.alert-message .icon { - @apply shrink-0 w-4 h-4; -} - -.alert-message .message { - @apply ms-3 text-sm font-medium flex items-center gap-2; -} - -.alert-message .message .title { - @apply text-lg font-semibold; -} - -.alert-message .close { - @apply ms-auto -mx-1.5 -my-1.5 p-1.5 inline-flex items-center justify-center h-8 w-8 rounded-lg focus:ring-2; -} - -.alert-message .close.success { - @apply bg-blue-50 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:bg-gray-800 dark:text-blue-400 dark:hover:bg-gray-700; -} - -.alert-message .close.error { - @apply bg-red-50 text-red-500 focus:ring-red-400 hover:bg-red-200 dark:bg-gray-800 dark:text-red-400 dark:hover:bg-gray-700; -} - -.alert-message .close.warning { - @apply bg-yellow-50 text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:bg-gray-800 dark:text-yellow-400 dark:hover:bg-gray-700; -} - -.alert-message .close.info { - @apply bg-blue-50 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:bg-gray-800 dark:text-blue-400 dark:hover:bg-gray-700; -} - -.alert-message .close .close-icon { - @apply w-3 h-3; -} - -.alert-message .close .sr-only-fix { - @apply sr-only; -} - -.alert-notify { - @apply bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center; -} - -.alert-notify.success { - @apply from-green-400 to-green-500; -} - -.alert-notify.error { - @apply from-red-400 to-pink-500; -} - -.alert-notify.warning { - @apply from-yellow-400 to-yellow-500; -} - -.alert-notify.info { - @apply from-blue-400 to-blue-500; -} - -.alert-notify.top-right { - @apply top-0 right-0; -} - -.alert-notify.top-left { - @apply top-0 left-0; -} - -.alert-notify.bottom-right { - @apply bottom-0 right-0; -} - -.alert-notify.bottom-left { - @apply bottom-0 left-0; -} - -.alert-notify.top-center { - @apply top-0 left-1/2 transform -translate-x-1/2; -} - -.alert-notify.bottom-center { - @apply bottom-0 left-1/2 transform -translate-x-1/2; -} - -.alert-notify.center { - @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; -} - -.alert-modal { - @apply fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen; -} - -.alert-modal .modal-overlay { - @apply absolute inset-0 w-full h-full bg-white backdrop-blur-sm bg-opacity-70; -} - -.alert-modal .modal-content { - @apply bg-white p-6 rounded-lg shadow-lg relative max-w-full; -} - -.alert-modal .modal-content.small { - @apply w-1/4; -} - -.alert-modal .modal-content.medium { - @apply w-1/2; -} - -.alert-modal .modal-content.large { - @apply w-3/4; -} - -.alert-modal .modal-content.extra-large { - @apply w-4/5; -} - -.alert-modal .modal-content.fullscreen { - @apply w-full h-full; -} - -.alert-modal .modal-content.scrollable { - @apply max-h-[80vh] overflow-y-auto; -} - -.alert-modal .modal-header { - @apply flex items-center justify-between pb-3; -} - -.alert-modal .modal-header.text-success { - @apply text-green-500; -} - -.alert-modal .modal-header.text-error { - @apply text-red-500; -} - -.alert-modal .modal-header.text-warning { - @apply text-yellow-500; -} - -.alert-modal .modal-header.text-info { - @apply text-blue-500; -} - -.alert-modal .modal-header .modal-title { - @apply text-lg font-semibold; -} - -.alert-modal .modal-header .modal-close { - @apply absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-gray-600 rounded-full hover:text-gray-800 hover:bg-gray-50; -} - -.alert-modal .modal-header .modal-close-icon { - @apply w-5 h-5; -} - -.alert-modal .modal-body { - @apply relative w-auto pb-8; -} - -.alert-modal .modal-footer { - @apply flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2; -} - -.alert-modal .modal-footer .modal-action-button { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900; -} - -.alert-modal .modal-footer .modal-cancel-button { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2; -} - - diff --git a/resources/css/themes/tailwind/components/button.css b/resources/css/themes/tailwind/components/button.css deleted file mode 100644 index 32ea50b7..00000000 --- a/resources/css/themes/tailwind/components/button.css +++ /dev/null @@ -1,27 +0,0 @@ -.alert-button.primary { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900; -} -.alert-button.secondary { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2; -} -.alert-button.success { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-green-700 focus:ring-offset-2 bg-green-600 hover:bg-green-700; -} -.alert-button.error { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-red-700 focus:ring-offset-2 bg-red-600 hover:bg-red-700; -} -.alert-button.warning { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-black transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-yellow-600 focus:ring-offset-2 bg-yellow-400 hover:bg-yellow-500; -} -.alert-button.info { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-blue-700 focus:ring-offset-2 bg-blue-600 hover:bg-blue-700; -} -.alert-button.light { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-black transition-colors border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 bg-white hover:bg-gray-100; -} -.alert-button.dark { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 bg-gray-800 hover:bg-gray-900; -} -.alert-button.link { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-blue-600 transition-colors rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 hover:underline; -} diff --git a/resources/css/themes/tailwind/components/field.css b/resources/css/themes/tailwind/components/field.css deleted file mode 100644 index cb5c5ee9..00000000 --- a/resources/css/themes/tailwind/components/field.css +++ /dev/null @@ -1,12 +0,0 @@ -.alert-field.success { - @apply p-3 text-green-800; -} -.alert-field.error { - @apply p-3 text-red-800; -} -.alert-field.warning { - @apply p-3 text-yellow-800; -} -.alert-field.info { - @apply p-3 text-blue-800; -} diff --git a/resources/css/themes/tailwind/components/message.css b/resources/css/themes/tailwind/components/message.css deleted file mode 100644 index 2f1f0777..00000000 --- a/resources/css/themes/tailwind/components/message.css +++ /dev/null @@ -1,48 +0,0 @@ -.alert-message { - @apply flex items-center p-4 mb-4 rounded-lg; -} -.alert-message .sr-only-fix { - @apply sr-only; -} -.alert-message.success { - @apply text-green-800 bg-green-50 dark:bg-gray-800 dark:text-green-400; -} -.alert-message.error { - @apply text-red-800 bg-red-50 dark:bg-gray-800 dark:text-red-400; -} -.alert-message.warning { - @apply text-yellow-800 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300; -} -.alert-message.info { - @apply text-blue-800 bg-blue-50 dark:bg-gray-800 dark:text-blue-400; -} -.alert-message .icon { - @apply shrink-0 w-4 h-4; -} -.alert-message .message { - @apply ms-3 text-sm font-medium flex items-center gap-2; -} -.alert-message .message .title { - @apply text-lg font-semibold; -} -.alert-message .close { - @apply ms-auto -mx-1.5 -my-1.5 p-1.5 inline-flex items-center justify-center h-8 w-8 rounded-lg focus:ring-2; -} -.alert-message .close.success { - @apply bg-blue-50 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:bg-gray-800 dark:text-blue-400 dark:hover:bg-gray-700; -} -.alert-message .close.error { - @apply bg-red-50 text-red-500 focus:ring-red-400 hover:bg-red-200 dark:bg-gray-800 dark:text-red-400 dark:hover:bg-gray-700; -} -.alert-message .close.warning { - @apply bg-yellow-50 text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:bg-gray-800 dark:text-yellow-400 dark:hover:bg-gray-700; -} -.alert-message .close.info { - @apply bg-blue-50 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:bg-gray-800 dark:text-blue-400 dark:hover:bg-gray-700; -} -.alert-message .close .close-icon { - @apply w-3 h-3; -} -.alert-message .close .sr-only-fix { - @apply sr-only; -} diff --git a/resources/css/themes/tailwind/components/modal.css b/resources/css/themes/tailwind/components/modal.css deleted file mode 100644 index 25b9a0f3..00000000 --- a/resources/css/themes/tailwind/components/modal.css +++ /dev/null @@ -1,63 +0,0 @@ -.alert-modal { - @apply fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen; -} -.alert-modal .modal-overlay { - @apply absolute inset-0 w-full h-full bg-white backdrop-blur-sm bg-opacity-70; -} -.alert-modal .modal-content { - @apply bg-white p-6 rounded-lg shadow-lg relative max-w-full; -} -.alert-modal .modal-content.small { - @apply w-1/4; -} -.alert-modal .modal-content.medium { - @apply w-1/2; -} -.alert-modal .modal-content.large { - @apply w-3/4; -} -.alert-modal .modal-content.extra-large { - @apply w-4/5; -} -.alert-modal .modal-content.fullscreen { - @apply w-full h-full; -} -.alert-modal .modal-content.scrollable { - @apply max-h-[80vh] overflow-y-auto; -} -.alert-modal .modal-header { - @apply flex items-center justify-between pb-3; -} -.alert-modal .modal-header.text-success { - @apply text-green-500; -} -.alert-modal .modal-header.text-error { - @apply text-red-500; -} -.alert-modal .modal-header.text-warning { - @apply text-yellow-500; -} -.alert-modal .modal-header.text-info { - @apply text-blue-500; -} -.alert-modal .modal-header .modal-title { - @apply text-lg font-semibold; -} -.alert-modal .modal-header .modal-close { - @apply absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-gray-600 rounded-full hover:text-gray-800 hover:bg-gray-50; -} -.alert-modal .modal-header .modal-close-icon { - @apply w-5 h-5; -} -.alert-modal .modal-body { - @apply relative w-auto pb-8; -} -.alert-modal .modal-footer { - @apply flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2; -} -.alert-modal .modal-footer .modal-action-button { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900; -} -.alert-modal .modal-footer .modal-cancel-button { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2; -} diff --git a/resources/css/themes/tailwind/components/notify.css b/resources/css/themes/tailwind/components/notify.css deleted file mode 100644 index 00092304..00000000 --- a/resources/css/themes/tailwind/components/notify.css +++ /dev/null @@ -1,36 +0,0 @@ -.alert-notify { - @apply bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center; -} -.alert-notify.success { - @apply from-green-400 to-green-500; -} -.alert-notify.error { - @apply from-red-400 to-pink-500; -} -.alert-notify.warning { - @apply from-yellow-400 to-yellow-500; -} -.alert-notify.info { - @apply from-blue-400 to-blue-500; -} -.alert-notify.top-right { - @apply top-0 right-0; -} -.alert-notify.top-left { - @apply top-0 left-0; -} -.alert-notify.bottom-right { - @apply bottom-0 right-0; -} -.alert-notify.bottom-left { - @apply bottom-0 left-0; -} -.alert-notify.top-center { - @apply top-0 left-1/2 transform -translate-x-1/2; -} -.alert-notify.bottom-center { - @apply bottom-0 left-1/2 transform -translate-x-1/2; -} -.alert-notify.center { - @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; -} diff --git a/resources/css/themes/tailwind/components/position.css b/resources/css/themes/tailwind/components/position.css deleted file mode 100644 index 05acb563..00000000 --- a/resources/css/themes/tailwind/components/position.css +++ /dev/null @@ -1,24 +0,0 @@ -.alert-notify-position { - @apply fixed px-2 mt-3 overflow-x-hidden z-50; -} -.alert-notify-position.top-right { - @apply top-0 right-0; -} -.alert-notify-position.top-left { - @apply top-0 left-0; -} -.alert-notify-position.bottom-right { - @apply bottom-0 right-0; -} -.alert-notify-position.bottom-left { - @apply bottom-0 left-0; -} -.alert-notify-position.top-center { - @apply top-0 left-1/2 transform -translate-x-1/2; -} -.alert-notify-position.bottom-center { - @apply bottom-0 left-1/2 transform -translate-x-1/2; -} -.alert-notify-position.center { - @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; -} diff --git a/resources/scss/themes/tailwind/alert.css b/resources/scss/themes/tailwind/alert.css deleted file mode 100644 index 3ed83f32..00000000 --- a/resources/scss/themes/tailwind/alert.css +++ /dev/null @@ -1,228 +0,0 @@ -.alert-button.primary { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900; -} -.alert-button.secondary { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2; -} -.alert-button.success { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-green-700 focus:ring-offset-2 bg-green-600 hover:bg-green-700; -} -.alert-button.error { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-red-700 focus:ring-offset-2 bg-red-600 hover:bg-red-700; -} -.alert-button.warning { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-black transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-yellow-600 focus:ring-offset-2 bg-yellow-400 hover:bg-yellow-500; -} -.alert-button.info { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-blue-700 focus:ring-offset-2 bg-blue-600 hover:bg-blue-700; -} -.alert-button.light { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-black transition-colors border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 bg-white hover:bg-gray-100; -} -.alert-button.dark { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 bg-gray-800 hover:bg-gray-900; -} -.alert-button.link { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-blue-600 transition-colors rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 hover:underline; -} - -.alert-notify-position { - @apply fixed px-2 mt-3 overflow-x-hidden z-50; -} -.alert-notify-position.top-right { - @apply top-0 right-0; -} -.alert-notify-position.top-left { - @apply top-0 left-0; -} -.alert-notify-position.bottom-right { - @apply bottom-0 right-0; -} -.alert-notify-position.bottom-left { - @apply bottom-0 left-0; -} -.alert-notify-position.top-center { - @apply top-0 left-1/2 transform -translate-x-1/2; -} -.alert-notify-position.bottom-center { - @apply bottom-0 left-1/2 transform -translate-x-1/2; -} -.alert-notify-position.center { - @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; -} - -.alert-field.success { - @apply p-3 text-green-800; -} -.alert-field.error { - @apply p-3 text-red-800; -} -.alert-field.warning { - @apply p-3 text-yellow-800; -} -.alert-field.info { - @apply p-3 text-blue-800; -} - -.alert-message { - @apply flex items-center p-4 mb-4 rounded-lg; -} -.alert-message .sr-only-fix { - @apply sr-only; -} -.alert-message.success { - @apply text-green-800 bg-green-50 dark:bg-gray-800 dark:text-green-400; -} -.alert-message.error { - @apply text-red-800 bg-red-50 dark:bg-gray-800 dark:text-red-400; -} -.alert-message.warning { - @apply text-yellow-800 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300; -} -.alert-message.info { - @apply text-blue-800 bg-blue-50 dark:bg-gray-800 dark:text-blue-400; -} -.alert-message .icon { - @apply shrink-0 w-4 h-4; -} -.alert-message .message { - @apply ms-3 text-sm font-medium flex items-center gap-2; -} -.alert-message .message .title { - @apply text-lg font-semibold; -} -.alert-message .close { - @apply ms-auto -mx-1.5 -my-1.5 p-1.5 inline-flex items-center justify-center h-8 w-8 rounded-lg focus:ring-2; -} -.alert-message .close.success { - @apply bg-blue-50 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:bg-gray-800 dark:text-blue-400 dark:hover:bg-gray-700; -} -.alert-message .close.error { - @apply bg-red-50 text-red-500 focus:ring-red-400 hover:bg-red-200 dark:bg-gray-800 dark:text-red-400 dark:hover:bg-gray-700; -} -.alert-message .close.warning { - @apply bg-yellow-50 text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:bg-gray-800 dark:text-yellow-400 dark:hover:bg-gray-700; -} -.alert-message .close.info { - @apply bg-blue-50 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:bg-gray-800 dark:text-blue-400 dark:hover:bg-gray-700; -} -.alert-message .close .close-icon { - @apply w-3 h-3; -} -.alert-message .close .sr-only-fix { - @apply sr-only; -} - -.alert-notify { - @apply bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center; -} -.alert-notify.success { - @apply from-green-400 to-green-500; -} -.alert-notify.error { - @apply from-red-400 to-pink-500; -} -.alert-notify.warning { - @apply from-yellow-400 to-yellow-500; -} -.alert-notify.info { - @apply from-blue-400 to-blue-500; -} -.alert-notify.top-right { - @apply top-0 right-0; -} -.alert-notify.top-left { - @apply top-0 left-0; -} -.alert-notify.bottom-right { - @apply bottom-0 right-0; -} -.alert-notify.bottom-left { - @apply bottom-0 left-0; -} -.alert-notify.top-center { - @apply top-0 left-1/2 transform -translate-x-1/2; -} -.alert-notify.bottom-center { - @apply bottom-0 left-1/2 transform -translate-x-1/2; -} -.alert-notify.center { - @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; -} -@keyframes progress-bar { - from { - width: 0%; - } - to { - width: 100%; - } -} -.alert-notify .animate-width { - animation: progress-bar 5s linear forwards; -} - -.alert-modal { - @apply fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen; -} -.alert-modal .modal-overlay { - @apply absolute inset-0 w-full h-full bg-white backdrop-blur-sm bg-opacity-70; -} -.alert-modal .modal-content { - @apply bg-white p-6 rounded-lg shadow-lg relative max-w-full; -} -.alert-modal .modal-content.small { - @apply w-1/4; -} -.alert-modal .modal-content.medium { - @apply w-1/2; -} -.alert-modal .modal-content.large { - @apply w-3/4; -} -.alert-modal .modal-content.extra-large { - @apply w-4/5; -} -.alert-modal .modal-content.fullscreen { - @apply w-full h-full; -} -.alert-modal .modal-content.scrollable { - @apply max-h-[80vh] overflow-y-auto; -} -.alert-modal .modal-header { - @apply flex items-center justify-between pb-3; -} -.alert-modal .modal-header.text-success { - @apply text-green-500; -} -.alert-modal .modal-header.text-error { - @apply text-red-500; -} -.alert-modal .modal-header.text-warning { - @apply text-yellow-500; -} -.alert-modal .modal-header.text-info { - @apply text-blue-500; -} -.alert-modal .modal-header .modal-title { - @apply text-lg font-semibold; -} -.alert-modal .modal-header .modal-close { - @apply absolute top-0 right-0 flex items-center justify-center w-8 h-8 mt-5 mr-5 text-gray-600 rounded-full hover:text-gray-800 hover:bg-gray-50; -} -.alert-modal .modal-header .modal-close-icon { - @apply w-5 h-5; -} -.alert-modal .modal-body { - @apply relative w-auto pb-8; -} -.alert-modal .modal-footer { - @apply flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2; -} -.alert-modal .modal-footer .modal-action-button { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900; -} -.alert-modal .modal-footer .modal-cancel-button { - @apply inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2; -} - -/*# sourceMappingURL=alert.css.map */ diff --git a/resources/scss/themes/tailwind/alert.css.map b/resources/scss/themes/tailwind/alert.css.map deleted file mode 100644 index eed003c7..00000000 --- a/resources/scss/themes/tailwind/alert.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sourceRoot":"","sources":["components/button.scss","components/position.scss","components/field.scss","components/message.scss","components/notify.scss","components/modal.scss"],"names":[],"mappings":"AACI;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;;;AClCR;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;AC3BF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;ACdJ;EAEE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAEA;EACI;;AAIN;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;;AC5DN;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;IAAO;;EACP;IAAK;;;AAGP;EACE;;;ACrDJ;EACE;;AAEA;EACE;;AAGF;EACE;;AAEA;EAAU;;AACV;EAAW;;AACX;EAAU;;AACV;EAAgB;;AAChB;EAAe;;AACf;EAAe;;AAGjB;EACE;;AAEA;EAAiB;;AACjB;EAAe;;AACf;EAAiB;;AACjB;EAAc;;AAEd;EACE;;AAGF;EACE;;AAGF;EACE;;AAIJ;EACE;;AAGF;EACE;;AAEA;EACE;;AAGF;EACE","file":"alert.css"} \ No newline at end of file diff --git a/resources/scss/themes/tailwind/alert.scss b/resources/scss/themes/tailwind/alert.scss index f5250412..02bf8ede 100644 --- a/resources/scss/themes/tailwind/alert.scss +++ b/resources/scss/themes/tailwind/alert.scss @@ -2,5 +2,5 @@ @use "./components/position"; @use "./components/field"; @use "./components/message"; -@use "./components/notify"; +@use "./components/toastr"; @use "./components/modal"; \ No newline at end of file diff --git a/resources/scss/themes/tailwind/components/notify.scss b/resources/scss/themes/tailwind/components/notify.scss deleted file mode 100644 index cc1aaf38..00000000 --- a/resources/scss/themes/tailwind/components/notify.scss +++ /dev/null @@ -1,56 +0,0 @@ -.alert-notify { - @apply bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center; - - &.success { - @apply from-green-400 to-green-500; - } - - &.error { - @apply from-red-400 to-pink-500; - } - - &.warning { - @apply from-yellow-400 to-yellow-500; - } - - &.info { - @apply from-blue-400 to-blue-500; - } - - &.top-right { - @apply top-0 right-0; - } - - &.top-left { - @apply top-0 left-0; - } - - &.bottom-right { - @apply bottom-0 right-0; - } - - &.bottom-left { - @apply bottom-0 left-0; - } - - &.top-center { - @apply top-0 left-1/2 transform -translate-x-1/2; - } - - &.bottom-center { - @apply bottom-0 left-1/2 transform -translate-x-1/2; - } - - &.center { - @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; - } - - @keyframes progress-bar { - from { width: 0%; } - to { width: 100%; } - } - - .animate-width { - animation: progress-bar 5s linear forwards; - } -} diff --git a/resources/scss/themes/tailwind/components/position.scss b/resources/scss/themes/tailwind/components/position.scss index 9c27f487..3ae5a982 100644 --- a/resources/scss/themes/tailwind/components/position.scss +++ b/resources/scss/themes/tailwind/components/position.scss @@ -1,4 +1,4 @@ -.alert-notify-position { +.alert-toastr-position { @apply fixed px-2 mt-3 overflow-x-hidden z-50; &.top-right { diff --git a/resources/scss/themes/tailwind/components/toastr.css b/resources/scss/themes/tailwind/components/toastr.css deleted file mode 100644 index 8837d85a..00000000 --- a/resources/scss/themes/tailwind/components/toastr.css +++ /dev/null @@ -1,49 +0,0 @@ -.alert-toastr { - @apply bg-gray-900 bg-gradient-to-r text-white rounded-t mb-3 shadow-lg flex items-center; -} -.alert-toastr.success { - @apply from-green-400 to-green-500; -} -.alert-toastr.error { - @apply from-red-400 to-pink-500; -} -.alert-toastr.warning { - @apply from-yellow-400 to-yellow-500; -} -.alert-toastr.info { - @apply from-blue-400 to-blue-500; -} -.alert-toastr.top-right { - @apply top-0 right-0; -} -.alert-toastr.top-left { - @apply top-0 left-0; -} -.alert-toastr.bottom-right { - @apply bottom-0 right-0; -} -.alert-toastr.bottom-left { - @apply bottom-0 left-0; -} -.alert-toastr.top-center { - @apply top-0 left-1/2 transform -translate-x-1/2; -} -.alert-toastr.bottom-center { - @apply bottom-0 left-1/2 transform -translate-x-1/2; -} -.alert-toastr.center { - @apply top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2; -} -@keyframes progress-bar { - from { - width: 0%; - } - to { - width: 100%; - } -} -.alert-toastr .animate-width { - animation: progress-bar 5s linear forwards; -} - -/*# sourceMappingURL=toastr.css.map */ diff --git a/resources/scss/themes/tailwind/components/toastr.css.map b/resources/scss/themes/tailwind/components/toastr.css.map deleted file mode 100644 index 817972ec..00000000 --- a/resources/scss/themes/tailwind/components/toastr.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sourceRoot":"","sources":["toastr.scss"],"names":[],"mappings":"AAAA;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;IAAO;;EACP;IAAK;;;AAGP;EACE","file":"toastr.css"} \ No newline at end of file diff --git a/resources/views/themes/tailwind/components/notify.blade.php b/resources/views/themes/tailwind/components/toastr.blade.php similarity index 79% rename from resources/views/themes/tailwind/components/notify.blade.php rename to resources/views/themes/tailwind/components/toastr.blade.php index 30995a93..b26e0d95 100644 --- a/resources/views/themes/tailwind/components/notify.blade.php +++ b/resources/views/themes/tailwind/components/toastr.blade.php @@ -1,7 +1,7 @@ -
+
@inject('alert', 'Digitlimit\Alert\Alert') @php - $notify = $alert->fromArray($data); + $toastr = $alert->fromArray($data); @endphp
-