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

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 (1070) hide show
  1. package/CHANGELOG.md +297 -1
  2. package/README.md +28 -22
  3. package/cjs/core/Alert/Alert.d.ts +57 -28
  4. package/cjs/core/Alert/Alert.js +156 -54
  5. package/cjs/core/Alert/index.js +9 -4
  6. package/cjs/core/Avatar/Avatar.d.ts +6 -10
  7. package/cjs/core/Avatar/Avatar.js +63 -50
  8. package/cjs/core/Avatar/index.d.ts +1 -1
  9. package/cjs/core/Avatar/index.js +10 -6
  10. package/cjs/core/AvatarGroup/AvatarGroup.d.ts +1 -6
  11. package/cjs/core/AvatarGroup/AvatarGroup.js +65 -59
  12. package/cjs/core/AvatarGroup/index.d.ts +1 -1
  13. package/cjs/core/AvatarGroup/index.js +10 -6
  14. package/cjs/core/Backdrop/Backdrop.d.ts +1 -2
  15. package/cjs/core/Backdrop/Backdrop.js +16 -34
  16. package/cjs/core/Backdrop/index.js +9 -4
  17. package/cjs/core/Badge/Badge.d.ts +1 -2
  18. package/cjs/core/Badge/Badge.js +39 -48
  19. package/cjs/core/Badge/index.js +9 -4
  20. package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +16 -25
  21. package/cjs/core/Breadcrumbs/Breadcrumbs.js +149 -64
  22. package/cjs/core/Breadcrumbs/index.js +9 -4
  23. package/cjs/core/ButtonGroup/ButtonGroup.d.ts +1 -2
  24. package/cjs/core/ButtonGroup/ButtonGroup.js +64 -53
  25. package/cjs/core/ButtonGroup/index.js +9 -4
  26. package/cjs/core/Buttons/Button/Button.d.ts +16 -4
  27. package/cjs/core/Buttons/Button/Button.js +57 -37
  28. package/cjs/core/Buttons/Button/index.js +9 -4
  29. package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +2 -3
  30. package/cjs/core/Buttons/DropdownButton/DropdownButton.js +50 -55
  31. package/cjs/core/Buttons/DropdownButton/index.js +9 -4
  32. package/cjs/core/Buttons/IconButton/IconButton.d.ts +6 -4
  33. package/cjs/core/Buttons/IconButton/IconButton.js +50 -42
  34. package/cjs/core/Buttons/IconButton/index.js +9 -4
  35. package/cjs/core/Buttons/IdeasButton/IdeasButton.d.ts +1 -1
  36. package/cjs/core/Buttons/IdeasButton/IdeasButton.js +20 -30
  37. package/cjs/core/Buttons/IdeasButton/index.js +9 -4
  38. package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +13 -5
  39. package/cjs/core/Buttons/SplitButton/SplitButton.js +102 -50
  40. package/cjs/core/Buttons/SplitButton/index.js +9 -4
  41. package/cjs/core/Buttons/index.js +43 -13
  42. package/cjs/core/Carousel/Carousel.d.ts +9 -8
  43. package/cjs/core/Carousel/Carousel.js +109 -110
  44. package/cjs/core/Carousel/CarouselContext.js +4 -26
  45. package/cjs/core/Carousel/CarouselDot.d.ts +1 -1
  46. package/cjs/core/Carousel/CarouselDot.js +23 -37
  47. package/cjs/core/Carousel/CarouselDotsList.d.ts +1 -2
  48. package/cjs/core/Carousel/CarouselDotsList.js +129 -98
  49. package/cjs/core/Carousel/CarouselNavigation.d.ts +8 -6
  50. package/cjs/core/Carousel/CarouselNavigation.js +97 -68
  51. package/cjs/core/Carousel/CarouselSlide.d.ts +1 -1
  52. package/cjs/core/Carousel/CarouselSlide.js +39 -46
  53. package/cjs/core/Carousel/CarouselSlider.js +66 -76
  54. package/cjs/core/Carousel/index.js +9 -4
  55. package/cjs/core/Checkbox/Checkbox.d.ts +9 -6
  56. package/cjs/core/Checkbox/Checkbox.js +88 -61
  57. package/cjs/core/Checkbox/index.js +9 -4
  58. package/cjs/core/ColorPicker/ColorBuilder.d.ts +0 -1
  59. package/cjs/core/ColorPicker/ColorBuilder.js +290 -202
  60. package/cjs/core/ColorPicker/ColorInputPanel.d.ts +1 -2
  61. package/cjs/core/ColorPicker/ColorInputPanel.js +393 -285
  62. package/cjs/core/ColorPicker/ColorPalette.d.ts +1 -2
  63. package/cjs/core/ColorPicker/ColorPalette.js +124 -116
  64. package/cjs/core/ColorPicker/ColorPicker.d.ts +10 -7
  65. package/cjs/core/ColorPicker/ColorPicker.js +85 -86
  66. package/cjs/core/ColorPicker/ColorPickerContext.js +11 -31
  67. package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -2
  68. package/cjs/core/ColorPicker/ColorSwatch.js +30 -40
  69. package/cjs/core/ColorPicker/index.js +43 -13
  70. package/cjs/core/ComboBox/ComboBox.d.ts +13 -9
  71. package/cjs/core/ComboBox/ComboBox.js +403 -302
  72. package/cjs/core/ComboBox/ComboBoxEndIcon.d.ts +1 -1
  73. package/cjs/core/ComboBox/ComboBoxEndIcon.js +27 -43
  74. package/cjs/core/ComboBox/ComboBoxInput.d.ts +2 -2
  75. package/cjs/core/ComboBox/ComboBoxInput.js +208 -151
  76. package/cjs/core/ComboBox/ComboBoxInputContainer.d.ts +1 -1
  77. package/cjs/core/ComboBox/ComboBoxInputContainer.js +35 -34
  78. package/cjs/core/ComboBox/ComboBoxMenu.d.ts +2 -2
  79. package/cjs/core/ComboBox/ComboBoxMenu.js +89 -77
  80. package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +2 -2
  81. package/cjs/core/ComboBox/ComboBoxMenuItem.js +73 -42
  82. package/cjs/core/ComboBox/ComboBoxMultipleContainer.d.ts +1 -1
  83. package/cjs/core/ComboBox/ComboBoxMultipleContainer.js +13 -32
  84. package/cjs/core/ComboBox/helpers.d.ts +7 -5
  85. package/cjs/core/ComboBox/helpers.js +47 -66
  86. package/cjs/core/ComboBox/index.js +9 -4
  87. package/cjs/core/DatePicker/DatePicker.d.ts +41 -11
  88. package/cjs/core/DatePicker/DatePicker.js +567 -358
  89. package/cjs/core/DatePicker/index.js +15 -5
  90. package/cjs/core/Dialog/Dialog.d.ts +1 -2
  91. package/cjs/core/Dialog/Dialog.js +65 -61
  92. package/cjs/core/Dialog/DialogBackdrop.d.ts +1 -1
  93. package/cjs/core/Dialog/DialogBackdrop.js +47 -52
  94. package/cjs/core/Dialog/DialogButtonBar.d.ts +0 -1
  95. package/cjs/core/Dialog/DialogButtonBar.js +3 -4
  96. package/cjs/core/Dialog/DialogContent.d.ts +2 -2
  97. package/cjs/core/Dialog/DialogContent.js +28 -5
  98. package/cjs/core/Dialog/DialogContext.d.ts +15 -1
  99. package/cjs/core/Dialog/DialogContext.js +5 -27
  100. package/cjs/core/Dialog/DialogDragContext.d.ts +1 -1
  101. package/cjs/core/Dialog/DialogDragContext.js +8 -30
  102. package/cjs/core/Dialog/DialogMain.d.ts +1 -2
  103. package/cjs/core/Dialog/DialogMain.js +183 -149
  104. package/cjs/core/Dialog/DialogTitleBar.d.ts +1 -2
  105. package/cjs/core/Dialog/DialogTitleBar.js +67 -46
  106. package/cjs/core/Dialog/DialogTitleBarTitle.d.ts +0 -1
  107. package/cjs/core/Dialog/DialogTitleBarTitle.js +3 -4
  108. package/cjs/core/Dialog/index.js +9 -4
  109. package/cjs/core/DropdownMenu/DropdownMenu.d.ts +8 -7
  110. package/cjs/core/DropdownMenu/DropdownMenu.js +82 -58
  111. package/cjs/core/DropdownMenu/index.js +9 -4
  112. package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +88 -22
  113. package/cjs/core/ExpandableBlock/ExpandableBlock.js +254 -74
  114. package/cjs/core/ExpandableBlock/index.js +9 -4
  115. package/cjs/core/Fieldset/Fieldset.d.ts +1 -2
  116. package/cjs/core/Fieldset/Fieldset.js +25 -40
  117. package/cjs/core/Fieldset/index.js +9 -4
  118. package/cjs/core/FileUpload/FileEmptyCard.js +43 -42
  119. package/cjs/core/FileUpload/FileUpload.d.ts +8 -6
  120. package/cjs/core/FileUpload/FileUpload.js +90 -73
  121. package/cjs/core/FileUpload/FileUploadCard.d.ts +1 -2
  122. package/cjs/core/FileUpload/FileUploadCard.js +168 -110
  123. package/cjs/core/FileUpload/FileUploadTemplate.d.ts +2 -2
  124. package/cjs/core/FileUpload/FileUploadTemplate.js +52 -42
  125. package/cjs/core/FileUpload/index.js +35 -11
  126. package/cjs/core/Footer/Footer.d.ts +4 -5
  127. package/cjs/core/Footer/Footer.js +103 -90
  128. package/cjs/core/Footer/FooterItem.d.ts +0 -1
  129. package/cjs/core/Footer/FooterItem.js +3 -4
  130. package/cjs/core/Footer/FooterList.d.ts +0 -1
  131. package/cjs/core/Footer/FooterList.js +3 -4
  132. package/cjs/core/Footer/FooterSeparator.d.ts +0 -1
  133. package/cjs/core/Footer/FooterSeparator.js +8 -6
  134. package/cjs/core/Footer/index.js +15 -5
  135. package/cjs/core/Header/Header.d.ts +3 -23
  136. package/cjs/core/Header/Header.js +67 -49
  137. package/cjs/core/Header/HeaderBasicButton.js +24 -38
  138. package/cjs/core/Header/HeaderBreadcrumbs.d.ts +1 -2
  139. package/cjs/core/Header/HeaderBreadcrumbs.js +38 -40
  140. package/cjs/core/Header/HeaderButton.d.ts +5 -2
  141. package/cjs/core/Header/HeaderButton.js +76 -44
  142. package/cjs/core/Header/HeaderDropdownButton.js +48 -45
  143. package/cjs/core/Header/HeaderLogo.d.ts +1 -2
  144. package/cjs/core/Header/HeaderLogo.js +42 -37
  145. package/cjs/core/Header/HeaderSplitButton.js +66 -46
  146. package/cjs/core/Header/index.js +35 -11
  147. package/cjs/core/InformationPanel/InformationPanel.d.ts +1 -2
  148. package/cjs/core/InformationPanel/InformationPanel.js +77 -71
  149. package/cjs/core/InformationPanel/InformationPanelBody.d.ts +0 -1
  150. package/cjs/core/InformationPanel/InformationPanelBody.js +6 -5
  151. package/cjs/core/InformationPanel/InformationPanelContent.d.ts +1 -2
  152. package/cjs/core/InformationPanel/InformationPanelContent.js +20 -34
  153. package/cjs/core/InformationPanel/InformationPanelHeader.d.ts +1 -2
  154. package/cjs/core/InformationPanel/InformationPanelHeader.js +34 -40
  155. package/cjs/core/InformationPanel/InformationPanelWrapper.d.ts +0 -1
  156. package/cjs/core/InformationPanel/InformationPanelWrapper.js +6 -5
  157. package/cjs/core/InformationPanel/index.js +43 -13
  158. package/cjs/core/Input/Input.d.ts +10 -7
  159. package/cjs/core/Input/Input.js +18 -41
  160. package/cjs/core/Input/index.js +9 -4
  161. package/cjs/core/InputGrid/InputGrid.d.ts +25 -0
  162. package/cjs/core/InputGrid/InputGrid.js +39 -0
  163. package/cjs/core/InputGrid/index.d.ts +3 -0
  164. package/cjs/core/{ProgressIndicators/ProgressLinear → InputGrid}/index.js +11 -6
  165. package/cjs/core/InputGroup/InputGroup.d.ts +14 -2
  166. package/cjs/core/InputGroup/InputGroup.js +72 -42
  167. package/cjs/core/InputGroup/index.js +9 -4
  168. package/cjs/core/InputWithDecorations/InputWithDecorations.d.ts +39 -0
  169. package/cjs/core/InputWithDecorations/InputWithDecorations.js +81 -0
  170. package/cjs/core/InputWithDecorations/index.d.ts +3 -0
  171. package/cjs/core/InputWithDecorations/index.js +15 -0
  172. package/cjs/core/Label/Label.d.ts +6 -2
  173. package/cjs/core/Label/Label.js +32 -37
  174. package/cjs/core/Label/index.js +9 -4
  175. package/cjs/core/LabeledInput/LabeledInput.d.ts +23 -18
  176. package/cjs/core/LabeledInput/LabeledInput.js +72 -34
  177. package/cjs/core/LabeledInput/index.js +9 -4
  178. package/cjs/core/LabeledSelect/LabeledSelect.d.ts +18 -9
  179. package/cjs/core/LabeledSelect/LabeledSelect.js +75 -45
  180. package/cjs/core/LabeledSelect/index.js +9 -4
  181. package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +16 -8
  182. package/cjs/core/LabeledTextarea/LabeledTextarea.js +17 -35
  183. package/cjs/core/LabeledTextarea/index.js +9 -4
  184. package/cjs/core/List/List.d.ts +0 -1
  185. package/cjs/core/List/List.js +3 -4
  186. package/cjs/core/List/ListItem.d.ts +4 -5
  187. package/cjs/core/List/ListItem.js +55 -61
  188. package/cjs/core/List/index.js +16 -6
  189. package/cjs/core/Menu/Menu.d.ts +2 -3
  190. package/cjs/core/Menu/Menu.js +66 -80
  191. package/cjs/core/Menu/MenuDivider.d.ts +2 -2
  192. package/cjs/core/Menu/MenuDivider.js +5 -6
  193. package/cjs/core/Menu/MenuExtraContent.d.ts +0 -1
  194. package/cjs/core/Menu/MenuExtraContent.js +4 -5
  195. package/cjs/core/Menu/MenuItem.d.ts +2 -3
  196. package/cjs/core/Menu/MenuItem.js +168 -92
  197. package/cjs/core/Menu/MenuItemSkeleton.d.ts +2 -3
  198. package/cjs/core/Menu/MenuItemSkeleton.js +53 -44
  199. package/cjs/core/Menu/index.js +43 -13
  200. package/cjs/core/Modal/Modal.d.ts +9 -11
  201. package/cjs/core/Modal/Modal.js +38 -44
  202. package/cjs/core/Modal/ModalButtonBar.js +7 -4
  203. package/cjs/core/Modal/ModalContent.js +3 -3
  204. package/cjs/core/Modal/index.js +23 -8
  205. package/cjs/core/NonIdealState/ErrorPage.d.ts +6 -7
  206. package/cjs/core/NonIdealState/ErrorPage.js +187 -146
  207. package/cjs/core/NonIdealState/NonIdealState.d.ts +17 -2
  208. package/cjs/core/NonIdealState/NonIdealState.js +77 -38
  209. package/cjs/core/NonIdealState/index.js +16 -6
  210. package/cjs/core/NotificationMarker/NotificationMarker.d.ts +1 -2
  211. package/cjs/core/NotificationMarker/NotificationMarker.js +29 -34
  212. package/cjs/core/NotificationMarker/index.js +9 -4
  213. package/cjs/core/Overlay/Overlay.d.ts +57 -0
  214. package/cjs/core/Overlay/Overlay.js +96 -0
  215. package/cjs/core/Overlay/index.d.ts +1 -0
  216. package/cjs/core/{ProgressIndicators/ProgressRadial → Overlay}/index.js +10 -6
  217. package/{esm/core/ProgressIndicators/ProgressLinear → cjs/core/ProgressIndicators}/ProgressLinear.d.ts +10 -7
  218. package/cjs/core/ProgressIndicators/ProgressLinear.js +72 -0
  219. package/cjs/core/ProgressIndicators/{ProgressRadial/ProgressRadial.d.ts → ProgressRadial.d.ts} +4 -5
  220. package/cjs/core/ProgressIndicators/ProgressRadial.js +74 -0
  221. package/cjs/core/ProgressIndicators/index.d.ts +2 -2
  222. package/cjs/core/ProgressIndicators/index.js +16 -6
  223. package/cjs/core/Radio/Radio.d.ts +7 -5
  224. package/cjs/core/Radio/Radio.js +54 -43
  225. package/cjs/core/Radio/index.js +9 -4
  226. package/cjs/core/RadioTiles/RadioTile.d.ts +15 -5
  227. package/cjs/core/RadioTiles/RadioTile.js +80 -46
  228. package/cjs/core/RadioTiles/RadioTileGroup.d.ts +1 -2
  229. package/cjs/core/RadioTiles/RadioTileGroup.js +16 -32
  230. package/cjs/core/RadioTiles/index.js +16 -6
  231. package/cjs/core/SearchBox/SearchBox.d.ts +3 -4
  232. package/cjs/core/SearchBox/SearchBox.js +220 -129
  233. package/cjs/core/SearchBox/index.js +9 -4
  234. package/cjs/core/Select/Select.d.ts +12 -14
  235. package/cjs/core/Select/Select.js +272 -186
  236. package/cjs/core/Select/SelectTag.d.ts +1 -2
  237. package/cjs/core/Select/SelectTag.js +21 -35
  238. package/cjs/core/Select/SelectTagContainer.d.ts +1 -1
  239. package/cjs/core/Select/SelectTagContainer.js +30 -39
  240. package/cjs/core/Select/index.js +9 -4
  241. package/cjs/core/SideNavigation/SideNavigation.d.ts +17 -2
  242. package/cjs/core/SideNavigation/SideNavigation.js +138 -55
  243. package/cjs/core/SideNavigation/SidenavButton.d.ts +1 -2
  244. package/cjs/core/SideNavigation/SidenavButton.js +30 -34
  245. package/cjs/core/SideNavigation/SidenavSubmenu.d.ts +0 -1
  246. package/cjs/core/SideNavigation/SidenavSubmenu.js +23 -35
  247. package/cjs/core/SideNavigation/SidenavSubmenuHeader.d.ts +1 -2
  248. package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +29 -36
  249. package/cjs/core/SideNavigation/index.js +35 -11
  250. package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +1 -2
  251. package/cjs/core/SkipToContentLink/SkipToContentLink.js +20 -34
  252. package/cjs/core/SkipToContentLink/index.js +9 -4
  253. package/cjs/core/Slider/Slider.d.ts +29 -10
  254. package/cjs/core/Slider/Slider.js +391 -231
  255. package/cjs/core/Slider/Thumb.d.ts +4 -4
  256. package/cjs/core/Slider/Thumb.js +112 -84
  257. package/cjs/core/Slider/Track.d.ts +4 -4
  258. package/cjs/core/Slider/Track.js +83 -75
  259. package/cjs/core/Slider/index.js +9 -4
  260. package/cjs/core/StatusMessage/StatusMessage.d.ts +13 -3
  261. package/cjs/core/StatusMessage/StatusMessage.js +36 -35
  262. package/cjs/core/StatusMessage/index.js +9 -4
  263. package/cjs/core/Stepper/Stepper.d.ts +29 -5
  264. package/cjs/core/Stepper/Stepper.js +80 -37
  265. package/cjs/core/Stepper/StepperStep.d.ts +18 -1
  266. package/cjs/core/Stepper/StepperStep.js +109 -63
  267. package/cjs/core/Stepper/WorkflowDiagram.d.ts +11 -2
  268. package/cjs/core/Stepper/WorkflowDiagram.js +39 -35
  269. package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +8 -3
  270. package/cjs/core/Stepper/WorkflowDiagramStep.js +39 -36
  271. package/cjs/core/Stepper/index.d.ts +0 -4
  272. package/cjs/core/Stepper/index.js +17 -10
  273. package/cjs/core/Surface/Surface.d.ts +2 -3
  274. package/cjs/core/Surface/Surface.js +78 -71
  275. package/cjs/core/Surface/index.js +9 -4
  276. package/cjs/core/Table/SubRowExpander.d.ts +2 -2
  277. package/cjs/core/Table/SubRowExpander.js +37 -37
  278. package/cjs/core/Table/Table.d.ts +18 -3
  279. package/cjs/core/Table/Table.js +764 -454
  280. package/cjs/core/Table/TableCell.d.ts +2 -2
  281. package/cjs/core/Table/TableCell.js +113 -87
  282. package/cjs/core/Table/TablePaginator.d.ts +3 -4
  283. package/cjs/core/Table/TablePaginator.js +310 -161
  284. package/cjs/core/Table/TableRowMemoized.d.ts +4 -4
  285. package/cjs/core/Table/TableRowMemoized.js +156 -115
  286. package/cjs/core/Table/actionHandlers/expandHandler.js +12 -12
  287. package/cjs/core/Table/actionHandlers/filterHandler.js +25 -18
  288. package/cjs/core/Table/actionHandlers/index.js +56 -14
  289. package/cjs/core/Table/actionHandlers/resizeHandler.js +13 -13
  290. package/cjs/core/Table/actionHandlers/selectHandler.js +123 -96
  291. package/cjs/core/Table/cells/DefaultCell.d.ts +2 -2
  292. package/cjs/core/Table/cells/DefaultCell.js +48 -37
  293. package/cjs/core/Table/cells/EditableCell.d.ts +2 -2
  294. package/cjs/core/Table/cells/EditableCell.js +75 -74
  295. package/cjs/core/Table/cells/index.js +16 -6
  296. package/cjs/core/Table/columns/actionColumn.d.ts +3 -3
  297. package/cjs/core/Table/columns/actionColumn.js +97 -99
  298. package/cjs/core/Table/columns/expanderColumn.d.ts +2 -2
  299. package/cjs/core/Table/columns/expanderColumn.js +45 -54
  300. package/cjs/core/Table/columns/index.js +41 -11
  301. package/cjs/core/Table/columns/selectionColumn.d.ts +4 -4
  302. package/cjs/core/Table/columns/selectionColumn.js +57 -51
  303. package/cjs/core/Table/filters/BaseFilter.d.ts +2 -3
  304. package/cjs/core/Table/filters/BaseFilter.js +24 -39
  305. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +9 -3
  306. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +118 -75
  307. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +6 -5
  308. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +120 -81
  309. package/cjs/core/Table/filters/FilterButtonBar.d.ts +3 -4
  310. package/cjs/core/Table/filters/FilterButtonBar.js +39 -42
  311. package/cjs/core/Table/filters/FilterToggle.d.ts +3 -4
  312. package/cjs/core/Table/filters/FilterToggle.js +61 -52
  313. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +4 -5
  314. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +58 -54
  315. package/cjs/core/Table/filters/TextFilter/TextFilter.d.ts +3 -4
  316. package/cjs/core/Table/filters/TextFilter/TextFilter.js +40 -46
  317. package/cjs/core/Table/filters/customFilterFunctions.js +16 -14
  318. package/cjs/core/Table/filters/defaultFilterFunctions.js +86 -81
  319. package/cjs/core/Table/filters/index.js +35 -11
  320. package/cjs/core/Table/filters/tableFilters.d.ts +5 -5
  321. package/cjs/core/Table/filters/tableFilters.js +44 -54
  322. package/cjs/core/Table/filters/types.d.ts +2 -19
  323. package/cjs/core/Table/filters/types.js +2 -2
  324. package/cjs/core/Table/hooks/index.js +67 -19
  325. package/cjs/core/Table/hooks/useColumnDragAndDrop.js +101 -84
  326. package/cjs/core/Table/hooks/useExpanderCell.d.ts +1 -1
  327. package/cjs/core/Table/hooks/useExpanderCell.js +33 -47
  328. package/cjs/core/Table/hooks/useResizeColumns.js +362 -296
  329. package/cjs/core/Table/hooks/useScrollToRow.d.ts +2 -2
  330. package/cjs/core/Table/hooks/useScrollToRow.js +46 -61
  331. package/cjs/core/Table/hooks/useSelectionCell.js +17 -10
  332. package/cjs/core/Table/hooks/useStickyColumns.js +64 -64
  333. package/cjs/core/Table/hooks/useSubRowFiltering.js +95 -112
  334. package/cjs/core/Table/hooks/useSubRowSelection.js +32 -53
  335. package/cjs/core/Table/index.d.ts +1 -1
  336. package/cjs/core/Table/index.js +78 -18
  337. package/cjs/core/Table/utils.js +42 -40
  338. package/cjs/core/Tabs/Tab.d.ts +2 -3
  339. package/cjs/core/Tabs/Tab.js +50 -39
  340. package/cjs/core/Tabs/Tabs.d.ts +6 -43
  341. package/cjs/core/Tabs/Tabs.js +409 -368
  342. package/cjs/core/Tabs/index.d.ts +1 -1
  343. package/cjs/core/Tabs/index.js +17 -9
  344. package/cjs/core/Tag/Tag.d.ts +1 -2
  345. package/cjs/core/Tag/Tag.js +42 -41
  346. package/cjs/core/Tag/TagContainer.d.ts +1 -2
  347. package/cjs/core/Tag/TagContainer.js +23 -37
  348. package/cjs/core/Tag/index.js +16 -6
  349. package/cjs/core/Textarea/Textarea.d.ts +4 -6
  350. package/cjs/core/Textarea/Textarea.js +13 -43
  351. package/cjs/core/Textarea/index.js +9 -4
  352. package/cjs/core/ThemeProvider/ThemeContext.d.ts +1 -1
  353. package/cjs/core/ThemeProvider/ThemeContext.js +4 -26
  354. package/cjs/core/ThemeProvider/ThemeProvider.d.ts +29 -12
  355. package/cjs/core/ThemeProvider/ThemeProvider.js +114 -59
  356. package/cjs/core/ThemeProvider/index.js +9 -4
  357. package/cjs/core/Tile/Tile.d.ts +200 -18
  358. package/cjs/core/Tile/Tile.js +495 -135
  359. package/cjs/core/Tile/index.js +9 -4
  360. package/cjs/core/TimePicker/TimePicker.d.ts +3 -4
  361. package/cjs/core/TimePicker/TimePicker.js +458 -260
  362. package/cjs/core/TimePicker/index.js +9 -4
  363. package/cjs/core/Toast/Toast.d.ts +20 -18
  364. package/cjs/core/Toast/Toast.js +206 -135
  365. package/cjs/core/Toast/Toaster.d.ts +26 -28
  366. package/cjs/core/Toast/Toaster.js +126 -153
  367. package/cjs/core/Toast/index.d.ts +1 -4
  368. package/cjs/core/Toast/index.js +10 -8
  369. package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +1 -7
  370. package/cjs/core/ToggleSwitch/ToggleSwitch.js +66 -55
  371. package/cjs/core/ToggleSwitch/index.js +9 -4
  372. package/cjs/core/Tooltip/Tooltip.d.ts +81 -15
  373. package/cjs/core/Tooltip/Tooltip.js +153 -42
  374. package/cjs/core/Tooltip/index.js +9 -4
  375. package/cjs/core/TransferList/TransferList.d.ts +69 -0
  376. package/cjs/core/TransferList/TransferList.js +220 -0
  377. package/cjs/core/TransferList/index.d.ts +3 -0
  378. package/cjs/core/TransferList/index.js +15 -0
  379. package/cjs/core/Tree/Tree.d.ts +5 -6
  380. package/cjs/core/Tree/Tree.js +205 -162
  381. package/cjs/core/Tree/TreeContext.d.ts +1 -1
  382. package/cjs/core/Tree/TreeContext.js +9 -31
  383. package/cjs/core/Tree/TreeNode.d.ts +2 -3
  384. package/cjs/core/Tree/TreeNode.js +207 -131
  385. package/cjs/core/Tree/TreeNodeExpander.d.ts +1 -2
  386. package/cjs/core/Tree/TreeNodeExpander.js +26 -38
  387. package/cjs/core/Tree/index.js +23 -8
  388. package/cjs/core/Typography/Anchor/Anchor.d.ts +0 -1
  389. package/cjs/core/Typography/Anchor/Anchor.js +3 -4
  390. package/cjs/core/Typography/Anchor/index.js +9 -4
  391. package/cjs/core/Typography/Blockquote/Blockquote.d.ts +1 -2
  392. package/cjs/core/Typography/Blockquote/Blockquote.js +18 -36
  393. package/cjs/core/Typography/Blockquote/index.js +9 -4
  394. package/cjs/core/Typography/Code/Code.d.ts +0 -1
  395. package/cjs/core/Typography/Code/Code.js +3 -4
  396. package/cjs/core/Typography/Code/index.js +9 -4
  397. package/cjs/core/Typography/Kbd/Kbd.d.ts +1 -2
  398. package/cjs/core/Typography/Kbd/Kbd.js +30 -47
  399. package/cjs/core/Typography/Kbd/index.js +15 -5
  400. package/cjs/core/Typography/Text/Text.d.ts +1 -2
  401. package/cjs/core/Typography/Text/Text.js +26 -39
  402. package/cjs/core/Typography/Text/index.js +9 -4
  403. package/cjs/core/Typography/index.js +50 -14
  404. package/cjs/core/index.d.ts +11 -8
  405. package/cjs/core/index.js +912 -185
  406. package/cjs/core/utils/color/ColorValue.d.ts +4 -4
  407. package/cjs/core/utils/color/ColorValue.js +535 -459
  408. package/cjs/core/utils/color/index.js +4 -17
  409. package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.d.ts +2 -2
  410. package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.js +20 -36
  411. package/cjs/core/utils/components/Box.js +3 -3
  412. package/cjs/core/utils/components/ButtonBase.d.ts +14 -0
  413. package/cjs/core/utils/components/ButtonBase.js +46 -0
  414. package/cjs/core/utils/components/Divider.d.ts +1 -2
  415. package/cjs/core/utils/components/Divider.js +14 -34
  416. package/cjs/core/utils/components/Flex.d.ts +4 -5
  417. package/cjs/core/utils/components/Flex.js +93 -103
  418. package/cjs/core/utils/components/FocusTrap.d.ts +3 -3
  419. package/cjs/core/utils/components/FocusTrap.js +47 -60
  420. package/cjs/core/utils/components/Icon.d.ts +6 -2
  421. package/cjs/core/utils/components/Icon.js +32 -44
  422. package/cjs/core/utils/components/InputContainer.d.ts +4 -6
  423. package/cjs/core/utils/components/InputContainer.js +62 -50
  424. package/cjs/core/utils/components/InputFlexContainer.d.ts +2 -2
  425. package/cjs/core/utils/components/InputFlexContainer.js +24 -11
  426. package/cjs/core/utils/components/LinkAction.d.ts +0 -1
  427. package/cjs/core/utils/components/LinkAction.js +3 -4
  428. package/cjs/core/utils/components/MiddleTextTruncation.d.ts +2 -2
  429. package/cjs/core/utils/components/MiddleTextTruncation.js +32 -45
  430. package/cjs/core/utils/components/Popover.d.ts +113 -28
  431. package/cjs/core/utils/components/Popover.js +160 -148
  432. package/cjs/core/utils/components/Portal.d.ts +27 -0
  433. package/cjs/core/utils/components/Portal.js +43 -0
  434. package/cjs/core/utils/components/Resizer.d.ts +2 -2
  435. package/cjs/core/utils/components/Resizer.js +254 -210
  436. package/cjs/core/utils/components/VirtualScroll.d.ts +2 -2
  437. package/cjs/core/utils/components/VirtualScroll.js +303 -251
  438. package/cjs/core/utils/components/VisuallyHidden.d.ts +1 -2
  439. package/cjs/core/utils/components/VisuallyHidden.js +14 -34
  440. package/cjs/core/utils/components/WithCSSTransition.d.ts +2 -2
  441. package/cjs/core/utils/components/WithCSSTransition.js +43 -48
  442. package/cjs/core/utils/components/index.d.ts +2 -0
  443. package/cjs/core/utils/components/index.js +20 -31
  444. package/cjs/core/utils/functions/colors.d.ts +1 -1
  445. package/cjs/core/utils/functions/colors.js +26 -35
  446. package/cjs/core/utils/functions/date.js +10 -10
  447. package/cjs/core/utils/functions/dev.d.ts +11 -0
  448. package/cjs/core/utils/functions/dev.js +34 -0
  449. package/cjs/core/utils/functions/dom.d.ts +6 -8
  450. package/cjs/core/utils/functions/dom.js +32 -30
  451. package/cjs/core/utils/functions/focusable.js +26 -17
  452. package/cjs/core/utils/functions/import.d.ts +6 -0
  453. package/cjs/core/utils/functions/import.js +61 -0
  454. package/cjs/core/utils/functions/index.d.ts +3 -1
  455. package/cjs/core/utils/functions/index.js +13 -24
  456. package/cjs/core/utils/functions/numbers.js +9 -9
  457. package/cjs/core/utils/functions/polymorphic.d.ts +5 -3
  458. package/cjs/core/utils/functions/polymorphic.js +46 -50
  459. package/cjs/core/utils/functions/react.d.ts +8 -0
  460. package/cjs/core/utils/functions/react.js +40 -0
  461. package/cjs/core/utils/functions/supports.js +5 -4
  462. package/cjs/core/utils/hooks/index.d.ts +1 -1
  463. package/cjs/core/utils/hooks/index.js +17 -30
  464. package/cjs/core/utils/hooks/useContainerWidth.js +26 -41
  465. package/cjs/core/utils/hooks/useControlledState.d.ts +13 -0
  466. package/cjs/core/utils/hooks/useControlledState.js +39 -0
  467. package/cjs/core/utils/hooks/useDragAndDrop.js +110 -111
  468. package/cjs/core/utils/hooks/useEventListener.js +22 -44
  469. package/cjs/core/utils/hooks/useGlobals.d.ts +9 -4
  470. package/cjs/core/utils/hooks/useGlobals.js +35 -56
  471. package/cjs/core/utils/hooks/useId.js +9 -31
  472. package/cjs/core/utils/hooks/useIntersection.js +30 -47
  473. package/cjs/core/utils/hooks/useIsClient.js +9 -31
  474. package/cjs/core/utils/hooks/useIsomorphicLayoutEffect.js +6 -27
  475. package/cjs/core/utils/hooks/useLatestRef.js +9 -31
  476. package/cjs/core/utils/hooks/useMediaQuery.js +31 -55
  477. package/cjs/core/utils/hooks/useMergedRefs.js +15 -38
  478. package/cjs/core/utils/hooks/useOverflow.js +69 -79
  479. package/cjs/core/utils/hooks/useResizeObserver.js +22 -40
  480. package/cjs/core/utils/hooks/useSafeContext.js +9 -31
  481. package/cjs/core/utils/icons/StatusIconMap.d.ts +5 -5
  482. package/cjs/core/utils/icons/StatusIconMap.js +28 -34
  483. package/cjs/core/utils/icons/Svg.js +3 -3
  484. package/cjs/core/utils/icons/SvgCalendar.d.ts +1 -1
  485. package/cjs/core/utils/icons/SvgCalendar.js +12 -29
  486. package/cjs/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
  487. package/cjs/core/utils/icons/SvgCaretDownSmall.js +12 -29
  488. package/cjs/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
  489. package/cjs/core/utils/icons/SvgCaretRightSmall.js +12 -29
  490. package/cjs/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
  491. package/cjs/core/utils/icons/SvgCaretUpSmall.js +12 -29
  492. package/cjs/core/utils/icons/SvgCheckmark.d.ts +1 -1
  493. package/cjs/core/utils/icons/SvgCheckmark.js +10 -29
  494. package/cjs/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
  495. package/cjs/core/utils/icons/SvgCheckmarkSmall.js +12 -29
  496. package/cjs/core/utils/icons/SvgChevronLeft.d.ts +1 -1
  497. package/cjs/core/utils/icons/SvgChevronLeft.js +12 -29
  498. package/cjs/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
  499. package/cjs/core/utils/icons/SvgChevronLeftDouble.js +12 -29
  500. package/cjs/core/utils/icons/SvgChevronRight.d.ts +1 -1
  501. package/cjs/core/utils/icons/SvgChevronRight.js +12 -29
  502. package/cjs/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
  503. package/cjs/core/utils/icons/SvgChevronRightDouble.js +12 -29
  504. package/cjs/core/utils/icons/SvgClose.d.ts +1 -1
  505. package/cjs/core/utils/icons/SvgClose.js +12 -29
  506. package/cjs/core/utils/icons/SvgCloseSmall.d.ts +1 -1
  507. package/cjs/core/utils/icons/SvgCloseSmall.js +12 -29
  508. package/cjs/core/utils/icons/SvgColumnManager.d.ts +1 -1
  509. package/cjs/core/utils/icons/SvgColumnManager.js +12 -29
  510. package/cjs/core/utils/icons/SvgDocument.d.ts +1 -1
  511. package/cjs/core/utils/icons/SvgDocument.js +10 -29
  512. package/cjs/core/utils/icons/SvgFilter.d.ts +1 -1
  513. package/cjs/core/utils/icons/SvgFilter.js +10 -29
  514. package/cjs/core/utils/icons/SvgFilterHollow.d.ts +1 -1
  515. package/cjs/core/utils/icons/SvgFilterHollow.js +12 -29
  516. package/cjs/core/utils/icons/SvgImportantSmall.d.ts +1 -1
  517. package/cjs/core/utils/icons/SvgImportantSmall.js +12 -29
  518. package/cjs/core/utils/icons/SvgInfoCircular.d.ts +1 -1
  519. package/cjs/core/utils/icons/SvgInfoCircular.js +12 -29
  520. package/cjs/core/utils/icons/SvgMore.d.ts +1 -1
  521. package/cjs/core/utils/icons/SvgMore.js +12 -29
  522. package/cjs/core/utils/icons/SvgMoreVertical.d.ts +1 -1
  523. package/cjs/core/utils/icons/SvgMoreVertical.js +12 -29
  524. package/cjs/core/utils/icons/SvgNew.d.ts +1 -1
  525. package/cjs/core/utils/icons/SvgNew.js +12 -29
  526. package/cjs/core/utils/icons/SvgSearch.d.ts +1 -1
  527. package/cjs/core/utils/icons/SvgSearch.js +12 -29
  528. package/cjs/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
  529. package/cjs/core/utils/icons/SvgSmileyHappy.js +12 -29
  530. package/cjs/core/utils/icons/SvgSortDown.d.ts +1 -1
  531. package/cjs/core/utils/icons/SvgSortDown.js +12 -29
  532. package/cjs/core/utils/icons/SvgSortUp.d.ts +1 -1
  533. package/cjs/core/utils/icons/SvgSortUp.js +12 -29
  534. package/cjs/core/utils/icons/SvgStatusError.d.ts +1 -1
  535. package/cjs/core/utils/icons/SvgStatusError.js +12 -29
  536. package/cjs/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
  537. package/cjs/core/utils/icons/SvgStatusSuccess.js +12 -29
  538. package/cjs/core/utils/icons/SvgStatusWarning.d.ts +1 -1
  539. package/cjs/core/utils/icons/SvgStatusWarning.js +12 -29
  540. package/cjs/core/utils/icons/SvgSwap.d.ts +1 -1
  541. package/cjs/core/utils/icons/SvgSwap.js +12 -29
  542. package/cjs/core/utils/icons/SvgUpload.d.ts +1 -1
  543. package/cjs/core/utils/icons/SvgUpload.js +12 -29
  544. package/cjs/core/utils/icons/index.js +34 -47
  545. package/cjs/core/utils/index.js +10 -23
  546. package/cjs/core/utils/props.d.ts +2 -2
  547. package/cjs/core/utils/props.js +2 -2
  548. package/cjs/core/utils/types.d.ts +1 -1
  549. package/cjs/core/utils/types.js +2 -2
  550. package/cjs/index.d.ts +0 -1
  551. package/cjs/index.js +4 -18
  552. package/cjs/package.json +1 -0
  553. package/cjs/react-table/react-table.d.ts +745 -0
  554. package/cjs/react-table/react-table.js +10 -0
  555. package/cjs/styles.d.ts +5 -0
  556. package/cjs/styles.js +429 -0
  557. package/esm/core/Alert/Alert.d.ts +57 -28
  558. package/esm/core/Alert/Alert.js +159 -24
  559. package/esm/core/Avatar/Avatar.d.ts +6 -10
  560. package/esm/core/Avatar/Avatar.js +53 -19
  561. package/esm/core/Avatar/index.d.ts +1 -1
  562. package/esm/core/Avatar/index.js +1 -1
  563. package/esm/core/AvatarGroup/AvatarGroup.d.ts +1 -6
  564. package/esm/core/AvatarGroup/AvatarGroup.js +58 -27
  565. package/esm/core/AvatarGroup/index.d.ts +1 -1
  566. package/esm/core/AvatarGroup/index.js +1 -1
  567. package/esm/core/Backdrop/Backdrop.d.ts +1 -2
  568. package/esm/core/Backdrop/Backdrop.js +10 -3
  569. package/esm/core/Badge/Badge.d.ts +1 -2
  570. package/esm/core/Badge/Badge.js +31 -17
  571. package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +16 -25
  572. package/esm/core/Breadcrumbs/Breadcrumbs.js +147 -34
  573. package/esm/core/ButtonGroup/ButtonGroup.d.ts +1 -2
  574. package/esm/core/ButtonGroup/ButtonGroup.js +58 -22
  575. package/esm/core/Buttons/Button/Button.d.ts +16 -4
  576. package/esm/core/Buttons/Button/Button.js +46 -7
  577. package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +2 -3
  578. package/esm/core/Buttons/DropdownButton/DropdownButton.js +39 -23
  579. package/esm/core/Buttons/IconButton/IconButton.d.ts +6 -4
  580. package/esm/core/Buttons/IconButton/IconButton.js +42 -12
  581. package/esm/core/Buttons/IdeasButton/IdeasButton.d.ts +1 -1
  582. package/esm/core/Buttons/IdeasButton/IdeasButton.js +12 -2
  583. package/esm/core/Buttons/SplitButton/SplitButton.d.ts +13 -5
  584. package/esm/core/Buttons/SplitButton/SplitButton.js +103 -18
  585. package/esm/core/Carousel/Carousel.d.ts +9 -8
  586. package/esm/core/Carousel/Carousel.js +103 -74
  587. package/esm/core/Carousel/CarouselDot.d.ts +1 -1
  588. package/esm/core/Carousel/CarouselDot.js +18 -7
  589. package/esm/core/Carousel/CarouselDotsList.d.ts +1 -2
  590. package/esm/core/Carousel/CarouselDotsList.js +123 -66
  591. package/esm/core/Carousel/CarouselNavigation.d.ts +8 -6
  592. package/esm/core/Carousel/CarouselNavigation.js +85 -34
  593. package/esm/core/Carousel/CarouselSlide.d.ts +1 -1
  594. package/esm/core/Carousel/CarouselSlide.js +29 -14
  595. package/esm/core/Carousel/CarouselSlider.js +65 -45
  596. package/esm/core/Checkbox/Checkbox.d.ts +9 -6
  597. package/esm/core/Checkbox/Checkbox.js +78 -29
  598. package/esm/core/ColorPicker/ColorBuilder.d.ts +0 -1
  599. package/esm/core/ColorPicker/ColorBuilder.js +278 -170
  600. package/esm/core/ColorPicker/ColorInputPanel.d.ts +1 -2
  601. package/esm/core/ColorPicker/ColorInputPanel.js +378 -252
  602. package/esm/core/ColorPicker/ColorPalette.d.ts +1 -2
  603. package/esm/core/ColorPicker/ColorPalette.js +115 -83
  604. package/esm/core/ColorPicker/ColorPicker.d.ts +10 -7
  605. package/esm/core/ColorPicker/ColorPicker.js +78 -55
  606. package/esm/core/ColorPicker/ColorPickerContext.js +7 -5
  607. package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -2
  608. package/esm/core/ColorPicker/ColorSwatch.js +19 -8
  609. package/esm/core/ComboBox/ComboBox.d.ts +13 -9
  610. package/esm/core/ComboBox/ComboBox.js +397 -265
  611. package/esm/core/ComboBox/ComboBoxEndIcon.d.ts +1 -1
  612. package/esm/core/ComboBox/ComboBoxEndIcon.js +19 -13
  613. package/esm/core/ComboBox/ComboBoxInput.d.ts +2 -2
  614. package/esm/core/ComboBox/ComboBoxInput.js +198 -123
  615. package/esm/core/ComboBox/ComboBoxInputContainer.d.ts +1 -1
  616. package/esm/core/ComboBox/ComboBoxInputContainer.js +20 -5
  617. package/esm/core/ComboBox/ComboBoxMenu.d.ts +2 -2
  618. package/esm/core/ComboBox/ComboBoxMenu.js +79 -46
  619. package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +2 -2
  620. package/esm/core/ComboBox/ComboBoxMenuItem.js +62 -14
  621. package/esm/core/ComboBox/ComboBoxMultipleContainer.d.ts +1 -1
  622. package/esm/core/ComboBox/ComboBoxMultipleContainer.js +6 -2
  623. package/esm/core/ComboBox/helpers.d.ts +7 -5
  624. package/esm/core/ComboBox/helpers.js +38 -39
  625. package/esm/core/DatePicker/DatePicker.d.ts +41 -11
  626. package/esm/core/DatePicker/DatePicker.js +553 -326
  627. package/esm/core/Dialog/Dialog.d.ts +1 -2
  628. package/esm/core/Dialog/Dialog.js +54 -25
  629. package/esm/core/Dialog/DialogBackdrop.d.ts +1 -1
  630. package/esm/core/Dialog/DialogBackdrop.js +39 -19
  631. package/esm/core/Dialog/DialogButtonBar.d.ts +0 -1
  632. package/esm/core/Dialog/DialogButtonBar.js +0 -1
  633. package/esm/core/Dialog/DialogContent.d.ts +2 -2
  634. package/esm/core/Dialog/DialogContent.js +25 -3
  635. package/esm/core/Dialog/DialogContext.d.ts +15 -1
  636. package/esm/core/Dialog/DialogContext.js +1 -1
  637. package/esm/core/Dialog/DialogDragContext.d.ts +1 -1
  638. package/esm/core/Dialog/DialogDragContext.js +4 -4
  639. package/esm/core/Dialog/DialogMain.d.ts +1 -2
  640. package/esm/core/Dialog/DialogMain.js +177 -115
  641. package/esm/core/Dialog/DialogTitleBar.d.ts +1 -2
  642. package/esm/core/Dialog/DialogTitleBar.js +45 -11
  643. package/esm/core/Dialog/DialogTitleBarTitle.d.ts +0 -1
  644. package/esm/core/Dialog/DialogTitleBarTitle.js +0 -1
  645. package/esm/core/DropdownMenu/DropdownMenu.d.ts +8 -7
  646. package/esm/core/DropdownMenu/DropdownMenu.js +80 -30
  647. package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +88 -22
  648. package/esm/core/ExpandableBlock/ExpandableBlock.js +246 -44
  649. package/esm/core/Fieldset/Fieldset.d.ts +1 -2
  650. package/esm/core/Fieldset/Fieldset.js +19 -9
  651. package/esm/core/FileUpload/FileEmptyCard.js +19 -8
  652. package/esm/core/FileUpload/FileUpload.d.ts +8 -6
  653. package/esm/core/FileUpload/FileUpload.js +74 -42
  654. package/esm/core/FileUpload/FileUploadCard.d.ts +1 -2
  655. package/esm/core/FileUpload/FileUploadCard.js +154 -78
  656. package/esm/core/FileUpload/FileUploadTemplate.d.ts +2 -2
  657. package/esm/core/FileUpload/FileUploadTemplate.js +38 -10
  658. package/esm/core/Footer/Footer.d.ts +4 -5
  659. package/esm/core/Footer/Footer.js +86 -56
  660. package/esm/core/Footer/FooterItem.d.ts +0 -1
  661. package/esm/core/Footer/FooterItem.js +0 -1
  662. package/esm/core/Footer/FooterList.d.ts +0 -1
  663. package/esm/core/Footer/FooterList.js +0 -1
  664. package/esm/core/Footer/FooterSeparator.d.ts +0 -1
  665. package/esm/core/Footer/FooterSeparator.js +1 -2
  666. package/esm/core/Header/Header.d.ts +3 -23
  667. package/esm/core/Header/Header.js +55 -16
  668. package/esm/core/Header/HeaderBasicButton.js +16 -8
  669. package/esm/core/Header/HeaderBreadcrumbs.d.ts +1 -2
  670. package/esm/core/Header/HeaderBreadcrumbs.js +32 -9
  671. package/esm/core/Header/HeaderButton.d.ts +5 -2
  672. package/esm/core/Header/HeaderButton.js +62 -14
  673. package/esm/core/Header/HeaderDropdownButton.js +42 -13
  674. package/esm/core/Header/HeaderLogo.d.ts +1 -2
  675. package/esm/core/Header/HeaderLogo.js +36 -6
  676. package/esm/core/Header/HeaderSplitButton.js +61 -14
  677. package/esm/core/InformationPanel/InformationPanel.d.ts +1 -2
  678. package/esm/core/InformationPanel/InformationPanel.js +71 -40
  679. package/esm/core/InformationPanel/InformationPanelBody.d.ts +0 -1
  680. package/esm/core/InformationPanel/InformationPanelBody.js +0 -1
  681. package/esm/core/InformationPanel/InformationPanelContent.d.ts +1 -2
  682. package/esm/core/InformationPanel/InformationPanelContent.js +17 -4
  683. package/esm/core/InformationPanel/InformationPanelHeader.d.ts +1 -2
  684. package/esm/core/InformationPanel/InformationPanelHeader.js +32 -9
  685. package/esm/core/InformationPanel/InformationPanelWrapper.d.ts +0 -1
  686. package/esm/core/InformationPanel/InformationPanelWrapper.js +3 -2
  687. package/esm/core/Input/Input.d.ts +10 -7
  688. package/esm/core/Input/Input.js +12 -10
  689. package/esm/core/InputGrid/InputGrid.d.ts +25 -0
  690. package/esm/core/InputGrid/InputGrid.js +35 -0
  691. package/esm/core/InputGrid/index.d.ts +3 -0
  692. package/esm/core/{ProgressIndicators/ProgressLinear → InputGrid}/index.js +2 -2
  693. package/esm/core/InputGroup/InputGroup.d.ts +14 -2
  694. package/esm/core/InputGroup/InputGroup.js +62 -16
  695. package/esm/core/InputWithDecorations/InputWithDecorations.d.ts +39 -0
  696. package/esm/core/InputWithDecorations/InputWithDecorations.js +80 -0
  697. package/esm/core/InputWithDecorations/index.d.ts +3 -0
  698. package/esm/core/InputWithDecorations/index.js +6 -0
  699. package/esm/core/Label/Label.d.ts +6 -2
  700. package/esm/core/Label/Label.js +26 -6
  701. package/esm/core/LabeledInput/LabeledInput.d.ts +23 -18
  702. package/esm/core/LabeledInput/LabeledInput.js +68 -7
  703. package/esm/core/LabeledSelect/LabeledSelect.d.ts +18 -9
  704. package/esm/core/LabeledSelect/LabeledSelect.js +70 -18
  705. package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +16 -8
  706. package/esm/core/LabeledTextarea/LabeledTextarea.js +15 -9
  707. package/esm/core/List/List.d.ts +0 -1
  708. package/esm/core/List/List.js +0 -1
  709. package/esm/core/List/ListItem.d.ts +4 -5
  710. package/esm/core/List/ListItem.js +46 -29
  711. package/esm/core/Menu/Menu.d.ts +2 -3
  712. package/esm/core/Menu/Menu.js +64 -50
  713. package/esm/core/Menu/MenuDivider.d.ts +2 -2
  714. package/esm/core/Menu/MenuDivider.js +2 -3
  715. package/esm/core/Menu/MenuExtraContent.d.ts +0 -1
  716. package/esm/core/Menu/MenuExtraContent.js +1 -2
  717. package/esm/core/Menu/MenuItem.d.ts +2 -3
  718. package/esm/core/Menu/MenuItem.js +167 -64
  719. package/esm/core/Menu/MenuItemSkeleton.d.ts +2 -3
  720. package/esm/core/Menu/MenuItemSkeleton.js +43 -13
  721. package/esm/core/Modal/Modal.d.ts +9 -11
  722. package/esm/core/Modal/Modal.js +33 -14
  723. package/esm/core/NonIdealState/ErrorPage.d.ts +6 -7
  724. package/esm/core/NonIdealState/ErrorPage.js +177 -117
  725. package/esm/core/NonIdealState/NonIdealState.d.ts +17 -2
  726. package/esm/core/NonIdealState/NonIdealState.js +65 -7
  727. package/esm/core/NotificationMarker/NotificationMarker.d.ts +1 -2
  728. package/esm/core/NotificationMarker/NotificationMarker.js +20 -3
  729. package/esm/core/Overlay/Overlay.d.ts +57 -0
  730. package/esm/core/Overlay/Overlay.js +88 -0
  731. package/esm/core/Overlay/index.d.ts +1 -0
  732. package/esm/core/{ProgressIndicators/ProgressRadial → Overlay}/index.js +1 -2
  733. package/{cjs/core/ProgressIndicators/ProgressLinear → esm/core/ProgressIndicators}/ProgressLinear.d.ts +10 -7
  734. package/esm/core/ProgressIndicators/ProgressLinear.js +65 -0
  735. package/esm/core/ProgressIndicators/{ProgressRadial/ProgressRadial.d.ts → ProgressRadial.d.ts} +4 -5
  736. package/esm/core/ProgressIndicators/ProgressRadial.js +64 -0
  737. package/esm/core/ProgressIndicators/index.d.ts +2 -2
  738. package/esm/core/ProgressIndicators/index.js +2 -2
  739. package/esm/core/Radio/Radio.d.ts +7 -5
  740. package/esm/core/Radio/Radio.js +45 -12
  741. package/esm/core/RadioTiles/RadioTile.d.ts +15 -5
  742. package/esm/core/RadioTiles/RadioTile.js +62 -15
  743. package/esm/core/RadioTiles/RadioTileGroup.d.ts +1 -2
  744. package/esm/core/RadioTiles/RadioTileGroup.js +10 -4
  745. package/esm/core/SearchBox/SearchBox.d.ts +3 -4
  746. package/esm/core/SearchBox/SearchBox.js +215 -98
  747. package/esm/core/Select/Select.d.ts +12 -14
  748. package/esm/core/Select/Select.js +267 -153
  749. package/esm/core/Select/SelectTag.d.ts +1 -2
  750. package/esm/core/Select/SelectTag.js +15 -4
  751. package/esm/core/Select/SelectTagContainer.d.ts +1 -1
  752. package/esm/core/Select/SelectTagContainer.js +20 -7
  753. package/esm/core/SideNavigation/SideNavigation.d.ts +17 -2
  754. package/esm/core/SideNavigation/SideNavigation.js +118 -22
  755. package/esm/core/SideNavigation/SidenavButton.d.ts +1 -2
  756. package/esm/core/SideNavigation/SidenavButton.js +24 -3
  757. package/esm/core/SideNavigation/SidenavSubmenu.d.ts +0 -1
  758. package/esm/core/SideNavigation/SidenavSubmenu.js +14 -4
  759. package/esm/core/SideNavigation/SidenavSubmenuHeader.d.ts +1 -2
  760. package/esm/core/SideNavigation/SidenavSubmenuHeader.js +20 -5
  761. package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +1 -2
  762. package/esm/core/SkipToContentLink/SkipToContentLink.js +11 -3
  763. package/esm/core/Slider/Slider.d.ts +29 -10
  764. package/esm/core/Slider/Slider.js +352 -198
  765. package/esm/core/Slider/Thumb.d.ts +4 -4
  766. package/esm/core/Slider/Thumb.js +101 -52
  767. package/esm/core/Slider/Track.d.ts +4 -4
  768. package/esm/core/Slider/Track.js +76 -49
  769. package/esm/core/StatusMessage/StatusMessage.d.ts +13 -3
  770. package/esm/core/StatusMessage/StatusMessage.js +28 -8
  771. package/esm/core/Stepper/Stepper.d.ts +29 -5
  772. package/esm/core/Stepper/Stepper.js +71 -9
  773. package/esm/core/Stepper/StepperStep.d.ts +18 -1
  774. package/esm/core/Stepper/StepperStep.js +92 -31
  775. package/esm/core/Stepper/WorkflowDiagram.d.ts +11 -2
  776. package/esm/core/Stepper/WorkflowDiagram.js +23 -7
  777. package/esm/core/Stepper/WorkflowDiagramStep.d.ts +8 -3
  778. package/esm/core/Stepper/WorkflowDiagramStep.js +22 -4
  779. package/esm/core/Stepper/index.d.ts +0 -4
  780. package/esm/core/Stepper/index.js +0 -2
  781. package/esm/core/Surface/Surface.d.ts +2 -3
  782. package/esm/core/Surface/Surface.js +68 -40
  783. package/esm/core/Table/SubRowExpander.d.ts +2 -2
  784. package/esm/core/Table/SubRowExpander.js +31 -9
  785. package/esm/core/Table/Table.d.ts +18 -3
  786. package/esm/core/Table/Table.js +763 -417
  787. package/esm/core/Table/TableCell.d.ts +2 -2
  788. package/esm/core/Table/TableCell.js +88 -53
  789. package/esm/core/Table/TablePaginator.d.ts +3 -4
  790. package/esm/core/Table/TablePaginator.js +306 -127
  791. package/esm/core/Table/TableRowMemoized.d.ts +4 -4
  792. package/esm/core/Table/TableRowMemoized.js +148 -84
  793. package/esm/core/Table/actionHandlers/expandHandler.js +10 -10
  794. package/esm/core/Table/actionHandlers/filterHandler.js +23 -16
  795. package/esm/core/Table/actionHandlers/index.js +5 -1
  796. package/esm/core/Table/actionHandlers/resizeHandler.js +11 -11
  797. package/esm/core/Table/actionHandlers/selectHandler.js +117 -93
  798. package/esm/core/Table/cells/DefaultCell.d.ts +2 -2
  799. package/esm/core/Table/cells/DefaultCell.js +43 -7
  800. package/esm/core/Table/cells/EditableCell.d.ts +2 -2
  801. package/esm/core/Table/cells/EditableCell.js +71 -48
  802. package/esm/core/Table/columns/actionColumn.d.ts +3 -3
  803. package/esm/core/Table/columns/actionColumn.js +85 -62
  804. package/esm/core/Table/columns/expanderColumn.d.ts +2 -2
  805. package/esm/core/Table/columns/expanderColumn.js +38 -25
  806. package/esm/core/Table/columns/selectionColumn.d.ts +4 -4
  807. package/esm/core/Table/columns/selectionColumn.js +51 -23
  808. package/esm/core/Table/filters/BaseFilter.d.ts +2 -3
  809. package/esm/core/Table/filters/BaseFilter.js +16 -9
  810. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +9 -3
  811. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +113 -48
  812. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +6 -5
  813. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +110 -48
  814. package/esm/core/Table/filters/FilterButtonBar.d.ts +3 -4
  815. package/esm/core/Table/filters/FilterButtonBar.js +29 -11
  816. package/esm/core/Table/filters/FilterToggle.d.ts +3 -4
  817. package/esm/core/Table/filters/FilterToggle.js +57 -21
  818. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +4 -5
  819. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +50 -24
  820. package/esm/core/Table/filters/TextFilter/TextFilter.d.ts +3 -4
  821. package/esm/core/Table/filters/TextFilter/TextFilter.js +32 -16
  822. package/esm/core/Table/filters/customFilterFunctions.js +14 -12
  823. package/esm/core/Table/filters/defaultFilterFunctions.js +84 -79
  824. package/esm/core/Table/filters/tableFilters.d.ts +5 -5
  825. package/esm/core/Table/filters/tableFilters.js +34 -25
  826. package/esm/core/Table/filters/types.d.ts +2 -19
  827. package/esm/core/Table/hooks/useColumnDragAndDrop.js +89 -81
  828. package/esm/core/Table/hooks/useExpanderCell.d.ts +1 -1
  829. package/esm/core/Table/hooks/useExpanderCell.js +26 -20
  830. package/esm/core/Table/hooks/useResizeColumns.js +353 -293
  831. package/esm/core/Table/hooks/useScrollToRow.d.ts +2 -2
  832. package/esm/core/Table/hooks/useScrollToRow.js +42 -35
  833. package/esm/core/Table/hooks/useSelectionCell.js +10 -6
  834. package/esm/core/Table/hooks/useStickyColumns.js +61 -61
  835. package/esm/core/Table/hooks/useSubRowFiltering.js +90 -85
  836. package/esm/core/Table/hooks/useSubRowSelection.js +28 -27
  837. package/esm/core/Table/index.d.ts +1 -1
  838. package/esm/core/Table/index.js +5 -1
  839. package/esm/core/Table/utils.js +40 -38
  840. package/esm/core/Tabs/Tab.d.ts +2 -3
  841. package/esm/core/Tabs/Tab.js +41 -9
  842. package/esm/core/Tabs/Tabs.d.ts +6 -43
  843. package/esm/core/Tabs/Tabs.js +393 -334
  844. package/esm/core/Tabs/index.d.ts +1 -1
  845. package/esm/core/Tabs/index.js +1 -1
  846. package/esm/core/Tag/Tag.d.ts +1 -2
  847. package/esm/core/Tag/Tag.js +35 -9
  848. package/esm/core/Tag/TagContainer.d.ts +1 -2
  849. package/esm/core/Tag/TagContainer.js +17 -6
  850. package/esm/core/Textarea/Textarea.d.ts +4 -6
  851. package/esm/core/Textarea/Textarea.js +9 -14
  852. package/esm/core/ThemeProvider/ThemeContext.d.ts +1 -1
  853. package/esm/core/ThemeProvider/ThemeProvider.d.ts +29 -12
  854. package/esm/core/ThemeProvider/ThemeProvider.js +112 -28
  855. package/esm/core/Tile/Tile.d.ts +200 -18
  856. package/esm/core/Tile/Tile.js +475 -101
  857. package/esm/core/TimePicker/TimePicker.d.ts +3 -4
  858. package/esm/core/TimePicker/TimePicker.js +448 -229
  859. package/esm/core/Toast/Toast.d.ts +20 -18
  860. package/esm/core/Toast/Toast.js +196 -102
  861. package/esm/core/Toast/Toaster.d.ts +26 -28
  862. package/esm/core/Toast/Toaster.js +106 -126
  863. package/esm/core/Toast/index.d.ts +1 -4
  864. package/esm/core/Toast/index.js +1 -3
  865. package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +1 -7
  866. package/esm/core/ToggleSwitch/ToggleSwitch.js +60 -24
  867. package/esm/core/Tooltip/Tooltip.d.ts +81 -15
  868. package/esm/core/Tooltip/Tooltip.js +167 -11
  869. package/esm/core/TransferList/TransferList.d.ts +69 -0
  870. package/esm/core/TransferList/TransferList.js +206 -0
  871. package/esm/core/TransferList/index.d.ts +3 -0
  872. package/esm/core/TransferList/index.js +6 -0
  873. package/esm/core/Tree/Tree.d.ts +5 -6
  874. package/esm/core/Tree/Tree.js +197 -130
  875. package/esm/core/Tree/TreeContext.d.ts +1 -1
  876. package/esm/core/Tree/TreeContext.js +5 -5
  877. package/esm/core/Tree/TreeNode.d.ts +2 -3
  878. package/esm/core/Tree/TreeNode.js +195 -98
  879. package/esm/core/Tree/TreeNodeExpander.d.ts +1 -2
  880. package/esm/core/Tree/TreeNodeExpander.js +16 -6
  881. package/esm/core/Typography/Anchor/Anchor.d.ts +0 -1
  882. package/esm/core/Typography/Anchor/Anchor.js +0 -1
  883. package/esm/core/Typography/Blockquote/Blockquote.d.ts +1 -2
  884. package/esm/core/Typography/Blockquote/Blockquote.js +12 -5
  885. package/esm/core/Typography/Code/Code.d.ts +0 -1
  886. package/esm/core/Typography/Code/Code.js +0 -1
  887. package/esm/core/Typography/Kbd/Kbd.d.ts +1 -2
  888. package/esm/core/Typography/Kbd/Kbd.js +24 -16
  889. package/esm/core/Typography/Text/Text.d.ts +1 -2
  890. package/esm/core/Typography/Text/Text.js +20 -8
  891. package/esm/core/index.d.ts +11 -8
  892. package/esm/core/index.js +87 -15
  893. package/esm/core/utils/color/ColorValue.d.ts +4 -4
  894. package/esm/core/utils/color/ColorValue.js +524 -455
  895. package/esm/core/utils/components/AutoclearingHiddenLiveRegion.d.ts +2 -2
  896. package/esm/core/utils/components/AutoclearingHiddenLiveRegion.js +11 -8
  897. package/esm/core/utils/components/ButtonBase.d.ts +14 -0
  898. package/esm/core/utils/components/ButtonBase.js +42 -0
  899. package/esm/core/utils/components/Divider.d.ts +1 -2
  900. package/esm/core/utils/components/Divider.js +8 -3
  901. package/esm/core/utils/components/Flex.d.ts +4 -5
  902. package/esm/core/utils/components/Flex.js +87 -72
  903. package/esm/core/utils/components/FocusTrap.d.ts +3 -3
  904. package/esm/core/utils/components/FocusTrap.js +41 -32
  905. package/esm/core/utils/components/Icon.d.ts +6 -2
  906. package/esm/core/utils/components/Icon.js +26 -13
  907. package/esm/core/utils/components/InputContainer.d.ts +4 -6
  908. package/esm/core/utils/components/InputContainer.js +56 -18
  909. package/esm/core/utils/components/InputFlexContainer.d.ts +2 -2
  910. package/esm/core/utils/components/InputFlexContainer.js +15 -3
  911. package/esm/core/utils/components/LinkAction.d.ts +0 -1
  912. package/esm/core/utils/components/LinkAction.js +0 -1
  913. package/esm/core/utils/components/MiddleTextTruncation.d.ts +2 -2
  914. package/esm/core/utils/components/MiddleTextTruncation.js +27 -18
  915. package/esm/core/utils/components/Popover.d.ts +113 -28
  916. package/esm/core/utils/components/Popover.js +175 -119
  917. package/esm/core/utils/components/Portal.d.ts +27 -0
  918. package/esm/core/utils/components/Portal.js +36 -0
  919. package/esm/core/utils/components/Resizer.d.ts +2 -2
  920. package/esm/core/utils/components/Resizer.js +250 -183
  921. package/esm/core/utils/components/VirtualScroll.d.ts +2 -2
  922. package/esm/core/utils/components/VirtualScroll.js +296 -224
  923. package/esm/core/utils/components/VisuallyHidden.d.ts +1 -2
  924. package/esm/core/utils/components/VisuallyHidden.js +8 -3
  925. package/esm/core/utils/components/WithCSSTransition.d.ts +2 -2
  926. package/esm/core/utils/components/WithCSSTransition.js +38 -21
  927. package/esm/core/utils/components/index.d.ts +2 -0
  928. package/esm/core/utils/components/index.js +2 -0
  929. package/esm/core/utils/functions/colors.d.ts +1 -1
  930. package/esm/core/utils/functions/colors.js +20 -32
  931. package/esm/core/utils/functions/date.js +8 -8
  932. package/esm/core/utils/functions/dev.d.ts +11 -0
  933. package/esm/core/utils/functions/dev.js +29 -0
  934. package/esm/core/utils/functions/dom.d.ts +6 -8
  935. package/esm/core/utils/functions/dom.js +23 -25
  936. package/esm/core/utils/functions/focusable.js +24 -15
  937. package/esm/core/utils/functions/import.d.ts +6 -0
  938. package/esm/core/utils/functions/import.js +14 -0
  939. package/esm/core/utils/functions/index.d.ts +3 -1
  940. package/esm/core/utils/functions/index.js +3 -1
  941. package/esm/core/utils/functions/numbers.js +7 -7
  942. package/esm/core/utils/functions/polymorphic.d.ts +5 -3
  943. package/esm/core/utils/functions/polymorphic.js +36 -19
  944. package/esm/core/utils/functions/react.d.ts +8 -0
  945. package/esm/core/utils/functions/react.js +35 -0
  946. package/esm/core/utils/functions/supports.js +2 -1
  947. package/esm/core/utils/hooks/index.d.ts +1 -1
  948. package/esm/core/utils/hooks/index.js +1 -1
  949. package/esm/core/utils/hooks/useContainerWidth.js +16 -13
  950. package/esm/core/utils/hooks/useControlledState.d.ts +13 -0
  951. package/esm/core/utils/hooks/useControlledState.js +34 -0
  952. package/esm/core/utils/hooks/useDragAndDrop.js +99 -82
  953. package/esm/core/utils/hooks/useEventListener.js +18 -18
  954. package/esm/core/utils/hooks/useGlobals.d.ts +9 -4
  955. package/esm/core/utils/hooks/useGlobals.js +30 -29
  956. package/esm/core/utils/hooks/useId.js +3 -4
  957. package/esm/core/utils/hooks/useIntersection.js +25 -20
  958. package/esm/core/utils/hooks/useIsClient.js +5 -5
  959. package/esm/core/utils/hooks/useIsomorphicLayoutEffect.js +2 -1
  960. package/esm/core/utils/hooks/useLatestRef.js +5 -5
  961. package/esm/core/utils/hooks/useMediaQuery.js +23 -27
  962. package/esm/core/utils/hooks/useMergedRefs.js +11 -12
  963. package/esm/core/utils/hooks/useOverflow.js +62 -51
  964. package/esm/core/utils/hooks/useResizeObserver.js +17 -13
  965. package/esm/core/utils/hooks/useSafeContext.js +5 -5
  966. package/esm/core/utils/icons/StatusIconMap.d.ts +5 -5
  967. package/esm/core/utils/icons/StatusIconMap.js +8 -4
  968. package/esm/core/utils/icons/SvgCalendar.d.ts +1 -1
  969. package/esm/core/utils/icons/SvgCalendar.js +7 -2
  970. package/esm/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
  971. package/esm/core/utils/icons/SvgCaretDownSmall.js +7 -2
  972. package/esm/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
  973. package/esm/core/utils/icons/SvgCaretRightSmall.js +7 -2
  974. package/esm/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
  975. package/esm/core/utils/icons/SvgCaretUpSmall.js +7 -2
  976. package/esm/core/utils/icons/SvgCheckmark.d.ts +1 -1
  977. package/esm/core/utils/icons/SvgCheckmark.js +5 -2
  978. package/esm/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
  979. package/esm/core/utils/icons/SvgCheckmarkSmall.js +7 -2
  980. package/esm/core/utils/icons/SvgChevronLeft.d.ts +1 -1
  981. package/esm/core/utils/icons/SvgChevronLeft.js +7 -2
  982. package/esm/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
  983. package/esm/core/utils/icons/SvgChevronLeftDouble.js +7 -2
  984. package/esm/core/utils/icons/SvgChevronRight.d.ts +1 -1
  985. package/esm/core/utils/icons/SvgChevronRight.js +7 -2
  986. package/esm/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
  987. package/esm/core/utils/icons/SvgChevronRightDouble.js +7 -2
  988. package/esm/core/utils/icons/SvgClose.d.ts +1 -1
  989. package/esm/core/utils/icons/SvgClose.js +7 -2
  990. package/esm/core/utils/icons/SvgCloseSmall.d.ts +1 -1
  991. package/esm/core/utils/icons/SvgCloseSmall.js +7 -2
  992. package/esm/core/utils/icons/SvgColumnManager.d.ts +1 -1
  993. package/esm/core/utils/icons/SvgColumnManager.js +7 -2
  994. package/esm/core/utils/icons/SvgDocument.d.ts +1 -1
  995. package/esm/core/utils/icons/SvgDocument.js +5 -2
  996. package/esm/core/utils/icons/SvgFilter.d.ts +1 -1
  997. package/esm/core/utils/icons/SvgFilter.js +5 -2
  998. package/esm/core/utils/icons/SvgFilterHollow.d.ts +1 -1
  999. package/esm/core/utils/icons/SvgFilterHollow.js +7 -2
  1000. package/esm/core/utils/icons/SvgImportantSmall.d.ts +1 -1
  1001. package/esm/core/utils/icons/SvgImportantSmall.js +7 -2
  1002. package/esm/core/utils/icons/SvgInfoCircular.d.ts +1 -1
  1003. package/esm/core/utils/icons/SvgInfoCircular.js +7 -2
  1004. package/esm/core/utils/icons/SvgMore.d.ts +1 -1
  1005. package/esm/core/utils/icons/SvgMore.js +7 -2
  1006. package/esm/core/utils/icons/SvgMoreVertical.d.ts +1 -1
  1007. package/esm/core/utils/icons/SvgMoreVertical.js +7 -2
  1008. package/esm/core/utils/icons/SvgNew.d.ts +1 -1
  1009. package/esm/core/utils/icons/SvgNew.js +7 -2
  1010. package/esm/core/utils/icons/SvgSearch.d.ts +1 -1
  1011. package/esm/core/utils/icons/SvgSearch.js +7 -2
  1012. package/esm/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
  1013. package/esm/core/utils/icons/SvgSmileyHappy.js +7 -2
  1014. package/esm/core/utils/icons/SvgSortDown.d.ts +1 -1
  1015. package/esm/core/utils/icons/SvgSortDown.js +7 -2
  1016. package/esm/core/utils/icons/SvgSortUp.d.ts +1 -1
  1017. package/esm/core/utils/icons/SvgSortUp.js +7 -2
  1018. package/esm/core/utils/icons/SvgStatusError.d.ts +1 -1
  1019. package/esm/core/utils/icons/SvgStatusError.js +7 -2
  1020. package/esm/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
  1021. package/esm/core/utils/icons/SvgStatusSuccess.js +7 -2
  1022. package/esm/core/utils/icons/SvgStatusWarning.d.ts +1 -1
  1023. package/esm/core/utils/icons/SvgStatusWarning.js +7 -2
  1024. package/esm/core/utils/icons/SvgSwap.d.ts +1 -1
  1025. package/esm/core/utils/icons/SvgSwap.js +7 -2
  1026. package/esm/core/utils/icons/SvgUpload.d.ts +1 -1
  1027. package/esm/core/utils/icons/SvgUpload.js +7 -2
  1028. package/esm/core/utils/props.d.ts +2 -2
  1029. package/esm/core/utils/types.d.ts +1 -1
  1030. package/esm/index.d.ts +0 -1
  1031. package/esm/index.js +0 -1
  1032. package/esm/react-table/react-table.d.ts +745 -0
  1033. package/esm/react-table/react-table.js +9 -0
  1034. package/esm/styles.d.ts +5 -0
  1035. package/esm/styles.js +428 -0
  1036. package/package.json +51 -44
  1037. package/react-table.d.ts +745 -0
  1038. package/styles.css +1083 -0
  1039. package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +0 -7
  1040. package/cjs/core/ComboBox/ComboBoxDropdown.js +0 -52
  1041. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +0 -66
  1042. package/cjs/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -3
  1043. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -78
  1044. package/cjs/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -3
  1045. package/cjs/core/Stepper/Wizard.d.ts +0 -46
  1046. package/cjs/core/Stepper/Wizard.js +0 -55
  1047. package/cjs/core/Toast/ToastWrapper.d.ts +0 -11
  1048. package/cjs/core/Toast/ToastWrapper.js +0 -50
  1049. package/cjs/core/utils/functions/styles.d.ts +0 -6
  1050. package/cjs/core/utils/functions/styles.js +0 -21
  1051. package/cjs/core/utils/hooks/useIsThemeAlreadySet.d.ts +0 -7
  1052. package/cjs/core/utils/hooks/useIsThemeAlreadySet.js +0 -54
  1053. package/cjs/types/react-table-config.d.ts +0 -135
  1054. package/cjs/types/react-table-config.js +0 -2
  1055. package/esm/core/ComboBox/ComboBoxDropdown.d.ts +0 -7
  1056. package/esm/core/ComboBox/ComboBoxDropdown.js +0 -26
  1057. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +0 -37
  1058. package/esm/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -3
  1059. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -49
  1060. package/esm/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -3
  1061. package/esm/core/Stepper/Wizard.d.ts +0 -46
  1062. package/esm/core/Stepper/Wizard.js +0 -29
  1063. package/esm/core/Toast/ToastWrapper.d.ts +0 -11
  1064. package/esm/core/Toast/ToastWrapper.js +0 -21
  1065. package/esm/core/utils/functions/styles.d.ts +0 -6
  1066. package/esm/core/utils/functions/styles.js +0 -17
  1067. package/esm/core/utils/hooks/useIsThemeAlreadySet.d.ts +0 -7
  1068. package/esm/core/utils/hooks/useIsThemeAlreadySet.js +0 -27
  1069. package/esm/types/react-table-config.d.ts +0 -135
  1070. package/esm/types/react-table-config.js +0 -1
