@itwin/itwinui-react 3.13.4 → 3.14.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 (612) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/DEV-cjs/core/Alert/Alert.js +125 -72
  3. package/DEV-cjs/core/Avatar/Avatar.js +70 -44
  4. package/DEV-cjs/core/AvatarGroup/AvatarGroup.js +71 -34
  5. package/DEV-cjs/core/Backdrop/Backdrop.js +26 -22
  6. package/DEV-cjs/core/Badge/Badge.js +49 -42
  7. package/DEV-cjs/core/Breadcrumbs/Breadcrumbs.js +164 -85
  8. package/DEV-cjs/core/ButtonGroup/ButtonGroup.js +141 -79
  9. package/DEV-cjs/core/Buttons/Button.js +95 -49
  10. package/DEV-cjs/core/Buttons/DropdownButton.js +53 -35
  11. package/DEV-cjs/core/Buttons/IconButton.js +77 -41
  12. package/DEV-cjs/core/Buttons/IdeasButton.js +30 -26
  13. package/DEV-cjs/core/Buttons/SplitButton.js +90 -56
  14. package/DEV-cjs/core/Carousel/Carousel.js +77 -67
  15. package/DEV-cjs/core/Carousel/CarouselContext.js +10 -10
  16. package/DEV-cjs/core/Carousel/CarouselDot.js +31 -27
  17. package/DEV-cjs/core/Carousel/CarouselDotsList.js +148 -113
  18. package/DEV-cjs/core/Carousel/CarouselNavigation.js +98 -69
  19. package/DEV-cjs/core/Carousel/CarouselSlide.js +51 -42
  20. package/DEV-cjs/core/Carousel/CarouselSlider.js +68 -61
  21. package/DEV-cjs/core/Checkbox/Checkbox.js +96 -54
  22. package/DEV-cjs/core/ColorPicker/ColorBuilder.js +274 -228
  23. package/DEV-cjs/core/ColorPicker/ColorInputPanel.js +398 -366
  24. package/DEV-cjs/core/ColorPicker/ColorPalette.js +56 -36
  25. package/DEV-cjs/core/ColorPicker/ColorPicker.js +88 -69
  26. package/DEV-cjs/core/ColorPicker/ColorPickerContext.js +22 -18
  27. package/DEV-cjs/core/ColorPicker/ColorSwatch.js +50 -33
  28. package/DEV-cjs/core/ComboBox/ComboBox.js +395 -294
  29. package/DEV-cjs/core/ComboBox/ComboBox.types-test.js +87 -80
  30. package/DEV-cjs/core/ComboBox/ComboBoxEndIcon.js +36 -27
  31. package/DEV-cjs/core/ComboBox/ComboBoxInput.js +190 -128
  32. package/DEV-cjs/core/ComboBox/ComboBoxInputContainer.js +40 -28
  33. package/DEV-cjs/core/ComboBox/ComboBoxMenu.js +132 -93
  34. package/DEV-cjs/core/ComboBox/ComboBoxMenuItem.js +75 -34
  35. package/DEV-cjs/core/ComboBox/ComboBoxMultipleContainer.js +18 -18
  36. package/DEV-cjs/core/ComboBox/helpers.js +15 -14
  37. package/DEV-cjs/core/DatePicker/DatePicker.js +556 -353
  38. package/DEV-cjs/core/Dialog/Dialog.js +86 -58
  39. package/DEV-cjs/core/Dialog/DialogBackdrop.js +52 -39
  40. package/DEV-cjs/core/Dialog/DialogButtonBar.js +9 -9
  41. package/DEV-cjs/core/Dialog/DialogContent.js +9 -9
  42. package/DEV-cjs/core/Dialog/DialogContext.js +16 -15
  43. package/DEV-cjs/core/Dialog/DialogDragContext.js +20 -19
  44. package/DEV-cjs/core/Dialog/DialogMain.js +174 -122
  45. package/DEV-cjs/core/Dialog/DialogTitleBar.js +68 -33
  46. package/DEV-cjs/core/Dialog/DialogTitleBarTitle.js +9 -9
  47. package/DEV-cjs/core/Divider/Divider.js +22 -22
  48. package/DEV-cjs/core/DropdownMenu/DropdownMenu.js +63 -37
  49. package/DEV-cjs/core/ExpandableBlock/ExpandableBlock.js +195 -125
  50. package/DEV-cjs/core/Fieldset/Fieldset.js +34 -23
  51. package/DEV-cjs/core/FileUpload/FileEmptyCard.js +43 -24
  52. package/DEV-cjs/core/FileUpload/FileUpload.js +94 -57
  53. package/DEV-cjs/core/FileUpload/FileUploadCard.js +181 -124
  54. package/DEV-cjs/core/FileUpload/FileUploadTemplate.js +63 -35
  55. package/DEV-cjs/core/Flex/Flex.js +78 -77
  56. package/DEV-cjs/core/Footer/Footer.js +119 -85
  57. package/DEV-cjs/core/Footer/FooterItem.js +9 -9
  58. package/DEV-cjs/core/Footer/FooterList.js +9 -9
  59. package/DEV-cjs/core/Footer/FooterSeparator.js +10 -10
  60. package/DEV-cjs/core/Header/Header.js +86 -44
  61. package/DEV-cjs/core/Header/HeaderBasicButton.js +30 -20
  62. package/DEV-cjs/core/Header/HeaderBreadcrumbs.js +59 -36
  63. package/DEV-cjs/core/Header/HeaderButton.js +90 -46
  64. package/DEV-cjs/core/Header/HeaderDropdownButton.js +55 -44
  65. package/DEV-cjs/core/Header/HeaderLogo.js +53 -30
  66. package/DEV-cjs/core/Header/HeaderSplitButton.js +72 -44
  67. package/DEV-cjs/core/Icon/Icon.js +41 -35
  68. package/DEV-cjs/core/InformationPanel/InformationPanel.js +97 -62
  69. package/DEV-cjs/core/InformationPanel/InformationPanelBody.js +9 -9
  70. package/DEV-cjs/core/InformationPanel/InformationPanelContent.js +30 -22
  71. package/DEV-cjs/core/InformationPanel/InformationPanelHeader.js +51 -32
  72. package/DEV-cjs/core/InformationPanel/InformationPanelWrapper.js +12 -10
  73. package/DEV-cjs/core/Input/Input.js +26 -26
  74. package/DEV-cjs/core/InputGrid/InputGrid.js +151 -117
  75. package/DEV-cjs/core/InputGroup/InputGroup.js +85 -48
  76. package/DEV-cjs/core/InputWithDecorations/InputWithDecorations.js +60 -44
  77. package/DEV-cjs/core/Label/Label.js +40 -25
  78. package/DEV-cjs/core/LabeledInput/LabeledInput.js +86 -42
  79. package/DEV-cjs/core/LabeledSelect/LabeledSelect.js +71 -39
  80. package/DEV-cjs/core/LabeledSelect/LabeledSelect.types-test.js +100 -81
  81. package/DEV-cjs/core/LabeledTextarea/LabeledTextarea.js +19 -17
  82. package/DEV-cjs/core/LinkAction/LinkAction.js +27 -26
  83. package/DEV-cjs/core/List/List.js +11 -11
  84. package/DEV-cjs/core/List/ListItem.js +42 -34
  85. package/DEV-cjs/core/Menu/Menu.js +213 -127
  86. package/DEV-cjs/core/Menu/MenuDivider.js +11 -11
  87. package/DEV-cjs/core/Menu/MenuExtraContent.js +10 -10
  88. package/DEV-cjs/core/Menu/MenuItem.js +139 -76
  89. package/DEV-cjs/core/Menu/MenuItemSkeleton.js +65 -40
  90. package/DEV-cjs/core/Modal/Modal.js +54 -31
  91. package/DEV-cjs/core/Modal/ModalButtonBar.js +9 -9
  92. package/DEV-cjs/core/Modal/ModalContent.js +9 -9
  93. package/DEV-cjs/core/NonIdealState/ErrorPage.js +208 -127
  94. package/DEV-cjs/core/NonIdealState/NonIdealState.js +84 -35
  95. package/DEV-cjs/core/NotificationMarker/NotificationMarker.js +39 -25
  96. package/DEV-cjs/core/Overlay/Overlay.js +55 -41
  97. package/DEV-cjs/core/Popover/Popover.js +302 -193
  98. package/DEV-cjs/core/ProgressIndicators/ProgressLinear.js +70 -33
  99. package/DEV-cjs/core/ProgressIndicators/ProgressRadial.js +67 -40
  100. package/DEV-cjs/core/Radio/Radio.js +66 -38
  101. package/DEV-cjs/core/RadioTiles/RadioTile.js +88 -43
  102. package/DEV-cjs/core/RadioTiles/RadioTileGroup.js +29 -21
  103. package/DEV-cjs/core/SearchBox/SearchBox.js +203 -130
  104. package/DEV-cjs/core/Select/Select.js +457 -274
  105. package/DEV-cjs/core/Select/Select.types-test.js +112 -87
  106. package/DEV-cjs/core/Select/SelectTag.js +32 -24
  107. package/DEV-cjs/core/Select/SelectTagContainer.js +38 -25
  108. package/DEV-cjs/core/SideNavigation/SideNavigation.js +132 -64
  109. package/DEV-cjs/core/SideNavigation/SidenavButton.js +55 -33
  110. package/DEV-cjs/core/SideNavigation/SidenavSubmenu.js +33 -22
  111. package/DEV-cjs/core/SideNavigation/SidenavSubmenuHeader.js +41 -24
  112. package/DEV-cjs/core/SkipToContentLink/SkipToContentLink.js +28 -21
  113. package/DEV-cjs/core/Slider/Slider.js +352 -259
  114. package/DEV-cjs/core/Slider/Thumb.js +111 -98
  115. package/DEV-cjs/core/Slider/Track.js +93 -61
  116. package/DEV-cjs/core/StatusMessage/StatusMessage.js +46 -27
  117. package/DEV-cjs/core/Stepper/Stepper.js +86 -44
  118. package/DEV-cjs/core/Stepper/StepperStep.js +113 -59
  119. package/DEV-cjs/core/Stepper/WorkflowDiagram.js +37 -29
  120. package/DEV-cjs/core/Stepper/WorkflowDiagramStep.js +48 -28
  121. package/DEV-cjs/core/Surface/Surface.js +98 -76
  122. package/DEV-cjs/core/Table/ColumnHeader.js +194 -0
  123. package/DEV-cjs/core/Table/SubRowExpander.js +45 -34
  124. package/DEV-cjs/core/Table/Table.js +687 -510
  125. package/DEV-cjs/core/Table/TableCell.js +104 -61
  126. package/DEV-cjs/core/Table/TablePaginator.js +314 -178
  127. package/DEV-cjs/core/Table/TableRowMemoized.js +183 -90
  128. package/DEV-cjs/core/Table/actionHandlers/expandHandler.js +18 -18
  129. package/DEV-cjs/core/Table/actionHandlers/filterHandler.js +31 -23
  130. package/DEV-cjs/core/Table/actionHandlers/index.js +32 -31
  131. package/DEV-cjs/core/Table/actionHandlers/resizeHandler.js +26 -25
  132. package/DEV-cjs/core/Table/actionHandlers/selectHandler.js +124 -88
  133. package/DEV-cjs/core/Table/cells/DefaultCell.js +93 -44
  134. package/DEV-cjs/core/Table/cells/EditableCell.js +85 -63
  135. package/DEV-cjs/core/Table/cells/index.js +15 -14
  136. package/DEV-cjs/core/Table/columns/actionColumn.js +100 -78
  137. package/DEV-cjs/core/Table/columns/expanderColumn.js +56 -49
  138. package/DEV-cjs/core/Table/columns/index.js +25 -24
  139. package/DEV-cjs/core/Table/columns/selectionColumn.js +79 -58
  140. package/DEV-cjs/core/Table/filters/BaseFilter.js +31 -25
  141. package/DEV-cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +108 -72
  142. package/DEV-cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +115 -91
  143. package/DEV-cjs/core/Table/filters/FilterButtonBar.js +56 -33
  144. package/DEV-cjs/core/Table/filters/FilterToggle.js +71 -54
  145. package/DEV-cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +56 -60
  146. package/DEV-cjs/core/Table/filters/TextFilter/TextFilter.js +38 -36
  147. package/DEV-cjs/core/Table/filters/customFilterFunctions.js +26 -20
  148. package/DEV-cjs/core/Table/filters/defaultFilterFunctions.js +119 -77
  149. package/DEV-cjs/core/Table/filters/index.js +23 -22
  150. package/DEV-cjs/core/Table/filters/tableFilters.js +28 -25
  151. package/DEV-cjs/core/Table/filters/types.js +3 -3
  152. package/DEV-cjs/core/Table/hooks/index.js +39 -38
  153. package/DEV-cjs/core/Table/hooks/useColumnDragAndDrop.js +118 -101
  154. package/DEV-cjs/core/Table/hooks/useExpanderCell.js +39 -29
  155. package/DEV-cjs/core/Table/hooks/useResizeColumns.js +346 -248
  156. package/DEV-cjs/core/Table/hooks/useScrollToRow.js +42 -38
  157. package/DEV-cjs/core/Table/hooks/useSelectionCell.js +26 -19
  158. package/DEV-cjs/core/Table/hooks/useStickyColumns.js +55 -47
  159. package/DEV-cjs/core/Table/hooks/useSubRowFiltering.js +89 -86
  160. package/DEV-cjs/core/Table/hooks/useSubRowSelection.js +39 -39
  161. package/DEV-cjs/core/Table/index.js +42 -41
  162. package/DEV-cjs/core/Table/utils.js +66 -64
  163. package/DEV-cjs/core/Tabs/Tabs.js +388 -260
  164. package/DEV-cjs/core/Tag/Tag.js +80 -42
  165. package/DEV-cjs/core/Tag/TagContainer.js +31 -23
  166. package/DEV-cjs/core/Textarea/Textarea.js +19 -17
  167. package/DEV-cjs/core/ThemeProvider/ThemeContext.js +10 -10
  168. package/DEV-cjs/core/ThemeProvider/ThemeProvider.js +276 -172
  169. package/DEV-cjs/core/Tile/Tile.js +310 -173
  170. package/DEV-cjs/core/TimePicker/TimePicker.js +451 -263
  171. package/DEV-cjs/core/Toast/Toast.js +226 -157
  172. package/DEV-cjs/core/Toast/Toaster.js +142 -118
  173. package/DEV-cjs/core/ToggleSwitch/ToggleSwitch.js +76 -42
  174. package/DEV-cjs/core/Tooltip/Tooltip.js +221 -170
  175. package/DEV-cjs/core/TransferList/TransferList.js +171 -132
  176. package/DEV-cjs/core/Tree/Tree.js +226 -180
  177. package/DEV-cjs/core/Tree/TreeContext.js +20 -18
  178. package/DEV-cjs/core/Tree/TreeNode.js +254 -143
  179. package/DEV-cjs/core/Tree/TreeNodeExpander.js +40 -31
  180. package/DEV-cjs/core/Typography/Anchor.js +41 -27
  181. package/DEV-cjs/core/Typography/Blockquote.js +26 -21
  182. package/DEV-cjs/core/Typography/Code.js +9 -9
  183. package/DEV-cjs/core/Typography/Kbd.js +43 -38
  184. package/DEV-cjs/core/Typography/Text.js +45 -31
  185. package/DEV-cjs/core/VisuallyHidden/VisuallyHidden.js +47 -30
  186. package/DEV-cjs/index.js +475 -474
  187. package/DEV-cjs/package.json +1 -0
  188. package/DEV-cjs/react-table/react-table.js +3 -3
  189. package/DEV-cjs/react-table/react-table.types-test.js +628 -476
  190. package/DEV-cjs/styles.js +17 -1
  191. package/DEV-cjs/utils/color/ColorValue.js +429 -323
  192. package/DEV-cjs/utils/color/index.js +5 -5
  193. package/DEV-cjs/utils/components/AutoclearingHiddenLiveRegion.js +31 -26
  194. package/DEV-cjs/utils/components/Box.js +9 -9
  195. package/DEV-cjs/utils/components/ButtonBase.js +41 -35
  196. package/DEV-cjs/utils/components/FieldsetBase.js +9 -9
  197. package/DEV-cjs/utils/components/FocusTrap.js +48 -45
  198. package/DEV-cjs/utils/components/InputContainer.js +67 -34
  199. package/DEV-cjs/utils/components/InputFlexContainer.js +63 -49
  200. package/DEV-cjs/utils/components/InputWithIcon.js +9 -9
  201. package/DEV-cjs/utils/components/LineClamp.js +33 -24
  202. package/DEV-cjs/utils/components/MiddleTextTruncation.js +37 -33
  203. package/DEV-cjs/utils/components/Portal.js +35 -32
  204. package/DEV-cjs/utils/components/Resizer.js +221 -185
  205. package/DEV-cjs/utils/components/ShadowRoot.js +85 -69
  206. package/DEV-cjs/utils/components/WithCSSTransition.js +57 -50
  207. package/DEV-cjs/utils/components/index.js +18 -18
  208. package/DEV-cjs/utils/functions/colors.js +37 -35
  209. package/DEV-cjs/utils/functions/date.js +15 -15
  210. package/DEV-cjs/utils/functions/dev.js +25 -19
  211. package/DEV-cjs/utils/functions/dom.js +39 -39
  212. package/DEV-cjs/utils/functions/focusable.js +81 -63
  213. package/DEV-cjs/utils/functions/import.js +28 -22
  214. package/DEV-cjs/utils/functions/index.js +14 -14
  215. package/DEV-cjs/utils/functions/numbers.js +26 -24
  216. package/DEV-cjs/utils/functions/polymorphic.js +56 -43
  217. package/DEV-cjs/utils/functions/react.js +25 -23
  218. package/DEV-cjs/utils/functions/supports.js +11 -10
  219. package/DEV-cjs/utils/hooks/index.js +20 -20
  220. package/DEV-cjs/utils/hooks/useContainerWidth.js +31 -26
  221. package/DEV-cjs/utils/hooks/useControlledState.js +28 -27
  222. package/DEV-cjs/utils/hooks/useDragAndDrop.js +112 -88
  223. package/DEV-cjs/utils/hooks/useEventListener.js +23 -28
  224. package/DEV-cjs/utils/hooks/useGlobals.js +46 -40
  225. package/DEV-cjs/utils/hooks/useId.js +17 -17
  226. package/DEV-cjs/utils/hooks/useIntersection.js +38 -38
  227. package/DEV-cjs/utils/hooks/useIsClient.js +16 -16
  228. package/DEV-cjs/utils/hooks/useIsomorphicLayoutEffect.js +12 -11
  229. package/DEV-cjs/utils/hooks/useLatestRef.js +16 -18
  230. package/DEV-cjs/utils/hooks/useMediaQuery.js +32 -23
  231. package/DEV-cjs/utils/hooks/useMergedRefs.js +25 -23
  232. package/DEV-cjs/utils/hooks/useOverflow.js +68 -72
  233. package/DEV-cjs/utils/hooks/useResizeObserver.js +31 -33
  234. package/DEV-cjs/utils/hooks/useSafeContext.js +15 -14
  235. package/DEV-cjs/utils/hooks/useSyncExternalStore.js +37 -40
  236. package/DEV-cjs/utils/hooks/useVirtualScroll.js +42 -40
  237. package/DEV-cjs/utils/icons/StatusIconMap.js +34 -30
  238. package/DEV-cjs/utils/icons/Svg.js +12 -12
  239. package/DEV-cjs/utils/icons/SvgCalendar.js +19 -14
  240. package/DEV-cjs/utils/icons/SvgCaretDownSmall.js +19 -14
  241. package/DEV-cjs/utils/icons/SvgCaretRightSmall.js +19 -14
  242. package/DEV-cjs/utils/icons/SvgCaretUpSmall.js +19 -14
  243. package/DEV-cjs/utils/icons/SvgCheckmark.js +19 -14
  244. package/DEV-cjs/utils/icons/SvgCheckmarkSmall.js +19 -14
  245. package/DEV-cjs/utils/icons/SvgChevronLeft.js +19 -14
  246. package/DEV-cjs/utils/icons/SvgChevronLeftDouble.js +19 -14
  247. package/DEV-cjs/utils/icons/SvgChevronRight.js +19 -14
  248. package/DEV-cjs/utils/icons/SvgChevronRightDouble.js +19 -14
  249. package/DEV-cjs/utils/icons/SvgChevronRightSmall.js +19 -14
  250. package/DEV-cjs/utils/icons/SvgClose.js +19 -14
  251. package/DEV-cjs/utils/icons/SvgCloseSmall.js +19 -14
  252. package/DEV-cjs/utils/icons/SvgColumnManager.js +19 -14
  253. package/DEV-cjs/utils/icons/SvgDocument.js +19 -14
  254. package/DEV-cjs/utils/icons/SvgFilter.js +19 -14
  255. package/DEV-cjs/utils/icons/SvgFilterHollow.js +19 -14
  256. package/DEV-cjs/utils/icons/SvgImportantSmall.js +19 -14
  257. package/DEV-cjs/utils/icons/SvgInfoCircular.js +19 -14
  258. package/DEV-cjs/utils/icons/SvgMore.js +19 -14
  259. package/DEV-cjs/utils/icons/SvgMoreVertical.js +19 -14
  260. package/DEV-cjs/utils/icons/SvgNew.js +19 -14
  261. package/DEV-cjs/utils/icons/SvgSearch.js +19 -14
  262. package/DEV-cjs/utils/icons/SvgSmileyHappy.js +19 -14
  263. package/DEV-cjs/utils/icons/SvgSortDown.js +19 -14
  264. package/DEV-cjs/utils/icons/SvgSortUp.js +19 -14
  265. package/DEV-cjs/utils/icons/SvgStatusError.js +19 -14
  266. package/DEV-cjs/utils/icons/SvgStatusSuccess.js +19 -14
  267. package/DEV-cjs/utils/icons/SvgStatusWarning.js +19 -14
  268. package/DEV-cjs/utils/icons/SvgSwap.js +19 -14
  269. package/DEV-cjs/utils/icons/SvgUpload.js +19 -14
  270. package/DEV-cjs/utils/icons/index.js +36 -36
  271. package/DEV-cjs/utils/index.js +12 -12
  272. package/DEV-cjs/utils/meta.js +11 -11
  273. package/DEV-cjs/utils/props.js +3 -3
  274. package/DEV-cjs/utils/providers/HydrationProvider.js +47 -35
  275. package/DEV-cjs/utils/providers/ScopeProvider.js +55 -53
  276. package/DEV-cjs/utils/providers/index.js +6 -6
  277. package/DEV-cjs/utils/types.js +3 -3
  278. package/DEV-esm/core/Alert/Alert.js +112 -57
  279. package/DEV-esm/core/Avatar/Avatar.js +45 -26
  280. package/DEV-esm/core/AvatarGroup/AvatarGroup.js +58 -21
  281. package/DEV-esm/core/Backdrop/Backdrop.js +13 -9
  282. package/DEV-esm/core/Badge/Badge.js +34 -29
  283. package/DEV-esm/core/Breadcrumbs/Breadcrumbs.js +150 -71
  284. package/DEV-esm/core/ButtonGroup/ButtonGroup.js +127 -62
  285. package/DEV-esm/core/Buttons/Button.js +71 -34
  286. package/DEV-esm/core/Buttons/DropdownButton.js +38 -20
  287. package/DEV-esm/core/Buttons/IconButton.js +54 -25
  288. package/DEV-esm/core/Buttons/IdeasButton.js +16 -12
  289. package/DEV-esm/core/Buttons/SplitButton.js +80 -41
  290. package/DEV-esm/core/Carousel/Carousel.js +58 -48
  291. package/DEV-esm/core/Carousel/CarouselDot.js +18 -14
  292. package/DEV-esm/core/Carousel/CarouselDotsList.js +134 -98
  293. package/DEV-esm/core/Carousel/CarouselNavigation.js +82 -53
  294. package/DEV-esm/core/Carousel/CarouselSlide.js +40 -29
  295. package/DEV-esm/core/Carousel/CarouselSlider.js +59 -48
  296. package/DEV-esm/core/Checkbox/Checkbox.js +79 -40
  297. package/DEV-esm/core/ColorPicker/ColorBuilder.js +263 -214
  298. package/DEV-esm/core/ColorPicker/ColorInputPanel.js +382 -350
  299. package/DEV-esm/core/ColorPicker/ColorPalette.js +37 -20
  300. package/DEV-esm/core/ColorPicker/ColorPicker.js +69 -51
  301. package/DEV-esm/core/ColorPicker/ColorPickerContext.js +7 -4
  302. package/DEV-esm/core/ColorPicker/ColorSwatch.js +29 -18
  303. package/DEV-esm/core/ComboBox/ComboBox.js +382 -274
  304. package/DEV-esm/core/ComboBox/ComboBox.types-test.js +82 -75
  305. package/DEV-esm/core/ComboBox/ComboBoxEndIcon.js +22 -13
  306. package/DEV-esm/core/ComboBox/ComboBoxInput.js +170 -114
  307. package/DEV-esm/core/ComboBox/ComboBoxInputContainer.js +29 -11
  308. package/DEV-esm/core/ComboBox/ComboBoxMenu.js +121 -79
  309. package/DEV-esm/core/ComboBox/ComboBoxMenuItem.js +65 -22
  310. package/DEV-esm/core/ComboBox/ComboBoxMultipleContainer.js +7 -7
  311. package/DEV-esm/core/DatePicker/DatePicker.js +527 -335
  312. package/DEV-esm/core/Dialog/Dialog.js +66 -38
  313. package/DEV-esm/core/Dialog/DialogBackdrop.js +37 -24
  314. package/DEV-esm/core/Dialog/DialogContext.js +1 -1
  315. package/DEV-esm/core/Dialog/DialogDragContext.js +5 -5
  316. package/DEV-esm/core/Dialog/DialogMain.js +166 -106
  317. package/DEV-esm/core/Dialog/DialogTitleBar.js +43 -15
  318. package/DEV-esm/core/Divider/Divider.js +9 -9
  319. package/DEV-esm/core/DropdownMenu/DropdownMenu.js +50 -24
  320. package/DEV-esm/core/ExpandableBlock/ExpandableBlock.js +177 -110
  321. package/DEV-esm/core/Fieldset/Fieldset.js +21 -10
  322. package/DEV-esm/core/FileUpload/FileEmptyCard.js +25 -10
  323. package/DEV-esm/core/FileUpload/FileUpload.js +66 -44
  324. package/DEV-esm/core/FileUpload/FileUploadCard.js +163 -105
  325. package/DEV-esm/core/FileUpload/FileUploadTemplate.js +46 -21
  326. package/DEV-esm/core/Flex/Flex.js +65 -64
  327. package/DEV-esm/core/Footer/Footer.js +96 -64
  328. package/DEV-esm/core/Footer/FooterSeparator.js +1 -1
  329. package/DEV-esm/core/Header/Header.js +71 -29
  330. package/DEV-esm/core/Header/HeaderBasicButton.js +14 -7
  331. package/DEV-esm/core/Header/HeaderBreadcrumbs.js +39 -23
  332. package/DEV-esm/core/Header/HeaderButton.js +70 -32
  333. package/DEV-esm/core/Header/HeaderDropdownButton.js +41 -29
  334. package/DEV-esm/core/Header/HeaderLogo.js +40 -17
  335. package/DEV-esm/core/Header/HeaderSplitButton.js +60 -30
  336. package/DEV-esm/core/Icon/Icon.js +28 -22
  337. package/DEV-esm/core/InformationPanel/InformationPanel.js +84 -49
  338. package/DEV-esm/core/InformationPanel/InformationPanelContent.js +18 -8
  339. package/DEV-esm/core/InformationPanel/InformationPanelHeader.js +37 -16
  340. package/DEV-esm/core/InformationPanel/InformationPanelWrapper.js +3 -1
  341. package/DEV-esm/core/Input/Input.js +13 -13
  342. package/DEV-esm/core/InputGrid/InputGrid.js +128 -98
  343. package/DEV-esm/core/InputGroup/InputGroup.js +66 -32
  344. package/DEV-esm/core/InputWithDecorations/InputWithDecorations.js +59 -34
  345. package/DEV-esm/core/Label/Label.js +27 -12
  346. package/DEV-esm/core/LabeledInput/LabeledInput.js +65 -24
  347. package/DEV-esm/core/LabeledSelect/LabeledSelect.js +57 -25
  348. package/DEV-esm/core/LabeledSelect/LabeledSelect.types-test.js +95 -76
  349. package/DEV-esm/core/LabeledTextarea/LabeledTextarea.js +8 -6
  350. package/DEV-esm/core/LinkAction/LinkAction.js +8 -8
  351. package/DEV-esm/core/List/List.js +2 -2
  352. package/DEV-esm/core/List/ListItem.js +28 -20
  353. package/DEV-esm/core/Menu/Menu.js +207 -111
  354. package/DEV-esm/core/Menu/MenuDivider.js +2 -2
  355. package/DEV-esm/core/Menu/MenuExtraContent.js +1 -1
  356. package/DEV-esm/core/Menu/MenuItem.js +129 -62
  357. package/DEV-esm/core/Menu/MenuItemSkeleton.js +47 -26
  358. package/DEV-esm/core/Modal/Modal.js +43 -20
  359. package/DEV-esm/core/NonIdealState/ErrorPage.js +159 -114
  360. package/DEV-esm/core/NonIdealState/NonIdealState.js +65 -22
  361. package/DEV-esm/core/NotificationMarker/NotificationMarker.js +26 -12
  362. package/DEV-esm/core/Overlay/Overlay.js +44 -30
  363. package/DEV-esm/core/Popover/Popover.js +306 -172
  364. package/DEV-esm/core/ProgressIndicators/ProgressLinear.js +52 -19
  365. package/DEV-esm/core/ProgressIndicators/ProgressRadial.js +52 -27
  366. package/DEV-esm/core/Radio/Radio.js +50 -25
  367. package/DEV-esm/core/RadioTiles/RadioTile.js +63 -30
  368. package/DEV-esm/core/RadioTiles/RadioTileGroup.js +17 -9
  369. package/DEV-esm/core/SearchBox/SearchBox.js +200 -118
  370. package/DEV-esm/core/Select/Select.js +434 -256
  371. package/DEV-esm/core/Select/Select.types-test.js +107 -82
  372. package/DEV-esm/core/Select/SelectTag.js +19 -11
  373. package/DEV-esm/core/Select/SelectTagContainer.js +21 -11
  374. package/DEV-esm/core/SideNavigation/SideNavigation.js +103 -46
  375. package/DEV-esm/core/SideNavigation/SidenavButton.js +39 -18
  376. package/DEV-esm/core/SideNavigation/SidenavSubmenu.js +17 -9
  377. package/DEV-esm/core/SideNavigation/SidenavSubmenuHeader.js +25 -11
  378. package/DEV-esm/core/SkipToContentLink/SkipToContentLink.js +12 -8
  379. package/DEV-esm/core/Slider/Slider.js +317 -244
  380. package/DEV-esm/core/Slider/Thumb.js +97 -84
  381. package/DEV-esm/core/Slider/Track.js +77 -48
  382. package/DEV-esm/core/StatusMessage/StatusMessage.js +32 -13
  383. package/DEV-esm/core/Stepper/Stepper.js +69 -30
  384. package/DEV-esm/core/Stepper/StepperStep.js +93 -45
  385. package/DEV-esm/core/Stepper/WorkflowDiagram.js +23 -15
  386. package/DEV-esm/core/Stepper/WorkflowDiagramStep.js +28 -14
  387. package/DEV-esm/core/Surface/Surface.js +85 -63
  388. package/DEV-esm/core/Table/ColumnHeader.js +188 -0
  389. package/DEV-esm/core/Table/SubRowExpander.js +33 -22
  390. package/DEV-esm/core/Table/Table.js +694 -490
  391. package/DEV-esm/core/Table/TableCell.js +80 -44
  392. package/DEV-esm/core/Table/TablePaginator.js +305 -161
  393. package/DEV-esm/core/Table/TableRowMemoized.js +167 -73
  394. package/DEV-esm/core/Table/actionHandlers/expandHandler.js +10 -10
  395. package/DEV-esm/core/Table/actionHandlers/filterHandler.js +23 -15
  396. package/DEV-esm/core/Table/actionHandlers/index.js +5 -1
  397. package/DEV-esm/core/Table/actionHandlers/resizeHandler.js +14 -14
  398. package/DEV-esm/core/Table/actionHandlers/selectHandler.js +108 -73
  399. package/DEV-esm/core/Table/cells/DefaultCell.js +79 -30
  400. package/DEV-esm/core/Table/cells/EditableCell.js +70 -50
  401. package/DEV-esm/core/Table/columns/actionColumn.js +81 -59
  402. package/DEV-esm/core/Table/columns/expanderColumn.js +38 -32
  403. package/DEV-esm/core/Table/columns/selectionColumn.js +62 -42
  404. package/DEV-esm/core/Table/filters/BaseFilter.js +16 -13
  405. package/DEV-esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +92 -56
  406. package/DEV-esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +101 -77
  407. package/DEV-esm/core/Table/filters/FilterButtonBar.js +42 -19
  408. package/DEV-esm/core/Table/filters/FilterToggle.js +58 -40
  409. package/DEV-esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +42 -46
  410. package/DEV-esm/core/Table/filters/TextFilter/TextFilter.js +24 -22
  411. package/DEV-esm/core/Table/filters/customFilterFunctions.js +18 -12
  412. package/DEV-esm/core/Table/filters/defaultFilterFunctions.js +111 -69
  413. package/DEV-esm/core/Table/filters/tableFilters.js +15 -12
  414. package/DEV-esm/core/Table/filters/types.js +1 -1
  415. package/DEV-esm/core/Table/hooks/useColumnDragAndDrop.js +100 -91
  416. package/DEV-esm/core/Table/hooks/useExpanderCell.js +26 -18
  417. package/DEV-esm/core/Table/hooks/useResizeColumns.js +333 -238
  418. package/DEV-esm/core/Table/hooks/useScrollToRow.js +32 -28
  419. package/DEV-esm/core/Table/hooks/useSelectionCell.js +17 -10
  420. package/DEV-esm/core/Table/hooks/useStickyColumns.js +46 -38
  421. package/DEV-esm/core/Table/hooks/useSubRowFiltering.js +78 -75
  422. package/DEV-esm/core/Table/hooks/useSubRowSelection.js +29 -29
  423. package/DEV-esm/core/Table/index.js +5 -1
  424. package/DEV-esm/core/Table/utils.js +45 -44
  425. package/DEV-esm/core/Tabs/Tabs.js +372 -243
  426. package/DEV-esm/core/Tag/Tag.js +55 -27
  427. package/DEV-esm/core/Tag/TagContainer.js +18 -10
  428. package/DEV-esm/core/Textarea/Textarea.js +8 -6
  429. package/DEV-esm/core/ThemeProvider/ThemeProvider.js +258 -155
  430. package/DEV-esm/core/Tile/Tile.js +286 -157
  431. package/DEV-esm/core/TimePicker/TimePicker.js +438 -250
  432. package/DEV-esm/core/Toast/Toast.js +199 -138
  433. package/DEV-esm/core/Toast/Toaster.js +114 -94
  434. package/DEV-esm/core/ToggleSwitch/ToggleSwitch.js +60 -29
  435. package/DEV-esm/core/Tooltip/Tooltip.js +229 -159
  436. package/DEV-esm/core/TransferList/TransferList.js +146 -112
  437. package/DEV-esm/core/Tree/Tree.js +226 -175
  438. package/DEV-esm/core/Tree/TreeContext.js +5 -4
  439. package/DEV-esm/core/Tree/TreeNode.js +226 -129
  440. package/DEV-esm/core/Tree/TreeNodeExpander.js +24 -16
  441. package/DEV-esm/core/Typography/Anchor.js +22 -12
  442. package/DEV-esm/core/Typography/Blockquote.js +13 -8
  443. package/DEV-esm/core/Typography/Kbd.js +25 -21
  444. package/DEV-esm/core/Typography/Text.js +27 -14
  445. package/DEV-esm/core/VisuallyHidden/VisuallyHidden.js +34 -17
  446. package/DEV-esm/index.js +21 -3
  447. package/DEV-esm/react-table/react-table.js +1 -1
  448. package/DEV-esm/react-table/react-table.types-test.js +635 -471
  449. package/DEV-esm/styles.js +7 -10
  450. package/DEV-esm/utils/color/ColorValue.js +406 -304
  451. package/DEV-esm/utils/components/AutoclearingHiddenLiveRegion.js +16 -14
  452. package/DEV-esm/utils/components/ButtonBase.js +27 -21
  453. package/DEV-esm/utils/components/FocusTrap.js +36 -33
  454. package/DEV-esm/utils/components/InputContainer.js +52 -19
  455. package/DEV-esm/utils/components/InputFlexContainer.js +31 -27
  456. package/DEV-esm/utils/components/LineClamp.js +21 -12
  457. package/DEV-esm/utils/components/MiddleTextTruncation.js +26 -22
  458. package/DEV-esm/utils/components/Portal.js +11 -11
  459. package/DEV-esm/utils/components/Resizer.js +215 -175
  460. package/DEV-esm/utils/components/ShadowRoot.js +72 -56
  461. package/DEV-esm/utils/components/WithCSSTransition.js +45 -38
  462. package/DEV-esm/utils/functions/colors.js +21 -20
  463. package/DEV-esm/utils/functions/date.js +7 -7
  464. package/DEV-esm/utils/functions/dev.js +12 -7
  465. package/DEV-esm/utils/functions/dom.js +18 -18
  466. package/DEV-esm/utils/functions/focusable.js +62 -45
  467. package/DEV-esm/utils/functions/import.js +20 -14
  468. package/DEV-esm/utils/functions/numbers.js +11 -9
  469. package/DEV-esm/utils/functions/polymorphic.js +42 -29
  470. package/DEV-esm/utils/functions/react.js +14 -12
  471. package/DEV-esm/utils/functions/supports.js +2 -1
  472. package/DEV-esm/utils/hooks/useContainerWidth.js +14 -14
  473. package/DEV-esm/utils/hooks/useControlledState.js +18 -17
  474. package/DEV-esm/utils/hooks/useDragAndDrop.js +100 -76
  475. package/DEV-esm/utils/hooks/useEventListener.js +13 -18
  476. package/DEV-esm/utils/hooks/useGlobals.js +29 -24
  477. package/DEV-esm/utils/hooks/useId.js +5 -6
  478. package/DEV-esm/utils/hooks/useIntersection.js +27 -27
  479. package/DEV-esm/utils/hooks/useIsClient.js +6 -6
  480. package/DEV-esm/utils/hooks/useIsomorphicLayoutEffect.js +2 -1
  481. package/DEV-esm/utils/hooks/useLatestRef.js +6 -8
  482. package/DEV-esm/utils/hooks/useMediaQuery.js +17 -12
  483. package/DEV-esm/utils/hooks/useMergedRefs.js +10 -9
  484. package/DEV-esm/utils/hooks/useOverflow.js +57 -59
  485. package/DEV-esm/utils/hooks/useResizeObserver.js +20 -22
  486. package/DEV-esm/utils/hooks/useSafeContext.js +5 -4
  487. package/DEV-esm/utils/hooks/useSyncExternalStore.js +27 -30
  488. package/DEV-esm/utils/hooks/useVirtualScroll.js +31 -29
  489. package/DEV-esm/utils/icons/StatusIconMap.js +20 -16
  490. package/DEV-esm/utils/icons/Svg.js +3 -3
  491. package/DEV-esm/utils/icons/SvgCalendar.js +8 -3
  492. package/DEV-esm/utils/icons/SvgCaretDownSmall.js +8 -3
  493. package/DEV-esm/utils/icons/SvgCaretRightSmall.js +8 -3
  494. package/DEV-esm/utils/icons/SvgCaretUpSmall.js +8 -3
  495. package/DEV-esm/utils/icons/SvgCheckmark.js +8 -3
  496. package/DEV-esm/utils/icons/SvgCheckmarkSmall.js +8 -3
  497. package/DEV-esm/utils/icons/SvgChevronLeft.js +8 -3
  498. package/DEV-esm/utils/icons/SvgChevronLeftDouble.js +8 -3
  499. package/DEV-esm/utils/icons/SvgChevronRight.js +8 -3
  500. package/DEV-esm/utils/icons/SvgChevronRightDouble.js +8 -3
  501. package/DEV-esm/utils/icons/SvgChevronRightSmall.js +8 -3
  502. package/DEV-esm/utils/icons/SvgClose.js +8 -3
  503. package/DEV-esm/utils/icons/SvgCloseSmall.js +8 -3
  504. package/DEV-esm/utils/icons/SvgColumnManager.js +8 -3
  505. package/DEV-esm/utils/icons/SvgDocument.js +8 -3
  506. package/DEV-esm/utils/icons/SvgFilter.js +8 -3
  507. package/DEV-esm/utils/icons/SvgFilterHollow.js +8 -3
  508. package/DEV-esm/utils/icons/SvgImportantSmall.js +8 -3
  509. package/DEV-esm/utils/icons/SvgInfoCircular.js +8 -3
  510. package/DEV-esm/utils/icons/SvgMore.js +8 -3
  511. package/DEV-esm/utils/icons/SvgMoreVertical.js +8 -3
  512. package/DEV-esm/utils/icons/SvgNew.js +8 -3
  513. package/DEV-esm/utils/icons/SvgSearch.js +8 -3
  514. package/DEV-esm/utils/icons/SvgSmileyHappy.js +8 -3
  515. package/DEV-esm/utils/icons/SvgSortDown.js +8 -3
  516. package/DEV-esm/utils/icons/SvgSortUp.js +8 -3
  517. package/DEV-esm/utils/icons/SvgStatusError.js +8 -3
  518. package/DEV-esm/utils/icons/SvgStatusSuccess.js +8 -3
  519. package/DEV-esm/utils/icons/SvgStatusWarning.js +8 -3
  520. package/DEV-esm/utils/icons/SvgSwap.js +8 -3
  521. package/DEV-esm/utils/icons/SvgUpload.js +8 -3
  522. package/DEV-esm/utils/meta.js +2 -2
  523. package/DEV-esm/utils/props.js +1 -1
  524. package/DEV-esm/utils/providers/HydrationProvider.js +31 -20
  525. package/DEV-esm/utils/providers/ScopeProvider.js +36 -35
  526. package/DEV-esm/utils/types.js +1 -1
  527. package/cjs/core/Buttons/IconButton.d.ts +4 -0
  528. package/cjs/core/Buttons/IconButton.js +3 -1
  529. package/cjs/core/Carousel/Carousel.d.ts +4 -2
  530. package/cjs/core/Carousel/CarouselNavigation.d.ts +4 -2
  531. package/cjs/core/ComboBox/ComboBox.js +5 -0
  532. package/cjs/core/InputWithDecorations/InputWithDecorations.d.ts +1 -1
  533. package/cjs/core/List/List.d.ts +1 -1
  534. package/cjs/core/List/List.js +1 -1
  535. package/cjs/core/List/ListItem.d.ts +4 -4
  536. package/cjs/core/List/ListItem.js +4 -6
  537. package/cjs/core/Menu/Menu.js +6 -0
  538. package/cjs/core/Menu/MenuDivider.d.ts +1 -1
  539. package/cjs/core/Menu/MenuDivider.js +1 -1
  540. package/cjs/core/Overlay/Overlay.d.ts +2 -2
  541. package/cjs/core/Overlay/Overlay.js +2 -2
  542. package/cjs/core/Popover/Popover.d.ts +8 -1
  543. package/cjs/core/Popover/Popover.js +40 -9
  544. package/cjs/core/Select/Select.js +5 -0
  545. package/cjs/core/Table/ColumnHeader.d.ts +19 -0
  546. package/cjs/core/Table/ColumnHeader.js +194 -0
  547. package/cjs/core/Table/Table.js +37 -190
  548. package/cjs/core/Table/filters/BaseFilter.d.ts +2 -9
  549. package/cjs/core/Table/filters/BaseFilter.js +17 -15
  550. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +3 -8
  551. package/cjs/core/Table/filters/FilterButtonBar.d.ts +4 -2
  552. package/cjs/core/Table/filters/FilterButtonBar.js +1 -0
  553. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +3 -9
  554. package/cjs/core/Table/filters/TextFilter/TextFilter.js +4 -7
  555. package/cjs/core/Table/filters/index.d.ts +0 -1
  556. package/cjs/core/Table/index.d.ts +1 -1
  557. package/cjs/core/ThemeProvider/ThemeProvider.d.ts +0 -4
  558. package/cjs/core/ThemeProvider/ThemeProvider.js +66 -49
  559. package/cjs/core/Tile/Tile.d.ts +10 -9
  560. package/cjs/core/Tile/Tile.js +8 -8
  561. package/cjs/core/Toast/Toaster.d.ts +3 -2
  562. package/cjs/core/Toast/Toaster.js +2 -1
  563. package/cjs/core/Tooltip/Tooltip.js +22 -7
  564. package/cjs/core/TransferList/TransferList.d.ts +5 -5
  565. package/cjs/core/TransferList/TransferList.js +2 -2
  566. package/cjs/styles.js +1 -1
  567. package/cjs/utils/functions/polymorphic.d.ts +3 -7
  568. package/cjs/utils/functions/polymorphic.js +8 -5
  569. package/esm/core/Buttons/IconButton.d.ts +4 -0
  570. package/esm/core/Buttons/IconButton.js +4 -2
  571. package/esm/core/Carousel/Carousel.d.ts +4 -2
  572. package/esm/core/Carousel/CarouselNavigation.d.ts +4 -2
  573. package/esm/core/ComboBox/ComboBox.js +5 -0
  574. package/esm/core/InputWithDecorations/InputWithDecorations.d.ts +1 -1
  575. package/esm/core/List/List.d.ts +1 -1
  576. package/esm/core/List/List.js +1 -1
  577. package/esm/core/List/ListItem.d.ts +4 -4
  578. package/esm/core/List/ListItem.js +4 -4
  579. package/esm/core/Menu/Menu.js +6 -0
  580. package/esm/core/Menu/MenuDivider.d.ts +1 -1
  581. package/esm/core/Menu/MenuDivider.js +1 -1
  582. package/esm/core/Overlay/Overlay.d.ts +2 -2
  583. package/esm/core/Overlay/Overlay.js +2 -2
  584. package/esm/core/Popover/Popover.d.ts +8 -1
  585. package/esm/core/Popover/Popover.js +40 -9
  586. package/esm/core/Select/Select.js +5 -0
  587. package/esm/core/Table/ColumnHeader.d.ts +19 -0
  588. package/esm/core/Table/ColumnHeader.js +188 -0
  589. package/esm/core/Table/Table.js +19 -177
  590. package/esm/core/Table/filters/BaseFilter.d.ts +2 -9
  591. package/esm/core/Table/filters/BaseFilter.js +15 -16
  592. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +3 -8
  593. package/esm/core/Table/filters/FilterButtonBar.d.ts +4 -2
  594. package/esm/core/Table/filters/FilterButtonBar.js +1 -0
  595. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +3 -9
  596. package/esm/core/Table/filters/TextFilter/TextFilter.js +4 -7
  597. package/esm/core/Table/filters/index.d.ts +0 -1
  598. package/esm/core/Table/index.d.ts +1 -1
  599. package/esm/core/ThemeProvider/ThemeProvider.d.ts +0 -4
  600. package/esm/core/ThemeProvider/ThemeProvider.js +65 -44
  601. package/esm/core/Tile/Tile.d.ts +10 -9
  602. package/esm/core/Tile/Tile.js +8 -8
  603. package/esm/core/Toast/Toaster.d.ts +3 -2
  604. package/esm/core/Toast/Toaster.js +2 -1
  605. package/esm/core/Tooltip/Tooltip.js +22 -8
  606. package/esm/core/TransferList/TransferList.d.ts +5 -5
  607. package/esm/core/TransferList/TransferList.js +2 -2
  608. package/esm/styles.js +1 -1
  609. package/esm/utils/functions/polymorphic.d.ts +3 -7
  610. package/esm/utils/functions/polymorphic.js +8 -5
  611. package/package.json +3 -3
  612. package/styles.css +22 -14
