@itwin/itwinui-react 3.0.0-dev.4 → 3.0.0-dev.6

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 (932) hide show
  1. package/CHANGELOG.md +90 -1
  2. package/cjs/core/Alert/Alert.d.ts +5 -5
  3. package/cjs/core/Alert/Alert.js +72 -59
  4. package/cjs/core/Alert/index.js +9 -4
  5. package/cjs/core/Avatar/Avatar.d.ts +3 -3
  6. package/cjs/core/Avatar/Avatar.js +60 -44
  7. package/cjs/core/Avatar/index.js +9 -4
  8. package/cjs/core/AvatarGroup/AvatarGroup.d.ts +1 -1
  9. package/cjs/core/AvatarGroup/AvatarGroup.js +69 -53
  10. package/cjs/core/AvatarGroup/index.js +9 -4
  11. package/cjs/core/Backdrop/Backdrop.d.ts +1 -1
  12. package/cjs/core/Backdrop/Backdrop.js +16 -33
  13. package/cjs/core/Backdrop/index.js +9 -4
  14. package/cjs/core/Badge/Badge.d.ts +1 -1
  15. package/cjs/core/Badge/Badge.js +39 -47
  16. package/cjs/core/Badge/index.js +9 -4
  17. package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +16 -24
  18. package/cjs/core/Breadcrumbs/Breadcrumbs.js +131 -61
  19. package/cjs/core/Breadcrumbs/index.js +9 -4
  20. package/cjs/core/ButtonGroup/ButtonGroup.d.ts +1 -1
  21. package/cjs/core/ButtonGroup/ButtonGroup.js +65 -53
  22. package/cjs/core/ButtonGroup/index.js +9 -4
  23. package/cjs/core/Buttons/Button/Button.d.ts +1 -1
  24. package/cjs/core/Buttons/Button/Button.js +43 -36
  25. package/cjs/core/Buttons/Button/index.js +9 -4
  26. package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +2 -2
  27. package/cjs/core/Buttons/DropdownButton/DropdownButton.js +61 -51
  28. package/cjs/core/Buttons/DropdownButton/index.js +9 -4
  29. package/cjs/core/Buttons/IconButton/IconButton.d.ts +1 -1
  30. package/cjs/core/Buttons/IconButton/IconButton.js +59 -38
  31. package/cjs/core/Buttons/IconButton/index.js +9 -4
  32. package/cjs/core/Buttons/IdeasButton/IdeasButton.d.ts +1 -1
  33. package/cjs/core/Buttons/IdeasButton/IdeasButton.js +20 -30
  34. package/cjs/core/Buttons/IdeasButton/index.js +9 -4
  35. package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +1 -1
  36. package/cjs/core/Buttons/SplitButton/SplitButton.js +68 -49
  37. package/cjs/core/Buttons/SplitButton/index.js +9 -4
  38. package/cjs/core/Buttons/index.js +43 -13
  39. package/cjs/core/Carousel/Carousel.d.ts +3 -3
  40. package/cjs/core/Carousel/Carousel.js +109 -107
  41. package/cjs/core/Carousel/CarouselContext.js +4 -26
  42. package/cjs/core/Carousel/CarouselDot.d.ts +1 -1
  43. package/cjs/core/Carousel/CarouselDot.js +25 -37
  44. package/cjs/core/Carousel/CarouselDotsList.d.ts +1 -1
  45. package/cjs/core/Carousel/CarouselDotsList.js +129 -95
  46. package/cjs/core/Carousel/CarouselNavigation.d.ts +2 -2
  47. package/cjs/core/Carousel/CarouselNavigation.js +97 -66
  48. package/cjs/core/Carousel/CarouselSlide.d.ts +1 -1
  49. package/cjs/core/Carousel/CarouselSlide.js +39 -46
  50. package/cjs/core/Carousel/CarouselSlider.js +66 -71
  51. package/cjs/core/Carousel/index.js +9 -4
  52. package/cjs/core/Checkbox/Checkbox.d.ts +9 -5
  53. package/cjs/core/Checkbox/Checkbox.js +88 -60
  54. package/cjs/core/Checkbox/index.js +9 -4
  55. package/cjs/core/ColorPicker/ColorBuilder.js +289 -198
  56. package/cjs/core/ColorPicker/ColorInputPanel.d.ts +1 -1
  57. package/cjs/core/ColorPicker/ColorInputPanel.js +453 -282
  58. package/cjs/core/ColorPicker/ColorPalette.d.ts +1 -1
  59. package/cjs/core/ColorPicker/ColorPalette.js +124 -113
  60. package/cjs/core/ColorPicker/ColorPicker.d.ts +1 -6
  61. package/cjs/core/ColorPicker/ColorPicker.js +82 -85
  62. package/cjs/core/ColorPicker/ColorPickerContext.js +11 -31
  63. package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
  64. package/cjs/core/ColorPicker/ColorSwatch.js +30 -39
  65. package/cjs/core/ColorPicker/index.js +43 -13
  66. package/cjs/core/ComboBox/ComboBox.d.ts +6 -6
  67. package/cjs/core/ComboBox/ComboBox.js +393 -294
  68. package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
  69. package/cjs/core/ComboBox/ComboBoxDropdown.js +39 -42
  70. package/cjs/core/ComboBox/ComboBoxEndIcon.d.ts +1 -1
  71. package/cjs/core/ComboBox/ComboBoxEndIcon.js +46 -43
  72. package/cjs/core/ComboBox/ComboBoxInput.d.ts +2 -2
  73. package/cjs/core/ComboBox/ComboBoxInput.js +200 -152
  74. package/cjs/core/ComboBox/ComboBoxInputContainer.d.ts +1 -1
  75. package/cjs/core/ComboBox/ComboBoxInputContainer.js +35 -34
  76. package/cjs/core/ComboBox/ComboBoxMenu.d.ts +1 -1
  77. package/cjs/core/ComboBox/ComboBoxMenu.js +108 -73
  78. package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +1 -1
  79. package/cjs/core/ComboBox/ComboBoxMenuItem.js +71 -42
  80. package/cjs/core/ComboBox/ComboBoxMultipleContainer.d.ts +1 -1
  81. package/cjs/core/ComboBox/ComboBoxMultipleContainer.js +13 -32
  82. package/cjs/core/ComboBox/helpers.d.ts +2 -2
  83. package/cjs/core/ComboBox/helpers.js +47 -65
  84. package/cjs/core/ComboBox/index.js +9 -4
  85. package/cjs/core/DatePicker/DatePicker.d.ts +2 -2
  86. package/cjs/core/DatePicker/DatePicker.js +523 -357
  87. package/cjs/core/DatePicker/index.js +15 -5
  88. package/cjs/core/Dialog/Dialog.d.ts +1 -1
  89. package/cjs/core/Dialog/Dialog.js +72 -68
  90. package/cjs/core/Dialog/DialogBackdrop.d.ts +1 -1
  91. package/cjs/core/Dialog/DialogBackdrop.js +47 -52
  92. package/cjs/core/Dialog/DialogButtonBar.js +3 -3
  93. package/cjs/core/Dialog/DialogContent.d.ts +2 -1
  94. package/cjs/core/Dialog/DialogContent.js +28 -4
  95. package/cjs/core/Dialog/DialogContext.d.ts +1 -1
  96. package/cjs/core/Dialog/DialogContext.js +5 -27
  97. package/cjs/core/Dialog/DialogDragContext.d.ts +1 -1
  98. package/cjs/core/Dialog/DialogDragContext.js +8 -30
  99. package/cjs/core/Dialog/DialogMain.d.ts +1 -1
  100. package/cjs/core/Dialog/DialogMain.js +183 -142
  101. package/cjs/core/Dialog/DialogTitleBar.d.ts +1 -1
  102. package/cjs/core/Dialog/DialogTitleBar.js +67 -45
  103. package/cjs/core/Dialog/DialogTitleBarTitle.js +3 -3
  104. package/cjs/core/Dialog/index.js +9 -4
  105. package/cjs/core/DropdownMenu/DropdownMenu.d.ts +4 -4
  106. package/cjs/core/DropdownMenu/DropdownMenu.js +72 -50
  107. package/cjs/core/DropdownMenu/index.js +9 -4
  108. package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +77 -21
  109. package/cjs/core/ExpandableBlock/ExpandableBlock.js +233 -76
  110. package/cjs/core/ExpandableBlock/index.js +9 -4
  111. package/cjs/core/Fieldset/Fieldset.d.ts +1 -1
  112. package/cjs/core/Fieldset/Fieldset.js +25 -39
  113. package/cjs/core/Fieldset/index.js +9 -4
  114. package/cjs/core/FileUpload/FileEmptyCard.js +43 -42
  115. package/cjs/core/FileUpload/FileUpload.d.ts +1 -1
  116. package/cjs/core/FileUpload/FileUpload.js +67 -67
  117. package/cjs/core/FileUpload/FileUploadCard.d.ts +1 -1
  118. package/cjs/core/FileUpload/FileUploadCard.js +168 -108
  119. package/cjs/core/FileUpload/FileUploadTemplate.d.ts +1 -1
  120. package/cjs/core/FileUpload/FileUploadTemplate.js +51 -41
  121. package/cjs/core/FileUpload/index.js +35 -11
  122. package/cjs/core/Footer/Footer.d.ts +4 -4
  123. package/cjs/core/Footer/Footer.js +103 -89
  124. package/cjs/core/Footer/FooterItem.js +3 -3
  125. package/cjs/core/Footer/FooterList.js +3 -3
  126. package/cjs/core/Footer/FooterSeparator.js +8 -5
  127. package/cjs/core/Footer/index.js +15 -5
  128. package/cjs/core/Header/Header.d.ts +2 -2
  129. package/cjs/core/Header/Header.js +67 -47
  130. package/cjs/core/Header/HeaderBasicButton.js +37 -38
  131. package/cjs/core/Header/HeaderBreadcrumbs.d.ts +1 -1
  132. package/cjs/core/Header/HeaderBreadcrumbs.js +38 -39
  133. package/cjs/core/Header/HeaderButton.d.ts +5 -1
  134. package/cjs/core/Header/HeaderButton.js +76 -43
  135. package/cjs/core/Header/HeaderDropdownButton.js +49 -45
  136. package/cjs/core/Header/HeaderLogo.d.ts +1 -1
  137. package/cjs/core/Header/HeaderLogo.js +42 -36
  138. package/cjs/core/Header/HeaderSplitButton.js +68 -46
  139. package/cjs/core/Header/index.js +35 -11
  140. package/cjs/core/InformationPanel/InformationPanel.d.ts +1 -1
  141. package/cjs/core/InformationPanel/InformationPanel.js +77 -67
  142. package/cjs/core/InformationPanel/InformationPanelBody.js +6 -4
  143. package/cjs/core/InformationPanel/InformationPanelContent.d.ts +1 -1
  144. package/cjs/core/InformationPanel/InformationPanelContent.js +20 -33
  145. package/cjs/core/InformationPanel/InformationPanelHeader.d.ts +1 -1
  146. package/cjs/core/InformationPanel/InformationPanelHeader.js +34 -39
  147. package/cjs/core/InformationPanel/InformationPanelWrapper.js +6 -4
  148. package/cjs/core/InformationPanel/index.js +43 -13
  149. package/cjs/core/Input/Input.d.ts +6 -6
  150. package/cjs/core/Input/Input.js +17 -40
  151. package/cjs/core/Input/index.js +9 -4
  152. package/cjs/core/InputGroup/InputGroup.d.ts +1 -1
  153. package/cjs/core/InputGroup/InputGroup.js +46 -41
  154. package/cjs/core/InputGroup/index.js +9 -4
  155. package/cjs/core/Label/Label.d.ts +1 -1
  156. package/cjs/core/Label/Label.js +30 -36
  157. package/cjs/core/Label/index.js +9 -4
  158. package/cjs/core/LabeledInput/LabeledInput.d.ts +1 -1
  159. package/cjs/core/LabeledInput/LabeledInput.js +49 -33
  160. package/cjs/core/LabeledInput/index.js +9 -4
  161. package/cjs/core/LabeledSelect/LabeledSelect.d.ts +1 -1
  162. package/cjs/core/LabeledSelect/LabeledSelect.js +56 -44
  163. package/cjs/core/LabeledSelect/index.js +9 -4
  164. package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +2 -3
  165. package/cjs/core/LabeledTextarea/LabeledTextarea.js +49 -33
  166. package/cjs/core/LabeledTextarea/index.js +9 -4
  167. package/cjs/core/List/List.js +3 -3
  168. package/cjs/core/List/ListItem.d.ts +4 -4
  169. package/cjs/core/List/ListItem.js +55 -60
  170. package/cjs/core/List/index.js +16 -6
  171. package/cjs/core/Menu/Menu.d.ts +1 -1
  172. package/cjs/core/Menu/Menu.js +66 -78
  173. package/cjs/core/Menu/MenuDivider.js +4 -4
  174. package/cjs/core/Menu/MenuExtraContent.js +4 -4
  175. package/cjs/core/Menu/MenuItem.d.ts +1 -1
  176. package/cjs/core/Menu/MenuItem.js +143 -86
  177. package/cjs/core/Menu/MenuItemSkeleton.d.ts +1 -1
  178. package/cjs/core/Menu/MenuItemSkeleton.js +54 -43
  179. package/cjs/core/Menu/index.js +43 -13
  180. package/cjs/core/Modal/Modal.d.ts +1 -1
  181. package/cjs/core/Modal/Modal.js +38 -33
  182. package/cjs/core/Modal/ModalButtonBar.js +7 -4
  183. package/cjs/core/Modal/ModalContent.js +3 -3
  184. package/cjs/core/Modal/index.js +23 -8
  185. package/cjs/core/NonIdealState/ErrorPage.d.ts +6 -7
  186. package/cjs/core/NonIdealState/ErrorPage.js +187 -146
  187. package/cjs/core/NonIdealState/NonIdealState.d.ts +17 -1
  188. package/cjs/core/NonIdealState/NonIdealState.js +77 -37
  189. package/cjs/core/NonIdealState/index.js +16 -6
  190. package/cjs/core/NotificationMarker/NotificationMarker.d.ts +1 -1
  191. package/cjs/core/NotificationMarker/NotificationMarker.js +29 -33
  192. package/cjs/core/NotificationMarker/index.js +9 -4
  193. package/cjs/core/Overlay/Overlay.d.ts +57 -0
  194. package/cjs/core/Overlay/Overlay.js +96 -0
  195. package/cjs/core/Overlay/index.d.ts +1 -0
  196. package/{esm/core/ProgressIndicators/ProgressRadial → cjs/core/Overlay}/index.js +10 -2
  197. package/cjs/core/ProgressIndicators/{ProgressLinear/ProgressLinear.d.ts → ProgressLinear.d.ts} +6 -6
  198. package/cjs/core/ProgressIndicators/ProgressLinear.js +64 -0
  199. package/cjs/core/ProgressIndicators/{ProgressRadial/ProgressRadial.d.ts → ProgressRadial.d.ts} +2 -2
  200. package/cjs/core/ProgressIndicators/ProgressRadial.js +74 -0
  201. package/cjs/core/ProgressIndicators/index.d.ts +2 -2
  202. package/cjs/core/ProgressIndicators/index.js +16 -6
  203. package/cjs/core/Radio/Radio.d.ts +7 -4
  204. package/cjs/core/Radio/Radio.js +54 -42
  205. package/cjs/core/Radio/index.js +9 -4
  206. package/cjs/core/RadioTiles/RadioTile.d.ts +15 -4
  207. package/cjs/core/RadioTiles/RadioTile.js +80 -45
  208. package/cjs/core/RadioTiles/RadioTileGroup.d.ts +1 -1
  209. package/cjs/core/RadioTiles/RadioTileGroup.js +16 -31
  210. package/cjs/core/RadioTiles/index.js +16 -6
  211. package/cjs/core/SearchBox/SearchBox.d.ts +3 -3
  212. package/cjs/core/SearchBox/SearchBox.js +220 -128
  213. package/cjs/core/SearchBox/index.js +9 -4
  214. package/cjs/core/Select/Select.d.ts +5 -10
  215. package/cjs/core/Select/Select.js +291 -181
  216. package/cjs/core/Select/SelectTag.d.ts +1 -1
  217. package/cjs/core/Select/SelectTag.js +21 -34
  218. package/cjs/core/Select/SelectTagContainer.d.ts +1 -1
  219. package/cjs/core/Select/SelectTagContainer.js +30 -39
  220. package/cjs/core/Select/index.js +9 -4
  221. package/cjs/core/SideNavigation/SideNavigation.d.ts +1 -1
  222. package/cjs/core/SideNavigation/SideNavigation.js +105 -54
  223. package/cjs/core/SideNavigation/SidenavButton.d.ts +1 -1
  224. package/cjs/core/SideNavigation/SidenavButton.js +30 -33
  225. package/cjs/core/SideNavigation/SidenavSubmenu.js +23 -34
  226. package/cjs/core/SideNavigation/SidenavSubmenuHeader.d.ts +1 -1
  227. package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +29 -35
  228. package/cjs/core/SideNavigation/index.js +35 -11
  229. package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +1 -1
  230. package/cjs/core/SkipToContentLink/SkipToContentLink.js +20 -33
  231. package/cjs/core/SkipToContentLink/index.js +9 -4
  232. package/cjs/core/Slider/Slider.d.ts +4 -9
  233. package/cjs/core/Slider/Slider.js +343 -227
  234. package/cjs/core/Slider/Thumb.d.ts +2 -2
  235. package/cjs/core/Slider/Thumb.js +111 -84
  236. package/cjs/core/Slider/Track.d.ts +3 -3
  237. package/cjs/core/Slider/Track.js +72 -76
  238. package/cjs/core/Slider/index.js +9 -4
  239. package/cjs/core/StatusMessage/StatusMessage.d.ts +2 -2
  240. package/cjs/core/StatusMessage/StatusMessage.js +19 -32
  241. package/cjs/core/StatusMessage/index.js +9 -4
  242. package/cjs/core/Stepper/Stepper.d.ts +3 -3
  243. package/cjs/core/Stepper/Stepper.js +51 -36
  244. package/cjs/core/Stepper/StepperStep.d.ts +1 -1
  245. package/cjs/core/Stepper/StepperStep.js +84 -63
  246. package/cjs/core/Stepper/WorkflowDiagram.d.ts +1 -1
  247. package/cjs/core/Stepper/WorkflowDiagram.js +25 -33
  248. package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +3 -3
  249. package/cjs/core/Stepper/WorkflowDiagramStep.js +32 -36
  250. package/cjs/core/Stepper/index.js +16 -6
  251. package/cjs/core/Surface/Surface.d.ts +2 -2
  252. package/cjs/core/Surface/Surface.js +78 -70
  253. package/cjs/core/Surface/index.js +9 -4
  254. package/cjs/core/Table/SubRowExpander.d.ts +2 -2
  255. package/cjs/core/Table/SubRowExpander.js +35 -37
  256. package/cjs/core/Table/Table.d.ts +18 -2
  257. package/cjs/core/Table/Table.js +767 -448
  258. package/cjs/core/Table/TableCell.d.ts +2 -2
  259. package/cjs/core/Table/TableCell.js +113 -88
  260. package/cjs/core/Table/TablePaginator.d.ts +3 -3
  261. package/cjs/core/Table/TablePaginator.js +312 -159
  262. package/cjs/core/Table/TableRowMemoized.d.ts +4 -4
  263. package/cjs/core/Table/TableRowMemoized.js +137 -89
  264. package/cjs/core/Table/actionHandlers/expandHandler.js +12 -12
  265. package/cjs/core/Table/actionHandlers/filterHandler.js +25 -17
  266. package/cjs/core/Table/actionHandlers/index.js +56 -14
  267. package/cjs/core/Table/actionHandlers/resizeHandler.js +13 -13
  268. package/cjs/core/Table/actionHandlers/selectHandler.js +123 -96
  269. package/cjs/core/Table/cells/DefaultCell.d.ts +2 -2
  270. package/cjs/core/Table/cells/DefaultCell.js +48 -38
  271. package/cjs/core/Table/cells/EditableCell.d.ts +2 -2
  272. package/cjs/core/Table/cells/EditableCell.js +75 -68
  273. package/cjs/core/Table/cells/index.js +16 -6
  274. package/cjs/core/Table/columns/actionColumn.d.ts +3 -3
  275. package/cjs/core/Table/columns/actionColumn.js +106 -96
  276. package/cjs/core/Table/columns/expanderColumn.d.ts +2 -2
  277. package/cjs/core/Table/columns/expanderColumn.js +45 -54
  278. package/cjs/core/Table/columns/index.js +41 -11
  279. package/cjs/core/Table/columns/selectionColumn.d.ts +4 -4
  280. package/cjs/core/Table/columns/selectionColumn.js +57 -51
  281. package/cjs/core/Table/filters/BaseFilter.d.ts +2 -2
  282. package/cjs/core/Table/filters/BaseFilter.js +24 -38
  283. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -2
  284. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +92 -72
  285. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +4 -4
  286. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +118 -79
  287. package/cjs/core/Table/filters/FilterButtonBar.d.ts +3 -3
  288. package/cjs/core/Table/filters/FilterButtonBar.js +39 -41
  289. package/cjs/core/Table/filters/FilterToggle.d.ts +3 -3
  290. package/cjs/core/Table/filters/FilterToggle.js +59 -51
  291. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +4 -4
  292. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +58 -52
  293. package/cjs/core/Table/filters/TextFilter/TextFilter.d.ts +3 -3
  294. package/cjs/core/Table/filters/TextFilter/TextFilter.js +40 -44
  295. package/cjs/core/Table/filters/customFilterFunctions.js +16 -14
  296. package/cjs/core/Table/filters/defaultFilterFunctions.js +86 -81
  297. package/cjs/core/Table/filters/index.js +35 -11
  298. package/cjs/core/Table/filters/tableFilters.d.ts +5 -5
  299. package/cjs/core/Table/filters/tableFilters.js +44 -54
  300. package/cjs/core/Table/filters/types.d.ts +1 -1
  301. package/cjs/core/Table/filters/types.js +2 -2
  302. package/cjs/core/Table/hooks/index.js +67 -19
  303. package/cjs/core/Table/hooks/useColumnDragAndDrop.js +101 -88
  304. package/cjs/core/Table/hooks/useExpanderCell.d.ts +1 -1
  305. package/cjs/core/Table/hooks/useExpanderCell.js +33 -47
  306. package/cjs/core/Table/hooks/useResizeColumns.js +362 -290
  307. package/cjs/core/Table/hooks/useScrollToRow.d.ts +2 -2
  308. package/cjs/core/Table/hooks/useScrollToRow.js +46 -60
  309. package/cjs/core/Table/hooks/useSelectionCell.js +17 -10
  310. package/cjs/core/Table/hooks/useStickyColumns.js +64 -62
  311. package/cjs/core/Table/hooks/useSubRowFiltering.js +95 -110
  312. package/cjs/core/Table/hooks/useSubRowSelection.js +32 -53
  313. package/cjs/core/Table/index.js +78 -18
  314. package/cjs/core/Table/utils.js +42 -40
  315. package/cjs/core/Tabs/Tab.d.ts +2 -2
  316. package/cjs/core/Tabs/Tab.js +51 -38
  317. package/cjs/core/Tabs/Tabs.d.ts +6 -6
  318. package/cjs/core/Tabs/Tabs.js +407 -335
  319. package/cjs/core/Tabs/index.js +16 -6
  320. package/cjs/core/Tag/Tag.d.ts +1 -1
  321. package/cjs/core/Tag/Tag.js +42 -40
  322. package/cjs/core/Tag/TagContainer.d.ts +1 -1
  323. package/cjs/core/Tag/TagContainer.js +23 -36
  324. package/cjs/core/Tag/index.js +16 -6
  325. package/cjs/core/Textarea/Textarea.d.ts +2 -9
  326. package/cjs/core/Textarea/Textarea.js +17 -41
  327. package/cjs/core/Textarea/index.js +9 -4
  328. package/cjs/core/ThemeProvider/ThemeContext.js +4 -26
  329. package/cjs/core/ThemeProvider/ThemeProvider.d.ts +4 -4
  330. package/cjs/core/ThemeProvider/ThemeProvider.js +77 -54
  331. package/cjs/core/ThemeProvider/index.js +9 -4
  332. package/cjs/core/Tile/Tile.d.ts +14 -14
  333. package/cjs/core/Tile/Tile.js +334 -234
  334. package/cjs/core/Tile/index.js +9 -4
  335. package/cjs/core/TimePicker/TimePicker.d.ts +3 -3
  336. package/cjs/core/TimePicker/TimePicker.js +458 -259
  337. package/cjs/core/TimePicker/index.js +9 -4
  338. package/cjs/core/Toast/Toast.d.ts +5 -5
  339. package/cjs/core/Toast/Toast.js +192 -132
  340. package/cjs/core/Toast/Toaster.d.ts +5 -5
  341. package/cjs/core/Toast/Toaster.js +103 -100
  342. package/cjs/core/Toast/index.js +9 -4
  343. package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +1 -6
  344. package/cjs/core/ToggleSwitch/ToggleSwitch.js +66 -53
  345. package/cjs/core/ToggleSwitch/index.js +9 -4
  346. package/cjs/core/Tooltip/Tooltip.d.ts +2 -2
  347. package/cjs/core/Tooltip/Tooltip.js +146 -121
  348. package/cjs/core/Tooltip/index.js +9 -4
  349. package/cjs/core/TransferList/TransferList.d.ts +6 -6
  350. package/cjs/core/TransferList/TransferList.js +184 -103
  351. package/cjs/core/TransferList/index.js +9 -4
  352. package/cjs/core/Tree/Tree.d.ts +5 -5
  353. package/cjs/core/Tree/Tree.js +205 -157
  354. package/cjs/core/Tree/TreeContext.d.ts +1 -1
  355. package/cjs/core/Tree/TreeContext.js +9 -31
  356. package/cjs/core/Tree/TreeNode.d.ts +2 -2
  357. package/cjs/core/Tree/TreeNode.js +207 -129
  358. package/cjs/core/Tree/TreeNodeExpander.d.ts +1 -1
  359. package/cjs/core/Tree/TreeNodeExpander.js +26 -37
  360. package/cjs/core/Tree/index.js +23 -8
  361. package/cjs/core/Typography/Anchor/Anchor.js +3 -3
  362. package/cjs/core/Typography/Anchor/index.js +9 -4
  363. package/cjs/core/Typography/Blockquote/Blockquote.d.ts +1 -1
  364. package/cjs/core/Typography/Blockquote/Blockquote.js +18 -35
  365. package/cjs/core/Typography/Blockquote/index.js +9 -4
  366. package/cjs/core/Typography/Code/Code.js +3 -3
  367. package/cjs/core/Typography/Code/index.js +9 -4
  368. package/cjs/core/Typography/Kbd/Kbd.d.ts +1 -1
  369. package/cjs/core/Typography/Kbd/Kbd.js +30 -46
  370. package/cjs/core/Typography/Kbd/index.js +15 -5
  371. package/cjs/core/Typography/Text/Text.d.ts +1 -1
  372. package/cjs/core/Typography/Text/Text.js +26 -38
  373. package/cjs/core/Typography/Text/index.js +9 -4
  374. package/cjs/core/Typography/index.js +50 -14
  375. package/cjs/core/index.d.ts +1 -0
  376. package/cjs/core/index.js +889 -179
  377. package/cjs/core/utils/color/ColorValue.d.ts +4 -4
  378. package/cjs/core/utils/color/ColorValue.js +535 -453
  379. package/cjs/core/utils/color/index.js +4 -17
  380. package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.d.ts +2 -2
  381. package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.js +20 -35
  382. package/cjs/core/utils/components/Box.js +3 -3
  383. package/cjs/core/utils/components/Divider.d.ts +1 -1
  384. package/cjs/core/utils/components/Divider.js +14 -33
  385. package/cjs/core/utils/components/Flex.d.ts +4 -4
  386. package/cjs/core/utils/components/Flex.js +93 -102
  387. package/cjs/core/utils/components/FocusTrap.d.ts +3 -3
  388. package/cjs/core/utils/components/FocusTrap.js +47 -60
  389. package/cjs/core/utils/components/Icon.d.ts +1 -1
  390. package/cjs/core/utils/components/Icon.js +25 -43
  391. package/cjs/core/utils/components/InputContainer.d.ts +2 -2
  392. package/cjs/core/utils/components/InputContainer.js +75 -46
  393. package/cjs/core/utils/components/InputFlexContainer.d.ts +1 -1
  394. package/cjs/core/utils/components/InputFlexContainer.js +22 -10
  395. package/cjs/core/utils/components/LinkAction.js +3 -3
  396. package/cjs/core/utils/components/MiddleTextTruncation.d.ts +2 -2
  397. package/cjs/core/utils/components/MiddleTextTruncation.js +32 -44
  398. package/cjs/core/utils/components/Popover.d.ts +3 -3
  399. package/cjs/core/utils/components/Popover.js +111 -135
  400. package/cjs/core/utils/components/Resizer.d.ts +2 -2
  401. package/cjs/core/utils/components/Resizer.js +254 -211
  402. package/cjs/core/utils/components/VirtualScroll.d.ts +2 -2
  403. package/cjs/core/utils/components/VirtualScroll.js +304 -245
  404. package/cjs/core/utils/components/VisuallyHidden.d.ts +1 -1
  405. package/cjs/core/utils/components/VisuallyHidden.js +14 -33
  406. package/cjs/core/utils/components/WithCSSTransition.d.ts +2 -2
  407. package/cjs/core/utils/components/WithCSSTransition.js +43 -48
  408. package/cjs/core/utils/components/index.js +18 -31
  409. package/cjs/core/utils/functions/colors.js +36 -33
  410. package/cjs/core/utils/functions/date.js +10 -10
  411. package/cjs/core/utils/functions/dom.js +24 -17
  412. package/cjs/core/utils/functions/focusable.js +26 -17
  413. package/cjs/core/utils/functions/import.d.ts +6 -0
  414. package/cjs/core/utils/functions/import.js +61 -0
  415. package/cjs/core/utils/functions/index.d.ts +1 -0
  416. package/cjs/core/utils/functions/index.js +11 -23
  417. package/cjs/core/utils/functions/numbers.js +9 -9
  418. package/cjs/core/utils/functions/polymorphic.d.ts +5 -3
  419. package/cjs/core/utils/functions/polymorphic.js +43 -55
  420. package/cjs/core/utils/functions/supports.js +5 -4
  421. package/cjs/core/utils/hooks/index.js +16 -29
  422. package/cjs/core/utils/hooks/useContainerWidth.js +26 -41
  423. package/cjs/core/utils/hooks/useDragAndDrop.js +110 -109
  424. package/cjs/core/utils/hooks/useEventListener.js +22 -44
  425. package/cjs/core/utils/hooks/useGlobals.js +34 -51
  426. package/cjs/core/utils/hooks/useId.js +9 -30
  427. package/cjs/core/utils/hooks/useIntersection.js +30 -46
  428. package/cjs/core/utils/hooks/useIsClient.js +9 -31
  429. package/cjs/core/utils/hooks/useIsomorphicLayoutEffect.js +6 -27
  430. package/cjs/core/utils/hooks/useLatestRef.js +9 -31
  431. package/cjs/core/utils/hooks/useMediaQuery.js +31 -53
  432. package/cjs/core/utils/hooks/useMergedRefs.js +15 -38
  433. package/cjs/core/utils/hooks/useOverflow.js +69 -78
  434. package/cjs/core/utils/hooks/useResizeObserver.js +22 -39
  435. package/cjs/core/utils/hooks/useSafeContext.js +9 -31
  436. package/cjs/core/utils/icons/StatusIconMap.d.ts +5 -5
  437. package/cjs/core/utils/icons/StatusIconMap.js +28 -34
  438. package/cjs/core/utils/icons/Svg.js +3 -3
  439. package/cjs/core/utils/icons/SvgCalendar.d.ts +1 -1
  440. package/cjs/core/utils/icons/SvgCalendar.js +12 -29
  441. package/cjs/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
  442. package/cjs/core/utils/icons/SvgCaretDownSmall.js +12 -29
  443. package/cjs/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
  444. package/cjs/core/utils/icons/SvgCaretRightSmall.js +12 -29
  445. package/cjs/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
  446. package/cjs/core/utils/icons/SvgCaretUpSmall.js +12 -29
  447. package/cjs/core/utils/icons/SvgCheckmark.d.ts +1 -1
  448. package/cjs/core/utils/icons/SvgCheckmark.js +10 -29
  449. package/cjs/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
  450. package/cjs/core/utils/icons/SvgCheckmarkSmall.js +12 -29
  451. package/cjs/core/utils/icons/SvgChevronLeft.d.ts +1 -1
  452. package/cjs/core/utils/icons/SvgChevronLeft.js +12 -29
  453. package/cjs/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
  454. package/cjs/core/utils/icons/SvgChevronLeftDouble.js +12 -29
  455. package/cjs/core/utils/icons/SvgChevronRight.d.ts +1 -1
  456. package/cjs/core/utils/icons/SvgChevronRight.js +12 -29
  457. package/cjs/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
  458. package/cjs/core/utils/icons/SvgChevronRightDouble.js +12 -29
  459. package/cjs/core/utils/icons/SvgClose.d.ts +1 -1
  460. package/cjs/core/utils/icons/SvgClose.js +12 -29
  461. package/cjs/core/utils/icons/SvgCloseSmall.d.ts +1 -1
  462. package/cjs/core/utils/icons/SvgCloseSmall.js +12 -29
  463. package/cjs/core/utils/icons/SvgColumnManager.d.ts +1 -1
  464. package/cjs/core/utils/icons/SvgColumnManager.js +12 -29
  465. package/cjs/core/utils/icons/SvgDocument.d.ts +1 -1
  466. package/cjs/core/utils/icons/SvgDocument.js +10 -29
  467. package/cjs/core/utils/icons/SvgFilter.d.ts +1 -1
  468. package/cjs/core/utils/icons/SvgFilter.js +10 -29
  469. package/cjs/core/utils/icons/SvgFilterHollow.d.ts +1 -1
  470. package/cjs/core/utils/icons/SvgFilterHollow.js +12 -29
  471. package/cjs/core/utils/icons/SvgImportantSmall.d.ts +1 -1
  472. package/cjs/core/utils/icons/SvgImportantSmall.js +12 -29
  473. package/cjs/core/utils/icons/SvgInfoCircular.d.ts +1 -1
  474. package/cjs/core/utils/icons/SvgInfoCircular.js +12 -29
  475. package/cjs/core/utils/icons/SvgMore.d.ts +1 -1
  476. package/cjs/core/utils/icons/SvgMore.js +12 -29
  477. package/cjs/core/utils/icons/SvgMoreVertical.d.ts +1 -1
  478. package/cjs/core/utils/icons/SvgMoreVertical.js +12 -29
  479. package/cjs/core/utils/icons/SvgNew.d.ts +1 -1
  480. package/cjs/core/utils/icons/SvgNew.js +12 -29
  481. package/cjs/core/utils/icons/SvgSearch.d.ts +1 -1
  482. package/cjs/core/utils/icons/SvgSearch.js +12 -29
  483. package/cjs/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
  484. package/cjs/core/utils/icons/SvgSmileyHappy.js +12 -29
  485. package/cjs/core/utils/icons/SvgSortDown.d.ts +1 -1
  486. package/cjs/core/utils/icons/SvgSortDown.js +12 -29
  487. package/cjs/core/utils/icons/SvgSortUp.d.ts +1 -1
  488. package/cjs/core/utils/icons/SvgSortUp.js +12 -29
  489. package/cjs/core/utils/icons/SvgStatusError.d.ts +1 -1
  490. package/cjs/core/utils/icons/SvgStatusError.js +12 -29
  491. package/cjs/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
  492. package/cjs/core/utils/icons/SvgStatusSuccess.js +12 -29
  493. package/cjs/core/utils/icons/SvgStatusWarning.d.ts +1 -1
  494. package/cjs/core/utils/icons/SvgStatusWarning.js +12 -29
  495. package/cjs/core/utils/icons/SvgSwap.d.ts +1 -1
  496. package/cjs/core/utils/icons/SvgSwap.js +12 -29
  497. package/cjs/core/utils/icons/SvgUpload.d.ts +1 -1
  498. package/cjs/core/utils/icons/SvgUpload.js +12 -29
  499. package/cjs/core/utils/icons/index.js +34 -47
  500. package/cjs/core/utils/index.js +10 -23
  501. package/cjs/core/utils/props.d.ts +2 -2
  502. package/cjs/core/utils/props.js +2 -2
  503. package/cjs/core/utils/types.d.ts +1 -1
  504. package/cjs/core/utils/types.js +2 -2
  505. package/cjs/index.js +5 -18
  506. package/cjs/package.json +1 -0
  507. package/cjs/styles.js +452 -441
  508. package/cjs/types/react-table-config.js +2 -2
  509. package/esm/core/Alert/Alert.d.ts +5 -5
  510. package/esm/core/Alert/Alert.js +73 -28
  511. package/esm/core/Avatar/Avatar.d.ts +3 -3
  512. package/esm/core/Avatar/Avatar.js +48 -13
  513. package/esm/core/AvatarGroup/AvatarGroup.d.ts +1 -1
  514. package/esm/core/AvatarGroup/AvatarGroup.js +63 -22
  515. package/esm/core/Backdrop/Backdrop.d.ts +1 -1
  516. package/esm/core/Backdrop/Backdrop.js +10 -2
  517. package/esm/core/Badge/Badge.d.ts +1 -1
  518. package/esm/core/Badge/Badge.js +31 -16
  519. package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +16 -24
  520. package/esm/core/Breadcrumbs/Breadcrumbs.js +128 -31
  521. package/esm/core/ButtonGroup/ButtonGroup.d.ts +1 -1
  522. package/esm/core/ButtonGroup/ButtonGroup.js +59 -22
  523. package/esm/core/Buttons/Button/Button.d.ts +1 -1
  524. package/esm/core/Buttons/Button/Button.js +37 -5
  525. package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +2 -2
  526. package/esm/core/Buttons/DropdownButton/DropdownButton.js +54 -19
  527. package/esm/core/Buttons/IconButton/IconButton.d.ts +1 -1
  528. package/esm/core/Buttons/IconButton/IconButton.js +51 -7
  529. package/esm/core/Buttons/IdeasButton/IdeasButton.d.ts +1 -1
  530. package/esm/core/Buttons/IdeasButton/IdeasButton.js +12 -2
  531. package/esm/core/Buttons/SplitButton/SplitButton.d.ts +1 -1
  532. package/esm/core/Buttons/SplitButton/SplitButton.js +59 -15
  533. package/esm/core/Carousel/Carousel.d.ts +3 -3
  534. package/esm/core/Carousel/Carousel.js +97 -70
  535. package/esm/core/Carousel/CarouselDot.d.ts +1 -1
  536. package/esm/core/Carousel/CarouselDot.js +19 -6
  537. package/esm/core/Carousel/CarouselDotsList.d.ts +1 -1
  538. package/esm/core/Carousel/CarouselDotsList.js +123 -63
  539. package/esm/core/Carousel/CarouselNavigation.d.ts +2 -2
  540. package/esm/core/Carousel/CarouselNavigation.js +85 -32
  541. package/esm/core/Carousel/CarouselSlide.d.ts +1 -1
  542. package/esm/core/Carousel/CarouselSlide.js +29 -14
  543. package/esm/core/Carousel/CarouselSlider.js +65 -40
  544. package/esm/core/Checkbox/Checkbox.d.ts +9 -5
  545. package/esm/core/Checkbox/Checkbox.js +78 -28
  546. package/esm/core/ColorPicker/ColorBuilder.js +277 -166
  547. package/esm/core/ColorPicker/ColorInputPanel.d.ts +1 -1
  548. package/esm/core/ColorPicker/ColorInputPanel.js +437 -248
  549. package/esm/core/ColorPicker/ColorPalette.d.ts +1 -1
  550. package/esm/core/ColorPicker/ColorPalette.js +115 -80
  551. package/esm/core/ColorPicker/ColorPicker.d.ts +1 -6
  552. package/esm/core/ColorPicker/ColorPicker.js +75 -54
  553. package/esm/core/ColorPicker/ColorPickerContext.js +7 -5
  554. package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
  555. package/esm/core/ColorPicker/ColorSwatch.js +19 -7
  556. package/esm/core/ComboBox/ComboBox.d.ts +6 -6
  557. package/esm/core/ComboBox/ComboBox.js +385 -256
  558. package/esm/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
  559. package/esm/core/ComboBox/ComboBoxDropdown.js +32 -15
  560. package/esm/core/ComboBox/ComboBoxEndIcon.d.ts +1 -1
  561. package/esm/core/ComboBox/ComboBoxEndIcon.js +39 -12
  562. package/esm/core/ComboBox/ComboBoxInput.d.ts +2 -2
  563. package/esm/core/ComboBox/ComboBoxInput.js +197 -124
  564. package/esm/core/ComboBox/ComboBoxInputContainer.d.ts +1 -1
  565. package/esm/core/ComboBox/ComboBoxInputContainer.js +20 -5
  566. package/esm/core/ComboBox/ComboBoxMenu.d.ts +1 -1
  567. package/esm/core/ComboBox/ComboBoxMenu.js +94 -38
  568. package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +1 -1
  569. package/esm/core/ComboBox/ComboBoxMenuItem.js +59 -13
  570. package/esm/core/ComboBox/ComboBoxMultipleContainer.d.ts +1 -1
  571. package/esm/core/ComboBox/ComboBoxMultipleContainer.js +6 -2
  572. package/esm/core/ComboBox/helpers.d.ts +2 -2
  573. package/esm/core/ComboBox/helpers.js +38 -38
  574. package/esm/core/DatePicker/DatePicker.d.ts +2 -2
  575. package/esm/core/DatePicker/DatePicker.js +519 -325
  576. package/esm/core/Dialog/Dialog.d.ts +1 -1
  577. package/esm/core/Dialog/Dialog.js +65 -31
  578. package/esm/core/Dialog/DialogBackdrop.d.ts +1 -1
  579. package/esm/core/Dialog/DialogBackdrop.js +39 -19
  580. package/esm/core/Dialog/DialogContent.d.ts +2 -1
  581. package/esm/core/Dialog/DialogContent.js +25 -2
  582. package/esm/core/Dialog/DialogContext.d.ts +1 -1
  583. package/esm/core/Dialog/DialogContext.js +1 -1
  584. package/esm/core/Dialog/DialogDragContext.d.ts +1 -1
  585. package/esm/core/Dialog/DialogDragContext.js +4 -4
  586. package/esm/core/Dialog/DialogMain.d.ts +1 -1
  587. package/esm/core/Dialog/DialogMain.js +177 -108
  588. package/esm/core/Dialog/DialogTitleBar.d.ts +1 -1
  589. package/esm/core/Dialog/DialogTitleBar.js +45 -10
  590. package/esm/core/DropdownMenu/DropdownMenu.d.ts +4 -4
  591. package/esm/core/DropdownMenu/DropdownMenu.js +66 -22
  592. package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +77 -21
  593. package/esm/core/ExpandableBlock/ExpandableBlock.js +225 -46
  594. package/esm/core/Fieldset/Fieldset.d.ts +1 -1
  595. package/esm/core/Fieldset/Fieldset.js +19 -8
  596. package/esm/core/FileUpload/FileEmptyCard.js +19 -8
  597. package/esm/core/FileUpload/FileUpload.d.ts +1 -1
  598. package/esm/core/FileUpload/FileUpload.js +49 -36
  599. package/esm/core/FileUpload/FileUploadCard.d.ts +1 -1
  600. package/esm/core/FileUpload/FileUploadCard.js +154 -76
  601. package/esm/core/FileUpload/FileUploadTemplate.d.ts +1 -1
  602. package/esm/core/FileUpload/FileUploadTemplate.js +37 -9
  603. package/esm/core/Footer/Footer.d.ts +4 -4
  604. package/esm/core/Footer/Footer.js +86 -55
  605. package/esm/core/Footer/FooterSeparator.js +1 -1
  606. package/esm/core/Header/Header.d.ts +2 -2
  607. package/esm/core/Header/Header.js +55 -14
  608. package/esm/core/Header/HeaderBasicButton.js +28 -7
  609. package/esm/core/Header/HeaderBreadcrumbs.d.ts +1 -1
  610. package/esm/core/Header/HeaderBreadcrumbs.js +32 -8
  611. package/esm/core/Header/HeaderButton.d.ts +5 -1
  612. package/esm/core/Header/HeaderButton.js +62 -13
  613. package/esm/core/Header/HeaderDropdownButton.js +43 -13
  614. package/esm/core/Header/HeaderLogo.d.ts +1 -1
  615. package/esm/core/Header/HeaderLogo.js +36 -5
  616. package/esm/core/Header/HeaderSplitButton.js +57 -13
  617. package/esm/core/InformationPanel/InformationPanel.d.ts +1 -1
  618. package/esm/core/InformationPanel/InformationPanel.js +71 -36
  619. package/esm/core/InformationPanel/InformationPanelContent.d.ts +1 -1
  620. package/esm/core/InformationPanel/InformationPanelContent.js +17 -3
  621. package/esm/core/InformationPanel/InformationPanelHeader.d.ts +1 -1
  622. package/esm/core/InformationPanel/InformationPanelHeader.js +32 -8
  623. package/esm/core/InformationPanel/InformationPanelWrapper.js +3 -1
  624. package/esm/core/Input/Input.d.ts +6 -6
  625. package/esm/core/Input/Input.js +11 -9
  626. package/esm/core/InputGroup/InputGroup.d.ts +1 -1
  627. package/esm/core/InputGroup/InputGroup.js +37 -14
  628. package/esm/core/Label/Label.d.ts +1 -1
  629. package/esm/core/Label/Label.js +24 -5
  630. package/esm/core/LabeledInput/LabeledInput.d.ts +1 -1
  631. package/esm/core/LabeledInput/LabeledInput.js +43 -5
  632. package/esm/core/LabeledSelect/LabeledSelect.d.ts +1 -1
  633. package/esm/core/LabeledSelect/LabeledSelect.js +50 -16
  634. package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +2 -3
  635. package/esm/core/LabeledTextarea/LabeledTextarea.js +43 -5
  636. package/esm/core/List/ListItem.d.ts +4 -4
  637. package/esm/core/List/ListItem.js +46 -28
  638. package/esm/core/Menu/Menu.d.ts +1 -1
  639. package/esm/core/Menu/Menu.js +58 -47
  640. package/esm/core/Menu/MenuDivider.js +1 -1
  641. package/esm/core/Menu/MenuExtraContent.js +1 -1
  642. package/esm/core/Menu/MenuItem.d.ts +1 -1
  643. package/esm/core/Menu/MenuItem.js +131 -57
  644. package/esm/core/Menu/MenuItemSkeleton.d.ts +1 -1
  645. package/esm/core/Menu/MenuItemSkeleton.js +44 -12
  646. package/esm/core/Modal/Modal.d.ts +1 -1
  647. package/esm/core/Modal/Modal.js +33 -6
  648. package/esm/core/NonIdealState/ErrorPage.d.ts +6 -7
  649. package/esm/core/NonIdealState/ErrorPage.js +177 -117
  650. package/esm/core/NonIdealState/NonIdealState.d.ts +17 -1
  651. package/esm/core/NonIdealState/NonIdealState.js +65 -6
  652. package/esm/core/NotificationMarker/NotificationMarker.d.ts +1 -1
  653. package/esm/core/NotificationMarker/NotificationMarker.js +20 -2
  654. package/esm/core/Overlay/Overlay.d.ts +57 -0
  655. package/esm/core/Overlay/Overlay.js +88 -0
  656. package/esm/core/Overlay/index.d.ts +1 -0
  657. package/esm/core/{ProgressIndicators/ProgressLinear → Overlay}/index.js +1 -2
  658. package/esm/core/ProgressIndicators/{ProgressLinear/ProgressLinear.d.ts → ProgressLinear.d.ts} +6 -6
  659. package/esm/core/ProgressIndicators/{ProgressLinear/ProgressLinear.js → ProgressLinear.js} +33 -12
  660. package/esm/core/ProgressIndicators/{ProgressRadial/ProgressRadial.d.ts → ProgressRadial.d.ts} +2 -2
  661. package/esm/core/ProgressIndicators/ProgressRadial.js +64 -0
  662. package/esm/core/ProgressIndicators/index.d.ts +2 -2
  663. package/esm/core/ProgressIndicators/index.js +2 -2
  664. package/esm/core/Radio/Radio.d.ts +7 -4
  665. package/esm/core/Radio/Radio.js +45 -11
  666. package/esm/core/RadioTiles/RadioTile.d.ts +15 -4
  667. package/esm/core/RadioTiles/RadioTile.js +62 -14
  668. package/esm/core/RadioTiles/RadioTileGroup.d.ts +1 -1
  669. package/esm/core/RadioTiles/RadioTileGroup.js +10 -3
  670. package/esm/core/SearchBox/SearchBox.d.ts +3 -3
  671. package/esm/core/SearchBox/SearchBox.js +215 -97
  672. package/esm/core/Select/Select.d.ts +5 -10
  673. package/esm/core/Select/Select.js +283 -148
  674. package/esm/core/Select/SelectTag.d.ts +1 -1
  675. package/esm/core/Select/SelectTag.js +15 -3
  676. package/esm/core/Select/SelectTagContainer.d.ts +1 -1
  677. package/esm/core/Select/SelectTagContainer.js +20 -7
  678. package/esm/core/SideNavigation/SideNavigation.d.ts +1 -1
  679. package/esm/core/SideNavigation/SideNavigation.js +94 -21
  680. package/esm/core/SideNavigation/SidenavButton.d.ts +1 -1
  681. package/esm/core/SideNavigation/SidenavButton.js +24 -2
  682. package/esm/core/SideNavigation/SidenavSubmenu.js +14 -3
  683. package/esm/core/SideNavigation/SidenavSubmenuHeader.d.ts +1 -1
  684. package/esm/core/SideNavigation/SidenavSubmenuHeader.js +20 -4
  685. package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +1 -1
  686. package/esm/core/SkipToContentLink/SkipToContentLink.js +11 -2
  687. package/esm/core/Slider/Slider.d.ts +4 -9
  688. package/esm/core/Slider/Slider.js +319 -194
  689. package/esm/core/Slider/Thumb.d.ts +2 -2
  690. package/esm/core/Slider/Thumb.js +100 -52
  691. package/esm/core/Slider/Track.d.ts +3 -3
  692. package/esm/core/Slider/Track.js +67 -49
  693. package/esm/core/StatusMessage/StatusMessage.d.ts +2 -2
  694. package/esm/core/StatusMessage/StatusMessage.js +18 -5
  695. package/esm/core/Stepper/Stepper.d.ts +3 -3
  696. package/esm/core/Stepper/Stepper.js +45 -8
  697. package/esm/core/Stepper/StepperStep.d.ts +1 -1
  698. package/esm/core/Stepper/StepperStep.js +73 -31
  699. package/esm/core/Stepper/WorkflowDiagram.d.ts +1 -1
  700. package/esm/core/Stepper/WorkflowDiagram.js +19 -5
  701. package/esm/core/Stepper/WorkflowDiagramStep.d.ts +3 -3
  702. package/esm/core/Stepper/WorkflowDiagramStep.js +18 -4
  703. package/esm/core/Surface/Surface.d.ts +2 -2
  704. package/esm/core/Surface/Surface.js +68 -39
  705. package/esm/core/Table/SubRowExpander.d.ts +2 -2
  706. package/esm/core/Table/SubRowExpander.js +29 -9
  707. package/esm/core/Table/Table.d.ts +18 -2
  708. package/esm/core/Table/Table.js +765 -411
  709. package/esm/core/Table/TableCell.d.ts +2 -2
  710. package/esm/core/Table/TableCell.js +87 -53
  711. package/esm/core/Table/TablePaginator.d.ts +3 -3
  712. package/esm/core/Table/TablePaginator.js +307 -125
  713. package/esm/core/Table/TableRowMemoized.d.ts +4 -4
  714. package/esm/core/Table/TableRowMemoized.js +129 -58
  715. package/esm/core/Table/actionHandlers/expandHandler.js +10 -10
  716. package/esm/core/Table/actionHandlers/filterHandler.js +23 -15
  717. package/esm/core/Table/actionHandlers/index.js +5 -1
  718. package/esm/core/Table/actionHandlers/resizeHandler.js +11 -11
  719. package/esm/core/Table/actionHandlers/selectHandler.js +117 -93
  720. package/esm/core/Table/cells/DefaultCell.d.ts +2 -2
  721. package/esm/core/Table/cells/DefaultCell.js +42 -7
  722. package/esm/core/Table/cells/EditableCell.d.ts +2 -2
  723. package/esm/core/Table/cells/EditableCell.js +70 -41
  724. package/esm/core/Table/columns/actionColumn.d.ts +3 -3
  725. package/esm/core/Table/columns/actionColumn.js +90 -58
  726. package/esm/core/Table/columns/expanderColumn.d.ts +2 -2
  727. package/esm/core/Table/columns/expanderColumn.js +38 -25
  728. package/esm/core/Table/columns/selectionColumn.d.ts +4 -4
  729. package/esm/core/Table/columns/selectionColumn.js +51 -23
  730. package/esm/core/Table/filters/BaseFilter.d.ts +2 -2
  731. package/esm/core/Table/filters/BaseFilter.js +15 -7
  732. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -2
  733. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +84 -42
  734. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +4 -4
  735. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +108 -46
  736. package/esm/core/Table/filters/FilterButtonBar.d.ts +3 -3
  737. package/esm/core/Table/filters/FilterButtonBar.js +28 -9
  738. package/esm/core/Table/filters/FilterToggle.d.ts +3 -3
  739. package/esm/core/Table/filters/FilterToggle.js +55 -20
  740. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +4 -4
  741. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +50 -22
  742. package/esm/core/Table/filters/TextFilter/TextFilter.d.ts +3 -3
  743. package/esm/core/Table/filters/TextFilter/TextFilter.js +32 -14
  744. package/esm/core/Table/filters/customFilterFunctions.js +14 -12
  745. package/esm/core/Table/filters/defaultFilterFunctions.js +84 -79
  746. package/esm/core/Table/filters/tableFilters.d.ts +5 -5
  747. package/esm/core/Table/filters/tableFilters.js +34 -25
  748. package/esm/core/Table/filters/types.d.ts +1 -1
  749. package/esm/core/Table/hooks/useColumnDragAndDrop.js +88 -81
  750. package/esm/core/Table/hooks/useExpanderCell.d.ts +1 -1
  751. package/esm/core/Table/hooks/useExpanderCell.js +26 -20
  752. package/esm/core/Table/hooks/useResizeColumns.js +353 -287
  753. package/esm/core/Table/hooks/useScrollToRow.d.ts +2 -2
  754. package/esm/core/Table/hooks/useScrollToRow.js +42 -34
  755. package/esm/core/Table/hooks/useSelectionCell.js +10 -6
  756. package/esm/core/Table/hooks/useStickyColumns.js +61 -59
  757. package/esm/core/Table/hooks/useSubRowFiltering.js +90 -83
  758. package/esm/core/Table/hooks/useSubRowSelection.js +28 -27
  759. package/esm/core/Table/index.js +5 -1
  760. package/esm/core/Table/utils.js +40 -38
  761. package/esm/core/Tabs/Tab.d.ts +2 -2
  762. package/esm/core/Tabs/Tab.js +41 -7
  763. package/esm/core/Tabs/Tabs.d.ts +6 -6
  764. package/esm/core/Tabs/Tabs.js +391 -303
  765. package/esm/core/Tag/Tag.d.ts +1 -1
  766. package/esm/core/Tag/Tag.js +35 -8
  767. package/esm/core/Tag/TagContainer.d.ts +1 -1
  768. package/esm/core/Tag/TagContainer.js +17 -5
  769. package/esm/core/Textarea/Textarea.d.ts +2 -9
  770. package/esm/core/Textarea/Textarea.js +11 -10
  771. package/esm/core/ThemeProvider/ThemeProvider.d.ts +4 -4
  772. package/esm/core/ThemeProvider/ThemeProvider.js +65 -21
  773. package/esm/core/Tile/Tile.d.ts +14 -14
  774. package/esm/core/Tile/Tile.js +312 -198
  775. package/esm/core/TimePicker/TimePicker.d.ts +3 -3
  776. package/esm/core/TimePicker/TimePicker.js +448 -228
  777. package/esm/core/Toast/Toast.d.ts +5 -5
  778. package/esm/core/Toast/Toast.js +180 -99
  779. package/esm/core/Toast/Toaster.d.ts +5 -5
  780. package/esm/core/Toast/Toaster.js +83 -67
  781. package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +1 -6
  782. package/esm/core/ToggleSwitch/ToggleSwitch.js +60 -22
  783. package/esm/core/Tooltip/Tooltip.d.ts +2 -2
  784. package/esm/core/Tooltip/Tooltip.js +154 -90
  785. package/esm/core/TransferList/TransferList.d.ts +6 -6
  786. package/esm/core/TransferList/TransferList.js +163 -93
  787. package/esm/core/Tree/Tree.d.ts +5 -5
  788. package/esm/core/Tree/Tree.js +197 -125
  789. package/esm/core/Tree/TreeContext.d.ts +1 -1
  790. package/esm/core/Tree/TreeContext.js +5 -5
  791. package/esm/core/Tree/TreeNode.d.ts +2 -2
  792. package/esm/core/Tree/TreeNode.js +195 -96
  793. package/esm/core/Tree/TreeNodeExpander.d.ts +1 -1
  794. package/esm/core/Tree/TreeNodeExpander.js +16 -5
  795. package/esm/core/Typography/Blockquote/Blockquote.d.ts +1 -1
  796. package/esm/core/Typography/Blockquote/Blockquote.js +12 -4
  797. package/esm/core/Typography/Kbd/Kbd.d.ts +1 -1
  798. package/esm/core/Typography/Kbd/Kbd.js +24 -15
  799. package/esm/core/Typography/Text/Text.d.ts +1 -1
  800. package/esm/core/Typography/Text/Text.js +20 -7
  801. package/esm/core/index.d.ts +1 -0
  802. package/esm/core/index.js +78 -10
  803. package/esm/core/utils/color/ColorValue.d.ts +4 -4
  804. package/esm/core/utils/color/ColorValue.js +524 -449
  805. package/esm/core/utils/components/AutoclearingHiddenLiveRegion.d.ts +2 -2
  806. package/esm/core/utils/components/AutoclearingHiddenLiveRegion.js +11 -7
  807. package/esm/core/utils/components/Divider.d.ts +1 -1
  808. package/esm/core/utils/components/Divider.js +8 -2
  809. package/esm/core/utils/components/Flex.d.ts +4 -4
  810. package/esm/core/utils/components/Flex.js +87 -71
  811. package/esm/core/utils/components/FocusTrap.d.ts +3 -3
  812. package/esm/core/utils/components/FocusTrap.js +41 -32
  813. package/esm/core/utils/components/Icon.d.ts +1 -1
  814. package/esm/core/utils/components/Icon.js +19 -12
  815. package/esm/core/utils/components/InputContainer.d.ts +2 -2
  816. package/esm/core/utils/components/InputContainer.js +65 -15
  817. package/esm/core/utils/components/InputFlexContainer.d.ts +1 -1
  818. package/esm/core/utils/components/InputFlexContainer.js +13 -2
  819. package/esm/core/utils/components/MiddleTextTruncation.d.ts +2 -2
  820. package/esm/core/utils/components/MiddleTextTruncation.js +27 -17
  821. package/esm/core/utils/components/Popover.d.ts +3 -3
  822. package/esm/core/utils/components/Popover.js +103 -102
  823. package/esm/core/utils/components/Resizer.d.ts +2 -2
  824. package/esm/core/utils/components/Resizer.js +250 -184
  825. package/esm/core/utils/components/VirtualScroll.d.ts +2 -2
  826. package/esm/core/utils/components/VirtualScroll.js +297 -218
  827. package/esm/core/utils/components/VisuallyHidden.d.ts +1 -1
  828. package/esm/core/utils/components/VisuallyHidden.js +8 -2
  829. package/esm/core/utils/components/WithCSSTransition.d.ts +2 -2
  830. package/esm/core/utils/components/WithCSSTransition.js +38 -21
  831. package/esm/core/utils/functions/colors.js +30 -30
  832. package/esm/core/utils/functions/date.js +8 -8
  833. package/esm/core/utils/functions/dom.js +17 -14
  834. package/esm/core/utils/functions/focusable.js +24 -15
  835. package/esm/core/utils/functions/import.d.ts +6 -0
  836. package/esm/core/utils/functions/import.js +14 -0
  837. package/esm/core/utils/functions/index.d.ts +1 -0
  838. package/esm/core/utils/functions/index.js +1 -0
  839. package/esm/core/utils/functions/numbers.js +7 -7
  840. package/esm/core/utils/functions/polymorphic.d.ts +5 -3
  841. package/esm/core/utils/functions/polymorphic.js +32 -23
  842. package/esm/core/utils/functions/supports.js +2 -1
  843. package/esm/core/utils/hooks/useContainerWidth.js +16 -13
  844. package/esm/core/utils/hooks/useDragAndDrop.js +99 -80
  845. package/esm/core/utils/hooks/useEventListener.js +18 -18
  846. package/esm/core/utils/hooks/useGlobals.js +29 -24
  847. package/esm/core/utils/hooks/useId.js +2 -2
  848. package/esm/core/utils/hooks/useIntersection.js +25 -19
  849. package/esm/core/utils/hooks/useIsClient.js +5 -5
  850. package/esm/core/utils/hooks/useIsomorphicLayoutEffect.js +2 -1
  851. package/esm/core/utils/hooks/useLatestRef.js +5 -5
  852. package/esm/core/utils/hooks/useMediaQuery.js +23 -25
  853. package/esm/core/utils/hooks/useMergedRefs.js +11 -12
  854. package/esm/core/utils/hooks/useOverflow.js +62 -50
  855. package/esm/core/utils/hooks/useResizeObserver.js +17 -12
  856. package/esm/core/utils/hooks/useSafeContext.js +5 -5
  857. package/esm/core/utils/icons/StatusIconMap.d.ts +5 -5
  858. package/esm/core/utils/icons/StatusIconMap.js +8 -4
  859. package/esm/core/utils/icons/SvgCalendar.d.ts +1 -1
  860. package/esm/core/utils/icons/SvgCalendar.js +7 -2
  861. package/esm/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
  862. package/esm/core/utils/icons/SvgCaretDownSmall.js +7 -2
  863. package/esm/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
  864. package/esm/core/utils/icons/SvgCaretRightSmall.js +7 -2
  865. package/esm/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
  866. package/esm/core/utils/icons/SvgCaretUpSmall.js +7 -2
  867. package/esm/core/utils/icons/SvgCheckmark.d.ts +1 -1
  868. package/esm/core/utils/icons/SvgCheckmark.js +5 -2
  869. package/esm/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
  870. package/esm/core/utils/icons/SvgCheckmarkSmall.js +7 -2
  871. package/esm/core/utils/icons/SvgChevronLeft.d.ts +1 -1
  872. package/esm/core/utils/icons/SvgChevronLeft.js +7 -2
  873. package/esm/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
  874. package/esm/core/utils/icons/SvgChevronLeftDouble.js +7 -2
  875. package/esm/core/utils/icons/SvgChevronRight.d.ts +1 -1
  876. package/esm/core/utils/icons/SvgChevronRight.js +7 -2
  877. package/esm/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
  878. package/esm/core/utils/icons/SvgChevronRightDouble.js +7 -2
  879. package/esm/core/utils/icons/SvgClose.d.ts +1 -1
  880. package/esm/core/utils/icons/SvgClose.js +7 -2
  881. package/esm/core/utils/icons/SvgCloseSmall.d.ts +1 -1
  882. package/esm/core/utils/icons/SvgCloseSmall.js +7 -2
  883. package/esm/core/utils/icons/SvgColumnManager.d.ts +1 -1
  884. package/esm/core/utils/icons/SvgColumnManager.js +7 -2
  885. package/esm/core/utils/icons/SvgDocument.d.ts +1 -1
  886. package/esm/core/utils/icons/SvgDocument.js +5 -2
  887. package/esm/core/utils/icons/SvgFilter.d.ts +1 -1
  888. package/esm/core/utils/icons/SvgFilter.js +5 -2
  889. package/esm/core/utils/icons/SvgFilterHollow.d.ts +1 -1
  890. package/esm/core/utils/icons/SvgFilterHollow.js +7 -2
  891. package/esm/core/utils/icons/SvgImportantSmall.d.ts +1 -1
  892. package/esm/core/utils/icons/SvgImportantSmall.js +7 -2
  893. package/esm/core/utils/icons/SvgInfoCircular.d.ts +1 -1
  894. package/esm/core/utils/icons/SvgInfoCircular.js +7 -2
  895. package/esm/core/utils/icons/SvgMore.d.ts +1 -1
  896. package/esm/core/utils/icons/SvgMore.js +7 -2
  897. package/esm/core/utils/icons/SvgMoreVertical.d.ts +1 -1
  898. package/esm/core/utils/icons/SvgMoreVertical.js +7 -2
  899. package/esm/core/utils/icons/SvgNew.d.ts +1 -1
  900. package/esm/core/utils/icons/SvgNew.js +7 -2
  901. package/esm/core/utils/icons/SvgSearch.d.ts +1 -1
  902. package/esm/core/utils/icons/SvgSearch.js +7 -2
  903. package/esm/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
  904. package/esm/core/utils/icons/SvgSmileyHappy.js +7 -2
  905. package/esm/core/utils/icons/SvgSortDown.d.ts +1 -1
  906. package/esm/core/utils/icons/SvgSortDown.js +7 -2
  907. package/esm/core/utils/icons/SvgSortUp.d.ts +1 -1
  908. package/esm/core/utils/icons/SvgSortUp.js +7 -2
  909. package/esm/core/utils/icons/SvgStatusError.d.ts +1 -1
  910. package/esm/core/utils/icons/SvgStatusError.js +7 -2
  911. package/esm/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
  912. package/esm/core/utils/icons/SvgStatusSuccess.js +7 -2
  913. package/esm/core/utils/icons/SvgStatusWarning.d.ts +1 -1
  914. package/esm/core/utils/icons/SvgStatusWarning.js +7 -2
  915. package/esm/core/utils/icons/SvgSwap.d.ts +1 -1
  916. package/esm/core/utils/icons/SvgSwap.js +7 -2
  917. package/esm/core/utils/icons/SvgUpload.d.ts +1 -1
  918. package/esm/core/utils/icons/SvgUpload.js +7 -2
  919. package/esm/core/utils/props.d.ts +2 -2
  920. package/esm/core/utils/types.d.ts +1 -1
  921. package/esm/styles.js +452 -443
  922. package/package.json +33 -30
  923. package/styles.css +726 -1594
  924. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +0 -65
  925. package/cjs/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -3
  926. package/cjs/core/ProgressIndicators/ProgressLinear/index.js +0 -10
  927. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -70
  928. package/cjs/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -3
  929. package/cjs/core/ProgressIndicators/ProgressRadial/index.js +0 -10
  930. package/esm/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -3
  931. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -41
  932. package/esm/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -3
