import { Select as SelectPrimitive } from '@base-ui/react/select'; import { Check, ChevronsUpDown } from 'lucide-react'; import { cn } from '../utils/cn'; import { usePluginPortalContainer } from '../theme/theme-context'; import { fieldSurface, optionRow, popoverSurface } from '../utils/control-surfaces'; import type { Size } from '../tokens/size'; export type SelectProps< Value, Multiple extends boolean | undefined = false, > = SelectPrimitive.Root.Props; function SelectRoot( props: SelectProps, ) { return ; } export type SelectTriggerProps = SelectPrimitive.Trigger.Props & { /** @default 'md' */ size?: Size; }; function SelectTrigger({ className, children, size = 'md', ...props }: SelectTriggerProps) { return ( {children} ); } export type SelectValueProps = SelectPrimitive.Value.Props; function SelectValue({ className, ...props }: SelectValueProps) { return ( ); } export type SelectContentProps = SelectPrimitive.Popup.Props & Pick; function SelectContent({ className, side = 'bottom', sideOffset = 4, align = 'start', children, ...props }: SelectContentProps) { const container = usePluginPortalContainer(); return ( {children} ); } export type SelectItemProps = SelectPrimitive.Item.Props; function SelectItem({ className, children, ...props }: SelectItemProps) { return ( {children} ); } /** A single- or multi-value select menu for choosing from known options. */ export const Select = /* @__PURE__ */ Object.assign(SelectRoot, { Trigger: SelectTrigger, Value: SelectValue, Content: SelectContent, Item: SelectItem, });