@itwin/itwinui-react 2.0.0-dev.2 → 2.0.0-dev.4

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 (474) hide show
  1. package/README.md +10 -1
  2. package/cjs/core/Alert/Alert.js +8 -30
  3. package/cjs/core/Avatar/Avatar.js +10 -33
  4. package/cjs/core/AvatarGroup/AvatarGroup.js +18 -43
  5. package/cjs/core/Backdrop/Backdrop.js +6 -28
  6. package/cjs/core/Badge/Badge.js +13 -31
  7. package/cjs/core/Breadcrumbs/Breadcrumbs.js +14 -40
  8. package/cjs/core/ButtonGroup/ButtonGroup.js +10 -32
  9. package/cjs/core/Buttons/Button/Button.js +6 -28
  10. package/cjs/core/Buttons/DropdownButton/DropdownButton.js +14 -36
  11. package/cjs/core/Buttons/IconButton/IconButton.js +6 -28
  12. package/cjs/core/Buttons/IdeasButton/IdeasButton.js +6 -28
  13. package/cjs/core/Buttons/SplitButton/SplitButton.js +14 -36
  14. package/cjs/core/Carousel/Carousel.js +38 -63
  15. package/cjs/core/Carousel/CarouselContext.js +1 -1
  16. package/cjs/core/Carousel/CarouselDot.js +6 -28
  17. package/cjs/core/Carousel/CarouselDotsList.js +33 -60
  18. package/cjs/core/Carousel/CarouselNavigation.js +22 -44
  19. package/cjs/core/Carousel/CarouselSlide.js +12 -34
  20. package/cjs/core/Carousel/CarouselSlider.js +26 -51
  21. package/cjs/core/Checkbox/Checkbox.js +18 -42
  22. package/cjs/core/ColorPicker/ColorBuilder.js +51 -73
  23. package/cjs/core/ColorPicker/ColorInputPanel.js +64 -88
  24. package/cjs/core/ColorPicker/ColorPalette.js +26 -50
  25. package/cjs/core/ColorPicker/ColorPicker.js +25 -49
  26. package/cjs/core/ColorPicker/ColorPickerContext.js +3 -3
  27. package/cjs/core/ColorPicker/ColorSwatch.js +13 -34
  28. package/cjs/core/ComboBox/ComboBox.js +67 -93
  29. package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
  30. package/cjs/core/ComboBox/ComboBoxDropdown.js +13 -36
  31. package/cjs/core/ComboBox/ComboBoxEndIcon.js +12 -34
  32. package/cjs/core/ComboBox/ComboBoxInput.js +28 -50
  33. package/cjs/core/ComboBox/ComboBoxInputContainer.js +9 -31
  34. package/cjs/core/ComboBox/ComboBoxMenu.js +35 -60
  35. package/cjs/core/ComboBox/ComboBoxMenuItem.js +11 -33
  36. package/cjs/core/ComboBox/helpers.js +11 -19
  37. package/cjs/core/DatePicker/DatePicker.js +87 -111
  38. package/cjs/core/Dialog/Dialog.js +28 -48
  39. package/cjs/core/Dialog/DialogBackdrop.js +16 -35
  40. package/cjs/core/Dialog/DialogButtonBar.js +6 -28
  41. package/cjs/core/Dialog/DialogContent.js +6 -28
  42. package/cjs/core/Dialog/DialogContext.js +2 -2
  43. package/cjs/core/Dialog/DialogDragContext.js +6 -15
  44. package/cjs/core/Dialog/DialogMain.js +52 -59
  45. package/cjs/core/Dialog/DialogTitleBar.js +14 -36
  46. package/cjs/core/Dialog/DialogTitleBarTitle.js +6 -28
  47. package/cjs/core/DropdownMenu/DropdownMenu.js +14 -36
  48. package/cjs/core/ExpandableBlock/ExpandableBlock.js +12 -34
  49. package/cjs/core/Fieldset/Fieldset.js +9 -33
  50. package/cjs/core/FileUpload/FileUpload.js +13 -35
  51. package/cjs/core/FileUpload/FileUploadTemplate.js +4 -4
  52. package/cjs/core/Footer/Footer.js +21 -49
  53. package/cjs/core/Footer/FooterItem.js +6 -28
  54. package/cjs/core/Footer/FooterList.js +6 -28
  55. package/cjs/core/Footer/FooterSeparator.js +6 -28
  56. package/cjs/core/Header/Header.js +10 -32
  57. package/cjs/core/Header/HeaderBasicButton.js +6 -28
  58. package/cjs/core/Header/HeaderBreadcrumbs.js +9 -39
  59. package/cjs/core/Header/HeaderButton.js +22 -36
  60. package/cjs/core/Header/HeaderDropdownButton.js +14 -36
  61. package/cjs/core/Header/HeaderLogo.js +7 -29
  62. package/cjs/core/Header/HeaderSplitButton.js +13 -35
  63. package/cjs/core/InformationPanel/InformationPanel.js +15 -37
  64. package/cjs/core/InformationPanel/InformationPanelBody.js +6 -28
  65. package/cjs/core/InformationPanel/InformationPanelContent.js +6 -28
  66. package/cjs/core/InformationPanel/InformationPanelHeader.js +7 -29
  67. package/cjs/core/InformationPanel/InformationPanelWrapper.js +6 -28
  68. package/cjs/core/Input/Input.js +9 -31
  69. package/cjs/core/InputGroup/InputGroup.js +6 -28
  70. package/cjs/core/Label/Label.js +7 -29
  71. package/cjs/core/LabeledInput/LabeledInput.js +7 -29
  72. package/cjs/core/LabeledSelect/LabeledSelect.js +7 -29
  73. package/cjs/core/LabeledTextarea/LabeledTextarea.js +7 -29
  74. package/cjs/core/Menu/Menu.js +18 -40
  75. package/cjs/core/Menu/MenuDivider.js +6 -28
  76. package/cjs/core/Menu/MenuExtraContent.js +6 -28
  77. package/cjs/core/Menu/MenuItem.js +17 -39
  78. package/cjs/core/Menu/MenuItemSkeleton.js +11 -30
  79. package/cjs/core/Modal/Modal.js +12 -30
  80. package/cjs/core/Modal/ModalButtonBar.js +1 -1
  81. package/cjs/core/Modal/ModalContent.js +1 -1
  82. package/cjs/core/{ErrorPage → NonIdealState}/ErrorPage.d.ts +5 -1
  83. package/cjs/core/NonIdealState/ErrorPage.js +144 -0
  84. package/cjs/core/NonIdealState/NonIdealState.d.ts +46 -0
  85. package/cjs/core/NonIdealState/NonIdealState.js +32 -0
  86. package/{esm/core/ErrorPage → cjs/core/NonIdealState}/index.d.ts +3 -1
  87. package/cjs/core/{ErrorPage → NonIdealState}/index.js +4 -2
  88. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +11 -34
  89. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +13 -37
  90. package/cjs/core/Radio/Radio.js +10 -33
  91. package/cjs/core/RadioTiles/RadioTile.js +9 -31
  92. package/cjs/core/RadioTiles/RadioTileGroup.js +6 -28
  93. package/cjs/core/Select/Select.js +59 -72
  94. package/cjs/core/Select/SelectTag.js +6 -28
  95. package/cjs/core/SideNavigation/SideNavigation.js +14 -40
  96. package/cjs/core/SideNavigation/SidenavButton.js +8 -30
  97. package/cjs/core/SideNavigation/SidenavSubmenu.js +6 -28
  98. package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +6 -28
  99. package/cjs/core/SkipToContentLink/SkipToContentLink.js +6 -28
  100. package/cjs/core/Slider/Slider.js +68 -96
  101. package/cjs/core/Slider/Thumb.js +20 -39
  102. package/cjs/core/Slider/Track.js +24 -44
  103. package/cjs/core/StatusMessage/StatusMessage.js +6 -7
  104. package/cjs/core/Stepper/Stepper.js +10 -34
  105. package/cjs/core/Stepper/StepperStep.js +15 -34
  106. package/cjs/core/Stepper/Wizard.js +6 -28
  107. package/cjs/core/Stepper/WorkflowDiagram.js +6 -28
  108. package/cjs/core/Stepper/WorkflowDiagramStep.js +6 -28
  109. package/cjs/core/Surface/Surface.js +11 -30
  110. package/cjs/core/Table/SubRowExpander.js +6 -6
  111. package/cjs/core/Table/Table.d.ts +19 -24
  112. package/cjs/core/Table/Table.js +189 -195
  113. package/cjs/core/Table/TableCell.js +29 -30
  114. package/cjs/core/Table/TablePaginator.js +52 -83
  115. package/cjs/core/Table/TableRowMemoized.d.ts +6 -10
  116. package/cjs/core/Table/TableRowMemoized.js +36 -60
  117. package/cjs/core/Table/actionHandlers/expandHandler.js +3 -3
  118. package/cjs/core/Table/actionHandlers/filterHandler.js +4 -4
  119. package/cjs/core/Table/actionHandlers/resizeHandler.js +13 -15
  120. package/cjs/core/Table/actionHandlers/selectHandler.js +35 -40
  121. package/cjs/core/Table/cells/DefaultCell.js +5 -27
  122. package/cjs/core/Table/cells/EditableCell.js +16 -40
  123. package/cjs/core/Table/columns/actionColumn.js +44 -62
  124. package/cjs/core/Table/columns/expanderColumn.d.ts +2 -5
  125. package/cjs/core/Table/columns/expanderColumn.js +12 -27
  126. package/cjs/core/Table/columns/selectionColumn.d.ts +2 -5
  127. package/cjs/core/Table/columns/selectionColumn.js +16 -37
  128. package/cjs/core/Table/filters/BaseFilter.js +6 -6
  129. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +19 -41
  130. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +20 -31
  131. package/cjs/core/Table/filters/FilterButtonBar.js +8 -19
  132. package/cjs/core/Table/filters/FilterToggle.js +15 -37
  133. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +16 -29
  134. package/cjs/core/Table/filters/TextFilter/TextFilter.js +11 -11
  135. package/cjs/core/Table/filters/customFilterFunctions.js +11 -13
  136. package/cjs/core/Table/filters/defaultFilterFunctions.js +62 -64
  137. package/cjs/core/Table/filters/tableFilters.js +7 -18
  138. package/cjs/core/Table/hooks/useColumnDragAndDrop.js +41 -53
  139. package/cjs/core/Table/hooks/useExpanderCell.js +17 -33
  140. package/cjs/core/Table/hooks/useResizeColumns.js +197 -205
  141. package/cjs/core/Table/hooks/useScrollToRow.js +11 -12
  142. package/cjs/core/Table/hooks/useSelectionCell.js +7 -18
  143. package/cjs/core/Table/hooks/useStickyColumns.js +28 -33
  144. package/cjs/core/Table/hooks/useSubRowFiltering.js +37 -57
  145. package/cjs/core/Table/hooks/useSubRowSelection.js +10 -12
  146. package/cjs/core/Table/utils.js +15 -26
  147. package/cjs/core/Tabs/Tab.js +6 -28
  148. package/cjs/core/Tabs/Tabs.js +45 -67
  149. package/cjs/core/Tag/Tag.js +8 -30
  150. package/cjs/core/Tag/TagContainer.js +9 -32
  151. package/cjs/core/Textarea/Textarea.js +9 -31
  152. package/cjs/core/ThemeProvider/ThemeProvider.d.ts +1 -0
  153. package/cjs/core/ThemeProvider/ThemeProvider.js +16 -37
  154. package/cjs/core/Tile/Tile.js +29 -58
  155. package/cjs/core/TimePicker/TimePicker.js +59 -97
  156. package/cjs/core/Toast/Toast.js +45 -65
  157. package/cjs/core/Toast/ToastWrapper.js +13 -24
  158. package/cjs/core/Toast/Toaster.js +87 -137
  159. package/cjs/core/Toast/index.js +2 -2
  160. package/cjs/core/ToggleSwitch/ToggleSwitch.js +10 -32
  161. package/cjs/core/Tooltip/Tooltip.js +6 -28
  162. package/cjs/core/Tree/Tree.js +58 -80
  163. package/cjs/core/Tree/TreeContext.js +3 -3
  164. package/cjs/core/Tree/TreeNode.js +21 -43
  165. package/cjs/core/Tree/TreeNodeExpander.js +7 -29
  166. package/cjs/core/Typography/Anchor/Anchor.js +5 -28
  167. package/cjs/core/Typography/Blockquote/Blockquote.js +6 -28
  168. package/cjs/core/Typography/Body/Body.js +7 -29
  169. package/cjs/core/Typography/Code/Code.js +6 -28
  170. package/cjs/core/Typography/Headline/Headline.js +6 -28
  171. package/cjs/core/Typography/Kbd/Kbd.js +6 -28
  172. package/cjs/core/Typography/Leading/Leading.js +6 -28
  173. package/cjs/core/Typography/Small/Small.js +6 -28
  174. package/cjs/core/Typography/Subheading/Subheading.js +6 -28
  175. package/cjs/core/Typography/Text/Text.js +11 -34
  176. package/cjs/core/Typography/Title/Title.js +6 -28
  177. package/cjs/core/index.d.ts +2 -2
  178. package/cjs/core/index.js +6 -5
  179. package/cjs/core/utils/color/ColorValue.js +146 -156
  180. package/cjs/core/utils/components/FocusTrap.js +14 -14
  181. package/cjs/core/utils/components/InputContainer.js +12 -36
  182. package/cjs/core/utils/components/MiddleTextTruncation.js +15 -31
  183. package/cjs/core/utils/components/Popover.d.ts +1 -1
  184. package/cjs/core/utils/components/Popover.js +57 -60
  185. package/cjs/core/utils/components/Resizer.js +51 -51
  186. package/cjs/core/utils/components/VirtualScroll.js +72 -89
  187. package/cjs/core/utils/components/VisuallyHidden.js +6 -28
  188. package/cjs/core/utils/components/WithCSSTransition.d.ts +2 -2
  189. package/cjs/core/utils/components/WithCSSTransition.js +18 -40
  190. package/cjs/core/utils/functions/colors.js +7 -7
  191. package/cjs/core/utils/functions/dom.js +7 -8
  192. package/cjs/core/utils/functions/focusable.js +11 -15
  193. package/cjs/core/utils/functions/numbers.js +5 -6
  194. package/cjs/core/utils/functions/styles.js +3 -3
  195. package/cjs/core/utils/hooks/useContainerWidth.js +9 -13
  196. package/cjs/core/utils/hooks/useDragAndDrop.js +32 -33
  197. package/cjs/core/utils/hooks/useEventListener.js +7 -7
  198. package/cjs/core/utils/hooks/useIntersection.js +9 -12
  199. package/cjs/core/utils/hooks/useIsomorphicLayoutEffect.js +1 -1
  200. package/cjs/core/utils/hooks/useLatestRef.js +4 -4
  201. package/cjs/core/utils/hooks/useMediaQuery.js +9 -12
  202. package/cjs/core/utils/hooks/useMergedRefs.js +6 -23
  203. package/cjs/core/utils/hooks/useOverflow.js +26 -33
  204. package/cjs/core/utils/hooks/useResizeObserver.js +6 -9
  205. package/cjs/core/utils/hooks/useSafeContext.js +4 -4
  206. package/cjs/core/utils/hooks/useTheme.js +18 -20
  207. package/cjs/core/utils/icons/StatusIconMap.js +9 -20
  208. package/cjs/core/utils/icons/SvgCalendar.js +3 -14
  209. package/cjs/core/utils/icons/SvgCaretDownSmall.js +3 -14
  210. package/cjs/core/utils/icons/SvgCaretRightSmall.js +3 -14
  211. package/cjs/core/utils/icons/SvgCaretUpSmall.js +3 -14
  212. package/cjs/core/utils/icons/SvgCheckmark.js +3 -14
  213. package/cjs/core/utils/icons/SvgCheckmarkSmall.js +3 -14
  214. package/cjs/core/utils/icons/SvgChevronLeft.js +3 -14
  215. package/cjs/core/utils/icons/SvgChevronLeftDouble.js +3 -14
  216. package/cjs/core/utils/icons/SvgChevronRight.js +3 -14
  217. package/cjs/core/utils/icons/SvgChevronRightDouble.js +3 -14
  218. package/cjs/core/utils/icons/SvgClose.js +3 -14
  219. package/cjs/core/utils/icons/SvgCloseSmall.js +3 -14
  220. package/cjs/core/utils/icons/SvgColumnManager.js +3 -14
  221. package/cjs/core/utils/icons/SvgFilter.js +3 -14
  222. package/cjs/core/utils/icons/SvgFilterHollow.js +3 -14
  223. package/cjs/core/utils/icons/SvgImportantSmall.js +3 -14
  224. package/cjs/core/utils/icons/SvgInfoCircular.js +3 -14
  225. package/cjs/core/utils/icons/SvgMore.js +3 -14
  226. package/cjs/core/utils/icons/SvgMoreVertical.js +3 -14
  227. package/cjs/core/utils/icons/SvgNew.js +3 -14
  228. package/cjs/core/utils/icons/SvgSmileyHappy.js +3 -14
  229. package/cjs/core/utils/icons/SvgSortDown.js +3 -14
  230. package/cjs/core/utils/icons/SvgSortUp.js +3 -14
  231. package/cjs/core/utils/icons/SvgStatusError.js +3 -14
  232. package/cjs/core/utils/icons/SvgStatusSuccess.js +3 -14
  233. package/cjs/core/utils/icons/SvgStatusWarning.js +3 -14
  234. package/cjs/core/utils/icons/SvgSwap.js +3 -14
  235. package/cjs/core/utils/icons/SvgUpload.js +3 -14
  236. package/cjs/types/react-table-config.d.ts +6 -2
  237. package/esm/core/Alert/Alert.js +5 -27
  238. package/esm/core/Avatar/Avatar.js +9 -32
  239. package/esm/core/AvatarGroup/AvatarGroup.js +16 -41
  240. package/esm/core/Backdrop/Backdrop.js +3 -25
  241. package/esm/core/Badge/Badge.js +10 -28
  242. package/esm/core/Breadcrumbs/Breadcrumbs.js +11 -37
  243. package/esm/core/ButtonGroup/ButtonGroup.js +7 -29
  244. package/esm/core/Buttons/Button/Button.js +3 -25
  245. package/esm/core/Buttons/DropdownButton/DropdownButton.js +9 -31
  246. package/esm/core/Buttons/IconButton/IconButton.js +3 -25
  247. package/esm/core/Buttons/IdeasButton/IdeasButton.js +3 -25
  248. package/esm/core/Buttons/SplitButton/SplitButton.js +8 -30
  249. package/esm/core/Carousel/Carousel.js +29 -54
  250. package/esm/core/Carousel/CarouselContext.js +1 -1
  251. package/esm/core/Carousel/CarouselDot.js +4 -26
  252. package/esm/core/Carousel/CarouselDotsList.js +28 -55
  253. package/esm/core/Carousel/CarouselNavigation.js +16 -38
  254. package/esm/core/Carousel/CarouselSlide.js +8 -30
  255. package/esm/core/Carousel/CarouselSlider.js +22 -47
  256. package/esm/core/Checkbox/Checkbox.js +14 -38
  257. package/esm/core/ColorPicker/ColorBuilder.js +46 -68
  258. package/esm/core/ColorPicker/ColorInputPanel.js +58 -82
  259. package/esm/core/ColorPicker/ColorPalette.js +20 -44
  260. package/esm/core/ColorPicker/ColorPicker.js +21 -45
  261. package/esm/core/ColorPicker/ColorPickerContext.js +3 -3
  262. package/esm/core/ColorPicker/ColorSwatch.js +9 -30
  263. package/esm/core/ComboBox/ComboBox.js +55 -81
  264. package/esm/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
  265. package/esm/core/ComboBox/ComboBoxDropdown.js +10 -33
  266. package/esm/core/ComboBox/ComboBoxEndIcon.js +8 -30
  267. package/esm/core/ComboBox/ComboBoxInput.js +24 -46
  268. package/esm/core/ComboBox/ComboBoxInputContainer.js +5 -27
  269. package/esm/core/ComboBox/ComboBoxMenu.js +29 -54
  270. package/esm/core/ComboBox/ComboBoxMenuItem.js +7 -29
  271. package/esm/core/ComboBox/helpers.js +13 -21
  272. package/esm/core/DatePicker/DatePicker.js +82 -106
  273. package/esm/core/Dialog/Dialog.js +19 -39
  274. package/esm/core/Dialog/DialogBackdrop.js +11 -30
  275. package/esm/core/Dialog/DialogButtonBar.js +3 -25
  276. package/esm/core/Dialog/DialogContent.js +3 -25
  277. package/esm/core/Dialog/DialogContext.js +2 -2
  278. package/esm/core/Dialog/DialogDragContext.js +6 -15
  279. package/esm/core/Dialog/DialogMain.js +45 -52
  280. package/esm/core/Dialog/DialogTitleBar.js +7 -29
  281. package/esm/core/Dialog/DialogTitleBarTitle.js +3 -25
  282. package/esm/core/DropdownMenu/DropdownMenu.js +11 -33
  283. package/esm/core/ExpandableBlock/ExpandableBlock.js +9 -31
  284. package/esm/core/Fieldset/Fieldset.js +6 -30
  285. package/esm/core/FileUpload/FileUpload.js +10 -32
  286. package/esm/core/FileUpload/FileUploadTemplate.js +2 -2
  287. package/esm/core/Footer/Footer.js +16 -44
  288. package/esm/core/Footer/FooterItem.js +3 -25
  289. package/esm/core/Footer/FooterList.js +3 -25
  290. package/esm/core/Footer/FooterSeparator.js +3 -25
  291. package/esm/core/Header/Header.js +5 -27
  292. package/esm/core/Header/HeaderBasicButton.js +3 -25
  293. package/esm/core/Header/HeaderBreadcrumbs.js +7 -37
  294. package/esm/core/Header/HeaderButton.js +16 -30
  295. package/esm/core/Header/HeaderDropdownButton.js +9 -31
  296. package/esm/core/Header/HeaderLogo.js +4 -26
  297. package/esm/core/Header/HeaderSplitButton.js +8 -30
  298. package/esm/core/InformationPanel/InformationPanel.js +12 -34
  299. package/esm/core/InformationPanel/InformationPanelBody.js +3 -25
  300. package/esm/core/InformationPanel/InformationPanelContent.js +3 -25
  301. package/esm/core/InformationPanel/InformationPanelHeader.js +3 -25
  302. package/esm/core/InformationPanel/InformationPanelWrapper.js +3 -25
  303. package/esm/core/Input/Input.js +6 -28
  304. package/esm/core/InputGroup/InputGroup.js +4 -26
  305. package/esm/core/Label/Label.js +4 -26
  306. package/esm/core/LabeledInput/LabeledInput.js +4 -26
  307. package/esm/core/LabeledSelect/LabeledSelect.js +4 -26
  308. package/esm/core/LabeledTextarea/LabeledTextarea.js +4 -26
  309. package/esm/core/Menu/Menu.js +15 -37
  310. package/esm/core/Menu/MenuDivider.js +3 -25
  311. package/esm/core/Menu/MenuExtraContent.js +3 -25
  312. package/esm/core/Menu/MenuItem.js +13 -35
  313. package/esm/core/Menu/MenuItemSkeleton.js +8 -27
  314. package/esm/core/Modal/Modal.js +8 -26
  315. package/esm/core/Modal/ModalButtonBar.js +1 -1
  316. package/esm/core/Modal/ModalContent.js +1 -1
  317. package/esm/core/{ErrorPage → NonIdealState}/ErrorPage.d.ts +5 -1
  318. package/esm/core/NonIdealState/ErrorPage.js +137 -0
  319. package/esm/core/NonIdealState/NonIdealState.d.ts +46 -0
  320. package/esm/core/NonIdealState/NonIdealState.js +25 -0
  321. package/{cjs/core/ErrorPage → esm/core/NonIdealState}/index.d.ts +3 -1
  322. package/esm/core/{ErrorPage → NonIdealState}/index.js +2 -1
  323. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +8 -31
  324. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +10 -34
  325. package/esm/core/Radio/Radio.js +7 -30
  326. package/esm/core/RadioTiles/RadioTile.js +6 -28
  327. package/esm/core/RadioTiles/RadioTileGroup.js +3 -25
  328. package/esm/core/Select/Select.js +53 -66
  329. package/esm/core/Select/SelectTag.js +3 -25
  330. package/esm/core/SideNavigation/SideNavigation.js +9 -35
  331. package/esm/core/SideNavigation/SidenavButton.js +4 -26
  332. package/esm/core/SideNavigation/SidenavSubmenu.js +3 -25
  333. package/esm/core/SideNavigation/SidenavSubmenuHeader.js +3 -25
  334. package/esm/core/SkipToContentLink/SkipToContentLink.js +3 -25
  335. package/esm/core/Slider/Slider.js +63 -91
  336. package/esm/core/Slider/Thumb.js +17 -36
  337. package/esm/core/Slider/Track.js +23 -43
  338. package/esm/core/StatusMessage/StatusMessage.js +3 -4
  339. package/esm/core/Stepper/Stepper.js +7 -31
  340. package/esm/core/Stepper/StepperStep.js +12 -31
  341. package/esm/core/Stepper/Wizard.js +3 -25
  342. package/esm/core/Stepper/WorkflowDiagram.js +3 -25
  343. package/esm/core/Stepper/WorkflowDiagramStep.js +3 -25
  344. package/esm/core/Surface/Surface.js +8 -27
  345. package/esm/core/Table/SubRowExpander.js +3 -3
  346. package/esm/core/Table/Table.d.ts +19 -24
  347. package/esm/core/Table/Table.js +177 -183
  348. package/esm/core/Table/TableCell.js +23 -24
  349. package/esm/core/Table/TablePaginator.js +46 -77
  350. package/esm/core/Table/TableRowMemoized.d.ts +6 -10
  351. package/esm/core/Table/TableRowMemoized.js +32 -56
  352. package/esm/core/Table/actionHandlers/expandHandler.js +3 -3
  353. package/esm/core/Table/actionHandlers/filterHandler.js +4 -4
  354. package/esm/core/Table/actionHandlers/resizeHandler.js +13 -15
  355. package/esm/core/Table/actionHandlers/selectHandler.js +35 -40
  356. package/esm/core/Table/cells/DefaultCell.js +3 -25
  357. package/esm/core/Table/cells/EditableCell.js +14 -38
  358. package/esm/core/Table/columns/actionColumn.js +34 -52
  359. package/esm/core/Table/columns/expanderColumn.d.ts +2 -5
  360. package/esm/core/Table/columns/expanderColumn.js +9 -24
  361. package/esm/core/Table/columns/selectionColumn.d.ts +2 -5
  362. package/esm/core/Table/columns/selectionColumn.js +14 -35
  363. package/esm/core/Table/filters/BaseFilter.js +3 -3
  364. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +14 -36
  365. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +15 -26
  366. package/esm/core/Table/filters/FilterButtonBar.js +4 -15
  367. package/esm/core/Table/filters/FilterToggle.js +11 -33
  368. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +11 -24
  369. package/esm/core/Table/filters/TextFilter/TextFilter.js +6 -6
  370. package/esm/core/Table/filters/customFilterFunctions.js +12 -14
  371. package/esm/core/Table/filters/defaultFilterFunctions.js +63 -65
  372. package/esm/core/Table/filters/tableFilters.js +4 -15
  373. package/esm/core/Table/hooks/useColumnDragAndDrop.js +40 -52
  374. package/esm/core/Table/hooks/useExpanderCell.js +15 -31
  375. package/esm/core/Table/hooks/useResizeColumns.js +196 -204
  376. package/esm/core/Table/hooks/useScrollToRow.js +10 -11
  377. package/esm/core/Table/hooks/useSelectionCell.js +6 -17
  378. package/esm/core/Table/hooks/useStickyColumns.js +27 -32
  379. package/esm/core/Table/hooks/useSubRowFiltering.js +35 -55
  380. package/esm/core/Table/hooks/useSubRowSelection.js +9 -11
  381. package/esm/core/Table/utils.js +15 -26
  382. package/esm/core/Tabs/Tab.js +3 -25
  383. package/esm/core/Tabs/Tabs.js +41 -63
  384. package/esm/core/Tag/Tag.js +4 -26
  385. package/esm/core/Tag/TagContainer.js +6 -29
  386. package/esm/core/Textarea/Textarea.js +6 -28
  387. package/esm/core/ThemeProvider/ThemeProvider.d.ts +1 -0
  388. package/esm/core/ThemeProvider/ThemeProvider.js +15 -36
  389. package/esm/core/Tile/Tile.js +23 -52
  390. package/esm/core/TimePicker/TimePicker.js +56 -94
  391. package/esm/core/Toast/Toast.js +41 -61
  392. package/esm/core/Toast/ToastWrapper.js +10 -21
  393. package/esm/core/Toast/Toaster.js +83 -134
  394. package/esm/core/Toast/index.js +1 -1
  395. package/esm/core/ToggleSwitch/ToggleSwitch.js +7 -29
  396. package/esm/core/Tooltip/Tooltip.js +3 -25
  397. package/esm/core/Tree/Tree.js +54 -76
  398. package/esm/core/Tree/TreeContext.js +3 -3
  399. package/esm/core/Tree/TreeNode.js +16 -38
  400. package/esm/core/Tree/TreeNodeExpander.js +3 -25
  401. package/esm/core/Typography/Anchor/Anchor.js +2 -25
  402. package/esm/core/Typography/Blockquote/Blockquote.js +3 -25
  403. package/esm/core/Typography/Body/Body.js +4 -26
  404. package/esm/core/Typography/Code/Code.js +3 -25
  405. package/esm/core/Typography/Headline/Headline.js +3 -25
  406. package/esm/core/Typography/Kbd/Kbd.js +4 -26
  407. package/esm/core/Typography/Leading/Leading.js +3 -25
  408. package/esm/core/Typography/Small/Small.js +3 -25
  409. package/esm/core/Typography/Subheading/Subheading.js +3 -25
  410. package/esm/core/Typography/Text/Text.js +8 -31
  411. package/esm/core/Typography/Title/Title.js +3 -25
  412. package/esm/core/index.d.ts +2 -2
  413. package/esm/core/index.js +1 -1
  414. package/esm/core/utils/color/ColorValue.js +145 -156
  415. package/esm/core/utils/components/FocusTrap.js +11 -11
  416. package/esm/core/utils/components/InputContainer.js +10 -34
  417. package/esm/core/utils/components/MiddleTextTruncation.js +13 -29
  418. package/esm/core/utils/components/Popover.d.ts +1 -1
  419. package/esm/core/utils/components/Popover.js +54 -57
  420. package/esm/core/utils/components/Resizer.js +49 -49
  421. package/esm/core/utils/components/VirtualScroll.js +69 -86
  422. package/esm/core/utils/components/VisuallyHidden.js +3 -25
  423. package/esm/core/utils/components/WithCSSTransition.d.ts +2 -2
  424. package/esm/core/utils/components/WithCSSTransition.js +16 -38
  425. package/esm/core/utils/functions/colors.js +8 -8
  426. package/esm/core/utils/functions/dom.js +7 -8
  427. package/esm/core/utils/functions/focusable.js +11 -15
  428. package/esm/core/utils/functions/numbers.js +5 -6
  429. package/esm/core/utils/functions/styles.js +3 -3
  430. package/esm/core/utils/hooks/useContainerWidth.js +6 -10
  431. package/esm/core/utils/hooks/useDragAndDrop.js +28 -29
  432. package/esm/core/utils/hooks/useEventListener.js +6 -6
  433. package/esm/core/utils/hooks/useIntersection.js +7 -10
  434. package/esm/core/utils/hooks/useIsomorphicLayoutEffect.js +1 -1
  435. package/esm/core/utils/hooks/useLatestRef.js +3 -3
  436. package/esm/core/utils/hooks/useMediaQuery.js +6 -9
  437. package/esm/core/utils/hooks/useMergedRefs.js +5 -22
  438. package/esm/core/utils/hooks/useOverflow.js +23 -30
  439. package/esm/core/utils/hooks/useResizeObserver.js +4 -7
  440. package/esm/core/utils/hooks/useSafeContext.js +3 -3
  441. package/esm/core/utils/hooks/useTheme.js +14 -16
  442. package/esm/core/utils/icons/StatusIconMap.js +5 -16
  443. package/esm/core/utils/icons/SvgCalendar.js +2 -13
  444. package/esm/core/utils/icons/SvgCaretDownSmall.js +2 -13
  445. package/esm/core/utils/icons/SvgCaretRightSmall.js +2 -13
  446. package/esm/core/utils/icons/SvgCaretUpSmall.js +2 -13
  447. package/esm/core/utils/icons/SvgCheckmark.js +2 -13
  448. package/esm/core/utils/icons/SvgCheckmarkSmall.js +2 -13
  449. package/esm/core/utils/icons/SvgChevronLeft.js +2 -13
  450. package/esm/core/utils/icons/SvgChevronLeftDouble.js +2 -13
  451. package/esm/core/utils/icons/SvgChevronRight.js +2 -13
  452. package/esm/core/utils/icons/SvgChevronRightDouble.js +2 -13
  453. package/esm/core/utils/icons/SvgClose.js +2 -13
  454. package/esm/core/utils/icons/SvgCloseSmall.js +2 -13
  455. package/esm/core/utils/icons/SvgColumnManager.js +2 -13
  456. package/esm/core/utils/icons/SvgFilter.js +2 -13
  457. package/esm/core/utils/icons/SvgFilterHollow.js +2 -13
  458. package/esm/core/utils/icons/SvgImportantSmall.js +2 -13
  459. package/esm/core/utils/icons/SvgInfoCircular.js +2 -13
  460. package/esm/core/utils/icons/SvgMore.js +2 -13
  461. package/esm/core/utils/icons/SvgMoreVertical.js +2 -13
  462. package/esm/core/utils/icons/SvgNew.js +2 -13
  463. package/esm/core/utils/icons/SvgSmileyHappy.js +2 -13
  464. package/esm/core/utils/icons/SvgSortDown.js +2 -13
  465. package/esm/core/utils/icons/SvgSortUp.js +2 -13
  466. package/esm/core/utils/icons/SvgStatusError.js +2 -13
  467. package/esm/core/utils/icons/SvgStatusSuccess.js +2 -13
  468. package/esm/core/utils/icons/SvgStatusWarning.js +2 -13
  469. package/esm/core/utils/icons/SvgSwap.js +2 -13
  470. package/esm/core/utils/icons/SvgUpload.js +2 -13
  471. package/esm/types/react-table-config.d.ts +6 -2
  472. package/package.json +4 -4
  473. package/cjs/core/ErrorPage/ErrorPage.js +0 -168
  474. package/esm/core/ErrorPage/ErrorPage.js +0 -161
