feat: Enhance UI components and add command palette
- Updated dropdown component styles and transitions for improved UX. - Refined checkbox, input, radio, select, and textarea components with consistent error messaging and styling. - Introduced a new card component for better layout options. - Added a stat card component for displaying metrics with trends. - Implemented a command palette for global search and navigation, accessible via Cmd/Ctrl+K. - Enhanced modal and navigation components with new styles and transitions. - Improved layout styles for better responsiveness and visual appeal.
This commit is contained in:
51
themes/lucentui/views/components/card/stat.blade.php
Normal file
51
themes/lucentui/views/components/card/stat.blade.php
Normal file
@@ -0,0 +1,51 @@
|
||||
@props([
|
||||
'label',
|
||||
'value',
|
||||
'delta' => null,
|
||||
'deltaLabel' => null,
|
||||
'trend' => null,
|
||||
'icon' => null,
|
||||
'href' => null,
|
||||
])
|
||||
@php
|
||||
$trendClass = match($trend) {
|
||||
'up' => 'text-success',
|
||||
'down' => 'text-error',
|
||||
'flat' => 'text-base/60',
|
||||
default => 'text-base/60',
|
||||
};
|
||||
$trendIcon = match($trend) {
|
||||
'up' => 'ri-arrow-up-line',
|
||||
'down' => 'ri-arrow-down-line',
|
||||
default => null,
|
||||
};
|
||||
$tag = $href ? 'a' : 'div';
|
||||
@endphp
|
||||
<{{ $tag }} @if($href) href="{{ $href }}" wire:navigate @endif
|
||||
{{ $attributes->merge(['class' => 'card-glass card-glass-hover block p-5 group']) }}>
|
||||
<div class="flex items-start justify-between gap-3">
|
||||
<div class="min-w-0 flex-1">
|
||||
<p class="text-xs font-semibold tracking-wider uppercase text-base/60">{{ $label }}</p>
|
||||
<p class="mt-2 text-3xl font-bold tnum text-base">{{ $value }}</p>
|
||||
@if($delta !== null || $deltaLabel)
|
||||
<div class="mt-1 flex items-center gap-1.5 text-xs {{ $trendClass }}">
|
||||
@if($trendIcon)
|
||||
<x-dynamic-component :component="$trendIcon" class="size-3.5" />
|
||||
@endif
|
||||
@if($delta !== null)<span class="font-semibold tnum">{{ $delta }}</span>@endif
|
||||
@if($deltaLabel)<span class="text-base/50">{{ $deltaLabel }}</span>@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@if($icon)
|
||||
<div class="size-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center shrink-0 group-hover:bg-primary/20 transition-colors">
|
||||
<x-dynamic-component :component="$icon" class="size-5" />
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@isset($slot)
|
||||
@if(trim($slot) !== '')
|
||||
<div class="mt-4">{{ $slot }}</div>
|
||||
@endif
|
||||
@endisset
|
||||
</{{ $tag }}>
|
||||
Reference in New Issue
Block a user