@itwin/itwinui-react 3.12.1 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1065) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/DEV-cjs/core/Alert/Alert.js +90 -0
  3. package/DEV-cjs/core/Avatar/Avatar.js +55 -0
  4. package/DEV-cjs/core/AvatarGroup/AvatarGroup.js +38 -0
  5. package/DEV-cjs/core/Backdrop/Backdrop.js +26 -0
  6. package/DEV-cjs/core/Badge/Badge.js +48 -0
  7. package/DEV-cjs/core/Breadcrumbs/Breadcrumbs.js +96 -0
  8. package/DEV-cjs/core/ButtonGroup/ButtonGroup.js +91 -0
  9. package/DEV-cjs/core/Buttons/Button.js +54 -0
  10. package/DEV-cjs/core/Buttons/DropdownButton.js +43 -0
  11. package/DEV-cjs/core/Buttons/IconButton.js +46 -0
  12. package/DEV-cjs/core/Buttons/IdeasButton.js +30 -0
  13. package/DEV-cjs/core/Buttons/SplitButton.js +71 -0
  14. package/DEV-cjs/core/Carousel/Carousel.js +74 -0
  15. package/DEV-cjs/core/Carousel/CarouselContext.js +14 -0
  16. package/DEV-cjs/core/Carousel/CarouselDot.js +31 -0
  17. package/DEV-cjs/core/Carousel/CarouselDotsList.js +122 -0
  18. package/DEV-cjs/core/Carousel/CarouselNavigation.js +79 -0
  19. package/DEV-cjs/core/Carousel/CarouselSlide.js +46 -0
  20. package/DEV-cjs/core/Carousel/CarouselSlider.js +65 -0
  21. package/DEV-cjs/core/Checkbox/Checkbox.js +58 -0
  22. package/DEV-cjs/core/ColorPicker/ColorBuilder.js +250 -0
  23. package/DEV-cjs/core/ColorPicker/ColorInputPanel.js +384 -0
  24. package/DEV-cjs/core/ColorPicker/ColorPalette.js +43 -0
  25. package/DEV-cjs/core/ColorPicker/ColorPicker.js +79 -0
  26. package/DEV-cjs/core/ColorPicker/ColorPickerContext.js +26 -0
  27. package/DEV-cjs/core/ColorPicker/ColorSwatch.js +38 -0
  28. package/DEV-cjs/core/ComboBox/ComboBox.js +310 -0
  29. package/DEV-cjs/core/ComboBox/ComboBox.types-test.js +82 -0
  30. package/DEV-cjs/core/ComboBox/ComboBoxEndIcon.js +31 -0
  31. package/DEV-cjs/core/ComboBox/ComboBoxInput.js +133 -0
  32. package/DEV-cjs/core/ComboBox/ComboBoxInputContainer.js +32 -0
  33. package/DEV-cjs/core/ComboBox/ComboBoxMenu.js +101 -0
  34. package/DEV-cjs/core/ComboBox/ComboBoxMenuItem.js +48 -0
  35. package/DEV-cjs/core/ComboBox/ComboBoxMultipleContainer.js +22 -0
  36. package/DEV-cjs/core/ComboBox/helpers.js +24 -0
  37. package/DEV-cjs/core/DatePicker/DatePicker.js +382 -0
  38. package/DEV-cjs/core/Dialog/Dialog.js +65 -0
  39. package/DEV-cjs/core/Dialog/DialogBackdrop.js +43 -0
  40. package/DEV-cjs/core/Dialog/DialogButtonBar.js +13 -0
  41. package/DEV-cjs/core/Dialog/DialogContent.js +13 -0
  42. package/DEV-cjs/core/Dialog/DialogContext.js +22 -0
  43. package/DEV-cjs/core/Dialog/DialogDragContext.js +27 -0
  44. package/DEV-cjs/core/Dialog/DialogMain.js +131 -0
  45. package/DEV-cjs/core/Dialog/DialogTitleBar.js +41 -0
  46. package/DEV-cjs/core/Dialog/DialogTitleBarTitle.js +13 -0
  47. package/DEV-cjs/core/Divider/Divider.js +26 -0
  48. package/DEV-cjs/core/DropdownMenu/DropdownMenu.js +48 -0
  49. package/DEV-cjs/core/ExpandableBlock/ExpandableBlock.js +151 -0
  50. package/DEV-cjs/core/Fieldset/Fieldset.js +27 -0
  51. package/DEV-cjs/core/FileUpload/FileEmptyCard.js +35 -0
  52. package/DEV-cjs/core/FileUpload/FileUpload.js +61 -0
  53. package/DEV-cjs/core/FileUpload/FileUploadCard.js +153 -0
  54. package/DEV-cjs/core/FileUpload/FileUploadTemplate.js +39 -0
  55. package/DEV-cjs/core/Flex/Flex.js +88 -0
  56. package/DEV-cjs/core/Footer/Footer.js +103 -0
  57. package/DEV-cjs/core/Footer/FooterItem.js +13 -0
  58. package/DEV-cjs/core/Footer/FooterList.js +13 -0
  59. package/DEV-cjs/core/Footer/FooterSeparator.js +15 -0
  60. package/DEV-cjs/core/Header/Header.js +50 -0
  61. package/DEV-cjs/core/Header/HeaderBasicButton.js +23 -0
  62. package/DEV-cjs/core/Header/HeaderBreadcrumbs.js +41 -0
  63. package/DEV-cjs/core/Header/HeaderButton.js +51 -0
  64. package/DEV-cjs/core/Header/HeaderDropdownButton.js +48 -0
  65. package/DEV-cjs/core/Header/HeaderLogo.js +34 -0
  66. package/DEV-cjs/core/Header/HeaderSplitButton.js +53 -0
  67. package/DEV-cjs/core/Icon/Icon.js +40 -0
  68. package/DEV-cjs/core/InformationPanel/InformationPanel.js +68 -0
  69. package/DEV-cjs/core/InformationPanel/InformationPanelBody.js +13 -0
  70. package/DEV-cjs/core/InformationPanel/InformationPanelContent.js +26 -0
  71. package/DEV-cjs/core/InformationPanel/InformationPanelHeader.js +36 -0
  72. package/DEV-cjs/core/InformationPanel/InformationPanelWrapper.js +13 -0
  73. package/DEV-cjs/core/Input/Input.js +30 -0
  74. package/DEV-cjs/core/InputGrid/InputGrid.js +125 -0
  75. package/DEV-cjs/core/InputGroup/InputGroup.js +58 -0
  76. package/DEV-cjs/core/InputWithDecorations/InputWithDecorations.js +61 -0
  77. package/DEV-cjs/core/Label/Label.js +29 -0
  78. package/DEV-cjs/core/LabeledInput/LabeledInput.js +49 -0
  79. package/DEV-cjs/core/LabeledSelect/LabeledSelect.js +43 -0
  80. package/DEV-cjs/core/LabeledSelect/LabeledSelect.types-test.js +84 -0
  81. package/DEV-cjs/core/LabeledTextarea/LabeledTextarea.js +20 -0
  82. package/DEV-cjs/core/LinkAction/LinkAction.js +36 -0
  83. package/DEV-cjs/core/List/List.js +15 -0
  84. package/DEV-cjs/core/List/ListItem.js +45 -0
  85. package/DEV-cjs/core/Menu/Menu.js +140 -0
  86. package/DEV-cjs/core/Menu/MenuDivider.js +15 -0
  87. package/DEV-cjs/core/Menu/MenuExtraContent.js +15 -0
  88. package/DEV-cjs/core/Menu/MenuItem.js +82 -0
  89. package/DEV-cjs/core/Menu/MenuItemSkeleton.js +44 -0
  90. package/DEV-cjs/core/Modal/Modal.js +36 -0
  91. package/DEV-cjs/core/Modal/ModalButtonBar.js +13 -0
  92. package/DEV-cjs/core/Modal/ModalContent.js +13 -0
  93. package/DEV-cjs/core/NonIdealState/ErrorPage.js +133 -0
  94. package/DEV-cjs/core/NonIdealState/NonIdealState.js +40 -0
  95. package/DEV-cjs/core/NotificationMarker/NotificationMarker.js +29 -0
  96. package/DEV-cjs/core/Overlay/Overlay.js +52 -0
  97. package/DEV-cjs/core/Popover/Popover.js +209 -0
  98. package/DEV-cjs/core/ProgressIndicators/ProgressLinear.js +38 -0
  99. package/DEV-cjs/core/ProgressIndicators/ProgressRadial.js +45 -0
  100. package/DEV-cjs/core/Radio/Radio.js +42 -0
  101. package/DEV-cjs/core/RadioTiles/RadioTile.js +47 -0
  102. package/DEV-cjs/core/RadioTiles/RadioTileGroup.js +25 -0
  103. package/DEV-cjs/core/SearchBox/SearchBox.js +154 -0
  104. package/DEV-cjs/core/Select/Select.js +300 -0
  105. package/DEV-cjs/core/Select/Select.types-test.js +90 -0
  106. package/DEV-cjs/core/Select/SelectTag.js +27 -0
  107. package/DEV-cjs/core/Select/SelectTagContainer.js +28 -0
  108. package/DEV-cjs/core/SideNavigation/SideNavigation.js +74 -0
  109. package/DEV-cjs/core/SideNavigation/SidenavButton.js +37 -0
  110. package/DEV-cjs/core/SideNavigation/SidenavSubmenu.js +26 -0
  111. package/DEV-cjs/core/SideNavigation/SidenavSubmenuHeader.js +28 -0
  112. package/DEV-cjs/core/SkipToContentLink/SkipToContentLink.js +25 -0
  113. package/DEV-cjs/core/Slider/Slider.js +281 -0
  114. package/DEV-cjs/core/Slider/Thumb.js +102 -0
  115. package/DEV-cjs/core/Slider/Track.js +70 -0
  116. package/DEV-cjs/core/StatusMessage/StatusMessage.js +31 -0
  117. package/DEV-cjs/core/Stepper/Stepper.js +56 -0
  118. package/DEV-cjs/core/Stepper/StepperStep.js +64 -0
  119. package/DEV-cjs/core/Stepper/WorkflowDiagram.js +37 -0
  120. package/DEV-cjs/core/Stepper/WorkflowDiagramStep.js +32 -0
  121. package/DEV-cjs/core/Surface/Surface.js +94 -0
  122. package/DEV-cjs/core/Table/SubRowExpander.js +37 -0
  123. package/DEV-cjs/core/Table/Table.js +538 -0
  124. package/DEV-cjs/core/Table/TableCell.js +69 -0
  125. package/DEV-cjs/core/Table/TablePaginator.js +188 -0
  126. package/DEV-cjs/core/Table/TableRowMemoized.js +99 -0
  127. package/DEV-cjs/core/Table/actionHandlers/expandHandler.js +21 -0
  128. package/DEV-cjs/core/Table/actionHandlers/filterHandler.js +26 -0
  129. package/DEV-cjs/core/Table/actionHandlers/index.js +37 -0
  130. package/DEV-cjs/core/Table/actionHandlers/resizeHandler.js +32 -0
  131. package/DEV-cjs/core/Table/actionHandlers/selectHandler.js +100 -0
  132. package/DEV-cjs/core/Table/cells/DefaultCell.js +48 -0
  133. package/DEV-cjs/core/Table/cells/EditableCell.js +67 -0
  134. package/DEV-cjs/core/Table/cells/index.js +20 -0
  135. package/DEV-cjs/core/Table/columns/actionColumn.js +81 -0
  136. package/DEV-cjs/core/Table/columns/expanderColumn.js +57 -0
  137. package/DEV-cjs/core/Table/columns/index.js +30 -0
  138. package/DEV-cjs/core/Table/columns/selectionColumn.js +67 -0
  139. package/DEV-cjs/core/Table/filters/BaseFilter.js +27 -0
  140. package/DEV-cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +91 -0
  141. package/DEV-cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +98 -0
  142. package/DEV-cjs/core/Table/filters/FilterButtonBar.js +38 -0
  143. package/DEV-cjs/core/Table/filters/FilterToggle.js +60 -0
  144. package/DEV-cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +65 -0
  145. package/DEV-cjs/core/Table/filters/TextFilter/TextFilter.js +39 -0
  146. package/DEV-cjs/core/Table/filters/customFilterFunctions.js +25 -0
  147. package/DEV-cjs/core/Table/filters/defaultFilterFunctions.js +83 -0
  148. package/DEV-cjs/core/Table/filters/index.js +28 -0
  149. package/DEV-cjs/core/Table/filters/tableFilters.js +29 -0
  150. package/DEV-cjs/core/Table/filters/types.js +4 -0
  151. package/DEV-cjs/core/Table/hooks/index.js +44 -0
  152. package/DEV-cjs/core/Table/hooks/useColumnDragAndDrop.js +109 -0
  153. package/DEV-cjs/core/Table/hooks/useExpanderCell.js +31 -0
  154. package/DEV-cjs/core/Table/hooks/useResizeColumns.js +269 -0
  155. package/DEV-cjs/core/Table/hooks/useScrollToRow.js +41 -0
  156. package/DEV-cjs/core/Table/hooks/useSelectionCell.js +21 -0
  157. package/DEV-cjs/core/Table/hooks/useStickyColumns.js +57 -0
  158. package/DEV-cjs/core/Table/hooks/useSubRowFiltering.js +92 -0
  159. package/DEV-cjs/core/Table/hooks/useSubRowSelection.js +43 -0
  160. package/DEV-cjs/core/Table/index.js +47 -0
  161. package/DEV-cjs/core/Table/utils.js +74 -0
  162. package/DEV-cjs/core/Tabs/Tabs.js +300 -0
  163. package/DEV-cjs/core/Tag/Tag.js +46 -0
  164. package/DEV-cjs/core/Tag/TagContainer.js +27 -0
  165. package/DEV-cjs/core/Textarea/Textarea.js +20 -0
  166. package/DEV-cjs/core/ThemeProvider/ThemeContext.js +13 -0
  167. package/DEV-cjs/core/ThemeProvider/ThemeProvider.js +189 -0
  168. package/DEV-cjs/core/Tile/Tile.js +211 -0
  169. package/DEV-cjs/core/TimePicker/TimePicker.js +283 -0
  170. package/DEV-cjs/core/Toast/Toast.js +173 -0
  171. package/DEV-cjs/core/Toast/Toaster.js +136 -0
  172. package/DEV-cjs/core/ToggleSwitch/ToggleSwitch.js +46 -0
  173. package/DEV-cjs/core/Tooltip/Tooltip.js +180 -0
  174. package/DEV-cjs/core/TransferList/TransferList.js +153 -0
  175. package/DEV-cjs/core/Tree/Tree.js +198 -0
  176. package/DEV-cjs/core/Tree/TreeContext.js +26 -0
  177. package/DEV-cjs/core/Tree/TreeNode.js +153 -0
  178. package/DEV-cjs/core/Tree/TreeNodeExpander.js +35 -0
  179. package/DEV-cjs/core/Typography/Anchor.js +31 -0
  180. package/DEV-cjs/core/Typography/Blockquote.js +25 -0
  181. package/DEV-cjs/core/Typography/Code.js +13 -0
  182. package/DEV-cjs/core/Typography/Kbd.js +48 -0
  183. package/DEV-cjs/core/Typography/Text.js +40 -0
  184. package/DEV-cjs/core/VisuallyHidden/VisuallyHidden.js +44 -0
  185. package/DEV-cjs/index.js +481 -0
  186. package/DEV-cjs/react-table/react-table.js +4 -0
  187. package/DEV-cjs/react-table/react-table.types-test.js +496 -0
  188. package/DEV-cjs/styles.js +1 -0
  189. package/DEV-cjs/utils/color/ColorValue.js +343 -0
  190. package/DEV-cjs/utils/color/index.js +6 -0
  191. package/DEV-cjs/utils/components/AutoclearingHiddenLiveRegion.js +29 -0
  192. package/DEV-cjs/utils/components/Box.js +12 -0
  193. package/DEV-cjs/utils/components/ButtonBase.js +39 -0
  194. package/DEV-cjs/utils/components/FieldsetBase.js +12 -0
  195. package/DEV-cjs/utils/components/FocusTrap.js +48 -0
  196. package/DEV-cjs/utils/components/InputContainer.js +37 -0
  197. package/DEV-cjs/utils/components/InputFlexContainer.js +58 -0
  198. package/DEV-cjs/utils/components/InputWithIcon.js +13 -0
  199. package/DEV-cjs/utils/components/LineClamp.js +35 -0
  200. package/DEV-cjs/utils/components/MiddleTextTruncation.js +38 -0
  201. package/DEV-cjs/utils/components/Portal.js +41 -0
  202. package/DEV-cjs/utils/components/Resizer.js +226 -0
  203. package/DEV-cjs/utils/components/ShadowRoot.js +77 -0
  204. package/DEV-cjs/utils/components/WithCSSTransition.js +53 -0
  205. package/DEV-cjs/utils/components/index.js +19 -0
  206. package/DEV-cjs/utils/functions/colors.js +45 -0
  207. package/DEV-cjs/utils/functions/date.js +18 -0
  208. package/DEV-cjs/utils/functions/dev.js +31 -0
  209. package/DEV-cjs/utils/functions/dom.js +47 -0
  210. package/DEV-cjs/utils/functions/focusable.js +73 -0
  211. package/DEV-cjs/utils/functions/import.js +27 -0
  212. package/DEV-cjs/utils/functions/index.js +15 -0
  213. package/DEV-cjs/utils/functions/numbers.js +32 -0
  214. package/DEV-cjs/utils/functions/polymorphic.js +48 -0
  215. package/DEV-cjs/utils/functions/react.js +26 -0
  216. package/DEV-cjs/utils/functions/supports.js +12 -0
  217. package/DEV-cjs/utils/hooks/index.js +21 -0
  218. package/DEV-cjs/utils/hooks/useContainerWidth.js +29 -0
  219. package/DEV-cjs/utils/hooks/useControlledState.js +30 -0
  220. package/DEV-cjs/utils/hooks/useDragAndDrop.js +92 -0
  221. package/DEV-cjs/utils/hooks/useEventListener.js +31 -0
  222. package/DEV-cjs/utils/hooks/useGlobals.js +51 -0
  223. package/DEV-cjs/utils/hooks/useId.js +21 -0
  224. package/DEV-cjs/utils/hooks/useIntersection.js +41 -0
  225. package/DEV-cjs/utils/hooks/useIsClient.js +19 -0
  226. package/DEV-cjs/utils/hooks/useIsomorphicLayoutEffect.js +13 -0
  227. package/DEV-cjs/utils/hooks/useLatestRef.js +21 -0
  228. package/DEV-cjs/utils/hooks/useMediaQuery.js +26 -0
  229. package/DEV-cjs/utils/hooks/useMergedRefs.js +29 -0
  230. package/DEV-cjs/utils/hooks/useOverflow.js +76 -0
  231. package/DEV-cjs/utils/hooks/useResizeObserver.js +36 -0
  232. package/DEV-cjs/utils/hooks/useSafeContext.js +17 -0
  233. package/DEV-cjs/utils/hooks/useSyncExternalStore.js +46 -0
  234. package/DEV-cjs/utils/hooks/useVirtualScroll.js +38 -0
  235. package/DEV-cjs/utils/icons/StatusIconMap.js +34 -0
  236. package/DEV-cjs/utils/icons/Svg.js +16 -0
  237. package/DEV-cjs/utils/icons/SvgCalendar.js +16 -0
  238. package/DEV-cjs/utils/icons/SvgCaretDownSmall.js +16 -0
  239. package/DEV-cjs/utils/icons/SvgCaretRightSmall.js +16 -0
  240. package/DEV-cjs/utils/icons/SvgCaretUpSmall.js +16 -0
  241. package/DEV-cjs/utils/icons/SvgCheckmark.js +16 -0
  242. package/DEV-cjs/utils/icons/SvgCheckmarkSmall.js +16 -0
  243. package/DEV-cjs/utils/icons/SvgChevronLeft.js +16 -0
  244. package/DEV-cjs/utils/icons/SvgChevronLeftDouble.js +16 -0
  245. package/DEV-cjs/utils/icons/SvgChevronRight.js +16 -0
  246. package/DEV-cjs/utils/icons/SvgChevronRightDouble.js +16 -0
  247. package/DEV-cjs/utils/icons/SvgChevronRightSmall.js +16 -0
  248. package/DEV-cjs/utils/icons/SvgClose.js +16 -0
  249. package/DEV-cjs/utils/icons/SvgCloseSmall.js +16 -0
  250. package/DEV-cjs/utils/icons/SvgColumnManager.js +16 -0
  251. package/DEV-cjs/utils/icons/SvgDocument.js +16 -0
  252. package/DEV-cjs/utils/icons/SvgFilter.js +16 -0
  253. package/DEV-cjs/utils/icons/SvgFilterHollow.js +16 -0
  254. package/DEV-cjs/utils/icons/SvgImportantSmall.js +16 -0
  255. package/DEV-cjs/utils/icons/SvgInfoCircular.js +16 -0
  256. package/DEV-cjs/utils/icons/SvgMore.js +16 -0
  257. package/DEV-cjs/utils/icons/SvgMoreVertical.js +16 -0
  258. package/DEV-cjs/utils/icons/SvgNew.js +16 -0
  259. package/DEV-cjs/utils/icons/SvgSearch.js +16 -0
  260. package/DEV-cjs/utils/icons/SvgSmileyHappy.js +16 -0
  261. package/DEV-cjs/utils/icons/SvgSortDown.js +16 -0
  262. package/DEV-cjs/utils/icons/SvgSortUp.js +16 -0
  263. package/DEV-cjs/utils/icons/SvgStatusError.js +16 -0
  264. package/DEV-cjs/utils/icons/SvgStatusSuccess.js +16 -0
  265. package/DEV-cjs/utils/icons/SvgStatusWarning.js +16 -0
  266. package/DEV-cjs/utils/icons/SvgSwap.js +16 -0
  267. package/DEV-cjs/utils/icons/SvgUpload.js +16 -0
  268. package/DEV-cjs/utils/icons/index.js +37 -0
  269. package/DEV-cjs/utils/index.js +13 -0
  270. package/DEV-cjs/utils/meta.js +16 -0
  271. package/DEV-cjs/utils/props.js +4 -0
  272. package/DEV-cjs/utils/providers/HydrationProvider.js +46 -0
  273. package/DEV-cjs/utils/providers/ScopeProvider.js +64 -0
  274. package/DEV-cjs/utils/providers/index.js +7 -0
  275. package/DEV-cjs/utils/types.js +4 -0
  276. package/DEV-esm/core/Alert/Alert.js +78 -0
  277. package/DEV-esm/core/Avatar/Avatar.js +35 -0
  278. package/DEV-esm/core/AvatarGroup/AvatarGroup.js +26 -0
  279. package/DEV-esm/core/Backdrop/Backdrop.js +14 -0
  280. package/DEV-esm/core/Badge/Badge.js +36 -0
  281. package/DEV-esm/core/Breadcrumbs/Breadcrumbs.js +84 -0
  282. package/DEV-esm/core/ButtonGroup/ButtonGroup.js +71 -0
  283. package/DEV-esm/core/Buttons/Button.js +42 -0
  284. package/DEV-esm/core/Buttons/DropdownButton.js +31 -0
  285. package/DEV-esm/core/Buttons/IconButton.js +34 -0
  286. package/DEV-esm/core/Buttons/IdeasButton.js +18 -0
  287. package/DEV-esm/core/Buttons/SplitButton.js +59 -0
  288. package/DEV-esm/core/Carousel/Carousel.js +62 -0
  289. package/DEV-esm/core/Carousel/CarouselContext.js +3 -0
  290. package/DEV-esm/core/Carousel/CarouselDot.js +19 -0
  291. package/DEV-esm/core/Carousel/CarouselDotsList.js +110 -0
  292. package/DEV-esm/core/Carousel/CarouselNavigation.js +67 -0
  293. package/DEV-esm/core/Carousel/CarouselSlide.js +34 -0
  294. package/DEV-esm/core/Carousel/CarouselSlider.js +53 -0
  295. package/DEV-esm/core/Checkbox/Checkbox.js +46 -0
  296. package/DEV-esm/core/ColorPicker/ColorBuilder.js +238 -0
  297. package/DEV-esm/core/ColorPicker/ColorInputPanel.js +372 -0
  298. package/DEV-esm/core/ColorPicker/ColorPalette.js +31 -0
  299. package/DEV-esm/core/ColorPicker/ColorPicker.js +59 -0
  300. package/DEV-esm/core/ColorPicker/ColorPickerContext.js +7 -0
  301. package/DEV-esm/core/ColorPicker/ColorSwatch.js +26 -0
  302. package/DEV-esm/core/ComboBox/ComboBox.js +299 -0
  303. package/DEV-esm/core/ComboBox/ComboBox.types-test.js +78 -0
  304. package/DEV-esm/core/ComboBox/ComboBoxEndIcon.js +19 -0
  305. package/DEV-esm/core/ComboBox/ComboBoxInput.js +122 -0
  306. package/DEV-esm/core/ComboBox/ComboBoxInputContainer.js +21 -0
  307. package/DEV-esm/core/ComboBox/ComboBoxMenu.js +89 -0
  308. package/DEV-esm/core/ComboBox/ComboBoxMenuItem.js +37 -0
  309. package/DEV-esm/core/ComboBox/ComboBoxMultipleContainer.js +11 -0
  310. package/DEV-esm/core/ComboBox/helpers.js +5 -0
  311. package/DEV-esm/core/DatePicker/DatePicker.js +362 -0
  312. package/DEV-esm/core/Dialog/Dialog.js +53 -0
  313. package/DEV-esm/core/Dialog/DialogBackdrop.js +31 -0
  314. package/DEV-esm/core/Dialog/DialogButtonBar.js +3 -0
  315. package/DEV-esm/core/Dialog/DialogContent.js +3 -0
  316. package/DEV-esm/core/Dialog/DialogContext.js +3 -0
  317. package/DEV-esm/core/Dialog/DialogDragContext.js +8 -0
  318. package/DEV-esm/core/Dialog/DialogMain.js +119 -0
  319. package/DEV-esm/core/Dialog/DialogTitleBar.js +29 -0
  320. package/DEV-esm/core/Dialog/DialogTitleBarTitle.js +3 -0
  321. package/DEV-esm/core/Divider/Divider.js +14 -0
  322. package/DEV-esm/core/DropdownMenu/DropdownMenu.js +37 -0
  323. package/DEV-esm/core/ExpandableBlock/ExpandableBlock.js +139 -0
  324. package/DEV-esm/core/Fieldset/Fieldset.js +15 -0
  325. package/DEV-esm/core/FileUpload/FileEmptyCard.js +23 -0
  326. package/DEV-esm/core/FileUpload/FileUpload.js +49 -0
  327. package/DEV-esm/core/FileUpload/FileUploadCard.js +133 -0
  328. package/DEV-esm/core/FileUpload/FileUploadTemplate.js +27 -0
  329. package/DEV-esm/core/Flex/Flex.js +76 -0
  330. package/DEV-esm/core/Footer/Footer.js +83 -0
  331. package/DEV-esm/core/Footer/FooterItem.js +3 -0
  332. package/DEV-esm/core/Footer/FooterList.js +3 -0
  333. package/DEV-esm/core/Footer/FooterSeparator.js +5 -0
  334. package/DEV-esm/core/Header/Header.js +38 -0
  335. package/DEV-esm/core/Header/HeaderBasicButton.js +11 -0
  336. package/DEV-esm/core/Header/HeaderBreadcrumbs.js +29 -0
  337. package/DEV-esm/core/Header/HeaderButton.js +40 -0
  338. package/DEV-esm/core/Header/HeaderDropdownButton.js +36 -0
  339. package/DEV-esm/core/Header/HeaderLogo.js +22 -0
  340. package/DEV-esm/core/Header/HeaderSplitButton.js +41 -0
  341. package/DEV-esm/core/Icon/Icon.js +28 -0
  342. package/DEV-esm/core/InformationPanel/InformationPanel.js +56 -0
  343. package/DEV-esm/core/InformationPanel/InformationPanelBody.js +3 -0
  344. package/DEV-esm/core/InformationPanel/InformationPanelContent.js +14 -0
  345. package/DEV-esm/core/InformationPanel/InformationPanelHeader.js +24 -0
  346. package/DEV-esm/core/InformationPanel/InformationPanelWrapper.js +3 -0
  347. package/DEV-esm/core/Input/Input.js +18 -0
  348. package/DEV-esm/core/InputGrid/InputGrid.js +113 -0
  349. package/DEV-esm/core/InputGroup/InputGroup.js +46 -0
  350. package/DEV-esm/core/InputWithDecorations/InputWithDecorations.js +50 -0
  351. package/DEV-esm/core/Label/Label.js +17 -0
  352. package/DEV-esm/core/LabeledInput/LabeledInput.js +37 -0
  353. package/DEV-esm/core/LabeledSelect/LabeledSelect.js +32 -0
  354. package/DEV-esm/core/LabeledSelect/LabeledSelect.types-test.js +80 -0
  355. package/DEV-esm/core/LabeledTextarea/LabeledTextarea.js +9 -0
  356. package/DEV-esm/core/LinkAction/LinkAction.js +16 -0
  357. package/DEV-esm/core/List/List.js +5 -0
  358. package/DEV-esm/core/List/ListItem.js +33 -0
  359. package/DEV-esm/core/Menu/Menu.js +120 -0
  360. package/DEV-esm/core/Menu/MenuDivider.js +5 -0
  361. package/DEV-esm/core/Menu/MenuExtraContent.js +5 -0
  362. package/DEV-esm/core/Menu/MenuItem.js +70 -0
  363. package/DEV-esm/core/Menu/MenuItemSkeleton.js +32 -0
  364. package/DEV-esm/core/Modal/Modal.js +25 -0
  365. package/DEV-esm/core/Modal/ModalButtonBar.js +3 -0
  366. package/DEV-esm/core/Modal/ModalContent.js +3 -0
  367. package/DEV-esm/core/NonIdealState/ErrorPage.js +122 -0
  368. package/DEV-esm/core/NonIdealState/NonIdealState.js +28 -0
  369. package/DEV-esm/core/NotificationMarker/NotificationMarker.js +17 -0
  370. package/DEV-esm/core/Overlay/Overlay.js +41 -0
  371. package/DEV-esm/core/Popover/Popover.js +186 -0
  372. package/DEV-esm/core/ProgressIndicators/ProgressLinear.js +26 -0
  373. package/DEV-esm/core/ProgressIndicators/ProgressRadial.js +33 -0
  374. package/DEV-esm/core/Radio/Radio.js +30 -0
  375. package/DEV-esm/core/RadioTiles/RadioTile.js +35 -0
  376. package/DEV-esm/core/RadioTiles/RadioTileGroup.js +14 -0
  377. package/DEV-esm/core/SearchBox/SearchBox.js +142 -0
  378. package/DEV-esm/core/Select/Select.js +288 -0
  379. package/DEV-esm/core/Select/Select.types-test.js +86 -0
  380. package/DEV-esm/core/Select/SelectTag.js +15 -0
  381. package/DEV-esm/core/Select/SelectTagContainer.js +16 -0
  382. package/DEV-esm/core/SideNavigation/SideNavigation.js +54 -0
  383. package/DEV-esm/core/SideNavigation/SidenavButton.js +25 -0
  384. package/DEV-esm/core/SideNavigation/SidenavSubmenu.js +14 -0
  385. package/DEV-esm/core/SideNavigation/SidenavSubmenuHeader.js +16 -0
  386. package/DEV-esm/core/SkipToContentLink/SkipToContentLink.js +13 -0
  387. package/DEV-esm/core/Slider/Slider.js +269 -0
  388. package/DEV-esm/core/Slider/Thumb.js +90 -0
  389. package/DEV-esm/core/Slider/Track.js +58 -0
  390. package/DEV-esm/core/StatusMessage/StatusMessage.js +19 -0
  391. package/DEV-esm/core/Stepper/Stepper.js +44 -0
  392. package/DEV-esm/core/Stepper/StepperStep.js +52 -0
  393. package/DEV-esm/core/Stepper/WorkflowDiagram.js +25 -0
  394. package/DEV-esm/core/Stepper/WorkflowDiagramStep.js +20 -0
  395. package/DEV-esm/core/Surface/Surface.js +82 -0
  396. package/DEV-esm/core/Table/SubRowExpander.js +26 -0
  397. package/DEV-esm/core/Table/Table.js +518 -0
  398. package/DEV-esm/core/Table/TableCell.js +57 -0
  399. package/DEV-esm/core/Table/TablePaginator.js +176 -0
  400. package/DEV-esm/core/Table/TableRowMemoized.js +79 -0
  401. package/DEV-esm/core/Table/actionHandlers/expandHandler.js +11 -0
  402. package/DEV-esm/core/Table/actionHandlers/filterHandler.js +16 -0
  403. package/DEV-esm/core/Table/actionHandlers/index.js +4 -0
  404. package/DEV-esm/core/Table/actionHandlers/resizeHandler.js +14 -0
  405. package/DEV-esm/core/Table/actionHandlers/selectHandler.js +79 -0
  406. package/DEV-esm/core/Table/cells/DefaultCell.js +36 -0
  407. package/DEV-esm/core/Table/cells/EditableCell.js +55 -0
  408. package/DEV-esm/core/Table/cells/index.js +2 -0
  409. package/DEV-esm/core/Table/columns/actionColumn.js +70 -0
  410. package/DEV-esm/core/Table/columns/expanderColumn.js +38 -0
  411. package/DEV-esm/core/Table/columns/index.js +3 -0
  412. package/DEV-esm/core/Table/columns/selectionColumn.js +48 -0
  413. package/DEV-esm/core/Table/filters/BaseFilter.js +15 -0
  414. package/DEV-esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +80 -0
  415. package/DEV-esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +87 -0
  416. package/DEV-esm/core/Table/filters/FilterButtonBar.js +26 -0
  417. package/DEV-esm/core/Table/filters/FilterToggle.js +48 -0
  418. package/DEV-esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +54 -0
  419. package/DEV-esm/core/Table/filters/TextFilter/TextFilter.js +28 -0
  420. package/DEV-esm/core/Table/filters/customFilterFunctions.js +15 -0
  421. package/DEV-esm/core/Table/filters/defaultFilterFunctions.js +73 -0
  422. package/DEV-esm/core/Table/filters/index.js +4 -0
  423. package/DEV-esm/core/Table/filters/tableFilters.js +18 -0
  424. package/DEV-esm/core/Table/filters/types.js +1 -0
  425. package/DEV-esm/core/Table/hooks/index.js +8 -0
  426. package/DEV-esm/core/Table/hooks/useColumnDragAndDrop.js +99 -0
  427. package/DEV-esm/core/Table/hooks/useExpanderCell.js +20 -0
  428. package/DEV-esm/core/Table/hooks/useResizeColumns.js +259 -0
  429. package/DEV-esm/core/Table/hooks/useScrollToRow.js +30 -0
  430. package/DEV-esm/core/Table/hooks/useSelectionCell.js +11 -0
  431. package/DEV-esm/core/Table/hooks/useStickyColumns.js +47 -0
  432. package/DEV-esm/core/Table/hooks/useSubRowFiltering.js +81 -0
  433. package/DEV-esm/core/Table/hooks/useSubRowSelection.js +32 -0
  434. package/DEV-esm/core/Table/index.js +5 -0
  435. package/DEV-esm/core/Table/utils.js +49 -0
  436. package/DEV-esm/core/Tabs/Tabs.js +281 -0
  437. package/DEV-esm/core/Tag/Tag.js +34 -0
  438. package/DEV-esm/core/Tag/TagContainer.js +15 -0
  439. package/DEV-esm/core/Textarea/Textarea.js +9 -0
  440. package/DEV-esm/core/ThemeProvider/ThemeContext.js +2 -0
  441. package/DEV-esm/core/ThemeProvider/ThemeProvider.js +177 -0
  442. package/DEV-esm/core/Tile/Tile.js +199 -0
  443. package/DEV-esm/core/TimePicker/TimePicker.js +271 -0
  444. package/DEV-esm/core/Toast/Toast.js +153 -0
  445. package/DEV-esm/core/Toast/Toaster.js +110 -0
  446. package/DEV-esm/core/ToggleSwitch/ToggleSwitch.js +34 -0
  447. package/DEV-esm/core/Tooltip/Tooltip.js +168 -0
  448. package/DEV-esm/core/TransferList/TransferList.js +133 -0
  449. package/DEV-esm/core/Tree/Tree.js +187 -0
  450. package/DEV-esm/core/Tree/TreeContext.js +7 -0
  451. package/DEV-esm/core/Tree/TreeNode.js +141 -0
  452. package/DEV-esm/core/Tree/TreeNodeExpander.js +23 -0
  453. package/DEV-esm/core/Typography/Anchor.js +19 -0
  454. package/DEV-esm/core/Typography/Blockquote.js +13 -0
  455. package/DEV-esm/core/Typography/Code.js +3 -0
  456. package/DEV-esm/core/Typography/Kbd.js +28 -0
  457. package/DEV-esm/core/Typography/Text.js +20 -0
  458. package/DEV-esm/core/VisuallyHidden/VisuallyHidden.js +32 -0
  459. package/DEV-esm/index.js +106 -0
  460. package/DEV-esm/react-table/react-table.js +1 -0
  461. package/DEV-esm/react-table/react-table.types-test.js +491 -0
  462. package/DEV-esm/styles.js +17 -0
  463. package/DEV-esm/utils/color/ColorValue.js +319 -0
  464. package/DEV-esm/utils/color/index.js +1 -0
  465. package/DEV-esm/utils/components/AutoclearingHiddenLiveRegion.js +18 -0
  466. package/DEV-esm/utils/components/Box.js +2 -0
  467. package/DEV-esm/utils/components/ButtonBase.js +27 -0
  468. package/DEV-esm/utils/components/FieldsetBase.js +2 -0
  469. package/DEV-esm/utils/components/FocusTrap.js +37 -0
  470. package/DEV-esm/utils/components/InputContainer.js +25 -0
  471. package/DEV-esm/utils/components/InputFlexContainer.js +35 -0
  472. package/DEV-esm/utils/components/InputWithIcon.js +3 -0
  473. package/DEV-esm/utils/components/LineClamp.js +24 -0
  474. package/DEV-esm/utils/components/MiddleTextTruncation.js +27 -0
  475. package/DEV-esm/utils/components/Portal.js +19 -0
  476. package/DEV-esm/utils/components/Resizer.js +215 -0
  477. package/DEV-esm/utils/components/ShadowRoot.js +66 -0
  478. package/DEV-esm/utils/components/WithCSSTransition.js +42 -0
  479. package/DEV-esm/utils/components/index.js +14 -0
  480. package/DEV-esm/utils/functions/colors.js +24 -0
  481. package/DEV-esm/utils/functions/date.js +8 -0
  482. package/DEV-esm/utils/functions/dev.js +14 -0
  483. package/DEV-esm/utils/functions/dom.js +20 -0
  484. package/DEV-esm/utils/functions/focusable.js +51 -0
  485. package/DEV-esm/utils/functions/import.js +17 -0
  486. package/DEV-esm/utils/functions/index.js +10 -0
  487. package/DEV-esm/utils/functions/numbers.js +11 -0
  488. package/DEV-esm/utils/functions/polymorphic.js +36 -0
  489. package/DEV-esm/utils/functions/react.js +15 -0
  490. package/DEV-esm/utils/functions/supports.js +2 -0
  491. package/DEV-esm/utils/hooks/index.js +16 -0
  492. package/DEV-esm/utils/hooks/useContainerWidth.js +18 -0
  493. package/DEV-esm/utils/hooks/useControlledState.js +19 -0
  494. package/DEV-esm/utils/hooks/useDragAndDrop.js +81 -0
  495. package/DEV-esm/utils/hooks/useEventListener.js +20 -0
  496. package/DEV-esm/utils/hooks/useGlobals.js +32 -0
  497. package/DEV-esm/utils/hooks/useId.js +10 -0
  498. package/DEV-esm/utils/hooks/useIntersection.js +30 -0
  499. package/DEV-esm/utils/hooks/useIsClient.js +8 -0
  500. package/DEV-esm/utils/hooks/useIsomorphicLayoutEffect.js +3 -0
  501. package/DEV-esm/utils/hooks/useLatestRef.js +10 -0
  502. package/DEV-esm/utils/hooks/useMediaQuery.js +15 -0
  503. package/DEV-esm/utils/hooks/useMergedRefs.js +10 -0
  504. package/DEV-esm/utils/hooks/useOverflow.js +65 -0
  505. package/DEV-esm/utils/hooks/useResizeObserver.js +25 -0
  506. package/DEV-esm/utils/hooks/useSafeContext.js +6 -0
  507. package/DEV-esm/utils/hooks/useSyncExternalStore.js +35 -0
  508. package/DEV-esm/utils/hooks/useVirtualScroll.js +27 -0
  509. package/DEV-esm/utils/icons/StatusIconMap.js +23 -0
  510. package/DEV-esm/utils/icons/Svg.js +6 -0
  511. package/DEV-esm/utils/icons/SvgCalendar.js +5 -0
  512. package/DEV-esm/utils/icons/SvgCaretDownSmall.js +5 -0
  513. package/DEV-esm/utils/icons/SvgCaretRightSmall.js +5 -0
  514. package/DEV-esm/utils/icons/SvgCaretUpSmall.js +5 -0
  515. package/DEV-esm/utils/icons/SvgCheckmark.js +5 -0
  516. package/DEV-esm/utils/icons/SvgCheckmarkSmall.js +5 -0
  517. package/DEV-esm/utils/icons/SvgChevronLeft.js +5 -0
  518. package/DEV-esm/utils/icons/SvgChevronLeftDouble.js +5 -0
  519. package/DEV-esm/utils/icons/SvgChevronRight.js +5 -0
  520. package/DEV-esm/utils/icons/SvgChevronRightDouble.js +5 -0
  521. package/DEV-esm/utils/icons/SvgChevronRightSmall.js +5 -0
  522. package/DEV-esm/utils/icons/SvgClose.js +5 -0
  523. package/DEV-esm/utils/icons/SvgCloseSmall.js +5 -0
  524. package/DEV-esm/utils/icons/SvgColumnManager.js +5 -0
  525. package/DEV-esm/utils/icons/SvgDocument.js +5 -0
  526. package/DEV-esm/utils/icons/SvgFilter.js +5 -0
  527. package/DEV-esm/utils/icons/SvgFilterHollow.js +5 -0
  528. package/DEV-esm/utils/icons/SvgImportantSmall.js +5 -0
  529. package/DEV-esm/utils/icons/SvgInfoCircular.js +5 -0
  530. package/DEV-esm/utils/icons/SvgMore.js +5 -0
  531. package/DEV-esm/utils/icons/SvgMoreVertical.js +5 -0
  532. package/DEV-esm/utils/icons/SvgNew.js +5 -0
  533. package/DEV-esm/utils/icons/SvgSearch.js +5 -0
  534. package/DEV-esm/utils/icons/SvgSmileyHappy.js +5 -0
  535. package/DEV-esm/utils/icons/SvgSortDown.js +5 -0
  536. package/DEV-esm/utils/icons/SvgSortUp.js +5 -0
  537. package/DEV-esm/utils/icons/SvgStatusError.js +5 -0
  538. package/DEV-esm/utils/icons/SvgStatusSuccess.js +5 -0
  539. package/DEV-esm/utils/icons/SvgStatusWarning.js +5 -0
  540. package/DEV-esm/utils/icons/SvgSwap.js +5 -0
  541. package/DEV-esm/utils/icons/SvgUpload.js +5 -0
  542. package/DEV-esm/utils/icons/index.js +32 -0
  543. package/DEV-esm/utils/index.js +8 -0
  544. package/DEV-esm/utils/meta.js +6 -0
  545. package/DEV-esm/utils/props.js +1 -0
  546. package/DEV-esm/utils/providers/HydrationProvider.js +27 -0
  547. package/DEV-esm/utils/providers/ScopeProvider.js +42 -0
  548. package/DEV-esm/utils/providers/index.js +2 -0
  549. package/DEV-esm/utils/types.js +1 -0
  550. package/cjs/core/Alert/Alert.js +11 -17
  551. package/cjs/core/Avatar/Avatar.js +5 -7
  552. package/cjs/core/AvatarGroup/AvatarGroup.js +8 -9
  553. package/cjs/core/Backdrop/Backdrop.js +1 -1
  554. package/cjs/core/Badge/Badge.js +8 -10
  555. package/cjs/core/Breadcrumbs/Breadcrumbs.js +14 -20
  556. package/cjs/core/ButtonGroup/ButtonGroup.js +18 -24
  557. package/cjs/core/Buttons/Button.js +7 -7
  558. package/cjs/core/Buttons/DropdownButton.js +2 -2
  559. package/cjs/core/Buttons/IconButton.js +7 -7
  560. package/cjs/core/Buttons/IdeasButton.js +1 -1
  561. package/cjs/core/Buttons/SplitButton.js +9 -12
  562. package/cjs/core/Carousel/Carousel.js +10 -10
  563. package/cjs/core/Carousel/CarouselContext.js +1 -1
  564. package/cjs/core/Carousel/CarouselDot.js +1 -1
  565. package/cjs/core/Carousel/CarouselDotsList.js +59 -68
  566. package/cjs/core/Carousel/CarouselNavigation.js +9 -11
  567. package/cjs/core/Carousel/CarouselSlide.js +11 -15
  568. package/cjs/core/Carousel/CarouselSlider.js +13 -19
  569. package/cjs/core/Checkbox/Checkbox.js +13 -14
  570. package/cjs/core/ColorPicker/ColorBuilder.js +44 -57
  571. package/cjs/core/ColorPicker/ColorInputPanel.js +65 -92
  572. package/cjs/core/ColorPicker/ColorPalette.js +3 -3
  573. package/cjs/core/ColorPicker/ColorPicker.js +11 -19
  574. package/cjs/core/ColorPicker/ColorPickerContext.js +3 -4
  575. package/cjs/core/ColorPicker/ColorSwatch.js +5 -5
  576. package/cjs/core/ComboBox/ComboBox.js +80 -115
  577. package/cjs/core/ComboBox/ComboBox.types-test.js +14 -17
  578. package/cjs/core/ComboBox/ComboBoxEndIcon.js +1 -2
  579. package/cjs/core/ComboBox/ComboBoxInput.js +39 -68
  580. package/cjs/core/ComboBox/ComboBoxInputContainer.js +3 -4
  581. package/cjs/core/ComboBox/ComboBoxMenu.js +76 -44
  582. package/cjs/core/ComboBox/ComboBoxMenuItem.js +7 -9
  583. package/cjs/core/ComboBox/ComboBoxMultipleContainer.js +1 -2
  584. package/cjs/core/ComboBox/helpers.js +2 -4
  585. package/cjs/core/DatePicker/DatePicker.js +132 -167
  586. package/cjs/core/Dialog/Dialog.js +3 -3
  587. package/cjs/core/Dialog/DialogBackdrop.js +8 -12
  588. package/cjs/core/Dialog/DialogContext.js +2 -4
  589. package/cjs/core/Dialog/DialogDragContext.js +2 -2
  590. package/cjs/core/Dialog/DialogMain.js +26 -40
  591. package/cjs/core/Dialog/DialogTitleBar.js +3 -3
  592. package/cjs/core/Dialog/DialogTitleBarTitle.d.ts +3 -1
  593. package/cjs/core/Divider/Divider.js +2 -2
  594. package/cjs/core/DropdownMenu/DropdownMenu.js +10 -15
  595. package/cjs/core/ExpandableBlock/ExpandableBlock.js +21 -37
  596. package/cjs/core/Fieldset/Fieldset.js +2 -3
  597. package/cjs/core/FileUpload/FileEmptyCard.js +1 -1
  598. package/cjs/core/FileUpload/FileUpload.js +8 -10
  599. package/cjs/core/FileUpload/FileUploadCard.js +25 -40
  600. package/cjs/core/FileUpload/FileUploadTemplate.js +1 -1
  601. package/cjs/core/Flex/Flex.js +7 -12
  602. package/cjs/core/Footer/Footer.js +10 -11
  603. package/cjs/core/Header/Header.js +3 -3
  604. package/cjs/core/Header/HeaderBasicButton.js +1 -3
  605. package/cjs/core/Header/HeaderBreadcrumbs.js +1 -1
  606. package/cjs/core/Header/HeaderButton.js +7 -7
  607. package/cjs/core/Header/HeaderDropdownButton.js +6 -8
  608. package/cjs/core/Header/HeaderLogo.js +3 -3
  609. package/cjs/core/Header/HeaderSplitButton.js +5 -7
  610. package/cjs/core/Icon/Icon.js +2 -2
  611. package/cjs/core/InformationPanel/InformationPanel.js +25 -33
  612. package/cjs/core/InformationPanel/InformationPanelContent.js +2 -2
  613. package/cjs/core/InformationPanel/InformationPanelHeader.js +1 -1
  614. package/cjs/core/Input/Input.js +3 -3
  615. package/cjs/core/InputGrid/InputGrid.js +40 -71
  616. package/cjs/core/InputGroup/InputGroup.js +5 -8
  617. package/cjs/core/InputWithDecorations/InputWithDecorations.js +6 -9
  618. package/cjs/core/Label/Label.js +3 -3
  619. package/cjs/core/LabeledInput/LabeledInput.js +4 -4
  620. package/cjs/core/LabeledSelect/LabeledSelect.js +4 -6
  621. package/cjs/core/LabeledSelect/LabeledSelect.types-test.js +11 -14
  622. package/cjs/core/LabeledTextarea/LabeledTextarea.js +4 -4
  623. package/cjs/core/LinkAction/LinkAction.js +1 -3
  624. package/cjs/core/List/List.js +0 -1
  625. package/cjs/core/List/ListItem.js +6 -11
  626. package/cjs/core/Menu/Menu.js +32 -38
  627. package/cjs/core/Menu/MenuItem.js +18 -24
  628. package/cjs/core/Menu/MenuItemSkeleton.js +2 -4
  629. package/cjs/core/Modal/Modal.js +1 -1
  630. package/cjs/core/NonIdealState/ErrorPage.js +26 -52
  631. package/cjs/core/NonIdealState/NonIdealState.js +1 -1
  632. package/cjs/core/NotificationMarker/NotificationMarker.js +1 -1
  633. package/cjs/core/Overlay/Overlay.js +10 -12
  634. package/cjs/core/Popover/Popover.js +35 -41
  635. package/cjs/core/ProgressIndicators/ProgressLinear.js +6 -6
  636. package/cjs/core/ProgressIndicators/ProgressRadial.js +7 -9
  637. package/cjs/core/Radio/Radio.js +8 -8
  638. package/cjs/core/RadioTiles/RadioTile.js +4 -4
  639. package/cjs/core/RadioTiles/RadioTileGroup.js +1 -1
  640. package/cjs/core/SearchBox/SearchBox.js +24 -42
  641. package/cjs/core/Select/Select.js +130 -142
  642. package/cjs/core/Select/Select.types-test.js +13 -17
  643. package/cjs/core/Select/SelectTag.js +1 -1
  644. package/cjs/core/Select/SelectTagContainer.js +3 -3
  645. package/cjs/core/SideNavigation/SideNavigation.js +6 -6
  646. package/cjs/core/SideNavigation/SidenavButton.js +8 -8
  647. package/cjs/core/SideNavigation/SidenavSubmenu.js +1 -1
  648. package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +1 -1
  649. package/cjs/core/SkipToContentLink/SkipToContentLink.js +1 -1
  650. package/cjs/core/Slider/Slider.js +58 -83
  651. package/cjs/core/Slider/Thumb.js +13 -21
  652. package/cjs/core/Slider/Track.js +10 -14
  653. package/cjs/core/StatusMessage/StatusMessage.js +3 -3
  654. package/cjs/core/Stepper/Stepper.js +8 -8
  655. package/cjs/core/Stepper/StepperStep.js +15 -22
  656. package/cjs/core/Stepper/WorkflowDiagram.js +2 -2
  657. package/cjs/core/Stepper/WorkflowDiagramStep.js +2 -2
  658. package/cjs/core/Surface/Surface.d.ts +1 -0
  659. package/cjs/core/Surface/Surface.js +15 -24
  660. package/cjs/core/Table/SubRowExpander.js +3 -3
  661. package/cjs/core/Table/Table.d.ts +4 -1
  662. package/cjs/core/Table/Table.js +256 -244
  663. package/cjs/core/Table/TableCell.js +12 -14
  664. package/cjs/core/Table/TablePaginator.js +38 -55
  665. package/cjs/core/Table/TableRowMemoized.d.ts +3 -0
  666. package/cjs/core/Table/TableRowMemoized.js +43 -35
  667. package/cjs/core/Table/actionHandlers/expandHandler.js +2 -4
  668. package/cjs/core/Table/actionHandlers/filterHandler.js +3 -3
  669. package/cjs/core/Table/actionHandlers/resizeHandler.js +13 -17
  670. package/cjs/core/Table/actionHandlers/selectHandler.js +20 -29
  671. package/cjs/core/Table/cells/DefaultCell.d.ts +4 -1
  672. package/cjs/core/Table/cells/DefaultCell.js +5 -5
  673. package/cjs/core/Table/cells/EditableCell.d.ts +4 -1
  674. package/cjs/core/Table/cells/EditableCell.js +7 -13
  675. package/cjs/core/Table/columns/actionColumn.d.ts +2 -2
  676. package/cjs/core/Table/columns/actionColumn.js +79 -88
  677. package/cjs/core/Table/columns/expanderColumn.js +4 -6
  678. package/cjs/core/Table/columns/selectionColumn.js +8 -10
  679. package/cjs/core/Table/filters/BaseFilter.js +1 -1
  680. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +16 -25
  681. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +17 -29
  682. package/cjs/core/Table/filters/FilterButtonBar.js +2 -2
  683. package/cjs/core/Table/filters/FilterToggle.js +8 -8
  684. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +11 -17
  685. package/cjs/core/Table/filters/TextFilter/TextFilter.js +7 -13
  686. package/cjs/core/Table/filters/customFilterFunctions.js +11 -12
  687. package/cjs/core/Table/filters/defaultFilterFunctions.js +69 -78
  688. package/cjs/core/Table/hooks/useColumnDragAndDrop.js +20 -26
  689. package/cjs/core/Table/hooks/useExpanderCell.js +4 -8
  690. package/cjs/core/Table/hooks/useResizeColumns.js +63 -100
  691. package/cjs/core/Table/hooks/useScrollToRow.js +13 -20
  692. package/cjs/core/Table/hooks/useSelectionCell.js +2 -4
  693. package/cjs/core/Table/hooks/useStickyColumns.js +10 -23
  694. package/cjs/core/Table/hooks/useSubRowFiltering.js +20 -34
  695. package/cjs/core/Table/hooks/useSubRowSelection.js +4 -5
  696. package/cjs/core/Table/utils.js +18 -31
  697. package/cjs/core/Tabs/Tabs.js +70 -102
  698. package/cjs/core/Tag/Tag.js +8 -8
  699. package/cjs/core/Tag/TagContainer.js +2 -2
  700. package/cjs/core/Textarea/Textarea.js +4 -4
  701. package/cjs/core/ThemeProvider/ThemeContext.js +1 -1
  702. package/cjs/core/ThemeProvider/ThemeProvider.js +60 -56
  703. package/cjs/core/Tile/Tile.js +27 -52
  704. package/cjs/core/TimePicker/TimePicker.js +82 -111
  705. package/cjs/core/Toast/Toast.js +30 -39
  706. package/cjs/core/Toast/Toaster.js +19 -25
  707. package/cjs/core/ToggleSwitch/ToggleSwitch.js +5 -5
  708. package/cjs/core/Tooltip/Tooltip.js +30 -39
  709. package/cjs/core/TransferList/TransferList.js +33 -51
  710. package/cjs/core/Tree/Tree.d.ts +4 -1
  711. package/cjs/core/Tree/Tree.js +97 -77
  712. package/cjs/core/Tree/TreeContext.js +3 -4
  713. package/cjs/core/Tree/TreeNode.d.ts +2 -2
  714. package/cjs/core/Tree/TreeNode.js +22 -37
  715. package/cjs/core/Tree/TreeNodeExpander.js +4 -4
  716. package/cjs/core/Typography/Anchor.js +4 -4
  717. package/cjs/core/Typography/Blockquote.js +1 -1
  718. package/cjs/core/Typography/Kbd.js +1 -1
  719. package/cjs/core/Typography/Text.js +3 -3
  720. package/cjs/core/VisuallyHidden/VisuallyHidden.js +7 -7
  721. package/cjs/react-table/react-table.types-test.js +110 -115
  722. package/cjs/styles.js +5 -5
  723. package/cjs/utils/color/ColorValue.js +114 -161
  724. package/cjs/utils/components/AutoclearingHiddenLiveRegion.js +2 -2
  725. package/cjs/utils/components/ButtonBase.js +10 -13
  726. package/cjs/utils/components/FieldsetBase.d.ts +6 -0
  727. package/cjs/utils/components/FieldsetBase.js +12 -0
  728. package/cjs/utils/components/FocusTrap.js +14 -20
  729. package/cjs/utils/components/InputContainer.js +3 -3
  730. package/cjs/utils/components/InputFlexContainer.js +4 -5
  731. package/cjs/utils/components/InputWithIcon.js +0 -1
  732. package/cjs/utils/components/LineClamp.js +1 -1
  733. package/cjs/utils/components/MiddleTextTruncation.d.ts +4 -1
  734. package/cjs/utils/components/MiddleTextTruncation.js +5 -7
  735. package/cjs/utils/components/Portal.js +8 -12
  736. package/cjs/utils/components/Resizer.js +33 -49
  737. package/cjs/utils/components/ShadowRoot.js +19 -28
  738. package/cjs/utils/components/WithCSSTransition.js +4 -5
  739. package/cjs/utils/components/index.d.ts +1 -1
  740. package/cjs/utils/components/index.js +1 -1
  741. package/cjs/utils/functions/colors.js +4 -5
  742. package/cjs/utils/functions/date.js +3 -5
  743. package/cjs/utils/functions/dev.d.ts +11 -5
  744. package/cjs/utils/functions/dev.js +6 -23
  745. package/cjs/utils/functions/dom.js +7 -16
  746. package/cjs/utils/functions/focusable.js +18 -22
  747. package/cjs/utils/functions/import.js +1 -1
  748. package/cjs/utils/functions/numbers.js +5 -8
  749. package/cjs/utils/functions/polymorphic.js +31 -43
  750. package/cjs/utils/functions/react.js +4 -8
  751. package/cjs/utils/hooks/index.d.ts +1 -0
  752. package/cjs/utils/hooks/index.js +1 -0
  753. package/cjs/utils/hooks/useContainerWidth.js +8 -12
  754. package/cjs/utils/hooks/useControlledState.js +4 -5
  755. package/cjs/utils/hooks/useDragAndDrop.js +31 -42
  756. package/cjs/utils/hooks/useEventListener.js +3 -5
  757. package/cjs/utils/hooks/useGlobals.js +3 -22
  758. package/cjs/utils/hooks/useId.js +1 -1
  759. package/cjs/utils/hooks/useIntersection.js +6 -10
  760. package/cjs/utils/hooks/useIsClient.js +1 -1
  761. package/cjs/utils/hooks/useIsomorphicLayoutEffect.js +1 -1
  762. package/cjs/utils/hooks/useLatestRef.js +1 -1
  763. package/cjs/utils/hooks/useMediaQuery.js +10 -8
  764. package/cjs/utils/hooks/useMergedRefs.js +7 -11
  765. package/cjs/utils/hooks/useOverflow.js +23 -25
  766. package/cjs/utils/hooks/useResizeObserver.js +5 -9
  767. package/cjs/utils/hooks/useSafeContext.js +3 -4
  768. package/cjs/utils/hooks/useSyncExternalStore.js +5 -7
  769. package/cjs/utils/hooks/useVirtualScroll.d.ts +14 -0
  770. package/cjs/utils/hooks/useVirtualScroll.js +39 -0
  771. package/cjs/utils/icons/SvgCalendar.js +2 -3
  772. package/cjs/utils/icons/SvgCaretDownSmall.js +2 -3
  773. package/cjs/utils/icons/SvgCaretRightSmall.js +2 -3
  774. package/cjs/utils/icons/SvgCaretUpSmall.js +2 -3
  775. package/cjs/utils/icons/SvgCheckmark.js +2 -3
  776. package/cjs/utils/icons/SvgCheckmarkSmall.js +2 -3
  777. package/cjs/utils/icons/SvgChevronLeft.js +2 -3
  778. package/cjs/utils/icons/SvgChevronLeftDouble.js +2 -3
  779. package/cjs/utils/icons/SvgChevronRight.js +2 -3
  780. package/cjs/utils/icons/SvgChevronRightDouble.js +2 -3
  781. package/cjs/utils/icons/SvgChevronRightSmall.js +2 -3
  782. package/cjs/utils/icons/SvgClose.js +2 -3
  783. package/cjs/utils/icons/SvgCloseSmall.js +2 -3
  784. package/cjs/utils/icons/SvgColumnManager.js +2 -3
  785. package/cjs/utils/icons/SvgDocument.js +2 -3
  786. package/cjs/utils/icons/SvgFilter.js +2 -3
  787. package/cjs/utils/icons/SvgFilterHollow.js +2 -3
  788. package/cjs/utils/icons/SvgImportantSmall.js +2 -3
  789. package/cjs/utils/icons/SvgInfoCircular.js +2 -3
  790. package/cjs/utils/icons/SvgMore.js +2 -3
  791. package/cjs/utils/icons/SvgMoreVertical.js +2 -3
  792. package/cjs/utils/icons/SvgNew.js +2 -3
  793. package/cjs/utils/icons/SvgSearch.js +2 -3
  794. package/cjs/utils/icons/SvgSmileyHappy.js +2 -3
  795. package/cjs/utils/icons/SvgSortDown.js +2 -3
  796. package/cjs/utils/icons/SvgSortUp.js +2 -3
  797. package/cjs/utils/icons/SvgStatusError.js +2 -3
  798. package/cjs/utils/icons/SvgStatusSuccess.js +2 -3
  799. package/cjs/utils/icons/SvgStatusWarning.js +2 -3
  800. package/cjs/utils/icons/SvgSwap.js +2 -3
  801. package/cjs/utils/icons/SvgUpload.js +2 -3
  802. package/cjs/utils/meta.js +1 -1
  803. package/cjs/utils/providers/HydrationProvider.js +12 -16
  804. package/cjs/utils/providers/ScopeProvider.js +8 -10
  805. package/esm/core/Alert/Alert.js +17 -23
  806. package/esm/core/Avatar/Avatar.js +6 -8
  807. package/esm/core/AvatarGroup/AvatarGroup.js +8 -9
  808. package/esm/core/Backdrop/Backdrop.js +1 -1
  809. package/esm/core/Badge/Badge.js +10 -12
  810. package/esm/core/Breadcrumbs/Breadcrumbs.js +18 -24
  811. package/esm/core/ButtonGroup/ButtonGroup.js +20 -26
  812. package/esm/core/Buttons/Button.js +7 -7
  813. package/esm/core/Buttons/DropdownButton.js +2 -2
  814. package/esm/core/Buttons/IconButton.js +7 -7
  815. package/esm/core/Buttons/IdeasButton.js +1 -1
  816. package/esm/core/Buttons/SplitButton.js +9 -12
  817. package/esm/core/Carousel/Carousel.js +11 -11
  818. package/esm/core/Carousel/CarouselContext.js +1 -1
  819. package/esm/core/Carousel/CarouselDot.js +1 -1
  820. package/esm/core/Carousel/CarouselDotsList.js +59 -68
  821. package/esm/core/Carousel/CarouselNavigation.js +12 -14
  822. package/esm/core/Carousel/CarouselSlide.js +11 -15
  823. package/esm/core/Carousel/CarouselSlider.js +13 -20
  824. package/esm/core/Checkbox/Checkbox.js +13 -14
  825. package/esm/core/ColorPicker/ColorBuilder.js +46 -59
  826. package/esm/core/ColorPicker/ColorInputPanel.js +65 -92
  827. package/esm/core/ColorPicker/ColorPalette.js +3 -3
  828. package/esm/core/ColorPicker/ColorPicker.js +11 -18
  829. package/esm/core/ColorPicker/ColorPickerContext.js +3 -4
  830. package/esm/core/ColorPicker/ColorSwatch.js +5 -7
  831. package/esm/core/ComboBox/ComboBox.js +80 -115
  832. package/esm/core/ComboBox/ComboBox.types-test.js +14 -17
  833. package/esm/core/ComboBox/ComboBoxEndIcon.js +1 -2
  834. package/esm/core/ComboBox/ComboBoxInput.js +39 -68
  835. package/esm/core/ComboBox/ComboBoxInputContainer.js +3 -4
  836. package/esm/core/ComboBox/ComboBoxMenu.js +80 -45
  837. package/esm/core/ComboBox/ComboBoxMenuItem.js +7 -9
  838. package/esm/core/ComboBox/ComboBoxMultipleContainer.js +1 -2
  839. package/esm/core/ComboBox/helpers.js +2 -4
  840. package/esm/core/DatePicker/DatePicker.js +136 -171
  841. package/esm/core/Dialog/Dialog.js +4 -4
  842. package/esm/core/Dialog/DialogBackdrop.js +8 -12
  843. package/esm/core/Dialog/DialogContext.js +2 -4
  844. package/esm/core/Dialog/DialogDragContext.js +2 -2
  845. package/esm/core/Dialog/DialogMain.js +26 -40
  846. package/esm/core/Dialog/DialogTitleBar.js +3 -3
  847. package/esm/core/Dialog/DialogTitleBarTitle.d.ts +3 -1
  848. package/esm/core/Divider/Divider.js +2 -2
  849. package/esm/core/DropdownMenu/DropdownMenu.js +11 -16
  850. package/esm/core/ExpandableBlock/ExpandableBlock.js +30 -42
  851. package/esm/core/Fieldset/Fieldset.js +3 -4
  852. package/esm/core/FileUpload/FileEmptyCard.js +4 -4
  853. package/esm/core/FileUpload/FileUpload.js +8 -10
  854. package/esm/core/FileUpload/FileUploadCard.js +35 -50
  855. package/esm/core/FileUpload/FileUploadTemplate.js +1 -1
  856. package/esm/core/Flex/Flex.js +12 -17
  857. package/esm/core/Footer/Footer.js +11 -12
  858. package/esm/core/Header/Header.js +4 -4
  859. package/esm/core/Header/HeaderBasicButton.js +1 -3
  860. package/esm/core/Header/HeaderBreadcrumbs.js +1 -1
  861. package/esm/core/Header/HeaderButton.js +7 -7
  862. package/esm/core/Header/HeaderDropdownButton.js +6 -8
  863. package/esm/core/Header/HeaderLogo.js +3 -3
  864. package/esm/core/Header/HeaderSplitButton.js +5 -7
  865. package/esm/core/Icon/Icon.js +3 -3
  866. package/esm/core/InformationPanel/InformationPanel.js +25 -33
  867. package/esm/core/InformationPanel/InformationPanelContent.js +2 -2
  868. package/esm/core/InformationPanel/InformationPanelHeader.js +1 -1
  869. package/esm/core/Input/Input.js +3 -3
  870. package/esm/core/InputGrid/InputGrid.js +43 -75
  871. package/esm/core/InputGroup/InputGroup.js +6 -9
  872. package/esm/core/InputWithDecorations/InputWithDecorations.js +10 -13
  873. package/esm/core/Label/Label.js +3 -3
  874. package/esm/core/LabeledInput/LabeledInput.js +4 -4
  875. package/esm/core/LabeledSelect/LabeledSelect.js +4 -6
  876. package/esm/core/LabeledSelect/LabeledSelect.types-test.js +11 -14
  877. package/esm/core/LabeledTextarea/LabeledTextarea.js +4 -4
  878. package/esm/core/LinkAction/LinkAction.js +1 -3
  879. package/esm/core/List/List.js +0 -1
  880. package/esm/core/List/ListItem.js +11 -16
  881. package/esm/core/Menu/Menu.js +40 -48
  882. package/esm/core/Menu/MenuItem.js +18 -24
  883. package/esm/core/Menu/MenuItemSkeleton.js +2 -4
  884. package/esm/core/Modal/Modal.js +1 -1
  885. package/esm/core/NonIdealState/ErrorPage.js +35 -61
  886. package/esm/core/NonIdealState/NonIdealState.js +1 -1
  887. package/esm/core/NotificationMarker/NotificationMarker.js +1 -1
  888. package/esm/core/Overlay/Overlay.js +16 -16
  889. package/esm/core/Popover/Popover.js +36 -42
  890. package/esm/core/ProgressIndicators/ProgressLinear.js +6 -6
  891. package/esm/core/ProgressIndicators/ProgressRadial.js +7 -9
  892. package/esm/core/Radio/Radio.js +8 -8
  893. package/esm/core/RadioTiles/RadioTile.js +4 -4
  894. package/esm/core/RadioTiles/RadioTileGroup.js +1 -1
  895. package/esm/core/SearchBox/SearchBox.js +32 -46
  896. package/esm/core/Select/Select.js +137 -149
  897. package/esm/core/Select/Select.types-test.js +13 -17
  898. package/esm/core/Select/SelectTag.js +1 -1
  899. package/esm/core/Select/SelectTagContainer.js +3 -3
  900. package/esm/core/SideNavigation/SideNavigation.js +6 -6
  901. package/esm/core/SideNavigation/SidenavButton.js +7 -7
  902. package/esm/core/SideNavigation/SidenavSubmenu.js +1 -1
  903. package/esm/core/SideNavigation/SidenavSubmenuHeader.js +1 -1
  904. package/esm/core/SkipToContentLink/SkipToContentLink.js +1 -1
  905. package/esm/core/Slider/Slider.js +63 -84
  906. package/esm/core/Slider/Thumb.js +13 -21
  907. package/esm/core/Slider/Track.js +10 -14
  908. package/esm/core/StatusMessage/StatusMessage.js +3 -3
  909. package/esm/core/Stepper/Stepper.js +9 -9
  910. package/esm/core/Stepper/StepperStep.js +15 -22
  911. package/esm/core/Stepper/WorkflowDiagram.js +2 -2
  912. package/esm/core/Stepper/WorkflowDiagramStep.js +2 -2
  913. package/esm/core/Surface/Surface.d.ts +1 -0
  914. package/esm/core/Surface/Surface.js +19 -28
  915. package/esm/core/Table/SubRowExpander.js +3 -3
  916. package/esm/core/Table/Table.d.ts +4 -1
  917. package/esm/core/Table/Table.js +262 -249
  918. package/esm/core/Table/TableCell.js +12 -14
  919. package/esm/core/Table/TablePaginator.js +39 -56
  920. package/esm/core/Table/TableRowMemoized.d.ts +3 -0
  921. package/esm/core/Table/TableRowMemoized.js +48 -36
  922. package/esm/core/Table/actionHandlers/expandHandler.js +2 -4
  923. package/esm/core/Table/actionHandlers/filterHandler.js +3 -3
  924. package/esm/core/Table/actionHandlers/resizeHandler.js +13 -17
  925. package/esm/core/Table/actionHandlers/selectHandler.js +22 -31
  926. package/esm/core/Table/cells/DefaultCell.d.ts +4 -1
  927. package/esm/core/Table/cells/DefaultCell.js +5 -5
  928. package/esm/core/Table/cells/EditableCell.d.ts +4 -1
  929. package/esm/core/Table/cells/EditableCell.js +7 -15
  930. package/esm/core/Table/columns/actionColumn.d.ts +2 -2
  931. package/esm/core/Table/columns/actionColumn.js +81 -90
  932. package/esm/core/Table/columns/expanderColumn.js +4 -6
  933. package/esm/core/Table/columns/selectionColumn.js +8 -10
  934. package/esm/core/Table/filters/BaseFilter.js +1 -1
  935. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +16 -25
  936. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +20 -32
  937. package/esm/core/Table/filters/FilterButtonBar.js +3 -3
  938. package/esm/core/Table/filters/FilterToggle.js +8 -8
  939. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +12 -18
  940. package/esm/core/Table/filters/TextFilter/TextFilter.js +7 -13
  941. package/esm/core/Table/filters/customFilterFunctions.js +13 -14
  942. package/esm/core/Table/filters/defaultFilterFunctions.js +71 -80
  943. package/esm/core/Table/hooks/useColumnDragAndDrop.js +24 -30
  944. package/esm/core/Table/hooks/useExpanderCell.js +4 -8
  945. package/esm/core/Table/hooks/useResizeColumns.js +74 -111
  946. package/esm/core/Table/hooks/useScrollToRow.js +13 -20
  947. package/esm/core/Table/hooks/useSelectionCell.js +2 -4
  948. package/esm/core/Table/hooks/useStickyColumns.js +12 -25
  949. package/esm/core/Table/hooks/useSubRowFiltering.js +22 -36
  950. package/esm/core/Table/hooks/useSubRowSelection.js +5 -6
  951. package/esm/core/Table/utils.js +18 -31
  952. package/esm/core/Tabs/Tabs.js +79 -109
  953. package/esm/core/Tag/Tag.js +8 -8
  954. package/esm/core/Tag/TagContainer.js +2 -2
  955. package/esm/core/Textarea/Textarea.js +4 -4
  956. package/esm/core/ThemeProvider/ThemeContext.js +1 -1
  957. package/esm/core/ThemeProvider/ThemeProvider.js +61 -63
  958. package/esm/core/Tile/Tile.js +44 -69
  959. package/esm/core/TimePicker/TimePicker.js +87 -116
  960. package/esm/core/Toast/Toast.js +31 -40
  961. package/esm/core/Toast/Toaster.js +21 -27
  962. package/esm/core/ToggleSwitch/ToggleSwitch.js +5 -5
  963. package/esm/core/Tooltip/Tooltip.js +31 -39
  964. package/esm/core/TransferList/TransferList.js +39 -55
  965. package/esm/core/Tree/Tree.d.ts +4 -1
  966. package/esm/core/Tree/Tree.js +100 -79
  967. package/esm/core/Tree/TreeContext.js +3 -4
  968. package/esm/core/Tree/TreeNode.d.ts +2 -2
  969. package/esm/core/Tree/TreeNode.js +22 -37
  970. package/esm/core/Tree/TreeNodeExpander.js +3 -3
  971. package/esm/core/Typography/Anchor.js +4 -4
  972. package/esm/core/Typography/Blockquote.js +1 -1
  973. package/esm/core/Typography/Kbd.js +1 -1
  974. package/esm/core/Typography/Text.js +3 -3
  975. package/esm/core/VisuallyHidden/VisuallyHidden.js +8 -8
  976. package/esm/react-table/react-table.types-test.js +93 -96
  977. package/esm/styles.js +2 -2
  978. package/esm/utils/color/ColorValue.js +116 -163
  979. package/esm/utils/components/AutoclearingHiddenLiveRegion.js +2 -2
  980. package/esm/utils/components/ButtonBase.js +10 -13
  981. package/esm/utils/components/FieldsetBase.d.ts +6 -0
  982. package/esm/utils/components/FieldsetBase.js +2 -0
  983. package/esm/utils/components/FocusTrap.js +14 -20
  984. package/esm/utils/components/InputContainer.js +3 -3
  985. package/esm/utils/components/InputFlexContainer.js +4 -5
  986. package/esm/utils/components/InputWithIcon.js +0 -1
  987. package/esm/utils/components/LineClamp.js +2 -2
  988. package/esm/utils/components/MiddleTextTruncation.d.ts +4 -1
  989. package/esm/utils/components/MiddleTextTruncation.js +6 -8
  990. package/esm/utils/components/Portal.js +8 -12
  991. package/esm/utils/components/Resizer.js +38 -53
  992. package/esm/utils/components/ShadowRoot.js +22 -31
  993. package/esm/utils/components/WithCSSTransition.js +4 -5
  994. package/esm/utils/components/index.d.ts +1 -1
  995. package/esm/utils/components/index.js +1 -1
  996. package/esm/utils/functions/colors.js +5 -6
  997. package/esm/utils/functions/date.js +3 -5
  998. package/esm/utils/functions/dev.d.ts +11 -5
  999. package/esm/utils/functions/dev.js +9 -23
  1000. package/esm/utils/functions/dom.js +8 -16
  1001. package/esm/utils/functions/focusable.js +19 -23
  1002. package/esm/utils/functions/import.js +1 -1
  1003. package/esm/utils/functions/numbers.js +6 -8
  1004. package/esm/utils/functions/polymorphic.js +32 -40
  1005. package/esm/utils/functions/react.js +4 -8
  1006. package/esm/utils/hooks/index.d.ts +1 -0
  1007. package/esm/utils/hooks/index.js +1 -0
  1008. package/esm/utils/hooks/useContainerWidth.js +7 -11
  1009. package/esm/utils/hooks/useControlledState.js +4 -5
  1010. package/esm/utils/hooks/useDragAndDrop.js +32 -43
  1011. package/esm/utils/hooks/useEventListener.js +3 -5
  1012. package/esm/utils/hooks/useGlobals.js +6 -25
  1013. package/esm/utils/hooks/useId.js +3 -3
  1014. package/esm/utils/hooks/useIntersection.js +6 -10
  1015. package/esm/utils/hooks/useIsClient.js +1 -1
  1016. package/esm/utils/hooks/useIsomorphicLayoutEffect.js +2 -2
  1017. package/esm/utils/hooks/useLatestRef.js +1 -1
  1018. package/esm/utils/hooks/useMediaQuery.js +10 -8
  1019. package/esm/utils/hooks/useMergedRefs.js +7 -11
  1020. package/esm/utils/hooks/useOverflow.js +24 -26
  1021. package/esm/utils/hooks/useResizeObserver.js +5 -9
  1022. package/esm/utils/hooks/useSafeContext.js +3 -4
  1023. package/esm/utils/hooks/useSyncExternalStore.js +6 -8
  1024. package/esm/utils/hooks/useVirtualScroll.d.ts +14 -0
  1025. package/esm/utils/hooks/useVirtualScroll.js +28 -0
  1026. package/esm/utils/icons/SvgCalendar.js +2 -3
  1027. package/esm/utils/icons/SvgCaretDownSmall.js +2 -3
  1028. package/esm/utils/icons/SvgCaretRightSmall.js +2 -3
  1029. package/esm/utils/icons/SvgCaretUpSmall.js +2 -3
  1030. package/esm/utils/icons/SvgCheckmark.js +2 -3
  1031. package/esm/utils/icons/SvgCheckmarkSmall.js +2 -3
  1032. package/esm/utils/icons/SvgChevronLeft.js +2 -3
  1033. package/esm/utils/icons/SvgChevronLeftDouble.js +2 -3
  1034. package/esm/utils/icons/SvgChevronRight.js +2 -3
  1035. package/esm/utils/icons/SvgChevronRightDouble.js +2 -3
  1036. package/esm/utils/icons/SvgChevronRightSmall.js +2 -3
  1037. package/esm/utils/icons/SvgClose.js +2 -3
  1038. package/esm/utils/icons/SvgCloseSmall.js +2 -3
  1039. package/esm/utils/icons/SvgColumnManager.js +2 -3
  1040. package/esm/utils/icons/SvgDocument.js +2 -3
  1041. package/esm/utils/icons/SvgFilter.js +2 -3
  1042. package/esm/utils/icons/SvgFilterHollow.js +2 -3
  1043. package/esm/utils/icons/SvgImportantSmall.js +2 -3
  1044. package/esm/utils/icons/SvgInfoCircular.js +2 -3
  1045. package/esm/utils/icons/SvgMore.js +2 -3
  1046. package/esm/utils/icons/SvgMoreVertical.js +2 -3
  1047. package/esm/utils/icons/SvgNew.js +2 -3
  1048. package/esm/utils/icons/SvgSearch.js +2 -3
  1049. package/esm/utils/icons/SvgSmileyHappy.js +2 -3
  1050. package/esm/utils/icons/SvgSortDown.js +2 -3
  1051. package/esm/utils/icons/SvgSortUp.js +2 -3
  1052. package/esm/utils/icons/SvgStatusError.js +2 -3
  1053. package/esm/utils/icons/SvgStatusSuccess.js +2 -3
  1054. package/esm/utils/icons/SvgStatusWarning.js +2 -3
  1055. package/esm/utils/icons/SvgSwap.js +2 -3
  1056. package/esm/utils/icons/SvgUpload.js +2 -3
  1057. package/esm/utils/meta.js +1 -1
  1058. package/esm/utils/providers/HydrationProvider.js +15 -19
  1059. package/esm/utils/providers/ScopeProvider.js +9 -11
  1060. package/package.json +18 -7
  1061. package/styles.css +9 -13
  1062. package/cjs/utils/components/VirtualScroll.d.ts +0 -75
  1063. package/cjs/utils/components/VirtualScroll.js +0 -334
  1064. package/esm/utils/components/VirtualScroll.d.ts +0 -75
  1065. package/esm/utils/components/VirtualScroll.js +0 -318
