@cube-dev/ui-kit 0.118.0 → 0.119.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1012) hide show
  1. package/dist/CHANGELOG.md +24 -0
  2. package/dist/_internal/hooks/use-chained-callback.js +1 -1
  3. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  4. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  5. package/dist/_internal/hooks/use-event.js +1 -1
  6. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  7. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  8. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  9. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  10. package/dist/_internal/hooks/use-warn.js +1 -1
  11. package/dist/components/Block.d.ts +1 -2
  12. package/dist/components/Block.js +2 -5
  13. package/dist/components/Block.js.map +1 -1
  14. package/dist/components/CollectionItem.js +1 -1
  15. package/dist/components/GlobalStyles.js +2 -3
  16. package/dist/components/GlobalStyles.js.map +1 -1
  17. package/dist/components/GridProvider.d.ts +1 -2
  18. package/dist/components/GridProvider.js +2 -3
  19. package/dist/components/GridProvider.js.map +1 -1
  20. package/dist/components/HiddenInput.js +2 -2
  21. package/dist/components/HiddenInput.js.map +1 -1
  22. package/dist/components/Root.d.ts +1 -2
  23. package/dist/components/Root.js +2 -6
  24. package/dist/components/Root.js.map +1 -1
  25. package/dist/components/actions/Action/Action.d.ts +1 -2
  26. package/dist/components/actions/Action/Action.js +2 -4
  27. package/dist/components/actions/Action/Action.js.map +1 -1
  28. package/dist/components/actions/Banner/Banner.js +2 -2
  29. package/dist/components/actions/Banner/Banner.js.map +1 -1
  30. package/dist/components/actions/Button/Button.d.ts +3 -1769
  31. package/dist/components/actions/Button/Button.js +2 -4
  32. package/dist/components/actions/Button/Button.js.map +1 -1
  33. package/dist/components/actions/ButtonGroup/ButtonGroup.js +2 -2
  34. package/dist/components/actions/ButtonGroup/ButtonGroup.js.map +1 -1
  35. package/dist/components/actions/CommandMenu/CommandMenu.d.ts +1 -3
  36. package/dist/components/actions/CommandMenu/CommandMenu.js +2 -4
  37. package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
  38. package/dist/components/actions/CommandMenu/styled.js +3 -3
  39. package/dist/components/actions/CommandMenu/styled.js.map +1 -1
  40. package/dist/components/actions/ItemAction/ItemAction.d.ts +1 -3
  41. package/dist/components/actions/ItemAction/ItemAction.js +2 -2
  42. package/dist/components/actions/ItemAction/ItemAction.js.map +1 -1
  43. package/dist/components/actions/ItemActionContext.js +1 -1
  44. package/dist/components/actions/ItemButton/ItemButton.d.ts +1 -2
  45. package/dist/components/actions/ItemButton/ItemButton.js +2 -2
  46. package/dist/components/actions/ItemButton/ItemButton.js.map +1 -1
  47. package/dist/components/actions/Link/Link.js +1 -1
  48. package/dist/components/actions/Menu/Menu.d.ts +1 -3
  49. package/dist/components/actions/Menu/Menu.js +2 -4
  50. package/dist/components/actions/Menu/Menu.js.map +1 -1
  51. package/dist/components/actions/Menu/MenuItem.d.ts +1 -2
  52. package/dist/components/actions/Menu/MenuItem.js +1 -1
  53. package/dist/components/actions/Menu/MenuItem.js.map +1 -1
  54. package/dist/components/actions/Menu/MenuSection.d.ts +1 -2
  55. package/dist/components/actions/Menu/MenuSection.js +1 -1
  56. package/dist/components/actions/Menu/MenuSection.js.map +1 -1
  57. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  58. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  59. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  60. package/dist/components/actions/Menu/context.js +1 -1
  61. package/dist/components/actions/Menu/styled.js +2 -2
  62. package/dist/components/actions/Menu/styled.js.map +1 -1
  63. package/dist/components/actions/index.js +1 -1
  64. package/dist/components/actions/use-action.d.ts +1 -2
  65. package/dist/components/actions/use-action.js +2 -2
  66. package/dist/components/actions/use-action.js.map +1 -1
  67. package/dist/components/actions/use-anchored-menu.js +1 -1
  68. package/dist/components/actions/use-context-menu.js +1 -1
  69. package/dist/components/content/ActiveZone/ActiveZone.d.ts +1 -2
  70. package/dist/components/content/ActiveZone/ActiveZone.js +2 -5
  71. package/dist/components/content/ActiveZone/ActiveZone.js.map +1 -1
  72. package/dist/components/content/Alert/Alert.js +2 -2
  73. package/dist/components/content/Alert/Alert.js.map +1 -1
  74. package/dist/components/content/Alert/types.d.ts +1 -2
  75. package/dist/components/content/Alert/use-alert.js +2 -4
  76. package/dist/components/content/Alert/use-alert.js.map +1 -1
  77. package/dist/components/content/Avatar/Avatar.d.ts +1 -3
  78. package/dist/components/content/Avatar/Avatar.js +2 -5
  79. package/dist/components/content/Avatar/Avatar.js.map +1 -1
  80. package/dist/components/content/Badge/Badge.js +2 -2
  81. package/dist/components/content/Badge/Badge.js.map +1 -1
  82. package/dist/components/content/Card/Card.d.ts +1 -2
  83. package/dist/components/content/Card/Card.js +2 -5
  84. package/dist/components/content/Card/Card.js.map +1 -1
  85. package/dist/components/content/Content.d.ts +1 -2
  86. package/dist/components/content/Content.js +2 -5
  87. package/dist/components/content/Content.js.map +1 -1
  88. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.d.ts +1 -3
  89. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +2 -4
  90. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js.map +1 -1
  91. package/dist/components/content/CopySnippet/CopySnippet.js +2 -2
  92. package/dist/components/content/CopySnippet/CopySnippet.js.map +1 -1
  93. package/dist/components/content/Disclosure/Disclosure.d.ts +1 -3
  94. package/dist/components/content/Disclosure/Disclosure.js +3 -4
  95. package/dist/components/content/Disclosure/Disclosure.js.map +1 -1
  96. package/dist/components/content/Divider.d.ts +1 -2
  97. package/dist/components/content/Divider.js +2 -4
  98. package/dist/components/content/Divider.js.map +1 -1
  99. package/dist/components/content/Footer.d.ts +1 -2
  100. package/dist/components/content/Footer.js +2 -5
  101. package/dist/components/content/Footer.js.map +1 -1
  102. package/dist/components/content/Header.d.ts +1 -2
  103. package/dist/components/content/Header.js +2 -5
  104. package/dist/components/content/Header.js.map +1 -1
  105. package/dist/components/content/HotKeys/HotKeys.d.ts +1 -2
  106. package/dist/components/content/HotKeys/HotKeys.js +2 -5
  107. package/dist/components/content/HotKeys/HotKeys.js.map +1 -1
  108. package/dist/components/content/Item/Item.d.ts +1 -3
  109. package/dist/components/content/Item/Item.js +2 -3
  110. package/dist/components/content/Item/Item.js.map +1 -1
  111. package/dist/components/content/ItemBadge/ItemBadge.d.ts +1 -2
  112. package/dist/components/content/ItemBadge/ItemBadge.js +2 -2
  113. package/dist/components/content/ItemBadge/ItemBadge.js.map +1 -1
  114. package/dist/components/content/Layout/GridLayout.d.ts +1 -2
  115. package/dist/components/content/Layout/GridLayout.js +2 -2
  116. package/dist/components/content/Layout/GridLayout.js.map +1 -1
  117. package/dist/components/content/Layout/Layout.d.ts +1 -3
  118. package/dist/components/content/Layout/Layout.js +3 -7
  119. package/dist/components/content/Layout/Layout.js.map +1 -1
  120. package/dist/components/content/Layout/LayoutBlock.js +2 -2
  121. package/dist/components/content/Layout/LayoutBlock.js.map +1 -1
  122. package/dist/components/content/Layout/LayoutCenter.js +2 -2
  123. package/dist/components/content/Layout/LayoutCenter.js.map +1 -1
  124. package/dist/components/content/Layout/LayoutContainer.d.ts +1 -3
  125. package/dist/components/content/Layout/LayoutContainer.js +2 -6
  126. package/dist/components/content/Layout/LayoutContainer.js.map +1 -1
  127. package/dist/components/content/Layout/LayoutContent.d.ts +1 -2
  128. package/dist/components/content/Layout/LayoutContent.js +2 -6
  129. package/dist/components/content/Layout/LayoutContent.js.map +1 -1
  130. package/dist/components/content/Layout/LayoutContext.js +1 -1
  131. package/dist/components/content/Layout/LayoutFlex.js +2 -2
  132. package/dist/components/content/Layout/LayoutFlex.js.map +1 -1
  133. package/dist/components/content/Layout/LayoutFooter.js +2 -2
  134. package/dist/components/content/Layout/LayoutFooter.js.map +1 -1
  135. package/dist/components/content/Layout/LayoutGrid.d.ts +1 -2
  136. package/dist/components/content/Layout/LayoutGrid.js +2 -2
  137. package/dist/components/content/Layout/LayoutGrid.js.map +1 -1
  138. package/dist/components/content/Layout/LayoutHeader.js +2 -2
  139. package/dist/components/content/Layout/LayoutHeader.js.map +1 -1
  140. package/dist/components/content/Layout/LayoutPane.d.ts +1 -3
  141. package/dist/components/content/Layout/LayoutPane.js +2 -6
  142. package/dist/components/content/Layout/LayoutPane.js.map +1 -1
  143. package/dist/components/content/Layout/LayoutPanel.d.ts +1 -3
  144. package/dist/components/content/Layout/LayoutPanel.js +2 -6
  145. package/dist/components/content/Layout/LayoutPanel.js.map +1 -1
  146. package/dist/components/content/Layout/LayoutPanelHeader.d.ts +1 -2
  147. package/dist/components/content/Layout/LayoutPanelHeader.js +2 -4
  148. package/dist/components/content/Layout/LayoutPanelHeader.js.map +1 -1
  149. package/dist/components/content/Layout/LayoutToolbar.js +2 -2
  150. package/dist/components/content/Layout/LayoutToolbar.js.map +1 -1
  151. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  152. package/dist/components/content/Layout/index.js +1 -1
  153. package/dist/components/content/Layout/utils.js +1 -1
  154. package/dist/components/content/Paragraph.d.ts +1 -2
  155. package/dist/components/content/Paragraph.js +2 -3
  156. package/dist/components/content/Paragraph.js.map +1 -1
  157. package/dist/components/content/Placeholder/Placeholder.d.ts +1 -3
  158. package/dist/components/content/Placeholder/Placeholder.js +2 -6
  159. package/dist/components/content/Placeholder/Placeholder.js.map +1 -1
  160. package/dist/components/content/PrismCode/PrismCode.d.ts +1 -3
  161. package/dist/components/content/PrismCode/PrismCode.js +2 -3
  162. package/dist/components/content/PrismCode/PrismCode.js.map +1 -1
  163. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  164. package/dist/components/content/PrismDiffCode/PrismDiffCode.d.ts +1 -3
  165. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  166. package/dist/components/content/PrismDiffCode/PrismDiffCode.js.map +1 -1
  167. package/dist/components/content/Result/Result.d.ts +1 -2
  168. package/dist/components/content/Result/Result.js +2 -5
  169. package/dist/components/content/Result/Result.js.map +1 -1
  170. package/dist/components/content/Skeleton/Skeleton.d.ts +1 -2
  171. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  172. package/dist/components/content/Skeleton/Skeleton.js.map +1 -1
  173. package/dist/components/content/Tag/Tag.d.ts +1 -2
  174. package/dist/components/content/Tag/Tag.js +2 -2
  175. package/dist/components/content/Tag/Tag.js.map +1 -1
  176. package/dist/components/content/Text.d.ts +128 -159
  177. package/dist/components/content/Text.js +2 -5
  178. package/dist/components/content/Text.js.map +1 -1
  179. package/dist/components/content/TextItem/TextItem.d.ts +1 -2
  180. package/dist/components/content/TextItem/TextItem.js +2 -5
  181. package/dist/components/content/TextItem/TextItem.js.map +1 -1
  182. package/dist/components/content/Title.d.ts +1 -2
  183. package/dist/components/content/Title.js +2 -5
  184. package/dist/components/content/Title.js.map +1 -1
  185. package/dist/components/content/highlightText.js +1 -1
  186. package/dist/components/content/highlightText.js.map +1 -1
  187. package/dist/components/content/use-auto-tooltip.d.ts +1 -1
  188. package/dist/components/content/use-auto-tooltip.js +1 -1
  189. package/dist/components/content/use-auto-tooltip.js.map +1 -1
  190. package/dist/components/fields/Checkbox/Checkbox.d.ts +1 -3
  191. package/dist/components/fields/Checkbox/Checkbox.js +2 -5
  192. package/dist/components/fields/Checkbox/Checkbox.js.map +1 -1
  193. package/dist/components/fields/Checkbox/CheckboxGroup.d.ts +1 -3
  194. package/dist/components/fields/Checkbox/CheckboxGroup.js +2 -4
  195. package/dist/components/fields/Checkbox/CheckboxGroup.js.map +1 -1
  196. package/dist/components/fields/Checkbox/context.js +1 -1
  197. package/dist/components/fields/ComboBox/ComboBox.d.ts +1 -3
  198. package/dist/components/fields/ComboBox/ComboBox.js +2 -4
  199. package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
  200. package/dist/components/fields/DatePicker/DateInput.d.ts +1 -3
  201. package/dist/components/fields/DatePicker/DateInput.js +2 -3
  202. package/dist/components/fields/DatePicker/DateInput.js.map +1 -1
  203. package/dist/components/fields/DatePicker/DateInputBase.js +2 -4
  204. package/dist/components/fields/DatePicker/DateInputBase.js.map +1 -1
  205. package/dist/components/fields/DatePicker/DatePicker.d.ts +1 -3
  206. package/dist/components/fields/DatePicker/DatePicker.js +2 -3
  207. package/dist/components/fields/DatePicker/DatePicker.js.map +1 -1
  208. package/dist/components/fields/DatePicker/DatePickerButton.js +2 -2
  209. package/dist/components/fields/DatePicker/DatePickerButton.js.map +1 -1
  210. package/dist/components/fields/DatePicker/DatePickerElement.js +2 -2
  211. package/dist/components/fields/DatePicker/DatePickerElement.js.map +1 -1
  212. package/dist/components/fields/DatePicker/DatePickerInput.js +2 -2
  213. package/dist/components/fields/DatePicker/DatePickerInput.js.map +1 -1
  214. package/dist/components/fields/DatePicker/DatePickerSegment.js +2 -2
  215. package/dist/components/fields/DatePicker/DatePickerSegment.js.map +1 -1
  216. package/dist/components/fields/DatePicker/DateRangePicker.d.ts +1 -3
  217. package/dist/components/fields/DatePicker/DateRangePicker.js +2 -4
  218. package/dist/components/fields/DatePicker/DateRangePicker.js.map +1 -1
  219. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.d.ts +1 -3
  220. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +2 -4
  221. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js.map +1 -1
  222. package/dist/components/fields/DatePicker/TimeInput.d.ts +1 -3
  223. package/dist/components/fields/DatePicker/TimeInput.js +2 -3
  224. package/dist/components/fields/DatePicker/TimeInput.js.map +1 -1
  225. package/dist/components/fields/DatePicker/intl.js +1 -1
  226. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  227. package/dist/components/fields/DatePicker/props.js +1 -1
  228. package/dist/components/fields/DatePicker/utils.js +1 -1
  229. package/dist/components/fields/FileInput/FileInput.d.ts +1 -3
  230. package/dist/components/fields/FileInput/FileInput.js +2 -4
  231. package/dist/components/fields/FileInput/FileInput.js.map +1 -1
  232. package/dist/components/fields/FilterListBox/FilterListBox.d.ts +1 -2
  233. package/dist/components/fields/FilterListBox/FilterListBox.js +5 -7
  234. package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
  235. package/dist/components/fields/FilterPicker/FilterPicker.d.ts +1 -3
  236. package/dist/components/fields/FilterPicker/FilterPicker.js +2 -5
  237. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  238. package/dist/components/fields/Input/Input.js +1 -1
  239. package/dist/components/fields/ListBox/ListBox.d.ts +1 -3
  240. package/dist/components/fields/ListBox/ListBox.js +2 -5
  241. package/dist/components/fields/ListBox/ListBox.js.map +1 -1
  242. package/dist/components/fields/NumberInput/NumberInput.js +2 -2
  243. package/dist/components/fields/NumberInput/NumberInput.js.map +1 -1
  244. package/dist/components/fields/NumberInput/StepButton.js +2 -2
  245. package/dist/components/fields/NumberInput/StepButton.js.map +1 -1
  246. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  247. package/dist/components/fields/Picker/Picker.d.ts +1 -3
  248. package/dist/components/fields/Picker/Picker.js +2 -5
  249. package/dist/components/fields/Picker/Picker.js.map +1 -1
  250. package/dist/components/fields/RadioGroup/Radio.d.ts +1 -2
  251. package/dist/components/fields/RadioGroup/Radio.js +2 -5
  252. package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
  253. package/dist/components/fields/RadioGroup/RadioGroup.d.ts +1 -3
  254. package/dist/components/fields/RadioGroup/RadioGroup.js +2 -4
  255. package/dist/components/fields/RadioGroup/RadioGroup.js.map +1 -1
  256. package/dist/components/fields/RadioGroup/context.js +1 -1
  257. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  258. package/dist/components/fields/Select/Select.d.ts +834 -836
  259. package/dist/components/fields/Select/Select.js +2 -4
  260. package/dist/components/fields/Select/Select.js.map +1 -1
  261. package/dist/components/fields/Slider/Gradation.js +1 -1
  262. package/dist/components/fields/Slider/HueSlider.js +1 -1
  263. package/dist/components/fields/Slider/HueSlider.js.map +1 -1
  264. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  265. package/dist/components/fields/Slider/Slider.d.ts +1 -3
  266. package/dist/components/fields/Slider/Slider.js +2 -3
  267. package/dist/components/fields/Slider/Slider.js.map +1 -1
  268. package/dist/components/fields/Slider/SliderBase.js +2 -4
  269. package/dist/components/fields/Slider/SliderBase.js.map +1 -1
  270. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  271. package/dist/components/fields/Slider/SliderThumb.js.map +1 -1
  272. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  273. package/dist/components/fields/Slider/SliderTrack.js.map +1 -1
  274. package/dist/components/fields/Slider/elements.js +2 -2
  275. package/dist/components/fields/Slider/elements.js.map +1 -1
  276. package/dist/components/fields/Slider/index.js +1 -1
  277. package/dist/components/fields/Slider/types.d.ts +1 -3
  278. package/dist/components/fields/Switch/Switch.d.ts +1 -3
  279. package/dist/components/fields/Switch/Switch.js +2 -4
  280. package/dist/components/fields/Switch/Switch.js.map +1 -1
  281. package/dist/components/fields/TextArea/TextArea.js +1 -1
  282. package/dist/components/fields/TextInput/TextInput.js +1 -1
  283. package/dist/components/fields/TextInput/TextInputBase.d.ts +1 -3
  284. package/dist/components/fields/TextInput/TextInputBase.js +3 -5
  285. package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
  286. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  287. package/dist/components/form/FieldWrapper/FieldWrapper.js +2 -2
  288. package/dist/components/form/FieldWrapper/FieldWrapper.js.map +1 -1
  289. package/dist/components/form/FieldWrapper/extract-field-wrapper-props.js +1 -1
  290. package/dist/components/form/FieldWrapper/types.d.ts +1 -3
  291. package/dist/components/form/Form/Field.d.ts +1 -2
  292. package/dist/components/form/Form/Field.js +1 -1
  293. package/dist/components/form/Form/Field.js.map +1 -1
  294. package/dist/components/form/Form/Form.d.ts +1 -3
  295. package/dist/components/form/Form/Form.js +2 -5
  296. package/dist/components/form/Form/Form.js.map +1 -1
  297. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  298. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  299. package/dist/components/form/Form/SubmitError.js +1 -1
  300. package/dist/components/form/Form/index.js +1 -1
  301. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  302. package/dist/components/form/Form/use-field/use-field.js +1 -1
  303. package/dist/components/form/Form/use-form.js +2 -2
  304. package/dist/components/form/Form/use-form.js.map +1 -1
  305. package/dist/components/form/Form/validation.js +1 -1
  306. package/dist/components/form/Label.d.ts +1 -3
  307. package/dist/components/form/Label.js +2 -5
  308. package/dist/components/form/Label.js.map +1 -1
  309. package/dist/components/form/wrapper.d.ts +1 -2
  310. package/dist/components/form/wrapper.js +1 -1
  311. package/dist/components/form/wrapper.js.map +1 -1
  312. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  313. package/dist/components/helpers/IconSwitch/IconSwitch.js +2 -2
  314. package/dist/components/helpers/IconSwitch/IconSwitch.js.map +1 -1
  315. package/dist/components/layout/Flex.d.ts +1 -2
  316. package/dist/components/layout/Flex.js +2 -5
  317. package/dist/components/layout/Flex.js.map +1 -1
  318. package/dist/components/layout/Flow.d.ts +1 -2
  319. package/dist/components/layout/Flow.js +2 -5
  320. package/dist/components/layout/Flow.js.map +1 -1
  321. package/dist/components/layout/Grid.d.ts +1 -2
  322. package/dist/components/layout/Grid.js +2 -5
  323. package/dist/components/layout/Grid.js.map +1 -1
  324. package/dist/components/layout/Panel.d.ts +1 -3
  325. package/dist/components/layout/Panel.js +2 -3
  326. package/dist/components/layout/Panel.js.map +1 -1
  327. package/dist/components/layout/Prefix.d.ts +1 -2
  328. package/dist/components/layout/Prefix.js +2 -5
  329. package/dist/components/layout/Prefix.js.map +1 -1
  330. package/dist/components/layout/ResizablePanel.d.ts +1 -2
  331. package/dist/components/layout/ResizablePanel.js +2 -2
  332. package/dist/components/layout/ResizablePanel.js.map +1 -1
  333. package/dist/components/layout/Space.d.ts +1 -2
  334. package/dist/components/layout/Space.js +2 -5
  335. package/dist/components/layout/Space.js.map +1 -1
  336. package/dist/components/layout/Suffix.d.ts +1 -2
  337. package/dist/components/layout/Suffix.js +2 -5
  338. package/dist/components/layout/Suffix.js.map +1 -1
  339. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  340. package/dist/components/navigation/Tabs/EditableTitle.js +1 -1
  341. package/dist/components/navigation/Tabs/TabButton.js +1 -1
  342. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  343. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  344. package/dist/components/navigation/Tabs/TabPanel.js.map +1 -1
  345. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  346. package/dist/components/navigation/Tabs/Tabs.js +2 -4
  347. package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
  348. package/dist/components/navigation/Tabs/TabsAction.js +2 -2
  349. package/dist/components/navigation/Tabs/TabsAction.js.map +1 -1
  350. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  351. package/dist/components/navigation/Tabs/styled.js +2 -2
  352. package/dist/components/navigation/Tabs/styled.js.map +1 -1
  353. package/dist/components/navigation/Tabs/types.d.ts +1 -3
  354. package/dist/components/navigation/Tabs/types.js +1 -1
  355. package/dist/components/navigation/Tabs/types.js.map +1 -1
  356. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  357. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  358. package/dist/components/organisms/FileTabs/FileTabs.d.ts +1 -2
  359. package/dist/components/organisms/FileTabs/FileTabs.js +2 -2
  360. package/dist/components/organisms/FileTabs/FileTabs.js.map +1 -1
  361. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  362. package/dist/components/other/Calendar/Calendar.js +2 -2
  363. package/dist/components/other/Calendar/Calendar.js.map +1 -1
  364. package/dist/components/other/Calendar/CalendarCell.js +2 -2
  365. package/dist/components/other/Calendar/CalendarCell.js.map +1 -1
  366. package/dist/components/other/Calendar/CalendarGrid.js +2 -2
  367. package/dist/components/other/Calendar/CalendarGrid.js.map +1 -1
  368. package/dist/components/other/Calendar/RangeCalendar.js +2 -2
  369. package/dist/components/other/Calendar/RangeCalendar.js.map +1 -1
  370. package/dist/components/other/CloudLogo/CloudLogo.js +2 -2
  371. package/dist/components/other/CloudLogo/CloudLogo.js.map +1 -1
  372. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  373. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  374. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  375. package/dist/components/overlays/AlertDialog/types.d.ts +1 -1
  376. package/dist/components/overlays/Dialog/Dialog.d.ts +1 -3
  377. package/dist/components/overlays/Dialog/Dialog.js +2 -4
  378. package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
  379. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  380. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  381. package/dist/components/overlays/Dialog/DialogTrigger.d.ts +1 -2
  382. package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
  383. package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
  384. package/dist/components/overlays/Dialog/context.js +1 -1
  385. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  386. package/dist/components/overlays/Modal/Modal.d.ts +3 -2
  387. package/dist/components/overlays/Modal/Modal.js +2 -2
  388. package/dist/components/overlays/Modal/Modal.js.map +1 -1
  389. package/dist/components/overlays/Modal/OpenTransition.js +1 -1
  390. package/dist/components/overlays/Modal/Overlay.d.ts +1 -0
  391. package/dist/components/overlays/Modal/Overlay.js +1 -1
  392. package/dist/components/overlays/Modal/Overlay.js.map +1 -1
  393. package/dist/components/overlays/Modal/Popover.d.ts +1 -1
  394. package/dist/components/overlays/Modal/Popover.js +2 -2
  395. package/dist/components/overlays/Modal/Popover.js.map +1 -1
  396. package/dist/components/overlays/Modal/Tray.d.ts +1 -1
  397. package/dist/components/overlays/Modal/Tray.js +2 -2
  398. package/dist/components/overlays/Modal/Tray.js.map +1 -1
  399. package/dist/components/overlays/Modal/Underlay.js +2 -2
  400. package/dist/components/overlays/Modal/Underlay.js.map +1 -1
  401. package/dist/components/overlays/Notifications/Notification.js +1 -1
  402. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  403. package/dist/components/overlays/Notifications/NotificationCard.js +2 -2
  404. package/dist/components/overlays/Notifications/NotificationCard.js.map +1 -1
  405. package/dist/components/overlays/Notifications/NotificationContext.d.ts +2 -0
  406. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  407. package/dist/components/overlays/Notifications/NotificationItem.js +2 -2
  408. package/dist/components/overlays/Notifications/NotificationItem.js.map +1 -1
  409. package/dist/components/overlays/Notifications/OverlayContainer.js +2 -2
  410. package/dist/components/overlays/Notifications/OverlayContainer.js.map +1 -1
  411. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  412. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +2 -2
  413. package/dist/components/overlays/Notifications/PersistentNotificationsList.js.map +1 -1
  414. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  415. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  416. package/dist/components/overlays/Notifications/index.js +1 -1
  417. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  418. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  419. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  420. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  421. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  422. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  423. package/dist/components/overlays/Toast/ToastItem.js +2 -2
  424. package/dist/components/overlays/Toast/ToastItem.js.map +1 -1
  425. package/dist/components/overlays/Toast/index.js +1 -1
  426. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  427. package/dist/components/overlays/Toast/useToast.js +2 -2
  428. package/dist/components/overlays/Tooltip/Tooltip.d.ts +1 -3
  429. package/dist/components/overlays/Tooltip/Tooltip.js +2 -4
  430. package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
  431. package/dist/components/overlays/Tooltip/TooltipProvider.d.ts +1 -2
  432. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  433. package/dist/components/overlays/Tooltip/TooltipProvider.js.map +1 -1
  434. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  435. package/dist/components/overlays/Tooltip/context.js +1 -1
  436. package/dist/components/overlays/Tooltip/context.js.map +1 -1
  437. package/dist/components/portal/Portal.js +1 -1
  438. package/dist/components/portal/PortalProvider.d.ts +2 -0
  439. package/dist/components/portal/PortalProvider.js +1 -1
  440. package/dist/components/portal/index.d.ts +1 -0
  441. package/dist/components/portal/usePortal.js +1 -1
  442. package/dist/components/shared/InvalidIcon.js +1 -1
  443. package/dist/components/shared/ValidIcon.js +1 -1
  444. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +2 -2
  445. package/dist/components/status/LoadingAnimation/LoadingAnimation.js.map +1 -1
  446. package/dist/components/status/Spin/Cube.js +2 -2
  447. package/dist/components/status/Spin/Cube.js.map +1 -1
  448. package/dist/components/status/Spin/InternalSpinner.js +2 -2
  449. package/dist/components/status/Spin/InternalSpinner.js.map +1 -1
  450. package/dist/components/status/Spin/Spin.js +2 -2
  451. package/dist/components/status/Spin/Spin.js.map +1 -1
  452. package/dist/components/status/Spin/SpinsContainer.js +2 -2
  453. package/dist/components/status/Spin/SpinsContainer.js.map +1 -1
  454. package/dist/components/status/Spin/types.d.ts +1 -2
  455. package/dist/data/item-themes.d.ts +1 -1
  456. package/dist/data/item-themes.js +1 -1
  457. package/dist/data/item-themes.js.map +1 -1
  458. package/dist/data/themes.js +1 -1
  459. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  460. package/dist/icons/AdjustmentsIcon.js +1 -1
  461. package/dist/icons/AiIcon.js +1 -1
  462. package/dist/icons/AreaChartIcon.js +1 -1
  463. package/dist/icons/BackwardIcon.js +1 -1
  464. package/dist/icons/BarChartIcon.js +1 -1
  465. package/dist/icons/BellFilledIcon.js +1 -1
  466. package/dist/icons/BellIcon.js +1 -1
  467. package/dist/icons/BooleanIcon.js +1 -1
  468. package/dist/icons/CalendarEditIcon.js +1 -1
  469. package/dist/icons/CalendarIcon.js +1 -1
  470. package/dist/icons/CaretDownIcon.js +1 -1
  471. package/dist/icons/CaretUpIcon.js +1 -1
  472. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  473. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  474. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  475. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  476. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  477. package/dist/icons/ChartBarLineIcon.js +1 -1
  478. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  479. package/dist/icons/ChartBarStackedIcon.js +1 -1
  480. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  481. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  482. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  483. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  484. package/dist/icons/ChartBubbleIcon.js +1 -1
  485. package/dist/icons/ChartDonut2Icon.js +1 -1
  486. package/dist/icons/ChartFunnelIcon.js +1 -1
  487. package/dist/icons/ChartHeatmapIcon.js +1 -1
  488. package/dist/icons/ChartKPIIcon.js +1 -1
  489. package/dist/icons/ChartPie2Icon.js +1 -1
  490. package/dist/icons/ChartScatterIcon.js +1 -1
  491. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  492. package/dist/icons/CheckCircleIcon.js +1 -1
  493. package/dist/icons/CheckIcon.js +1 -1
  494. package/dist/icons/CircleFilledIcon.js +1 -1
  495. package/dist/icons/ClearIcon.js +1 -1
  496. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  497. package/dist/icons/CloseCircleIcon.js +1 -1
  498. package/dist/icons/CloseIcon.js +1 -1
  499. package/dist/icons/CodeIcon.js +1 -1
  500. package/dist/icons/ColumnTotalIcon.js +1 -1
  501. package/dist/icons/CopyIcon.js +1 -1
  502. package/dist/icons/CountIcon.js +1 -1
  503. package/dist/icons/CubeIcon.js +1 -1
  504. package/dist/icons/CubePauseIcon.js +1 -1
  505. package/dist/icons/CubePlayIcon.js +1 -1
  506. package/dist/icons/CurrencyDollarIcon.js +1 -1
  507. package/dist/icons/DangerIcon.js +1 -1
  508. package/dist/icons/DashboardIcon.js +1 -1
  509. package/dist/icons/DatabaseIcon.js +1 -1
  510. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  511. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  512. package/dist/icons/DirectionIcon.js +2 -2
  513. package/dist/icons/DirectionIcon.js.map +1 -1
  514. package/dist/icons/DonutIcon.js +1 -1
  515. package/dist/icons/DownIcon.js +1 -1
  516. package/dist/icons/EditIcon.js +1 -1
  517. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  518. package/dist/icons/ExclamationCircleIcon.js +1 -1
  519. package/dist/icons/ExclamationIcon.js +1 -1
  520. package/dist/icons/EyeIcon.js +1 -1
  521. package/dist/icons/EyeInvisibleIcon.js +1 -1
  522. package/dist/icons/FilterIcon.js +1 -1
  523. package/dist/icons/FolderFilledIcon.js +1 -1
  524. package/dist/icons/FolderIcon.js +1 -1
  525. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  526. package/dist/icons/FolderOpenIcon.js +1 -1
  527. package/dist/icons/ForwardIcon.js +1 -1
  528. package/dist/icons/HierarchyIcon.js +1 -1
  529. package/dist/icons/HierarchyOpenIcon.js +1 -1
  530. package/dist/icons/Icon.d.ts +1 -3
  531. package/dist/icons/Icon.js +2 -3
  532. package/dist/icons/Icon.js.map +1 -1
  533. package/dist/icons/InfoCircleIcon.js +1 -1
  534. package/dist/icons/InfoIcon.js +1 -1
  535. package/dist/icons/KeyIcon.js +1 -1
  536. package/dist/icons/LeftIcon.js +1 -1
  537. package/dist/icons/LineChartIcon.js +1 -1
  538. package/dist/icons/LoadingIcon.js +1 -1
  539. package/dist/icons/LockFilledIcon.js +1 -1
  540. package/dist/icons/LockIcon.js +1 -1
  541. package/dist/icons/MoreIcon.js +1 -1
  542. package/dist/icons/NotAllowedIcon.js +1 -1
  543. package/dist/icons/Number123Icon.js +1 -1
  544. package/dist/icons/NumberIcon.js +1 -1
  545. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  546. package/dist/icons/PauseCircleIcon.js +1 -1
  547. package/dist/icons/PauseIcon.js +1 -1
  548. package/dist/icons/PercentageIcon.js +1 -1
  549. package/dist/icons/PieChartIcon.js +1 -1
  550. package/dist/icons/PlayCircleIcon.js +1 -1
  551. package/dist/icons/PlayIcon.js +1 -1
  552. package/dist/icons/PlusIcon.js +1 -1
  553. package/dist/icons/ProgressBarIcon.js +1 -1
  554. package/dist/icons/ReloadIcon.js +1 -1
  555. package/dist/icons/ReportIcon.js +1 -1
  556. package/dist/icons/ReturnIcon.js +1 -1
  557. package/dist/icons/RightIcon.js +1 -1
  558. package/dist/icons/RowTotalsIcon.js +1 -1
  559. package/dist/icons/SchemeIcon.js +1 -1
  560. package/dist/icons/SearchIcon.js +1 -1
  561. package/dist/icons/SemanticQueryIcon.js +1 -1
  562. package/dist/icons/SettingsIcon.js +1 -1
  563. package/dist/icons/ShieldFilledIcon.js +1 -1
  564. package/dist/icons/ShieldIcon.js +1 -1
  565. package/dist/icons/SlashIcon.js +1 -1
  566. package/dist/icons/SparklesIcon.js +1 -1
  567. package/dist/icons/SqlIcon.js +1 -1
  568. package/dist/icons/StatsIcon.js +1 -1
  569. package/dist/icons/StopIcon.js +1 -1
  570. package/dist/icons/StringIcon.js +1 -1
  571. package/dist/icons/SubtotalsIcon.js +1 -1
  572. package/dist/icons/SwitchIcon.js +1 -1
  573. package/dist/icons/TableIcon.js +1 -1
  574. package/dist/icons/ThumbsDownIcon.js +1 -1
  575. package/dist/icons/ThumbsUpIcon.js +1 -1
  576. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  577. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  578. package/dist/icons/ThunderboltIcon.js +1 -1
  579. package/dist/icons/TimeIcon.js +1 -1
  580. package/dist/icons/TrashIcon.js +1 -1
  581. package/dist/icons/UnlockIcon.js +1 -1
  582. package/dist/icons/UpIcon.js +1 -1
  583. package/dist/icons/UserGroupIcon.js +1 -1
  584. package/dist/icons/UserIcon.js +1 -1
  585. package/dist/icons/UserLockIcon.js +1 -1
  586. package/dist/icons/ViewIcon.js +1 -1
  587. package/dist/icons/WarningFilledIcon.js +1 -1
  588. package/dist/icons/WarningIcon.js +1 -1
  589. package/dist/icons/wrap-icon.js +1 -1
  590. package/dist/index.d.ts +4 -35
  591. package/dist/index.js +5 -31
  592. package/dist/index.js.map +1 -1
  593. package/dist/provider.d.ts +1 -2
  594. package/dist/provider.js +1 -1
  595. package/dist/provider.js.map +1 -1
  596. package/dist/providers/TrackingProvider.js +1 -1
  597. package/dist/providers/navigationAdapter.default.js +1 -1
  598. package/dist/shared/form.d.ts +1 -3
  599. package/dist/tokens/base.d.ts +1 -1
  600. package/dist/tokens/base.js +1 -1
  601. package/dist/tokens/base.js.map +1 -1
  602. package/dist/tokens/colors.d.ts +1 -1
  603. package/dist/tokens/colors.js +1 -1
  604. package/dist/tokens/colors.js.map +1 -1
  605. package/dist/tokens/index.d.ts +1 -2
  606. package/dist/tokens/index.js +2 -3
  607. package/dist/tokens/index.js.map +1 -1
  608. package/dist/tokens/layout.d.ts +1 -1
  609. package/dist/tokens/layout.js +1 -1
  610. package/dist/tokens/layout.js.map +1 -1
  611. package/dist/tokens/shadows.d.ts +1 -1
  612. package/dist/tokens/shadows.js +1 -1
  613. package/dist/tokens/shadows.js.map +1 -1
  614. package/dist/tokens/sizes.d.ts +1 -1
  615. package/dist/tokens/sizes.js +1 -1
  616. package/dist/tokens/sizes.js.map +1 -1
  617. package/dist/tokens/spacing.d.ts +1 -1
  618. package/dist/tokens/spacing.js +1 -1
  619. package/dist/tokens/spacing.js.map +1 -1
  620. package/dist/utils/ResizeSensor.js +1 -1
  621. package/dist/utils/index.d.ts +1 -2
  622. package/dist/utils/is-dev-env.js +5 -10
  623. package/dist/utils/is-dev-env.js.map +1 -1
  624. package/dist/utils/modules.js +1 -1
  625. package/dist/utils/promise.js +1 -1
  626. package/dist/utils/raf.js +1 -1
  627. package/dist/utils/random.js +1 -1
  628. package/dist/utils/range.js +1 -1
  629. package/dist/utils/react/RenderCache.js +1 -1
  630. package/dist/utils/react/Slots.js +1 -1
  631. package/dist/utils/react/chain.js +1 -1
  632. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  633. package/dist/utils/react/index.d.ts +3 -3
  634. package/dist/utils/react/index.js +20 -0
  635. package/dist/utils/react/interactions.js +1 -1
  636. package/dist/utils/react/isTextOnly.js +1 -1
  637. package/dist/utils/react/mapProps.js +1 -1
  638. package/dist/utils/react/mergeProps.d.ts +1 -2
  639. package/dist/utils/react/mergeProps.js +2 -2
  640. package/dist/utils/react/mergeProps.js.map +1 -1
  641. package/dist/utils/react/nullableValue.d.ts +1 -2
  642. package/dist/utils/react/nullableValue.js +1 -1
  643. package/dist/utils/react/nullableValue.js.map +1 -1
  644. package/dist/utils/react/resolveIcon.d.ts +1 -2
  645. package/dist/utils/react/resolveIcon.js +1 -1
  646. package/dist/utils/react/resolveIcon.js.map +1 -1
  647. package/dist/utils/react/sharedStore.js +1 -1
  648. package/dist/utils/react/useCombinedRefs.js +1 -1
  649. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  650. package/dist/utils/react/useEventBus.js +1 -1
  651. package/dist/utils/react/useId.js +1 -1
  652. package/dist/utils/react/useIsDarwin.js +1 -1
  653. package/dist/utils/react/useKeySymbols.js +1 -1
  654. package/dist/utils/react/useLayoutEffect.js +1 -1
  655. package/dist/utils/react/useLocalStorage.js +1 -1
  656. package/dist/utils/react/useMergeStyles.d.ts +1 -2
  657. package/dist/utils/react/useMergeStyles.js +2 -2
  658. package/dist/utils/react/useMergeStyles.js.map +1 -1
  659. package/dist/utils/react/useQaProps.js +1 -1
  660. package/dist/utils/react/useViewportSize.js +1 -1
  661. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  662. package/dist/utils/tree.js +1 -1
  663. package/dist/utils/warnings.js +1 -1
  664. package/dist/version.js +2 -2
  665. package/package.json +4 -21
  666. package/dist/_virtual/_rolldown/runtime.js +0 -8
  667. package/dist/chunks/cacheKey.js +0 -71
  668. package/dist/chunks/cacheKey.js.map +0 -1
  669. package/dist/chunks/definitions.js +0 -261
  670. package/dist/chunks/definitions.js.map +0 -1
  671. package/dist/chunks/renderChunk.js +0 -68
  672. package/dist/chunks/renderChunk.js.map +0 -1
  673. package/dist/config.js +0 -232
  674. package/dist/config.js.map +0 -1
  675. package/dist/css-writer.d.ts +0 -46
  676. package/dist/css-writer.js +0 -75
  677. package/dist/css-writer.js.map +0 -1
  678. package/dist/extractor.d.ts +0 -25
  679. package/dist/extractor.js +0 -151
  680. package/dist/extractor.js.map +0 -1
  681. package/dist/injector/injector.js +0 -401
  682. package/dist/injector/injector.js.map +0 -1
  683. package/dist/injector/sheet-manager.js +0 -715
  684. package/dist/injector/sheet-manager.js.map +0 -1
  685. package/dist/injector/types.d.ts +0 -19
  686. package/dist/keyframes/index.js +0 -157
  687. package/dist/keyframes/index.js.map +0 -1
  688. package/dist/parser/classify.js +0 -320
  689. package/dist/parser/classify.js.map +0 -1
  690. package/dist/parser/const.js +0 -34
  691. package/dist/parser/const.js.map +0 -1
  692. package/dist/parser/lru.js +0 -110
  693. package/dist/parser/lru.js.map +0 -1
  694. package/dist/parser/parser.js +0 -117
  695. package/dist/parser/parser.js.map +0 -1
  696. package/dist/parser/tokenizer.js +0 -70
  697. package/dist/parser/tokenizer.js.map +0 -1
  698. package/dist/parser/types.d.ts +0 -38
  699. package/dist/parser/types.js +0 -47
  700. package/dist/parser/types.js.map +0 -1
  701. package/dist/pipeline/conditions.js +0 -378
  702. package/dist/pipeline/conditions.js.map +0 -1
  703. package/dist/pipeline/exclusive.js +0 -232
  704. package/dist/pipeline/exclusive.js.map +0 -1
  705. package/dist/pipeline/index.js +0 -633
  706. package/dist/pipeline/index.js.map +0 -1
  707. package/dist/pipeline/materialize.js +0 -822
  708. package/dist/pipeline/materialize.js.map +0 -1
  709. package/dist/pipeline/parseStateKey.js +0 -422
  710. package/dist/pipeline/parseStateKey.js.map +0 -1
  711. package/dist/pipeline/simplify.js +0 -558
  712. package/dist/pipeline/simplify.js.map +0 -1
  713. package/dist/plugins/okhsl-plugin.js +0 -346
  714. package/dist/plugins/okhsl-plugin.js.map +0 -1
  715. package/dist/plugins/types.d.ts +0 -52
  716. package/dist/properties/index.js +0 -142
  717. package/dist/properties/index.js.map +0 -1
  718. package/dist/states/index.js +0 -162
  719. package/dist/states/index.js.map +0 -1
  720. package/dist/styles/align.js +0 -15
  721. package/dist/styles/align.js.map +0 -1
  722. package/dist/styles/border.js +0 -115
  723. package/dist/styles/border.js.map +0 -1
  724. package/dist/styles/color.js +0 -24
  725. package/dist/styles/color.js.map +0 -1
  726. package/dist/styles/createStyle.js +0 -78
  727. package/dist/styles/createStyle.js.map +0 -1
  728. package/dist/styles/dimension.js +0 -100
  729. package/dist/styles/dimension.js.map +0 -1
  730. package/dist/styles/display.js +0 -68
  731. package/dist/styles/display.js.map +0 -1
  732. package/dist/styles/fade.js +0 -58
  733. package/dist/styles/fade.js.map +0 -1
  734. package/dist/styles/fill.js +0 -52
  735. package/dist/styles/fill.js.map +0 -1
  736. package/dist/styles/flow.js +0 -13
  737. package/dist/styles/flow.js.map +0 -1
  738. package/dist/styles/gap.js +0 -37
  739. package/dist/styles/gap.js.map +0 -1
  740. package/dist/styles/height.js +0 -21
  741. package/dist/styles/height.js.map +0 -1
  742. package/dist/styles/index.js +0 -10
  743. package/dist/styles/index.js.map +0 -1
  744. package/dist/styles/inset.js +0 -143
  745. package/dist/styles/inset.js.map +0 -1
  746. package/dist/styles/justify.js +0 -15
  747. package/dist/styles/justify.js.map +0 -1
  748. package/dist/styles/margin.js +0 -97
  749. package/dist/styles/margin.js.map +0 -1
  750. package/dist/styles/outline.js +0 -66
  751. package/dist/styles/outline.js.map +0 -1
  752. package/dist/styles/padding.js +0 -97
  753. package/dist/styles/padding.js.map +0 -1
  754. package/dist/styles/predefined.js +0 -233
  755. package/dist/styles/predefined.js.map +0 -1
  756. package/dist/styles/preset.js +0 -126
  757. package/dist/styles/preset.js.map +0 -1
  758. package/dist/styles/radius.js +0 -52
  759. package/dist/styles/radius.js.map +0 -1
  760. package/dist/styles/scrollbar.js +0 -109
  761. package/dist/styles/scrollbar.js.map +0 -1
  762. package/dist/styles/shadow.js +0 -28
  763. package/dist/styles/shadow.js.map +0 -1
  764. package/dist/styles/styledScrollbar.js +0 -39
  765. package/dist/styles/styledScrollbar.js.map +0 -1
  766. package/dist/styles/transition.js +0 -139
  767. package/dist/styles/transition.js.map +0 -1
  768. package/dist/styles/types.d.ts +0 -495
  769. package/dist/styles/width.js +0 -21
  770. package/dist/styles/width.js.map +0 -1
  771. package/dist/tasty/chunks/cacheKey.js +0 -71
  772. package/dist/tasty/chunks/cacheKey.js.map +0 -1
  773. package/dist/tasty/chunks/definitions.d.ts +0 -38
  774. package/dist/tasty/chunks/definitions.js +0 -261
  775. package/dist/tasty/chunks/definitions.js.map +0 -1
  776. package/dist/tasty/chunks/renderChunk.js +0 -68
  777. package/dist/tasty/chunks/renderChunk.js.map +0 -1
  778. package/dist/tasty/config.d.ts +0 -283
  779. package/dist/tasty/config.js +0 -401
  780. package/dist/tasty/config.js.map +0 -1
  781. package/dist/tasty/debug.d.ts +0 -200
  782. package/dist/tasty/debug.js +0 -734
  783. package/dist/tasty/debug.js.map +0 -1
  784. package/dist/tasty/hooks/useGlobalStyles.d.ts +0 -28
  785. package/dist/tasty/hooks/useGlobalStyles.js +0 -57
  786. package/dist/tasty/hooks/useGlobalStyles.js.map +0 -1
  787. package/dist/tasty/hooks/useKeyframes.d.ts +0 -57
  788. package/dist/tasty/hooks/useKeyframes.js +0 -55
  789. package/dist/tasty/hooks/useKeyframes.js.map +0 -1
  790. package/dist/tasty/hooks/useProperty.d.ts +0 -80
  791. package/dist/tasty/hooks/useProperty.js +0 -92
  792. package/dist/tasty/hooks/useProperty.js.map +0 -1
  793. package/dist/tasty/hooks/useRawCSS.d.ts +0 -54
  794. package/dist/tasty/hooks/useRawCSS.js +0 -29
  795. package/dist/tasty/hooks/useRawCSS.js.map +0 -1
  796. package/dist/tasty/hooks/useStyles.d.ts +0 -41
  797. package/dist/tasty/hooks/useStyles.js +0 -170
  798. package/dist/tasty/hooks/useStyles.js.map +0 -1
  799. package/dist/tasty/index.d.ts +0 -35
  800. package/dist/tasty/injector/index.d.ts +0 -158
  801. package/dist/tasty/injector/index.js +0 -155
  802. package/dist/tasty/injector/index.js.map +0 -1
  803. package/dist/tasty/injector/injector.d.ts +0 -137
  804. package/dist/tasty/injector/injector.js +0 -401
  805. package/dist/tasty/injector/injector.js.map +0 -1
  806. package/dist/tasty/injector/sheet-manager.d.ts +0 -128
  807. package/dist/tasty/injector/sheet-manager.js +0 -715
  808. package/dist/tasty/injector/sheet-manager.js.map +0 -1
  809. package/dist/tasty/injector/types.d.ts +0 -136
  810. package/dist/tasty/keyframes/index.js +0 -207
  811. package/dist/tasty/keyframes/index.js.map +0 -1
  812. package/dist/tasty/parser/classify.js +0 -320
  813. package/dist/tasty/parser/classify.js.map +0 -1
  814. package/dist/tasty/parser/const.js +0 -34
  815. package/dist/tasty/parser/const.js.map +0 -1
  816. package/dist/tasty/parser/lru.js +0 -110
  817. package/dist/tasty/parser/lru.js.map +0 -1
  818. package/dist/tasty/parser/parser.d.ts +0 -26
  819. package/dist/tasty/parser/parser.js +0 -117
  820. package/dist/tasty/parser/parser.js.map +0 -1
  821. package/dist/tasty/parser/tokenizer.js +0 -70
  822. package/dist/tasty/parser/tokenizer.js.map +0 -1
  823. package/dist/tasty/parser/types.d.ts +0 -47
  824. package/dist/tasty/parser/types.js +0 -47
  825. package/dist/tasty/parser/types.js.map +0 -1
  826. package/dist/tasty/pipeline/conditions.js +0 -378
  827. package/dist/tasty/pipeline/conditions.js.map +0 -1
  828. package/dist/tasty/pipeline/exclusive.js +0 -232
  829. package/dist/tasty/pipeline/exclusive.js.map +0 -1
  830. package/dist/tasty/pipeline/index.d.ts +0 -52
  831. package/dist/tasty/pipeline/index.js +0 -639
  832. package/dist/tasty/pipeline/index.js.map +0 -1
  833. package/dist/tasty/pipeline/materialize.js +0 -822
  834. package/dist/tasty/pipeline/materialize.js.map +0 -1
  835. package/dist/tasty/pipeline/parseStateKey.js +0 -422
  836. package/dist/tasty/pipeline/parseStateKey.js.map +0 -1
  837. package/dist/tasty/pipeline/simplify.js +0 -558
  838. package/dist/tasty/pipeline/simplify.js.map +0 -1
  839. package/dist/tasty/plugins/okhsl-plugin.d.ts +0 -36
  840. package/dist/tasty/plugins/okhsl-plugin.js +0 -372
  841. package/dist/tasty/plugins/okhsl-plugin.js.map +0 -1
  842. package/dist/tasty/plugins/types.d.ts +0 -72
  843. package/dist/tasty/properties/index.js +0 -159
  844. package/dist/tasty/properties/index.js.map +0 -1
  845. package/dist/tasty/states/index.d.ts +0 -44
  846. package/dist/tasty/states/index.js +0 -390
  847. package/dist/tasty/states/index.js.map +0 -1
  848. package/dist/tasty/static/index.d.ts +0 -6
  849. package/dist/tasty/static/index.js +0 -6
  850. package/dist/tasty/static/tastyStatic.d.ts +0 -47
  851. package/dist/tasty/static/tastyStatic.js +0 -32
  852. package/dist/tasty/static/tastyStatic.js.map +0 -1
  853. package/dist/tasty/static/types.d.ts +0 -50
  854. package/dist/tasty/static/types.js +0 -25
  855. package/dist/tasty/static/types.js.map +0 -1
  856. package/dist/tasty/styles/align.d.ts +0 -16
  857. package/dist/tasty/styles/align.js +0 -15
  858. package/dist/tasty/styles/align.js.map +0 -1
  859. package/dist/tasty/styles/border.d.ts +0 -26
  860. package/dist/tasty/styles/border.js +0 -115
  861. package/dist/tasty/styles/border.js.map +0 -1
  862. package/dist/tasty/styles/color.d.ts +0 -15
  863. package/dist/tasty/styles/color.js +0 -24
  864. package/dist/tasty/styles/color.js.map +0 -1
  865. package/dist/tasty/styles/createStyle.js +0 -78
  866. package/dist/tasty/styles/createStyle.js.map +0 -1
  867. package/dist/tasty/styles/dimension.js +0 -100
  868. package/dist/tasty/styles/dimension.js.map +0 -1
  869. package/dist/tasty/styles/display.d.ts +0 -38
  870. package/dist/tasty/styles/display.js +0 -68
  871. package/dist/tasty/styles/display.js.map +0 -1
  872. package/dist/tasty/styles/fade.d.ts +0 -16
  873. package/dist/tasty/styles/fade.js +0 -58
  874. package/dist/tasty/styles/fade.js.map +0 -1
  875. package/dist/tasty/styles/fill.d.ts +0 -45
  876. package/dist/tasty/styles/fill.js +0 -52
  877. package/dist/tasty/styles/fill.js.map +0 -1
  878. package/dist/tasty/styles/flow.d.ts +0 -17
  879. package/dist/tasty/styles/flow.js +0 -13
  880. package/dist/tasty/styles/flow.js.map +0 -1
  881. package/dist/tasty/styles/gap.d.ts +0 -32
  882. package/dist/tasty/styles/gap.js +0 -37
  883. package/dist/tasty/styles/gap.js.map +0 -1
  884. package/dist/tasty/styles/height.d.ts +0 -18
  885. package/dist/tasty/styles/height.js +0 -21
  886. package/dist/tasty/styles/height.js.map +0 -1
  887. package/dist/tasty/styles/index.d.ts +0 -3
  888. package/dist/tasty/styles/index.js +0 -10
  889. package/dist/tasty/styles/index.js.map +0 -1
  890. package/dist/tasty/styles/inset.d.ts +0 -51
  891. package/dist/tasty/styles/inset.js +0 -143
  892. package/dist/tasty/styles/inset.js.map +0 -1
  893. package/dist/tasty/styles/justify.d.ts +0 -16
  894. package/dist/tasty/styles/justify.js +0 -15
  895. package/dist/tasty/styles/justify.js.map +0 -1
  896. package/dist/tasty/styles/list.d.ts +0 -17
  897. package/dist/tasty/styles/list.js +0 -99
  898. package/dist/tasty/styles/list.js.map +0 -1
  899. package/dist/tasty/styles/margin.d.ts +0 -29
  900. package/dist/tasty/styles/margin.js +0 -97
  901. package/dist/tasty/styles/margin.js.map +0 -1
  902. package/dist/tasty/styles/outline.d.ts +0 -30
  903. package/dist/tasty/styles/outline.js +0 -66
  904. package/dist/tasty/styles/outline.js.map +0 -1
  905. package/dist/tasty/styles/padding.d.ts +0 -29
  906. package/dist/tasty/styles/padding.js +0 -97
  907. package/dist/tasty/styles/padding.js.map +0 -1
  908. package/dist/tasty/styles/predefined.d.ts +0 -74
  909. package/dist/tasty/styles/predefined.js +0 -242
  910. package/dist/tasty/styles/predefined.js.map +0 -1
  911. package/dist/tasty/styles/preset.d.ts +0 -48
  912. package/dist/tasty/styles/preset.js +0 -126
  913. package/dist/tasty/styles/preset.js.map +0 -1
  914. package/dist/tasty/styles/radius.d.ts +0 -15
  915. package/dist/tasty/styles/radius.js +0 -52
  916. package/dist/tasty/styles/radius.js.map +0 -1
  917. package/dist/tasty/styles/scrollbar.d.ts +0 -22
  918. package/dist/tasty/styles/scrollbar.js +0 -109
  919. package/dist/tasty/styles/scrollbar.js.map +0 -1
  920. package/dist/tasty/styles/shadow.d.ts +0 -15
  921. package/dist/tasty/styles/shadow.js +0 -28
  922. package/dist/tasty/styles/shadow.js.map +0 -1
  923. package/dist/tasty/styles/styledScrollbar.d.ts +0 -48
  924. package/dist/tasty/styles/styledScrollbar.js +0 -39
  925. package/dist/tasty/styles/styledScrollbar.js.map +0 -1
  926. package/dist/tasty/styles/transition.d.ts +0 -15
  927. package/dist/tasty/styles/transition.js +0 -139
  928. package/dist/tasty/styles/transition.js.map +0 -1
  929. package/dist/tasty/styles/types.d.ts +0 -499
  930. package/dist/tasty/styles/width.d.ts +0 -18
  931. package/dist/tasty/styles/width.js +0 -21
  932. package/dist/tasty/styles/width.js.map +0 -1
  933. package/dist/tasty/tasty.d.ts +0 -936
  934. package/dist/tasty/tasty.js +0 -191
  935. package/dist/tasty/tasty.js.map +0 -1
  936. package/dist/tasty/types.d.ts +0 -192
  937. package/dist/tasty/utils/cache-wrapper.js +0 -25
  938. package/dist/tasty/utils/cache-wrapper.js.map +0 -1
  939. package/dist/tasty/utils/case-converter.js +0 -9
  940. package/dist/tasty/utils/case-converter.js.map +0 -1
  941. package/dist/tasty/utils/colors.d.ts +0 -6
  942. package/dist/tasty/utils/colors.js +0 -10
  943. package/dist/tasty/utils/colors.js.map +0 -1
  944. package/dist/tasty/utils/dotize.d.ts +0 -27
  945. package/dist/tasty/utils/dotize.js +0 -123
  946. package/dist/tasty/utils/dotize.js.map +0 -1
  947. package/dist/tasty/utils/filter-base-props.d.ts +0 -16
  948. package/dist/tasty/utils/filter-base-props.js +0 -46
  949. package/dist/tasty/utils/filter-base-props.js.map +0 -1
  950. package/dist/tasty/utils/get-display-name.d.ts +0 -8
  951. package/dist/tasty/utils/get-display-name.js +0 -11
  952. package/dist/tasty/utils/get-display-name.js.map +0 -1
  953. package/dist/tasty/utils/hsl-to-rgb.js +0 -39
  954. package/dist/tasty/utils/hsl-to-rgb.js.map +0 -1
  955. package/dist/tasty/utils/is-dev-env.js +0 -20
  956. package/dist/tasty/utils/is-dev-env.js.map +0 -1
  957. package/dist/tasty/utils/merge-styles.d.ts +0 -8
  958. package/dist/tasty/utils/merge-styles.js +0 -147
  959. package/dist/tasty/utils/merge-styles.js.map +0 -1
  960. package/dist/tasty/utils/mod-attrs.d.ts +0 -9
  961. package/dist/tasty/utils/mod-attrs.js +0 -22
  962. package/dist/tasty/utils/mod-attrs.js.map +0 -1
  963. package/dist/tasty/utils/okhsl-to-rgb.js +0 -297
  964. package/dist/tasty/utils/okhsl-to-rgb.js.map +0 -1
  965. package/dist/tasty/utils/process-tokens.d.ts +0 -32
  966. package/dist/tasty/utils/process-tokens.js +0 -172
  967. package/dist/tasty/utils/process-tokens.js.map +0 -1
  968. package/dist/tasty/utils/resolve-recipes.d.ts +0 -18
  969. package/dist/tasty/utils/resolve-recipes.js +0 -144
  970. package/dist/tasty/utils/resolve-recipes.js.map +0 -1
  971. package/dist/tasty/utils/string.js +0 -9
  972. package/dist/tasty/utils/string.js.map +0 -1
  973. package/dist/tasty/utils/styles.d.ts +0 -204
  974. package/dist/tasty/utils/styles.js +0 -577
  975. package/dist/tasty/utils/styles.js.map +0 -1
  976. package/dist/tasty/utils/typography.d.ts +0 -37
  977. package/dist/tasty/utils/typography.js +0 -54
  978. package/dist/tasty/utils/typography.js.map +0 -1
  979. package/dist/tasty/utils/warnings.d.ts +0 -17
  980. package/dist/tasty/utils/warnings.js +0 -17
  981. package/dist/tasty/utils/warnings.js.map +0 -1
  982. package/dist/tasty/zero/babel.d.ts +0 -111
  983. package/dist/tasty/zero/babel.js +0 -283
  984. package/dist/tasty/zero/babel.js.map +0 -1
  985. package/dist/tasty/zero/index.d.ts +0 -4
  986. package/dist/tasty/zero/index.js +0 -5
  987. package/dist/tasty/zero/next.d.ts +0 -61
  988. package/dist/tasty/zero/next.js +0 -79
  989. package/dist/tasty/zero/next.js.map +0 -1
  990. package/dist/tasty.config.ts +0 -311
  991. package/dist/tokens/typography.d.ts +0 -35
  992. package/dist/tokens/typography.js +0 -238
  993. package/dist/tokens/typography.js.map +0 -1
  994. package/dist/utils/cache-wrapper.js +0 -25
  995. package/dist/utils/cache-wrapper.js.map +0 -1
  996. package/dist/utils/case-converter.js +0 -9
  997. package/dist/utils/case-converter.js.map +0 -1
  998. package/dist/utils/hsl-to-rgb.js +0 -39
  999. package/dist/utils/hsl-to-rgb.js.map +0 -1
  1000. package/dist/utils/merge-styles.js +0 -147
  1001. package/dist/utils/merge-styles.js.map +0 -1
  1002. package/dist/utils/okhsl-to-rgb.js +0 -297
  1003. package/dist/utils/okhsl-to-rgb.js.map +0 -1
  1004. package/dist/utils/process-tokens.js +0 -29
  1005. package/dist/utils/process-tokens.js.map +0 -1
  1006. package/dist/utils/resolve-recipes.js +0 -144
  1007. package/dist/utils/resolve-recipes.js.map +0 -1
  1008. package/dist/utils/string.js +0 -9
  1009. package/dist/utils/string.js.map +0 -1
  1010. package/dist/utils/styles.d.ts +0 -23
  1011. package/dist/utils/styles.js +0 -338
  1012. package/dist/utils/styles.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.js","names":["mergeProps","useFocus","Item","BaseSection"],"sources":["../../../../src/components/fields/ComboBox/ComboBox.tsx"],"sourcesContent":["import { FocusableRef, Key } from '@react-types/shared';\nimport React, {\n cloneElement,\n ForwardedRef,\n forwardRef,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n useFilter,\n useKeyboard,\n useOverlay,\n useOverlayPosition,\n} from 'react-aria';\nimport { Section as BaseSection, useListState } from 'react-stately';\n\nimport { useEvent } from '../../../_internal';\nimport { CloseIcon, DirectionIcon, LoadingIcon } from '../../../icons';\nimport { useProviderProps } from '../../../provider';\nimport { FieldBaseProps } from '../../../shared';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n extractStyles,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '../../../tasty';\nimport { chainRaf } from '../../../utils/raf';\nimport { generateRandomId } from '../../../utils/random';\nimport {\n mergeProps,\n useCombinedRefs,\n useLayoutEffect,\n} from '../../../utils/react';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { useEventBus } from '../../../utils/react/useEventBus';\nimport { CollectionItem as Item } from '../../CollectionItem';\nimport { useFieldProps, useFormProps, wrapWithField } from '../../form';\nimport { DisplayTransition } from '../../helpers';\nimport { Portal } from '../../portal';\nimport { InvalidIcon } from '../../shared/InvalidIcon';\nimport { ValidIcon } from '../../shared/ValidIcon';\nimport { ListBox } from '../ListBox/ListBox';\nimport {\n DEFAULT_INPUT_STYLES,\n INPUT_WRAPPER_STYLES,\n} from '../TextInput/TextInputBase';\n\ntype FilterFn = (textValue: string, inputValue: string) => boolean;\n\nexport type PopoverTriggerAction = 'focus' | 'input' | 'manual';\n\nconst ComboBoxWrapperElement = tasty({\n qa: 'ComboBoxWrapper',\n styles: INPUT_WRAPPER_STYLES,\n});\n\nconst InputElement = tasty({\n as: 'input',\n styles: DEFAULT_INPUT_STYLES,\n});\n\nconst ComboBoxOverlayWrapper = tasty({\n qa: 'ComboBoxOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n },\n});\n\nconst ComboBoxOverlayElement = tasty({\n qa: 'ComboBoxOverlay',\n styles: {\n display: 'grid',\n gridRows: '1sf',\n gridColumns: '1sf',\n width: '$overlay-min-width max-content 50vw',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n background: '#white',\n radius: '1cr',\n shadow: true,\n padding: '0',\n border: '#border',\n hide: {\n '': false,\n hidden: true,\n },\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n\n '$overlay-min-width': 'min 30x',\n },\n});\n\nexport interface CubeComboBoxProps<T>\n extends BasePropsWithoutChildren,\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps,\n FieldBaseProps {\n /** The selected key in controlled mode */\n selectedKey?: string | null;\n /** The default selected key in uncontrolled mode */\n defaultSelectedKey?: string | null;\n /** Callback fired when selection changes */\n onSelectionChange?: (key: string | null) => void;\n\n /** The input value in controlled mode */\n inputValue?: string;\n /** The default input value in uncontrolled mode */\n defaultInputValue?: string;\n /** Callback fired when input value changes */\n onInputChange?: (value: string) => void;\n /** Placeholder text for the input */\n placeholder?: string;\n /** Whether the input should have autofocus */\n autoFocus?: boolean;\n /** HTML autocomplete attribute for the input */\n autoComplete?: string;\n /** Callback fired when focus enters the component (input, trigger, or popover). Does not receive event object. */\n onFocus?: () => void;\n /** Callback fired when focus leaves the component entirely. Does not receive event object. */\n onBlur?: () => void;\n /** Callback fired when a key is pressed on the input */\n onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n\n /** Popover trigger behavior: 'focus', 'input', or 'manual'. Defaults to 'input' */\n popoverTrigger?: PopoverTriggerAction;\n\n /** Items for the listbox (alternative to children) */\n items?: Iterable<T>;\n /** Children for the listbox (static items or render function) */\n children?: ReactNode | ((item: T) => ReactElement);\n\n /**\n * Custom filter function for determining if an option should be included.\n * Pass `false` to disable internal filtering completely.\n */\n filter?: FilterFn | false;\n\n /** Whether to allow entering custom values that are not in the predefined options */\n allowsCustomValue?: boolean;\n /** Whether to commit custom value on blur in allowsCustomValue mode (default: true) */\n shouldCommitOnBlur?: boolean;\n /** Whether to clear selection and input on blur (default: false, only applies to non-custom-value mode) */\n clearOnBlur?: boolean;\n /** Whether the combobox is clearable using ESC key or clear button */\n isClearable?: boolean;\n /** Callback called when the clear button is pressed */\n onClear?: () => void;\n\n /** Left input icon */\n icon?: ReactElement;\n /** Input decoration before the main input */\n prefix?: ReactNode;\n /** Input decoration after the main input */\n suffix?: ReactNode;\n /** Whether to hide the trigger button */\n hideTrigger?: boolean;\n /** Size of the combobox */\n size?: 'small' | 'medium' | 'large' | (string & {});\n\n /** Ref for accessing the input element */\n inputRef?: RefObject<HTMLInputElement>;\n /** Ref for accessing the wrapper element */\n wrapperRef?: RefObject<HTMLDivElement>;\n /** Ref for accessing the listbox element */\n listBoxRef?: RefObject<HTMLDivElement>;\n /** Ref for accessing the popover element */\n popoverRef?: RefObject<HTMLDivElement>;\n /** Ref for accessing the trigger button element */\n triggerRef?: FocusableRef<HTMLButtonElement>;\n\n /** Custom styles for the input */\n inputStyles?: Styles;\n /** Custom styles for the trigger button */\n triggerStyles?: Styles;\n /** Custom styles for the listbox */\n listBoxStyles?: Styles;\n /** Custom styles for the popover overlay */\n overlayStyles?: Styles;\n /** Custom styles for individual options */\n optionStyles?: Styles;\n /** Custom styles for sections */\n sectionStyles?: Styles;\n /** Custom styles for section headings */\n headingStyles?: Styles;\n\n /** Whether the combobox is disabled */\n isDisabled?: boolean;\n /** Whether the combobox is in loading state */\n isLoading?: boolean;\n /** Validation state of the combobox */\n validationState?: 'valid' | 'invalid';\n /** Keys of disabled items */\n disabledKeys?: Iterable<Key>;\n /** Whether to flip the popover placement */\n shouldFlip?: boolean;\n /** Placement direction for the popover */\n direction?: 'bottom' | 'top';\n /** Offset for the popover */\n overlayOffset?: number;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n /** Whether the combobox is read-only */\n isReadOnly?: boolean;\n /** Suffix position goes before or after the validation and loading statuses */\n suffixPosition?: 'before' | 'after';\n /**\n * Sort selected item to the top when the popover opens.\n * Only works when using the `items` prop (data-driven mode).\n * Ignored when using JSX children.\n * @default true when items are provided, false when using JSX children\n */\n sortSelectedToTop?: boolean;\n /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\n// ============================================================================\n// Hook: useComboBoxState\n// ============================================================================\ninterface UseComboBoxStateProps {\n selectedKey?: string | null;\n defaultSelectedKey?: string | null;\n inputValue?: string;\n defaultInputValue?: string;\n comboBoxId: string;\n}\n\ninterface UseComboBoxStateReturn {\n effectiveSelectedKey: Key | null;\n effectiveInputValue: string;\n isPopoverOpen: boolean;\n setIsPopoverOpen: (open: boolean) => void;\n setInternalSelectedKey: (key: Key | null) => void;\n setInternalInputValue: (value: string) => void;\n isControlledKey: boolean;\n isControlledInput: boolean;\n}\n\nfunction useComboBoxState({\n selectedKey,\n defaultSelectedKey,\n inputValue,\n defaultInputValue,\n comboBoxId,\n}: UseComboBoxStateProps): UseComboBoxStateReturn {\n // Get event bus for menu synchronization\n const { emit, on } = useEventBus();\n\n // Internal state for uncontrolled mode\n const [internalSelectedKey, setInternalSelectedKey] = useState<Key | null>(\n defaultSelectedKey ?? null,\n );\n const [internalInputValue, setInternalInputValue] = useState(\n defaultInputValue ?? '',\n );\n\n const isControlledKey = selectedKey !== undefined;\n const isControlledInput = inputValue !== undefined;\n\n const effectiveSelectedKey = isControlledKey\n ? selectedKey\n : internalSelectedKey;\n const effectiveInputValue = isControlledInput\n ? inputValue\n : internalInputValue;\n\n // Popover state\n const [isPopoverOpen, setIsPopoverOpen] = useState(false);\n\n // Listen for other menus opening and close this one if needed\n useEffect(() => {\n const unsubscribe = on('popover:open', (data: { menuId: string }) => {\n if (data.menuId !== comboBoxId && isPopoverOpen) {\n setIsPopoverOpen(false);\n }\n });\n\n return unsubscribe;\n }, [on, comboBoxId, isPopoverOpen]);\n\n // Emit event when this combobox opens\n useEffect(() => {\n if (isPopoverOpen) {\n emit('popover:open', { menuId: comboBoxId });\n }\n }, [isPopoverOpen, emit, comboBoxId]);\n\n return {\n effectiveSelectedKey,\n effectiveInputValue,\n isPopoverOpen,\n setIsPopoverOpen,\n setInternalSelectedKey,\n setInternalInputValue,\n isControlledKey,\n isControlledInput,\n };\n}\n\n// ============================================================================\n// Hook: useComboBoxFiltering\n// ============================================================================\ninterface UseComboBoxFilteringProps {\n effectiveInputValue: string;\n filter: FilterFn | false | undefined;\n}\n\ninterface UseComboBoxFilteringReturn {\n filterFn: (nodes: Iterable<any>) => Iterable<any>;\n isFilterActive: boolean;\n setIsFilterActive: (active: boolean) => void;\n}\n\nfunction useComboBoxFiltering({\n effectiveInputValue,\n filter,\n}: UseComboBoxFilteringProps): UseComboBoxFilteringReturn {\n const [isFilterActive, setIsFilterActive] = useState(false);\n\n const { contains } = useFilter({ sensitivity: 'base' });\n\n const textFilterFn = useMemo<FilterFn>(\n () => (filter === false ? () => true : filter || contains),\n [filter, contains],\n );\n\n // Create a filter function for collection nodes\n const filterFn = useCallback(\n (nodes: Iterable<any>) => {\n const term = effectiveInputValue.trim();\n\n // Don't filter if not active or no search term\n if (!isFilterActive || !term) {\n return nodes;\n }\n\n // Filter nodes based on their textValue and preserve section structure\n return [...nodes]\n .map((node: any) => {\n if (node.type === 'section' && node.childNodes) {\n const filteredChildren = [...node.childNodes].filter((child: any) =>\n textFilterFn(child.textValue || '', term),\n );\n\n if (filteredChildren.length === 0) {\n return null;\n }\n\n return {\n ...node,\n childNodes: filteredChildren,\n hasChildNodes: true,\n };\n }\n\n return textFilterFn(node.textValue || '', term) ? node : null;\n })\n .filter(Boolean);\n },\n [isFilterActive, effectiveInputValue, textFilterFn],\n );\n\n return {\n filterFn,\n isFilterActive,\n setIsFilterActive,\n };\n}\n\n// ============================================================================\n// Hook: useCompositeFocus\n// ============================================================================\ninterface UseCompositeFocusProps {\n wrapperRef: RefObject<HTMLElement>;\n popoverRef: RefObject<HTMLElement>;\n onFocus?: () => void;\n onBlur?: () => void;\n isDisabled?: boolean;\n}\n\ninterface UseCompositeFocusReturn {\n compositeFocusProps: {\n onFocus: (e: React.FocusEvent) => void;\n onBlur: (e: React.FocusEvent) => void;\n };\n}\n\nfunction useCompositeFocus({\n wrapperRef,\n popoverRef,\n onFocus,\n onBlur,\n isDisabled,\n}: UseCompositeFocusProps): UseCompositeFocusReturn {\n const wasInsideRef = useRef(false);\n const rafRef = useRef<number | null>(null);\n\n const checkFocus = useCallback(() => {\n if (isDisabled) return;\n\n const activeElement = document.activeElement;\n const isInside =\n (wrapperRef.current?.contains(activeElement) ?? false) ||\n (popoverRef.current?.contains(activeElement) ?? false);\n\n if (isInside !== wasInsideRef.current) {\n wasInsideRef.current = isInside;\n if (isInside) {\n onFocus?.();\n } else {\n onBlur?.();\n }\n }\n }, [wrapperRef, popoverRef, onFocus, onBlur, isDisabled]);\n\n const handleFocusOrBlur = useCallback(\n (e: React.FocusEvent) => {\n // Cancel any pending check\n if (rafRef.current !== null) {\n cancelAnimationFrame(rafRef.current);\n }\n\n // Schedule focus check for next frame\n rafRef.current = requestAnimationFrame(() => {\n rafRef.current = null;\n checkFocus();\n });\n },\n [checkFocus],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n if (rafRef.current !== null) {\n cancelAnimationFrame(rafRef.current);\n }\n };\n }, []);\n\n return {\n compositeFocusProps: {\n onFocus: handleFocusOrBlur,\n onBlur: handleFocusOrBlur,\n },\n };\n}\n\n// ============================================================================\n// Hook: useComboBoxKeyboard\n// ============================================================================\ninterface UseComboBoxKeyboardProps {\n isPopoverOpen: boolean;\n listStateRef: RefObject<any>;\n hasResults: boolean;\n allowsCustomValue?: boolean;\n effectiveInputValue: string;\n isClearable?: boolean;\n onSelectionChange: (selection: Key | Key[] | null) => void;\n onClearValue: () => void;\n onOpenPopover: () => void;\n onClosePopover: () => void;\n inputRef: RefObject<HTMLInputElement>;\n setIsFilterActive: (active: boolean) => void;\n onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n}\n\nfunction useComboBoxKeyboard({\n isPopoverOpen,\n listStateRef,\n hasResults,\n allowsCustomValue,\n effectiveInputValue,\n isClearable,\n onSelectionChange,\n onClearValue,\n onOpenPopover,\n onClosePopover,\n inputRef,\n setIsFilterActive,\n onKeyDown,\n}: UseComboBoxKeyboardProps) {\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n // Call user's handler first\n onKeyDown?.(e as React.KeyboardEvent<HTMLInputElement>);\n\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n\n // Open popover if closed\n if (!isPopoverOpen) {\n // If opening with no filtered results, disable filter to show all items\n if (!hasResults) {\n setIsFilterActive(false);\n }\n onOpenPopover();\n return;\n }\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection, disabledKeys } = listState;\n\n // Helper to collect visible item keys (supports sections)\n const collectVisibleKeys = (nodes: Iterable<any>, out: Key[]) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n if (!disabledKeys?.has(node.key)) {\n out.push(node.key);\n }\n } else if (node.childNodes) {\n collectVisibleKeys(node.childNodes, out);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n if (visibleKeys.length === 0) return;\n\n const isArrowDown = e.key === 'ArrowDown';\n const currentKey = selectionManager.focusedKey;\n\n let nextKey: Key | null = null;\n\n if (currentKey == null) {\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n } else {\n const currentIndex = visibleKeys.indexOf(currentKey);\n if (currentIndex !== -1) {\n const newIndex = currentIndex + (isArrowDown ? 1 : -1);\n if (newIndex >= 0 && newIndex < visibleKeys.length) {\n nextKey = visibleKeys[newIndex];\n }\n } else {\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n }\n }\n\n if (nextKey != null) {\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n selectionManager.setFocusedKey(nextKey);\n }\n } else if (e.key === 'Enter') {\n // If popover is open, try to select the focused item first\n if (isPopoverOpen) {\n const listState = listStateRef.current;\n if (listState) {\n const keyToSelect = listState.selectionManager.focusedKey;\n\n if (keyToSelect != null) {\n e.preventDefault();\n listState.selectionManager.select(keyToSelect, e);\n // Ensure the popover closes even if selection stays the same\n onClosePopover();\n inputRef.current?.focus();\n return;\n }\n }\n }\n\n // If no results, handle empty input or custom values\n if (!hasResults) {\n if (allowsCustomValue) {\n const value = effectiveInputValue.trim();\n\n // Commit the custom value\n onSelectionChange(\n (value as unknown as Key) ?? (null as unknown as Key),\n );\n\n // If popover is closed and we have a value, allow Enter to propagate for form submission\n // If popover is open OR value is empty, prevent default to avoid premature submission\n if (isPopoverOpen || !value) {\n e.preventDefault();\n }\n } else {\n e.preventDefault();\n onSelectionChange(null);\n }\n\n return;\n }\n\n // Clear selection if input is empty and popover is closed (or no focused item)\n const trimmed = (effectiveInputValue || '').trim();\n if (trimmed === '') {\n e.preventDefault();\n onSelectionChange(null);\n return;\n }\n } else if (e.key === 'Escape') {\n if (isPopoverOpen) {\n e.preventDefault();\n onClosePopover();\n inputRef.current?.focus();\n } else if (effectiveInputValue && isClearable) {\n e.preventDefault();\n onClearValue();\n }\n } else if (e.key === 'Home' || e.key === 'End') {\n if (isPopoverOpen) {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection, disabledKeys } = listState;\n\n // Helper to collect visible item keys (supports sections)\n const collectVisibleKeys = (nodes: Iterable<any>, out: Key[]) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n if (!disabledKeys?.has(node.key)) {\n out.push(node.key);\n }\n } else if (node.childNodes) {\n collectVisibleKeys(node.childNodes, out);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n if (visibleKeys.length === 0) return;\n\n const targetKey =\n e.key === 'Home'\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n selectionManager.setFocusedKey(targetKey);\n }\n }\n },\n });\n\n return { keyboardProps };\n}\n\n// ============================================================================\n// Component: ComboBoxInput\n// ============================================================================\ninterface ComboBoxInputProps {\n qa?: string;\n inputRef: RefObject<HTMLInputElement>;\n id?: string;\n value: string;\n placeholder?: string;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n autoFocus?: boolean;\n autoComplete?: string;\n size: string;\n mods: Record<string, any>;\n inputStyles?: Styles;\n keyboardProps: any;\n focusProps: any;\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onFocus: (e: React.FocusEvent<HTMLInputElement>) => void;\n isPopoverOpen: boolean;\n hasResults: boolean;\n comboBoxId: string;\n listStateRef: RefObject<any>;\n}\n\nconst ComboBoxInput = forwardRef<HTMLInputElement, ComboBoxInputProps>(\n function ComboBoxInput(\n {\n qa,\n inputRef,\n id,\n value,\n placeholder,\n isDisabled,\n isReadOnly,\n autoFocus,\n autoComplete,\n size,\n mods,\n inputStyles,\n keyboardProps,\n focusProps,\n onChange,\n onFocus,\n isPopoverOpen,\n hasResults,\n comboBoxId,\n listStateRef,\n },\n ref,\n ) {\n const combinedRef = useCombinedRefs(ref, inputRef);\n\n return (\n <InputElement\n ref={combinedRef}\n qa={qa}\n id={id}\n type=\"text\"\n value={value}\n placeholder={placeholder}\n isDisabled={isDisabled}\n readOnly={isReadOnly}\n autoFocus={autoFocus}\n autoComplete={autoComplete}\n data-autofocus={autoFocus ? '' : undefined}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={focusProps.onBlur}\n {...keyboardProps}\n styles={inputStyles}\n mods={mods}\n data-size={size}\n data-input-type=\"combobox\"\n role=\"combobox\"\n aria-expanded={isPopoverOpen && hasResults}\n aria-haspopup=\"listbox\"\n aria-controls={\n isPopoverOpen && hasResults\n ? `ComboBoxListBox-${comboBoxId}`\n : undefined\n }\n aria-activedescendant={\n isPopoverOpen &&\n hasResults &&\n listStateRef.current?.selectionManager.focusedKey != null\n ? `ListBoxItem-${listStateRef.current?.selectionManager.focusedKey}`\n : undefined\n }\n />\n );\n },\n);\n\n// ============================================================================\n// Component: ComboBoxOverlay\n// ============================================================================\ninterface ComboBoxOverlayProps {\n isOpen: boolean;\n triggerRef: RefObject<HTMLElement>;\n popoverRef: RefObject<HTMLDivElement>;\n listBoxRef: RefObject<HTMLDivElement>;\n direction: 'bottom' | 'top';\n shouldFlip: boolean;\n overlayOffset: number;\n containerPadding: number;\n comboBoxWidth?: number;\n comboBoxId: string;\n overlayStyles?: Styles;\n listBoxStyles?: Styles;\n optionStyles?: Styles;\n sectionStyles?: Styles;\n headingStyles?: Styles;\n effectiveSelectedKey: Key | null;\n isDisabled?: boolean;\n disabledKeys?: Iterable<Key>;\n items?: Iterable<any>;\n children: ReactNode;\n listStateRef: RefObject<any>;\n onSelectionChange: (selection: Key | Key[] | null) => void;\n onClose: () => void;\n label?: ReactNode;\n ariaLabel?: string;\n compositeFocusProps: {\n onFocus: (e: React.FocusEvent) => void;\n onBlur: (e: React.FocusEvent) => void;\n };\n filter?: (nodes: Iterable<any>) => Iterable<any>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n}\n\nfunction ComboBoxOverlay({\n isOpen,\n triggerRef,\n popoverRef,\n listBoxRef,\n direction,\n shouldFlip,\n overlayOffset,\n containerPadding,\n comboBoxWidth,\n comboBoxId,\n overlayStyles,\n listBoxStyles,\n optionStyles,\n sectionStyles,\n headingStyles,\n effectiveSelectedKey,\n isDisabled,\n disabledKeys,\n items,\n children,\n listStateRef,\n onSelectionChange,\n onClose,\n label,\n ariaLabel,\n compositeFocusProps,\n filter,\n size = 'medium',\n}: ComboBoxOverlayProps) {\n // Overlay positioning\n const {\n overlayProps: overlayPositionProps,\n placement,\n updatePosition,\n } = useOverlayPosition({\n targetRef: triggerRef as any,\n overlayRef: popoverRef as any,\n placement: `${direction} start` as any,\n shouldFlip,\n isOpen,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n // Overlay behavior (dismiss on outside click, escape)\n const { overlayProps: overlayBehaviorProps } = useOverlay(\n {\n onClose,\n shouldCloseOnBlur: true,\n isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (!menuTriggerEl) return true;\n if (menuTriggerEl === triggerRef?.current) return true;\n return false;\n },\n },\n popoverRef as any,\n );\n\n // Update position when overlay opens or content changes\n useLayoutEffect(() => {\n if (isOpen && updatePosition) {\n // Use triple RAF to ensure layout is complete before positioning\n // This gives enough time for the DisplayTransition and content to render\n return chainRaf(() => {\n updatePosition();\n }, 3);\n }\n }, [isOpen]);\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || direction;\n\n const overlayContent = (\n <DisplayTransition isShown={isOpen}>\n {({ phase, isShown, ref: transitionRef }) => (\n <ComboBoxOverlayWrapper\n {...mergeProps(\n overlayPositionProps,\n overlayBehaviorProps,\n compositeFocusProps,\n )}\n ref={popoverRef}\n style={overlayPositionProps.style}\n >\n <ComboBoxOverlayElement\n ref={transitionRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n hidden: phase === 'unmounted',\n }}\n styles={overlayStyles}\n style={{\n '--overlay-min-width': comboBoxWidth\n ? `${comboBoxWidth}px`\n : undefined,\n }}\n >\n <ListBox\n ref={listBoxRef}\n focusOnHover\n disableSelectionToggle\n id={`ComboBoxListBox-${comboBoxId}`}\n aria-label={\n ariaLabel || (typeof label === 'string' ? label : 'Options')\n }\n selectedKey={effectiveSelectedKey}\n selectionMode=\"single\"\n isDisabled={isDisabled}\n disabledKeys={disabledKeys}\n shouldUseVirtualFocus={true}\n items={items as any}\n filter={filter}\n styles={listBoxStyles}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n stateRef={listStateRef}\n size=\"medium\"\n shape=\"popover\"\n onSelectionChange={onSelectionChange}\n >\n {children as any}\n </ListBox>\n </ComboBoxOverlayElement>\n </ComboBoxOverlayWrapper>\n )}\n </DisplayTransition>\n );\n\n return <Portal>{overlayContent}</Portal>;\n}\n\n// ============================================================================\n// Main Component: ComboBox\n// ============================================================================\nexport const ComboBox = forwardRef(function ComboBox<T extends object>(\n props: CubeComboBoxProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n props = useFieldProps(props, {\n valuePropsMapper: ({ value, onChange }) => {\n return {\n // Form value maps to selectedKey (the committed value) in both modes\n selectedKey: value ?? null,\n onSelectionChange(val: string | null) {\n // Commit selection changes to the form\n onChange(val);\n },\n };\n },\n });\n\n let {\n qa,\n label,\n extra,\n labelStyles,\n isRequired,\n necessityIndicator,\n validationState,\n id,\n icon,\n prefix,\n isDisabled,\n autoFocus,\n autoComplete = 'off',\n wrapperRef,\n inputRef,\n triggerRef,\n popoverRef,\n listBoxRef,\n isLoading,\n inputStyles,\n optionStyles,\n triggerStyles,\n listBoxStyles,\n overlayStyles,\n suffix,\n hideTrigger,\n message,\n description,\n size = 'medium',\n direction = 'bottom',\n shouldFlip = true,\n popoverTrigger = 'input',\n suffixPosition = 'before',\n filter,\n styles,\n labelSuffix,\n selectedKey,\n defaultSelectedKey,\n inputValue,\n defaultInputValue,\n onInputChange,\n isClearable,\n onClear,\n placeholder,\n allowsCustomValue,\n shouldCommitOnBlur = true,\n clearOnBlur,\n items,\n children: renderChildren,\n sectionStyles,\n headingStyles,\n isReadOnly,\n overlayOffset = 8,\n containerPadding = 8,\n onSelectionChange: externalOnSelectionChange,\n sortSelectedToTop: sortSelectedToTopProp,\n onOpenChange,\n onFocus,\n onBlur,\n onKeyDown,\n form,\n ...otherProps\n } = props;\n\n // Generate a unique ID for this combobox instance\n const comboBoxId = useMemo(() => generateRandomId(), []);\n\n // State management hook\n const {\n effectiveSelectedKey,\n effectiveInputValue,\n isPopoverOpen,\n setIsPopoverOpen,\n setInternalSelectedKey,\n setInternalInputValue,\n isControlledKey,\n isControlledInput,\n } = useComboBoxState({\n selectedKey,\n defaultSelectedKey,\n inputValue,\n defaultInputValue,\n comboBoxId,\n });\n\n // Track if sortSelectedToTop was explicitly provided\n const sortSelectedToTopExplicit = sortSelectedToTopProp !== undefined;\n // Default to true if items are provided, false otherwise\n const sortSelectedToTop = sortSelectedToTopProp ?? (items ? true : false);\n\n // Cache for sorted items array when using `items` prop\n const cachedItemsOrder = useRef<T[] | null>(null);\n const selectionWhenClosed = useRef<string | null>(null);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n wrapperRef = useCombinedRefs(wrapperRef);\n inputRef = useCombinedRefs(inputRef);\n triggerRef = useCombinedRefs(triggerRef);\n popoverRef = useCombinedRefs(popoverRef);\n listBoxRef = useCombinedRefs(listBoxRef);\n\n // Sort items with selected on top if enabled\n const getSortedItems = useCallback((): typeof items => {\n if (!items) return items;\n\n if (!sortSelectedToTop) return items;\n\n // Reuse cached order if available\n if (cachedItemsOrder.current) {\n return cachedItemsOrder.current;\n }\n\n // Warn if explicitly requested but not supported\n if (sortSelectedToTopExplicit && !items) {\n console.warn(\n 'ComboBox: sortSelectedToTop only works with the items prop. ' +\n 'Sorting will be skipped when using JSX children.',\n );\n return items;\n }\n\n const selectedKey = isPopoverOpen\n ? effectiveSelectedKey\n : selectionWhenClosed.current;\n\n if (!selectedKey) return items;\n\n const itemsArray = Array.isArray(items) ? items : Array.from(items);\n const selectedItem = itemsArray.find((item) => {\n const key = (item as any)?.key ?? (item as any)?.id;\n return key != null && String(key) === String(selectedKey);\n });\n\n if (!selectedItem) return items;\n\n const sorted = [\n selectedItem,\n ...itemsArray.filter((item) => {\n const key = (item as any)?.key ?? (item as any)?.id;\n return key == null || String(key) !== String(selectedKey);\n }),\n ] as T[];\n\n if (isPopoverOpen) {\n cachedItemsOrder.current = sorted;\n }\n\n return sorted;\n }, [\n items,\n sortSelectedToTop,\n sortSelectedToTopExplicit,\n effectiveSelectedKey,\n isPopoverOpen,\n ]);\n\n const sortedItems = getSortedItems();\n\n // Preserve the original `children` (may be a render function) before we\n // potentially overwrite it.\n let children: ReactNode = renderChildren as ReactNode;\n\n const renderFn = renderChildren as unknown;\n\n if (sortedItems && typeof renderFn === 'function') {\n try {\n const itemsArray = Array.from(sortedItems as Iterable<any>);\n children = itemsArray.map((item, idx) => {\n const rendered = (renderFn as (it: any) => ReactNode)(item);\n if (\n React.isValidElement(rendered) &&\n (rendered as ReactElement).key == null\n ) {\n return React.cloneElement(rendered as ReactElement, {\n key: (rendered as any)?.key ?? item?.key ?? idx,\n });\n }\n\n return rendered as ReactNode;\n });\n } catch {\n // If conversion fails, proceed with the original children\n }\n }\n\n // Invalidate cached sorting whenever items change\n useEffect(() => {\n cachedItemsOrder.current = null;\n }, [items]);\n\n // Capture selection when popover closes\n useEffect(() => {\n if (!isPopoverOpen) {\n selectionWhenClosed.current =\n effectiveSelectedKey != null ? String(effectiveSelectedKey) : null;\n cachedItemsOrder.current = null;\n }\n }, [isPopoverOpen, effectiveSelectedKey]);\n\n // Call onOpenChange when popover state changes\n useEffect(() => {\n onOpenChange?.(isPopoverOpen);\n }, [isPopoverOpen]);\n\n // Filtering hook\n const { filterFn, isFilterActive, setIsFilterActive } = useComboBoxFiltering({\n effectiveInputValue,\n filter,\n });\n\n // Create local collection state for reading item data (labels, etc.)\n // This allows us to read item labels even before the popover opens\n const localCollectionState = useListState({\n children,\n items: sortedItems,\n selectionMode: 'none', // Don't manage selection in this state\n });\n\n const { isFocused, focusProps } = useFocus({ isDisabled });\n\n // Helper to check if current input value is valid\n const checkInputValidity = useCallback(() => {\n if (!effectiveInputValue.trim()) {\n return { isValid: false, singleMatchKey: null, filteredCount: 0 };\n }\n\n // Get filtered collection based on current input\n const filteredNodes = filterFn(localCollectionState.collection);\n const filteredItems: Array<{ key: Key; textValue: string }> = [];\n\n // Flatten filtered nodes (handle sections)\n for (const node of filteredNodes) {\n if (node.type === 'section' && node.childNodes) {\n for (const child of node.childNodes) {\n if (child.type === 'item') {\n filteredItems.push({\n key: child.key,\n textValue: child.textValue || '',\n });\n }\n }\n } else if (node.type === 'item') {\n filteredItems.push({\n key: node.key,\n textValue: node.textValue || '',\n });\n }\n }\n\n const filteredCount = filteredItems.length;\n\n // Check for exact match\n const exactMatch = filteredItems.find(\n (item) =>\n item.textValue.toLowerCase() ===\n effectiveInputValue.trim().toLowerCase(),\n );\n\n if (exactMatch) {\n return { isValid: true, singleMatchKey: exactMatch.key, filteredCount };\n }\n\n // If exactly one filtered result, consider it valid\n if (filteredCount === 1) {\n return {\n isValid: true,\n singleMatchKey: filteredItems[0].key,\n filteredCount,\n };\n }\n\n return { isValid: false, singleMatchKey: null, filteredCount };\n }, [effectiveInputValue, filterFn, localCollectionState.collection]);\n\n // Composite blur handler - fires when focus leaves the entire component\n const handleCompositeBlur = useEvent(() => {\n // NOTE: Do NOT disable filter yet; we need it active for validity check\n\n // In allowsCustomValue mode\n if (allowsCustomValue) {\n // Commit the input value if it's non-empty and nothing is selected\n if (\n shouldCommitOnBlur &&\n effectiveInputValue &&\n effectiveSelectedKey == null\n ) {\n externalOnSelectionChange?.(effectiveInputValue as string);\n if (!isControlledKey) {\n setInternalSelectedKey(effectiveInputValue as Key);\n }\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n\n // Clear selection if input is empty\n if (!String(effectiveInputValue).trim()) {\n externalOnSelectionChange?.(null);\n if (!isControlledKey) {\n setInternalSelectedKey(null);\n }\n if (!isControlledInput) {\n setInternalInputValue('');\n }\n onInputChange?.('');\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n }\n\n // In non-custom-value mode, validate input and handle accordingly\n if (!allowsCustomValue) {\n const { isValid, singleMatchKey } = checkInputValidity();\n\n // If there's exactly one filtered result, auto-select it\n if (\n isValid &&\n singleMatchKey != null &&\n singleMatchKey !== effectiveSelectedKey\n ) {\n const label = getItemLabel(singleMatchKey);\n\n if (!isControlledKey) {\n setInternalSelectedKey(singleMatchKey);\n }\n if (!isControlledInput) {\n setInternalInputValue(label);\n }\n onInputChange?.(label);\n externalOnSelectionChange?.(singleMatchKey as string | null);\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n\n // If input is invalid (no exact match, not a single result)\n if (!isValid) {\n const trimmedInput = effectiveInputValue.trim();\n\n // Clear if clearOnBlur is set or input is empty\n if (clearOnBlur || !trimmedInput) {\n externalOnSelectionChange?.(null);\n if (!isControlledKey) {\n setInternalSelectedKey(null);\n }\n if (!isControlledInput) {\n setInternalInputValue('');\n }\n onInputChange?.('');\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n\n // Reset input to current selected value (or empty if none)\n const nextValue =\n effectiveSelectedKey != null\n ? getItemLabel(effectiveSelectedKey)\n : '';\n\n if (!isControlledInput) {\n setInternalInputValue(nextValue);\n }\n onInputChange?.(nextValue);\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n }\n\n // Fallback: Reset input to show current selection (or empty if none)\n const nextValue =\n effectiveSelectedKey != null ? getItemLabel(effectiveSelectedKey) : '';\n\n if (!isControlledInput) {\n setInternalInputValue(nextValue);\n }\n onInputChange?.(nextValue);\n onBlur?.();\n setIsFilterActive(false);\n });\n\n // Composite focus hook - handles focus tracking across wrapper and portaled popover\n const { compositeFocusProps } = useCompositeFocus({\n wrapperRef,\n popoverRef,\n onFocus,\n onBlur: handleCompositeBlur,\n isDisabled,\n });\n\n let isInvalid = validationState === 'invalid';\n\n let validationIcon = isInvalid ? InvalidIcon : ValidIcon;\n let validation = cloneElement(validationIcon);\n\n // Ref to access internal ListBox state\n const listStateRef = useRef<any>(null);\n const focusInitAttemptsRef = useRef(0);\n\n // Helper to get label from local collection\n const getItemLabel = useCallback(\n (key: Key): string => {\n const item = localCollectionState?.collection?.getItem(key);\n return item?.textValue || String(key);\n },\n [localCollectionState?.collection],\n );\n\n // Selection change handler\n const handleSelectionChange = useEvent((selection: Key | Key[] | null) => {\n // Extract single key from selection (we only support single selection)\n const key = Array.isArray(selection) ? selection[0] : selection;\n\n // Update selected key\n if (!isControlledKey) {\n setInternalSelectedKey(key ?? null);\n }\n\n // Update input value to show selected item label\n if (key != null) {\n setIsFilterActive(false);\n\n const label = getItemLabel(key);\n\n if (!isControlledInput) {\n setInternalInputValue(label);\n }\n onInputChange?.(label);\n } else {\n // Clear input when selection is cleared\n if (!isControlledInput) {\n setInternalInputValue('');\n }\n onInputChange?.('');\n setIsFilterActive(false);\n }\n\n externalOnSelectionChange?.(key as string | null);\n\n // Close popover after selection\n setIsPopoverOpen(false);\n\n // Focus input\n setTimeout(() => {\n inputRef.current?.focus();\n }, 0);\n });\n\n // Input change handler\n const handleInputChange = useEvent(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value;\n\n // Update input value\n if (!isControlledInput) {\n setInternalInputValue(value);\n }\n onInputChange?.(value);\n\n const trimmed = value.trim();\n setIsFilterActive(trimmed.length > 0);\n\n // Only clear selection in allowsCustomValue mode\n // In normal mode, typing just filters - selection stays until explicitly changed\n if (allowsCustomValue && effectiveSelectedKey != null) {\n if (!isControlledKey) {\n setInternalSelectedKey(null);\n }\n externalOnSelectionChange?.(null);\n }\n\n // Open popover based on trigger\n if (popoverTrigger !== 'manual' && value && !isPopoverOpen) {\n setIsPopoverOpen(true);\n }\n },\n );\n\n // Initialize input value from defaultInputValue or defaultSelectedKey (uncontrolled mode only, one-time)\n const [hasInitialized, setHasInitialized] = useState(false);\n\n useEffect(() => {\n // Only initialize once, in uncontrolled input mode\n if (hasInitialized || isControlledInput) return;\n\n // Priority 1: defaultInputValue takes precedence\n if (defaultInputValue !== undefined) {\n setInternalInputValue(defaultInputValue);\n setHasInitialized(true);\n return;\n }\n\n // Priority 2: fall back to defaultSelectedKey's label\n if (defaultSelectedKey) {\n const label = getItemLabel(defaultSelectedKey);\n\n setInternalInputValue(label);\n setHasInitialized(true);\n }\n }, [\n hasInitialized,\n isControlledInput,\n defaultInputValue,\n defaultSelectedKey,\n getItemLabel,\n children,\n ]);\n\n // Sync input value with controlled selectedKey\n const lastSyncedSelectedKey = useRef<Key | null | undefined>(undefined);\n\n useEffect(() => {\n // Only run when selectedKey is controlled but inputValue is uncontrolled\n if (!isControlledKey || isControlledInput) return;\n\n // Skip if the key hasn't actually changed (prevents unnecessary resets when collection rebuilds)\n if (\n lastSyncedSelectedKey.current !== undefined &&\n lastSyncedSelectedKey.current === effectiveSelectedKey\n ) {\n return;\n }\n\n lastSyncedSelectedKey.current = effectiveSelectedKey;\n\n // Get the expected label for the current selection\n const expectedLabel =\n effectiveSelectedKey != null ? getItemLabel(effectiveSelectedKey) : '';\n\n // Update the input value to match the selected key's label\n setInternalInputValue(expectedLabel);\n }, [isControlledKey, isControlledInput, effectiveSelectedKey, getItemLabel]);\n\n // Input focus handler\n const handleInputFocus = useEvent((e: React.FocusEvent<HTMLInputElement>) => {\n // Call focus props handler if it exists\n focusProps.onFocus?.(e as any);\n\n if (popoverTrigger === 'focus' && !isPopoverOpen) {\n setIsPopoverOpen(true);\n }\n });\n\n // Input blur handler - just handles internal focus props\n const handleInputBlur = useEvent((e: React.FocusEvent<HTMLInputElement>) => {\n focusProps.onBlur?.(e as any);\n });\n\n // Clear button logic\n let hasValue = allowsCustomValue\n ? effectiveInputValue !== ''\n : effectiveSelectedKey != null;\n let showClearButton = isClearable && hasValue && !isDisabled && !isReadOnly;\n\n // Check if there are any results after filtering\n const hasResults = useMemo(() => {\n if (!children) return false;\n if (!Array.isArray(children) && children === null) return false;\n\n // If we have a collection, check if filtering will produce any results\n if (localCollectionState?.collection) {\n const filteredNodes = filterFn(localCollectionState.collection);\n const resultArray = Array.from(filteredNodes).flatMap((node: any) => {\n if (node.type === 'section' && node.childNodes) {\n return [...node.childNodes];\n }\n\n return [node];\n });\n return resultArray.length > 0;\n }\n\n // Fallback: check if children exists\n return Array.isArray(children) ? children.length > 0 : true;\n }, [children, localCollectionState?.collection, filterFn]);\n\n // Clear function\n let clearValue = useEvent(() => {\n // Clear input\n if (!isControlledInput) {\n setInternalInputValue('');\n }\n onInputChange?.('');\n\n // Clear selection\n if (!isControlledKey) {\n setInternalSelectedKey(null);\n }\n externalOnSelectionChange?.(null);\n\n // Close popover\n if (isPopoverOpen) {\n setIsPopoverOpen(false);\n }\n\n // Focus input\n inputRef.current?.focus();\n\n onClear?.();\n });\n\n // Keyboard navigation hook\n const { keyboardProps } = useComboBoxKeyboard({\n isPopoverOpen,\n listStateRef,\n hasResults,\n allowsCustomValue,\n effectiveInputValue,\n isClearable,\n onSelectionChange: handleSelectionChange,\n onClearValue: clearValue,\n onOpenPopover: () => setIsPopoverOpen(true),\n onClosePopover: () => setIsPopoverOpen(false),\n inputRef,\n setIsFilterActive,\n onKeyDown,\n });\n\n if (icon) {\n icon = <div data-element=\"InputIcon\">{icon}</div>;\n\n if (prefix) {\n prefix = (\n <>\n {icon}\n {prefix}\n </>\n );\n } else {\n prefix = icon;\n }\n }\n\n let mods = useMemo(\n () => ({\n invalid: isInvalid,\n valid: validationState === 'valid',\n disabled: isDisabled,\n hovered: false,\n focused: isFocused,\n loading: isLoading,\n prefix: !!prefix,\n suffix: true,\n clearable: showClearButton,\n }),\n [\n isInvalid,\n validationState,\n isDisabled,\n isFocused,\n isLoading,\n prefix,\n showClearButton,\n ],\n );\n\n const comboBoxWidth = wrapperRef?.current?.offsetWidth;\n\n const shouldShowPopover = Boolean(isPopoverOpen && hasResults);\n\n // Close popover if no results\n useEffect(() => {\n if (isPopoverOpen && !hasResults) {\n setIsPopoverOpen(false);\n }\n }, [isPopoverOpen, hasResults]);\n\n const ensureInitialFocus = useCallback(() => {\n if (!shouldShowPopover) return;\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection, disabledKeys, lastFocusSourceRef } =\n listState;\n if (!selectionManager || !collection) return;\n\n const collectFirstKey = (): Key | null => {\n for (const node of collection) {\n if (node.type === 'item') {\n if (!disabledKeys?.has(node.key)) return node.key;\n } else if (node.childNodes) {\n for (const child of node.childNodes) {\n if (child.type === 'item' && !disabledKeys?.has(child.key)) {\n return child.key;\n }\n }\n }\n }\n return null;\n };\n\n if (lastFocusSourceRef) lastFocusSourceRef.current = 'keyboard';\n\n // Check if we need to set or update focus\n const currentFocusedKey = selectionManager.focusedKey;\n let needsRefocus = false;\n\n if (currentFocusedKey == null) {\n // No focus at all - need to set initial focus\n needsRefocus = true;\n } else {\n // Check if currently focused key still exists in the collection\n const focusedItemExists = collection.getItem(currentFocusedKey) != null;\n if (!focusedItemExists) {\n // Focused item was filtered out - need to refocus\n needsRefocus = true;\n }\n }\n\n if (needsRefocus) {\n let keyToFocus: Key | null = null;\n\n // First try to focus on the selected key if it exists in the collection\n if (\n effectiveSelectedKey != null &&\n collection.getItem(effectiveSelectedKey) != null\n ) {\n keyToFocus = effectiveSelectedKey;\n } else {\n // Fall back to the first key in the collection\n keyToFocus = collectFirstKey();\n }\n\n if (keyToFocus != null) {\n selectionManager.setFocusedKey(keyToFocus);\n }\n }\n }, [shouldShowPopover, effectiveSelectedKey]);\n\n useLayoutEffect(() => {\n if (!shouldShowPopover) return;\n focusInitAttemptsRef.current = 0;\n\n const tick = () => {\n if (!shouldShowPopover) return;\n ensureInitialFocus();\n focusInitAttemptsRef.current += 1;\n // Try a few frames to wait for collection to mount\n if (\n focusInitAttemptsRef.current < 8 &&\n listStateRef.current?.selectionManager?.focusedKey == null\n ) {\n requestAnimationFrame(tick);\n }\n };\n\n requestAnimationFrame(() => requestAnimationFrame(tick));\n }, [shouldShowPopover, ensureInitialFocus]);\n\n const comboBoxField = (\n <ComboBoxWrapperElement\n ref={wrapperRef}\n mods={mods}\n styles={styles}\n style={{\n zIndex: isFocused ? 1 : 'initial',\n }}\n data-size={size}\n {...compositeFocusProps}\n >\n {prefix ? <div data-element=\"Prefix\">{prefix}</div> : null}\n <ComboBoxInput\n qa={qa || 'ComboBox'}\n inputRef={inputRef}\n id={id}\n value={effectiveInputValue}\n placeholder={placeholder}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n autoFocus={autoFocus}\n autoComplete={autoComplete}\n size={size}\n mods={mods}\n inputStyles={inputStyles}\n keyboardProps={keyboardProps}\n focusProps={{ ...focusProps, onBlur: handleInputBlur }}\n isPopoverOpen={isPopoverOpen}\n hasResults={hasResults}\n comboBoxId={comboBoxId}\n listStateRef={listStateRef}\n onChange={handleInputChange}\n onFocus={handleInputFocus}\n />\n <div data-element=\"Suffix\">\n {suffixPosition === 'before' ? suffix : null}\n {validationState || isLoading ? (\n <>\n {validationState && !isLoading ? validation : null}\n {isLoading ? <LoadingIcon /> : null}\n </>\n ) : null}\n {suffixPosition === 'after' ? suffix : null}\n {showClearButton && (\n <Item.Action\n icon={<CloseIcon />}\n size={size}\n theme={validationState === 'invalid' ? 'danger' : undefined}\n qa=\"ComboBoxClearButton\"\n data-no-trigger={hideTrigger ? '' : undefined}\n aria-label=\"Clear value\"\n onPress={clearValue}\n />\n )}\n {!hideTrigger ? (\n <Item.Action\n ref={triggerRef}\n data-popover-trigger\n icon={<DirectionIcon to={isPopoverOpen ? 'up' : 'down'} />}\n qa=\"ComboBoxTrigger\"\n mods={{\n pressed: isPopoverOpen,\n disabled: isDisabled,\n loading: isLoading,\n }}\n data-size={size}\n isDisabled={isDisabled}\n styles={triggerStyles}\n aria-expanded={isPopoverOpen}\n aria-haspopup=\"listbox\"\n aria-label=\"Show options\"\n onPress={() => {\n if (!isDisabled) {\n const willOpen = !isPopoverOpen;\n setIsPopoverOpen(willOpen);\n if (willOpen) {\n inputRef.current?.focus();\n // If opening with no filtered results, disable filter to show all items\n if (!hasResults) {\n setIsFilterActive(false);\n }\n }\n }\n }}\n />\n ) : null}\n </div>\n <ComboBoxOverlay\n isOpen={shouldShowPopover}\n triggerRef={wrapperRef as RefObject<HTMLElement>}\n popoverRef={popoverRef}\n listBoxRef={listBoxRef}\n direction={direction}\n shouldFlip={shouldFlip}\n overlayOffset={overlayOffset}\n containerPadding={containerPadding}\n comboBoxWidth={comboBoxWidth}\n comboBoxId={comboBoxId}\n overlayStyles={overlayStyles}\n listBoxStyles={listBoxStyles}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n effectiveSelectedKey={effectiveSelectedKey}\n isDisabled={isDisabled}\n disabledKeys={props.disabledKeys}\n items={sortedItems}\n listStateRef={listStateRef}\n label={label}\n ariaLabel={(props as any)['aria-label']}\n compositeFocusProps={compositeFocusProps}\n filter={filterFn}\n size={size}\n onSelectionChange={handleSelectionChange}\n onClose={() => setIsPopoverOpen(false)}\n >\n {children}\n </ComboBoxOverlay>\n </ComboBoxWrapperElement>\n );\n\n const { children: _, ...propsWithoutChildren } = props;\n\n return wrapWithField<Omit<CubeComboBoxProps<T>, 'children'>>(\n comboBoxField,\n ref,\n propsWithoutChildren,\n );\n}) as unknown as (<T>(\n props: CubeComboBoxProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement) & { Item: typeof Item; Section: typeof BaseSection };\n\nComboBox.Item = Item;\n\nComboBox.Section = BaseSection;\n\nObject.defineProperty(ComboBox, 'cubeInputType', {\n value: 'ComboBox',\n enumerable: false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AW;MACX,SAAS;OACT;KAEH,CAAC,cACA,oBAACA,gBAAK;MACJ,KAAK;MACL;MACA,MAAM,oBAAC,iBAAc,IAAI,gBAAgB,OAAO,SAAU;MAC1D,IAAG;MACH,MAAM;OACJ,SAAS;OACT,UAAU;OACV,SAAS;OACV;MACD,aAAW;MACC;MACZ,QAAQ;MACR,iBAAe;MACf,iBAAc;MACd,cAAW;MACX,eAAe;AACb,WAAI,CAAC,YAAY;QACf,MAAM,WAAW,CAAC;AAClB,yBAAiB,SAAS;AAC1B,YAAI,UAAU;AACZ,kBAAS,SAAS,OAAO;AAEzB,aAAI,CAAC,WACH,mBAAkB,MAAM;;;;OAKhC,GACA;;KACA;GACN,oBAAC;IACC,QAAQ;IACR,YAAY;IACA;IACA;IACD;IACC;IACG;IACG;IACH;IACH;IACG;IACA;IACD;IACC;IACA;IACO;IACV;IACZ,cAAc,MAAM;IACpB,OAAO;IACO;IACP;IACP,WAAY,MAAc;IACL;IACrB,QAAQ;IACF;IACN,mBAAmB;IACnB,eAAe,iBAAiB,MAAM;IAErC;KACe;;GACK;CAG3B,MAAM,EAAE,UAAU,GAAG,GAAG,yBAAyB;AAEjD,QAAO,cACL,eACA,KACA,qBACD;EACD;AAIF,SAAS,OAAOA;AAEhB,SAAS,UAAUC;AAEnB,OAAO,eAAe,UAAU,iBAAiB;CAC/C,OAAO;CACP,YAAY;CACZ,cAAc;CACf,CAAC"}
1
+ {"version":3,"file":"ComboBox.js","names":["mergeProps","useFocus","Item","BaseSection"],"sources":["../../../../src/components/fields/ComboBox/ComboBox.tsx"],"sourcesContent":["import { FocusableRef, Key } from '@react-types/shared';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n extractStyles,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport React, {\n cloneElement,\n ForwardedRef,\n forwardRef,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n useFilter,\n useKeyboard,\n useOverlay,\n useOverlayPosition,\n} from 'react-aria';\nimport { Section as BaseSection, useListState } from 'react-stately';\n\nimport { useEvent } from '../../../_internal';\nimport { CloseIcon, DirectionIcon, LoadingIcon } from '../../../icons';\nimport { useProviderProps } from '../../../provider';\nimport { FieldBaseProps } from '../../../shared';\nimport { chainRaf } from '../../../utils/raf';\nimport { generateRandomId } from '../../../utils/random';\nimport {\n mergeProps,\n useCombinedRefs,\n useLayoutEffect,\n} from '../../../utils/react';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { useEventBus } from '../../../utils/react/useEventBus';\nimport { CollectionItem as Item } from '../../CollectionItem';\nimport { useFieldProps, useFormProps, wrapWithField } from '../../form';\nimport { DisplayTransition } from '../../helpers';\nimport { Portal } from '../../portal';\nimport { InvalidIcon } from '../../shared/InvalidIcon';\nimport { ValidIcon } from '../../shared/ValidIcon';\nimport { ListBox } from '../ListBox/ListBox';\nimport {\n DEFAULT_INPUT_STYLES,\n INPUT_WRAPPER_STYLES,\n} from '../TextInput/TextInputBase';\n\ntype FilterFn = (textValue: string, inputValue: string) => boolean;\n\nexport type PopoverTriggerAction = 'focus' | 'input' | 'manual';\n\nconst ComboBoxWrapperElement = tasty({\n qa: 'ComboBoxWrapper',\n styles: INPUT_WRAPPER_STYLES,\n});\n\nconst InputElement = tasty({\n as: 'input',\n styles: DEFAULT_INPUT_STYLES,\n});\n\nconst ComboBoxOverlayWrapper = tasty({\n qa: 'ComboBoxOverlayWrapper',\n styles: {\n position: 'absolute',\n zIndex: 1000,\n },\n});\n\nconst ComboBoxOverlayElement = tasty({\n qa: 'ComboBoxOverlay',\n styles: {\n display: 'grid',\n gridRows: '1sf',\n gridColumns: '1sf',\n width: '$overlay-min-width max-content 50vw',\n height: 'initial max-content (50vh - 5x)',\n overflow: 'auto',\n background: '#white',\n radius: '1cr',\n shadow: true,\n padding: '0',\n border: '#border',\n hide: {\n '': false,\n hidden: true,\n },\n boxSizing: 'border-box',\n transition:\n 'translate $transition ease-out, scale $transition ease-out, theme $transition ease-out',\n translate: {\n '': '0 0',\n 'open & [data-placement=\"top\"]': '0 0',\n '!open & [data-placement=\"top\"]': '0 1x',\n 'open & ([data-placement=\"bottom\"] | ![data-placement])': '0 0',\n '!open & ([data-placement=\"bottom\"] | ![data-placement])': '0 -1x',\n },\n transformOrigin: {\n '': 'top center',\n '[data-placement=\"top\"]': 'bottom center',\n },\n scale: {\n '': '1 1',\n '!open': '1 .9',\n },\n opacity: {\n '': 1,\n '!open': 0.001,\n },\n\n '$overlay-min-width': 'min 30x',\n },\n});\n\nexport interface CubeComboBoxProps<T>\n extends BasePropsWithoutChildren,\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps,\n FieldBaseProps {\n /** The selected key in controlled mode */\n selectedKey?: string | null;\n /** The default selected key in uncontrolled mode */\n defaultSelectedKey?: string | null;\n /** Callback fired when selection changes */\n onSelectionChange?: (key: string | null) => void;\n\n /** The input value in controlled mode */\n inputValue?: string;\n /** The default input value in uncontrolled mode */\n defaultInputValue?: string;\n /** Callback fired when input value changes */\n onInputChange?: (value: string) => void;\n /** Placeholder text for the input */\n placeholder?: string;\n /** Whether the input should have autofocus */\n autoFocus?: boolean;\n /** HTML autocomplete attribute for the input */\n autoComplete?: string;\n /** Callback fired when focus enters the component (input, trigger, or popover). Does not receive event object. */\n onFocus?: () => void;\n /** Callback fired when focus leaves the component entirely. Does not receive event object. */\n onBlur?: () => void;\n /** Callback fired when a key is pressed on the input */\n onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n\n /** Popover trigger behavior: 'focus', 'input', or 'manual'. Defaults to 'input' */\n popoverTrigger?: PopoverTriggerAction;\n\n /** Items for the listbox (alternative to children) */\n items?: Iterable<T>;\n /** Children for the listbox (static items or render function) */\n children?: ReactNode | ((item: T) => ReactElement);\n\n /**\n * Custom filter function for determining if an option should be included.\n * Pass `false` to disable internal filtering completely.\n */\n filter?: FilterFn | false;\n\n /** Whether to allow entering custom values that are not in the predefined options */\n allowsCustomValue?: boolean;\n /** Whether to commit custom value on blur in allowsCustomValue mode (default: true) */\n shouldCommitOnBlur?: boolean;\n /** Whether to clear selection and input on blur (default: false, only applies to non-custom-value mode) */\n clearOnBlur?: boolean;\n /** Whether the combobox is clearable using ESC key or clear button */\n isClearable?: boolean;\n /** Callback called when the clear button is pressed */\n onClear?: () => void;\n\n /** Left input icon */\n icon?: ReactElement;\n /** Input decoration before the main input */\n prefix?: ReactNode;\n /** Input decoration after the main input */\n suffix?: ReactNode;\n /** Whether to hide the trigger button */\n hideTrigger?: boolean;\n /** Size of the combobox */\n size?: 'small' | 'medium' | 'large' | (string & {});\n\n /** Ref for accessing the input element */\n inputRef?: RefObject<HTMLInputElement>;\n /** Ref for accessing the wrapper element */\n wrapperRef?: RefObject<HTMLDivElement>;\n /** Ref for accessing the listbox element */\n listBoxRef?: RefObject<HTMLDivElement>;\n /** Ref for accessing the popover element */\n popoverRef?: RefObject<HTMLDivElement>;\n /** Ref for accessing the trigger button element */\n triggerRef?: FocusableRef<HTMLButtonElement>;\n\n /** Custom styles for the input */\n inputStyles?: Styles;\n /** Custom styles for the trigger button */\n triggerStyles?: Styles;\n /** Custom styles for the listbox */\n listBoxStyles?: Styles;\n /** Custom styles for the popover overlay */\n overlayStyles?: Styles;\n /** Custom styles for individual options */\n optionStyles?: Styles;\n /** Custom styles for sections */\n sectionStyles?: Styles;\n /** Custom styles for section headings */\n headingStyles?: Styles;\n\n /** Whether the combobox is disabled */\n isDisabled?: boolean;\n /** Whether the combobox is in loading state */\n isLoading?: boolean;\n /** Validation state of the combobox */\n validationState?: 'valid' | 'invalid';\n /** Keys of disabled items */\n disabledKeys?: Iterable<Key>;\n /** Whether to flip the popover placement */\n shouldFlip?: boolean;\n /** Placement direction for the popover */\n direction?: 'bottom' | 'top';\n /** Offset for the popover */\n overlayOffset?: number;\n /** Minimum padding in pixels between the popover and viewport edges */\n containerPadding?: number;\n /** Whether the combobox is read-only */\n isReadOnly?: boolean;\n /** Suffix position goes before or after the validation and loading statuses */\n suffixPosition?: 'before' | 'after';\n /**\n * Sort selected item to the top when the popover opens.\n * Only works when using the `items` prop (data-driven mode).\n * Ignored when using JSX children.\n * @default true when items are provided, false when using JSX children\n */\n sortSelectedToTop?: boolean;\n /** Callback called when the popover open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\n// ============================================================================\n// Hook: useComboBoxState\n// ============================================================================\ninterface UseComboBoxStateProps {\n selectedKey?: string | null;\n defaultSelectedKey?: string | null;\n inputValue?: string;\n defaultInputValue?: string;\n comboBoxId: string;\n}\n\ninterface UseComboBoxStateReturn {\n effectiveSelectedKey: Key | null;\n effectiveInputValue: string;\n isPopoverOpen: boolean;\n setIsPopoverOpen: (open: boolean) => void;\n setInternalSelectedKey: (key: Key | null) => void;\n setInternalInputValue: (value: string) => void;\n isControlledKey: boolean;\n isControlledInput: boolean;\n}\n\nfunction useComboBoxState({\n selectedKey,\n defaultSelectedKey,\n inputValue,\n defaultInputValue,\n comboBoxId,\n}: UseComboBoxStateProps): UseComboBoxStateReturn {\n // Get event bus for menu synchronization\n const { emit, on } = useEventBus();\n\n // Internal state for uncontrolled mode\n const [internalSelectedKey, setInternalSelectedKey] = useState<Key | null>(\n defaultSelectedKey ?? null,\n );\n const [internalInputValue, setInternalInputValue] = useState(\n defaultInputValue ?? '',\n );\n\n const isControlledKey = selectedKey !== undefined;\n const isControlledInput = inputValue !== undefined;\n\n const effectiveSelectedKey = isControlledKey\n ? selectedKey\n : internalSelectedKey;\n const effectiveInputValue = isControlledInput\n ? inputValue\n : internalInputValue;\n\n // Popover state\n const [isPopoverOpen, setIsPopoverOpen] = useState(false);\n\n // Listen for other menus opening and close this one if needed\n useEffect(() => {\n const unsubscribe = on('popover:open', (data: { menuId: string }) => {\n if (data.menuId !== comboBoxId && isPopoverOpen) {\n setIsPopoverOpen(false);\n }\n });\n\n return unsubscribe;\n }, [on, comboBoxId, isPopoverOpen]);\n\n // Emit event when this combobox opens\n useEffect(() => {\n if (isPopoverOpen) {\n emit('popover:open', { menuId: comboBoxId });\n }\n }, [isPopoverOpen, emit, comboBoxId]);\n\n return {\n effectiveSelectedKey,\n effectiveInputValue,\n isPopoverOpen,\n setIsPopoverOpen,\n setInternalSelectedKey,\n setInternalInputValue,\n isControlledKey,\n isControlledInput,\n };\n}\n\n// ============================================================================\n// Hook: useComboBoxFiltering\n// ============================================================================\ninterface UseComboBoxFilteringProps {\n effectiveInputValue: string;\n filter: FilterFn | false | undefined;\n}\n\ninterface UseComboBoxFilteringReturn {\n filterFn: (nodes: Iterable<any>) => Iterable<any>;\n isFilterActive: boolean;\n setIsFilterActive: (active: boolean) => void;\n}\n\nfunction useComboBoxFiltering({\n effectiveInputValue,\n filter,\n}: UseComboBoxFilteringProps): UseComboBoxFilteringReturn {\n const [isFilterActive, setIsFilterActive] = useState(false);\n\n const { contains } = useFilter({ sensitivity: 'base' });\n\n const textFilterFn = useMemo<FilterFn>(\n () => (filter === false ? () => true : filter || contains),\n [filter, contains],\n );\n\n // Create a filter function for collection nodes\n const filterFn = useCallback(\n (nodes: Iterable<any>) => {\n const term = effectiveInputValue.trim();\n\n // Don't filter if not active or no search term\n if (!isFilterActive || !term) {\n return nodes;\n }\n\n // Filter nodes based on their textValue and preserve section structure\n return [...nodes]\n .map((node: any) => {\n if (node.type === 'section' && node.childNodes) {\n const filteredChildren = [...node.childNodes].filter((child: any) =>\n textFilterFn(child.textValue || '', term),\n );\n\n if (filteredChildren.length === 0) {\n return null;\n }\n\n return {\n ...node,\n childNodes: filteredChildren,\n hasChildNodes: true,\n };\n }\n\n return textFilterFn(node.textValue || '', term) ? node : null;\n })\n .filter(Boolean);\n },\n [isFilterActive, effectiveInputValue, textFilterFn],\n );\n\n return {\n filterFn,\n isFilterActive,\n setIsFilterActive,\n };\n}\n\n// ============================================================================\n// Hook: useCompositeFocus\n// ============================================================================\ninterface UseCompositeFocusProps {\n wrapperRef: RefObject<HTMLElement>;\n popoverRef: RefObject<HTMLElement>;\n onFocus?: () => void;\n onBlur?: () => void;\n isDisabled?: boolean;\n}\n\ninterface UseCompositeFocusReturn {\n compositeFocusProps: {\n onFocus: (e: React.FocusEvent) => void;\n onBlur: (e: React.FocusEvent) => void;\n };\n}\n\nfunction useCompositeFocus({\n wrapperRef,\n popoverRef,\n onFocus,\n onBlur,\n isDisabled,\n}: UseCompositeFocusProps): UseCompositeFocusReturn {\n const wasInsideRef = useRef(false);\n const rafRef = useRef<number | null>(null);\n\n const checkFocus = useCallback(() => {\n if (isDisabled) return;\n\n const activeElement = document.activeElement;\n const isInside =\n (wrapperRef.current?.contains(activeElement) ?? false) ||\n (popoverRef.current?.contains(activeElement) ?? false);\n\n if (isInside !== wasInsideRef.current) {\n wasInsideRef.current = isInside;\n if (isInside) {\n onFocus?.();\n } else {\n onBlur?.();\n }\n }\n }, [wrapperRef, popoverRef, onFocus, onBlur, isDisabled]);\n\n const handleFocusOrBlur = useCallback(\n (e: React.FocusEvent) => {\n // Cancel any pending check\n if (rafRef.current !== null) {\n cancelAnimationFrame(rafRef.current);\n }\n\n // Schedule focus check for next frame\n rafRef.current = requestAnimationFrame(() => {\n rafRef.current = null;\n checkFocus();\n });\n },\n [checkFocus],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n if (rafRef.current !== null) {\n cancelAnimationFrame(rafRef.current);\n }\n };\n }, []);\n\n return {\n compositeFocusProps: {\n onFocus: handleFocusOrBlur,\n onBlur: handleFocusOrBlur,\n },\n };\n}\n\n// ============================================================================\n// Hook: useComboBoxKeyboard\n// ============================================================================\ninterface UseComboBoxKeyboardProps {\n isPopoverOpen: boolean;\n listStateRef: RefObject<any>;\n hasResults: boolean;\n allowsCustomValue?: boolean;\n effectiveInputValue: string;\n isClearable?: boolean;\n onSelectionChange: (selection: Key | Key[] | null) => void;\n onClearValue: () => void;\n onOpenPopover: () => void;\n onClosePopover: () => void;\n inputRef: RefObject<HTMLInputElement>;\n setIsFilterActive: (active: boolean) => void;\n onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n}\n\nfunction useComboBoxKeyboard({\n isPopoverOpen,\n listStateRef,\n hasResults,\n allowsCustomValue,\n effectiveInputValue,\n isClearable,\n onSelectionChange,\n onClearValue,\n onOpenPopover,\n onClosePopover,\n inputRef,\n setIsFilterActive,\n onKeyDown,\n}: UseComboBoxKeyboardProps) {\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n // Call user's handler first\n onKeyDown?.(e as React.KeyboardEvent<HTMLInputElement>);\n\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n\n // Open popover if closed\n if (!isPopoverOpen) {\n // If opening with no filtered results, disable filter to show all items\n if (!hasResults) {\n setIsFilterActive(false);\n }\n onOpenPopover();\n return;\n }\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection, disabledKeys } = listState;\n\n // Helper to collect visible item keys (supports sections)\n const collectVisibleKeys = (nodes: Iterable<any>, out: Key[]) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n if (!disabledKeys?.has(node.key)) {\n out.push(node.key);\n }\n } else if (node.childNodes) {\n collectVisibleKeys(node.childNodes, out);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n if (visibleKeys.length === 0) return;\n\n const isArrowDown = e.key === 'ArrowDown';\n const currentKey = selectionManager.focusedKey;\n\n let nextKey: Key | null = null;\n\n if (currentKey == null) {\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n } else {\n const currentIndex = visibleKeys.indexOf(currentKey);\n if (currentIndex !== -1) {\n const newIndex = currentIndex + (isArrowDown ? 1 : -1);\n if (newIndex >= 0 && newIndex < visibleKeys.length) {\n nextKey = visibleKeys[newIndex];\n }\n } else {\n nextKey = isArrowDown\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n }\n }\n\n if (nextKey != null) {\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n selectionManager.setFocusedKey(nextKey);\n }\n } else if (e.key === 'Enter') {\n // If popover is open, try to select the focused item first\n if (isPopoverOpen) {\n const listState = listStateRef.current;\n if (listState) {\n const keyToSelect = listState.selectionManager.focusedKey;\n\n if (keyToSelect != null) {\n e.preventDefault();\n listState.selectionManager.select(keyToSelect, e);\n // Ensure the popover closes even if selection stays the same\n onClosePopover();\n inputRef.current?.focus();\n return;\n }\n }\n }\n\n // If no results, handle empty input or custom values\n if (!hasResults) {\n if (allowsCustomValue) {\n const value = effectiveInputValue.trim();\n\n // Commit the custom value\n onSelectionChange(\n (value as unknown as Key) ?? (null as unknown as Key),\n );\n\n // If popover is closed and we have a value, allow Enter to propagate for form submission\n // If popover is open OR value is empty, prevent default to avoid premature submission\n if (isPopoverOpen || !value) {\n e.preventDefault();\n }\n } else {\n e.preventDefault();\n onSelectionChange(null);\n }\n\n return;\n }\n\n // Clear selection if input is empty and popover is closed (or no focused item)\n const trimmed = (effectiveInputValue || '').trim();\n if (trimmed === '') {\n e.preventDefault();\n onSelectionChange(null);\n return;\n }\n } else if (e.key === 'Escape') {\n if (isPopoverOpen) {\n e.preventDefault();\n onClosePopover();\n inputRef.current?.focus();\n } else if (effectiveInputValue && isClearable) {\n e.preventDefault();\n onClearValue();\n }\n } else if (e.key === 'Home' || e.key === 'End') {\n if (isPopoverOpen) {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection, disabledKeys } = listState;\n\n // Helper to collect visible item keys (supports sections)\n const collectVisibleKeys = (nodes: Iterable<any>, out: Key[]) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n if (!disabledKeys?.has(node.key)) {\n out.push(node.key);\n }\n } else if (node.childNodes) {\n collectVisibleKeys(node.childNodes, out);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectVisibleKeys(collection, visibleKeys);\n\n if (visibleKeys.length === 0) return;\n\n const targetKey =\n e.key === 'Home'\n ? visibleKeys[0]\n : visibleKeys[visibleKeys.length - 1];\n\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n selectionManager.setFocusedKey(targetKey);\n }\n }\n },\n });\n\n return { keyboardProps };\n}\n\n// ============================================================================\n// Component: ComboBoxInput\n// ============================================================================\ninterface ComboBoxInputProps {\n qa?: string;\n inputRef: RefObject<HTMLInputElement>;\n id?: string;\n value: string;\n placeholder?: string;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n autoFocus?: boolean;\n autoComplete?: string;\n size: string;\n mods: Record<string, any>;\n inputStyles?: Styles;\n keyboardProps: any;\n focusProps: any;\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onFocus: (e: React.FocusEvent<HTMLInputElement>) => void;\n isPopoverOpen: boolean;\n hasResults: boolean;\n comboBoxId: string;\n listStateRef: RefObject<any>;\n}\n\nconst ComboBoxInput = forwardRef<HTMLInputElement, ComboBoxInputProps>(\n function ComboBoxInput(\n {\n qa,\n inputRef,\n id,\n value,\n placeholder,\n isDisabled,\n isReadOnly,\n autoFocus,\n autoComplete,\n size,\n mods,\n inputStyles,\n keyboardProps,\n focusProps,\n onChange,\n onFocus,\n isPopoverOpen,\n hasResults,\n comboBoxId,\n listStateRef,\n },\n ref,\n ) {\n const combinedRef = useCombinedRefs(ref, inputRef);\n\n return (\n <InputElement\n ref={combinedRef}\n qa={qa}\n id={id}\n type=\"text\"\n value={value}\n placeholder={placeholder}\n isDisabled={isDisabled}\n readOnly={isReadOnly}\n autoFocus={autoFocus}\n autoComplete={autoComplete}\n data-autofocus={autoFocus ? '' : undefined}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={focusProps.onBlur}\n {...keyboardProps}\n styles={inputStyles}\n mods={mods}\n data-size={size}\n data-input-type=\"combobox\"\n role=\"combobox\"\n aria-expanded={isPopoverOpen && hasResults}\n aria-haspopup=\"listbox\"\n aria-controls={\n isPopoverOpen && hasResults\n ? `ComboBoxListBox-${comboBoxId}`\n : undefined\n }\n aria-activedescendant={\n isPopoverOpen &&\n hasResults &&\n listStateRef.current?.selectionManager.focusedKey != null\n ? `ListBoxItem-${listStateRef.current?.selectionManager.focusedKey}`\n : undefined\n }\n />\n );\n },\n);\n\n// ============================================================================\n// Component: ComboBoxOverlay\n// ============================================================================\ninterface ComboBoxOverlayProps {\n isOpen: boolean;\n triggerRef: RefObject<HTMLElement>;\n popoverRef: RefObject<HTMLDivElement>;\n listBoxRef: RefObject<HTMLDivElement>;\n direction: 'bottom' | 'top';\n shouldFlip: boolean;\n overlayOffset: number;\n containerPadding: number;\n comboBoxWidth?: number;\n comboBoxId: string;\n overlayStyles?: Styles;\n listBoxStyles?: Styles;\n optionStyles?: Styles;\n sectionStyles?: Styles;\n headingStyles?: Styles;\n effectiveSelectedKey: Key | null;\n isDisabled?: boolean;\n disabledKeys?: Iterable<Key>;\n items?: Iterable<any>;\n children: ReactNode;\n listStateRef: RefObject<any>;\n onSelectionChange: (selection: Key | Key[] | null) => void;\n onClose: () => void;\n label?: ReactNode;\n ariaLabel?: string;\n compositeFocusProps: {\n onFocus: (e: React.FocusEvent) => void;\n onBlur: (e: React.FocusEvent) => void;\n };\n filter?: (nodes: Iterable<any>) => Iterable<any>;\n size?: 'small' | 'medium' | 'large' | (string & {});\n}\n\nfunction ComboBoxOverlay({\n isOpen,\n triggerRef,\n popoverRef,\n listBoxRef,\n direction,\n shouldFlip,\n overlayOffset,\n containerPadding,\n comboBoxWidth,\n comboBoxId,\n overlayStyles,\n listBoxStyles,\n optionStyles,\n sectionStyles,\n headingStyles,\n effectiveSelectedKey,\n isDisabled,\n disabledKeys,\n items,\n children,\n listStateRef,\n onSelectionChange,\n onClose,\n label,\n ariaLabel,\n compositeFocusProps,\n filter,\n size = 'medium',\n}: ComboBoxOverlayProps) {\n // Overlay positioning\n const {\n overlayProps: overlayPositionProps,\n placement,\n updatePosition,\n } = useOverlayPosition({\n targetRef: triggerRef as any,\n overlayRef: popoverRef as any,\n placement: `${direction} start` as any,\n shouldFlip,\n isOpen,\n offset: overlayOffset,\n containerPadding: containerPadding,\n });\n\n // Overlay behavior (dismiss on outside click, escape)\n const { overlayProps: overlayBehaviorProps } = useOverlay(\n {\n onClose,\n shouldCloseOnBlur: true,\n isOpen,\n isDismissable: true,\n shouldCloseOnInteractOutside: (el) => {\n const menuTriggerEl = el.closest('[data-popover-trigger]');\n if (!menuTriggerEl) return true;\n if (menuTriggerEl === triggerRef?.current) return true;\n return false;\n },\n },\n popoverRef as any,\n );\n\n // Update position when overlay opens or content changes\n useLayoutEffect(() => {\n if (isOpen && updatePosition) {\n // Use triple RAF to ensure layout is complete before positioning\n // This gives enough time for the DisplayTransition and content to render\n return chainRaf(() => {\n updatePosition();\n }, 3);\n }\n }, [isOpen]);\n\n // Extract primary placement direction for consistent styling\n const placementDirection = placement?.split(' ')[0] || direction;\n\n const overlayContent = (\n <DisplayTransition isShown={isOpen}>\n {({ phase, isShown, ref: transitionRef }) => (\n <ComboBoxOverlayWrapper\n {...mergeProps(\n overlayPositionProps,\n overlayBehaviorProps,\n compositeFocusProps,\n )}\n ref={popoverRef}\n style={overlayPositionProps.style}\n >\n <ComboBoxOverlayElement\n ref={transitionRef}\n data-placement={placementDirection}\n data-phase={phase}\n mods={{\n open: isShown,\n hidden: phase === 'unmounted',\n }}\n styles={overlayStyles}\n style={{\n '--overlay-min-width': comboBoxWidth\n ? `${comboBoxWidth}px`\n : undefined,\n }}\n >\n <ListBox\n ref={listBoxRef}\n focusOnHover\n disableSelectionToggle\n id={`ComboBoxListBox-${comboBoxId}`}\n aria-label={\n ariaLabel || (typeof label === 'string' ? label : 'Options')\n }\n selectedKey={effectiveSelectedKey}\n selectionMode=\"single\"\n isDisabled={isDisabled}\n disabledKeys={disabledKeys}\n shouldUseVirtualFocus={true}\n items={items as any}\n filter={filter}\n styles={listBoxStyles}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n stateRef={listStateRef}\n size=\"medium\"\n shape=\"popover\"\n onSelectionChange={onSelectionChange}\n >\n {children as any}\n </ListBox>\n </ComboBoxOverlayElement>\n </ComboBoxOverlayWrapper>\n )}\n </DisplayTransition>\n );\n\n return <Portal>{overlayContent}</Portal>;\n}\n\n// ============================================================================\n// Main Component: ComboBox\n// ============================================================================\nexport const ComboBox = forwardRef(function ComboBox<T extends object>(\n props: CubeComboBoxProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n props = useFieldProps(props, {\n valuePropsMapper: ({ value, onChange }) => {\n return {\n // Form value maps to selectedKey (the committed value) in both modes\n selectedKey: value ?? null,\n onSelectionChange(val: string | null) {\n // Commit selection changes to the form\n onChange(val);\n },\n };\n },\n });\n\n let {\n qa,\n label,\n extra,\n labelStyles,\n isRequired,\n necessityIndicator,\n validationState,\n id,\n icon,\n prefix,\n isDisabled,\n autoFocus,\n autoComplete = 'off',\n wrapperRef,\n inputRef,\n triggerRef,\n popoverRef,\n listBoxRef,\n isLoading,\n inputStyles,\n optionStyles,\n triggerStyles,\n listBoxStyles,\n overlayStyles,\n suffix,\n hideTrigger,\n message,\n description,\n size = 'medium',\n direction = 'bottom',\n shouldFlip = true,\n popoverTrigger = 'input',\n suffixPosition = 'before',\n filter,\n styles,\n labelSuffix,\n selectedKey,\n defaultSelectedKey,\n inputValue,\n defaultInputValue,\n onInputChange,\n isClearable,\n onClear,\n placeholder,\n allowsCustomValue,\n shouldCommitOnBlur = true,\n clearOnBlur,\n items,\n children: renderChildren,\n sectionStyles,\n headingStyles,\n isReadOnly,\n overlayOffset = 8,\n containerPadding = 8,\n onSelectionChange: externalOnSelectionChange,\n sortSelectedToTop: sortSelectedToTopProp,\n onOpenChange,\n onFocus,\n onBlur,\n onKeyDown,\n form,\n ...otherProps\n } = props;\n\n // Generate a unique ID for this combobox instance\n const comboBoxId = useMemo(() => generateRandomId(), []);\n\n // State management hook\n const {\n effectiveSelectedKey,\n effectiveInputValue,\n isPopoverOpen,\n setIsPopoverOpen,\n setInternalSelectedKey,\n setInternalInputValue,\n isControlledKey,\n isControlledInput,\n } = useComboBoxState({\n selectedKey,\n defaultSelectedKey,\n inputValue,\n defaultInputValue,\n comboBoxId,\n });\n\n // Track if sortSelectedToTop was explicitly provided\n const sortSelectedToTopExplicit = sortSelectedToTopProp !== undefined;\n // Default to true if items are provided, false otherwise\n const sortSelectedToTop = sortSelectedToTopProp ?? (items ? true : false);\n\n // Cache for sorted items array when using `items` prop\n const cachedItemsOrder = useRef<T[] | null>(null);\n const selectionWhenClosed = useRef<string | null>(null);\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n wrapperRef = useCombinedRefs(wrapperRef);\n inputRef = useCombinedRefs(inputRef);\n triggerRef = useCombinedRefs(triggerRef);\n popoverRef = useCombinedRefs(popoverRef);\n listBoxRef = useCombinedRefs(listBoxRef);\n\n // Sort items with selected on top if enabled\n const getSortedItems = useCallback((): typeof items => {\n if (!items) return items;\n\n if (!sortSelectedToTop) return items;\n\n // Reuse cached order if available\n if (cachedItemsOrder.current) {\n return cachedItemsOrder.current;\n }\n\n // Warn if explicitly requested but not supported\n if (sortSelectedToTopExplicit && !items) {\n console.warn(\n 'ComboBox: sortSelectedToTop only works with the items prop. ' +\n 'Sorting will be skipped when using JSX children.',\n );\n return items;\n }\n\n const selectedKey = isPopoverOpen\n ? effectiveSelectedKey\n : selectionWhenClosed.current;\n\n if (!selectedKey) return items;\n\n const itemsArray = Array.isArray(items) ? items : Array.from(items);\n const selectedItem = itemsArray.find((item) => {\n const key = (item as any)?.key ?? (item as any)?.id;\n return key != null && String(key) === String(selectedKey);\n });\n\n if (!selectedItem) return items;\n\n const sorted = [\n selectedItem,\n ...itemsArray.filter((item) => {\n const key = (item as any)?.key ?? (item as any)?.id;\n return key == null || String(key) !== String(selectedKey);\n }),\n ] as T[];\n\n if (isPopoverOpen) {\n cachedItemsOrder.current = sorted;\n }\n\n return sorted;\n }, [\n items,\n sortSelectedToTop,\n sortSelectedToTopExplicit,\n effectiveSelectedKey,\n isPopoverOpen,\n ]);\n\n const sortedItems = getSortedItems();\n\n // Preserve the original `children` (may be a render function) before we\n // potentially overwrite it.\n let children: ReactNode = renderChildren as ReactNode;\n\n const renderFn = renderChildren as unknown;\n\n if (sortedItems && typeof renderFn === 'function') {\n try {\n const itemsArray = Array.from(sortedItems as Iterable<any>);\n children = itemsArray.map((item, idx) => {\n const rendered = (renderFn as (it: any) => ReactNode)(item);\n if (\n React.isValidElement(rendered) &&\n (rendered as ReactElement).key == null\n ) {\n return React.cloneElement(rendered as ReactElement, {\n key: (rendered as any)?.key ?? item?.key ?? idx,\n });\n }\n\n return rendered as ReactNode;\n });\n } catch {\n // If conversion fails, proceed with the original children\n }\n }\n\n // Invalidate cached sorting whenever items change\n useEffect(() => {\n cachedItemsOrder.current = null;\n }, [items]);\n\n // Capture selection when popover closes\n useEffect(() => {\n if (!isPopoverOpen) {\n selectionWhenClosed.current =\n effectiveSelectedKey != null ? String(effectiveSelectedKey) : null;\n cachedItemsOrder.current = null;\n }\n }, [isPopoverOpen, effectiveSelectedKey]);\n\n // Call onOpenChange when popover state changes\n useEffect(() => {\n onOpenChange?.(isPopoverOpen);\n }, [isPopoverOpen]);\n\n // Filtering hook\n const { filterFn, isFilterActive, setIsFilterActive } = useComboBoxFiltering({\n effectiveInputValue,\n filter,\n });\n\n // Create local collection state for reading item data (labels, etc.)\n // This allows us to read item labels even before the popover opens\n const localCollectionState = useListState({\n children,\n items: sortedItems,\n selectionMode: 'none', // Don't manage selection in this state\n });\n\n const { isFocused, focusProps } = useFocus({ isDisabled });\n\n // Helper to check if current input value is valid\n const checkInputValidity = useCallback(() => {\n if (!effectiveInputValue.trim()) {\n return { isValid: false, singleMatchKey: null, filteredCount: 0 };\n }\n\n // Get filtered collection based on current input\n const filteredNodes = filterFn(localCollectionState.collection);\n const filteredItems: Array<{ key: Key; textValue: string }> = [];\n\n // Flatten filtered nodes (handle sections)\n for (const node of filteredNodes) {\n if (node.type === 'section' && node.childNodes) {\n for (const child of node.childNodes) {\n if (child.type === 'item') {\n filteredItems.push({\n key: child.key,\n textValue: child.textValue || '',\n });\n }\n }\n } else if (node.type === 'item') {\n filteredItems.push({\n key: node.key,\n textValue: node.textValue || '',\n });\n }\n }\n\n const filteredCount = filteredItems.length;\n\n // Check for exact match\n const exactMatch = filteredItems.find(\n (item) =>\n item.textValue.toLowerCase() ===\n effectiveInputValue.trim().toLowerCase(),\n );\n\n if (exactMatch) {\n return { isValid: true, singleMatchKey: exactMatch.key, filteredCount };\n }\n\n // If exactly one filtered result, consider it valid\n if (filteredCount === 1) {\n return {\n isValid: true,\n singleMatchKey: filteredItems[0].key,\n filteredCount,\n };\n }\n\n return { isValid: false, singleMatchKey: null, filteredCount };\n }, [effectiveInputValue, filterFn, localCollectionState.collection]);\n\n // Composite blur handler - fires when focus leaves the entire component\n const handleCompositeBlur = useEvent(() => {\n // NOTE: Do NOT disable filter yet; we need it active for validity check\n\n // In allowsCustomValue mode\n if (allowsCustomValue) {\n // Commit the input value if it's non-empty and nothing is selected\n if (\n shouldCommitOnBlur &&\n effectiveInputValue &&\n effectiveSelectedKey == null\n ) {\n externalOnSelectionChange?.(effectiveInputValue as string);\n if (!isControlledKey) {\n setInternalSelectedKey(effectiveInputValue as Key);\n }\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n\n // Clear selection if input is empty\n if (!String(effectiveInputValue).trim()) {\n externalOnSelectionChange?.(null);\n if (!isControlledKey) {\n setInternalSelectedKey(null);\n }\n if (!isControlledInput) {\n setInternalInputValue('');\n }\n onInputChange?.('');\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n }\n\n // In non-custom-value mode, validate input and handle accordingly\n if (!allowsCustomValue) {\n const { isValid, singleMatchKey } = checkInputValidity();\n\n // If there's exactly one filtered result, auto-select it\n if (\n isValid &&\n singleMatchKey != null &&\n singleMatchKey !== effectiveSelectedKey\n ) {\n const label = getItemLabel(singleMatchKey);\n\n if (!isControlledKey) {\n setInternalSelectedKey(singleMatchKey);\n }\n if (!isControlledInput) {\n setInternalInputValue(label);\n }\n onInputChange?.(label);\n externalOnSelectionChange?.(singleMatchKey as string | null);\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n\n // If input is invalid (no exact match, not a single result)\n if (!isValid) {\n const trimmedInput = effectiveInputValue.trim();\n\n // Clear if clearOnBlur is set or input is empty\n if (clearOnBlur || !trimmedInput) {\n externalOnSelectionChange?.(null);\n if (!isControlledKey) {\n setInternalSelectedKey(null);\n }\n if (!isControlledInput) {\n setInternalInputValue('');\n }\n onInputChange?.('');\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n\n // Reset input to current selected value (or empty if none)\n const nextValue =\n effectiveSelectedKey != null\n ? getItemLabel(effectiveSelectedKey)\n : '';\n\n if (!isControlledInput) {\n setInternalInputValue(nextValue);\n }\n onInputChange?.(nextValue);\n onBlur?.();\n setIsFilterActive(false);\n return;\n }\n }\n\n // Fallback: Reset input to show current selection (or empty if none)\n const nextValue =\n effectiveSelectedKey != null ? getItemLabel(effectiveSelectedKey) : '';\n\n if (!isControlledInput) {\n setInternalInputValue(nextValue);\n }\n onInputChange?.(nextValue);\n onBlur?.();\n setIsFilterActive(false);\n });\n\n // Composite focus hook - handles focus tracking across wrapper and portaled popover\n const { compositeFocusProps } = useCompositeFocus({\n wrapperRef,\n popoverRef,\n onFocus,\n onBlur: handleCompositeBlur,\n isDisabled,\n });\n\n let isInvalid = validationState === 'invalid';\n\n let validationIcon = isInvalid ? InvalidIcon : ValidIcon;\n let validation = cloneElement(validationIcon);\n\n // Ref to access internal ListBox state\n const listStateRef = useRef<any>(null);\n const focusInitAttemptsRef = useRef(0);\n\n // Helper to get label from local collection\n const getItemLabel = useCallback(\n (key: Key): string => {\n const item = localCollectionState?.collection?.getItem(key);\n return item?.textValue || String(key);\n },\n [localCollectionState?.collection],\n );\n\n // Selection change handler\n const handleSelectionChange = useEvent((selection: Key | Key[] | null) => {\n // Extract single key from selection (we only support single selection)\n const key = Array.isArray(selection) ? selection[0] : selection;\n\n // Update selected key\n if (!isControlledKey) {\n setInternalSelectedKey(key ?? null);\n }\n\n // Update input value to show selected item label\n if (key != null) {\n setIsFilterActive(false);\n\n const label = getItemLabel(key);\n\n if (!isControlledInput) {\n setInternalInputValue(label);\n }\n onInputChange?.(label);\n } else {\n // Clear input when selection is cleared\n if (!isControlledInput) {\n setInternalInputValue('');\n }\n onInputChange?.('');\n setIsFilterActive(false);\n }\n\n externalOnSelectionChange?.(key as string | null);\n\n // Close popover after selection\n setIsPopoverOpen(false);\n\n // Focus input\n setTimeout(() => {\n inputRef.current?.focus();\n }, 0);\n });\n\n // Input change handler\n const handleInputChange = useEvent(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value;\n\n // Update input value\n if (!isControlledInput) {\n setInternalInputValue(value);\n }\n onInputChange?.(value);\n\n const trimmed = value.trim();\n setIsFilterActive(trimmed.length > 0);\n\n // Only clear selection in allowsCustomValue mode\n // In normal mode, typing just filters - selection stays until explicitly changed\n if (allowsCustomValue && effectiveSelectedKey != null) {\n if (!isControlledKey) {\n setInternalSelectedKey(null);\n }\n externalOnSelectionChange?.(null);\n }\n\n // Open popover based on trigger\n if (popoverTrigger !== 'manual' && value && !isPopoverOpen) {\n setIsPopoverOpen(true);\n }\n },\n );\n\n // Initialize input value from defaultInputValue or defaultSelectedKey (uncontrolled mode only, one-time)\n const [hasInitialized, setHasInitialized] = useState(false);\n\n useEffect(() => {\n // Only initialize once, in uncontrolled input mode\n if (hasInitialized || isControlledInput) return;\n\n // Priority 1: defaultInputValue takes precedence\n if (defaultInputValue !== undefined) {\n setInternalInputValue(defaultInputValue);\n setHasInitialized(true);\n return;\n }\n\n // Priority 2: fall back to defaultSelectedKey's label\n if (defaultSelectedKey) {\n const label = getItemLabel(defaultSelectedKey);\n\n setInternalInputValue(label);\n setHasInitialized(true);\n }\n }, [\n hasInitialized,\n isControlledInput,\n defaultInputValue,\n defaultSelectedKey,\n getItemLabel,\n children,\n ]);\n\n // Sync input value with controlled selectedKey\n const lastSyncedSelectedKey = useRef<Key | null | undefined>(undefined);\n\n useEffect(() => {\n // Only run when selectedKey is controlled but inputValue is uncontrolled\n if (!isControlledKey || isControlledInput) return;\n\n // Skip if the key hasn't actually changed (prevents unnecessary resets when collection rebuilds)\n if (\n lastSyncedSelectedKey.current !== undefined &&\n lastSyncedSelectedKey.current === effectiveSelectedKey\n ) {\n return;\n }\n\n lastSyncedSelectedKey.current = effectiveSelectedKey;\n\n // Get the expected label for the current selection\n const expectedLabel =\n effectiveSelectedKey != null ? getItemLabel(effectiveSelectedKey) : '';\n\n // Update the input value to match the selected key's label\n setInternalInputValue(expectedLabel);\n }, [isControlledKey, isControlledInput, effectiveSelectedKey, getItemLabel]);\n\n // Input focus handler\n const handleInputFocus = useEvent((e: React.FocusEvent<HTMLInputElement>) => {\n // Call focus props handler if it exists\n focusProps.onFocus?.(e as any);\n\n if (popoverTrigger === 'focus' && !isPopoverOpen) {\n setIsPopoverOpen(true);\n }\n });\n\n // Input blur handler - just handles internal focus props\n const handleInputBlur = useEvent((e: React.FocusEvent<HTMLInputElement>) => {\n focusProps.onBlur?.(e as any);\n });\n\n // Clear button logic\n let hasValue = allowsCustomValue\n ? effectiveInputValue !== ''\n : effectiveSelectedKey != null;\n let showClearButton = isClearable && hasValue && !isDisabled && !isReadOnly;\n\n // Check if there are any results after filtering\n const hasResults = useMemo(() => {\n if (!children) return false;\n if (!Array.isArray(children) && children === null) return false;\n\n // If we have a collection, check if filtering will produce any results\n if (localCollectionState?.collection) {\n const filteredNodes = filterFn(localCollectionState.collection);\n const resultArray = Array.from(filteredNodes).flatMap((node: any) => {\n if (node.type === 'section' && node.childNodes) {\n return [...node.childNodes];\n }\n\n return [node];\n });\n return resultArray.length > 0;\n }\n\n // Fallback: check if children exists\n return Array.isArray(children) ? children.length > 0 : true;\n }, [children, localCollectionState?.collection, filterFn]);\n\n // Clear function\n let clearValue = useEvent(() => {\n // Clear input\n if (!isControlledInput) {\n setInternalInputValue('');\n }\n onInputChange?.('');\n\n // Clear selection\n if (!isControlledKey) {\n setInternalSelectedKey(null);\n }\n externalOnSelectionChange?.(null);\n\n // Close popover\n if (isPopoverOpen) {\n setIsPopoverOpen(false);\n }\n\n // Focus input\n inputRef.current?.focus();\n\n onClear?.();\n });\n\n // Keyboard navigation hook\n const { keyboardProps } = useComboBoxKeyboard({\n isPopoverOpen,\n listStateRef,\n hasResults,\n allowsCustomValue,\n effectiveInputValue,\n isClearable,\n onSelectionChange: handleSelectionChange,\n onClearValue: clearValue,\n onOpenPopover: () => setIsPopoverOpen(true),\n onClosePopover: () => setIsPopoverOpen(false),\n inputRef,\n setIsFilterActive,\n onKeyDown,\n });\n\n if (icon) {\n icon = <div data-element=\"InputIcon\">{icon}</div>;\n\n if (prefix) {\n prefix = (\n <>\n {icon}\n {prefix}\n </>\n );\n } else {\n prefix = icon;\n }\n }\n\n let mods = useMemo(\n () => ({\n invalid: isInvalid,\n valid: validationState === 'valid',\n disabled: isDisabled,\n hovered: false,\n focused: isFocused,\n loading: isLoading,\n prefix: !!prefix,\n suffix: true,\n clearable: showClearButton,\n }),\n [\n isInvalid,\n validationState,\n isDisabled,\n isFocused,\n isLoading,\n prefix,\n showClearButton,\n ],\n );\n\n const comboBoxWidth = wrapperRef?.current?.offsetWidth;\n\n const shouldShowPopover = Boolean(isPopoverOpen && hasResults);\n\n // Close popover if no results\n useEffect(() => {\n if (isPopoverOpen && !hasResults) {\n setIsPopoverOpen(false);\n }\n }, [isPopoverOpen, hasResults]);\n\n const ensureInitialFocus = useCallback(() => {\n if (!shouldShowPopover) return;\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const { selectionManager, collection, disabledKeys, lastFocusSourceRef } =\n listState;\n if (!selectionManager || !collection) return;\n\n const collectFirstKey = (): Key | null => {\n for (const node of collection) {\n if (node.type === 'item') {\n if (!disabledKeys?.has(node.key)) return node.key;\n } else if (node.childNodes) {\n for (const child of node.childNodes) {\n if (child.type === 'item' && !disabledKeys?.has(child.key)) {\n return child.key;\n }\n }\n }\n }\n return null;\n };\n\n if (lastFocusSourceRef) lastFocusSourceRef.current = 'keyboard';\n\n // Check if we need to set or update focus\n const currentFocusedKey = selectionManager.focusedKey;\n let needsRefocus = false;\n\n if (currentFocusedKey == null) {\n // No focus at all - need to set initial focus\n needsRefocus = true;\n } else {\n // Check if currently focused key still exists in the collection\n const focusedItemExists = collection.getItem(currentFocusedKey) != null;\n if (!focusedItemExists) {\n // Focused item was filtered out - need to refocus\n needsRefocus = true;\n }\n }\n\n if (needsRefocus) {\n let keyToFocus: Key | null = null;\n\n // First try to focus on the selected key if it exists in the collection\n if (\n effectiveSelectedKey != null &&\n collection.getItem(effectiveSelectedKey) != null\n ) {\n keyToFocus = effectiveSelectedKey;\n } else {\n // Fall back to the first key in the collection\n keyToFocus = collectFirstKey();\n }\n\n if (keyToFocus != null) {\n selectionManager.setFocusedKey(keyToFocus);\n }\n }\n }, [shouldShowPopover, effectiveSelectedKey]);\n\n useLayoutEffect(() => {\n if (!shouldShowPopover) return;\n focusInitAttemptsRef.current = 0;\n\n const tick = () => {\n if (!shouldShowPopover) return;\n ensureInitialFocus();\n focusInitAttemptsRef.current += 1;\n // Try a few frames to wait for collection to mount\n if (\n focusInitAttemptsRef.current < 8 &&\n listStateRef.current?.selectionManager?.focusedKey == null\n ) {\n requestAnimationFrame(tick);\n }\n };\n\n requestAnimationFrame(() => requestAnimationFrame(tick));\n }, [shouldShowPopover, ensureInitialFocus]);\n\n const comboBoxField = (\n <ComboBoxWrapperElement\n ref={wrapperRef}\n mods={mods}\n styles={styles}\n style={{\n zIndex: isFocused ? 1 : 'initial',\n }}\n data-size={size}\n {...compositeFocusProps}\n >\n {prefix ? <div data-element=\"Prefix\">{prefix}</div> : null}\n <ComboBoxInput\n qa={qa || 'ComboBox'}\n inputRef={inputRef}\n id={id}\n value={effectiveInputValue}\n placeholder={placeholder}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n autoFocus={autoFocus}\n autoComplete={autoComplete}\n size={size}\n mods={mods}\n inputStyles={inputStyles}\n keyboardProps={keyboardProps}\n focusProps={{ ...focusProps, onBlur: handleInputBlur }}\n isPopoverOpen={isPopoverOpen}\n hasResults={hasResults}\n comboBoxId={comboBoxId}\n listStateRef={listStateRef}\n onChange={handleInputChange}\n onFocus={handleInputFocus}\n />\n <div data-element=\"Suffix\">\n {suffixPosition === 'before' ? suffix : null}\n {validationState || isLoading ? (\n <>\n {validationState && !isLoading ? validation : null}\n {isLoading ? <LoadingIcon /> : null}\n </>\n ) : null}\n {suffixPosition === 'after' ? suffix : null}\n {showClearButton && (\n <Item.Action\n icon={<CloseIcon />}\n size={size}\n theme={validationState === 'invalid' ? 'danger' : undefined}\n qa=\"ComboBoxClearButton\"\n data-no-trigger={hideTrigger ? '' : undefined}\n aria-label=\"Clear value\"\n onPress={clearValue}\n />\n )}\n {!hideTrigger ? (\n <Item.Action\n ref={triggerRef}\n data-popover-trigger\n icon={<DirectionIcon to={isPopoverOpen ? 'up' : 'down'} />}\n qa=\"ComboBoxTrigger\"\n mods={{\n pressed: isPopoverOpen,\n disabled: isDisabled,\n loading: isLoading,\n }}\n data-size={size}\n isDisabled={isDisabled}\n styles={triggerStyles}\n aria-expanded={isPopoverOpen}\n aria-haspopup=\"listbox\"\n aria-label=\"Show options\"\n onPress={() => {\n if (!isDisabled) {\n const willOpen = !isPopoverOpen;\n setIsPopoverOpen(willOpen);\n if (willOpen) {\n inputRef.current?.focus();\n // If opening with no filtered results, disable filter to show all items\n if (!hasResults) {\n setIsFilterActive(false);\n }\n }\n }\n }}\n />\n ) : null}\n </div>\n <ComboBoxOverlay\n isOpen={shouldShowPopover}\n triggerRef={wrapperRef as RefObject<HTMLElement>}\n popoverRef={popoverRef}\n listBoxRef={listBoxRef}\n direction={direction}\n shouldFlip={shouldFlip}\n overlayOffset={overlayOffset}\n containerPadding={containerPadding}\n comboBoxWidth={comboBoxWidth}\n comboBoxId={comboBoxId}\n overlayStyles={overlayStyles}\n listBoxStyles={listBoxStyles}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n effectiveSelectedKey={effectiveSelectedKey}\n isDisabled={isDisabled}\n disabledKeys={props.disabledKeys}\n items={sortedItems}\n listStateRef={listStateRef}\n label={label}\n ariaLabel={(props as any)['aria-label']}\n compositeFocusProps={compositeFocusProps}\n filter={filterFn}\n size={size}\n onSelectionChange={handleSelectionChange}\n onClose={() => setIsPopoverOpen(false)}\n >\n {children}\n </ComboBoxOverlay>\n </ComboBoxWrapperElement>\n );\n\n const { children: _, ...propsWithoutChildren } = props;\n\n return wrapWithField<Omit<CubeComboBoxProps<T>, 'children'>>(\n comboBoxField,\n ref,\n propsWithoutChildren,\n );\n}) as unknown as (<T>(\n props: CubeComboBoxProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement) & { Item: typeof Item; Section: typeof BaseSection };\n\nComboBox.Item = Item;\n\nComboBox.Section = BaseSection;\n\nObject.defineProperty(ComboBox, 'cubeInputType', {\n value: 'ComboBox',\n enumerable: false,\n configurable: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DA,MAAM,yBAAyB,MAAM;CACnC,IAAI;CACJ,QAAQ;CACT,CAAC;AAEF,MAAM,eAAe,MAAM;CACzB,IAAI;CACJ,QAAQ;CACT,CAAC;AAEF,MAAM,yBAAyB,MAAM;CACnC,IAAI;CACJ,QAAQ;EACN,UAAU;EACV,QAAQ;EACT;CACF,CAAC;AAEF,MAAM,yBAAyB,MAAM;CACnC,IAAI;CACJ,QAAQ;EACN,SAAS;EACT,UAAU;EACV,aAAa;EACb,OAAO;EACP,QAAQ;EACR,UAAU;EACV,YAAY;EACZ,QAAQ;EACR,QAAQ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,oBAAC;IACC,QAAQ;IACR,YAAY;IACA;IACA;IACD;IACC;IACG;IACG;IACH;IACH;IACG;IACA;IACD;IACC;IACA;IACO;IACV;IACZ,cAAc,MAAM;IACpB,OAAO;IACO;IACP;IACP,WAAY,MAAc;IACL;IACrB,QAAQ;IACF;IACN,mBAAmB;IACnB,eAAe,iBAAiB,MAAM;IAErC;KACe;;GACK;CAG3B,MAAM,EAAE,UAAU,GAAG,GAAG,yBAAyB;AAEjD,QAAO,cACL,eACA,KACA,qBACD;EACD;AAIF,SAAS,OAAOA;AAEhB,SAAS,UAAUC;AAEnB,OAAO,eAAe,UAAU,iBAAiB;CAC/C,OAAO;CACP,YAAY;CACZ,cAAc;CACf,CAAC"}
@@ -1,9 +1,7 @@
1
1
 
2
- import { Styles } from "../../../tasty/styles/types.js";
3
- import { BaseProps, ContainerStyleProps } from "../../../tasty/types.js";
4
- import "../../../tasty/index.js";
5
2
  import { FieldBaseProps, ValidationState } from "../../../shared/form.js";
6
3
  import "../../../shared/index.js";
4
+ import { BaseProps, ContainerStyleProps, Styles } from "@tenphi/tasty";
7
5
  import * as react_jsx_runtime0 from "react/jsx-runtime";
8
6
  import { AriaDateFieldProps, DateValue } from "react-aria";
9
7
  import { FocusableRef } from "@react-types/shared";
@@ -1,6 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
2
- import { extractStyles } from "../../../tasty/utils/styles.js";
3
- import { CONTAINER_STYLES } from "../../../tasty/styles/list.js";
1
+ /** @license MIT | @cube-dev/ui-kit v0.119.1 | Cube Dev Team */
4
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
5
3
  import { useProviderProps } from "../../../provider.js";
6
4
  import { useFormProps } from "../../form/Form/Form.js";
@@ -11,6 +9,7 @@ import { DatePickerSegment } from "./DatePickerSegment.js";
11
9
  import { DEFAULT_DATE_PROPS } from "./props.js";
12
10
  import { formatSegments, useFocusManagerRef } from "./utils.js";
13
11
  import { parseAbsoluteDate } from "./parseDate.js";
12
+ import { CONTAINER_STYLES, extractStyles } from "@tenphi/tasty";
14
13
  import { forwardRef, useRef } from "react";
15
14
  import { jsx } from "react/jsx-runtime";
16
15
  import { useDateField, useLocale } from "react-aria";
@@ -1 +1 @@
1
- {"version":3,"file":"DateInput.js","names":["DateInputBase","mergeProps"],"sources":["../../../../src/components/fields/DatePicker/DateInput.tsx"],"sourcesContent":["import { createCalendar } from '@internationalized/date';\nimport { FocusableRef } from '@react-types/shared';\nimport { forwardRef, useRef } from 'react';\nimport {\n AriaDateFieldProps,\n DateValue,\n useDateField,\n useLocale,\n} from 'react-aria';\nimport { useDateFieldState } from 'react-stately';\n\nimport { useProviderProps } from '../../../provider';\nimport { FieldBaseProps, ValidationState } from '../../../shared';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n extractStyles,\n Styles,\n} from '../../../tasty';\nimport { mergeProps } from '../../../utils/react';\nimport { useFieldProps, useFormProps, wrapWithField } from '../../form';\n\nimport { DateInputBase } from './DateInputBase';\nimport { DatePickerSegment } from './DatePickerSegment';\nimport { parseAbsoluteDate } from './parseDate';\nimport { DEFAULT_DATE_PROPS } from './props';\nimport { formatSegments, useFocusManagerRef } from './utils';\n\nexport interface CubeDateInputProps<T extends DateValue = DateValue>\n extends Omit<AriaDateFieldProps<T>, 'errorMessage'>,\n BaseProps,\n ContainerStyleProps,\n FieldBaseProps {\n wrapperStyles?: Styles;\n inputStyles?: Styles;\n styles?: Styles;\n size?: 'small' | 'medium' | 'large' | (string & {});\n validationState?: ValidationState;\n useLocale?: boolean;\n}\n\nfunction DateInput<T extends DateValue>(\n props: CubeDateInputProps<T>,\n ref: FocusableRef<HTMLElement>,\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n props = useFieldProps(props, {\n defaultValidationTrigger: 'onBlur',\n valuePropsMapper: ({ value, onChange }) => ({\n value: typeof value === 'string' ? parseAbsoluteDate(value) : value,\n onChange,\n }),\n });\n props = Object.assign({}, DEFAULT_DATE_PROPS, props);\n\n let {\n qa,\n autoFocus,\n isDisabled,\n inputStyles,\n wrapperStyles,\n isReadOnly,\n isRequired,\n size = 'medium',\n useLocale: useLocaleProp,\n } = props;\n\n let styles = extractStyles(props, CONTAINER_STYLES, wrapperStyles);\n\n let domRef = useFocusManagerRef(ref);\n let { locale } = useLocale();\n let state = useDateFieldState({\n ...props,\n locale: useLocaleProp ? locale : 'en-US',\n createCalendar,\n });\n\n if (useLocaleProp == null) {\n state.segments = formatSegments(state.segments);\n }\n\n let fieldRef = useRef(null);\n let { labelProps, fieldProps } = useDateField(props, state, fieldRef);\n\n const component = (\n <DateInputBase\n ref={fieldRef}\n qa={qa || 'DateInput'}\n inputType=\"dateinput\"\n size={size}\n fieldProps={fieldProps}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n validationState={state.validationState}\n styles={wrapperStyles}\n inputStyles={inputStyles}\n >\n {state.segments.map((segment, i) => (\n <DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n />\n ))}\n </DateInputBase>\n );\n\n return wrapWithField(component, domRef, {\n ...props,\n labelProps: mergeProps(props.labelProps, labelProps),\n });\n}\n\n/**\n * DateInputs allow users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nconst _DateInput = forwardRef(DateInput) as typeof DateInput;\n\n(_DateInput as any).displayName = 'DateInput';\n\nexport { _DateInput as DateInput };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0CA,SAAS,UACP,OACA,KACA;AACA,SAAQ,iBAAiB,MAAM;AAC/B,SAAQ,aAAa,MAAM;AAC3B,SAAQ,cAAc,OAAO;EAC3B,0BAA0B;EAC1B,mBAAmB,EAAE,OAAO,gBAAgB;GAC1C,OAAO,OAAO,UAAU,WAAW,kBAAkB,MAAM,GAAG;GAC9D;GACD;EACF,CAAC;AACF,SAAQ,OAAO,OAAO,EAAE,EAAE,oBAAoB,MAAM;CAEpD,IAAI,EACF,IACA,WACA,YACA,aACA,eACA,YACA,YACA,OAAO,UACP,WAAW,kBACT;AAES,eAAc,OAAO,kBAAkB,cAAc;CAElE,IAAI,SAAS,mBAAmB,IAAI;CACpC,IAAI,EAAE,WAAW,WAAW;CAC5B,IAAI,QAAQ,kBAAkB;EAC5B,GAAG;EACH,QAAQ,gBAAgB,SAAS;EACjC;EACD,CAAC;AAEF,KAAI,iBAAiB,KACnB,OAAM,WAAW,eAAe,MAAM,SAAS;CAGjD,IAAI,WAAW,OAAO,KAAK;CAC3B,IAAI,EAAE,YAAY,eAAe,aAAa,OAAO,OAAO,SAAS;AA4BrE,QAAO,cAzBL,oBAACA;EACC,KAAK;EACL,IAAI,MAAM;EACV,WAAU;EACJ;EACM;EACA;EACD;EACX,iBAAiB,MAAM;EACvB,QAAQ;EACK;YAEZ,MAAM,SAAS,KAAK,SAAS,MAC5B,oBAAC;GAEU;GACF;GACK;GACA;GACA;KALP,EAML,CACF;GACY,EAGc,QAAQ;EACtC,GAAG;EACH,YAAYC,aAAW,MAAM,YAAY,WAAW;EACrD,CAAC;;;;;;AAOJ,MAAM,aAAa,WAAW,UAAU;AAExC,AAAC,WAAmB,cAAc"}
1
+ {"version":3,"file":"DateInput.js","names":["DateInputBase","mergeProps"],"sources":["../../../../src/components/fields/DatePicker/DateInput.tsx"],"sourcesContent":["import { createCalendar } from '@internationalized/date';\nimport { FocusableRef } from '@react-types/shared';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n extractStyles,\n Styles,\n} from '@tenphi/tasty';\nimport { forwardRef, useRef } from 'react';\nimport {\n AriaDateFieldProps,\n DateValue,\n useDateField,\n useLocale,\n} from 'react-aria';\nimport { useDateFieldState } from 'react-stately';\n\nimport { useProviderProps } from '../../../provider';\nimport { FieldBaseProps, ValidationState } from '../../../shared';\nimport { mergeProps } from '../../../utils/react';\nimport { useFieldProps, useFormProps, wrapWithField } from '../../form';\n\nimport { DateInputBase } from './DateInputBase';\nimport { DatePickerSegment } from './DatePickerSegment';\nimport { parseAbsoluteDate } from './parseDate';\nimport { DEFAULT_DATE_PROPS } from './props';\nimport { formatSegments, useFocusManagerRef } from './utils';\n\nexport interface CubeDateInputProps<T extends DateValue = DateValue>\n extends Omit<AriaDateFieldProps<T>, 'errorMessage'>,\n BaseProps,\n ContainerStyleProps,\n FieldBaseProps {\n wrapperStyles?: Styles;\n inputStyles?: Styles;\n styles?: Styles;\n size?: 'small' | 'medium' | 'large' | (string & {});\n validationState?: ValidationState;\n useLocale?: boolean;\n}\n\nfunction DateInput<T extends DateValue>(\n props: CubeDateInputProps<T>,\n ref: FocusableRef<HTMLElement>,\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n props = useFieldProps(props, {\n defaultValidationTrigger: 'onBlur',\n valuePropsMapper: ({ value, onChange }) => ({\n value: typeof value === 'string' ? parseAbsoluteDate(value) : value,\n onChange,\n }),\n });\n props = Object.assign({}, DEFAULT_DATE_PROPS, props);\n\n let {\n qa,\n autoFocus,\n isDisabled,\n inputStyles,\n wrapperStyles,\n isReadOnly,\n isRequired,\n size = 'medium',\n useLocale: useLocaleProp,\n } = props;\n\n let styles = extractStyles(props, CONTAINER_STYLES, wrapperStyles);\n\n let domRef = useFocusManagerRef(ref);\n let { locale } = useLocale();\n let state = useDateFieldState({\n ...props,\n locale: useLocaleProp ? locale : 'en-US',\n createCalendar,\n });\n\n if (useLocaleProp == null) {\n state.segments = formatSegments(state.segments);\n }\n\n let fieldRef = useRef(null);\n let { labelProps, fieldProps } = useDateField(props, state, fieldRef);\n\n const component = (\n <DateInputBase\n ref={fieldRef}\n qa={qa || 'DateInput'}\n inputType=\"dateinput\"\n size={size}\n fieldProps={fieldProps}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n validationState={state.validationState}\n styles={wrapperStyles}\n inputStyles={inputStyles}\n >\n {state.segments.map((segment, i) => (\n <DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n />\n ))}\n </DateInputBase>\n );\n\n return wrapWithField(component, domRef, {\n ...props,\n labelProps: mergeProps(props.labelProps, labelProps),\n });\n}\n\n/**\n * DateInputs allow users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nconst _DateInput = forwardRef(DateInput) as typeof DateInput;\n\n(_DateInput as any).displayName = 'DateInput';\n\nexport { _DateInput as DateInput };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0CA,SAAS,UACP,OACA,KACA;AACA,SAAQ,iBAAiB,MAAM;AAC/B,SAAQ,aAAa,MAAM;AAC3B,SAAQ,cAAc,OAAO;EAC3B,0BAA0B;EAC1B,mBAAmB,EAAE,OAAO,gBAAgB;GAC1C,OAAO,OAAO,UAAU,WAAW,kBAAkB,MAAM,GAAG;GAC9D;GACD;EACF,CAAC;AACF,SAAQ,OAAO,OAAO,EAAE,EAAE,oBAAoB,MAAM;CAEpD,IAAI,EACF,IACA,WACA,YACA,aACA,eACA,YACA,YACA,OAAO,UACP,WAAW,kBACT;AAES,eAAc,OAAO,kBAAkB,cAAc;CAElE,IAAI,SAAS,mBAAmB,IAAI;CACpC,IAAI,EAAE,WAAW,WAAW;CAC5B,IAAI,QAAQ,kBAAkB;EAC5B,GAAG;EACH,QAAQ,gBAAgB,SAAS;EACjC;EACD,CAAC;AAEF,KAAI,iBAAiB,KACnB,OAAM,WAAW,eAAe,MAAM,SAAS;CAGjD,IAAI,WAAW,OAAO,KAAK;CAC3B,IAAI,EAAE,YAAY,eAAe,aAAa,OAAO,OAAO,SAAS;AA4BrE,QAAO,cAzBL,oBAACA;EACC,KAAK;EACL,IAAI,MAAM;EACV,WAAU;EACJ;EACM;EACA;EACD;EACX,iBAAiB,MAAM;EACvB,QAAQ;EACK;YAEZ,MAAM,SAAS,KAAK,SAAS,MAC5B,oBAAC;GAEU;GACF;GACK;GACA;GACA;KALP,EAML,CACF;GACY,EAGc,QAAQ;EACtC,GAAG;EACH,YAAYC,aAAW,MAAM,YAAY,WAAW;EACrD,CAAC;;;;;;AAOJ,MAAM,aAAa,WAAW,UAAU;AAExC,AAAC,WAAmB,cAAc"}
@@ -1,11 +1,9 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
2
- import { extractStyles } from "../../../tasty/utils/styles.js";
3
- import { CONTAINER_STYLES } from "../../../tasty/styles/list.js";
4
- import { tasty } from "../../../tasty/tasty.js";
1
+ /** @license MIT | @cube-dev/ui-kit v0.119.1 | Cube Dev Team */
5
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
6
3
  import { InvalidIcon } from "../../shared/InvalidIcon.js";
7
4
  import { ValidIcon } from "../../shared/ValidIcon.js";
8
5
  import { DEFAULT_INPUT_STYLES, INPUT_WRAPPER_STYLES } from "../TextInput/TextInputBase.js";
6
+ import { CONTAINER_STYLES, extractStyles, tasty } from "@tenphi/tasty";
9
7
  import React, { cloneElement, useRef } from "react";
10
8
  import { jsx, jsxs } from "react/jsx-runtime";
11
9
  import { useFocusRing } from "react-aria";
@@ -1 +1 @@
1
- {"version":3,"file":"DateInputBase.js","names":["mergeProps"],"sources":["../../../../src/components/fields/DatePicker/DateInputBase.tsx"],"sourcesContent":["import { mergeRefs } from '@react-aria/utils';\nimport React, { cloneElement, useRef } from 'react';\nimport { useFocusRing } from 'react-aria';\n\nimport { ValidationState } from '../../../shared';\nimport {\n CONTAINER_STYLES,\n ContainerStyleProps,\n extractStyles,\n Props,\n Styles,\n tasty,\n} from '../../../tasty';\nimport { mergeProps } from '../../../utils/react';\nimport { InvalidIcon } from '../../shared/InvalidIcon';\nimport { ValidIcon } from '../../shared/ValidIcon';\nimport {\n DEFAULT_INPUT_STYLES,\n INPUT_WRAPPER_STYLES,\n} from '../TextInput/TextInputBase';\n\nconst DateInputWrapperElement = tasty({\n qa: 'DateInputWrapper',\n role: 'presentation',\n styles: {\n ...INPUT_WRAPPER_STYLES,\n display: 'flex',\n },\n});\n\nconst DateInputElement = tasty({\n role: 'presentation',\n styles: {\n ...DEFAULT_INPUT_STYLES,\n height: {\n '': '($size-md - 2bw)',\n 'size=small': '($size-sm - 2bw)',\n 'size=large': '($size-lg - 2bw)',\n },\n display: 'flex',\n flow: 'row',\n placeItems: 'center start',\n },\n});\n\ninterface CubeDateAtomInputProps extends ContainerStyleProps {\n qa?: string;\n inputType?: string;\n isDisabled?: boolean;\n children?: React.ReactNode;\n fieldProps?: Props;\n style?: React.CSSProperties;\n disableFocusRing?: boolean;\n autoFocus?: boolean;\n styles?: Styles;\n inputStyles?: Styles;\n size?: 'small' | 'medium' | 'large' | (string & {});\n validationState?: ValidationState;\n isLoading?: boolean;\n suffix?: React.ReactNode;\n}\n\nfunction DateInputBase(props: CubeDateAtomInputProps, ref) {\n let inputRef = useRef(null);\n let {\n qa,\n inputType,\n isDisabled,\n inputStyles,\n children,\n fieldProps,\n style,\n disableFocusRing,\n autoFocus,\n validationState,\n isLoading,\n size = 'medium',\n suffix,\n } = props;\n\n let styles = extractStyles(props, CONTAINER_STYLES);\n\n let { focusProps, isFocused } = useFocusRing({\n isTextInput: true,\n within: true,\n autoFocus,\n });\n\n let isInvalid = validationState === 'invalid';\n let validationIcon = isInvalid ? InvalidIcon : ValidIcon;\n let validation = cloneElement(validationIcon);\n\n return (\n <DateInputWrapperElement\n qa={qa || 'DateTimeInput'}\n styles={styles}\n data-size={size}\n data-input-type={inputType ? inputType : 'datetimeinput'}\n mods={{\n disabled: isDisabled,\n focused: isFocused && !disableFocusRing,\n invalid: isInvalid,\n suffix: (validationState && !isLoading) || isLoading || !!suffix,\n }}\n {...mergeProps(fieldProps ?? {}, focusProps)}\n style={style}\n >\n <div data-element=\"Contents\" role=\"presentation\">\n <DateInputElement\n ref={mergeRefs(ref, inputRef)}\n data-size={size}\n role=\"presentation\"\n styles={inputStyles}\n >\n {children}\n </DateInputElement>\n </div>\n {(validationState && !isLoading) || isLoading || suffix ? (\n <div data-element=\"Suffix\">\n {(validationState && !isLoading) || isLoading ? (\n <div data-element=\"State\">\n {validationState && !isLoading ? validation : null}\n </div>\n ) : null}\n {suffix}\n </div>\n ) : null}\n </DateInputWrapperElement>\n );\n}\n\nconst _DateInputBase = React.forwardRef(DateInputBase);\n\n_DateInputBase.displayName = 'DateInputBase';\n\nexport { _DateInputBase as DateInputBase };\n"],"mappings":";;;;;;;;;;;;;;AAqBA,MAAM,0BAA0B,MAAM;CACpC,IAAI;CACJ,MAAM;CACN,QAAQ;EACN,GAAG;EACH,SAAS;EACV;CACF,CAAC;AAEF,MAAM,mBAAmB,MAAM;CAC7B,MAAM;CACN,QAAQ;EACN,GAAG;EACH,QAAQ;GACN,IAAI;GACJ,cAAc;GACd,cAAc;GACf;EACD,SAAS;EACT,MAAM;EACN,YAAY;EACb;CACF,CAAC;AAmBF,SAAS,cAAc,OAA+B,KAAK;CACzD,IAAI,WAAW,OAAO,KAAK;CAC3B,IAAI,EACF,IACA,WACA,YACA,aACA,UACA,YACA,OACA,kBACA,WACA,iBACA,WACA,OAAO,UACP,WACE;CAEJ,IAAI,SAAS,cAAc,OAAO,iBAAiB;CAEnD,IAAI,EAAE,YAAY,cAAc,aAAa;EAC3C,aAAa;EACb,QAAQ;EACR;EACD,CAAC;CAEF,IAAI,YAAY,oBAAoB;CAEpC,IAAI,aAAa,aADI,YAAY,cAAc,UACF;AAE7C,QACE,qBAAC;EACC,IAAI,MAAM;EACF;EACR,aAAW;EACX,mBAAiB,YAAY,YAAY;EACzC,MAAM;GACJ,UAAU;GACV,SAAS,aAAa,CAAC;GACvB,SAAS;GACT,QAAS,mBAAmB,CAAC,aAAc,aAAa,CAAC,CAAC;GAC3D;EACD,GAAIA,aAAW,cAAc,EAAE,EAAE,WAAW;EACrC;aAEP,oBAAC;GAAI,gBAAa;GAAW,MAAK;aAChC,oBAAC;IACC,KAAK,UAAU,KAAK,SAAS;IAC7B,aAAW;IACX,MAAK;IACL,QAAQ;IAEP;KACgB;IACf,EACJ,mBAAmB,CAAC,aAAc,aAAa,SAC/C,qBAAC;GAAI,gBAAa;cACd,mBAAmB,CAAC,aAAc,YAClC,oBAAC;IAAI,gBAAa;cACf,mBAAmB,CAAC,YAAY,aAAa;KAC1C,GACJ,MACH;IACG,GACJ;GACoB;;AAI9B,MAAM,iBAAiB,MAAM,WAAW,cAAc;AAEtD,eAAe,cAAc"}
1
+ {"version":3,"file":"DateInputBase.js","names":["mergeProps"],"sources":["../../../../src/components/fields/DatePicker/DateInputBase.tsx"],"sourcesContent":["import { mergeRefs } from '@react-aria/utils';\nimport {\n CONTAINER_STYLES,\n ContainerStyleProps,\n extractStyles,\n Props,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport React, { cloneElement, useRef } from 'react';\nimport { useFocusRing } from 'react-aria';\n\nimport { ValidationState } from '../../../shared';\nimport { mergeProps } from '../../../utils/react';\nimport { InvalidIcon } from '../../shared/InvalidIcon';\nimport { ValidIcon } from '../../shared/ValidIcon';\nimport {\n DEFAULT_INPUT_STYLES,\n INPUT_WRAPPER_STYLES,\n} from '../TextInput/TextInputBase';\n\nconst DateInputWrapperElement = tasty({\n qa: 'DateInputWrapper',\n role: 'presentation',\n styles: {\n ...INPUT_WRAPPER_STYLES,\n display: 'flex',\n },\n});\n\nconst DateInputElement = tasty({\n role: 'presentation',\n styles: {\n ...DEFAULT_INPUT_STYLES,\n height: {\n '': '($size-md - 2bw)',\n 'size=small': '($size-sm - 2bw)',\n 'size=large': '($size-lg - 2bw)',\n },\n display: 'flex',\n flow: 'row',\n placeItems: 'center start',\n },\n});\n\ninterface CubeDateAtomInputProps extends ContainerStyleProps {\n qa?: string;\n inputType?: string;\n isDisabled?: boolean;\n children?: React.ReactNode;\n fieldProps?: Props;\n style?: React.CSSProperties;\n disableFocusRing?: boolean;\n autoFocus?: boolean;\n styles?: Styles;\n inputStyles?: Styles;\n size?: 'small' | 'medium' | 'large' | (string & {});\n validationState?: ValidationState;\n isLoading?: boolean;\n suffix?: React.ReactNode;\n}\n\nfunction DateInputBase(props: CubeDateAtomInputProps, ref) {\n let inputRef = useRef(null);\n let {\n qa,\n inputType,\n isDisabled,\n inputStyles,\n children,\n fieldProps,\n style,\n disableFocusRing,\n autoFocus,\n validationState,\n isLoading,\n size = 'medium',\n suffix,\n } = props;\n\n let styles = extractStyles(props, CONTAINER_STYLES);\n\n let { focusProps, isFocused } = useFocusRing({\n isTextInput: true,\n within: true,\n autoFocus,\n });\n\n let isInvalid = validationState === 'invalid';\n let validationIcon = isInvalid ? InvalidIcon : ValidIcon;\n let validation = cloneElement(validationIcon);\n\n return (\n <DateInputWrapperElement\n qa={qa || 'DateTimeInput'}\n styles={styles}\n data-size={size}\n data-input-type={inputType ? inputType : 'datetimeinput'}\n mods={{\n disabled: isDisabled,\n focused: isFocused && !disableFocusRing,\n invalid: isInvalid,\n suffix: (validationState && !isLoading) || isLoading || !!suffix,\n }}\n {...mergeProps(fieldProps ?? {}, focusProps)}\n style={style}\n >\n <div data-element=\"Contents\" role=\"presentation\">\n <DateInputElement\n ref={mergeRefs(ref, inputRef)}\n data-size={size}\n role=\"presentation\"\n styles={inputStyles}\n >\n {children}\n </DateInputElement>\n </div>\n {(validationState && !isLoading) || isLoading || suffix ? (\n <div data-element=\"Suffix\">\n {(validationState && !isLoading) || isLoading ? (\n <div data-element=\"State\">\n {validationState && !isLoading ? validation : null}\n </div>\n ) : null}\n {suffix}\n </div>\n ) : null}\n </DateInputWrapperElement>\n );\n}\n\nconst _DateInputBase = React.forwardRef(DateInputBase);\n\n_DateInputBase.displayName = 'DateInputBase';\n\nexport { _DateInputBase as DateInputBase };\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAM,0BAA0B,MAAM;CACpC,IAAI;CACJ,MAAM;CACN,QAAQ;EACN,GAAG;EACH,SAAS;EACV;CACF,CAAC;AAEF,MAAM,mBAAmB,MAAM;CAC7B,MAAM;CACN,QAAQ;EACN,GAAG;EACH,QAAQ;GACN,IAAI;GACJ,cAAc;GACd,cAAc;GACf;EACD,SAAS;EACT,MAAM;EACN,YAAY;EACb;CACF,CAAC;AAmBF,SAAS,cAAc,OAA+B,KAAK;CACzD,IAAI,WAAW,OAAO,KAAK;CAC3B,IAAI,EACF,IACA,WACA,YACA,aACA,UACA,YACA,OACA,kBACA,WACA,iBACA,WACA,OAAO,UACP,WACE;CAEJ,IAAI,SAAS,cAAc,OAAO,iBAAiB;CAEnD,IAAI,EAAE,YAAY,cAAc,aAAa;EAC3C,aAAa;EACb,QAAQ;EACR;EACD,CAAC;CAEF,IAAI,YAAY,oBAAoB;CAEpC,IAAI,aAAa,aADI,YAAY,cAAc,UACF;AAE7C,QACE,qBAAC;EACC,IAAI,MAAM;EACF;EACR,aAAW;EACX,mBAAiB,YAAY,YAAY;EACzC,MAAM;GACJ,UAAU;GACV,SAAS,aAAa,CAAC;GACvB,SAAS;GACT,QAAS,mBAAmB,CAAC,aAAc,aAAa,CAAC,CAAC;GAC3D;EACD,GAAIA,aAAW,cAAc,EAAE,EAAE,WAAW;EACrC;aAEP,oBAAC;GAAI,gBAAa;GAAW,MAAK;aAChC,oBAAC;IACC,KAAK,UAAU,KAAK,SAAS;IAC7B,aAAW;IACX,MAAK;IACL,QAAQ;IAEP;KACgB;IACf,EACJ,mBAAmB,CAAC,aAAc,aAAa,SAC/C,qBAAC;GAAI,gBAAa;cACd,mBAAmB,CAAC,aAAc,YAClC,oBAAC;IAAI,gBAAa;cACf,mBAAmB,CAAC,YAAY,aAAa;KAC1C,GACJ,MACH;IACG,GACJ;GACoB;;AAI9B,MAAM,iBAAiB,MAAM,WAAW,cAAc;AAEtD,eAAe,cAAc"}
@@ -1,10 +1,8 @@
1
1
 
2
- import { Styles } from "../../../tasty/styles/types.js";
3
- import { BaseProps, ContainerStyleProps } from "../../../tasty/types.js";
4
- import "../../../tasty/index.js";
5
2
  import { FieldBaseProps, ValidationState } from "../../../shared/form.js";
6
3
  import "../../../shared/index.js";
7
4
  import { DateFieldBase } from "./types.js";
5
+ import { BaseProps, ContainerStyleProps, Styles } from "@tenphi/tasty";
8
6
  import * as react from "react";
9
7
  import { AriaDatePickerProps, DateValue } from "react-aria";
10
8
  import * as _react_types_shared0 from "@react-types/shared";
@@ -1,6 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
2
- import { extractStyles } from "../../../tasty/utils/styles.js";
3
- import { CONTAINER_STYLES } from "../../../tasty/styles/list.js";
1
+ /** @license MIT | @cube-dev/ui-kit v0.119.1 | Cube Dev Team */
4
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
5
3
  import { useProviderProps } from "../../../provider.js";
6
4
  import { useFormProps } from "../../form/Form/Form.js";
@@ -16,6 +14,7 @@ import { _Calendar } from "../../other/Calendar/Calendar.js";
16
14
  import { DatePickerButton } from "./DatePickerButton.js";
17
15
  import { DatePickerInput } from "./DatePickerInput.js";
18
16
  import { dateMessages } from "./intl.js";
17
+ import { CONTAINER_STYLES, extractStyles } from "@tenphi/tasty";
19
18
  import { forwardRef, useRef } from "react";
20
19
  import { jsx, jsxs } from "react/jsx-runtime";
21
20
  import { useDatePicker, useFocusRing } from "react-aria";
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","names":["DateInputBase","mergeProps","Calendar","TimeInput"],"sources":["../../../../src/components/fields/DatePicker/DatePicker.tsx"],"sourcesContent":["import { FocusableRef } from '@react-types/shared';\nimport { forwardRef, useRef } from 'react';\nimport {\n AriaDatePickerProps,\n DateValue,\n useDatePicker,\n useFocusRing,\n} from 'react-aria';\nimport { useDatePickerState } from 'react-stately';\n\nimport { useProviderProps } from '../../../provider';\nimport { FieldBaseProps, ValidationState } from '../../../shared';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n extractStyles,\n Styles,\n} from '../../../tasty';\nimport { mergeProps } from '../../../utils/react';\nimport { useFieldProps, useFormProps, wrapWithField } from '../../form';\nimport { Calendar } from '../../other/Calendar/Calendar';\nimport { Dialog, DialogTrigger } from '../../overlays/Dialog';\n\nimport { DateInputBase } from './DateInputBase';\nimport { DatePickerButton } from './DatePickerButton';\nimport { DatePickerInput } from './DatePickerInput';\nimport { dateMessages } from './intl';\nimport { DEFAULT_DATE_PROPS } from './props';\nimport { TimeInput } from './TimeInput';\nimport { DateFieldBase } from './types';\nimport { useFocusManagerRef } from './utils';\n\nexport interface CubeDatePickerProps<T extends DateValue = DateValue>\n extends Omit<AriaDatePickerProps<T>, 'errorMessage'>,\n DateFieldBase<T>,\n BaseProps,\n ContainerStyleProps,\n FieldBaseProps {\n wrapperStyles?: Styles;\n inputStyles?: Styles;\n triggerStyles?: Styles;\n styles?: Styles;\n size?: 'small' | 'medium' | 'large' | (string & {});\n validationState?: ValidationState;\n maxVisibleMonths?: number;\n shouldFlip?: boolean;\n useLocale?: boolean;\n}\n\nfunction DatePicker<T extends DateValue>(\n props: CubeDatePickerProps<T>,\n ref: FocusableRef<HTMLElement>,\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n props = useFieldProps(props, {\n defaultValidationTrigger: 'onBlur',\n });\n props = Object.assign({}, DEFAULT_DATE_PROPS, props);\n\n let styles = extractStyles(props, CONTAINER_STYLES);\n\n let {\n qa,\n size,\n placeholderValue,\n isDisabled,\n validationState,\n useLocale: useLocaleProp,\n autoFocus,\n } = props;\n let targetRef = useRef<HTMLDivElement>(null);\n let state = useDatePickerState({\n ...props,\n shouldCloseOnSelect: () => !state.hasTime,\n });\n let { isOpen, setOpen } = state;\n\n let domRef = useFocusManagerRef(ref);\n\n let { isFocused, focusProps } = useFocusRing({\n within: true,\n isTextInput: true,\n autoFocus,\n });\n\n let { isFocused: isFocusedButton, focusProps: focusPropsButton } =\n useFocusRing({\n within: false,\n isTextInput: false,\n autoFocus,\n });\n\n let {\n groupProps,\n labelProps,\n fieldProps,\n buttonProps,\n dialogProps,\n calendarProps,\n } = useDatePicker(props, state, targetRef);\n\n let placeholder: DateValue | undefined = placeholderValue;\n let timePlaceholder =\n placeholder && 'hour' in placeholder ? placeholder : undefined;\n let timeMinValue =\n props.minValue && 'hour' in props.minValue ? props.minValue : undefined;\n let timeMaxValue =\n props.maxValue && 'hour' in props.maxValue ? props.maxValue : undefined;\n let timeGranularity =\n state.granularity === 'hour' ||\n state.granularity === 'minute' ||\n state.granularity === 'second'\n ? state.granularity\n : null;\n let showTimeField = !!timeGranularity;\n // let visibleMonths = useVisibleMonths(maxVisibleMonths);\n\n const component = (\n <DateInputBase\n ref={targetRef}\n qa={qa || 'DatePicker'}\n inputType=\"datepicker\"\n styles={props.wrapperStyles}\n disableFocusRing={isFocusedButton}\n isDisabled={isDisabled}\n validationState={validationState}\n size={size}\n fieldProps={groupProps}\n {...focusProps}\n suffix={\n <DialogTrigger\n hideArrow\n type=\"popover\"\n mobileType=\"tray\"\n placement=\"bottom right\"\n targetRef={targetRef}\n isOpen={isOpen}\n shouldFlip={props.shouldFlip}\n onOpenChange={setOpen}\n >\n <DatePickerButton\n size={size}\n {...mergeProps(buttonProps, focusPropsButton)}\n isDisabled={isDisabled}\n />\n <Dialog {...dialogProps} width=\"max-content\">\n <Calendar {...calendarProps} />\n {showTimeField && (\n <TimeInput\n padding=\"1x\"\n label={dateMessages['time']}\n value={state.timeValue}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n onChange={state.setTimeValue}\n />\n )}\n </Dialog>\n </DialogTrigger>\n }\n >\n <DatePickerInput useLocale={useLocaleProp} {...fieldProps} />\n </DateInputBase>\n );\n\n return wrapWithField(component, domRef, {\n ...props,\n labelProps: mergeProps(props.labelProps, labelProps),\n });\n}\n\nconst _DatePicker = forwardRef(DatePicker);\n\n_DatePicker.displayName = 'DatePicker';\n\nexport { _DatePicker as DatePicker };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAkDA,SAAS,WACP,OACA,KACA;AACA,SAAQ,iBAAiB,MAAM;AAC/B,SAAQ,aAAa,M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;IAAa,OAAM;eAC7B,oBAACC,aAAS,GAAI,gBAAiB,EAC9B,iBACC,oBAACC;KACC,SAAQ;KACR,OAAO,aAAa;KACpB,OAAO,MAAM;KACb,kBAAkB;KAClB,aAAa;KACb,UAAU;KACV,UAAU;KACV,WAAW,MAAM;KACjB,cAAc,MAAM;KACpB,UAAU,MAAM;MAChB;KAEG;IACK;YAGlB,oBAAC;GAAgB,WAAW;GAAe,GAAI;IAAc;GAC/C,EAGc,QAAQ;EACtC,GAAG;EACH,YAAYF,aAAW,MAAM,YAAY,WAAW;EACrD,CAAC;;AAGJ,MAAM,cAAc,WAAW,WAAW;AAE1C,YAAY,cAAc"}
1
+ {"version":3,"file":"DatePicker.js","names":["DateInputBase","mergeProps","Calendar","TimeInput"],"sources":["../../../../src/components/fields/DatePicker/DatePicker.tsx"],"sourcesContent":["import { FocusableRef } from '@react-types/shared';\nimport {\n BaseProps,\n CONTAINER_STYLES,\n ContainerStyleProps,\n extractStyles,\n Styles,\n} from '@tenphi/tasty';\nimport { forwardRef, useRef } from 'react';\nimport {\n AriaDatePickerProps,\n DateValue,\n useDatePicker,\n useFocusRing,\n} from 'react-aria';\nimport { useDatePickerState } from 'react-stately';\n\nimport { useProviderProps } from '../../../provider';\nimport { FieldBaseProps, ValidationState } from '../../../shared';\nimport { mergeProps } from '../../../utils/react';\nimport { useFieldProps, useFormProps, wrapWithField } from '../../form';\nimport { Calendar } from '../../other/Calendar/Calendar';\nimport { Dialog, DialogTrigger } from '../../overlays/Dialog';\n\nimport { DateInputBase } from './DateInputBase';\nimport { DatePickerButton } from './DatePickerButton';\nimport { DatePickerInput } from './DatePickerInput';\nimport { dateMessages } from './intl';\nimport { DEFAULT_DATE_PROPS } from './props';\nimport { TimeInput } from './TimeInput';\nimport { DateFieldBase } from './types';\nimport { useFocusManagerRef } from './utils';\n\nexport interface CubeDatePickerProps<T extends DateValue = DateValue>\n extends Omit<AriaDatePickerProps<T>, 'errorMessage'>,\n DateFieldBase<T>,\n BaseProps,\n ContainerStyleProps,\n FieldBaseProps {\n wrapperStyles?: Styles;\n inputStyles?: Styles;\n triggerStyles?: Styles;\n styles?: Styles;\n size?: 'small' | 'medium' | 'large' | (string & {});\n validationState?: ValidationState;\n maxVisibleMonths?: number;\n shouldFlip?: boolean;\n useLocale?: boolean;\n}\n\nfunction DatePicker<T extends DateValue>(\n props: CubeDatePickerProps<T>,\n ref: FocusableRef<HTMLElement>,\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n props = useFieldProps(props, {\n defaultValidationTrigger: 'onBlur',\n });\n props = Object.assign({}, DEFAULT_DATE_PROPS, props);\n\n let styles = extractStyles(props, CONTAINER_STYLES);\n\n let {\n qa,\n size,\n placeholderValue,\n isDisabled,\n validationState,\n useLocale: useLocaleProp,\n autoFocus,\n } = props;\n let targetRef = useRef<HTMLDivElement>(null);\n let state = useDatePickerState({\n ...props,\n shouldCloseOnSelect: () => !state.hasTime,\n });\n let { isOpen, setOpen } = state;\n\n let domRef = useFocusManagerRef(ref);\n\n let { isFocused, focusProps } = useFocusRing({\n within: true,\n isTextInput: true,\n autoFocus,\n });\n\n let { isFocused: isFocusedButton, focusProps: focusPropsButton } =\n useFocusRing({\n within: false,\n isTextInput: false,\n autoFocus,\n });\n\n let {\n groupProps,\n labelProps,\n fieldProps,\n buttonProps,\n dialogProps,\n calendarProps,\n } = useDatePicker(props, state, targetRef);\n\n let placeholder: DateValue | undefined = placeholderValue;\n let timePlaceholder =\n placeholder && 'hour' in placeholder ? placeholder : undefined;\n let timeMinValue =\n props.minValue && 'hour' in props.minValue ? props.minValue : undefined;\n let timeMaxValue =\n props.maxValue && 'hour' in props.maxValue ? props.maxValue : undefined;\n let timeGranularity =\n state.granularity === 'hour' ||\n state.granularity === 'minute' ||\n state.granularity === 'second'\n ? state.granularity\n : null;\n let showTimeField = !!timeGranularity;\n // let visibleMonths = useVisibleMonths(maxVisibleMonths);\n\n const component = (\n <DateInputBase\n ref={targetRef}\n qa={qa || 'DatePicker'}\n inputType=\"datepicker\"\n styles={props.wrapperStyles}\n disableFocusRing={isFocusedButton}\n isDisabled={isDisabled}\n validationState={validationState}\n size={size}\n fieldProps={groupProps}\n {...focusProps}\n suffix={\n <DialogTrigger\n hideArrow\n type=\"popover\"\n mobileType=\"tray\"\n placement=\"bottom right\"\n targetRef={targetRef}\n isOpen={isOpen}\n shouldFlip={props.shouldFlip}\n onOpenChange={setOpen}\n >\n <DatePickerButton\n size={size}\n {...mergeProps(buttonProps, focusPropsButton)}\n isDisabled={isDisabled}\n />\n <Dialog {...dialogProps} width=\"max-content\">\n <Calendar {...calendarProps} />\n {showTimeField && (\n <TimeInput\n padding=\"1x\"\n label={dateMessages['time']}\n value={state.timeValue}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n onChange={state.setTimeValue}\n />\n )}\n </Dialog>\n </DialogTrigger>\n }\n >\n <DatePickerInput useLocale={useLocaleProp} {...fieldProps} />\n </DateInputBase>\n );\n\n return wrapWithField(component, domRef, {\n ...props,\n labelProps: mergeProps(props.labelProps, labelProps),\n });\n}\n\nconst _DatePicker = forwardRef(DatePicker);\n\n_DatePicker.displayName = 'DatePicker';\n\nexport { _DatePicker as DatePicker };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAkDA,SAAS,WACP,OACA,KACA;AACA,SAAQ,iBAAiB,MAAM;AAC/B,SAAQ,aAAa,MAAM;AAC3B,SAAQ,cAAc,OAAO,EAC3B,0BAA0B,UAC3B,CAAC;AACF,SAAQ,OAAO,OAAO,EAAE,EAAE,oBAAoB,MAAM;AAEvC,eAAc,OAAO,iBAAiB;CAEnD,IAAI,EACF,IACA,MACA,kBACA,YACA,iBACA,WAAW,eACX,cACE;CACJ,IAAI,YAAY,OAAuB,KAAK;CAC5C,IAAI,QAAQ,mBAAmB;EAC7B,GAAG;EACH,2BAA2B,CAAC,MAAM;EACnC,C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GAAG;EACH,YAAYF,aAAW,MAAM,YAAY,WAAW;EACrD,CAAC;;AAGJ,MAAM,cAAc,WAAW,WAAW;AAE1C,YAAY,cAAc"}
@@ -1,7 +1,7 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
2
- import { tasty } from "../../../tasty/tasty.js";
1
+ /** @license MIT | @cube-dev/ui-kit v0.119.1 | Cube Dev Team */
3
2
  import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
4
3
  import { CalendarIcon } from "../../../icons/CalendarIcon.js";
4
+ import { tasty } from "@tenphi/tasty";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/fields/DatePicker/DatePickerButton.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"DatePickerButton.js","names":[],"sources":["../../../../src/components/fields/DatePicker/DatePickerButton.tsx"],"sourcesContent":["import { CalendarIcon } from '../../../icons';\nimport { tasty } from '../../../tasty';\nimport { ItemAction } from '../../actions';\n\nexport const DatePickerButton = tasty(ItemAction, {\n icon: <CalendarIcon />,\n});\n"],"mappings":";;;;;;;AAIA,MAAa,mBAAmB,MAAM,YAAY,EAChD,MAAM,oBAAC,iBAAe,EACvB,CAAC"}
1
+ {"version":3,"file":"DatePickerButton.js","names":[],"sources":["../../../../src/components/fields/DatePicker/DatePickerButton.tsx"],"sourcesContent":["import { tasty } from '@tenphi/tasty';\n\nimport { CalendarIcon } from '../../../icons';\nimport { ItemAction } from '../../actions';\n\nexport const DatePickerButton = tasty(ItemAction, {\n icon: <CalendarIcon />,\n});\n"],"mappings":";;;;;;;AAKA,MAAa,mBAAmB,MAAM,YAAY,EAChD,MAAM,oBAAC,iBAAe,EACvB,CAAC"}
@@ -1,6 +1,6 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
2
- import { tasty } from "../../../tasty/tasty.js";
1
+ /** @license MIT | @cube-dev/ui-kit v0.119.1 | Cube Dev Team */
3
2
  import { Space } from "../../layout/Space.js";
3
+ import { tasty } from "@tenphi/tasty";
4
4
 
5
5
  //#region src/components/fields/DatePicker/DatePickerElement.tsx
6
6
  const DatePickerElement = tasty(Space, { styles: {
@@ -1 +1 @@
1
- {"version":3,"file":"DatePickerElement.js","names":[],"sources":["../../../../src/components/fields/DatePicker/DatePickerElement.tsx"],"sourcesContent":["import { tasty } from '../../../tasty';\nimport { Space } from '../../layout/Space';\n\nexport const DatePickerElement = tasty(Space, {\n styles: {\n gap: 0,\n outline: {\n '': '#purple-03.0',\n focused: '#purple-03',\n },\n radius: true,\n },\n});\n"],"mappings":";;;;;AAGA,MAAa,oBAAoB,MAAM,OAAO,EAC5C,QAAQ;CACN,KAAK;CACL,SAAS;EACP,IAAI;EACJ,SAAS;EACV;CACD,QAAQ;CACT,EACF,CAAC"}
1
+ {"version":3,"file":"DatePickerElement.js","names":[],"sources":["../../../../src/components/fields/DatePicker/DatePickerElement.tsx"],"sourcesContent":["import { tasty } from '@tenphi/tasty';\n\nimport { Space } from '../../layout/Space';\n\nexport const DatePickerElement = tasty(Space, {\n styles: {\n gap: 0,\n outline: {\n '': '#purple-03.0',\n focused: '#purple-03',\n },\n radius: true,\n },\n});\n"],"mappings":";;;;;AAIA,MAAa,oBAAoB,MAAM,OAAO,EAC5C,QAAQ;CACN,KAAK;CACL,SAAS;EACP,IAAI;EACJ,SAAS;EACV;CACD,QAAQ;CACT,EACF,CAAC"}
@@ -1,8 +1,8 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
2
- import { tasty } from "../../../tasty/tasty.js";
1
+ /** @license MIT | @cube-dev/ui-kit v0.119.1 | Cube Dev Team */
3
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
4
3
  import { DatePickerSegment } from "./DatePickerSegment.js";
5
4
  import { formatSegments } from "./utils.js";
5
+ import { tasty } from "@tenphi/tasty";
6
6
  import { useRef } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  import { useDateField, useFocusWithin, useLocale } from "react-aria";