@aware([ 'placeholder' ]) @props([ 'placeholder' => null, 'clearable' => null, 'invalid' => false, 'size' => null, ]) @php $classes = Flux::classes() ->add('group/select-button cursor-default py-2') ->add('overflow-hidden') // Overflow hidden is here to prevent the button from growing if the selected date text is too long. ->add('flex items-center') ->add('shadow-xs') ->add('bg-white dark:bg-white/10 dark:disabled:bg-white/[7%]') // Make the placeholder match the text color of standard input placeholders... ->add('disabled:shadow-none') ->add(match ($size) { default => 'h-10 text-base sm:text-sm rounded-lg px-3 block w-full', 'sm' => 'h-8 text-sm rounded-lg ps-3 pe-2 block w-full', 'xs' => 'h-6 text-xs rounded-lg ps-3 pe-2 block w-full', }) ->add($invalid ? 'border border-red-500' : 'border border-zinc-200 border-b-zinc-300/80 dark:border-white/10' ) ; @endphp