@cube-dev/ui-kit 0.0.0-canary-d0fd45d → 0.0.0-canary-13b59ed

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 (800) hide show
  1. package/README.md +0 -2
  2. package/dist/CHANGELOG.md +0 -46
  3. package/dist/README.md +0 -2
  4. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  5. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  6. package/dist/_internal/hooks/use-event.js +1 -1
  7. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  8. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  9. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  10. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  11. package/dist/_internal/hooks/use-warn.js +1 -1
  12. package/dist/components/Block.js +1 -1
  13. package/dist/components/CollectionItem.js +1 -1
  14. package/dist/components/GlobalStyles.js +1 -10
  15. package/dist/components/GlobalStyles.js.map +1 -1
  16. package/dist/components/GridProvider.js +1 -1
  17. package/dist/components/HiddenInput.js +1 -1
  18. package/dist/components/Root.js +1 -1
  19. package/dist/components/actions/Action/Action.js +1 -1
  20. package/dist/components/actions/Banner/Banner.js +1 -1
  21. package/dist/components/actions/Button/AutoCollapseObserver.js +1 -1
  22. package/dist/components/actions/Button/Button.js +5 -4
  23. package/dist/components/actions/Button/Button.js.map +1 -1
  24. package/dist/components/actions/Button/index.js +1 -1
  25. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  26. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  27. package/dist/components/actions/ButtonSplit/context.js +1 -1
  28. package/dist/components/actions/CommandMenu/CommandMenu.d.ts +0 -7
  29. package/dist/components/actions/CommandMenu/CommandMenu.js +85 -94
  30. package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
  31. package/dist/components/actions/CommandMenu/styled.js +1 -1
  32. package/dist/components/actions/ItemAction/ItemAction.js +6 -5
  33. package/dist/components/actions/ItemAction/ItemAction.js.map +1 -1
  34. package/dist/components/actions/ItemActionContext.js +1 -1
  35. package/dist/components/actions/ItemActionsWrapper.js +1 -1
  36. package/dist/components/actions/ItemButton/ItemButton.js +2 -4
  37. package/dist/components/actions/ItemButton/ItemButton.js.map +1 -1
  38. package/dist/components/actions/Link/Link.js +1 -1
  39. package/dist/components/actions/Menu/Menu.js +1 -1
  40. package/dist/components/actions/Menu/MenuCollectionItem.js +1 -1
  41. package/dist/components/actions/Menu/MenuItem.js +1 -1
  42. package/dist/components/actions/Menu/MenuSection.js +1 -1
  43. package/dist/components/actions/Menu/MenuTrigger.js +59 -63
  44. package/dist/components/actions/Menu/MenuTrigger.js.map +1 -1
  45. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  46. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  47. package/dist/components/actions/Menu/context.js +1 -1
  48. package/dist/components/actions/Menu/styled.js +1 -1
  49. package/dist/components/actions/actions-run.js +1 -1
  50. package/dist/components/actions/use-action.js +2 -4
  51. package/dist/components/actions/use-action.js.map +1 -1
  52. package/dist/components/actions/use-anchored-menu.js +1 -1
  53. package/dist/components/actions/use-context-menu.d.ts +1 -4
  54. package/dist/components/actions/use-context-menu.js +1 -6
  55. package/dist/components/actions/use-context-menu.js.map +1 -1
  56. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  57. package/dist/components/content/Alert/Alert.js +1 -1
  58. package/dist/components/content/Alert/use-alert.js +1 -1
  59. package/dist/components/content/Avatar/Avatar.js +1 -1
  60. package/dist/components/content/Badge/Badge.js +1 -1
  61. package/dist/components/content/Card/Card.js +1 -1
  62. package/dist/components/content/Content.js +1 -1
  63. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  64. package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
  65. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  66. package/dist/components/content/Divider/Divider.js +1 -1
  67. package/dist/components/content/Footer.js +1 -1
  68. package/dist/components/content/Header.js +1 -1
  69. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  70. package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
  71. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  72. package/dist/components/content/Item/Item.js +6 -9
  73. package/dist/components/content/Item/Item.js.map +1 -1
  74. package/dist/components/content/Item/ItemWithNativeLinks.js +1 -1
  75. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  76. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  77. package/dist/components/content/Layout/GridLayout.js +1 -1
  78. package/dist/components/content/Layout/Layout.js +1 -1
  79. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  80. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  81. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  82. package/dist/components/content/Layout/LayoutContent.js +1 -1
  83. package/dist/components/content/Layout/LayoutContext.js +1 -1
  84. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  85. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  86. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  87. package/dist/components/content/Layout/LayoutHeader.js +1 -1
  88. package/dist/components/content/Layout/LayoutPane.js +1 -1
  89. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  90. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  91. package/dist/components/content/Layout/LayoutPanelTransition.js +1 -1
  92. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  93. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  94. package/dist/components/content/Layout/index.js +1 -1
  95. package/dist/components/content/Layout/utils.js +1 -1
  96. package/dist/components/content/Paragraph.js +1 -1
  97. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  98. package/dist/components/content/PrismCode/PrismCode.js +1 -1
  99. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  100. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  101. package/dist/components/content/Result/Result.js +1 -1
  102. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  103. package/dist/components/content/Tag/Tag.js +1 -1
  104. package/dist/components/content/Text.js +1 -1
  105. package/dist/components/content/TextItem/TextItem.js +1 -1
  106. package/dist/components/content/Title.js +1 -1
  107. package/dist/components/content/Tree/Tree.js +19 -26
  108. package/dist/components/content/Tree/Tree.js.map +1 -1
  109. package/dist/components/content/Tree/TreeNode.js +4 -5
  110. package/dist/components/content/Tree/TreeNode.js.map +1 -1
  111. package/dist/components/content/Tree/checked-keys.js +1 -1
  112. package/dist/components/content/Tree/rowId.js +1 -1
  113. package/dist/components/content/Tree/styled.js +8 -15
  114. package/dist/components/content/Tree/styled.js.map +1 -1
  115. package/dist/components/content/Tree/tree-index.js +2 -21
  116. package/dist/components/content/Tree/tree-index.js.map +1 -1
  117. package/dist/components/content/Tree/types.d.ts +5 -15
  118. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  119. package/dist/components/content/Tree/use-load-data.js +1 -1
  120. package/dist/components/content/highlightText.js +1 -1
  121. package/dist/components/content/use-auto-tooltip.js +1 -1
  122. package/dist/components/data/DataTable/DataTable.js +1 -1
  123. package/dist/components/data/DataTable/types.d.ts +2 -4
  124. package/dist/components/data/ItemTable/ItemTable.js +1 -1
  125. package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
  126. package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
  127. package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
  128. package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
  129. package/dist/components/data/ItemTable/item-table-sections.js +1 -1
  130. package/dist/components/data/ItemTable/types.d.ts +4 -8
  131. package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
  132. package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
  133. package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
  134. package/dist/components/data/ItemTable/use-item-table-selection.js +1 -1
  135. package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
  136. package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
  137. package/dist/components/data/TableBase/ColumnResizer.js +1 -1
  138. package/dist/components/data/TableBase/RowCollection.js +1 -1
  139. package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
  140. package/dist/components/data/TableBase/TableRow.js +1 -1
  141. package/dist/components/data/TableBase/TableRowLink.js +1 -1
  142. package/dist/components/data/TableBase/TableView.js +2 -13
  143. package/dist/components/data/TableBase/TableView.js.map +1 -1
  144. package/dist/components/data/TableBase/TreeGridTable.js +1 -1
  145. package/dist/components/data/TableBase/column-header.js +1 -1
  146. package/dist/components/data/TableBase/column-menu.js +1 -1
  147. package/dist/components/data/TableBase/column-styles.js +1 -1
  148. package/dist/components/data/TableBase/column-tint.js +1 -1
  149. package/dist/components/data/TableBase/row-menu.js +1 -1
  150. package/dist/components/data/TableBase/styled.js +1 -1
  151. package/dist/components/data/TableBase/table-body-sections.js +1 -1
  152. package/dist/components/data/TableBase/table-tree.js +1 -1
  153. package/dist/components/data/TableBase/types.js +1 -1
  154. package/dist/components/data/TableBase/use-cell-selection.js +0 -0
  155. package/dist/components/data/TableBase/use-column-menu.js +1 -1
  156. package/dist/components/data/TableBase/use-column-order.js +1 -1
  157. package/dist/components/data/TableBase/use-column-window.js +1 -1
  158. package/dist/components/data/TableBase/use-container-width.js +1 -1
  159. package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
  160. package/dist/components/data/TableBase/use-scrollability.js +1 -1
  161. package/dist/components/data/TableBase/use-table-columns.js +1 -1
  162. package/dist/components/data/TableBase/use-table-search.js +1 -1
  163. package/dist/components/data/TableBase/use-table-selection.js +1 -1
  164. package/dist/components/data/TableBase/use-table-sort.js +1 -1
  165. package/dist/components/data/TableBase/use-table-sorts.js +1 -1
  166. package/dist/components/data/TableBase/use-table-storage.js +1 -1
  167. package/dist/components/data/TableBase/use-table-tooltip-refresh.js +1 -1
  168. package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
  169. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  170. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  171. package/dist/components/fields/Checkbox/context.js +1 -1
  172. package/dist/components/fields/ColorInput/ColorInput.js +1 -3
  173. package/dist/components/fields/ColorInput/ColorInput.js.map +1 -1
  174. package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
  175. package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
  176. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
  177. package/dist/components/fields/ComboBox/ComboBox.d.ts +1 -2
  178. package/dist/components/fields/ComboBox/ComboBox.js +138 -150
  179. package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
  180. package/dist/components/fields/ComboBox/comboBoxOptions.js +1 -1
  181. package/dist/components/fields/CommandTextArea/CommandTextArea.js +4 -2
  182. package/dist/components/fields/CommandTextArea/CommandTextArea.js.map +1 -1
  183. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  184. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  185. package/dist/components/fields/DatePicker/CalendarPopover.js +1 -1
  186. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  187. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  188. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  189. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  190. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  191. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  192. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  193. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  194. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  195. package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
  196. package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
  197. package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
  198. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  199. package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
  200. package/dist/components/fields/DatePicker/YearPicker.js +1 -1
  201. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  202. package/dist/components/fields/DatePicker/period.js +1 -1
  203. package/dist/components/fields/DatePicker/props.js +1 -1
  204. package/dist/components/fields/DatePicker/utils.js +1 -1
  205. package/dist/components/fields/FileInput/FileInput.js +1 -1
  206. package/dist/components/fields/FilterListBox/FilterListBox.d.ts +0 -17
  207. package/dist/components/fields/FilterListBox/FilterListBox.js +4 -7
  208. package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
  209. package/dist/components/fields/FilterListBox/styled.js +1 -1
  210. package/dist/components/fields/FilterPicker/FilterPicker.d.ts +12 -59
  211. package/dist/components/fields/FilterPicker/FilterPicker.js +14 -36
  212. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  213. package/dist/components/fields/FilterPicker/FilterTree.js +69 -114
  214. package/dist/components/fields/FilterPicker/FilterTree.js.map +1 -1
  215. package/dist/components/fields/FilterPicker/index.d.ts +2 -2
  216. package/dist/components/fields/Input/Input.js +1 -1
  217. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  218. package/dist/components/fields/ListBox/ListBox.js +13 -45
  219. package/dist/components/fields/ListBox/ListBox.js.map +1 -1
  220. package/dist/components/fields/ListBox/empty-row.js +1 -1
  221. package/dist/components/fields/ListBox/optionId.js +1 -1
  222. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +3 -4
  223. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js.map +1 -1
  224. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  225. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  226. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  227. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  228. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  229. package/dist/components/fields/Picker/Picker.js +2 -3
  230. package/dist/components/fields/Picker/Picker.js.map +1 -1
  231. package/dist/components/fields/RadioGroup/Radio.js +2 -2
  232. package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
  233. package/dist/components/fields/RadioGroup/RadioGroup.js +2 -6
  234. package/dist/components/fields/RadioGroup/RadioGroup.js.map +1 -1
  235. package/dist/components/fields/RadioGroup/context.js +1 -1
  236. package/dist/components/fields/RadioGroup/joined-styles.js +2 -3
  237. package/dist/components/fields/RadioGroup/joined-styles.js.map +1 -1
  238. package/dist/components/fields/SearchComboBox/SearchComboBox.d.ts +0 -7
  239. package/dist/components/fields/SearchComboBox/SearchComboBox.js +3 -7
  240. package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
  241. package/dist/components/fields/SearchInput/SearchInput.js +2 -3
  242. package/dist/components/fields/SearchInput/SearchInput.js.map +1 -1
  243. package/dist/components/fields/Select/Select.js +33 -36
  244. package/dist/components/fields/Select/Select.js.map +1 -1
  245. package/dist/components/fields/Slider/Gradation.js +1 -1
  246. package/dist/components/fields/Slider/HueSlider.js +1 -1
  247. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  248. package/dist/components/fields/Slider/Slider.js +1 -1
  249. package/dist/components/fields/Slider/SliderBase.js +1 -1
  250. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  251. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  252. package/dist/components/fields/Slider/elements.js +1 -1
  253. package/dist/components/fields/Slider/index.js +1 -1
  254. package/dist/components/fields/Switch/Switch.js +18 -27
  255. package/dist/components/fields/Switch/Switch.js.map +1 -1
  256. package/dist/components/fields/TagInput/TagInput.js +1 -1
  257. package/dist/components/fields/TagInput/TagList.js +1 -1
  258. package/dist/components/fields/TagInput/useActiveOption.js +1 -1
  259. package/dist/components/fields/TagInput/useSuffixSpace.js +1 -1
  260. package/dist/components/fields/TagInput/useTagError.js +1 -1
  261. package/dist/components/fields/TextArea/TextArea.js +1 -1
  262. package/dist/components/fields/TextInput/TextInput.js +1 -1
  263. package/dist/components/fields/TextInput/TextInputBase.d.ts +1 -1
  264. package/dist/components/fields/TextInput/TextInputBase.js +1 -1
  265. package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
  266. package/dist/components/fields/TextInput/displayed-validation.js +1 -1
  267. package/dist/components/fields/TextInput/identifier-text-services.js +1 -1
  268. package/dist/components/fields/TextInput/password-manager-ignore.js +1 -1
  269. package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
  270. package/dist/components/fields/TextInputMapper/TextInputMapper.d.ts +2 -2
  271. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -2
  272. package/dist/components/fields/TextInputMapper/TextInputMapper.js.map +1 -1
  273. package/dist/components/fields/ToggleGroup/ToggleGroup.js +1 -1
  274. package/dist/components/fields/ToggleGroup/ToggleGroupItem.js +1 -1
  275. package/dist/components/fields/ToggleGroup/context.js +1 -1
  276. package/dist/components/fields/TriggerActions.js +1 -1
  277. package/dist/components/fields/color/ColorPanel.js +1 -1
  278. package/dist/components/fields/color/channels.js +1 -1
  279. package/dist/components/fields/color/color.js +1 -1
  280. package/dist/components/fields/color/context.js +1 -1
  281. package/dist/components/fields/index.d.ts +2 -3
  282. package/dist/components/fields/option-origin-press.js +1 -1
  283. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  284. package/dist/components/form/FieldWrapper/field-description.js +1 -1
  285. package/dist/components/form/Form/Field.js +1 -1
  286. package/dist/components/form/Form/Form.js +1 -1
  287. package/dist/components/form/Form/FormContext.js +1 -1
  288. package/dist/components/form/Form/FormElement.js +1 -1
  289. package/dist/components/form/Form/ModernFormRoot.js +1 -1
  290. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  291. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  292. package/dist/components/form/Form/SubmitError.js +1 -1
  293. package/dist/components/form/Form/backend.js +1 -1
  294. package/dist/components/form/Form/index.js +1 -1
  295. package/dist/components/form/Form/modern/actions.js +1 -1
  296. package/dist/components/form/Form/modern/context.js +1 -1
  297. package/dist/components/form/Form/modern/controller.js +1 -1
  298. package/dist/components/form/Form/modern/field-binding.js +1 -1
  299. package/dist/components/form/Form/modern/field.js +1 -1
  300. package/dist/components/form/Form/modern/react.js +1 -1
  301. package/dist/components/form/Form/modern/store.js +1 -1
  302. package/dist/components/form/Form/modern/validation.js +1 -1
  303. package/dist/components/form/Form/modern/values.js +1 -1
  304. package/dist/components/form/Form/reset-unbound-controls.js +1 -1
  305. package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
  306. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  307. package/dist/components/form/Form/use-field/use-field.js +1 -1
  308. package/dist/components/form/Form/use-form.js +1 -1
  309. package/dist/components/form/Form/validation.js +1 -1
  310. package/dist/components/form/Label.js +1 -1
  311. package/dist/components/form/field-chrome.js +1 -1
  312. package/dist/components/form/field-layout.js +1 -1
  313. package/dist/components/form/legacy-tooltip.js +1 -1
  314. package/dist/components/form/validation/ValidationIndicator.js +1 -1
  315. package/dist/components/form/validation/resolve-validation-props.js +1 -1
  316. package/dist/components/form/validation/use-validation-props.js +1 -1
  317. package/dist/components/form/wrapper.js +1 -1
  318. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  319. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  320. package/dist/components/layout/Flex.js +1 -1
  321. package/dist/components/layout/Flow.js +1 -1
  322. package/dist/components/layout/Grid.js +1 -1
  323. package/dist/components/layout/Panel.js +1 -1
  324. package/dist/components/layout/Prefix.js +1 -1
  325. package/dist/components/layout/ResizablePanel.js +1 -1
  326. package/dist/components/layout/Space.js +1 -1
  327. package/dist/components/layout/Suffix.js +1 -1
  328. package/dist/components/navigation/NavTabs/NavTabs.js +1 -1
  329. package/dist/components/navigation/Pagination/Pagination.js +1 -1
  330. package/dist/components/navigation/Pagination/use-pagination.js +1 -1
  331. package/dist/components/navigation/Tabs/BoardDragActiveProvider.js +1 -1
  332. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  333. package/dist/components/navigation/Tabs/TabButton.js +1 -1
  334. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  335. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  336. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  337. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  338. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  339. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  340. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  341. package/dist/components/navigation/Tabs/scroll-tab-into-strip.js +1 -1
  342. package/dist/components/navigation/Tabs/segmented-styles.js +1 -1
  343. package/dist/components/navigation/Tabs/styled.js +1 -1
  344. package/dist/components/navigation/Tabs/types.js +1 -1
  345. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  346. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  347. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  348. package/dist/components/other/Calendar/Calendar.js +1 -1
  349. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  350. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  351. package/dist/components/other/Calendar/CalendarHeader.js +1 -1
  352. package/dist/components/other/Calendar/CalendarPanel.js +1 -1
  353. package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
  354. package/dist/components/other/Calendar/PeriodGrid.js +1 -1
  355. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  356. package/dist/components/other/Calendar/styled.js +1 -1
  357. package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
  358. package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
  359. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  360. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  361. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  362. package/dist/components/overlays/Dialog/Dialog.js +14 -16
  363. package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
  364. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  365. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  366. package/dist/components/overlays/Dialog/DialogTrigger.js +46 -107
  367. package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
  368. package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
  369. package/dist/components/overlays/Dialog/context.js +1 -1
  370. package/dist/components/overlays/Dialog/context.js.map +1 -1
  371. package/dist/components/overlays/Dialog/default-button-text.js +1 -1
  372. package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
  373. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  374. package/dist/components/overlays/Dialog/use-dialog-open-sync.js +1 -1
  375. package/dist/components/overlays/Dialog/use-dismiss-confirmation.js +1 -1
  376. package/dist/components/overlays/Dialog/use-retained-dialog-focus.js +2 -2
  377. package/dist/components/overlays/Dialog/use-retained-dialog-focus.js.map +1 -1
  378. package/dist/components/overlays/Modal/Modal.js +1 -1
  379. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  380. package/dist/components/overlays/Modal/Overlay.js +1 -1
  381. package/dist/components/overlays/Modal/Popover.js +1 -1
  382. package/dist/components/overlays/Modal/Tray.js +1 -1
  383. package/dist/components/overlays/Modal/Underlay.js +1 -1
  384. package/dist/components/overlays/Modal/modal-containment.js +1 -1
  385. package/dist/components/overlays/Notifications/Notification.js +1 -1
  386. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  387. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  388. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  389. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  390. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  391. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  392. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  393. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  394. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  395. package/dist/components/overlays/Notifications/index.js +1 -1
  396. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  397. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  398. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  399. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  400. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  401. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  402. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  403. package/dist/components/overlays/Toast/index.js +1 -1
  404. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  405. package/dist/components/overlays/Toast/useToast.js +1 -1
  406. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  407. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  408. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  409. package/dist/components/overlays/Tooltip/context.js +1 -1
  410. package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
  411. package/dist/components/portal/Portal.js +1 -1
  412. package/dist/components/portal/PortalProvider.js +1 -1
  413. package/dist/components/portal/usePortal.js +1 -1
  414. package/dist/components/shared/DraggableCollection.js +1 -1
  415. package/dist/components/shared/InvalidIcon.js +1 -1
  416. package/dist/components/shared/ValidIcon.js +1 -1
  417. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  418. package/dist/components/status/Spin/Cube.js +1 -1
  419. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  420. package/dist/components/status/Spin/Spin.js +1 -1
  421. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  422. package/dist/data/item-themes.js +1 -1
  423. package/dist/data/themes.js +1 -1
  424. package/dist/eslint-plugin/defaults.generated.js +3 -8
  425. package/dist/eslint-plugin/defaults.generated.js.map +1 -1
  426. package/dist/eslint-plugin/index.js +1 -1
  427. package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
  428. package/dist/i18n/I18nProvider.js +1 -1
  429. package/dist/i18n/createFormatter.js +1 -1
  430. package/dist/i18n/index.js +1 -1
  431. package/dist/i18n/instance.js +1 -1
  432. package/dist/i18n/locales/de-DE/uikit.js +1 -1
  433. package/dist/i18n/locales/en-US/uikit.js +1 -1
  434. package/dist/i18n/locales/es-ES/uikit.js +1 -1
  435. package/dist/i18n/locales/es-MX/uikit.js +1 -1
  436. package/dist/i18n/locales/fr-FR/uikit.js +1 -1
  437. package/dist/i18n/locales/it-IT/uikit.js +1 -1
  438. package/dist/i18n/locales/ja-JP/uikit.js +1 -1
  439. package/dist/i18n/locales/nb-NO/uikit.js +1 -1
  440. package/dist/i18n/locales/pt-BR/uikit.js +1 -1
  441. package/dist/i18n/locales/pt-PT/uikit.js +1 -1
  442. package/dist/i18n/locales/sv-SE/uikit.js +1 -1
  443. package/dist/i18n/locales/vi-VN/uikit.js +1 -1
  444. package/dist/i18n/locales.js +1 -1
  445. package/dist/i18n/namespace.js +1 -1
  446. package/dist/i18n/useFormatter.js +1 -1
  447. package/dist/i18n/useI18n.js +1 -1
  448. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  449. package/dist/icons/AdjustmentsIcon.js +1 -1
  450. package/dist/icons/AiIcon.js +1 -1
  451. package/dist/icons/AreaChartIcon.js +1 -1
  452. package/dist/icons/ArrowNarrowDownIcon.js +1 -1
  453. package/dist/icons/ArrowNarrowUpIcon.js +1 -1
  454. package/dist/icons/BackwardIcon.js +1 -1
  455. package/dist/icons/BarChartIcon.js +1 -1
  456. package/dist/icons/BellFilledIcon.js +1 -1
  457. package/dist/icons/BellIcon.js +1 -1
  458. package/dist/icons/BooleanIcon.js +1 -1
  459. package/dist/icons/CalendarEditIcon.js +1 -1
  460. package/dist/icons/CalendarIcon.js +1 -1
  461. package/dist/icons/CaretDownIcon.js +1 -1
  462. package/dist/icons/CaretUpIcon.js +1 -1
  463. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  464. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  465. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  466. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  467. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  468. package/dist/icons/ChartBarLineIcon.js +1 -1
  469. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  470. package/dist/icons/ChartBarStackedIcon.js +1 -1
  471. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  472. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  473. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  474. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  475. package/dist/icons/ChartBubbleIcon.js +1 -1
  476. package/dist/icons/ChartDonut2Icon.js +1 -1
  477. package/dist/icons/ChartFunnelIcon.js +1 -1
  478. package/dist/icons/ChartHeatmapIcon.js +1 -1
  479. package/dist/icons/ChartKPIIcon.js +1 -1
  480. package/dist/icons/ChartPie2Icon.js +1 -1
  481. package/dist/icons/ChartScatterIcon.js +1 -1
  482. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  483. package/dist/icons/CheckCircleIcon.js +1 -1
  484. package/dist/icons/CheckIcon.js +1 -1
  485. package/dist/icons/CircleFilledIcon.js +1 -1
  486. package/dist/icons/ClearIcon.js +1 -1
  487. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  488. package/dist/icons/CloseCircleIcon.js +1 -1
  489. package/dist/icons/CloseIcon.js +1 -1
  490. package/dist/icons/CodeIcon.js +1 -1
  491. package/dist/icons/ColumnTotalIcon.js +1 -1
  492. package/dist/icons/CopyIcon.js +1 -1
  493. package/dist/icons/CountIcon.js +1 -1
  494. package/dist/icons/CubeIcon.js +1 -1
  495. package/dist/icons/CubePauseIcon.js +1 -1
  496. package/dist/icons/CubePlayIcon.js +1 -1
  497. package/dist/icons/CurrencyDollarIcon.js +1 -1
  498. package/dist/icons/DangerIcon.js +1 -1
  499. package/dist/icons/DashboardIcon.js +1 -1
  500. package/dist/icons/DatabaseIcon.js +1 -1
  501. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  502. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  503. package/dist/icons/DirectionIcon.js +1 -1
  504. package/dist/icons/DonutIcon.js +1 -1
  505. package/dist/icons/DownIcon.js +1 -1
  506. package/dist/icons/EditIcon.js +1 -1
  507. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  508. package/dist/icons/ExclamationCircleIcon.js +1 -1
  509. package/dist/icons/ExclamationIcon.js +1 -1
  510. package/dist/icons/EyeIcon.js +1 -1
  511. package/dist/icons/EyeInvisibleIcon.js +1 -1
  512. package/dist/icons/FilterIcon.js +1 -1
  513. package/dist/icons/FolderFilledIcon.js +1 -1
  514. package/dist/icons/FolderIcon.js +1 -1
  515. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  516. package/dist/icons/FolderOpenIcon.js +1 -1
  517. package/dist/icons/ForwardIcon.js +1 -1
  518. package/dist/icons/GripVerticalIcon.js +1 -1
  519. package/dist/icons/HierarchyIcon.js +1 -1
  520. package/dist/icons/HierarchyOpenIcon.js +1 -1
  521. package/dist/icons/Icon.js +1 -1
  522. package/dist/icons/InfoCircleIcon.js +1 -1
  523. package/dist/icons/InfoIcon.js +1 -1
  524. package/dist/icons/KeyIcon.js +1 -1
  525. package/dist/icons/LeftIcon.js +1 -1
  526. package/dist/icons/LineChartIcon.js +1 -1
  527. package/dist/icons/LoadingIcon.js +1 -1
  528. package/dist/icons/LockFilledIcon.js +1 -1
  529. package/dist/icons/LockIcon.js +1 -1
  530. package/dist/icons/MoreIcon.js +1 -1
  531. package/dist/icons/NotAllowedIcon.js +1 -1
  532. package/dist/icons/Number123Icon.js +1 -1
  533. package/dist/icons/NumberIcon.js +1 -1
  534. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  535. package/dist/icons/PauseCircleIcon.js +1 -1
  536. package/dist/icons/PauseIcon.js +1 -1
  537. package/dist/icons/PercentageIcon.js +1 -1
  538. package/dist/icons/PieChartIcon.js +1 -1
  539. package/dist/icons/PipetteIcon.js +1 -1
  540. package/dist/icons/PlayCircleIcon.js +1 -1
  541. package/dist/icons/PlayIcon.js +1 -1
  542. package/dist/icons/PlusIcon.js +1 -1
  543. package/dist/icons/ProgressBarIcon.js +1 -1
  544. package/dist/icons/ReloadIcon.js +1 -1
  545. package/dist/icons/ReportIcon.js +1 -1
  546. package/dist/icons/ReturnIcon.js +1 -1
  547. package/dist/icons/RightIcon.js +1 -1
  548. package/dist/icons/RowTotalsIcon.js +1 -1
  549. package/dist/icons/SchemeIcon.js +1 -1
  550. package/dist/icons/SearchIcon.js +1 -1
  551. package/dist/icons/SemanticQueryIcon.js +1 -1
  552. package/dist/icons/SettingsIcon.js +1 -1
  553. package/dist/icons/ShieldFilledIcon.js +1 -1
  554. package/dist/icons/ShieldIcon.js +1 -1
  555. package/dist/icons/SlashIcon.js +1 -1
  556. package/dist/icons/SparklesIcon.js +1 -1
  557. package/dist/icons/SqlIcon.js +1 -1
  558. package/dist/icons/StatsIcon.js +1 -1
  559. package/dist/icons/StopIcon.js +1 -1
  560. package/dist/icons/StringIcon.js +1 -1
  561. package/dist/icons/SubtotalsIcon.js +1 -1
  562. package/dist/icons/SwitchIcon.js +1 -1
  563. package/dist/icons/TableIcon.js +1 -1
  564. package/dist/icons/ThumbsDownIcon.js +1 -1
  565. package/dist/icons/ThumbsUpIcon.js +1 -1
  566. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  567. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  568. package/dist/icons/ThunderboltIcon.js +1 -1
  569. package/dist/icons/TimeIcon.js +1 -1
  570. package/dist/icons/TrashIcon.js +1 -1
  571. package/dist/icons/UnlockIcon.js +1 -1
  572. package/dist/icons/UpIcon.js +1 -1
  573. package/dist/icons/UserGroupIcon.js +1 -1
  574. package/dist/icons/UserIcon.js +1 -1
  575. package/dist/icons/UserLockIcon.js +1 -1
  576. package/dist/icons/ViewIcon.js +1 -1
  577. package/dist/icons/WarningFilledIcon.js +1 -1
  578. package/dist/icons/WarningIcon.js +1 -1
  579. package/dist/icons/wrap-icon.js +1 -1
  580. package/dist/index.d.ts +2 -3
  581. package/dist/index.js +1 -1
  582. package/dist/probe/canonicalize.js +1 -1
  583. package/dist/probe/css.js +1 -1
  584. package/dist/probe/index.js +1 -1
  585. package/dist/provider.js +1 -1
  586. package/dist/providers/TrackingProvider.js +1 -1
  587. package/dist/providers/navigation-url.js +1 -1
  588. package/dist/providers/navigationAdapter.default.js +1 -1
  589. package/dist/providers/use-navigation.js +1 -1
  590. package/dist/tokens/all-tokens.js +1 -1
  591. package/dist/tokens/base.js +25 -4
  592. package/dist/tokens/base.js.map +1 -1
  593. package/dist/tokens/color-seed.js +1 -1
  594. package/dist/tokens/color-theme.js +1 -1
  595. package/dist/tokens/colors.js +1 -1
  596. package/dist/tokens/layout.js +1 -1
  597. package/dist/tokens/lazy-styles.js +1 -1
  598. package/dist/tokens/legacy-color.js +1 -1
  599. package/dist/tokens/palette-config.js +1 -1
  600. package/dist/tokens/palette.js +61 -10
  601. package/dist/tokens/palette.js.map +1 -1
  602. package/dist/tokens/resolve.js +1 -1
  603. package/dist/tokens/shadows.js +1 -1
  604. package/dist/tokens/sizes.js +1 -1
  605. package/dist/tokens/spacing.js +1 -1
  606. package/dist/tokens/typography.js +1 -1
  607. package/dist/utils/ResizeSensor.js +1 -1
  608. package/dist/utils/colors.js +1 -1
  609. package/dist/utils/dotize.js +1 -1
  610. package/dist/utils/is-dev-env.js +1 -1
  611. package/dist/utils/layout-scale.js +1 -1
  612. package/dist/utils/modules.js +1 -1
  613. package/dist/utils/promise.js +1 -1
  614. package/dist/utils/raf.js +1 -1
  615. package/dist/utils/random.js +1 -1
  616. package/dist/utils/range.js +1 -1
  617. package/dist/utils/react/RenderCache.js +1 -1
  618. package/dist/utils/react/Slots.js +1 -1
  619. package/dist/utils/react/chain.js +1 -1
  620. package/dist/utils/react/componentBaseProps.js +1 -1
  621. package/dist/utils/react/disabledProps.d.ts +3 -9
  622. package/dist/utils/react/disabledProps.js +5 -9
  623. package/dist/utils/react/disabledProps.js.map +1 -1
  624. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  625. package/dist/utils/react/index.js +1 -1
  626. package/dist/utils/react/interactions.js +1 -1
  627. package/dist/utils/react/isTextOnly.js +1 -1
  628. package/dist/utils/react/mapProps.js +1 -1
  629. package/dist/utils/react/mergeProps.js +1 -1
  630. package/dist/utils/react/nullableValue.js +1 -1
  631. package/dist/utils/react/overlayKeyPropagation.js +1 -1
  632. package/dist/utils/react/pickBaseCustomizationProps.js +1 -1
  633. package/dist/utils/react/programmaticFocus.js +1 -1
  634. package/dist/utils/react/resolveIcon.js +1 -1
  635. package/dist/utils/react/sharedStore.js +1 -1
  636. package/dist/utils/react/useBufferedValue.js +1 -1
  637. package/dist/utils/react/useCombinedRefs.js +1 -1
  638. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  639. package/dist/utils/react/useEventBus.js +1 -1
  640. package/dist/utils/react/useId.js +1 -1
  641. package/dist/utils/react/useIsDarwin.js +1 -1
  642. package/dist/utils/react/useKeySymbols.js +1 -1
  643. package/dist/utils/react/useLayoutEffect.js +1 -1
  644. package/dist/utils/react/useLocalStorage.js +1 -1
  645. package/dist/utils/react/useMergeStyles.js +1 -1
  646. package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
  647. package/dist/utils/react/useOverlayPosition.js +1 -1
  648. package/dist/utils/react/usePopoverSync.js +1 -1
  649. package/dist/utils/react/useQaProps.js +1 -1
  650. package/dist/utils/react/useScheme.js +1 -1
  651. package/dist/utils/react/useViewportSize.js +1 -1
  652. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  653. package/dist/utils/selection.js +1 -1
  654. package/dist/utils/styles.js +1 -1
  655. package/dist/utils/tree.js +1 -1
  656. package/dist/utils/warnings.js +1 -1
  657. package/dist/version.js +3 -3
  658. package/harness/plugin.json +1 -1
  659. package/package.json +8 -11
  660. package/{docs/components/Block.md → src/components/Block.docs.mdx} +7 -1
  661. package/{docs/components/CollectionItem.md → src/components/CollectionItem.docs.mdx} +12 -8
  662. package/{docs/components/GridProvider.md → src/components/GridProvider.docs.mdx} +4 -0
  663. package/{docs/components/Root.md → src/components/Root.docs.mdx} +6 -2
  664. package/{docs/components/actions/Action.md → src/components/actions/Action/Action.docs.mdx} +7 -1
  665. package/{docs/components/actions/Banner.md → src/components/actions/Banner/Banner.docs.mdx} +17 -3
  666. package/{docs/components/actions/Button.md → src/components/actions/Button/Button.docs.mdx} +21 -4
  667. package/{docs/components/actions/ButtonGroup.md → src/components/actions/ButtonGroup/ButtonGroup.docs.mdx} +6 -2
  668. package/{docs/components/actions/ButtonSplit.md → src/components/actions/ButtonSplit/ButtonSplit.docs.mdx} +20 -3
  669. package/{docs/components/actions/CommandMenu.md → src/components/actions/CommandMenu/CommandMenu.docs.mdx} +33 -18
  670. package/{docs/components/actions/ItemAction.md → src/components/actions/ItemAction/ItemAction.docs.mdx} +10 -1
  671. package/{docs/components/actions/ItemButton.md → src/components/actions/ItemButton/ItemButton.docs.mdx} +18 -9
  672. package/{docs/components/actions/Link.md → src/components/actions/Link/Link.docs.mdx} +13 -3
  673. package/{docs/components/actions/Menu.md → src/components/actions/Menu/Menu.docs.mdx} +27 -15
  674. package/{docs/components/actions/MenuTrigger.md → src/components/actions/Menu/MenuTrigger.docs.mdx} +5 -1
  675. package/{docs/components/actions/SubMenuTrigger.md → src/components/actions/Menu/SubMenuTrigger.docs.mdx} +5 -1
  676. package/{docs/components/actions/use-anchored-menu.md → src/components/actions/use-anchored-menu.docs.mdx} +9 -5
  677. package/{docs/components/actions/use-context-menu.md → src/components/actions/use-context-menu.docs.mdx} +12 -21
  678. package/{docs/components/content/ActiveZone.md → src/components/content/ActiveZone/ActiveZone.docs.mdx} +7 -1
  679. package/{docs/components/content/Alert.md → src/components/content/Alert/Alert.docs.mdx} +19 -1
  680. package/{docs/components/content/Avatar.md → src/components/content/Avatar/Avatar.docs.mdx} +7 -1
  681. package/{docs/components/content/Badge.md → src/components/content/Badge/Badge.docs.mdx} +23 -2
  682. package/{docs/components/content/Card.md → src/components/content/Card/Card.docs.mdx} +7 -1
  683. package/{docs/components/content/Content.md → src/components/content/Content.docs.mdx} +5 -1
  684. package/{docs/components/content/CopyPasteBlock.md → src/components/content/CopyPasteBlock/CopyPasteBlock.docs.mdx} +7 -1
  685. package/{docs/components/content/CopySnippet.md → src/components/content/CopySnippet/CopySnippet.docs.mdx} +7 -1
  686. package/{docs/components/content/Disclosure.md → src/components/content/Disclosure/Disclosure.docs.mdx} +34 -3
  687. package/{docs/components/content/Divider.md → src/components/content/Divider/Divider.docs.mdx} +12 -2
  688. package/{docs/components/content/Footer.md → src/components/content/Footer.docs.mdx} +5 -1
  689. package/{docs/components/content/Header.md → src/components/content/Header.docs.mdx} +5 -1
  690. package/{docs/components/content/HotKeys.md → src/components/content/HotKeys/HotKeys.docs.mdx} +41 -5
  691. package/{docs/components/content/InfoBadge.md → src/components/content/InfoBadge/InfoBadge.docs.mdx} +7 -1
  692. package/{docs/components/content/InlineInput.md → src/components/content/InlineInput/InlineInput.docs.mdx} +36 -3
  693. package/{docs/components/content/Item.md → src/components/content/Item/Item.docs.mdx} +36 -16
  694. package/{docs/components/content/ItemBadge.md → src/components/content/ItemBadge/ItemBadge.docs.mdx} +7 -1
  695. package/{docs/components/content/ItemCard.md → src/components/content/ItemCard/ItemCard.docs.mdx} +21 -6
  696. package/{docs/components/content/Layout.md → src/components/content/Layout/Layout.docs.mdx} +40 -6
  697. package/{docs/components/content/Paragraph.md → src/components/content/Paragraph.docs.mdx} +8 -2
  698. package/{docs/components/content/Placeholder.md → src/components/content/Placeholder/Placeholder.docs.mdx} +7 -1
  699. package/{docs/components/content/PrismCode.md → src/components/content/PrismCode/PrismCode.docs.mdx} +7 -1
  700. package/{docs/components/content/PrismDiffCode.md → src/components/content/PrismDiffCode/PrismDiffCode.docs.mdx} +7 -1
  701. package/{docs/components/content/Result.md → src/components/content/Result/Result.docs.mdx} +49 -4
  702. package/{docs/components/content/Skeleton.md → src/components/content/Skeleton/Skeleton.docs.mdx} +8 -2
  703. package/{docs/components/content/Tag.md → src/components/content/Tag/Tag.docs.mdx} +21 -2
  704. package/{docs/components/content/Text.md → src/components/content/Text.docs.mdx} +7 -1
  705. package/{docs/components/content/TextItem.md → src/components/content/TextItem/TextItem.docs.mdx} +30 -4
  706. package/{docs/components/content/Title.md → src/components/content/Title.docs.mdx} +5 -1
  707. package/{docs/components/content/Tree.md → src/components/content/Tree/Tree.docs.mdx} +35 -10
  708. package/{docs/components/data/DataTable.md → src/components/data/DataTable/DataTable.docs.mdx} +43 -7
  709. package/{docs/components/data/ItemTable.md → src/components/data/ItemTable/ItemTable.docs.mdx} +73 -14
  710. package/{docs/components/fields/Checkbox.md → src/components/fields/Checkbox/Checkbox.docs.mdx} +14 -6
  711. package/{docs/components/fields/ColorInput.md → src/components/fields/ColorInput/ColorInput.docs.mdx} +19 -7
  712. package/{docs/components/fields/ColorPicker.md → src/components/fields/ColorPicker/ColorPicker.docs.mdx} +24 -10
  713. package/{docs/components/fields/ColorSwatch.md → src/components/fields/ColorSwatch/ColorSwatch.docs.mdx} +17 -5
  714. package/{docs/components/fields/ColorSwatchGroup.md → src/components/fields/ColorSwatchGroup/ColorSwatchGroup.docs.mdx} +25 -7
  715. package/{docs/components/fields/ComboBox.md → src/components/fields/ComboBox/ComboBox.docs.mdx} +66 -21
  716. package/{docs/components/fields/CommandTextArea.md → src/components/fields/CommandTextArea/CommandTextArea.docs.mdx} +22 -14
  717. package/{docs/components/fields/DatePicker.md → src/components/fields/DatePicker/DatePicker.docs.mdx} +13 -5
  718. package/{docs/components/fields/PeriodPicker.md → src/components/fields/DatePicker/PeriodPicker.docs.mdx} +32 -5
  719. package/{docs/components/fields/FileInput.md → src/components/fields/FileInput/FileInput.docs.mdx} +16 -6
  720. package/{docs/components/fields/FilterListBox.md → src/components/fields/FilterListBox/FilterListBox.docs.mdx} +48 -55
  721. package/{docs/components/fields/FilterPicker.md → src/components/fields/FilterPicker/FilterPicker.docs.mdx} +68 -120
  722. package/{docs/components/fields/ListBox.md → src/components/fields/ListBox/ListBox.docs.mdx} +64 -14
  723. package/{docs/components/fields/NumberInput.md → src/components/fields/NumberInput/NumberInput.docs.mdx} +18 -8
  724. package/{docs/components/fields/PasswordInput.md → src/components/fields/PasswordInput/PasswordInput.docs.mdx} +15 -7
  725. package/{docs/components/fields/Picker.md → src/components/fields/Picker/Picker.docs.mdx} +53 -23
  726. package/{docs/components/fields/RadioGroup.md → src/components/fields/RadioGroup/RadioGroup.docs.mdx} +26 -16
  727. package/{docs/components/fields/SearchComboBox.md → src/components/fields/SearchComboBox/SearchComboBox.docs.mdx} +39 -17
  728. package/{docs/components/fields/SearchInput.md → src/components/fields/SearchInput/SearchInput.docs.mdx} +18 -8
  729. package/{docs/components/fields/Select.md → src/components/fields/Select/Select.docs.mdx} +55 -20
  730. package/{docs/components/fields/HueSlider.md → src/components/fields/Slider/HueSlider.docs.mdx} +26 -6
  731. package/{docs/components/fields/Slider.md → src/components/fields/Slider/Slider.docs.mdx} +34 -2
  732. package/{docs/components/fields/Switch.md → src/components/fields/Switch/Switch.docs.mdx} +38 -6
  733. package/{docs/components/fields/TagInput.md → src/components/fields/TagInput/TagInput.docs.mdx} +45 -12
  734. package/{docs/components/fields/TextArea.md → src/components/fields/TextArea/TextArea.docs.mdx} +30 -4
  735. package/{docs/components/fields/TextInput.md → src/components/fields/TextInput/TextInput.docs.mdx} +19 -9
  736. package/{docs/components/fields/TextInputMapper.md → src/components/fields/TextInputMapper/TextInputMapper.docs.mdx} +12 -3
  737. package/{docs/components/fields/ToggleGroup.md → src/components/fields/ToggleGroup/ToggleGroup.docs.mdx} +33 -12
  738. package/{docs/components/form/Field.md → src/components/form/Form/Field.docs.mdx} +16 -6
  739. package/{docs/components/form/Form.md → src/components/form/Form/Form.docs.mdx} +21 -6
  740. package/{docs/components/form/FormInstance.md → src/components/form/Form/FormInstance.docs.mdx} +9 -1
  741. package/src/components/form/Form/ModernForm.docs.mdx +6 -0
  742. package/{docs/components/form/ModernForm.md → src/components/form/Form/modern-form-guide.md} +4 -4
  743. package/{docs/components/form → src/components/form/Form}/modern-form-migration.md +1 -1
  744. package/src/components/form/Form/modern-form-typecheck.md +35 -0
  745. package/{docs/components/helpers/DisplayTransition.md → src/components/helpers/DisplayTransition/DisplayTransition.docs.mdx} +18 -3
  746. package/{docs/components/helpers/IconSwitch.md → src/components/helpers/IconSwitch/IconSwitch.docs.mdx} +19 -4
  747. package/{docs/components/layout/Flex.md → src/components/layout/Flex.docs.mdx} +5 -1
  748. package/{docs/components/layout/Flow.md → src/components/layout/Flow.docs.mdx} +5 -1
  749. package/{docs/components/layout/Grid.md → src/components/layout/Grid.docs.mdx} +5 -1
  750. package/{docs/components/layout/Panel.md → src/components/layout/Panel.docs.mdx} +6 -2
  751. package/{docs/components/layout/Prefix.md → src/components/layout/Prefix.docs.mdx} +5 -1
  752. package/{docs/components/layout/ResizablePanel.md → src/components/layout/ResizablePanel.docs.mdx} +11 -2
  753. package/{docs/components/layout/Space.md → src/components/layout/Space.docs.mdx} +5 -1
  754. package/{docs/components/layout/Suffix.md → src/components/layout/Suffix.docs.mdx} +5 -1
  755. package/{docs/components/navigation/NavTabs.md → src/components/navigation/NavTabs/NavTabs.docs.mdx} +16 -6
  756. package/{docs/components/navigation/Pagination.md → src/components/navigation/Pagination/Pagination.docs.mdx} +25 -4
  757. package/{docs/components/navigation/Tabs.md → src/components/navigation/Tabs/Tabs.docs.mdx} +94 -13
  758. package/{docs/components/organisms/StatsCard.md → src/components/organisms/StatsCard/StatsCard.docs.mdx} +6 -2
  759. package/{docs/components/other/Calendar.md → src/components/other/Calendar/Calendar.docs.mdx} +23 -5
  760. package/{docs/components/other/CubeLogo.md → src/components/other/CubeLogo/CubeLogo.docs.mdx} +7 -1
  761. package/{docs/components/other/NoDataIcon.md → src/components/other/NoDataIcon/NoDataIcon.docs.mdx} +9 -3
  762. package/{docs/components/overlays/AlertDialog.md → src/components/overlays/AlertDialog/AlertDialog.docs.mdx} +10 -26
  763. package/{docs/components/overlays/Dialog.md → src/components/overlays/Dialog/Dialog.docs.mdx} +13 -9
  764. package/{docs/components/overlays/DialogContainer.md → src/components/overlays/Dialog/DialogContainer.docs.mdx} +12 -5
  765. package/{docs/components/overlays/DialogForm.md → src/components/overlays/Dialog/DialogForm.docs.mdx} +23 -14
  766. package/{docs/components/overlays/DialogTrigger.md → src/components/overlays/Dialog/DialogTrigger.docs.mdx} +11 -6
  767. package/{docs/components/overlays/UseDialogContainer.md → src/components/overlays/Dialog/UseDialogContainer.docs.mdx} +7 -3
  768. package/{docs/components/overlays/Notifications.md → src/components/overlays/Notifications/Notifications.docs.mdx} +29 -6
  769. package/{docs/components/overlays/Toast.md → src/components/overlays/Toast/Toast.docs.mdx} +30 -11
  770. package/{docs/components/overlays/Tooltip.md → src/components/overlays/Tooltip/Tooltip.docs.mdx} +22 -5
  771. package/{docs/components/overlays/TooltipProvider.md → src/components/overlays/Tooltip/TooltipProvider.docs.mdx} +5 -1
  772. package/{docs/components/overlays/TooltipTrigger.md → src/components/overlays/Tooltip/TooltipTrigger.docs.mdx} +5 -1
  773. package/{docs/components/portal/Portal.md → src/components/portal/Portal.docs.mdx} +7 -1
  774. package/{docs/components/status/LoadingAnimation.md → src/components/status/LoadingAnimation/LoadingAnimation.docs.mdx} +8 -2
  775. package/{docs/components/status/Spin.md → src/components/status/Spin/Spin.docs.mdx} +7 -1
  776. package/{docs/BaseProperties.md → src/stories/BaseProperties.docs.mdx} +5 -1
  777. package/{docs/Colors.md → src/stories/Colors.docs.mdx} +23 -1
  778. package/{docs/ComplexLayout.md → src/stories/ComplexLayout.docs.mdx} +34 -1
  779. package/{docs/CreateComponent.md → src/stories/CreateComponent.docs.mdx} +8 -13
  780. package/{docs/FieldProperties.md → src/stories/FieldProperties.docs.mdx} +10 -6
  781. package/{docs/Introduction.md → src/stories/Introduction.docs.mdx} +11 -7
  782. package/{docs/RenderCache.md → src/stories/RenderCache.docs.mdx} +7 -0
  783. package/{docs/SimpleLayout.md → src/stories/SimpleLayout.docs.mdx} +27 -0
  784. package/{docs/Theming.md → src/stories/Theming.docs.mdx} +17 -3
  785. package/{docs/Typography.md → src/stories/Typography.docs.mdx} +20 -0
  786. package/{docs/Usage.md → src/stories/Usage.docs.mdx} +14 -10
  787. package/{docs/Utilities.md → src/stories/Utilities.docs.mdx} +4 -0
  788. package/src/tasty.config.ts +85 -0
  789. package/dist/components/actions/touch-context-menu.js +0 -145
  790. package/dist/components/actions/touch-context-menu.js.map +0 -1
  791. package/dist/components/fields/popover-width.js +0 -24
  792. package/dist/components/fields/popover-width.js.map +0 -1
  793. package/dist/components/fields/search-text-services.d.ts +0 -14
  794. package/dist/components/fields/search-text-services.js +0 -18
  795. package/dist/components/fields/search-text-services.js.map +0 -1
  796. package/dist/components/shared/virtual-width.js +0 -76
  797. package/dist/components/shared/virtual-width.js.map +0 -1
  798. package/dist/utils/react/useOpenKey.js +0 -52
  799. package/dist/utils/react/useOpenKey.js.map +0 -1
  800. package/docs/llms.txt +0 -174
