/** * Shared dropdown/combobox height constants (px). * Used by Select and Combobox for consistent trigger, search, option row, * list max-height, and empty-state sizing. */ export const DROPDOWN_SIZE_OPTIONS = ['default', 'sm', 'xs'] as const export type DropdownSize = (typeof DROPDOWN_SIZE_OPTIONS)[number] /** Default size: trigger, search input, and option row height (px). */ export const DROPDOWN_HEIGHT_DEFAULT = 48 /** Row height (px) for sm size. */ export const DROPDOWN_ROW_HEIGHT_SM = 40 /** Row height (px) for xs size. */ export const DROPDOWN_ROW_HEIGHT_XS = 32 /** "No results found" / empty state block height (px) per size. */ export const DROPDOWN_EMPTY_STATE_HEIGHT: Record = { default: 72, sm: 64, xs: 56, } /** Number of option rows visible before scrolling. */ export const DROPDOWN_MAX_VISIBLE_ITEMS = 6 /** Element height (px) per size for trigger, search, option row. */ export const DROPDOWN_ELEMENT_HEIGHT: Record = { default: DROPDOWN_HEIGHT_DEFAULT, sm: DROPDOWN_ROW_HEIGHT_SM, xs: DROPDOWN_ROW_HEIGHT_XS, } /** * List max height = visible rows × element height + compensation for * fixed-size scroll arrows (24px each). Smaller sizes need progressively * more compensation so the last-row crop looks similar to default. */ export const DROPDOWN_LIST_MAX_HEIGHT: Record = { default: DROPDOWN_ELEMENT_HEIGHT.default * DROPDOWN_MAX_VISIBLE_ITEMS, sm: DROPDOWN_ELEMENT_HEIGHT.sm * DROPDOWN_MAX_VISIBLE_ITEMS + 5, xs: DROPDOWN_ELEMENT_HEIGHT.xs * DROPDOWN_MAX_VISIBLE_ITEMS + 8, }