- 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.
112 lines
5.9 KiB
PHP
112 lines
5.9 KiB
PHP
{{--
|
|
Section Header Component - AdminLTE style
|
|
|
|
Usage:
|
|
<x-proxmox::ui.section-header title="Section Title" />
|
|
<x-proxmox::ui.section-header title="Title" subtitle="Subtitle" icon="ri-server-line">
|
|
<x-slot:actions>
|
|
<x-proxmox::ui.button>Action</x-proxmox::ui.button>
|
|
</x-slot:actions>
|
|
</x-proxmox::ui.section-header>
|
|
--}}
|
|
|
|
@props([
|
|
'title',
|
|
'subtitle' => null,
|
|
'icon' => null,
|
|
'iconColor' => null,
|
|
'actions' => null,
|
|
'helpText' => null,
|
|
'size' => 'lg',
|
|
])
|
|
|
|
@php
|
|
$titleSizes = [
|
|
'sm' => 'font-size: .875rem; font-weight: 600;',
|
|
'md' => 'font-size: 1rem; font-weight: 600;',
|
|
'lg' => 'font-size: 1.125rem; font-weight: 600;',
|
|
'xl' => 'font-size: 1.25rem; font-weight: 700;',
|
|
];
|
|
$titleStyle = $titleSizes[$size] ?? $titleSizes['lg'];
|
|
@endphp
|
|
|
|
<div {{ $attributes->class(['flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between']) }}>
|
|
<div class="flex items-start gap-3.5">
|
|
@if($icon)
|
|
<div style="width: 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: .5rem; background: rgba(13, 110, 253, 0.1);">
|
|
<x-dynamic-component :component="$icon" class="size-5" style="color: #0d6efd;" />
|
|
</div>
|
|
@endif
|
|
<div style="display: flex; flex-direction: column; gap: .25rem;">
|
|
<div class="flex min-w-0 items-center gap-2">
|
|
<h2 style="{{ $titleStyle }} color: #212529; margin: 0;">{{ $title }}</h2>
|
|
@if($helpText)
|
|
<div class="relative" x-data="{ open: false }" x-cloak>
|
|
<button
|
|
type="button"
|
|
@click="open = true"
|
|
style="color: #6c757d; transition: color .2s ease;"
|
|
onmouseover="this.style.color='#495057'"
|
|
onmouseout="this.style.color='#6c757d'"
|
|
>
|
|
<x-ri-question-line class="size-4.5" />
|
|
</button>
|
|
{{-- Help Modal --}}
|
|
<div
|
|
x-show="open"
|
|
x-transition:enter="transition ease-out duration-200"
|
|
x-transition:enter-start="opacity-0"
|
|
x-transition:enter-end="opacity-100"
|
|
x-transition:leave="transition ease-in duration-150"
|
|
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: 99999; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px); display: none;"
|
|
></div>
|
|
<div
|
|
x-show="open"
|
|
x-transition:enter="transition ease-out duration-200"
|
|
x-transition:enter-start="opacity-0 scale-95"
|
|
x-transition:enter-end="opacity-100 scale-100"
|
|
x-transition:leave="transition ease-in duration-150"
|
|
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: 99999; display: none;"
|
|
>
|
|
<div class="modal-lte" style="max-height: 90vh; width: 100%; max-width: 32rem; overflow-y: auto; padding: 1.5rem; background: #fff; border-radius: .375rem; box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);">
|
|
<button @click="open = false" style="position: absolute; right: 1rem; top: 1rem; width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; border-radius: .25rem; color: #6c757d; border: none; background: transparent; cursor: pointer; transition: background .2s ease, color .2s ease;" onmouseover="this.style.background='#f8f9fa'; this.style.color='#212529'" onmouseout="this.style.background='transparent'; this.style.color='#6c757d'">
|
|
<x-ri-close-line class="size-5" />
|
|
</button>
|
|
<div style="margin-bottom: 1.25rem; display: flex; align-items: center; gap: .875rem; padding-right: 2rem;">
|
|
@if($icon)
|
|
<div style="width: 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center; border-radius: .5rem; background: rgba(13, 110, 253, 0.1);">
|
|
<x-dynamic-component :component="$icon" class="size-5" style="color: #0d6efd;" />
|
|
</div>
|
|
@endif
|
|
<h3 style="font-size: 1.125rem; font-weight: 600; color: #212529; margin: 0;">{{ $title }}</h3>
|
|
</div>
|
|
<div style="font-size: .875rem; color: #6c757d; line-height: 1.5;">
|
|
{{ $helpText }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@if($subtitle)
|
|
<p style="font-size: .875rem; color: #6c757d; margin: 0;">{{ $subtitle }}</p>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
@if($actions)
|
|
<div class="flex flex-shrink-0 items-center gap-3">
|
|
{{ $actions }}
|
|
</div>
|
|
@endif
|
|
</div>
|