@props([ 'variant' => 'neutral', 'size' => 'md', 'rounded' => 'full', 'dot' => false, 'pulse' => false, 'icon' => null, 'iconPosition' => 'left', 'removable' => false, 'outline' => false, ]) @php // LucentUI badge base classes $baseClasses = 'inline-flex items-center gap-1.5 font-semibold transition-all duration-200'; // Size classes $sizeClasses = match($size) { 'xs' => 'px-1.5 py-0.5 text-[10px]', 'sm' => 'px-2 py-0.5 text-xs', 'md' => 'px-2.5 py-1 text-xs', 'lg' => 'px-3 py-1.5 text-sm', default => 'px-2.5 py-1 text-xs', }; // Icon size classes $iconSizeClasses = match($size) { 'xs' => 'size-2.5', 'sm' => 'size-3', 'md' => 'size-3.5', 'lg' => 'size-4', default => 'size-3.5', }; // Dot size classes $dotSizeClasses = match($size) { 'xs' => 'size-1.5', 'sm' => 'size-1.5', 'md' => 'size-2', 'lg' => 'size-2', default => 'size-2', }; // Variant classes - LucentUI Tailwind $variantClasses = match($variant) { 'success' => $outline ? 'border border-success text-success bg-transparent' : 'bg-success/20 text-success', 'danger' => $outline ? 'border border-error text-error bg-transparent' : 'bg-error/20 text-error', 'warning' => $outline ? 'border border-warning text-warning bg-transparent' : 'bg-warning/20 text-warning', 'info' => $outline ? 'border border-info text-info bg-transparent' : 'bg-info/20 text-info', 'primary' => $outline ? 'border border-primary text-primary bg-transparent' : 'bg-primary/20 text-primary', 'secondary' => $outline ? 'border border-neutral text-base/70 bg-transparent' : 'bg-neutral/20 text-base/70', 'neutral' => $outline ? 'border border-neutral/50 text-base/60 bg-transparent' : 'bg-neutral/10 text-base/60', default => $outline ? 'border border-neutral text-base/70 bg-transparent' : 'bg-neutral/20 text-base/70', }; // Dot color classes $dotColorClasses = match($variant) { 'success' => 'bg-success', 'danger' => 'bg-error', 'warning' => 'bg-warning', 'info' => 'bg-info', 'primary' => 'bg-primary', 'secondary' => 'bg-neutral', 'neutral' => 'bg-neutral/50', default => 'bg-neutral', }; // Border radius $roundedClasses = match($rounded) { 'none' => 'rounded-none', 'sm' => 'rounded-sm', 'md' => 'rounded-md', 'lg' => 'rounded-lg', 'full' => 'rounded-full', default => 'rounded-full', }; // Combined classes $classes = "$baseClasses $sizeClasses $variantClasses $roundedClasses"; @endphp merge(['class' => $classes]) }}> {{-- Dot indicator --}} @if($dot) @endif {{-- Left icon --}} @if($icon && $iconPosition === 'left') @endif {{-- Content --}} {{ $slot }} {{-- Right icon --}} @if($icon && $iconPosition === 'right') @endif {{-- Remove button --}} @if($removable) @endif