@@ -4,38 +4,68 @@
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
6
  import cx from 'classnames';
7
- import { actions as TableActions, useFlexLayout, useFilters, useRowSelect, useSortBy, useTable, useExpanded, usePagination, useColumnOrder, useGlobalFilter, } from 'react-table';
7
+ import {
8
+ actions as TableActions,
9
+ useFlexLayout,
10
+ useFilters,
11
+ useRowSelect,
12
+ useSortBy,
13
+ useTable,
14
+ useExpanded,
15
+ usePagination,
16
+ useColumnOrder,
17
+ useGlobalFilter,
18
+ } from 'react-table';
8
19
  import { ProgressRadial } from '../ProgressIndicators/index.js';
9
- import { useGlobals, useResizeObserver, SvgSortDown, SvgSortUp, useIsomorphicLayoutEffect, } from '../utils/index.js';
10
- import '@itwin/itwinui-css/css/table.css';
20
+ import {
21
+ useGlobals,
22
+ useResizeObserver,
23
+ SvgSortDown,
24
+ SvgSortUp,
25
+ useIsomorphicLayoutEffect,
26
+ Box,
27
+ createWarningLogger,
28
+ } from '../utils/index.js';
11
29
  import { getCellStyle, getStickyStyle } from './utils.js';
12
30
  import { TableRowMemoized } from './TableRowMemoized.js';
