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

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 (453) hide show
  1. package/README.md +4 -22
  2. package/cjs/core/Alert/Alert.d.ts +7 -6
  3. package/cjs/core/Alert/Alert.js +13 -8
  4. package/cjs/core/Avatar/Avatar.d.ts +69 -0
  5. package/cjs/core/{UserIcon/UserIcon.js → Avatar/Avatar.js} +15 -11
  6. package/cjs/core/Avatar/index.d.ts +4 -0
  7. package/cjs/core/{UserIcon → Avatar}/index.js +5 -4
  8. package/cjs/core/AvatarGroup/AvatarGroup.d.ts +70 -0
  9. package/cjs/core/{UserIconGroup/UserIconGroup.js → AvatarGroup/AvatarGroup.js} +23 -19
  10. package/cjs/core/AvatarGroup/index.d.ts +4 -0
  11. package/cjs/core/{UserIconGroup → AvatarGroup}/index.js +5 -4
  12. package/cjs/core/Badge/Badge.js +2 -4
  13. package/cjs/core/Breadcrumbs/Breadcrumbs.js +1 -2
  14. package/cjs/core/ButtonGroup/ButtonGroup.d.ts +1 -1
  15. package/cjs/core/Buttons/Button/Button.js +5 -14
  16. package/cjs/core/Buttons/DropdownButton/DropdownButton.js +1 -3
  17. package/cjs/core/Buttons/IconButton/IconButton.js +3 -9
  18. package/cjs/core/Buttons/IdeasButton/IdeasButton.js +1 -2
  19. package/cjs/core/Buttons/SplitButton/SplitButton.js +4 -8
  20. package/cjs/core/Carousel/CarouselNavigation.js +3 -4
  21. package/cjs/core/Checkbox/Checkbox.d.ts +1 -29
  22. package/cjs/core/Checkbox/Checkbox.js +3 -3
  23. package/cjs/core/ColorPicker/ColorBuilder.js +16 -27
  24. package/cjs/core/ColorPicker/ColorInputPanel.js +1 -2
  25. package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
  26. package/cjs/core/ColorPicker/ColorSwatch.js +1 -6
  27. package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
  28. package/cjs/core/ComboBox/ComboBoxEndIcon.js +1 -2
  29. package/cjs/core/ComboBox/ComboBoxMenu.js +2 -4
  30. package/cjs/core/DatePicker/DatePicker.js +4 -8
  31. package/cjs/core/Dialog/Dialog.d.ts +4 -4
  32. package/cjs/core/Dialog/Dialog.js +1 -1
  33. package/cjs/core/Dialog/DialogBackdrop.d.ts +1 -1
  34. package/cjs/core/Dialog/DialogBackdrop.js +5 -2
  35. package/cjs/core/Dialog/DialogMain.d.ts +1 -1
  36. package/cjs/core/Dialog/DialogMain.js +7 -1
  37. package/cjs/core/Dialog/DialogTitleBar.d.ts +1 -1
  38. package/cjs/core/Dialog/DialogTitleBar.js +1 -2
  39. package/cjs/core/ExpandableBlock/ExpandableBlock.js +5 -6
  40. package/cjs/core/FileUpload/FileUploadTemplate.js +1 -2
  41. package/cjs/core/Header/Header.d.ts +16 -6
  42. package/cjs/core/Header/Header.js +9 -12
  43. package/cjs/core/Header/HeaderBasicButton.d.ts +6 -0
  44. package/cjs/core/Header/HeaderBasicButton.js +52 -0
  45. package/cjs/core/Header/HeaderBreadcrumbs.js +6 -5
  46. package/cjs/core/Header/HeaderButton.d.ts +3 -2
  47. package/cjs/core/Header/HeaderButton.js +10 -18
  48. package/cjs/core/Header/HeaderDropdownButton.d.ts +6 -0
  49. package/cjs/core/Header/HeaderDropdownButton.js +53 -0
  50. package/cjs/core/Header/HeaderLogo.js +3 -3
  51. package/cjs/core/Header/HeaderSplitButton.d.ts +6 -0
  52. package/cjs/core/Header/HeaderSplitButton.js +54 -0
  53. package/cjs/core/InformationPanel/InformationPanelHeader.js +1 -2
  54. package/cjs/core/Input/Input.d.ts +1 -1
  55. package/cjs/core/Input/Input.js +3 -4
  56. package/cjs/core/InputGroup/InputGroup.d.ts +1 -1
  57. package/cjs/core/InputGroup/InputGroup.js +1 -1
  58. package/cjs/core/Label/Label.d.ts +1 -1
  59. package/cjs/core/Label/Label.js +1 -1
  60. package/cjs/core/LabeledInput/LabeledInput.d.ts +2 -2
  61. package/cjs/core/LabeledInput/LabeledInput.js +1 -1
  62. package/cjs/core/LabeledSelect/LabeledSelect.d.ts +1 -1
  63. package/cjs/core/LabeledSelect/LabeledSelect.js +1 -1
  64. package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +1 -1
  65. package/cjs/core/LabeledTextarea/LabeledTextarea.js +1 -1
  66. package/cjs/core/Menu/MenuItem.js +1 -2
  67. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -4
  68. package/cjs/core/Radio/Radio.d.ts +1 -29
  69. package/cjs/core/Radio/Radio.js +3 -3
  70. package/cjs/core/RadioTiles/RadioTileGroup.d.ts +1 -1
  71. package/cjs/core/RadioTiles/RadioTileGroup.js +1 -1
  72. package/cjs/core/Select/Select.d.ts +1 -1
  73. package/cjs/core/Select/Select.js +10 -14
  74. package/cjs/core/Select/SelectTag.d.ts +1 -1
  75. package/cjs/core/Select/SelectTag.js +1 -1
  76. package/cjs/core/SideNavigation/SideNavigation.js +1 -2
  77. package/cjs/core/SideNavigation/SidenavButton.js +1 -2
  78. package/cjs/core/Stepper/Stepper.d.ts +40 -0
  79. package/cjs/core/{Wizard/Wizard.js → Stepper/Stepper.js} +11 -28
  80. package/cjs/core/{Wizard/Step.d.ts → Stepper/StepperStep.d.ts} +6 -7
  81. package/cjs/core/{Wizard/Step.js → Stepper/StepperStep.js} +10 -10
  82. package/cjs/core/Stepper/Wizard.d.ts +46 -0
  83. package/cjs/core/Stepper/Wizard.js +55 -0
  84. package/cjs/core/Stepper/WorkflowDiagram.d.ts +6 -0
  85. package/cjs/core/Stepper/WorkflowDiagram.js +43 -0
  86. package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +5 -0
  87. package/cjs/core/Stepper/WorkflowDiagramStep.js +42 -0
  88. package/cjs/core/Stepper/index.d.ts +8 -0
  89. package/cjs/core/{Wizard → Stepper}/index.js +5 -1
  90. package/cjs/core/Surface/Surface.d.ts +0 -2
  91. package/cjs/core/Surface/Surface.js +10 -10
  92. package/cjs/core/Table/SubRowExpander.js +3 -3
  93. package/cjs/core/Table/Table.d.ts +5 -4
  94. package/cjs/core/Table/Table.js +30 -23
  95. package/cjs/core/Table/TableCell.js +4 -4
  96. package/cjs/core/Table/TablePaginator.js +16 -19
  97. package/cjs/core/Table/TableRowMemoized.d.ts +2 -0
  98. package/cjs/core/Table/TableRowMemoized.js +10 -13
  99. package/cjs/core/Table/cells/DefaultCell.js +4 -9
  100. package/cjs/core/Table/columns/actionColumn.js +3 -3
  101. package/cjs/core/Table/columns/expanderColumn.js +3 -3
  102. package/cjs/core/Table/filters/BaseFilter.js +1 -1
  103. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +1 -2
  104. package/cjs/core/Table/filters/FilterToggle.js +2 -4
  105. package/cjs/core/Table/hooks/useColumnDragAndDrop.js +4 -4
  106. package/cjs/core/Table/hooks/useResizeColumns.js +110 -106
  107. package/cjs/core/Tabs/Tab.d.ts +0 -8
  108. package/cjs/core/Tabs/Tab.js +1 -5
  109. package/cjs/core/Tabs/Tabs.d.ts +32 -12
  110. package/cjs/core/Tabs/Tabs.js +16 -12
  111. package/cjs/core/Tabs/index.d.ts +4 -4
  112. package/cjs/core/Tabs/index.js +2 -2
  113. package/cjs/core/Tag/Tag.js +1 -2
  114. package/cjs/core/Textarea/Textarea.d.ts +1 -1
  115. package/cjs/core/Textarea/Textarea.js +2 -2
  116. package/cjs/core/ThemeProvider/ThemeProvider.d.ts +27 -17
  117. package/cjs/core/ThemeProvider/ThemeProvider.js +64 -7
  118. package/cjs/core/Tile/Tile.d.ts +19 -1
  119. package/cjs/core/Tile/Tile.js +36 -16
  120. package/cjs/core/Toast/Toast.d.ts +3 -3
  121. package/cjs/core/Toast/Toast.js +4 -5
  122. package/cjs/core/Toast/ToastWrapper.d.ts +1 -1
  123. package/cjs/core/Toast/ToastWrapper.js +1 -1
  124. package/cjs/core/Tree/TreeNode.js +1 -7
  125. package/cjs/core/Tree/TreeNodeExpander.js +2 -2
  126. package/cjs/core/Typography/Body/Body.d.ts +5 -3
  127. package/cjs/core/Typography/Body/Body.js +2 -3
  128. package/cjs/core/Typography/Headline/Headline.d.ts +2 -3
  129. package/cjs/core/Typography/Headline/Headline.js +2 -3
  130. package/cjs/core/Typography/Leading/Leading.d.ts +2 -3
  131. package/cjs/core/Typography/Leading/Leading.js +2 -3
  132. package/cjs/core/Typography/Small/Small.d.ts +2 -3
  133. package/cjs/core/Typography/Small/Small.js +2 -3
  134. package/cjs/core/Typography/Subheading/Subheading.d.ts +2 -3
  135. package/cjs/core/Typography/Subheading/Subheading.js +2 -3
  136. package/cjs/core/Typography/Text/Text.d.ts +2 -0
  137. package/cjs/core/Typography/Text/Text.js +2 -0
  138. package/cjs/core/Typography/Title/Title.d.ts +2 -3
  139. package/cjs/core/Typography/Title/Title.js +2 -3
  140. package/cjs/core/index.d.ts +8 -8
  141. package/cjs/core/index.js +14 -10
  142. package/cjs/core/utils/components/Popover.d.ts +2 -2
  143. package/cjs/core/utils/components/Popover.js +1 -1
  144. package/cjs/core/utils/components/Resizer.d.ts +5 -0
  145. package/cjs/core/utils/components/Resizer.js +7 -1
  146. package/cjs/core/utils/components/VisuallyHidden.d.ts +1 -0
  147. package/cjs/core/utils/components/VisuallyHidden.js +1 -0
  148. package/cjs/core/utils/components/index.d.ts +0 -1
  149. package/cjs/core/utils/components/index.js +0 -1
  150. package/cjs/core/utils/functions/colors.d.ts +12 -12
  151. package/cjs/core/utils/functions/colors.js +12 -12
  152. package/cjs/core/utils/hooks/index.d.ts +1 -0
  153. package/cjs/core/utils/hooks/index.js +1 -0
  154. package/cjs/core/utils/hooks/useIsomorphicLayoutEffect.d.ts +7 -0
  155. package/cjs/core/utils/hooks/useIsomorphicLayoutEffect.js +17 -0
  156. package/cjs/core/utils/hooks/useMediaQuery.js +2 -1
  157. package/cjs/core/utils/hooks/useTheme.d.ts +20 -3
  158. package/cjs/core/utils/hooks/useTheme.js +57 -58
  159. package/cjs/core/utils/{components/icons.d.ts → icons/StatusIconMap.d.ts} +1 -1
  160. package/cjs/core/utils/icons/StatusIconMap.js +52 -0
  161. package/cjs/core/utils/icons/SvgCalendar.d.ts +2 -0
  162. package/cjs/core/utils/icons/SvgCalendar.js +47 -0
  163. package/cjs/core/utils/icons/SvgCaretDownSmall.d.ts +2 -0
  164. package/cjs/core/utils/icons/SvgCaretDownSmall.js +47 -0
  165. package/cjs/core/utils/icons/SvgCaretRightSmall.d.ts +2 -0
  166. package/cjs/core/utils/icons/SvgCaretRightSmall.js +47 -0
  167. package/cjs/core/utils/icons/SvgCaretUpSmall.d.ts +2 -0
  168. package/cjs/core/utils/icons/SvgCaretUpSmall.js +47 -0
  169. package/cjs/core/utils/icons/SvgCheckmark.d.ts +2 -0
  170. package/cjs/core/utils/icons/SvgCheckmark.js +47 -0
  171. package/cjs/core/utils/icons/SvgCheckmarkSmall.d.ts +2 -0
  172. package/cjs/core/utils/icons/SvgCheckmarkSmall.js +47 -0
  173. package/cjs/core/utils/icons/SvgChevronLeft.d.ts +2 -0
  174. package/cjs/core/utils/icons/SvgChevronLeft.js +47 -0
  175. package/cjs/core/utils/icons/SvgChevronLeftDouble.d.ts +2 -0
  176. package/cjs/core/utils/icons/SvgChevronLeftDouble.js +47 -0
  177. package/cjs/core/utils/icons/SvgChevronRight.d.ts +2 -0
  178. package/cjs/core/utils/icons/SvgChevronRight.js +47 -0
  179. package/cjs/core/utils/icons/SvgChevronRightDouble.d.ts +2 -0
  180. package/cjs/core/utils/icons/SvgChevronRightDouble.js +47 -0
  181. package/cjs/core/utils/icons/SvgClose.d.ts +2 -0
  182. package/cjs/core/utils/icons/SvgClose.js +47 -0
  183. package/cjs/core/utils/icons/SvgCloseSmall.d.ts +2 -0
  184. package/cjs/core/utils/icons/SvgCloseSmall.js +47 -0
  185. package/cjs/core/utils/icons/SvgColumnManager.d.ts +2 -0
  186. package/cjs/core/utils/icons/SvgColumnManager.js +47 -0
  187. package/cjs/core/utils/icons/SvgFilter.d.ts +2 -0
  188. package/cjs/core/utils/icons/SvgFilter.js +47 -0
  189. package/cjs/core/utils/icons/SvgFilterHollow.d.ts +2 -0
  190. package/cjs/core/utils/icons/SvgFilterHollow.js +47 -0
  191. package/cjs/core/utils/icons/SvgImportantSmall.d.ts +2 -0
  192. package/cjs/core/utils/icons/SvgImportantSmall.js +47 -0
  193. package/cjs/core/utils/icons/SvgInfoCircular.d.ts +2 -0
  194. package/cjs/core/utils/icons/SvgInfoCircular.js +47 -0
  195. package/cjs/core/utils/icons/SvgMore.d.ts +2 -0
  196. package/cjs/core/utils/icons/SvgMore.js +47 -0
  197. package/cjs/core/utils/icons/SvgMoreVertical.d.ts +2 -0
  198. package/cjs/core/utils/icons/SvgMoreVertical.js +47 -0
  199. package/cjs/core/utils/icons/SvgNew.d.ts +2 -0
  200. package/cjs/core/utils/icons/SvgNew.js +47 -0
  201. package/cjs/core/utils/icons/SvgSmileyHappy.d.ts +2 -0
  202. package/cjs/core/utils/icons/SvgSmileyHappy.js +47 -0
  203. package/cjs/core/utils/icons/SvgSortDown.d.ts +2 -0
  204. package/cjs/core/utils/icons/SvgSortDown.js +47 -0
  205. package/cjs/core/utils/icons/SvgSortUp.d.ts +2 -0
  206. package/cjs/core/utils/icons/SvgSortUp.js +47 -0
  207. package/cjs/core/utils/icons/SvgStatusError.d.ts +2 -0
  208. package/cjs/core/utils/icons/SvgStatusError.js +47 -0
  209. package/cjs/core/utils/icons/SvgStatusSuccess.d.ts +2 -0
  210. package/cjs/core/utils/icons/SvgStatusSuccess.js +47 -0
  211. package/cjs/core/utils/icons/SvgStatusWarning.d.ts +2 -0
  212. package/cjs/core/utils/icons/SvgStatusWarning.js +47 -0
  213. package/cjs/core/utils/icons/SvgSwap.d.ts +2 -0
  214. package/cjs/core/utils/icons/SvgSwap.js +47 -0
  215. package/cjs/core/utils/icons/SvgUpload.d.ts +2 -0
  216. package/cjs/core/utils/icons/SvgUpload.js +47 -0
  217. package/cjs/core/utils/icons/index.d.ts +29 -0
  218. package/cjs/core/utils/icons/index.js +49 -0
  219. package/cjs/core/utils/index.d.ts +1 -0
  220. package/cjs/core/utils/index.js +1 -0
  221. package/esm/core/Alert/Alert.d.ts +7 -6
  222. package/esm/core/Alert/Alert.js +14 -9
  223. package/esm/core/Avatar/Avatar.d.ts +69 -0
  224. package/esm/core/{UserIcon/UserIcon.js → Avatar/Avatar.js} +13 -9
  225. package/esm/core/Avatar/index.d.ts +4 -0
  226. package/esm/core/{UserIcon → Avatar}/index.js +2 -2
  227. package/esm/core/AvatarGroup/AvatarGroup.d.ts +70 -0
  228. package/esm/core/{UserIconGroup/UserIconGroup.js → AvatarGroup/AvatarGroup.js} +21 -17
  229. package/esm/core/AvatarGroup/index.d.ts +4 -0
  230. package/esm/core/{UserIconGroup → AvatarGroup}/index.js +2 -2
  231. package/esm/core/Badge/Badge.js +3 -5
  232. package/esm/core/Breadcrumbs/Breadcrumbs.js +1 -2
  233. package/esm/core/ButtonGroup/ButtonGroup.d.ts +1 -1
  234. package/esm/core/Buttons/Button/Button.js +5 -14
  235. package/esm/core/Buttons/DropdownButton/DropdownButton.js +2 -4
  236. package/esm/core/Buttons/IconButton/IconButton.js +3 -9
  237. package/esm/core/Buttons/IdeasButton/IdeasButton.js +2 -3
  238. package/esm/core/Buttons/SplitButton/SplitButton.js +5 -9
  239. package/esm/core/Carousel/CarouselNavigation.js +1 -2
  240. package/esm/core/Checkbox/Checkbox.d.ts +1 -29
  241. package/esm/core/Checkbox/Checkbox.js +3 -3
  242. package/esm/core/ColorPicker/ColorBuilder.js +17 -28
  243. package/esm/core/ColorPicker/ColorInputPanel.js +1 -2
  244. package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
  245. package/esm/core/ColorPicker/ColorSwatch.js +2 -7
  246. package/esm/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
  247. package/esm/core/ComboBox/ComboBoxEndIcon.js +1 -2
  248. package/esm/core/ComboBox/ComboBoxMenu.js +2 -4
  249. package/esm/core/DatePicker/DatePicker.js +1 -5
  250. package/esm/core/Dialog/Dialog.d.ts +4 -4
  251. package/esm/core/Dialog/Dialog.js +1 -1
  252. package/esm/core/Dialog/DialogBackdrop.d.ts +1 -1
  253. package/esm/core/Dialog/DialogBackdrop.js +5 -2
  254. package/esm/core/Dialog/DialogMain.d.ts +1 -1
  255. package/esm/core/Dialog/DialogMain.js +7 -1
  256. package/esm/core/Dialog/DialogTitleBar.d.ts +1 -1
  257. package/esm/core/Dialog/DialogTitleBar.js +1 -2
  258. package/esm/core/ExpandableBlock/ExpandableBlock.js +5 -6
  259. package/esm/core/FileUpload/FileUploadTemplate.js +1 -2
  260. package/esm/core/Header/Header.d.ts +16 -6
  261. package/esm/core/Header/Header.js +9 -12
  262. package/esm/core/Header/HeaderBasicButton.d.ts +6 -0
  263. package/esm/core/Header/HeaderBasicButton.js +46 -0
  264. package/esm/core/Header/HeaderBreadcrumbs.js +7 -6
  265. package/esm/core/Header/HeaderButton.d.ts +3 -2
  266. package/esm/core/Header/HeaderButton.js +10 -18
  267. package/esm/core/Header/HeaderDropdownButton.d.ts +6 -0
  268. package/esm/core/Header/HeaderDropdownButton.js +47 -0
  269. package/esm/core/Header/HeaderLogo.js +3 -3
  270. package/esm/core/Header/HeaderSplitButton.d.ts +6 -0
  271. package/esm/core/Header/HeaderSplitButton.js +48 -0
  272. package/esm/core/InformationPanel/InformationPanelHeader.js +1 -2
  273. package/esm/core/Input/Input.d.ts +1 -1
  274. package/esm/core/Input/Input.js +3 -4
  275. package/esm/core/InputGroup/InputGroup.d.ts +1 -1
  276. package/esm/core/InputGroup/InputGroup.js +1 -1
  277. package/esm/core/Label/Label.d.ts +1 -1
  278. package/esm/core/Label/Label.js +1 -1
  279. package/esm/core/LabeledInput/LabeledInput.d.ts +2 -2
  280. package/esm/core/LabeledInput/LabeledInput.js +1 -1
  281. package/esm/core/LabeledSelect/LabeledSelect.d.ts +1 -1
  282. package/esm/core/LabeledSelect/LabeledSelect.js +1 -1
  283. package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +1 -1
  284. package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -1
  285. package/esm/core/Menu/MenuItem.js +1 -2
  286. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +3 -5
  287. package/esm/core/Radio/Radio.d.ts +1 -29
  288. package/esm/core/Radio/Radio.js +3 -3
  289. package/esm/core/RadioTiles/RadioTileGroup.d.ts +1 -1
  290. package/esm/core/RadioTiles/RadioTileGroup.js +1 -1
  291. package/esm/core/Select/Select.d.ts +1 -1
  292. package/esm/core/Select/Select.js +10 -14
  293. package/esm/core/Select/SelectTag.d.ts +1 -1
  294. package/esm/core/Select/SelectTag.js +1 -1
  295. package/esm/core/SideNavigation/SideNavigation.js +1 -2
  296. package/esm/core/SideNavigation/SidenavButton.js +1 -2
  297. package/esm/core/Stepper/Stepper.d.ts +40 -0
  298. package/esm/core/{Wizard/Wizard.js → Stepper/Stepper.js} +10 -27
  299. package/esm/core/{Wizard/Step.d.ts → Stepper/StepperStep.d.ts} +6 -7
  300. package/esm/core/{Wizard/Step.js → Stepper/StepperStep.js} +8 -8
  301. package/esm/core/Stepper/Wizard.d.ts +46 -0
  302. package/esm/core/Stepper/Wizard.js +49 -0
  303. package/esm/core/Stepper/WorkflowDiagram.d.ts +6 -0
  304. package/esm/core/Stepper/WorkflowDiagram.js +37 -0
  305. package/esm/core/Stepper/WorkflowDiagramStep.d.ts +5 -0
  306. package/esm/core/Stepper/WorkflowDiagramStep.js +35 -0
  307. package/esm/core/Stepper/index.d.ts +8 -0
  308. package/esm/core/{Wizard → Stepper}/index.js +2 -0
  309. package/esm/core/Surface/Surface.d.ts +0 -2
  310. package/esm/core/Surface/Surface.js +11 -11
  311. package/esm/core/Table/SubRowExpander.js +2 -2
  312. package/esm/core/Table/Table.d.ts +5 -4
  313. package/esm/core/Table/Table.js +31 -24
  314. package/esm/core/Table/TableCell.js +4 -4
  315. package/esm/core/Table/TablePaginator.js +15 -18
  316. package/esm/core/Table/TableRowMemoized.d.ts +2 -0
  317. package/esm/core/Table/TableRowMemoized.js +10 -13
  318. package/esm/core/Table/cells/DefaultCell.js +4 -9
  319. package/esm/core/Table/columns/actionColumn.js +2 -2
  320. package/esm/core/Table/columns/expanderColumn.js +2 -2
  321. package/esm/core/Table/filters/BaseFilter.js +1 -1
  322. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +1 -2
  323. package/esm/core/Table/filters/FilterToggle.js +2 -4
  324. package/esm/core/Table/hooks/useColumnDragAndDrop.js +4 -4
  325. package/esm/core/Table/hooks/useResizeColumns.js +110 -106
  326. package/esm/core/Tabs/Tab.d.ts +0 -8
  327. package/esm/core/Tabs/Tab.js +0 -4
  328. package/esm/core/Tabs/Tabs.d.ts +32 -12
  329. package/esm/core/Tabs/Tabs.js +17 -13
  330. package/esm/core/Tabs/index.d.ts +4 -4
  331. package/esm/core/Tabs/index.js +2 -2
  332. package/esm/core/Tag/Tag.js +1 -2
  333. package/esm/core/Textarea/Textarea.d.ts +1 -1
  334. package/esm/core/Textarea/Textarea.js +2 -2
  335. package/esm/core/ThemeProvider/ThemeProvider.d.ts +27 -17
  336. package/esm/core/ThemeProvider/ThemeProvider.js +64 -6
  337. package/esm/core/Tile/Tile.d.ts +19 -1
  338. package/esm/core/Tile/Tile.js +36 -16
  339. package/esm/core/Toast/Toast.d.ts +3 -3
  340. package/esm/core/Toast/Toast.js +4 -5
  341. package/esm/core/Toast/ToastWrapper.d.ts +1 -1
  342. package/esm/core/Toast/ToastWrapper.js +1 -1
  343. package/esm/core/Tree/TreeNode.js +2 -8
  344. package/esm/core/Tree/TreeNodeExpander.js +1 -1
  345. package/esm/core/Typography/Body/Body.d.ts +5 -3
  346. package/esm/core/Typography/Body/Body.js +2 -3
  347. package/esm/core/Typography/Headline/Headline.d.ts +2 -3
  348. package/esm/core/Typography/Headline/Headline.js +2 -3
  349. package/esm/core/Typography/Leading/Leading.d.ts +2 -3
  350. package/esm/core/Typography/Leading/Leading.js +2 -3
  351. package/esm/core/Typography/Small/Small.d.ts +2 -3
  352. package/esm/core/Typography/Small/Small.js +2 -3
  353. package/esm/core/Typography/Subheading/Subheading.d.ts +2 -3
  354. package/esm/core/Typography/Subheading/Subheading.js +2 -3
  355. package/esm/core/Typography/Text/Text.d.ts +2 -0
  356. package/esm/core/Typography/Text/Text.js +2 -0
  357. package/esm/core/Typography/Title/Title.d.ts +2 -3
  358. package/esm/core/Typography/Title/Title.js +2 -3
  359. package/esm/core/index.d.ts +8 -8
  360. package/esm/core/index.js +4 -4
  361. package/esm/core/utils/components/Popover.d.ts +2 -2
  362. package/esm/core/utils/components/Popover.js +1 -1
  363. package/esm/core/utils/components/Resizer.d.ts +5 -0
  364. package/esm/core/utils/components/Resizer.js +7 -1
  365. package/esm/core/utils/components/VisuallyHidden.d.ts +1 -0
  366. package/esm/core/utils/components/VisuallyHidden.js +1 -0
  367. package/esm/core/utils/components/index.d.ts +0 -1
  368. package/esm/core/utils/components/index.js +0 -1
  369. package/esm/core/utils/functions/colors.d.ts +12 -12
  370. package/esm/core/utils/functions/colors.js +12 -12
  371. package/esm/core/utils/hooks/index.d.ts +1 -0
  372. package/esm/core/utils/hooks/index.js +1 -0
  373. package/esm/core/utils/hooks/useIsomorphicLayoutEffect.d.ts +7 -0
  374. package/esm/core/utils/hooks/useIsomorphicLayoutEffect.js +11 -0
  375. package/esm/core/utils/hooks/useMediaQuery.js +2 -1
  376. package/esm/core/utils/hooks/useTheme.d.ts +20 -3
  377. package/esm/core/utils/hooks/useTheme.js +56 -57
  378. package/esm/core/utils/{components/icons.d.ts → icons/StatusIconMap.d.ts} +1 -1
  379. package/esm/core/utils/{components/icons.js → icons/StatusIconMap.js} +5 -5
  380. package/esm/core/utils/icons/SvgCalendar.d.ts +2 -0
  381. package/esm/core/utils/icons/SvgCalendar.js +20 -0
  382. package/esm/core/utils/icons/SvgCaretDownSmall.d.ts +2 -0
  383. package/esm/core/utils/icons/SvgCaretDownSmall.js +20 -0
  384. package/esm/core/utils/icons/SvgCaretRightSmall.d.ts +2 -0
  385. package/esm/core/utils/icons/SvgCaretRightSmall.js +20 -0
  386. package/esm/core/utils/icons/SvgCaretUpSmall.d.ts +2 -0
  387. package/esm/core/utils/icons/SvgCaretUpSmall.js +20 -0
  388. package/esm/core/utils/icons/SvgCheckmark.d.ts +2 -0
  389. package/esm/core/utils/icons/SvgCheckmark.js +20 -0
  390. package/esm/core/utils/icons/SvgCheckmarkSmall.d.ts +2 -0
  391. package/esm/core/utils/icons/SvgCheckmarkSmall.js +20 -0
  392. package/esm/core/utils/icons/SvgChevronLeft.d.ts +2 -0
  393. package/esm/core/utils/icons/SvgChevronLeft.js +20 -0
  394. package/esm/core/utils/icons/SvgChevronLeftDouble.d.ts +2 -0
  395. package/esm/core/utils/icons/SvgChevronLeftDouble.js +20 -0
  396. package/esm/core/utils/icons/SvgChevronRight.d.ts +2 -0
  397. package/esm/core/utils/icons/SvgChevronRight.js +20 -0
  398. package/esm/core/utils/icons/SvgChevronRightDouble.d.ts +2 -0
  399. package/esm/core/utils/icons/SvgChevronRightDouble.js +20 -0
  400. package/esm/core/utils/icons/SvgClose.d.ts +2 -0
  401. package/esm/core/utils/icons/SvgClose.js +20 -0
  402. package/esm/core/utils/icons/SvgCloseSmall.d.ts +2 -0
  403. package/esm/core/utils/icons/SvgCloseSmall.js +20 -0
  404. package/esm/core/utils/icons/SvgColumnManager.d.ts +2 -0
  405. package/esm/core/utils/icons/SvgColumnManager.js +20 -0
  406. package/esm/core/utils/icons/SvgFilter.d.ts +2 -0
  407. package/esm/core/utils/icons/SvgFilter.js +20 -0
  408. package/esm/core/utils/icons/SvgFilterHollow.d.ts +2 -0
  409. package/esm/core/utils/icons/SvgFilterHollow.js +20 -0
  410. package/esm/core/utils/icons/SvgImportantSmall.d.ts +2 -0
  411. package/esm/core/utils/icons/SvgImportantSmall.js +20 -0
  412. package/esm/core/utils/icons/SvgInfoCircular.d.ts +2 -0
  413. package/esm/core/utils/icons/SvgInfoCircular.js +20 -0
  414. package/esm/core/utils/icons/SvgMore.d.ts +2 -0
  415. package/esm/core/utils/icons/SvgMore.js +20 -0
  416. package/esm/core/utils/icons/SvgMoreVertical.d.ts +2 -0
  417. package/esm/core/utils/icons/SvgMoreVertical.js +20 -0
  418. package/esm/core/utils/icons/SvgNew.d.ts +2 -0
  419. package/esm/core/utils/icons/SvgNew.js +20 -0
  420. package/esm/core/utils/icons/SvgSmileyHappy.d.ts +2 -0
  421. package/esm/core/utils/icons/SvgSmileyHappy.js +20 -0
  422. package/esm/core/utils/icons/SvgSortDown.d.ts +2 -0
  423. package/esm/core/utils/icons/SvgSortDown.js +20 -0
  424. package/esm/core/utils/icons/SvgSortUp.d.ts +2 -0
  425. package/esm/core/utils/icons/SvgSortUp.js +20 -0
  426. package/esm/core/utils/icons/SvgStatusError.d.ts +2 -0
  427. package/esm/core/utils/icons/SvgStatusError.js +20 -0
  428. package/esm/core/utils/icons/SvgStatusSuccess.d.ts +2 -0
  429. package/esm/core/utils/icons/SvgStatusSuccess.js +20 -0
  430. package/esm/core/utils/icons/SvgStatusWarning.d.ts +2 -0
  431. package/esm/core/utils/icons/SvgStatusWarning.js +20 -0
  432. package/esm/core/utils/icons/SvgSwap.d.ts +2 -0
  433. package/esm/core/utils/icons/SvgSwap.js +20 -0
  434. package/esm/core/utils/icons/SvgUpload.d.ts +2 -0
  435. package/esm/core/utils/icons/SvgUpload.js +20 -0
  436. package/esm/core/utils/icons/index.d.ts +29 -0
  437. package/esm/core/utils/icons/index.js +33 -0
  438. package/esm/core/utils/index.d.ts +1 -0
  439. package/esm/core/utils/index.js +1 -0
  440. package/package.json +3 -3
  441. package/cjs/core/UserIcon/UserIcon.d.ts +0 -57
  442. package/cjs/core/UserIcon/index.d.ts +0 -4
  443. package/cjs/core/UserIconGroup/UserIconGroup.d.ts +0 -62
  444. package/cjs/core/UserIconGroup/index.d.ts +0 -4
  445. package/cjs/core/Wizard/Wizard.d.ts +0 -54
  446. package/cjs/core/Wizard/index.d.ts +0 -4
  447. package/cjs/core/utils/components/icons.js +0 -32
  448. package/esm/core/UserIcon/UserIcon.d.ts +0 -57
  449. package/esm/core/UserIcon/index.d.ts +0 -4
  450. package/esm/core/UserIconGroup/UserIconGroup.d.ts +0 -62
  451. package/esm/core/UserIconGroup/index.d.ts +0 -4
  452. package/esm/core/Wizard/Wizard.d.ts +0 -54
  453. package/esm/core/Wizard/index.d.ts +0 -4
