- Introduced AdminLTE CSS variables for color palette, body colors, card styles, and button styles. - Implemented card components with variants for primary, success, warning, danger, and info. - Added button styles including sizes and outline variants. - Created form controls, select inputs, and input groups with consistent styling. - Included utility classes for text and background colors, gradients, and shadows. - Developed components for badges, alerts, callouts, progress bars, tables, small boxes, and info boxes. - Integrated modal, dropdown, spinner, tooltip, and direct chat styles. - Established timeline and close button styles, with dark mode support for specific components.
84 lines
3.9 KiB
PHP
84 lines
3.9 KiB
PHP
{{--
|
|
Help Modal Trigger Component - AdminLTE style
|
|
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" style="color: #6c757d; background: transparent; border: none; cursor: pointer; padding: 0; transition: color .2s ease;" onmouseover="this.style.color='#495057'" onmouseout="this.style.color='#6c757d'">
|
|
<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"
|
|
style="z-index: 1050; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px); 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 flex items-center justify-center p-4"
|
|
style="z-index: 1050; display: none;"
|
|
>
|
|
<div class="modal-lte" style="position: relative; width: 100%; max-width: 42rem; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: .375rem; box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15); padding: 1.5rem;">
|
|
<button @click="open = false" style="position: absolute; top: 1rem; right: 1rem; padding: .25rem; border-radius: .25rem; color: #6c757d; background: transparent; border: none; cursor: pointer; transition: background .2s ease, color .2s ease;" onmouseover="this.style.background='#f8f9fa'; this.style.color='#495057'" onmouseout="this.style.background='transparent'; this.style.color='#6c757d'">
|
|
<x-ri-close-line class="size-4" />
|
|
</button>
|
|
|
|
<div style="display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; padding-right: 2rem;">
|
|
<div style="display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: .5rem; background: rgba(13, 110, 253, 0.1);">
|
|
<x-dynamic-component :component="$icon" class="size-4" style="color: #0d6efd;" />
|
|
</div>
|
|
<h3 style="font-size: 1.125rem; font-weight: 600; line-height: 1; color: #212529; margin: 0;">
|
|
{{ $title }}
|
|
</h3>
|
|
</div>
|
|
|
|
@if(isset($description))
|
|
<div style="font-size: .875rem; color: #6c757d; margin-bottom: 1rem; line-height: 1.5;">
|
|
{{ $description }}
|
|
</div>
|
|
@endif
|
|
|
|
@if(isset($details))
|
|
<div style="padding-top: 1rem; margin-top: 1rem; border-top: 1px solid #dee2e6; font-size: .875rem; color: #6c757d; line-height: 1.5;">
|
|
{{ $details }}
|
|
</div>
|
|
@endif
|
|
|
|
{{ $slot }}
|
|
</div>
|
|
</div>
|
|
</div>
|