13
31
  import { FilterToggle } from './filters/index.js';
14
32
  import { customFilterFunctions } from './filters/customFilterFunctions.js';
15
- import { useExpanderCell, useSelectionCell, useSubRowFiltering, useSubRowSelection, useResizeColumns, useColumnDragAndDrop, useScrollToRow, useStickyColumns, } from './hooks/index.js';
16
- import { onExpandHandler, onFilterHandler, onToggleHandler, onShiftSelectHandler, onSingleSelectHandler, onTableResizeEnd, onTableResizeStart, } from './actionHandlers/index.js';
33
+ import {
34
+ useExpanderCell,
35
+ useSelectionCell,
36
+ useSubRowFiltering,
37
+ useSubRowSelection,
38
+ useResizeColumns,
39
+ useColumnDragAndDrop,
40
+ useScrollToRow,
41
+ useStickyColumns,
42
+ } from './hooks/index.js';
43
+ import {
44
+ onExpandHandler,
45
+ onFilterHandler,
46
+ onToggleHandler,
47
+ onShiftSelectHandler,
48
+ onSingleSelectHandler,
49
+ onTableResizeEnd,
50
+ onTableResizeStart,
51
+ } from './actionHandlers/index.js';
17
52
  import VirtualScroll from '../utils/components/VirtualScroll.js';
