| 58 | } |
| 59 | |
| 60 | function SelectContent({ |
| 61 | className, |
| 62 | children, |
| 63 | position = "item-aligned", |
| 64 | align = "center", |
| 65 | ...props |
| 66 | }: React.ComponentProps<typeof SelectPrimitive.Content>) { |
| 67 | return ( |
| 68 | <SelectPrimitive.Portal> |
| 69 | <SelectPrimitive.Content |
| 70 | data-slot="select-content" |
| 71 | className={cn( |
| 72 | "relative z-50 min-w-[8rem] overflow-hidden rounded-md", |
| 73 | "border border-[var(--color-border)] bg-[var(--color-bg)]", |
| 74 | "shadow-[0_4px_12px_rgba(0,0,0,0.1)] dark:shadow-[0_4px_12px_rgba(0,0,0,0.3)]", |
| 75 | "data-[state=open]:animate-in data-[state=closed]:animate-out", |
| 76 | "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", |
| 77 | "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", |
| 78 | "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2", |
| 79 | "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", |
| 80 | position === "popper" && |
| 81 | "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", |
| 82 | className |
| 83 | )} |
| 84 | position={position} |
| 85 | align={align} |
| 86 | {...props} |
| 87 | > |
| 88 | <SelectScrollUpButton /> |
| 89 | <SelectPrimitive.Viewport |
| 90 | className={cn( |
| 91 | "p-1", |
| 92 | position === "popper" && |
| 93 | "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1" |
| 94 | )} |
| 95 | > |
| 96 | {children} |
| 97 | </SelectPrimitive.Viewport> |
| 98 | <SelectScrollDownButton /> |
| 99 | </SelectPrimitive.Content> |
| 100 | </SelectPrimitive.Portal> |
| 101 | ) |
| 102 | } |
| 103 | |
| 104 | function SelectLabel({ |
| 105 | className, |