@itwin/itwinui-react 3.0.0-dev.0 → 3.0.0-dev.2

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 (602) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +28 -22
  3. package/cjs/core/Alert/Alert.d.ts +47 -29
  4. package/cjs/core/Alert/Alert.js +73 -22
  5. package/cjs/core/Avatar/Avatar.d.ts +0 -1
  6. package/cjs/core/Avatar/Avatar.js +1 -2
  7. package/cjs/core/AvatarGroup/AvatarGroup.d.ts +0 -1
  8. package/cjs/core/AvatarGroup/AvatarGroup.js +1 -2
  9. package/cjs/core/Backdrop/Backdrop.d.ts +0 -1
  10. package/cjs/core/Backdrop/Backdrop.js +0 -1
  11. package/cjs/core/Badge/Badge.d.ts +0 -1
  12. package/cjs/core/Badge/Badge.js +0 -1
  13. package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +0 -1
  14. package/cjs/core/Breadcrumbs/Breadcrumbs.js +2 -4
  15. package/cjs/core/ButtonGroup/ButtonGroup.d.ts +0 -1
  16. package/cjs/core/ButtonGroup/ButtonGroup.js +1 -5
  17. package/cjs/core/Buttons/Button/Button.d.ts +0 -1
  18. package/cjs/core/Buttons/Button/Button.js +0 -1
  19. package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +0 -1
  20. package/cjs/core/Buttons/DropdownButton/DropdownButton.js +3 -6
  21. package/cjs/core/Buttons/IconButton/IconButton.d.ts +0 -2
  22. package/cjs/core/Buttons/IconButton/IconButton.js +0 -2
  23. package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +0 -1
  24. package/cjs/core/Buttons/SplitButton/SplitButton.js +0 -1
  25. package/cjs/core/Carousel/Carousel.d.ts +2 -3
  26. package/cjs/core/Carousel/Carousel.js +3 -6
  27. package/cjs/core/Carousel/CarouselDotsList.d.ts +0 -1
  28. package/cjs/core/Carousel/CarouselDotsList.js +8 -11
  29. package/cjs/core/Carousel/CarouselNavigation.d.ts +2 -2
  30. package/cjs/core/Carousel/CarouselNavigation.js +3 -5
  31. package/cjs/core/Carousel/CarouselSlider.js +10 -15
  32. package/cjs/core/Checkbox/Checkbox.d.ts +0 -1
  33. package/cjs/core/Checkbox/Checkbox.js +0 -1
  34. package/cjs/core/ColorPicker/ColorBuilder.d.ts +0 -1
  35. package/cjs/core/ColorPicker/ColorBuilder.js +7 -11
  36. package/cjs/core/ColorPicker/ColorInputPanel.d.ts +0 -1
  37. package/cjs/core/ColorPicker/ColorInputPanel.js +12 -16
  38. package/cjs/core/ColorPicker/ColorPalette.d.ts +0 -1
  39. package/cjs/core/ColorPicker/ColorPalette.js +4 -7
  40. package/cjs/core/ColorPicker/ColorPicker.d.ts +0 -1
  41. package/cjs/core/ColorPicker/ColorPicker.js +3 -4
  42. package/cjs/core/ColorPicker/ColorSwatch.d.ts +0 -1
  43. package/cjs/core/ColorPicker/ColorSwatch.js +0 -1
  44. package/cjs/core/ComboBox/ComboBox.d.ts +0 -1
  45. package/cjs/core/ComboBox/ComboBox.js +25 -33
  46. package/cjs/core/ComboBox/ComboBoxDropdown.js +1 -2
  47. package/cjs/core/ComboBox/ComboBoxEndIcon.js +1 -1
  48. package/cjs/core/ComboBox/ComboBoxInput.js +21 -20
  49. package/cjs/core/ComboBox/ComboBoxMenu.js +3 -4
  50. package/cjs/core/ComboBox/ComboBoxMenuItem.js +2 -2
  51. package/cjs/core/ComboBox/helpers.js +4 -5
  52. package/cjs/core/DatePicker/DatePicker.d.ts +0 -1
  53. package/cjs/core/DatePicker/DatePicker.js +32 -33
  54. package/cjs/core/Dialog/Dialog.d.ts +0 -1
  55. package/cjs/core/Dialog/Dialog.js +12 -5
  56. package/cjs/core/Dialog/DialogBackdrop.js +1 -1
  57. package/cjs/core/Dialog/DialogButtonBar.d.ts +0 -1
  58. package/cjs/core/Dialog/DialogButtonBar.js +0 -1
  59. package/cjs/core/Dialog/DialogContent.d.ts +0 -1
  60. package/cjs/core/Dialog/DialogContent.js +0 -1
  61. package/cjs/core/Dialog/DialogContext.d.ts +15 -0
  62. package/cjs/core/Dialog/DialogMain.d.ts +0 -1
  63. package/cjs/core/Dialog/DialogMain.js +18 -25
  64. package/cjs/core/Dialog/DialogTitleBar.d.ts +0 -1
  65. package/cjs/core/Dialog/DialogTitleBar.js +0 -1
  66. package/cjs/core/Dialog/DialogTitleBarTitle.d.ts +0 -1
  67. package/cjs/core/Dialog/DialogTitleBarTitle.js +0 -1
  68. package/cjs/core/DropdownMenu/DropdownMenu.js +6 -8
  69. package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +5 -1
  70. package/cjs/core/ExpandableBlock/ExpandableBlock.js +8 -6
  71. package/cjs/core/Fieldset/Fieldset.d.ts +0 -1
  72. package/cjs/core/Fieldset/Fieldset.js +0 -1
  73. package/cjs/core/FileUpload/FileEmptyCard.js +1 -1
  74. package/cjs/core/FileUpload/FileUpload.d.ts +0 -1
  75. package/cjs/core/FileUpload/FileUpload.js +3 -7
  76. package/cjs/core/FileUpload/FileUploadCard.d.ts +0 -1
  77. package/cjs/core/FileUpload/FileUploadCard.js +10 -12
  78. package/cjs/core/FileUpload/FileUploadTemplate.d.ts +0 -1
  79. package/cjs/core/FileUpload/FileUploadTemplate.js +0 -1
  80. package/cjs/core/Footer/Footer.d.ts +0 -1
  81. package/cjs/core/Footer/Footer.js +0 -1
  82. package/cjs/core/Footer/FooterItem.d.ts +0 -1
  83. package/cjs/core/Footer/FooterItem.js +0 -1
  84. package/cjs/core/Footer/FooterList.d.ts +0 -1
  85. package/cjs/core/Footer/FooterList.js +0 -1
  86. package/cjs/core/Footer/FooterSeparator.d.ts +0 -1
  87. package/cjs/core/Footer/FooterSeparator.js +0 -1
  88. package/cjs/core/Header/Header.d.ts +0 -1
  89. package/cjs/core/Header/Header.js +0 -1
  90. package/cjs/core/Header/HeaderBreadcrumbs.d.ts +0 -1
  91. package/cjs/core/Header/HeaderBreadcrumbs.js +0 -1
  92. package/cjs/core/Header/HeaderButton.d.ts +0 -1
  93. package/cjs/core/Header/HeaderButton.js +0 -1
  94. package/cjs/core/Header/HeaderLogo.d.ts +0 -1
  95. package/cjs/core/Header/HeaderLogo.js +0 -1
  96. package/cjs/core/InformationPanel/InformationPanel.d.ts +0 -1
  97. package/cjs/core/InformationPanel/InformationPanel.js +1 -5
  98. package/cjs/core/InformationPanel/InformationPanelBody.d.ts +0 -1
  99. package/cjs/core/InformationPanel/InformationPanelBody.js +0 -1
  100. package/cjs/core/InformationPanel/InformationPanelContent.d.ts +0 -1
  101. package/cjs/core/InformationPanel/InformationPanelContent.js +0 -1
  102. package/cjs/core/InformationPanel/InformationPanelHeader.d.ts +0 -1
  103. package/cjs/core/InformationPanel/InformationPanelHeader.js +0 -1
  104. package/cjs/core/InformationPanel/InformationPanelWrapper.d.ts +0 -1
  105. package/cjs/core/InformationPanel/InformationPanelWrapper.js +0 -1
  106. package/cjs/core/Input/Input.d.ts +0 -1
  107. package/cjs/core/Input/Input.js +0 -1
  108. package/cjs/core/InputGroup/InputGroup.d.ts +0 -1
  109. package/cjs/core/InputGroup/InputGroup.js +0 -1
  110. package/cjs/core/Label/Label.d.ts +0 -1
  111. package/cjs/core/Label/Label.js +0 -1
  112. package/cjs/core/LabeledInput/LabeledInput.d.ts +0 -1
  113. package/cjs/core/LabeledInput/LabeledInput.js +1 -2
  114. package/cjs/core/LabeledSelect/LabeledSelect.d.ts +0 -1
  115. package/cjs/core/LabeledSelect/LabeledSelect.js +0 -1
  116. package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +0 -1
  117. package/cjs/core/LabeledTextarea/LabeledTextarea.js +1 -2
  118. package/cjs/core/List/List.d.ts +0 -1
  119. package/cjs/core/List/List.js +0 -1
  120. package/cjs/core/List/ListItem.d.ts +0 -1
  121. package/cjs/core/List/ListItem.js +0 -1
  122. package/cjs/core/Menu/Menu.d.ts +0 -1
  123. package/cjs/core/Menu/Menu.js +3 -5
  124. package/cjs/core/Menu/MenuDivider.d.ts +0 -1
  125. package/cjs/core/Menu/MenuDivider.js +0 -1
  126. package/cjs/core/Menu/MenuExtraContent.d.ts +0 -1
  127. package/cjs/core/Menu/MenuExtraContent.js +0 -1
  128. package/cjs/core/Menu/MenuItem.d.ts +0 -1
  129. package/cjs/core/Menu/MenuItem.js +8 -12
  130. package/cjs/core/Menu/MenuItemSkeleton.d.ts +0 -1
  131. package/cjs/core/Menu/MenuItemSkeleton.js +0 -1
  132. package/cjs/core/Modal/Modal.d.ts +8 -10
  133. package/cjs/core/Modal/Modal.js +7 -18
  134. package/cjs/core/NonIdealState/NonIdealState.d.ts +0 -1
  135. package/cjs/core/NonIdealState/NonIdealState.js +0 -1
  136. package/cjs/core/NotificationMarker/NotificationMarker.d.ts +0 -1
  137. package/cjs/core/NotificationMarker/NotificationMarker.js +0 -1
  138. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +0 -1
  139. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +0 -1
  140. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +0 -1
  141. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -1
  142. package/cjs/core/Radio/Radio.d.ts +0 -1
  143. package/cjs/core/Radio/Radio.js +0 -1
  144. package/cjs/core/RadioTiles/RadioTile.d.ts +0 -1
  145. package/cjs/core/RadioTiles/RadioTile.js +0 -1
  146. package/cjs/core/RadioTiles/RadioTileGroup.d.ts +0 -1
  147. package/cjs/core/RadioTiles/RadioTileGroup.js +0 -1
  148. package/cjs/core/SearchBox/SearchBox.d.ts +0 -1
  149. package/cjs/core/SearchBox/SearchBox.js +12 -13
  150. package/cjs/core/Select/Select.d.ts +0 -1
  151. package/cjs/core/Select/Select.js +12 -18
  152. package/cjs/core/Select/SelectTag.d.ts +0 -1
  153. package/cjs/core/Select/SelectTag.js +0 -1
  154. package/cjs/core/SideNavigation/SideNavigation.d.ts +0 -1
  155. package/cjs/core/SideNavigation/SideNavigation.js +2 -3
  156. package/cjs/core/SideNavigation/SidenavButton.d.ts +0 -1
  157. package/cjs/core/SideNavigation/SidenavButton.js +0 -1
  158. package/cjs/core/SideNavigation/SidenavSubmenu.d.ts +0 -1
  159. package/cjs/core/SideNavigation/SidenavSubmenu.js +0 -1
  160. package/cjs/core/SideNavigation/SidenavSubmenuHeader.d.ts +0 -1
  161. package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +0 -1
  162. package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +0 -1
  163. package/cjs/core/SkipToContentLink/SkipToContentLink.js +0 -1
  164. package/cjs/core/Slider/Slider.d.ts +0 -1
  165. package/cjs/core/Slider/Slider.js +16 -20
  166. package/cjs/core/Slider/Thumb.js +1 -1
  167. package/cjs/core/Slider/Track.js +2 -1
  168. package/cjs/core/StatusMessage/StatusMessage.js +1 -1
  169. package/cjs/core/Stepper/Stepper.d.ts +0 -1
  170. package/cjs/core/Stepper/Stepper.js +1 -2
  171. package/cjs/core/Stepper/StepperStep.js +1 -1
  172. package/cjs/core/Stepper/WorkflowDiagram.d.ts +0 -1
  173. package/cjs/core/Stepper/WorkflowDiagram.js +0 -1
  174. package/cjs/core/Surface/Surface.d.ts +0 -1
  175. package/cjs/core/Surface/Surface.js +0 -1
  176. package/cjs/core/Table/Table.d.ts +0 -1
  177. package/cjs/core/Table/Table.js +33 -34
  178. package/cjs/core/Table/TableCell.js +3 -2
  179. package/cjs/core/Table/TablePaginator.d.ts +0 -1
  180. package/cjs/core/Table/TablePaginator.js +10 -12
  181. package/cjs/core/Table/TableRowMemoized.js +40 -47
  182. package/cjs/core/Table/actionHandlers/expandHandler.js +3 -3
  183. package/cjs/core/Table/actionHandlers/filterHandler.js +4 -5
  184. package/cjs/core/Table/actionHandlers/selectHandler.js +6 -6
  185. package/cjs/core/Table/cells/DefaultCell.js +4 -3
  186. package/cjs/core/Table/cells/EditableCell.js +7 -13
  187. package/cjs/core/Table/columns/actionColumn.js +3 -6
  188. package/cjs/core/Table/columns/expanderColumn.js +3 -3
  189. package/cjs/core/Table/columns/selectionColumn.js +4 -4
  190. package/cjs/core/Table/filters/BaseFilter.d.ts +0 -1
  191. package/cjs/core/Table/filters/BaseFilter.js +1 -2
  192. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +2 -4
  193. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +0 -1
  194. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -4
  195. package/cjs/core/Table/filters/FilterButtonBar.d.ts +0 -1
  196. package/cjs/core/Table/filters/FilterButtonBar.js +1 -2
  197. package/cjs/core/Table/filters/FilterToggle.d.ts +0 -1
  198. package/cjs/core/Table/filters/FilterToggle.js +0 -1
  199. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +0 -1
  200. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +2 -4
  201. package/cjs/core/Table/filters/TextFilter/TextFilter.d.ts +0 -1
  202. package/cjs/core/Table/filters/TextFilter/TextFilter.js +1 -3
  203. package/cjs/core/Table/hooks/useColumnDragAndDrop.js +8 -4
  204. package/cjs/core/Table/hooks/useResizeColumns.js +16 -22
  205. package/cjs/core/Table/hooks/useScrollToRow.js +1 -2
  206. package/cjs/core/Table/hooks/useStickyColumns.js +3 -5
  207. package/cjs/core/Table/hooks/useSubRowFiltering.js +2 -4
  208. package/cjs/core/Tabs/Tab.d.ts +0 -1
  209. package/cjs/core/Tabs/Tab.js +0 -1
  210. package/cjs/core/Tabs/Tabs.d.ts +0 -1
  211. package/cjs/core/Tabs/Tabs.js +16 -19
  212. package/cjs/core/Tag/Tag.d.ts +0 -1
  213. package/cjs/core/Tag/Tag.js +0 -1
  214. package/cjs/core/Tag/TagContainer.d.ts +0 -1
  215. package/cjs/core/Tag/TagContainer.js +0 -1
  216. package/cjs/core/Textarea/Textarea.d.ts +0 -1
  217. package/cjs/core/Textarea/Textarea.js +0 -1
  218. package/cjs/core/ThemeProvider/ThemeContext.d.ts +1 -1
  219. package/cjs/core/ThemeProvider/ThemeProvider.d.ts +2 -5
  220. package/cjs/core/ThemeProvider/ThemeProvider.js +11 -15
  221. package/cjs/core/Tile/Tile.d.ts +0 -1
  222. package/cjs/core/Tile/Tile.js +3 -7
  223. package/cjs/core/TimePicker/TimePicker.d.ts +0 -1
  224. package/cjs/core/TimePicker/TimePicker.js +13 -14
  225. package/cjs/core/Toast/Toast.d.ts +0 -1
  226. package/cjs/core/Toast/Toast.js +2 -4
  227. package/cjs/core/Toast/ToastWrapper.d.ts +0 -1
  228. package/cjs/core/Toast/ToastWrapper.js +0 -1
  229. package/cjs/core/Toast/Toaster.js +6 -11
  230. package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +0 -1
  231. package/cjs/core/ToggleSwitch/ToggleSwitch.js +1 -3
  232. package/cjs/core/Tooltip/Tooltip.d.ts +0 -1
  233. package/cjs/core/Tooltip/Tooltip.js +0 -1
  234. package/cjs/core/TransferList/TransferList.d.ts +69 -0
  235. package/cjs/core/TransferList/TransferList.js +147 -0
  236. package/cjs/core/TransferList/index.d.ts +3 -0
  237. package/cjs/core/TransferList/index.js +10 -0
  238. package/cjs/core/Tree/Tree.d.ts +0 -1
  239. package/cjs/core/Tree/Tree.js +9 -14
  240. package/cjs/core/Tree/TreeNode.d.ts +0 -1
  241. package/cjs/core/Tree/TreeNode.js +9 -11
  242. package/cjs/core/Tree/TreeNodeExpander.d.ts +0 -1
  243. package/cjs/core/Tree/TreeNodeExpander.js +0 -1
  244. package/cjs/core/Typography/Anchor/Anchor.d.ts +0 -1
  245. package/cjs/core/Typography/Anchor/Anchor.js +0 -1
  246. package/cjs/core/Typography/Blockquote/Blockquote.d.ts +0 -1
  247. package/cjs/core/Typography/Blockquote/Blockquote.js +0 -1
  248. package/cjs/core/Typography/Code/Code.d.ts +0 -1
  249. package/cjs/core/Typography/Code/Code.js +0 -1
  250. package/cjs/core/Typography/Kbd/Kbd.d.ts +0 -1
  251. package/cjs/core/Typography/Kbd/Kbd.js +0 -1
  252. package/cjs/core/Typography/Text/Text.d.ts +0 -1
  253. package/cjs/core/Typography/Text/Text.js +0 -1
  254. package/cjs/core/index.d.ts +1 -0
  255. package/cjs/core/index.js +118 -116
  256. package/cjs/core/utils/color/ColorValue.js +9 -15
  257. package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.js +2 -3
  258. package/cjs/core/utils/components/Divider.d.ts +0 -1
  259. package/cjs/core/utils/components/Divider.js +0 -1
  260. package/cjs/core/utils/components/Flex.d.ts +0 -1
  261. package/cjs/core/utils/components/Flex.js +0 -1
  262. package/cjs/core/utils/components/FocusTrap.js +4 -4
  263. package/cjs/core/utils/components/Icon.d.ts +0 -1
  264. package/cjs/core/utils/components/Icon.js +0 -1
  265. package/cjs/core/utils/components/InputContainer.d.ts +0 -1
  266. package/cjs/core/utils/components/InputContainer.js +0 -1
  267. package/cjs/core/utils/components/InputFlexContainer.d.ts +0 -1
  268. package/cjs/core/utils/components/InputFlexContainer.js +0 -1
  269. package/cjs/core/utils/components/LinkAction.d.ts +0 -1
  270. package/cjs/core/utils/components/LinkAction.js +0 -1
  271. package/cjs/core/utils/components/MiddleTextTruncation.js +1 -2
  272. package/cjs/core/utils/components/Popover.d.ts +0 -1
  273. package/cjs/core/utils/components/Popover.js +5 -9
  274. package/cjs/core/utils/components/Resizer.js +7 -6
  275. package/cjs/core/utils/components/VirtualScroll.js +14 -21
  276. package/cjs/core/utils/components/VisuallyHidden.d.ts +0 -1
  277. package/cjs/core/utils/components/VisuallyHidden.js +0 -1
  278. package/cjs/core/utils/functions/dom.d.ts +6 -0
  279. package/cjs/core/utils/functions/dom.js +24 -6
  280. package/cjs/core/utils/functions/index.d.ts +0 -1
  281. package/cjs/core/utils/functions/index.js +0 -1
  282. package/cjs/core/utils/functions/polymorphic.js +9 -1
  283. package/cjs/core/utils/functions/supports.js +1 -1
  284. package/cjs/core/utils/hooks/index.d.ts +0 -1
  285. package/cjs/core/utils/hooks/index.js +0 -1
  286. package/cjs/core/utils/hooks/useContainerWidth.js +1 -1
  287. package/cjs/core/utils/hooks/useDragAndDrop.js +8 -10
  288. package/cjs/core/utils/hooks/useEventListener.js +1 -1
  289. package/cjs/core/utils/hooks/useGlobals.d.ts +9 -4
  290. package/cjs/core/utils/hooks/useGlobals.js +6 -6
  291. package/cjs/core/utils/hooks/useId.js +1 -2
  292. package/cjs/core/utils/hooks/useIntersection.js +2 -3
  293. package/cjs/core/utils/hooks/useMediaQuery.js +6 -8
  294. package/cjs/core/utils/hooks/useOverflow.js +1 -2
  295. package/cjs/core/utils/hooks/useResizeObserver.js +3 -4
  296. package/cjs/styles.d.ts +5 -0
  297. package/cjs/styles.js +450 -0
  298. package/esm/core/Alert/Alert.d.ts +47 -29
  299. package/esm/core/Alert/Alert.js +74 -23
  300. package/esm/core/Avatar/Avatar.d.ts +0 -1
  301. package/esm/core/Avatar/Avatar.js +1 -2
  302. package/esm/core/AvatarGroup/AvatarGroup.d.ts +0 -1
  303. package/esm/core/AvatarGroup/AvatarGroup.js +1 -2
  304. package/esm/core/Backdrop/Backdrop.d.ts +0 -1
  305. package/esm/core/Backdrop/Backdrop.js +0 -1
  306. package/esm/core/Badge/Badge.d.ts +0 -1
  307. package/esm/core/Badge/Badge.js +0 -1
  308. package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +0 -1
  309. package/esm/core/Breadcrumbs/Breadcrumbs.js +2 -4
  310. package/esm/core/ButtonGroup/ButtonGroup.d.ts +0 -1
  311. package/esm/core/ButtonGroup/ButtonGroup.js +1 -5
  312. package/esm/core/Buttons/Button/Button.d.ts +0 -1
  313. package/esm/core/Buttons/Button/Button.js +0 -1
  314. package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +0 -1
  315. package/esm/core/Buttons/DropdownButton/DropdownButton.js +3 -6
  316. package/esm/core/Buttons/IconButton/IconButton.d.ts +0 -2
  317. package/esm/core/Buttons/IconButton/IconButton.js +0 -2
  318. package/esm/core/Buttons/SplitButton/SplitButton.d.ts +0 -1
  319. package/esm/core/Buttons/SplitButton/SplitButton.js +0 -1
  320. package/esm/core/Carousel/Carousel.d.ts +2 -3
  321. package/esm/core/Carousel/Carousel.js +3 -6
  322. package/esm/core/Carousel/CarouselDotsList.d.ts +0 -1
  323. package/esm/core/Carousel/CarouselDotsList.js +8 -11
  324. package/esm/core/Carousel/CarouselNavigation.d.ts +2 -2
  325. package/esm/core/Carousel/CarouselNavigation.js +3 -5
  326. package/esm/core/Carousel/CarouselSlider.js +10 -15
  327. package/esm/core/Checkbox/Checkbox.d.ts +0 -1
  328. package/esm/core/Checkbox/Checkbox.js +0 -1
  329. package/esm/core/ColorPicker/ColorBuilder.d.ts +0 -1
  330. package/esm/core/ColorPicker/ColorBuilder.js +7 -11
  331. package/esm/core/ColorPicker/ColorInputPanel.d.ts +0 -1
  332. package/esm/core/ColorPicker/ColorInputPanel.js +12 -16
  333. package/esm/core/ColorPicker/ColorPalette.d.ts +0 -1
  334. package/esm/core/ColorPicker/ColorPalette.js +4 -7
  335. package/esm/core/ColorPicker/ColorPicker.d.ts +0 -1
  336. package/esm/core/ColorPicker/ColorPicker.js +3 -4
  337. package/esm/core/ColorPicker/ColorSwatch.d.ts +0 -1
  338. package/esm/core/ColorPicker/ColorSwatch.js +0 -1
  339. package/esm/core/ComboBox/ComboBox.d.ts +0 -1
  340. package/esm/core/ComboBox/ComboBox.js +25 -33
  341. package/esm/core/ComboBox/ComboBoxDropdown.js +1 -2
  342. package/esm/core/ComboBox/ComboBoxEndIcon.js +1 -1
  343. package/esm/core/ComboBox/ComboBoxInput.js +21 -20
  344. package/esm/core/ComboBox/ComboBoxMenu.js +3 -4
  345. package/esm/core/ComboBox/ComboBoxMenuItem.js +2 -2
  346. package/esm/core/ComboBox/helpers.js +4 -5
  347. package/esm/core/DatePicker/DatePicker.d.ts +0 -1
  348. package/esm/core/DatePicker/DatePicker.js +32 -33
  349. package/esm/core/Dialog/Dialog.d.ts +0 -1
  350. package/esm/core/Dialog/Dialog.js +13 -6
  351. package/esm/core/Dialog/DialogBackdrop.js +1 -1
  352. package/esm/core/Dialog/DialogButtonBar.d.ts +0 -1
  353. package/esm/core/Dialog/DialogButtonBar.js +0 -1
  354. package/esm/core/Dialog/DialogContent.d.ts +0 -1
  355. package/esm/core/Dialog/DialogContent.js +0 -1
  356. package/esm/core/Dialog/DialogContext.d.ts +15 -0
  357. package/esm/core/Dialog/DialogMain.d.ts +0 -1
  358. package/esm/core/Dialog/DialogMain.js +18 -25
  359. package/esm/core/Dialog/DialogTitleBar.d.ts +0 -1
  360. package/esm/core/Dialog/DialogTitleBar.js +0 -1
  361. package/esm/core/Dialog/DialogTitleBarTitle.d.ts +0 -1
  362. package/esm/core/Dialog/DialogTitleBarTitle.js +0 -1
  363. package/esm/core/DropdownMenu/DropdownMenu.js +6 -8
  364. package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +5 -1
  365. package/esm/core/ExpandableBlock/ExpandableBlock.js +8 -6
  366. package/esm/core/Fieldset/Fieldset.d.ts +0 -1
  367. package/esm/core/Fieldset/Fieldset.js +0 -1
  368. package/esm/core/FileUpload/FileEmptyCard.js +1 -1
  369. package/esm/core/FileUpload/FileUpload.d.ts +0 -1
  370. package/esm/core/FileUpload/FileUpload.js +3 -7
  371. package/esm/core/FileUpload/FileUploadCard.d.ts +0 -1
  372. package/esm/core/FileUpload/FileUploadCard.js +10 -12
  373. package/esm/core/FileUpload/FileUploadTemplate.d.ts +0 -1
  374. package/esm/core/FileUpload/FileUploadTemplate.js +0 -1
  375. package/esm/core/Footer/Footer.d.ts +0 -1
  376. package/esm/core/Footer/Footer.js +0 -1
  377. package/esm/core/Footer/FooterItem.d.ts +0 -1
  378. package/esm/core/Footer/FooterItem.js +0 -1
  379. package/esm/core/Footer/FooterList.d.ts +0 -1
  380. package/esm/core/Footer/FooterList.js +0 -1
  381. package/esm/core/Footer/FooterSeparator.d.ts +0 -1
  382. package/esm/core/Footer/FooterSeparator.js +0 -1
  383. package/esm/core/Header/Header.d.ts +0 -1
  384. package/esm/core/Header/Header.js +0 -1
  385. package/esm/core/Header/HeaderBreadcrumbs.d.ts +0 -1
  386. package/esm/core/Header/HeaderBreadcrumbs.js +0 -1
  387. package/esm/core/Header/HeaderButton.d.ts +0 -1
  388. package/esm/core/Header/HeaderButton.js +0 -1
  389. package/esm/core/Header/HeaderLogo.d.ts +0 -1
  390. package/esm/core/Header/HeaderLogo.js +0 -1
  391. package/esm/core/InformationPanel/InformationPanel.d.ts +0 -1
  392. package/esm/core/InformationPanel/InformationPanel.js +1 -5
  393. package/esm/core/InformationPanel/InformationPanelBody.d.ts +0 -1
  394. package/esm/core/InformationPanel/InformationPanelBody.js +0 -1
  395. package/esm/core/InformationPanel/InformationPanelContent.d.ts +0 -1
  396. package/esm/core/InformationPanel/InformationPanelContent.js +0 -1
  397. package/esm/core/InformationPanel/InformationPanelHeader.d.ts +0 -1
  398. package/esm/core/InformationPanel/InformationPanelHeader.js +0 -1
  399. package/esm/core/InformationPanel/InformationPanelWrapper.d.ts +0 -1
  400. package/esm/core/InformationPanel/InformationPanelWrapper.js +0 -1
  401. package/esm/core/Input/Input.d.ts +0 -1
  402. package/esm/core/Input/Input.js +0 -1
  403. package/esm/core/InputGroup/InputGroup.d.ts +0 -1
  404. package/esm/core/InputGroup/InputGroup.js +0 -1
  405. package/esm/core/Label/Label.d.ts +0 -1
  406. package/esm/core/Label/Label.js +0 -1
  407. package/esm/core/LabeledInput/LabeledInput.d.ts +0 -1
  408. package/esm/core/LabeledInput/LabeledInput.js +1 -2
  409. package/esm/core/LabeledSelect/LabeledSelect.d.ts +0 -1
  410. package/esm/core/LabeledSelect/LabeledSelect.js +0 -1
  411. package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +0 -1
  412. package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -2
  413. package/esm/core/List/List.d.ts +0 -1
  414. package/esm/core/List/List.js +0 -1
  415. package/esm/core/List/ListItem.d.ts +0 -1
  416. package/esm/core/List/ListItem.js +0 -1
  417. package/esm/core/Menu/Menu.d.ts +0 -1
  418. package/esm/core/Menu/Menu.js +3 -5
  419. package/esm/core/Menu/MenuDivider.d.ts +0 -1
  420. package/esm/core/Menu/MenuDivider.js +0 -1
  421. package/esm/core/Menu/MenuExtraContent.d.ts +0 -1
  422. package/esm/core/Menu/MenuExtraContent.js +0 -1
  423. package/esm/core/Menu/MenuItem.d.ts +0 -1
  424. package/esm/core/Menu/MenuItem.js +8 -12
  425. package/esm/core/Menu/MenuItemSkeleton.d.ts +0 -1
  426. package/esm/core/Menu/MenuItemSkeleton.js +0 -1
  427. package/esm/core/Modal/Modal.d.ts +8 -10
  428. package/esm/core/Modal/Modal.js +3 -11
  429. package/esm/core/NonIdealState/NonIdealState.d.ts +0 -1
  430. package/esm/core/NonIdealState/NonIdealState.js +0 -1
  431. package/esm/core/NotificationMarker/NotificationMarker.d.ts +0 -1
  432. package/esm/core/NotificationMarker/NotificationMarker.js +0 -1
  433. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +0 -1
  434. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +0 -1
  435. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +0 -1
  436. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -1
  437. package/esm/core/Radio/Radio.d.ts +0 -1
  438. package/esm/core/Radio/Radio.js +0 -1
  439. package/esm/core/RadioTiles/RadioTile.d.ts +0 -1
  440. package/esm/core/RadioTiles/RadioTile.js +0 -1
  441. package/esm/core/RadioTiles/RadioTileGroup.d.ts +0 -1
  442. package/esm/core/RadioTiles/RadioTileGroup.js +0 -1
  443. package/esm/core/SearchBox/SearchBox.d.ts +0 -1
  444. package/esm/core/SearchBox/SearchBox.js +12 -13
  445. package/esm/core/Select/Select.d.ts +0 -1
  446. package/esm/core/Select/Select.js +12 -18
  447. package/esm/core/Select/SelectTag.d.ts +0 -1
  448. package/esm/core/Select/SelectTag.js +0 -1
  449. package/esm/core/SideNavigation/SideNavigation.d.ts +0 -1
  450. package/esm/core/SideNavigation/SideNavigation.js +2 -3
  451. package/esm/core/SideNavigation/SidenavButton.d.ts +0 -1
  452. package/esm/core/SideNavigation/SidenavButton.js +0 -1
  453. package/esm/core/SideNavigation/SidenavSubmenu.d.ts +0 -1
  454. package/esm/core/SideNavigation/SidenavSubmenu.js +0 -1
  455. package/esm/core/SideNavigation/SidenavSubmenuHeader.d.ts +0 -1
  456. package/esm/core/SideNavigation/SidenavSubmenuHeader.js +0 -1
  457. package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +0 -1
  458. package/esm/core/SkipToContentLink/SkipToContentLink.js +0 -1
  459. package/esm/core/Slider/Slider.d.ts +0 -1
  460. package/esm/core/Slider/Slider.js +16 -20
  461. package/esm/core/Slider/Thumb.js +1 -1
  462. package/esm/core/Slider/Track.js +2 -1
  463. package/esm/core/StatusMessage/StatusMessage.js +1 -1
  464. package/esm/core/Stepper/Stepper.d.ts +0 -1
  465. package/esm/core/Stepper/Stepper.js +1 -2
  466. package/esm/core/Stepper/StepperStep.js +1 -1
  467. package/esm/core/Stepper/WorkflowDiagram.d.ts +0 -1
  468. package/esm/core/Stepper/WorkflowDiagram.js +0 -1
  469. package/esm/core/Surface/Surface.d.ts +0 -1
  470. package/esm/core/Surface/Surface.js +0 -1
  471. package/esm/core/Table/Table.d.ts +0 -1
  472. package/esm/core/Table/Table.js +34 -35
  473. package/esm/core/Table/TableCell.js +3 -2
  474. package/esm/core/Table/TablePaginator.d.ts +0 -1
  475. package/esm/core/Table/TablePaginator.js +11 -13
  476. package/esm/core/Table/TableRowMemoized.js +41 -48
  477. package/esm/core/Table/actionHandlers/expandHandler.js +3 -3
  478. package/esm/core/Table/actionHandlers/filterHandler.js +4 -5
  479. package/esm/core/Table/actionHandlers/selectHandler.js +6 -6
  480. package/esm/core/Table/cells/DefaultCell.js +4 -3
  481. package/esm/core/Table/cells/EditableCell.js +8 -14
  482. package/esm/core/Table/columns/actionColumn.js +3 -6
  483. package/esm/core/Table/columns/expanderColumn.js +3 -3
  484. package/esm/core/Table/columns/selectionColumn.js +4 -4
  485. package/esm/core/Table/filters/BaseFilter.d.ts +0 -1
  486. package/esm/core/Table/filters/BaseFilter.js +2 -3
  487. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +2 -4
  488. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +0 -1
  489. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -4
  490. package/esm/core/Table/filters/FilterButtonBar.d.ts +0 -1
  491. package/esm/core/Table/filters/FilterButtonBar.js +2 -3
  492. package/esm/core/Table/filters/FilterToggle.d.ts +0 -1
  493. package/esm/core/Table/filters/FilterToggle.js +0 -1
  494. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +0 -1
  495. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +2 -4
  496. package/esm/core/Table/filters/TextFilter/TextFilter.d.ts +0 -1
  497. package/esm/core/Table/filters/TextFilter/TextFilter.js +1 -3
  498. package/esm/core/Table/hooks/useColumnDragAndDrop.js +5 -4
  499. package/esm/core/Table/hooks/useResizeColumns.js +16 -22
  500. package/esm/core/Table/hooks/useScrollToRow.js +1 -2
  501. package/esm/core/Table/hooks/useStickyColumns.js +3 -5
  502. package/esm/core/Table/hooks/useSubRowFiltering.js +2 -4
  503. package/esm/core/Tabs/Tab.d.ts +0 -1
  504. package/esm/core/Tabs/Tab.js +0 -1
  505. package/esm/core/Tabs/Tabs.d.ts +0 -1
  506. package/esm/core/Tabs/Tabs.js +16 -19
  507. package/esm/core/Tag/Tag.d.ts +0 -1
  508. package/esm/core/Tag/Tag.js +0 -1
  509. package/esm/core/Tag/TagContainer.d.ts +0 -1
  510. package/esm/core/Tag/TagContainer.js +0 -1
  511. package/esm/core/Textarea/Textarea.d.ts +0 -1
  512. package/esm/core/Textarea/Textarea.js +0 -1
  513. package/esm/core/ThemeProvider/ThemeContext.d.ts +1 -1
  514. package/esm/core/ThemeProvider/ThemeProvider.d.ts +2 -5
  515. package/esm/core/ThemeProvider/ThemeProvider.js +12 -16
  516. package/esm/core/Tile/Tile.d.ts +0 -1
  517. package/esm/core/Tile/Tile.js +3 -7
  518. package/esm/core/TimePicker/TimePicker.d.ts +0 -1
  519. package/esm/core/TimePicker/TimePicker.js +13 -14
  520. package/esm/core/Toast/Toast.d.ts +0 -1
  521. package/esm/core/Toast/Toast.js +2 -4
  522. package/esm/core/Toast/ToastWrapper.d.ts +0 -1
  523. package/esm/core/Toast/ToastWrapper.js +0 -1
  524. package/esm/core/Toast/Toaster.js +6 -11
  525. package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +0 -1
  526. package/esm/core/ToggleSwitch/ToggleSwitch.js +1 -3
  527. package/esm/core/Tooltip/Tooltip.d.ts +0 -1
  528. package/esm/core/Tooltip/Tooltip.js +0 -1
  529. package/esm/core/TransferList/TransferList.d.ts +69 -0
  530. package/esm/core/TransferList/TransferList.js +141 -0
  531. package/esm/core/TransferList/index.d.ts +3 -0
  532. package/esm/core/TransferList/index.js +6 -0
  533. package/esm/core/Tree/Tree.d.ts +0 -1
  534. package/esm/core/Tree/Tree.js +9 -14
  535. package/esm/core/Tree/TreeNode.d.ts +0 -1
  536. package/esm/core/Tree/TreeNode.js +9 -11
  537. package/esm/core/Tree/TreeNodeExpander.d.ts +0 -1
  538. package/esm/core/Tree/TreeNodeExpander.js +0 -1
  539. package/esm/core/Typography/Anchor/Anchor.d.ts +0 -1
  540. package/esm/core/Typography/Anchor/Anchor.js +0 -1
  541. package/esm/core/Typography/Blockquote/Blockquote.d.ts +0 -1
  542. package/esm/core/Typography/Blockquote/Blockquote.js +0 -1
  543. package/esm/core/Typography/Code/Code.d.ts +0 -1
  544. package/esm/core/Typography/Code/Code.js +0 -1
  545. package/esm/core/Typography/Kbd/Kbd.d.ts +0 -1
  546. package/esm/core/Typography/Kbd/Kbd.js +0 -1
  547. package/esm/core/Typography/Text/Text.d.ts +0 -1
  548. package/esm/core/Typography/Text/Text.js +0 -1
  549. package/esm/core/index.d.ts +1 -0
  550. package/esm/core/index.js +1 -0
  551. package/esm/core/utils/color/ColorValue.js +9 -15
  552. package/esm/core/utils/components/AutoclearingHiddenLiveRegion.js +2 -3
  553. package/esm/core/utils/components/Divider.d.ts +0 -1
  554. package/esm/core/utils/components/Divider.js +0 -1
  555. package/esm/core/utils/components/Flex.d.ts +0 -1
  556. package/esm/core/utils/components/Flex.js +0 -1
  557. package/esm/core/utils/components/FocusTrap.js +4 -4
  558. package/esm/core/utils/components/Icon.d.ts +0 -1
  559. package/esm/core/utils/components/Icon.js +0 -1
  560. package/esm/core/utils/components/InputContainer.d.ts +0 -1
  561. package/esm/core/utils/components/InputContainer.js +0 -1
  562. package/esm/core/utils/components/InputFlexContainer.d.ts +0 -1
  563. package/esm/core/utils/components/InputFlexContainer.js +0 -1
  564. package/esm/core/utils/components/LinkAction.d.ts +0 -1
  565. package/esm/core/utils/components/LinkAction.js +0 -1
  566. package/esm/core/utils/components/MiddleTextTruncation.js +1 -2
  567. package/esm/core/utils/components/Popover.d.ts +0 -1
  568. package/esm/core/utils/components/Popover.js +5 -9
  569. package/esm/core/utils/components/Resizer.js +7 -6
  570. package/esm/core/utils/components/VirtualScroll.js +14 -21
  571. package/esm/core/utils/components/VisuallyHidden.d.ts +0 -1
  572. package/esm/core/utils/components/VisuallyHidden.js +0 -1
  573. package/esm/core/utils/functions/dom.d.ts +6 -0
  574. package/esm/core/utils/functions/dom.js +19 -5
  575. package/esm/core/utils/functions/index.d.ts +0 -1
  576. package/esm/core/utils/functions/index.js +0 -1
  577. package/esm/core/utils/functions/polymorphic.js +9 -1
  578. package/esm/core/utils/functions/supports.js +1 -1
  579. package/esm/core/utils/hooks/index.d.ts +0 -1
  580. package/esm/core/utils/hooks/index.js +0 -1
  581. package/esm/core/utils/hooks/useContainerWidth.js +1 -1
  582. package/esm/core/utils/hooks/useDragAndDrop.js +8 -10
  583. package/esm/core/utils/hooks/useEventListener.js +1 -1
  584. package/esm/core/utils/hooks/useGlobals.d.ts +9 -4
  585. package/esm/core/utils/hooks/useGlobals.js +6 -6
  586. package/esm/core/utils/hooks/useId.js +1 -2
  587. package/esm/core/utils/hooks/useIntersection.js +2 -3
  588. package/esm/core/utils/hooks/useMediaQuery.js +6 -8
  589. package/esm/core/utils/hooks/useOverflow.js +1 -2
  590. package/esm/core/utils/hooks/useResizeObserver.js +3 -4
  591. package/esm/styles.d.ts +5 -0
  592. package/esm/styles.js +451 -0
  593. package/package.json +14 -11
  594. package/styles.css +1940 -0
  595. package/cjs/core/utils/functions/styles.d.ts +0 -6
  596. package/cjs/core/utils/functions/styles.js +0 -21
  597. package/cjs/core/utils/hooks/useIsThemeAlreadySet.d.ts +0 -7
  598. package/cjs/core/utils/hooks/useIsThemeAlreadySet.js +0 -54
  599. package/esm/core/utils/functions/styles.d.ts +0 -6
  600. package/esm/core/utils/functions/styles.js +0 -17
  601. package/esm/core/utils/hooks/useIsThemeAlreadySet.d.ts +0 -7
  602. package/esm/core/utils/hooks/useIsThemeAlreadySet.js +0 -27
