sls/resources/views/components/select.blade.php
kushal.saha e4fabef1d3 feat(interview): add icalendar invites, white date pickers, and drawer validation feedback
- integrate spatie/icalendar-generator for candidate & panelist .ics invitations (RSVP & 15m alerts)
    - add StoreInterviewRequest, ScheduleInterviewDto, and invitation/reminder queued actions
    - add migration for job_title, round, description, and reminder_sent_at on interviews table
    - style datetime-local picker indicators to pure white on dark input backgrounds
    - support button loading spinners with :showLoader="true" and loadingText
    - auto-open schedule drawer on validation failure with inline @error alerts and old() bindings
2026-08-27 10:16:46 +00:00

33 lines
1.0 KiB
PHP

@props([
'name' => null,
'required' => false,
'disabled' => false,
'size' => 'md',
'error' => null,
])
@php
$sizeClasses = [
'sm' => 'px-2.5 py-1.5 text-xs',
'md' => 'px-3 py-2 text-xs',
'lg' => 'px-3.5 py-2.5 text-sm',
];
$errors = $errors ?? new \Illuminate\Support\ViewErrorBag;
$hasError = (bool) ($error ?? ($name && $errors->has($name)));
$borderClasses = $hasError
? 'border-rose-500/80 focus:border-rose-500 focus:ring-1 focus:ring-rose-500/40'
: 'border-slate-700/60 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500/40';
$classes = 'w-full bg-slate-900 border rounded-lg text-white outline-none transition-colors disabled:opacity-50 disabled:cursor-not-allowed ' . ($sizeClasses[$size] ?? $sizeClasses['md']) . ' ' . $borderClasses;
@endphp
<select
@if($name) name="{{ $name }}" @endif
@if($required) required @endif
@if($disabled) disabled @endif
{{ $attributes->merge(['class' => $classes]) }}
>
{{ $slot }}
</select>