Initial commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
@props(['on'])
|
||||
|
||||
<div x-data="{ shown: false, timeout: null }"
|
||||
x-init="@this.on('{{ $on }}', () => { clearTimeout(timeout); shown = true; timeout = setTimeout(() => { shown = false }, 2000); })"
|
||||
x-show.transition.out.opacity.duration.1500ms="shown"
|
||||
x-transition:leave.opacity.duration.1500ms
|
||||
style="display: none;"
|
||||
{{ $attributes->merge(['class' => 'text-sm text-gray-600 dark:text-gray-400']) }}>
|
||||
{{ $slot->isEmpty() ? 'Saved.' : $slot }}
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<div {{ $attributes->merge(['class' => 'md:grid md:grid-cols-3 md:gap-6']) }}>
|
||||
<x-forms.section-title>
|
||||
<x-slot name="title">{{ $title }}</x-slot>
|
||||
<x-slot name="description">{{ $description }}</x-slot>
|
||||
</x-forms.section-title>
|
||||
|
||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||
<div class="px-4 py-5 sm:p-6 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
||||
{{ $content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,48 @@
|
||||
@props(['title' => __('Confirm Password'), 'content' => __('For your security, please confirm your password to continue.'), 'button' => __('Confirm')])
|
||||
|
||||
@php
|
||||
$confirmableId = md5($attributes->wire('then'));
|
||||
@endphp
|
||||
|
||||
<span
|
||||
{{ $attributes->wire('then') }}
|
||||
x-data
|
||||
x-ref="span"
|
||||
x-on:click="$wire.startConfirmingPassword('{{ $confirmableId }}')"
|
||||
x-on:password-confirmed.window="setTimeout(() => $event.detail.id === '{{ $confirmableId }}' && $refs.span.dispatchEvent(new CustomEvent('then', { bubbles: false })), 250);"
|
||||
>
|
||||
{{ $slot }}
|
||||
</span>
|
||||
|
||||
@once
|
||||
<x-dialog-modal wire:model.live="confirmingPassword">
|
||||
<x-slot name="title">
|
||||
{{ $title }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
{{ $content }}
|
||||
|
||||
<div class="mt-4" x-data="{}" x-on:confirming-password.window="setTimeout(() => $refs.confirmable_password.focus(), 250)">
|
||||
|
||||
<x-input type="password" class="mt-1 block w-3/4" placeholder="{{ __('Password') }}" autocomplete="current-password"
|
||||
x-ref="confirmable_password"
|
||||
wire:model="confirmablePassword"
|
||||
wire:keydown.enter="confirmPassword"
|
||||
error-field="confirmable_password"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="footer">
|
||||
<x-button class="btn-outline" wire:click="stopConfirmingPassword" wire:loading.attr="disabled">
|
||||
{{ __('Cancel') }}
|
||||
</x-button>
|
||||
|
||||
<x-button type="submit" class="ms-3" dusk="confirm-password-button" wire:click="confirmPassword" wire:loading.attr="disabled">
|
||||
{{ $button }}
|
||||
</x-button>
|
||||
</x-slot>
|
||||
</x-dialog-modal>
|
||||
@endonce
|
||||
@@ -0,0 +1,24 @@
|
||||
@props(['submit'])
|
||||
|
||||
<div {{ $attributes->merge(['class' => 'md:grid md:grid-cols-3 md:gap-6']) }}>
|
||||
<x-forms.section-title>
|
||||
<x-slot name="title">{{ $title }}</x-slot>
|
||||
<x-slot name="description">{{ $description }}</x-slot>
|
||||
</x-forms.section-title>
|
||||
|
||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||
<form wire:submit="{{ $submit }}">
|
||||
<div class="px-4 py-5 bg-white dark:bg-gray-800 sm:p-6 shadow {{ isset($actions) ? 'sm:rounded-tl-md sm:rounded-tr-md' : 'sm:rounded-md' }}">
|
||||
<div class="grid grid-cols-6 gap-6">
|
||||
{{ $form }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (isset($actions))
|
||||
<div class="flex items-center justify-end px-4 py-3 bg-gray-50 dark:bg-gray-800 text-end sm:px-6 shadow sm:rounded-bl-md sm:rounded-br-md">
|
||||
{{ $actions }}
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="md:col-span-1 flex justify-between">
|
||||
<div class="px-4 sm:px-0">
|
||||
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">{{ $title }}</h3>
|
||||
|
||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ $description }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="px-4 sm:px-0">
|
||||
{{ $aside ?? '' }}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user