- Changed component styles and classes to align with TailAdmin design patterns. - Updated color schemes, typography, and layout for consistency across components. - Refactored Info Row, Network Address Card, Notice Banner, Progress Bar, Resource Gauge, Section Header, Server Status, Spinner, Stat Card, and Tab Panel components. - Enhanced responsiveness and accessibility features in various components.
52 lines
1.8 KiB
PHP
52 lines
1.8 KiB
PHP
{{--
|
|
Info Row / Key-Value Pair Component - TailAdmin style
|
|
|
|
Usage:
|
|
<x-proxmox::ui.info-row label="IP Address" value="192.168.1.1" />
|
|
<x-proxmox::ui.info-row label="Status" :copyable="true">
|
|
<x-proxmox::ui.badge variant="success">Active</x-proxmox::ui.badge>
|
|
</x-proxmox::ui.info-row>
|
|
--}}
|
|
|
|
@props([
|
|
'label',
|
|
'value' => null,
|
|
'copyable' => false,
|
|
'icon' => null,
|
|
'muted' => false,
|
|
])
|
|
|
|
<div {{ $attributes->class(['flex items-center justify-between border-b border-gray-200 py-3 last:border-b-0 dark:border-gray-800']) }}>
|
|
<div class="flex items-center gap-2.5 text-theme-sm text-gray-500 dark:text-gray-400">
|
|
@if($icon)
|
|
<x-dynamic-component :component="$icon" class="size-4" />
|
|
@endif
|
|
<span>{{ $label }}</span>
|
|
</div>
|
|
<div class="flex items-center gap-2.5">
|
|
<span @class([
|
|
'text-theme-sm font-medium',
|
|
'text-gray-500 dark:text-gray-400' => $muted,
|
|
'text-gray-800 dark:text-white/90' => !$muted,
|
|
])>
|
|
{{ $value ?? $slot }}
|
|
</span>
|
|
@if($copyable && $value)
|
|
<button
|
|
type="button"
|
|
x-data="{ copied: false }"
|
|
@click="
|
|
navigator.clipboard.writeText('{{ $value }}');
|
|
copied = true;
|
|
setTimeout(() => copied = false, 2000);
|
|
"
|
|
class="rounded-lg p-1 text-gray-400 transition-colors duration-150 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300"
|
|
title="Copy to clipboard"
|
|
>
|
|
<x-ri-file-copy-line x-show="!copied" class="size-4" />
|
|
<x-ri-check-line x-show="copied" x-cloak class="size-4 text-success-500" />
|
|
</button>
|
|
@endif
|
|
</div>
|
|
</div>
|