Refactor components to align with AdminLTE styles
- Updated alert component to use AdminLTE variant classes and added callout support. - Refined badge component with AdminLTE base and variant classes, including size adjustments. - Modified button component to implement AdminLTE button styles and improved loading indicators. - Enhanced card component with AdminLTE variant classes and improved header/footer structure. - Adjusted input component to follow AdminLTE design, including size classes and icon handling. - Updated layout component to streamline button styles and loading indicators. - Refined progress component to utilize AdminLTE styles for size and variant classes. - Enhanced table component with AdminLTE table classes and improved loading state representation.
This commit is contained in:
@@ -7,17 +7,19 @@
|
||||
'collapsed' => false,
|
||||
'storageKey' => null,
|
||||
'border' => true,
|
||||
'callout' => false,
|
||||
])
|
||||
|
||||
@php
|
||||
// Variant classes
|
||||
// AdminLTE variant classes
|
||||
$variantClasses = match($variant) {
|
||||
'success' => 'bg-success/10 border-success/30 text-success',
|
||||
'danger', 'error' => 'bg-danger/10 border-danger/30 text-danger',
|
||||
'warning' => 'bg-warning/10 border-warning/30 text-warning',
|
||||
'info' => 'bg-info/10 border-info/30 text-info',
|
||||
'neutral' => 'bg-neutral/10 border-neutral/30 text-base/80',
|
||||
default => 'bg-info/10 border-info/30 text-info',
|
||||
'success' => $callout ? 'lte-callout lte-callout-success' : 'lte-alert lte-alert-success',
|
||||
'danger', 'error' => $callout ? 'lte-callout lte-callout-danger' : 'lte-alert lte-alert-danger',
|
||||
'warning' => $callout ? 'lte-callout lte-callout-warning' : 'lte-alert lte-alert-warning',
|
||||
'info' => $callout ? 'lte-callout lte-callout-info' : 'lte-alert lte-alert-info',
|
||||
'primary' => $callout ? 'lte-callout lte-callout-primary' : 'lte-alert lte-alert-primary',
|
||||
'neutral' => $callout ? 'lte-callout' : 'lte-alert',
|
||||
default => $callout ? 'lte-callout lte-callout-info' : 'lte-alert lte-alert-info',
|
||||
};
|
||||
|
||||
// Default icons per variant
|
||||
@@ -26,13 +28,13 @@
|
||||
'danger', 'error' => 'ri-error-warning-fill',
|
||||
'warning' => 'ri-alert-fill',
|
||||
'info' => 'ri-information-line',
|
||||
'primary' => 'ri-information-line',
|
||||
'neutral' => 'ri-information-line',
|
||||
default => 'ri-information-line',
|
||||
};
|
||||
|
||||
$alertIcon = $icon ?? $defaultIcon;
|
||||
$borderClasses = $border ? 'border' : '';
|
||||
$baseClasses = "$variantClasses $borderClasses rounded-lg p-4";
|
||||
$baseClasses = "$variantClasses lte-fade-in";
|
||||
@endphp
|
||||
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user