@@ -1,59 +1,36 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
29
3
  exports.ComboBox = void 0;
4
+ const tslib_1 = require('tslib');
30
5
  /*---------------------------------------------------------------------------------------------
31
6
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
32
7
  * See LICENSE.md in the project root for license terms and full copyright notice.
33
8
  *--------------------------------------------------------------------------------------------*/
34
- const React = __importStar(require("react"));
35
- const index_js_1 = require("../Menu/index.js");
36
- const SelectTag_js_1 = __importDefault(require("../Select/SelectTag.js"));
37
- const index_js_2 = require("../Typography/index.js");
38
- const index_js_3 = require("../utils/index.js");
39
- const helpers_js_1 = require("./helpers.js");
40
- const ComboBoxDropdown_js_1 = require("./ComboBoxDropdown.js");
41
- const ComboBoxEndIcon_js_1 = require("./ComboBoxEndIcon.js");
42
- const ComboBoxInput_js_1 = require("./ComboBoxInput.js");
43
- const ComboBoxInputContainer_js_1 = require("./ComboBoxInputContainer.js");
44
- const ComboBoxMenu_js_1 = require("./ComboBoxMenu.js");
45
- const ComboBoxMenuItem_js_1 = require("./ComboBoxMenuItem.js");
9
+ const React = tslib_1.__importStar(require('react'));
10
+ const index_js_1 = require('../Menu/index.js');
11
+ const SelectTag_js_1 = tslib_1.__importDefault(
12
+ require('../Select/SelectTag.js'),
13
+ );
14
+ const index_js_2 = require('../Typography/index.js');
15
+ const index_js_3 = require('../utils/index.js');
16
+ const helpers_js_1 = require('./helpers.js');
17
+ const ComboBoxDropdown_js_1 = require('./ComboBoxDropdown.js');
18
+ const ComboBoxEndIcon_js_1 = require('./ComboBoxEndIcon.js');
19
+ const ComboBoxInput_js_1 = require('./ComboBoxInput.js');
20
+ const ComboBoxInputContainer_js_1 = require('./ComboBoxInputContainer.js');
21
+ const ComboBoxMenu_js_1 = require('./ComboBoxMenu.js');
22
+ const ComboBoxMenuItem_js_1 = require('./ComboBoxMenuItem.js');
46
23
  // Type guard for enabling multiple