@@ -1,25 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  /*---------------------------------------------------------------------------------------------
24
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
25
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -38,9 +16,9 @@ import { ComboBoxInputContainer } from './ComboBoxInputContainer';
38
16
  import { ComboBoxMenu } from './ComboBoxMenu';
39
17
  import { ComboBoxMenuItem } from './ComboBoxMenuItem';
40
18
  /** Returns either `option.id` or derives a stable id using `idPrefix` and `option.label` (without whitespace) */
41
- var getOptionId = function (option, idPrefix) {
19
+ const getOptionId = (option, idPrefix) => {
42
20
  var _a;
43
- return (_a = option.id) !== null && _a !== void 0 ? _a : "".concat(idPrefix, "-option-").concat(option.label.replace(/\s/g, '-'));
21
+ return (_a = option.id) !== null && _a !== void 0 ? _a : `${idPrefix}-option-${option.label.replace(/\s/g, '-')}`;
44
22
  };
45
23
  /**
46
24
  * ComboBox component that allows typing a value to filter the options in dropdown list.
@@ -55,47 +33,47 @@ var getOptionId = function (option, idPrefix) {
55
33
  * onChange={() => {}}
56
34
  * />
57
35
  */
58
- export var ComboBox = function (props) {
36
+ export const ComboBox = (props) => {
59
37
  var _a, _b;
60
- var options = props.options, valueProp = props.value, onChange = props.onChange, filterFunction = props.filterFunction, inputProps = props.inputProps, dropdownMenuProps = props.dropdownMenuProps, _c = props.emptyStateMessage, emptyStateMessage = _c === void 0 ? 'No options found' : _c, itemRenderer = props.itemRenderer, _d = props.enableVirtualization, enableVirtualization = _d === void 0 ? false : _d, onShow = props.onShow, onHide = props.onHide, rest = __rest(props, ["options", "value", "onChange", "filterFunction", "inputProps", "dropdownMenuProps", "emptyStateMessage", "itemRenderer", "enableVirtualization", "onShow", "onHide"]);
38
+ const { options, value: valueProp, onChange, filterFunction, inputProps, dropdownMenuProps, emptyStateMessage = 'No options found', itemRenderer, enableVirtualization = false, onShow, onHide, ...rest } = props;
61
39
  // Generate a stateful random id if not specified
62
- var id = React.useState(function () {
40
+ const [id] = React.useState(() => {
63
41
  var _a, _b;
64
- return (_b = (_a = props.id) !== null && _a !== void 0 ? _a : ((inputProps === null || inputProps === void 0 ? void 0 : inputProps.id) && "".concat(inputProps.id, "-cb"))) !== null && _b !== void 0 ? _b : "iui-cb-".concat(getRandomValue(10));
65
- })[0];
42
+ return (_b = (_a = props.id) !== null && _a !== void 0 ? _a : ((inputProps === null || inputProps === void 0 ? void 0 : inputProps.id) && `${inputProps.id}-cb`)) !== null && _b !== void 0 ? _b : `iui-cb-${getRandomValue(10)}`;
43
+ });
66
44
  useTheme();
67
45
  // Refs get set in subcomponents
68
- var inputRef = React.useRef(null);
69
- var menuRef = React.useRef(null);
70
- var toggleButtonRef = React.useRef(null);
71
- var mounted = React.useRef(false);
72
- var valuePropRef = useLatestRef(valueProp);
73
- var onChangeProp = useLatestRef(onChange);
74
- var optionsRef = useLatestRef(options);
46
+ const inputRef = React.useRef(null);
47
+ const menuRef = React.useRef(null);
48
+ const toggleButtonRef = React.useRef(null);
49
+ const mounted = React.useRef(false);
50
+ const valuePropRef = useLatestRef(valueProp);
51
+ const onChangeProp = useLatestRef(onChange);
52
+ const optionsRef = useLatestRef(options);
75
53
  // Record to store all extra information (e.g. original indexes), where the key is the id of the option
76
- var optionsExtraInfoRef = React.useRef({});
54
+ const optionsExtraInfoRef = React.useRef({});
77
55
  // Clear the extra info when the options change so that it can be reinitialized below
78
- React.useEffect(function () {
56
+ React.useEffect(() => {
79
57
  optionsExtraInfoRef.current = {};
80
58
  }, [options]);
81
59
  // Initialize the extra info only if it is not already initialized
82
60
  if (options.length > 0 &&
83
61
  Object.keys(optionsExtraInfoRef.current).length === 0) {
84
- options.forEach(function (option, index) {
62
+ options.forEach((option, index) => {
85
63
  optionsExtraInfoRef.current[getOptionId(option, id)] = {
86
64
  __originalIndex: index,
87
65
  };
88
66
  });
89
67
  }
90
68
  // Reducer where all the component-wide state is stored
91
- var _e = React.useReducer(comboBoxReducer, {
69
+ const [{ isOpen, selectedIndex, focusedIndex }, dispatch] = React.useReducer(comboBoxReducer, {
92
70
  isOpen: false,
93
71
  selectedIndex: valueProp
94
- ? optionsRef.current.findIndex(function (option) { return option.value === valueProp; })
72
+ ? optionsRef.current.findIndex((option) => option.value === valueProp)
95
73
  : -1,
96
74
  focusedIndex: -1,
97
- }), _f = _e[0], isOpen = _f.isOpen, selectedIndex = _f.selectedIndex, focusedIndex = _f.focusedIndex, dispatch = _e[1];
98
- React.useLayoutEffect(function () {
75
+ });
76
+ React.useLayoutEffect(() => {
99
77
  var _a, _b;
100
78
  // When the dropdown opens
101
79
  if (isOpen) {
@@ -114,20 +92,18 @@ export var ComboBox = function (props) {
114
92
  }
115
93
  }, [isOpen, optionsRef, selectedIndex]);
116
94
  // Set min-width of menu to be same as input
117
- var _g = React.useState(0), minWidth = _g[0], setMinWidth = _g[1];
118
- React.useEffect(function () {
95
+ const [minWidth, setMinWidth] = React.useState(0);
96
+ React.useEffect(() => {
119
97
  if (inputRef.current) {
120
98
  setMinWidth(inputRef.current.offsetWidth);
121
99
  }
122
100
  }, [isOpen]);
123
101
  // Update filtered options to the latest value options according to input value
124
- var _h = React.useState(options), filteredOptions = _h[0], setFilteredOptions = _h[1];
125
- React.useEffect(function () {
102
+ const [filteredOptions, setFilteredOptions] = React.useState(options);
103
+ React.useEffect(() => {
126
104
  var _a;
127
105
  if (inputValue) {
128
- setFilteredOptions((_a = filterFunction === null || filterFunction === void 0 ? void 0 : filterFunction(options, inputValue)) !== null && _a !== void 0 ? _a : options.filter(function (option) {
129
- return option.label.toLowerCase().includes(inputValue.toLowerCase());
130
- }));
106
+ setFilteredOptions((_a = filterFunction === null || filterFunction === void 0 ? void 0 : filterFunction(options, inputValue)) !== null && _a !== void 0 ? _a : options.filter((option) => option.label.toLowerCase().includes(inputValue.toLowerCase())));
131
107
  }
132
108
  else {
133
109
  setFilteredOptions(options);
@@ -137,45 +113,43 @@ export var ComboBox = function (props) {
137
113
  // eslint-disable-next-line react-hooks/exhaustive-deps
138
114
  }, [options]);
139
115
  // Filter options based on input value
140
- var _j = React.useState((_b = (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.value) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ''), inputValue = _j[0], setInputValue = _j[1];
141
- var handleOnInput = React.useCallback(function (event) {
116
+ const [inputValue, setInputValue] = React.useState((_b = (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.value) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '');
117
+ const handleOnInput = React.useCallback((event) => {
142
118
  var _a, _b;
143
- var value = event.currentTarget.value;
119
+ const { value } = event.currentTarget;
144
120
  setInputValue(value);
145
121
  dispatch(['open']); // reopen when typing
146
- setFilteredOptions((_a = filterFunction === null || filterFunction === void 0 ? void 0 : filterFunction(optionsRef.current, value)) !== null && _a !== void 0 ? _a : optionsRef.current.filter(function (option) {
147
- return option.label.toLowerCase().includes(value.toLowerCase());
148
- }));
122
+ setFilteredOptions((_a = filterFunction === null || filterFunction === void 0 ? void 0 : filterFunction(optionsRef.current, value)) !== null && _a !== void 0 ? _a : optionsRef.current.filter((option) => option.label.toLowerCase().includes(value.toLowerCase())));
149
123
  if (focusedIndex != -1) {
150
124
  dispatch(['focus', -1]);
151
125
  }
152
126
  (_b = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange) === null || _b === void 0 ? void 0 : _b.call(inputProps, event);
153
127
  }, [filterFunction, focusedIndex, inputProps, optionsRef]);
154
128
  // When the value prop changes, update the selectedIndex
155
- React.useEffect(function () {
129
+ React.useEffect(() => {
156
130
  dispatch([
157
131
  'select',
158
- options.findIndex(function (option) { return option.value === valueProp; }),
132
+ options.findIndex((option) => option.value === valueProp),
159
133
  ]);
160
134
  }, [options, valueProp]);
161
135
  // Call user-defined onChange when the value actually changes
162
- React.useEffect(function () {
136
+ React.useEffect(() => {
163
137
  var _a, _b;
164
138
  // Prevent user-defined onChange to be called on mount
165
139
  if (!mounted.current) {
166
140
  mounted.current = true;
167
141
  return;
168
142
  }
169
- var currentValue = (_a = optionsRef.current[selectedIndex]) === null || _a === void 0 ? void 0 : _a.value;
143
+ const currentValue = (_a = optionsRef.current[selectedIndex]) === null || _a === void 0 ? void 0 : _a.value;
170
144
  if (currentValue === valuePropRef.current || selectedIndex === -1) {
171
145
  return;
172
146
  }
173
147
  (_b = onChangeProp.current) === null || _b === void 0 ? void 0 : _b.call(onChangeProp, currentValue);
174
148
  }, [onChangeProp, optionsRef, selectedIndex, valuePropRef]);
175
- var getMenuItem = React.useCallback(function (option, filteredIndex) {
176
- var optionId = getOptionId(option, id);
177
- var __originalIndex = optionsExtraInfoRef.current[optionId].__originalIndex;
178
- var customItem = itemRenderer
149
+ const getMenuItem = React.useCallback((option, filteredIndex) => {
150
+ const optionId = getOptionId(option, id);
151
+ const { __originalIndex } = optionsExtraInfoRef.current[optionId];
152
+ const customItem = itemRenderer
179
153
  ? itemRenderer(option, {
180
154
  isFocused: focusedIndex === __originalIndex,
181
155
  isSelected: selectedIndex === __originalIndex,
@@ -184,7 +158,7 @@ export var ComboBox = function (props) {
184
158
  })
185
159
  : null;
186
160
  return customItem ? (React.cloneElement(customItem, {
187
- onClick: function (e) {
161
+ onClick: (e) => {
188
162
  var _a, _b;
189
163
  dispatch(['select', __originalIndex]);
190
164
  dispatch(['close']);
@@ -197,33 +171,33 @@ export var ComboBox = function (props) {
197
171
  }),
198
172
  'data-iui-index': __originalIndex,
199
173
  'data-iui-filtered-index': filteredIndex,
200
- ref: mergeRefs(customItem.props.ref, function (el) {
174
+ ref: mergeRefs(customItem.props.ref, (el) => {
201
175
  if (!enableVirtualization && focusedIndex === __originalIndex) {
202
176
  el === null || el === void 0 ? void 0 : el.scrollIntoView({ block: 'nearest' });
203
177
  }
204
178
  }),
205
- })) : (React.createElement(ComboBoxMenuItem, __assign({ key: optionId, id: optionId }, option, { isSelected: selectedIndex === __originalIndex, onClick: function () {
179
+ })) : (React.createElement(ComboBoxMenuItem, { key: optionId, id: optionId, ...option, isSelected: selectedIndex === __originalIndex, onClick: () => {
206
180
  dispatch(['select', __originalIndex]);
207
181
  dispatch(['close']);
208
- }, index: __originalIndex, "data-iui-filtered-index": filteredIndex }), option.label));
182
+ }, index: __originalIndex, "data-iui-filtered-index": filteredIndex }, option.label));
209
183
  }, [enableVirtualization, focusedIndex, id, itemRenderer, selectedIndex]);
210
- var emptyContent = React.useMemo(function () { return (React.createElement(React.Fragment, null, React.isValidElement(emptyStateMessage) ? (emptyStateMessage) : (React.createElement(MenuExtraContent, null,
211
- React.createElement(Text, { isMuted: true }, emptyStateMessage))))); }, [emptyStateMessage]);
212
- return (React.createElement(ComboBoxRefsContext.Provider, { value: { inputRef: inputRef, menuRef: menuRef, toggleButtonRef: toggleButtonRef, optionsExtraInfoRef: optionsExtraInfoRef } },
184
+ const emptyContent = React.useMemo(() => (React.createElement(React.Fragment, null, React.isValidElement(emptyStateMessage) ? (emptyStateMessage) : (React.createElement(MenuExtraContent, null,
185
+ React.createElement(Text, { isMuted: true }, emptyStateMessage))))), [emptyStateMessage]);
186
+ return (React.createElement(ComboBoxRefsContext.Provider, { value: { inputRef, menuRef, toggleButtonRef, optionsExtraInfoRef } },
213
187
  React.createElement(ComboBoxActionContext.Provider, { value: dispatch },
214
188
  React.createElement(ComboBoxStateContext.Provider, { value: {
215
- id: id,
216
- minWidth: minWidth,
217
- isOpen: isOpen,
218
- focusedIndex: focusedIndex,
219
- enableVirtualization: enableVirtualization,
220
- filteredOptions: filteredOptions,
221
- getMenuItem: getMenuItem,
189
+ id,
190
+ minWidth,
191
+ isOpen,
192
+ focusedIndex,
193
+ enableVirtualization,
194
+ filteredOptions,
195
+ getMenuItem,
222
196
  } },
223
- React.createElement(ComboBoxInputContainer, __assign({ disabled: inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled }, rest),
224
- React.createElement(ComboBoxInput, __assign({ value: inputValue }, inputProps, { onChange: handleOnInput })),
197
+ React.createElement(ComboBoxInputContainer, { disabled: inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled, ...rest },
198
+ React.createElement(ComboBoxInput, { value: inputValue, ...inputProps, onChange: handleOnInput }),
225
199
  React.createElement(ComboBoxEndIcon, { disabled: inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled, isOpen: isOpen })),
226
- React.createElement(ComboBoxDropdown, __assign({}, dropdownMenuProps, { onShow: onShow, onHide: onHide }),
200
+ React.createElement(ComboBoxDropdown, { ...dropdownMenuProps, onShow: onShow, onHide: onHide },
227
201
  React.createElement(ComboBoxMenu, null, filteredOptions.length > 0 && !enableVirtualization
228
202
  ? filteredOptions.map(getMenuItem)
229
203
  : emptyContent))))));
@@ -3,5 +3,5 @@ import { PopoverProps } from '../utils';
3
3
  declare type ComboBoxDropdownProps = PopoverProps & {
4
4
  children: JSX.Element;
5
5
  };
6
- export declare const ComboBoxDropdown: React.ForwardRefExoticComponent<Pick<ComboBoxDropdownProps, "disabled" | "theme" | "className" | "role" | "children" | "plugins" | "placement" | "trigger" | "visible" | "content" | "render" | "animateFill" | "appendTo" | "aria" | "delay" | "duration" | "followCursor" | "getReferenceClientRect" | "hideOnClick" | "ignoreAttributes" | "inlinePositioning" | "interactive" | "interactiveBorder" | "interactiveDebounce" | "moveTransition" | "offset" | "popperOptions" | "showOnCreate" | "sticky" | "touch" | "triggerTarget" | "onAfterUpdate" | "onBeforeUpdate" | "onCreate" | "onDestroy" | "onHidden" | "onHide" | "onMount" | "onShow" | "onShown" | "onTrigger" | "onUntrigger" | "onClickOutside" | "allowHTML" | "animation" | "arrow" | "inertia" | "maxWidth" | "zIndex" | "singleton" | "reference"> & React.RefAttributes<Element>>;
6
+ export declare const ComboBoxDropdown: React.ForwardRefExoticComponent<Pick<ComboBoxDropdownProps, "disabled" | "theme" | "className" | "role" | "children" | "placement" | "trigger" | "visible" | "content" | "render" | "animateFill" | "appendTo" | "aria" | "delay" | "duration" | "followCursor" | "getReferenceClientRect" | "hideOnClick" | "ignoreAttributes" | "inlinePositioning" | "interactive" | "interactiveBorder" | "interactiveDebounce" | "moveTransition" | "offset" | "plugins" | "popperOptions" | "showOnCreate" | "sticky" | "touch" | "triggerTarget" | "onAfterUpdate" | "onBeforeUpdate" | "onCreate" | "onDestroy" | "onHidden" | "onHide" | "onMount" | "onShow" | "onShown" | "onTrigger" | "onUntrigger" | "onClickOutside" | "allowHTML" | "animation" | "arrow" | "inertia" | "maxWidth" | "zIndex" | "singleton" | "reference"> & React.RefAttributes<Element>>;
7
7
  export {};
@@ -1,25 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  /*---------------------------------------------------------------------------------------------
24
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
25
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -27,23 +5,22 @@ var __rest = (this && this.__rest) || function (s, e) {
27
5
  import React from 'react';
28
6
  import { Popover, useSafeContext } from '../utils';
29
7
  import { ComboBoxStateContext, ComboBoxActionContext, ComboBoxRefsContext, } from './helpers';
30
- export var ComboBoxDropdown = React.forwardRef(function (props, forwardedRef) {
31
- var children = props.children, rest = __rest(props, ["children"]);
32
- var isOpen = useSafeContext(ComboBoxStateContext).isOpen;
33
- var dispatch = useSafeContext(ComboBoxActionContext);
34
- var _a = useSafeContext(ComboBoxRefsContext), inputRef = _a.inputRef, toggleButtonRef = _a.toggleButtonRef;
8
+ export const ComboBoxDropdown = React.forwardRef((props, forwardedRef) => {
9
+ const { children, ...rest } = props;
10
+ const { isOpen } = useSafeContext(ComboBoxStateContext);
11
+ const dispatch = useSafeContext(ComboBoxActionContext);
12
+ const { inputRef, toggleButtonRef } = useSafeContext(ComboBoxRefsContext);
35
13
  // sync internal isOpen state with user's visible prop
36
- React.useEffect(function () {
14
+ React.useEffect(() => {
37
15
  if (props.visible != undefined) {
38
16
  dispatch([props.visible ? 'open' : 'close']);
39
17
  }
40
18
  }, [dispatch, props.visible]);
41
- return (React.createElement(Popover, __assign({ placement: 'bottom-start', visible: isOpen, onClickOutside: React.useCallback(function (_, _a) {
42
- var _b;
43
- var target = _a.target;
44
- if (!((_b = toggleButtonRef.current) === null || _b === void 0 ? void 0 : _b.contains(target))) {
19
+ return (React.createElement(Popover, { placement: 'bottom-start', visible: isOpen, onClickOutside: React.useCallback((_, { target }) => {
20
+ var _a;
21
+ if (!((_a = toggleButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(target))) {
45
22
  dispatch(['close']);
46
23
  }
47
- }, [dispatch, toggleButtonRef]), animation: 'shift-away', duration: 200, reference: inputRef, ref: forwardedRef, content: children }, rest)));
24
+ }, [dispatch, toggleButtonRef]), animation: 'shift-away', duration: 200, reference: inputRef, ref: forwardedRef, content: children, ...rest }));
48
25
  });
49
26
  ComboBoxDropdown.displayName = 'ComboBoxDropdown';
@@ -1,25 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  /*---------------------------------------------------------------------------------------------
24
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
25
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -28,20 +6,20 @@ import cx from 'classnames';
28
6
  import React from 'react';
29
7
  import { useSafeContext, useMergedRefs, SvgCaretDownSmall } from '../utils';
30
8
  import { ComboBoxActionContext, ComboBoxRefsContext } from './helpers';
31
- export var ComboBoxEndIcon = React.forwardRef(function (props, forwardedRef) {
32
- var className = props.className, children = props.children, onClickProp = props.onClick, disabled = props.disabled, isOpen = props.isOpen, rest = __rest(props, ["className", "children", "onClick", "disabled", "isOpen"]);
33
- var dispatch = useSafeContext(ComboBoxActionContext);
34
- var toggleButtonRef = useSafeContext(ComboBoxRefsContext).toggleButtonRef;
35
- var refs = useMergedRefs(toggleButtonRef, forwardedRef);
36
- return (React.createElement("span", __assign({ ref: refs, className: cx('iui-end-icon', {
9
+ export const ComboBoxEndIcon = React.forwardRef((props, forwardedRef) => {
10
+ const { className, children, onClick: onClickProp, disabled, isOpen, ...rest } = props;
11
+ const dispatch = useSafeContext(ComboBoxActionContext);
12
+ const { toggleButtonRef } = useSafeContext(ComboBoxRefsContext);
13
+ const refs = useMergedRefs(toggleButtonRef, forwardedRef);
14
+ return (React.createElement("span", { ref: refs, className: cx('iui-end-icon', {
37
15
  'iui-actionable': !disabled,
38
16
  'iui-disabled': disabled,
39
17
  'iui-open': isOpen,
40
- }, className), onClick: function (e) {
18
+ }, className), onClick: (e) => {
41
19
  onClickProp === null || onClickProp === void 0 ? void 0 : onClickProp(e);
42
20
  if (!e.isDefaultPrevented()) {
43
21
  dispatch([isOpen ? 'close' : 'open']);
44
22
  }
45
- } }, rest), children !== null && children !== void 0 ? children : React.createElement(SvgCaretDownSmall, { "aria-hidden": true })));
23
+ }, ...rest }, children !== null && children !== void 0 ? children : React.createElement(SvgCaretDownSmall, { "aria-hidden": true })));
46
24
  });
47
25
  ComboBoxEndIcon.displayName = 'ComboBoxEndIcon';
@@ -1,25 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  /*---------------------------------------------------------------------------------------------
24
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
25
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -28,24 +6,24 @@ import React from 'react';
28
6
  import { Input } from '../Input';
29
7
  import { useSafeContext, useMergedRefs } from '../utils';
30
8
  import { ComboBoxStateContext, ComboBoxActionContext, ComboBoxRefsContext, } from './helpers';
31
- export var ComboBoxInput = React.forwardRef(function (props, forwardedRef) {
32
- var onKeyDownProp = props.onKeyDown, onFocusProp = props.onFocus, rest = __rest(props, ["onKeyDown", "onFocus"]);
33
- var _a = useSafeContext(ComboBoxStateContext), isOpen = _a.isOpen, id = _a.id, focusedIndex = _a.focusedIndex, enableVirtualization = _a.enableVirtualization;
34
- var dispatch = useSafeContext(ComboBoxActionContext);
35
- var _b = useSafeContext(ComboBoxRefsContext), inputRef = _b.inputRef, menuRef = _b.menuRef, optionsExtraInfoRef = _b.optionsExtraInfoRef;
36
- var refs = useMergedRefs(inputRef, forwardedRef);
37
- var focusedIndexRef = React.useRef(focusedIndex !== null && focusedIndex !== void 0 ? focusedIndex : -1);
38
- React.useEffect(function () {
9
+ export const ComboBoxInput = React.forwardRef((props, forwardedRef) => {
10
+ const { onKeyDown: onKeyDownProp, onFocus: onFocusProp, ...rest } = props;
11
+ const { isOpen, id, focusedIndex, enableVirtualization } = useSafeContext(ComboBoxStateContext);
12
+ const dispatch = useSafeContext(ComboBoxActionContext);
13
+ const { inputRef, menuRef, optionsExtraInfoRef } = useSafeContext(ComboBoxRefsContext);
14
+ const refs = useMergedRefs(inputRef, forwardedRef);
15
+ const focusedIndexRef = React.useRef(focusedIndex !== null && focusedIndex !== void 0 ? focusedIndex : -1);
16
+ React.useEffect(() => {
39
17
  focusedIndexRef.current = focusedIndex !== null && focusedIndex !== void 0 ? focusedIndex : -1;
40
18
  }, [focusedIndex]);
41
- var getIdFromIndex = function (index) {
19
+ const getIdFromIndex = (index) => {
42
20
  var _a, _b, _c;
43
- return ((_c = (_b = (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("[data-iui-index=\"".concat(index, "\"]"))) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : '');
21
+ return ((_c = (_b = (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`[data-iui-index="${index}"]`)) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : '');
44
22
  };
45
- var handleKeyDown = React.useCallback(function (event) {
23
+ const handleKeyDown = React.useCallback((event) => {
46
24
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
47
25
  onKeyDownProp === null || onKeyDownProp === void 0 ? void 0 : onKeyDownProp(event);
48
- var length = (_a = Object.keys(optionsExtraInfoRef.current).length) !== null && _a !== void 0 ? _a : 0;
26
+ const length = (_a = Object.keys(optionsExtraInfoRef.current).length) !== null && _a !== void 0 ? _a : 0;
49
27
  switch (event.key) {
50
28
  case 'ArrowDown': {
51
29
  event.preventDefault();
@@ -56,7 +34,7 @@ export var ComboBoxInput = React.forwardRef(function (props, forwardedRef) {
56
34
  return;
57
35
  }
58
36
  if (focusedIndexRef.current === -1) {
59
- var currentElement = (_b = menuRef.current) === null || _b === void 0 ? void 0 : _b.querySelector('[data-iui-index]');
37
+ const currentElement = (_b = menuRef.current) === null || _b === void 0 ? void 0 : _b.querySelector('[data-iui-index]');
60
38
  return dispatch([
61
39
  'focus',
62
40
  Number((_c = currentElement === null || currentElement === void 0 ? void 0 : currentElement.getAttribute('data-iui-index')) !== null && _c !== void 0 ? _c : 0),
@@ -64,13 +42,13 @@ export var ComboBoxInput = React.forwardRef(function (props, forwardedRef) {
64
42
  }
65
43
  // If virtualization is enabled, dont let round scrolling
66
44
  if (enableVirtualization &&
67
- !((_e = (_d = menuRef.current) === null || _d === void 0 ? void 0 : _d.querySelector("[data-iui-index=\"".concat(focusedIndexRef.current, "\"]"))) === null || _e === void 0 ? void 0 : _e.nextElementSibling)) {
45
+ !((_e = (_d = menuRef.current) === null || _d === void 0 ? void 0 : _d.querySelector(`[data-iui-index="${focusedIndexRef.current}"]`)) === null || _e === void 0 ? void 0 : _e.nextElementSibling)) {
68
46
  return;
69
47
  }
70
- var nextIndex = focusedIndexRef.current;
48
+ let nextIndex = focusedIndexRef.current;
71
49
  do {
72
- var currentElement = (_f = menuRef.current) === null || _f === void 0 ? void 0 : _f.querySelector("[data-iui-index=\"".concat(nextIndex, "\"]"));
73
- var nextElement = (_g = currentElement === null || currentElement === void 0 ? void 0 : currentElement.nextElementSibling) !== null && _g !== void 0 ? _g : (_h = menuRef.current) === null || _h === void 0 ? void 0 : _h.querySelector('[data-iui-index]');
50
+ const currentElement = (_f = menuRef.current) === null || _f === void 0 ? void 0 : _f.querySelector(`[data-iui-index="${nextIndex}"]`);
51
+ const nextElement = (_g = currentElement === null || currentElement === void 0 ? void 0 : currentElement.nextElementSibling) !== null && _g !== void 0 ? _g : (_h = menuRef.current) === null || _h === void 0 ? void 0 : _h.querySelector('[data-iui-index]');
74
52
  nextIndex = Number(nextElement === null || nextElement === void 0 ? void 0 : nextElement.getAttribute('data-iui-index'));
75
53
  if ((nextElement === null || nextElement === void 0 ? void 0 : nextElement.ariaDisabled) !== 'true') {
76
54
  return dispatch(['focus', nextIndex]);
@@ -88,7 +66,7 @@ export var ComboBoxInput = React.forwardRef(function (props, forwardedRef) {
88
66
  }
89
67
  // If virtualization is enabled, dont let round scrolling
90
68
  if (enableVirtualization &&
91
- !((_k = (_j = menuRef.current) === null || _j === void 0 ? void 0 : _j.querySelector("[data-iui-index=\"".concat(focusedIndexRef.current, "\"]"))) === null || _k === void 0 ? void 0 : _k.previousElementSibling)) {
69
+ !((_k = (_j = menuRef.current) === null || _j === void 0 ? void 0 : _j.querySelector(`[data-iui-index="${focusedIndexRef.current}"]`)) === null || _k === void 0 ? void 0 : _k.previousElementSibling)) {
92
70
  return;
93
71
  }
94
72
  if (focusedIndexRef.current === -1) {
@@ -97,10 +75,10 @@ export var ComboBoxInput = React.forwardRef(function (props, forwardedRef) {
97
75
  (_m = (_l = Object.values(optionsExtraInfoRef.current)) === null || _l === void 0 ? void 0 : _l[length - 1].__originalIndex) !== null && _m !== void 0 ? _m : -1,
98
76
  ]);
99
77
  }
100
- var prevIndex = focusedIndexRef.current;
78
+ let prevIndex = focusedIndexRef.current;
101
79
  do {
102
- var currentElement = (_o = menuRef.current) === null || _o === void 0 ? void 0 : _o.querySelector("[data-iui-index=\"".concat(prevIndex, "\"]"));
103
- var prevElement = (_p = currentElement === null || currentElement === void 0 ? void 0 : currentElement.previousElementSibling) !== null && _p !== void 0 ? _p : (_q = menuRef.current) === null || _q === void 0 ? void 0 : _q.querySelector('[data-iui-index]:last-of-type');
80
+ const currentElement = (_o = menuRef.current) === null || _o === void 0 ? void 0 : _o.querySelector(`[data-iui-index="${prevIndex}"]`);
81
+ const prevElement = (_p = currentElement === null || currentElement === void 0 ? void 0 : currentElement.previousElementSibling) !== null && _p !== void 0 ? _p : (_q = menuRef.current) === null || _q === void 0 ? void 0 : _q.querySelector('[data-iui-index]:last-of-type');
104
82
  prevIndex = Number(prevElement === null || prevElement === void 0 ? void 0 : prevElement.getAttribute('data-iui-index'));
105
83
  if ((prevElement === null || prevElement === void 0 ? void 0 : prevElement.ariaDisabled) !== 'true') {
106
84
  return dispatch(['focus', prevIndex]);
@@ -136,12 +114,12 @@ export var ComboBoxInput = React.forwardRef(function (props, forwardedRef) {
136
114
  onKeyDownProp,
137
115
  optionsExtraInfoRef,
138
116
  ]);
139
- var handleFocus = React.useCallback(function (event) {
117
+ const handleFocus = React.useCallback((event) => {
140
118
  dispatch(['open']);
141
119
  onFocusProp === null || onFocusProp === void 0 ? void 0 : onFocusProp(event);
142
120
  }, [dispatch, onFocusProp]);
143
- return (React.createElement(Input, __assign({ ref: refs, onKeyDown: handleKeyDown, onFocus: handleFocus, "aria-activedescendant": isOpen && focusedIndex != undefined && focusedIndex > -1
121
+ return (React.createElement(Input, { ref: refs, onKeyDown: handleKeyDown, onFocus: handleFocus, "aria-activedescendant": isOpen && focusedIndex != undefined && focusedIndex > -1
144
122
  ? getIdFromIndex(focusedIndex)
145
- : undefined, role: 'combobox', "aria-controls": isOpen ? "".concat(id, "-list") : undefined, "aria-autocomplete": 'list', spellCheck: false, autoCapitalize: 'none', autoCorrect: 'off' }, rest)));
123
+ : undefined, role: 'combobox', "aria-controls": isOpen ? `${id}-list` : undefined, "aria-autocomplete": 'list', spellCheck: false, autoCapitalize: 'none', autoCorrect: 'off', ...rest }));
146
124
  });
147
125
  ComboBoxInput.displayName = 'ComboBoxInput';
@@ -1,25 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
1
  /*---------------------------------------------------------------------------------------------
24
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
25
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -28,11 +6,11 @@ import React from 'react';
28
6
  import { StatusMessage } from '../StatusMessage';
29
7
  import { InputContainer, useSafeContext } from '../utils';
30
8
  import { ComboBoxStateContext } from './helpers';
31
- export var ComboBoxInputContainer = function (props) {
32
- var className = props.className, status = props.status, message = props.message, children = props.children, rest = __rest(props, ["className", "status", "message", "children"]);
33
- var id = useSafeContext(ComboBoxStateContext).id;
34
- return (React.createElement(InputContainer, __assign({ className: className, status: status, statusMessage: typeof message === 'string' ? (React.createElement(StatusMessage, { status: status }, message)) : (React.isValidElement(message) &&
35
- React.cloneElement(message, { status: status })) }, rest, { id: id }),
9
+ export const ComboBoxInputContainer = (props) => {
10
+ const { className, status, message, children, ...rest } = props;
11
+ const { id } = useSafeContext(ComboBoxStateContext);
12
+ return (React.createElement(InputContainer, { className: className, status: status, statusMessage: typeof message === 'string' ? (React.createElement(StatusMessage, { status: status }, message)) : (React.isValidElement(message) &&
13
+ React.cloneElement(message, { status })), ...rest, id: id },
36
14
  React.createElement("div", { className: 'iui-input-with-icon' }, children)));
37
15
  };
38
16
  ComboBoxInputContainer.displayName = 'ComboBoxInputContainer';