18
53
  import { SELECTION_CELL_ID } from './columns/index.js';
19
54
  const singleRowSelectedAction = 'singleRowSelected';
20
55
  const shiftRowSelectedAction = 'shiftRowSelected';
21
56
  export const tableResizeStartAction = 'tableResizeStart';
22
57
  const tableResizeEndAction = 'tableResizeEnd';
23
- let didLogWarning = false;
24
- let isDev = false;
25
- // wrapping in try-catch because process might be undefined
26
- try {
27
- isDev = process.env.NODE_ENV !== 'production';
28
- }
29
- catch (_a) { }
58
+ const logWarningInDev = createWarningLogger();
30
59
  const flattenColumns = (columns) => {
31
- const flatColumns = [];
32
- columns.forEach((column) => {
33
- flatColumns.push(column);
34
- if ('columns' in column) {
35
- flatColumns.push(...flattenColumns(column.columns));
36
- }
37
- });
38
- return flatColumns;
60
+ const flatColumns = [];
61
+ columns.forEach((column) => {
62
+ flatColumns.push(column);
63
+ if ('columns' in column) {
64
+ // @ts-expect-error - Since nested columns are not supported from a types perspective
65
+ flatColumns.push(...flattenColumns(column.columns));
66
+ }
67
+ });
68
+ return flatColumns;
39
69
  };