47
24
  const isMultipleEnabled = (variable, multiple) => {
48
- return multiple && (Array.isArray(variable) || variable === undefined);
25
+ return multiple && (Array.isArray(variable) || variable === undefined);
49
26
  };
50
27
  // Type guard for user onChange
51
28
  const isSingleOnChange = (onChange, multiple) => {
52
- return !multiple;
29
+ return !multiple;
53
30
  };
54
31
  /** Returns either `option.id` or derives a stable id using `idPrefix` and `option.label` (without whitespace) */
55
32
  const getOptionId = (option, idPrefix) => {
56
- return option.id ?? `${idPrefix}-option-${option.label.replace(/\s/g, '-')}`;
33
+ return option.id ?? `${idPrefix}-option-${option.label.replace(/\s/g, '-')}`;
57
34
  };
58
35
  /**
59
36
  * ComboBox component that allows typing a value to filter the options in dropdown list.
@@ -69,218 +46,268 @@ const getOptionId = (option, idPrefix) => {
69
46
  * />
70
47
  */
71
48
  const ComboBox = (props) => {
72
- const { options, value: valueProp, onChange, filterFunction, inputProps, dropdownMenuProps, emptyStateMessage = 'No options found', itemRenderer, enableVirtualization = false, multiple = false, onShow, onHide, ...rest } = props;
73
- // Generate a stateful random id if not specified
74
- const [id] = React.useState(() => props.id ??
75
- (inputProps?.id && `${inputProps.id}-cb`) ??
76
- `iui-cb-${(0, index_js_3.getRandomValue)(10)}`);
77
- // Refs get set in subcomponents
78
- const inputRef = React.useRef(null);
79
- const menuRef = React.useRef(null);
80
- const toggleButtonRef = React.useRef(null);
81
- const onChangeProp = (0, index_js_3.useLatestRef)(onChange);
82
- const optionsRef = (0, index_js_3.useLatestRef)(options);
83
- // Record to store all extra information (e.g. original indexes), where the key is the id of the option
84
- const optionsExtraInfoRef = React.useRef({});
85
- // Clear the extra info when the options change so that it can be reinitialized below
86
- React.useEffect(() => {
87
- optionsExtraInfoRef.current = {};
88
- }, [options]);
89
- // Initialize the extra info only if it is not already initialized
90
- if (options.length > 0 &&
91
- Object.keys(optionsExtraInfoRef.current).length === 0) {
92
- options.forEach((option, index) => {
93
- optionsExtraInfoRef.current[getOptionId(option, id)] = {
94
- __originalIndex: index,
95
- };
96
- });
97
- }
98
- // Get indices of selected elements in options array when we have selected values.
99
- const getSelectedIndexes = React.useCallback(() => {
100
- if (isMultipleEnabled(valueProp, multiple)) {
101
- const indexArray = [];
102
- valueProp?.forEach((value) => {
103
- const indexToAdd = options.findIndex((option) => option.value === value);
104
- if (indexToAdd > -1) {
105
- indexArray.push(indexToAdd);
106
- }
107
- });
108
- return indexArray;
109
- }
110
- else {
111
- return options.findIndex((option) => option.value === valueProp);
112
- }
113
- }, [multiple, options, valueProp]);
114
- // Reducer where all the component-wide state is stored
115
- const [{ isOpen, selected, focusedIndex }, dispatch] = React.useReducer(helpers_js_1.comboBoxReducer, {
116
- isOpen: false,
117
- selected: getSelectedIndexes(),
118
- focusedIndex: -1,
49
+ const {
50
+ options,
51
+ value: valueProp,
52
+ onChange,
53
+ filterFunction,
54
+ inputProps,
55
+ dropdownMenuProps,
56
+ emptyStateMessage = 'No options found',
57
+ itemRenderer,
58
+ enableVirtualization = false,
59
+ multiple = false,
60
+ onShow,
61
+ onHide,
62
+ ...rest
63
+ } = props;
64
+ // Generate a stateful random id if not specified
65
+ const [id] = React.useState(
66
+ () =>
67
+ props.id ??
68
+ (inputProps?.id && `${inputProps.id}-cb`) ??
69
+ `iui-cb-${(0, index_js_3.getRandomValue)(10)}`,
70
+ );
71
+ // Refs get set in subcomponents
72
+ const inputRef = React.useRef(null);
73
+ const menuRef = React.useRef(null);
74
+ const toggleButtonRef = React.useRef(null);
75
+ const onChangeProp = (0, index_js_3.useLatestRef)(onChange);
76
+ const optionsRef = (0, index_js_3.useLatestRef)(options);
77
+ // Record to store all extra information (e.g. original indexes), where the key is the id of the option
78
+ const optionsExtraInfoRef = React.useRef({});
79
+ // Clear the extra info when the options change so that it can be reinitialized below
80
+ React.useEffect(() => {
81
+ optionsExtraInfoRef.current = {};
82
+ }, [options]);
83
+ // Initialize the extra info only if it is not already initialized
84
+ if (
85
+ options.length > 0 &&
86
+ Object.keys(optionsExtraInfoRef.current).length === 0
87
+ ) {
88
+ options.forEach((option, index) => {
89
+ optionsExtraInfoRef.current[getOptionId(option, id)] = {
90
+ __originalIndex: index,
91
+ };
119
92
  });
120
- (0, index_js_3.useIsomorphicLayoutEffect)(() => {
121
- // When the dropdown opens
122
- if (isOpen) {
123
- inputRef.current?.focus(); // Focus the input
124
- // Reset the filtered list (does not reset when multiple enabled)
125
- if (!multiple) {
126
- setFilteredOptions(optionsRef.current);
127
- dispatch({ type: 'focus', value: undefined });
128
- }
129
- }
130
- // When the dropdown closes
131
- else {
132
- // Reset the focused index
133
- dispatch({ type: 'focus', value: undefined });
134
- // Reset the input value if not multiple
135
- if (!isMultipleEnabled(selected, multiple)) {
136
- setInputValue(selected != undefined && selected >= 0
137
- ? optionsRef.current[selected]?.label
138
- : '');
139
- }
140
- }
141
- }, [isOpen, multiple, optionsRef, selected]);
142
- // Set min-width of menu to be same as input
143
- const [minWidth, setMinWidth] = React.useState(0);
144
- React.useEffect(() => {
145
- if (inputRef.current) {
146
- setMinWidth(inputRef.current.offsetWidth);
147
- }
148
- }, [isOpen]);
149
- // Update filtered options to the latest value options according to input value
150
- const [filteredOptions, setFilteredOptions] = React.useState(options);
151
- React.useEffect(() => {
152
- if (inputValue) {
153
- setFilteredOptions(filterFunction?.(options, inputValue) ??
154
- options.filter((option) => option.label.toLowerCase().includes(inputValue.toLowerCase())));
155
- }
156
- else {
157
- setFilteredOptions(options);
93
+ }
94
+ // Get indices of selected elements in options array when we have selected values.
95
+ const getSelectedIndexes = React.useCallback(() => {
96
+ if (isMultipleEnabled(valueProp, multiple)) {
97
+ const indexArray = [];
98
+ valueProp?.forEach((value) => {
99
+ const indexToAdd = options.findIndex(
100
+ (option) => option.value === value,
101
+ );
102
+ if (indexToAdd > -1) {
103
+ indexArray.push(indexToAdd);
158
104
  }
105
+ });
106
+ return indexArray;
107
+ } else {
108
+ return options.findIndex((option) => option.value === valueProp);
109
+ }
110
+ }, [multiple, options, valueProp]);
111
+ // Reducer where all the component-wide state is stored
112
+ const [{ isOpen, selected, focusedIndex }, dispatch] = React.useReducer(
113
+ helpers_js_1.comboBoxReducer,
114
+ {
115
+ isOpen: false,
116
+ selected: getSelectedIndexes(),
117
+ focusedIndex: -1,
118
+ },
119
+ );
120
+ (0, index_js_3.useIsomorphicLayoutEffect)(() => {
121
+ // When the dropdown opens
122
+ if (isOpen) {
123
+ inputRef.current?.focus(); // Focus the input
124
+ // Reset the filtered list (does not reset when multiple enabled)
125
+ if (!multiple) {
126
+ setFilteredOptions(optionsRef.current);
159
127
  dispatch({ type: 'focus', value: undefined });
160
- // Only need to call on options update
161
- // eslint-disable-next-line react-hooks/exhaustive-deps
162
- }, [options]);
163
- // Filter options based on input value
164
- const [inputValue, setInputValue] = React.useState(inputProps?.value?.toString() ?? '');
165
- const [liveRegionSelection, setLiveRegionSelection] = React.useState('');
166
- const handleOnInput = React.useCallback((event) => {
167
- const { value } = event.currentTarget;
168
- setInputValue(value);
169
- dispatch({ type: 'open' }); // reopen when typing
170
- setFilteredOptions(filterFunction?.(optionsRef.current, value) ??
171
- optionsRef.current.filter((option) => option.label.toLowerCase().includes(value.toLowerCase())));
172
- if (focusedIndex != -1) {
173
- dispatch({ type: 'focus', value: -1 });
174
- }
175
- inputProps?.onChange?.(event);
176
- }, [filterFunction, focusedIndex, inputProps, optionsRef]);
177
- // When the value prop changes, update the selected index/indices
178
- React.useEffect(() => {
179
- if (isMultipleEnabled(valueProp, multiple)) {
180
- if (valueProp) {
181
- // If user provided array of selected values
182
- const indexes = valueProp.map((value) => {
183
- return options.findIndex((option) => option.value === value);
184
- });
185
- dispatch({
186
- type: 'multiselect',
187
- value: indexes.filter((index) => index !== -1), // Add available options
188
- });
189
- }
190
- else {
191
- // if user provided one value or undefined
192
- dispatch({
193
- type: 'multiselect',
194
- value: [], // Add empty list
195
- });
196
- }
197
- }
198
- else {
199
- dispatch({
200
- type: 'select',
201
- value: options.findIndex((option) => option.value === valueProp),
202
- });
203
- }
204
- }, [valueProp, options, multiple]);
205
- const isMenuItemSelected = React.useCallback((index) => {
206
- if (isMultipleEnabled(selected, multiple)) {
207
- return !!selected.includes(index);
208
- }
209
- else {
210
- return selected === index;
211
- }
212
- }, [multiple, selected]);
213
- // Generates new array when item is added or removed
214
- const selectedChangeHandler = React.useCallback((__originalIndex, action) => {
215
- if (action === 'added') {
216
- return [...selected, __originalIndex];
217
- }
218
- else {
219
- return selected.filter((index) => index !== __originalIndex);
220
- }
221
- }, [selected]);
222
- // Calls user defined onChange
223
- const onChangeHandler = React.useCallback((__originalIndex, actionType, newArray) => {
224
- if (isSingleOnChange(onChangeProp.current, multiple)) {
225
- onChangeProp.current?.(optionsRef.current[__originalIndex]?.value);
226
- }
227
- else {
228
- actionType &&
229
- newArray &&
230
- onChangeProp.current?.(newArray?.map((item) => optionsRef.current[item]?.value), {
231
- value: optionsRef.current[__originalIndex]?.value,
232
- type: actionType,
233
- });
234
- }
235
- }, [multiple, onChangeProp, optionsRef]);
236
- const onClickHandler = React.useCallback((__originalIndex) => {
237
- inputRef.current?.focus({ preventScroll: true }); // return focus to input
238
- if (optionsRef.current[__originalIndex]?.disabled) {
239
- return;
240
- }
241
- if (isMultipleEnabled(selected, multiple)) {
242
- const actionType = isMenuItemSelected(__originalIndex)
243
- ? 'removed'
244
- : 'added';
245
- const newArray = selectedChangeHandler(__originalIndex, actionType);
246
- dispatch({ type: 'multiselect', value: newArray });
247
- onChangeHandler(__originalIndex, actionType, newArray);
248
- // update live region
249
- setLiveRegionSelection(newArray
250
- .map((item) => optionsRef.current[item]?.label)
251
- .filter(Boolean)
252
- .join(', '));
253
- }
254
- else {
255
- dispatch({ type: 'select', value: __originalIndex });
256
- dispatch({ type: 'close' });
257
- onChangeHandler(__originalIndex);
258
- }
259
- }, [
260
- selectedChangeHandler,
261
- isMenuItemSelected,
262
- multiple,
263
- onChangeHandler,
264
- selected,
265
- optionsRef,
266
- ]);
267
- const getMenuItem = React.useCallback((option, filteredIndex) => {
268
- const optionId = getOptionId(option, id);
269
- const { __originalIndex } = optionsExtraInfoRef.current[optionId];
270
- const { icon, startIcon: startIconProp, ...restOptions } = option;
271
- const startIcon = startIconProp ?? icon;
272
- const customItem = itemRenderer
273
- ? itemRenderer(option, {
274
- isFocused: focusedIndex === __originalIndex,
275
- isSelected: selected === __originalIndex,
276
- index: __originalIndex,
277
- id: optionId,
278
- })
279
- : null;
280
- return customItem ? (React.cloneElement(customItem, {
128
+ }
129
+ }
130
+ // When the dropdown closes
131
+ else {
132
+ // Reset the focused index
133
+ dispatch({ type: 'focus', value: undefined });
134
+ // Reset the input value if not multiple
135
+ if (!isMultipleEnabled(selected, multiple)) {
136
+ setInputValue(
137
+ selected != undefined && selected >= 0
138
+ ? optionsRef.current[selected]?.label
139
+ : '',
140
+ );
141
+ }
142
+ }
143
+ }, [isOpen, multiple, optionsRef, selected]);
144
+ // Set min-width of menu to be same as input
145
+ const [minWidth, setMinWidth] = React.useState(0);
146
+ React.useEffect(() => {
147
+ if (inputRef.current) {
148
+ setMinWidth(inputRef.current.offsetWidth);
149
+ }
150
+ }, [isOpen]);
151
+ // Update filtered options to the latest value options according to input value
152
+ const [filteredOptions, setFilteredOptions] = React.useState(options);
153
+ React.useEffect(() => {
154
+ if (inputValue) {
155
+ setFilteredOptions(
156
+ filterFunction?.(options, inputValue) ??
157
+ options.filter((option) =>
158
+ option.label.toLowerCase().includes(inputValue.toLowerCase()),
159
+ ),
160
+ );
161
+ } else {
162
+ setFilteredOptions(options);
163
+ }
164
+ dispatch({ type: 'focus', value: undefined });
165
+ // Only need to call on options update
166
+ // eslint-disable-next-line react-hooks/exhaustive-deps
167
+ }, [options]);
168
+ // Filter options based on input value
169
+ const [inputValue, setInputValue] = React.useState(
170
+ inputProps?.value?.toString() ?? '',
171
+ );
172
+ const [liveRegionSelection, setLiveRegionSelection] = React.useState('');
173
+ const handleOnInput = React.useCallback(
174
+ (event) => {
175
+ const { value } = event.currentTarget;
176
+ setInputValue(value);
177
+ dispatch({ type: 'open' }); // reopen when typing
178
+ setFilteredOptions(
179
+ filterFunction?.(optionsRef.current, value) ??
180
+ optionsRef.current.filter((option) =>
181
+ option.label.toLowerCase().includes(value.toLowerCase()),
182
+ ),
183
+ );
184
+ if (focusedIndex != -1) {
185
+ dispatch({ type: 'focus', value: -1 });
186
+ }
187
+ inputProps?.onChange?.(event);
188
+ },
189
+ [filterFunction, focusedIndex, inputProps, optionsRef],
190
+ );
191
+ // When the value prop changes, update the selected index/indices
192
+ React.useEffect(() => {
193
+ if (isMultipleEnabled(valueProp, multiple)) {
194
+ if (valueProp) {
195
+ // If user provided array of selected values
196
+ const indexes = valueProp.map((value) => {
197
+ return options.findIndex((option) => option.value === value);
198
+ });
199
+ dispatch({
200
+ type: 'multiselect',
201
+ value: indexes.filter((index) => index !== -1), // Add available options
202
+ });
203
+ } else {
204
+ // if user provided one value or undefined
205
+ dispatch({
206
+ type: 'multiselect',
207
+ value: [], // Add empty list
208
+ });
209
+ }
210
+ } else {
211
+ dispatch({
212
+ type: 'select',
213
+ value: options.findIndex((option) => option.value === valueProp),
214
+ });
215
+ }
216
+ }, [valueProp, options, multiple]);
217
+ const isMenuItemSelected = React.useCallback(
218
+ (index) => {
219
+ if (isMultipleEnabled(selected, multiple)) {
220
+ return !!selected.includes(index);
221
+ } else {
222
+ return selected === index;
223
+ }
224
+ },
225
+ [multiple, selected],
226
+ );
227
+ // Generates new array when item is added or removed
228
+ const selectedChangeHandler = React.useCallback(
229
+ (__originalIndex, action) => {
230
+ if (action === 'added') {
231
+ return [...selected, __originalIndex];
232
+ } else {
233
+ return selected.filter((index) => index !== __originalIndex);
234
+ }
235
+ },
236
+ [selected],
237
+ );
238
+ // Calls user defined onChange
239
+ const onChangeHandler = React.useCallback(
240
+ (__originalIndex, actionType, newArray) => {
241
+ if (isSingleOnChange(onChangeProp.current, multiple)) {
242
+ onChangeProp.current?.(optionsRef.current[__originalIndex]?.value);
243
+ } else {
244
+ actionType &&
245
+ newArray &&
246
+ onChangeProp.current?.(
247
+ newArray?.map((item) => optionsRef.current[item]?.value),
248
+ {
249
+ value: optionsRef.current[__originalIndex]?.value,
250
+ type: actionType,
251
+ },
252
+ );
253
+ }
254
+ },
255
+ [multiple, onChangeProp, optionsRef],
256
+ );
257
+ const onClickHandler = React.useCallback(
258
+ (__originalIndex) => {
259
+ inputRef.current?.focus({ preventScroll: true }); // return focus to input
260
+ if (optionsRef.current[__originalIndex]?.disabled) {
261
+ return;
262
+ }
263
+ if (isMultipleEnabled(selected, multiple)) {
264
+ const actionType = isMenuItemSelected(__originalIndex)
265
+ ? 'removed'
266
+ : 'added';
267
+ const newArray = selectedChangeHandler(__originalIndex, actionType);
268
+ dispatch({ type: 'multiselect', value: newArray });
269
+ onChangeHandler(__originalIndex, actionType, newArray);
270
+ // update live region
271
+ setLiveRegionSelection(
272
+ newArray
273
+ .map((item) => optionsRef.current[item]?.label)
274
+ .filter(Boolean)
275
+ .join(', '),
276
+ );
277
+ } else {
278
+ dispatch({ type: 'select', value: __originalIndex });
279
+ dispatch({ type: 'close' });
280
+ onChangeHandler(__originalIndex);
281
+ }
282
+ },
283
+ [
284
+ selectedChangeHandler,
285
+ isMenuItemSelected,
286
+ multiple,
287
+ onChangeHandler,
288
+ selected,
289
+ optionsRef,
290
+ ],
291
+ );
292
+ const getMenuItem = React.useCallback(
293
+ (option, filteredIndex) => {
294
+ const optionId = getOptionId(option, id);
295
+ const { __originalIndex } = optionsExtraInfoRef.current[optionId];
296
+ const { icon, startIcon: startIconProp, ...restOptions } = option;
297
+ const startIcon = startIconProp ?? icon;
298
+ const customItem = itemRenderer
299
+ ? itemRenderer(option, {
300
+ isFocused: focusedIndex === __originalIndex,
301
+ isSelected: selected === __originalIndex,
302
+ index: __originalIndex,
303
+ id: optionId,
304
+ })
305
+ : null;
306
+ return customItem
307
+ ? React.cloneElement(customItem, {
281
308
  onClick: (e) => {
282
- onClickHandler(__originalIndex);
283
- customItem.props.onClick?.(e);
309
+ onClickHandler(__originalIndex);
310
+ customItem.props.onClick?.(e);
284
311
  },
285
312
  // ComboBox.MenuItem handles scrollIntoView, data-iui-index and focused through context
286
313
  // but we still need to pass them here for backwards compatibility with MenuItem
@@ -288,51 +315,123 @@ const ComboBox = (props) => {
288
315
  'data-iui-index': __originalIndex,
289
316
  'data-iui-filtered-index': filteredIndex,
290
317
  ref: (0, index_js_3.mergeRefs)(customItem.props.ref, (el) => {
291
- if (!enableVirtualization && focusedIndex === __originalIndex) {
292
- el?.scrollIntoView({ block: 'nearest' });
293
- }
318
+ if (!enableVirtualization && focusedIndex === __originalIndex) {
319
+ el?.scrollIntoView({ block: 'nearest' });
320
+ }
294
321
  }),
295
- })) : (React.createElement(ComboBoxMenuItem_js_1.ComboBoxMenuItem, { key: optionId, id: optionId, startIcon: startIcon, ...restOptions, isSelected: isMenuItemSelected(__originalIndex), onClick: () => {
322
+ })
323
+ : React.createElement(
324
+ ComboBoxMenuItem_js_1.ComboBoxMenuItem,
325
+ {
326
+ key: optionId,
327
+ id: optionId,
328
+ startIcon: startIcon,
329
+ ...restOptions,
330
+ isSelected: isMenuItemSelected(__originalIndex),
331
+ onClick: () => {
296
332
  onClickHandler(__originalIndex);
297
- }, index: __originalIndex, "data-iui-filtered-index": filteredIndex }, option.label));
298
- }, [
299
- enableVirtualization,
300
- focusedIndex,
301
- id,
302
- isMenuItemSelected,
303
- itemRenderer,
304
- onClickHandler,
305
- selected,
306
- ]);
307
- const emptyContent = React.useMemo(() => (React.createElement(React.Fragment, null, React.isValidElement(emptyStateMessage) ? (emptyStateMessage) : (React.createElement(index_js_1.MenuExtraContent, null,
308
- React.createElement(index_js_2.Text, { isMuted: true }, emptyStateMessage))))), [emptyStateMessage]);
309
- return (React.createElement(helpers_js_1.ComboBoxRefsContext.Provider, { value: { inputRef, menuRef, toggleButtonRef, optionsExtraInfoRef } },
310
- React.createElement(helpers_js_1.ComboBoxActionContext.Provider, { value: dispatch },
311
- React.createElement(helpers_js_1.ComboBoxStateContext.Provider, { value: {
312
- id,
313
- minWidth,
314
- isOpen,
315
- focusedIndex,
316
- onClickHandler,
317
- enableVirtualization,
318
- filteredOptions,
319
- getMenuItem,
320
- multiple,
321
- } },
322
- React.createElement(ComboBoxInputContainer_js_1.ComboBoxInputContainer, { disabled: inputProps?.disabled, ...rest },
323
- React.createElement(React.Fragment, null,
324
- React.createElement(ComboBoxInput_js_1.ComboBoxInput, { value: inputValue, ...inputProps, onChange: handleOnInput, selectTags: isMultipleEnabled(selected, multiple)
325
- ? selected.map((index) => {
326
- const item = optionsRef.current[index];
327
- return (React.createElement(SelectTag_js_1.default, { key: item.label, label: item.label }));
328
- })
329
- : undefined })),
330
- React.createElement(ComboBoxEndIcon_js_1.ComboBoxEndIcon, { disabled: inputProps?.disabled, isOpen: isOpen }),
331
- multiple ? (React.createElement(index_js_3.AutoclearingHiddenLiveRegion, { text: liveRegionSelection })) : null),
332
- React.createElement(ComboBoxDropdown_js_1.ComboBoxDropdown, { ...dropdownMenuProps, onShow: onShow, onHide: onHide },
333
- React.createElement(ComboBoxMenu_js_1.ComboBoxMenu, null, filteredOptions.length > 0 && !enableVirtualization
334
- ? filteredOptions.map(getMenuItem)
335
- : emptyContent))))));
333
+ },
334
+ index: __originalIndex,
335
+ 'data-iui-filtered-index': filteredIndex,
336
+ },
337
+ option.label,
338
+ );
339
+ },
340
+ [
341
+ enableVirtualization,
342
+ focusedIndex,
343
+ id,
344
+ isMenuItemSelected,
345
+ itemRenderer,
346
+ onClickHandler,
347
+ selected,
348
+ ],
349
+ );
350
+ const emptyContent = React.useMemo(
351
+ () =>
352
+ React.createElement(
353
+ React.Fragment,
354
+ null,
355
+ React.isValidElement(emptyStateMessage)
356
+ ? emptyStateMessage
357
+ : React.createElement(
358
+ index_js_1.MenuExtraContent,
359
+ null,
360
+ React.createElement(
361
+ index_js_2.Text,
362
+ { isMuted: true },
363
+ emptyStateMessage,
364
+ ),
365
+ ),
366
+ ),
367
+ [emptyStateMessage],
368
+ );
369
+ return React.createElement(
370
+ helpers_js_1.ComboBoxRefsContext.Provider,
371
+ { value: { inputRef, menuRef, toggleButtonRef, optionsExtraInfoRef } },
372
+ React.createElement(
373
+ helpers_js_1.ComboBoxActionContext.Provider,
374
+ { value: dispatch },
375
+ React.createElement(
376
+ helpers_js_1.ComboBoxStateContext.Provider,
377
+ {
378
+ value: {
379
+ id,
380
+ minWidth,
381
+ isOpen,
382
+ focusedIndex,
383
+ onClickHandler,
384
+ enableVirtualization,
385
+ filteredOptions,
386
+ getMenuItem,
387
+ multiple,
388
+ },
389
+ },
390
+ React.createElement(
391
+ ComboBoxInputContainer_js_1.ComboBoxInputContainer,
392
+ { disabled: inputProps?.disabled, ...rest },
393
+ React.createElement(
394
+ React.Fragment,
395
+ null,
396
+ React.createElement(ComboBoxInput_js_1.ComboBoxInput, {
397
+ value: inputValue,
398
+ ...inputProps,
399
+ onChange: handleOnInput,
400
+ selectTags: isMultipleEnabled(selected, multiple)
401
+ ? selected.map((index) => {
402
+ const item = optionsRef.current[index];
403
+ return React.createElement(SelectTag_js_1.default, {
404
+ key: item.label,
405
+ label: item.label,
406
+ });
407
+ })
408
+ : undefined,
409
+ }),
410
+ ),
411
+ React.createElement(ComboBoxEndIcon_js_1.ComboBoxEndIcon, {
412
+ disabled: inputProps?.disabled,
413
+ isOpen: isOpen,
414
+ }),
415
+ multiple
416
+ ? React.createElement(index_js_3.AutoclearingHiddenLiveRegion, {
417
+ text: liveRegionSelection,
418
+ })
419
+ : null,
420
+ ),
421
+ React.createElement(
422
+ ComboBoxDropdown_js_1.ComboBoxDropdown,
423
+ { ...dropdownMenuProps, onShow: onShow, onHide: onHide },
424
+ React.createElement(
425
+ ComboBoxMenu_js_1.ComboBoxMenu,
426
+ null,
427
+ filteredOptions.length > 0 && !enableVirtualization
428
+ ? filteredOptions.map(getMenuItem)
429
+ : emptyContent,
430
+ ),
431
+ ),
432
+ ),
433
+ ),
434
+ );
336
435
  };
337
436
  exports.ComboBox = ComboBox;
338
437
  exports.default = exports.ComboBox;