refactor: update UI components to shadcn-style

- Refactored select component to align with shadcn design principles.
- Updated server status indicator component for consistency with shadcn style.
- Modified spinner component to follow shadcn design guidelines.
- Enhanced stat card component with shadcn-inspired styles.
- Adjusted tab panel component to reflect shadcn design updates.
- Revamped table row and table data cell components to match shadcn aesthetics.
- Updated table header cell component for improved styling consistency.
- Refined table component to align with shadcn design principles.
- Enhanced tabs component with shadcn-inspired styles.
- Updated toggle component to follow shadcn design guidelines.
- Refactored tooltip component to align with shadcn design principles.
- Updated server card component to reflect shadcn-inspired design.
This commit is contained in:
2025-12-17 11:47:42 -05:00
parent e7b33a2f6c
commit 7190d7a818
34 changed files with 522 additions and 565 deletions

View File

@@ -1,5 +1,5 @@
{{--
Action Toolbar Button Component - TailServer Theme
Action Toolbar Button Component - shadcn-style
Individual button for VM control actions
Usage:
@@ -24,23 +24,23 @@
@php
$variants = [
'default' => 'bg-gradient-to-b from-neutral/5 to-neutral/10 hover:from-neutral/10 hover:to-neutral/15 text-base border border-neutral/20 hover:border-neutral/30 shadow-sm hover:shadow',
'primary' => 'bg-gradient-to-b from-primary/10 to-primary/15 hover:from-primary/15 hover:to-primary/20 text-primary border border-primary/20 hover:border-primary/30 shadow-sm hover:shadow-md hover:shadow-primary/10',
'success' => 'bg-gradient-to-b from-success/10 to-success/15 hover:from-success/15 hover:to-success/20 text-success border border-success/20 hover:border-success/30 shadow-sm hover:shadow-md hover:shadow-success/10',
'warning' => 'bg-gradient-to-b from-warning/10 to-warning/15 hover:from-warning/15 hover:to-warning/20 text-warning border border-warning/20 hover:border-warning/30 shadow-sm hover:shadow-md hover:shadow-warning/10',
'danger' => 'bg-gradient-to-b from-danger/10 to-danger/15 hover:from-danger/15 hover:to-danger/20 text-danger border border-danger/20 hover:border-danger/30 shadow-sm hover:shadow-md hover:shadow-danger/10',
'default' => 'border bg-background hover:bg-accent hover:text-accent-foreground',
'primary' => 'border border-primary/20 bg-primary/10 text-primary hover:bg-primary/20',
'success' => 'border border-success/20 bg-success/10 text-success hover:bg-success/20',
'warning' => 'border border-warning/20 bg-warning/10 text-warning hover:bg-warning/20',
'danger' => 'border border-danger/20 bg-danger/10 text-danger hover:bg-danger/20',
];
$sizes = [
'sm' => 'px-2.5 py-1.5 text-xs',
'md' => 'px-3.5 py-2 text-sm',
'lg' => 'px-5 py-2.5 text-base',
'sm' => 'h-8 px-3 text-xs',
'md' => 'h-9 px-4 text-sm',
'lg' => 'h-10 px-5 text-sm',
];
$iconSizes = [
'sm' => 'size-3.5',
'md' => 'size-4',
'lg' => 'size-5',
'lg' => 'size-4',
];
@endphp
@@ -53,11 +53,11 @@
{{ $attributes->merge([
'disabled' => $disabled || $loading,
])->class([
'inline-flex items-center gap-2 rounded-xl font-medium transition-all duration-200 hover:-translate-y-0.5 active:translate-y-0 active:scale-95',
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium ring-offset-background transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
$variants[$variant] ?? $variants['default'],
$sizes[$size] ?? $sizes['md'],
'opacity-50 cursor-not-allowed hover:translate-y-0' => $disabled,
'cursor-wait hover:translate-y-0' => $loading,
'pointer-events-none opacity-50' => $disabled,
'cursor-wait' => $loading,
]) }}
>
@if($loading)