/** * Internal building blocks shared by Select, FeaturedSelect and Combobox: * the option rows, group headings, loading and empty rows, the clear button * and the popup footer action. Not part of the public API. */ import { Combobox as BaseCombobox } from '@base-ui/react/combobox' import { Select as BaseSelect } from '@base-ui/react/select' import { Check, ChevronDown, LoaderCircle, X } from 'lucide-react' import { Fragment, useId, type ReactNode } from 'react' import { cn } from '../lib/cn' import { focusRing, listItem } from '../lib/styles' import { groupOptions, listClass, type ComboboxGroup, type RenderOption, type SelectActionButton, type SelectOption, type SelectSize, } from './select.tokens' const itemClass = cn(listItem, 'scroll-my-1 py-2 data-selected:font-medium') const groupLabelClass = 'px-2.5 pt-2 pb-1 text-xs font-semibold text-fg-muted select-none' const separatorClass = 'mx-1 my-1 h-px bg-border' const indicatorClass = 'ml-auto flex shrink-0 text-primary-600 dark:text-primary-400 [&_svg]:size-4' export function Chevron() { return