@cube-dev/ui-kit 0.215.2 → 0.216.0

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 (612) hide show
  1. package/dist/CHANGELOG.md +18 -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/AutoCollapseObserver.js +1 -1
  19. package/dist/components/actions/Button/Button.js +1 -1
  20. package/dist/components/actions/Button/index.js +1 -1
  21. package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
  22. package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
  23. package/dist/components/actions/ButtonSplit/context.js +1 -1
  24. package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
  25. package/dist/components/actions/CommandMenu/styled.js +1 -1
  26. package/dist/components/actions/ItemAction/ItemAction.js +1 -1
  27. package/dist/components/actions/ItemActionContext.js +1 -1
  28. package/dist/components/actions/ItemActionsWrapper.js +1 -1
  29. package/dist/components/actions/ItemButton/ItemButton.js +1 -1
  30. package/dist/components/actions/Link/Link.js +1 -1
  31. package/dist/components/actions/Menu/Menu.js +1 -1
  32. package/dist/components/actions/Menu/MenuCollectionItem.js +1 -1
  33. package/dist/components/actions/Menu/MenuItem.js +1 -1
  34. package/dist/components/actions/Menu/MenuSection.js +1 -1
  35. package/dist/components/actions/Menu/MenuTrigger.js +1 -1
  36. package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
  37. package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
  38. package/dist/components/actions/Menu/context.js +1 -1
  39. package/dist/components/actions/Menu/styled.js +1 -1
  40. package/dist/components/actions/actions-run.js +1 -1
  41. package/dist/components/actions/use-action.js +1 -1
  42. package/dist/components/actions/use-anchored-menu.js +1 -1
  43. package/dist/components/actions/use-context-menu.js +1 -1
  44. package/dist/components/content/ActiveZone/ActiveZone.js +1 -1
  45. package/dist/components/content/Alert/Alert.js +1 -1
  46. package/dist/components/content/Alert/use-alert.js +1 -1
  47. package/dist/components/content/Avatar/Avatar.js +1 -1
  48. package/dist/components/content/Badge/Badge.js +1 -1
  49. package/dist/components/content/Card/Card.js +1 -1
  50. package/dist/components/content/Content.js +1 -1
  51. package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
  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/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/Item/ItemWithNativeLinks.js +1 -1
  62. package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
  63. package/dist/components/content/ItemCard/ItemCard.js +1 -1
  64. package/dist/components/content/Layout/GridLayout.js +1 -1
  65. package/dist/components/content/Layout/Layout.js +1 -1
  66. package/dist/components/content/Layout/LayoutBlock.js +1 -1
  67. package/dist/components/content/Layout/LayoutCenter.js +1 -1
  68. package/dist/components/content/Layout/LayoutContainer.js +1 -1
  69. package/dist/components/content/Layout/LayoutContent.js +1 -1
  70. package/dist/components/content/Layout/LayoutContext.js +1 -1
  71. package/dist/components/content/Layout/LayoutFlex.js +1 -1
  72. package/dist/components/content/Layout/LayoutFooter.js +1 -1
  73. package/dist/components/content/Layout/LayoutGrid.js +1 -1
  74. package/dist/components/content/Layout/LayoutHeader.js +1 -1
  75. package/dist/components/content/Layout/LayoutPane.js +1 -1
  76. package/dist/components/content/Layout/LayoutPanel.js +1 -1
  77. package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
  78. package/dist/components/content/Layout/LayoutPanelTransition.js +1 -1
  79. package/dist/components/content/Layout/LayoutToolbar.js +1 -1
  80. package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
  81. package/dist/components/content/Layout/index.js +1 -1
  82. package/dist/components/content/Layout/utils.js +1 -1
  83. package/dist/components/content/Paragraph.js +1 -1
  84. package/dist/components/content/Placeholder/Placeholder.js +1 -1
  85. package/dist/components/content/PrismCode/PrismCode.js +1 -1
  86. package/dist/components/content/PrismCode/prismSetup.js +1 -1
  87. package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
  88. package/dist/components/content/Result/Result.js +1 -1
  89. package/dist/components/content/Skeleton/Skeleton.js +1 -1
  90. package/dist/components/content/Tag/Tag.js +1 -1
  91. package/dist/components/content/Text.js +1 -1
  92. package/dist/components/content/TextItem/TextItem.js +1 -1
  93. package/dist/components/content/Title.js +1 -1
  94. package/dist/components/content/Tree/Tree.js +1 -1
  95. package/dist/components/content/Tree/TreeNode.js +1 -1
  96. package/dist/components/content/Tree/checked-keys.js +1 -1
  97. package/dist/components/content/Tree/rowId.js +1 -1
  98. package/dist/components/content/Tree/styled.js +1 -1
  99. package/dist/components/content/Tree/tree-index.js +1 -1
  100. package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
  101. package/dist/components/content/Tree/use-load-data.js +1 -1
  102. package/dist/components/content/highlightText.js +1 -1
  103. package/dist/components/content/use-auto-tooltip.js +1 -1
  104. package/dist/components/data/DataTable/DataTable.js +1 -1
  105. package/dist/components/data/ItemTable/ItemTable.js +1 -1
  106. package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
  107. package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
  108. package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
  109. package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
  110. package/dist/components/data/ItemTable/item-table-sections.js +1 -1
  111. package/dist/components/data/ItemTable/types.d.ts +4 -1
  112. package/dist/components/data/ItemTable/use-item-table-column-widths.js +1 -1
  113. package/dist/components/data/ItemTable/use-item-table-drag-drop.js +1 -1
  114. package/dist/components/data/ItemTable/use-item-table-pagination.js +1 -1
  115. package/dist/components/data/ItemTable/use-item-table-selection.js +1 -1
  116. package/dist/components/data/ItemTable/use-item-table-sort.js +1 -1
  117. package/dist/components/data/ItemTable/use-item-table-tree-model.js +1 -1
  118. package/dist/components/data/TableBase/ColumnResizer.js +1 -1
  119. package/dist/components/data/TableBase/RowCollection.js +1 -1
  120. package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
  121. package/dist/components/data/TableBase/TableRow.js +1 -1
  122. package/dist/components/data/TableBase/TableRowLink.js +1 -1
  123. package/dist/components/data/TableBase/TableView.js +2 -1
  124. package/dist/components/data/TableBase/TableView.js.map +1 -1
  125. package/dist/components/data/TableBase/TreeGridTable.js +1 -1
  126. package/dist/components/data/TableBase/column-header.js +1 -1
  127. package/dist/components/data/TableBase/column-menu.js +1 -1
  128. package/dist/components/data/TableBase/column-styles.js +1 -1
  129. package/dist/components/data/TableBase/column-tint.js +1 -1
  130. package/dist/components/data/TableBase/row-menu.js +1 -1
  131. package/dist/components/data/TableBase/styled.js +1 -1
  132. package/dist/components/data/TableBase/table-body-sections.js +1 -1
  133. package/dist/components/data/TableBase/table-tree.js +1 -1
  134. package/dist/components/data/TableBase/types.js +1 -1
  135. package/dist/components/data/TableBase/use-cell-selection.js +0 -0
  136. package/dist/components/data/TableBase/use-column-menu.js +1 -1
  137. package/dist/components/data/TableBase/use-column-order.js +1 -1
  138. package/dist/components/data/TableBase/use-column-window.js +1 -1
  139. package/dist/components/data/TableBase/use-container-width.js +1 -1
  140. package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
  141. package/dist/components/data/TableBase/use-scrollability.js +1 -1
  142. package/dist/components/data/TableBase/use-table-columns.js +1 -1
  143. package/dist/components/data/TableBase/use-table-search.js +1 -1
  144. package/dist/components/data/TableBase/use-table-selection.js +1 -1
  145. package/dist/components/data/TableBase/use-table-sort.js +1 -1
  146. package/dist/components/data/TableBase/use-table-sorts.js +1 -1
  147. package/dist/components/data/TableBase/use-table-storage.js +1 -1
  148. package/dist/components/data/TableBase/use-table-tooltip-refresh.js +1 -1
  149. package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
  150. package/dist/components/fields/Checkbox/Checkbox.js +1 -1
  151. package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
  152. package/dist/components/fields/Checkbox/context.js +1 -1
  153. package/dist/components/fields/ColorInput/ColorInput.js +1 -1
  154. package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
  155. package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
  156. package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
  157. package/dist/components/fields/ComboBox/ComboBox.js +1 -1
  158. package/dist/components/fields/ComboBox/comboBoxOptions.js +1 -1
  159. package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
  160. package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
  161. package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
  162. package/dist/components/fields/DatePicker/CalendarPopover.js +1 -1
  163. package/dist/components/fields/DatePicker/DateInput.js +1 -1
  164. package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
  165. package/dist/components/fields/DatePicker/DatePicker.js +1 -1
  166. package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
  167. package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
  168. package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
  169. package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
  170. package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
  171. package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
  172. package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
  173. package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
  174. package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
  175. package/dist/components/fields/DatePicker/TimeInput.js +1 -1
  176. package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
  177. package/dist/components/fields/DatePicker/YearPicker.js +1 -1
  178. package/dist/components/fields/DatePicker/parseDate.js +1 -1
  179. package/dist/components/fields/DatePicker/period.js +1 -1
  180. package/dist/components/fields/DatePicker/props.js +1 -1
  181. package/dist/components/fields/DatePicker/utils.js +1 -1
  182. package/dist/components/fields/FileInput/FileInput.js +1 -1
  183. package/dist/components/fields/FilterListBox/FilterListBox.js +21 -16
  184. package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
  185. package/dist/components/fields/FilterListBox/styled.js +1 -1
  186. package/dist/components/fields/FilterPicker/FilterPicker.js +7 -11
  187. package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
  188. package/dist/components/fields/FilterPicker/FilterTree.js +1 -1
  189. package/dist/components/fields/Input/Input.js +1 -1
  190. package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
  191. package/dist/components/fields/ListBox/ListBox.d.ts +20 -0
  192. package/dist/components/fields/ListBox/ListBox.js +274 -80
  193. package/dist/components/fields/ListBox/ListBox.js.map +1 -1
  194. package/dist/components/fields/ListBox/empty-row.js +1 -1
  195. package/dist/components/fields/ListBox/optionId.js +1 -1
  196. package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
  197. package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
  198. package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
  199. package/dist/components/fields/NumberInput/NumberInput.js +1 -1
  200. package/dist/components/fields/NumberInput/StepButton.js +1 -1
  201. package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
  202. package/dist/components/fields/Picker/Picker.d.ts +1 -1
  203. package/dist/components/fields/Picker/Picker.js +4 -14
  204. package/dist/components/fields/Picker/Picker.js.map +1 -1
  205. package/dist/components/fields/RadioGroup/Radio.js +1 -1
  206. package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
  207. package/dist/components/fields/RadioGroup/context.js +1 -1
  208. package/dist/components/fields/RadioGroup/joined-styles.js +1 -1
  209. package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
  210. package/dist/components/fields/SearchInput/SearchInput.js +1 -1
  211. package/dist/components/fields/Select/Select.js +1 -1
  212. package/dist/components/fields/Slider/Gradation.js +1 -1
  213. package/dist/components/fields/Slider/HueSlider.js +1 -1
  214. package/dist/components/fields/Slider/RangeSlider.js +1 -1
  215. package/dist/components/fields/Slider/Slider.js +1 -1
  216. package/dist/components/fields/Slider/SliderBase.js +1 -1
  217. package/dist/components/fields/Slider/SliderThumb.js +1 -1
  218. package/dist/components/fields/Slider/SliderTrack.js +1 -1
  219. package/dist/components/fields/Slider/elements.js +1 -1
  220. package/dist/components/fields/Slider/index.js +1 -1
  221. package/dist/components/fields/Switch/Switch.js +1 -1
  222. package/dist/components/fields/TagInput/TagInput.js +1 -1
  223. package/dist/components/fields/TagInput/TagList.js +1 -1
  224. package/dist/components/fields/TagInput/useActiveOption.js +1 -1
  225. package/dist/components/fields/TagInput/useSuffixSpace.js +1 -1
  226. package/dist/components/fields/TagInput/useTagError.js +1 -1
  227. package/dist/components/fields/TextArea/TextArea.js +1 -1
  228. package/dist/components/fields/TextInput/TextInput.js +1 -1
  229. package/dist/components/fields/TextInput/TextInputBase.js +1 -1
  230. package/dist/components/fields/TextInput/displayed-validation.js +1 -1
  231. package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
  232. package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
  233. package/dist/components/fields/ToggleGroup/ToggleGroup.js +1 -1
  234. package/dist/components/fields/ToggleGroup/ToggleGroupItem.js +1 -1
  235. package/dist/components/fields/ToggleGroup/context.js +1 -1
  236. package/dist/components/fields/TriggerActions.js +1 -1
  237. package/dist/components/fields/color/ColorPanel.js +1 -1
  238. package/dist/components/fields/color/channels.js +1 -1
  239. package/dist/components/fields/color/color.js +1 -1
  240. package/dist/components/fields/color/context.js +1 -1
  241. package/dist/components/fields/option-origin-press.js +1 -1
  242. package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
  243. package/dist/components/form/FieldWrapper/field-description.js +1 -1
  244. package/dist/components/form/Form/Field.js +1 -1
  245. package/dist/components/form/Form/Form.js +1 -1
  246. package/dist/components/form/Form/FormContext.js +1 -1
  247. package/dist/components/form/Form/FormElement.js +1 -1
  248. package/dist/components/form/Form/ModernFormRoot.js +1 -1
  249. package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
  250. package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
  251. package/dist/components/form/Form/SubmitError.js +1 -1
  252. package/dist/components/form/Form/backend.js +1 -1
  253. package/dist/components/form/Form/index.js +1 -1
  254. package/dist/components/form/Form/modern/actions.js +1 -1
  255. package/dist/components/form/Form/modern/context.js +1 -1
  256. package/dist/components/form/Form/modern/controller.js +1 -1
  257. package/dist/components/form/Form/modern/field-binding.js +1 -1
  258. package/dist/components/form/Form/modern/field.js +1 -1
  259. package/dist/components/form/Form/modern/react.js +1 -1
  260. package/dist/components/form/Form/modern/store.js +1 -1
  261. package/dist/components/form/Form/modern/validation.js +1 -1
  262. package/dist/components/form/Form/modern/values.js +1 -1
  263. package/dist/components/form/Form/reset-unbound-controls.js +1 -1
  264. package/dist/components/form/Form/use-field/use-field-binding.js +1 -1
  265. package/dist/components/form/Form/use-field/use-field-props.js +1 -1
  266. package/dist/components/form/Form/use-field/use-field.js +1 -1
  267. package/dist/components/form/Form/use-form.js +1 -1
  268. package/dist/components/form/Form/validation.js +1 -1
  269. package/dist/components/form/Label.js +1 -1
  270. package/dist/components/form/field-chrome.js +1 -1
  271. package/dist/components/form/field-layout.js +1 -1
  272. package/dist/components/form/legacy-tooltip.js +1 -1
  273. package/dist/components/form/validation/ValidationIndicator.js +1 -1
  274. package/dist/components/form/validation/resolve-validation-props.js +1 -1
  275. package/dist/components/form/validation/use-validation-props.js +1 -1
  276. package/dist/components/form/wrapper.js +1 -1
  277. package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
  278. package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
  279. package/dist/components/layout/Flex.js +1 -1
  280. package/dist/components/layout/Flow.js +1 -1
  281. package/dist/components/layout/Grid.js +1 -1
  282. package/dist/components/layout/Panel.js +1 -1
  283. package/dist/components/layout/Prefix.js +1 -1
  284. package/dist/components/layout/ResizablePanel.js +1 -1
  285. package/dist/components/layout/Space.js +1 -1
  286. package/dist/components/layout/Suffix.js +1 -1
  287. package/dist/components/navigation/NavTabs/NavTabs.js +1 -1
  288. package/dist/components/navigation/Pagination/Pagination.js +1 -1
  289. package/dist/components/navigation/Pagination/use-pagination.js +1 -1
  290. package/dist/components/navigation/Tabs/BoardDragActiveProvider.js +1 -1
  291. package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
  292. package/dist/components/navigation/Tabs/TabButton.js +1 -1
  293. package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
  294. package/dist/components/navigation/Tabs/TabPanel.js +1 -1
  295. package/dist/components/navigation/Tabs/TabPicker.js +1 -1
  296. package/dist/components/navigation/Tabs/Tabs.js +1 -1
  297. package/dist/components/navigation/Tabs/TabsAction.js +1 -1
  298. package/dist/components/navigation/Tabs/TabsContext.js +1 -1
  299. package/dist/components/navigation/Tabs/popover-placement.js +1 -1
  300. package/dist/components/navigation/Tabs/scroll-tab-into-strip.js +1 -1
  301. package/dist/components/navigation/Tabs/segmented-styles.js +1 -1
  302. package/dist/components/navigation/Tabs/styled.js +1 -1
  303. package/dist/components/navigation/Tabs/types.js +1 -1
  304. package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
  305. package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
  306. package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
  307. package/dist/components/other/Calendar/Calendar.js +1 -1
  308. package/dist/components/other/Calendar/CalendarCell.js +1 -1
  309. package/dist/components/other/Calendar/CalendarGrid.js +1 -1
  310. package/dist/components/other/Calendar/CalendarHeader.js +1 -1
  311. package/dist/components/other/Calendar/CalendarPanel.js +1 -1
  312. package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
  313. package/dist/components/other/Calendar/PeriodGrid.js +1 -1
  314. package/dist/components/other/Calendar/RangeCalendar.js +1 -1
  315. package/dist/components/other/Calendar/styled.js +1 -1
  316. package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
  317. package/dist/components/other/NoDataIcon/NoDataIcon.js +1 -1
  318. package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
  319. package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
  320. package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
  321. package/dist/components/overlays/Dialog/Dialog.js +1 -1
  322. package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
  323. package/dist/components/overlays/Dialog/DialogForm.js +1 -1
  324. package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
  325. package/dist/components/overlays/Dialog/ModernDialogForm.js +1 -1
  326. package/dist/components/overlays/Dialog/context.js +1 -1
  327. package/dist/components/overlays/Dialog/default-button-text.js +1 -1
  328. package/dist/components/overlays/Dialog/use-content-overflow.js +1 -1
  329. package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
  330. package/dist/components/overlays/Dialog/use-dialog-open-sync.js +1 -1
  331. package/dist/components/overlays/Dialog/use-dismiss-confirmation.js +1 -1
  332. package/dist/components/overlays/Dialog/use-retained-dialog-focus.js +1 -1
  333. package/dist/components/overlays/Modal/Modal.js +1 -1
  334. package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
  335. package/dist/components/overlays/Modal/Overlay.js +1 -1
  336. package/dist/components/overlays/Modal/Popover.js +1 -1
  337. package/dist/components/overlays/Modal/Tray.js +1 -1
  338. package/dist/components/overlays/Modal/Underlay.js +1 -1
  339. package/dist/components/overlays/Modal/modal-containment.js +1 -1
  340. package/dist/components/overlays/Notifications/Notification.js +1 -1
  341. package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
  342. package/dist/components/overlays/Notifications/NotificationCard.js +1 -1
  343. package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
  344. package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
  345. package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
  346. package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
  347. package/dist/components/overlays/Notifications/PersistentNotificationsList.js +1 -1
  348. package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
  349. package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
  350. package/dist/components/overlays/Notifications/index.js +1 -1
  351. package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
  352. package/dist/components/overlays/Notifications/use-notifications.js +1 -1
  353. package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
  354. package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
  355. package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
  356. package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
  357. package/dist/components/overlays/Toast/ToastItem.js +1 -1
  358. package/dist/components/overlays/Toast/index.js +1 -1
  359. package/dist/components/overlays/Toast/useProgressToast.js +1 -1
  360. package/dist/components/overlays/Toast/useToast.js +1 -1
  361. package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
  362. package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
  363. package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
  364. package/dist/components/overlays/Tooltip/context.js +1 -1
  365. package/dist/components/overlays/Tooltip/split-trigger-props.js +1 -1
  366. package/dist/components/portal/Portal.js +1 -1
  367. package/dist/components/portal/PortalProvider.js +1 -1
  368. package/dist/components/portal/usePortal.js +1 -1
  369. package/dist/components/shared/DraggableCollection.js +1 -1
  370. package/dist/components/shared/InvalidIcon.js +1 -1
  371. package/dist/components/shared/ValidIcon.js +1 -1
  372. package/dist/components/status/LoadingAnimation/LoadingAnimation.js +1 -1
  373. package/dist/components/status/Spin/Cube.js +1 -1
  374. package/dist/components/status/Spin/InternalSpinner.js +1 -1
  375. package/dist/components/status/Spin/Spin.js +1 -1
  376. package/dist/components/status/Spin/SpinsContainer.js +1 -1
  377. package/dist/data/item-themes.js +1 -1
  378. package/dist/data/themes.js +1 -1
  379. package/dist/eslint-plugin/defaults.generated.js +25 -1
  380. package/dist/eslint-plugin/defaults.generated.js.map +1 -1
  381. package/dist/eslint-plugin/index.js +1 -1
  382. package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
  383. package/dist/i18n/I18nProvider.js +1 -1
  384. package/dist/i18n/createFormatter.js +1 -1
  385. package/dist/i18n/index.js +1 -1
  386. package/dist/i18n/instance.js +1 -1
  387. package/dist/i18n/locales/de-DE/uikit.js +3 -2
  388. package/dist/i18n/locales/en-US/uikit.js +3 -2
  389. package/dist/i18n/locales/en-US/uikit.json.d.ts +1 -0
  390. package/dist/i18n/locales/es-ES/uikit.js +3 -2
  391. package/dist/i18n/locales/es-MX/uikit.js +3 -2
  392. package/dist/i18n/locales/fr-FR/uikit.js +3 -2
  393. package/dist/i18n/locales/it-IT/uikit.js +3 -2
  394. package/dist/i18n/locales/ja-JP/uikit.js +3 -2
  395. package/dist/i18n/locales/nb-NO/uikit.js +3 -2
  396. package/dist/i18n/locales/pt-BR/uikit.js +3 -2
  397. package/dist/i18n/locales/pt-PT/uikit.js +3 -2
  398. package/dist/i18n/locales/sv-SE/uikit.js +3 -2
  399. package/dist/i18n/locales/vi-VN/uikit.js +3 -2
  400. package/dist/i18n/locales.js +1 -1
  401. package/dist/i18n/namespace.js +1 -1
  402. package/dist/i18n/useFormatter.js +1 -1
  403. package/dist/i18n/useI18n.js +1 -1
  404. package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
  405. package/dist/icons/AdjustmentsIcon.js +1 -1
  406. package/dist/icons/AiIcon.js +1 -1
  407. package/dist/icons/AreaChartIcon.js +1 -1
  408. package/dist/icons/ArrowNarrowDownIcon.js +1 -1
  409. package/dist/icons/ArrowNarrowUpIcon.js +1 -1
  410. package/dist/icons/BackwardIcon.js +1 -1
  411. package/dist/icons/BarChartIcon.js +1 -1
  412. package/dist/icons/BellFilledIcon.js +1 -1
  413. package/dist/icons/BellIcon.js +1 -1
  414. package/dist/icons/BooleanIcon.js +1 -1
  415. package/dist/icons/CalendarEditIcon.js +1 -1
  416. package/dist/icons/CalendarIcon.js +1 -1
  417. package/dist/icons/CaretDownIcon.js +1 -1
  418. package/dist/icons/CaretUpIcon.js +1 -1
  419. package/dist/icons/ChartAreaStackedIcon.js +1 -1
  420. package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
  421. package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
  422. package/dist/icons/ChartBarGroupedIcon.js +1 -1
  423. package/dist/icons/ChartBarHorizontalIcon.js +1 -1
  424. package/dist/icons/ChartBarLineIcon.js +1 -1
  425. package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
  426. package/dist/icons/ChartBarStackedIcon.js +1 -1
  427. package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
  428. package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
  429. package/dist/icons/ChartBoxPlot2Icon.js +1 -1
  430. package/dist/icons/ChartBoxPlotIcon.js +1 -1
  431. package/dist/icons/ChartBubbleIcon.js +1 -1
  432. package/dist/icons/ChartDonut2Icon.js +1 -1
  433. package/dist/icons/ChartFunnelIcon.js +1 -1
  434. package/dist/icons/ChartHeatmapIcon.js +1 -1
  435. package/dist/icons/ChartKPIIcon.js +1 -1
  436. package/dist/icons/ChartPie2Icon.js +1 -1
  437. package/dist/icons/ChartScatterIcon.js +1 -1
  438. package/dist/icons/CheckCircleFilledIcon.js +1 -1
  439. package/dist/icons/CheckCircleIcon.js +1 -1
  440. package/dist/icons/CheckIcon.js +1 -1
  441. package/dist/icons/CircleFilledIcon.js +1 -1
  442. package/dist/icons/ClearIcon.js +1 -1
  443. package/dist/icons/CloseCircleFilledIcon.js +1 -1
  444. package/dist/icons/CloseCircleIcon.js +1 -1
  445. package/dist/icons/CloseIcon.js +1 -1
  446. package/dist/icons/CodeIcon.js +1 -1
  447. package/dist/icons/ColumnTotalIcon.js +1 -1
  448. package/dist/icons/CopyIcon.js +1 -1
  449. package/dist/icons/CountIcon.js +1 -1
  450. package/dist/icons/CubeIcon.js +1 -1
  451. package/dist/icons/CubePauseIcon.js +1 -1
  452. package/dist/icons/CubePlayIcon.js +1 -1
  453. package/dist/icons/CurrencyDollarIcon.js +1 -1
  454. package/dist/icons/DangerIcon.js +1 -1
  455. package/dist/icons/DashboardIcon.js +1 -1
  456. package/dist/icons/DatabaseIcon.js +1 -1
  457. package/dist/icons/DecimalDecreaseIcon.js +1 -1
  458. package/dist/icons/DecimalIncreaseIcon.js +1 -1
  459. package/dist/icons/DirectionIcon.js +1 -1
  460. package/dist/icons/DonutIcon.js +1 -1
  461. package/dist/icons/DownIcon.js +1 -1
  462. package/dist/icons/EditIcon.js +1 -1
  463. package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
  464. package/dist/icons/ExclamationCircleIcon.js +1 -1
  465. package/dist/icons/ExclamationIcon.js +1 -1
  466. package/dist/icons/EyeIcon.js +1 -1
  467. package/dist/icons/EyeInvisibleIcon.js +1 -1
  468. package/dist/icons/FilterIcon.js +1 -1
  469. package/dist/icons/FolderFilledIcon.js +1 -1
  470. package/dist/icons/FolderIcon.js +1 -1
  471. package/dist/icons/FolderOpenFilledIcon.js +1 -1
  472. package/dist/icons/FolderOpenIcon.js +1 -1
  473. package/dist/icons/ForwardIcon.js +1 -1
  474. package/dist/icons/GripVerticalIcon.js +1 -1
  475. package/dist/icons/HierarchyIcon.js +1 -1
  476. package/dist/icons/HierarchyOpenIcon.js +1 -1
  477. package/dist/icons/Icon.js +1 -1
  478. package/dist/icons/InfoCircleIcon.js +1 -1
  479. package/dist/icons/InfoIcon.js +1 -1
  480. package/dist/icons/KeyIcon.js +1 -1
  481. package/dist/icons/LeftIcon.js +1 -1
  482. package/dist/icons/LineChartIcon.js +1 -1
  483. package/dist/icons/LoadingIcon.js +1 -1
  484. package/dist/icons/LockFilledIcon.js +1 -1
  485. package/dist/icons/LockIcon.js +1 -1
  486. package/dist/icons/MoreIcon.js +1 -1
  487. package/dist/icons/NotAllowedIcon.js +1 -1
  488. package/dist/icons/Number123Icon.js +1 -1
  489. package/dist/icons/NumberIcon.js +1 -1
  490. package/dist/icons/PauseCircleFilledIcon.js +1 -1
  491. package/dist/icons/PauseCircleIcon.js +1 -1
  492. package/dist/icons/PauseIcon.js +1 -1
  493. package/dist/icons/PercentageIcon.js +1 -1
  494. package/dist/icons/PieChartIcon.js +1 -1
  495. package/dist/icons/PipetteIcon.js +1 -1
  496. package/dist/icons/PlayCircleIcon.js +1 -1
  497. package/dist/icons/PlayIcon.js +1 -1
  498. package/dist/icons/PlusIcon.js +1 -1
  499. package/dist/icons/ProgressBarIcon.js +1 -1
  500. package/dist/icons/ReloadIcon.js +1 -1
  501. package/dist/icons/ReportIcon.js +1 -1
  502. package/dist/icons/ReturnIcon.js +1 -1
  503. package/dist/icons/RightIcon.js +1 -1
  504. package/dist/icons/RowTotalsIcon.js +1 -1
  505. package/dist/icons/SchemeIcon.js +1 -1
  506. package/dist/icons/SearchIcon.js +1 -1
  507. package/dist/icons/SemanticQueryIcon.js +1 -1
  508. package/dist/icons/SettingsIcon.js +1 -1
  509. package/dist/icons/ShieldFilledIcon.js +1 -1
  510. package/dist/icons/ShieldIcon.js +1 -1
  511. package/dist/icons/SlashIcon.js +1 -1
  512. package/dist/icons/SparklesIcon.js +1 -1
  513. package/dist/icons/SqlIcon.js +1 -1
  514. package/dist/icons/StatsIcon.js +1 -1
  515. package/dist/icons/StopIcon.js +1 -1
  516. package/dist/icons/StringIcon.js +1 -1
  517. package/dist/icons/SubtotalsIcon.js +1 -1
  518. package/dist/icons/SwitchIcon.js +1 -1
  519. package/dist/icons/TableIcon.js +1 -1
  520. package/dist/icons/ThumbsDownIcon.js +1 -1
  521. package/dist/icons/ThumbsUpIcon.js +1 -1
  522. package/dist/icons/ThunderboltCrossedIcon.js +1 -1
  523. package/dist/icons/ThunderboltFilledIcon.js +1 -1
  524. package/dist/icons/ThunderboltIcon.js +1 -1
  525. package/dist/icons/TimeIcon.js +1 -1
  526. package/dist/icons/TrashIcon.js +1 -1
  527. package/dist/icons/UnlockIcon.js +1 -1
  528. package/dist/icons/UpIcon.js +1 -1
  529. package/dist/icons/UserGroupIcon.js +1 -1
  530. package/dist/icons/UserIcon.js +1 -1
  531. package/dist/icons/UserLockIcon.js +1 -1
  532. package/dist/icons/ViewIcon.js +1 -1
  533. package/dist/icons/WarningFilledIcon.js +1 -1
  534. package/dist/icons/WarningIcon.js +1 -1
  535. package/dist/icons/wrap-icon.js +1 -1
  536. package/dist/index.js +1 -1
  537. package/dist/probe/canonicalize.js +1 -1
  538. package/dist/probe/css.js +1 -1
  539. package/dist/probe/index.js +1 -1
  540. package/dist/provider.js +1 -1
  541. package/dist/providers/TrackingProvider.js +1 -1
  542. package/dist/providers/navigation-url.js +1 -1
  543. package/dist/providers/navigationAdapter.default.js +1 -1
  544. package/dist/providers/use-navigation.js +1 -1
  545. package/dist/tokens/all-tokens.js +1 -1
  546. package/dist/tokens/base.js +1 -1
  547. package/dist/tokens/color-seed.js +1 -1
  548. package/dist/tokens/color-theme.js +1 -1
  549. package/dist/tokens/colors.js +1 -1
  550. package/dist/tokens/layout.js +1 -1
  551. package/dist/tokens/lazy-styles.js +1 -1
  552. package/dist/tokens/legacy-color.js +1 -1
  553. package/dist/tokens/palette-config.js +1 -1
  554. package/dist/tokens/palette.js +1 -1
  555. package/dist/tokens/resolve.js +1 -1
  556. package/dist/tokens/shadows.js +1 -1
  557. package/dist/tokens/sizes.js +1 -1
  558. package/dist/tokens/spacing.js +1 -1
  559. package/dist/tokens/typography.js +1 -1
  560. package/dist/utils/ResizeSensor.js +1 -1
  561. package/dist/utils/colors.js +1 -1
  562. package/dist/utils/dotize.js +1 -1
  563. package/dist/utils/is-dev-env.js +1 -1
  564. package/dist/utils/layout-scale.js +1 -1
  565. package/dist/utils/modules.js +1 -1
  566. package/dist/utils/promise.js +1 -1
  567. package/dist/utils/raf.js +1 -1
  568. package/dist/utils/random.js +1 -1
  569. package/dist/utils/range.js +1 -1
  570. package/dist/utils/react/RenderCache.js +1 -1
  571. package/dist/utils/react/Slots.js +1 -1
  572. package/dist/utils/react/chain.js +1 -1
  573. package/dist/utils/react/componentBaseProps.js +1 -1
  574. package/dist/utils/react/disabledProps.js +1 -1
  575. package/dist/utils/react/forwardRefWithGenerics.js +1 -1
  576. package/dist/utils/react/index.js +1 -1
  577. package/dist/utils/react/interactions.js +1 -1
  578. package/dist/utils/react/isTextOnly.js +1 -1
  579. package/dist/utils/react/mapProps.js +1 -1
  580. package/dist/utils/react/mergeProps.js +1 -1
  581. package/dist/utils/react/nullableValue.js +1 -1
  582. package/dist/utils/react/overlayKeyPropagation.js +1 -1
  583. package/dist/utils/react/pickBaseCustomizationProps.js +1 -1
  584. package/dist/utils/react/programmaticFocus.js +1 -1
  585. package/dist/utils/react/resolveIcon.js +1 -1
  586. package/dist/utils/react/sharedStore.js +1 -1
  587. package/dist/utils/react/useBufferedValue.js +1 -1
  588. package/dist/utils/react/useCombinedRefs.js +1 -1
  589. package/dist/utils/react/useControlledFocusVisible.js +1 -1
  590. package/dist/utils/react/useEventBus.js +1 -1
  591. package/dist/utils/react/useId.js +1 -1
  592. package/dist/utils/react/useIsDarwin.js +1 -1
  593. package/dist/utils/react/useKeySymbols.js +1 -1
  594. package/dist/utils/react/useLayoutEffect.js +1 -1
  595. package/dist/utils/react/useLocalStorage.js +1 -1
  596. package/dist/utils/react/useMergeStyles.js +1 -1
  597. package/dist/utils/react/useOverlayEscapeGuard.js +1 -1
  598. package/dist/utils/react/useOverlayPosition.js +1 -1
  599. package/dist/utils/react/usePopoverSync.js +1 -1
  600. package/dist/utils/react/useQaProps.js +1 -1
  601. package/dist/utils/react/useScheme.js +1 -1
  602. package/dist/utils/react/useViewportSize.js +1 -1
  603. package/dist/utils/react/wrapNodeIfPlain.js +1 -1
  604. package/dist/utils/selection.js +1 -1
  605. package/dist/utils/styles.js +1 -1
  606. package/dist/utils/tree.js +1 -1
  607. package/dist/utils/warnings.js +1 -1
  608. package/dist/version.js +2 -2
  609. package/package.json +2 -1
  610. package/src/components/fields/FilterListBox/FilterListBox.docs.mdx +23 -0
  611. package/src/components/fields/FilterPicker/FilterPicker.docs.mdx +35 -1
  612. package/src/components/fields/ListBox/ListBox.docs.mdx +33 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ListBox.js","names":["useHover","IconMinus","useVirtualizer","mergeStyles","Styles","tasty","DOMAttributes","ForwardedRef","forwardRef","MutableRefObject","ReactElement","KeyboardEvent","ReactKeyboardEvent","MouseEvent","ReactMouseEvent","ReactNode","RefObject","useEffect","useLayoutEffect","useMemo","useRef","AriaListBoxProps","DropTarget","mergeProps","mergeAriaProps","useDraggableItem","useDropIndicator","useFocusRing","useKeyboard","useListBox","useListBoxSection","useOption","Section","BaseSection","DraggableCollectionState","DroppableCollectionState","ListProps","useListState","useWarn","useI18n","CheckIcon","GripVerticalIcon","Icon","SIZE_NAME_TO_KEY","SIZES","useFocus","allowOverlayKeysToPropagate","pickBaseCustomizationProps","useCombinedRefs","StyledDivider","StyledFooter","StyledHeader","StyledSectionHeading","CollectionItem","CubeCollectionItemProps","filterCollectionItemProps","filterSelectionItemProps","getValueSelectionState","Item","FieldLayoutStyleProps","splitFieldLayout","useFieldProps","getValidationMods","getValidationTheme","wrapWithField","createMockDragState","useOptionOriginPress","DraggableListBox","EMPTY_ROW_STYLES","SelectionManager","Collection","CollectionBase","Node","CollectionNode","Key","FieldBaseProps","ComponentBasePropsWithoutChildren","ListBoxWrapperElement","qa","styles","display","gridColumns","gridRows","flow","gap","position","radius","color","transition","outline","focused","border","valid","invalid","disabled","ListElement","as","padding","empty","listStyle","boxSizing","margin","height","virtualized","Spacer","$","content","hide","ListBoxScrollElement","overflow","scrollbar","ListBoxItem","disableActionsFocus","all","outlineOffset","virtual","inset","transform","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","NO_OPTIONS","children","SelectAllOption","t0","_c","label","isIndeterminate","t1","onClick","focusProps","t2","undefined","t","t3","hoverProps","focusRingProps","isFocusVisible","t4","resolvedLabel","t5","markIcon","t6","indeterminate","checkboxMods","t7","checkboxIcon","t8","e","checkbox","currentTarget","querySelector","contains","target","handleClick","t9","e_0","preventDefault","stopPropagation","handleKeyDown","T0","t10","t11","t12","t13","listboxitem","checkable","t14","tabIndex","onKeyDown","t15","t16","Symbol","for","t17","getSelectableKeys","collection","disabledKeys","Set","keys","getKeys","node","getItem","type","has","props","push","getSelectAllSelection","isAllSelected","selection","shownKeys","hiddenKeys","length","next","delete","isEverySelectableSelected","selectionManager","rawSelection","hasSelectable","canSelectItem","toStatelySelection","value","isMultiple","withoutWholeListDropProps","id","_id","_describedBy","collectionProps","ListBox","ref","HTMLDivElement","valuePropsMapper","onChange","fieldProps","Array","isArray","extra","labelStyles","isRequired","necessityIndicator","message","description","externalMods","labelSuffix","form","lastSelectedKeyRef","externalSelectionHandler","wrappedOnSelectionChange","prevKey","current","from","listStateProps","disabledBehavior","defaultSelection","listState","hasSelectAll","fullCollection","items","first","isSomeSelected","isEmpty","handleSelectAllClick","propagate","selectAll","clearSelection","setSelectedKeys","lastFocusSourceRef","args","keyboardProps","fieldLayout","fillHeightOnFlex","itemsArray","hasSections","some","i","shouldVirtualize","listBoxProps","labelProps","isVirtualized","escapeKeyBehavior","isListElementFocused","listElementFocusProps","isSelectAllFocused","selectAllFocusProps","isListFocused","scrollRef","rowVirtualizer","count","getScrollElement","getItemKey","index","estimateSize","currentItem","XL","overscan","measure","lastFocusedKeyRef","focusedKey","hasFocusMoved","scrollElement","itemElement","CSS","escape","String","HTMLElement","findIndex","item","scrollToIndex","align","scrollTop","viewportHeight","clientHeight","viewportBottom","itemRect","getBoundingClientRect","scrollRect","itemTop","itemBottom","isAlreadyVisible","scrollIntoView","block","behavior","mergedListBoxProps","emptyLabelId","Boolean","join","orderedKeys","map","isCardFocused","customizationProps","listGapTokens","listBoxField","dragState","dropState","tokens","sections","getTotalSize","getVirtualItems","virtualItem","measureElement","start","renderedItems","isFirstSection","field","Option","state","highlight","isParentDisabled","virtualOffset","virtualRef","virtualIndex","element","localRef","HTMLLIElement","isDraggable","mockDragState","dragResult","effectiveDragProps","dragProps","isDragging","optionProps","isPressed","descriptionProps","shouldSelectOnPressUp","shouldFocusOnHover","style","_itemStyle","itemTokens","filteredItemProps","effectiveIcon","icon","runOptionExtras","EventTarget","setFocusedKey","clickTarget","checkboxElement","handleOptionExtras","originPress","manager","onSettle","onKeyUp","onPointerUp","ariaSelected","ariaDisabled","role","filteredOptionProps","theme","const","includeValid","listBoxItem","onPointerDown","wrapPointerUp","pressed","dragging","rendered","dropPosition","ListBoxDropIndicator","dropIndicatorProps","isHidden","isDropTarget","ListBoxSectionProps","ListBoxSection","heading","itemProps","headingProps","groupProps","childNodes","node_0","SectionComponent","ListBoxSectionComponent","Object","assign","displayName","defineProperty","enumerable","configurable","Item","_c","useHover","mergeProps","useFocus","mergeAriaProps","BaseSection","CollectionItem"],"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 { mergeStyles, Styles, tasty } from '@tenphi/tasty';\nimport {\n DOMAttributes,\n ForwardedRef,\n forwardRef,\n MutableRefObject,\n ReactElement,\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n RefObject,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n} from 'react';\nimport {\n AriaListBoxProps,\n DropTarget,\n mergeProps as mergeAriaProps,\n useDraggableItem,\n useDropIndicator,\n useFocusRing,\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/useI18n';\nimport { CheckIcon } from '../../../icons/CheckIcon';\nimport { GripVerticalIcon } from '../../../icons/GripVerticalIcon';\nimport { Icon } from '../../../icons/Icon';\nimport { SIZE_NAME_TO_KEY, SIZES } from '../../../tokens/sizes';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { mergeProps } from '../../../utils/react/mergeProps';\nimport { allowOverlayKeysToPropagate } from '../../../utils/react/overlayKeyPropagation';\nimport { pickBaseCustomizationProps } from '../../../utils/react/pickBaseCustomizationProps';\nimport { useCombinedRefs } from '../../../utils/react/useCombinedRefs';\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 filterSelectionItemProps,\n getValueSelectionState,\n} from '../../CollectionItem';\nimport { Item } from '../../content/Item/Item';\nimport {\n FieldLayoutStyleProps,\n splitFieldLayout,\n} from '../../form/field-layout';\nimport { useFieldProps } from '../../form/Form/use-field/use-field-props';\nimport {\n getValidationMods,\n getValidationTheme,\n} from '../../form/validation/resolve-validation-props';\nimport { wrapWithField } from '../../form/wrapper';\nimport { createMockDragState } from '../../shared/DraggableCollection';\nimport { useOptionOriginPress } from '../option-origin-press';\n\nimport { DraggableListBox } from './DraggableListBox';\nimport { EMPTY_ROW_STYLES } from './empty-row';\n\nimport type { SelectionManager } from '@react-stately/selection';\nimport type {\n Collection,\n CollectionBase,\n Node as CollectionNode,\n Key,\n} from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\nimport type { ComponentBasePropsWithoutChildren } from '../../../utils/react/componentBaseProps';\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': '$item-gap',\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: {\n '': '.5x bottom',\n // Empty, the list sits under its empty label and takes no space.\n empty: 0,\n },\n listStyle: 'none',\n boxSizing: 'content-box',\n margin: {\n '': '.5x .5x 0 .5x',\n '[data-shape=\"plain\"] | empty': '0',\n },\n height: 'max-content',\n // Virtualized, the options are placed absolutely, so the list takes its\n // height from this spacer: every option, measured or estimated. As content,\n // it leaves a `listStyles` height in charge, such as a `max` cap.\n position: {\n '': false,\n virtualized: 'relative',\n },\n Spacer: {\n $: '&::after',\n content: '\"\"',\n display: 'block',\n hide: {\n '': true,\n virtualized: false,\n },\n height: '$list-virtual-height',\n },\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: '(-1 * $outline-offset)',\n // Virtualized, the option sits at the offset the virtualizer gives it.\n position: {\n '': 'relative',\n virtual: 'absolute',\n },\n inset: {\n '': false,\n virtual: 'top dock',\n },\n transform: {\n '': false,\n virtual: 'translateY($option-virtual-offset)',\n },\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 // A marker line in device pixels, not a border.\n '$drop-indicator-size': '2px',\n // Centred in the gap between two options, or on the edge of the list.\n top: {\n '': '($drop-indicator-size / -2 - $list-gap / 2)',\n ':first-child | :last-child': '($drop-indicator-size / -2)',\n },\n height: '$drop-indicator-size',\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\n Omit<\n AriaListBoxProps<T>,\n 'autoFocus' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange'\n >,\n CollectionBase<T>,\n FieldBaseProps<Key | readonly Key[] | null | undefined>,\n ComponentBasePropsWithoutChildren,\n FieldLayoutStyleProps {\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 (`$item-gap`, `1px`). 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 * Leave it off for components that keep DOM focus outside (e.g. searchable FilterListBox).\n * Defaults to false.\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 * and `onSelectionChange` reports that item again. Applies in single selection mode, whether\n * `selectionMode` is set or left to its default. Useful when embedding ListBox inside\n * 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\" checkbox in multiple selection mode.\n * It sits above the list as its own Tab stop and shows checked once every\n * selectable item the list shows is selected. A press selects every item\n * (`'all'`), or once checked takes the items shown out of the selection.\n * Under a `filter` it acts only on the items shown, and selected items the\n * filter hides stay selected.\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 * It wraps to the list's width, so a long message, or an action in it, stays in view.\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\n/** A collection with no options, for a list state that isn't needed. */\nconst NO_OPTIONS: ListProps<any> = { children: [], selectionMode: 'none' };\n\n/**\n * The \"Select All\" row: a tri-state checkbox above the list rather than an\n * option in it, since it acts on the options instead of being one. Being\n * outside the listbox keeps the listbox's children to options and groups, and\n * makes it a Tab stop of its own, which a list in virtual focus (searchable\n * lists) could not offer as an option.\n */\nconst SelectAllOption = ({\n label,\n isSelected,\n isIndeterminate,\n isDisabled,\n isCheckable,\n size = 'medium',\n onClick,\n focusProps,\n allValueProps = {},\n}: {\n label?: ReactNode;\n isSelected: boolean;\n isIndeterminate: boolean;\n isDisabled?: boolean;\n isCheckable?: boolean;\n size?: 'small' | 'medium' | 'large';\n /** `propagate` is false for a press on the checkbox mark, which only toggles */\n onClick: (propagate: boolean) => void;\n /** Tells the list when the row has focus */\n focusProps: DOMAttributes<HTMLElement>;\n allValueProps?: Partial<CubeCollectionItemProps<any>>;\n}) => {\n const { t } = useI18n();\n const { hoverProps, isHovered } = useHover({ isDisabled });\n const { focusProps: focusRingProps, isFocusVisible } = useFocusRing();\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} aria-hidden=\"true\">\n <IconMinus />\n </Icon>\n ) : (\n <CheckIcon size={12} stroke={3} />\n );\n\n const checkboxMods = {\n selected: isSelected,\n disabled: isDisabled,\n hovered: isHovered,\n indeterminate: isIndeterminate,\n };\n\n const checkboxIcon = isCheckable ? (\n <ListBoxCheckboxWrapper data-element=\"CheckboxWrapper\" mods={checkboxMods}>\n <ListBoxCheckbox data-element=\"Checkbox\" mods={checkboxMods}>\n {(isIndeterminate || isSelected) && markIcon}\n </ListBoxCheckbox>\n </ListBoxCheckboxWrapper>\n ) : null;\n\n const handleClick = (e: ReactMouseEvent<HTMLElement>) => {\n // A click on the checkbox mark only toggles; one on the label also tells\n // the list's owner, which closes a picker on it.\n const checkbox = e.currentTarget.querySelector(\n '[data-element=\"CheckboxWrapper\"]',\n );\n\n onClick(!checkbox?.contains(e.target as Node));\n };\n\n const handleKeyDown = (e: ReactKeyboardEvent<HTMLElement>) => {\n if (e.key !== ' ') return;\n\n // Space toggles a checkbox, and must neither scroll nor reach a shortcut.\n e.preventDefault();\n e.stopPropagation();\n onClick(false);\n };\n\n return (\n <>\n <ListBoxItem\n as=\"div\"\n role=\"checkbox\"\n aria-checked={isIndeterminate ? 'mixed' : isSelected}\n data-size={size}\n size={size}\n isDisabled={isDisabled}\n icon={checkboxIcon}\n mods={{\n listboxitem: true,\n // As a mod rather than `isSelected`, which would add an\n // `aria-selected` a checkbox does not take.\n selected: isSelected,\n disabled: isDisabled,\n checkable: isCheckable,\n hovered: isHovered,\n focused: isFocusVisible,\n indeterminate: isIndeterminate,\n all: true, // Important: this preserves the 'all' modifier\n }}\n {...mergeProps(hoverProps, focusRingProps, focusProps, allValueProps, {\n tabIndex: isDisabled ? undefined : 0,\n onClick: handleClick,\n onKeyDown: handleKeyDown,\n })}\n >\n {resolvedLabel}\n </ListBoxItem>\n <StyledDivider as=\"div\" role=\"presentation\" />\n </>\n );\n};\n\n/** The keys of the options a user can select in a collection: not disabled. */\nfunction getSelectableKeys(\n collection: Collection<CollectionNode<unknown>>,\n disabledKeys: Set<Key>,\n): Key[] {\n const keys: Key[] = [];\n\n for (const key of collection.getKeys()) {\n const node = collection.getItem(key);\n\n if (\n node?.type === 'item' &&\n !disabledKeys.has(key) &&\n !node.props?.isDisabled\n ) {\n keys.push(key);\n }\n }\n\n return keys;\n}\n\n/**\n * The selection a \"Select All\" press leaves. While it isn't checked, the press\n * selects all (`'all'`), or under a filter adds the options shown. Once it is,\n * the press takes the options shown out of the selection: selected options\n * the list doesn't show, hidden by a filter or not among its options, stay.\n * `hiddenKeys` are the selectable options a filter hides.\n */\nfunction getSelectAllSelection(\n isAllSelected: boolean,\n selection: 'all' | Set<Key>,\n shownKeys: Key[],\n hiddenKeys: Key[],\n): 'all' | Set<Key> {\n if (!isAllSelected) {\n return selection === 'all' || hiddenKeys.length === 0\n ? 'all'\n : new Set([...selection, ...shownKeys]);\n }\n\n if (selection === 'all') return new Set(hiddenKeys);\n\n const next = new Set(selection);\n\n for (const key of shownKeys) next.delete(key);\n\n return next;\n}\n\n/**\n * Whether every option a user can select is selected, which checks \"Select\n * All\". Disabled options don't count, and a list with nothing to select is\n * never all selected.\n */\nfunction isEverySelectableSelected(\n collection: Collection<CollectionNode<unknown>>,\n selectionManager: SelectionManager,\n): boolean {\n if (selectionManager.rawSelection === 'all') return true;\n\n let hasSelectable = false;\n\n for (const key of collection.getKeys()) {\n if (\n collection.getItem(key)?.type !== 'item' ||\n !selectionManager.canSelectItem(key)\n ) {\n continue;\n }\n\n if (!selectionManager.isSelected(key)) return false;\n\n hasSelectable = true;\n }\n\n return hasSelectable;\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\n/**\n * A droppable collection's props without the `id` and the null\n * `aria-describedby` React Aria gives the collection. `mergeProps` would keep\n * both over the listbox's own, so a reorderable list would drop the `id` its\n * caller passed, leave a search input's `aria-controls` pointing at nothing,\n * and lose its description and error message. React Aria sets both for a drop\n * on the whole list, and ListBox renders no such drop target.\n */\nfunction withoutWholeListDropProps({\n id: _id,\n 'aria-describedby': _describedBy,\n ...collectionProps\n}: Record<string, unknown>) {\n return collectionProps;\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 } = props;\n\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 // Picking the selected option again keeps it, in single mode\n // whether set or by default. The controlled key is the one picked.\n if (disableSelectionToggle && props.selectionMode !== 'multiple') {\n const prevKey = selectedKey ?? 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 selectedKey,\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 = getValueSelectionState(useListState(listStateProps));\n\n const hasSelectAll = !!showSelectAll && props.selectionMode === 'multiple';\n\n // Under a filter, \"Select All\" acts on the options it shows and keeps the\n // selected ones the filter hides, so it needs the whole list. Built only\n // then; otherwise it is empty.\n const { collection: fullCollection } = useListState<T>(\n hasSelectAll && filter\n ? { children: props.children, items: props.items, selectionMode: 'none' }\n : NO_OPTIONS,\n );\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 // Checked once every selectable option is selected, however it got there;\n // mixed while only some are.\n const isAllSelected =\n hasSelectAll &&\n isEverySelectableSelected(listState.collection, listState.selectionManager);\n const isSomeSelected =\n hasSelectAll && !isAllSelected && !listState.selectionManager.isEmpty;\n\n // React Stately reports the change, so it is reported once. It reports none\n // when nothing changes, as when `disallowEmptySelection` keeps the selection.\n const handleSelectAllClick = (propagate: boolean) => {\n if (isDisabled || !hasSelectAll) return;\n\n const { collection, disabledKeys, selectionManager } = listState;\n const next = getSelectAllSelection(\n isAllSelected,\n selectionManager.rawSelection,\n getSelectableKeys(collection, disabledKeys),\n getSelectableKeys(fullCollection, disabledKeys).filter(\n (key) => !collection.getItem(key),\n ),\n );\n\n if (next === 'all') {\n selectionManager.selectAll();\n } else if (next.size === 0) {\n selectionManager.clearSelection();\n } else {\n selectionManager.setSelectedKeys(next);\n }\n\n if (propagate && !isAllSelected) {\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` and `Tab` have to leave the list so a\n // surrounding overlay can close on the one and keep focus inside with the\n // other, while every other key stays contained. See\n // `allowOverlayKeysToPropagate`.\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n allowOverlayKeysToPropagate(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 const fieldLayout = splitFieldLayout(props, { fillHeightOnFlex: true });\n\n styles = fieldLayout.styles;\n\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, labelProps } = useListBox(\n {\n ...props,\n id: id,\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 // An empty list is still a Tab stop, on its `ul` with no height, so the\n // card shows that focus as it shows its own.\n const { isFocused: isListElementFocused, focusProps: listElementFocusProps } =\n useFocus();\n const { isFocused: isSelectAllFocused, focusProps: selectAllFocusProps } =\n 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 // Focus on \"Select All\" is on neither.\n const isListFocused =\n !isSelectAllFocused &&\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 // An item's named size is its row's height; a custom one is measured.\n return SIZES[\n (SIZE_NAME_TO_KEY[currentItem?.props?.size] ??\n SIZE_NAME_TO_KEY[size]) as keyof typeof SIZES\n ];\n },\n // Options are positioned absolutely here, so their margins space nothing.\n // The virtualizer takes pixels: `1` matches the `$item-gap` 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 // The focused key this effect last saw, to tell a move of focus from a\n // change of the items.\n const lastFocusedKeyRef = useRef<Key | null>(null);\n\n // Keep the focused option visible. One the virtualizer hasn't rendered is\n // scrolled to by index, which renders it, when focus moves to it (End,\n // typeahead, the selected option on autofocus or Tab); new items alone\n // leave a list the user scrolled away from where it is. One already\n // rendered is scrolled to only for keyboard navigation, so a click never\n // moves the list.\n useLayoutEffect(() => {\n const focusedKey = listState.selectionManager.focusedKey;\n const hasFocusMoved = focusedKey !== lastFocusedKeyRef.current;\n\n lastFocusedKeyRef.current = focusedKey;\n\n if (focusedKey == null) 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\n if (!itemElement) {\n const index = shouldVirtualize\n ? itemsArray.findIndex((item) => item.key === focusedKey)\n : -1;\n\n if (index !== -1 && hasFocusMoved) {\n rowVirtualizer.scrollToIndex(index, { align: 'auto' });\n }\n\n return;\n }\n\n // Only scroll on keyboard navigation\n if (lastFocusSourceRef.current !== 'keyboard') 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 }, [\n listState.selectionManager.focusedKey,\n itemsArray,\n shouldVirtualize,\n rowVirtualizer,\n ]);\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 // `useListBox` takes no validation state, so the list would look invalid\n // without a screen reader ever hearing it.\n const mergedListBoxProps = mergeProps(\n listBoxProps,\n keyboardProps,\n listElementFocusProps,\n { 'aria-invalid': isInvalid || undefined },\n );\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 // An empty list keeps its listbox, which ids from outside point at (a search\n // input's `aria-controls`, the label's `aria-labelledby`), and says why it is\n // empty through its description: a listbox may hold only options and groups.\n const isEmpty = listState.collection.size === 0;\n const emptyLabelId = `${listBoxProps.id}-empty`;\n\n if (isEmpty) {\n mergedListBoxProps['aria-describedby'] = [\n mergedListBoxProps['aria-describedby'],\n emptyLabelId,\n ]\n .filter(Boolean)\n .join(' ');\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 isCardFocused = isFocused || (isEmpty && isListElementFocused);\n\n const mods = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n focused: isCardFocused,\n header: !!header || hasSelectAll,\n footer: !!footer,\n selectAll: hasSelectAll,\n ...externalMods,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isCardFocused,\n header,\n footer,\n hasSelectAll,\n externalMods,\n ],\n );\n\n const customizationProps = pickBaseCustomizationProps(props);\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 {hasSelectAll ? (\n <SelectAllOption\n label={selectAllLabel}\n isSelected={isAllSelected}\n isIndeterminate={isSomeSelected}\n isDisabled={isDisabled}\n isCheckable={isCheckable}\n size={size}\n allValueProps={allValueProps}\n focusProps={selectAllFocusProps}\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 {isEmpty && (\n <Item\n id={emptyLabelId}\n // Read as the listbox's description, so not a second time as text.\n aria-hidden=\"true\"\n preset=\"t4\"\n color=\"#dark-03\"\n size={size}\n padding=\"(.5x - 1bw)\"\n styles={EMPTY_ROW_STYLES}\n >\n {emptyLabel}\n </Item>\n )}\n {isReorderable && !isEmpty ? (\n <DraggableListBox\n state={listState}\n listRef={listRef}\n orderedKeys={orderedKeys}\n onReorder={onReorder}\n >\n {(dragState, dropState, collectionProps) => (\n <ListElement\n {...customizationProps}\n qa={qa || 'ListBox'}\n {...mergeProps(\n mergedListBoxProps,\n withoutWholeListDropProps(collectionProps),\n )}\n ref={listRef}\n styles={listStyles}\n tokens={{ ...listGapTokens, ...customizationProps.tokens }}\n aria-disabled={isDisabled || undefined}\n mods={{ sections: false, ...externalMods }}\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 {...customizationProps}\n qa={qa || 'ListBox'}\n {...mergedListBoxProps}\n ref={listRef}\n styles={listStyles}\n tokens={{\n ...listGapTokens,\n ...customizationProps.tokens,\n '$list-virtual-height': shouldVirtualize\n ? `${rowVirtualizer.getTotalSize()}px`\n : undefined,\n }}\n aria-disabled={isDisabled || undefined}\n mods={{\n sections: hasSections,\n empty: isEmpty,\n ...externalMods,\n // The spacer and row positions follow the same virtualization state.\n virtualized: shouldVirtualize,\n }}\n data-shape={shape}\n data-input-type=\"listbox\"\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 virtualOffset={virtualItem.start}\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 // A listbox holds only options and groups.\n <StyledDivider\n key={`divider-${String(item.key)}`}\n role=\"presentation\"\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'>>(listBoxField, {\n ...props,\n ...fieldLayout.field,\n labelProps: mergeAriaProps(labelProps, props.labelProps),\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 virtualOffset,\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 /** The option's offset from the list's top, in pixels, when virtualized */\n virtualOffset?: number;\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 // An option takes no inline `style` from its item.\n const {\n style: _itemStyle,\n tokens: itemTokens,\n ...filteredItemProps\n } = filterSelectionItemProps(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 runOptionExtras = (target: EventTarget | null) => {\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 = 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 const handleOptionExtras = (e: MouseEvent) => runOptionExtras(e.target);\n\n // A mouse press picks the option it started on, even if the list moved\n // under the pointer before the release. The browser then sends the click to\n // a common ancestor, so the press runs the click's side effects itself.\n const originPress = useOptionOriginPress({\n key: item.key,\n ref: localRef,\n manager: state.selectionManager,\n isDisabled,\n onSettle: runOptionExtras,\n });\n\n // Filter out React Aria props that shouldn't reach the DOM\n const {\n onKeyDown,\n onKeyUp,\n onPointerUp,\n tabIndex,\n 'aria-selected': ariaSelected,\n 'aria-disabled': ariaDisabled,\n role,\n ...filteredOptionProps\n } = filterSelectionItemProps(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 onPointerDown: originPress.onPointerDown,\n onPointerUp: originPress.wrapPointerUp(onPointerUp),\n tabIndex,\n 'aria-selected': ariaSelected,\n 'aria-disabled': ariaDisabled,\n role,\n },\n effectiveDragProps,\n )}\n theme={theme}\n tokens={{\n ...itemTokens,\n '$option-virtual-offset':\n virtualOffset == null ? undefined : `${virtualOffset}px`,\n }}\n // An item's own `size` wins over the list's, for that row only.\n data-size={filteredItemProps.size ?? size}\n data-index={virtualIndex}\n size={filteredItemProps.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 virtual: virtualOffset != null,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2FA,MAAM6E,wBAAwBxE,MAAM;CAClCyE,IAAI;CACJC,QAAQ;EACNC,SAAS;EACTC,aAAa;EACbC,UAAU;EACVC,MAAM;EACNC,KAAK;EACLC,UAAU;EACVC,QAAQ;GACN,IAAI;GACJ,4BAA0B;GAC1B,0BAAwB;EAC1B;EACAC,OAAO;EACPC,YAAY;EACZC,SAAS;GACP,IAAI;GACJ,qBAAqB;GACrBC,SAAS;EACX;EACAC,QAAQ;GACN,IAAI;GACJD,SAAS;GACTE,OAAO;GACPC,SAAS;GACTC,UAAU;GACV,kEAA8D;EAChE;CACF;AACF,CAAC;AAED,MAAMC,cAAc1F,MAAM;CACx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A,QAAA8G,IAAA;EA/BvBE,KAAA,qBAAC,uBAAD;GAAsB,GAAKiP;GAAmB/S,QAAAA;GAA9C,UAAA,CACGmD,IASDS,EAVoB;;EAgCE9G,EAAA,MAAAiW;EAAAjW,EAAA,MAAAkD;EAAAlD,EAAA,MAAAqG;EAAArG,EAAA,MAAA8G;EAAA9G,EAAA,MAAAgH;CAAA,OAAAA,KAAAhH,EAAA;CAAA,OAhCxBgH;AAgCwB;AAM5B,MAAMuP,0BAA0BC,OAAOC,OAAOjb,SAAa,EACzDkb,aAAa,UACf,CAAC;AAEDxL,QAAQjO,OAAOL;AAEfsO,QAAQ3P,UAAUgb;AAElBC,OAAOG,eAAezL,SAAS,iBAAiB;CAC9CP,OAAO;CACPiM,YAAY;CACZC,cAAc;AAChB,CAAC"}
1
+ {"version":3,"file":"ListBox.js","names":["useHover","IconMinus","elementScroll","observeElementOffset","useVirtualizer","mergeStyles","Styles","tasty","DOMAttributes","ForwardedRef","forwardRef","MutableRefObject","ReactElement","KeyboardEvent","ReactKeyboardEvent","MouseEvent","ReactMouseEvent","ReactNode","RefObject","useEffect","useEffectEvent","useLayoutEffect","useMemo","useRef","AriaListBoxProps","DropTarget","mergeProps","mergeAriaProps","useDraggableItem","useDropIndicator","useFocusRing","useKeyboard","useListBox","useListBoxSection","useOption","VisuallyHidden","Section","BaseSection","DraggableCollectionState","DroppableCollectionState","ListProps","useListState","useWarn","useI18n","CheckIcon","GripVerticalIcon","Icon","LoadingIcon","SIZE_NAME_TO_KEY","SIZES","useFocus","allowOverlayKeysToPropagate","pickBaseCustomizationProps","useCombinedRefs","StyledDivider","StyledFooter","StyledHeader","StyledSectionHeading","CollectionItem","CubeCollectionItemProps","filterCollectionItemProps","filterSelectionItemProps","getValueSelectionState","Item","FieldLayoutStyleProps","splitFieldLayout","useFieldProps","getValidationMods","getValidationTheme","wrapWithField","createMockDragState","useOptionOriginPress","DraggableListBox","EMPTY_ROW_STYLES","SelectionManager","Collection","CollectionBase","Node","CollectionNode","Key","FieldBaseProps","ComponentBasePropsWithoutChildren","ListBoxWrapperElement","qa","styles","display","gridColumns","gridRows","flow","gap","position","radius","color","transition","outline","focused","border","valid","invalid","disabled","ListElement","as","padding","empty","listStyle","boxSizing","margin","height","virtualized","Spacer","$","content","hide","ListBoxScrollElement","overflow","scrollbar","ListBoxItem","disableActionsFocus","all","outlineOffset","virtual","inset","transform","cursor","draggable","opacity","gripIcon","ListBoxDropIndicatorElement","zIndex","pointerEvents","Indicator","left","right","top","fill","LoadMoreSentinelElement","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","onLoadMore","hasMore","isLoadingMore","loadMoreMargin","getListOffset","list","HTMLElement","scrollElement","offsetParent","offsetTop","clientTop","LOADING_ROW_KEY","MIN_LOAD_MORE_MARGIN","NO_OPTIONS","children","SelectAllOption","t0","_c","label","isIndeterminate","t1","onClick","focusProps","t2","undefined","t","t3","hoverProps","focusRingProps","isFocusVisible","t4","resolvedLabel","t5","markIcon","t6","indeterminate","checkboxMods","t7","checkboxIcon","t8","e","checkbox","currentTarget","querySelector","contains","target","handleClick","t9","e_0","preventDefault","stopPropagation","handleKeyDown","T0","t10","t11","t12","t13","listboxitem","checkable","t14","tabIndex","onKeyDown","t15","t16","Symbol","for","t17","getSelectableKeys","collection","disabledKeys","Set","keys","getKeys","node","getItem","type","has","props","push","getSelectAllSelection","isAllSelected","selection","shownKeys","hiddenKeys","length","next","delete","isEverySelectableSelected","selectionManager","rawSelection","hasSelectable","canSelectItem","toStatelySelection","value","isMultiple","withoutWholeListDropProps","id","_id","_describedBy","collectionProps","ListBox","ref","HTMLDivElement","valuePropsMapper","onChange","fieldProps","Array","isArray","extra","labelStyles","isRequired","necessityIndicator","message","description","externalMods","labelSuffix","form","lastSelectedKeyRef","externalSelectionHandler","wrappedOnSelectionChange","prevKey","current","from","listStateProps","disabledBehavior","defaultSelection","listState","hasSelectAll","fullCollection","items","first","isSomeSelected","isEmpty","handleSelectAllClick","propagate","selectAll","clearSelection","setSelectedKeys","lastFocusSourceRef","args","keyboardProps","fieldLayout","fillHeightOnFlex","itemsArray","hasSections","some","i","shouldVirtualize","canLoadMore","listBoxProps","labelProps","isVirtualized","escapeKeyBehavior","isListElementFocused","listElementFocusProps","isSelectAllFocused","selectAllFocusProps","isListFocused","scrollRef","listOffset","rowVirtualizer","count","getScrollElement","getItemKey","index","estimateSize","currentItem","XL","overscan","instance","onOffset","offset","isScrolling","Math","max","scrollToFn","options","measure","lastFocusedKeyRef","focusedKey","hasFocusMoved","itemElement","CSS","escape","String","findIndex","item","scrollToIndex","align","scrollTop","viewportHeight","clientHeight","viewportBottom","itemRect","getBoundingClientRect","scrollRect","itemTop","itemBottom","isAlreadyVisible","scrollIntoView","block","behavior","sentinelRef","HTMLLIElement","loadMore","root","sentinel","IntersectionObserver","observer","entries","entry","isIntersecting","rootMargin","observe","disconnect","loadingRowRef","row","scrollHeight","rowBlock","offsetHeight","mergedListBoxProps","hasNoOptions","emptyLabelId","loadingMoreLabelId","Boolean","join","orderedKeys","map","isCardFocused","customizationProps","listGapTokens","loadingMoreLabel","loadMoreSentinel","sections","loadingMoreRow","listBoxField","dragState","dropState","tokens","getTotalSize","getVirtualItems","virtualItem","measureElement","start","renderedItems","isFirstSection","field","Option","state","highlight","isParentDisabled","virtualOffset","virtualRef","virtualIndex","element","localRef","isDraggable","mockDragState","dragResult","effectiveDragProps","dragProps","isDragging","optionProps","isPressed","descriptionProps","shouldSelectOnPressUp","shouldFocusOnHover","style","_itemStyle","itemTokens","filteredItemProps","effectiveIcon","icon","runOptionExtras","EventTarget","setFocusedKey","clickTarget","checkboxElement","handleOptionExtras","originPress","manager","onSettle","onKeyUp","onPointerUp","ariaSelected","ariaDisabled","role","filteredOptionProps","theme","const","includeValid","listBoxItem","onPointerDown","wrapPointerUp","pressed","dragging","rendered","dropPosition","LoadingMoreRow","rowRef","LoadingMoreStatus","isLoading","ListBoxDropIndicator","dropIndicatorProps","isHidden","isDropTarget","ListBoxSectionProps","ListBoxSection","heading","itemProps","headingProps","groupProps","childNodes","node_0","SectionComponent","ListBoxSectionComponent","Object","assign","displayName","defineProperty","enumerable","configurable","Item","_c","useHover","mergeProps","useFocus","mergeAriaProps","BaseSection","CollectionItem"],"sources":["../../../../src/components/fields/ListBox/ListBox.tsx"],"sourcesContent":["import { useHover } from '@react-aria/interactions';\nimport { IconMinus } from '@tabler/icons-react';\n// The helpers come through react-virtual, so a consumer gets them from the\n// same copy of virtual-core as the virtualizer.\nimport {\n elementScroll,\n observeElementOffset,\n useVirtualizer,\n} from '@tanstack/react-virtual';\nimport { mergeStyles, Styles, tasty } from '@tenphi/tasty';\nimport {\n DOMAttributes,\n ForwardedRef,\n forwardRef,\n MutableRefObject,\n ReactElement,\n KeyboardEvent as ReactKeyboardEvent,\n MouseEvent as ReactMouseEvent,\n ReactNode,\n RefObject,\n useEffect,\n useEffectEvent,\n useLayoutEffect,\n useMemo,\n useRef,\n} from 'react';\nimport {\n AriaListBoxProps,\n DropTarget,\n mergeProps as mergeAriaProps,\n useDraggableItem,\n useDropIndicator,\n useFocusRing,\n useKeyboard,\n useListBox,\n useListBoxSection,\n useOption,\n VisuallyHidden,\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/useI18n';\nimport { CheckIcon } from '../../../icons/CheckIcon';\nimport { GripVerticalIcon } from '../../../icons/GripVerticalIcon';\nimport { Icon } from '../../../icons/Icon';\nimport { LoadingIcon } from '../../../icons/LoadingIcon';\nimport { SIZE_NAME_TO_KEY, SIZES } from '../../../tokens/sizes';\nimport { useFocus } from '../../../utils/react/interactions';\nimport { mergeProps } from '../../../utils/react/mergeProps';\nimport { allowOverlayKeysToPropagate } from '../../../utils/react/overlayKeyPropagation';\nimport { pickBaseCustomizationProps } from '../../../utils/react/pickBaseCustomizationProps';\nimport { useCombinedRefs } from '../../../utils/react/useCombinedRefs';\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 filterSelectionItemProps,\n getValueSelectionState,\n} from '../../CollectionItem';\nimport { Item } from '../../content/Item/Item';\nimport {\n FieldLayoutStyleProps,\n splitFieldLayout,\n} from '../../form/field-layout';\nimport { useFieldProps } from '../../form/Form/use-field/use-field-props';\nimport {\n getValidationMods,\n getValidationTheme,\n} from '../../form/validation/resolve-validation-props';\nimport { wrapWithField } from '../../form/wrapper';\nimport { createMockDragState } from '../../shared/DraggableCollection';\nimport { useOptionOriginPress } from '../option-origin-press';\n\nimport { DraggableListBox } from './DraggableListBox';\nimport { EMPTY_ROW_STYLES } from './empty-row';\n\nimport type { SelectionManager } from '@react-stately/selection';\nimport type {\n Collection,\n CollectionBase,\n Node as CollectionNode,\n Key,\n} from '@react-types/shared';\nimport type { FieldBaseProps } from '../../../shared';\nimport type { ComponentBasePropsWithoutChildren } from '../../../utils/react/componentBaseProps';\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': '$item-gap',\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: {\n '': '.5x bottom',\n // Empty, the list sits under its empty label and takes no space.\n empty: 0,\n },\n listStyle: 'none',\n boxSizing: 'content-box',\n margin: {\n '': '.5x .5x 0 .5x',\n '[data-shape=\"plain\"] | empty': '0',\n },\n height: 'max-content',\n // Virtualized, the options are placed absolutely, so the list takes its\n // height from this spacer: every option, measured or estimated. As content,\n // it leaves a `listStyles` height in charge, such as a `max` cap.\n position: {\n '': false,\n virtualized: 'relative',\n },\n Spacer: {\n $: '&::after',\n content: '\"\"',\n display: 'block',\n hide: {\n '': true,\n virtualized: false,\n },\n height: '$list-virtual-height',\n },\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: '(-1 * $outline-offset)',\n // Virtualized, the option sits at the offset the virtualizer gives it.\n position: {\n '': 'relative',\n virtual: 'absolute',\n },\n inset: {\n '': false,\n virtual: 'top dock',\n },\n transform: {\n '': false,\n virtual: 'translateY($option-virtual-offset)',\n },\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 // A marker line in device pixels, not a border.\n '$drop-indicator-size': '2px',\n // Centred in the gap between two options, or on the edge of the list.\n top: {\n '': '($drop-indicator-size / -2 - $list-gap / 2)',\n ':first-child | :last-child': '($drop-indicator-size / -2)',\n },\n height: '$drop-indicator-size',\n fill: '#primary',\n radius: 'round',\n },\n },\n});\n\n// The end of the list, which the load-more observer watches: zero height,\n// right after the last row, so a row scrolled into view brings it into view at\n// any margin. In flow it follows the last option. Virtualized, the options are\n// placed absolutely and the spacer's height is where the last one ends.\nconst LoadMoreSentinelElement = tasty({\n as: 'li',\n styles: {\n display: 'block',\n height: 0,\n // In flow after the last option: cancels the `$list-gap` that option keeps\n // while it is not the last child, as the drop indicator does. A section\n // keeps no gap to cancel.\n margin: {\n '': '(-1 * $list-gap) top',\n 'virtualized | sections': 0,\n },\n position: {\n '': false,\n virtualized: 'absolute',\n },\n inset: {\n '': false,\n virtualized: '$list-virtual-height 0 auto 0',\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\n Omit<\n AriaListBoxProps<T>,\n 'autoFocus' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange'\n >,\n CollectionBase<T>,\n FieldBaseProps<Key | readonly Key[] | null | undefined>,\n ComponentBasePropsWithoutChildren,\n FieldLayoutStyleProps {\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 (`$item-gap`, `1px`). 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 * Leave it off for components that keep DOM focus outside (e.g. searchable FilterListBox).\n * Defaults to false.\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 * and `onSelectionChange` reports that item again. Applies in single selection mode, whether\n * `selectionMode` is set or left to its default. Useful when embedding ListBox inside\n * 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\" checkbox in multiple selection mode.\n * It sits above the list as its own Tab stop and shows checked once every\n * selectable item the list shows is selected. A press selects every item\n * (`'all'`), or once checked takes the items shown out of the selection.\n * Under a `filter` it acts only on the items shown, and selected items the\n * filter hides stay selected.\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 * It wraps to the list's width, so a long message, or an action in it, stays in view.\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 /**\n * Called when the end of the list comes within `loadMoreMargin` of view, or\n * the options are too few to fill the list, while `hasMore` is true and\n * `isLoadingMore` is false. Append the next page to the options. Focus does\n * not wrap past the last loaded option while more can load.\n */\n onLoadMore?: () => void;\n /** Whether there are options left for `onLoadMore` to load. */\n hasMore?: boolean;\n /**\n * Whether the page `onLoadMore` asked for is loading. The list shows a\n * loading row after the last option, screen readers hear that more options\n * are loading, and `onLoadMore` waits until it is false again.\n */\n isLoadingMore?: boolean;\n /**\n * How far before the end of the list to call `onLoadMore`, in pixels.\n * Defaults to the list's visible height, at least 200, as in ItemTable.\n */\n loadMoreMargin?: number;\n}\n\n/**\n * Where a list starts in its scroll element: below its own top margin. From\n * layout, not client rects: a scaled ancestor (a popover's opening animation,\n * a zoomed page) scales those but not the scroll offset.\n */\nfunction getListOffset(\n list: HTMLElement | null,\n scrollElement: HTMLElement | null,\n): number {\n if (!list || !scrollElement) return 0;\n\n return list.offsetParent === scrollElement\n ? list.offsetTop\n : list.offsetTop - scrollElement.offsetTop - scrollElement.clientTop;\n}\n\n/** The loading row's key, for the virtualizer and React. */\nconst LOADING_ROW_KEY = '__ListBoxLoadingMore__';\n\n/** The least `loadMoreMargin` defaults to, in pixels, for a short list. */\nconst MIN_LOAD_MORE_MARGIN = 200;\n\n/** A collection with no options, for a list state that isn't needed. */\nconst NO_OPTIONS: ListProps<any> = { children: [], selectionMode: 'none' };\n\n/**\n * The \"Select All\" row: a tri-state checkbox above the list rather than an\n * option in it, since it acts on the options instead of being one. Being\n * outside the listbox keeps the listbox's children to options and groups, and\n * makes it a Tab stop of its own, which a list in virtual focus (searchable\n * lists) could not offer as an option.\n */\nconst SelectAllOption = ({\n label,\n isSelected,\n isIndeterminate,\n isDisabled,\n isCheckable,\n size = 'medium',\n onClick,\n focusProps,\n allValueProps = {},\n}: {\n label?: ReactNode;\n isSelected: boolean;\n isIndeterminate: boolean;\n isDisabled?: boolean;\n isCheckable?: boolean;\n size?: 'small' | 'medium' | 'large';\n /** `propagate` is false for a press on the checkbox mark, which only toggles */\n onClick: (propagate: boolean) => void;\n /** Tells the list when the row has focus */\n focusProps: DOMAttributes<HTMLElement>;\n allValueProps?: Partial<CubeCollectionItemProps<any>>;\n}) => {\n const { t } = useI18n();\n const { hoverProps, isHovered } = useHover({ isDisabled });\n const { focusProps: focusRingProps, isFocusVisible } = useFocusRing();\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} aria-hidden=\"true\">\n <IconMinus />\n </Icon>\n ) : (\n <CheckIcon size={12} stroke={3} />\n );\n\n const checkboxMods = {\n selected: isSelected,\n disabled: isDisabled,\n hovered: isHovered,\n indeterminate: isIndeterminate,\n };\n\n const checkboxIcon = isCheckable ? (\n <ListBoxCheckboxWrapper data-element=\"CheckboxWrapper\" mods={checkboxMods}>\n <ListBoxCheckbox data-element=\"Checkbox\" mods={checkboxMods}>\n {(isIndeterminate || isSelected) && markIcon}\n </ListBoxCheckbox>\n </ListBoxCheckboxWrapper>\n ) : null;\n\n const handleClick = (e: ReactMouseEvent<HTMLElement>) => {\n // A click on the checkbox mark only toggles; one on the label also tells\n // the list's owner, which closes a picker on it.\n const checkbox = e.currentTarget.querySelector(\n '[data-element=\"CheckboxWrapper\"]',\n );\n\n onClick(!checkbox?.contains(e.target as Node));\n };\n\n const handleKeyDown = (e: ReactKeyboardEvent<HTMLElement>) => {\n if (e.key !== ' ') return;\n\n // Space toggles a checkbox, and must neither scroll nor reach a shortcut.\n e.preventDefault();\n e.stopPropagation();\n onClick(false);\n };\n\n return (\n <>\n <ListBoxItem\n as=\"div\"\n role=\"checkbox\"\n aria-checked={isIndeterminate ? 'mixed' : isSelected}\n data-size={size}\n size={size}\n isDisabled={isDisabled}\n icon={checkboxIcon}\n mods={{\n listboxitem: true,\n // As a mod rather than `isSelected`, which would add an\n // `aria-selected` a checkbox does not take.\n selected: isSelected,\n disabled: isDisabled,\n checkable: isCheckable,\n hovered: isHovered,\n focused: isFocusVisible,\n indeterminate: isIndeterminate,\n all: true, // Important: this preserves the 'all' modifier\n }}\n {...mergeProps(hoverProps, focusRingProps, focusProps, allValueProps, {\n tabIndex: isDisabled ? undefined : 0,\n onClick: handleClick,\n onKeyDown: handleKeyDown,\n })}\n >\n {resolvedLabel}\n </ListBoxItem>\n <StyledDivider as=\"div\" role=\"presentation\" />\n </>\n );\n};\n\n/** The keys of the options a user can select in a collection: not disabled. */\nfunction getSelectableKeys(\n collection: Collection<CollectionNode<unknown>>,\n disabledKeys: Set<Key>,\n): Key[] {\n const keys: Key[] = [];\n\n for (const key of collection.getKeys()) {\n const node = collection.getItem(key);\n\n if (\n node?.type === 'item' &&\n !disabledKeys.has(key) &&\n !node.props?.isDisabled\n ) {\n keys.push(key);\n }\n }\n\n return keys;\n}\n\n/**\n * The selection a \"Select All\" press leaves. While it isn't checked, the press\n * selects all (`'all'`), or under a filter adds the options shown. Once it is,\n * the press takes the options shown out of the selection: selected options\n * the list doesn't show, hidden by a filter or not among its options, stay.\n * `hiddenKeys` are the selectable options a filter hides.\n */\nfunction getSelectAllSelection(\n isAllSelected: boolean,\n selection: 'all' | Set<Key>,\n shownKeys: Key[],\n hiddenKeys: Key[],\n): 'all' | Set<Key> {\n if (!isAllSelected) {\n return selection === 'all' || hiddenKeys.length === 0\n ? 'all'\n : new Set([...selection, ...shownKeys]);\n }\n\n if (selection === 'all') return new Set(hiddenKeys);\n\n const next = new Set(selection);\n\n for (const key of shownKeys) next.delete(key);\n\n return next;\n}\n\n/**\n * Whether every option a user can select is selected, which checks \"Select\n * All\". Disabled options don't count, and a list with nothing to select is\n * never all selected.\n */\nfunction isEverySelectableSelected(\n collection: Collection<CollectionNode<unknown>>,\n selectionManager: SelectionManager,\n): boolean {\n if (selectionManager.rawSelection === 'all') return true;\n\n let hasSelectable = false;\n\n for (const key of collection.getKeys()) {\n if (\n collection.getItem(key)?.type !== 'item' ||\n !selectionManager.canSelectItem(key)\n ) {\n continue;\n }\n\n if (!selectionManager.isSelected(key)) return false;\n\n hasSelectable = true;\n }\n\n return hasSelectable;\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\n/**\n * A droppable collection's props without the `id` and the null\n * `aria-describedby` React Aria gives the collection. `mergeProps` would keep\n * both over the listbox's own, so a reorderable list would drop the `id` its\n * caller passed, leave a search input's `aria-controls` pointing at nothing,\n * and lose its description and error message. React Aria sets both for a drop\n * on the whole list, and ListBox renders no such drop target.\n */\nfunction withoutWholeListDropProps({\n id: _id,\n 'aria-describedby': _describedBy,\n ...collectionProps\n}: Record<string, unknown>) {\n return collectionProps;\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 onLoadMore,\n hasMore = false,\n isLoadingMore = false,\n loadMoreMargin,\n form,\n } = props;\n\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 // Picking the selected option again keeps it, in single mode\n // whether set or by default. The controlled key is the one picked.\n if (disableSelectionToggle && props.selectionMode !== 'multiple') {\n const prevKey = selectedKey ?? 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 selectedKey,\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 = getValueSelectionState(useListState(listStateProps));\n\n const hasSelectAll = !!showSelectAll && props.selectionMode === 'multiple';\n\n // Under a filter, \"Select All\" acts on the options it shows and keeps the\n // selected ones the filter hides, so it needs the whole list. Built only\n // then; otherwise it is empty.\n const { collection: fullCollection } = useListState<T>(\n hasSelectAll && filter\n ? { children: props.children, items: props.items, selectionMode: 'none' }\n : NO_OPTIONS,\n );\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 // Checked once every selectable option is selected, however it got there;\n // mixed while only some are.\n const isAllSelected =\n hasSelectAll &&\n isEverySelectableSelected(listState.collection, listState.selectionManager);\n const isSomeSelected =\n hasSelectAll && !isAllSelected && !listState.selectionManager.isEmpty;\n\n // React Stately reports the change, so it is reported once. It reports none\n // when nothing changes, as when `disallowEmptySelection` keeps the selection.\n const handleSelectAllClick = (propagate: boolean) => {\n if (isDisabled || !hasSelectAll) return;\n\n const { collection, disabledKeys, selectionManager } = listState;\n const next = getSelectAllSelection(\n isAllSelected,\n selectionManager.rawSelection,\n getSelectableKeys(collection, disabledKeys),\n getSelectableKeys(fullCollection, disabledKeys).filter(\n (key) => !collection.getItem(key),\n ),\n );\n\n if (next === 'all') {\n selectionManager.selectAll();\n } else if (next.size === 0) {\n selectionManager.clearSelection();\n } else {\n selectionManager.setSelectedKeys(next);\n }\n\n if (propagate && !isAllSelected) {\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` and `Tab` have to leave the list so a\n // surrounding overlay can close on the one and keep focus inside with the\n // other, while every other key stays contained. See\n // `allowOverlayKeysToPropagate`.\n const { keyboardProps } = useKeyboard({\n onKeyDown: (e) => {\n allowOverlayKeysToPropagate(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 const fieldLayout = splitFieldLayout(props, { fillHeightOnFlex: true });\n\n styles = fieldLayout.styles;\n\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 canLoadMore = !!onLoadMore && hasMore;\n\n const { listBoxProps, labelProps } = useListBox(\n {\n ...props,\n id: id,\n // Wrapping from the last loaded option to the first would skip the\n // options still to load.\n shouldFocusWrap: props.shouldFocusWrap && !canLoadMore,\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 // An empty list is still a Tab stop, on its `ul` with no height, so the\n // card shows that focus as it shows its own.\n const { isFocused: isListElementFocused, focusProps: listElementFocusProps } =\n useFocus();\n const { isFocused: isSelectAllFocused, focusProps: selectAllFocusProps } =\n 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 // Focus on \"Select All\" is on neither.\n const isListFocused =\n !isSelectAllFocused &&\n (isFocusWithin ??\n (shouldUseVirtualFocus || listState.selectionManager.isFocused));\n\n // Scroll container ref for virtualization\n const scrollRef = useRef<HTMLDivElement>(null);\n\n // The virtualizer places options from the list's top, so it works in the\n // list's coordinates and the scroll offset is moved by the list's offset at\n // the DOM. Otherwise a scroll to an option it hasn't rendered stopped that\n // far short, and End from a search input left the last option clipped. Read\n // when the list scrolls, as a consumer's `listStyles` can move it.\n const listOffset = () => getListOffset(listRef.current, scrollRef.current);\n\n const rowVirtualizer = useVirtualizer({\n // The loading row is one more row after the options, placed and measured\n // like them.\n count: shouldVirtualize ? itemsArray.length + (isLoadingMore ? 1 : 0) : 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. The row after the options is the\n // loading row, with a key of its own: an index could be an option's key\n // (ids 1…N), and two rows sharing a measured size re-measure each other.\n getItemKey: (index: number) => itemsArray[index]?.key ?? LOADING_ROW_KEY,\n estimateSize: (index: number) => {\n const currentItem: any = itemsArray[index];\n\n if (currentItem?.props?.description) {\n return SIZES.XL;\n }\n // An item's named size is its row's height; a custom one is measured.\n return SIZES[\n (SIZE_NAME_TO_KEY[currentItem?.props?.size] ??\n SIZE_NAME_TO_KEY[size]) as keyof typeof SIZES\n ];\n },\n // Options are positioned absolutely here, so their margins space nothing.\n // The virtualizer takes pixels: `1` matches the `$item-gap` default.\n gap: listGap ?? 1,\n overscan: 10,\n // Above the list's top, the scroll element's top reads as the list's:\n // `scrollToFn` scrolls there for offset 0, and react-virtual re-checks\n // that it arrived.\n observeElementOffset: (instance, onOffset) =>\n observeElementOffset(instance, (offset, isScrolling) =>\n onOffset(Math.max(offset - listOffset(), 0), isScrolling),\n ),\n // The list's top is the scroll element's, so the margin above the first\n // option shows.\n scrollToFn: (offset, options, instance) =>\n elementScroll(\n offset > 0 ? offset + listOffset() : offset,\n options,\n instance,\n ),\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 // The focused key this effect last saw, to tell a move of focus from a\n // change of the items.\n const lastFocusedKeyRef = useRef<Key | null>(null);\n\n // Keep the focused option visible. One the virtualizer hasn't rendered is\n // scrolled to by index, which renders it, when focus moves to it (End,\n // typeahead, the selected option on autofocus or Tab); new items alone\n // leave a list the user scrolled away from where it is. One already\n // rendered is scrolled to only for keyboard navigation, so a click never\n // moves the list.\n useLayoutEffect(() => {\n const focusedKey = listState.selectionManager.focusedKey;\n const hasFocusMoved = focusedKey !== lastFocusedKeyRef.current;\n\n lastFocusedKeyRef.current = focusedKey;\n\n if (focusedKey == null) 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\n if (!itemElement) {\n const index = shouldVirtualize\n ? itemsArray.findIndex((item) => item.key === focusedKey)\n : -1;\n\n if (index !== -1 && hasFocusMoved) {\n rowVirtualizer.scrollToIndex(index, { align: 'auto' });\n }\n\n return;\n }\n\n // Only scroll on keyboard navigation\n if (lastFocusSourceRef.current !== 'keyboard') 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 }, [\n listState.selectionManager.focusedKey,\n itemsArray,\n shouldVirtualize,\n rowVirtualizer,\n ]);\n\n // ----- Load more -----\n // An `IntersectionObserver` on a sentinel at the end of the list, as in\n // ItemTable: `rootMargin` says \"this far before the end\" directly, it costs\n // nothing per scroll, and a list too short to scroll has its sentinel in\n // range at once. Keyboard navigation loads too, since it scrolls the focused\n // option into view. An observer reports only a change of intersection, so it\n // is armed again when a page arrives: a list still too short fires again.\n const sentinelRef = useRef<HTMLLIElement>(null);\n const loadMore = useEffectEvent(() => onLoadMore?.());\n\n useEffect(() => {\n const root = scrollRef.current;\n const sentinel = sentinelRef.current;\n\n if (!canLoadMore || isLoadingMore || !root || !sentinel) return;\n\n // jsdom, where consumers run tests, has no observer: the list then loads\n // nothing rather than throw.\n if (typeof IntersectionObserver === 'undefined') return;\n\n // One screen ahead by default, as in ItemTable: the page is asked for\n // while a viewport of options is left to read, so a fast scroll doesn't\n // reach the end before it arrives. Read when armed, not tracked.\n const margin =\n loadMoreMargin ?? Math.max(root.clientHeight, MIN_LOAD_MORE_MARGIN);\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries.some((entry) => entry.isIntersecting)) loadMore();\n },\n { root, rootMargin: `0px 0px ${margin}px 0px` },\n );\n\n observer.observe(sentinel);\n\n return () => observer.disconnect();\n }, [canLoadMore, isLoadingMore, loadMoreMargin, itemsArray.length]);\n\n // The loading row makes the list longer by its own height, so a viewer who\n // had reached the end would find it just out of view. One that close to the\n // end follows it; one further up reads on undisturbed.\n const loadingRowRef = useRef<HTMLLIElement>(null);\n\n useLayoutEffect(() => {\n const scrollElement = scrollRef.current;\n const row = loadingRowRef.current;\n\n if (!isLoadingMore || !scrollElement || !row) return;\n\n const { scrollTop, scrollHeight, clientHeight } = scrollElement;\n const rowBlock = row.offsetHeight + (listGap ?? 1);\n\n if (scrollHeight - scrollTop - clientHeight <= rowBlock + 1) {\n scrollElement.scrollTop = scrollHeight;\n }\n }, [isLoadingMore, listGap]);\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 // `useListBox` takes no validation state, so the list would look invalid\n // without a screen reader ever hearing it.\n const mergedListBoxProps = mergeProps(\n listBoxProps,\n keyboardProps,\n listElementFocusProps,\n { 'aria-invalid': isInvalid || undefined },\n );\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 // A list with no options keeps its listbox, which ids from outside point at\n // (a search input's `aria-controls`, the label's `aria-labelledby`), and says\n // why it has none through its description: a listbox may hold only options\n // and groups. While it loads, that is its loading row and status instead of\n // the empty label.\n const hasNoOptions = listState.collection.size === 0;\n const isEmpty = hasNoOptions && !isLoadingMore;\n const emptyLabelId = `${listBoxProps.id}-empty`;\n const loadingMoreLabelId = `${listBoxProps.id}-loading-more`;\n\n if (hasNoOptions) {\n mergedListBoxProps['aria-describedby'] = [\n mergedListBoxProps['aria-describedby'],\n isEmpty ? emptyLabelId : loadingMoreLabelId,\n ]\n .filter(Boolean)\n .join(' ');\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 // With no option to take it, focus rests on the list itself, so the card\n // shows it.\n const isCardFocused = isFocused || (hasNoOptions && isListElementFocused);\n\n const mods = useMemo(\n () => ({\n ...getValidationMods({ isInvalid, isValid }),\n disabled: isDisabled,\n focused: isCardFocused,\n header: !!header || hasSelectAll,\n footer: !!footer,\n selectAll: hasSelectAll,\n ...externalMods,\n }),\n [\n isInvalid,\n isValid,\n isDisabled,\n isCardFocused,\n header,\n footer,\n hasSelectAll,\n externalMods,\n ],\n );\n\n const customizationProps = pickBaseCustomizationProps(props);\n const listGapTokens =\n listGap == null ? undefined : { '$list-gap': `${listGap}px` };\n\n const loadingMoreLabel = t('listBox.loadingMore', 'Loading more…');\n\n const loadMoreSentinel = canLoadMore ? (\n <LoadMoreSentinelElement\n ref={sentinelRef}\n qa=\"ListBoxLoadMoreSentinel\"\n role=\"presentation\"\n aria-hidden=\"true\"\n mods={{ virtualized: shouldVirtualize, sections: hasSections }}\n />\n ) : null;\n\n // Virtualized, the loading row is the virtualizer's last row instead.\n const loadingMoreRow =\n isLoadingMore && !shouldVirtualize ? (\n <LoadingMoreRow\n rowRef={loadingRowRef}\n size={size}\n label={loadingMoreLabel}\n />\n ) : null;\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 {hasSelectAll ? (\n <SelectAllOption\n label={selectAllLabel}\n isSelected={isAllSelected}\n isIndeterminate={isSomeSelected}\n isDisabled={isDisabled}\n isCheckable={isCheckable}\n size={size}\n allValueProps={allValueProps}\n focusProps={selectAllFocusProps}\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 {isEmpty && (\n <Item\n id={emptyLabelId}\n // Read as the listbox's description, so not a second time as text.\n aria-hidden=\"true\"\n preset=\"t4\"\n color=\"#dark-03\"\n size={size}\n padding=\"(.5x - 1bw)\"\n styles={EMPTY_ROW_STYLES}\n >\n {emptyLabel}\n </Item>\n )}\n {isReorderable && !isEmpty ? (\n <DraggableListBox\n state={listState}\n listRef={listRef}\n orderedKeys={orderedKeys}\n onReorder={onReorder}\n >\n {(dragState, dropState, collectionProps) => (\n <ListElement\n {...customizationProps}\n qa={qa || 'ListBox'}\n {...mergeProps(\n mergedListBoxProps,\n withoutWholeListDropProps(collectionProps),\n )}\n ref={listRef}\n styles={listStyles}\n tokens={{ ...listGapTokens, ...customizationProps.tokens }}\n aria-disabled={isDisabled || undefined}\n mods={{ sections: false, ...externalMods }}\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 {loadingMoreRow}\n {loadMoreSentinel}\n </ListElement>\n )}\n </DraggableListBox>\n ) : (\n <ListElement\n {...customizationProps}\n qa={qa || 'ListBox'}\n {...mergedListBoxProps}\n ref={listRef}\n styles={listStyles}\n tokens={{\n ...listGapTokens,\n ...customizationProps.tokens,\n '$list-virtual-height': shouldVirtualize\n ? `${rowVirtualizer.getTotalSize()}px`\n : undefined,\n }}\n aria-disabled={isDisabled || undefined}\n mods={{\n sections: hasSections,\n empty: isEmpty,\n ...externalMods,\n // The spacer and row positions follow the same virtualization state.\n virtualized: shouldVirtualize,\n }}\n data-shape={shape}\n data-input-type=\"listbox\"\n >\n {shouldVirtualize\n ? rowVirtualizer.getVirtualItems().map((virtualItem) => {\n const item = itemsArray[virtualItem.index];\n\n // The row after the last option is the loading row.\n if (!item) {\n return (\n <LoadingMoreRow\n key={LOADING_ROW_KEY}\n rowRef={loadingRowRef}\n size={size}\n label={loadingMoreLabel}\n virtualRef={rowVirtualizer.measureElement as any}\n virtualOffset={virtualItem.start}\n virtualIndex={virtualItem.index}\n />\n );\n }\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 virtualOffset={virtualItem.start}\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 // A listbox holds only options and groups.\n <StyledDivider\n key={`divider-${String(item.key)}`}\n role=\"presentation\"\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 {loadingMoreRow}\n {loadMoreSentinel}\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 {onLoadMore || isLoadingMore ? (\n // In place while the list has `onLoadMore`; `isLoadingMore` mounts it\n // too. A list with no options is described by it while it loads.\n <LoadingMoreStatus\n id={loadingMoreLabelId}\n label={loadingMoreLabel}\n isLoading={isLoadingMore}\n />\n ) : null}\n </ListBoxWrapperElement>\n );\n\n return wrapWithField<Omit<CubeListBoxProps<T>, 'children'>>(listBoxField, {\n ...props,\n ...fieldLayout.field,\n labelProps: mergeAriaProps(labelProps, props.labelProps),\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 virtualOffset,\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 /** The option's offset from the list's top, in pixels, when virtualized */\n virtualOffset?: number;\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 // An option takes no inline `style` from its item.\n const {\n style: _itemStyle,\n tokens: itemTokens,\n ...filteredItemProps\n } = filterSelectionItemProps(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 runOptionExtras = (target: EventTarget | null) => {\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 = 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 const handleOptionExtras = (e: MouseEvent) => runOptionExtras(e.target);\n\n // A mouse press picks the option it started on, even if the list moved\n // under the pointer before the release. The browser then sends the click to\n // a common ancestor, so the press runs the click's side effects itself.\n const originPress = useOptionOriginPress({\n key: item.key,\n ref: localRef,\n manager: state.selectionManager,\n isDisabled,\n onSettle: runOptionExtras,\n });\n\n // Filter out React Aria props that shouldn't reach the DOM\n const {\n onKeyDown,\n onKeyUp,\n onPointerUp,\n tabIndex,\n 'aria-selected': ariaSelected,\n 'aria-disabled': ariaDisabled,\n role,\n ...filteredOptionProps\n } = filterSelectionItemProps(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 onPointerDown: originPress.onPointerDown,\n onPointerUp: originPress.wrapPointerUp(onPointerUp),\n tabIndex,\n 'aria-selected': ariaSelected,\n 'aria-disabled': ariaDisabled,\n role,\n },\n effectiveDragProps,\n )}\n theme={theme}\n tokens={{\n ...itemTokens,\n '$option-virtual-offset':\n virtualOffset == null ? undefined : `${virtualOffset}px`,\n }}\n // An item's own `size` wins over the list's, for that row only.\n data-size={filteredItemProps.size ?? size}\n data-index={virtualIndex}\n size={filteredItemProps.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 virtual: virtualOffset != null,\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 * The row after the last option while more options load. Not an option, so a\n * viewer can neither focus nor select it, and hidden from assistive tech: the\n * list's status region announces the loading instead.\n */\nfunction LoadingMoreRow({\n size,\n label,\n rowRef,\n virtualRef,\n virtualOffset,\n virtualIndex,\n}: {\n size: 'small' | 'medium' | 'large';\n label: string;\n rowRef: RefObject<HTMLLIElement | null>;\n /** react-virtual's `measureElement`, as for an option */\n virtualRef?: (element: HTMLElement | null) => void;\n /** The row's offset from the list's top, in pixels, when virtualized */\n virtualOffset?: number;\n virtualIndex?: number;\n}) {\n // Measured during the commit, as an option is.\n useLayoutEffect(() => {\n virtualRef?.(rowRef.current);\n });\n\n return (\n <ListBoxItem\n ref={rowRef}\n qa=\"ListBoxLoadingMore\"\n aria-hidden=\"true\"\n data-size={size}\n data-index={virtualIndex}\n size={size}\n preset=\"t4\"\n color=\"#surface-text-soft-2\"\n icon={<LoadingIcon />}\n tokens={{\n '$option-virtual-offset':\n virtualOffset == null ? undefined : `${virtualOffset}px`,\n }}\n mods={{ virtual: virtualOffset != null }}\n >\n {label}\n </ListBoxItem>\n );\n}\n\n/**\n * Tells screen readers that more options are loading. Filled while they load,\n * and empty otherwise rather than gone: a live region announces a change of its\n * text, and one inserted already filled is unreliable. Outside the listbox,\n * which may hold only options and groups.\n */\nfunction LoadingMoreStatus({\n id,\n label,\n isLoading,\n}: {\n id: string;\n label: string;\n isLoading: boolean;\n}) {\n return (\n <VisuallyHidden>\n <span id={id} role=\"status\">\n {isLoading ? label : ''}\n </span>\n </VisuallyHidden>\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":";;;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AAC,oBAAD;GAAmB,GAAKuR;GACrBzR,UAAAA;EADgB,CAAA;EAqBE1H,EAAA,MAAAmZ;EAAAnZ,EAAA,MAAA0H;EAAA1H,EAAA,MAAA4H;CAAA,OAAAA,KAAA5H,EAAA;CAAA,IAAA8H;CAAA,IAAA9H,EAAA,QAAAiZ,aAAAjZ,EAAA,QAAAmD,iBAAAnD,EAAA,QAAAmH,MAAAnH,EAAA,QAAA4H,IAAA;EA/BvBE,KAAA,qBAAC,uBAAD;GAAsB,GAAKmR;GAAmB9V,QAAAA;GAA9C,UAAA,CACGgE,IASDS,EAVoB;;EAgCE5H,EAAA,MAAAiZ;EAAAjZ,EAAA,MAAAmD;EAAAnD,EAAA,MAAAmH;EAAAnH,EAAA,MAAA4H;EAAA5H,EAAA,MAAA8H;CAAA,OAAAA,KAAA9H,EAAA;CAAA,OAhCxB8H;AAgCwB;AAM5B,MAAMyR,0BAA0BC,OAAOC,OAAOle,SAAa,EACzDme,aAAa,UACf,CAAC;AAED1N,QAAQ/O,OAAOL;AAEfoP,QAAQ1Q,UAAUie;AAElBC,OAAOG,eAAe3N,SAAS,iBAAiB;CAC9CP,OAAO;CACPmO,YAAY;CACZC,cAAc;AAChB,CAAC"}
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.215.2 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.216.0 | Cube Dev Team */
2
2
  //#region src/components/fields/ListBox/empty-row.ts
3
3
  /**
4
4
  * The empty row of ListBox and FilterTree. Its label wraps, unlike an `Item`'s
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.215.2 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.216.0 | Cube Dev Team */
2
2
  //#region src/components/fields/ListBox/optionId.ts
3
3
  /**
4
4
  * The DOM 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.215.2 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.216.0 | Cube Dev Team */
2
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
3
3
  import { mergeRefs as mergeRefs$1 } from "../../../utils/react/useCombinedRefs.js";
4
4
  import { useModalLayerRef } from "../../overlays/Modal/modal-containment.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.215.2 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.216.0 | 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.215.2 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.216.0 | 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.215.2 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.216.0 | Cube Dev Team */
2
2
  import { mergeProps as mergeProps$1 } from "../../../utils/react/mergeProps.js";
3
3
  import { useI18n } from "../../../i18n/useI18n.js";
4
4
  import { settleOverlayKey } from "../../../utils/react/overlayKeyPropagation.js";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.215.2 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.216.0 | Cube Dev Team */
2
2
  import { Button } from "../../actions/Button/Button.js";
3
3
  import { DirectionIcon } from "../../../icons/DirectionIcon.js";
4
4
  import { c } from "react/compiler-runtime";
@@ -1,4 +1,4 @@
1
- /** @license MIT | @cube-dev/ui-kit v0.215.2 | Cube Dev Team */
1
+ /** @license MIT | @cube-dev/ui-kit v0.216.0 | 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 { ItemActionProvider } from "../../actions/ItemActionContext.js";
@@ -11,7 +11,7 @@ import { ForwardedRef, MutableRefObject, ReactElement, ReactNode, RefObject } fr
11
11
  import { Placement } from "react-aria";
12
12
  import { ListState, Section } from "react-stately";
13
13
  //#region src/components/fields/Picker/Picker.d.ts
14
- export interface CubePickerProps<T> extends Omit<CubeListBoxProps<T>, 'size' | 'shape' | 'emptyLabel' | 'isFocusWithin'>, Omit<CubeItemProps, 'children' | 'size' | 'tooltip' | 'element' | keyof ContainerStyleProps>, FieldLayoutStyleProps, FieldBaseProps<string | number | readonly (string | number)[] | null | undefined>, Pick<CubeItemButtonProps, 'type' | 'theme' | 'icon' | 'rightIcon' | 'prefix' | 'suffix' | 'hotkeys' | 'shape'> {
14
+ export interface CubePickerProps<T> extends Omit<CubeListBoxProps<T>, 'size' | 'shape' | 'emptyLabel' | 'isFocusWithin' | 'onLoadMore' | 'hasMore' | 'isLoadingMore' | 'loadMoreMargin'>, Omit<CubeItemProps, 'children' | 'size' | 'tooltip' | 'element' | keyof ContainerStyleProps>, FieldLayoutStyleProps, FieldBaseProps<string | number | readonly (string | number)[] | null | undefined>, Pick<CubeItemButtonProps, 'type' | 'theme' | 'icon' | 'rightIcon' | 'prefix' | 'suffix' | 'hotkeys' | 'shape'> {
15
15
  /** Accessible name for the picker trigger when there is no visible label. */
16
16
  'aria-label'?: string;
17
17
  /** Ids of elements that also describe the trigger, beside the displayed value and the field's own description and message. */