@@ -6,7 +6,6 @@ import * as React from 'react';
6
6
  import cx from 'classnames';
7
7
  import { SvgChevronRight } from '../utils/index.js';
8
8
  import { IconButton } from '../Buttons/IconButton/index.js';
9
- import '@itwin/itwinui-css/css/tree.css';
10
9
  export const TreeNodeExpander = React.forwardRef((props, ref) => {
11
10
  const { isExpanded, ...rest } = props;
12
11
  return (React.createElement(IconButton, { styleType: 'borderless', size: 'small', "aria-label": isExpanded ? 'Collapse' : 'Expand', ref: ref, ...rest },
@@ -1,4 +1,3 @@
1
- import '@itwin/itwinui-css/css/anchor.css';
2
1
  /**
3
2
  * A consistently styled anchor component.
4
3
  *
@@ -3,7 +3,6 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import { polymorphic } from '../../utils/index.js';
6
- import '@itwin/itwinui-css/css/anchor.css';
7
6
  /**
8
7
  * A consistently styled anchor component.
9
8
  *
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
3
- import '@itwin/itwinui-css/css/blockquote.css';
4
3
  declare type BlockquoteProps = {
5
4
  /**
6
5
  * Optional footer for any attribution/source.
@@ -5,7 +5,6 @@
5
5
  import cx from 'classnames';
6
6
  import * as React from 'react';
7
7
  import { Box } from '../../utils/index.js';
8
- import '@itwin/itwinui-css/css/blockquote.css';
9
8
  /**
10
9
  * Basic blockquote component
11
10
  * @example
@@ -1,4 +1,3 @@
1
- import '@itwin/itwinui-css/css/code.css';
2
1
  /**
3
2
  * Inline code element.
4
3
  * @example
@@ -3,7 +3,6 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import { polymorphic } from '../../utils/index.js';
6
- import '@itwin/itwinui-css/css/code.css';
7
6
  /**
8
7
  * Inline code element.
9
8
  * @example
@@ -1,5 +1,4 @@
1
1
  import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
2
- import '@itwin/itwinui-css/css/keyboard.css';
3
2
  /**
4
3
  * Some predefined strings for common keyboard keys.
5
4
  */
@@ -5,7 +5,6 @@
5
5
  import cx from 'classnames';
6
6
  import * as React from 'react';
7
7
  import { Box } from '../../utils/index.js';
8
- import '@itwin/itwinui-css/css/keyboard.css';
9
8
  /**
10
9
  * Some predefined strings for common keyboard keys.
11
10
  */
@@ -1,5 +1,4 @@
1
1
  import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
2
- import '@itwin/itwinui-css/css/text.css';
3
2
  declare type TextProps = {
4
3
  /**
5
4
  * Which typography variant/size should be used for the styling?
@@ -5,7 +5,6 @@
5
5
  import cx from 'classnames';
6
6
  import * as React from 'react';
7
7
  import { Box } from '../../utils/index.js';
8
- import '@itwin/itwinui-css/css/text.css';
9
8
  /**
10
9
  * Polymorphic typography component to render any kind of text as any kind of element.
11
10
  * Users should decide which element to render based on the context of their app. Link to heading levels docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements#accessibility_concerns
@@ -22,6 +22,7 @@ export { Footer, defaultFooterElements } from './Footer/index.js';
22
22
  export type { FooterElement, TitleTranslations } from './Footer/index.js';
23
23
  export { Header, HeaderBreadcrumbs, HeaderButton, HeaderLogo, } from './Header/index.js';
24
24
  export { List, ListItem } from './List/index.js';
25
+ export { TransferList } from './TransferList/index.js';
25
26
  export { VerticalTabs, Tabs, Tab, HorizontalTabs } from './Tabs/index.js';
26
27
  export { InformationPanel, InformationPanelWrapper, InformationPanelHeader, InformationPanelBody, InformationPanelContent, } from './InformationPanel/index.js';
27
28
  export { Input } from './Input/index.js';
package/esm/core/index.js CHANGED
@@ -24,6 +24,7 @@ export { FileUpload, FileUploadTemplate, FileUploadCard, FileEmptyCard, } from '
24
24
  export { Footer, defaultFooterElements } from './Footer/index.js';
25
25
  export { Header, HeaderBreadcrumbs, HeaderButton, HeaderLogo, } from './Header/index.js';
26
26
  export { List, ListItem } from './List/index.js';
27
+ export { TransferList } from './TransferList/index.js';
27
28
  export { VerticalTabs, Tabs, Tab, HorizontalTabs } from './Tabs/index.js';
28
29
  export { InformationPanel, InformationPanelWrapper, InformationPanelHeader, InformationPanelBody, InformationPanelContent, } from './InformationPanel/index.js';
29
30
  export { Input } from './Input/index.js';
@@ -110,27 +110,24 @@ export class ColorValue {
110
110
  * This allows component builders to know if they received bad input from user.
111
111
  */
112
112
  static fromString(val, defaultColorIfNotParsed) {
113
- const [tbgr, hue] = this.computeTbgrFromString(val, defaultColorIfNotParsed === null || defaultColorIfNotParsed === void 0 ? void 0 : defaultColorIfNotParsed.toTbgr());
113
+ const [tbgr, hue] = this.computeTbgrFromString(val, defaultColorIfNotParsed?.toTbgr());
114
114
  return new ColorValue(tbgr, hue);
115
115
  }
116
116
  /** Create a ColorValue from hue, saturation, lightness values. */
117
117
  static fromHSL(hsl) {
118
- var _a;
119
- const alpha = (_a = hsl.a) !== null && _a !== void 0 ? _a : 1;
118
+ const alpha = hsl.a ?? 1;
120
119
  return new ColorValue(this.computeTbgrFromHSL(hsl.h / 360, hsl.s / 100, hsl.l / 100, Math.round((1 - alpha) * 255)), hsl.h);
121
120
  }
122
121
  /** Create a ColorValue from an RgbColor */
123
122
  static fromRGB(rgb) {
124
- var _a;
125
- const alpha = (_a = rgb.a) !== null && _a !== void 0 ? _a : 1;
123
+ const alpha = rgb.a ?? 1;
126
124
  return ColorValue.fromRgbt(rgb.r, rgb.g, rgb.b, Math.round((1 - alpha) * 255));
127
125
  }
128
126
  /**
129
127
  * Create a ColorValue from an HsvColor
130
128
  */
131
129
  static fromHSV(hsv) {
132
- var _a;
133
- const alpha = (_a = hsv.a) !== null && _a !== void 0 ? _a : 1;
130
+ const alpha = hsv.a ?? 1;
134
131
  const transparency = Math.round((1 - alpha) * 255);
135
132
  // Check for simple case first.
136
133
  if (!hsv.s || hsv.h === -1) {
@@ -481,33 +478,30 @@ export class ColorValue {
481
478
  }
482
479
  /** Convert the 0xTTBBGGRR color to a string of the form "rgba(r,g,b,a)" where the color components are specified in decimal and the alpha component is a fraction. */
483
480
  toRgbString(includeAlpha) {
484
- var _a;
485
481
  const rgb = this.toRgbColor();
486
482
  const rgbString = `${rgb.r}, ${rgb.g}, ${rgb.b}`;
487
483
  if (includeAlpha) {
488
- const alpha = (_a = rgb.a) !== null && _a !== void 0 ? _a : 1;
484
+ const alpha = rgb.a ?? 1;
489
485
  return `rgba(${rgbString}, ${ColorValue.getFormattedColorNumber(alpha, 2)})`;
490
486
  }
491
487
  return `rgb(${rgbString})`;
492
488
  }
493
489
  /** Convert this ColorValue to a string in the form "hsl(h,s,l) or hsla(h,s,l,a)" - i.e hsl(120,50%,50%). */
494
490
  toHslString(includeAlpha) {
495
- var _a, _b;
496
491
  const hsl = this.toHslColor();
497
- const hslString = `${ColorValue.getFormattedColorNumber((_a = this._hue) !== null && _a !== void 0 ? _a : hsl.h)}, ${ColorValue.getFormattedColorNumber(hsl.s)}%, ${ColorValue.getFormattedColorNumber(hsl.l)}%`;
492
+ const hslString = `${ColorValue.getFormattedColorNumber(this._hue ?? hsl.h)}, ${ColorValue.getFormattedColorNumber(hsl.s)}%, ${ColorValue.getFormattedColorNumber(hsl.l)}%`;
498
493
  if (includeAlpha) {
499
- const alpha = (_b = hsl.a) !== null && _b !== void 0 ? _b : 1;
494
+ const alpha = hsl.a ?? 1;
500
495
  return `hsla(${hslString}, ${ColorValue.getFormattedColorNumber(alpha, 2)})`;
501
496
  }
502
497
  return `hsl(${hslString})`;
503
498
  }
504
499
  /** Convert this ColorValue to a string in the form "hsv(h,s,v) or hsva(h,s,v,a)" - i.e hsv(120,50%,50%). */
505
500
  toHsvString(includeAlpha) {
506
- var _a, _b;
507
501
  const hsv = this.toHsvColor();
508
- const hsvString = `${(_a = this._hue) !== null && _a !== void 0 ? _a : hsv.h}, ${hsv.s}%, ${hsv.v}%`;
502
+ const hsvString = `${this._hue ?? hsv.h}, ${hsv.s}%, ${hsv.v}%`;
509
503
  if (includeAlpha) {
510
- const alpha = (_b = hsv.a) !== null && _b !== void 0 ? _b : 1;
504
+ const alpha = hsv.a ?? 1;
511
505
  return `hsva(${hsvString}, ${ColorValue.getFormattedColorNumber(alpha, 2)})`;
512
506
  }
513
507
  return `hsv(${hsvString})`;
@@ -16,10 +16,9 @@ import { getWindow } from '../functions/index.js';
16
16
  export const AutoclearingHiddenLiveRegion = ({ text = '' }) => {
17
17
  const [maybeText, setMaybeText] = React.useState(text);
18
18
  React.useEffect(() => {
19
- var _a;
20
19
  setMaybeText(text);
21
- const timeout = (_a = getWindow()) === null || _a === void 0 ? void 0 : _a.setTimeout(() => setMaybeText(''), 5000);
22
- return () => { var _a; return void ((_a = getWindow()) === null || _a === void 0 ? void 0 : _a.clearTimeout(timeout)); };
20
+ const timeout = getWindow()?.setTimeout(() => setMaybeText(''), 5000);
21
+ return () => void getWindow()?.clearTimeout(timeout);
23
22
  }, [text]);
24
23
  return (React.createElement(VisuallyHidden, { as: 'div', "aria-live": 'polite', "aria-atomic": 'true' }, maybeText));
25
24
  };
@@ -1,4 +1,3 @@
1
- import '@itwin/itwinui-css/css/utils.css';
2
1
  import type { PolymorphicForwardRefComponent } from '../props.js';
3
2
  declare type DividerProps = {
4
3
  /**
@@ -4,7 +4,6 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
6
  import cx from 'classnames';
7
- import '@itwin/itwinui-css/css/utils.css';
8
7
  import { Box } from './Box.js';
9
8
  /**
10
9
  * Shows a divider
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { AnyString } from '../types.js';
3
3
  import type { PolymorphicForwardRefComponent } from '../props.js';
4
- import '@itwin/itwinui-css/css/utils.css';
5
4
  declare const sizeTokens: readonly ["3xs", "2xs", "xs", "s", "m", "l", "xl", "2xl", "3xl"];
6
5
  /**
7
6
  * String literal shorthands that correspond to the size tokens in [itwinui-variables](https://github.com/iTwin/iTwinUI/blob/main/packages/itwinui-variables/src/sizes.scss).
@@ -4,7 +4,6 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
6
  import cx from 'classnames';
7
- import '@itwin/itwinui-css/css/utils.css';
8
7
  import { Box } from './Box.js';
9
8
  const sizeTokens = [
10
9
  '3xs',
@@ -21,19 +21,19 @@ export const FocusTrap = (props) => {
21
21
  const onFirstFocus = (event) => {
22
22
  const [firstElement, lastElement] = getFirstLastFocusables();
23
23
  if (event.relatedTarget === firstElement) {
24
- lastElement === null || lastElement === void 0 ? void 0 : lastElement.focus();
24
+ lastElement?.focus();
25
25
  }
26
26
  else {
27
- firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
27
+ firstElement?.focus();
28
28
  }
29
29
  };
30
30
  const onLastFocus = (event) => {
31
31
  const [firstElement, lastElement] = getFirstLastFocusables();
32
32
  if (event.relatedTarget === lastElement) {
33
- firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
33
+ firstElement?.focus();
34
34
  }
35
35
  else {
36
- lastElement === null || lastElement === void 0 ? void 0 : lastElement.focus();
36
+ lastElement?.focus();
37
37
  }
38
38
  };
39
39
  return (React.createElement(React.Fragment, null,
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import type { AnyString } from '../types.js';
3
- import '@itwin/itwinui-css/css/utils.css';
4
3
  import type { PolymorphicForwardRefComponent } from '../props.js';
5
4
  export declare type IconProps = {
6
5
  /**
@@ -4,7 +4,6 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
6
  import cx from 'classnames';
7
- import '@itwin/itwinui-css/css/utils.css';
8
7
  import { Box } from './Box.js';
9
8
  const getSizeValue = (size) => {
10
9
  switch (size) {
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react';
2
- import '@itwin/itwinui-css/css/utils.css';
3
2
  export declare type InputContainerProps<T extends React.ElementType = 'div'> = {
4
3
  as?: T;
5
4
  label?: React.ReactNode;
@@ -4,7 +4,6 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
6
  import cx from 'classnames';
7
- import '@itwin/itwinui-css/css/utils.css';
8
7
  import { Box } from './Box.js';
9
8
  /**
10
9
  * Input container to wrap inputs with label, and add optional message and icon.
@@ -1,5 +1,4 @@
1
1
  import type { PolymorphicForwardRefComponent } from '../props.js';
2
- import '@itwin/itwinui-css/css/input-container.css';
3
2
  export declare type InputFlexContainerProps = {
4
3
  isDisabled?: boolean;
5
4
  status?: 'positive' | 'warning' | 'negative';
@@ -4,7 +4,6 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import React from 'react';
6
6
  import cx from 'classnames';
7
- import '@itwin/itwinui-css/css/input-container.css';
8
7
  import { Box } from './Box.js';
9
8
  /**
10
9
  * Utility component for input container with display flex abilities.
@@ -1,4 +1,3 @@
1
- import '@itwin/itwinui-css/css/utils.css';
2
1
  /**
3
2
  * Polymorphic link action component.
4
3
  * It is rendered as `a` by default.
@@ -2,7 +2,6 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- import '@itwin/itwinui-css/css/utils.css';
6
5
  import { polymorphic } from '../functions/polymorphic.js';
7
6
  /**
8
7
  * Polymorphic link action component.
@@ -22,7 +22,6 @@ const ELLIPSIS_CHAR = '…';
22
22
  * />
23
23
  */
24
24
  export const MiddleTextTruncation = (props) => {
25
- var _a;
26
25
  const { text, endCharsCount = 6, textRenderer, style, ...rest } = props;
27
26
  const [ref, visibleCount] = useOverflow(text);
28
27
  const truncatedText = React.useMemo(() => {
@@ -39,6 +38,6 @@ export const MiddleTextTruncation = (props) => {
39
38
  flexGrow: 1,
40
39
  whiteSpace: 'nowrap',
41
40
  ...style,
42
- }, ref: ref, ...rest }, (_a = textRenderer === null || textRenderer === void 0 ? void 0 : textRenderer(truncatedText, text)) !== null && _a !== void 0 ? _a : truncatedText));
41
+ }, ref: ref, ...rest }, textRenderer?.(truncatedText, text) ?? truncatedText));
43
42
  };
44
43
  export default MiddleTextTruncation;
@@ -2,7 +2,6 @@ import * as React from 'react';
2
2
  import type { TippyProps } from '@tippyjs/react';
3
3
  import type { Placement, Instance } from 'tippy.js';
4
4
  export declare type PopoverInstance = Instance;
5
- import '@itwin/itwinui-css/css/utils.css';
6
5
  export declare type PopoverProps = {
7
6
  /**
8
7
  * Controlled flag for whether the popover is visible.
@@ -6,7 +6,6 @@ import * as React from 'react';
6
6
  import cx from 'classnames';
7
7
  import Tippy from '@tippyjs/react';
8
8
  import { useMergedRefs, useIsClient } from '../hooks/index.js';
9
- import '@itwin/itwinui-css/css/utils.css';
10
9
  import { ThemeContext } from '../../ThemeProvider/ThemeContext.js';
11
10
  /**
12
11
  * Wrapper around [tippy.js](https://atomiks.github.io/tippyjs)
@@ -14,7 +13,6 @@ import { ThemeContext } from '../../ThemeProvider/ThemeContext.js';
14
13
  * @private
15
14
  */
16
15
  export const Popover = React.forwardRef((props, ref) => {
17
- var _a;
18
16
  const [mounted, setMounted] = React.useState(false);
19
17
  const themeInfo = React.useContext(ThemeContext);
20
18
  const isDomAvailable = useIsClient();
@@ -31,15 +29,14 @@ export const Popover = React.forwardRef((props, ref) => {
31
29
  const removeTabIndex = {
32
30
  fn: () => ({
33
31
  onCreate: (instance) => {
34
- var _a;
35
- (_a = instance.popper.firstElementChild) === null || _a === void 0 ? void 0 : _a.removeAttribute('tabindex');
32
+ instance.popper.firstElementChild?.removeAttribute('tabindex');
36
33
  },
37
34
  }),
38
35
  };
39
36
  const computedProps = {
40
37
  allowHTML: true,
41
38
  animation: false,
42
- appendTo: (el) => (themeInfo === null || themeInfo === void 0 ? void 0 : themeInfo.rootRef.current) || el.ownerDocument.body,
39
+ appendTo: (el) => themeInfo?.portalContainerRef?.current || el.ownerDocument.body,
43
40
  arrow: false,
44
41
  duration: 0,
45
42
  interactive: true,
@@ -64,7 +61,7 @@ export const Popover = React.forwardRef((props, ref) => {
64
61
  modifiers: [
65
62
  { name: 'flip' },
66
63
  { name: 'preventOverflow', options: { padding: 0 } },
67
- ...(((_a = props.popperOptions) === null || _a === void 0 ? void 0 : _a.modifiers) || []),
64
+ ...(props.popperOptions?.modifiers || []),
68
65
  ],
69
66
  },
70
67
  };
@@ -79,9 +76,8 @@ export const Popover = React.forwardRef((props, ref) => {
79
76
  const clonedContent = React.isValidElement(props.content)
80
77
  ? React.cloneElement(props.content, {
81
78
  onClick: (e) => {
82
- var _a, _b;
83
79
  e.stopPropagation();
84
- (_b = (_a = props.content.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
80
+ props.content.props.onClick?.(e);
85
81
  },
86
82
  })
87
83
  : props.content;
@@ -98,7 +94,7 @@ export const hideOnEscOrTab = {
98
94
  /** @returns true if none of the children are tabbable */
99
95
  const shouldHideOnTab = () => {
100
96
  const descendents = Array.from(instance.popper.querySelectorAll('*'));
101
- return !descendents.some((el) => (el === null || el === void 0 ? void 0 : el.tabIndex) >= 0);
97
+ return !descendents.some((el) => el?.tabIndex >= 0);
102
98
  };
103
99
  const onKeyDown = (event) => {
104
100
  if (event.altKey) {
@@ -38,17 +38,18 @@ export const Resizer = (props) => {
38
38
  const originalUserSelect = ownerDocument.body.style.userSelect;
39
39
  ownerDocument.body.style.userSelect = 'none';
40
40
  const onResizePointerMove = (event) => {
41
- var _a, _b, _c, _d, _e, _f, _g;
42
41
  if (!elementRef.current) {
43
42
  return;
44
43
  }
45
44
  if (!isResizing.current) {
46
45
  isResizing.current = true;
47
- onResizeStart === null || onResizeStart === void 0 ? void 0 : onResizeStart();
46
+ onResizeStart?.();
48
47
  }
49
- const containerRect = (_a = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
50
- const clientX = getBoundedValue(event.clientX, (_b = containerRect === null || containerRect === void 0 ? void 0 : containerRect.left) !== null && _b !== void 0 ? _b : 0, (_d = (_c = containerRect === null || containerRect === void 0 ? void 0 : containerRect.right) !== null && _c !== void 0 ? _c : ownerDocument.documentElement.clientWidth) !== null && _d !== void 0 ? _d : 0);
51
- const clientY = getBoundedValue(event.clientY, (_e = containerRect === null || containerRect === void 0 ? void 0 : containerRect.top) !== null && _e !== void 0 ? _e : 0, (_g = (_f = containerRect === null || containerRect === void 0 ? void 0 : containerRect.bottom) !== null && _f !== void 0 ? _f : ownerDocument.documentElement.clientHeight) !== null && _g !== void 0 ? _g : 0);
48
+ const containerRect = containerRef?.current?.getBoundingClientRect();
49
+ const clientX = getBoundedValue(event.clientX, containerRect?.left ?? 0, containerRect?.right ?? ownerDocument.documentElement.clientWidth ?? 0);
50
+ const clientY = getBoundedValue(event.clientY, containerRect?.top ?? 0, containerRect?.bottom ??
51
+ ownerDocument.documentElement.clientHeight ??
52
+ 0);
52
53
  const diffX = initialPointerX - clientX;
53
54
  const diffY = initialPointerY - clientY;
54
55
  switch (resizer) {
@@ -129,7 +130,7 @@ export const Resizer = (props) => {
129
130
  if (elementRef.current) {
130
131
  ownerDocument.body.style.userSelect = originalUserSelect;
131
132
  isResizing.current = false;
132
- onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd({
133
+ onResizeEnd?.({
133
134
  width,
134
135
  height,
135
136
  transform: `translate(${translateX}px, ${translateY}px)`,
@@ -1,4 +1,3 @@
1
- var _a;
2
1
  /*---------------------------------------------------------------------------------------------
3
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -6,7 +5,7 @@ var _a;
6
5
  import * as React from 'react';
7
6
  import * as ReactDOM from 'react-dom';
8
7
  import { mergeRefs, useResizeObserver, useIsomorphicLayoutEffect, } from '../hooks/index.js';
9
- const unstable_batchedUpdates = (_a = ReactDOM.unstable_batchedUpdates) !== null && _a !== void 0 ? _a : ((cb) => void cb());
8
+ const unstable_batchedUpdates = ReactDOM.unstable_batchedUpdates ?? ((cb) => void cb());
10
9
  const getScrollableParent = (element, ownerDocument = document) => {
11
10
  if (!element || element === ownerDocument.body) {
12
11
  return ownerDocument.body;
@@ -23,8 +22,7 @@ const getElementStyle = (element, prop) => {
23
22
  return getComputedStyle(element, null).getPropertyValue(prop);
24
23
  };
25
24
  const getElementHeight = (element) => {
26
- var _a;
27
- return (_a = element === null || element === void 0 ? void 0 : element.getBoundingClientRect().height) !== null && _a !== void 0 ? _a : 0;
25
+ return element?.getBoundingClientRect().height ?? 0;
28
26
  };
29
27
  const getElementHeightWithMargins = (element) => {
30
28
  if (!element) {
@@ -109,10 +107,8 @@ export const useVirtualization = (props) => {
109
107
  // Used to mark when scroll container has height (updated by resize observer)
110
108
  // because before that calculations are not right
111
109
  const [isMounted, setIsMounted] = React.useState(false);
112
- const getScrollableContainer = () => {
113
- var _a, _b;
114
- return (_a = scrollContainer.current) !== null && _a !== void 0 ? _a : (_b = parentRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.scrollingElement;
115
- };
110
+ const getScrollableContainer = () => scrollContainer.current ??
111
+ parentRef.current?.ownerDocument.scrollingElement;
116
112
  const visibleChildren = React.useMemo(() => {
117
113
  const arr = [];
118
114
  const endIndex = Math.min(itemsLength, startNode + visibleNodeCount + bufferSize * 2);
@@ -122,18 +118,18 @@ export const useVirtualization = (props) => {
122
118
  return arr;
123
119
  }, [itemsLength, itemRenderer, bufferSize, startNode, visibleNodeCount]);
124
120
  const updateChildHeight = React.useCallback(() => {
125
- var _a, _b, _c, _d, _e, _f;
126
121
  if (!parentRef.current || !visibleChildren.length) {
127
122
  return;
128
123
  }
129
124
  const firstChild = parentRef.current.children.item(0);
130
125
  const secondChild = parentRef.current.children.item(1);
131
126
  const lastChild = parentRef.current.children.item(parentRef.current.children.length - 1);
132
- const firstChildHeight = Number((_b = (_a = getElementHeightWithMargins(firstChild)) === null || _a === void 0 ? void 0 : _a.toFixed(2)) !== null && _b !== void 0 ? _b : 0);
127
+ const firstChildHeight = Number(getElementHeightWithMargins(firstChild)?.toFixed(2) ?? 0);
133
128
  childHeight.current = {
134
129
  first: firstChildHeight,
135
- middle: Number((_d = (_c = getElementHeightWithMargins(secondChild)) === null || _c === void 0 ? void 0 : _c.toFixed(2)) !== null && _d !== void 0 ? _d : firstChildHeight),
136
- last: Number((_f = (_e = getElementHeightWithMargins(lastChild)) === null || _e === void 0 ? void 0 : _e.toFixed(2)) !== null && _f !== void 0 ? _f : firstChildHeight),
130
+ middle: Number(getElementHeightWithMargins(secondChild)?.toFixed(2) ??
131
+ firstChildHeight),
132
+ last: Number(getElementHeightWithMargins(lastChild)?.toFixed(2) ?? firstChildHeight),
137
133
  };
138
134
  }, [visibleChildren.length]);
139
135
  const onResize = React.useCallback(({ height }) => {
@@ -151,14 +147,13 @@ export const useVirtualization = (props) => {
151
147
  // Find scrollable parent
152
148
  // Needed only on init
153
149
  useIsomorphicLayoutEffect(() => {
154
- var _a;
155
- const scrollableParent = getScrollableParent(parentRef.current, (_a = parentRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument);
150
+ const scrollableParent = getScrollableParent(parentRef.current, parentRef.current?.ownerDocument);
156
151
  scrollContainer.current = scrollableParent;
157
152
  resizeRef(scrollableParent);
158
153
  }, [resizeRef]);
159
154
  // Stop watching resize, when virtual scroll is unmounted
160
155
  useIsomorphicLayoutEffect(() => {
161
- return () => resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
156
+ return () => resizeObserver?.disconnect();
162
157
  }, [resizeObserver]);
163
158
  // Get child height when children available
164
159
  useIsomorphicLayoutEffect(() => updateChildHeight(), [updateChildHeight]);
@@ -185,23 +180,21 @@ export const useVirtualization = (props) => {
185
180
  updateVirtualScroll();
186
181
  }, [updateVirtualScroll]);
187
182
  const removeScrollListener = React.useCallback(() => {
188
- var _a, _b;
189
183
  if (!onScrollRef.current) {
190
184
  return;
191
185
  }
192
186
  !scrollContainer.current ||
193
- scrollContainer.current === ((_a = parentRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.body)
194
- ? (_b = parentRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.removeEventListener('scroll', onScrollRef.current)
187
+ scrollContainer.current === parentRef.current?.ownerDocument.body
188
+ ? parentRef.current?.ownerDocument.removeEventListener('scroll', onScrollRef.current)
195
189
  : scrollContainer.current.removeEventListener('scroll', onScrollRef.current);
196
190
  }, []);
197
191
  // Add event listener to the scrollable container.
198
192
  useIsomorphicLayoutEffect(() => {
199
- var _a, _b;
200
193
  removeScrollListener();
201
194
  onScrollRef.current = onScroll;
202
195
  if (!scrollContainer.current ||
203
- scrollContainer.current === ((_a = parentRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.body)) {
204
- (_b = parentRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument.addEventListener('scroll', onScroll);
196
+ scrollContainer.current === parentRef.current?.ownerDocument.body) {
197
+ parentRef.current?.ownerDocument.addEventListener('scroll', onScroll);
205
198
  }
206
199
  else {
207
200
  scrollContainer.current.addEventListener('scroll', onScroll);
@@ -1,4 +1,3 @@
1
- import '@itwin/itwinui-css/css/utils.css';
2
1
  import type { PolymorphicForwardRefComponent } from '../props.js';
3
2
  declare type VisuallyHiddenOwnProps = {
4
3
  /**
@@ -4,7 +4,6 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
6
  import cx from 'classnames';
7
- import '@itwin/itwinui-css/css/utils.css';
8
7
  import { Box } from './Box.js';
9
8
  /**
10
9
  * Hides content visually but keeps it still accessible to screen readers
@@ -22,3 +22,9 @@ export declare const getWindow: () => (Window & typeof globalThis) | undefined;
22
22
  * `defaultPrevented` is respected for each callback.
23
23
  */
24
24
  export declare const mergeEventHandlers: <E extends import("react").SyntheticEvent<Element, Event>>(...callbacks: (((event: E) => void) | undefined)[]) => (event: E) => void;
25
+ /**
26
+ * Returns translate values as an array of a given element.
27
+ * @param element HTML element you want to get translate value of
28
+ * @returns Translate values in pixels in an array `[translateX, translateY]`
29
+ */
30
+ export declare const getTranslateValues: (element: HTMLElement | null | undefined) => number[];
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
+ import styles from '../../../styles.js';
5
6
  /**
6
7
  * Get the container as a child of body, or create one if it doesn't exist.
7
8
  * Mostly used for dynamic components like Modal or Toast.
@@ -10,12 +11,12 @@
10
11
  * @param ownerDocument Can be changed if the container should be in a different document (e.g. in popup).
11
12
  */
12
13
  export const getContainer = (containerId, ownerDocument = getDocument()) => {
13
- var _a, _b;
14
- let container = (_a = ownerDocument === null || ownerDocument === void 0 ? void 0 : ownerDocument.getElementById(containerId)) !== null && _a !== void 0 ? _a : undefined;
14
+ let container = ownerDocument?.getElementById(containerId) ?? undefined;
15
15
  if (container == null && !!ownerDocument) {
16
16
  container = ownerDocument.createElement('div');
17
17
  container.setAttribute('id', containerId);
18
- const root = (_b = ownerDocument.querySelector('.iui-root')) !== null && _b !== void 0 ? _b : ownerDocument.body;
18
+ const root = ownerDocument.querySelector(`.${styles['iui-root']}`) ??
19
+ ownerDocument.body;
19
20
  root.appendChild(container);
20
21
  }
21
22
  return container;
@@ -40,9 +41,22 @@ export const getWindow = () => {
40
41
  */
41
42
  export const mergeEventHandlers = (...callbacks) => (event) => {
42
43
  for (const cb of callbacks) {
43
- cb === null || cb === void 0 ? void 0 : cb(event);
44
- if (event === null || event === void 0 ? void 0 : event.defaultPrevented) {
44
+ cb?.(event);
45
+ if (event?.defaultPrevented) {
45
46
  return;
46
47
  }
47
48
  }
48
49
  };
50
+ /**
51
+ * Returns translate values as an array of a given element.
52
+ * @param element HTML element you want to get translate value of
53
+ * @returns Translate values in pixels in an array `[translateX, translateY]`
54
+ */
55
+ export const getTranslateValues = (element) => {
56
+ if (!element) {
57
+ return [];
58
+ }
59
+ const transformValue = getComputedStyle(element).getPropertyValue('transform');
60
+ const matrix = new DOMMatrix(transformValue);
61
+ return [matrix.m41, matrix.m42];
62
+ };
@@ -3,6 +3,5 @@ export * from './dom.js';
3
3
  export * from './colors.js';
4
4
  export * from './numbers.js';
5
5
  export * from './focusable.js';
6
- export * from './styles.js';
7
6
  export * from './supports.js';
8
7
  export * from './polymorphic.js';