@@ -1 +1 @@
1
- {"version":3,"file":"FilterListBox.js","names":["ItemElement","Key","modAttrs","Styles","cloneElement","ForwardedRef","forwardRef","isValidElement","ReactElement","ReactNode","RefObject","useCallback","useEffect","useLayoutEffect","useMemo","useRef","useState","useFilter","useFocusWithin","useId","useKeyboard","Section","BaseSection","useListState","useEvent","useI18n","LoadingIcon","useFocus","mergeProps","pickBaseCustomizationProps","useCombinedRefs","CubeCollectionItemProps","CollectionItem","Item","splitFieldLayout","useFieldProps","getValidationMods","wrapWithField","CubeListBoxProps","ListBox","getListBoxOptionId","getEdgeVisibleKey","getNextVisibleKey","markKeyboardFocus","CubeSearchInputAttributes","SEARCH_TEXT_SERVICES","FilterListBoxWrapperElement","SearchInputElement","SearchWrapperElement","StyledHeaderWithoutBorder","Collection","Node","FieldBaseProps","FilterFn","textValue","inputValue","CubeFilterListBoxProps","Omit","T","searchPlaceholder","autoFocus","defaultFocusedKey","filter","emptyLabel","searchInputStyles","searchInputProps","isLoading","isLoadingItems","searchInputRef","HTMLInputElement","allowsCustomValue","mods","Record","listBoxStyles","onEscape","isCheckable","onOptionClick","key","customValueProps","Partial","newCustomValueProps","searchValue","onSearchChange","value","_internalCollection","FilterListBox","props","ref","HTMLDivElement","valuePropsMapper","onChange","fieldProps","selectionMode","selectedKeys","selectedKey","onSelectionChange","Array","isArray","t","qa","label","extra","id","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","externalMods","listStyles","optionStyles","sectionStyles","headingStyles","listGap","listRef","message","description","styles","focusOnHover","shouldFocusWrap","labelSuffix","defaultSelectedKey","defaultSelectedKeys","externalOnSelectionChange","showSelectAll","selectAllLabel","header","footer","size","headerStyles","footerStyles","items","children","renderChildren","allValueProps","controlledSearchValue","isReorderable","onReorder","onLoadMore","hasMore","isLoadingMore","loadMoreMargin","form","renderFn","itemsArray","from","Iterable","map","item","idx","rendered","it","localCollectionState","collection","originalKeys","keys","Set","type","add","String","customKeys","setCustomKeys","internalSearchValue","setInternalSearchValue","isSearchControlled","undefined","contains","sensitivity","currentSelectedKeys","length","keysToAdd","k","has","prev","every","mergedChildren","term","trim","localFilter","customArray","selectedKeysSet","forEach","selectedCustom","unselectedCustom","push","originalArray","innerAriaLabel","handleSearchChange","textFilterFn","filterFn","nodes","node","childNodes","filteredNodes","child","hasChildNodes","Boolean","enhancedChildren","childrenToProcess","doesTermExist","hasVisibleFilteredItems","customKey","customOption","hasSections","some","customValueSection","filteredItemsSection","fieldLayout","fillHeightOnFlex","isFocused","focusProps","isFocusWithin","setIsFocusWithin","focusWithinProps","onFocusWithinChange","listBoxRef","listBoxId","listStateRef","activeOptionKey","setActiveOptionKey","setVirtualFocus","current","selectionManager","setFocusedKey","listState","newCustomValueKey","customValueHasMatches","collectFocusableKeys","out","inCustomSection","disabledKeys","isCustomSection","visibleKeys","customValueShouldBeFocused","currentFocused","focusedKey","includes","currentIsNewCustomValue","keepsFocus","findFirstVisibleSelectedKey","selectedKeyStr","keyStr","keyToFocus","namedKey","find","firstRealKey","lastFocusSourceRef","keyboardProps","onKeyDown","e","preventDefault","nextKey","wrap","targetKey","keyToSelect","select","disabled","focused","loading","searchable","prefix","suffix","handleSelectionChange","selection","selectedValues","nextSet","val","handleOptionClick","setTimeout","focus","searchInput","target","filterListBoxField","disallowEmptySelection","allowDuplicateSelectionEvents","field","Object","defineProperty","enumerable","configurable","Item","mergeProps","BaseSection","useFocus","useId"],"sources":["../../../../src/components/fields/FilterListBox/FilterListBox.tsx"],"sourcesContent":["import { ItemElement, Key } from '@react-types/shared';\nimport { modAttrs, Styles } from '@tenphi/tasty';\nimport {\n cloneElement,\n ForwardedRef,\n forwardRef,\n isValidElement,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFilter, useFocusWithin, useId, useKeyboard } from 'react-aria';\nimport { Section as BaseSection, useListState } from 'react-stately';\n\nimport { useEvent } from '../../../_internal/hooks/use-event';\nimport { useI18n } from '../../../i18n/useI18n';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { mergeProps } from '../../../utils/react/mergeProps';\nimport { pickBaseCustomizationProps } from '../../../utils/react/pickBaseCustomizationProps';\nimport { useCombinedRefs } from '../../../utils/react/useCombinedRefs';\nimport {\n CubeCollectionItemProps,\n CollectionItem as Item,\n} from '../../CollectionItem';\nimport { splitFieldLayout } from '../../form/field-layout';\nimport { useFieldProps } from '../../form/Form/use-field/use-field-props';\nimport { getValidationMods } from '../../form/validation/resolve-validation-props';\nimport { wrapWithField } from '../../form/wrapper';\nimport { CubeListBoxProps, ListBox } from '../ListBox/ListBox';\nimport { getListBoxOptionId } from '../ListBox/optionId';\nimport {\n getEdgeVisibleKey,\n getNextVisibleKey,\n markKeyboardFocus,\n} from '../ListBoxPopover/listNavigation';\nimport {\n CubeSearchInputAttributes,\n SEARCH_TEXT_SERVICES,\n} from '../search-text-services';\n\nimport {\n FilterListBoxWrapperElement,\n SearchInputElement,\n SearchWrapperElement,\n StyledHeaderWithoutBorder,\n} from './styled';\n\nimport type { Collection, Node } from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\n\ntype FilterFn = (textValue: string, inputValue: string) => boolean;\n\nexport interface CubeFilterListBoxProps<T>\n // It sets `isFocusWithin` on its list itself.\n extends\n Omit<CubeListBoxProps<T>, 'filter' | 'isFocusWithin'>,\n FieldBaseProps<\n string | number | readonly (string | number)[] | null | undefined\n > {\n /** Placeholder text for the search input */\n searchPlaceholder?: string;\n /** Whether the search input should have autofocus */\n autoFocus?: boolean;\n /**\n * The option highlighted when the list opens, instead of the first selected\n * option: for example an action row at the top of the list, so that Enter\n * runs it rather than unchecking a selected option. The list also returns to\n * it whenever the highlighted option leaves the list (a search hides it, or\n * it is removed or disabled). While it is hidden, disabled or missing, the\n * list highlights the first selected option, else the first option.\n * Highlighting never selects or runs it.\n */\n defaultFocusedKey?: Key;\n /**\n * Custom filter function for determining if an option should be included in search results.\n * Pass `false` to disable internal filtering completely (useful for external filtering).\n */\n filter?: FilterFn | false;\n /** Label shown when the list is empty. When provided, overrides both the \"No results found\" and \"No items\" defaults. It wraps to the list's width, so a long message, or an action in it, stays in view. */\n emptyLabel?: ReactNode;\n /** Custom styles for the search input */\n searchInputStyles?: Styles;\n /**\n * Attributes for the search input, such as `enterKeyHint`, `autoCorrect` or `inputMode`.\n * They win over the search defaults: `enterKeyHint=\"search\"`, `autoCapitalize=\"none\"`,\n * `autoCorrect=\"off\"` and `spellCheck={false}`.\n */\n searchInputProps?: CubeSearchInputAttributes;\n /** Whether the FilterListBox is in loading state (shows loading icon in search input) */\n isLoading?: boolean;\n /** Whether items are currently loading. Shows a loading icon in the search input suffix. */\n isLoadingItems?: boolean;\n /** Ref for accessing the search input element */\n searchInputRef?: RefObject<HTMLInputElement | null>;\n /** Whether to allow entering custom values that are not present in the predefined options */\n allowsCustomValue?: boolean;\n /** Additional modifiers for styling the FilterListBox */\n mods?: Record<string, boolean>;\n /** Custom styles for the list box */\n listBoxStyles?: Styles;\n\n /**\n * Callback fired when the user presses Escape key while the search input is empty.\n * Can be used by parent components (e.g. FilterPicker) to close an enclosing Dialog.\n */\n onEscape?: () => void;\n\n /**\n * Whether to show checkboxes for multiple selection mode.\n * This adds a checkbox icon to the left of each option.\n */\n isCheckable?: boolean;\n\n /**\n * Callback fired when an option is clicked but not on the checkbox area.\n * Used by FilterPicker to close the popover on non-checkbox clicks.\n */\n onOptionClick?: (key: Key) => void;\n\n /**\n * Props to apply to existing custom values (values that are already selected but not in the predefined options).\n */\n customValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Props to apply to new custom values (values typed in the search input that are about to be added).\n * These are merged with customValueProps for new custom values.\n */\n newCustomValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Controlled search value. When provided, the search input becomes controlled.\n * Use with `onSearchChange` to manage the search state externally.\n */\n searchValue?: string;\n\n /**\n * Callback fired when the search input value changes.\n * Use with `searchValue` for controlled search input.\n */\n onSearchChange?: (value: string) => void;\n\n /**\n * Pre-built collection to use instead of creating a new one.\n * Used internally by FilterPicker to avoid duplicate collection creation.\n * @internal\n */\n _internalCollection?: Collection<Node<any>>;\n}\n\nexport const FilterListBox = forwardRef(function FilterListBox<\n T extends object,\n>(props: CubeFilterListBoxProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n props = useFieldProps(props, {\n valuePropsMapper: ({ value, onChange }) => {\n const fieldProps: any = {};\n\n if (props.selectionMode === 'multiple') {\n fieldProps.selectedKeys = value || [];\n } else {\n fieldProps.selectedKey = value ?? null;\n }\n\n fieldProps.onSelectionChange = (key: any) => {\n if (props.selectionMode === 'multiple') {\n // Handle \"all\" selection and array selections\n if (key === 'all') {\n onChange('all');\n } else {\n onChange(key ? (Array.isArray(key) ? key : [key]) : []);\n }\n } else {\n onChange(Array.isArray(key) ? key[0] : key);\n }\n };\n\n return fieldProps;\n },\n });\n\n const { t } = useI18n();\n\n let {\n qa,\n label,\n extra,\n id,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isLoadingItems,\n searchPlaceholder = t('filterListBox.searchPlaceholder', 'Search...'),\n autoFocus,\n defaultFocusedKey,\n filter,\n mods: externalMods,\n emptyLabel,\n searchInputStyles,\n searchInputProps,\n listStyles,\n optionStyles,\n sectionStyles,\n headingStyles,\n listGap,\n searchInputRef,\n listRef,\n message,\n description,\n styles,\n focusOnHover,\n shouldFocusWrap,\n labelSuffix,\n selectedKey,\n defaultSelectedKey,\n selectedKeys,\n defaultSelectedKeys,\n onSelectionChange: externalOnSelectionChange,\n allowsCustomValue = false,\n showSelectAll,\n selectAllLabel,\n header,\n footer,\n size = 'medium',\n headerStyles,\n footerStyles,\n listBoxStyles,\n items,\n children: renderChildren,\n onEscape,\n isCheckable,\n onOptionClick,\n selectionMode = 'single',\n allValueProps,\n customValueProps,\n newCustomValueProps,\n searchValue: controlledSearchValue,\n onSearchChange,\n _internalCollection,\n isReorderable = false,\n onReorder,\n onLoadMore,\n hasMore,\n isLoadingMore,\n loadMoreMargin,\n form,\n } = props;\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 (items && typeof renderFn === 'function') {\n try {\n const itemsArray = Array.from(items as Iterable<any>);\n // Execute the render function for each item to obtain <Item/> / <Section/> nodes.\n children = itemsArray.map((item, idx) => {\n const rendered = (renderFn as (it: any) => ReactNode)(item);\n // Ensure every element has a stable key: rely on the user-provided key\n // inside the render function, otherwise fall back to the item itself or\n // the index. This mirrors React Aria examples where the render function\n // is expected to set keys, but we add a fallback for robustness.\n if (\n isValidElement(rendered) &&\n (rendered as ReactElement).key == null\n ) {\n return 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 for some reason, we silently ignore and proceed\n // with the original children value so we don't break runtime.\n }\n }\n\n // Use provided collection from FilterPicker or create our own\n // Hook call order is stable: _internalCollection is consistent per component instance\n const localCollectionState = _internalCollection\n ? { collection: _internalCollection }\n : useListState({\n children: children as any,\n items: items as any,\n selectionMode: 'none' as any,\n });\n\n // Collect original option keys to avoid duplicating them as custom values.\n const originalKeys = useMemo(() => {\n const keys = new Set<string>();\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n keys.add(String(item.key));\n }\n }\n return keys;\n }, [localCollectionState.collection]);\n\n // State to keep track of custom (user-entered) items that were selected.\n const [customKeys, setCustomKeys] = useState<Set<string>>(new Set());\n\n // Controlled/uncontrolled search value pattern\n const [internalSearchValue, setInternalSearchValue] = useState('');\n const isSearchControlled = controlledSearchValue !== undefined;\n const searchValue = isSearchControlled\n ? controlledSearchValue\n : internalSearchValue;\n\n const { contains } = useFilter({ sensitivity: 'base' });\n\n // Initialize custom keys from current selection\n useEffect(() => {\n if (!allowsCustomValue) return;\n\n const currentSelectedKeys = selectedKeys\n ? selectedKeys === 'all'\n ? [] // Skip custom key detection when 'all' is selected\n : Array.from(selectedKeys).map(String)\n : selectedKey != null\n ? [String(selectedKey)]\n : [];\n\n if (currentSelectedKeys.length === 0) return;\n\n const keysToAdd = currentSelectedKeys.filter((k) => !originalKeys.has(k));\n\n // Keys already there leave the state as it is. With `items` and a render\n // function the options, and so this effect, are new on every render, and\n // a new set each time would render again for good.\n if (keysToAdd.length) {\n setCustomKeys((prev) =>\n keysToAdd.every((key) => prev.has(key))\n ? prev\n : new Set([...prev, ...keysToAdd]),\n );\n }\n }, [allowsCustomValue, selectedKeys, selectedKey, originalKeys]);\n\n // Merge original children with any custom items so they persist in the list.\n // If there are selected custom values, they should appear on top with other\n // selected items (which are already sorted by the parent component, e.g. FilterPicker).\n const mergedChildren: ReactNode = useMemo(() => {\n if (!children && customKeys.size === 0) return children;\n\n // Selected custom values are injected by FilterListBox itself, not by the\n // parent. They must respect the search input regardless of the `filter`\n // prop — `filter={false}` only describes the parent's authority over its\n // own items. Filter them with the user-provided filter (if any) or the\n // default `contains`.\n const term = searchValue.trim();\n const localFilter: FilterFn =\n typeof filter === 'function' ? filter : contains;\n\n // Build React elements for custom values (kept stable via their key). A\n // value that has since arrived among the options, in a page loaded on\n // scroll, is listed once, as that option.\n const customArray = Array.from(customKeys)\n .filter((key) => !originalKeys.has(key))\n .filter((key) => !term || localFilter(key, term))\n .map((key) => (\n <Item key={key} textValue={key} {...customValueProps}>\n {key}\n </Item>\n ));\n\n // Identify which custom keys are currently selected so we can promote them.\n const selectedKeysSet = new Set<string>();\n\n if (selectionMode === 'multiple') {\n if (selectedKeys === 'all') {\n // When 'all' is selected, no custom items should be treated as selected\n // since 'all' means all available items, not custom ones\n } else {\n Array.from(selectedKeys ?? []).forEach((k) =>\n selectedKeysSet.add(String(k)),\n );\n }\n } else {\n if (selectedKey != null) selectedKeysSet.add(String(selectedKey));\n }\n\n const selectedCustom: ReactNode[] = [];\n const unselectedCustom: ReactNode[] = [];\n\n customArray.forEach((item: any) => {\n if (selectedKeysSet.has(String(item.key))) {\n selectedCustom.push(item);\n } else {\n unselectedCustom.push(item);\n }\n });\n\n if (!children) {\n // No original items – just return selected custom followed by the rest.\n return [...selectedCustom, ...unselectedCustom];\n }\n\n const originalArray = Array.isArray(children) ? children : [children];\n\n // Final order: selected custom items -> original array (already possibly\n // sorted by parent) -> unselected custom items.\n return [...selectedCustom, ...originalArray, ...unselectedCustom];\n }, [\n children,\n customKeys,\n originalKeys,\n selectionMode,\n selectedKey,\n selectedKeys,\n searchValue,\n filter,\n contains,\n customValueProps,\n ]);\n\n // Determine an aria-label for the internal ListBox to avoid React Aria warnings.\n const innerAriaLabel =\n (props as any)['aria-label'] ||\n (typeof label === 'string' ? label : undefined);\n\n const handleSearchChange = useCallback(\n (value: string) => {\n if (!isSearchControlled) {\n setInternalSearchValue(value);\n }\n onSearchChange?.(value);\n },\n [isSearchControlled, onSearchChange],\n );\n\n // Choose the text filter function: user-provided `filter` prop (if any),\n // or the default `contains` helper from `useFilter`.\n // When `filter={false}`, the parent owns filtering — we normally pass items\n // through unchanged. The exception is when `isLoadingItems` is `true`: a\n // server fetch is in flight and currently visible items are stale, so we\n // fall back to client-side `contains` to hide non-matching stale items\n // until the new items arrive.\n const textFilterFn = useMemo<FilterFn>(() => {\n if (filter === false) {\n return isLoadingItems ? contains : () => true;\n }\n return filter || contains;\n }, [filter, contains, isLoadingItems]);\n\n // Create a filter function for collection nodes (similar to ComboBox pattern)\n const filterFn = useCallback(\n (nodes: Iterable<any>) => {\n // Server-side filtering with no fetch in flight — items are\n // authoritative and shown as-is.\n if (filter === false && !isLoadingItems) return nodes;\n\n const term = searchValue.trim();\n\n if (!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 filteredNodes = [...node.childNodes].filter((child: any) =>\n textFilterFn(child.textValue || '', term),\n );\n\n if (filteredNodes.length === 0) {\n return null;\n }\n\n return {\n ...node,\n childNodes: filteredNodes,\n hasChildNodes: true,\n };\n }\n\n return textFilterFn(node.textValue || '', term) ? node : null;\n })\n .filter(Boolean);\n },\n [filter, searchValue, textFilterFn, isLoadingItems],\n );\n\n // Handle custom values if allowed\n const enhancedChildren = useMemo(() => {\n let childrenToProcess = mergedChildren;\n\n // Handle custom values if allowed\n if (!allowsCustomValue) return childrenToProcess;\n\n const term = searchValue.trim();\n if (!term) return childrenToProcess;\n\n // Helper to determine if the term is already present (exact match on rendered textValue or the key).\n const doesTermExist = (term: string): boolean => {\n // Check if term exists in custom keys\n if (customKeys.has(term)) {\n return true;\n }\n\n // Check if term exists in original collection\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n const textValue = item.textValue || String(item.rendered || '');\n if (term === textValue || String(item.key) === term) {\n return true;\n }\n }\n }\n return false;\n };\n\n if (doesTermExist(term)) {\n return childrenToProcess;\n }\n\n // Check if there are any items that will match the filter.\n // This determines whether we need to visually separate the custom value\n // from real items (i.e. render a divider between sections). When there\n // are no visible items, we skip the section wrapper so no divider is\n // drawn above a lone custom-value option.\n //\n // Selected custom values (from `customKeys`) are filtered by `localFilter`\n // in `mergedChildren` regardless of `filter={false}`, so this check must\n // use the same logic — otherwise we'd report \"items visible\" and draw a\n // divider while the actual collection only contains the custom value.\n const localFilter: FilterFn =\n typeof filter === 'function' ? filter : contains;\n\n const hasVisibleFilteredItems = (() => {\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n const textValue = item.textValue || String(item.rendered || '');\n if (textFilterFn(textValue, term)) {\n return true;\n }\n } else if (item.type === 'section' && item.childNodes) {\n for (const child of item.childNodes) {\n const textValue = child.textValue || String(child.rendered || '');\n if (textFilterFn(textValue, term)) {\n return true;\n }\n }\n }\n }\n\n for (const customKey of customKeys) {\n if (localFilter(customKey, term)) {\n return true;\n }\n }\n\n return false;\n })();\n\n // Create the custom option\n const customOption = (\n <Item\n key={term}\n textValue={term}\n {...mergeProps(customValueProps ?? {}, newCustomValueProps ?? {})}\n >\n {term}\n </Item>\n );\n\n // If there are visible filtered items, add visual separation for custom value\n if (hasVisibleFilteredItems && childrenToProcess) {\n // Check if the collection contains any sections\n // If it does, we can't wrap childrenToProcess in another section (would create nested sections)\n const hasSections = [...localCollectionState.collection].some(\n (item) => item.type === 'section',\n );\n\n const customValueSection = (\n <BaseSection\n key=\"__custom_value__\"\n aria-label={t('filterListBox.customValue', 'Custom value')}\n >\n {customOption}\n </BaseSection>\n );\n\n if (hasSections) {\n // Collection has sections - just append the custom value section without wrapping\n if (Array.isArray(childrenToProcess)) {\n return [...childrenToProcess, customValueSection];\n }\n return [childrenToProcess, customValueSection];\n }\n\n // No sections in collection - wrap items in a section for visual separation\n const filteredItemsSection = (\n <BaseSection\n key=\"__filtered_items__\"\n aria-label={t('filterListBox.filteredItems', 'Filtered items')}\n >\n {childrenToProcess as ItemElement<unknown>[]}\n </BaseSection>\n );\n\n return [filteredItemsSection, customValueSection];\n }\n\n // No visible filtered items, just return the custom option without sections\n if (Array.isArray(childrenToProcess)) {\n return [...childrenToProcess, customOption];\n }\n\n if (childrenToProcess) {\n return [childrenToProcess, customOption];\n }\n\n return customOption;\n }, [\n allowsCustomValue,\n mergedChildren,\n searchValue,\n customKeys,\n localCollectionState.collection,\n customValueProps,\n newCustomValueProps,\n textFilterFn,\n filter,\n contains,\n t,\n ]);\n\n const fieldLayout = splitFieldLayout(props, { fillHeightOnFlex: true });\n\n styles = fieldLayout.styles;\n\n searchInputRef = useCombinedRefs(searchInputRef);\n listRef = useCombinedRefs(listRef);\n\n const { isFocused, focusProps } = useFocus();\n // The search input moves the list's focused option, so the option shows as\n // focused only while focus is in this component.\n const [isFocusWithin, setIsFocusWithin] = useState(false);\n const { focusWithinProps } = useFocusWithin({\n onFocusWithinChange: setIsFocusWithin,\n });\n\n const listBoxRef = useRef<HTMLDivElement>(null);\n // The search input points `aria-controls` and `aria-activedescendant` into\n // the list, so the list needs an id the input knows.\n const listBoxId = useId();\n\n // Ref to access internal ListBox state (selection manager, etc.)\n const listStateRef = useRef<any>(null);\n\n // The option under virtual focus, mirrored in state for the search input's\n // `aria-activedescendant`: the listbox's own state update does not re-render\n // this component. Every focus move below goes through `setVirtualFocus`.\n const [activeOptionKey, setActiveOptionKey] = useState<Key | null>(null);\n const setVirtualFocus = useEvent((key: Key | null) => {\n listStateRef.current?.selectionManager.setFocusedKey(key);\n setActiveOptionKey(key);\n });\n\n // When the search value changes, the visible collection of items may change as well.\n // If the currently focused item is no longer visible, move virtual focus to the first\n // available item so that arrow navigation and Enter behaviour continue to work.\n // If there are no available items, reset the selection so Enter won't select anything.\n // Priority: the caller's `defaultFocusedKey`, then selected items, then the\n // first visible item.\n useLayoutEffect(() => {\n const listState = listStateRef.current;\n\n if (!listState) return;\n\n const { selectionManager, collection } = listState;\n\n // Walk the collection and:\n // 1. Collect the enabled keys of the visible items (supports sections).\n // 2. Detect the synthetic \"new custom value\" option — the one generated\n // from the current search term when `allowsCustomValue` is true.\n //\n // The custom value is rendered in one of two layouts depending on whether\n // any real item text-matches the search term (`hasVisibleFilteredItems`\n // in `enhancedChildren`):\n // • Some items match → wrapped in a `__custom_value__` section\n // (`customValueHasMatches = true`)\n // • No items match → appended at the top level with key === term\n // (`customValueHasMatches = false`)\n //\n // The layout itself is the signal we use to decide whether the custom\n // value should be the focus target (no matches) or whether focus should\n // move to a real item (matches present).\n const term = searchValue.trim();\n let newCustomValueKey: Key | null = null;\n let customValueHasMatches = false;\n\n const collectFocusableKeys = (\n nodes: Iterable<any>,\n out: Key[],\n inCustomSection = false,\n ) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n if (!listState.disabledKeys.has(node.key)) out.push(node.key);\n if (inCustomSection) {\n newCustomValueKey = node.key;\n customValueHasMatches = true;\n }\n } else if (node.childNodes) {\n const isCustomSection =\n inCustomSection || node.key === '__custom_value__';\n collectFocusableKeys(node.childNodes, out, isCustomSection);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectFocusableKeys(collection, visibleKeys);\n\n // Detect the appended-at-top-level case (no items text-match). The custom\n // option is added with key === trimmed search term and lives directly in\n // the top-level collection (not nested in any section).\n if (newCustomValueKey == null && allowsCustomValue && term) {\n for (const node of collection) {\n if (node.type === 'item' && String(node.key) === term) {\n newCustomValueKey = node.key;\n customValueHasMatches = false;\n break;\n }\n }\n }\n\n // If there are no visible items, reset the focused key so Enter won't select anything\n if (visibleKeys.length === 0) {\n setVirtualFocus(null);\n return;\n }\n\n // The custom value should be the focus target when it exists and there\n // are no real text-matches — the user's typed value is then the only\n // actionable option. During an in-flight server fetch (`filter === false`\n // + `isLoadingItems`) `textFilterFn` falls back to client-side `contains`\n // so non-matching stale items are hidden, which keeps this signal honest.\n const customValueShouldBeFocused =\n newCustomValueKey != null && !customValueHasMatches;\n\n // Decide whether the current focus is already on the right thing. If yes,\n // don't disturb it. Otherwise fall through and re-pick a focus target.\n const currentFocused = selectionManager.focusedKey;\n if (currentFocused != null && visibleKeys.includes(currentFocused)) {\n const currentIsNewCustomValue =\n newCustomValueKey != null && currentFocused === newCustomValueKey;\n const keepsFocus = customValueShouldBeFocused\n ? currentIsNewCustomValue\n : newCustomValueKey != null\n ? // Custom value exists but isn't the priority (matches available)\n // — any non-custom focus is fine.\n !currentIsNewCustomValue\n : // No custom value involved at all.\n true;\n\n if (keepsFocus) {\n setActiveOptionKey(currentFocused);\n return;\n }\n }\n\n // Helper to find the first selected item that's visible\n const findFirstVisibleSelectedKey = (): Key | null => {\n if (selectionMode === 'single') {\n // Single selection: check if selectedKey is visible\n if (selectedKey != null) {\n const selectedKeyStr = String(selectedKey);\n if (visibleKeys.some((k) => String(k) === selectedKeyStr)) {\n return selectedKey;\n }\n }\n } else if (selectionMode === 'multiple') {\n // Multiple selection: find first selected key that's visible\n if (selectedKeys && selectedKeys !== 'all') {\n for (const key of selectedKeys) {\n const keyStr = String(key);\n if (visibleKeys.some((k) => String(k) === keyStr)) {\n return key;\n }\n }\n }\n }\n return null;\n };\n\n // Determine which key to focus\n let keyToFocus: Key | null = null;\n\n if (customValueShouldBeFocused) {\n // No real matches — promote the custom value over any selected/stale\n // item so the user can press Enter to add the value they just typed.\n keyToFocus = newCustomValueKey;\n } else {\n // The option the caller named, while it is in view and enabled. Keys are\n // compared as strings, as for the selection, and the collection's own\n // key is focused.\n const namedKey =\n defaultFocusedKey == null\n ? undefined\n : visibleKeys.find((k) => String(k) === String(defaultFocusedKey));\n\n keyToFocus = namedKey ?? findFirstVisibleSelectedKey();\n\n // Fallback to first visible item if no selected item found. Prefer the\n // first real (non-custom-value) item so focus doesn't land on the\n // bottom-of-list custom-value suggestion when real items are available.\n if (keyToFocus == null) {\n const firstRealKey = visibleKeys.find((k) => k !== newCustomValueKey);\n keyToFocus = firstRealKey ?? visibleKeys[0];\n }\n }\n\n // Mark this focus change as keyboard navigation so ListBox will scroll to it\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n\n // Set focus to the determined key\n setVirtualFocus(keyToFocus);\n }, [\n searchValue,\n enhancedChildren,\n selectionMode,\n selectedKey,\n selectedKeys,\n allowsCustomValue,\n defaultFocusedKey,\n setVirtualFocus,\n ]);\n\n // Keyboard navigation handler for search input\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n // The collection is already filtered by React Stately via filterFn;\n // disabled options are skipped.\n // Wrapping from the last loaded option to the first would skip the\n // options still to load.\n const nextKey = getNextVisibleKey(\n listState,\n e.key === 'ArrowDown' ? 1 : -1,\n { wrap: shouldFocusWrap && !(onLoadMore && hasMore) },\n );\n\n if (nextKey != null) {\n markKeyboardFocus(listState);\n setVirtualFocus(nextKey);\n }\n } else if (\n e.key === 'Home' ||\n e.key === 'End' ||\n e.key === 'PageUp' ||\n e.key === 'PageDown'\n ) {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const targetKey = getEdgeVisibleKey(\n listState,\n e.key === 'Home' || e.key === 'PageUp' ? 'first' : 'last',\n );\n\n if (targetKey == null) return;\n\n markKeyboardFocus(listState);\n setVirtualFocus(targetKey);\n } else if (e.key === 'Enter' || (e.key === ' ' && !searchValue)) {\n const listState = listStateRef.current;\n\n if (!listState) return;\n\n const keyToSelect = listState.selectionManager.focusedKey;\n\n if (keyToSelect != null) {\n e.preventDefault();\n listState.selectionManager.select(keyToSelect, e);\n\n if (\n e.key === 'Enter' &&\n isCheckable &&\n onEscape &&\n selectionMode === 'multiple'\n ) {\n onEscape();\n }\n }\n } else if (e.key === 'Escape') {\n if (searchValue) {\n // Clear the current search if any text is present.\n e.preventDefault();\n handleSearchChange('');\n } else {\n // Notify parent that Escape was pressed on an empty input.\n if (onEscape) {\n e.preventDefault();\n onEscape();\n }\n }\n }\n },\n });\n\n const mods = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: !!isDisabled,\n focused: isFocused,\n loading: !!isLoading,\n 'loading-items': !!isLoadingItems,\n searchable: true,\n prefix: !!isLoading,\n suffix: !!isLoadingItems,\n ...externalMods,\n }),\n [\n isInvalid,\n isInvalid,\n isValid,\n isDisabled,\n isFocused,\n isLoading,\n isLoadingItems,\n externalMods,\n ],\n );\n\n // Handler must be defined before we render ListBox so we can pass it.\n const handleSelectionChange = (selection: any) => {\n if (allowsCustomValue) {\n // Normalize current selection into an array of string keys\n let selectedValues: string[] = [];\n\n if (selection != null) {\n if (Array.isArray(selection)) {\n selectedValues = selection.map(String);\n } else {\n selectedValues = [String(selection)];\n }\n }\n\n // Build next custom keys set based on selected values\n const nextSet = new Set<string>();\n\n selectedValues.forEach((val) => {\n if (!originalKeys.has(val)) {\n nextSet.add(val);\n }\n });\n\n // Update internal custom keys state\n setCustomKeys(nextSet);\n }\n\n if (externalOnSelectionChange) {\n (externalOnSelectionChange as any)(selection);\n }\n };\n\n // Custom option click handler that ensures search input receives focus\n const handleOptionClick = (key: Key) => {\n // Focus the search input to enable keyboard navigation\n // Use setTimeout to ensure this happens after React state updates\n setTimeout(() => {\n if (searchInputRef.current) {\n searchInputRef.current.focus();\n }\n }, 0);\n\n // Call the original onOptionClick if provided\n if (onOptionClick) {\n onOptionClick(key);\n }\n };\n\n const searchInput = (\n <SearchWrapperElement mods={mods} data-size={size}>\n {isLoading && (\n <div data-element=\"Prefix\">\n <div data-element=\"InputIcon\">\n {isLoading ? <LoadingIcon /> : null}\n </div>\n </div>\n )}\n <SearchInputElement\n {...pickBaseCustomizationProps(props)}\n {...mergeProps(SEARCH_TEXT_SERVICES, searchInputProps)}\n ref={searchInputRef}\n qa={qa || 'FilterListBox'}\n id={id}\n data-prefix={isLoading ? '' : undefined}\n data-suffix={isLoadingItems ? '' : undefined}\n type=\"search\"\n placeholder={searchPlaceholder}\n value={searchValue}\n disabled={isDisabled}\n autoFocus={autoFocus}\n {...(autoFocus ? { 'data-autofocus': '' } : undefined)}\n styles={searchInputStyles}\n data-size={size}\n data-input-type=\"filterlistbox\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-haspopup=\"listbox\"\n aria-controls={listBoxId}\n aria-activedescendant={\n activeOptionKey != null\n ? getListBoxOptionId(listBoxId, activeOptionKey)\n : undefined\n }\n // The search input is the control the label points at, so it also\n // takes the caller's naming and the field's description and message.\n aria-label={(props as any)['aria-label']}\n aria-labelledby={(props as any)['aria-labelledby']}\n aria-describedby={(props as any)['aria-describedby']}\n aria-invalid={isInvalid || undefined}\n onChange={(e) => {\n handleSearchChange(e.target.value);\n }}\n {...keyboardProps}\n {...modAttrs(mods)}\n />\n {isLoadingItems && (\n <div data-element=\"Suffix\">\n <LoadingIcon data-element=\"InputIcon\" />\n </div>\n )}\n </SearchWrapperElement>\n );\n\n const filterListBoxField = (\n <FilterListBoxWrapperElement\n ref={ref}\n qa=\"FilterListBoxWrapper\"\n {...modAttrs(mods)}\n styles={styles}\n {...mergeProps(focusProps, focusWithinProps)}\n >\n {header ? (\n <StyledHeaderWithoutBorder data-size={size} styles={headerStyles}>\n {header}\n </StyledHeaderWithoutBorder>\n ) : (\n <div role=\"presentation\" />\n )}\n {searchInput}\n <ListBox\n isBare\n ref={listBoxRef}\n id={listBoxId}\n aria-label={innerAriaLabel}\n selectedKey={selectedKey}\n defaultSelectedKey={defaultSelectedKey}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n selectionMode={selectionMode}\n isDisabled={isDisabled}\n listRef={listRef}\n stateRef={listStateRef}\n listStyles={listStyles}\n shouldFocusWrap={shouldFocusWrap}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n listGap={listGap}\n isInvalid={isInvalid}\n isValid={isValid}\n disallowEmptySelection={props.disallowEmptySelection}\n allowDuplicateSelectionEvents={props.allowDuplicateSelectionEvents}\n disabledKeys={props.disabledKeys}\n focusOnHover={focusOnHover}\n shouldUseVirtualFocus={!(isReorderable && !searchValue.trim())}\n isFocusWithin={isFocusWithin}\n showSelectAll={showSelectAll}\n selectAllLabel={selectAllLabel}\n footer={footer}\n footerStyles={footerStyles}\n mods={mods}\n styles={listBoxStyles}\n isCheckable={isCheckable}\n items={items as any}\n allValueProps={allValueProps}\n filter={filterFn}\n emptyLabel={\n emptyLabel !== undefined\n ? emptyLabel\n : searchValue.trim()\n ? t('filterListBox.noResults', 'No results found')\n : t('filterListBox.noItems', 'No items')\n }\n isReorderable={isReorderable && !searchValue.trim()}\n onReorder={onReorder}\n onLoadMore={onLoadMore}\n hasMore={hasMore}\n isLoadingMore={isLoadingMore}\n loadMoreMargin={loadMoreMargin}\n onSelectionChange={handleSelectionChange}\n onEscape={onEscape}\n onOptionClick={handleOptionClick}\n >\n {enhancedChildren as any}\n </ListBox>\n </FilterListBoxWrapperElement>\n );\n\n return wrapWithField<Omit<CubeFilterListBoxProps<T>, 'children'>>(\n filterListBoxField,\n { ...props, ...fieldLayout.field },\n );\n}) as unknown as (<T>(\n props: CubeFilterListBoxProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement) & { Item: typeof Item; Section: typeof BaseSection };\n\nFilterListBox.Item = Item;\n\nFilterListBox.Section = BaseSection;\n\nObject.defineProperty(FilterListBox, 'cubeInputType', {\n value: 'FilterListBox',\n enumerable: false,\n configurable: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA6JA,MAAaqF,gBAAgB/E,WAAW,SAAS+E,cAE/CC,OAAkCC,KAAmC;CACrED,QAAQnD,cAAcmD,OAAO,EAC3BG,mBAAmB,EAAEN,OAAOO,eAAe;EACzC,MAAMC,aAAkB,CAAC;EAEzB,IAAIL,MAAMM,kBAAkB,YAC1BD,WAAWE,eAAeV,SAAS,CAAA;OAEnCQ,WAAWG,cAAcX,SAAS;EAGpCQ,WAAWI,qBAAqBlB,QAAa;GAC3C,IAAIS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G,KAAK;IACvCxC;IACCC;IACHC;IACMC;IACCC;IAChB,mBAAmByH;IACT7L;IACV,eAAekM;IAEdtE,UAAAA;GACM,CAAA;EACkB;;CAG/B,OAAOjK,cACL4O,oBACA;EAAE,GAAG3L;EAAO,GAAG0H,YAAYoE;CAAM,CACnC;AACF,CAAC;AAID/L,cAAcpD,OAAOA;AAErBoD,cAAchE,UAAUC;AAExB+P,OAAOC,eAAejM,eAAe,iBAAiB;CACpDF,OAAO;CACPoM,YAAY;CACZC,cAAc;AAChB,CAAC"}
1
+ {"version":3,"file":"FilterListBox.js","names":["ItemElement","Key","modAttrs","Styles","cloneElement","ForwardedRef","forwardRef","isValidElement","ReactElement","ReactNode","RefObject","useCallback","useEffect","useLayoutEffect","useMemo","useRef","useState","useFilter","useFocusWithin","useId","useKeyboard","Section","BaseSection","useListState","useEvent","useI18n","LoadingIcon","useFocus","mergeProps","pickBaseCustomizationProps","useCombinedRefs","CubeCollectionItemProps","CollectionItem","Item","splitFieldLayout","useFieldProps","getValidationMods","wrapWithField","CubeListBoxProps","ListBox","getListBoxOptionId","getEdgeVisibleKey","getNextVisibleKey","markKeyboardFocus","FilterListBoxWrapperElement","SearchInputElement","SearchWrapperElement","StyledHeaderWithoutBorder","Collection","Node","FieldBaseProps","FilterFn","textValue","inputValue","CubeFilterListBoxProps","Omit","T","searchPlaceholder","autoFocus","filter","emptyLabel","searchInputStyles","isLoading","isLoadingItems","searchInputRef","HTMLInputElement","allowsCustomValue","mods","Record","listBoxStyles","onEscape","isCheckable","onOptionClick","key","customValueProps","Partial","newCustomValueProps","searchValue","onSearchChange","value","_internalCollection","FilterListBox","props","ref","HTMLDivElement","valuePropsMapper","onChange","fieldProps","selectionMode","selectedKeys","selectedKey","onSelectionChange","Array","isArray","t","qa","label","extra","id","labelStyles","isRequired","necessityIndicator","isInvalid","isValid","isDisabled","externalMods","listStyles","optionStyles","sectionStyles","headingStyles","listGap","listRef","message","description","styles","focusOnHover","shouldFocusWrap","labelSuffix","defaultSelectedKey","defaultSelectedKeys","externalOnSelectionChange","showSelectAll","selectAllLabel","header","footer","size","headerStyles","footerStyles","items","children","renderChildren","allValueProps","controlledSearchValue","isReorderable","onReorder","onLoadMore","hasMore","isLoadingMore","loadMoreMargin","form","renderFn","itemsArray","from","Iterable","map","item","idx","rendered","it","localCollectionState","collection","originalKeys","keys","Set","type","add","String","customKeys","setCustomKeys","internalSearchValue","setInternalSearchValue","isSearchControlled","undefined","contains","sensitivity","currentSelectedKeys","length","keysToAdd","k","has","prev","every","mergedChildren","term","trim","localFilter","customArray","selectedKeysSet","forEach","selectedCustom","unselectedCustom","push","originalArray","innerAriaLabel","handleSearchChange","textFilterFn","filterFn","nodes","node","childNodes","filteredNodes","child","hasChildNodes","Boolean","enhancedChildren","childrenToProcess","doesTermExist","hasVisibleFilteredItems","customKey","customOption","hasSections","some","customValueSection","filteredItemsSection","fieldLayout","fillHeightOnFlex","isFocused","focusProps","isFocusWithin","setIsFocusWithin","focusWithinProps","onFocusWithinChange","listBoxRef","listBoxId","listStateRef","activeOptionKey","setActiveOptionKey","setVirtualFocus","current","selectionManager","setFocusedKey","listState","newCustomValueKey","customValueHasMatches","collectFocusableKeys","out","inCustomSection","disabledKeys","isCustomSection","visibleKeys","customValueShouldBeFocused","currentFocused","focusedKey","includes","currentIsNewCustomValue","keepsFocus","findFirstVisibleSelectedKey","selectedKeyStr","keyStr","keyToFocus","firstRealKey","find","lastFocusSourceRef","keyboardProps","onKeyDown","e","preventDefault","nextKey","wrap","targetKey","keyToSelect","select","disabled","focused","loading","searchable","prefix","suffix","handleSelectionChange","selection","selectedValues","nextSet","val","handleOptionClick","setTimeout","focus","searchInput","target","filterListBoxField","disallowEmptySelection","allowDuplicateSelectionEvents","field","Object","defineProperty","enumerable","configurable","Item","mergeProps","BaseSection","useFocus","useId"],"sources":["../../../../src/components/fields/FilterListBox/FilterListBox.tsx"],"sourcesContent":["import { ItemElement, Key } from '@react-types/shared';\nimport { modAttrs, Styles } from '@tenphi/tasty';\nimport {\n cloneElement,\n ForwardedRef,\n forwardRef,\n isValidElement,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useFilter, useFocusWithin, useId, useKeyboard } from 'react-aria';\nimport { Section as BaseSection, useListState } from 'react-stately';\n\nimport { useEvent } from '../../../_internal/hooks/use-event';\nimport { useI18n } from '../../../i18n/useI18n';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { mergeProps } from '../../../utils/react/mergeProps';\nimport { pickBaseCustomizationProps } from '../../../utils/react/pickBaseCustomizationProps';\nimport { useCombinedRefs } from '../../../utils/react/useCombinedRefs';\nimport {\n CubeCollectionItemProps,\n CollectionItem as Item,\n} from '../../CollectionItem';\nimport { splitFieldLayout } from '../../form/field-layout';\nimport { useFieldProps } from '../../form/Form/use-field/use-field-props';\nimport { getValidationMods } from '../../form/validation/resolve-validation-props';\nimport { wrapWithField } from '../../form/wrapper';\nimport { CubeListBoxProps, ListBox } from '../ListBox/ListBox';\nimport { getListBoxOptionId } from '../ListBox/optionId';\nimport {\n getEdgeVisibleKey,\n getNextVisibleKey,\n markKeyboardFocus,\n} from '../ListBoxPopover/listNavigation';\n\nimport {\n FilterListBoxWrapperElement,\n SearchInputElement,\n SearchWrapperElement,\n StyledHeaderWithoutBorder,\n} from './styled';\n\nimport type { Collection, Node } from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\n\ntype FilterFn = (textValue: string, inputValue: string) => boolean;\n\nexport interface CubeFilterListBoxProps<T>\n // It sets `isFocusWithin` on its list itself.\n extends\n Omit<CubeListBoxProps<T>, 'filter' | 'isFocusWithin'>,\n FieldBaseProps<\n string | number | readonly (string | number)[] | null | undefined\n > {\n /** Placeholder text for the search input */\n searchPlaceholder?: string;\n /** Whether the search input should have autofocus */\n autoFocus?: boolean;\n /**\n * Custom filter function for determining if an option should be included in search results.\n * Pass `false` to disable internal filtering completely (useful for external filtering).\n */\n filter?: FilterFn | false;\n /** Label shown when the list is empty. When provided, overrides both the \"No results found\" and \"No items\" defaults. It wraps to the list's width, so a long message, or an action in it, stays in view. */\n emptyLabel?: ReactNode;\n /** Custom styles for the search input */\n searchInputStyles?: Styles;\n /** Whether the FilterListBox is in loading state (shows loading icon in search input) */\n isLoading?: boolean;\n /** Whether items are currently loading. Shows a loading icon in the search input suffix. */\n isLoadingItems?: boolean;\n /** Ref for accessing the search input element */\n searchInputRef?: RefObject<HTMLInputElement | null>;\n /** Whether to allow entering custom values that are not present in the predefined options */\n allowsCustomValue?: boolean;\n /** Additional modifiers for styling the FilterListBox */\n mods?: Record<string, boolean>;\n /** Custom styles for the list box */\n listBoxStyles?: Styles;\n\n /**\n * Callback fired when the user presses Escape key while the search input is empty.\n * Can be used by parent components (e.g. FilterPicker) to close an enclosing Dialog.\n */\n onEscape?: () => void;\n\n /**\n * Whether to show checkboxes for multiple selection mode.\n * This adds a checkbox icon to the left of each option.\n */\n isCheckable?: boolean;\n\n /**\n * Callback fired when an option is clicked but not on the checkbox area.\n * Used by FilterPicker to close the popover on non-checkbox clicks.\n */\n onOptionClick?: (key: Key) => void;\n\n /**\n * Props to apply to existing custom values (values that are already selected but not in the predefined options).\n */\n customValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Props to apply to new custom values (values typed in the search input that are about to be added).\n * These are merged with customValueProps for new custom values.\n */\n newCustomValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Controlled search value. When provided, the search input becomes controlled.\n * Use with `onSearchChange` to manage the search state externally.\n */\n searchValue?: string;\n\n /**\n * Callback fired when the search input value changes.\n * Use with `searchValue` for controlled search input.\n */\n onSearchChange?: (value: string) => void;\n\n /**\n * Pre-built collection to use instead of creating a new one.\n * Used internally by FilterPicker to avoid duplicate collection creation.\n * @internal\n */\n _internalCollection?: Collection<Node<any>>;\n}\n\nexport const FilterListBox = forwardRef(function FilterListBox<\n T extends object,\n>(props: CubeFilterListBoxProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n props = useFieldProps(props, {\n valuePropsMapper: ({ value, onChange }) => {\n const fieldProps: any = {};\n\n if (props.selectionMode === 'multiple') {\n fieldProps.selectedKeys = value || [];\n } else {\n fieldProps.selectedKey = value ?? null;\n }\n\n fieldProps.onSelectionChange = (key: any) => {\n if (props.selectionMode === 'multiple') {\n // Handle \"all\" selection and array selections\n if (key === 'all') {\n onChange('all');\n } else {\n onChange(key ? (Array.isArray(key) ? key : [key]) : []);\n }\n } else {\n onChange(Array.isArray(key) ? key[0] : key);\n }\n };\n\n return fieldProps;\n },\n });\n\n const { t } = useI18n();\n\n let {\n qa,\n label,\n extra,\n id,\n labelStyles,\n isRequired,\n necessityIndicator,\n isInvalid,\n isValid,\n isDisabled,\n isLoading,\n isLoadingItems,\n searchPlaceholder = t('filterListBox.searchPlaceholder', 'Search...'),\n autoFocus,\n filter,\n mods: externalMods,\n emptyLabel,\n searchInputStyles,\n listStyles,\n optionStyles,\n sectionStyles,\n headingStyles,\n listGap,\n searchInputRef,\n listRef,\n message,\n description,\n styles,\n focusOnHover,\n shouldFocusWrap,\n labelSuffix,\n selectedKey,\n defaultSelectedKey,\n selectedKeys,\n defaultSelectedKeys,\n onSelectionChange: externalOnSelectionChange,\n allowsCustomValue = false,\n showSelectAll,\n selectAllLabel,\n header,\n footer,\n size = 'medium',\n headerStyles,\n footerStyles,\n listBoxStyles,\n items,\n children: renderChildren,\n onEscape,\n isCheckable,\n onOptionClick,\n selectionMode = 'single',\n allValueProps,\n customValueProps,\n newCustomValueProps,\n searchValue: controlledSearchValue,\n onSearchChange,\n _internalCollection,\n isReorderable = false,\n onReorder,\n onLoadMore,\n hasMore,\n isLoadingMore,\n loadMoreMargin,\n form,\n } = props;\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 (items && typeof renderFn === 'function') {\n try {\n const itemsArray = Array.from(items as Iterable<any>);\n // Execute the render function for each item to obtain <Item/> / <Section/> nodes.\n children = itemsArray.map((item, idx) => {\n const rendered = (renderFn as (it: any) => ReactNode)(item);\n // Ensure every element has a stable key: rely on the user-provided key\n // inside the render function, otherwise fall back to the item itself or\n // the index. This mirrors React Aria examples where the render function\n // is expected to set keys, but we add a fallback for robustness.\n if (\n isValidElement(rendered) &&\n (rendered as ReactElement).key == null\n ) {\n return 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 for some reason, we silently ignore and proceed\n // with the original children value so we don't break runtime.\n }\n }\n\n // Use provided collection from FilterPicker or create our own\n // Hook call order is stable: _internalCollection is consistent per component instance\n const localCollectionState = _internalCollection\n ? { collection: _internalCollection }\n : useListState({\n children: children as any,\n items: items as any,\n selectionMode: 'none' as any,\n });\n\n // Collect original option keys to avoid duplicating them as custom values.\n const originalKeys = useMemo(() => {\n const keys = new Set<string>();\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n keys.add(String(item.key));\n }\n }\n return keys;\n }, [localCollectionState.collection]);\n\n // State to keep track of custom (user-entered) items that were selected.\n const [customKeys, setCustomKeys] = useState<Set<string>>(new Set());\n\n // Controlled/uncontrolled search value pattern\n const [internalSearchValue, setInternalSearchValue] = useState('');\n const isSearchControlled = controlledSearchValue !== undefined;\n const searchValue = isSearchControlled\n ? controlledSearchValue\n : internalSearchValue;\n\n const { contains } = useFilter({ sensitivity: 'base' });\n\n // Initialize custom keys from current selection\n useEffect(() => {\n if (!allowsCustomValue) return;\n\n const currentSelectedKeys = selectedKeys\n ? selectedKeys === 'all'\n ? [] // Skip custom key detection when 'all' is selected\n : Array.from(selectedKeys).map(String)\n : selectedKey != null\n ? [String(selectedKey)]\n : [];\n\n if (currentSelectedKeys.length === 0) return;\n\n const keysToAdd = currentSelectedKeys.filter((k) => !originalKeys.has(k));\n\n // Keys already there leave the state as it is. With `items` and a render\n // function the options, and so this effect, are new on every render, and\n // a new set each time would render again for good.\n if (keysToAdd.length) {\n setCustomKeys((prev) =>\n keysToAdd.every((key) => prev.has(key))\n ? prev\n : new Set([...prev, ...keysToAdd]),\n );\n }\n }, [allowsCustomValue, selectedKeys, selectedKey, originalKeys]);\n\n // Merge original children with any custom items so they persist in the list.\n // If there are selected custom values, they should appear on top with other\n // selected items (which are already sorted by the parent component, e.g. FilterPicker).\n const mergedChildren: ReactNode = useMemo(() => {\n if (!children && customKeys.size === 0) return children;\n\n // Selected custom values are injected by FilterListBox itself, not by the\n // parent. They must respect the search input regardless of the `filter`\n // prop — `filter={false}` only describes the parent's authority over its\n // own items. Filter them with the user-provided filter (if any) or the\n // default `contains`.\n const term = searchValue.trim();\n const localFilter: FilterFn =\n typeof filter === 'function' ? filter : contains;\n\n // Build React elements for custom values (kept stable via their key). A\n // value that has since arrived among the options, in a page loaded on\n // scroll, is listed once, as that option.\n const customArray = Array.from(customKeys)\n .filter((key) => !originalKeys.has(key))\n .filter((key) => !term || localFilter(key, term))\n .map((key) => (\n <Item key={key} textValue={key} {...customValueProps}>\n {key}\n </Item>\n ));\n\n // Identify which custom keys are currently selected so we can promote them.\n const selectedKeysSet = new Set<string>();\n\n if (selectionMode === 'multiple') {\n if (selectedKeys === 'all') {\n // When 'all' is selected, no custom items should be treated as selected\n // since 'all' means all available items, not custom ones\n } else {\n Array.from(selectedKeys ?? []).forEach((k) =>\n selectedKeysSet.add(String(k)),\n );\n }\n } else {\n if (selectedKey != null) selectedKeysSet.add(String(selectedKey));\n }\n\n const selectedCustom: ReactNode[] = [];\n const unselectedCustom: ReactNode[] = [];\n\n customArray.forEach((item: any) => {\n if (selectedKeysSet.has(String(item.key))) {\n selectedCustom.push(item);\n } else {\n unselectedCustom.push(item);\n }\n });\n\n if (!children) {\n // No original items – just return selected custom followed by the rest.\n return [...selectedCustom, ...unselectedCustom];\n }\n\n const originalArray = Array.isArray(children) ? children : [children];\n\n // Final order: selected custom items -> original array (already possibly\n // sorted by parent) -> unselected custom items.\n return [...selectedCustom, ...originalArray, ...unselectedCustom];\n }, [\n children,\n customKeys,\n originalKeys,\n selectionMode,\n selectedKey,\n selectedKeys,\n searchValue,\n filter,\n contains,\n customValueProps,\n ]);\n\n // Determine an aria-label for the internal ListBox to avoid React Aria warnings.\n const innerAriaLabel =\n (props as any)['aria-label'] ||\n (typeof label === 'string' ? label : undefined);\n\n const handleSearchChange = useCallback(\n (value: string) => {\n if (!isSearchControlled) {\n setInternalSearchValue(value);\n }\n onSearchChange?.(value);\n },\n [isSearchControlled, onSearchChange],\n );\n\n // Choose the text filter function: user-provided `filter` prop (if any),\n // or the default `contains` helper from `useFilter`.\n // When `filter={false}`, the parent owns filtering — we normally pass items\n // through unchanged. The exception is when `isLoadingItems` is `true`: a\n // server fetch is in flight and currently visible items are stale, so we\n // fall back to client-side `contains` to hide non-matching stale items\n // until the new items arrive.\n const textFilterFn = useMemo<FilterFn>(() => {\n if (filter === false) {\n return isLoadingItems ? contains : () => true;\n }\n return filter || contains;\n }, [filter, contains, isLoadingItems]);\n\n // Create a filter function for collection nodes (similar to ComboBox pattern)\n const filterFn = useCallback(\n (nodes: Iterable<any>) => {\n // Server-side filtering with no fetch in flight — items are\n // authoritative and shown as-is.\n if (filter === false && !isLoadingItems) return nodes;\n\n const term = searchValue.trim();\n\n if (!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 filteredNodes = [...node.childNodes].filter((child: any) =>\n textFilterFn(child.textValue || '', term),\n );\n\n if (filteredNodes.length === 0) {\n return null;\n }\n\n return {\n ...node,\n childNodes: filteredNodes,\n hasChildNodes: true,\n };\n }\n\n return textFilterFn(node.textValue || '', term) ? node : null;\n })\n .filter(Boolean);\n },\n [filter, searchValue, textFilterFn, isLoadingItems],\n );\n\n // Handle custom values if allowed\n const enhancedChildren = useMemo(() => {\n let childrenToProcess = mergedChildren;\n\n // Handle custom values if allowed\n if (!allowsCustomValue) return childrenToProcess;\n\n const term = searchValue.trim();\n if (!term) return childrenToProcess;\n\n // Helper to determine if the term is already present (exact match on rendered textValue or the key).\n const doesTermExist = (term: string): boolean => {\n // Check if term exists in custom keys\n if (customKeys.has(term)) {\n return true;\n }\n\n // Check if term exists in original collection\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n const textValue = item.textValue || String(item.rendered || '');\n if (term === textValue || String(item.key) === term) {\n return true;\n }\n }\n }\n return false;\n };\n\n if (doesTermExist(term)) {\n return childrenToProcess;\n }\n\n // Check if there are any items that will match the filter.\n // This determines whether we need to visually separate the custom value\n // from real items (i.e. render a divider between sections). When there\n // are no visible items, we skip the section wrapper so no divider is\n // drawn above a lone custom-value option.\n //\n // Selected custom values (from `customKeys`) are filtered by `localFilter`\n // in `mergedChildren` regardless of `filter={false}`, so this check must\n // use the same logic — otherwise we'd report \"items visible\" and draw a\n // divider while the actual collection only contains the custom value.\n const localFilter: FilterFn =\n typeof filter === 'function' ? filter : contains;\n\n const hasVisibleFilteredItems = (() => {\n for (const item of localCollectionState.collection) {\n if (item.type === 'item') {\n const textValue = item.textValue || String(item.rendered || '');\n if (textFilterFn(textValue, term)) {\n return true;\n }\n } else if (item.type === 'section' && item.childNodes) {\n for (const child of item.childNodes) {\n const textValue = child.textValue || String(child.rendered || '');\n if (textFilterFn(textValue, term)) {\n return true;\n }\n }\n }\n }\n\n for (const customKey of customKeys) {\n if (localFilter(customKey, term)) {\n return true;\n }\n }\n\n return false;\n })();\n\n // Create the custom option\n const customOption = (\n <Item\n key={term}\n textValue={term}\n {...mergeProps(customValueProps ?? {}, newCustomValueProps ?? {})}\n >\n {term}\n </Item>\n );\n\n // If there are visible filtered items, add visual separation for custom value\n if (hasVisibleFilteredItems && childrenToProcess) {\n // Check if the collection contains any sections\n // If it does, we can't wrap childrenToProcess in another section (would create nested sections)\n const hasSections = [...localCollectionState.collection].some(\n (item) => item.type === 'section',\n );\n\n const customValueSection = (\n <BaseSection\n key=\"__custom_value__\"\n aria-label={t('filterListBox.customValue', 'Custom value')}\n >\n {customOption}\n </BaseSection>\n );\n\n if (hasSections) {\n // Collection has sections - just append the custom value section without wrapping\n if (Array.isArray(childrenToProcess)) {\n return [...childrenToProcess, customValueSection];\n }\n return [childrenToProcess, customValueSection];\n }\n\n // No sections in collection - wrap items in a section for visual separation\n const filteredItemsSection = (\n <BaseSection\n key=\"__filtered_items__\"\n aria-label={t('filterListBox.filteredItems', 'Filtered items')}\n >\n {childrenToProcess as ItemElement<unknown>[]}\n </BaseSection>\n );\n\n return [filteredItemsSection, customValueSection];\n }\n\n // No visible filtered items, just return the custom option without sections\n if (Array.isArray(childrenToProcess)) {\n return [...childrenToProcess, customOption];\n }\n\n if (childrenToProcess) {\n return [childrenToProcess, customOption];\n }\n\n return customOption;\n }, [\n allowsCustomValue,\n mergedChildren,\n searchValue,\n customKeys,\n localCollectionState.collection,\n customValueProps,\n newCustomValueProps,\n textFilterFn,\n filter,\n contains,\n t,\n ]);\n\n const fieldLayout = splitFieldLayout(props, { fillHeightOnFlex: true });\n\n styles = fieldLayout.styles;\n\n searchInputRef = useCombinedRefs(searchInputRef);\n listRef = useCombinedRefs(listRef);\n\n const { isFocused, focusProps } = useFocus();\n // The search input moves the list's focused option, so the option shows as\n // focused only while focus is in this component.\n const [isFocusWithin, setIsFocusWithin] = useState(false);\n const { focusWithinProps } = useFocusWithin({\n onFocusWithinChange: setIsFocusWithin,\n });\n\n const listBoxRef = useRef<HTMLDivElement>(null);\n // The search input points `aria-controls` and `aria-activedescendant` into\n // the list, so the list needs an id the input knows.\n const listBoxId = useId();\n\n // Ref to access internal ListBox state (selection manager, etc.)\n const listStateRef = useRef<any>(null);\n\n // The option under virtual focus, mirrored in state for the search input's\n // `aria-activedescendant`: the listbox's own state update does not re-render\n // this component. Every focus move below goes through `setVirtualFocus`.\n const [activeOptionKey, setActiveOptionKey] = useState<Key | null>(null);\n const setVirtualFocus = useEvent((key: Key | null) => {\n listStateRef.current?.selectionManager.setFocusedKey(key);\n setActiveOptionKey(key);\n });\n\n // When the search value changes, the visible collection of items may change as well.\n // If the currently focused item is no longer visible, move virtual focus to the first\n // available item so that arrow navigation and Enter behaviour continue to work.\n // If there are no available items, reset the selection so Enter won't select anything.\n // Priority: focus on selected items first, then fall back to first visible item.\n useLayoutEffect(() => {\n const listState = listStateRef.current;\n\n if (!listState) return;\n\n const { selectionManager, collection } = listState;\n\n // Walk the collection and:\n // 1. Collect the enabled keys of the visible items (supports sections).\n // 2. Detect the synthetic \"new custom value\" option — the one generated\n // from the current search term when `allowsCustomValue` is true.\n //\n // The custom value is rendered in one of two layouts depending on whether\n // any real item text-matches the search term (`hasVisibleFilteredItems`\n // in `enhancedChildren`):\n // • Some items match → wrapped in a `__custom_value__` section\n // (`customValueHasMatches = true`)\n // • No items match → appended at the top level with key === term\n // (`customValueHasMatches = false`)\n //\n // The layout itself is the signal we use to decide whether the custom\n // value should be the focus target (no matches) or whether focus should\n // move to a real item (matches present).\n const term = searchValue.trim();\n let newCustomValueKey: Key | null = null;\n let customValueHasMatches = false;\n\n const collectFocusableKeys = (\n nodes: Iterable<any>,\n out: Key[],\n inCustomSection = false,\n ) => {\n for (const node of nodes) {\n if (node.type === 'item') {\n if (!listState.disabledKeys.has(node.key)) out.push(node.key);\n if (inCustomSection) {\n newCustomValueKey = node.key;\n customValueHasMatches = true;\n }\n } else if (node.childNodes) {\n const isCustomSection =\n inCustomSection || node.key === '__custom_value__';\n collectFocusableKeys(node.childNodes, out, isCustomSection);\n }\n }\n };\n\n const visibleKeys: Key[] = [];\n collectFocusableKeys(collection, visibleKeys);\n\n // Detect the appended-at-top-level case (no items text-match). The custom\n // option is added with key === trimmed search term and lives directly in\n // the top-level collection (not nested in any section).\n if (newCustomValueKey == null && allowsCustomValue && term) {\n for (const node of collection) {\n if (node.type === 'item' && String(node.key) === term) {\n newCustomValueKey = node.key;\n customValueHasMatches = false;\n break;\n }\n }\n }\n\n // If there are no visible items, reset the focused key so Enter won't select anything\n if (visibleKeys.length === 0) {\n setVirtualFocus(null);\n return;\n }\n\n // The custom value should be the focus target when it exists and there\n // are no real text-matches — the user's typed value is then the only\n // actionable option. During an in-flight server fetch (`filter === false`\n // + `isLoadingItems`) `textFilterFn` falls back to client-side `contains`\n // so non-matching stale items are hidden, which keeps this signal honest.\n const customValueShouldBeFocused =\n newCustomValueKey != null && !customValueHasMatches;\n\n // Decide whether the current focus is already on the right thing. If yes,\n // don't disturb it. Otherwise fall through and re-pick a focus target.\n const currentFocused = selectionManager.focusedKey;\n if (currentFocused != null && visibleKeys.includes(currentFocused)) {\n const currentIsNewCustomValue =\n newCustomValueKey != null && currentFocused === newCustomValueKey;\n const keepsFocus = customValueShouldBeFocused\n ? currentIsNewCustomValue\n : newCustomValueKey != null\n ? // Custom value exists but isn't the priority (matches available)\n // — any non-custom focus is fine.\n !currentIsNewCustomValue\n : // No custom value involved at all.\n true;\n\n if (keepsFocus) {\n setActiveOptionKey(currentFocused);\n return;\n }\n }\n\n // Helper to find the first selected item that's visible\n const findFirstVisibleSelectedKey = (): Key | null => {\n if (selectionMode === 'single') {\n // Single selection: check if selectedKey is visible\n if (selectedKey != null) {\n const selectedKeyStr = String(selectedKey);\n if (visibleKeys.some((k) => String(k) === selectedKeyStr)) {\n return selectedKey;\n }\n }\n } else if (selectionMode === 'multiple') {\n // Multiple selection: find first selected key that's visible\n if (selectedKeys && selectedKeys !== 'all') {\n for (const key of selectedKeys) {\n const keyStr = String(key);\n if (visibleKeys.some((k) => String(k) === keyStr)) {\n return key;\n }\n }\n }\n }\n return null;\n };\n\n // Determine which key to focus\n let keyToFocus: Key | null = null;\n\n if (customValueShouldBeFocused) {\n // No real matches — promote the custom value over any selected/stale\n // item so the user can press Enter to add the value they just typed.\n keyToFocus = newCustomValueKey;\n } else {\n keyToFocus = findFirstVisibleSelectedKey();\n\n // Fallback to first visible item if no selected item found. Prefer the\n // first real (non-custom-value) item so focus doesn't land on the\n // bottom-of-list custom-value suggestion when real items are available.\n if (keyToFocus == null) {\n const firstRealKey = visibleKeys.find((k) => k !== newCustomValueKey);\n keyToFocus = firstRealKey ?? visibleKeys[0];\n }\n }\n\n // Mark this focus change as keyboard navigation so ListBox will scroll to it\n if (listState.lastFocusSourceRef) {\n listState.lastFocusSourceRef.current = 'keyboard';\n }\n\n // Set focus to the determined key\n setVirtualFocus(keyToFocus);\n }, [\n searchValue,\n enhancedChildren,\n selectionMode,\n selectedKey,\n selectedKeys,\n allowsCustomValue,\n setVirtualFocus,\n ]);\n\n // Keyboard navigation handler for search input\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n // The collection is already filtered by React Stately via filterFn;\n // disabled options are skipped.\n // Wrapping from the last loaded option to the first would skip the\n // options still to load.\n const nextKey = getNextVisibleKey(\n listState,\n e.key === 'ArrowDown' ? 1 : -1,\n { wrap: shouldFocusWrap && !(onLoadMore && hasMore) },\n );\n\n if (nextKey != null) {\n markKeyboardFocus(listState);\n setVirtualFocus(nextKey);\n }\n } else if (\n e.key === 'Home' ||\n e.key === 'End' ||\n e.key === 'PageUp' ||\n e.key === 'PageDown'\n ) {\n e.preventDefault();\n\n const listState = listStateRef.current;\n if (!listState) return;\n\n const targetKey = getEdgeVisibleKey(\n listState,\n e.key === 'Home' || e.key === 'PageUp' ? 'first' : 'last',\n );\n\n if (targetKey == null) return;\n\n markKeyboardFocus(listState);\n setVirtualFocus(targetKey);\n } else if (e.key === 'Enter' || (e.key === ' ' && !searchValue)) {\n const listState = listStateRef.current;\n\n if (!listState) return;\n\n const keyToSelect = listState.selectionManager.focusedKey;\n\n if (keyToSelect != null) {\n e.preventDefault();\n listState.selectionManager.select(keyToSelect, e);\n\n if (\n e.key === 'Enter' &&\n isCheckable &&\n onEscape &&\n selectionMode === 'multiple'\n ) {\n onEscape();\n }\n }\n } else if (e.key === 'Escape') {\n if (searchValue) {\n // Clear the current search if any text is present.\n e.preventDefault();\n handleSearchChange('');\n } else {\n // Notify parent that Escape was pressed on an empty input.\n if (onEscape) {\n e.preventDefault();\n onEscape();\n }\n }\n }\n },\n });\n\n const mods = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: !!isDisabled,\n focused: isFocused,\n loading: !!isLoading,\n 'loading-items': !!isLoadingItems,\n searchable: true,\n prefix: !!isLoading,\n suffix: !!isLoadingItems,\n ...externalMods,\n }),\n [\n isInvalid,\n isInvalid,\n isValid,\n isDisabled,\n isFocused,\n isLoading,\n isLoadingItems,\n externalMods,\n ],\n );\n\n // Handler must be defined before we render ListBox so we can pass it.\n const handleSelectionChange = (selection: any) => {\n if (allowsCustomValue) {\n // Normalize current selection into an array of string keys\n let selectedValues: string[] = [];\n\n if (selection != null) {\n if (Array.isArray(selection)) {\n selectedValues = selection.map(String);\n } else {\n selectedValues = [String(selection)];\n }\n }\n\n // Build next custom keys set based on selected values\n const nextSet = new Set<string>();\n\n selectedValues.forEach((val) => {\n if (!originalKeys.has(val)) {\n nextSet.add(val);\n }\n });\n\n // Update internal custom keys state\n setCustomKeys(nextSet);\n }\n\n if (externalOnSelectionChange) {\n (externalOnSelectionChange as any)(selection);\n }\n };\n\n // Custom option click handler that ensures search input receives focus\n const handleOptionClick = (key: Key) => {\n // Focus the search input to enable keyboard navigation\n // Use setTimeout to ensure this happens after React state updates\n setTimeout(() => {\n if (searchInputRef.current) {\n searchInputRef.current.focus();\n }\n }, 0);\n\n // Call the original onOptionClick if provided\n if (onOptionClick) {\n onOptionClick(key);\n }\n };\n\n const searchInput = (\n <SearchWrapperElement mods={mods} data-size={size}>\n {isLoading && (\n <div data-element=\"Prefix\">\n <div data-element=\"InputIcon\">\n {isLoading ? <LoadingIcon /> : null}\n </div>\n </div>\n )}\n <SearchInputElement\n {...pickBaseCustomizationProps(props)}\n ref={searchInputRef}\n qa={qa || 'FilterListBox'}\n id={id}\n data-prefix={isLoading ? '' : undefined}\n data-suffix={isLoadingItems ? '' : undefined}\n type=\"search\"\n placeholder={searchPlaceholder}\n value={searchValue}\n disabled={isDisabled}\n autoFocus={autoFocus}\n {...(autoFocus ? { 'data-autofocus': '' } : undefined)}\n styles={searchInputStyles}\n data-size={size}\n data-input-type=\"filterlistbox\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-haspopup=\"listbox\"\n aria-controls={listBoxId}\n aria-activedescendant={\n activeOptionKey != null\n ? getListBoxOptionId(listBoxId, activeOptionKey)\n : undefined\n }\n // The search input is the control the label points at, so it also\n // takes the caller's naming and the field's description and message.\n aria-label={(props as any)['aria-label']}\n aria-labelledby={(props as any)['aria-labelledby']}\n aria-describedby={(props as any)['aria-describedby']}\n aria-invalid={isInvalid || undefined}\n onChange={(e) => {\n handleSearchChange(e.target.value);\n }}\n {...keyboardProps}\n {...modAttrs(mods)}\n />\n {isLoadingItems && (\n <div data-element=\"Suffix\">\n <LoadingIcon data-element=\"InputIcon\" />\n </div>\n )}\n </SearchWrapperElement>\n );\n\n const filterListBoxField = (\n <FilterListBoxWrapperElement\n ref={ref}\n qa=\"FilterListBoxWrapper\"\n {...modAttrs(mods)}\n styles={styles}\n {...mergeProps(focusProps, focusWithinProps)}\n >\n {header ? (\n <StyledHeaderWithoutBorder data-size={size} styles={headerStyles}>\n {header}\n </StyledHeaderWithoutBorder>\n ) : (\n <div role=\"presentation\" />\n )}\n {searchInput}\n <ListBox\n isBare\n ref={listBoxRef}\n id={listBoxId}\n aria-label={innerAriaLabel}\n selectedKey={selectedKey}\n defaultSelectedKey={defaultSelectedKey}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n selectionMode={selectionMode}\n isDisabled={isDisabled}\n listRef={listRef}\n stateRef={listStateRef}\n listStyles={listStyles}\n shouldFocusWrap={shouldFocusWrap}\n optionStyles={optionStyles}\n sectionStyles={sectionStyles}\n headingStyles={headingStyles}\n listGap={listGap}\n isInvalid={isInvalid}\n isValid={isValid}\n disallowEmptySelection={props.disallowEmptySelection}\n allowDuplicateSelectionEvents={props.allowDuplicateSelectionEvents}\n disabledKeys={props.disabledKeys}\n focusOnHover={focusOnHover}\n shouldUseVirtualFocus={!(isReorderable && !searchValue.trim())}\n isFocusWithin={isFocusWithin}\n showSelectAll={showSelectAll}\n selectAllLabel={selectAllLabel}\n footer={footer}\n footerStyles={footerStyles}\n mods={mods}\n styles={listBoxStyles}\n isCheckable={isCheckable}\n items={items as any}\n allValueProps={allValueProps}\n filter={filterFn}\n emptyLabel={\n emptyLabel !== undefined\n ? emptyLabel\n : searchValue.trim()\n ? t('filterListBox.noResults', 'No results found')\n : t('filterListBox.noItems', 'No items')\n }\n isReorderable={isReorderable && !searchValue.trim()}\n onReorder={onReorder}\n onLoadMore={onLoadMore}\n hasMore={hasMore}\n isLoadingMore={isLoadingMore}\n loadMoreMargin={loadMoreMargin}\n onSelectionChange={handleSelectionChange}\n onEscape={onEscape}\n onOptionClick={handleOptionClick}\n >\n {enhancedChildren as any}\n </ListBox>\n </FilterListBoxWrapperElement>\n );\n\n return wrapWithField<Omit<CubeFilterListBoxProps<T>, 'children'>>(\n filterListBoxField,\n { ...props, ...fieldLayout.field },\n );\n}) as unknown as (<T>(\n props: CubeFilterListBoxProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement) & { Item: typeof Item; Section: typeof BaseSection };\n\nFilterListBox.Item = Item;\n\nFilterListBox.Section = BaseSection;\n\nObject.defineProperty(FilterListBox, 'cubeInputType', {\n value: 'FilterListBox',\n enumerable: false,\n configurable: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyIA,MAAaiF,gBAAgB3E,WAAW,SAAS2E,cAE/CC,OAAkCC,KAAmC;CACrED,QAAQ/C,cAAc+C,OAAO,EAC3BG,mBAAmB,EAAEN,OAAOO,eAAe;EACzC,MAAMC,aAAkB,CAAC;EAEzB,IAAIL,MAAMM,kBAAkB,Y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T5L;IACV,eAAeiM;IAEdrE,UAAAA;GACM,CAAA;EACkB;;CAG/B,OAAO7J,cACLuO,oBACA;EAAE,GAAG1L;EAAO,GAAG0H,YAAYmE;CAAM,CACnC;AACF,CAAC;AAID9L,cAAchD,OAAOA;AAErBgD,cAAc5D,UAAUC;AAExB0P,OAAOC,eAAehM,eAAe,iBAAiB;CACpDF,OAAO;CACPmM,YAAY;CACZC,cAAc;AAChB,CAAC"}
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-d0fd45d | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-13b59ed | Cube Dev Team */
2
2
  import { StyledHeader } from "../../actions/Menu/styled.js";
3
3
  import { DEFAULT_INPUT_STYLES, INPUT_WRAPPER_STYLES } from "../TextInput/TextInputBase.js";
4
4
  import { mergeStyles, tasty } from "@tenphi/tasty";
@@ -4,28 +4,17 @@ import "../../../shared/index.js";
4
4
  import { ItemAction } from "../../actions/ItemAction/ItemAction.js";
5
5
  import { CubeItemButtonProps } from "../../actions/ItemButton/ItemButton.js";
6
6
  import { CubeItemBaseProps as CubeItemProps } from "../../content/Item/Item.js";
7
- import { CubeTreeNodeData, TreeItemProps, TreeNodeState } from "../../content/Tree/types.js";
7
+ import { CubeTreeNodeData } from "../../content/Tree/types.js";
8
8
  import { FieldLayoutStyleProps } from "../../form/field-layout.js";
9
9
  import { ListBox } from "../ListBox/ListBox.js";
10
10
  import { CubeFilterListBoxProps } from "../FilterListBox/FilterListBox.js";
11
11
  import { ContainerStyleProps, Styles } from "@tenphi/tasty";
12
12
  import { ForwardedRef, ReactElement, ReactNode, RefObject } from "react";
13
- import { Key as Key$1, Placement } from "react-aria";
13
+ import { Placement } from "react-aria";
14
14
  import { ListState, Section } from "react-stately";
15
15
  import { CollectionChildren } from "@react-types/shared";
16
16
  //#region src/components/fields/FilterPicker/FilterPicker.d.ts
17
- /**
18
- * A tree row's `Item` props in FilterPicker (`treeItemProps`): `Tree`'s
19
- * `TreeItemProps` with no actions, since nothing in a row can take focus. The
20
- * keys are `never`, so a returned object, or a helper typed as
21
- * `TreeItemProps`, can't carry them either.
22
- */
23
- export type CubeFilterPickerTreeItemProps = Omit<TreeItemProps, 'actions' | 'autoHideActions' | 'preserveActionsSpace'> & {
24
- actions?: never;
25
- autoHideActions?: never;
26
- preserveActionsSpace?: never;
27
- };
28
- export interface CubeFilterPickerProps<T> extends Omit<CubeFilterListBoxProps<T>, 'size' | 'shape' | 'children' | 'filter'>, Omit<CubeItemProps, 'children' | 'size' | 'tooltip' | 'element' | keyof ContainerStyleProps>, FieldLayoutStyleProps, FieldBaseProps<string | number | readonly (string | number)[] | null | undefined>, Pick<CubeItemButtonProps, 'type' | 'theme' | 'icon' | 'rightIcon' | 'prefix' | 'suffix' | 'hotkeys' | 'shape'> {
17
+ export interface CubeFilterPickerProps<T> extends Omit<CubeFilterListBoxProps<T>, 'size' | 'shape' | 'children'>, Omit<CubeItemProps, 'children' | 'size' | 'tooltip' | 'element' | keyof ContainerStyleProps>, FieldLayoutStyleProps, FieldBaseProps<string | number | readonly (string | number)[] | null | undefined>, Pick<CubeItemButtonProps, 'type' | 'theme' | 'icon' | 'rightIcon' | 'prefix' | 'suffix' | 'hotkeys' | 'shape'> {
29
18
  /** The options, or a render function over `items`. Required unless `treeData` is set. */
30
19
  children?: CollectionChildren<T>;
31
20
  /** Accessible name for the picker trigger when there is no visible label. */
@@ -38,21 +27,8 @@ export interface CubeFilterPickerProps<T> extends Omit<CubeFilterListBoxProps<T>
38
27
  * Whether the search input takes focus when the popover opens. By default it
39
28
  * does, except when a touch or pen opened the popover: on a phone, a focused input
40
29
  * raises the on-screen keyboard. `true` always focuses it, `false` never.
41
- * In tree mode the same holds for a press on a row: it moves focus to the
42
- * search only when the search opened focused or had focus.
43
30
  */
44
31
  autoFocus?: boolean;
45
- /**
46
- * The option highlighted each time the popover opens, instead of the first
47
- * selected option: for example an action row at the top of the list, so
48
- * that Enter runs it rather than unchecking a selected option. The list also
49
- * returns to it whenever the highlighted option leaves the list (a search
50
- * hides it, or it is removed or disabled). While it is hidden, disabled or
51
- * missing, the list highlights the first selected option, else the first
52
- * option. Highlighting never selects or runs it.
53
- * List mode only: it has no effect with `treeData`.
54
- */
55
- defaultFocusedKey?: Key$1;
56
32
  /** Size of the picker component */
57
33
  size?: 'small' | 'medium' | 'large';
58
34
  /** Custom styles for the list box popover */
@@ -151,50 +127,27 @@ export interface CubeFilterPickerProps<T> extends Omit<CubeFilterListBoxProps<T>
151
127
  /** Callback called when the popover open state changes */
152
128
  onOpenChange?: (isOpen: boolean) => void;
153
129
  /**
154
- * Tree-shaped options. When set, the popover shows a `Tree` in place of
155
- * the list, and `items` and `children` are not used.
130
+ * Tree-shaped options. When set, the popover shows a checkable `Tree` in
131
+ * place of the list, and `items` and `children` are not used.
156
132
  *
157
- * Tree mode is multiple selection with checkboxes unless
158
- * `selectionMode="single"` is passed. The value (`selectedKeys`) is every
159
- * fully checked key, parents included: checking a parent checks its
133
+ * Tree mode is always multiple selection. The value (`selectedKeys`) is
134
+ * every fully checked key, parents included: checking a parent checks its
160
135
  * children, and a parent with only some children checked is half-checked.
161
136
  * The cascade runs over the whole tree, so a search never unchecks the
162
- * nodes it hides. A press on a row toggles its checkbox. The default
163
- * summary lists the topmost checked nodes.
164
- *
165
- * With `selectionMode="single"` the tree has no checkboxes, and the value
166
- * (`selectedKey`) is one leaf. A press or Enter on a leaf picks it and
167
- * closes the popover; on a parent it opens or closes the parent. Opening
168
- * the popover opens the picked leaf's ancestors. The default summary is
169
- * the leaf's text.
137
+ * nodes it hides. A press on a row toggles its checkbox. Disable a node
138
+ * with its own `isDisabled`, not `disabledKeys`.
170
139
  *
171
- * Disable a node with its own `isDisabled`, not `disabledKeys`. The search
172
- * keeps a node that matches with its whole subtree, and the ancestors of
173
- * deeper matches with only their matching branches, opened.
140
+ * The search keeps a node that matches with its whole subtree, and the
141
+ * ancestors of deeper matches with only their matching branches, opened.
142
+ * The default summary lists the topmost checked nodes.
174
143
  */
175
144
  treeData?: CubeTreeNodeData[];
176
- /**
177
- * Whether an option, or a tree node, matches the search. `false` turns the
178
- * search's own filtering off, for filtering outside. In tree mode the third
179
- * argument is the node, so a match can read its `key` or other data, such
180
- * as a file's path, and not only its text.
181
- */
182
- filter?: ((textValue: string, inputValue: string, node?: CubeTreeNodeData) => boolean) | false;
183
145
  /** Expanded nodes in tree mode (controlled). A search expands on its own and restores these when cleared. */
184
146
  expandedKeys?: string[];
185
147
  /** Initially expanded nodes in tree mode (uncontrolled). */
186
148
  defaultExpandedKeys?: string[];
187
149
  /** Called when the user expands or collapses a node in tree mode, outside a search. */
188
150
  onExpand?: (expandedKeys: string[]) => void;
189
- /**
190
- * Tree mode only: `Item` props for each row, as `Tree`'s `itemProps`
191
- * takes them, such as a `prefix` icon or `suffix` marks. A function gets
192
- * the node and its state. Rows hold nothing focusable, since the search
193
- * keeps focus, so `actions`, `autoHideActions` and `preserveActionsSpace`
194
- * are ruled out. A screen reader names the active row by its title: marks
195
- * are visual.
196
- */
197
- treeItemProps?: CubeFilterPickerTreeItemProps | ((node: CubeTreeNodeData, state: TreeNodeState) => CubeFilterPickerTreeItemProps);
198
151
  }
199
152
  export declare const FilterPicker: (<T>(props: CubeFilterPickerProps<T> & {
200
153
  ref?: ForwardedRef<HTMLElement>;
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-d0fd45d | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-13b59ed | Cube Dev Team */
2
2
  import { mergeStyleLayers } from "../../../utils/styles.js";
3
3
  import { Text as _Text } from "../../content/Text.js";
4
4
  import { useEvent } from "../../../_internal/hooks/use-event.js";
@@ -11,7 +11,7 @@ import { ItemActionIcon } from "../../actions/ItemActionsWrapper.js";
11
11
  import { ItemButton as _ItemButton } from "../../actions/ItemButton/ItemButton.js";
12
12
  import { Dialog } from "../../overlays/Dialog/Dialog.js";
13
13
  import { filterComponentBaseProps } from "../../../utils/react/componentBaseProps.js";
14
- import { buildTreeIndex, getTreeAncestorKeys, getTreeNodeText } from "../../content/Tree/tree-index.js";
14
+ import { buildTreeIndex, getTreeNodeText } from "../../content/Tree/tree-index.js";
15
15
  import { DirectionIcon } from "../../../icons/DirectionIcon.js";
16
16
  import { allowOverlayKeysToPropagate } from "../../../utils/react/overlayKeyPropagation.js";
17
17
  import { getValidationTheme } from "../../form/validation/resolve-validation-props.js";
@@ -27,7 +27,6 @@ import { DialogTrigger } from "../../overlays/Dialog/DialogTrigger.js";
27
27
  import { isTextOnly } from "../../../utils/react/isTextOnly.js";
28
28
  import { processSelectionArray } from "../../../utils/selection.js";
29
29
  import { FilterListBox } from "../FilterListBox/FilterListBox.js";
30
- import { PICKER_POPOVER_WIDTH } from "../popover-width.js";
31
30
  import { FilterTree } from "./FilterTree.js";
32
31
  import { tasty } from "@tenphi/tasty";
33
32
  import { forwardRef, useEffect, useMemo, useRef, useState } from "react";
@@ -63,7 +62,7 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
63
62
  const { t } = useI18n();
64
63
  const props = useFieldProps(inputProps, { valuePropsMapper: ({ value, onChange }) => {
65
64
  const fieldProps = {};
66
- const isMultiple = inputProps.selectionMode === "multiple" || !!inputProps.treeData && inputProps.selectionMode !== "single";
65
+ const isMultiple = inputProps.selectionMode === "multiple" || !!inputProps.treeData;
67
66
  if (isMultiple) fieldProps.selectedKeys = value || [];
68
67
  else fieldProps.selectedKey = value ?? null;
69
68
  fieldProps.onSelectionChange = (key) => {
@@ -74,8 +73,8 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
74
73
  };
75
74
  return fieldProps;
76
75
  } });
77
- let { qa, label, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, extra, id, icon, rightIcon, prefix, suffix, actions, hotkeys, tooltip, triggerTooltip, triggerDescription, labelStyles, isRequired, necessityIndicator, isInvalid, isValid, isDisabled, isLoading, message, mods: externalMods, description, descriptionPlacement, placeholder, size = "medium", styles, listBoxStyles, popoverStyles, type = "outline", theme = "default", shape, labelSuffix, shouldFocusWrap, children, shouldFlip = true, placement = "bottom start", targetRef, containerPadding = 8, selectedKey, defaultSelectedKey, selectedKeys, defaultSelectedKeys, disabledKeys, onSelectionChange, selectionMode = "single", listStateRef, focusOnHover, showSelectAll, selectAllLabel = t("picker.all", "All"), items, header, footer, headerStyles, footerStyles, triggerStyles, allowsCustomValue, renderSummary, isCheckable, allValueProps, customValueProps, newCustomValueProps, searchPlaceholder, autoFocus, defaultFocusedKey, filter, emptyLabel, searchInputStyles, searchInputProps, searchInputRef, listStyles, optionStyles, sectionStyles, headingStyles, listGap, listRef, disallowEmptySelection, shouldUseVirtualFocus, onEscape, onOptionClick, isClearable, clearLabel, isLoadingItems, searchValue, onSearchChange, sortSelectedToTop: sortSelectedToTopProp, onOpenChange, isReorderable, onReorder, onLoadMore, hasMore, isLoadingMore, loadMoreMargin, form, treeData, expandedKeys, defaultExpandedKeys, onExpand, treeItemProps, ...otherProps } = props;
78
- if (treeData && inputProps.selectionMode !== "single") selectionMode = "multiple";
76
+ let { qa, label, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, extra, id, icon, rightIcon, prefix, suffix, actions, hotkeys, tooltip, triggerTooltip, triggerDescription, labelStyles, isRequired, necessityIndicator, isInvalid, isValid, isDisabled, isLoading, message, mods: externalMods, description, descriptionPlacement, placeholder, size = "medium", styles, listBoxStyles, popoverStyles, type = "outline", theme = "default", shape, labelSuffix, shouldFocusWrap, children, shouldFlip = true, placement = "bottom start", targetRef, containerPadding = 8, selectedKey, defaultSelectedKey, selectedKeys, defaultSelectedKeys, disabledKeys, onSelectionChange, selectionMode = "single", listStateRef, focusOnHover, showSelectAll, selectAllLabel = t("picker.all", "All"), items, header, footer, headerStyles, footerStyles, triggerStyles, allowsCustomValue, renderSummary, isCheckable, allValueProps, customValueProps, newCustomValueProps, searchPlaceholder, autoFocus, filter, emptyLabel, searchInputStyles, searchInputRef, listStyles, optionStyles, sectionStyles, headingStyles, listGap, listRef, disallowEmptySelection, shouldUseVirtualFocus, onEscape, onOptionClick, isClearable, clearLabel, isLoadingItems, searchValue, onSearchChange, sortSelectedToTop: sortSelectedToTopProp, onOpenChange, isReorderable, onReorder, onLoadMore, hasMore, isLoadingMore, loadMoreMargin, form, treeData, expandedKeys, defaultExpandedKeys, onExpand, ...otherProps } = props;
77
+ if (treeData) selectionMode = "multiple";
79
78
  const sortSelectedToTopExplicit = sortSelectedToTopProp !== void 0;
80
79
  const sortSelectedToTop = sortSelectedToTopProp ?? (items ? true : false);
81
80
  const fieldLayout = splitFieldLayout(props);
@@ -153,11 +152,10 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
153
152
  ]);
154
153
  const treeIndex = useMemo(() => treeData ? buildTreeIndex(treeData) : null, [treeData]);
155
154
  const treeCheckedKeys = useMemo(() => effectiveSelectedKeys === "all" ? [...treeIndex?.byKey.keys() ?? []] : (effectiveSelectedKeys ?? []).map(String), [effectiveSelectedKeys, treeIndex]);
156
- const treeSelectedKeys = useMemo(() => treeData && treeIndex && selectionMode === "multiple" ? toOrderedKeys(treeIndex, deriveCheckedSets(treeData, treeIndex, treeCheckedKeys).checked) : null, [
155
+ const treeSelectedKeys = useMemo(() => treeData && treeIndex ? toOrderedKeys(treeIndex, deriveCheckedSets(treeData, treeIndex, treeCheckedKeys).checked) : null, [
157
156
  treeData,
158
157
  treeIndex,
159
- treeCheckedKeys,
160
- selectionMode
158
+ treeCheckedKeys
161
159
  ]);
162
160
  const [internalExpandedKeys, setInternalExpandedKeys] = useState(defaultExpandedKeys ?? []);
163
161
  const handleExpand = (keys) => {
@@ -166,11 +164,6 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
166
164
  };
167
165
  const selectedLabels = useMemo(() => {
168
166
  if (treeIndex && treeSelectedKeys) return getTreeSummaryLabels(treeIndex, new Set(treeSelectedKeys));
169
- if (treeIndex && selectionMode === "single") {
170
- if (effectiveSelectedKey == null) return [];
171
- const node_0 = treeIndex.byKey.get(String(effectiveSelectedKey));
172
- return [node_0 ? getTreeNodeText(node_0) : String(effectiveSelectedKey)];
173
- }
174
167
  if (selectionMode === "multiple" && effectiveSelectedKeys === "all") return Array.from(labelMap.values());
175
168
  return (selectionMode === "multiple" && effectiveSelectedKeys !== "all" ? (effectiveSelectedKeys || []).map(String) : effectiveSelectedKey != null ? [String(effectiveSelectedKey)] : []).map((k_0) => labelMap.get(k_0) ?? k_0);
176
169
  }, [
@@ -209,11 +202,6 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
209
202
  const handleOpenChange = useEvent((isOpen) => {
210
203
  if (isOpen === isPopoverOpen) return;
211
204
  if (isOpen) triggerWidthRef.current = triggerRef?.current?.UNSAFE_getDOMNode()?.offsetWidth;
212
- if (isOpen && treeIndex && selectionMode === "single" && effectiveSelectedKey != null) {
213
- const expanded = expandedKeys ?? internalExpandedKeys;
214
- const closed = getTreeAncestorKeys(treeIndex, String(effectiveSelectedKey)).filter((key_0) => !expanded.includes(key_0));
215
- if (closed.length) handleExpand([...expanded, ...closed]);
216
- }
217
205
  setIsPopoverOpen(isOpen);
218
206
  if (!isOpen) {
219
207
  setOpenPointerType(null);
@@ -248,8 +236,8 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
248
236
  if (!sortSelectedToTop) return items;
249
237
  if (!isPopoverOpen) return items;
250
238
  const selectedSet = /* @__PURE__ */ new Set();
251
- const addSelected = (key_1) => {
252
- if (key_1 != null) selectedSet.add(String(key_1));
239
+ const addSelected = (key_0) => {
240
+ if (key_0 != null) selectedSet.add(String(key_0));
253
241
  };
254
242
  if (selectionMode === "multiple") {
255
243
  if (selectionsWhenClosed.current.multiple === "all") return items;
@@ -274,8 +262,8 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
274
262
  children: sortedChildren
275
263
  });
276
264
  } else {
277
- const key_2 = getItemKey(obj_0);
278
- if (key_2 && selectedSet.has(key_2)) selectedArr.push(obj_0);
265
+ const key_1 = getItemKey(obj_0);
266
+ if (key_1 && selectedSet.has(key_1)) selectedArr.push(obj_0);
279
267
  else unselectedArr.push(obj_0);
280
268
  }
281
269
  });
@@ -396,14 +384,11 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
396
384
  onSelectionChange?.(selection);
397
385
  if (selectionMode === "single") handleOpenChange(false);
398
386
  });
399
- const handleTreeSelect = (key_3) => {
400
- handleSelectionChange(effectiveSelectedKey != null && String(effectiveSelectedKey) === key_3 && !disallowEmptySelection ? null : key_3);
401
- };
402
387
  const handleEscape = useEvent(() => {
403
388
  handleOpenChange(false);
404
389
  });
405
- const handleOptionClick = useEvent((key_4) => {
406
- if (selectionMode === "multiple" && isCheckable || key_4 === "__ALL__") handleOpenChange(false);
390
+ const handleOptionClick = useEvent((key_2) => {
391
+ if (selectionMode === "multiple" && isCheckable || key_2 === "__ALL__") handleOpenChange(false);
407
392
  });
408
393
  const filterPickerField = /* @__PURE__ */ jsx(FilterPickerWrapper, {
409
394
  ref,
@@ -425,7 +410,7 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
425
410
  display: "grid",
426
411
  styles: mergeStyleLayers({
427
412
  gridRows: "1sf",
428
- width: PICKER_POPOVER_WIDTH,
413
+ width: "max($overlay-min-width, 30x) max-content 50vw",
429
414
  "$overlay-min-width": "30x"
430
415
  }, popoverStyles),
431
416
  tokens: triggerWidthRef.current ? { "$overlay-min-width": `${triggerWidthRef.current}px` } : void 0,
@@ -434,16 +419,12 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
434
419
  children: treeData ? /* @__PURE__ */ jsx(FilterTree, {
435
420
  autoFocus: shouldFocusSearch,
436
421
  treeData,
437
- selectionMode,
438
422
  checkedKeys: treeCheckedKeys,
439
- selectedKey: effectiveSelectedKey == null ? null : String(effectiveSelectedKey),
440
- onSelect: handleTreeSelect,
441
423
  expandedKeys: expandedKeys ?? internalExpandedKeys,
442
424
  "aria-label": pickerAriaLabel,
443
425
  searchPlaceholder,
444
426
  searchValue,
445
427
  searchInputStyles,
446
- searchInputProps,
447
428
  searchInputRef,
448
429
  filter,
449
430
  emptyLabel,
@@ -455,7 +436,6 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
455
436
  isDisabled,
456
437
  isLoadingItems,
457
438
  shouldFocusWrap,
458
- itemProps: treeItemProps,
459
439
  onExpand: handleExpand,
460
440
  onSearchChange,
461
441
  onCheckedKeysChange: handleSelectionChange,
@@ -464,7 +444,6 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
464
444
  }) : /* @__PURE__ */ jsx(FilterListBox, {
465
445
  isBare: true,
466
446
  autoFocus: shouldFocusSearch,
467
- defaultFocusedKey,
468
447
  items: items ? finalItems : void 0,
469
448
  "aria-label": pickerAriaLabel,
470
449
  _internalCollection: localCollectionState.collection,
@@ -483,7 +462,6 @@ const FilterPicker = forwardRef(function FilterPicker(inputProps, ref) {
483
462
  allowDuplicateSelectionEvents: selectionMode === "single" && !!disallowEmptySelection,
484
463
  emptyLabel,
485
464
  searchInputStyles,
486
- searchInputProps,
487
465
  searchInputRef,
488
466
  disabledKeys,
489
467
  focusOnHover,