@@ -3,4 +3,6 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  export { Wizard } from './Wizard';
6
+ export { Stepper } from './Stepper';
7
+ export { WorkflowDiagram } from './WorkflowDiagram';
6
8
  export default './Wizard';
@@ -4,7 +4,6 @@ import '@itwin/itwinui-css/css/surface.css';
4
4
  export declare type SurfaceProps = {
5
5
  /**
6
6
  * Sets the elevation of the surface
7
- * @default 0
8
7
  */
9
8
  elevation?: 0 | 1 | 2 | 3 | 4 | 5;
10
9
  /**
@@ -21,7 +20,6 @@ export declare type SurfaceProps = {
21
20
  export declare const Surface: React.ForwardRefExoticComponent<{
22
21
  /**
23
22
  * Sets the elevation of the surface
24
- * @default 0
25
23
  */
26
24
  elevation?: 0 | 1 | 2 | 3 | 4 | 5 | undefined;
27
25
  /**
@@ -26,25 +26,27 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import React from 'react';
28
28
  import cx from 'classnames';
29
- import { useTheme, getWindow } from '../utils';
29
+ import { useTheme } from '../utils';
30
30
  import '@itwin/itwinui-css/css/surface.css';
31
31
  /**
32
32
  * Helper function that returns one of the preset surface elevation values.
33
33
  */
34
34
  var getSurfaceElevationValue = function (elevation) {
35
35
  switch (elevation) {
36
+ case 0:
37
+ return 'none';
36
38
  case 1:
37
- return '0 1px 5px rgba(0, 0, 0, 0.25)';
39
+ return 'var(--iui-shadow-1)';
38
40
  case 2:
39
- return '0 1px 10px rgba(0, 0, 0, 0.25)';
41
+ return 'var(--iui-shadow-2)';
40
42
  case 3:
41
- return '0 3px 14px rgba(0, 0, 0, 0.25)';
43
+ return 'var(--iui-shadow-3)';
42
44
  case 4:
43
- return '0 6px 30px rgba(0, 0, 0, 0.25)';
45
+ return 'var(--iui-shadow-4)';
44
46
  case 5:
45
- return '0 9px 46px rgba(0, 0, 0, 0.25)';
47
+ return 'var(--iui-shadow-5)';
46
48
  default:
47
- return 'none';
49
+ return '';
48
50
  }
49
51
  };
50
52
  /**
@@ -54,11 +56,9 @@ var getSurfaceElevationValue = function (elevation) {
54
56
  * <Surface elevation={2}>Surface Content</Surface>
55
57
  */
56
58
  export var Surface = React.forwardRef(function (props, ref) {
57
- var _a, _b, _c;
58
- var _d = props.elevation, elevation = _d === void 0 ? 0 : _d, className = props.className, style = props.style, children = props.children, rest = __rest(props, ["elevation", "className", "style", "children"]);
59
+ var elevation = props.elevation, className = props.className, style = props.style, children = props.children, rest = __rest(props, ["elevation", "className", "style", "children"]);
59
60
  useTheme();
60
- var _style = ((_c = (_b = (_a = getWindow()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, "--iui-surface-elevation: ".concat(getSurfaceElevationValue(elevation))))
61
- ? __assign({ '--iui-surface-elevation': getSurfaceElevationValue(elevation) }, style) : __assign({ boxShadow: getSurfaceElevationValue(elevation) }, style);
61
+ var _style = __assign({ '--iui-surface-elevation': getSurfaceElevationValue(elevation) }, style);
62
62
  return (React.createElement("div", __assign({ className: cx('iui-surface', className), style: _style, ref: ref }, rest), children));
63
63
  });
64
64
  export default Surface;
@@ -3,11 +3,11 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import React from 'react';
6
- import SvgChevronRight from '@itwin/itwinui-icons-react/cjs/icons/ChevronRight';
6
+ import { SvgChevronRight } from '../utils';
7
7
  import { IconButton } from '../Buttons';
8
8
  export var SubRowExpander = function (props) {
9
9
  var cell = props.cell, isDisabled = props.isDisabled, cellProps = props.cellProps, expanderCell = props.expanderCell;
10
- return (React.createElement(React.Fragment, null, expanderCell ? (expanderCell(cellProps)) : (React.createElement(IconButton, { style: { marginRight: 8 }, className: 'iui-row-expander', styleType: 'borderless', size: 'small', onClick: function (e) {
10
+ return (React.createElement(React.Fragment, null, expanderCell ? (expanderCell(cellProps)) : (React.createElement(IconButton, { style: { marginRight: 8 }, className: 'iui-table-row-expander', styleType: 'borderless', size: 'small', onClick: function (e) {
11
11
  e.stopPropagation();
12
12
  cell.row.toggleRowExpanded();
13
13
  }, disabled: isDisabled }, React.createElement(SvgChevronRight, { style: {
@@ -35,6 +35,10 @@ export declare type TablePaginatorRendererProps = {
35
35
  * @default false
36
36
  */
37
37
  isLoading?: boolean;
38
+ /**
39
+ * Total number of rows selected (for mutli-selection mode only)
40
+ */
41
+ totalSelectedRowsCount?: number;
38
42
  };
39
43
  /**
40
44
  * Table props.
@@ -83,12 +87,10 @@ export declare type TableProps<T extends Record<string, unknown> = Record<string
83
87
  onSort?: (state: TableState<T>) => void;
84
88
  /**
85
89
  * Callback function when scroll reaches bottom. Can be used for lazy-loading the data.
86
- * If you want to use it in older browsers e.g. IE, then you need to have IntersectionObserver polyfill.
87
90
  */
88
91
  onBottomReached?: () => void;
89
92
  /**
90
93
  * Callback function when row is in viewport.
91
- * If you want to use it in older browsers e.g. IE, then you need to have IntersectionObserver polyfill.
92
94
  */
93
95
  onRowInViewport?: (rowData: T) => void;
94
96
  /**
@@ -137,6 +139,7 @@ export declare type TableProps<T extends Record<string, unknown> = Record<string
137
139
  */
138
140
  rowProps?: (row: Row<T>) => React.ComponentPropsWithRef<'div'> & {
139
141
  status?: 'positive' | 'warning' | 'negative';
142
+ isLoading?: boolean;
140
143
  };
141
144
  /**
142
145
  * Modify the density of the table (adjusts the row height).
@@ -166,8 +169,6 @@ export declare type TableProps<T extends Record<string, unknown> = Record<string
166
169
  /**
167
170
  * Flag whether columns are resizable.
168
171
  * In order to disable resizing for specific column, set `disableResizing: true` for that column.
169
- *
170
- * If you want to use it in older browsers e.g. IE, then you need to have `ResizeObserver` polyfill.
171
172
  * @default false
172
173
  */
173
174
  isResizable?: boolean;
@@ -28,10 +28,8 @@ import React from 'react';
28
28
  import cx from 'classnames';
29
29
  import { actions as TableActions, useFlexLayout, useFilters, useRowSelect, useSortBy, useTable, useExpanded, usePagination, useColumnOrder, useGlobalFilter, } from 'react-table';
30
30
  import { ProgressRadial } from '../ProgressIndicators';
31
- import { useTheme, useResizeObserver } from '../utils';
31
+ import { useTheme, useResizeObserver, SvgSortDown, SvgSortUp, } from '../utils';
32
32
  import '@itwin/itwinui-css/css/table.css';
33
- import SvgSortDown from '@itwin/itwinui-icons-react/cjs/icons/SortDown';
34
- import SvgSortUp from '@itwin/itwinui-icons-react/cjs/icons/SortUp';
35
33
  import { getCellStyle, getStickyStyle } from './utils';
36
34
  import { TableRowMemoized } from './TableRowMemoized';
37
35
  import { FilterToggle } from './filters';
@@ -97,8 +95,7 @@ var flattenColumns = function (columns) {
97
95
  * />
98
96
  */
99
97
  export var Table = function (props) {
100
- var _a;
101
- var data = props.data, columns = props.columns, _b = props.isLoading, isLoading = _b === void 0 ? false : _b, emptyTableContent = props.emptyTableContent, className = props.className, style = props.style, id = props.id, _c = props.isSelectable, isSelectable = _c === void 0 ? false : _c, onSelect = props.onSelect, onRowClick = props.onRowClick, _d = props.selectionMode, selectionMode = _d === void 0 ? 'multi' : _d, _e = props.isSortable, isSortable = _e === void 0 ? false : _e, onSort = props.onSort, stateReducer = props.stateReducer, onBottomReached = props.onBottomReached, onRowInViewport = props.onRowInViewport, _f = props.intersectionMargin, intersectionMargin = _f === void 0 ? 300 : _f, subComponent = props.subComponent, onExpand = props.onExpand, onFilter = props.onFilter, globalFilterValue = props.globalFilterValue, emptyFilteredTableContent = props.emptyFilteredTableContent, filterFunctions = props.filterTypes, expanderCell = props.expanderCell, isRowDisabled = props.isRowDisabled, rowProps = props.rowProps, _g = props.density, density = _g === void 0 ? 'default' : _g, _h = props.selectSubRows, selectSubRows = _h === void 0 ? true : _h, getSubRows = props.getSubRows, _j = props.selectRowOnClick, selectRowOnClick = _j === void 0 ? true : _j, paginatorRenderer = props.paginatorRenderer, _k = props.pageSize, pageSize = _k === void 0 ? 25 : _k, _l = props.isResizable, isResizable = _l === void 0 ? false : _l, _m = props.columnResizeMode, columnResizeMode = _m === void 0 ? 'fit' : _m, _o = props.styleType, styleType = _o === void 0 ? 'default' : _o, _p = props.enableVirtualization, enableVirtualization = _p === void 0 ? false : _p, _q = props.enableColumnReordering, enableColumnReordering = _q === void 0 ? false : _q, rest = __rest(props, ["data", "columns", "isLoading", "emptyTableContent", "className", "style", "id", "isSelectable", "onSelect", "onRowClick", "selectionMode", "isSortable", "onSort", "stateReducer", "onBottomReached", "onRowInViewport", "intersectionMargin", "subComponent", "onExpand", "onFilter", "globalFilterValue", "emptyFilteredTableContent", "filterTypes", "expanderCell", "isRowDisabled", "rowProps", "density", "selectSubRows", "getSubRows", "selectRowOnClick", "paginatorRenderer", "pageSize", "isResizable", "columnResizeMode", "styleType", "enableVirtualization", "enableColumnReordering"]);
98
+ var data = props.data, columns = props.columns, _a = props.isLoading, isLoading = _a === void 0 ? false : _a, emptyTableContent = props.emptyTableContent, className = props.className, style = props.style, id = props.id, _b = props.isSelectable, isSelectable = _b === void 0 ? false : _b, onSelect = props.onSelect, onRowClick = props.onRowClick, _c = props.selectionMode, selectionMode = _c === void 0 ? 'multi' : _c, _d = props.isSortable, isSortable = _d === void 0 ? false : _d, onSort = props.onSort, stateReducer = props.stateReducer, onBottomReached = props.onBottomReached, onRowInViewport = props.onRowInViewport, _e = props.intersectionMargin, intersectionMargin = _e === void 0 ? 300 : _e, subComponent = props.subComponent, onExpand = props.onExpand, onFilter = props.onFilter, globalFilterValue = props.globalFilterValue, emptyFilteredTableContent = props.emptyFilteredTableContent, filterFunctions = props.filterTypes, expanderCell = props.expanderCell, isRowDisabled = props.isRowDisabled, rowProps = props.rowProps, _f = props.density, density = _f === void 0 ? 'default' : _f, _g = props.selectSubRows, selectSubRows = _g === void 0 ? true : _g, getSubRows = props.getSubRows, _h = props.selectRowOnClick, selectRowOnClick = _h === void 0 ? true : _h, paginatorRenderer = props.paginatorRenderer, _j = props.pageSize, pageSize = _j === void 0 ? 25 : _j, _k = props.isResizable, isResizable = _k === void 0 ? false : _k, _l = props.columnResizeMode, columnResizeMode = _l === void 0 ? 'fit' : _l, _m = props.styleType, styleType = _m === void 0 ? 'default' : _m, _o = props.enableVirtualization, enableVirtualization = _o === void 0 ? false : _o, _p = props.enableColumnReordering, enableColumnReordering = _p === void 0 ? false : _p, rest = __rest(props, ["data", "columns", "isLoading", "emptyTableContent", "className", "style", "id", "isSelectable", "onSelect", "onRowClick", "selectionMode", "isSortable", "onSort", "stateReducer", "onBottomReached", "onRowInViewport", "intersectionMargin", "subComponent", "onExpand", "onFilter", "globalFilterValue", "emptyFilteredTableContent", "filterTypes", "expanderCell", "isRowDisabled", "rowProps", "density", "selectSubRows", "getSubRows", "selectRowOnClick", "paginatorRenderer", "pageSize", "isResizable", "columnResizeMode", "styleType", "enableVirtualization", "enableColumnReordering"]);
102
99
  useTheme();
103
100
  var ownerDocument = React.useRef();
104
101
  var defaultColumn = React.useMemo(function () { return ({
@@ -272,6 +269,7 @@ export var Table = function (props) {
272
269
  isLoading: isLoading,
273
270
  onPageChange: gotoPage,
274
271
  onPageSizeChange: setPageSize,
272
+ totalSelectedRowsCount: selectionMode === 'single' ? 0 : instance.selectedFlatRows.length, // 0 when selectionMode = 'single' since totalSelectedRowCount is for multi-selection mode only
275
273
  }); }, [
276
274
  density,
277
275
  gotoPage,
@@ -280,8 +278,10 @@ export var Table = function (props) {
280
278
  setPageSize,
281
279
  state.pageIndex,
282
280
  state.pageSize,
281
+ instance.selectedFlatRows,
282
+ selectionMode,
283
283
  ]);
284
- var _r = useScrollToRow(__assign(__assign({}, props), { page: page })), scrollToIndex = _r.scrollToIndex, tableRowRef = _r.tableRowRef;
284
+ var _q = useScrollToRow(__assign(__assign({}, props), { page: page })), scrollToIndex = _q.scrollToIndex, tableRowRef = _q.tableRowRef;
285
285
  var columnRefs = React.useRef({});
286
286
  var previousTableWidth = React.useRef(0);
287
287
  var onTableResize = React.useCallback(function (_a) {
@@ -294,7 +294,8 @@ export var Table = function (props) {
294
294
  // Update column widths when table was resized
295
295
  flatHeaders.forEach(function (header) {
296
296
  if (columnRefs.current[header.id]) {
297
- header.resizeWidth = columnRefs.current[header.id].getBoundingClientRect().width;
297
+ header.resizeWidth =
298
+ columnRefs.current[header.id].getBoundingClientRect().width;
298
299
  }
299
300
  });
300
301
  // If no column was resized then leave table resize handling to the flexbox
@@ -310,7 +311,8 @@ export var Table = function (props) {
310
311
  var newColumnWidths_1 = {};
311
312
  flatHeaders.forEach(function (column) {
312
313
  if (columnRefs.current[column.id]) {
313
- newColumnWidths_1[column.id] = columnRefs.current[column.id].getBoundingClientRect().width;
314
+ newColumnWidths_1[column.id] =
315
+ columnRefs.current[column.id].getBoundingClientRect().width;
314
316
  }
315
317
  });
316
318
  dispatch({ type: tableResizeEndAction, columnWidths: newColumnWidths_1 });
@@ -370,9 +372,9 @@ export var Table = function (props) {
370
372
  resizeRef(element);
371
373
  }
372
374
  }, id: id }, getTableProps({
373
- className: cx('iui-table', (_a = {}, _a["iui-".concat(density)] = density !== 'default', _a), className),
375
+ className: cx('iui-table', className),
374
376
  style: __assign({ minWidth: 0 }, style),
375
- }), ariaDataAttributes),
377
+ }), { "data-iui-size": density === 'default' ? undefined : density }, ariaDataAttributes),
376
378
  React.createElement("div", { className: 'iui-table-header-wrapper', ref: headerRef, onScroll: function () {
377
379
  if (headerRef.current && bodyRef.current) {
378
380
  bodyRef.current.scrollLeft = headerRef.current.scrollLeft;
@@ -381,19 +383,20 @@ export var Table = function (props) {
381
383
  } },
382
384
  React.createElement("div", { className: 'iui-table-header' }, headerGroups.slice(1).map(function (headerGroup) {
383
385
  var headerGroupProps = headerGroup.getHeaderGroupProps({
384
- className: 'iui-row',
386
+ className: 'iui-table-row',
385
387
  });
386
388
  return (React.createElement("div", __assign({}, headerGroupProps, { key: headerGroupProps.key }), headerGroup.headers.map(function (column, index) {
387
389
  var _a = column.getSortByToggleProps(), onClick = _a.onClick, restSortProps = __rest(_a, ["onClick"]);
388
- var columnProps = column.getHeaderProps(__assign(__assign({}, restSortProps), { className: cx('iui-cell', {
390
+ var columnProps = column.getHeaderProps(__assign(__assign({}, restSortProps), { className: cx('iui-table-cell', {
389
391
  'iui-actionable': column.canSort,
390
392
  'iui-sorted': column.isSorted,
391
- 'iui-cell-sticky': !!column.sticky,
393
+ 'iui-table-cell-sticky': !!column.sticky,
392
394
  }, column.columnClassName), style: __assign(__assign(__assign({}, getCellStyle(column, !!state.isTableResizing)), getStickyStyle(column, visibleColumns)), { flexWrap: 'unset' }) }));
393
395
  return (React.createElement("div", __assign({}, columnProps, column.getDragAndDropProps(), { key: columnProps.key, title: undefined, ref: function (el) {
394
396
  if (el) {
395
397
  columnRefs.current[column.id] = el;
396
- column.resizeWidth = el.getBoundingClientRect().width;
398
+ column.resizeWidth =
399
+ el.getBoundingClientRect().width;
397
400
  }
398
401
  }, onMouseDown: function () {
399
402
  isHeaderDirectClick.current = true;
@@ -403,24 +406,28 @@ export var Table = function (props) {
403
406
  onClick === null || onClick === void 0 ? void 0 : onClick(e);
404
407
  isHeaderDirectClick.current = false;
405
408
  }
409
+ }, tabIndex: showSortButton(column) ? 0 : undefined, onKeyDown: function (e) {
410
+ if (e.key == 'Enter' && showSortButton(column)) {
411
+ column.toggleSortBy();
412
+ }
406
413
  } }),
407
414
  column.render('Header'),
408
415
  (showFilterButton(column) ||
409
416
  showSortButton(column)) && (React.createElement("div", { className: 'iui-table-header-actions-container' },
410
417
  showFilterButton(column) && (React.createElement(FilterToggle, { column: column })),
411
- showSortButton(column) && (React.createElement("div", { className: 'iui-cell-end-icon' }, column.isSortedDesc ||
412
- (!column.isSorted && column.sortDescFirst) ? (React.createElement(SvgSortDown, { className: 'iui-icon iui-sort', "aria-hidden": true })) : (React.createElement(SvgSortUp, { className: 'iui-icon iui-sort', "aria-hidden": true })))))),
418
+ showSortButton(column) && (React.createElement("div", { className: 'iui-table-cell-end-icon' }, column.isSortedDesc ||
419
+ (!column.isSorted && column.sortDescFirst) ? (React.createElement(SvgSortDown, { className: 'iui-table-sort', "aria-hidden": true })) : (React.createElement(SvgSortUp, { className: 'iui-table-sort', "aria-hidden": true })))))),
413
420
  isResizable &&
414
421
  column.isResizerVisible &&
415
422
  (index !== headerGroup.headers.length - 1 ||
416
- columnResizeMode === 'expand') && (React.createElement("div", __assign({}, column.getResizerProps(), { className: 'iui-resizer' }),
417
- React.createElement("div", { className: 'iui-resizer-bar' }))),
423
+ columnResizeMode === 'expand') && (React.createElement("div", __assign({}, column.getResizerProps(), { className: 'iui-table-resizer' }),
424
+ React.createElement("div", { className: 'iui-table-resizer-bar' }))),
418
425
  enableColumnReordering &&
419
- !column.disableReordering && (React.createElement("div", { className: 'iui-reorder-bar' })),
426
+ !column.disableReordering && (React.createElement("div", { className: 'iui-table-reorder-bar' })),
420
427
  column.sticky === 'left' &&
421
- state.sticky.isScrolledToRight && (React.createElement("div", { className: 'iui-cell-shadow-right' })),
428
+ state.sticky.isScrolledToRight && (React.createElement("div", { className: 'iui-table-cell-shadow-right' })),
422
429
  column.sticky === 'right' &&
423
- state.sticky.isScrolledToLeft && (React.createElement("div", { className: 'iui-cell-shadow-left' }))));
430
+ state.sticky.isScrolledToLeft && (React.createElement("div", { className: 'iui-table-cell-shadow-left' }))));
424
431
  })));
425
432
  }))),
426
433
  React.createElement("div", __assign({}, getTableBodyProps({
@@ -433,12 +440,12 @@ export var Table = function (props) {
433
440
  headerRef.current.scrollLeft = bodyRef.current.scrollLeft;
434
441
  updateStickyState();
435
442
  }
436
- }, tabIndex: -1 }),
443
+ }, tabIndex: -1, "aria-multiselectable": (isSelectable && selectionMode === 'multi') || undefined }),
437
444
  data.length !== 0 && (React.createElement(React.Fragment, null, enableVirtualization ? (React.createElement(VirtualScroll, { itemsLength: page.length, itemRenderer: virtualizedItemRenderer, scrollToIndex: scrollToIndex })) : (page.map(function (_, index) { return getPreparedRow(index); })))),
438
445
  isLoading && data.length === 0 && (React.createElement("div", { className: 'iui-table-empty' },
439
446
  React.createElement(ProgressRadial, { indeterminate: true }))),
440
- isLoading && data.length !== 0 && (React.createElement("div", { className: 'iui-row' },
441
- React.createElement("div", { className: 'iui-cell', style: { justifyContent: 'center' } },
447
+ isLoading && data.length !== 0 && (React.createElement("div", { className: 'iui-table-row' },
448
+ React.createElement("div", { className: 'iui-table-cell', style: { justifyContent: 'center' } },
442
449
  React.createElement(ProgressRadial, { indeterminate: true, size: 'small', style: { float: 'none', marginLeft: 0 } })))),
443
450
  !isLoading && data.length === 0 && !areFiltersSet && (React.createElement("div", { className: 'iui-table-empty' },
444
451
  React.createElement("div", null, emptyTableContent))),
@@ -34,8 +34,8 @@ export var TableCell = function (props) {
34
34
  };
35
35
  };
36
36
  var cellElementProps = cell.getCellProps({
37
- className: cx('iui-cell', cell.column.cellClassName, {
38
- 'iui-cell-sticky': !!cell.column.sticky,
37
+ className: cx('iui-table-cell', cell.column.cellClassName, {
38
+ 'iui-table-cell-sticky': !!cell.column.sticky,
39
39
  }),
40
40
  style: __assign(__assign(__assign({}, getCellStyle(cell.column, !!tableInstance.state.isTableResizing)), getSubRowStyle()), getStickyStyle(cell.column, tableInstance.visibleColumns)),
41
41
  });
@@ -49,9 +49,9 @@ export var TableCell = function (props) {
49
49
  children: (React.createElement(React.Fragment, null,
50
50
  cellContent,
51
51
  cell.column.sticky === 'left' &&
52
- tableInstance.state.sticky.isScrolledToRight && (React.createElement("div", { className: 'iui-cell-shadow-right' })),
52
+ tableInstance.state.sticky.isScrolledToRight && (React.createElement("div", { className: 'iui-table-cell-shadow-right' })),
53
53
  cell.column.sticky === 'right' &&
54
- tableInstance.state.sticky.isScrolledToLeft && (React.createElement("div", { className: 'iui-cell-shadow-left' })))),
54
+ tableInstance.state.sticky.isScrolledToLeft && (React.createElement("div", { className: 'iui-table-cell-shadow-left' })))),
55
55
  };
56
56
  return (React.createElement(React.Fragment, null, cell.column.cellRenderer ? (cell.column.cellRenderer(__assign(__assign({}, cellRendererProps), { isDisabled: function () { return isDisabled; } }))) : (React.createElement(DefaultCell, __assign({}, cellRendererProps, { isDisabled: function () { return isDisabled; } })))));
57
57
  };
@@ -27,12 +27,10 @@ var __rest = (this && this.__rest) || function (s, e) {
27
27
  import React from 'react';
28
28
  import cx from 'classnames';
29
29
  import '@itwin/itwinui-css/css/table.css';
30
- import SvgChevronLeft from '@itwin/itwinui-icons-react/cjs/icons/ChevronLeft';
31
- import SvgChevronRight from '@itwin/itwinui-icons-react/cjs/icons/ChevronRight';
32
30
  import { IconButton, Button, DropdownButton } from '../Buttons';
33
31
  import { ProgressRadial } from '../ProgressIndicators';
34
32
  import { MenuItem } from '../Menu';
35
- import { getBoundedValue, useTheme, useOverflow, useContainerWidth, } from '../utils';
33
+ import { getBoundedValue, useTheme, useOverflow, useContainerWidth, SvgChevronLeft, SvgChevronRight, } from '../utils';
36
34
  var defaultLocalization = {
37
35
  pageSizeLabel: function (size) { return "".concat(size, " per page"); },
38
36
  rangeLabel: function (startIndex, endIndex, totalRows, isLoading) {
@@ -55,11 +53,11 @@ var defaultLocalization = {
55
53
  * />
56
54
  */
57
55
  export var TablePaginator = function (props) {
58
- var currentPage = props.currentPage, totalRowsCount = props.totalRowsCount, pageSize = props.pageSize, onPageChange = props.onPageChange, _a = props.focusActivationMode, focusActivationMode = _a === void 0 ? 'manual' : _a, _b = props.isLoading, isLoading = _b === void 0 ? false : _b, _c = props.size, size = _c === void 0 ? 'default' : _c, pageSizeList = props.pageSizeList, onPageSizeChange = props.onPageSizeChange, userLocalization = props.localization, className = props.className, rest = __rest(props, ["currentPage", "totalRowsCount", "pageSize", "onPageChange", "focusActivationMode", "isLoading", "size", "pageSizeList", "onPageSizeChange", "localization", "className"]);
56
+ var currentPage = props.currentPage, totalRowsCount = props.totalRowsCount, pageSize = props.pageSize, onPageChange = props.onPageChange, _a = props.totalSelectedRowsCount, totalSelectedRowsCount = _a === void 0 ? 0 : _a, _b = props.focusActivationMode, focusActivationMode = _b === void 0 ? 'manual' : _b, _c = props.isLoading, isLoading = _c === void 0 ? false : _c, _d = props.size, size = _d === void 0 ? 'default' : _d, pageSizeList = props.pageSizeList, onPageSizeChange = props.onPageSizeChange, userLocalization = props.localization, className = props.className, rest = __rest(props, ["currentPage", "totalRowsCount", "pageSize", "onPageChange", "totalSelectedRowsCount", "focusActivationMode", "isLoading", "size", "pageSizeList", "onPageSizeChange", "localization", "className"]);
59
57
  useTheme();
60
58
  var localization = React.useMemo(function () { return (__assign(__assign({}, defaultLocalization), userLocalization)); }, [userLocalization]);
61
59
  var pageListRef = React.useRef(null);
62
- var _d = React.useState(currentPage), focusedIndex = _d[0], setFocusedIndex = _d[1];
60
+ var _e = React.useState(currentPage), focusedIndex = _e[0], setFocusedIndex = _e[1];
63
61
  React.useEffect(function () {
64
62
  setFocusedIndex(currentPage);
65
63
  }, [currentPage]);
@@ -70,7 +68,7 @@ export var TablePaginator = function (props) {
70
68
  // Checking `isMounted.current` prevents from focusing on initial load.
71
69
  // Checking `needFocus.current` prevents from focusing page when clicked on previous/next page.
72
70
  if (isMounted.current && needFocus.current) {
73
- var buttonToFocus = Array.from((_b = (_a = pageListRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.iui-paginator-page-button')) !== null && _b !== void 0 ? _b : []).find(function (el) { var _a; return ((_a = el.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === (focusedIndex + 1).toString(); });
71
+ var buttonToFocus = Array.from((_b = (_a = pageListRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.iui-table-paginator-page-button')) !== null && _b !== void 0 ? _b : []).find(function (el) { var _a; return ((_a = el.textContent) === null || _a === void 0 ? void 0 : _a.trim()) === (focusedIndex + 1).toString(); });
74
72
  buttonToFocus === null || buttonToFocus === void 0 ? void 0 : buttonToFocus.focus();
75
73
  needFocus.current = false;
76
74
  }
@@ -79,10 +77,9 @@ export var TablePaginator = function (props) {
79
77
  var buttonSize = size != 'default' ? 'small' : undefined;
80
78
  var pageButton = React.useCallback(function (index, tabIndex) {
81
79
  if (tabIndex === void 0) { tabIndex = index === focusedIndex ? 0 : -1; }
82
- return (React.createElement("button", { key: index, className: cx('iui-paginator-page-button', {
83
- 'iui-active': index === currentPage,
84
- 'iui-paginator-page-button-small': buttonSize === 'small',
85
- }), onClick: function () { return onPageChange(index); }, "aria-current": index === currentPage, "aria-label": localization.goToPageLabel(index + 1), tabIndex: tabIndex }, index + 1));
80
+ return (React.createElement("button", { key: index, className: cx('iui-table-paginator-page-button', {
81
+ 'iui-table-paginator-page-button-small': buttonSize === 'small',
82
+ }), "data-iui-active": index === currentPage, onClick: function () { return onPageChange(index); }, "aria-current": index === currentPage, "aria-label": localization.goToPageLabel(index + 1), tabIndex: tabIndex }, index + 1));
86
83
  }, [focusedIndex, currentPage, localization, buttonSize, onPageChange]);
87
84
  var totalPagesCount = Math.ceil(totalRowsCount / pageSize);
88
85
  var pageList = React.useMemo(function () {
@@ -90,8 +87,8 @@ export var TablePaginator = function (props) {
90
87
  .fill(null)
91
88
  .map(function (_, index) { return pageButton(index); });
92
89
  }, [pageButton, totalPagesCount]);
93
- var _e = useOverflow(pageList), overflowRef = _e[0], visibleCount = _e[1];
94
- var _f = useContainerWidth(), paginatorResizeRef = _f[0], paginatorWidth = _f[1];
90
+ var _f = useOverflow(pageList), overflowRef = _f[0], visibleCount = _f[1];
91
+ var _g = useContainerWidth(), paginatorResizeRef = _g[0], paginatorWidth = _g[1];
95
92
  var onKeyDown = function (event) {
96
93
  // alt + arrow keys are used by browser/assistive technologies
97
94
  if (event.altKey) {
@@ -144,19 +141,19 @@ export var TablePaginator = function (props) {
144
141
  var hasNoRows = totalPagesCount === 0;
145
142
  var showPagesList = totalPagesCount > 1 || isLoading;
146
143
  var showPageSizeList = pageSizeList && !!onPageSizeChange && !!totalRowsCount;
147
- var ellipsis = (React.createElement("span", { className: cx('iui-paginator-ellipsis', {
148
- 'iui-paginator-ellipsis-small': size === 'small',
144
+ var ellipsis = (React.createElement("span", { className: cx('iui-table-paginator-ellipsis', {
145
+ 'iui-table-paginator-ellipsis-small': size === 'small',
149
146
  }) }, "\u2026"));
150
147
  var noRowsContent = (React.createElement(React.Fragment, null, isLoading ? (React.createElement(ProgressRadial, { indeterminate: true, size: 'small' })) : (React.createElement(Button, { styleType: 'borderless', disabled: true, size: buttonSize }, "1"))));
151
148
  if (!showPagesList && !showPageSizeList) {
152
149
  return null;
153
150
  }
154
- return (React.createElement("div", __assign({ className: cx('iui-paginator', className), ref: paginatorResizeRef }, rest),
155
- React.createElement("div", { className: 'iui-left' }),
151
+ return (React.createElement("div", __assign({ className: cx('iui-table-paginator', className), ref: paginatorResizeRef }, rest),
152
+ React.createElement("div", { className: 'iui-left' }, totalSelectedRowsCount > 0 && (React.createElement("span", null, "".concat(totalSelectedRowsCount, " ").concat(totalSelectedRowsCount === 1 ? 'row' : 'rows', " selected")))),
156
153
  showPagesList && (React.createElement("div", { className: 'iui-center', ref: overflowRef },
157
154
  React.createElement(IconButton, { styleType: 'borderless', disabled: currentPage === 0, onClick: function () { return onPageChange(currentPage - 1); }, size: buttonSize, "aria-label": localization.previousPage },
158
155
  React.createElement(SvgChevronLeft, null)),
159
- React.createElement("span", { className: 'iui-paginator-pages-group', onKeyDown: onKeyDown, ref: pageListRef }, (function () {
156
+ React.createElement("span", { className: 'iui-table-paginator-pages-group', onKeyDown: onKeyDown, ref: pageListRef }, (function () {
160
157
  if (hasNoRows) {
161
158
  return noRowsContent;
162
159
  }
@@ -179,7 +176,7 @@ export var TablePaginator = function (props) {
179
176
  React.createElement(SvgChevronRight, null)))),
180
177
  React.createElement("div", { className: 'iui-right' }, showPageSizeList && (React.createElement(React.Fragment, null,
181
178
  localization.rowsPerPageLabel !== null &&
182
- paginatorWidth >= 1024 && (React.createElement("span", { className: 'iui-paginator-page-size-label' }, localization.rowsPerPageLabel)),
179
+ paginatorWidth >= 1024 && (React.createElement("span", { className: 'iui-table-paginator-page-size-label' }, localization.rowsPerPageLabel)),
183
180
  React.createElement(DropdownButton, { styleType: 'borderless', size: buttonSize, menuItems: function (close) {
184
181
  return pageSizeList.map(function (size) { return (React.createElement(MenuItem, { key: size, isSelected: size === pageSize, onClick: function () {
185
182
  close();
@@ -12,6 +12,7 @@ export declare const TableRow: <T extends Record<string, unknown>>(props: {
12
12
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
13
13
  } & {
14
14
  status?: "positive" | "warning" | "negative" | undefined;
15
+ isLoading?: boolean | undefined;
15
16
  }) | undefined;
16
17
  isLast: boolean;
17
18
  onRowInViewport: React.MutableRefObject<((rowData: T) => void) | undefined>;
@@ -33,6 +34,7 @@ export declare const TableRowMemoized: <T extends Record<string, unknown>>(props
33
34
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
34
35
  } & {
35
36
  status?: "positive" | "warning" | "negative" | undefined;
37
+ isLoading?: boolean | undefined;
36
38
  }) | undefined;
37
39
  isLast: boolean;
38
40
  onRowInViewport: React.MutableRefObject<((rowData: T) => void) | undefined>;
@@ -36,7 +36,6 @@ import { TableCell } from './TableCell';
36
36
  */
37
37
  export var TableRow = function (props) {
38
38
  var _a;
39
- var _b;
40
39
  var row = props.row, rowProps = props.rowProps, isLast = props.isLast, onRowInViewport = props.onRowInViewport, onBottomReached = props.onBottomReached, intersectionMargin = props.intersectionMargin, onClick = props.onClick, subComponent = props.subComponent, isDisabled = props.isDisabled, tableHasSubRows = props.tableHasSubRows, tableInstance = props.tableInstance, expanderCell = props.expanderCell, bodyRef = props.bodyRef, tableRowRef = props.tableRowRef;
41
40
  var onIntersect = React.useCallback(function () {
42
41
  var _a, _b;
@@ -57,16 +56,16 @@ export var TableRow = function (props) {
57
56
  rootMargin: "".concat(intersectionMargin, "px"),
58
57
  root: intersectionRoot,
59
58
  });
60
- var userRowProps = (_b = rowProps === null || rowProps === void 0 ? void 0 : rowProps(row)) !== null && _b !== void 0 ? _b : {};
61
- var status = userRowProps.status, restUserRowProps = __rest(userRowProps, ["status"]);
59
+ var userRowProps = (_a = rowProps === null || rowProps === void 0 ? void 0 : rowProps(row)) !== null && _a !== void 0 ? _a : {};
60
+ var status = userRowProps.status, isLoading = userRowProps.isLoading, restUserRowProps = __rest(userRowProps, ["status", "isLoading"]);
62
61
  var mergedProps = __assign(__assign(__assign({}, row.getRowProps({ style: { flex: "0 0 auto", minWidth: '100%' } })), restUserRowProps), {
63
- className: cx('iui-row', (_a = {
64
- 'iui-selected': row.isSelected,
65
- 'iui-row-expanded': row.isExpanded && subComponent,
66
- 'iui-disabled': isDisabled
67
- },
68
- _a["iui-".concat(status)] = !!status,
69
- _a), userRowProps === null || userRowProps === void 0 ? void 0 : userRowProps.className),
62
+ className: cx('iui-table-row', {
63
+ 'iui-table-row-expanded': row.isExpanded && subComponent,
64
+ 'iui-loading': isLoading,
65
+ }, userRowProps === null || userRowProps === void 0 ? void 0 : userRowProps.className),
66
+ 'aria-selected': row.isSelected || undefined,
67
+ 'aria-disabled': isDisabled || undefined,
68
+ 'data-iui-status': status,
70
69
  });
71
70
  var refs = useMergedRefs(intersectionRef, mergedProps.ref, tableRowRef);
72
71
  return (React.createElement(React.Fragment, null,
@@ -78,9 +77,7 @@ export var TableRow = function (props) {
78
77
  return (React.createElement(TableCell, { key: cell.getCellProps().key, cell: cell, cellIndex: index, isDisabled: isDisabled, tableHasSubRows: tableHasSubRows, tableInstance: tableInstance, expanderCell: expanderCell }));
79
78
  })),
80
79
  subComponent && (React.createElement(WithCSSTransition, { in: row.isExpanded },
81
- React.createElement("div", { className: cx('iui-row', 'iui-expanded-content', {
82
- 'iui-disabled': isDisabled,
83
- }) }, subComponent(row))))));
80
+ React.createElement("div", { className: cx('iui-table-row', 'iui-table-expanded-content'), "aria-disabled": isDisabled }, subComponent(row))))));
84
81
  };
85
82
  var hasAnySelectedSubRow = function (row, selectedRowIds) {
86
83
  if (selectedRowIds === null || selectedRowIds === void 0 ? void 0 : selectedRowIds[row.id]) {
@@ -38,17 +38,12 @@ import cx from 'classnames';
38
38
  * }
39
39
  */
40
40
  export var DefaultCell = function (props) {
41
- var _a;
42
41
  // Omitting `cellProps`
43
42
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
44
- var _b = props.cellElementProps, cellElementClassName = _b.className, cellElementStyle = _b.style, cellElementProps = __rest(_b, ["className", "style"]), children = props.children, startIcon = props.startIcon, endIcon = props.endIcon, cellProps = props.cellProps, isDisabled = props.isDisabled, className = props.className, style = props.style, status = props.status, rest = __rest(props, ["cellElementProps", "children", "startIcon", "endIcon", "cellProps", "isDisabled", "className", "style", "status"]);
45
- return (React.createElement("div", __assign({}, cellElementProps, rest, { className: cx(cellElementClassName, className, (_a = {
46
- 'iui-disabled': isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled(cellProps.row.original)
47
- },
48
- _a["iui-".concat(status)] = !!status,
49
- _a)), style: __assign(__assign({}, cellElementStyle), style) }),
50
- startIcon && React.createElement("div", { className: 'iui-cell-start-icon' }, startIcon),
43
+ var _a = props.cellElementProps, cellElementClassName = _a.className, cellElementStyle = _a.style, cellElementProps = __rest(_a, ["className", "style"]), children = props.children, startIcon = props.startIcon, endIcon = props.endIcon, cellProps = props.cellProps, isDisabled = props.isDisabled, className = props.className, style = props.style, status = props.status, rest = __rest(props, ["cellElementProps", "children", "startIcon", "endIcon", "cellProps", "isDisabled", "className", "style", "status"]);
44
+ return (React.createElement("div", __assign({}, cellElementProps, rest, { className: cx(cellElementClassName, className), "aria-disabled": (isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled(cellProps.row.original)) || undefined, "data-iui-status": status, style: __assign(__assign({}, cellElementStyle), style) }),
45
+ startIcon && (React.createElement("div", { className: 'iui-table-cell-start-icon' }, startIcon)),
51
46
  children,
52
- endIcon && React.createElement("div", { className: 'iui-cell-end-icon' }, endIcon)));
47
+ endIcon && React.createElement("div", { className: 'iui-table-cell-end-icon' }, endIcon)));
53
48
  };
54
49
  export default DefaultCell;
@@ -15,7 +15,7 @@ var __assign = (this && this.__assign) || function () {
15
15
  *--------------------------------------------------------------------------------------------*/
16
16
  import React from 'react';
17
17
  import { Checkbox } from '../../Checkbox';
18
- import SvgColumnManager from '@itwin/itwinui-icons-react/cjs/icons/ColumnManager';
18
+ import { SvgColumnManager } from '../../utils';
19
19
  import { DropdownMenu } from '../../DropdownMenu';
20
20
  import { IconButton } from '../../Buttons/IconButton';
21
21
  import { MenuItem } from '../../Menu';
@@ -107,7 +107,7 @@ export var ActionColumn = function (_a) {
107
107
  var _a;
108
108
  setIsOpen(true);
109
109
  (_a = dropdownMenuProps.onShow) === null || _a === void 0 ? void 0 : _a.call(dropdownMenuProps, i);
110
- }, style: __assign({ maxHeight: '315px' }, dropdownMenuProps.style), className: cx('iui-scroll', dropdownMenuProps.className) }),
110
+ }, className: cx('iui-scroll', dropdownMenuProps.className) }),
111
111
  React.createElement(IconButton, { styleType: 'borderless', isActive: isOpen, ref: buttonRef },
112
112
  React.createElement(SvgColumnManager, null))));
113
113
  },
@@ -14,7 +14,7 @@ var __assign = (this && this.__assign) || function () {
14
14
  * See LICENSE.md in the project root for license terms and full copyright notice.
15
15
  *--------------------------------------------------------------------------------------------*/
16
16
  import React from 'react';
17
- import SvgChevronRight from '@itwin/itwinui-icons-react/cjs/icons/ChevronRight';
17
+ import { SvgChevronRight } from '../../utils';
18
18
  import { IconButton } from '../../Buttons';
19
19
  import { DefaultCell } from '../cells';
20
20
  export var EXPANDER_CELL_ID = 'iui-table-expander';
@@ -63,7 +63,7 @@ export var ExpanderColumn = function (props) {
63
63
  return null;
64
64
  }
65
65
  else {
66
- return (React.createElement(IconButton, { className: 'iui-row-expander', styleType: 'borderless', size: 'small', onClick: function (e) {
66
+ return (React.createElement(IconButton, { className: 'iui-table-row-expander', styleType: 'borderless', size: 'small', onClick: function (e) {
67
67
  e.stopPropagation();
68
68
  row.toggleRowExpanded();
69
69
  }, disabled: isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled(props.row.original) }, React.createElement(SvgChevronRight, null)));
@@ -23,7 +23,7 @@ import { useTheme } from '../../utils';
23
23
  export var BaseFilter = function (props) {
24
24
  var children = props.children, className = props.className, style = props.style, id = props.id;
25
25
  useTheme();
26
- return (React.createElement("div", { className: cx('iui-column-filter', className), style: style,
26
+ return (React.createElement("div", { className: cx('iui-table-column-filter', className), style: style,
27
27
  // Prevents from triggering sort
28
28
  onClick: function (e) {
29
29
  e.stopPropagation();
@@ -25,8 +25,7 @@ var __rest = (this && this.__rest) || function (s, e) {
25
25
  * See LICENSE.md in the project root for license terms and full copyright notice.
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import React from 'react';
28
- import SvgCalendar from '@itwin/itwinui-icons-react/cjs/icons/Calendar';
29
- import { Popover } from '../../../utils';
28
+ import { Popover, SvgCalendar } from '../../../utils';
30
29
  import { LabeledInput } from '../../../LabeledInput';
31
30
  import { DatePicker } from '../../../DatePicker';
32
31
  import { IconButton } from '../../../Buttons';
@@ -24,12 +24,10 @@ var __rest = (this && this.__rest) || function (s, e) {
24
24
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
25
25
  * See LICENSE.md in the project root for license terms and full copyright notice.
26
26
  *--------------------------------------------------------------------------------------------*/
27
- import SvgFilterHollow from '@itwin/itwinui-icons-react/cjs/icons/FilterHollow';
28
- import SvgFilter from '@itwin/itwinui-icons-react/cjs/icons/Filter';
29
27
  import React from 'react';
30
28
  import cx from 'classnames';
31
29
  import '@itwin/itwinui-css/css/table.css';
32
- import { useTheme, Popover } from '../../utils';
30
+ import { useTheme, Popover, SvgFilterHollow, SvgFilter, } from '../../utils';
33
31
  import { IconButton } from '../../Buttons';
34
32
  /**
35
33
  * Handles showing filter icon and opening filter component.
@@ -49,7 +47,7 @@ export var FilterToggle = function (props) {
49
47
  }, [close, column]);
50
48
  var isColumnFiltered = column.filterValue != null && column.filterValue !== '';
51
49
  return (React.createElement(React.Fragment, null, column.canFilter && column.Filter && (React.createElement(Popover, { content: column.render('Filter', { close: close, setFilter: setFilter, clearFilter: clearFilter }), placement: 'bottom-start', visible: isVisible, onClickOutside: close },
52
- React.createElement(IconButton, __assign({ styleType: 'borderless', isActive: isVisible || isColumnFiltered, className: cx('iui-filter-button', className), onClick: function (e) {
50
+ React.createElement(IconButton, __assign({ styleType: 'borderless', isActive: isVisible || isColumnFiltered, className: cx('iui-table-filter-button', className), onClick: function (e) {
53
51
  setIsVisible(function (v) { return !v; });
54
52
  // Prevents from triggering sort
55
53
  e.stopPropagation();
@@ -41,13 +41,13 @@ var defaultGetDragAndDropProps = function (isEnabled) { return function (props,
41
41
  };
42
42
  var setOnDragColumnStyle = function (event, position) {
43
43
  var columnElement = event.currentTarget;
44
- columnElement.classList.remove('iui-reorder-column-right');
45
- columnElement.classList.remove('iui-reorder-column-left');
44
+ columnElement.classList.remove('iui-table-reorder-column-right');
45
+ columnElement.classList.remove('iui-table-reorder-column-left');
46
46
  if (position === 'left') {
47
- columnElement.classList.add('iui-reorder-column-left');
47
+ columnElement.classList.add('iui-table-reorder-column-left');
48
48
  }
49
49
  else if (position === 'right') {
50
- columnElement.classList.add('iui-reorder-column-right');
50
+ columnElement.classList.add('iui-table-reorder-column-right');
51
51
  }
52
52
  };
53
53
  var reorderColumns = function (tableColumns, srcIndex, dstIndex) {