@@ -1,5 +1,10 @@
1
1
  import * as React from 'react';
2
- import { Box, InputWithIcon, cloneElementWithRef, useId } from '../../utils/index.js';
2
+ import {
3
+ Box,
4
+ InputWithIcon,
5
+ cloneElementWithRef,
6
+ useId,
7
+ } from '../../utils/index.js';
3
8
  import cx from 'classnames';
4
9
  import { Label } from '../Label/Label.js';
5
10
  import { Input } from '../Input/Input.js';
@@ -8,106 +13,131 @@ import { StatusMessage } from '../StatusMessage/StatusMessage.js';
8
13
  import { InputWithDecorations } from '../InputWithDecorations/InputWithDecorations.js';
9
14
  import { ComboBox } from '../ComboBox/ComboBox.js';
10
15
  import { Select } from '../Select/Select.js';
11
- export const InputGrid = React.forwardRef((props, ref)=>{
12
- let { children: childrenProp, className, labelPlacement, ...rest } = props;
13
- let children = useChildrenWithIds(childrenProp);
14
- return React.createElement(Box, {
15
- className: cx('iui-input-grid', className),
16
- "data-iui-label-placement": labelPlacement,
17
- ref: ref,
18
- ...rest
19
- }, children);
16
+ export const InputGrid = React.forwardRef((props, ref) => {
17
+ let { children: childrenProp, className, labelPlacement, ...rest } = props;
18
+ let children = useChildrenWithIds(childrenProp);
19
+ return React.createElement(
20
+ Box,
21
+ {
22
+ className: cx('iui-input-grid', className),
23
+ 'data-iui-label-placement': labelPlacement,
24
+ ref: ref,
25
+ ...rest,
26
+ },
27
+ children,
28
+ );
20
29
  });
21
30
  InputGrid.displayName = 'InputGrid';
22
- let useChildrenWithIds = (children)=>{
23
- let { labelId, inputId, messageId } = useSetup(children);
24
- return React.useMemo(()=>React.Children.map(children, (child)=>{
25
- if (!React.isValidElement(child)) return child;
26
- if (child.type === Label || 'label' === child.type) return cloneElementWithRef(child, (child)=>({
27
- ...child.props,
28
- htmlFor: child.props.htmlFor || inputId,
29
- id: child.props.id || labelId
30
- }));
31
- if (child.type === StatusMessage) return cloneElementWithRef(child, (child)=>({
32
- ...child.props,
33
- id: child.props.id || messageId
34
- }));
35
- if (isInput(child) || child.type === InputWithDecorations || child.type === InputWithIcon) return handleCloningInputs(child, {
36
- labelId,
37
- inputId,
38
- messageId
39
- });
40
- return child;
41
- }), [
42
- children,
43
- inputId,
44
- labelId,
45
- messageId
46
- ]);
31
+ let useChildrenWithIds = (children) => {
32
+ let { labelId, inputId, messageId } = useSetup(children);
33
+ return React.useMemo(
34
+ () =>
35
+ React.Children.map(children, (child) => {
36
+ if (!React.isValidElement(child)) return child;
37
+ if (child.type === Label || 'label' === child.type)
38
+ return cloneElementWithRef(child, (child) => ({
39
+ ...child.props,
40
+ htmlFor: child.props.htmlFor || inputId,
41
+ id: child.props.id || labelId,
42
+ }));
43
+ if (child.type === StatusMessage)
44
+ return cloneElementWithRef(child, (child) => ({
45
+ ...child.props,
46
+ id: child.props.id || messageId,
47
+ }));
48
+ if (
49
+ isInput(child) ||
50
+ child.type === InputWithDecorations ||
51
+ child.type === InputWithIcon
52
+ )
53
+ return handleCloningInputs(child, {
54
+ labelId,
55
+ inputId,
56
+ messageId,
57
+ });
58
+ return child;
59
+ }),
60
+ [children, inputId, labelId, messageId],
61
+ );
47
62
  };
48
- let useSetup = (children)=>{
49
- let idPrefix = useId();
50
- let labelId;
51
- let inputId;
52
- let messageId;
53
- let hasLabel = false;
54
- let hasSelect = false;
55
- let findInputId = (child)=>{
56
- if (!React.isValidElement(child)) return;
57
- if (child.type === ComboBox) return child.props.inputProps?.id || `${idPrefix}--input`;
58
- if (child.type !== Select) return child.props.id || `${idPrefix}--input`;
59
- };
60
- React.Children.forEach(children, (child)=>{
61
- if (!React.isValidElement(child)) return;
62
- if (child.type === Label || 'label' === child.type) {
63
- hasLabel = true;
64
- labelId || (labelId = child.props.id || `${idPrefix}--label`);
65
- }
66
- if (child.type === StatusMessage) messageId || (messageId = child.props.id || `${idPrefix}--message`);
67
- if (child.type === InputWithDecorations || child.type === InputWithIcon) React.Children.forEach(child.props.children, (child)=>{
68
- if (isInput(child)) inputId || (inputId = findInputId(child));
69
- });
70
- else if (isInput(child)) inputId || (inputId = findInputId(child));
71
- if (child.type === Select) hasSelect = true;
72
- });
73
- return {
74
- labelId: hasSelect ? labelId : void 0,
75
- inputId: hasLabel && !hasSelect ? inputId : void 0,
76
- messageId
77
- };
63
+ let useSetup = (children) => {
64
+ let idPrefix = useId();
65
+ let labelId;
66
+ let inputId;
67
+ let messageId;
68
+ let hasLabel = false;
69
+ let hasSelect = false;
70
+ let findInputId = (child) => {
71
+ if (!React.isValidElement(child)) return;
72
+ if (child.type === ComboBox)
73
+ return child.props.inputProps?.id || `${idPrefix}--input`;
74
+ if (child.type !== Select) return child.props.id || `${idPrefix}--input`;
75
+ };
76
+ React.Children.forEach(children, (child) => {
77
+ if (!React.isValidElement(child)) return;
78
+ if (child.type === Label || 'label' === child.type) {
79
+ hasLabel = true;
80
+ labelId || (labelId = child.props.id || `${idPrefix}--label`);
81
+ }
82
+ if (child.type === StatusMessage)
83
+ messageId || (messageId = child.props.id || `${idPrefix}--message`);
84
+ if (child.type === InputWithDecorations || child.type === InputWithIcon)
85
+ React.Children.forEach(child.props.children, (child) => {
86
+ if (isInput(child)) inputId || (inputId = findInputId(child));
87
+ });
88
+ else if (isInput(child)) inputId || (inputId = findInputId(child));
89
+ if (child.type === Select) hasSelect = true;
90
+ });
91
+ return {
92
+ labelId: hasSelect ? labelId : void 0,
93
+ inputId: hasLabel && !hasSelect ? inputId : void 0,
94
+ messageId,
95
+ };
78
96
  };
79
- let handleCloningInputs = (child, { labelId, inputId, messageId })=>{
80
- let inputProps = (props = {})=>{
81
- let ariaDescribedBy = [
82
- props['aria-describedby'],
83
- messageId
84
- ].filter(Boolean).join(' ');
85
- return {
86
- ...props,
87
- ...child.type !== Select && {
88
- id: props.id || inputId
89
- },
90
- 'aria-describedby': ariaDescribedBy?.trim() || void 0
91
- };
92
- };
93
- let cloneInput = (child)=>{
94
- if (child.type === ComboBox) return cloneElementWithRef(child, (child)=>({
95
- inputProps: inputProps(child.props.inputProps)
96
- }));
97
- if (child.type === Select) return cloneElementWithRef(child, (child)=>({
98
- triggerProps: {
99
- 'aria-labelledby': labelId,
100
- ...inputProps(child.props.triggerProps)
101
- }
102
- }));
103
- return cloneElementWithRef(child, (child)=>inputProps(child.props));
97
+ let handleCloningInputs = (child, { labelId, inputId, messageId }) => {
98
+ let inputProps = (props = {}) => {
99
+ let ariaDescribedBy = [props['aria-describedby'], messageId]
100
+ .filter(Boolean)
101
+ .join(' ');
102
+ return {
103
+ ...props,
104
+ ...(child.type !== Select && {
105
+ id: props.id || inputId,
106
+ }),
107
+ 'aria-describedby': ariaDescribedBy?.trim() || void 0,
104
108
  };
105
- if (child.type === InputWithDecorations || child.type === InputWithIcon) return cloneElementWithRef(child, (child)=>({
106
- children: React.Children.map(child.props.children, (child)=>{
107
- if (React.isValidElement(child) && isInput(child)) return cloneInput(child);
108
- return child;
109
- })
110
- }));
111
- return cloneInput(child);
109
+ };
110
+ let cloneInput = (child) => {
111
+ if (child.type === ComboBox)
112
+ return cloneElementWithRef(child, (child) => ({
113
+ inputProps: inputProps(child.props.inputProps),
114
+ }));
115
+ if (child.type === Select)
116
+ return cloneElementWithRef(child, (child) => ({
117
+ triggerProps: {
118
+ 'aria-labelledby': labelId,
119
+ ...inputProps(child.props.triggerProps),
120
+ },
121
+ }));
122
+ return cloneElementWithRef(child, (child) => inputProps(child.props));
123
+ };
124
+ if (child.type === InputWithDecorations || child.type === InputWithIcon)
125
+ return cloneElementWithRef(child, (child) => ({
126
+ children: React.Children.map(child.props.children, (child) => {
127
+ if (React.isValidElement(child) && isInput(child))
128
+ return cloneInput(child);
129
+ return child;
130
+ }),
131
+ }));
132
+ return cloneInput(child);
112
133
  };
113
- let isInput = (child)=>React.isValidElement(child) && ('input' === child.type || 'textarea' === child.type || 'select' === child.type || child.type === Input || child.type === Textarea || child.type === InputWithDecorations.Input || child.type === Select || child.type === ComboBox);
134
+ let isInput = (child) =>
135
+ React.isValidElement(child) &&
136
+ ('input' === child.type ||
137
+ 'textarea' === child.type ||
138
+ 'select' === child.type ||
139
+ child.type === Input ||
140
+ child.type === Textarea ||
141
+ child.type === InputWithDecorations.Input ||
142
+ child.type === Select ||
143
+ child.type === ComboBox);
@@ -4,43 +4,77 @@ import { Box } from '../../utils/index.js';
4
4
  import { InputGrid } from '../InputGrid/InputGrid.js';
5
5
  import { Label } from '../Label/Label.js';
6
6
  import { StatusMessage } from '../StatusMessage/StatusMessage.js';
7
- export const InputGroup = React.forwardRef((props, forwardedRef)=>{
8
- let { className, children, disabled = false, displayStyle = 'default', label, status, required = false, labelProps, innerProps, message, svgIcon, messageProps, ...rest } = props;
9
- return React.createElement(InputGrid, {
10
- ref: forwardedRef,
11
- as: "div",
12
- labelPlacement: displayStyle,
13
- className: cx('iui-input-group-wrapper', className),
14
- "data-iui-status": status,
15
- ...rest
16
- }, label && React.createElement(Label, {
17
- as: "label",
18
- required: required,
19
- disabled: disabled,
20
- ...labelProps
21
- }, label), React.createElement(Box, {
22
- as: "div",
7
+ export const InputGroup = React.forwardRef((props, forwardedRef) => {
8
+ let {
9
+ className,
10
+ children,
11
+ disabled = false,
12
+ displayStyle = 'default',
13
+ label,
14
+ status,
15
+ required = false,
16
+ labelProps,
17
+ innerProps,
18
+ message,
19
+ svgIcon,
20
+ messageProps,
21
+ ...rest
22
+ } = props;
23
+ return React.createElement(
24
+ InputGrid,
25
+ {
26
+ ref: forwardedRef,
27
+ as: 'div',
28
+ labelPlacement: displayStyle,
29
+ className: cx('iui-input-group-wrapper', className),
30
+ 'data-iui-status': status,
31
+ ...rest,
32
+ },
33
+ label &&
34
+ React.createElement(
35
+ Label,
36
+ {
37
+ as: 'label',
38
+ required: required,
39
+ disabled: disabled,
40
+ ...labelProps,
41
+ },
42
+ label,
43
+ ),
44
+ React.createElement(
45
+ Box,
46
+ {
47
+ as: 'div',
23
48
  ...innerProps,
24
- className: cx('iui-input-group', innerProps?.className)
25
- }, children), React.createElement(BottomMessage, {
26
- message: message,
27
- status: status,
28
- svgIcon: svgIcon,
29
- displayStyle: displayStyle,
30
- messageProps: messageProps
31
- }));
49
+ className: cx('iui-input-group', innerProps?.className),
50
+ },
51
+ children,
52
+ ),
53
+ React.createElement(BottomMessage, {
54
+ message: message,
55
+ status: status,
56
+ svgIcon: svgIcon,
57
+ displayStyle: displayStyle,
58
+ messageProps: messageProps,
59
+ }),
60
+ );
32
61
  });
33
62
  InputGroup.displayName = 'InputGroup';
34
- let BottomMessage = (props)=>{
35
- let { message, status, svgIcon, displayStyle, messageProps } = props;
36
- if (message && 'string' != typeof message) return message;
37
- if (message || status || svgIcon) return React.createElement(StatusMessage, {
63
+ let BottomMessage = (props) => {
64
+ let { message, status, svgIcon, displayStyle, messageProps } = props;
65
+ if (message && 'string' != typeof message) return message;
66
+ if (message || status || svgIcon)
67
+ return React.createElement(
68
+ StatusMessage,
69
+ {
38
70
  iconProps: {
39
- 'aria-hidden': true
71
+ 'aria-hidden': true,
40
72
  },
41
73
  startIcon: svgIcon,
42
74
  status: status,
43
- ...messageProps
44
- }, 'inline' !== displayStyle && message);
45
- return null;
75
+ ...messageProps,
76
+ },
77
+ 'inline' !== displayStyle && message,
78
+ );
79
+ return null;
46
80
  };
@@ -1,50 +1,75 @@
1
1
  import * as React from 'react';
2
- import { Box, InputFlexContainer, InputFlexContainerButton, InputFlexContainerIcon, useSafeContext } from '../../utils/index.js';
2
+ import {
3
+ Box,
4
+ InputFlexContainer,
5
+ InputFlexContainerButton,
6
+ InputFlexContainerIcon,
7
+ useSafeContext,
8
+ } from '../../utils/index.js';
3
9
  let InputWithDecorationsContext = React.createContext(void 0);
4
10
  InputWithDecorationsContext.displayName = 'InputWithDecorationsContext';
5
- let InputWithDecorationsComponent = React.forwardRef((props, ref)=>{
6
- let { children, size, isDisabled, ...rest } = props;
7
- return React.createElement(InputWithDecorationsContext.Provider, {
8
- value: {
9
- size,
10
- isDisabled
11
- }
12
- }, React.createElement(InputFlexContainer, {
11
+ let InputWithDecorationsComponent = React.forwardRef((props, ref) => {
12
+ let { children, size, isDisabled, ...rest } = props;
13
+ return React.createElement(
14
+ InputWithDecorationsContext.Provider,
15
+ {
16
+ value: {
17
+ size,
18
+ isDisabled,
19
+ },
20
+ },
21
+ React.createElement(
22
+ InputFlexContainer,
23
+ {
13
24
  isDisabled: isDisabled,
14
25
  size: size,
15
26
  ref: ref,
16
- ...rest
17
- }, children));
27
+ ...rest,
28
+ },
29
+ children,
30
+ ),
31
+ );
18
32
  });
19
33
  InputWithDecorationsComponent.displayName = 'InputWithDecorations';
20
- let InputWithDecorationsInput = React.forwardRef((props, ref)=>{
21
- let { id: idProp, size, disabled: localDisabled, ...rest } = props;
22
- let { size: contextSize, isDisabled } = useSafeContext(InputWithDecorationsContext);
23
- return React.createElement(Box, {
24
- as: "input",
25
- ref: ref,
26
- "data-iui-size": size ?? contextSize,
27
- disabled: localDisabled ?? isDisabled,
28
- id: idProp,
29
- ...rest
30
- });
34
+ let InputWithDecorationsInput = React.forwardRef((props, ref) => {
35
+ let { id: idProp, size, disabled: localDisabled, ...rest } = props;
36
+ let { size: contextSize, isDisabled } = useSafeContext(
37
+ InputWithDecorationsContext,
38
+ );
39
+ return React.createElement(Box, {
40
+ as: 'input',
41
+ ref: ref,
42
+ 'data-iui-size': size ?? contextSize,
43
+ disabled: localDisabled ?? isDisabled,
44
+ id: idProp,
45
+ ...rest,
46
+ });
31
47
  });
32
48
  InputWithDecorationsInput.displayName = 'InputWithDecorations.Input';
33
- let InputWithDecorationsButton = React.forwardRef((props, ref)=>{
34
- let { children, size, disabled: localDisabled, ...rest } = props;
35
- let { size: contextSize, isDisabled } = useSafeContext(InputWithDecorationsContext);
36
- return React.createElement(InputFlexContainerButton, {
37
- ref: ref,
38
- size: size ?? contextSize,
39
- disabled: localDisabled ?? isDisabled,
40
- ...rest
41
- }, children);
49
+ let InputWithDecorationsButton = React.forwardRef((props, ref) => {
50
+ let { children, size, disabled: localDisabled, ...rest } = props;
51
+ let { size: contextSize, isDisabled } = useSafeContext(
52
+ InputWithDecorationsContext,
53
+ );
54
+ return React.createElement(
55
+ InputFlexContainerButton,
56
+ {
57
+ ref: ref,
58
+ size: size ?? contextSize,
59
+ disabled: localDisabled ?? isDisabled,
60
+ ...rest,
61
+ },
62
+ children,
63
+ );
42
64
  });
43
65
  InputWithDecorationsButton.displayName = 'InputWithDecorations.Button';
44
66
  let InputWithDecorationsIcon = InputFlexContainerIcon;
45
67
  InputWithDecorationsIcon.displayName = 'InputWithDecorations.Icon';
46
- export const InputWithDecorations = Object.assign(InputWithDecorationsComponent, {
68
+ export const InputWithDecorations = Object.assign(
69
+ InputWithDecorationsComponent,
70
+ {
47
71
  Input: InputWithDecorationsInput,
48
72
  Button: InputWithDecorationsButton,
49
- Icon: InputWithDecorationsIcon
50
- });
73
+ Icon: InputWithDecorationsIcon,
74
+ },
75
+ );
@@ -1,17 +1,32 @@
1
1
  import * as React from 'react';
2
2
  import cx from 'classnames';
3
3
  import { Box } from '../../utils/index.js';
4
- export const Label = React.forwardRef((props, forwardedRef)=>{
5
- let { displayStyle = 'block', required, disabled, className, children, ...rest } = props;
6
- return React.createElement(Box, {
7
- as: "label",
8
- className: cx('iui-input-label', {
9
- 'iui-inline': 'inline' === displayStyle,
10
- 'iui-required': required
11
- }, className),
12
- "data-iui-disabled": !!disabled || void 0,
13
- ref: forwardedRef,
14
- ...rest
15
- }, children);
4
+ export const Label = React.forwardRef((props, forwardedRef) => {
5
+ let {
6
+ displayStyle = 'block',
7
+ required,
8
+ disabled,
9
+ className,
10
+ children,
11
+ ...rest
12
+ } = props;
13
+ return React.createElement(
14
+ Box,
15
+ {
16
+ as: 'label',
17
+ className: cx(
18
+ 'iui-input-label',
19
+ {
20
+ 'iui-inline': 'inline' === displayStyle,
21
+ 'iui-required': required,
22
+ },
23
+ className,
24
+ ),
25
+ 'data-iui-disabled': !!disabled || void 0,
26
+ ref: forwardedRef,
27
+ ...rest,
28
+ },
29
+ children,
30
+ );
16
31
  });
17
32
  Label.displayName = 'Label';
@@ -6,32 +6,73 @@ import { StatusMessage } from '../StatusMessage/StatusMessage.js';
6
6
  import { Label } from '../Label/Label.js';
7
7
  import { Icon } from '../Icon/Icon.js';
8
8
  import cx from 'classnames';
9
- export const LabeledInput = React.forwardRef((props, ref)=>{
10
- let { disabled = false, label, message, status, svgIcon, wrapperProps, labelProps, messageContentProps, iconProps, inputWrapperProps, displayStyle = 'default', required = false, ...rest } = props;
11
- let icon = svgIcon ?? (status && StatusIconMap[status]());
12
- let shouldShowIcon = null !== svgIcon && (svgIcon || status && !message);
13
- return React.createElement(InputGrid, {
14
- labelPlacement: displayStyle,
15
- "data-iui-status": status,
16
- ...wrapperProps
17
- }, label && React.createElement(Label, {
18
- as: "label",
19
- required: required,
20
- disabled: disabled,
21
- ...labelProps
22
- }, label), React.createElement(InputWithIcon, inputWrapperProps, React.createElement(Input, {
9
+ export const LabeledInput = React.forwardRef((props, ref) => {
10
+ let {
11
+ disabled = false,
12
+ label,
13
+ message,
14
+ status,
15
+ svgIcon,
16
+ wrapperProps,
17
+ labelProps,
18
+ messageContentProps,
19
+ iconProps,
20
+ inputWrapperProps,
21
+ displayStyle = 'default',
22
+ required = false,
23
+ ...rest
24
+ } = props;
25
+ let icon = svgIcon ?? (status && StatusIconMap[status]());
26
+ let shouldShowIcon = null !== svgIcon && (svgIcon || (status && !message));
27
+ return React.createElement(
28
+ InputGrid,
29
+ {
30
+ labelPlacement: displayStyle,
31
+ 'data-iui-status': status,
32
+ ...wrapperProps,
33
+ },
34
+ label &&
35
+ React.createElement(
36
+ Label,
37
+ {
38
+ as: 'label',
39
+ required: required,
40
+ disabled: disabled,
41
+ ...labelProps,
42
+ },
43
+ label,
44
+ ),
45
+ React.createElement(
46
+ InputWithIcon,
47
+ inputWrapperProps,
48
+ React.createElement(Input, {
23
49
  disabled: disabled,
24
50
  required: required,
25
51
  ref: ref,
26
- ...rest
27
- }), shouldShowIcon && React.createElement(Icon, {
28
- fill: status,
29
- ...iconProps,
30
- className: cx('iui-end-icon', iconProps?.className)
31
- }, icon)), 'string' == typeof message ? React.createElement(StatusMessage, {
32
- status: status,
33
- iconProps: iconProps,
34
- contentProps: messageContentProps
35
- }, message) : message);
52
+ ...rest,
53
+ }),
54
+ shouldShowIcon &&
55
+ React.createElement(
56
+ Icon,
57
+ {
58
+ fill: status,
59
+ ...iconProps,
60
+ className: cx('iui-end-icon', iconProps?.className),
61
+ },
62
+ icon,
63
+ ),
64
+ ),
65
+ 'string' == typeof message
66
+ ? React.createElement(
67
+ StatusMessage,
68
+ {
69
+ status: status,
70
+ iconProps: iconProps,
71
+ contentProps: messageContentProps,
72
+ },
73
+ message,
74
+ )
75
+ : message,
76
+ );
36
77
  });
37
78
  LabeledInput.displayName = 'LabeledInput';