Committing laravel (part 5)
committing blade templating files and components that might come in handy
This commit is contained in:
parent
e5439ac63f
commit
96c0bfb8ce
83 changed files with 16753 additions and 0 deletions
|
@ -0,0 +1,9 @@
|
||||||
|
@props(['as' => 'button'])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-merge
|
||||||
|
data-tw-dismiss="alert"
|
||||||
|
type="button"
|
||||||
|
aria-label="Close"
|
||||||
|
{{ $attributes->class(['text-slate-800 py-2 px-3 absolute right-0 my-auto mr-2'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
130
resources/views/components/base/alert/index.blade.php
Normal file
130
resources/views/components/base/alert/index.blade.php
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
@props(['as' => 'div', 'variant' => null, 'dismissible' => null])
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/alert/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@php
|
||||||
|
// Main Colors
|
||||||
|
$primary = [
|
||||||
|
'bg-primary border-primary text-white', // Default
|
||||||
|
'dark:border-primary', // Dark
|
||||||
|
];
|
||||||
|
$secondary = [
|
||||||
|
'bg-secondary/70 border-secondary/70 text-slate-500', // Default
|
||||||
|
'dark:border-darkmode-400 dark:bg-darkmode-400 dark:text-slate-300', // Dark mode
|
||||||
|
];
|
||||||
|
$success = [
|
||||||
|
'bg-success border-success text-slate-900', // Default
|
||||||
|
'dark:border-success', // Dark mode
|
||||||
|
];
|
||||||
|
$warning = [
|
||||||
|
'bg-warning border-warning text-slate-900', // Default
|
||||||
|
'dark:border-warning', // Dark mode
|
||||||
|
];
|
||||||
|
$pending = [
|
||||||
|
'bg-pending border-pending text-white', // Default
|
||||||
|
'dark:border-pending', // Dark mode
|
||||||
|
];
|
||||||
|
$danger = [
|
||||||
|
'bg-danger border-danger text-white', // Default
|
||||||
|
'dark:border-danger', // Dark mode
|
||||||
|
];
|
||||||
|
$dark = [
|
||||||
|
'bg-dark border-dark text-white', // Default
|
||||||
|
'dark:bg-darkmode-800 dark:border-transparent dark:text-slate-300', // Dark mode
|
||||||
|
];
|
||||||
|
|
||||||
|
// Outline
|
||||||
|
$outlinePrimary = [
|
||||||
|
'border-primary text-primary', // Default
|
||||||
|
'dark:border-primary', // Dark mode
|
||||||
|
];
|
||||||
|
$outlineSecondary = [
|
||||||
|
'border-secondary text-slate-500', // Default
|
||||||
|
'dark:border-darkmode-100/40 dark:text-slate-300', // Dark mode
|
||||||
|
];
|
||||||
|
$outlineSuccess = [
|
||||||
|
'border-success text-success dark:border-success', // Default
|
||||||
|
'dark:border-success', // Dark mode
|
||||||
|
];
|
||||||
|
$outlineWarning = [
|
||||||
|
'border-warning text-warning', // Default
|
||||||
|
'dark:border-warning', // Dark mode
|
||||||
|
];
|
||||||
|
$outlinePending = [
|
||||||
|
'border-pending text-pending', // Default
|
||||||
|
'dark:border-pending', // Dark mode
|
||||||
|
];
|
||||||
|
$outlineDanger = [
|
||||||
|
'border-danger text-danger', // Default
|
||||||
|
'dark:border-danger', // Dark mode
|
||||||
|
];
|
||||||
|
$outlineDark = [
|
||||||
|
'border-dark text-dark', // Default
|
||||||
|
'dark:border-darkmode-800 dark:text-slate-300', // Dark mode
|
||||||
|
];
|
||||||
|
|
||||||
|
// Soft Color
|
||||||
|
$softPrimary = [
|
||||||
|
'bg-primary border-primary bg-opacity-20 border-opacity-5 text-primary', // Default
|
||||||
|
'dark:border-opacity-100 dark:bg-opacity-20 dark:border-primary', // Dark mode
|
||||||
|
];
|
||||||
|
$softSecondary = [
|
||||||
|
'bg-slate-300 border-secondary bg-opacity-10 text-slate-500', // Default
|
||||||
|
'dark:bg-darkmode-100/20 dark:border-darkmode-100/30 dark:text-slate-300', // Dark mode
|
||||||
|
];
|
||||||
|
$softSuccess = [
|
||||||
|
'bg-success border-success bg-opacity-20 border-opacity-5 text-success', // Default
|
||||||
|
'dark:border-success dark:border-opacity-20', // Dark mode
|
||||||
|
];
|
||||||
|
$softWarning = [
|
||||||
|
'bg-warning border-warning bg-opacity-20 border-opacity-5 text-warning', // Default
|
||||||
|
'dark:border-warning dark:border-opacity-20', // Dark mode
|
||||||
|
];
|
||||||
|
$softPending = [
|
||||||
|
'bg-pending border-pending bg-opacity-20 border-opacity-5 text-pending', // Default
|
||||||
|
'dark:border-pending dark:border-opacity-20', // Dark mode
|
||||||
|
];
|
||||||
|
$softDanger = [
|
||||||
|
'bg-danger border-danger bg-opacity-20 border-opacity-5 text-danger', // Default
|
||||||
|
'dark:border-danger dark:border-opacity-20', // Dark mode
|
||||||
|
];
|
||||||
|
$softDark = [
|
||||||
|
'bg-dark border-dark bg-opacity-20 border-opacity-5 text-dark', // Default
|
||||||
|
'dark:bg-darkmode-800/30 dark:border-darkmode-800/60 dark:text-slate-300', // Dark mode
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
role="alert"
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
'alert relative border rounded-md px-5 py-4',
|
||||||
|
$variant == 'primary' ? $primary : null,
|
||||||
|
$variant == 'secondary' ? $secondary : null,
|
||||||
|
$variant == 'success' ? $success : null,
|
||||||
|
$variant == 'warning' ? $warning : null,
|
||||||
|
$variant == 'pending' ? $pending : null,
|
||||||
|
$variant == 'danger' ? $danger : null,
|
||||||
|
$variant == 'dark' ? $dark : null,
|
||||||
|
$variant == 'outline-primary' ? $outlinePrimary : null,
|
||||||
|
$variant == 'outline-secondary' ? $outlineSecondary : null,
|
||||||
|
$variant == 'outline-success' ? $outlineSuccess : null,
|
||||||
|
$variant == 'outline-warning' ? $outlineWarning : null,
|
||||||
|
$variant == 'outline-pending' ? $outlinePending : null,
|
||||||
|
$variant == 'outline-danger' ? $outlineDanger : null,
|
||||||
|
$variant == 'outline-dark' ? $outlineDark : null,
|
||||||
|
$variant == 'soft-primary' ? $softPrimary : null,
|
||||||
|
$variant == 'soft-secondary' ? $softSecondary : null,
|
||||||
|
$variant == 'soft-success' ? $softSuccess : null,
|
||||||
|
$variant == 'soft-warning' ? $softWarning : null,
|
||||||
|
$variant == 'soft-pending' ? $softPending : null,
|
||||||
|
$variant == 'soft-danger' ? $softDanger : null,
|
||||||
|
$variant == 'soft-dark' ? $softDark : null,
|
||||||
|
$dismissible ? 'pl-5 pr-16' : null,
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<div class="editor">
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/ckeditor/balloon-block/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/balloon-block-editor/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
|
@ -0,0 +1,15 @@
|
||||||
|
<div class="editor">
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/ckeditor/balloon/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/balloon-editor/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
13
resources/views/components/base/breadcrumb/index.blade.php
Normal file
13
resources/views/components/base/breadcrumb/index.blade.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
@props(['light' => null])
|
||||||
|
|
||||||
|
<nav
|
||||||
|
aria-label="breadcrumb"
|
||||||
|
{{ $attributes->class(merge(['flex']))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
<ol @class([
|
||||||
|
'flex items-center text-primary dark:text-slate-300',
|
||||||
|
'text-white/90' => $light,
|
||||||
|
])>
|
||||||
|
{{ $slot }}
|
||||||
|
</ol>
|
||||||
|
</nav>
|
23
resources/views/components/base/breadcrumb/link.blade.php
Normal file
23
resources/views/components/base/breadcrumb/link.blade.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
@props(['active' => null, 'index' => 0])
|
||||||
|
@aware(['light' => null])
|
||||||
|
|
||||||
|
<li
|
||||||
|
{{ $attributes->whereStartsWith('class')->class(
|
||||||
|
merge([
|
||||||
|
$index > 0 ? 'relative ml-5 pl-0.5' : null,
|
||||||
|
|
||||||
|
!$light && $index > 0
|
||||||
|
? "before:content-[''] before:w-[14px] before:h-[14px] before:bg-bredcrumb-chevron-dark before:bg-[length:100%] before:-ml-[1.125rem] before:absolute before:my-auto before:inset-y-0"
|
||||||
|
: null,
|
||||||
|
|
||||||
|
$light && $index > 0
|
||||||
|
? "before:content-[''] before:w-[14px] before:h-[14px] before:bg-bredcrumb-chevron-light before:bg-[length:100%] before:-ml-[1.125rem] before:absolute before:my-auto before:inset-y-0"
|
||||||
|
: null,
|
||||||
|
$index > 0 ? 'dark:before:bg-bredcrumb-chevron-darkmode' : null,
|
||||||
|
|
||||||
|
!$light && $active ? 'text-slate-800 cursor-text dark:text-slate-400' : null,
|
||||||
|
$light && $active ? 'text-white/70' : null,
|
||||||
|
]),
|
||||||
|
) }}>
|
||||||
|
<a {{ $attributes->merge(['href' => ''])->whereDoesntStartWith('class') }}>{{ $slot }}</a>
|
||||||
|
</li>
|
174
resources/views/components/base/button/index.blade.php
Normal file
174
resources/views/components/base/button/index.blade.php
Normal file
|
@ -0,0 +1,174 @@
|
||||||
|
@props(['as' => 'button', 'variant' => null, 'elevated' => null, 'size' => null, 'rounded' => null])
|
||||||
|
|
||||||
|
@php
|
||||||
|
// General Styles
|
||||||
|
$generalStyles = [
|
||||||
|
'transition duration-200 border shadow-sm inline-flex items-center justify-center py-2 px-3 rounded-md font-medium cursor-pointer', // Default
|
||||||
|
'focus:ring-4 focus:ring-primary focus:ring-opacity-20', // On focus
|
||||||
|
'focus-visible:outline-none', // On focus visible
|
||||||
|
'dark:focus:ring-slate-700 dark:focus:ring-opacity-50', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-opacity-90 [&:hover:not(:disabled)]:border-opacity-90', // On hover and not disabled
|
||||||
|
'[&:not(button)]:text-center', // Not a button element
|
||||||
|
'disabled:opacity-70 disabled:cursor-not-allowed', // Disabled
|
||||||
|
];
|
||||||
|
|
||||||
|
// Sizes
|
||||||
|
$small = ['text-xs py-1.5 px-2'];
|
||||||
|
$large = ['text-lg py-1.5 px-4'];
|
||||||
|
|
||||||
|
// Main Colors
|
||||||
|
$primary = [
|
||||||
|
'bg-primary border-primary text-white dark:border-primary', // Default
|
||||||
|
];
|
||||||
|
$secondary = [
|
||||||
|
'bg-secondary/70 border-secondary/70 text-slate-500', // Default
|
||||||
|
'dark:border-darkmode-400 dark:bg-darkmode-400 dark:text-slate-300', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-slate-100 [&:hover:not(:disabled)]:border-slate-100', // On hover and not disabled
|
||||||
|
'[&:hover:not(:disabled)]:dark:border-darkmode-300/80 [&:hover:not(:disabled)]:dark:bg-darkmode-300/80', // On hover and not disabled in dark mode
|
||||||
|
];
|
||||||
|
$success = [
|
||||||
|
'bg-success border-success text-slate-900', // Default
|
||||||
|
'dark:border-success', // Dark mode
|
||||||
|
];
|
||||||
|
$warning = [
|
||||||
|
'bg-warning border-warning text-slate-900', // Default
|
||||||
|
'dark:border-warning', // Dark mode
|
||||||
|
];
|
||||||
|
$pending = [
|
||||||
|
'bg-pending border-pending text-white', // Default
|
||||||
|
'dark:border-pending', // Dark mode
|
||||||
|
];
|
||||||
|
$danger = [
|
||||||
|
'bg-danger border-danger text-white', // Default
|
||||||
|
'dark:border-danger', // Dark mode
|
||||||
|
];
|
||||||
|
$dark = [
|
||||||
|
'bg-dark border-dark text-white', // Default
|
||||||
|
'dark:bg-darkmode-800 dark:border-transparent dark:text-slate-300', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:dark:dark:bg-darkmode-800/70', // On hover and not disabled in dark mode
|
||||||
|
];
|
||||||
|
|
||||||
|
// Social Media
|
||||||
|
$facebook = ['bg-[#3b5998] border-[#3b5998] text-white dark:border-[#3b5998]'];
|
||||||
|
$twitter = ['bg-[#4ab3f4] border-[#4ab3f4] text-white dark:border-[#4ab3f4]'];
|
||||||
|
$instagram = ['bg-[#517fa4] border-[#517fa4] text-white dark:border-[#517fa4]'];
|
||||||
|
$linkedin = ['bg-[#0077b5] border-[#0077b5] text-white dark:border-[#0077b5]'];
|
||||||
|
|
||||||
|
// Outline
|
||||||
|
$outlinePrimary = [
|
||||||
|
'border-primary text-primary', // Default
|
||||||
|
'dark:border-primary', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-primary/10', // On hover and not disabled
|
||||||
|
];
|
||||||
|
$outlineSecondary = [
|
||||||
|
'border-secondary text-slate-500', // Default
|
||||||
|
'dark:border-darkmode-100/40 dark:text-slate-300', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-secondary/20', // On hover and not disabled
|
||||||
|
'[&:hover:not(:disabled)]:dark:bg-darkmode-100/10', // On hover and not disabled in dark mode
|
||||||
|
];
|
||||||
|
$outlineSuccess = [
|
||||||
|
'border-success text-success', // Default
|
||||||
|
'dark:border-success', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-success/10', // On hover and not disabled
|
||||||
|
];
|
||||||
|
$outlineWarning = [
|
||||||
|
'border-warning text-warning', // Default
|
||||||
|
'dark:border-warning', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-warning/10', // On hover and not disabled
|
||||||
|
];
|
||||||
|
$outlinePending = [
|
||||||
|
'border-pending text-pending', // Default
|
||||||
|
'dark:border-pending', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-pending/10', // On hover and not disabled
|
||||||
|
];
|
||||||
|
$outlineDanger = [
|
||||||
|
'border-danger text-danger', // Default
|
||||||
|
'dark:border-danger', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-danger/10', // On hover and not disabled
|
||||||
|
];
|
||||||
|
$outlineDark = [
|
||||||
|
'border-dark text-dark', // Default
|
||||||
|
'dark:border-darkmode-800 dark:text-slate-300', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-darkmode-800/30', // On hover and not disabled
|
||||||
|
'[&:hover:not(:disabled)]:dark:bg-opacity-30', // On hover and not disabled in dark mode
|
||||||
|
];
|
||||||
|
|
||||||
|
// Soft Color
|
||||||
|
$softPrimary = [
|
||||||
|
'bg-primary border-primary bg-opacity-20 border-opacity-5 text-primary', // Default
|
||||||
|
'dark:border-opacity-100 dark:bg-opacity-20 dark:border-primary', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-opacity-10 [&:hover:not(:disabled)]:border-opacity-10', // On hover and not disabled
|
||||||
|
'[&:hover:not(:disabled)]:dark:border-opacity-60', // On hover and not disabled in dark mode
|
||||||
|
];
|
||||||
|
$softSecondary = [
|
||||||
|
'bg-slate-300 border-secondary bg-opacity-20 text-slate-500', // Default
|
||||||
|
'dark:bg-darkmode-100/20 dark:border-darkmode-100/30 dark:text-slate-300', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-opacity-10', // On hover and not disabled
|
||||||
|
'[&:hover:not(:disabled)]:dark:bg-darkmode-100/10 [&:hover:not(:disabled)]:dark:border-darkmode-100/20', // On hover and not disabled in dark mode
|
||||||
|
];
|
||||||
|
$softSuccess = [
|
||||||
|
'bg-success border-success bg-opacity-20 border-opacity-5 text-success', // Default
|
||||||
|
'dark:border-success dark:border-opacity-20', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-opacity-10 [&:hover:not(:disabled)]:border-opacity-10', // On hover and not disabled
|
||||||
|
];
|
||||||
|
$softWarning = [
|
||||||
|
'bg-warning border-warning bg-opacity-20 border-opacity-5 text-warning', // Default
|
||||||
|
'dark:border-warning dark:border-opacity-20', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-opacity-10 [&:hover:not(:disabled)]:border-opacity-10', // On hover and not disabled
|
||||||
|
];
|
||||||
|
$softPending = [
|
||||||
|
'bg-pending border-pending bg-opacity-20 border-opacity-5 text-pending', // Default
|
||||||
|
'dark:border-pending dark:border-opacity-20', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-opacity-10 [&:hover:not(:disabled)]:border-opacity-10', // On hover and not disabled
|
||||||
|
];
|
||||||
|
$softDanger = [
|
||||||
|
'bg-danger border-danger bg-opacity-20 border-opacity-5 text-danger', // Default
|
||||||
|
'dark:border-danger dark:border-opacity-20', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-opacity-10 [&:hover:not(:disabled)]:border-opacity-10', // On hover and not disabled
|
||||||
|
];
|
||||||
|
$softDark = [
|
||||||
|
'bg-dark border-dark bg-opacity-20 border-opacity-5 text-dark', // Default
|
||||||
|
'dark:bg-darkmode-800/30 dark:border-darkmode-800/60 dark:text-slate-300', // Dark mode
|
||||||
|
'[&:hover:not(:disabled)]:bg-opacity-10 [&:hover:not(:disabled)]:border-opacity-10', // On hover and not disabled
|
||||||
|
'[&:hover:not(:disabled)]:dark:bg-darkmode-800/50 [&:hover:not(:disabled)]:dark:border-darkmode-800', // On hover and not disabled in dark mode
|
||||||
|
];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
$generalStyles,
|
||||||
|
$size == 'sm' ? $small : null,
|
||||||
|
$size == 'lg' ? $large : null,
|
||||||
|
$variant == 'primary' ? $primary : null,
|
||||||
|
$variant == 'secondary' ? $secondary : null,
|
||||||
|
$variant == 'success' ? $success : null,
|
||||||
|
$variant == 'warning' ? $warning : null,
|
||||||
|
$variant == 'pending' ? $pending : null,
|
||||||
|
$variant == 'danger' ? $danger : null,
|
||||||
|
$variant == 'dark' ? $dark : null,
|
||||||
|
$variant == 'outline-primary' ? $outlinePrimary : null,
|
||||||
|
$variant == 'outline-secondary' ? $outlineSecondary : null,
|
||||||
|
$variant == 'outline-success' ? $outlineSuccess : null,
|
||||||
|
$variant == 'outline-warning' ? $outlineWarning : null,
|
||||||
|
$variant == 'outline-pending' ? $outlinePending : null,
|
||||||
|
$variant == 'outline-danger' ? $outlineDanger : null,
|
||||||
|
$variant == 'outline-dark' ? $outlineDark : null,
|
||||||
|
$variant == 'soft-primary' ? $softPrimary : null,
|
||||||
|
$variant == 'soft-secondary' ? $softSecondary : null,
|
||||||
|
$variant == 'soft-success' ? $softSuccess : null,
|
||||||
|
$variant == 'soft-warning' ? $softWarning : null,
|
||||||
|
$variant == 'soft-pending' ? $softPending : null,
|
||||||
|
$variant == 'soft-danger' ? $softDanger : null,
|
||||||
|
$variant == 'soft-dark' ? $softDark : null,
|
||||||
|
$variant == 'facebook' ? $facebook : null,
|
||||||
|
$variant == 'twitter' ? $twitter : null,
|
||||||
|
$variant == 'instagram' ? $instagram : null,
|
||||||
|
$variant == 'linkedin' ? $linkedin : null,
|
||||||
|
$rounded ? 'rounded-full' : null,
|
||||||
|
$elevated ? 'shadow-md' : null,
|
||||||
|
$attributes->whereStartsWith('class')->first(),
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(['full-calendar-draggable'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/calendar/index.js')
|
||||||
|
@vite('resources/js/vendor/calendar/plugins/interaction.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/calendar/draggable/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
9
resources/views/components/base/chart/index.blade.php
Normal file
9
resources/views/components/base/chart/index.blade.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<canvas
|
||||||
|
{{ $attributes->class(merge(['chart', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
></canvas>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/chartjs/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
|
@ -0,0 +1,15 @@
|
||||||
|
<div class="editor">
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/ckeditor/classic/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/classic-editor/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
|
@ -0,0 +1,5 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
{{ $attributes->class(['p-5'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
5
resources/views/components/base/dialog/footer.blade.php
Normal file
5
resources/views/components/base/dialog/footer.blade.php
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
{{ $attributes->class(['px-5 py-3 text-right border-t border-slate-200/60 dark:border-darkmode-400'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
18
resources/views/components/base/dialog/index.blade.php
Normal file
18
resources/views/components/base/dialog/index.blade.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
@props(['as' => 'div', 'staticBackdrop' => false])
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/modal/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-backdrop="{{ $staticBackdrop ? 'static' : null }}"
|
||||||
|
aria-hidden="true"
|
||||||
|
tabindex="-1"
|
||||||
|
{{ $attributes->class([
|
||||||
|
'modal group bg-black/60 transition-[visibility,opacity] w-screen h-screen fixed left-0 top-0',
|
||||||
|
'[&:not(.show)]:duration-[0s,0.2s] [&:not(.show)]:delay-[0.2s,0s] [&:not(.show)]:invisible [&:not(.show)]:opacity-0',
|
||||||
|
'[&.show]:visible [&.show]:opacity-100 [&.show]:duration-[0s,0.4s]',
|
||||||
|
])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
12
resources/views/components/base/dialog/panel.blade.php
Normal file
12
resources/views/components/base/dialog/panel.blade.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
@aware(['size' => 'md'])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
{{ $attributes->class([
|
||||||
|
'w-[90%] mx-auto bg-white relative rounded-md shadow-md transition-[margin-top,transform] duration-[0.4s,0.3s] -mt-16 group-[.show]:mt-16 group-[.modal-static]:scale-[1.05] dark:bg-darkmode-600',
|
||||||
|
$size == 'md' ? 'sm:w-[460px]' : null,
|
||||||
|
$size == 'sm' ? 'sm:w-[300px]' : null,
|
||||||
|
$size == 'lg' ? 'sm:w-[600px]' : null,
|
||||||
|
$size == 'xl' ? 'sm:w-[600px] lg:w-[900px]' : null,
|
||||||
|
])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
5
resources/views/components/base/dialog/title.blade.php
Normal file
5
resources/views/components/base/dialog/title.blade.php
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
{{ $attributes->class(['flex items-center px-5 py-3 border-b border-slate-200/60 dark:border-darkmode-400'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
24
resources/views/components/base/disclosure/button.blade.php
Normal file
24
resources/views/components/base/disclosure/button.blade.php
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
@props(['as' => 'div', 'variant' => null])
|
||||||
|
@aware(['selectedIndex' => null, 'index' => null, 'id' => null])
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="accordion-header"
|
||||||
|
id="{{ $id }}"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
data-tw-merge
|
||||||
|
data-tw-toggle="collapse"
|
||||||
|
data-tw-target="#{{ $id }}-collapse"
|
||||||
|
type="button"
|
||||||
|
aria-expanded="true"
|
||||||
|
aria-controls="{{ $id }}-collapse"
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
'accordion-button outline-none py-4 -my-4 font-medium w-full text-left dark:text-slate-400',
|
||||||
|
'[&:not(.collapsed)]:text-primary [&:not(.collapsed)]:dark:text-slate-300',
|
||||||
|
$selectedIndex != $index ? 'collapsed' : null,
|
||||||
|
$attributes->whereStartsWith('class')->first(),
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</button>
|
||||||
|
</div>
|
|
@ -0,0 +1,6 @@
|
||||||
|
@props(['as' => 'div', 'selectedIndex' => null, 'variant' => null])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(merge(['accordion', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
23
resources/views/components/base/disclosure/index.blade.php
Normal file
23
resources/views/components/base/disclosure/index.blade.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
@props(['index' => null, 'id' => null])
|
||||||
|
@aware(['variant' => null])
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/accordion/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
'accordion-item py-4 first:-mt-4 last:-mb-4',
|
||||||
|
'[&:not(:last-child)]:border-b [&:not(:last-child)]:border-slate-200/60 [&:not(:last-child)]:dark:border-darkmode-400',
|
||||||
|
$variant == 'boxed'
|
||||||
|
? 'p-4 first:mt-0 last:mb-0 border border-slate-200/60 mt-3 dark:border-darkmode-400'
|
||||||
|
: null,
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
22
resources/views/components/base/disclosure/panel.blade.php
Normal file
22
resources/views/components/base/disclosure/panel.blade.php
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
@aware(['selectedIndex' => null, 'index' => null])
|
||||||
|
@aware(['id' => null])
|
||||||
|
|
||||||
|
<div
|
||||||
|
id="{{ $id }}-collapse"
|
||||||
|
aria-labelledby="{{ $id }}"
|
||||||
|
@class([
|
||||||
|
'accordion-collapse collapse mt-3 text-slate-700 leading-relaxed dark:text-slate-400',
|
||||||
|
'[&.collapse:not(.show)]:hidden [&.collapse.show]:visible',
|
||||||
|
'show' => $selectedIndex == $index,
|
||||||
|
])
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(merge(['accordion-body', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
|
||||||
|
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
|
||||||
|
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
|
||||||
|
remaining essentially unchanged.
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<div class="editor document-editor">
|
||||||
|
<div class="document-editor__toolbar"></div>
|
||||||
|
<div class="document-editor__editable-container">
|
||||||
|
<div class="document-editor__editable">
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/ckeditor/document/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/document-editor/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
31
resources/views/components/base/dropzone/index.blade.php
Normal file
31
resources/views/components/base/dropzone/index.blade.php
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
@props(['multiple' => null])
|
||||||
|
|
||||||
|
<form
|
||||||
|
{{ $attributes->class(merge(['[&.dropzone]:border-2 [&.dropzone]:border-dashed dropzone [&.dropzone]:border-darkmode-200/60 [&.dropzone]:dark:bg-darkmode-600 [&.dropzone]:dark:border-white/5', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
<div class="fallback">
|
||||||
|
<input
|
||||||
|
name="file"
|
||||||
|
type="file"
|
||||||
|
{{ $multiple ? 'multiple' : '' }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="dz-message"
|
||||||
|
data-dz-message
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/dropzone/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/dropzone/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
40
resources/views/components/base/file-icon/index.blade.php
Normal file
40
resources/views/components/base/file-icon/index.blade.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
@props(['variant' => null, 'type' => null, 'src' => null])
|
||||||
|
|
||||||
|
@php
|
||||||
|
if (!function_exists('getSVG')) {
|
||||||
|
function getSVG($variant)
|
||||||
|
{
|
||||||
|
if ($variant == 'empty-directory') {
|
||||||
|
return "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='786' height='786' viewBox='0 0 786 786'%3E%3Cdefs%3E%3ClinearGradient id='linear-gradient' x1='0.5' x2='0.5' y2='1' gradientUnits='objectBoundingBox'%3E%3Cstop offset='0' stop-color='%238a97ac'/%3E%3Cstop offset='1' stop-color='%235d6c83'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg id='Group_2' data-name='Group 2' transform='translate(-567 -93)'%3E%3Crect id='Rectangle_4' data-name='Rectangle 4' width='418' height='681' rx='40' transform='translate(896 109)' fill='%2395a5b9'/%3E%3Crect id='Rectangle_3' data-name='Rectangle 3' width='433' height='681' rx='40' transform='translate(606 93)' fill='%23a0aec0'/%3E%3Crect id='Rectangle_2' data-name='Rectangle 2' width='786' height='721' rx='40' transform='translate(567 158)' fill='url(%23linear-gradient)'/%3E%3C/g%3E%3C/svg%3E%0A\")";
|
||||||
|
} elseif ($variant == 'directory') {
|
||||||
|
return "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='786' height='786' viewBox='0 0 786 786'%3E%3Cdefs%3E%3ClinearGradient id='linear-gradient' x1='0.5' x2='0.5' y2='1' gradientUnits='objectBoundingBox'%3E%3Cstop offset='0' stop-color='%238a97ac'/%3E%3Cstop offset='1' stop-color='%235d6c83'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg id='Group_3' data-name='Group 3' transform='translate(-567 -93)'%3E%3Crect id='Rectangle_4' data-name='Rectangle 4' width='418' height='681' rx='40' transform='translate(896 109)' fill='%2395a5b9'/%3E%3Crect id='Rectangle_3' data-name='Rectangle 3' width='433' height='681' rx='40' transform='translate(606 93)' fill='%23a0aec0'/%3E%3Crect id='Rectangle_2' data-name='Rectangle 2' width='742' height='734' rx='40' transform='translate(590 145)' fill='%23bec8d9'/%3E%3Crect id='Rectangle_5' data-name='Rectangle 5' width='786' height='692' rx='40' transform='translate(567 187)' fill='url(%23linear-gradient)'/%3E%3C/g%3E%3C/svg%3E%0A\")";
|
||||||
|
} elseif ($variant == 'file') {
|
||||||
|
return "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='628.027' height='786.012' viewBox='0 0 628.027 786.012'%3E%3Cdefs%3E%3ClinearGradient id='linear-gradient' x1='0.5' x2='0.5' y2='1' gradientUnits='objectBoundingBox'%3E%3Cstop offset='0' stop-color='%238a97ac'/%3E%3Cstop offset='1' stop-color='%235d6c83'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg id='Group_5' data-name='Group 5' transform='translate(-646 -92.988)'%3E%3Cpath id='Union_2' data-name='Union 2' d='M40,786A40,40,0,0,1,0,746V40A40,40,0,0,1,40,0H501V103h29v24h98V746a40,40,0,0,1-40,40Z' transform='translate(646 93)' fill='url(%23linear-gradient)'/%3E%3Cpath id='Intersection_2' data-name='Intersection 2' d='M.409,162.042l.058-109.9c31.605,29.739,125.37,125.377,125.37,125.377l-109.976.049A20.025,20.025,0,0,1,.409,162.042Z' transform='translate(1147 42)' fill='%23bec8d9' stroke='%23bec8d9' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E%0A\")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div {{ $attributes->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
<div
|
||||||
|
style="background-image: {{ getSVG($variant) }}"
|
||||||
|
@class([
|
||||||
|
'relative block bg-center bg-no-repeat bg-contain',
|
||||||
|
'before:content-[\'\'] before:pt-[100%] before:w-full before:block',
|
||||||
|
])
|
||||||
|
>
|
||||||
|
@if ($variant == 'file')
|
||||||
|
<div class="absolute top-0 bottom-0 left-0 right-0 m-auto flex items-center justify-center text-white">
|
||||||
|
{{ $type }}
|
||||||
|
</div>
|
||||||
|
@elseif ($variant == 'image')
|
||||||
|
<div class="image-fit absolute top-0 left-0 h-full w-full">
|
||||||
|
<img
|
||||||
|
class="rounded-md"
|
||||||
|
src="{{ $src }}"
|
||||||
|
alt="Midone Tailwind HTML Admin Template"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(merge(['flex items-center', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</div>
|
33
resources/views/components/base/form-check/input.blade.php
Normal file
33
resources/views/components/base/form-check/input.blade.php
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
@props(['type' => null, 'checked' => 0])
|
||||||
|
|
||||||
|
<input
|
||||||
|
data-tw-merge
|
||||||
|
{{ $checked ? 'checked' : '' }}
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
// Default
|
||||||
|
'transition-all duration-100 ease-in-out',
|
||||||
|
|
||||||
|
// Input type radio
|
||||||
|
$type == 'radio'
|
||||||
|
? 'shadow-sm border-slate-200 cursor-pointer focus:ring-4 focus:ring-offset-0 focus:ring-primary focus:ring-opacity-20 dark:bg-darkmode-800 dark:border-transparent dark:focus:ring-slate-700 dark:focus:ring-opacity-50'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
// Input type checkbox
|
||||||
|
$type == 'checkbox'
|
||||||
|
? 'shadow-sm border-slate-200 cursor-pointer rounded focus:ring-4 focus:ring-offset-0 focus:ring-primary focus:ring-opacity-20 dark:bg-darkmode-800 dark:border-transparent dark:focus:ring-slate-700 dark:focus:ring-opacity-50'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
// On checked
|
||||||
|
"[&[type='radio']]:checked:bg-primary [&[type='radio']]:checked:border-primary [&[type='radio']]:checked:border-opacity-10",
|
||||||
|
"[&[type='checkbox']]:checked:bg-primary [&[type='checkbox']]:checked:border-primary [&[type='checkbox']]:checked:border-opacity-10",
|
||||||
|
|
||||||
|
// On checked and not disabled
|
||||||
|
'[&:disabled:not(:checked)]:bg-slate-100 [&:disabled:not(:checked)]:cursor-not-allowed [&:disabled:not(:checked)]:dark:bg-darkmode-800/50',
|
||||||
|
|
||||||
|
// On checked and disabled
|
||||||
|
'[&:disabled:checked]:opacity-70 [&:disabled:checked]:cursor-not-allowed [&:disabled:checked]:dark:bg-darkmode-800/50',
|
||||||
|
$attributes->whereStartsWith('class')->first(),
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes())->merge(['type' => $type]) }}
|
||||||
|
/>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<label
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(merge(['cursor-pointer ml-2', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</label>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(['text-xs text-slate-500 mt-2'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(['block sm:flex items-center'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
21
resources/views/components/base/form-input/index.blade.php
Normal file
21
resources/views/components/base/form-input/index.blade.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
@props(['formInputSize' => null, 'rounded' => null])
|
||||||
|
@aware(['formInline' => null, 'inputGroup' => null])
|
||||||
|
|
||||||
|
<input
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
'disabled:bg-slate-100 disabled:cursor-not-allowed dark:disabled:bg-darkmode-800/50 dark:disabled:border-transparent',
|
||||||
|
'[&[readonly]]:bg-slate-100 [&[readonly]]:cursor-not-allowed [&[readonly]]:dark:bg-darkmode-800/50 [&[readonly]]:dark:border-transparent',
|
||||||
|
'transition duration-200 ease-in-out w-full text-sm border-slate-200 shadow-sm rounded-md placeholder:text-slate-400/90 focus:ring-4 focus:ring-primary focus:ring-opacity-20 focus:border-primary focus:border-opacity-40 dark:bg-darkmode-800 dark:border-transparent dark:focus:ring-slate-700 dark:focus:ring-opacity-50 dark:placeholder:text-slate-500/80',
|
||||||
|
$formInputSize == 'sm' ? 'text-xs py-1.5 px-2' : null,
|
||||||
|
$formInputSize == 'lg' ? 'text-lg py-1.5 px-4' : null,
|
||||||
|
$rounded ? 'rounded-full' : null,
|
||||||
|
$formInline ? 'flex-1' : null,
|
||||||
|
$inputGroup
|
||||||
|
? 'rounded-none [&:not(:first-child)]:border-l-transparent first:rounded-l last:rounded-r z-10'
|
||||||
|
: null,
|
||||||
|
$attributes->whereStartsWith('class')->first(),
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
/>
|
|
@ -0,0 +1,8 @@
|
||||||
|
@aware(['formInline' => null, 'class' => null])
|
||||||
|
|
||||||
|
<label
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(['inline-block mb-2', $formInline ? 'mb-2 sm:mb-0 sm:mr-5 sm:text-right' : null])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</label>
|
19
resources/views/components/base/form-select/index.blade.php
Normal file
19
resources/views/components/base/form-select/index.blade.php
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
@props(['formSelectSize' => null])
|
||||||
|
@aware(['formInline' => null])
|
||||||
|
|
||||||
|
<select
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
'disabled:bg-slate-100 disabled:cursor-not-allowed disabled:dark:bg-darkmode-800/50',
|
||||||
|
'[&[readonly]]:bg-slate-100 [&[readonly]]:cursor-not-allowed [&[readonly]]:dark:bg-darkmode-800/50',
|
||||||
|
'transition duration-200 ease-in-out w-full text-sm border-slate-200 shadow-sm rounded-md py-2 px-3 pr-8 focus:ring-4 focus:ring-primary focus:ring-opacity-20 focus:border-primary focus:border-opacity-40 dark:bg-darkmode-800 dark:border-transparent dark:focus:ring-slate-700 dark:focus:ring-opacity-50',
|
||||||
|
$formSelectSize == 'sm' ? 'text-xs py-1.5 pl-2 pr-8' : null,
|
||||||
|
$formSelectSize == 'lg' ? 'text-lg py-1.5 pl-4 pr-8' : null,
|
||||||
|
$formInline ? 'flex-1' : null,
|
||||||
|
$attributes->whereStartsWith('class')->first(),
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</select>
|
|
@ -0,0 +1,2 @@
|
||||||
|
<x-base.form-check {{ $attributes->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}</x-base.form-check>
|
18
resources/views/components/base/form-switch/input.blade.php
Normal file
18
resources/views/components/base/form-switch/input.blade.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<x-base.form-check.input
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
// Default
|
||||||
|
'w-[38px] h-[24px] p-px rounded-full relative',
|
||||||
|
'before:w-[20px] before:h-[20px] before:shadow-[1px_1px_3px_rgba(0,0,0,0.25)] before:transition-[margin-left] before:duration-200 before:ease-in-out before:absolute before:inset-y-0 before:my-auto before:rounded-full before:dark:bg-darkmode-600',
|
||||||
|
|
||||||
|
// On checked
|
||||||
|
'checked:bg-primary checked:border-primary checked:bg-none',
|
||||||
|
'before:checked:ml-[14px] before:checked:bg-white',
|
||||||
|
|
||||||
|
$attributes->whereStartsWith('class')->first(),
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</x-base.form-check.input>
|
|
@ -0,0 +1,2 @@
|
||||||
|
<x-base.form-check.label {{ $attributes->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}</x-base.form-check.label>
|
|
@ -0,0 +1,21 @@
|
||||||
|
@props(['formTextareaSize' => null, 'rounded' => null])
|
||||||
|
@aware(['formInline' => null, 'inputGroup' => null])
|
||||||
|
|
||||||
|
<textarea
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
'disabled:bg-slate-100 disabled:cursor-not-allowed dark:disabled:bg-darkmode-800/50 dark:disabled:border-transparent',
|
||||||
|
'[&[readonly]]:bg-slate-100 [&[readonly]]:cursor-not-allowed [&[readonly]]:dark:bg-darkmode-800/50 [&[readonly]]:dark:border-transparent',
|
||||||
|
'transition duration-200 ease-in-out w-full text-sm border-slate-200 shadow-sm rounded-md placeholder:text-slate-400/90 focus:ring-4 focus:ring-primary focus:ring-opacity-20 focus:border-primary focus:border-opacity-40 dark:bg-darkmode-800 dark:border-transparent dark:focus:ring-slate-700 dark:focus:ring-opacity-50 dark:placeholder:text-slate-500/80',
|
||||||
|
$formTextareaSize == 'sm' ? 'text-xs py-1.5 px-2' : null,
|
||||||
|
$formTextareaSize == 'lg' ? 'text-lg py-1.5 px-4' : null,
|
||||||
|
$rounded ? 'rounded-full' : null,
|
||||||
|
$formInline ? 'flex-1' : null,
|
||||||
|
$inputGroup
|
||||||
|
? 'rounded-none [&:not(:first-child)]:border-l-transparent first:rounded-l last:rounded-r z-10'
|
||||||
|
: null,
|
||||||
|
$attributes->whereStartsWith('class')->first(),
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
></textarea>
|
38
resources/views/components/base/highlight/index.blade.php
Normal file
38
resources/views/components/base/highlight/index.blade.php
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
@props(['type' => 'html'])
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/highlight/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
<div class="highlight">
|
||||||
|
<x-base.button
|
||||||
|
variant="outline-secondary"
|
||||||
|
{{ $attributes->class(merge(['py-1 px-2 copy-code', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
<x-base.lucide
|
||||||
|
class="copy-code mr-2 h-4 w-4"
|
||||||
|
icon="File"
|
||||||
|
/> Copy example code
|
||||||
|
</x-base.button>
|
||||||
|
<div class="relative mt-3 overflow-hidden rounded-md">
|
||||||
|
<pre class="relative grid">
|
||||||
|
<code @class([
|
||||||
|
'text-xs leading-relaxed [&.hljs]:bg-slate-50 [&.hljs]:px-5 [&.hljs]:py-4',
|
||||||
|
'[&.hljs]:dark:text-slate-200 [&.hljs]:dark:bg-darkmode-700 [&.hljs_.hljs-string]:dark:text-slate-200 [&.hljs_.hljs-tag]:dark:text-slate-200 [&.hljs_.hljs-name]:dark:text-emerald-500 [&.hljs_.hljs-attr]:dark:text-sky-500',
|
||||||
|
"before:content-['HTML'] before:font-roboto before:font-medium before:px-4 before:py-2 before:block before:absolute before:top-0 before:right-0 before:rounded-bl before:bg-slate-200 before:bg-opacity-70 before:dark:bg-darkmode-400",
|
||||||
|
"[&.javascript]:before:content-['JS']",
|
||||||
|
$type,
|
||||||
|
])>
|
||||||
|
{{ str_replace('>', 'HTMLCloseTag', str_replace('<', 'HTMLOpenTag', $slot)) }}
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/highlight/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
13
resources/views/components/base/image-zoom/index.blade.php
Normal file
13
resources/views/components/base/image-zoom/index.blade.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
@props(['src' => null])
|
||||||
|
|
||||||
|
<img
|
||||||
|
data-action="zoom"
|
||||||
|
src="{{ $src }}"
|
||||||
|
{{ $attributes->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
/>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/image-zoom/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
|
@ -0,0 +1,15 @@
|
||||||
|
<div class="editor">
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/ckeditor/inline/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/inline-editor/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
|
@ -0,0 +1,8 @@
|
||||||
|
@props(['inputGroup' => null])
|
||||||
|
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(['flex'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
11
resources/views/components/base/input-group/text.blade.php
Normal file
11
resources/views/components/base/input-group/text.blade.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
@aware(['inputGroup' => null])
|
||||||
|
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class([
|
||||||
|
'py-2 px-3 bg-slate-100 border shadow-sm border-slate-200 text-slate-600 dark:bg-darkmode-900/20 dark:border-darkmode-900/20 dark:text-slate-400',
|
||||||
|
$inputGroup ? 'rounded-none [&:not(:first-child)]:border-l-transparent first:rounded-l last:rounded-r' : null,
|
||||||
|
])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
|
@ -0,0 +1,26 @@
|
||||||
|
@props(['lat' => null, 'long' => null, 'sources' => null, 'apiKey' => null])
|
||||||
|
|
||||||
|
<div
|
||||||
|
data-lat="{{ $lat }}"
|
||||||
|
data-long="{{ $long }}"
|
||||||
|
data-sources="{{ $sources }}"
|
||||||
|
data-api-key="{{ $apiKey }}"
|
||||||
|
{{ $attributes->class([
|
||||||
|
'leaflet',
|
||||||
|
'[&_.leaflet-tile-pane]:saturate-[.3]' => !$darkMode,
|
||||||
|
'[&_.leaflet-tile-pane]:grayscale [&_.leaflet-tile-pane]:invert [&_.leaflet-tile-pane]:brightness-90 [&_.leaflet-tile-pane]:hue-rotate-15' => $darkMode,
|
||||||
|
])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/leaflet-map/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/leaflet-map-loader/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
16
resources/views/components/base/litepicker/index.blade.php
Normal file
16
resources/views/components/base/litepicker/index.blade.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<x-base.form-input
|
||||||
|
type="text"
|
||||||
|
{{ $attributes->class(merge(['datepicker', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
/>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/litepicker/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/litepicker/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
15281
resources/views/components/base/loading-icon/index.blade.php
Normal file
15281
resources/views/components/base/loading-icon/index.blade.php
Normal file
File diff suppressed because it is too large
Load diff
20
resources/views/components/base/lucide/index.blade.php
Normal file
20
resources/views/components/base/lucide/index.blade.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
@props(['icon' => null, 'width' => 24, 'height' => 24])
|
||||||
|
|
||||||
|
<i
|
||||||
|
data-lucide="{{ uncamelize($icon, '-') }}"
|
||||||
|
width="{{ $width }}"
|
||||||
|
height="{{ $height }}"
|
||||||
|
{{ $attributes->class(merge(['stroke-1.5', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
></i>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/lucide/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/lucide/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
17
resources/views/components/base/menu/button.blade.php
Normal file
17
resources/views/components/base/menu/button.blade.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
|
||||||
|
@if (substr($as, 0, 2) == 'x-')
|
||||||
|
<x-dynamic-component
|
||||||
|
data-tw-toggle="dropdown"
|
||||||
|
aria-expanded="false"
|
||||||
|
{{ $attributes->class(['cursor-pointer'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
:component="substr($as, 2)"
|
||||||
|
>{{ $slot }}</x-dynamic-component>
|
||||||
|
@else
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-toggle="dropdown"
|
||||||
|
aria-expanded="false"
|
||||||
|
{{ $attributes->whereDoesntStartWith('href')->class(['cursor-pointer'])->merge($attributes->whereDoesntStartWith(['class', 'href'])->getAttributes())->merge($as == 'a' ? ['href' => 'javascript:;'] : []) }}
|
||||||
|
>{{ $slot }}
|
||||||
|
</{{ $as }}>
|
||||||
|
@endif
|
3
resources/views/components/base/menu/divider.blade.php
Normal file
3
resources/views/components/base/menu/divider.blade.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div
|
||||||
|
{{ $attributes->class(['h-px my-2 -mx-2 bg-slate-200/60 dark:bg-darkmode-400'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
</div>
|
3
resources/views/components/base/menu/footer.blade.php
Normal file
3
resources/views/components/base/menu/footer.blade.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div {{ $attributes->class(['flex p-1'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
3
resources/views/components/base/menu/header.blade.php
Normal file
3
resources/views/components/base/menu/header.blade.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div {{ $attributes->class(['p-2 font-medium'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
13
resources/views/components/base/menu/index.blade.php
Normal file
13
resources/views/components/base/menu/index.blade.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
@props(['as' => 'div', 'placement' => 'bottom-end'])
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/dropdown/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-merge
|
||||||
|
data-tw-placement="{{ $placement }}"
|
||||||
|
{{ $attributes->class(['dropdown relative'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
12
resources/views/components/base/menu/item.blade.php
Normal file
12
resources/views/components/base/menu/item.blade.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
@props(['as' => 'a'])
|
||||||
|
|
||||||
|
@if (substr($as, 0, 2) == 'x-')
|
||||||
|
<x-dynamic-component
|
||||||
|
{{ $attributes->class(['cursor-pointer flex items-center p-2 transition duration-300 ease-in-out rounded-md hover:bg-slate-200/60 dark:bg-darkmode-600 dark:hover:bg-darkmode-400 dropdown-item'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
:component="substr($as, 2)"
|
||||||
|
>{{ $slot }}</x-dynamic-component>
|
||||||
|
@else
|
||||||
|
<{{ $as }}
|
||||||
|
{{ $attributes->class(['cursor-pointer flex items-center p-2 transition duration-300 ease-in-out rounded-md hover:bg-slate-200/60 dark:bg-darkmode-600 dark:hover:bg-darkmode-400 dropdown-item'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
||||||
|
@endif
|
17
resources/views/components/base/menu/items.blade.php
Normal file
17
resources/views/components/base/menu/items.blade.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<x-base.transition
|
||||||
|
class="dropdown-menu absolute z-[9999] hidden"
|
||||||
|
selector=".show"
|
||||||
|
enter="transition-all ease-linear duration-150"
|
||||||
|
enterFrom="absolute !mt-5 invisible opacity-0 translate-y-1"
|
||||||
|
enterTo="!mt-1 visible opacity-100 translate-y-0"
|
||||||
|
leave="transition-all ease-linear duration-150"
|
||||||
|
leaveFrom="!mt-1 visible opacity-100 translate-y-0"
|
||||||
|
leaveTo="absolute !mt-5 invisible opacity-0 translate-y-1"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(['dropdown-content rounded-md border-transparent bg-white p-2 shadow-[0px_3px_10px_#00000017] dark:border-transparent dark:bg-darkmode-600'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
</x-base.transition>
|
|
@ -0,0 +1,4 @@
|
||||||
|
<div
|
||||||
|
{{ $attributes->class(merge(['py-5 pl-5 pr-14 bg-white border border-slate-200/60 rounded-lg shadow-xl dark:bg-darkmode-600 dark:text-slate-300 dark:border-darkmode-600 hidden flex', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<nav {{ $attributes->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
<ul class="flex w-full mr-0 sm:mr-auto sm:w-auto">
|
||||||
|
{{ $slot }}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
16
resources/views/components/base/pagination/link.blade.php
Normal file
16
resources/views/components/base/pagination/link.blade.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
@props(['as' => 'a', 'active' => null])
|
||||||
|
|
||||||
|
<li class="flex-1 sm:flex-initial">
|
||||||
|
<x-base.button
|
||||||
|
data-tw-merge
|
||||||
|
as="{{ $as }}"
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
'min-w-0 sm:min-w-[40px] shadow-none font-normal flex items-center justify-center border-transparent text-slate-800 sm:mr-2 dark:text-slate-300 px-1 sm:px-3',
|
||||||
|
$active ? '!box font-medium dark:bg-darkmode-400' : null,
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</x-base.button>
|
||||||
|
</li>
|
16
resources/views/components/base/popover/button.blade.php
Normal file
16
resources/views/components/base/popover/button.blade.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
|
||||||
|
@if (substr($as, 0, 2) == 'x-')
|
||||||
|
<x-dynamic-component
|
||||||
|
data-tw-toggle="dropdown"
|
||||||
|
aria-expanded="false"
|
||||||
|
{{ $attributes->class(['cursor-pointer'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
:component="substr($as, 2)"
|
||||||
|
>{{ $slot }}</x-dynamic-component>
|
||||||
|
@else
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-toggle="dropdown"
|
||||||
|
aria-expanded="false"
|
||||||
|
{{ $attributes->class(['cursor-pointer'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
||||||
|
@endif
|
13
resources/views/components/base/popover/index.blade.php
Normal file
13
resources/views/components/base/popover/index.blade.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
@props(['as' => 'div', 'placement' => 'bottom-end'])
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/dropdown/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-merge
|
||||||
|
data-tw-placement="{{ $placement }}"
|
||||||
|
{{ $attributes->class(['dropdown relative'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
17
resources/views/components/base/popover/panel.blade.php
Normal file
17
resources/views/components/base/popover/panel.blade.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<x-base.transition
|
||||||
|
class="dropdown-menu absolute z-[9999] hidden"
|
||||||
|
selector=".show"
|
||||||
|
enter="transition-all ease-linear duration-150"
|
||||||
|
enterFrom="absolute !mt-5 invisible opacity-0 translate-y-1"
|
||||||
|
enterTo="!mt-1 visible opacity-100 translate-y-0"
|
||||||
|
leave="transition-all ease-linear duration-150"
|
||||||
|
leaveFrom="!mt-1 visible opacity-100 translate-y-0"
|
||||||
|
leaveTo="absolute !mt-5 invisible opacity-0 translate-y-1"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(['dropdown-content rounded-md border-transparent bg-white p-2 shadow-[0px_3px_10px_#00000017] dark:border-transparent dark:bg-darkmode-600'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
</x-base.transition>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<div {{ $attributes->class('preview-component')->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/preview-component/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
3
resources/views/components/base/preview/index.blade.php
Normal file
3
resources/views/components/base/preview/index.blade.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div {{ $attributes->class('preview')->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(['bg-primary h-full rounded text-xs text-white flex justify-center items-center'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
6
resources/views/components/base/progress/index.blade.php
Normal file
6
resources/views/components/base/progress/index.blade.php
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<div
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(['w-full h-2 bg-slate-200 rounded dark:bg-black/20'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
|
@ -0,0 +1,5 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
{{ $attributes->class(['p-5 overflow-y-auto flex-1'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
|
@ -0,0 +1,5 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
{{ $attributes->class(['px-5 py-3 text-right border-t border-slate-200/60 dark:border-darkmode-400'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
18
resources/views/components/base/slideover/index.blade.php
Normal file
18
resources/views/components/base/slideover/index.blade.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
@props(['as' => 'div', 'staticBackdrop' => false])
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/modal/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-backdrop="{{ $staticBackdrop ? 'static' : null }}"
|
||||||
|
aria-hidden="true"
|
||||||
|
tabindex="-1"
|
||||||
|
{{ $attributes->class([
|
||||||
|
'modal group bg-black/60 transition-[visibility,opacity] w-screen h-screen fixed left-0 top-0',
|
||||||
|
'[&:not(.show)]:duration-[0s,0.2s] [&:not(.show)]:delay-[0.2s,0s] [&:not(.show)]:invisible [&:not(.show)]:opacity-0',
|
||||||
|
'[&.show]:visible [&.show]:opacity-100 [&.show]:duration-[0s,0.4s]',
|
||||||
|
])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
12
resources/views/components/base/slideover/panel.blade.php
Normal file
12
resources/views/components/base/slideover/panel.blade.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
@aware(['size' => 'md'])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
{{ $attributes->class([
|
||||||
|
'w-[90%] ml-auto h-screen flex flex-col bg-white relative shadow-md transition-[margin-right] duration-[0.6s] -mr-[100%] group-[.show]:mr-0 dark:bg-darkmode-600',
|
||||||
|
$size == 'md' ? 'sm:w-[460px]' : null,
|
||||||
|
$size == 'sm' ? 'sm:w-[300px]' : null,
|
||||||
|
$size == 'lg' ? 'sm:w-[600px]' : null,
|
||||||
|
$size == 'xl' ? 'sm:w-[600px] lg:w-[900px]' : null,
|
||||||
|
])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
|
@ -0,0 +1,5 @@
|
||||||
|
@props(['as' => 'div'])
|
||||||
|
|
||||||
|
<{{ $as }}
|
||||||
|
{{ $attributes->class(['flex items-center px-5 py-3 border-b border-slate-200/60 dark:border-darkmode-400'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
9
resources/views/components/base/source/index.blade.php
Normal file
9
resources/views/components/base/source/index.blade.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<div {{ $attributes->class('source hidden')->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/source/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
93
resources/views/components/base/tab/button.blade.php
Normal file
93
resources/views/components/base/tab/button.blade.php
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
@props(['as' => 'a', 'target' => null, 'unstyled' => false])
|
||||||
|
@aware(['variant' => 'tabs', 'selected' => false, 'id' => null])
|
||||||
|
|
||||||
|
@if (substr($as, 0, 2) == 'x-')
|
||||||
|
<x-dynamic-component
|
||||||
|
data-tw-merge
|
||||||
|
data-tw-target="#{{ $target ? $target : str_replace('-tab', '', uncamelize($id, '-')) }}"
|
||||||
|
role="tab"
|
||||||
|
aria-selected="{{ $selected }}"
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
!$unstyled
|
||||||
|
? 'cursor-pointer block appearance-none px-5 py-2.5 border border-transparent text-slate-700 dark:text-slate-400'
|
||||||
|
: null,
|
||||||
|
!$unstyled ? '[&.active]:text-slate-800 [&.active]:dark:text-white' : null,
|
||||||
|
|
||||||
|
// Default
|
||||||
|
!$unstyled && $variant == 'tabs' ? 'block border-transparent rounded-t-md dark:border-transparent' : null,
|
||||||
|
!$unstyled && $variant == 'tabs'
|
||||||
|
? '[&.active]:bg-white [&.active]:border-slate-200 [&.active]:border-b-transparent [&.active]:font-medium [&.active]:dark:bg-transparent [&.active]:dark:border-t-darkmode-400 [&.active]:dark:border-b-darkmode-600 [&.active]:dark:border-x-darkmode-400'
|
||||||
|
: null,
|
||||||
|
!$unstyled && $variant == 'tabs'
|
||||||
|
? '[&:not(.active)]:hover:bg-slate-100 [&:not(.active)]:dark:hover:bg-darkmode-400 [&:not(.active)]:dark:hover:border-transparent'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
// Pills
|
||||||
|
!$unstyled && $variant == 'pills' ? 'rounded-md border-0' : null,
|
||||||
|
!$unstyled && $variant == 'pills'
|
||||||
|
? '[&.active]:bg-primary [&.active]:text-white [&.active]:font-medium'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
// Boxed tabs
|
||||||
|
!$unstyled && $variant == 'boxed-tabs' ? 'shadow-[0px_3px_20px_#0000000b] rounded-md' : null,
|
||||||
|
!$unstyled && $variant == 'boxed-tabs'
|
||||||
|
? '[&.active]:bg-primary [&.active]:text-white [&.active]:font-medium'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
// Link tabs
|
||||||
|
!$unstyled && $variant == 'link-tabs' ? 'border-b-2 border-transparent dark:border-transparent' : null,
|
||||||
|
!$unstyled && $variant == 'link-tabs'
|
||||||
|
? '[&.active]:border-b-primary [&.active]:font-medium [&.active]:dark:border-b-primary'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
$selected ? 'active' : null,
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
:component="substr($as, 2)"
|
||||||
|
>{{ $slot }}</x-dynamic-component>
|
||||||
|
@else
|
||||||
|
<{{ $as }}
|
||||||
|
data-tw-merge
|
||||||
|
data-tw-target="#{{ $target ? $target : str_replace('-tab', '', uncamelize($id, '-')) }}"
|
||||||
|
role="tab"
|
||||||
|
aria-selected="{{ $selected }}"
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
!$unstyled
|
||||||
|
? 'cursor-pointer block appearance-none px-5 py-2.5 border border-transparent text-slate-700 dark:text-slate-400'
|
||||||
|
: null,
|
||||||
|
!$unstyled ? '[&.active]:text-slate-800 [&.active]:dark:text-white' : null,
|
||||||
|
|
||||||
|
// Default
|
||||||
|
!$unstyled && $variant == 'tabs' ? 'block border-transparent rounded-t-md dark:border-transparent' : null,
|
||||||
|
!$unstyled && $variant == 'tabs'
|
||||||
|
? '[&.active]:bg-white [&.active]:border-slate-200 [&.active]:border-b-transparent [&.active]:font-medium [&.active]:dark:bg-transparent [&.active]:dark:border-t-darkmode-400 [&.active]:dark:border-b-darkmode-600 [&.active]:dark:border-x-darkmode-400'
|
||||||
|
: null,
|
||||||
|
!$unstyled && $variant == 'tabs'
|
||||||
|
? '[&:not(.active)]:hover:bg-slate-100 [&:not(.active)]:dark:hover:bg-darkmode-400 [&:not(.active)]:dark:hover:border-transparent'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
// Pills
|
||||||
|
!$unstyled && $variant == 'pills' ? 'rounded-md border-0' : null,
|
||||||
|
!$unstyled && $variant == 'pills'
|
||||||
|
? '[&.active]:bg-primary [&.active]:text-white [&.active]:font-medium'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
// Boxed tabs
|
||||||
|
!$unstyled && $variant == 'boxed-tabs' ? 'shadow-[0px_3px_20px_#0000000b] rounded-md' : null,
|
||||||
|
!$unstyled && $variant == 'boxed-tabs'
|
||||||
|
? '[&.active]:bg-primary [&.active]:text-white [&.active]:font-medium'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
// Link tabs
|
||||||
|
!$unstyled && $variant == 'link-tabs' ? 'border-b-2 border-transparent dark:border-transparent' : null,
|
||||||
|
!$unstyled && $variant == 'link-tabs'
|
||||||
|
? '[&.active]:border-b-primary [&.active]:font-medium [&.active]:dark:border-b-primary'
|
||||||
|
: null,
|
||||||
|
|
||||||
|
$selected ? 'active' : null,
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
||||||
|
@endif
|
3
resources/views/components/base/tab/group.blade.php
Normal file
3
resources/views/components/base/tab/group.blade.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div {{ $attributes->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
17
resources/views/components/base/tab/index.blade.php
Normal file
17
resources/views/components/base/tab/index.blade.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
@props(['id' => null, 'fullWidth' => true, 'selected' => false])
|
||||||
|
@aware(['variant' => 'tabs'])
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/tab/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
<li
|
||||||
|
id="{{ $id }}"
|
||||||
|
data-tw-merge
|
||||||
|
role="presentation"
|
||||||
|
{{ $attributes->class(merge(['focus-visible:outline-none', $fullWidth ? 'flex-1' : null, $variant == 'tabs' ? '-mb-px' : null]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</li>
|
9
resources/views/components/base/tab/list.blade.php
Normal file
9
resources/views/components/base/tab/list.blade.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
@props(['variant' => 'tabs'])
|
||||||
|
|
||||||
|
<ul
|
||||||
|
data-tw-merge
|
||||||
|
role="tablist"
|
||||||
|
{{ $attributes->class(merge([$variant == 'tabs' ? 'border-b border-slate-200 dark:border-darkmode-400' : null, 'w-full flex']))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</ul>
|
17
resources/views/components/base/tab/panel.blade.php
Normal file
17
resources/views/components/base/tab/panel.blade.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
@props(['id' => null, 'selected' => false])
|
||||||
|
|
||||||
|
<x-base.transition
|
||||||
|
id="{{ $id }}"
|
||||||
|
role="tabpanel"
|
||||||
|
aria-labelledby="{{ uncamelize($id, '-') }}-tab"
|
||||||
|
selector=".active"
|
||||||
|
enter="transition-[visibility,opacity] ease-linear duration-150"
|
||||||
|
enterFrom="!p-0 !h-0 overflow-hidden invisible opacity-0"
|
||||||
|
enterTo="visible opacity-100"
|
||||||
|
leave="transition-[visibility,opacity] ease-linear duration-150"
|
||||||
|
leaveFrom="visible opacity-100"
|
||||||
|
leaveTo="!p-0 !h-0 overflow-hidden invisible opacity-0"
|
||||||
|
{{ $attributes->class(merge(['tab-pane', $selected ? 'active' : null]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</x-base.transition>
|
4
resources/views/components/base/tab/panels.blade.php
Normal file
4
resources/views/components/base/tab/panels.blade.php
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<div
|
||||||
|
{{ $attributes->class(merge(['tab-content']))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
8
resources/views/components/base/table/index.blade.php
Normal file
8
resources/views/components/base/table/index.blade.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
@props(['dark' => null, 'bordered' => null, 'hover' => null, 'striped' => null, 'sm' => null])
|
||||||
|
|
||||||
|
<table
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(merge(['w-full text-left', $dark ? 'bg-dark text-white dark:bg-black/30' : null]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</table>
|
3
resources/views/components/base/table/tbody.blade.php
Normal file
3
resources/views/components/base/table/tbody.blade.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<tbody>
|
||||||
|
{{ $slot }}
|
||||||
|
</tbody>
|
15
resources/views/components/base/table/td.blade.php
Normal file
15
resources/views/components/base/table/td.blade.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
@aware(['dark' => null, 'bordered' => null, 'sm' => null])
|
||||||
|
|
||||||
|
<td
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
'px-5 py-3 border-b dark:border-darkmode-300',
|
||||||
|
$dark ? 'border-slate-600 dark:border-darkmode-300' : null,
|
||||||
|
$bordered ? 'border-l border-r border-t' : null,
|
||||||
|
$sm ? 'px-4 py-2' : null,
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</td>
|
17
resources/views/components/base/table/th.blade.php
Normal file
17
resources/views/components/base/table/th.blade.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
@aware(['variant' => null, 'dark' => null, 'bordered' => null, 'sm' => null])
|
||||||
|
|
||||||
|
<th
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
'font-medium px-5 py-3 border-b-2 dark:border-darkmode-300',
|
||||||
|
$variant === 'light' ? 'border-b-0 text-slate-700' : null,
|
||||||
|
$variant === 'dark' ? 'border-b-0' : null,
|
||||||
|
$dark ? 'border-slate-600 dark:border-darkmode-300' : null,
|
||||||
|
$bordered ? 'border-l border-r border-t' : null,
|
||||||
|
$sm ? 'px-4 py-2' : null,
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</th>
|
13
resources/views/components/base/table/thead.blade.php
Normal file
13
resources/views/components/base/table/thead.blade.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
@aware(['variant' => null])
|
||||||
|
|
||||||
|
<thead
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
$variant === 'light' ? 'bg-slate-200/60 dark:bg-slate-200' : null,
|
||||||
|
$variant === 'dark' ? 'bg-dark text-white dark:bg-black/30' : null,
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</thead>
|
17
resources/views/components/base/table/tr.blade.php
Normal file
17
resources/views/components/base/table/tr.blade.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
@aware(['hover' => null, 'striped' => null])
|
||||||
|
|
||||||
|
<tr
|
||||||
|
data-tw-merge
|
||||||
|
{{ $attributes->class(
|
||||||
|
merge([
|
||||||
|
$hover
|
||||||
|
? '[&:hover_td]:bg-slate-100 [&:hover_td]:dark:bg-darkmode-300 [&:hover_td]:dark:bg-opacity-50'
|
||||||
|
: null,
|
||||||
|
$striped
|
||||||
|
? '[&:nth-of-type(odd)_td]:bg-slate-100 [&:nth-of-type(odd)_td]:dark:bg-darkmode-300 [&:nth-of-type(odd)_td]:dark:bg-opacity-50'
|
||||||
|
: null,
|
||||||
|
]),
|
||||||
|
)->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</tr>
|
20
resources/views/components/base/tiny-slider/index.blade.php
Normal file
20
resources/views/components/base/tiny-slider/index.blade.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
@props(['config' => null])
|
||||||
|
|
||||||
|
<div
|
||||||
|
data-config="{{ $config }}"
|
||||||
|
{{ $attributes->class(merge(['tiny-slider', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/tiny-slider/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/tiny-slider/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
|
@ -0,0 +1,13 @@
|
||||||
|
@props(['to' => null])
|
||||||
|
|
||||||
|
<div
|
||||||
|
id="{{ $to }}"
|
||||||
|
{{ $attributes->class(merge(['tippy-content', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>
|
||||||
|
{{ $slot }}</div>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/tippy-content/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
26
resources/views/components/base/tippy/index.blade.php
Normal file
26
resources/views/components/base/tippy/index.blade.php
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
@props(['as' => 'span', 'content' => null])
|
||||||
|
|
||||||
|
@if (substr($as, 0, 2) == 'x-')
|
||||||
|
<x-dynamic-component
|
||||||
|
title="{{ $content }}"
|
||||||
|
{{ $attributes->class(merge(['tooltip cursor-pointer', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
:component="substr($as, 2)"
|
||||||
|
>{{ $slot }}</x-dynamic-component>
|
||||||
|
@else
|
||||||
|
<{{ $as }}
|
||||||
|
title="{{ $content }}"
|
||||||
|
{{ $attributes->class(merge(['tooltip cursor-pointer', $attributes->whereStartsWith('class')->first()]))->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/tippy/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/tippy/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
15
resources/views/components/base/tom-select/index.blade.php
Normal file
15
resources/views/components/base/tom-select/index.blade.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<select {{ $attributes->class(['tom-select'])->merge($attributes->whereDoesntStartWith('class')->getAttributes()) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/tom-select/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('scripts')
|
||||||
|
@vite('resources/js/components/tom-select/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
43
resources/views/components/base/transition/index.blade.php
Normal file
43
resources/views/components/base/transition/index.blade.php
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
@props([
|
||||||
|
'as' => 'div',
|
||||||
|
'selector' => null,
|
||||||
|
'enter' => null,
|
||||||
|
'enterFrom' => null,
|
||||||
|
'enterTo' => null,
|
||||||
|
'leave' => null,
|
||||||
|
'leaveFrom' => null,
|
||||||
|
'leaveTo' => null,
|
||||||
|
])
|
||||||
|
|
||||||
|
@once
|
||||||
|
@push('vendors')
|
||||||
|
@vite('resources/js/vendor/transition/index.js')
|
||||||
|
@endpush
|
||||||
|
@endonce
|
||||||
|
|
||||||
|
@if (substr($as, 0, 2) == 'x-')
|
||||||
|
<x-dynamic-component
|
||||||
|
data-transition
|
||||||
|
data-selector="{{ $selector }}"
|
||||||
|
data-enter="{{ $enter }}"
|
||||||
|
data-enter-from="{{ $enterFrom }}"
|
||||||
|
data-enter-to="{{ $enterTo }}"
|
||||||
|
data-leave="{{ $leave }}"
|
||||||
|
data-leave-from="{{ $leaveFrom }}"
|
||||||
|
data-leave-to="{{ $leaveTo }}"
|
||||||
|
{{ $attributes }}
|
||||||
|
:component="substr($as, 2)"
|
||||||
|
>{{ $slot }}</x-dynamic-component>
|
||||||
|
@else
|
||||||
|
<{{ $as }}
|
||||||
|
data-transition
|
||||||
|
data-selector="{{ $selector }}"
|
||||||
|
data-enter="{{ $enter }}"
|
||||||
|
data-enter-from="{{ $enterFrom }}"
|
||||||
|
data-enter-to="{{ $enterTo }}"
|
||||||
|
data-leave="{{ $leave }}"
|
||||||
|
data-leave-from="{{ $leaveFrom }}"
|
||||||
|
data-leave-to="{{ $leaveTo }}"
|
||||||
|
{{ $attributes }}
|
||||||
|
>{{ $slot }}</{{ $as }}>
|
||||||
|
@endif
|
Loading…
Reference in a new issue