Files
Virtnet.bond/extensions/Servers/Proxmox/views/components/card.blade.php
Joseph.Rawlings abff5a381f Migrate UI components from AdminLTE to LucentUI Theme using Tailwind CSS
- Updated tab-panel component to use Tailwind for styling and transitions.
- Refactored table-row component to implement Tailwind classes for hover effects and borders.
- Converted table-td component to utilize Tailwind for alignment and text styles.
- Changed table-th component to apply Tailwind for header styling and sorting indicators.
- Revised table component to adopt Tailwind for layout, borders, and responsive design.
- Enhanced tabs component with Tailwind for navigation styles and transitions.
- Updated toggle component to use Tailwind for switch styles and accessibility.
- Refactored tooltip component to implement Tailwind for positioning and styling.
- Added visual enhancements to app.css for improved UI interactions and animations.
2026-02-01 14:16:57 -05:00

114 lines
4.0 KiB
PHP

@props([
'title' => null,
'subtitle' => null,
'icon' => null,
'iconClass' => 'size-5',
'iconColor' => 'text-primary',
'actions' => null,
'padding' => true,
'flush' => false,
'collapsible' => false,
'collapsed' => false,
'storageKey' => null,
'variant' => null,
'outline' => false,
])
@php
// LucentUI Card variant classes
$variantClasses = match($variant) {
'primary' => $outline ? 'border-primary' : 'border-primary bg-primary/5',
'success' => $outline ? 'border-success' : 'border-success bg-success/5',
'warning' => $outline ? 'border-warning' : 'border-warning bg-warning/5',
'danger' => $outline ? 'border-error' : 'border-error bg-error/5',
'info' => $outline ? 'border-info' : 'border-info bg-info/5',
default => 'border-neutral',
};
$cardClasses = "bg-background border rounded-lg shadow-sm transition-all duration-300 $variantClasses";
@endphp
<div {{ $attributes->merge(['class' => $cardClasses]) }}
@if($collapsible)
x-data="{
isCollapsed: {{ $collapsed ? 'true' : 'false' }},
init() {
@if($storageKey)
this.isCollapsed = localStorage.getItem('{{ $storageKey }}') === 'true';
@endif
},
toggle() {
this.isCollapsed = !this.isCollapsed;
@if($storageKey)
localStorage.setItem('{{ $storageKey }}', this.isCollapsed);
@endif
}
}"
@endif
>
@if($title || $icon || $actions || isset($header))
<div class="flex items-center justify-between px-4 py-3 border-b border-neutral">
<h3 class="flex items-center gap-3 text-base font-semibold text-base">
@if($icon)
<span class="flex items-center justify-center size-9 bg-background-secondary rounded">
<x-dynamic-component :component="$icon" class="{{ $iconClass }} {{ $iconColor }}" />
</span>
@endif
<span>
{{ $title }}
@if($subtitle)
<small class="block text-xs font-normal text-base/60">{{ $subtitle }}</small>
@endif
</span>
</h3>
@if($actions || $collapsible)
<div class="flex items-center gap-2">
@if($actions)
{{ $actions }}
@endif
@if($collapsible)
<button
type="button"
@click="toggle()"
class="inline-flex items-center justify-center px-2 py-1 text-sm border border-neutral rounded bg-transparent text-base/80 hover:bg-neutral/10 transition-colors"
>
<x-ri-arrow-down-s-line
class="size-4 transition-transform duration-200"
x-bind:class="isCollapsed ? 'rotate-180' : ''"
/>
</button>
@endif
</div>
@endif
@if(isset($header))
{{ $header }}
@endif
</div>
@endif
@if($collapsible)
<div
class="p-4"
x-show="!isCollapsed"
x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
x-transition:leave="transition ease-in duration-150"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
>
{{ $slot }}
</div>
@else
<div class="p-4">
{{ $slot }}
</div>
@endif
@if(isset($footer))
<div class="px-4 py-3 border-t border-neutral bg-background-secondary/50 rounded-b-lg">
{{ $footer }}
</div>
@endif
</div>