{"version":3,"file":"types.mjs","sources":["../../../packages/select/types.ts"],"sourcesContent":["import { ReactNode, RefObject } from 'react'\nimport { InputProps } from '../input/index.js'\nimport { PopupMenuItemProps } from '../popup-menu/index.js'\nexport type { Theme } from '../theme/index.js'\n\nexport type OptionValue = string | number\nexport type SelectHandleChange = (value: OptionValue) => void\n\nexport enum SelectArrow {\n  small,\n  default,\n}\nexport type SelectArrows = keyof typeof SelectArrow\n\nexport type SelectProps = Omit<\n  InputProps,\n  'type' | 'readonly' | 'onChange' | 'value' | 'defaultValue'\n> & {\n  anchorRef?: RefObject<HTMLElement | null>\n  arrow?: SelectArrows\n  value?: OptionValue\n  defaultValue?: OptionValue\n  onChange: SelectHandleChange\n}\n\nexport type SelectIconProps = Omit<\n  SelectProps,\n  'leftDecorator' | 'fullwidth' | 'arrow'\n> & {\n  icon: ReactNode\n}\n\nexport type OptionProps = Omit<PopupMenuItemProps, 'value' | 'children'> & {\n  value: OptionValue\n  // can't be ReactNode, since it will be stringified later\n  children: string\n  onChange?: SelectHandleChange\n}\n"],"names":["SelectArrow"],"mappings":"AAQYA,IAAAA,WAAW,0BAAXA,WAAW,EAAA;AAAXA,EAAAA,WAAW,CAAXA,WAAW,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAA,CAAA;AAAXA,EAAAA,WAAW,CAAXA,WAAW,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAA,CAAA;AAAA,EAAA,OAAXA,WAAW,CAAA;AAAA,CAAA,CAAA,EAAA;;;;"}