@itwin/itwinui-react 2.0.0-dev.1 → 2.0.0-dev.3

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 +1 -1
  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 +1 -1
  472. package/package.json +22 -5
  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.
@@ -56,17 +34,17 @@ import '@itwin/itwinui-css/css/button.css';
56
34
  * {buttons}
57
35
  * </ButtonGroup>
58
36
  */
59
- export var ButtonGroup = React.forwardRef(function (props, ref) {
60
- var children = props.children, className = props.className, overflowButton = props.overflowButton, _a = props.overflowPlacement, overflowPlacement = _a === void 0 ? 'end' : _a, _b = props.orientation, orientation = _b === void 0 ? 'horizontal' : _b, rest = __rest(props, ["children", "className", "overflowButton", "overflowPlacement", "orientation"]);
61
- var items = React.useMemo(function () { var _a; return (_a = React.Children.map(children, function (child) { return React.createElement("div", null, child); })) !== null && _a !== void 0 ? _a : []; }, [children]);
37
+ export const ButtonGroup = React.forwardRef((props, ref) => {
38
+ const { children, className, overflowButton, overflowPlacement = 'end', orientation = 'horizontal', ...rest } = props;
39
+ const items = React.useMemo(() => { var _a; return (_a = React.Children.map(children, (child) => React.createElement("div", null, child))) !== null && _a !== void 0 ? _a : []; }, [children]);
62
40
  useTheme();
63
- var _c = useOverflow(items, !overflowButton, orientation), overflowRef = _c[0], visibleCount = _c[1];
64
- var refs = useMergedRefs(overflowRef, ref);
65
- return (React.createElement("div", __assign({ className: cx({
41
+ const [overflowRef, visibleCount] = useOverflow(items, !overflowButton, orientation);
42
+ const refs = useMergedRefs(overflowRef, ref);
43
+ return (React.createElement("div", { className: cx({
66
44
  'iui-button-group': orientation === 'horizontal',
67
45
  'iui-button-group-vertical': orientation === 'vertical',
68
46
  'iui-button-group-overflow-x': !!overflowButton && orientation === 'horizontal',
69
- }, className), "aria-orientation": orientation, ref: refs }, rest),
47
+ }, className), "aria-orientation": orientation, ref: refs, ...rest },
70
48
  React.createElement(React.Fragment, null,
71
49
  visibleCount < items.length &&
72
50
  overflowButton &&
@@ -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.
@@ -37,10 +15,10 @@ import '@itwin/itwinui-css/css/button.css';
37
15
  * <Button size='small' styleType='cta'>This is a small call to action button</Button>
38
16
  * <Button startIcon={<SvgAdd />}>New</Button>
39
17
  */
40
- export var Button = React.forwardRef(function (props, ref) {
41
- var children = props.children, className = props.className, size = props.size, style = props.style, _a = props.styleType, styleType = _a === void 0 ? 'default' : _a, _b = props.type, type = _b === void 0 ? 'button' : _b, startIcon = props.startIcon, endIcon = props.endIcon, _c = props.as, Element = _c === void 0 ? 'button' : _c, rest = __rest(props, ["children", "className", "size", "style", "styleType", "type", "startIcon", "endIcon", "as"]);
18
+ export const Button = React.forwardRef((props, ref) => {
19
+ const { children, className, size, style, styleType = 'default', type = 'button', startIcon, endIcon, as: Element = 'button', ...rest } = props;
42
20
  useTheme();
43
- return (React.createElement(Element, __assign({ ref: ref, className: cx('iui-button', className), "data-iui-variant": styleType !== 'default' ? styleType : undefined, "data-iui-size": size, style: style, type: type }, rest),
21
+ return (React.createElement(Element, { ref: ref, className: cx('iui-button', className), "data-iui-variant": styleType !== 'default' ? styleType : undefined, "data-iui-size": size, style: style, type: type, ...rest },
44
22
  startIcon && (React.createElement("span", { className: 'iui-button-icon', "aria-hidden": true }, startIcon)),
45
23
  children && React.createElement("span", null, children),
46
24
  endIcon && (React.createElement("span", { className: 'iui-button-icon', "aria-hidden": true }, endIcon))));
@@ -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.
@@ -39,19 +17,19 @@ import '@itwin/itwinui-css/css/button.css';
39
17
  * ];
40
18
  * <DropdownButton menuItems={menuItems}>Default</DropdownButton>
41
19
  */
42
- export var DropdownButton = React.forwardRef(function (props, ref) {
43
- var menuItems = props.menuItems, className = props.className, size = props.size, styleType = props.styleType, children = props.children, rest = __rest(props, ["menuItems", "className", "size", "styleType", "children"]);
20
+ export const DropdownButton = React.forwardRef((props, ref) => {
21
+ const { menuItems, className, size, styleType, children, ...rest } = props;
44
22
  useTheme();
45
- var _a = React.useState(false), isMenuOpen = _a[0], setIsMenuOpen = _a[1];
46
- var _b = React.useState(0), menuWidth = _b[0], setMenuWidth = _b[1];
47
- var buttonRef = React.useRef(null);
48
- var refs = useMergedRefs(ref, buttonRef);
49
- React.useEffect(function () {
23
+ const [isMenuOpen, setIsMenuOpen] = React.useState(false);
24
+ const [menuWidth, setMenuWidth] = React.useState(0);
25
+ const buttonRef = React.useRef(null);
26
+ const refs = useMergedRefs(ref, buttonRef);
27
+ React.useEffect(() => {
50
28
  if (buttonRef.current) {
51
29
  setMenuWidth(buttonRef.current.offsetWidth);
52
30
  }
53
31
  }, [children, size, styleType]);
54
- return (React.createElement(DropdownMenu, { menuItems: menuItems, style: { minWidth: menuWidth }, onShow: function () { return setIsMenuOpen(true); }, onHide: function () { return setIsMenuOpen(false); } },
55
- React.createElement(Button, __assign({ className: cx('iui-button-dropdown', className), size: size, styleType: styleType, endIcon: isMenuOpen ? (React.createElement(SvgCaretUpSmall, { "aria-hidden": true })) : (React.createElement(SvgCaretDownSmall, { "aria-hidden": true })), ref: refs, "aria-label": 'Dropdown' }, rest), children)));
32
+ return (React.createElement(DropdownMenu, { menuItems: menuItems, style: { minWidth: menuWidth }, onShow: () => setIsMenuOpen(true), onHide: () => setIsMenuOpen(false) },
33
+ React.createElement(Button, { className: cx('iui-button-dropdown', className), size: size, styleType: styleType, endIcon: isMenuOpen ? (React.createElement(SvgCaretUpSmall, { "aria-hidden": true })) : (React.createElement(SvgCaretDownSmall, { "aria-hidden": true })), ref: refs, "aria-label": 'Dropdown', ...rest }, children)));
56
34
  });
57
35
  export default DropdownButton;
@@ -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.
@@ -34,10 +12,10 @@ import '@itwin/itwinui-css/css/button.css';
34
12
  * <IconButton><SvgAdd /></IconButton>
35
13
  * <IconButton styleType='borderless'><SvgAdd /></IconButton>
36
14
  */
37
- export var IconButton = React.forwardRef(function (props, ref) {
38
- var isActive = props.isActive, children = props.children, _a = props.styleType, styleType = _a === void 0 ? 'default' : _a, size = props.size, _b = props.type, type = _b === void 0 ? 'button' : _b, className = props.className, _c = props.as, Element = _c === void 0 ? 'button' : _c, rest = __rest(props, ["isActive", "children", "styleType", "size", "type", "className", "as"]);
15
+ export const IconButton = React.forwardRef((props, ref) => {
16
+ const { isActive, children, styleType = 'default', size, type = 'button', className, as: Element = 'button', ...rest } = props;
39
17
  useTheme();
40
- return (React.createElement(Element, __assign({ ref: ref, className: cx('iui-button', className), "data-iui-variant": styleType !== 'default' ? styleType : undefined, "data-iui-size": size, "data-iui-active": isActive, type: type }, rest),
18
+ return (React.createElement(Element, { ref: ref, className: cx('iui-button', className), "data-iui-variant": styleType !== 'default' ? styleType : undefined, "data-iui-size": size, "data-iui-active": isActive, type: type, ...rest },
41
19
  React.createElement("span", { className: 'iui-button-icon', "aria-hidden": true }, children)));
42
20
  });
43
21
  export default IconButton;
@@ -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.
@@ -32,9 +10,9 @@ import { Button } from '../Button';
32
10
  * @example
33
11
  * <IdeasButton />
34
12
  */
35
- export var IdeasButton = React.forwardRef(function (props, ref) {
36
- var _a = props.feedbackLabel, feedbackLabel = _a === void 0 ? 'Feedback' : _a, onClick = props.onClick, rest = __rest(props, ["feedbackLabel", "onClick"]);
13
+ export const IdeasButton = React.forwardRef((props, ref) => {
14
+ const { feedbackLabel = 'Feedback', onClick, ...rest } = props;
37
15
  useTheme();
38
- return (React.createElement(Button, __assign({ ref: ref, "data-iui-variant": 'idea', onClick: onClick, startIcon: React.createElement(SvgSmileyHappy, { "aria-hidden": true }) }, rest), feedbackLabel));
16
+ return (React.createElement(Button, { ref: ref, "data-iui-variant": 'idea', onClick: onClick, startIcon: React.createElement(SvgSmileyHappy, { "aria-hidden": true }), ...rest }, feedbackLabel));
39
17
  });
40
18
  export default IdeasButton;
@@ -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.
@@ -45,13 +23,13 @@ import '@itwin/itwinui-css/css/button.css';
45
23
  * <SplitButton onClick={onClick} menuItems={menuItems}>Default</SplitButton>
46
24
  * <SplitButton onClick={onClick} menuItems={menuItems} styleType='high-visibility'>High visibility</SplitButton>
47
25
  */
48
- export var SplitButton = React.forwardRef(function (props, forwardedRef) {
49
- var onClick = props.onClick, menuItems = props.menuItems, className = props.className, _a = props.menuPlacement, menuPlacement = _a === void 0 ? 'bottom-end' : _a, _b = props.styleType, styleType = _b === void 0 ? 'default' : _b, size = props.size, children = props.children, style = props.style, title = props.title, rest = __rest(props, ["onClick", "menuItems", "className", "menuPlacement", "styleType", "size", "children", "style", "title"]);
26
+ export const SplitButton = React.forwardRef((props, forwardedRef) => {
27
+ const { onClick, menuItems, className, menuPlacement = 'bottom-end', styleType = 'default', size, children, style, title, ...rest } = props;
50
28
  useTheme();
51
- var _c = React.useState(false), isMenuOpen = _c[0], setIsMenuOpen = _c[1];
52
- var _d = React.useState(0), menuWidth = _d[0], setMenuWidth = _d[1];
53
- var ref = React.useRef(null);
54
- React.useEffect(function () {
29
+ const [isMenuOpen, setIsMenuOpen] = React.useState(false);
30
+ const [menuWidth, setMenuWidth] = React.useState(0);
31
+ const ref = React.useRef(null);
32
+ React.useEffect(() => {
55
33
  if (ref.current) {
56
34
  setMenuWidth(ref.current.offsetWidth);
57
35
  }
@@ -59,8 +37,8 @@ export var SplitButton = React.forwardRef(function (props, forwardedRef) {
59
37
  return (React.createElement("span", { className: cx(className, 'iui-button-split', {
60
38
  'iui-disabled': props.disabled,
61
39
  }), style: style, title: title, ref: ref },
62
- React.createElement(Button, __assign({ styleType: styleType, size: size, onClick: onClick, ref: forwardedRef }, rest), children),
63
- React.createElement(DropdownMenu, { placement: menuPlacement, menuItems: menuItems, style: { minWidth: menuWidth }, onShow: React.useCallback(function () { return setIsMenuOpen(true); }, []), onHide: React.useCallback(function () { return setIsMenuOpen(false); }, []) },
40
+ React.createElement(Button, { styleType: styleType, size: size, onClick: onClick, ref: forwardedRef, ...rest }, children),
41
+ React.createElement(DropdownMenu, { placement: menuPlacement, menuItems: menuItems, style: { minWidth: menuWidth }, onShow: React.useCallback(() => setIsMenuOpen(true), []), onHide: React.useCallback(() => setIsMenuOpen(false), []) },
64
42
  React.createElement(IconButton, { styleType: styleType, size: size, disabled: props.disabled }, isMenuOpen ? React.createElement(SvgCaretUpSmall, null) : React.createElement(SvgCaretDownSmall, null)))));
65
43
  });
66
44
  export default SplitButton;
@@ -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.
@@ -52,18 +30,18 @@ import { CarouselNavigation } from './CarouselNavigation';
52
30
  * <Carousel.Navigation />
53
31
  * </Carousel>
54
32
  */
55
- export var Carousel = Object.assign(React.forwardRef(function (props, ref) {
56
- var _a = props.activeSlideIndex, userActiveIndex = _a === void 0 ? 0 : _a, onSlideChange = props.onSlideChange, className = props.className, children = props.children, rest = __rest(props, ["activeSlideIndex", "onSlideChange", "className", "children"]);
33
+ export const Carousel = Object.assign(React.forwardRef((props, ref) => {
34
+ const { activeSlideIndex: userActiveIndex = 0, onSlideChange, className, children, ...rest } = props;
57
35
  // Generate a stateful random id if not specified
58
- var id = React.useState(function () { var _a; return (_a = props.id) !== null && _a !== void 0 ? _a : "iui-carousel-".concat(getRandomValue(10)); })[0];
36
+ const [id] = React.useState(() => { var _a; return (_a = props.id) !== null && _a !== void 0 ? _a : `iui-carousel-${getRandomValue(10)}`; });
59
37
  useTheme();
60
- var isManuallyUpdating = React.useRef(false);
61
- var carouselRef = React.useRef(null);
62
- var refs = useMergedRefs(carouselRef, ref);
63
- var _b = React.useState(userActiveIndex), currentIndex = _b[0], setCurrentIndex = _b[1];
64
- var scrollToSlide = React.useRef(function () { }); // stub function populated in CarouselSlider
65
- var justMounted = React.useRef(true);
66
- React.useEffect(function () {
38
+ const isManuallyUpdating = React.useRef(false);
39
+ const carouselRef = React.useRef(null);
40
+ const refs = useMergedRefs(carouselRef, ref);
41
+ const [currentIndex, setCurrentIndex] = React.useState(userActiveIndex);
42
+ const scrollToSlide = React.useRef(() => { }); // stub function populated in CarouselSlider
43
+ const justMounted = React.useRef(true);
44
+ React.useEffect(() => {
67
45
  var _a;
68
46
  setCurrentIndex(userActiveIndex);
69
47
  scrollToSlide.current(userActiveIndex, {
@@ -76,52 +54,49 @@ export var Carousel = Object.assign(React.forwardRef(function (props, ref) {
76
54
  }
77
55
  justMounted.current = false;
78
56
  }, [userActiveIndex]);
79
- var _c = React.useState(0), slideCount = _c[0], setSlideCount = _c[1];
80
- var _d = React.useState({}), keysPressed = _d[0], setKeysPressed = _d[1];
81
- var handleKeyDown = function (event) {
57
+ const [slideCount, setSlideCount] = React.useState(0);
58
+ const [keysPressed, setKeysPressed] = React.useState({});
59
+ const handleKeyDown = (event) => {
82
60
  if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {
83
61
  return;
84
62
  }
85
63
  if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
86
- setKeysPressed(function (old) {
87
- var _a;
88
- return (__assign(__assign({}, old), (_a = {}, _a[event.key] = true, _a)));
89
- });
64
+ setKeysPressed((old) => ({ ...old, [event.key]: true }));
90
65
  }
91
66
  };
92
- var handleKeyUp = function (event) {
67
+ const handleKeyUp = (event) => {
93
68
  switch (event.key) {
94
69
  case 'ArrowLeft': {
95
- setKeysPressed(function (old) { return (__assign(__assign({}, old), { ArrowLeft: false })); });
96
- var prevIndex = (slideCount + currentIndex - 1) % slideCount;
70
+ setKeysPressed((old) => ({ ...old, ArrowLeft: false }));
71
+ const prevIndex = (slideCount + currentIndex - 1) % slideCount;
97
72
  scrollToSlide.current(prevIndex);
98
73
  setCurrentIndex(prevIndex);
99
74
  break;
100
75
  }
101
76
  case 'ArrowRight': {
102
- setKeysPressed(function (old) { return (__assign(__assign({}, old), { ArrowRight: false })); });
103
- var nextIndex = (slideCount + currentIndex + 1) % slideCount;
77
+ setKeysPressed((old) => ({ ...old, ArrowRight: false }));
78
+ const nextIndex = (slideCount + currentIndex + 1) % slideCount;
104
79
  scrollToSlide.current(nextIndex);
105
80
  setCurrentIndex(nextIndex);
106
81
  break;
107
82
  }
108
83
  }
109
84
  };
110
- var userOnSlideChange = React.useRef(onSlideChange);
111
- React.useEffect(function () {
85
+ const userOnSlideChange = React.useRef(onSlideChange);
86
+ React.useEffect(() => {
112
87
  var _a;
113
88
  (_a = userOnSlideChange.current) === null || _a === void 0 ? void 0 : _a.call(userOnSlideChange, currentIndex);
114
89
  }, [currentIndex]);
115
- return (React.createElement("section", __assign({ "aria-roledescription": 'carousel', tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: refs, className: cx('iui-carousel', className) }, rest, { id: id }),
90
+ return (React.createElement("section", { "aria-roledescription": 'carousel', tabIndex: 0, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, ref: refs, className: cx('iui-carousel', className), ...rest, id: id },
116
91
  React.createElement(CarouselContext.Provider, { value: {
117
- currentIndex: currentIndex,
118
- setCurrentIndex: setCurrentIndex,
119
- slideCount: slideCount,
120
- setSlideCount: setSlideCount,
121
- keysPressed: keysPressed,
92
+ currentIndex,
93
+ setCurrentIndex,
94
+ slideCount,
95
+ setSlideCount,
96
+ keysPressed,
122
97
  idPrefix: id,
123
- isManuallyUpdating: isManuallyUpdating,
124
- scrollToSlide: scrollToSlide,
98
+ isManuallyUpdating,
99
+ scrollToSlide,
125
100
  } }, children)));
126
101
  }), {
127
102
  Slider: CarouselSlider,
@@ -3,4 +3,4 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import React from 'react';
6
- export var CarouselContext = React.createContext(undefined);
6
+ export const CarouselContext = React.createContext(undefined);
@@ -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.
@@ -30,11 +8,11 @@ import cx from 'classnames';
30
8
  * `CarouselDot` is the actual "dot" component used to activate a slide on clicking.
31
9
  * It should be used as a child of `CarouselDotsList`.
32
10
  */
33
- export var CarouselDot = React.forwardRef(function (props, ref) {
34
- var isActive = props.isActive, isSmaller = props.isSmaller, isSmall = props.isSmall, className = props.className, rest = __rest(props, ["isActive", "isSmaller", "isSmall", "className"]);
35
- return (React.createElement("button", __assign({ type: 'button', role: 'tab', tabIndex: -1, className: cx('iui-carousel-navigation-dot', {
11
+ export const CarouselDot = React.forwardRef((props, ref) => {
12
+ const { isActive, isSmaller, isSmall, className, ...rest } = props;
13
+ return (React.createElement("button", { type: 'button', role: 'tab', tabIndex: -1, className: cx('iui-carousel-navigation-dot', {
36
14
  'iui-active': isActive,
37
15
  'iui-first': isSmaller,
38
16
  'iui-second': isSmall,
39
- }, className), "aria-selected": isActive, ref: ref }, rest)));
17
+ }, className), "aria-selected": isActive, ref: ref, ...rest }));
40
18
  });
@@ -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.
@@ -52,52 +30,47 @@ import '@itwin/itwinui-css/css/carousel.css';
52
30
  * onSlideChange={(i) => setCurrent(i)}
53
31
  * />
54
32
  */
55
- export var CarouselDotsList = React.forwardRef(function (props, ref) {
33
+ export const CarouselDotsList = React.forwardRef((props, ref) => {
56
34
  var _a, _b, _c;
57
- var userCurrentIndex = props.currentIndex, length = props.length, className = props.className, onSlideChange = props.onSlideChange, children = props.children, rest = __rest(props, ["currentIndex", "length", "className", "onSlideChange", "children"]);
35
+ const { currentIndex: userCurrentIndex, length, className, onSlideChange, children, ...rest } = props;
58
36
  useTheme();
59
- var context = React.useContext(CarouselContext);
60
- var slideCount = (_a = length !== null && length !== void 0 ? length : context === null || context === void 0 ? void 0 : context.slideCount) !== null && _a !== void 0 ? _a : React.Children.count(children);
61
- var currentIndex = (_b = userCurrentIndex !== null && userCurrentIndex !== void 0 ? userCurrentIndex : context === null || context === void 0 ? void 0 : context.currentIndex) !== null && _b !== void 0 ? _b : 0;
62
- var idPrefix = (_c = props.id) !== null && _c !== void 0 ? _c : context === null || context === void 0 ? void 0 : context.idPrefix;
63
- var handleSlideChange = React.useCallback(function (index) {
37
+ const context = React.useContext(CarouselContext);
38
+ const slideCount = (_a = length !== null && length !== void 0 ? length : context === null || context === void 0 ? void 0 : context.slideCount) !== null && _a !== void 0 ? _a : React.Children.count(children);
39
+ const currentIndex = (_b = userCurrentIndex !== null && userCurrentIndex !== void 0 ? userCurrentIndex : context === null || context === void 0 ? void 0 : context.currentIndex) !== null && _b !== void 0 ? _b : 0;
40
+ const idPrefix = (_c = props.id) !== null && _c !== void 0 ? _c : context === null || context === void 0 ? void 0 : context.idPrefix;
41
+ const handleSlideChange = React.useCallback((index) => {
64
42
  if (context) {
65
43
  context.setCurrentIndex(index);
66
44
  context.scrollToSlide.current(index);
67
45
  }
68
46
  onSlideChange === null || onSlideChange === void 0 ? void 0 : onSlideChange(index);
69
47
  }, [context, onSlideChange]);
70
- var justMounted = React.useRef(true);
71
- var _d = React.useState(slideCount), visibleCount = _d[0], setVisibleCount = _d[1];
72
- var listRef = React.useRef(null);
73
- var _e = React.useState(), width = _e[0], setWidth = _e[1];
74
- var _f = useResizeObserver(function (_a) {
75
- var width = _a.width;
48
+ const justMounted = React.useRef(true);
49
+ const [visibleCount, setVisibleCount] = React.useState(slideCount);
50
+ const listRef = React.useRef(null);
51
+ const [width, setWidth] = React.useState();
52
+ const [resizeRef, resizeObserver] = useResizeObserver(({ width }) => {
76
53
  if (!listRef.current) {
77
54
  return;
78
55
  }
79
56
  setWidth(width);
80
- var dotWidth = listRef.current.children[0].offsetWidth;
57
+ const dotWidth = listRef.current.children[0].offsetWidth;
81
58
  setVisibleCount(Math.floor(width / dotWidth));
82
- }), resizeRef = _f[0], resizeObserver = _f[1];
83
- React.useEffect(function () { return resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect(); }, [resizeObserver]);
84
- var refs = useMergedRefs(ref, resizeRef, listRef);
85
- var firstVisibleDotIndex = React.useMemo(function () {
86
- return getBoundedValue(currentIndex - Math.ceil(visibleCount / 2) + 1, 0, slideCount - visibleCount);
87
- }, [currentIndex, slideCount, visibleCount]);
88
- var lastVisibleDotIndex = React.useMemo(function () {
89
- return getBoundedValue(currentIndex + Math.floor(visibleCount / 2), visibleCount - 1, slideCount - 1);
90
- }, [currentIndex, slideCount, visibleCount]);
91
- var dots = React.useMemo(function () {
59
+ });
60
+ React.useEffect(() => resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect(), [resizeObserver]);
61
+ const refs = useMergedRefs(ref, resizeRef, listRef);
62
+ const firstVisibleDotIndex = React.useMemo(() => getBoundedValue(currentIndex - Math.ceil(visibleCount / 2) + 1, 0, slideCount - visibleCount), [currentIndex, slideCount, visibleCount]);
63
+ const lastVisibleDotIndex = React.useMemo(() => getBoundedValue(currentIndex + Math.floor(visibleCount / 2), visibleCount - 1, slideCount - 1), [currentIndex, slideCount, visibleCount]);
64
+ const dots = React.useMemo(() => {
92
65
  return Array(slideCount)
93
66
  .fill(null)
94
- .map(function (_, index) {
95
- var isFirstSmallDot = (index === firstVisibleDotIndex && index !== 0) ||
67
+ .map((_, index) => {
68
+ const isFirstSmallDot = (index === firstVisibleDotIndex && index !== 0) ||
96
69
  (index === lastVisibleDotIndex && index !== slideCount - 1);
97
- var isSecondSmallDot = (index === firstVisibleDotIndex + 1 && index !== 1) ||
70
+ const isSecondSmallDot = (index === firstVisibleDotIndex + 1 && index !== 1) ||
98
71
  (index === lastVisibleDotIndex - 1 && index !== slideCount - 2);
99
- var isClipped = index < firstVisibleDotIndex || index > lastVisibleDotIndex;
100
- return (React.createElement(CarouselDot, { key: index, "aria-label": "Slide ".concat(index), isActive: index === currentIndex, onClick: function () { return handleSlideChange(index); }, isSmall: isSecondSmallDot, isSmaller: isFirstSmallDot || isClipped, id: idPrefix && "".concat(idPrefix, "--dot-").concat(index), "aria-controls": idPrefix && "".concat(idPrefix, "--slide-").concat(index) }));
72
+ const isClipped = index < firstVisibleDotIndex || index > lastVisibleDotIndex;
73
+ return (React.createElement(CarouselDot, { key: index, "aria-label": `Slide ${index}`, isActive: index === currentIndex, onClick: () => handleSlideChange(index), isSmall: isSecondSmallDot, isSmaller: isFirstSmallDot || isClipped, id: idPrefix && `${idPrefix}--dot-${index}`, "aria-controls": idPrefix && `${idPrefix}--slide-${index}` }));
101
74
  });
102
75
  }, [
103
76
  slideCount,
@@ -107,13 +80,13 @@ export var CarouselDotsList = React.forwardRef(function (props, ref) {
107
80
  idPrefix,
108
81
  handleSlideChange,
109
82
  ]);
110
- React.useEffect(function () {
83
+ React.useEffect(() => {
111
84
  var _a, _b, _c;
112
- var firstDot = (_a = listRef.current) === null || _a === void 0 ? void 0 : _a.children[firstVisibleDotIndex];
85
+ const firstDot = (_a = listRef.current) === null || _a === void 0 ? void 0 : _a.children[firstVisibleDotIndex];
113
86
  if (!listRef.current || !firstDot) {
114
87
  return;
115
88
  }
116
- var motionOk = (_c = (_b = getWindow()) === null || _b === void 0 ? void 0 : _b.matchMedia('(prefers-reduced-motion: no-preference)')) === null || _c === void 0 ? void 0 : _c.matches;
89
+ const motionOk = (_c = (_b = getWindow()) === null || _b === void 0 ? void 0 : _b.matchMedia('(prefers-reduced-motion: no-preference)')) === null || _c === void 0 ? void 0 : _c.matches;
117
90
  listRef.current.scrollTo({
118
91
  left: firstDot.offsetLeft - listRef.current.offsetLeft,
119
92
  behavior: motionOk && !justMounted.current ? 'smooth' : 'auto',
@@ -123,5 +96,5 @@ export var CarouselDotsList = React.forwardRef(function (props, ref) {
123
96
  }
124
97
  }, [currentIndex, firstVisibleDotIndex, slideCount, visibleCount, width]);
125
98
  return (React.createElement(React.Fragment, null,
126
- React.createElement("div", __assign({ className: cx('iui-carousel-navigation-dots', className), role: 'tablist', "aria-label": 'Slides', ref: refs }, rest), children !== null && children !== void 0 ? children : dots)));
99
+ React.createElement("div", { className: cx('iui-carousel-navigation-dots', className), role: 'tablist', "aria-label": 'Slides', ref: refs, ...rest }, children !== null && children !== void 0 ? children : dots)));
127
100
  });