- Changed modal close event from `@click.away` to `@click.self` for better control over closing modals. - Updated various modal button styles for consistency and improved accessibility. - Adjusted transition durations for modal animations to enhance user experience. - Added aria-labels to close buttons for better screen reader support.
53 lines
1.8 KiB
PHP
53 lines
1.8 KiB
PHP
{{--
|
|
Table Component - LucentUI Theme
|
|
Migrated from AdminLTE to Tailwind
|
|
|
|
Usage:
|
|
<x-proxmox::ui.table>
|
|
<x-slot:head>
|
|
<x-proxmox::ui.table-th>Name</x-proxmox::ui.table-th>
|
|
<x-proxmox::ui.table-th>Status</x-proxmox::ui.table-th>
|
|
</x-slot:head>
|
|
<x-proxmox::ui.table-row>
|
|
<x-proxmox::ui.table-td>Server 1</x-proxmox::ui.table-td>
|
|
<x-proxmox::ui.table-td>Running</x-proxmox::ui.table-td>
|
|
</x-proxmox::ui.table-row>
|
|
</x-proxmox::ui.table>
|
|
--}}
|
|
|
|
@props([
|
|
'striped' => false,
|
|
'hoverable' => true,
|
|
'responsive' => true,
|
|
'compact' => false,
|
|
'bordered' => false,
|
|
])
|
|
|
|
<div @class([
|
|
'relative w-full overflow-x-auto rounded-lg border border-neutral bg-background' => $responsive,
|
|
])>
|
|
<table {{ $attributes->class([
|
|
'w-full text-sm text-primary border-collapse',
|
|
'[&_tbody_tr:nth-of-type(even)]:bg-black/[0.02] dark:[&_tbody_tr:nth-of-type(even)]:bg-white/[0.02]' => $striped,
|
|
'[&_tbody_tr]:transition-colors [&_tbody_tr]:duration-200 [&_tbody_tr:hover]:bg-black/[0.04] dark:[&_tbody_tr:hover]:bg-white/[0.04]' => $hoverable,
|
|
'border border-neutral [&_th]:border [&_th]:border-neutral [&_td]:border [&_td]:border-neutral' => $bordered,
|
|
'[&_th]:px-3 [&_th]:py-1.5 [&_td]:px-3 [&_td]:py-1.5' => $compact,
|
|
]) }}>
|
|
@if(isset($head))
|
|
<thead class="bg-background-secondary border-b-2 border-neutral">
|
|
<tr>
|
|
{{ $head }}
|
|
</tr>
|
|
</thead>
|
|
@endif
|
|
<tbody class="bg-background dark:bg-transparent">
|
|
{{ $slot }}
|
|
</tbody>
|
|
@if(isset($foot))
|
|
<tfoot class="bg-background-secondary border-t-2 border-neutral font-medium">
|
|
{{ $foot }}
|
|
</tfoot>
|
|
@endif
|
|
</table>
|
|
</div>
|