Files
Virtnet.bond/extensions/Servers/Proxmox/views/components/ui/help-modal.blade.php
Joseph.Rawlings b4e2923a2c refactor: update Proxmox UI components to use TailAdmin styling
- 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.
2025-12-17 12:33:10 -05:00

84 lines
3.5 KiB
PHP

{{--
Help Modal Trigger Component - TailAdmin styled
Question mark button that opens an info modal
Usage:
<x-proxmox::ui.help-modal title="Server Details" icon="ri-server-line">
<x-slot:description>
Displays comprehensive information about your virtual machine...
</x-slot:description>
<x-slot:details>
<p><span class="font-semibold">Status:</span> Shows the current power state...</p>
</x-slot:details>
</x-proxmox::ui.help-modal>
--}}
@props([
'title',
'icon' => 'ri-question-line',
])
<div class="relative" x-data="{ open: false }" x-cloak {{ $attributes }}>
<button type="button" @click="open = true" class="text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 transition-colors duration-150">
<x-ri-question-line class="size-4" />
</button>
<!-- Modal Backdrop -->
<div
x-show="open"
x-transition:enter="transition ease-out duration-150"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
x-transition:leave="transition ease-in duration-100"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
@click="open = false"
@keydown.escape.window="open = false"
class="fixed inset-0 z-50 bg-gray-900/50 backdrop-blur-sm dark:bg-gray-950/70"
style="display: none;"
></div>
<!-- Modal Content -->
<div
x-show="open"
x-transition:enter="transition ease-out duration-150"
x-transition:enter-start="opacity-0 scale-95"
x-transition:enter-end="opacity-100 scale-100"
x-transition:leave="transition ease-in duration-100"
x-transition:leave-start="opacity-100 scale-100"
x-transition:leave-end="opacity-0 scale-95"
@click.away="open = false"
class="fixed inset-0 z-50 flex items-center justify-center p-4"
style="display: none;"
>
<div class="relative w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-2xl border border-gray-200 bg-white shadow-theme-lg dark:border-gray-800 dark:bg-gray-900 p-6">
<button @click="open = false" class="absolute top-4 right-4 rounded-lg p-1 text-gray-400 hover:text-gray-600 hover:bg-gray-100 dark:text-gray-500 dark:hover:text-gray-300 dark:hover:bg-gray-800 transition-colors duration-150">
<x-ri-close-line class="size-4" />
</button>
<div class="flex items-center gap-3 mb-4 pr-8">
<div class="flex items-center justify-center size-9 rounded-xl bg-brand-500/10 dark:bg-brand-500/20">
<x-dynamic-component :component="$icon" class="size-4 text-brand-500" />
</div>
<h3 class="text-lg font-semibold leading-none tracking-tight text-gray-800 dark:text-white/90">
{{ $title }}
</h3>
</div>
@if(isset($description))
<div class="text-theme-sm text-gray-500 dark:text-gray-400 mb-4">
{{ $description }}
</div>
@endif
@if(isset($details))
<div class="pt-4 mt-4 border-t border-gray-200 dark:border-gray-800 space-y-2 text-theme-sm text-gray-500 dark:text-gray-400">
{{ $details }}
</div>
@endif
{{ $slot }}
</div>
</div>
</div>