@cube-dev/ui-kit 0.0.0-canary-c325dcb → 0.0.0-canary-162cdb3

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 (638) hide show
  1. package/dist/CHANGELOG.md +8 -0
  2. package/dist/_internal/hooks/use-debounced-value.js +1 -1
  3. package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
  4. package/dist/_internal/hooks/use-event.js +1 -1
  5. package/dist/_internal/hooks/use-is-first-render.js +1 -1
  6. package/dist/_internal/hooks/use-sync-ref.js +1 -1
  7. package/dist/_internal/hooks/use-timer/timer.js +1 -1
  8. package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
  9. package/dist/_internal/hooks/use-warn.js +1 -1
  10. package/dist/components/Block.js +1 -1
  11. package/dist/components/CollectionItem.js +1 -1
  12. package/dist/components/GlobalStyles.js +1 -1
  13. package/dist/components/GridProvider.js +1 -1
  14. package/dist/components/HiddenInput.js +1 -1
  15. package/dist/components/Root.js +1 -1
  16. package/dist/components/actions/Action/Action.js +1 -1
  17. package/dist/components/actions/Banner/Banner.js +1 -1
  18. package/dist/components/actions/Button/Button.js +1 -1
  19. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  20. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  21. package/dist/components/actions/ButtonSplit/context.js +1 -1
  22. package/dist/components/actions/CommandMenu/CommandMenu.js +201 -201
  23. package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
  24. package/dist/components/actions/CommandMenu/styled.js +1 -1
  25. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  26. package/dist/components/actions/ItemActionContext.js +1 -1
  27. package/dist/components/actions/ItemActionsWrapper.js +1 -1
  28. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  29. package/dist/components/actions/Link/Link.js +1 -1
  30. package/dist/components/actions/Menu/Menu.js +1 -1
  31. package/dist/components/actions/Menu/MenuItem.js +1 -1
  32. package/dist/components/actions/Menu/MenuSection.js +1 -1
  33. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  34. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  35. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  36. package/dist/components/actions/Menu/context.js +1 -1
  37. package/dist/components/actions/Menu/styled.js +1 -1
  38. package/dist/components/actions/actions-run.js +1 -1
  39. package/dist/components/actions/index.js +1 -1
  40. package/dist/components/actions/use-action.js +1 -1
  41. package/dist/components/actions/use-anchored-menu.js +1 -1
  42. package/dist/components/actions/use-context-menu.js +1 -1
  43. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  44. package/dist/components/content/Alert/Alert.js +1 -1
  45. package/dist/components/content/Alert/use-alert.js +1 -1
  46. package/dist/components/content/Avatar/Avatar.js +1 -1
  47. package/dist/components/content/Badge/Badge.js +1 -1
  48. package/dist/components/content/Card/Card.js +1 -1
  49. package/dist/components/content/Content.js +1 -1
  50. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  51. package/dist/components/content/CopySnippet/CopySnippet.d.ts +6 -6
  52. package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
  53. package/dist/components/content/Disclosure/Disclosure.js +1 -1
  54. package/dist/components/content/Divider.js +1 -1
  55. package/dist/components/content/Footer.js +1 -1
  56. package/dist/components/content/Header.js +1 -1
  57. package/dist/components/content/HotKeys/HotKeys.js +1 -1
  58. package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
  59. package/dist/components/content/InlineInput/InlineInput.js +1 -1
  60. package/dist/components/content/Item/Item.js +1 -1
  61. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  62. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  63. package/dist/components/content/Layout/GridLayout.js +1 -1
  64. package/dist/components/content/Layout/Layout.js +1 -1
  65. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  66. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  67. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  68. package/dist/components/content/Layout/LayoutContent.js +1 -1
  69. package/dist/components/content/Layout/LayoutContext.js +1 -1
  70. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  71. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  72. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  73. package/dist/components/content/Layout/LayoutHeader.js +1 -1
  74. package/dist/components/content/Layout/LayoutPane.js +1 -1
  75. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  76. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  77. package/dist/components/content/Layout/LayoutPanelTransition.js +1 -1
  78. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  79. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  80. package/dist/components/content/Layout/index.js +1 -1
  81. package/dist/components/content/Layout/utils.js +1 -1
  82. package/dist/components/content/Paragraph.js +1 -1
  83. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  84. package/dist/components/content/PrismCode/PrismCode.js +1 -1
  85. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  86. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  87. package/dist/components/content/Result/Result.js +1 -1
  88. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  89. package/dist/components/content/Tag/Tag.js +1 -1
  90. package/dist/components/content/Text.js +1 -1
  91. package/dist/components/content/TextItem/TextItem.js +1 -1
  92. package/dist/components/content/Title.js +1 -1
  93. package/dist/components/content/Tree/Tree.js +1 -1
  94. package/dist/components/content/Tree/TreeNode.js +1 -1
  95. package/dist/components/content/Tree/styled.js +1 -1
  96. package/dist/components/content/Tree/tree-index.js +1 -1
  97. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  98. package/dist/components/content/Tree/use-load-data.js +1 -1
  99. package/dist/components/content/highlightText.js +1 -1
  100. package/dist/components/content/use-auto-tooltip.js +1 -1
  101. package/dist/components/data/DataTable/DataTable.js +1 -1
  102. package/dist/components/data/ItemTable/ItemTable.js +1 -1
  103. package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
  104. package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
  105. package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
  106. package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
  107. package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
  108. package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
  109. package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
  110. package/dist/components/data/ItemTable/use-item-table-selection.js +1 -1
  111. package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
  112. package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
  113. package/dist/components/data/TableBase/ColumnResizer.js +3 -3
  114. package/dist/components/data/TableBase/ColumnResizer.js.map +1 -1
  115. package/dist/components/data/TableBase/RowCollection.js +1 -1
  116. package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
  117. package/dist/components/data/TableBase/TableRow.js +1 -1
  118. package/dist/components/data/TableBase/TableView.js +1 -1
  119. package/dist/components/data/TableBase/TreeGridTable.js +1 -1
  120. package/dist/components/data/TableBase/column-header.js +1 -1
  121. package/dist/components/data/TableBase/column-menu.js +1 -1
  122. package/dist/components/data/TableBase/column-styles.js +1 -1
  123. package/dist/components/data/TableBase/column-tint.js +1 -1
  124. package/dist/components/data/TableBase/row-menu.js +1 -1
  125. package/dist/components/data/TableBase/styled.js +1 -1
  126. package/dist/components/data/TableBase/table-tree.js +1 -1
  127. package/dist/components/data/TableBase/types.js +1 -1
  128. package/dist/components/data/TableBase/use-cell-selection.js +0 -0
  129. package/dist/components/data/TableBase/use-column-menu.js +1 -1
  130. package/dist/components/data/TableBase/use-column-order.js +1 -1
  131. package/dist/components/data/TableBase/use-container-width.js +1 -1
  132. package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
  133. package/dist/components/data/TableBase/use-scrollability.js +1 -1
  134. package/dist/components/data/TableBase/use-table-columns.js +154 -166
  135. package/dist/components/data/TableBase/use-table-columns.js.map +1 -1
  136. package/dist/components/data/TableBase/use-table-search.js +1 -1
  137. package/dist/components/data/TableBase/use-table-selection.js +1 -1
  138. package/dist/components/data/TableBase/use-table-sort.js +1 -1
  139. package/dist/components/data/TableBase/use-table-sorts.js +1 -1
  140. package/dist/components/data/TableBase/use-table-storage.js +1 -1
  141. package/dist/components/data/TableBase/use-table-tooltip-refresh.js +1 -1
  142. package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
  143. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  144. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  145. package/dist/components/fields/Checkbox/context.js +1 -1
  146. package/dist/components/fields/ColorInput/ColorInput.js +1 -1
  147. package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
  148. package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
  149. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
  150. package/dist/components/fields/ComboBox/ComboBox.js +194 -160
  151. package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
  152. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  153. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  154. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  155. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  156. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  157. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  158. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  159. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  160. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  161. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  162. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  163. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  164. package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
  165. package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
  166. package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
  167. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  168. package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
  169. package/dist/components/fields/DatePicker/YearPicker.js +1 -1
  170. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  171. package/dist/components/fields/DatePicker/period.js +1 -1
  172. package/dist/components/fields/DatePicker/props.js +1 -1
  173. package/dist/components/fields/DatePicker/utils.js +1 -1
  174. package/dist/components/fields/FileInput/FileInput.js +1 -1
  175. package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
  176. package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
  177. package/dist/components/fields/Input/Input.js +1 -1
  178. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  179. package/dist/components/fields/ListBox/ListBox.js +15 -8
  180. package/dist/components/fields/ListBox/ListBox.js.map +1 -1
  181. package/dist/components/fields/ListBox/optionId.js +1 -1
  182. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
  183. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  184. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  185. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  186. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  187. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  188. package/dist/components/fields/Picker/Picker.js +1 -1
  189. package/dist/components/fields/RadioGroup/Radio.d.ts +4 -4
  190. package/dist/components/fields/RadioGroup/Radio.js +1 -1
  191. package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
  192. package/dist/components/fields/RadioGroup/context.js +1 -1
  193. package/dist/components/fields/SearchComboBox/SearchComboBox.js +71 -67
  194. package/dist/components/fields/SearchComboBox/SearchComboBox.js.map +1 -1
  195. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  196. package/dist/components/fields/Select/Select.js +1 -1
  197. package/dist/components/fields/Slider/Gradation.js +1 -1
  198. package/dist/components/fields/Slider/HueSlider.js +1 -1
  199. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  200. package/dist/components/fields/Slider/Slider.js +1 -1
  201. package/dist/components/fields/Slider/SliderBase.js +1 -1
  202. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  203. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  204. package/dist/components/fields/Slider/elements.js +1 -1
  205. package/dist/components/fields/Slider/index.js +1 -1
  206. package/dist/components/fields/Switch/Switch.js +1 -1
  207. package/dist/components/fields/TagInput/TagInput.js +1 -1
  208. package/dist/components/fields/TagInput/TagList.js +1 -1
  209. package/dist/components/fields/TagInput/useActiveOption.js +1 -1
  210. package/dist/components/fields/TagInput/useTagError.js +1 -1
  211. package/dist/components/fields/TextArea/TextArea.js +1 -1
  212. package/dist/components/fields/TextInput/TextInput.js +1 -1
  213. package/dist/components/fields/TextInput/TextInputBase.js +1 -1
  214. package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
  215. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  216. package/dist/components/fields/TriggerActions.js +1 -1
  217. package/dist/components/fields/color/ColorPanel.js +1 -1
  218. package/dist/components/fields/color/channels.js +1 -1
  219. package/dist/components/fields/color/color.js +1 -1
  220. package/dist/components/fields/color/context.js +1 -1
  221. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  222. package/dist/components/form/Form/Field.js +1 -1
  223. package/dist/components/form/Form/Form.js +1 -1
  224. package/dist/components/form/Form/ModernFormRoot.js +1 -1
  225. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  226. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  227. package/dist/components/form/Form/SubmitError.js +1 -1
  228. package/dist/components/form/Form/backend.js +1 -1
  229. package/dist/components/form/Form/index.js +1 -1
  230. package/dist/components/form/Form/modern/actions.js +1 -1
  231. package/dist/components/form/Form/modern/context.js +1 -1
  232. package/dist/components/form/Form/modern/controller.js +1 -1
  233. package/dist/components/form/Form/modern/field-binding.js +1 -1
  234. package/dist/components/form/Form/modern/field.js +1 -1
  235. package/dist/components/form/Form/modern/react.js +1 -1
  236. package/dist/components/form/Form/modern/store.js +1 -1
  237. package/dist/components/form/Form/modern/validation.js +1 -1
  238. package/dist/components/form/Form/modern/values.js +1 -1
  239. package/dist/components/form/Form/reset-unbound-controls.js +1 -1
  240. package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
  241. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  242. package/dist/components/form/Form/use-field/use-field.js +1 -1
  243. package/dist/components/form/Form/use-form.js +1 -1
  244. package/dist/components/form/Form/validation.js +1 -1
  245. package/dist/components/form/Label.js +1 -1
  246. package/dist/components/form/legacy-tooltip.js +1 -1
  247. package/dist/components/form/validation/ValidationIndicator.js +1 -1
  248. package/dist/components/form/validation/resolve-validation-props.js +1 -1
  249. package/dist/components/form/validation/use-validation-props.js +1 -1
  250. package/dist/components/form/wrapper.js +1 -1
  251. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  252. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  253. package/dist/components/layout/Flex.js +1 -1
  254. package/dist/components/layout/Flow.js +1 -1
  255. package/dist/components/layout/Grid.js +1 -1
  256. package/dist/components/layout/Panel.js +1 -1
  257. package/dist/components/layout/Prefix.js +1 -1
  258. package/dist/components/layout/ResizablePanel.js +1 -1
  259. package/dist/components/layout/Space.js +1 -1
  260. package/dist/components/layout/Suffix.js +1 -1
  261. package/dist/components/navigation/Pagination/Pagination.js +1 -1
  262. package/dist/components/navigation/Pagination/use-pagination.js +1 -1
  263. package/dist/components/navigation/Tabs/BoardDragActiveProvider.d.ts +36 -0
  264. package/dist/components/navigation/Tabs/BoardDragActiveProvider.js +57 -0
  265. package/dist/components/navigation/Tabs/BoardDragActiveProvider.js.map +1 -0
  266. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  267. package/dist/components/navigation/Tabs/TabButton.js +2 -2
  268. package/dist/components/navigation/Tabs/TabButton.js.map +1 -1
  269. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  270. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  271. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  272. package/dist/components/navigation/Tabs/Tabs.js +2 -2
  273. package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
  274. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  275. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  276. package/dist/components/navigation/Tabs/index.d.ts +2 -1
  277. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  278. package/dist/components/navigation/Tabs/styled.js +1 -1
  279. package/dist/components/navigation/Tabs/types.js +1 -1
  280. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  281. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  282. package/dist/components/navigation/index.d.ts +1 -0
  283. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  284. package/dist/components/other/Calendar/Calendar.js +1 -1
  285. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  286. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  287. package/dist/components/other/Calendar/CalendarHeader.js +1 -1
  288. package/dist/components/other/Calendar/CalendarPanel.js +1 -1
  289. package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
  290. package/dist/components/other/Calendar/PeriodGrid.js +1 -1
  291. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  292. package/dist/components/other/Calendar/styled.js +1 -1
  293. package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
  294. package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
  295. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  296. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  297. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  298. package/dist/components/overlays/Dialog/Dialog.js +1 -1
  299. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  300. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  301. package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
  302. package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
  303. package/dist/components/overlays/Dialog/context.js +1 -1
  304. package/dist/components/overlays/Dialog/default-button-text.js +1 -1
  305. package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
  306. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  307. package/dist/components/overlays/Modal/Modal.js +1 -1
  308. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  309. package/dist/components/overlays/Modal/Overlay.js +1 -1
  310. package/dist/components/overlays/Modal/Popover.js +1 -1
  311. package/dist/components/overlays/Modal/Tray.js +1 -1
  312. package/dist/components/overlays/Modal/Underlay.js +1 -1
  313. package/dist/components/overlays/Notifications/Notification.js +1 -1
  314. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  315. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  316. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  317. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  318. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  319. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  320. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  321. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  322. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  323. package/dist/components/overlays/Notifications/index.js +1 -1
  324. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  325. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  326. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  327. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  328. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  329. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  330. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  331. package/dist/components/overlays/Toast/index.js +1 -1
  332. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  333. package/dist/components/overlays/Toast/useToast.js +1 -1
  334. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  335. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  336. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  337. package/dist/components/overlays/Tooltip/context.js +1 -1
  338. package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
  339. package/dist/components/portal/Portal.js +1 -1
  340. package/dist/components/portal/PortalProvider.js +1 -1
  341. package/dist/components/portal/usePortal.js +1 -1
  342. package/dist/components/shared/DraggableCollection.js +1 -1
  343. package/dist/components/shared/InvalidIcon.js +1 -1
  344. package/dist/components/shared/ValidIcon.js +1 -1
  345. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  346. package/dist/components/status/Spin/Cube.js +1 -1
  347. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  348. package/dist/components/status/Spin/Spin.js +1 -1
  349. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  350. package/dist/data/item-themes.js +1 -1
  351. package/dist/data/themes.js +1 -1
  352. package/dist/eslint-plugin/defaults.generated.js +1 -83
  353. package/dist/eslint-plugin/defaults.generated.js.map +1 -1
  354. package/dist/eslint-plugin/index.js +1 -1
  355. package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
  356. package/dist/i18n/I18nProvider.js +1 -1
  357. package/dist/i18n/createFormatter.js +1 -1
  358. package/dist/i18n/index.js +1 -1
  359. package/dist/i18n/instance.js +1 -1
  360. package/dist/i18n/locales/de-DE/uikit.js +1 -9
  361. package/dist/i18n/locales/en-US/uikit.js +1 -9
  362. package/dist/i18n/locales/en-US/uikit.json.d.ts +1 -9
  363. package/dist/i18n/locales/es-ES/uikit.js +1 -9
  364. package/dist/i18n/locales/es-MX/uikit.js +1 -9
  365. package/dist/i18n/locales/fr-FR/uikit.js +1 -9
  366. package/dist/i18n/locales/it-IT/uikit.js +1 -9
  367. package/dist/i18n/locales/ja-JP/uikit.js +1 -9
  368. package/dist/i18n/locales/nb-NO/uikit.js +1 -9
  369. package/dist/i18n/locales/pt-BR/uikit.js +1 -9
  370. package/dist/i18n/locales/pt-PT/uikit.js +1 -9
  371. package/dist/i18n/locales/sv-SE/uikit.js +1 -9
  372. package/dist/i18n/locales/vi-VN/uikit.js +1 -9
  373. package/dist/i18n/locales.js +1 -1
  374. package/dist/i18n/useFormatter.js +1 -1
  375. package/dist/i18n/useI18n.js +1 -1
  376. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  377. package/dist/icons/AdjustmentsIcon.js +1 -1
  378. package/dist/icons/AiIcon.js +1 -1
  379. package/dist/icons/AreaChartIcon.js +1 -1
  380. package/dist/icons/ArrowNarrowDownIcon.js +1 -1
  381. package/dist/icons/ArrowNarrowUpIcon.js +1 -1
  382. package/dist/icons/BackwardIcon.js +1 -1
  383. package/dist/icons/BarChartIcon.js +1 -1
  384. package/dist/icons/BellFilledIcon.js +1 -1
  385. package/dist/icons/BellIcon.js +1 -1
  386. package/dist/icons/BooleanIcon.js +1 -1
  387. package/dist/icons/CalendarEditIcon.js +1 -1
  388. package/dist/icons/CalendarIcon.js +1 -1
  389. package/dist/icons/CaretDownIcon.js +1 -1
  390. package/dist/icons/CaretUpIcon.js +1 -1
  391. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  392. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  393. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  394. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  395. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  396. package/dist/icons/ChartBarLineIcon.js +1 -1
  397. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  398. package/dist/icons/ChartBarStackedIcon.js +1 -1
  399. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  400. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  401. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  402. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  403. package/dist/icons/ChartBubbleIcon.js +1 -1
  404. package/dist/icons/ChartDonut2Icon.js +1 -1
  405. package/dist/icons/ChartFunnelIcon.js +1 -1
  406. package/dist/icons/ChartHeatmapIcon.js +1 -1
  407. package/dist/icons/ChartKPIIcon.js +1 -1
  408. package/dist/icons/ChartPie2Icon.js +1 -1
  409. package/dist/icons/ChartScatterIcon.js +1 -1
  410. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  411. package/dist/icons/CheckCircleIcon.js +1 -1
  412. package/dist/icons/CheckIcon.js +1 -1
  413. package/dist/icons/CircleFilledIcon.js +1 -1
  414. package/dist/icons/ClearIcon.js +1 -1
  415. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  416. package/dist/icons/CloseCircleIcon.js +1 -1
  417. package/dist/icons/CloseIcon.js +1 -1
  418. package/dist/icons/CodeIcon.js +1 -1
  419. package/dist/icons/ColumnTotalIcon.js +1 -1
  420. package/dist/icons/CopyIcon.js +1 -1
  421. package/dist/icons/CountIcon.js +1 -1
  422. package/dist/icons/CubeIcon.js +1 -1
  423. package/dist/icons/CubePauseIcon.js +1 -1
  424. package/dist/icons/CubePlayIcon.js +1 -1
  425. package/dist/icons/CurrencyDollarIcon.js +1 -1
  426. package/dist/icons/DangerIcon.js +1 -1
  427. package/dist/icons/DashboardIcon.js +1 -1
  428. package/dist/icons/DatabaseIcon.js +1 -1
  429. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  430. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  431. package/dist/icons/DirectionIcon.js +1 -1
  432. package/dist/icons/DonutIcon.js +1 -1
  433. package/dist/icons/DownIcon.js +1 -1
  434. package/dist/icons/EditIcon.js +1 -1
  435. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  436. package/dist/icons/ExclamationCircleIcon.js +1 -1
  437. package/dist/icons/ExclamationIcon.js +1 -1
  438. package/dist/icons/EyeIcon.js +1 -1
  439. package/dist/icons/EyeInvisibleIcon.js +1 -1
  440. package/dist/icons/FilterIcon.js +1 -1
  441. package/dist/icons/FolderFilledIcon.js +1 -1
  442. package/dist/icons/FolderIcon.js +1 -1
  443. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  444. package/dist/icons/FolderOpenIcon.js +1 -1
  445. package/dist/icons/ForwardIcon.js +1 -1
  446. package/dist/icons/GripVerticalIcon.js +1 -1
  447. package/dist/icons/HierarchyIcon.js +1 -1
  448. package/dist/icons/HierarchyOpenIcon.js +1 -1
  449. package/dist/icons/Icon.js +1 -1
  450. package/dist/icons/InfoCircleIcon.js +1 -1
  451. package/dist/icons/InfoIcon.js +1 -1
  452. package/dist/icons/KeyIcon.js +1 -1
  453. package/dist/icons/LeftIcon.js +1 -1
  454. package/dist/icons/LineChartIcon.js +1 -1
  455. package/dist/icons/LoadingIcon.js +1 -1
  456. package/dist/icons/LockFilledIcon.js +1 -1
  457. package/dist/icons/LockIcon.js +1 -1
  458. package/dist/icons/MoreIcon.js +1 -1
  459. package/dist/icons/NotAllowedIcon.js +1 -1
  460. package/dist/icons/Number123Icon.js +1 -1
  461. package/dist/icons/NumberIcon.js +1 -1
  462. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  463. package/dist/icons/PauseCircleIcon.js +1 -1
  464. package/dist/icons/PauseIcon.js +1 -1
  465. package/dist/icons/PercentageIcon.js +1 -1
  466. package/dist/icons/PieChartIcon.js +1 -1
  467. package/dist/icons/PipetteIcon.js +1 -1
  468. package/dist/icons/PlayCircleIcon.js +1 -1
  469. package/dist/icons/PlayIcon.js +1 -1
  470. package/dist/icons/PlusIcon.js +1 -1
  471. package/dist/icons/ProgressBarIcon.js +1 -1
  472. package/dist/icons/ReloadIcon.js +1 -1
  473. package/dist/icons/ReportIcon.js +1 -1
  474. package/dist/icons/ReturnIcon.js +1 -1
  475. package/dist/icons/RightIcon.js +1 -1
  476. package/dist/icons/RowTotalsIcon.js +1 -1
  477. package/dist/icons/SchemeIcon.js +1 -1
  478. package/dist/icons/SearchIcon.js +1 -1
  479. package/dist/icons/SemanticQueryIcon.js +1 -1
  480. package/dist/icons/SettingsIcon.js +1 -1
  481. package/dist/icons/ShieldFilledIcon.js +1 -1
  482. package/dist/icons/ShieldIcon.js +1 -1
  483. package/dist/icons/SlashIcon.js +1 -1
  484. package/dist/icons/SparklesIcon.js +1 -1
  485. package/dist/icons/SqlIcon.js +1 -1
  486. package/dist/icons/StatsIcon.js +1 -1
  487. package/dist/icons/StopIcon.js +1 -1
  488. package/dist/icons/StringIcon.js +1 -1
  489. package/dist/icons/SubtotalsIcon.js +1 -1
  490. package/dist/icons/SwitchIcon.js +1 -1
  491. package/dist/icons/TableIcon.js +1 -1
  492. package/dist/icons/ThumbsDownIcon.js +1 -1
  493. package/dist/icons/ThumbsUpIcon.js +1 -1
  494. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  495. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  496. package/dist/icons/ThunderboltIcon.js +1 -1
  497. package/dist/icons/TimeIcon.js +1 -1
  498. package/dist/icons/TrashIcon.js +1 -1
  499. package/dist/icons/UnlockIcon.js +1 -1
  500. package/dist/icons/UpIcon.js +1 -1
  501. package/dist/icons/UserGroupIcon.js +1 -1
  502. package/dist/icons/UserIcon.js +1 -1
  503. package/dist/icons/UserLockIcon.js +1 -1
  504. package/dist/icons/ViewIcon.js +1 -1
  505. package/dist/icons/WarningFilledIcon.js +1 -1
  506. package/dist/icons/WarningIcon.js +1 -1
  507. package/dist/icons/wrap-icon.js +1 -1
  508. package/dist/index.d.ts +3 -15
  509. package/dist/index.js +3 -11
  510. package/dist/index.js.map +1 -1
  511. package/dist/probe/canonicalize.js +1 -1
  512. package/dist/probe/css.js +1 -1
  513. package/dist/probe/index.js +1 -1
  514. package/dist/provider.js +1 -1
  515. package/dist/providers/TrackingProvider.js +1 -1
  516. package/dist/providers/navigationAdapter.default.js +1 -1
  517. package/dist/tokens/all-tokens.js +1 -1
  518. package/dist/tokens/base.js +1 -1
  519. package/dist/tokens/color-seed.js +1 -1
  520. package/dist/tokens/color-theme.js +1 -1
  521. package/dist/tokens/colors.js +1 -1
  522. package/dist/tokens/layout.js +1 -1
  523. package/dist/tokens/lazy-styles.js +1 -1
  524. package/dist/tokens/legacy-color.js +1 -1
  525. package/dist/tokens/palette-config.js +1 -1
  526. package/dist/tokens/palette.js +1 -1
  527. package/dist/tokens/resolve.js +1 -1
  528. package/dist/tokens/shadows.js +1 -1
  529. package/dist/tokens/sizes.js +1 -1
  530. package/dist/tokens/spacing.js +1 -1
  531. package/dist/tokens/typography.js +1 -1
  532. package/dist/utils/ResizeSensor.js +1 -1
  533. package/dist/utils/colors.js +1 -1
  534. package/dist/utils/dotize.js +1 -1
  535. package/dist/utils/is-dev-env.js +1 -1
  536. package/dist/utils/modules.js +1 -1
  537. package/dist/utils/promise.js +1 -1
  538. package/dist/utils/raf.js +1 -1
  539. package/dist/utils/random.js +1 -1
  540. package/dist/utils/range.js +1 -1
  541. package/dist/utils/react/RenderCache.js +1 -1
  542. package/dist/utils/react/Slots.js +1 -1
  543. package/dist/utils/react/chain.js +1 -1
  544. package/dist/utils/react/disabledProps.js +1 -1
  545. package/dist/utils/react/escapePropagation.js +1 -1
  546. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  547. package/dist/utils/react/index.js +1 -1
  548. package/dist/utils/react/interactions.js +1 -1
  549. package/dist/utils/react/isTextOnly.js +1 -1
  550. package/dist/utils/react/mapProps.js +1 -1
  551. package/dist/utils/react/mergeProps.js +1 -1
  552. package/dist/utils/react/nullableValue.js +1 -1
  553. package/dist/utils/react/programmaticFocus.js +1 -1
  554. package/dist/utils/react/resolveIcon.js +1 -1
  555. package/dist/utils/react/sharedStore.js +1 -1
  556. package/dist/utils/react/useBufferedValue.js +1 -1
  557. package/dist/utils/react/useCombinedRefs.js +1 -1
  558. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  559. package/dist/utils/react/useEventBus.js +1 -1
  560. package/dist/utils/react/useId.js +1 -1
  561. package/dist/utils/react/useIsDarwin.js +1 -1
  562. package/dist/utils/react/useKeySymbols.js +1 -1
  563. package/dist/utils/react/useLayoutEffect.js +1 -1
  564. package/dist/utils/react/useLocalStorage.js +1 -1
  565. package/dist/utils/react/useMergeStyles.js +1 -1
  566. package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
  567. package/dist/utils/react/usePopoverSync.js +1 -1
  568. package/dist/utils/react/useQaProps.js +1 -1
  569. package/dist/utils/react/useScheme.js +1 -1
  570. package/dist/utils/react/useViewportSize.js +1 -1
  571. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  572. package/dist/utils/selection.js +1 -1
  573. package/dist/utils/styles.js +1 -1
  574. package/dist/utils/tree.js +1 -1
  575. package/dist/utils/warnings.js +1 -1
  576. package/dist/version.js +2 -2
  577. package/docs/components/data/ItemTable.md +1 -1
  578. package/docs/components/navigation/Tabs.md +8 -2
  579. package/package.json +1 -1
  580. package/dist/components/layout/Board/Board.d.ts +0 -253
  581. package/dist/components/layout/Board/Board.js +0 -771
  582. package/dist/components/layout/Board/Board.js.map +0 -1
  583. package/dist/components/layout/Board/BoardProvider.d.ts +0 -28
  584. package/dist/components/layout/Board/BoardProvider.js +0 -47
  585. package/dist/components/layout/Board/BoardProvider.js.map +0 -1
  586. package/dist/components/layout/Board/BoardResponsive.d.ts +0 -55
  587. package/dist/components/layout/Board/BoardResponsive.js +0 -101
  588. package/dist/components/layout/Board/BoardResponsive.js.map +0 -1
  589. package/dist/components/layout/Board/Widget.d.ts +0 -152
  590. package/dist/components/layout/Board/Widget.js +0 -76
  591. package/dist/components/layout/Board/Widget.js.map +0 -1
  592. package/dist/components/layout/Board/WidgetHost.js +0 -1065
  593. package/dist/components/layout/Board/WidgetHost.js.map +0 -1
  594. package/dist/components/layout/Board/board-context.d.ts +0 -43
  595. package/dist/components/layout/Board/board-context.js +0 -79
  596. package/dist/components/layout/Board/board-context.js.map +0 -1
  597. package/dist/components/layout/Board/board-store.d.ts +0 -4
  598. package/dist/components/layout/Board/board-store.js +0 -49
  599. package/dist/components/layout/Board/board-store.js.map +0 -1
  600. package/dist/components/layout/Board/grid-core/calculate.js +0 -90
  601. package/dist/components/layout/Board/grid-core/calculate.js.map +0 -1
  602. package/dist/components/layout/Board/grid-core/collision-modes.js +0 -254
  603. package/dist/components/layout/Board/grid-core/collision-modes.js.map +0 -1
  604. package/dist/components/layout/Board/grid-core/collision.js +0 -35
  605. package/dist/components/layout/Board/grid-core/collision.js.map +0 -1
  606. package/dist/components/layout/Board/grid-core/compactors.d.ts +0 -23
  607. package/dist/components/layout/Board/grid-core/compactors.js +0 -166
  608. package/dist/components/layout/Board/grid-core/compactors.js.map +0 -1
  609. package/dist/components/layout/Board/grid-core/constraints.d.ts +0 -35
  610. package/dist/components/layout/Board/grid-core/constraints.js +0 -155
  611. package/dist/components/layout/Board/grid-core/constraints.js.map +0 -1
  612. package/dist/components/layout/Board/grid-core/group-move.js +0 -317
  613. package/dist/components/layout/Board/grid-core/group-move.js.map +0 -1
  614. package/dist/components/layout/Board/grid-core/layout.js +0 -186
  615. package/dist/components/layout/Board/grid-core/layout.js.map +0 -1
  616. package/dist/components/layout/Board/grid-core/placement.d.ts +0 -58
  617. package/dist/components/layout/Board/grid-core/placement.js +0 -153
  618. package/dist/components/layout/Board/grid-core/placement.js.map +0 -1
  619. package/dist/components/layout/Board/grid-core/sort.js +0 -37
  620. package/dist/components/layout/Board/grid-core/sort.js.map +0 -1
  621. package/dist/components/layout/Board/grid-core/types.d.ts +0 -186
  622. package/dist/components/layout/Board/index.d.ts +0 -24
  623. package/dist/components/layout/Board/index.js +0 -20
  624. package/dist/components/layout/Board/index.js.map +0 -1
  625. package/dist/components/layout/Board/responsive-utils.d.ts +0 -13
  626. package/dist/components/layout/Board/responsive-utils.js +0 -55
  627. package/dist/components/layout/Board/responsive-utils.js.map +0 -1
  628. package/dist/components/layout/Board/use-board-layout.d.ts +0 -26
  629. package/dist/components/layout/Board/use-board-layout.js +0 -57
  630. package/dist/components/layout/Board/use-board-layout.js.map +0 -1
  631. package/dist/components/layout/Board/use-board-registry.js +0 -700
  632. package/dist/components/layout/Board/use-board-registry.js.map +0 -1
  633. package/dist/components/layout/Board/use-board-select-modifier-key.js +0 -24
  634. package/dist/components/layout/Board/use-board-select-modifier-key.js.map +0 -1
  635. package/dist/components/layout/Board/use-board-selection.d.ts +0 -8
  636. package/dist/components/layout/Board/use-board-selection.js +0 -113
  637. package/dist/components/layout/Board/use-board-selection.js.map +0 -1
  638. package/docs/components/layout/Board.md +0 -473
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
4
4
  import { useCombinedRefs } from "../../../utils/react/useCombinedRefs.js";