@@ -1,15 +1,13 @@
1
- export const getBoundedValue = (val, min, max) => {
2
- return Math.min(max, Math.max(min, val));
3
- };
1
+ export const getBoundedValue = (val, min, max) =>
2
+ Math.min(max, Math.max(min, val));
4
3
  export const getRandomValue = (length = 21) => {
5
- const alphabet = `_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`;
4
+ let alphabet =
5
+ '_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
6
6
  let id = '';
7
- for (let i = 0; i < length; i++) {
8
- id += alphabet[(Math.random() * 64) | 0];
9
- }
7
+ for (let i = 0; i < length; i++) id += alphabet[(64 * Math.random()) | 0];
10
8
  return id;
11
9
  };
12
10
  export const roundByDPR = (value) => {
13
- const dpr = window.devicePixelRatio || 1;
11
+ let dpr = window.devicePixelRatio || 1;
14
12
  return Math.round(value * dpr) / dpr;
15
13
  };
@@ -2,52 +2,44 @@ import * as React from 'react';
2
2
  import cx from 'classnames';
3
3
  import { useGlobals } from '../hooks/useGlobals.js';
4
4
  import { styles } from '../../styles.js';
5
- const _base = (defaultElement) => {
6
- return (className, attrs) => {
7
- const Comp = React.forwardRef(({ as = defaultElement, ...props }, ref) => {
8
- props = {
9
- ...attrs,
10
- ...props,
11
- className: getScopedClassName(
12
- cx(className, attrs?.className, props.className),
13
- ),
14
- };
15
- const Element = as || 'div';
16
- if (
17
- Element === 'button' ||
18
- Element === 'a' ||
19
- (Element === 'input' && props.type === 'checkbox')
20
- ) {
21
- var _props;
22
- (_props = props).tabIndex ?? (_props.tabIndex = 0);
23
- }
24
- useGlobals();
25
- return React.createElement(Element, {
26
- ref: ref,
27
- ...props,
28
- });
5
+ let _base = (defaultElement) => (className, attrs) => {
6
+ let Comp = React.forwardRef(({ as = defaultElement, ...props }, ref) => {
7
+ props = {
8
+ ...attrs,
9
+ ...props,
10
+ className: getScopedClassName(
11
+ cx(className, attrs?.className, props.className),
12
+ ),
13
+ };
14
+ let Element = as || 'div';
15
+ if (
16
+ 'button' === Element ||
17
+ 'a' === Element ||
18
+ ('input' === Element && 'checkbox' === props.type)
19
+ ) {
20
+ var _props;
21
+ (_props = props).tabIndex ?? (_props.tabIndex = 0);
22
+ }
23
+ useGlobals();
24
+ return React.createElement(Element, {
25
+ ref: ref,
26
+ ...props,
29
27
  });
30
- Comp.displayName = getDisplayNameFromClass(className);
31
- return Comp;
32
- };
28
+ });
29
+ return Comp;
33
30
  };
34
31
  export const polymorphic = new Proxy(_base('div'), {
35
32
  get: (target, prop) => {
36
- if (typeof prop === 'string') {
37
- return _base(prop);
38
- }
33
+ if ('string' == typeof prop) return _base(prop);
39
34
  return Reflect.get(target, prop);
40
35
  },
41
36
  });
42
- const getDisplayNameFromClass = (str) => {
43
- const camel = str.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
37
+ let getDisplayNameFromClass = (str) => {
38
+ let camel = str.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
44
39
  return camel.substring(3);
45
40
  };
46
- const getScopedClassName = (className = '') => {
47
- return (
48
- className
49
- .split(' ')
50
- .map((c) => (c in styles ? styles[c] : c))
51
- .join(' ') || null
52
- );
53
- };
41
+ let getScopedClassName = (className = '') =>
42
+ className
43
+ .split(' ')
44
+ .map((c) => (c in styles ? styles[c] : c))
45
+ .join(' ') || null;
@@ -1,14 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { mergeRefs } from '../hooks/useMergedRefs.js';
3
3
  export const cloneElementWithRef = (children, getProps) => {
4
- if (!children) {
5
- return null;
6
- }
7
- if (!React.isValidElement(children)) {
8
- return children;
9
- }
10
- const props = getProps(children);
11
- const ref = mergeRefs(
4
+ if (!children) return null;
5
+ if (!React.isValidElement(children)) return children;
6
+ let props = getProps(children);
7
+ let ref = mergeRefs(
12
8
  ...[
13
9
  'ref' in children ? children.ref : null,
14
10
  'ref' in props ? props.ref : null,
@@ -13,3 +13,4 @@ export * from './useIsClient.js';
13
13
  export * from './useId.js';
14
14
  export * from './useControlledState.js';
15
15
  export * from './useSyncExternalStore.js';
16
+ export * from './useVirtualScroll.js';
@@ -13,3 +13,4 @@ export * from './useIsClient.js';
13
13
  export * from './useId.js';
14
14
  export * from './useControlledState.js';
15
15
  export * from './useSyncExternalStore.js';
16
+ export * from './useVirtualScroll.js';
@@ -2,21 +2,17 @@ import * as React from 'react';
2
2
  import { useMergedRefs } from './useMergedRefs.js';
3
3
  import { useResizeObserver } from './useResizeObserver.js';
4
4
  export const useContainerWidth = (watchResizes = true) => {
5
- const [contentWidth, setContentWidth] = React.useState(0);
6
- const ref = React.useCallback((element) => {
7
- if (!element) {
8
- return;
9
- }
5
+ let [contentWidth, setContentWidth] = React.useState(0);
6
+ let ref = React.useCallback((element) => {
7
+ if (!element) return;
10
8
  setContentWidth(element.getBoundingClientRect().width);
11
9
  }, []);
12
- const updateWidth = React.useCallback(
10
+ let updateWidth = React.useCallback(
13
11
  ({ width }) => setContentWidth(width),
14
12
  [],
15
13
  );
16
- const [resizeRef, resizeObserver] = useResizeObserver(updateWidth);
17
- if (!watchResizes) {
18
- resizeObserver?.disconnect();
19
- }
20
- const refs = useMergedRefs(ref, watchResizes ? resizeRef : undefined);
14
+ let [resizeRef, resizeObserver] = useResizeObserver(updateWidth);
15
+ if (!watchResizes) resizeObserver?.disconnect();
16
+ let refs = useMergedRefs(ref, watchResizes ? resizeRef : void 0);
21
17
  return [refs, contentWidth];
22
18
  };
@@ -4,13 +4,12 @@ export const useControlledState = (
4
4
  controlledState,
5
5
  setControlledState,
6
6
  ) => {
7
- const [uncontrolledState, setUncontrolledState] =
8
- React.useState(initialValue);
9
- const state = React.useMemo(
10
- () => (controlledState !== undefined ? controlledState : uncontrolledState),
7
+ let [uncontrolledState, setUncontrolledState] = React.useState(initialValue);
8
+ let state = React.useMemo(
9
+ () => (void 0 !== controlledState ? controlledState : uncontrolledState),
11
10
  [controlledState, uncontrolledState],
12
11
  );
13
- const setState = React.useCallback(
12
+ let setState = React.useCallback(
14
13
  (value) => {
15
14
  setUncontrolledState(value);
16
15
  setControlledState?.(value);
@@ -5,8 +5,8 @@ import {
5
5
  } from '../functions/index.js';
6
6
  import { useEventListener } from './useEventListener.js';
7
7
  import { useResizeObserver } from './useResizeObserver.js';
8
- const getContainerRect = (containerRef) => {
9
- const containerRect = containerRef?.current?.getBoundingClientRect();
8
+ let getContainerRect = (containerRef) => {
9
+ let containerRect = containerRef?.current?.getBoundingClientRect();
10
10
  return {
11
11
  top: containerRect?.top ?? 0,
12
12
  right: containerRect?.right ?? getWindow()?.innerWidth ?? 0,
@@ -15,78 +15,68 @@ const getContainerRect = (containerRef) => {
15
15
  };
16
16
  };
17
17
  export const useDragAndDrop = (elementRef, containerRef, enabled = true) => {
18
- const grabOffsetX = React.useRef(0);
19
- const grabOffsetY = React.useRef(0);
20
- const translateX = React.useRef();
21
- const translateY = React.useRef();
22
- const containerRectRef = React.useRef(getContainerRect(containerRef));
23
- const adjustTransform = React.useCallback(() => {
24
- if (!elementRef.current || !enabled) {
25
- return;
26
- }
27
- const { top, right, bottom, left } =
18
+ let grabOffsetX = React.useRef(0);
19
+ let grabOffsetY = React.useRef(0);
20
+ let translateX = React.useRef();
21
+ let translateY = React.useRef();
22
+ let containerRectRef = React.useRef(getContainerRect(containerRef));
23
+ let adjustTransform = React.useCallback(() => {
24
+ if (!elementRef.current || !enabled) return;
25
+ let { top, right, bottom, left } =
28
26
  elementRef.current?.getBoundingClientRect();
29
27
  let [newTranslateX, newTranslateY] = getTranslateValuesFromElement(
30
28
  elementRef.current,
31
29
  );
32
30
  containerRectRef.current = getContainerRect(containerRef);
33
- if (bottom > containerRectRef.current.bottom) {
31
+ if (bottom > containerRectRef.current.bottom)
34
32
  newTranslateY -= bottom - containerRectRef.current.bottom;
35
- }
36
- if (top < containerRectRef.current.top) {
33
+ if (top < containerRectRef.current.top)
37
34
  newTranslateY += containerRectRef.current.top - top;
38
- }
39
- if (right > containerRectRef.current.right) {
35
+ if (right > containerRectRef.current.right)
40
36
  newTranslateX -= right - containerRectRef.current.right;
41
- }
42
- if (left < containerRectRef.current.left) {
37
+ if (left < containerRectRef.current.left)
43
38
  newTranslateX += containerRectRef.current.left - left;
44
- }
45
39
  translateX.current = newTranslateX;
46
40
  translateY.current = newTranslateY;
47
41
  elementRef.current.style.transform = `translate(${newTranslateX}px, ${newTranslateY}px)`;
48
42
  }, [containerRef, elementRef, enabled]);
49
- const [resizeRef, resizeObserver] = useResizeObserver(adjustTransform);
43
+ let [resizeRef, resizeObserver] = useResizeObserver(adjustTransform);
50
44
  resizeRef(containerRef?.current);
51
- React.useEffect(() => {
52
- return () => {
45
+ React.useEffect(
46
+ () => () => {
53
47
  resizeObserver?.disconnect();
54
- };
55
- }, [resizeObserver]);
48
+ },
49
+ [resizeObserver],
50
+ );
56
51
  useEventListener(
57
52
  'resize',
58
53
  () => {
59
54
  adjustTransform();
60
- if (translateX.current != null && translateY.current != null) {
55
+ if (null != translateX.current && null != translateY.current)
61
56
  setTransform(
62
57
  `translate(${translateX.current}px, ${translateY.current}px)`,
63
58
  );
64
- }
65
59
  },
66
60
  getWindow(),
67
61
  );
68
- const [transform, setTransform] = React.useState('');
69
- const onPointerMove = React.useRef((event) => {
70
- if (!elementRef.current) {
71
- return;
72
- }
73
- const newTranslateX = event.clientX - grabOffsetX.current;
74
- const newTranslateY = event.clientY - grabOffsetY.current;
62
+ let [transform, setTransform] = React.useState('');
63
+ let onPointerMove = React.useRef((event) => {
64
+ if (!elementRef.current) return;
65
+ let newTranslateX = event.clientX - grabOffsetX.current;
66
+ let newTranslateY = event.clientY - grabOffsetY.current;
75
67
  elementRef.current.style.transform = `translate(${newTranslateX}px, ${newTranslateY}px)`;
76
68
  adjustTransform();
77
69
  });
78
- const originalUserSelect = React.useRef('');
79
- const onPointerDown = React.useCallback(
70
+ let originalUserSelect = React.useRef('');
71
+ let onPointerDown = React.useCallback(
80
72
  (e) => {
81
- if (!elementRef.current || e.button !== 0 || !enabled) {
82
- return;
83
- }
84
- const [x, y] = getTranslateValuesFromElement(elementRef.current);
73
+ if (!elementRef.current || 0 !== e.button || !enabled) return;
74
+ let [x, y] = getTranslateValuesFromElement(elementRef.current);
85
75
  grabOffsetX.current = e.clientX - x;
86
76
  grabOffsetY.current = e.clientY - y;
87
77
  originalUserSelect.current = elementRef.current.style.userSelect;
88
78
  elementRef.current.style.userSelect = 'none';
89
- const ownerDocument = elementRef.current.ownerDocument || document;
79
+ let ownerDocument = elementRef.current.ownerDocument || document;
90
80
  ownerDocument.addEventListener('pointermove', onPointerMove.current);
91
81
  ownerDocument.addEventListener(
92
82
  'pointerup',
@@ -98,9 +88,8 @@ export const useDragAndDrop = (elementRef, containerRef, enabled = true) => {
98
88
  'pointermove',
99
89
  onPointerMove.current,
100
90
  );
101
- if (elementRef.current) {
91
+ if (elementRef.current)
102
92
  elementRef.current.style.userSelect = originalUserSelect.current;
103
- }
104
93
  },
105
94
  {
106
95
  once: true,
@@ -1,14 +1,12 @@
1
1
  import * as React from 'react';
2
2
  export const useEventListener = (eventName, handler, element) => {
3
- const savedHandler = React.useRef();
3
+ let savedHandler = React.useRef();
4
4
  React.useEffect(() => {
5
5
  savedHandler.current = handler;
6
6
  }, [handler]);
7
7
  React.useEffect(() => {
8
- if (!element) {
9
- return;
10
- }
11
- const eventListener = (event) => savedHandler.current?.(event);
8
+ if (!element) return;
9
+ let eventListener = (event) => savedHandler.current?.(event);
12
10
  element.addEventListener(eventName, eventListener);
13
11
  return () => {
14
12
  element.removeEventListener(eventName, eventListener);
@@ -1,38 +1,19 @@
1
1
  import * as React from 'react';
2
2
  import { ThemeContext } from '../../core/ThemeProvider/ThemeContext.js';
3
- import { isDev } from '../functions/dev.js';
4
- const didLogWarning = {
3
+ import { isUnitTest } from '../functions/dev.js';
4
+ let didLogWarning = {
5
5
  fontSize: false,
6
6
  themeProvider: false,
7
7
  };
8
8
  export const useGlobals = () => {
9
- const themeContext = React.useContext(ThemeContext);
9
+ let themeContext = React.useContext(ThemeContext);
10
10
  useThemeProviderWarning(themeContext);
11
11
  useRootFontSizeWarning();
12
12
  return themeContext;
13
13
  };
14
14
  export const useThemeProviderWarning = (themeContext) => {
15
- React.useEffect(() => {
16
- if (isDev && !didLogWarning.themeProvider && !themeContext) {
17
- console.error(
18
- 'iTwinUI components must be used within a tree wrapped in a ThemeProvider.',
19
- );
20
- didLogWarning.themeProvider = true;
21
- }
22
- }, [themeContext]);
15
+ React.useEffect(() => {}, [themeContext]);
23
16
  };
24
- const useRootFontSizeWarning = () => {
25
- React.useEffect(() => {
26
- if (isDev && !didLogWarning.fontSize) {
27
- const rootFontSize = parseInt(
28
- getComputedStyle(document.documentElement).fontSize,
29
- );
30
- if (rootFontSize < 16) {
31
- console.error(
32
- 'Root font size must not be overridden. \nSee https://github.com/iTwin/iTwinUI/wiki/iTwinUI-react-v2-migration-guide#relative-font-size',
33
- );
34
- }
35
- didLogWarning.fontSize = true;
36
- }
37
- }, []);
17
+ let useRootFontSizeWarning = () => {
18
+ React.useEffect(() => {}, []);
38
19
  };
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { getRandomValue } from '../functions/numbers.js';
3
3
  export const useId = () => {
4
- const uniqueValue = useUniqueValue();
4
+ let uniqueValue = useUniqueValue();
5
5
  return React.useMemo(() => `iui-${uniqueValue}`, [uniqueValue]);
6
6
  };
7
- const _React = React;
8
- const useUniqueValue =
7
+ let _React = React;
8
+ let useUniqueValue =
9
9
  _React.useId ?? (() => React.useMemo(() => getRandomValue(10), []));
@@ -1,21 +1,17 @@
1
1
  import * as React from 'react';
2
2
  import { getWindow } from '../functions/dom.js';
3
3
  export const useIntersection = (onIntersect, options = {}, once = true) => {
4
- const { root, rootMargin, threshold } = options;
5
- const cleanupRef = React.useRef(() => {});
6
- const setRef = React.useCallback(
4
+ let { root, rootMargin, threshold } = options;
5
+ let cleanupRef = React.useRef(() => {});
6
+ let setRef = React.useCallback(
7
7
  (node) => {
8
8
  cleanupRef.current?.();
9
9
  cleanupRef.current = () => {};
10
- if (!node || !getWindow()?.IntersectionObserver) {
11
- return;
12
- }
13
- const observer = new IntersectionObserver(
10
+ if (!node || !getWindow()?.IntersectionObserver) return;
11
+ let observer = new IntersectionObserver(
14
12
  ([entry], obs) => {
15
13
  if (entry.isIntersecting) {
16
- if (once) {
17
- obs.disconnect();
18
- }
14
+ if (once) obs.disconnect();
19
15
  onIntersect();
20
16
  }
21
17
  },
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  export const useIsClient = () => {
3
- const [isClient, setIsClient] = React.useState(false);
3
+ let [isClient, setIsClient] = React.useState(false);
4
4
  React.useEffect(() => {
5
5
  setIsClient(true);
6
6
  }, []);
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
- const useIsomorphicLayoutEffect =
3
- typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
2
+ let useIsomorphicLayoutEffect =
3
+ 'undefined' != typeof window ? React.useLayoutEffect : React.useEffect;
4
4
  export { useIsomorphicLayoutEffect as useLayoutEffect };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  export const useLatestRef = (value) => {
3
- const valueRef = React.useRef(value);
3
+ let valueRef = React.useRef(value);
4
4
  React.useEffect(() => {
5
5
  valueRef.current = value;
6
6
  }, [value]);
@@ -1,18 +1,20 @@
1
1
  import * as React from 'react';
2
2
  import { useSyncExternalStore } from './useSyncExternalStore.js';
3
3
  export const useMediaQuery = (queryString) => {
4
- const getSnapshot = React.useCallback(() => {
5
- return typeof window !== 'undefined'
6
- ? window.matchMedia?.(queryString).matches
7
- : undefined;
8
- }, [queryString]);
9
- const subscribe = React.useCallback(
4
+ let getSnapshot = React.useCallback(
5
+ () =>
6
+ 'undefined' != typeof window
7
+ ? window.matchMedia?.(queryString).matches
8
+ : void 0,
9
+ [queryString],
10
+ );
11
+ let subscribe = React.useCallback(
10
12
  (onChange) => {
11
- const mediaQueryList = window.matchMedia?.(queryString);
13
+ let mediaQueryList = window.matchMedia?.(queryString);
12
14
  mediaQueryList?.addEventListener?.('change', onChange);
13
15
  return () => mediaQueryList?.removeEventListener?.('change', onChange);
14
16
  },
15
17
  [queryString],
16
18
  );
17
- return useSyncExternalStore(subscribe, getSnapshot, () => undefined);
19
+ return useSyncExternalStore(subscribe, getSnapshot, () => void 0);
18
20
  };
@@ -1,15 +1,11 @@
1
1
  import * as React from 'react';
2
- export const mergeRefs = (...refs) => {
3
- return (instance) => {
2
+ export const mergeRefs =
3
+ (...refs) =>
4
+ (instance) => {
4
5
  refs.forEach((ref) => {
5
- if (typeof ref === 'function') {
6
- ref(instance);
7
- } else if (ref) {
8
- ref.current = instance;
9
- }
6
+ if ('function' == typeof ref) ref(instance);
7
+ else if (ref) ref.current = instance;
10
8
  });
11
9
  };
12
- };
13
- export const useMergedRefs = (...refs) => {
14
- return React.useCallback(mergeRefs(...refs), [...refs]);
15
- };
10
+ export const useMergedRefs = (...refs) =>
11
+ React.useCallback(mergeRefs(...refs), [...refs]);
@@ -2,59 +2,57 @@ import * as React from 'react';
2
2
  import { useMergedRefs } from './useMergedRefs.js';
3
3
  import { useResizeObserver } from './useResizeObserver.js';
4
4
  import { useLayoutEffect } from './useIsomorphicLayoutEffect.js';
5
- const STARTING_MAX_ITEMS_COUNT = 20;
5
+ let STARTING_MAX_ITEMS_COUNT = 20;
6
6
  export const useOverflow = (
7
7
  items,
8
8
  disabled = false,
9
9
  orientation = 'horizontal',
10
10
  ) => {
11
- const containerRef = React.useRef(null);
12
- const [visibleCount, setVisibleCount] = React.useState(() =>
11
+ let containerRef = React.useRef(null);
12
+ let [visibleCount, setVisibleCount] = React.useState(() =>
13
13
  disabled ? items.length : Math.min(items.length, STARTING_MAX_ITEMS_COUNT),
14
14
  );
15
- const needsFullRerender = React.useRef(true);
16
- const [containerSize, setContainerSize] = React.useState(0);
17
- const previousContainerSize = React.useRef(0);
18
- const updateContainerSize = React.useCallback(
15
+ let needsFullRerender = React.useRef(true);
16
+ let [containerSize, setContainerSize] = React.useState(0);
17
+ let previousContainerSize = React.useRef(0);
18
+ let updateContainerSize = React.useCallback(
19
19
  ({ width, height }) =>
20
- setContainerSize(orientation === 'horizontal' ? width : height),
20
+ setContainerSize('horizontal' === orientation ? width : height),
21
21
  [orientation],
22
22
  );
23
- const [resizeRef, observer] = useResizeObserver(updateContainerSize);
24
- const resizeObserverRef = React.useRef(observer);
23
+ let [resizeRef, observer] = useResizeObserver(updateContainerSize);
24
+ let resizeObserverRef = React.useRef(observer);
25
25
  useLayoutEffect(() => {
26
- if (disabled) {
27
- setVisibleCount(items.length);
28
- } else {
26
+ if (disabled) setVisibleCount(items.length);
27
+ else {
29
28
  setVisibleCount(Math.min(items.length, STARTING_MAX_ITEMS_COUNT));
30
29
  needsFullRerender.current = true;
31
30
  }
32
31
  }, [containerSize, disabled, items]);
33
- const mergedRefs = useMergedRefs(containerRef, resizeRef);
32
+ let mergedRefs = useMergedRefs(containerRef, resizeRef);
34
33
  useLayoutEffect(() => {
35
34
  if (!containerRef.current || disabled) {
36
35
  resizeObserverRef.current?.disconnect();
37
36
  return;
38
37
  }
39
- const dimension = orientation === 'horizontal' ? 'Width' : 'Height';
40
- const availableSize = containerRef.current[`offset${dimension}`];
41
- const requiredSize = containerRef.current[`scroll${dimension}`];
38
+ let dimension = 'horizontal' === orientation ? 'Width' : 'Height';
39
+ let availableSize = containerRef.current[`offset${dimension}`];
40
+ let requiredSize = containerRef.current[`scroll${dimension}`];
42
41
  if (availableSize < requiredSize) {
43
- const avgItemSize = requiredSize / visibleCount;
44
- const visibleItems = Math.floor(availableSize / avgItemSize);
42
+ let avgItemSize = requiredSize / visibleCount;
43
+ let visibleItems = Math.floor(availableSize / avgItemSize);
45
44
  setVisibleCount(visibleItems > 0 ? visibleItems : 1);
46
45
  } else if (needsFullRerender.current) {
47
- const childrenSize = Array.from(containerRef.current.children).reduce(
46
+ let childrenSize = Array.from(containerRef.current.children).reduce(
48
47
  (sum, child) => sum + child[`offset${dimension}`],
49
48
  0,
50
49
  );
51
- const currentVisibleCount =
50
+ let currentVisibleCount =
52
51
  visibleCount || Math.min(items.length, STARTING_MAX_ITEMS_COUNT);
53
- const avgItemSize = childrenSize / currentVisibleCount;
54
- const visibleItems = Math.floor(availableSize / avgItemSize);
55
- if (!isNaN(visibleItems)) {
56
- setVisibleCount(Math.min(items.length, visibleItems * 2));
57
- }
52
+ let avgItemSize = childrenSize / currentVisibleCount;
53
+ let visibleItems = Math.floor(availableSize / avgItemSize);
54
+ if (!isNaN(visibleItems))
55
+ setVisibleCount(Math.min(items.length, 2 * visibleItems));
58
56
  }
59
57
  needsFullRerender.current = false;
60
58
  }, [containerSize, visibleCount, disabled, items.length, orientation]);
@@ -1,20 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { getWindow } from '../functions/dom.js';
3
3
  export const useResizeObserver = (onResize) => {
4
- const resizeObserver = React.useRef();
5
- const elementRef = React.useCallback(
4
+ let resizeObserver = React.useRef();
5
+ let elementRef = React.useCallback(
6
6
  (element) => {
7
- if (!getWindow()?.ResizeObserver) {
8
- return;
9
- }
7
+ if (!getWindow()?.ResizeObserver) return;
10
8
  resizeObserver.current?.disconnect?.();
11
9
  if (element) {
12
10
  resizeObserver.current = new ResizeObserver((entries) => {
13
11
  window.requestAnimationFrame(() => {
14
- if (!Array.isArray(entries) || !entries.length) {
15
- return;
16
- }
17
- const [{ contentRect }] = entries;
12
+ if (!Array.isArray(entries) || !entries.length) return;
13
+ let [{ contentRect }] = entries;
18
14
  return onResize(contentRect);
19
15
  });
20
16
  });
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export const useSafeContext = (context) => {
3
- const value = React.useContext(context);
4
- if (!value) {
5
- throw new Error(`${context.displayName} is undefined`);
6
- }
3
+ let value = React.useContext(context);
4
+ if (!value)
5
+ throw new Error(`${context.displayName || 'Context'} is undefined`);
7
6
  return value;
8
7
  };