| 13 | const Select = SelectPrimitive.Root; |
| 14 | |
| 15 | function SelectTrigger({ |
| 16 | className, |
| 17 | size = "default", |
| 18 | children, |
| 19 | ...props |
| 20 | }: SelectPrimitive.Trigger.Props & { |
| 21 | size?: "sm" | "default" | "lg"; |
| 22 | }) { |
| 23 | return ( |
| 24 | <SelectPrimitive.Trigger |
| 25 | className={cn( |
| 26 | "relative inline-flex min-h-9 w-full min-w-36 select-none items-center justify-between gap-2 rounded-lg border border-input bg-background bg-clip-padding px-[calc(--spacing(3)-1px)] text-left text-base shadow-xs outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none", |
| 27 | size === "sm" && |
| 28 | "min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:min-h-7", |
| 29 | size === "lg" && "min-h-10 sm:min-h-9", |
| 30 | className, |
| 31 | )} |
| 32 | data-slot="select-trigger" |
| 33 | {...props} |
| 34 | > |
| 35 | {children} |
| 36 | <SelectPrimitive.Icon data-slot="select-icon"> |
| 37 | <HugeiconsIcon |
| 38 | className="-me-1 size-4.5 opacity-80 sm:size-4" |
| 39 | icon={ArrowUpDownIcon} |
| 40 | /> |
| 41 | </SelectPrimitive.Icon> |
| 42 | </SelectPrimitive.Trigger> |
| 43 | ); |
| 44 | } |
| 45 | |
| 46 | function SelectValue({ className, ...props }: SelectPrimitive.Value.Props) { |
| 47 | return ( |