@@ -295,6 +295,15 @@ const SelectAllOption = ({ label, isSelected, isIndeterminate, isDisabled, isChe
295
295
  children: resolvedLabel
296
296
  }), /* @__PURE__ */ jsx(StyledDivider, {})] });
297
297
  };
298
+ /**
299
+ * A public selection prop as the Set-based value React Stately expects: a key
300
+ * array (or `'all'`, passed through) in multiple mode, a single key (or
301
+ * `null` for none) in single mode.
302
+ */
303
+ function toStatelySelection(value, isMultiple) {
304
+ if (isMultiple) return value === "all" ? "all" : new Set(value);
305
+ return value == null ? /* @__PURE__ */ new Set() : new Set([value]);
306
+ }
298
307
  const ListBox = forwardRef(function ListBox(props, ref) {
299
308
  props = useFieldProps(props, { valuePropsMapper: ({ value, onChange }) => {
300
309
  const fieldProps = {};
@@ -350,13 +359,11 @@ const ListBox = forwardRef(function ListBox(props, ref) {
350
359
  selectionMode: props.selectionMode || "single",
351
360
  allowDuplicateSelectionEvents
352
361
  };
353
- if (listStateProps.selectionMode === "multiple") {
354
- if (selectedKeys !== void 0) listStateProps.selectedKeys = selectedKeys === "all" ? "all" : new Set(selectedKeys);
355
- if (defaultSelectedKeys !== void 0) listStateProps.defaultSelectedKeys = defaultSelectedKeys === "all" ? "all" : new Set(defaultSelectedKeys);
356
- } else {
357
- if (selectedKey !== void 0) listStateProps.selectedKeys = selectedKey == null ? /* @__PURE__ */ new Set() : new Set([selectedKey]);
358
- if (defaultSelectedKey !== void 0) listStateProps.defaultSelectedKeys = defaultSelectedKey == null ? /* @__PURE__ */ new Set() : new Set([defaultSelectedKey]);
359
- }
362
+ const isMultiple = listStateProps.selectionMode === "multiple";
363
+ const selection = isMultiple ? selectedKeys : selectedKey;
364
+ const defaultSelection = isMultiple ? defaultSelectedKeys : defaultSelectedKey;
365
+ if (selection !== void 0) listStateProps.selectedKeys = toStatelySelection(selection, isMultiple);
366
+ if (defaultSelection !== void 0) listStateProps.defaultSelectedKeys = toStatelySelection(defaultSelection, isMultiple);
360
367
  const listState = useListState(listStateProps);
361
368
  useLayoutEffect(() => {
362
369
  const selected = listState.selectionManager.selectedKeys;
@@ -1 +1 @@
1
- {"version":3,"file":"ListBox.js","names":["useHover","IconMinus","useVirtualizer","BASE_STYLES","BasePropsWithoutChildren","BaseStyleProps","COLOR_STYLES","ColorStyleProps","mergeStyles","OUTER_STYLES","OuterStyleProps","Styles","tasty","CSSProperties","ForwardedRef","forwardRef","MutableRefObject","ReactElement","ReactNode","RefObject","useEffect","useLayoutEffect","useMemo","useRef","useState","AriaListBoxProps","DropTarget","useDraggableItem","useDropIndicator","useKeyboard","useListBox","useListBoxSection","useOption","Section","BaseSection","DraggableCollectionState","DroppableCollectionState","ListProps","useListState","useWarn","useI18n","CheckIcon","GripVerticalIcon","Icon","SIZE_NAME_TO_KEY","SIZES","mergeProps","useCombinedRefs","allowEscapeToPropagate","useFocus","extractStyles","StyledDivider","StyledFooter","StyledHeader","StyledSectionHeading","CollectionItem","CubeCollectionItemProps","filterCollectionItemProps","Item","getValidationMods","getValidationTheme","useFieldProps","wrapWithField","createMockDragState","DraggableListBox","CollectionBase","Key","FieldBaseProps","ListBoxWrapperElement","qa","styles","display","gridColumns","gridRows","flow","gap","position","radius","color","transition","outline","focused","border","valid","invalid","disabled","ListElement","as","padding","listStyle","boxSizing","margin","height","ListBoxScrollElement","overflow","scrollbar","ListBoxItem","disableActionsFocus","all","outlineOffset","cursor","draggable","opacity","gripIcon","ListBoxDropIndicatorElement","zIndex","pointerEvents","Indicator","$","left","right","top","fill","SectionWrapperElement","SectionListElement","ListBoxCheckbox","placeItems","width","flexShrink","ListBoxCheckboxWrapper","placeContent","placeSelf","renderCheckboxIcon","isSelected","isDisabled","isFocused","isHovered","isInvalid","isValid","mods","selected","hovered","CubeListBoxProps","Omit","T","listStyles","optionStyles","optionHighlight","sectionStyles","headingStyles","listGap","selectedKey","selectedKeys","defaultSelectedKey","defaultSelectedKeys","onSelectionChange","key","selectionMode","listRef","HTMLUListElement","disallowEmptySelection","allowDuplicateSelectionEvents","shouldFocusWrap","stateRef","focusOnHover","header","footer","headerStyles","footerStyles","Record","size","disableSelectionToggle","shouldUseVirtualFocus","isFocusWithin","onEscape","isCheckable","onOptionClick","showSelectAll","selectAllLabel","allValueProps","Partial","filter","nodes","Iterable","emptyLabel","shape","isReorderable","onReorder","newOrder","PROP_STYLES","SelectAllOption","label","isIndeterminate","state","lastFocusSourceRef","onClick","propagate","t","hoverProps","resolvedLabel","undefined","markIcon","localRef","HTMLLIElement","checkboxIcon","indeterminate","handleOptionClick","e","current","selectionManager","clickTarget","target","HTMLElement","checkboxElement","querySelector","contains","listboxitem","checkable","ListBox","props","ref","HTMLDivElement","valuePropsMapper","value","onChange","fieldProps","Array","isArray","extra","id","labelStyles","isRequired","necessityIndicator","message","description","externalMods","labelSuffix","form","otherProps","forceUpdate","lastSelectedKeyRef","externalSelectionHandler","wrappedOnSelectionChange","keys","Set","prevKey","from","listStateProps","disabledBehavior","listState","first","selectAllState","rawSelection","collection","disabledKeys","handleSelectAllClick","clearSelection","selectAll","args","keyboardProps","onKeyDown","itemsArray","hasSections","some","i","type","shouldVirtualize","listBoxProps","toString","isVirtualized","escapeKeyBehavior","focusProps","isListFocused","scrollRef","rowVirtualizer","count","length","getScrollElement","getItemKey","index","estimateSize","currentItem","XL","overscan","measure","focusedKey","scrollElement","itemElement","CSS","escape","String","scrollTop","viewportHeight","clientHeight","viewportBottom","itemRect","getBoundingClientRect","scrollRect","itemTop","itemBottom","isAlreadyVisible","scrollIntoView","block","behavior","mergedListBoxProps","tabIndex","orderedKeys","map","listGapTokens","listBoxField","dragState","dropState","collectionProps","sections","item","getTotalSize","getVirtualItems","virtualItem","measureElement","transform","start","renderedItems","isFirstSection","push","Option","highlight","isParentDisabled","virtualStyle","virtualRef","virtualIndex","element","has","isDraggable","mockDragState","dragResult","effectiveDragProps","dragProps","isDragging","optionProps","isPressed","labelProps","descriptionProps","shouldSelectOnPressUp","shouldFocusOnHover","filteredItemProps","effectiveIcon","icon","handleOptionExtras","MouseEvent","setFocusedKey","onKeyUp","ariaSelected","ariaDisabled","role","filteredOptionProps","theme","const","includeValid","listBoxItem","pressed","dragging","rendered","dropPosition","ListBoxDropIndicator","t0","_c","t1","dropIndicatorProps","isHidden","isDropTarget","t2","t3","Symbol","for","t4","ListBoxSectionProps","ListBoxSection","heading","itemProps","headingProps","groupProps","childNodes","node","getItem","node_0","t5","t6","SectionComponent","ListBoxSectionComponent","Object","assign","displayName","defineProperty","enumerable","configurable"],"sources":["../../../../src/components/fields/ListBox/ListBox.tsx"],"sourcesContent":["import { useHover } from '@react-aria/interactions';\nimport { IconMinus } from '@tabler/icons-react';\nimport { useVirtualizer } from '@tanstack/react-virtual';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n mergeStyles,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n CSSProperties,\n ForwardedRef,\n forwardRef,\n MutableRefObject,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n AriaListBoxProps,\n DropTarget,\n useDraggableItem,\n useDropIndicator,\n useKeyboard,\n useListBox,\n useListBoxSection,\n useOption,\n} from 'react-aria';\nimport {\n Section as BaseSection,\n DraggableCollectionState,\n DroppableCollectionState,\n ListProps,\n useListState,\n} from 'react-stately';\n\nimport { useWarn } from '../../../_internal/hooks/use-warn';\nimport { useI18n } from '../../../i18n';\nimport { CheckIcon } from '../../../icons/CheckIcon';\nimport { GripVerticalIcon } from '../../../icons/GripVerticalIcon';\nimport { Icon } from '../../../icons/Icon';\nimport { SIZE_NAME_TO_KEY, SIZES } from '../../../tokens';\nimport { mergeProps, useCombinedRefs } from '../../../utils/react';\nimport { allowEscapeToPropagate } from '../../../utils/react/escapePropagation';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { extractStyles } from '../../../utils/styles';\n// Import Menu styled components for header and footer\nimport {\n StyledDivider,\n StyledFooter,\n StyledHeader,\n StyledSectionHeading,\n} from '../../actions/Menu/styled';\nimport {\n CollectionItem,\n CubeCollectionItemProps,\n filterCollectionItemProps,\n} from '../../CollectionItem';\nimport { Item } from '../../content/Item/Item';\nimport {\n getValidationMods,\n getValidationTheme,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { createMockDragState } from '../../shared/DraggableCollection';\n\nimport { DraggableListBox } from './DraggableListBox';\n\nimport type { CollectionBase, Key } from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\n\nconst ListBoxWrapperElement = tasty({\n qa: 'ListBox',\n styles: {\n display: 'grid',\n gridColumns: '1sf',\n gridRows: 'max-content max-content max-content 1sf max-content',\n flow: 'column',\n gap: 0,\n position: 'relative',\n radius: {\n '': '1cr',\n '[data-shape=\"popover\"]': '(1cr - 1bw)',\n '[data-shape=\"plain\"]': '0',\n },\n color: '#dark-02',\n transition: 'theme',\n outline: {\n '': '#purple-03.0',\n 'invalid & focused': '#danger.50',\n focused: '#purple-03',\n },\n border: {\n '': true,\n focused: '#primary-text',\n valid: '#success-text.50',\n invalid: '#danger-text.50',\n disabled: true,\n '[data-shape=\"plain\"] | [data-shape=\"popover\"] | searchable': false,\n },\n },\n});\n\nconst ListElement = tasty({\n as: 'ul',\n styles: {\n // The space between options. Set from `listGap`, which also hands the\n // same number to the virtualizer.\n '$list-gap': '1bw',\n display: 'block',\n // The space kept below the last option. Padding, so `listStyles` can take\n // it away, and outside the content box, where a virtualized list sets its\n // own height.\n padding: '.5x bottom',\n listStyle: 'none',\n boxSizing: 'content-box',\n margin: {\n '': '.5x .5x 0 .5x',\n '[data-shape=\"plain\"]': '0',\n },\n height: 'max-content',\n },\n});\n\n// NEW: dedicated scroll container for ListBox\nconst ListBoxScrollElement = tasty({\n as: 'div',\n styles: {\n display: 'grid',\n gridColumns: '1sf',\n gridRows: '1sf',\n overflow: 'auto',\n scrollbar: 'styled',\n },\n});\n\n// Create an extended Item for ListBox options with 'all' modifier support\nconst ListBoxItem = tasty(Item, {\n as: 'li',\n disableActionsFocus: true,\n styles: {\n display: 'grid',\n margin: {\n '': '$list-gap bottom',\n // Mid-drag the last option is followed by a drop indicator, which takes\n // the gap back (`ListBoxDropIndicatorElement`). Not `:has(~ …)`: see\n // AGENTS.md → Styling.\n ':last-child': '0',\n all: '.5x',\n },\n // Inside the option: options sit a hairline apart, so a ring outside one\n // would cover its neighbour, and the scroll box would clip it at the edges.\n outlineOffset: '-1bw',\n Icon: {\n cursor: {\n draggable: 'grab',\n },\n opacity: {\n gripIcon: '.4',\n 'gripIcon & hovered': '1',\n },\n transition: {\n draggable: 'opacity',\n },\n },\n },\n});\n\n// Horizontal drop indicator for DnD reordering\nconst ListBoxDropIndicatorElement = tasty({\n as: 'li',\n styles: {\n zIndex: 10,\n position: 'relative',\n pointerEvents: 'none',\n height: 0,\n // After the last option: cancels the `$list-gap` that option keeps while\n // it is not the last child, so the list holds its height mid-drag. An\n // `optionStyles` margin replaces that gap, and this then overshoots.\n margin: {\n '': 0,\n ':last-child': '(-1 * $list-gap) top',\n },\n opacity: {\n '': 0,\n 'drop-target': 1,\n },\n\n Indicator: {\n $: '>',\n position: 'absolute',\n left: '.5x',\n right: '.5x',\n // Centred in the gap between two options, or on the edge of the list.\n top: {\n '': '(-1px - $list-gap / 2)',\n ':first-child | :last-child': '-1px',\n },\n height: '2px',\n fill: '#primary',\n radius: 'round',\n },\n },\n});\n\nconst SectionWrapperElement = tasty({\n as: 'li',\n styles: {\n display: 'block',\n },\n});\n\nconst SectionListElement = tasty({\n qa: 'ListBoxSectionList',\n as: 'ul',\n styles: {\n display: 'flex',\n gap: '0',\n flow: 'column',\n margin: '0',\n padding: '0',\n listStyle: 'none',\n },\n});\n\n// Checkbox component for multiple selection options\nconst ListBoxCheckbox = tasty({\n as: 'div',\n styles: {\n display: 'grid',\n placeItems: 'center',\n radius: '.5r',\n width: '(2x - 2bw)',\n height: '(2x - 2bw)',\n flexShrink: 0,\n transition: 'theme',\n opacity: {\n '': 0,\n 'selected | indeterminate | hovered | focused': 1,\n },\n fill: {\n '': '#surface',\n 'selected | indeterminate': '#primary',\n 'invalid & !(selected | indeterminate)': '#surface',\n 'invalid & (selected | indeterminate)': '#danger',\n disabled: '#dark.12',\n },\n color: {\n '': '#clear',\n 'selected | indeterminate': '#white',\n },\n border: {\n '': '#dark.30',\n invalid: '#danger',\n 'disabled | ((selected | indeterminate) & !invalid)': '#clear',\n },\n },\n});\n\nconst ListBoxCheckboxWrapper = tasty({\n as: 'div',\n styles: {\n display: 'grid',\n placeItems: 'center',\n placeContent: 'center',\n cursor: '$pointer',\n placeSelf: 'stretch',\n },\n});\n\nfunction renderCheckboxIcon({\n isSelected,\n isDisabled,\n isFocused,\n isHovered,\n isInvalid,\n isValid,\n}: {\n isSelected: boolean;\n isDisabled: boolean;\n isFocused: boolean;\n isHovered: boolean;\n isInvalid?: boolean;\n isValid?: boolean;\n}) {\n const mods = {\n selected: isSelected,\n disabled: isDisabled,\n focused: isFocused,\n hovered: isHovered,\n ...getValidationMods({ isInvalid, isValid }),\n };\n\n return (\n <ListBoxCheckboxWrapper data-element=\"CheckboxWrapper\" mods={mods}>\n <ListBoxCheckbox data-element=\"Checkbox\" mods={mods}>\n <CheckIcon size={12} stroke={3} />\n </ListBoxCheckbox>\n </ListBoxCheckboxWrapper>\n );\n}\n\nexport interface CubeListBoxProps<T>\n extends Omit<\n AriaListBoxProps<T>,\n 'autoFocus' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange'\n >,\n CollectionBase<T>,\n FieldBaseProps<Key | readonly Key[] | null | undefined>,\n BasePropsWithoutChildren,\n // The style props `PROP_STYLES` extracts at runtime and the docs list;\n // without these a `height` or `width` worked but failed to type-check.\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps {\n /** Custom styles for the list container */\n listStyles?: Styles;\n /** Custom styles for individual options */\n optionStyles?: Styles;\n /**\n * Substring to highlight within each option's (text) children. Typically the\n * current search query. Matching is case-insensitive.\n */\n optionHighlight?: string;\n /** Custom styles for section containers */\n sectionStyles?: Styles;\n /** Custom styles for section headings */\n headingStyles?: Styles;\n /**\n * Space between options, in pixels. Defaults to a hairline (`1bw`). It\n * applies to flat, virtualized, sectioned and reorderable lists alike.\n */\n listGap?: number;\n /** Whether the ListBox is disabled */\n isDisabled?: boolean;\n /** The selected key in controlled single selection mode */\n selectedKey?: Key | null;\n /** The selected keys in controlled multiple selection mode. Use \"all\" to select all items or an array of keys */\n selectedKeys?: 'all' | Key[];\n /** The default selected key in uncontrolled single selection mode */\n defaultSelectedKey?: Key | null;\n /** The default selected keys in uncontrolled multiple selection mode. Use \"all\" to select all items or an array of keys */\n defaultSelectedKeys?: 'all' | Key[];\n /** Callback fired when selection changes */\n onSelectionChange?: (key: Key | null | 'all' | Key[]) => void;\n /** The selection mode of the ListBox */\n selectionMode?: 'single' | 'multiple';\n /** Ref for accessing the list DOM element */\n listRef?: RefObject<HTMLUListElement | null>;\n /** Whether to disallow empty selection */\n disallowEmptySelection?: boolean;\n /**\n * Whether `onSelectionChange` should fire even when the new selection equals the\n * current one (e.g. re-selecting the already-selected item with `disallowEmptySelection`).\n * React Stately suppresses such duplicate events by default. Popover-based wrappers\n * (Picker, FilterPicker) rely on the duplicate event to close the popover on re-select.\n */\n allowDuplicateSelectionEvents?: boolean;\n /** Whether to wrap focus when reaching the end of the list */\n shouldFocusWrap?: boolean;\n /**\n * Ref to access the internal ListState instance.\n * This allows parent components to access selection state and other list functionality.\n */\n stateRef?: RefObject<any | null>;\n\n /**\n * Whether moving the pointer over an option will move DOM focus to that option.\n * Set to false for components that keep DOM focus outside (e.g. searchable FilterListBox).\n * Defaults to true.\n */\n focusOnHover?: boolean;\n /** Custom header content displayed above the list */\n header?: ReactNode;\n /** Custom footer content displayed below the list */\n footer?: ReactNode;\n /** Custom styles for the header */\n headerStyles?: Styles;\n /** Custom styles for the footer */\n footerStyles?: Styles;\n /** Additional modifiers for styling the ListBox */\n mods?: Record<string, boolean>;\n /** Size variant of the ListBox */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * When `true`, clicking an already-selected item keeps it selected instead of toggling it off.\n * Useful when embedding ListBox inside components like ComboBox.\n */\n disableSelectionToggle?: boolean;\n\n /**\n * Whether to use virtual focus for keyboard navigation.\n * When true, DOM focus stays outside individual option elements (useful for searchable lists).\n * Defaults to false for backward compatibility.\n */\n shouldUseVirtualFocus?: boolean;\n\n /**\n * For a list whose focused option is moved from an input outside it, as\n * FilterListBox's search input does: whether focus is within that input's\n * component. The focused option is marked only while it is `true`. Unset, the\n * list's own focus decides, and with `shouldUseVirtualFocus` the focused\n * option is always marked.\n */\n isFocusWithin?: boolean;\n\n /**\n * Callback fired when the user presses Escape key.\n * When provided, this prevents React Aria's default Escape behavior (selection reset).\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 * Whether to show the \"Select All\" option in multiple selection mode.\n * This adds a select all option to the header that allows selecting/deselecting all items.\n */\n showSelectAll?: boolean;\n\n /**\n * Label for the \"Select All\" option. Defaults to \"Select All\".\n */\n selectAllLabel?: ReactNode;\n\n /**\n * Props to apply to the \"Select All\" option.\n */\n allValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Filter function to apply to the collection nodes.\n * Takes an iterable of nodes and returns a filtered iterable.\n * Useful for implementing search/filter functionality.\n */\n filter?: (nodes: Iterable<any>) => Iterable<any>;\n\n /**\n * Label to display when the list is empty (no items available).\n * Defaults to \"No items\".\n */\n emptyLabel?: ReactNode;\n\n /**\n * Visual shape of the ListBox styling.\n * - `card` (default): Standard card styling with border and margin\n * - `plain`: No border, no margin, no radius - suitable for embedded use\n * - `popover`: No border, but keeps margin and radius - suitable for overlay use\n * Defaults to 'card'.\n */\n shape?: 'card' | 'plain' | 'popover';\n\n /**\n * Enable drag-and-drop reordering of list items.\n * When enabled, virtualization is disabled and each item gets a drag handle.\n * @default false\n */\n isReorderable?: boolean;\n\n /**\n * Callback when items are reordered via drag-and-drop.\n * Called with the new array of item keys in their new order.\n */\n onReorder?: (newOrder: string[]) => void;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\nconst SelectAllOption = ({\n label,\n isSelected,\n isIndeterminate,\n isDisabled,\n isCheckable,\n size = 'medium',\n state,\n lastFocusSourceRef,\n onClick,\n allValueProps = {},\n}: {\n label?: ReactNode;\n isSelected: boolean;\n isIndeterminate: boolean;\n isDisabled?: boolean;\n isCheckable?: boolean;\n size?: 'small' | 'medium' | 'large';\n state: any;\n lastFocusSourceRef: MutableRefObject<'keyboard' | 'mouse' | 'other'>;\n onClick: (propagate?: boolean) => void;\n allValueProps?: Partial<CubeCollectionItemProps<any>>;\n}) => {\n const { t } = useI18n();\n const { hoverProps, isHovered } = useHover({ isDisabled });\n const resolvedLabel =\n label === '' || label === undefined || label === null\n ? t('listBox.selectAll', 'Select All')\n : label;\n\n const markIcon = isIndeterminate ? (\n <Icon size={12} stroke={3}>\n <IconMinus />\n </Icon>\n ) : (\n <CheckIcon size={12} stroke={3} />\n );\n\n const localRef = useRef<HTMLLIElement>(null);\n\n // Create checkbox icon for select all option\n const checkboxIcon = useMemo(() => {\n if (!isCheckable) {\n return null;\n }\n\n return (\n <ListBoxCheckboxWrapper\n data-element=\"CheckboxWrapper\"\n mods={{\n selected: isSelected,\n disabled: isDisabled,\n hovered: isHovered,\n indeterminate: isIndeterminate,\n }}\n >\n <ListBoxCheckbox\n data-element=\"Checkbox\"\n mods={{\n selected: isSelected,\n disabled: isDisabled,\n hovered: isHovered,\n indeterminate: isIndeterminate,\n }}\n >\n {(isIndeterminate || isSelected) && markIcon}\n </ListBoxCheckbox>\n </ListBoxCheckboxWrapper>\n );\n }, [\n isCheckable,\n isSelected,\n isDisabled,\n isHovered,\n isIndeterminate,\n markIcon,\n ]);\n\n const handleOptionClick = (e) => {\n // Mark focus changes from mouse clicks\n if (lastFocusSourceRef) {\n lastFocusSourceRef.current = 'mouse';\n }\n\n // If there's an onOptionClick callback and this is checkable in multiple mode,\n // we need to distinguish between checkbox and content clicks\n if (state.selectionManager.selectionMode === 'multiple') {\n // Check if the click target is within the checkbox area\n const clickTarget = e.target as HTMLElement;\n const checkboxElement = localRef.current?.querySelector(\n '[data-element=\"CheckboxWrapper\"]',\n );\n\n if (\n checkboxElement &&\n (checkboxElement === clickTarget ||\n checkboxElement.contains(clickTarget))\n ) {\n onClick?.(false);\n } else {\n // Then call the callback (which will close the popover in FilterPicker)\n onClick?.(true);\n }\n } else {\n onClick?.(true);\n }\n };\n\n return (\n <>\n <ListBoxItem\n ref={localRef}\n data-size={size}\n size={size}\n role=\"option\"\n aria-selected={isSelected}\n isSelected={isSelected}\n isDisabled={isDisabled}\n icon={checkboxIcon}\n mods={{\n listboxitem: true,\n disabled: isDisabled,\n checkable: isCheckable,\n hovered: isHovered,\n indeterminate: isIndeterminate,\n all: true, // Important: this preserves the 'all' modifier\n }}\n {...mergeProps(hoverProps, allValueProps, {\n onClick: handleOptionClick,\n })}\n >\n {resolvedLabel}\n </ListBoxItem>\n <StyledDivider />\n </>\n );\n};\n\nexport const ListBox = forwardRef(function ListBox<T extends object>(\n props: CubeListBoxProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\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 onChange(key ? (Array.isArray(key) ? key : [key]) : []);\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 listStyles,\n optionStyles,\n optionHighlight,\n sectionStyles,\n headingStyles,\n listGap,\n listRef,\n message,\n description,\n styles,\n mods: externalMods,\n size = 'medium',\n labelSuffix,\n selectedKey,\n defaultSelectedKey,\n selectedKeys,\n defaultSelectedKeys,\n shouldUseVirtualFocus,\n isFocusWithin,\n onSelectionChange,\n disableSelectionToggle = false,\n allowDuplicateSelectionEvents,\n stateRef,\n focusOnHover,\n header,\n footer,\n headerStyles,\n footerStyles,\n onEscape,\n isCheckable,\n onOptionClick,\n showSelectAll,\n selectAllLabel,\n allValueProps,\n filter,\n emptyLabel = t('listBox.noItems', 'No items'),\n shape = 'card',\n isReorderable = false,\n onReorder,\n form,\n ...otherProps\n } = props;\n\n const [, forceUpdate] = useState({});\n const lastSelectedKeyRef = useRef<Key | null>(null);\n\n // Wrap onSelectionChange to prevent selection when disabled and handle React Aria's Set format\n const externalSelectionHandler = onSelectionChange || (props as any).onChange;\n\n const wrappedOnSelectionChange = useMemo(() => {\n if (!externalSelectionHandler) return undefined;\n\n return (keys: any) => {\n // Don't allow selection changes when disabled\n if (isDisabled) {\n return;\n }\n\n // React Aria always passes a Set for selection changes\n // Handle the special \"all\" case and convert to our public API format\n if (keys === 'all') {\n externalSelectionHandler('all');\n } else if (keys instanceof Set) {\n if (keys.size === 0) {\n if (disableSelectionToggle && props.selectionMode === 'single') {\n const prevKey = lastSelectedKeyRef.current;\n if (prevKey != null) {\n externalSelectionHandler(prevKey);\n return;\n }\n }\n externalSelectionHandler(\n props.selectionMode === 'multiple' ? [] : null,\n );\n } else if (props.selectionMode === 'multiple') {\n externalSelectionHandler(Array.from(keys));\n } else {\n const key = Array.from(keys)[0];\n lastSelectedKeyRef.current = key ?? null;\n externalSelectionHandler(key);\n }\n } else {\n lastSelectedKeyRef.current = keys as Key | null;\n externalSelectionHandler(keys);\n }\n };\n }, [\n externalSelectionHandler,\n isDisabled,\n props.selectionMode,\n disableSelectionToggle,\n ]);\n\n // Prepare props for useListState with correct selection props\n const listStateProps: ListProps<T> = {\n ...props,\n onSelectionChange: wrappedOnSelectionChange,\n disabledBehavior: 'all',\n filter,\n selectionMode: props.selectionMode || 'single',\n allowDuplicateSelectionEvents,\n };\n\n // Set selection props based on mode\n if (listStateProps.selectionMode === 'multiple') {\n if (selectedKeys !== undefined) {\n // Handle \"all\" selection by passing it directly to React Aria\n listStateProps.selectedKeys =\n selectedKeys === 'all' ? 'all' : new Set(selectedKeys as Key[]);\n }\n if (defaultSelectedKeys !== undefined) {\n // Handle \"all\" default selection\n listStateProps.defaultSelectedKeys =\n defaultSelectedKeys === 'all'\n ? 'all'\n : new Set(defaultSelectedKeys as Key[]);\n }\n // Remove single-selection props if any\n } else {\n // For single-selection we convert the scalar key props that our public\n // API exposes into the Set-based props that React Stately expects.\n if (selectedKey !== undefined) {\n listStateProps.selectedKeys =\n selectedKey == null ? new Set() : new Set([selectedKey]);\n }\n\n if (defaultSelectedKey !== undefined) {\n listStateProps.defaultSelectedKeys =\n defaultSelectedKey == null ? new Set() : new Set([defaultSelectedKey]);\n }\n\n // Remove the single-value props so we don't pass unsupported keys through.\n }\n\n const listState = useListState(listStateProps);\n\n useLayoutEffect(() => {\n const selected = listState.selectionManager.selectedKeys;\n if (selected && (selected as any).size > 0) {\n const first = Array.from(selected as Set<Key>)[0];\n lastSelectedKeyRef.current = first ?? null;\n }\n }, [listState.selectionManager.selectedKeys]);\n\n // Calculate select all state for multiple selection mode\n const selectAllState = useMemo(() => {\n // Select-all only makes sense for multiple selection mode *and* when the UI is enabled\n if (props.selectionMode !== 'multiple' || !showSelectAll) {\n return { isSelected: false, isIndeterminate: false };\n }\n\n // React Stately exposes the raw selection value which is either the string \"all\"\n // (when `selectAll()` was used) **or** a Set of item keys.\n const rawSelection: any = (listState.selectionManager as any).rawSelection;\n\n // Fast path – user pressed our \"Select All\" control previously.\n if (rawSelection === 'all') {\n return { isSelected: true, isIndeterminate: false };\n }\n\n const selectedKeys = listState.selectionManager.selectedKeys as Set<Key>;\n\n // When there is nothing selected, we are in a clear state\n if (selectedKeys.size === 0) {\n return { isSelected: false, isIndeterminate: false };\n }\n\n // Otherwise it must be a partial (indeterminate) selection.\n return { isSelected: false, isIndeterminate: true };\n }, [\n props.selectionMode,\n showSelectAll,\n listState.collection,\n listState.disabledKeys,\n listState.selectionManager.selectedKeys,\n listState.selectionManager.rawSelection,\n ]);\n\n // Handle select all click\n const handleSelectAllClick = (propagate?: boolean) => {\n if (isDisabled || props.selectionMode !== 'multiple') return;\n\n if (selectAllState.isSelected) {\n // All selected, deselect all\n listState.selectionManager.clearSelection();\n // Manually call the wrapped handler since React Aria might not trigger it\n wrappedOnSelectionChange?.(new Set());\n } else {\n // Some or none selected, select all\n listState.selectionManager.selectAll();\n // Manually call the wrapped handler since React Aria might not trigger it\n wrappedOnSelectionChange?.('all');\n forceUpdate({});\n }\n\n if (propagate && !selectAllState.isSelected) {\n onOptionClick?.('__ALL__');\n }\n };\n\n // Track whether the last focus change was due to keyboard navigation\n const lastFocusSourceRef = useRef<'keyboard' | 'mouse' | 'other'>('other');\n\n // Expose the list state instance via the provided ref (if any)\n if (stateRef) {\n stateRef.current = {\n ...listState,\n lastFocusSourceRef,\n };\n }\n\n // Warn if isCheckable is false in single selection mode\n useWarn(isCheckable === false && props.selectionMode === 'single', {\n key: ['listbox-checkable-single-mode'],\n args: [\n 'CubeUIKit: isCheckable=false is not recommended in single selection mode as it may confuse users about selection behavior.',\n ],\n });\n\n // Custom keyboard handling: `Escape` has to leave the list so a surrounding\n // overlay can close on it, while every other key stays contained. See\n // `allowEscapeToPropagate` — \"let the overlay system handle closing\" is what\n // the old comment here intended, but only `preventDefault` was ever covered.\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n allowEscapeToPropagate(e);\n\n // Mark focus changes from keyboard navigation\n if (\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'Home' ||\n e.key === 'End' ||\n e.key === 'PageUp' ||\n e.key === 'PageDown'\n ) {\n lastFocusSourceRef.current = 'keyboard';\n }\n\n if (e.key === 'Escape') {\n // Called to potentially override the default selection clearing.\n onEscape?.();\n }\n },\n });\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n listRef = useCombinedRefs(listRef);\n\n // ----- Collection and virtualization decision (must precede useListBox) -----\n const itemsArray = useMemo(\n () => [...listState.collection],\n [listState.collection],\n );\n\n const hasSections = useMemo(\n () => itemsArray.some((i) => i.type === 'section'),\n [itemsArray],\n );\n\n const shouldVirtualize = !hasSections && !isReorderable;\n\n const { listBoxProps } = useListBox(\n {\n ...props,\n id: id,\n 'aria-label': props['aria-label'] || label?.toString(),\n // Only disable isVirtualized for reorderable lists (DnD needs real DOM focus).\n // Section-based lists keep isVirtualized: true to preserve ARIA attributes.\n isVirtualized: !isReorderable,\n shouldUseVirtualFocus: shouldUseVirtualFocus ?? false,\n escapeKeyBehavior: onEscape ? 'none' : 'clearSelection',\n onSelectionChange: wrappedOnSelectionChange,\n },\n listState,\n listRef,\n );\n\n const { isFocused, focusProps } = useFocus();\n\n // The focused key outlives focus, so an option shows as focused only while\n // the list has it. A component whose input moves the key (FilterListBox)\n // says whether focus is within it, in any focus mode. Otherwise the list's\n // own focus decides, and with virtual focus the focused key alone marks it.\n const isListFocused =\n isFocusWithin ??\n (shouldUseVirtualFocus || listState.selectionManager.isFocused);\n\n // Scroll container ref for virtualization\n const scrollRef = useRef<HTMLDivElement>(null);\n\n const rowVirtualizer = useVirtualizer({\n count: shouldVirtualize ? itemsArray.length : 0,\n getScrollElement: () => scrollRef.current,\n // Use the actual item key to ensure React properly reconciles DOM elements\n // when items are filtered, added, or removed. Without this, the virtualizer\n // uses index-based keys which causes DOM reuse issues and style leaking.\n // A new key function makes the virtualizer recompute positions from the\n // heights it has measured per key. ListBox isn't compiled (useVirtualizer),\n // so that is every render. Reading `itemsArray` keeps new items bringing a\n // new function should it ever compile.\n getItemKey: (index: number) => itemsArray[index]?.key ?? index,\n estimateSize: (index: number) => {\n const currentItem: any = itemsArray[index];\n\n if (currentItem?.props?.description) {\n return SIZES.XL;\n }\n return SIZES[SIZE_NAME_TO_KEY[size] as keyof typeof SIZES];\n },\n // Options are positioned absolutely here, so their margins space nothing.\n // `1` matches the `1bw` default.\n gap: listGap ?? 1,\n overscan: 10,\n });\n\n // The virtualizer caches positions without the gap, so re-measure when it\n // changes. Not when the items do: their positions follow `getItemKey`, and\n // `measure()` would drop every measured height.\n useEffect(() => {\n if (shouldVirtualize) {\n rowVirtualizer.measure();\n }\n }, [shouldVirtualize, rowVirtualizer, listGap]);\n\n // Keep focused item visible, but only for keyboard navigation\n useLayoutEffect(() => {\n const focusedKey = listState.selectionManager.focusedKey;\n if (focusedKey == null) return;\n\n // Only scroll on keyboard navigation\n if (lastFocusSourceRef.current !== 'keyboard') return;\n\n const scrollElement = scrollRef.current;\n if (!scrollElement) return;\n\n const itemElement = scrollElement.querySelector(\n `[data-key=\"${CSS.escape(String(focusedKey))}\"]`,\n ) as HTMLElement;\n if (!itemElement) return;\n\n const scrollTop = scrollElement.scrollTop;\n const viewportHeight = scrollElement.clientHeight;\n const viewportBottom = scrollTop + viewportHeight;\n\n const itemRect = itemElement.getBoundingClientRect();\n const scrollRect = scrollElement.getBoundingClientRect();\n\n // Calculate item position relative to scroll container\n const itemTop = itemRect.top - scrollRect.top + scrollTop;\n const itemBottom = itemTop + itemRect.height;\n\n // Check if the item is fully visible in the viewport\n const isAlreadyVisible =\n itemTop >= scrollTop && itemBottom <= viewportBottom;\n\n if (!isAlreadyVisible) {\n // Use scrollIntoView with block: 'nearest' to minimize scroll jumps\n itemElement.scrollIntoView({ block: 'nearest', behavior: 'auto' });\n }\n }, [listState.selectionManager.focusedKey, itemsArray]);\n\n // Merge React Aria listbox props with custom keyboard props so both sets of\n // event handlers (e.g. Arrow navigation *and* our Escape handler) are\n // preserved.\n const mergedListBoxProps = mergeProps(listBoxProps, keyboardProps);\n\n // React Aria keeps a disabled list a Tab stop while no option has focus.\n if (isDisabled) {\n delete mergedListBoxProps.tabIndex;\n }\n\n // Ordered keys for DnD reordering\n const orderedKeys = useMemo(() => {\n if (!isReorderable) {\n return [];\n }\n\n return itemsArray\n .filter((i) => i.type === 'item')\n .map((i) => String(i.key));\n }, [isReorderable, itemsArray]);\n\n const mods = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n focused: isFocused,\n header: !!header || (showSelectAll && props.selectionMode === 'multiple'),\n footer: !!footer,\n selectAll: showSelectAll && props.selectionMode === 'multiple',\n ...externalMods,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isFocused,\n header,\n footer,\n showSelectAll,\n props.selectionMode,\n externalMods,\n ],\n );\n\n const listGapTokens =\n listGap == null ? undefined : { '$list-gap': `${listGap}px` };\n\n const listBoxField = (\n <ListBoxWrapperElement\n ref={ref}\n qa=\"ListBoxWrapper\"\n mods={mods}\n styles={styles}\n data-shape={shape}\n >\n {header ? (\n <StyledHeader styles={headerStyles} data-size={size}>\n {header}\n </StyledHeader>\n ) : (\n <div role=\"presentation\" />\n )}\n {showSelectAll && props.selectionMode === 'multiple' ? (\n <SelectAllOption\n label={selectAllLabel}\n state={listState}\n lastFocusSourceRef={lastFocusSourceRef}\n isSelected={selectAllState.isSelected}\n isIndeterminate={selectAllState.isIndeterminate}\n isDisabled={isDisabled}\n isCheckable={isCheckable}\n size={size}\n allValueProps={allValueProps}\n onClick={handleSelectAllClick}\n />\n ) : (\n <>\n <div role=\"presentation\" />\n <div role=\"presentation\" />\n </>\n )}\n {/* Scroll container wrapper */}\n <ListBoxScrollElement ref={scrollRef} mods={mods} {...focusProps}>\n {listState.collection.size === 0 ? (\n <Item preset=\"t4\" color=\"#dark-03\" size={size} padding=\"(.5x - 1bw)\">\n {emptyLabel}\n </Item>\n ) : isReorderable ? (\n <DraggableListBox\n state={listState}\n listRef={listRef}\n orderedKeys={orderedKeys}\n onReorder={onReorder}\n >\n {(dragState, dropState, collectionProps) => (\n <ListElement\n qa={qa || 'ListBox'}\n {...mergeProps(mergedListBoxProps, collectionProps)}\n ref={listRef}\n styles={listStyles}\n tokens={listGapTokens}\n aria-disabled={isDisabled || undefined}\n mods={{ sections: false }}\n data-shape={shape}\n data-input-type=\"listbox\"\n >\n {itemsArray\n .filter((item) => item.type === 'item')\n .map((item) => (\n <Option\n key={item.key}\n size={size}\n item={item}\n state={listState}\n styles={optionStyles}\n highlight={optionHighlight}\n isParentDisabled={isDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n lastFocusSourceRef={lastFocusSourceRef}\n dragState={dragState}\n dropState={dropState}\n onClick={onOptionClick}\n />\n ))}\n </ListElement>\n )}\n </DraggableListBox>\n ) : (\n <ListElement\n qa={qa || 'ListBox'}\n {...mergedListBoxProps}\n ref={listRef}\n styles={listStyles}\n tokens={listGapTokens}\n aria-disabled={isDisabled || undefined}\n mods={{ sections: hasSections }}\n data-shape={shape}\n data-input-type=\"listbox\"\n style={\n shouldVirtualize\n ? {\n position: 'relative',\n height: `${rowVirtualizer.getTotalSize()}px`,\n }\n : undefined\n }\n >\n {shouldVirtualize\n ? rowVirtualizer.getVirtualItems().map((virtualItem) => {\n const item = itemsArray[virtualItem.index];\n\n return (\n <Option\n key={item.key}\n size={size}\n item={item}\n state={listState}\n styles={optionStyles}\n highlight={optionHighlight}\n isParentDisabled={isDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n // Measures the option's real height; the virtualizer adds the gap.\n virtualRef={rowVirtualizer.measureElement as any}\n virtualStyle={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n transform: `translateY(${virtualItem.start}px)`,\n }}\n virtualIndex={virtualItem.index}\n lastFocusSourceRef={lastFocusSourceRef}\n onClick={onOptionClick}\n />\n );\n })\n : (() => {\n const renderedItems: ReactNode[] = [];\n let isFirstSection = true;\n\n for (const item of listState.collection) {\n if (item.type === 'section') {\n if (!isFirstSection) {\n renderedItems.push(\n <StyledDivider\n key={`divider-${String(item.key)}`}\n role=\"separator\"\n aria-orientation=\"horizontal\"\n />,\n );\n }\n\n renderedItems.push(\n <ListBoxSection\n key={item.key}\n item={item}\n state={listState}\n optionStyles={optionStyles}\n optionHighlight={optionHighlight}\n headingStyles={headingStyles}\n sectionStyles={sectionStyles}\n isParentDisabled={isDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n size={size}\n lastFocusSourceRef={lastFocusSourceRef}\n onClick={onOptionClick}\n />,\n );\n\n isFirstSection = false;\n } else {\n renderedItems.push(\n <Option\n key={item.key}\n size={size}\n item={item}\n state={listState}\n styles={optionStyles}\n highlight={optionHighlight}\n isParentDisabled={isDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n lastFocusSourceRef={lastFocusSourceRef}\n onClick={onOptionClick}\n />,\n );\n }\n }\n\n return renderedItems;\n })()}\n </ListElement>\n )}\n </ListBoxScrollElement>\n {footer ? (\n <StyledFooter styles={footerStyles} data-size={size}>\n {footer}\n </StyledFooter>\n ) : (\n <div role=\"presentation\" />\n )}\n </ListBoxWrapperElement>\n );\n\n return wrapWithField<Omit<CubeListBoxProps<T>, 'children'>>(\n listBoxField,\n ref,\n props,\n );\n}) as unknown as (<T>(\n props: CubeListBoxProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement) & {\n Item: typeof CollectionItem;\n Section: typeof BaseSection;\n};\n\nfunction Option({\n size = 'medium',\n item,\n state,\n styles,\n highlight,\n isParentDisabled,\n isInvalid,\n isValid,\n focusOnHover = false,\n isListFocused = false,\n isCheckable,\n onClick: onOptionClick,\n virtualStyle,\n virtualRef,\n virtualIndex,\n lastFocusSourceRef,\n dragState,\n dropState,\n}: {\n size?: 'small' | 'medium' | 'large';\n item: any;\n state: any;\n styles?: Styles;\n highlight?: string;\n isParentDisabled?: boolean;\n isInvalid?: boolean;\n isValid?: boolean;\n focusOnHover?: boolean;\n /** Whether the list has focus, so its focused option shows as focused */\n isListFocused?: boolean;\n isCheckable?: boolean;\n onClick?: (key: Key) => void;\n /** Inline style applied when virtualized (absolute positioning etc.) */\n virtualStyle?: CSSProperties;\n /** react-virtual's `measureElement`, called with the option after every commit */\n virtualRef?: (element: HTMLElement | null) => void;\n /** Virtual index from react-virtual for data-index attribute */\n virtualIndex?: number;\n /** Ref to track the source of focus changes */\n lastFocusSourceRef?: MutableRefObject<'keyboard' | 'mouse' | 'other'>;\n /** Drag state from DraggableCollection. When provided, enables drag-and-drop. */\n dragState?: DraggableCollectionState;\n /** Drop state from DraggableCollection. When provided, renders drop indicators. */\n dropState?: DroppableCollectionState;\n}) {\n const localRef = useRef<HTMLLIElement>(null);\n\n // Measure during the commit. After it, the browser can paint the option at\n // its estimated height first, overlapping the next one for a frame.\n useLayoutEffect(() => {\n virtualRef?.(localRef.current);\n });\n\n const isDisabled = isParentDisabled || state.disabledKeys.has(item.key);\n const isSelected = state.selectionManager.isSelected(item.key);\n\n // Drag-and-drop support — only enable when both states are provided\n const isDraggable = !!dragState && !!dropState;\n\n // useDraggableItem must be called unconditionally (Rules of Hooks).\n // When dragState is undefined, we pass a minimal mock state to satisfy the hook.\n const mockDragState = useMemo(\n () => createMockDragState(state.collection, state.selectionManager),\n [state.collection, state.selectionManager],\n );\n\n const dragResult = useDraggableItem(\n { key: item.key },\n dragState ?? mockDragState,\n );\n const effectiveDragProps = isDraggable ? dragResult.dragProps : {};\n const isDragging = isDraggable && !!dragState?.isDragging(item.key);\n\n const { hoverProps, isHovered } = useHover({ isDisabled });\n\n const { optionProps, isPressed, labelProps, descriptionProps } = useOption(\n {\n key: item.key,\n isDisabled,\n isSelected,\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: focusOnHover,\n },\n state,\n localRef,\n );\n\n const isFocused =\n !isDisabled &&\n isListFocused &&\n state.selectionManager.focusedKey === item.key;\n\n // Filter out service props - all remaining props can be passed to Item\n const filteredItemProps = filterCollectionItemProps(item.props);\n\n // Determine icon: drag handle > checkbox > user icon > default\n const effectiveIcon = useMemo(() => {\n if (isDraggable) {\n if (!filteredItemProps.icon || isHovered) {\n return <GripVerticalIcon size={14} />;\n }\n }\n\n if (\n !isCheckable ||\n state.selectionManager.selectionMode !== 'multiple' ||\n filteredItemProps.icon\n ) {\n return (\n filteredItemProps.icon ??\n (state.selectionManager.selectionMode !== 'multiple' ? null : undefined)\n );\n }\n\n return renderCheckboxIcon({\n isSelected,\n isDisabled,\n isFocused,\n isHovered,\n isInvalid,\n isValid,\n });\n }, [\n isDraggable,\n isCheckable,\n state.selectionManager.selectionMode,\n isSelected,\n isDisabled,\n isFocused,\n isHovered,\n isInvalid,\n isValid,\n filteredItemProps.icon,\n ]);\n\n // Side-effects layered on top of React Aria's own onClick. The underlying\n // React Aria onClick is already chained via mergeProps below, so this handler\n // must NOT call optionProps.onClick again — re-invoking it would trigger\n // usePress's virtual-click branch and double-fire onPress (and toggle\n // selection twice in multiple mode).\n const handleOptionExtras = (e: MouseEvent) => {\n if (lastFocusSourceRef) {\n lastFocusSourceRef.current = 'mouse';\n }\n\n state.selectionManager.setFocusedKey(item.key);\n\n if (!onOptionClick) {\n return;\n }\n\n // In checkable multiple mode, suppress the callback when the click landed\n // inside the checkbox wrapper — that area is reserved for toggle-only\n // behaviour (React Aria still handles the toggle via the chained onClick).\n if (isCheckable && state.selectionManager.selectionMode === 'multiple') {\n const clickTarget = e.target as HTMLElement;\n const checkboxElement = localRef.current?.querySelector(\n '[data-element=\"CheckboxWrapper\"]',\n );\n\n if (\n checkboxElement &&\n (checkboxElement === clickTarget ||\n checkboxElement.contains(clickTarget))\n ) {\n return;\n }\n }\n\n onOptionClick(item.key);\n };\n\n // Filter out React Aria props that shouldn't reach the DOM\n const {\n onKeyDown,\n onKeyUp,\n tabIndex,\n 'aria-selected': ariaSelected,\n 'aria-disabled': ariaDisabled,\n role,\n ...filteredOptionProps\n } = optionProps;\n\n const theme = getValidationTheme(\n 'default' as const,\n { isInvalid, isValid },\n { includeValid: true },\n );\n\n const listBoxItem = (\n <ListBoxItem\n ref={localRef}\n data-key={String(item.key)}\n {...mergeProps(\n filteredOptionProps,\n hoverProps,\n filteredItemProps,\n {\n onClick: handleOptionExtras,\n onKeyDown,\n onKeyUp,\n tabIndex,\n 'aria-selected': ariaSelected,\n 'aria-disabled': ariaDisabled,\n role,\n },\n effectiveDragProps,\n )}\n theme={theme}\n style={virtualStyle}\n data-size={size}\n data-index={virtualIndex}\n size={size}\n display={isDraggable ? 'grid' : undefined}\n isSelected={isSelected}\n isDisabled={isDisabled}\n icon={effectiveIcon}\n highlight={highlight}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n styles={mergeStyles(styles, filteredItemProps.styles)}\n defaultTooltipPlacement=\"right\"\n mods={{\n listboxitem: true,\n focused: isFocused,\n pressed: isPressed,\n dragging: isDragging,\n draggable: isDraggable,\n gripIcon: isDraggable && (!filteredItemProps.icon || isHovered),\n valid: isSelected && !!isValid && !isInvalid,\n invalid: isSelected && !!isInvalid,\n checkable: isCheckable,\n hovered: isHovered,\n all: false, // This will be set to true for SelectAllOption\n }}\n >\n {item.rendered}\n </ListBoxItem>\n );\n\n if (!isDraggable || !dropState) {\n return listBoxItem;\n }\n\n return (\n <>\n <ListBoxDropIndicator\n target={{ type: 'item', key: item.key, dropPosition: 'before' }}\n dropState={dropState}\n />\n {listBoxItem}\n <ListBoxDropIndicator\n target={{ type: 'item', key: item.key, dropPosition: 'after' }}\n dropState={dropState}\n />\n </>\n );\n}\n\n// =============================================================================\n// Drop Indicator for DnD reordering\n// =============================================================================\n\nfunction ListBoxDropIndicator({\n target,\n dropState,\n}: {\n target: DropTarget;\n dropState: DroppableCollectionState;\n}) {\n const ref = useRef<HTMLLIElement>(null);\n const { dropIndicatorProps, isHidden, isDropTarget } = useDropIndicator(\n { target },\n dropState,\n ref,\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <ListBoxDropIndicatorElement\n ref={ref}\n role=\"option\"\n {...dropIndicatorProps}\n mods={{ 'drop-indicator': true, 'drop-target': isDropTarget }}\n >\n <div data-element=\"Indicator\" />\n </ListBoxDropIndicatorElement>\n );\n}\n\ninterface ListBoxSectionProps<T> {\n item: any;\n state: any;\n optionStyles?: Styles;\n optionHighlight?: string;\n headingStyles?: Styles;\n sectionStyles?: Styles;\n isParentDisabled?: boolean;\n isInvalid?: boolean;\n isValid?: boolean;\n focusOnHover?: boolean;\n isListFocused?: boolean;\n isCheckable?: boolean;\n onClick?: (key: Key) => void;\n size?: 'small' | 'medium' | 'large';\n lastFocusSourceRef?: MutableRefObject<'keyboard' | 'mouse' | 'other'>;\n}\n\nfunction ListBoxSection<T>(props: ListBoxSectionProps<T>) {\n const {\n item,\n state,\n optionStyles,\n optionHighlight,\n headingStyles,\n sectionStyles,\n isParentDisabled,\n isInvalid,\n isValid,\n focusOnHover,\n isListFocused,\n isCheckable,\n onClick: onOptionClick,\n lastFocusSourceRef,\n } = props;\n const heading = item.rendered;\n\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading,\n 'aria-label': item['aria-label'],\n });\n\n return (\n <SectionWrapperElement {...itemProps} styles={sectionStyles}>\n {heading && (\n <StyledSectionHeading\n {...headingProps}\n size={props.size}\n styles={headingStyles}\n >\n {heading}\n </StyledSectionHeading>\n )}\n <SectionListElement {...groupProps}>\n {[...item.childNodes]\n .filter((node: any) => state.collection.getItem(node.key))\n .map((node: any) => (\n <Option\n key={node.key}\n size={props.size}\n item={node}\n state={state}\n styles={optionStyles}\n highlight={optionHighlight}\n isParentDisabled={isParentDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n lastFocusSourceRef={lastFocusSourceRef}\n onClick={onOptionClick}\n />\n ))}\n </SectionListElement>\n </SectionWrapperElement>\n );\n}\n\ntype SectionComponent = typeof BaseSection;\n\nconst ListBoxSectionComponent = Object.assign(BaseSection, {\n displayName: 'Section',\n}) as SectionComponent;\n\nListBox.Item = CollectionItem;\n\nListBox.Section = ListBoxSectionComponent;\n\nObject.defineProperty(ListBox, 'cubeInputType', {\n value: 'ListBox',\n enumerable: false,\n configurable: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,MAAMoE,wBAAwBxD,MAAM;CAClCyD,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,aAAa;EACbC,UAAU;EACVC,MAAM;EACNC,KAAK;EACLC,UAAU;EACVC,QAAQ;GACN,IAAI;GACJ,4BAA0B;GAC1B,0BAAwB;GACzB;EACDC,OA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4Q;OAAAA,MAAA5Q,EAAA;AAAA,QAhCxB4Q;;AAsCJ,MAAME,0BAA0BC,OAAOC,OAAO1V,SAAa,EACzD2V,aAAa,WACd,CAAC;AAEF7K,QAAQtJ,OAAOH;AAEfyJ,QAAQ/K,UAAUyV;AAElBC,OAAOG,eAAe9K,SAAS,iBAAiB;CAC9CK,OAAO;CACP0K,YAAY;CACZC,cAAc;CACf,CAAC"}
1
+ {"version":3,"file":"ListBox.js","names":["useHover","IconMinus","useVirtualizer","BASE_STYLES","BasePropsWithoutChildren","BaseStyleProps","COLOR_STYLES","ColorStyleProps","mergeStyles","OUTER_STYLES","OuterStyleProps","Styles","tasty","CSSProperties","ForwardedRef","forwardRef","MutableRefObject","ReactElement","ReactNode","RefObject","useEffect","useLayoutEffect","useMemo","useRef","useState","AriaListBoxProps","DropTarget","useDraggableItem","useDropIndicator","useKeyboard","useListBox","useListBoxSection","useOption","Section","BaseSection","DraggableCollectionState","DroppableCollectionState","ListProps","useListState","useWarn","useI18n","CheckIcon","GripVerticalIcon","Icon","SIZE_NAME_TO_KEY","SIZES","mergeProps","useCombinedRefs","allowEscapeToPropagate","useFocus","extractStyles","StyledDivider","StyledFooter","StyledHeader","StyledSectionHeading","CollectionItem","CubeCollectionItemProps","filterCollectionItemProps","Item","getValidationMods","getValidationTheme","useFieldProps","wrapWithField","createMockDragState","DraggableListBox","CollectionBase","Key","FieldBaseProps","ListBoxWrapperElement","qa","styles","display","gridColumns","gridRows","flow","gap","position","radius","color","transition","outline","focused","border","valid","invalid","disabled","ListElement","as","padding","listStyle","boxSizing","margin","height","ListBoxScrollElement","overflow","scrollbar","ListBoxItem","disableActionsFocus","all","outlineOffset","cursor","draggable","opacity","gripIcon","ListBoxDropIndicatorElement","zIndex","pointerEvents","Indicator","$","left","right","top","fill","SectionWrapperElement","SectionListElement","ListBoxCheckbox","placeItems","width","flexShrink","ListBoxCheckboxWrapper","placeContent","placeSelf","renderCheckboxIcon","isSelected","isDisabled","isFocused","isHovered","isInvalid","isValid","mods","selected","hovered","CubeListBoxProps","Omit","T","listStyles","optionStyles","optionHighlight","sectionStyles","headingStyles","listGap","selectedKey","selectedKeys","defaultSelectedKey","defaultSelectedKeys","onSelectionChange","key","selectionMode","listRef","HTMLUListElement","disallowEmptySelection","allowDuplicateSelectionEvents","shouldFocusWrap","stateRef","focusOnHover","header","footer","headerStyles","footerStyles","Record","size","disableSelectionToggle","shouldUseVirtualFocus","isFocusWithin","onEscape","isCheckable","onOptionClick","showSelectAll","selectAllLabel","allValueProps","Partial","filter","nodes","Iterable","emptyLabel","shape","isReorderable","onReorder","newOrder","PROP_STYLES","SelectAllOption","label","isIndeterminate","state","lastFocusSourceRef","onClick","propagate","t","hoverProps","resolvedLabel","undefined","markIcon","localRef","HTMLLIElement","checkboxIcon","indeterminate","handleOptionClick","e","current","selectionManager","clickTarget","target","HTMLElement","checkboxElement","querySelector","contains","listboxitem","checkable","toStatelySelection","value","isMultiple","Set","ListBox","props","ref","HTMLDivElement","valuePropsMapper","onChange","fieldProps","Array","isArray","extra","id","labelStyles","isRequired","necessityIndicator","message","description","externalMods","labelSuffix","form","otherProps","forceUpdate","lastSelectedKeyRef","externalSelectionHandler","wrappedOnSelectionChange","keys","prevKey","from","listStateProps","disabledBehavior","selection","defaultSelection","listState","first","selectAllState","rawSelection","collection","disabledKeys","handleSelectAllClick","clearSelection","selectAll","args","keyboardProps","onKeyDown","itemsArray","hasSections","some","i","type","shouldVirtualize","listBoxProps","toString","isVirtualized","escapeKeyBehavior","focusProps","isListFocused","scrollRef","rowVirtualizer","count","length","getScrollElement","getItemKey","index","estimateSize","currentItem","XL","overscan","measure","focusedKey","scrollElement","itemElement","CSS","escape","String","scrollTop","viewportHeight","clientHeight","viewportBottom","itemRect","getBoundingClientRect","scrollRect","itemTop","itemBottom","isAlreadyVisible","scrollIntoView","block","behavior","mergedListBoxProps","tabIndex","orderedKeys","map","listGapTokens","listBoxField","dragState","dropState","collectionProps","sections","item","getTotalSize","getVirtualItems","virtualItem","measureElement","transform","start","renderedItems","isFirstSection","push","Option","highlight","isParentDisabled","virtualStyle","virtualRef","virtualIndex","element","has","isDraggable","mockDragState","dragResult","effectiveDragProps","dragProps","isDragging","optionProps","isPressed","labelProps","descriptionProps","shouldSelectOnPressUp","shouldFocusOnHover","filteredItemProps","effectiveIcon","icon","handleOptionExtras","MouseEvent","setFocusedKey","onKeyUp","ariaSelected","ariaDisabled","role","filteredOptionProps","theme","const","includeValid","listBoxItem","pressed","dragging","rendered","dropPosition","ListBoxDropIndicator","t0","_c","t1","dropIndicatorProps","isHidden","isDropTarget","t2","t3","Symbol","for","t4","ListBoxSectionProps","ListBoxSection","heading","itemProps","headingProps","groupProps","childNodes","node","getItem","node_0","t5","t6","SectionComponent","ListBoxSectionComponent","Object","assign","displayName","defineProperty","enumerable","configurable"],"sources":["../../../../src/components/fields/ListBox/ListBox.tsx"],"sourcesContent":["import { useHover } from '@react-aria/interactions';\nimport { IconMinus } from '@tabler/icons-react';\nimport { useVirtualizer } from '@tanstack/react-virtual';\nimport {\n BASE_STYLES,\n BasePropsWithoutChildren,\n BaseStyleProps,\n COLOR_STYLES,\n ColorStyleProps,\n mergeStyles,\n OUTER_STYLES,\n OuterStyleProps,\n Styles,\n tasty,\n} from '@tenphi/tasty';\nimport {\n CSSProperties,\n ForwardedRef,\n forwardRef,\n MutableRefObject,\n ReactElement,\n ReactNode,\n RefObject,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n AriaListBoxProps,\n DropTarget,\n useDraggableItem,\n useDropIndicator,\n useKeyboard,\n useListBox,\n useListBoxSection,\n useOption,\n} from 'react-aria';\nimport {\n Section as BaseSection,\n DraggableCollectionState,\n DroppableCollectionState,\n ListProps,\n useListState,\n} from 'react-stately';\n\nimport { useWarn } from '../../../_internal/hooks/use-warn';\nimport { useI18n } from '../../../i18n';\nimport { CheckIcon } from '../../../icons/CheckIcon';\nimport { GripVerticalIcon } from '../../../icons/GripVerticalIcon';\nimport { Icon } from '../../../icons/Icon';\nimport { SIZE_NAME_TO_KEY, SIZES } from '../../../tokens';\nimport { mergeProps, useCombinedRefs } from '../../../utils/react';\nimport { allowEscapeToPropagate } from '../../../utils/react/escapePropagation';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { extractStyles } from '../../../utils/styles';\n// Import Menu styled components for header and footer\nimport {\n StyledDivider,\n StyledFooter,\n StyledHeader,\n StyledSectionHeading,\n} from '../../actions/Menu/styled';\nimport {\n CollectionItem,\n CubeCollectionItemProps,\n filterCollectionItemProps,\n} from '../../CollectionItem';\nimport { Item } from '../../content/Item/Item';\nimport {\n getValidationMods,\n getValidationTheme,\n useFieldProps,\n wrapWithField,\n} from '../../form';\nimport { createMockDragState } from '../../shared/DraggableCollection';\n\nimport { DraggableListBox } from './DraggableListBox';\n\nimport type { CollectionBase, Key } from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\n\nconst ListBoxWrapperElement = tasty({\n qa: 'ListBox',\n styles: {\n display: 'grid',\n gridColumns: '1sf',\n gridRows: 'max-content max-content max-content 1sf max-content',\n flow: 'column',\n gap: 0,\n position: 'relative',\n radius: {\n '': '1cr',\n '[data-shape=\"popover\"]': '(1cr - 1bw)',\n '[data-shape=\"plain\"]': '0',\n },\n color: '#dark-02',\n transition: 'theme',\n outline: {\n '': '#purple-03.0',\n 'invalid & focused': '#danger.50',\n focused: '#purple-03',\n },\n border: {\n '': true,\n focused: '#primary-text',\n valid: '#success-text.50',\n invalid: '#danger-text.50',\n disabled: true,\n '[data-shape=\"plain\"] | [data-shape=\"popover\"] | searchable': false,\n },\n },\n});\n\nconst ListElement = tasty({\n as: 'ul',\n styles: {\n // The space between options. Set from `listGap`, which also hands the\n // same number to the virtualizer.\n '$list-gap': '1bw',\n display: 'block',\n // The space kept below the last option. Padding, so `listStyles` can take\n // it away, and outside the content box, where a virtualized list sets its\n // own height.\n padding: '.5x bottom',\n listStyle: 'none',\n boxSizing: 'content-box',\n margin: {\n '': '.5x .5x 0 .5x',\n '[data-shape=\"plain\"]': '0',\n },\n height: 'max-content',\n },\n});\n\n// NEW: dedicated scroll container for ListBox\nconst ListBoxScrollElement = tasty({\n as: 'div',\n styles: {\n display: 'grid',\n gridColumns: '1sf',\n gridRows: '1sf',\n overflow: 'auto',\n scrollbar: 'styled',\n },\n});\n\n// Create an extended Item for ListBox options with 'all' modifier support\nconst ListBoxItem = tasty(Item, {\n as: 'li',\n disableActionsFocus: true,\n styles: {\n display: 'grid',\n margin: {\n '': '$list-gap bottom',\n // Mid-drag the last option is followed by a drop indicator, which takes\n // the gap back (`ListBoxDropIndicatorElement`). Not `:has(~ …)`: see\n // AGENTS.md → Styling.\n ':last-child': '0',\n all: '.5x',\n },\n // Inside the option: options sit a hairline apart, so a ring outside one\n // would cover its neighbour, and the scroll box would clip it at the edges.\n outlineOffset: '-1bw',\n Icon: {\n cursor: {\n draggable: 'grab',\n },\n opacity: {\n gripIcon: '.4',\n 'gripIcon & hovered': '1',\n },\n transition: {\n draggable: 'opacity',\n },\n },\n },\n});\n\n// Horizontal drop indicator for DnD reordering\nconst ListBoxDropIndicatorElement = tasty({\n as: 'li',\n styles: {\n zIndex: 10,\n position: 'relative',\n pointerEvents: 'none',\n height: 0,\n // After the last option: cancels the `$list-gap` that option keeps while\n // it is not the last child, so the list holds its height mid-drag. An\n // `optionStyles` margin replaces that gap, and this then overshoots.\n margin: {\n '': 0,\n ':last-child': '(-1 * $list-gap) top',\n },\n opacity: {\n '': 0,\n 'drop-target': 1,\n },\n\n Indicator: {\n $: '>',\n position: 'absolute',\n left: '.5x',\n right: '.5x',\n // Centred in the gap between two options, or on the edge of the list.\n top: {\n '': '(-1px - $list-gap / 2)',\n ':first-child | :last-child': '-1px',\n },\n height: '2px',\n fill: '#primary',\n radius: 'round',\n },\n },\n});\n\nconst SectionWrapperElement = tasty({\n as: 'li',\n styles: {\n display: 'block',\n },\n});\n\nconst SectionListElement = tasty({\n qa: 'ListBoxSectionList',\n as: 'ul',\n styles: {\n display: 'flex',\n gap: '0',\n flow: 'column',\n margin: '0',\n padding: '0',\n listStyle: 'none',\n },\n});\n\n// Checkbox component for multiple selection options\nconst ListBoxCheckbox = tasty({\n as: 'div',\n styles: {\n display: 'grid',\n placeItems: 'center',\n radius: '.5r',\n width: '(2x - 2bw)',\n height: '(2x - 2bw)',\n flexShrink: 0,\n transition: 'theme',\n opacity: {\n '': 0,\n 'selected | indeterminate | hovered | focused': 1,\n },\n fill: {\n '': '#surface',\n 'selected | indeterminate': '#primary',\n 'invalid & !(selected | indeterminate)': '#surface',\n 'invalid & (selected | indeterminate)': '#danger',\n disabled: '#dark.12',\n },\n color: {\n '': '#clear',\n 'selected | indeterminate': '#white',\n },\n border: {\n '': '#dark.30',\n invalid: '#danger',\n 'disabled | ((selected | indeterminate) & !invalid)': '#clear',\n },\n },\n});\n\nconst ListBoxCheckboxWrapper = tasty({\n as: 'div',\n styles: {\n display: 'grid',\n placeItems: 'center',\n placeContent: 'center',\n cursor: '$pointer',\n placeSelf: 'stretch',\n },\n});\n\nfunction renderCheckboxIcon({\n isSelected,\n isDisabled,\n isFocused,\n isHovered,\n isInvalid,\n isValid,\n}: {\n isSelected: boolean;\n isDisabled: boolean;\n isFocused: boolean;\n isHovered: boolean;\n isInvalid?: boolean;\n isValid?: boolean;\n}) {\n const mods = {\n selected: isSelected,\n disabled: isDisabled,\n focused: isFocused,\n hovered: isHovered,\n ...getValidationMods({ isInvalid, isValid }),\n };\n\n return (\n <ListBoxCheckboxWrapper data-element=\"CheckboxWrapper\" mods={mods}>\n <ListBoxCheckbox data-element=\"Checkbox\" mods={mods}>\n <CheckIcon size={12} stroke={3} />\n </ListBoxCheckbox>\n </ListBoxCheckboxWrapper>\n );\n}\n\nexport interface CubeListBoxProps<T>\n extends Omit<\n AriaListBoxProps<T>,\n 'autoFocus' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange'\n >,\n CollectionBase<T>,\n FieldBaseProps<Key | readonly Key[] | null | undefined>,\n BasePropsWithoutChildren,\n // The style props `PROP_STYLES` extracts at runtime and the docs list;\n // without these a `height` or `width` worked but failed to type-check.\n BaseStyleProps,\n OuterStyleProps,\n ColorStyleProps {\n /** Custom styles for the list container */\n listStyles?: Styles;\n /** Custom styles for individual options */\n optionStyles?: Styles;\n /**\n * Substring to highlight within each option's (text) children. Typically the\n * current search query. Matching is case-insensitive.\n */\n optionHighlight?: string;\n /** Custom styles for section containers */\n sectionStyles?: Styles;\n /** Custom styles for section headings */\n headingStyles?: Styles;\n /**\n * Space between options, in pixels. Defaults to a hairline (`1bw`). It\n * applies to flat, virtualized, sectioned and reorderable lists alike.\n */\n listGap?: number;\n /** Whether the ListBox is disabled */\n isDisabled?: boolean;\n /** The selected key in controlled single selection mode */\n selectedKey?: Key | null;\n /** The selected keys in controlled multiple selection mode. Use \"all\" to select all items or an array of keys */\n selectedKeys?: 'all' | Key[];\n /** The default selected key in uncontrolled single selection mode */\n defaultSelectedKey?: Key | null;\n /** The default selected keys in uncontrolled multiple selection mode. Use \"all\" to select all items or an array of keys */\n defaultSelectedKeys?: 'all' | Key[];\n /** Callback fired when selection changes */\n onSelectionChange?: (key: Key | null | 'all' | Key[]) => void;\n /** The selection mode of the ListBox */\n selectionMode?: 'single' | 'multiple';\n /** Ref for accessing the list DOM element */\n listRef?: RefObject<HTMLUListElement | null>;\n /** Whether to disallow empty selection */\n disallowEmptySelection?: boolean;\n /**\n * Whether `onSelectionChange` should fire even when the new selection equals the\n * current one (e.g. re-selecting the already-selected item with `disallowEmptySelection`).\n * React Stately suppresses such duplicate events by default. Popover-based wrappers\n * (Picker, FilterPicker) rely on the duplicate event to close the popover on re-select.\n */\n allowDuplicateSelectionEvents?: boolean;\n /** Whether to wrap focus when reaching the end of the list */\n shouldFocusWrap?: boolean;\n /**\n * Ref to access the internal ListState instance.\n * This allows parent components to access selection state and other list functionality.\n */\n stateRef?: RefObject<any | null>;\n\n /**\n * Whether moving the pointer over an option will move DOM focus to that option.\n * Set to false for components that keep DOM focus outside (e.g. searchable FilterListBox).\n * Defaults to true.\n */\n focusOnHover?: boolean;\n /** Custom header content displayed above the list */\n header?: ReactNode;\n /** Custom footer content displayed below the list */\n footer?: ReactNode;\n /** Custom styles for the header */\n headerStyles?: Styles;\n /** Custom styles for the footer */\n footerStyles?: Styles;\n /** Additional modifiers for styling the ListBox */\n mods?: Record<string, boolean>;\n /** Size variant of the ListBox */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * When `true`, clicking an already-selected item keeps it selected instead of toggling it off.\n * Useful when embedding ListBox inside components like ComboBox.\n */\n disableSelectionToggle?: boolean;\n\n /**\n * Whether to use virtual focus for keyboard navigation.\n * When true, DOM focus stays outside individual option elements (useful for searchable lists).\n * Defaults to false for backward compatibility.\n */\n shouldUseVirtualFocus?: boolean;\n\n /**\n * For a list whose focused option is moved from an input outside it, as\n * FilterListBox's search input does: whether focus is within that input's\n * component. The focused option is marked only while it is `true`. Unset, the\n * list's own focus decides, and with `shouldUseVirtualFocus` the focused\n * option is always marked.\n */\n isFocusWithin?: boolean;\n\n /**\n * Callback fired when the user presses Escape key.\n * When provided, this prevents React Aria's default Escape behavior (selection reset).\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 * Whether to show the \"Select All\" option in multiple selection mode.\n * This adds a select all option to the header that allows selecting/deselecting all items.\n */\n showSelectAll?: boolean;\n\n /**\n * Label for the \"Select All\" option. Defaults to \"Select All\".\n */\n selectAllLabel?: ReactNode;\n\n /**\n * Props to apply to the \"Select All\" option.\n */\n allValueProps?: Partial<CubeCollectionItemProps<T>>;\n\n /**\n * Filter function to apply to the collection nodes.\n * Takes an iterable of nodes and returns a filtered iterable.\n * Useful for implementing search/filter functionality.\n */\n filter?: (nodes: Iterable<any>) => Iterable<any>;\n\n /**\n * Label to display when the list is empty (no items available).\n * Defaults to \"No items\".\n */\n emptyLabel?: ReactNode;\n\n /**\n * Visual shape of the ListBox styling.\n * - `card` (default): Standard card styling with border and margin\n * - `plain`: No border, no margin, no radius - suitable for embedded use\n * - `popover`: No border, but keeps margin and radius - suitable for overlay use\n * Defaults to 'card'.\n */\n shape?: 'card' | 'plain' | 'popover';\n\n /**\n * Enable drag-and-drop reordering of list items.\n * When enabled, virtualization is disabled and each item gets a drag handle.\n * @default false\n */\n isReorderable?: boolean;\n\n /**\n * Callback when items are reordered via drag-and-drop.\n * Called with the new array of item keys in their new order.\n */\n onReorder?: (newOrder: string[]) => void;\n}\n\nconst PROP_STYLES = [...BASE_STYLES, ...OUTER_STYLES, ...COLOR_STYLES];\n\nconst SelectAllOption = ({\n label,\n isSelected,\n isIndeterminate,\n isDisabled,\n isCheckable,\n size = 'medium',\n state,\n lastFocusSourceRef,\n onClick,\n allValueProps = {},\n}: {\n label?: ReactNode;\n isSelected: boolean;\n isIndeterminate: boolean;\n isDisabled?: boolean;\n isCheckable?: boolean;\n size?: 'small' | 'medium' | 'large';\n state: any;\n lastFocusSourceRef: MutableRefObject<'keyboard' | 'mouse' | 'other'>;\n onClick: (propagate?: boolean) => void;\n allValueProps?: Partial<CubeCollectionItemProps<any>>;\n}) => {\n const { t } = useI18n();\n const { hoverProps, isHovered } = useHover({ isDisabled });\n const resolvedLabel =\n label === '' || label === undefined || label === null\n ? t('listBox.selectAll', 'Select All')\n : label;\n\n const markIcon = isIndeterminate ? (\n <Icon size={12} stroke={3}>\n <IconMinus />\n </Icon>\n ) : (\n <CheckIcon size={12} stroke={3} />\n );\n\n const localRef = useRef<HTMLLIElement>(null);\n\n // Create checkbox icon for select all option\n const checkboxIcon = useMemo(() => {\n if (!isCheckable) {\n return null;\n }\n\n return (\n <ListBoxCheckboxWrapper\n data-element=\"CheckboxWrapper\"\n mods={{\n selected: isSelected,\n disabled: isDisabled,\n hovered: isHovered,\n indeterminate: isIndeterminate,\n }}\n >\n <ListBoxCheckbox\n data-element=\"Checkbox\"\n mods={{\n selected: isSelected,\n disabled: isDisabled,\n hovered: isHovered,\n indeterminate: isIndeterminate,\n }}\n >\n {(isIndeterminate || isSelected) && markIcon}\n </ListBoxCheckbox>\n </ListBoxCheckboxWrapper>\n );\n }, [\n isCheckable,\n isSelected,\n isDisabled,\n isHovered,\n isIndeterminate,\n markIcon,\n ]);\n\n const handleOptionClick = (e) => {\n // Mark focus changes from mouse clicks\n if (lastFocusSourceRef) {\n lastFocusSourceRef.current = 'mouse';\n }\n\n // If there's an onOptionClick callback and this is checkable in multiple mode,\n // we need to distinguish between checkbox and content clicks\n if (state.selectionManager.selectionMode === 'multiple') {\n // Check if the click target is within the checkbox area\n const clickTarget = e.target as HTMLElement;\n const checkboxElement = localRef.current?.querySelector(\n '[data-element=\"CheckboxWrapper\"]',\n );\n\n if (\n checkboxElement &&\n (checkboxElement === clickTarget ||\n checkboxElement.contains(clickTarget))\n ) {\n onClick?.(false);\n } else {\n // Then call the callback (which will close the popover in FilterPicker)\n onClick?.(true);\n }\n } else {\n onClick?.(true);\n }\n };\n\n return (\n <>\n <ListBoxItem\n ref={localRef}\n data-size={size}\n size={size}\n role=\"option\"\n aria-selected={isSelected}\n isSelected={isSelected}\n isDisabled={isDisabled}\n icon={checkboxIcon}\n mods={{\n listboxitem: true,\n disabled: isDisabled,\n checkable: isCheckable,\n hovered: isHovered,\n indeterminate: isIndeterminate,\n all: true, // Important: this preserves the 'all' modifier\n }}\n {...mergeProps(hoverProps, allValueProps, {\n onClick: handleOptionClick,\n })}\n >\n {resolvedLabel}\n </ListBoxItem>\n <StyledDivider />\n </>\n );\n};\n\n/**\n * A public selection prop as the Set-based value React Stately expects: a key\n * array (or `'all'`, passed through) in multiple mode, a single key (or\n * `null` for none) in single mode.\n */\nfunction toStatelySelection(\n value: 'all' | Key[] | Key | null,\n isMultiple: boolean,\n): 'all' | Set<Key> {\n if (isMultiple) {\n return value === 'all' ? 'all' : new Set(value as Key[]);\n }\n\n return value == null ? new Set() : new Set([value as Key]);\n}\n\nexport const ListBox = forwardRef(function ListBox<T extends object>(\n props: CubeListBoxProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\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 onChange(key ? (Array.isArray(key) ? key : [key]) : []);\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 listStyles,\n optionStyles,\n optionHighlight,\n sectionStyles,\n headingStyles,\n listGap,\n listRef,\n message,\n description,\n styles,\n mods: externalMods,\n size = 'medium',\n labelSuffix,\n selectedKey,\n defaultSelectedKey,\n selectedKeys,\n defaultSelectedKeys,\n shouldUseVirtualFocus,\n isFocusWithin,\n onSelectionChange,\n disableSelectionToggle = false,\n allowDuplicateSelectionEvents,\n stateRef,\n focusOnHover,\n header,\n footer,\n headerStyles,\n footerStyles,\n onEscape,\n isCheckable,\n onOptionClick,\n showSelectAll,\n selectAllLabel,\n allValueProps,\n filter,\n emptyLabel = t('listBox.noItems', 'No items'),\n shape = 'card',\n isReorderable = false,\n onReorder,\n form,\n ...otherProps\n } = props;\n\n const [, forceUpdate] = useState({});\n const lastSelectedKeyRef = useRef<Key | null>(null);\n\n // Wrap onSelectionChange to prevent selection when disabled and handle React Aria's Set format\n const externalSelectionHandler = onSelectionChange || (props as any).onChange;\n\n const wrappedOnSelectionChange = useMemo(() => {\n if (!externalSelectionHandler) return undefined;\n\n return (keys: any) => {\n // Don't allow selection changes when disabled\n if (isDisabled) {\n return;\n }\n\n // React Aria always passes a Set for selection changes\n // Handle the special \"all\" case and convert to our public API format\n if (keys === 'all') {\n externalSelectionHandler('all');\n } else if (keys instanceof Set) {\n if (keys.size === 0) {\n if (disableSelectionToggle && props.selectionMode === 'single') {\n const prevKey = lastSelectedKeyRef.current;\n if (prevKey != null) {\n externalSelectionHandler(prevKey);\n return;\n }\n }\n externalSelectionHandler(\n props.selectionMode === 'multiple' ? [] : null,\n );\n } else if (props.selectionMode === 'multiple') {\n externalSelectionHandler(Array.from(keys));\n } else {\n const key = Array.from(keys)[0];\n lastSelectedKeyRef.current = key ?? null;\n externalSelectionHandler(key);\n }\n } else {\n lastSelectedKeyRef.current = keys as Key | null;\n externalSelectionHandler(keys);\n }\n };\n }, [\n externalSelectionHandler,\n isDisabled,\n props.selectionMode,\n disableSelectionToggle,\n ]);\n\n // Prepare props for useListState with correct selection props\n const listStateProps: ListProps<T> = {\n ...props,\n onSelectionChange: wrappedOnSelectionChange,\n disabledBehavior: 'all',\n filter,\n selectionMode: props.selectionMode || 'single',\n allowDuplicateSelectionEvents,\n };\n\n // Set selection props based on mode: the array props in multiple mode, the\n // scalar key props in single mode.\n const isMultiple = listStateProps.selectionMode === 'multiple';\n const selection = isMultiple ? selectedKeys : selectedKey;\n const defaultSelection = isMultiple\n ? defaultSelectedKeys\n : defaultSelectedKey;\n\n if (selection !== undefined) {\n listStateProps.selectedKeys = toStatelySelection(selection, isMultiple);\n }\n\n if (defaultSelection !== undefined) {\n listStateProps.defaultSelectedKeys = toStatelySelection(\n defaultSelection,\n isMultiple,\n );\n }\n\n const listState = useListState(listStateProps);\n\n useLayoutEffect(() => {\n const selected = listState.selectionManager.selectedKeys;\n if (selected && (selected as any).size > 0) {\n const first = Array.from(selected as Set<Key>)[0];\n lastSelectedKeyRef.current = first ?? null;\n }\n }, [listState.selectionManager.selectedKeys]);\n\n // Calculate select all state for multiple selection mode\n const selectAllState = useMemo(() => {\n // Select-all only makes sense for multiple selection mode *and* when the UI is enabled\n if (props.selectionMode !== 'multiple' || !showSelectAll) {\n return { isSelected: false, isIndeterminate: false };\n }\n\n // React Stately exposes the raw selection value which is either the string \"all\"\n // (when `selectAll()` was used) **or** a Set of item keys.\n const rawSelection: any = (listState.selectionManager as any).rawSelection;\n\n // Fast path – user pressed our \"Select All\" control previously.\n if (rawSelection === 'all') {\n return { isSelected: true, isIndeterminate: false };\n }\n\n const selectedKeys = listState.selectionManager.selectedKeys as Set<Key>;\n\n // When there is nothing selected, we are in a clear state\n if (selectedKeys.size === 0) {\n return { isSelected: false, isIndeterminate: false };\n }\n\n // Otherwise it must be a partial (indeterminate) selection.\n return { isSelected: false, isIndeterminate: true };\n }, [\n props.selectionMode,\n showSelectAll,\n listState.collection,\n listState.disabledKeys,\n listState.selectionManager.selectedKeys,\n listState.selectionManager.rawSelection,\n ]);\n\n // Handle select all click\n const handleSelectAllClick = (propagate?: boolean) => {\n if (isDisabled || props.selectionMode !== 'multiple') return;\n\n if (selectAllState.isSelected) {\n // All selected, deselect all\n listState.selectionManager.clearSelection();\n // Manually call the wrapped handler since React Aria might not trigger it\n wrappedOnSelectionChange?.(new Set());\n } else {\n // Some or none selected, select all\n listState.selectionManager.selectAll();\n // Manually call the wrapped handler since React Aria might not trigger it\n wrappedOnSelectionChange?.('all');\n forceUpdate({});\n }\n\n if (propagate && !selectAllState.isSelected) {\n onOptionClick?.('__ALL__');\n }\n };\n\n // Track whether the last focus change was due to keyboard navigation\n const lastFocusSourceRef = useRef<'keyboard' | 'mouse' | 'other'>('other');\n\n // Expose the list state instance via the provided ref (if any)\n if (stateRef) {\n stateRef.current = {\n ...listState,\n lastFocusSourceRef,\n };\n }\n\n // Warn if isCheckable is false in single selection mode\n useWarn(isCheckable === false && props.selectionMode === 'single', {\n key: ['listbox-checkable-single-mode'],\n args: [\n 'CubeUIKit: isCheckable=false is not recommended in single selection mode as it may confuse users about selection behavior.',\n ],\n });\n\n // Custom keyboard handling: `Escape` has to leave the list so a surrounding\n // overlay can close on it, while every other key stays contained. See\n // `allowEscapeToPropagate` — \"let the overlay system handle closing\" is what\n // the old comment here intended, but only `preventDefault` was ever covered.\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n allowEscapeToPropagate(e);\n\n // Mark focus changes from keyboard navigation\n if (\n e.key === 'ArrowDown' ||\n e.key === 'ArrowUp' ||\n e.key === 'Home' ||\n e.key === 'End' ||\n e.key === 'PageUp' ||\n e.key === 'PageDown'\n ) {\n lastFocusSourceRef.current = 'keyboard';\n }\n\n if (e.key === 'Escape') {\n // Called to potentially override the default selection clearing.\n onEscape?.();\n }\n },\n });\n\n styles = extractStyles(otherProps, PROP_STYLES, styles);\n\n ref = useCombinedRefs(ref);\n listRef = useCombinedRefs(listRef);\n\n // ----- Collection and virtualization decision (must precede useListBox) -----\n const itemsArray = useMemo(\n () => [...listState.collection],\n [listState.collection],\n );\n\n const hasSections = useMemo(\n () => itemsArray.some((i) => i.type === 'section'),\n [itemsArray],\n );\n\n const shouldVirtualize = !hasSections && !isReorderable;\n\n const { listBoxProps } = useListBox(\n {\n ...props,\n id: id,\n 'aria-label': props['aria-label'] || label?.toString(),\n // Only disable isVirtualized for reorderable lists (DnD needs real DOM focus).\n // Section-based lists keep isVirtualized: true to preserve ARIA attributes.\n isVirtualized: !isReorderable,\n shouldUseVirtualFocus: shouldUseVirtualFocus ?? false,\n escapeKeyBehavior: onEscape ? 'none' : 'clearSelection',\n onSelectionChange: wrappedOnSelectionChange,\n },\n listState,\n listRef,\n );\n\n const { isFocused, focusProps } = useFocus();\n\n // The focused key outlives focus, so an option shows as focused only while\n // the list has it. A component whose input moves the key (FilterListBox)\n // says whether focus is within it, in any focus mode. Otherwise the list's\n // own focus decides, and with virtual focus the focused key alone marks it.\n const isListFocused =\n isFocusWithin ??\n (shouldUseVirtualFocus || listState.selectionManager.isFocused);\n\n // Scroll container ref for virtualization\n const scrollRef = useRef<HTMLDivElement>(null);\n\n const rowVirtualizer = useVirtualizer({\n count: shouldVirtualize ? itemsArray.length : 0,\n getScrollElement: () => scrollRef.current,\n // Use the actual item key to ensure React properly reconciles DOM elements\n // when items are filtered, added, or removed. Without this, the virtualizer\n // uses index-based keys which causes DOM reuse issues and style leaking.\n // A new key function makes the virtualizer recompute positions from the\n // heights it has measured per key. ListBox isn't compiled (useVirtualizer),\n // so that is every render. Reading `itemsArray` keeps new items bringing a\n // new function should it ever compile.\n getItemKey: (index: number) => itemsArray[index]?.key ?? index,\n estimateSize: (index: number) => {\n const currentItem: any = itemsArray[index];\n\n if (currentItem?.props?.description) {\n return SIZES.XL;\n }\n return SIZES[SIZE_NAME_TO_KEY[size] as keyof typeof SIZES];\n },\n // Options are positioned absolutely here, so their margins space nothing.\n // `1` matches the `1bw` default.\n gap: listGap ?? 1,\n overscan: 10,\n });\n\n // The virtualizer caches positions without the gap, so re-measure when it\n // changes. Not when the items do: their positions follow `getItemKey`, and\n // `measure()` would drop every measured height.\n useEffect(() => {\n if (shouldVirtualize) {\n rowVirtualizer.measure();\n }\n }, [shouldVirtualize, rowVirtualizer, listGap]);\n\n // Keep focused item visible, but only for keyboard navigation\n useLayoutEffect(() => {\n const focusedKey = listState.selectionManager.focusedKey;\n if (focusedKey == null) return;\n\n // Only scroll on keyboard navigation\n if (lastFocusSourceRef.current !== 'keyboard') return;\n\n const scrollElement = scrollRef.current;\n if (!scrollElement) return;\n\n const itemElement = scrollElement.querySelector(\n `[data-key=\"${CSS.escape(String(focusedKey))}\"]`,\n ) as HTMLElement;\n if (!itemElement) return;\n\n const scrollTop = scrollElement.scrollTop;\n const viewportHeight = scrollElement.clientHeight;\n const viewportBottom = scrollTop + viewportHeight;\n\n const itemRect = itemElement.getBoundingClientRect();\n const scrollRect = scrollElement.getBoundingClientRect();\n\n // Calculate item position relative to scroll container\n const itemTop = itemRect.top - scrollRect.top + scrollTop;\n const itemBottom = itemTop + itemRect.height;\n\n // Check if the item is fully visible in the viewport\n const isAlreadyVisible =\n itemTop >= scrollTop && itemBottom <= viewportBottom;\n\n if (!isAlreadyVisible) {\n // Use scrollIntoView with block: 'nearest' to minimize scroll jumps\n itemElement.scrollIntoView({ block: 'nearest', behavior: 'auto' });\n }\n }, [listState.selectionManager.focusedKey, itemsArray]);\n\n // Merge React Aria listbox props with custom keyboard props so both sets of\n // event handlers (e.g. Arrow navigation *and* our Escape handler) are\n // preserved.\n const mergedListBoxProps = mergeProps(listBoxProps, keyboardProps);\n\n // React Aria keeps a disabled list a Tab stop while no option has focus.\n if (isDisabled) {\n delete mergedListBoxProps.tabIndex;\n }\n\n // Ordered keys for DnD reordering\n const orderedKeys = useMemo(() => {\n if (!isReorderable) {\n return [];\n }\n\n return itemsArray\n .filter((i) => i.type === 'item')\n .map((i) => String(i.key));\n }, [isReorderable, itemsArray]);\n\n const mods = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n focused: isFocused,\n header: !!header || (showSelectAll && props.selectionMode === 'multiple'),\n footer: !!footer,\n selectAll: showSelectAll && props.selectionMode === 'multiple',\n ...externalMods,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isFocused,\n header,\n footer,\n showSelectAll,\n props.selectionMode,\n externalMods,\n ],\n );\n\n const listGapTokens =\n listGap == null ? undefined : { '$list-gap': `${listGap}px` };\n\n const listBoxField = (\n <ListBoxWrapperElement\n ref={ref}\n qa=\"ListBoxWrapper\"\n mods={mods}\n styles={styles}\n data-shape={shape}\n >\n {header ? (\n <StyledHeader styles={headerStyles} data-size={size}>\n {header}\n </StyledHeader>\n ) : (\n <div role=\"presentation\" />\n )}\n {showSelectAll && props.selectionMode === 'multiple' ? (\n <SelectAllOption\n label={selectAllLabel}\n state={listState}\n lastFocusSourceRef={lastFocusSourceRef}\n isSelected={selectAllState.isSelected}\n isIndeterminate={selectAllState.isIndeterminate}\n isDisabled={isDisabled}\n isCheckable={isCheckable}\n size={size}\n allValueProps={allValueProps}\n onClick={handleSelectAllClick}\n />\n ) : (\n <>\n <div role=\"presentation\" />\n <div role=\"presentation\" />\n </>\n )}\n {/* Scroll container wrapper */}\n <ListBoxScrollElement ref={scrollRef} mods={mods} {...focusProps}>\n {listState.collection.size === 0 ? (\n <Item preset=\"t4\" color=\"#dark-03\" size={size} padding=\"(.5x - 1bw)\">\n {emptyLabel}\n </Item>\n ) : isReorderable ? (\n <DraggableListBox\n state={listState}\n listRef={listRef}\n orderedKeys={orderedKeys}\n onReorder={onReorder}\n >\n {(dragState, dropState, collectionProps) => (\n <ListElement\n qa={qa || 'ListBox'}\n {...mergeProps(mergedListBoxProps, collectionProps)}\n ref={listRef}\n styles={listStyles}\n tokens={listGapTokens}\n aria-disabled={isDisabled || undefined}\n mods={{ sections: false }}\n data-shape={shape}\n data-input-type=\"listbox\"\n >\n {itemsArray\n .filter((item) => item.type === 'item')\n .map((item) => (\n <Option\n key={item.key}\n size={size}\n item={item}\n state={listState}\n styles={optionStyles}\n highlight={optionHighlight}\n isParentDisabled={isDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n lastFocusSourceRef={lastFocusSourceRef}\n dragState={dragState}\n dropState={dropState}\n onClick={onOptionClick}\n />\n ))}\n </ListElement>\n )}\n </DraggableListBox>\n ) : (\n <ListElement\n qa={qa || 'ListBox'}\n {...mergedListBoxProps}\n ref={listRef}\n styles={listStyles}\n tokens={listGapTokens}\n aria-disabled={isDisabled || undefined}\n mods={{ sections: hasSections }}\n data-shape={shape}\n data-input-type=\"listbox\"\n style={\n shouldVirtualize\n ? {\n position: 'relative',\n height: `${rowVirtualizer.getTotalSize()}px`,\n }\n : undefined\n }\n >\n {shouldVirtualize\n ? rowVirtualizer.getVirtualItems().map((virtualItem) => {\n const item = itemsArray[virtualItem.index];\n\n return (\n <Option\n key={item.key}\n size={size}\n item={item}\n state={listState}\n styles={optionStyles}\n highlight={optionHighlight}\n isParentDisabled={isDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n // Measures the option's real height; the virtualizer adds the gap.\n virtualRef={rowVirtualizer.measureElement as any}\n virtualStyle={{\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n transform: `translateY(${virtualItem.start}px)`,\n }}\n virtualIndex={virtualItem.index}\n lastFocusSourceRef={lastFocusSourceRef}\n onClick={onOptionClick}\n />\n );\n })\n : (() => {\n const renderedItems: ReactNode[] = [];\n let isFirstSection = true;\n\n for (const item of listState.collection) {\n if (item.type === 'section') {\n if (!isFirstSection) {\n renderedItems.push(\n <StyledDivider\n key={`divider-${String(item.key)}`}\n role=\"separator\"\n aria-orientation=\"horizontal\"\n />,\n );\n }\n\n renderedItems.push(\n <ListBoxSection\n key={item.key}\n item={item}\n state={listState}\n optionStyles={optionStyles}\n optionHighlight={optionHighlight}\n headingStyles={headingStyles}\n sectionStyles={sectionStyles}\n isParentDisabled={isDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n size={size}\n lastFocusSourceRef={lastFocusSourceRef}\n onClick={onOptionClick}\n />,\n );\n\n isFirstSection = false;\n } else {\n renderedItems.push(\n <Option\n key={item.key}\n size={size}\n item={item}\n state={listState}\n styles={optionStyles}\n highlight={optionHighlight}\n isParentDisabled={isDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n lastFocusSourceRef={lastFocusSourceRef}\n onClick={onOptionClick}\n />,\n );\n }\n }\n\n return renderedItems;\n })()}\n </ListElement>\n )}\n </ListBoxScrollElement>\n {footer ? (\n <StyledFooter styles={footerStyles} data-size={size}>\n {footer}\n </StyledFooter>\n ) : (\n <div role=\"presentation\" />\n )}\n </ListBoxWrapperElement>\n );\n\n return wrapWithField<Omit<CubeListBoxProps<T>, 'children'>>(\n listBoxField,\n ref,\n props,\n );\n}) as unknown as (<T>(\n props: CubeListBoxProps<T> & { ref?: ForwardedRef<HTMLDivElement> },\n) => ReactElement) & {\n Item: typeof CollectionItem;\n Section: typeof BaseSection;\n};\n\nfunction Option({\n size = 'medium',\n item,\n state,\n styles,\n highlight,\n isParentDisabled,\n isInvalid,\n isValid,\n focusOnHover = false,\n isListFocused = false,\n isCheckable,\n onClick: onOptionClick,\n virtualStyle,\n virtualRef,\n virtualIndex,\n lastFocusSourceRef,\n dragState,\n dropState,\n}: {\n size?: 'small' | 'medium' | 'large';\n item: any;\n state: any;\n styles?: Styles;\n highlight?: string;\n isParentDisabled?: boolean;\n isInvalid?: boolean;\n isValid?: boolean;\n focusOnHover?: boolean;\n /** Whether the list has focus, so its focused option shows as focused */\n isListFocused?: boolean;\n isCheckable?: boolean;\n onClick?: (key: Key) => void;\n /** Inline style applied when virtualized (absolute positioning etc.) */\n virtualStyle?: CSSProperties;\n /** react-virtual's `measureElement`, called with the option after every commit */\n virtualRef?: (element: HTMLElement | null) => void;\n /** Virtual index from react-virtual for data-index attribute */\n virtualIndex?: number;\n /** Ref to track the source of focus changes */\n lastFocusSourceRef?: MutableRefObject<'keyboard' | 'mouse' | 'other'>;\n /** Drag state from DraggableCollection. When provided, enables drag-and-drop. */\n dragState?: DraggableCollectionState;\n /** Drop state from DraggableCollection. When provided, renders drop indicators. */\n dropState?: DroppableCollectionState;\n}) {\n const localRef = useRef<HTMLLIElement>(null);\n\n // Measure during the commit. After it, the browser can paint the option at\n // its estimated height first, overlapping the next one for a frame.\n useLayoutEffect(() => {\n virtualRef?.(localRef.current);\n });\n\n const isDisabled = isParentDisabled || state.disabledKeys.has(item.key);\n const isSelected = state.selectionManager.isSelected(item.key);\n\n // Drag-and-drop support — only enable when both states are provided\n const isDraggable = !!dragState && !!dropState;\n\n // useDraggableItem must be called unconditionally (Rules of Hooks).\n // When dragState is undefined, we pass a minimal mock state to satisfy the hook.\n const mockDragState = useMemo(\n () => createMockDragState(state.collection, state.selectionManager),\n [state.collection, state.selectionManager],\n );\n\n const dragResult = useDraggableItem(\n { key: item.key },\n dragState ?? mockDragState,\n );\n const effectiveDragProps = isDraggable ? dragResult.dragProps : {};\n const isDragging = isDraggable && !!dragState?.isDragging(item.key);\n\n const { hoverProps, isHovered } = useHover({ isDisabled });\n\n const { optionProps, isPressed, labelProps, descriptionProps } = useOption(\n {\n key: item.key,\n isDisabled,\n isSelected,\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: focusOnHover,\n },\n state,\n localRef,\n );\n\n const isFocused =\n !isDisabled &&\n isListFocused &&\n state.selectionManager.focusedKey === item.key;\n\n // Filter out service props - all remaining props can be passed to Item\n const filteredItemProps = filterCollectionItemProps(item.props);\n\n // Determine icon: drag handle > checkbox > user icon > default\n const effectiveIcon = useMemo(() => {\n if (isDraggable) {\n if (!filteredItemProps.icon || isHovered) {\n return <GripVerticalIcon size={14} />;\n }\n }\n\n if (\n !isCheckable ||\n state.selectionManager.selectionMode !== 'multiple' ||\n filteredItemProps.icon\n ) {\n return (\n filteredItemProps.icon ??\n (state.selectionManager.selectionMode !== 'multiple' ? null : undefined)\n );\n }\n\n return renderCheckboxIcon({\n isSelected,\n isDisabled,\n isFocused,\n isHovered,\n isInvalid,\n isValid,\n });\n }, [\n isDraggable,\n isCheckable,\n state.selectionManager.selectionMode,\n isSelected,\n isDisabled,\n isFocused,\n isHovered,\n isInvalid,\n isValid,\n filteredItemProps.icon,\n ]);\n\n // Side-effects layered on top of React Aria's own onClick. The underlying\n // React Aria onClick is already chained via mergeProps below, so this handler\n // must NOT call optionProps.onClick again — re-invoking it would trigger\n // usePress's virtual-click branch and double-fire onPress (and toggle\n // selection twice in multiple mode).\n const handleOptionExtras = (e: MouseEvent) => {\n if (lastFocusSourceRef) {\n lastFocusSourceRef.current = 'mouse';\n }\n\n state.selectionManager.setFocusedKey(item.key);\n\n if (!onOptionClick) {\n return;\n }\n\n // In checkable multiple mode, suppress the callback when the click landed\n // inside the checkbox wrapper — that area is reserved for toggle-only\n // behaviour (React Aria still handles the toggle via the chained onClick).\n if (isCheckable && state.selectionManager.selectionMode === 'multiple') {\n const clickTarget = e.target as HTMLElement;\n const checkboxElement = localRef.current?.querySelector(\n '[data-element=\"CheckboxWrapper\"]',\n );\n\n if (\n checkboxElement &&\n (checkboxElement === clickTarget ||\n checkboxElement.contains(clickTarget))\n ) {\n return;\n }\n }\n\n onOptionClick(item.key);\n };\n\n // Filter out React Aria props that shouldn't reach the DOM\n const {\n onKeyDown,\n onKeyUp,\n tabIndex,\n 'aria-selected': ariaSelected,\n 'aria-disabled': ariaDisabled,\n role,\n ...filteredOptionProps\n } = optionProps;\n\n const theme = getValidationTheme(\n 'default' as const,\n { isInvalid, isValid },\n { includeValid: true },\n );\n\n const listBoxItem = (\n <ListBoxItem\n ref={localRef}\n data-key={String(item.key)}\n {...mergeProps(\n filteredOptionProps,\n hoverProps,\n filteredItemProps,\n {\n onClick: handleOptionExtras,\n onKeyDown,\n onKeyUp,\n tabIndex,\n 'aria-selected': ariaSelected,\n 'aria-disabled': ariaDisabled,\n role,\n },\n effectiveDragProps,\n )}\n theme={theme}\n style={virtualStyle}\n data-size={size}\n data-index={virtualIndex}\n size={size}\n display={isDraggable ? 'grid' : undefined}\n isSelected={isSelected}\n isDisabled={isDisabled}\n icon={effectiveIcon}\n highlight={highlight}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n styles={mergeStyles(styles, filteredItemProps.styles)}\n defaultTooltipPlacement=\"right\"\n mods={{\n listboxitem: true,\n focused: isFocused,\n pressed: isPressed,\n dragging: isDragging,\n draggable: isDraggable,\n gripIcon: isDraggable && (!filteredItemProps.icon || isHovered),\n valid: isSelected && !!isValid && !isInvalid,\n invalid: isSelected && !!isInvalid,\n checkable: isCheckable,\n hovered: isHovered,\n all: false, // This will be set to true for SelectAllOption\n }}\n >\n {item.rendered}\n </ListBoxItem>\n );\n\n if (!isDraggable || !dropState) {\n return listBoxItem;\n }\n\n return (\n <>\n <ListBoxDropIndicator\n target={{ type: 'item', key: item.key, dropPosition: 'before' }}\n dropState={dropState}\n />\n {listBoxItem}\n <ListBoxDropIndicator\n target={{ type: 'item', key: item.key, dropPosition: 'after' }}\n dropState={dropState}\n />\n </>\n );\n}\n\n// =============================================================================\n// Drop Indicator for DnD reordering\n// =============================================================================\n\nfunction ListBoxDropIndicator({\n target,\n dropState,\n}: {\n target: DropTarget;\n dropState: DroppableCollectionState;\n}) {\n const ref = useRef<HTMLLIElement>(null);\n const { dropIndicatorProps, isHidden, isDropTarget } = useDropIndicator(\n { target },\n dropState,\n ref,\n );\n\n if (isHidden) {\n return null;\n }\n\n return (\n <ListBoxDropIndicatorElement\n ref={ref}\n role=\"option\"\n {...dropIndicatorProps}\n mods={{ 'drop-indicator': true, 'drop-target': isDropTarget }}\n >\n <div data-element=\"Indicator\" />\n </ListBoxDropIndicatorElement>\n );\n}\n\ninterface ListBoxSectionProps<T> {\n item: any;\n state: any;\n optionStyles?: Styles;\n optionHighlight?: string;\n headingStyles?: Styles;\n sectionStyles?: Styles;\n isParentDisabled?: boolean;\n isInvalid?: boolean;\n isValid?: boolean;\n focusOnHover?: boolean;\n isListFocused?: boolean;\n isCheckable?: boolean;\n onClick?: (key: Key) => void;\n size?: 'small' | 'medium' | 'large';\n lastFocusSourceRef?: MutableRefObject<'keyboard' | 'mouse' | 'other'>;\n}\n\nfunction ListBoxSection<T>(props: ListBoxSectionProps<T>) {\n const {\n item,\n state,\n optionStyles,\n optionHighlight,\n headingStyles,\n sectionStyles,\n isParentDisabled,\n isInvalid,\n isValid,\n focusOnHover,\n isListFocused,\n isCheckable,\n onClick: onOptionClick,\n lastFocusSourceRef,\n } = props;\n const heading = item.rendered;\n\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading,\n 'aria-label': item['aria-label'],\n });\n\n return (\n <SectionWrapperElement {...itemProps} styles={sectionStyles}>\n {heading && (\n <StyledSectionHeading\n {...headingProps}\n size={props.size}\n styles={headingStyles}\n >\n {heading}\n </StyledSectionHeading>\n )}\n <SectionListElement {...groupProps}>\n {[...item.childNodes]\n .filter((node: any) => state.collection.getItem(node.key))\n .map((node: any) => (\n <Option\n key={node.key}\n size={props.size}\n item={node}\n state={state}\n styles={optionStyles}\n highlight={optionHighlight}\n isParentDisabled={isParentDisabled}\n isInvalid={isInvalid}\n isValid={isValid}\n focusOnHover={focusOnHover}\n isListFocused={isListFocused}\n isCheckable={isCheckable}\n lastFocusSourceRef={lastFocusSourceRef}\n onClick={onOptionClick}\n />\n ))}\n </SectionListElement>\n </SectionWrapperElement>\n );\n}\n\ntype SectionComponent = typeof BaseSection;\n\nconst ListBoxSectionComponent = Object.assign(BaseSection, {\n displayName: 'Section',\n}) as SectionComponent;\n\nListBox.Item = CollectionItem;\n\nListBox.Section = ListBoxSectionComponent;\n\nObject.defineProperty(ListBox, 'cubeInputType', {\n value: 'ListBox',\n enumerable: false,\n configurable: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,MAAMoE,wBAAwBxD,MAAM;CAClCyD,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,aAAa;EACbC,UAAU;EACVC,MAAM;EACNC,KAAK;EACLC,UAAU;EACVC,QAAQ;GACN,IAAI;GACJ,4BAA0B;GAC1B,0BAAwB;GACzB;EACDC,OAAO;EACPC,YAAY;EACZC,SAAS;GACP,IAAI;GACJ,qBAAqB;GACrBC,SAAS;GACV;EACDC,QAAQ;GACN,IAAI;GACJD,SAAS;GACTE,OAAO;GACPC,SAAS;GACTC,UAAU;GACV,kEAA8D;GAChE;EACF;CACD,CAAC;AAEF,MAAMC,cAAc1E,MAAM;CACxB2E,IAAI;CACJjB,QAAQ;EAGN,aAAa;EACbC,SAAS;EAITiB,SAAS;EACTC,WAAW;EACXC,WAAW;EACXC,QAAQ;GACN,IAAI;GACJ,0BAAwB;GACzB;EACDC,QAAQ;EACV;CACD,CAAC;AAGF,MAAMC,uBAAuBjF,MAAM;CACjC2E,IAAI;CACJjB,QAAQ;EACNC,SAAS;EACTC,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OM id of the option with `key` in the listbox whose id is `listBoxId`,
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
3
3
  import { useEvent } from "../../../_internal/hooks/use-event.js";
4
4
  import { DisplayTransition } from "../../helpers/DisplayTransition/DisplayTransition.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  //#region src/components/fields/ListBoxPopover/listNavigation.ts
3
3
  /**
4
4
  * Walks a collection (possibly nested under sections) and collects the keys of
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { useEvent } from "../../../_internal/hooks/use-event.js";
3
3
  import { c } from "react/compiler-runtime";
4
4
  import { useEffect, useRef } from "react";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
3
3
  import { castNullableNumberValue } from "../../../utils/react/nullableValue.js";
4
4
  import { useFieldProps } from "../../form/Form/use-field/use-field-props.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { useI18n } from "../../../i18n/useI18n.js";
3
3
  import { Button } from "../../actions/Button/Button.js";
4
4
  import { DirectionIcon } from "../../../icons/DirectionIcon.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { chain } from "../../../utils/react/chain.js";
3
3
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
4
4
  import { useBufferedValue } from "../../../utils/react/useBufferedValue.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { extractStyles, mergeStyleLayers } from "../../../utils/styles.js";
3
3
  import { isTextOnly } from "../../../utils/react/isTextOnly.js";
4
4
  import { useEvent } from "../../../_internal/hooks/use-event.js";
@@ -170,8 +170,8 @@ declare const Tabs: react.ComponentType<{
170
170
  theme?: string | (string & {}) | undefined;
171
171
  tokens?: _tenphi_tasty0.Tokens | undefined;
172
172
  key?: react.Key | null | undefined;
173
- isLoading?: boolean | undefined;
174
173
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
174
+ isLoading?: boolean | undefined;
175
175
  labelProps?: Props | undefined;
176
176
  description?: react.ReactNode;
177
177
  extra?: react.ReactNode;
@@ -317,8 +317,8 @@ declare const ButtonGroup: react.ComponentType<{
317
317
  theme?: string | (string & {}) | undefined;
318
318
  tokens?: _tenphi_tasty0.Tokens | undefined;
319
319
  key?: react.Key | null | undefined;
320
- isLoading?: boolean | undefined;
321
320
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
321
+ isLoading?: boolean | undefined;
322
322
  labelProps?: Props | undefined;
323
323
  description?: react.ReactNode;
324
324
  extra?: react.ReactNode;
@@ -474,8 +474,8 @@ declare const __Radio: react.ForwardRefExoticComponent<CubeRadioProps & react.Re
474
474
  theme?: string | (string & {}) | undefined;
475
475
  tokens?: _tenphi_tasty0.Tokens | undefined;
476
476
  key?: react.Key | null | undefined;
477
- isLoading?: boolean | undefined;
478
477
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
478
+ isLoading?: boolean | undefined;
479
479
  labelProps?: Props | undefined;
480
480
  description?: react.ReactNode;
481
481
  extra?: react.ReactNode;
@@ -621,8 +621,8 @@ declare const __Radio: react.ForwardRefExoticComponent<CubeRadioProps & react.Re
621
621
  theme?: string | (string & {}) | undefined;
622
622
  tokens?: _tenphi_tasty0.Tokens | undefined;
623
623
  key?: react.Key | null | undefined;
624
- isLoading?: boolean | undefined;
625
624
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
625
+ isLoading?: boolean | undefined;
626
626
  labelProps?: Props | undefined;
627
627
  description?: react.ReactNode;
628
628
  extra?: react.ReactNode;
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
4
4
  import { useFocus as useFocus$1 } from "../../../utils/react/interactions.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { extractStyles } from "../../../utils/styles.js";
3
3
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
4
4
  import { castNullableStringValue } from "../../../utils/react/nullableValue.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-c325dcb | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.0.0-canary-162cdb3 | Cube Dev Team */
2
2
  import { createContext, useContext } from "react";
3
3
 
4
4
  //#region src/components/fields/RadioGroup/context.ts