40
70
  /**
41
71
  * Table based on [react-table](https://react-table.tanstack.com/docs/api/overview).
@@ -75,413 +105,729 @@ const flattenColumns = (columns) => {
75
105
  * />
76
106
  */
77
107
  export const Table = (props) => {
78
- const { data, columns, isLoading = false, emptyTableContent, className, style, id, isSelectable = false, onSelect, onRowClick, selectionMode = 'multi', isSortable = false, onSort, stateReducer, onBottomReached, onRowInViewport, intersectionMargin = 300, subComponent, onExpand, onFilter, globalFilterValue, emptyFilteredTableContent, filterTypes: filterFunctions, expanderCell, isRowDisabled, rowProps, density = 'default', selectSubRows = true, getSubRows, selectRowOnClick = true, paginatorRenderer, pageSize = 25, isResizable = false, columnResizeMode = 'fit', styleType = 'default', enableVirtualization = false, enableColumnReordering = false, ...rest } = props;
79
- useGlobals();
80
- const ownerDocument = React.useRef();
81
- const defaultColumn = React.useMemo(() => ({
82
- maxWidth: 0,
83
- minWidth: 0,
84
- width: 0,
85
- }), []);
86
- // useRef prevents from rerendering when one of these callbacks changes
87
- const onBottomReachedRef = React.useRef(onBottomReached);
88
- const onRowInViewportRef = React.useRef(onRowInViewport);
89
- React.useEffect(() => {
90
- onBottomReachedRef.current = onBottomReached;
91
- onRowInViewportRef.current = onRowInViewport;
92
- }, [onBottomReached, onRowInViewport]);
93
- const hasManualSelectionColumn = React.useMemo(() => {
94
- const flatColumns = flattenColumns(columns);
95
- return flatColumns.some((column) => column.id === SELECTION_CELL_ID);
96
- }, [columns]);
97
- const disableUserSelect = React.useCallback((e) => {
98
- if (e.key === 'Shift') {
99
- ownerDocument.current &&
100
- (ownerDocument.current.documentElement.style.userSelect = 'none');
101
- }
102
- }, []);
103
- const enableUserSelect = React.useCallback((e) => {
104
- if (e.key === 'Shift') {
105
- ownerDocument.current &&
106
- (ownerDocument.current.documentElement.style.userSelect = '');
107
- }
108
- }, []);
109
- React.useEffect(() => {
110
- if (!isSelectable || selectionMode !== 'multi') {
111
- return;
112
- }
113
- const ownerDoc = ownerDocument.current;
114
- ownerDoc === null || ownerDoc === void 0 ? void 0 : ownerDoc.addEventListener('keydown', disableUserSelect);
115
- ownerDoc === null || ownerDoc === void 0 ? void 0 : ownerDoc.addEventListener('keyup', enableUserSelect);
116
- return () => {
117
- ownerDoc === null || ownerDoc === void 0 ? void 0 : ownerDoc.removeEventListener('keydown', disableUserSelect);
118
- ownerDoc === null || ownerDoc === void 0 ? void 0 : ownerDoc.removeEventListener('keyup', enableUserSelect);
119
- };
120
- }, [
121
- isSelectable,
122
- selectionMode,
123
- ownerDocument,
124
- disableUserSelect,
125
- enableUserSelect,
126
- ]);
127
- const previousFilter = React.useRef([]);
128
- const currentFilter = React.useRef(previousFilter.current);
129
- const tableStateReducer = React.useCallback((newState, action, previousState, instance) => {
130
- switch (action.type) {
131
- case TableActions.toggleSortBy:
132
- onSort === null || onSort === void 0 ? void 0 : onSort(newState);
133
- break;
134
- case TableActions.setFilter:
135
- currentFilter.current = onFilterHandler(newState, action, previousState, currentFilter.current, instance);
136
- break;
137
- case TableActions.toggleRowExpanded:
138
- case TableActions.toggleAllRowsExpanded:
139
- onExpandHandler(newState, instance, onExpand);
140
- break;
141
- case singleRowSelectedAction: {
142
- newState = onSingleSelectHandler(newState, action, instance, onSelect,
143
- // If it has manual selection column, then we can't check whether row is disabled
144
- hasManualSelectionColumn ? undefined : isRowDisabled);
145
- break;
146
- }
147
- case shiftRowSelectedAction: {
148
- newState = onShiftSelectHandler(newState, action, instance, onSelect,
149
- // If it has manual selection column, then we can't check whether row is disabled
150
- hasManualSelectionColumn ? undefined : isRowDisabled);
151
- break;
152
- }
153
- case TableActions.toggleRowSelected:
154
- case TableActions.toggleAllRowsSelected:
155
- case TableActions.toggleAllPageRowsSelected: {
156
- onToggleHandler(newState, action, instance, onSelect,
157
- // If it has manual selection column, then we can't check whether row is disabled
158
- hasManualSelectionColumn ? undefined : isRowDisabled);
159
- break;
160
- }
161
- case tableResizeStartAction: {
162
- newState = onTableResizeStart(newState);
163
- break;
164
- }
165
- case tableResizeEndAction: {
166
- newState = onTableResizeEnd(newState, action);
167
- break;
168
- }
169
- default:
170
- break;
171
- }
172
- return stateReducer
173
- ? stateReducer(newState, action, previousState, instance)
174
- : newState;
175
- }, [
176
- hasManualSelectionColumn,
177
- isRowDisabled,
178
- onExpand,
179
- onSelect,
180
- onSort,
181
- stateReducer,
182
- ]);
183
- const filterTypes = React.useMemo(() => ({ ...customFilterFunctions, ...filterFunctions }), [filterFunctions]);
184
- const hasAnySubRows = React.useMemo(() => {
185
- return data.some((item, index) => getSubRows ? getSubRows(item, index) : item.subRows);
186
- }, [data, getSubRows]);
187
- const instance = useTable({
188
- manualPagination: !paginatorRenderer,
189
- paginateExpandedRows: false,
190
- ...props,
191
- columns,
192
- defaultColumn,
193
- disableSortBy: !isSortable,
194
- stateReducer: tableStateReducer,
195
- filterTypes,
196
- selectSubRows,
197
- data,
198
- getSubRows,
199
- initialState: { pageSize, ...props.initialState },
200
- columnResizeMode,
201
- }, useFlexLayout, useResizeColumns(ownerDocument), useFilters, useSubRowFiltering(hasAnySubRows), useGlobalFilter, useSortBy, useExpanded, usePagination, useRowSelect, useSubRowSelection, useExpanderCell(subComponent, expanderCell, isRowDisabled), useSelectionCell(isSelectable, selectionMode, isRowDisabled, density), useColumnOrder, useColumnDragAndDrop(enableColumnReordering), useStickyColumns);
202
- const { getTableProps, rows, headerGroups: _headerGroups, getTableBodyProps, prepareRow, state, allColumns, dispatch, page, gotoPage, setPageSize, flatHeaders, visibleColumns, setGlobalFilter, } = instance;
203
- let headerGroups = _headerGroups;
204
- if (columns.length === 1 && 'columns' in columns[0]) {
205
- headerGroups = _headerGroups.slice(1);
206
- if (isDev && !didLogWarning) {
207
- console.warn(`Table's \`columns\` prop should not have a top-level \`Header\` or sub-columns. They are only allowed to be passed for backwards compatibility.\n See https://github.com/iTwin/iTwinUI/wiki/iTwinUI-react-v2-migration-guide#breaking-changes`);
208
- didLogWarning = true;
209
- }
108
+ const {
109
+ data,
110
+ columns,
111
+ isLoading = false,
112
+ emptyTableContent,
113
+ className,
114
+ style,
115
+ id,
116
+ isSelectable = false,
117
+ onSelect,
118
+ onRowClick,
119
+ selectionMode = 'multi',
120
+ isSortable = false,
121
+ onSort,
122
+ stateReducer,
123
+ onBottomReached,
124
+ onRowInViewport,
125
+ intersectionMargin = 300,
126
+ subComponent,
127
+ onExpand,
128
+ onFilter,
129
+ globalFilterValue,
130
+ emptyFilteredTableContent,
131
+ filterTypes: filterFunctions,
132
+ expanderCell,
133
+ isRowDisabled,
134
+ rowProps,
135
+ density = 'default',
136
+ selectSubRows = true,
137
+ getSubRows,
138
+ selectRowOnClick = true,
139
+ paginatorRenderer,
140
+ pageSize = 25,
141
+ isResizable = false,
142
+ columnResizeMode = 'fit',
143
+ styleType = 'default',
144
+ enableVirtualization = false,
145
+ enableColumnReordering = false,
146
+ headerWrapperProps,
147
+ headerProps,
148
+ bodyProps,
149
+ emptyTableContentProps,
150
+ ...rest
151
+ } = props;
152
+ useGlobals();
153
+ const ownerDocument = React.useRef();
154
+ const defaultColumn = React.useMemo(
155
+ () => ({
156
+ maxWidth: 0,
157
+ minWidth: 0,
158
+ width: 0,
159
+ }),
160
+ [],
161
+ );
162
+ // useRef prevents from rerendering when one of these callbacks changes
163
+ const onBottomReachedRef = React.useRef(onBottomReached);
164
+ const onRowInViewportRef = React.useRef(onRowInViewport);
165
+ React.useEffect(() => {
166
+ onBottomReachedRef.current = onBottomReached;
167
+ onRowInViewportRef.current = onRowInViewport;
168
+ }, [onBottomReached, onRowInViewport]);
169
+ const hasManualSelectionColumn = React.useMemo(() => {
170
+ const flatColumns = flattenColumns(columns);
171
+ return flatColumns.some((column) => column.id === SELECTION_CELL_ID);
172
+ }, [columns]);
173
+ const disableUserSelect = React.useCallback((e) => {
174
+ if (e.key === 'Shift') {
175
+ ownerDocument.current &&
176
+ (ownerDocument.current.documentElement.style.userSelect = 'none');
210
177
  }
211
- const ariaDataAttributes = Object.entries(rest).reduce((result, [key, value]) => {
212
- if (key.startsWith('data-') || key.startsWith('aria-')) {
213
- result[key] = value;
214
- }
215
- return result;
216
- }, {});
217
- const areFiltersSet = allColumns.some((column) => column.filterValue != null && column.filterValue !== '') || !!globalFilterValue;
218
- const showFilterButton = (column) => (data.length !== 0 || areFiltersSet) && column.canFilter;
219
- const showSortButton = (column) => data.length !== 0 && column.canSort;
220
- const onRowClickHandler = React.useCallback((event, row) => {
221
- const isDisabled = isRowDisabled === null || isRowDisabled === void 0 ? void 0 : isRowDisabled(row.original);
222
- const ctrlPressed = event.ctrlKey || event.metaKey;
223
- if (!isDisabled) {
224
- onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(event, row);
225
- }
226
- if (isSelectable &&
227
- !isDisabled &&
228
- selectRowOnClick &&
229
- !event.isDefaultPrevented()) {
230
- if (selectionMode === 'multi' && event.shiftKey) {
231
- dispatch({
232
- type: shiftRowSelectedAction,
233
- id: row.id,
234
- ctrlPressed: ctrlPressed,
235
- });
236
- }
237
- else if (!row.isSelected &&
238
- (selectionMode === 'single' || !ctrlPressed)) {
239
- dispatch({
240
- type: singleRowSelectedAction,
241
- id: row.id,
242
- });
243
- }
244
- else {
245
- row.toggleRowSelected(!row.isSelected);
246
- }
247
- }
248
- }, [
249
- isRowDisabled,
250
- isSelectable,
251
- selectRowOnClick,
252
- selectionMode,
253
- dispatch,
254
- onRowClick,
255
- ]);
256
- React.useEffect(() => {
257
- setGlobalFilter(globalFilterValue);
258
- }, [globalFilterValue, setGlobalFilter]);
259
- React.useEffect(() => {
260
- setPageSize(pageSize);
261
- }, [pageSize, setPageSize]);
262
- React.useEffect(() => {
263
- if (previousFilter.current !== currentFilter.current) {
264
- previousFilter.current = currentFilter.current;
265
- onFilter === null || onFilter === void 0 ? void 0 : onFilter(currentFilter.current, state, instance.filteredRows);
266
- }
267
- }, [state, instance.filteredRows, onFilter]);
268
- const lastPassedColumns = React.useRef([]);
269
- // Reset the column order whenever new columns are passed
270
- // This is to avoid the old columnOrder from affecting the new columns' columnOrder
271
- React.useEffect(() => {
272
- // Check if columns have changed (by value)
273
- if (JSON.stringify(lastPassedColumns.current) !== JSON.stringify(columns)) {
274
- instance.setColumnOrder([]);
275
- }
276
- lastPassedColumns.current = columns;
277
- }, [columns, instance]);
278
- const paginatorRendererProps = React.useMemo(() => ({
279
- currentPage: state.pageIndex,
280
- pageSize: state.pageSize,
281
- totalRowsCount: rows.length,
282
- size: density !== 'default' ? 'small' : 'default',
283
- isLoading,
284
- onPageChange: gotoPage,
285
- onPageSizeChange: setPageSize,
286
- totalSelectedRowsCount: selectionMode === 'single' ? 0 : instance.selectedFlatRows.length, // 0 when selectionMode = 'single' since totalSelectedRowCount is for multi-selection mode only
287
- }), [
288
- density,
289
- gotoPage,
290
- isLoading,
291
- rows.length,
292
- setPageSize,
293
- state.pageIndex,
294
- state.pageSize,
295
- instance.selectedFlatRows,
296
- selectionMode,
297
- ]);
298
- const { scrollToIndex, tableRowRef } = useScrollToRow({ ...props, page });
299
- const columnRefs = React.useRef({});
300
- const previousTableWidth = React.useRef(0);
301
- const onTableResize = React.useCallback(({ width }) => {
302
- instance.tableWidth = width;
303
- if (width === previousTableWidth.current) {
304
- return;
178
+ }, []);
179
+ const enableUserSelect = React.useCallback((e) => {
180
+ if (e.key === 'Shift') {
181
+ ownerDocument.current &&
182
+ (ownerDocument.current.documentElement.style.userSelect = '');
183
+ }
184
+ }, []);
185
+ React.useEffect(() => {
186
+ if (!isSelectable || selectionMode !== 'multi') {
187
+ return;
188
+ }
189
+ const ownerDoc = ownerDocument.current;
190
+ ownerDoc?.addEventListener('keydown', disableUserSelect);
191
+ ownerDoc?.addEventListener('keyup', enableUserSelect);
192
+ return () => {
193
+ ownerDoc?.removeEventListener('keydown', disableUserSelect);
194
+ ownerDoc?.removeEventListener('keyup', enableUserSelect);
195
+ };
196
+ }, [
197
+ isSelectable,
198
+ selectionMode,
199
+ ownerDocument,
200
+ disableUserSelect,
201
+ enableUserSelect,
202
+ ]);
203
+ const previousFilter = React.useRef([]);
204
+ const currentFilter = React.useRef(previousFilter.current);
205
+ const tableStateReducer = React.useCallback(
206
+ (newState, action, previousState, instance) => {
207
+ switch (action.type) {
208
+ case TableActions.toggleSortBy:
209
+ onSort?.(newState);
210
+ break;
211
+ case TableActions.setFilter:
212
+ currentFilter.current = onFilterHandler(
213
+ newState,
214
+ action,
215
+ previousState,
216
+ currentFilter.current,
217
+ instance,
218
+ );
219
+ break;
220
+ case TableActions.toggleRowExpanded:
221
+ case TableActions.toggleAllRowsExpanded:
222
+ onExpandHandler(newState, instance, onExpand);
223
+ break;
224
+ case singleRowSelectedAction: {
225
+ newState = onSingleSelectHandler(
226
+ newState,
227
+ action,
228
+ instance,
229
+ onSelect,
230
+ // If it has manual selection column, then we can't check whether row is disabled
231
+ hasManualSelectionColumn ? undefined : isRowDisabled,
232
+ );
233
+ break;
305
234
  }
306
- previousTableWidth.current = width;
307
- // Update column widths when table was resized
308
- flatHeaders.forEach((header) => {
309
- if (columnRefs.current[header.id]) {
310
- header.resizeWidth =
311
- columnRefs.current[header.id].getBoundingClientRect().width;
312
- }
313
- });
314
- // If no column was resized then leave table resize handling to the flexbox
315
- if (Object.keys(state.columnResizing.columnWidths).length === 0) {
316
- return;
235
+ case shiftRowSelectedAction: {
236
+ newState = onShiftSelectHandler(
237
+ newState,
238
+ action,
239
+ instance,
240
+ onSelect,
241
+ // If it has manual selection column, then we can't check whether row is disabled
242
+ hasManualSelectionColumn ? undefined : isRowDisabled,
243
+ );
244
+ break;
317
245
  }
318
- dispatch({ type: tableResizeStartAction });
319
- }, [dispatch, state.columnResizing.columnWidths, flatHeaders, instance]);
320
- const [resizeRef] = useResizeObserver(onTableResize);
321
- // Flexbox handles columns resize so we take new column widths before browser repaints.
322
- useIsomorphicLayoutEffect(() => {
323
- if (state.isTableResizing) {
324
- const newColumnWidths = {};
325
- flatHeaders.forEach((column) => {
326
- if (columnRefs.current[column.id]) {
327
- newColumnWidths[column.id] =
328
- columnRefs.current[column.id].getBoundingClientRect().width;
329
- }
330
- });
331
- dispatch({ type: tableResizeEndAction, columnWidths: newColumnWidths });
246
+ case TableActions.toggleRowSelected:
247
+ case TableActions.toggleAllRowsSelected:
248
+ case TableActions.toggleAllPageRowsSelected: {
249
+ onToggleHandler(
250
+ newState,
251
+ action,
252
+ instance,
253
+ onSelect,
254
+ // If it has manual selection column, then we can't check whether row is disabled
255
+ hasManualSelectionColumn ? undefined : isRowDisabled,
256
+ );
257
+ break;
332
258
  }
333
- });
334
- const headerRef = React.useRef(null);
335
- const bodyRef = React.useRef(null);
336
- const getPreparedRow = React.useCallback((index) => {
337
- const row = page[index];
338
- prepareRow(row);
339
- return (React.createElement(TableRowMemoized, { row: row, rowProps: rowProps, isLast: index === page.length - 1, onRowInViewport: onRowInViewportRef, onBottomReached: onBottomReachedRef, intersectionMargin: intersectionMargin, state: state, key: row.getRowProps().key, onClick: onRowClickHandler, subComponent: subComponent, isDisabled: !!(isRowDisabled === null || isRowDisabled === void 0 ? void 0 : isRowDisabled(row.original)), tableHasSubRows: hasAnySubRows, tableInstance: instance, expanderCell: expanderCell, bodyRef: bodyRef.current, tableRowRef: enableVirtualization ? undefined : tableRowRef(row), density: density }));
340
- }, [
341
- page,
342
- prepareRow,
343
- rowProps,
344
- intersectionMargin,
345
- state,
346
- onRowClickHandler,
347
- subComponent,
348
- isRowDisabled,
349
- hasAnySubRows,
350
- instance,
351
- expanderCell,
352
- enableVirtualization,
353
- tableRowRef,
354
- density,
355
- ]);
356
- const virtualizedItemRenderer = React.useCallback((index) => getPreparedRow(index), [getPreparedRow]);
357
- const updateStickyState = () => {
358
- if (!bodyRef.current || flatHeaders.every((header) => !header.sticky)) {
359
- return;
259
+ case tableResizeStartAction: {
260
+ newState = onTableResizeStart(newState);
261
+ break;
360
262
  }
361
- if (bodyRef.current.scrollLeft !== 0) {
362
- dispatch({ type: TableActions.setScrolledRight, value: true });
263
+ case tableResizeEndAction: {
264
+ newState = onTableResizeEnd(newState, action);
265
+ break;
363
266
  }
364
- else {
365
- dispatch({ type: TableActions.setScrolledRight, value: false });
267
+ default:
268
+ break;
269
+ }
270
+ return stateReducer
271
+ ? stateReducer(newState, action, previousState, instance)
272
+ : newState;
273
+ },
274
+ [
275
+ hasManualSelectionColumn,
276
+ isRowDisabled,
277
+ onExpand,
278
+ onSelect,
279
+ onSort,
280
+ stateReducer,
281
+ ],
282
+ );
283
+ const filterTypes = React.useMemo(
284
+ () => ({ ...customFilterFunctions, ...filterFunctions }),
285
+ [filterFunctions],
286
+ );
287
+ const hasAnySubRows = React.useMemo(() => {
288
+ return data.some((item, index) =>
289
+ getSubRows ? getSubRows(item, index) : item.subRows,
290
+ );
291
+ }, [data, getSubRows]);
292
+ const instance = useTable(
293
+ {
294
+ manualPagination: !paginatorRenderer,
295
+ paginateExpandedRows: false,
296
+ ...props,
297
+ columns,
298
+ defaultColumn,
299
+ disableSortBy: !isSortable,
300
+ stateReducer: tableStateReducer,
301
+ filterTypes,
302
+ selectSubRows,
303
+ data,
304
+ getSubRows,
305
+ initialState: { pageSize, ...props.initialState },
306
+ columnResizeMode,
307
+ },
308
+ useFlexLayout,
309
+ useResizeColumns(ownerDocument),
310
+ useFilters,
311
+ useSubRowFiltering(hasAnySubRows),
312
+ useGlobalFilter,
313
+ useSortBy,
314
+ useExpanded,
315
+ usePagination,
316
+ useRowSelect,
317
+ useSubRowSelection,
318
+ useExpanderCell(subComponent, expanderCell, isRowDisabled),
319
+ useSelectionCell(isSelectable, selectionMode, isRowDisabled, density),
320
+ useColumnOrder,
321
+ useColumnDragAndDrop(enableColumnReordering),
322
+ useStickyColumns,
323
+ );
324
+ const {
325
+ getTableProps,
326
+ rows,
327
+ headerGroups: _headerGroups,
328
+ getTableBodyProps,
329
+ prepareRow,
330
+ state,
331
+ allColumns,
332
+ dispatch,
333
+ page,
334
+ gotoPage,
335
+ setPageSize,
336
+ flatHeaders,
337
+ visibleColumns,
338
+ setGlobalFilter,
339
+ } = instance;
340
+ let headerGroups = _headerGroups;
341
+ if (columns.length === 1 && 'columns' in columns[0]) {
342
+ headerGroups = _headerGroups.slice(1);
343
+ logWarningInDev(
344
+ `Table's \`columns\` prop should not have a top-level \`Header\` or sub-columns. They are only allowed to be passed for backwards compatibility.\n See https://github.com/iTwin/iTwinUI/wiki/iTwinUI-react-v2-migration-guide#breaking-changes`,
345
+ );
346
+ }
347
+ const ariaDataAttributes = Object.entries(rest).reduce(
348
+ (result, [key, value]) => {
349
+ if (key.startsWith('data-') || key.startsWith('aria-')) {
350
+ result[key] = value;
351
+ }
352
+ return result;
353
+ },
354
+ {},
355
+ );
356
+ const areFiltersSet =
357
+ allColumns.some(
358
+ (column) => column.filterValue != null && column.filterValue !== '',
359
+ ) || !!globalFilterValue;
360
+ const showFilterButton = (column) =>
361
+ (data.length !== 0 || areFiltersSet) && column.canFilter && !!column.Filter;
362
+ const showSortButton = (column) => data.length !== 0 && column.canSort;
363
+ const onRowClickHandler = React.useCallback(
364
+ (event, row) => {
365
+ const isDisabled = isRowDisabled?.(row.original);
366
+ const ctrlPressed = event.ctrlKey || event.metaKey;
367
+ if (!isDisabled) {
368
+ onRowClick?.(event, row);
369
+ }
370
+ if (
371
+ isSelectable &&
372
+ !isDisabled &&
373
+ selectRowOnClick &&
374
+ !event.isDefaultPrevented()
375
+ ) {
376
+ if (selectionMode === 'multi' && event.shiftKey) {
377
+ dispatch({
378
+ type: shiftRowSelectedAction,
379
+ id: row.id,
380
+ ctrlPressed: ctrlPressed,
381
+ });
382
+ } else if (
383
+ !row.isSelected &&
384
+ (selectionMode === 'single' || !ctrlPressed)
385
+ ) {
386
+ dispatch({
387
+ type: singleRowSelectedAction,
388
+ id: row.id,
389
+ });
390
+ } else {
391
+ row.toggleRowSelected(!row.isSelected);
366
392
  }
367
- // If scrolled a bit to the left looking from the right side
368
- if (bodyRef.current.scrollLeft !==
369
- bodyRef.current.scrollWidth - bodyRef.current.clientWidth) {
370
- dispatch({ type: TableActions.setScrolledLeft, value: true });
393
+ }
394
+ },
395
+ [
396
+ isRowDisabled,
397
+ isSelectable,
398
+ selectRowOnClick,
399
+ selectionMode,
400
+ dispatch,
401
+ onRowClick,
402
+ ],
403
+ );
404
+ React.useEffect(() => {
405
+ setGlobalFilter(globalFilterValue);
406
+ }, [globalFilterValue, setGlobalFilter]);
407
+ React.useEffect(() => {
408
+ setPageSize(pageSize);
409
+ }, [pageSize, setPageSize]);
410
+ React.useEffect(() => {
411
+ if (previousFilter.current !== currentFilter.current) {
412
+ previousFilter.current = currentFilter.current;
413
+ onFilter?.(currentFilter.current, state, instance.filteredRows);
414
+ }
415
+ }, [state, instance.filteredRows, onFilter]);
416
+ const lastPassedColumns = React.useRef([]);
417
+ // Reset the column order whenever new columns are passed
418
+ // This is to avoid the old columnOrder from affecting the new columns' columnOrder
419
+ React.useEffect(() => {
420
+ // Check if columns have changed (by value)
421
+ if (JSON.stringify(lastPassedColumns.current) !== JSON.stringify(columns)) {
422
+ instance.setColumnOrder([]);
423
+ }
424
+ lastPassedColumns.current = columns;
425
+ }, [columns, instance]);
426
+ const paginatorRendererProps = React.useMemo(
427
+ () => ({
428
+ currentPage: state.pageIndex,
429
+ pageSize: state.pageSize,
430
+ totalRowsCount: rows.length,
431
+ size: density !== 'default' ? 'small' : 'default',
432
+ isLoading,
433
+ onPageChange: gotoPage,
434
+ onPageSizeChange: setPageSize,
435
+ totalSelectedRowsCount:
436
+ selectionMode === 'single' ? 0 : instance.selectedFlatRows.length, // 0 when selectionMode = 'single' since totalSelectedRowCount is for multi-selection mode only
437
+ }),
438
+ [
439
+ density,
440
+ gotoPage,
441
+ isLoading,
442
+ rows.length,
443
+ setPageSize,
444
+ state.pageIndex,
445
+ state.pageSize,
446
+ instance.selectedFlatRows,
447
+ selectionMode,
448
+ ],
449
+ );
450
+ const { scrollToIndex, tableRowRef } = useScrollToRow({ ...props, page });
451
+ const columnRefs = React.useRef({});
452
+ const previousTableWidth = React.useRef(0);
453
+ const onTableResize = React.useCallback(
454
+ ({ width }) => {
455
+ instance.tableWidth = width;
456
+ if (width === previousTableWidth.current) {
457
+ return;
458
+ }
459
+ previousTableWidth.current = width;
460
+ // Update column widths when table was resized
461
+ flatHeaders.forEach((header) => {
462
+ if (columnRefs.current[header.id]) {
463
+ header.resizeWidth =
464
+ columnRefs.current[header.id].getBoundingClientRect().width;
371
465
  }
372
- else {
373
- dispatch({ type: TableActions.setScrolledLeft, value: false });
466
+ });
467
+ // If no column was resized then leave table resize handling to the flexbox
468
+ if (Object.keys(state.columnResizing.columnWidths).length === 0) {
469
+ return;
470
+ }
471
+ dispatch({ type: tableResizeStartAction });
472
+ },
473
+ [dispatch, state.columnResizing.columnWidths, flatHeaders, instance],
474
+ );
475
+ const [resizeRef] = useResizeObserver(onTableResize);
476
+ // Flexbox handles columns resize so we take new column widths before browser repaints.
477
+ useIsomorphicLayoutEffect(() => {
478
+ if (state.isTableResizing) {
479
+ const newColumnWidths = {};
480
+ flatHeaders.forEach((column) => {
481
+ if (columnRefs.current[column.id]) {
482
+ newColumnWidths[column.id] =
483
+ columnRefs.current[column.id].getBoundingClientRect().width;
374
484
  }
375
- };
376
- React.useEffect(() => {
377
- updateStickyState();
378
- // Call only on init
379
- // eslint-disable-next-line react-hooks/exhaustive-deps
380
- }, []);
381
- const isHeaderDirectClick = React.useRef(false);
382
- return (React.createElement(React.Fragment, null,
383
- React.createElement("div", { ref: (element) => {
384
- ownerDocument.current = element === null || element === void 0 ? void 0 : element.ownerDocument;
385
- if (isResizable) {
386
- resizeRef(element);
387
- }
388
- }, id: id, ...getTableProps({
389
- className: cx('iui-table', className),
390
- style: {
391
- minWidth: 0,
392
- ...style,
393
- },
394
- }), "data-iui-size": density === 'default' ? undefined : density, ...ariaDataAttributes },
395
- headerGroups.map((headerGroup) => {
396
- // There may be a better solution for this, but for now I'm filtering out the placeholder cells using header.id
397
- headerGroup.headers = headerGroup.headers.filter((header) => !header.id.includes('iui-table-checkbox-selector_placeholder') &&
398
- !header.id.includes('iui-table-expander_placeholder'));
399
- const headerGroupProps = headerGroup.getHeaderGroupProps({
400
- className: 'iui-table-row',
485
+ });
486
+ dispatch({ type: tableResizeEndAction, columnWidths: newColumnWidths });
487
+ }
488
+ });
489
+ const headerRef = React.useRef(null);
490
+ const bodyRef = React.useRef(null);
491
+ const getPreparedRow = React.useCallback(
492
+ (index) => {
493
+ const row = page[index];
494
+ prepareRow(row);
495
+ return React.createElement(TableRowMemoized, {
496
+ row: row,
497
+ rowProps: rowProps,
498
+ isLast: index === page.length - 1,
499
+ onRowInViewport: onRowInViewportRef,
500
+ onBottomReached: onBottomReachedRef,
501
+ intersectionMargin: intersectionMargin,
502
+ state: state,
503
+ key: row.getRowProps().key,
504
+ onClick: onRowClickHandler,
505
+ subComponent: subComponent,
506
+ isDisabled: !!isRowDisabled?.(row.original),
507
+ tableHasSubRows: hasAnySubRows,
508
+ tableInstance: instance,
509
+ expanderCell: expanderCell,
510
+ bodyRef: bodyRef.current,
511
+ tableRowRef: enableVirtualization ? undefined : tableRowRef(row),
512
+ density: density,
513
+ });
514
+ },
515
+ [
516
+ page,
517
+ prepareRow,
518
+ rowProps,
519
+ intersectionMargin,
520
+ state,
521
+ onRowClickHandler,
522
+ subComponent,
523
+ isRowDisabled,
524
+ hasAnySubRows,
525
+ instance,
526
+ expanderCell,
527
+ enableVirtualization,
528
+ tableRowRef,
529
+ density,
530
+ ],
531
+ );
532
+ const virtualizedItemRenderer = React.useCallback(
533
+ (index) => getPreparedRow(index),
534
+ [getPreparedRow],
535
+ );
536
+ const updateStickyState = () => {
537
+ if (!bodyRef.current || flatHeaders.every((header) => !header.sticky)) {
538
+ return;
539
+ }
540
+ if (bodyRef.current.scrollLeft !== 0) {
541
+ dispatch({ type: TableActions.setScrolledRight, value: true });
542
+ } else {
543
+ dispatch({ type: TableActions.setScrolledRight, value: false });
544
+ }
545
+ // If scrolled a bit to the left looking from the right side
546
+ if (
547
+ bodyRef.current.scrollLeft !==
548
+ bodyRef.current.scrollWidth - bodyRef.current.clientWidth
549
+ ) {
550
+ dispatch({ type: TableActions.setScrolledLeft, value: true });
551
+ } else {
552
+ dispatch({ type: TableActions.setScrolledLeft, value: false });
553
+ }
554
+ };
555
+ React.useEffect(() => {
556
+ updateStickyState();
557
+ // Call only on init
558
+ // eslint-disable-next-line react-hooks/exhaustive-deps
559
+ }, []);
560
+ const isHeaderDirectClick = React.useRef(false);
561
+ return React.createElement(
562
+ React.Fragment,
563
+ null,
564
+ React.createElement(
565
+ Box,
566
+ {
567
+ ref: (element) => {
568
+ ownerDocument.current = element?.ownerDocument;
569
+ if (isResizable) {
570
+ resizeRef(element);
571
+ }
572
+ },
573
+ id: id,
574
+ ...getTableProps({
575
+ className: cx('iui-table', className),
576
+ style: {
577
+ minWidth: 0,
578
+ ...style,
579
+ },
580
+ }),
581
+ 'data-iui-size': density === 'default' ? undefined : density,
582
+ ...ariaDataAttributes,
583
+ },
584
+ headerGroups.map((headerGroup) => {
585
+ // There may be a better solution for this, but for now I'm filtering out the placeholder cells using header.id
586
+ headerGroup.headers = headerGroup.headers.filter(
587
+ (header) =>
588
+ !header.id.includes('iui-table-checkbox-selector_placeholder') &&
589
+ !header.id.includes('iui-table-expander_placeholder'),
590
+ );
591
+ const headerGroupProps = headerGroup.getHeaderGroupProps({
592
+ className: 'iui-table-row',
593
+ });
594
+ return React.createElement(
595
+ Box,
596
+ {
597
+ as: 'div',
598
+ ref: headerRef,
599
+ onScroll: () => {
600
+ if (headerRef.current && bodyRef.current) {
601
+ bodyRef.current.scrollLeft = headerRef.current.scrollLeft;
602
+ updateStickyState();
603
+ }
604
+ },
605
+ key: headerGroupProps.key,
606
+ ...headerWrapperProps,
607
+ className: cx(
608
+ 'iui-table-header-wrapper',
609
+ headerWrapperProps?.className,
610
+ ),
611
+ },
612
+ React.createElement(
613
+ Box,
614
+ {
615
+ as: 'div',
616
+ ...headerProps,
617
+ className: cx('iui-table-header', headerProps?.className),
618
+ },
619
+ React.createElement(
620
+ Box,
621
+ { ...headerGroupProps },
622
+ headerGroup.headers.map((column, index) => {
623
+ const { onClick, ...restSortProps } =
624
+ column.getSortByToggleProps();
625
+ const columnProps = column.getHeaderProps({
626
+ ...restSortProps,
627
+ className: cx(
628
+ 'iui-table-cell',
629
+ {
630
+ 'iui-actionable': column.canSort,
631
+ 'iui-sorted': column.isSorted,
632
+ 'iui-table-cell-sticky': !!column.sticky,
633
+ },
634
+ column.columnClassName,
635
+ ),
636
+ style: {
637
+ ...getCellStyle(column, !!state.isTableResizing),
638
+ ...getStickyStyle(column, visibleColumns),
639
+ flexWrap: 'unset',
640
+ },
401
641
  });
402
- return (React.createElement("div", { className: 'iui-table-header-wrapper', ref: headerRef, onScroll: () => {
403
- if (headerRef.current && bodyRef.current) {
404
- bodyRef.current.scrollLeft = headerRef.current.scrollLeft;
405
- updateStickyState();
406
- }
407
- }, key: headerGroupProps.key },
408
- React.createElement("div", { className: 'iui-table-header' },
409
- React.createElement("div", { ...headerGroupProps }, headerGroup.headers.map((column, index) => {
410
- const { onClick, ...restSortProps } = column.getSortByToggleProps();
411
- const columnProps = column.getHeaderProps({
412
- ...restSortProps,
413
- className: cx('iui-table-cell', {
414
- 'iui-actionable': column.canSort,
415
- 'iui-sorted': column.isSorted,
416
- 'iui-table-cell-sticky': !!column.sticky,
417
- }, column.columnClassName),
418
- style: {
419
- ...getCellStyle(column, !!state.isTableResizing),
420
- ...getStickyStyle(column, visibleColumns),
421
- flexWrap: 'unset',
422
- },
423
- });
424
- return (React.createElement("div", { ...columnProps, ...column.getDragAndDropProps(), key: columnProps.key, title: undefined, ref: (el) => {
425
- if (el) {
426
- columnRefs.current[column.id] = el;
427
- column.resizeWidth =
428
- el.getBoundingClientRect().width;
429
- }
430
- }, onMouseDown: () => {
431
- isHeaderDirectClick.current = true;
432
- }, onClick: (e) => {
433
- // Prevents from triggering sort when resizing and mouse is released in the middle of header
434
- if (isHeaderDirectClick.current) {
435
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
436
- isHeaderDirectClick.current = false;
437
- }
438
- }, tabIndex: showSortButton(column) ? 0 : undefined, onKeyDown: (e) => {
439
- if (e.key == 'Enter' && showSortButton(column)) {
440
- column.toggleSortBy();
441
- }
442
- } },
443
- column.render('Header'),
444
- (showFilterButton(column) ||
445
- showSortButton(column)) && (React.createElement("div", { className: 'iui-table-header-actions-container' },
446
- showFilterButton(column) && (React.createElement(FilterToggle, { column: column })),
447
- showSortButton(column) && (React.createElement("div", { className: 'iui-table-cell-end-icon' }, column.isSortedDesc ||
448
- (!column.isSorted && column.sortDescFirst) ? (React.createElement(SvgSortDown, { className: 'iui-table-sort', "aria-hidden": true })) : (React.createElement(SvgSortUp, { className: 'iui-table-sort', "aria-hidden": true })))))),
449
- isResizable &&
450
- column.isResizerVisible &&
451
- (index !== headerGroup.headers.length - 1 ||
452
- columnResizeMode === 'expand') && (React.createElement("div", { ...column.getResizerProps(), className: 'iui-table-resizer' },
453
- React.createElement("div", { className: 'iui-table-resizer-bar' }))),
454
- enableColumnReordering &&
455
- !column.disableReordering && (React.createElement("div", { className: 'iui-table-reorder-bar' })),
456
- column.sticky === 'left' &&
457
- state.sticky.isScrolledToRight && (React.createElement("div", { className: 'iui-table-cell-shadow-right' })),
458
- column.sticky === 'right' &&
459
- state.sticky.isScrolledToLeft && (React.createElement("div", { className: 'iui-table-cell-shadow-left' }))));
460
- })))));
461
- }),
462
- React.createElement("div", { ...getTableBodyProps({
463
- className: cx('iui-table-body', {
464
- 'iui-zebra-striping': styleType === 'zebra-rows',
642
+ return React.createElement(
643
+ Box,
644
+ {
645
+ ...columnProps,
646
+ ...column.getDragAndDropProps(),
647
+ key: columnProps.key,
648
+ title: undefined,
649
+ ref: (el) => {
650
+ if (el) {
651
+ columnRefs.current[column.id] = el;
652
+ column.resizeWidth = el.getBoundingClientRect().width;
653
+ }
654
+ },
655
+ onMouseDown: () => {
656
+ isHeaderDirectClick.current = true;
657
+ },
658
+ onClick: (e) => {
659
+ // Prevents from triggering sort when resizing and mouse is released in the middle of header
660
+ if (isHeaderDirectClick.current) {
661
+ onClick?.(e);
662
+ isHeaderDirectClick.current = false;
663
+ }
664
+ },
665
+ tabIndex: showSortButton(column) ? 0 : undefined,
666
+ onKeyDown: (e) => {
667
+ if (e.key == 'Enter' && showSortButton(column)) {
668
+ column.toggleSortBy();
669
+ }
670
+ },
671
+ },
672
+ column.render('Header'),
673
+ (showFilterButton(column) || showSortButton(column)) &&
674
+ React.createElement(
675
+ Box,
676
+ { className: 'iui-table-header-actions-container' },
677
+ showFilterButton(column) &&
678
+ React.createElement(FilterToggle, { column: column }),
679
+ showSortButton(column) &&
680
+ React.createElement(
681
+ Box,
682
+ { className: 'iui-table-cell-end-icon' },
683
+ column.isSortedDesc ||
684
+ (!column.isSorted && column.sortDescFirst)
685
+ ? React.createElement(SvgSortDown, {
686
+ className: 'iui-table-sort',
687
+ 'aria-hidden': true,
688
+ })
689
+ : React.createElement(SvgSortUp, {
690
+ className: 'iui-table-sort',
691
+ 'aria-hidden': true,
692
+ }),
693
+ ),
694
+ ),
695
+ isResizable &&
696
+ column.isResizerVisible &&
697
+ (index !== headerGroup.headers.length - 1 ||
698
+ columnResizeMode === 'expand') &&
699
+ React.createElement(
700
+ Box,
701
+ {
702
+ ...column.getResizerProps(),
703
+ className: 'iui-table-resizer',
704
+ },
705
+ React.createElement(Box, {
706
+ className: 'iui-table-resizer-bar',
707
+ }),
708
+ ),
709
+ enableColumnReordering &&
710
+ !column.disableReordering &&
711
+ React.createElement(Box, {
712
+ className: 'iui-table-reorder-bar',
713
+ }),
714
+ column.sticky === 'left' &&
715
+ state.sticky.isScrolledToRight &&
716
+ React.createElement(Box, {
717
+ className: 'iui-table-cell-shadow-right',
465
718
  }),
466
- style: { outline: 0 },
467
- }), ref: bodyRef, onScroll: () => {
468
- if (headerRef.current && bodyRef.current) {
469
- headerRef.current.scrollLeft = bodyRef.current.scrollLeft;
470
- updateStickyState();
471
- }
472
- }, tabIndex: -1, "aria-multiselectable": (isSelectable && selectionMode === 'multi') || undefined },
473
- data.length !== 0 && (React.createElement(React.Fragment, null, enableVirtualization ? (React.createElement(VirtualScroll, { itemsLength: page.length, itemRenderer: virtualizedItemRenderer, scrollToIndex: scrollToIndex })) : (page.map((_, index) => getPreparedRow(index))))),
474
- isLoading && data.length === 0 && (React.createElement("div", { className: 'iui-table-empty' },
475
- React.createElement(ProgressRadial, { indeterminate: true }))),
476
- isLoading && data.length !== 0 && (React.createElement("div", { className: 'iui-table-row' },
477
- React.createElement("div", { className: 'iui-table-cell', style: { justifyContent: 'center' } },
478
- React.createElement(ProgressRadial, { indeterminate: true, size: 'small', style: { float: 'none', marginLeft: 0 } })))),
479
- !isLoading && data.length === 0 && !areFiltersSet && (React.createElement("div", { className: 'iui-table-empty' },
480
- React.createElement("div", null, emptyTableContent))),
481
- !isLoading &&
482
- (data.length === 0 || rows.length === 0) &&
483
- areFiltersSet && (React.createElement("div", { className: 'iui-table-empty' },
484
- React.createElement("div", null, emptyFilteredTableContent)))), paginatorRenderer === null || paginatorRenderer === void 0 ? void 0 :
485
- paginatorRenderer(paginatorRendererProps))));
719
+ column.sticky === 'right' &&
720
+ state.sticky.isScrolledToLeft &&
721
+ React.createElement(Box, {
722
+ className: 'iui-table-cell-shadow-left',
723
+ }),
724
+ );
725
+ }),
726
+ ),
727
+ ),
728
+ );
729
+ }),
730
+ React.createElement(
731
+ Box,
732
+ {
733
+ ...bodyProps,
734
+ ...getTableBodyProps({
735
+ className: cx(
736
+ 'iui-table-body',
737
+ {
738
+ 'iui-zebra-striping': styleType === 'zebra-rows',
739
+ },
740
+ bodyProps?.className,
741
+ ),
742
+ style: { outline: 0 },
743
+ }),
744
+ ref: bodyRef,
745
+ onScroll: () => {
746
+ if (headerRef.current && bodyRef.current) {
747
+ headerRef.current.scrollLeft = bodyRef.current.scrollLeft;
748
+ updateStickyState();
749
+ }
750
+ },
751
+ tabIndex: -1,
752
+ 'aria-multiselectable':
753
+ (isSelectable && selectionMode === 'multi') || undefined,
754
+ },
755
+ data.length !== 0 &&
756
+ React.createElement(
757
+ React.Fragment,
758
+ null,
759
+ enableVirtualization
760
+ ? React.createElement(VirtualScroll, {
761
+ itemsLength: page.length,
762
+ itemRenderer: virtualizedItemRenderer,
763
+ scrollToIndex: scrollToIndex,
764
+ })
765
+ : page.map((_, index) => getPreparedRow(index)),
766
+ ),
767
+ isLoading &&
768
+ data.length === 0 &&
769
+ React.createElement(
770
+ Box,
771
+ {
772
+ as: 'div',
773
+ ...emptyTableContentProps,
774
+ className: cx(
775
+ 'iui-table-empty',
776
+ emptyTableContentProps?.className,
777
+ ),
778
+ },
779
+ React.createElement(ProgressRadial, { indeterminate: true }),
780
+ ),
781
+ isLoading &&
782
+ data.length !== 0 &&
783
+ React.createElement(
784
+ Box,
785
+ { className: 'iui-table-row' },
786
+ React.createElement(
787
+ Box,
788
+ {
789
+ className: 'iui-table-cell',
790
+ style: { justifyContent: 'center' },
791
+ },
792
+ React.createElement(ProgressRadial, {
793
+ indeterminate: true,
794
+ size: 'small',
795
+ }),
796
+ ),
797
+ ),
798
+ !isLoading &&
799
+ data.length === 0 &&
800
+ !areFiltersSet &&
801
+ React.createElement(
802
+ Box,
803
+ {
804
+ as: 'div',
805
+ ...emptyTableContentProps,
806
+ className: cx(
807
+ 'iui-table-empty',
808
+ emptyTableContentProps?.className,
809
+ ),
810
+ },
811
+ React.createElement('div', null, emptyTableContent),
812
+ ),
813
+ !isLoading &&
814
+ (data.length === 0 || rows.length === 0) &&
815
+ areFiltersSet &&
816
+ React.createElement(
817
+ Box,
818
+ {
819
+ as: 'div',
820
+ ...emptyTableContentProps,
821
+ className: cx(
822
+ 'iui-table-empty',
823
+ emptyTableContentProps?.className,
824
+ ),
825
+ },
826
+ React.createElement('div', null, emptyFilteredTableContent),
827
+ ),
828
+ ),
829
+ paginatorRenderer?.(paginatorRendererProps),
830
+ ),
831
+ );
486
832
  };
487
833
  export default Table;