@itwin/itwinui-react 3.0.0-dev.6 → 3.0.0-dev.8

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 (283) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/cjs/core/Alert/Alert.d.ts +20 -9
  3. package/cjs/core/Alert/Alert.js +48 -10
  4. package/cjs/core/Avatar/Avatar.d.ts +3 -2
  5. package/cjs/core/Avatar/Avatar.js +21 -19
  6. package/cjs/core/AvatarGroup/AvatarGroup.js +3 -8
  7. package/cjs/core/ButtonGroup/ButtonGroup.js +41 -36
  8. package/cjs/core/Buttons/Button/Button.d.ts +15 -2
  9. package/cjs/core/Buttons/Button/Button.js +23 -9
  10. package/cjs/core/Buttons/DropdownButton/DropdownButton.js +1 -1
  11. package/cjs/core/Buttons/IconButton/IconButton.d.ts +5 -1
  12. package/cjs/core/Buttons/IconButton/IconButton.js +27 -38
  13. package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +9 -0
  14. package/cjs/core/Buttons/SplitButton/SplitButton.js +25 -13
  15. package/cjs/core/Carousel/Carousel.d.ts +6 -4
  16. package/cjs/core/Carousel/Carousel.js +2 -2
  17. package/cjs/core/Carousel/CarouselDot.js +1 -3
  18. package/cjs/core/Carousel/CarouselNavigation.d.ts +6 -4
  19. package/cjs/core/ColorPicker/ColorBuilder.js +2 -1
  20. package/cjs/core/ColorPicker/ColorInputPanel.js +172 -231
  21. package/cjs/core/ComboBox/ComboBox.js +3 -3
  22. package/cjs/core/ComboBox/ComboBoxDropdown.js +4 -9
  23. package/cjs/core/ComboBox/ComboBoxEndIcon.js +3 -22
  24. package/cjs/core/ComboBox/ComboBoxInput.js +1 -1
  25. package/cjs/core/ComboBox/ComboBoxMenu.d.ts +2 -2
  26. package/cjs/core/ComboBox/ComboBoxMenu.js +5 -5
  27. package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +1 -1
  28. package/cjs/core/ComboBox/ComboBoxMenuItem.js +8 -6
  29. package/cjs/core/ComboBox/helpers.d.ts +1 -2
  30. package/cjs/core/DatePicker/DatePicker.d.ts +30 -8
  31. package/cjs/core/DatePicker/DatePicker.js +47 -6
  32. package/cjs/core/Dialog/Dialog.js +10 -17
  33. package/cjs/core/Dialog/DialogContext.d.ts +3 -4
  34. package/cjs/core/Dialog/DialogMain.js +5 -5
  35. package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +20 -14
  36. package/cjs/core/ExpandableBlock/ExpandableBlock.js +39 -18
  37. package/cjs/core/FileUpload/FileUpload.d.ts +4 -0
  38. package/cjs/core/FileUpload/FileUpload.js +24 -3
  39. package/cjs/core/Header/HeaderBasicButton.js +3 -16
  40. package/cjs/core/Header/HeaderDropdownButton.js +1 -1
  41. package/cjs/core/Header/HeaderSplitButton.js +3 -4
  42. package/cjs/core/Input/Input.d.ts +4 -0
  43. package/cjs/core/Input/Input.js +2 -1
  44. package/cjs/core/InputGrid/InputGrid.d.ts +25 -0
  45. package/cjs/core/InputGrid/InputGrid.js +39 -0
  46. package/cjs/core/InputGrid/index.d.ts +3 -0
  47. package/cjs/core/InputGrid/index.js +15 -0
  48. package/cjs/core/InputGroup/InputGroup.d.ts +13 -0
  49. package/cjs/core/InputGroup/InputGroup.js +35 -9
  50. package/cjs/core/InputWithDecorations/InputWithDecorations.d.ts +39 -0
  51. package/cjs/core/InputWithDecorations/InputWithDecorations.js +81 -0
  52. package/cjs/core/InputWithDecorations/index.d.ts +3 -0
  53. package/cjs/core/InputWithDecorations/index.js +15 -0
  54. package/cjs/core/Label/Label.d.ts +5 -0
  55. package/cjs/core/Label/Label.js +2 -0
  56. package/cjs/core/LabeledInput/LabeledInput.d.ts +22 -16
  57. package/cjs/core/LabeledInput/LabeledInput.js +52 -29
  58. package/cjs/core/LabeledSelect/LabeledSelect.d.ts +17 -7
  59. package/cjs/core/LabeledSelect/LabeledSelect.js +36 -17
  60. package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +15 -5
  61. package/cjs/core/LabeledTextarea/LabeledTextarea.js +12 -45
  62. package/cjs/core/Menu/Menu.d.ts +1 -1
  63. package/cjs/core/Menu/Menu.js +1 -1
  64. package/cjs/core/Menu/MenuDivider.d.ts +2 -1
  65. package/cjs/core/Menu/MenuDivider.js +1 -1
  66. package/cjs/core/Menu/MenuItem.d.ts +1 -1
  67. package/cjs/core/Menu/MenuItem.js +1 -0
  68. package/cjs/core/Menu/MenuItemSkeleton.d.ts +1 -1
  69. package/cjs/core/Menu/MenuItemSkeleton.js +0 -1
  70. package/cjs/core/ProgressIndicators/ProgressLinear.d.ts +4 -0
  71. package/cjs/core/ProgressIndicators/ProgressLinear.js +9 -1
  72. package/cjs/core/SearchBox/SearchBox.js +1 -1
  73. package/cjs/core/Select/Select.d.ts +4 -0
  74. package/cjs/core/Select/Select.js +12 -11
  75. package/cjs/core/SideNavigation/SideNavigation.d.ts +16 -0
  76. package/cjs/core/SideNavigation/SideNavigation.js +42 -9
  77. package/cjs/core/Slider/Slider.d.ts +24 -0
  78. package/cjs/core/Slider/Slider.js +58 -10
  79. package/cjs/core/Slider/Thumb.js +3 -2
  80. package/cjs/core/Slider/Track.d.ts +1 -1
  81. package/cjs/core/Slider/Track.js +17 -6
  82. package/cjs/core/StatusMessage/StatusMessage.d.ts +12 -2
  83. package/cjs/core/StatusMessage/StatusMessage.js +23 -9
  84. package/cjs/core/Stepper/Stepper.d.ts +26 -1
  85. package/cjs/core/Stepper/Stepper.js +35 -6
  86. package/cjs/core/Stepper/StepperStep.d.ts +17 -0
  87. package/cjs/core/Stepper/StepperStep.js +33 -8
  88. package/cjs/core/Stepper/WorkflowDiagram.d.ts +11 -1
  89. package/cjs/core/Stepper/WorkflowDiagram.js +23 -10
  90. package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +6 -1
  91. package/cjs/core/Stepper/WorkflowDiagramStep.js +9 -2
  92. package/cjs/core/Table/SubRowExpander.js +3 -1
  93. package/cjs/core/Table/Table.js +0 -1
  94. package/cjs/core/Table/TableCell.js +1 -1
  95. package/cjs/core/Table/TablePaginator.js +1 -3
  96. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +6 -1
  97. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +46 -18
  98. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +2 -0
  99. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -0
  100. package/cjs/core/Tabs/Tab.js +1 -2
  101. package/cjs/core/Textarea/Textarea.d.ts +7 -1
  102. package/cjs/core/Textarea/Textarea.js +6 -11
  103. package/cjs/core/ThemeProvider/ThemeContext.d.ts +1 -1
  104. package/cjs/core/ThemeProvider/ThemeProvider.d.ts +23 -3
  105. package/cjs/core/ThemeProvider/ThemeProvider.js +56 -23
  106. package/cjs/core/Tile/Tile.d.ts +142 -17
  107. package/cjs/core/Tile/Tile.js +107 -16
  108. package/cjs/core/Toast/Toast.d.ts +12 -4
  109. package/cjs/core/Toast/Toast.js +24 -13
  110. package/cjs/core/Tooltip/Tooltip.d.ts +35 -28
  111. package/cjs/core/Tooltip/Tooltip.js +116 -118
  112. package/cjs/core/TransferList/TransferList.js +4 -12
  113. package/cjs/core/Tree/TreeNode.js +1 -1
  114. package/cjs/core/index.d.ts +2 -0
  115. package/cjs/core/index.js +20 -4
  116. package/cjs/core/utils/components/ButtonBase.d.ts +14 -0
  117. package/cjs/core/utils/components/ButtonBase.js +46 -0
  118. package/cjs/core/utils/components/Icon.d.ts +5 -0
  119. package/cjs/core/utils/components/Icon.js +8 -1
  120. package/cjs/core/utils/components/InputContainer.d.ts +0 -1
  121. package/cjs/core/utils/components/InputContainer.js +14 -34
  122. package/cjs/core/utils/components/InputFlexContainer.d.ts +1 -0
  123. package/cjs/core/utils/components/InputFlexContainer.js +3 -1
  124. package/cjs/core/utils/components/Popover.js +5 -3
  125. package/cjs/core/utils/components/Portal.d.ts +27 -0
  126. package/cjs/core/utils/components/Portal.js +43 -0
  127. package/cjs/core/utils/components/VirtualScroll.js +4 -4
  128. package/cjs/core/utils/components/index.d.ts +2 -0
  129. package/cjs/core/utils/components/index.js +2 -0
  130. package/cjs/core/utils/functions/colors.d.ts +1 -1
  131. package/cjs/core/utils/functions/colors.js +1 -13
  132. package/cjs/core/utils/functions/index.d.ts +1 -0
  133. package/cjs/core/utils/functions/index.js +1 -0
  134. package/cjs/core/utils/functions/react.d.ts +8 -0
  135. package/cjs/core/utils/functions/react.js +40 -0
  136. package/cjs/core/utils/hooks/index.d.ts +1 -0
  137. package/cjs/core/utils/hooks/index.js +1 -0
  138. package/cjs/core/utils/hooks/useControlledState.d.ts +13 -0
  139. package/cjs/core/utils/hooks/useControlledState.js +39 -0
  140. package/cjs/core/utils/hooks/useGlobals.d.ts +1 -1
  141. package/cjs/styles.js +11 -35
  142. package/esm/core/Alert/Alert.d.ts +20 -9
  143. package/esm/core/Alert/Alert.js +49 -10
  144. package/esm/core/Avatar/Avatar.d.ts +3 -2
  145. package/esm/core/Avatar/Avatar.js +21 -17
  146. package/esm/core/AvatarGroup/AvatarGroup.js +3 -8
  147. package/esm/core/ButtonGroup/ButtonGroup.js +41 -36
  148. package/esm/core/Buttons/Button/Button.d.ts +15 -2
  149. package/esm/core/Buttons/Button/Button.js +18 -10
  150. package/esm/core/Buttons/DropdownButton/DropdownButton.js +1 -1
  151. package/esm/core/Buttons/IconButton/IconButton.d.ts +5 -1
  152. package/esm/core/Buttons/IconButton/IconButton.js +25 -37
  153. package/esm/core/Buttons/SplitButton/SplitButton.d.ts +9 -0
  154. package/esm/core/Buttons/SplitButton/SplitButton.js +31 -14
  155. package/esm/core/Carousel/Carousel.d.ts +6 -4
  156. package/esm/core/Carousel/Carousel.js +8 -3
  157. package/esm/core/Carousel/CarouselDot.js +2 -4
  158. package/esm/core/Carousel/CarouselNavigation.d.ts +6 -4
  159. package/esm/core/ColorPicker/ColorBuilder.js +2 -1
  160. package/esm/core/ColorPicker/ColorInputPanel.js +173 -232
  161. package/esm/core/ComboBox/ComboBox.js +3 -3
  162. package/esm/core/ComboBox/ComboBoxDropdown.js +4 -9
  163. package/esm/core/ComboBox/ComboBoxEndIcon.js +4 -25
  164. package/esm/core/ComboBox/ComboBoxInput.js +1 -1
  165. package/esm/core/ComboBox/ComboBoxMenu.d.ts +2 -2
  166. package/esm/core/ComboBox/ComboBoxMenu.js +5 -5
  167. package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +1 -1
  168. package/esm/core/ComboBox/ComboBoxMenuItem.js +9 -7
  169. package/esm/core/ComboBox/helpers.d.ts +1 -2
  170. package/esm/core/DatePicker/DatePicker.d.ts +30 -8
  171. package/esm/core/DatePicker/DatePicker.js +33 -6
  172. package/esm/core/Dialog/Dialog.js +11 -23
  173. package/esm/core/Dialog/DialogContext.d.ts +3 -4
  174. package/esm/core/Dialog/DialogMain.js +5 -5
  175. package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +20 -14
  176. package/esm/core/ExpandableBlock/ExpandableBlock.js +41 -20
  177. package/esm/core/FileUpload/FileUpload.d.ts +4 -0
  178. package/esm/core/FileUpload/FileUpload.js +26 -3
  179. package/esm/core/Header/HeaderBasicButton.js +4 -17
  180. package/esm/core/Header/HeaderDropdownButton.js +1 -1
  181. package/esm/core/Header/HeaderSplitButton.js +9 -5
  182. package/esm/core/Input/Input.d.ts +4 -0
  183. package/esm/core/Input/Input.js +2 -1
  184. package/esm/core/InputGrid/InputGrid.d.ts +25 -0
  185. package/esm/core/InputGrid/InputGrid.js +35 -0
  186. package/esm/core/InputGrid/index.d.ts +3 -0
  187. package/esm/core/InputGrid/index.js +6 -0
  188. package/esm/core/InputGroup/InputGroup.d.ts +13 -0
  189. package/esm/core/InputGroup/InputGroup.js +34 -10
  190. package/esm/core/InputWithDecorations/InputWithDecorations.d.ts +39 -0
  191. package/esm/core/InputWithDecorations/InputWithDecorations.js +80 -0
  192. package/esm/core/InputWithDecorations/index.d.ts +3 -0
  193. package/esm/core/InputWithDecorations/index.js +6 -0
  194. package/esm/core/Label/Label.d.ts +5 -0
  195. package/esm/core/Label/Label.js +2 -0
  196. package/esm/core/LabeledInput/LabeledInput.d.ts +22 -16
  197. package/esm/core/LabeledInput/LabeledInput.js +53 -29
  198. package/esm/core/LabeledSelect/LabeledSelect.d.ts +17 -7
  199. package/esm/core/LabeledSelect/LabeledSelect.js +37 -18
  200. package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +15 -5
  201. package/esm/core/LabeledTextarea/LabeledTextarea.js +14 -45
  202. package/esm/core/Menu/Menu.d.ts +1 -1
  203. package/esm/core/Menu/Menu.js +1 -1
  204. package/esm/core/Menu/MenuDivider.d.ts +2 -1
  205. package/esm/core/Menu/MenuDivider.js +1 -1
  206. package/esm/core/Menu/MenuItem.d.ts +1 -1
  207. package/esm/core/Menu/MenuItem.js +1 -0
  208. package/esm/core/Menu/MenuItemSkeleton.d.ts +1 -1
  209. package/esm/core/Menu/MenuItemSkeleton.js +0 -1
  210. package/esm/core/ProgressIndicators/ProgressLinear.d.ts +4 -0
  211. package/esm/core/ProgressIndicators/ProgressLinear.js +9 -1
  212. package/esm/core/SearchBox/SearchBox.js +1 -1
  213. package/esm/core/Select/Select.d.ts +4 -0
  214. package/esm/core/Select/Select.js +12 -11
  215. package/esm/core/SideNavigation/SideNavigation.d.ts +16 -0
  216. package/esm/core/SideNavigation/SideNavigation.js +33 -9
  217. package/esm/core/Slider/Slider.d.ts +24 -0
  218. package/esm/core/Slider/Slider.js +43 -10
  219. package/esm/core/Slider/Thumb.js +3 -2
  220. package/esm/core/Slider/Track.d.ts +1 -1
  221. package/esm/core/Slider/Track.js +14 -6
  222. package/esm/core/StatusMessage/StatusMessage.d.ts +12 -2
  223. package/esm/core/StatusMessage/StatusMessage.js +23 -16
  224. package/esm/core/Stepper/Stepper.d.ts +26 -1
  225. package/esm/core/Stepper/Stepper.js +32 -6
  226. package/esm/core/Stepper/StepperStep.d.ts +17 -0
  227. package/esm/core/Stepper/StepperStep.js +27 -8
  228. package/esm/core/Stepper/WorkflowDiagram.d.ts +11 -1
  229. package/esm/core/Stepper/WorkflowDiagram.js +10 -7
  230. package/esm/core/Stepper/WorkflowDiagramStep.d.ts +6 -1
  231. package/esm/core/Stepper/WorkflowDiagramStep.js +6 -2
  232. package/esm/core/Table/SubRowExpander.js +3 -1
  233. package/esm/core/Table/Table.js +0 -1
  234. package/esm/core/Table/TableCell.js +1 -1
  235. package/esm/core/Table/TablePaginator.js +2 -3
  236. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +6 -1
  237. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +45 -17
  238. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +2 -0
  239. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -0
  240. package/esm/core/Tabs/Tab.js +2 -3
  241. package/esm/core/Textarea/Textarea.d.ts +7 -1
  242. package/esm/core/Textarea/Textarea.js +6 -11
  243. package/esm/core/ThemeProvider/ThemeContext.d.ts +1 -1
  244. package/esm/core/ThemeProvider/ThemeProvider.d.ts +23 -3
  245. package/esm/core/ThemeProvider/ThemeProvider.js +65 -24
  246. package/esm/core/Tile/Tile.d.ts +142 -17
  247. package/esm/core/Tile/Tile.js +107 -16
  248. package/esm/core/Toast/Toast.d.ts +12 -4
  249. package/esm/core/Toast/Toast.js +26 -13
  250. package/esm/core/Tooltip/Tooltip.d.ts +35 -28
  251. package/esm/core/Tooltip/Tooltip.js +119 -116
  252. package/esm/core/TransferList/TransferList.js +4 -9
  253. package/esm/core/Tree/TreeNode.js +1 -1
  254. package/esm/core/index.d.ts +2 -0
  255. package/esm/core/index.js +2 -0
  256. package/esm/core/utils/components/ButtonBase.d.ts +14 -0
  257. package/esm/core/utils/components/ButtonBase.js +42 -0
  258. package/esm/core/utils/components/Icon.d.ts +5 -0
  259. package/esm/core/utils/components/Icon.js +8 -1
  260. package/esm/core/utils/components/InputContainer.d.ts +0 -1
  261. package/esm/core/utils/components/InputContainer.js +14 -30
  262. package/esm/core/utils/components/InputFlexContainer.d.ts +1 -0
  263. package/esm/core/utils/components/InputFlexContainer.js +3 -1
  264. package/esm/core/utils/components/Popover.js +5 -3
  265. package/esm/core/utils/components/Portal.d.ts +27 -0
  266. package/esm/core/utils/components/Portal.js +36 -0
  267. package/esm/core/utils/components/VirtualScroll.js +4 -4
  268. package/esm/core/utils/components/index.d.ts +2 -0
  269. package/esm/core/utils/components/index.js +2 -0
  270. package/esm/core/utils/functions/colors.d.ts +1 -1
  271. package/esm/core/utils/functions/colors.js +1 -13
  272. package/esm/core/utils/functions/index.d.ts +1 -0
  273. package/esm/core/utils/functions/index.js +1 -0
  274. package/esm/core/utils/functions/react.d.ts +8 -0
  275. package/esm/core/utils/functions/react.js +35 -0
  276. package/esm/core/utils/hooks/index.d.ts +1 -0
  277. package/esm/core/utils/hooks/index.js +1 -0
  278. package/esm/core/utils/hooks/useControlledState.d.ts +13 -0
  279. package/esm/core/utils/hooks/useControlledState.js +34 -0
  280. package/esm/core/utils/hooks/useGlobals.d.ts +1 -1
  281. package/esm/styles.js +11 -35
  282. package/package.json +3 -3
  283. package/styles.css +49 -46
package/CHANGELOG.md CHANGED
@@ -1,5 +1,63 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.0-dev.8
4
+
5
+ ### Major Changes
6
+
7
+ - [#1544](https://github.com/iTwin/iTwinUI/pull/1544): Removed `iconDisplayStyle` prop from `LabeledInput` and `LabeledTextarea` components. `svgIcon` is now added inline. Users must use `StatusMessage` to add custom icon to the message.
8
+ - [#1355](https://github.com/iTwin/iTwinUI/pull/1355): Removed `inputStyle` and `inputClassName` props from `LabeledInput`; style and className props are being passed down to input. Added `wrapperProps`, `labelProps`, `messageProps`, `messageIconProps`, `inputWrapperProps` to pass props to sub elements.
9
+ - [#1355](https://github.com/iTwin/iTwinUI/pull/1355): Removed `selectStyle` and `selectClassName` props from `LabeledSelect`; style and className props are being passed down to textarea. Added `wrapperProps`, `labelProps`, `messageProps`, `messageIconProps` to pass props to sub elements.
10
+ - [#1355](https://github.com/iTwin/iTwinUI/pull/1355): Removed `textareaStyle` and `textareaClassName` props from `LabeledTextarea`; style and className props are being passed down to textarea. Added `wrapperProps`, `labelProps`, `messageProps`, `messageIconProps` to pass props to sub elements.
11
+
12
+ ### Minor Changes
13
+
14
+ - [#1355](https://github.com/iTwin/iTwinUI/pull/1355): Added `status` prop to `Input`, `Textarea` and `Select`.
15
+ - [#1510](https://github.com/iTwin/iTwinUI/pull/1510): Added `domProps` to allow Toast's DOM customisation.
16
+ - [#1355](https://github.com/iTwin/iTwinUI/pull/1355): Added two new components for building complex input layouts.
17
+
18
+ - `InputGrid` for the "outer" layout (label, inputs and statusMessage)
19
+ - `InputWithDecorations` for the "inner" layout (start icon/button, end icon/button)
20
+
21
+ `LabeledInput`, `LabeledSelect`, `LabeledTextarea` and table `DatePickerInput` have been updated to make use of these new components internally.
22
+
23
+ - [#1531](https://github.com/iTwin/iTwinUI/pull/1531): Selected options in Select/ComboBox will now have a checkmark.
24
+ - [#1355](https://github.com/iTwin/iTwinUI/pull/1355): Added new `padded` prop to `Icon`.
25
+ - [#1466](https://github.com/iTwin/iTwinUI/pull/1466): Adding the ability for every DOM node inside DatePicker component to have a custom className passed to it.
26
+ - [#1523](https://github.com/iTwin/iTwinUI/pull/1523): Added `ariaStrategy` prop to Tooltip. Can be used to change how the tooltip is associated with the trigger element.
27
+
28
+ ### Patch Changes
29
+
30
+ - [#1533](https://github.com/iTwin/iTwinUI/pull/1533): Fixed missing accessible name in SplitButton.
31
+ - [#1495](https://github.com/iTwin/iTwinUI/pull/1495): Added accessible name to dropdown menu button in HeaderSplitButton.
32
+ - [#1496](https://github.com/iTwin/iTwinUI/pull/1496): Added accessible button name to SideNavigation expand button.
33
+ - [#1505](https://github.com/iTwin/iTwinUI/pull/1505): Gave accessible label to the sub-row toggle in <Table>.
34
+
35
+ ## 3.0.0-dev.7
36
+
37
+ ### Major Changes
38
+
39
+ - [#1478](https://github.com/iTwin/iTwinUI/pull/1478): ThemeProvider now defaults the `theme` value to `"inherit"` and falls back to `"light"` there is no parent theme found. Also the inherit behavior has been made more resilient for cases where react context fails.
40
+ - [#1458](https://github.com/iTwin/iTwinUI/pull/1458): Added wrapperProps, contentProps, topProps, and bottomProps to Side Navigation component to improve customization. Top-level props (className, styling, etc) now passed to SideNav button instead of to the wrapper.
41
+ - [#1435](https://github.com/iTwin/iTwinUI/pull/1435): Improving customization of SplitButton with wrapperProps and menuButtonProps. ClassName now passed to the button instead of the component wrapper.
42
+ - [#1461](https://github.com/iTwin/iTwinUI/pull/1461): Changed disabled button behavior to make them focusable and use `aria-disabled` instead of `disabled` attribute.
43
+
44
+ ### Minor Changes
45
+
46
+ - [#1440](https://github.com/iTwin/iTwinUI/pull/1440): Adding the ability for every DOM node to have a custom className passed to it.
47
+ New prop for `FileUpload` component: `contentProps`
48
+ - [#1430](https://github.com/iTwin/iTwinUI/pull/1430): Adding the ability for each node element in `Stepper` to have a custom `prop`.
49
+ New props include: `stepProps`, `trackContentProps`, `circleProps`, `nameProps`, `labelProps`, `labelCountProps`
50
+ - [#1435](https://github.com/iTwin/iTwinUI/pull/1435): Improving customization of Button with new props: labelProps, startIconProps, and endIconProps.
51
+ Improving customization of IconButton with iconProps.
52
+ - [#1477](https://github.com/iTwin/iTwinUI/pull/1477): Added a new `portalContainer` prop to `ThemeProvider`. When specified, all floating elements (tooltips, toats, dialogs) under the ThemeProvider will read this prop from context and portal into it.
53
+
54
+ ### Patch Changes
55
+
56
+ - [#1446](https://github.com/iTwin/iTwinUI/pull/1446): Avatar has been refactored to be a single `<span>`. The colors have been updated to pass AAA contrast ratio.
57
+ - [#1492](https://github.com/iTwin/iTwinUI/pull/1492): Fixed `aria-owns` syntax for `TreeNode`
58
+ - [#1486](https://github.com/iTwin/iTwinUI/pull/1486): DatePicker date tables now have accessible labels.
59
+ - [#1499](https://github.com/iTwin/iTwinUI/pull/1499): Removed special handling of iPhone notch in Header and SideNavigation.
60
+
3
61
  ## 3.0.0-dev.6
4
62
 
5
63
  ### Major Changes
@@ -120,6 +178,49 @@
120
178
  - Updated dependencies:
121
179
  - @itwin/itwinui-css@2.0.0-dev.0
122
180
 
181
+ ## 2.12.7
182
+
183
+ ### Patch Changes
184
+
185
+ - [#1545](https://github.com/iTwin/iTwinUI/pull/1545): `tableFilters.DateRangeFilter` now supports localizing the date picker using `translatedLabels.datePicker`.
186
+
187
+ ## 2.12.6
188
+
189
+ ### Patch Changes
190
+
191
+ - [#1516](https://github.com/iTwin/iTwinUI/pull/1516): Update SearchBox placeholder color to match Input.
192
+
193
+ ## 2.12.5
194
+
195
+ ### Patch Changes
196
+
197
+ - [#1511](https://github.com/iTwin/iTwinUI/pull/1511): Fix high-visibility button background on hover.
198
+
199
+ ## 2.12.4
200
+
201
+ ### Patch Changes
202
+
203
+ - [#1508](https://github.com/iTwin/iTwinUI/pull/1508): Fixed an issue where styles were not included in CommonJS environments.
204
+
205
+ ## 2.12.3
206
+
207
+ ### Patch Changes
208
+
209
+ - [#1485](https://github.com/iTwin/iTwinUI/pull/1485): Improved color contrast for input and select placeholder text.
210
+ - [#1501](https://github.com/iTwin/iTwinUI/pull/1501): Fixed a small misalignment in Table when using sticky columns.
211
+
212
+ ## 2.12.2
213
+
214
+ ### Patch Changes
215
+
216
+ - [#1494](https://github.com/iTwin/iTwinUI/pull/1494): Updated color-picker dot so its outline adapts dynamically to the backgrounds for better contrast.
217
+
218
+ ## 2.12.1
219
+
220
+ ### Patch Changes
221
+
222
+ - [#1467](https://github.com/iTwin/iTwinUI/pull/1467): Fixed an issue in Carousel where latest `onSlideChange` callback was being ignored.
223
+
123
224
  ## 2.12.0
124
225
 
125
226
  ### Minor Changes
@@ -12,20 +12,26 @@ type AlertOwnProps = {
12
12
  */
13
13
  isSticky?: boolean;
14
14
  };
15
+ type AlertLegacyProps = {
16
+ /** @deprecated Use `Alert.Action` subcomponent. */
17
+ clickableText?: React.ReactNode;
18
+ /** @deprecated Use `Alert.Action` subcomponent. */
19
+ clickableTextProps?: React.ComponentPropsWithoutRef<'a'>;
20
+ /** @deprecated Use `Alert.CloseButton` subcomponent. */
21
+ onClose?: () => void;
22
+ };
15
23
  /**
16
24
  * A small box to quickly grab user attention and communicate a brief message
17
25
  * @example
18
- * <Alert>
19
- * <Alert.Message>This is an alert.</Alert.Message>
20
- * </Alert>
26
+ * <Alert>This is an alert.</Alert>
21
27
  * @example
22
- * <Alert type='informational'>
28
+ * <Alert.Wrapper type='informational'>
23
29
  * <Alert.Icon />
24
30
  * <Alert.Message>This is an informational alert.</Alert.Message>
25
31
  * <Alert.CloseButton onClick={() => {}} />
26
- * </Alert>
32
+ * </Alert.Wrapper>
27
33
  * @example
28
- * <Alert type='positive'>
34
+ * <Alert.Wrapper type='positive'>
29
35
  * <Alert.Icon>
30
36
  * <SvgSmileyHappy />
31
37
  * </Alert.Icon>
@@ -36,17 +42,22 @@ type AlertOwnProps = {
36
42
  * <Alert.CloseButton onClick={() => {}}>
37
43
  * <SvgCollapse />
38
44
  * </Alert.CloseButton>
39
- * </Alert>
45
+ * </Alert.Wrapper>
40
46
  */
41
- export declare const Alert: PolymorphicForwardRefComponent<"div", AlertOwnProps> & {
47
+ export declare const Alert: PolymorphicForwardRefComponent<"div", AlertOwnProps & AlertLegacyProps> & {
48
+ /**
49
+ * Alert wrapper subcomponent
50
+ */
51
+ Wrapper: PolymorphicForwardRefComponent<"div", AlertOwnProps>;
42
52
  /**
43
53
  * Alert icon subcomponent
44
54
  */
45
55
  Icon: PolymorphicForwardRefComponent<"span", Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
46
56
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
47
- }, "fill" | "as" | "key" | "size" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
57
+ }, "fill" | "as" | "key" | "size" | keyof React.HTMLAttributes<HTMLSpanElement> | "padded"> & {
48
58
  size?: "small" | "large" | "auto" | "medium" | import("../utils/types.js").AnyString | undefined;
49
59
  fill?: "default" | "informational" | "negative" | "positive" | "warning" | import("../utils/types.js").AnyString | undefined;
60
+ padded?: boolean | undefined;
50
61
  } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
51
62
  as?: "span" | undefined;
52
63
  }>;
@@ -11,7 +11,43 @@ const React = tslib_1.__importStar(require('react'));
11
11
  const index_js_1 = require('../utils/index.js');
12
12
  const index_js_2 = require('../Buttons/index.js');
13
13
  const AlertContext = React.createContext(undefined);
14
- const AlertComponent = React.forwardRef((props, ref) => {
14
+ // ----------------------------------------------------------------------------
15
+ // Alert component
16
+ const AlertComponent = React.forwardRef((props, forwardedRef) => {
17
+ const {
18
+ children,
19
+ type = 'informational',
20
+ isSticky = false,
21
+ clickableText,
22
+ clickableTextProps,
23
+ onClose,
24
+ ...rest
25
+ } = props;
26
+ return React.createElement(
27
+ exports.Alert.Wrapper,
28
+ { type: type, isSticky: isSticky, ref: forwardedRef, ...rest },
29
+ React.createElement(exports.Alert.Icon, null),
30
+ React.createElement(
31
+ exports.Alert.Message,
32
+ null,
33
+ children,
34
+ clickableText
35
+ ? React.createElement(
36
+ exports.Alert.Action,
37
+ { ...clickableTextProps },
38
+ clickableText,
39
+ )
40
+ : null,
41
+ ),
42
+ onClose
43
+ ? React.createElement(exports.Alert.CloseButton, { onClick: onClose })
44
+ : null,
45
+ );
46
+ });
47
+ AlertComponent.displayName = 'Alert';
48
+ // ----------------------------------------------------------------------------
49
+ // Alert.Wrapper component
50
+ const AlertWrapper = React.forwardRef((props, ref) => {
15
51
  const {
16
52
  children,
17
53
  className,
@@ -31,7 +67,7 @@ const AlertComponent = React.forwardRef((props, ref) => {
31
67
  React.createElement(AlertContext.Provider, { value: { type } }, children),
32
68
  );
33
69
  });
34
- AlertComponent.displayName = 'Alert';
70
+ AlertWrapper.displayName = 'Alert.Wrapper';
35
71
  // ----------------------------------------------------------------------------
36
72
  // Alert.Icon component
37
73
  const AlertIcon = React.forwardRef((props, ref) => {
@@ -54,7 +90,7 @@ AlertMessage.displayName = 'Alert.Message';
54
90
  const AlertAction = React.forwardRef((props, ref) => {
55
91
  const { children, className, ...rest } = props;
56
92
  return React.createElement(
57
- index_js_1.Box,
93
+ index_js_1.ButtonBase,
58
94
  {
59
95
  as: !!props.href ? 'a' : 'button',
60
96
  className: (0, classnames_1.default)('iui-alert-link', className),
@@ -85,17 +121,15 @@ AlertCloseButton.displayName = 'Alert.CloseButton';
85
121
  /**
86
122
  * A small box to quickly grab user attention and communicate a brief message
87
123
  * @example
88
- * <Alert>
89
- * <Alert.Message>This is an alert.</Alert.Message>
90
- * </Alert>
124
+ * <Alert>This is an alert.</Alert>
91
125
  * @example
92
- * <Alert type='informational'>
126
+ * <Alert.Wrapper type='informational'>
93
127
  * <Alert.Icon />
94
128
  * <Alert.Message>This is an informational alert.</Alert.Message>
95
129
  * <Alert.CloseButton onClick={() => {}} />
96
- * </Alert>
130
+ * </Alert.Wrapper>
97
131
  * @example
98
- * <Alert type='positive'>
132
+ * <Alert.Wrapper type='positive'>
99
133
  * <Alert.Icon>
100
134
  * <SvgSmileyHappy />
101
135
  * </Alert.Icon>
@@ -106,9 +140,13 @@ AlertCloseButton.displayName = 'Alert.CloseButton';
106
140
  * <Alert.CloseButton onClick={() => {}}>
107
141
  * <SvgCollapse />
108
142
  * </Alert.CloseButton>
109
- * </Alert>
143
+ * </Alert.Wrapper>
110
144
  */
111
145
  exports.Alert = Object.assign(AlertComponent, {
146
+ /**
147
+ * Alert wrapper subcomponent
148
+ */
149
+ Wrapper: AlertWrapper,
112
150
  /**
113
151
  * Alert icon subcomponent
114
152
  */
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { PolymorphicForwardRefComponent } from '../utils/index.js';
2
+ import { SoftBackgrounds } from '../utils/index.js';
3
+ import type { AnyString, PolymorphicForwardRefComponent } from '../utils/index.js';
3
4
  export type AvatarStatus = 'online' | 'busy' | 'away' | 'offline';
4
5
  type StatusTitles = {
5
6
  [key in Exclude<AvatarStatus, ''>]: string;
@@ -29,7 +30,7 @@ type AvatarProps = {
29
30
  /**
30
31
  * Color of the icon. You can use `getUserColor` function to generate color from user name or email. If not provided, default background color from CSS styling will be used (hsl(72, 51%, 56%) / olive green).
31
32
  */
32
- backgroundColor?: string;
33
+ backgroundColor?: keyof typeof SoftBackgrounds | AnyString;
33
34
  /**
34
35
  * Translated status messages shown on hover.
35
36
  */
@@ -9,6 +9,17 @@ const tslib_1 = require('tslib');
9
9
  const classnames_1 = tslib_1.__importDefault(require('classnames'));
10
10
  const React = tslib_1.__importStar(require('react'));
11
11
  const index_js_1 = require('../utils/index.js');
12
+ /**
13
+ * Helper function that returns one of the preset badge color values.
14
+ */
15
+ const getBackground = (color) => {
16
+ if (!color) {
17
+ return '';
18
+ }
19
+ return (0, index_js_1.isSoftBackground)(color)
20
+ ? index_js_1.SoftBackgrounds[color]
21
+ : color;
22
+ };
12
23
  exports.defaultStatusTitles = {
13
24
  away: 'Away',
14
25
  busy: 'Busy',
@@ -56,30 +67,21 @@ exports.Avatar = React.forwardRef((props, ref) => {
56
67
  { [`iui-${size}`]: size !== 'medium' },
57
68
  className,
58
69
  ),
70
+ 'data-iui-status': status,
59
71
  title: title,
60
- style: { backgroundColor, ...style },
72
+ style: { backgroundColor: getBackground(backgroundColor), ...style },
61
73
  ref: ref,
62
74
  ...rest,
63
75
  },
64
- !image &&
65
- React.createElement(
66
- index_js_1.Box,
67
- { as: 'abbr', className: 'iui-initials' },
68
- abbreviation?.substring(0, 2),
69
- ),
76
+ !image ? abbreviation?.substring(0, 2) : null,
70
77
  image,
71
- React.createElement(index_js_1.Box, {
72
- as: 'span',
73
- className: 'iui-stroke',
74
- }),
75
- status &&
76
- React.createElement(index_js_1.Box, {
77
- as: 'span',
78
- title: statusTitles[status],
79
- className: (0, classnames_1.default)('iui-status', {
80
- [`iui-${status}`]: !!status,
81
- }),
82
- }),
78
+ status
79
+ ? React.createElement(
80
+ index_js_1.VisuallyHidden,
81
+ null,
82
+ statusTitles[status],
83
+ )
84
+ : null,
83
85
  );
84
86
  });
85
87
  exports.default = exports.Avatar;
@@ -89,14 +89,9 @@ exports.AvatarGroup = React.forwardRef((props, ref) => {
89
89
  countIconProps?.className,
90
90
  ),
91
91
  },
92
- React.createElement(
93
- index_js_1.Box,
94
- { as: 'abbr', className: 'iui-initials' },
95
- childrenLength <= maxLength
96
- ? `${childrenLength - maxIcons}`
97
- : `${maxLength}+`,
98
- ),
99
- React.createElement(index_js_1.Box, { className: 'iui-stroke' }),
92
+ childrenLength <= maxLength
93
+ ? `${childrenLength - maxIcons}`
94
+ : `${maxLength}+`,
100
95
  ),
101
96
  ),
102
97
  );
@@ -9,6 +9,7 @@ const tslib_1 = require('tslib');
9
9
  const React = tslib_1.__importStar(require('react'));
10
10
  const classnames_1 = tslib_1.__importDefault(require('classnames'));
11
11
  const index_js_1 = require('../utils/index.js');
12
+ const react_1 = require('@floating-ui/react');
12
13
  /**
13
14
  * Group buttons together for common actions.
14
15
  * Handles responsive overflow when the `overflowButton` prop is specified.
@@ -60,42 +61,46 @@ exports.ButtonGroup = React.forwardRef((props, ref) => {
60
61
  );
61
62
  const refs = (0, index_js_1.useMergedRefs)(overflowRef, ref);
62
63
  return React.createElement(
63
- index_js_1.Box,
64
- {
65
- className: (0, classnames_1.default)(
66
- {
67
- 'iui-button-group': orientation === 'horizontal',
68
- 'iui-button-group-vertical': orientation === 'vertical',
69
- 'iui-button-group-overflow-x':
70
- !!overflowButton && orientation === 'horizontal',
71
- },
72
- className,
73
- ),
74
- ref: refs,
75
- ...rest,
76
- },
77
- (() => {
78
- if (!(visibleCount < items.length)) {
79
- return items;
80
- }
81
- const overflowStart =
82
- overflowPlacement === 'start'
83
- ? items.length - visibleCount
84
- : visibleCount - 1;
85
- return React.createElement(
86
- React.Fragment,
87
- null,
88
- overflowButton &&
89
- overflowPlacement === 'start' &&
90
- React.createElement('div', null, overflowButton(overflowStart)),
91
- overflowPlacement === 'start'
92
- ? items.slice(overflowStart + 1)
93
- : items.slice(0, Math.max(0, overflowStart)),
94
- overflowButton &&
95
- overflowPlacement === 'end' &&
96
- React.createElement('div', null, overflowButton(overflowStart)),
97
- );
98
- })(),
64
+ react_1.FloatingDelayGroup,
65
+ { delay: { open: 50, close: 250 } },
66
+ React.createElement(
67
+ index_js_1.Box,
68
+ {
69
+ className: (0, classnames_1.default)(
70
+ {
71
+ 'iui-button-group': orientation === 'horizontal',
72
+ 'iui-button-group-vertical': orientation === 'vertical',
73
+ 'iui-button-group-overflow-x':
74
+ !!overflowButton && orientation === 'horizontal',
75
+ },
76
+ className,
77
+ ),
78
+ ref: refs,
79
+ ...rest,
80
+ },
81
+ (() => {
82
+ if (!(visibleCount < items.length)) {
83
+ return items;
84
+ }
85
+ const overflowStart =
86
+ overflowPlacement === 'start'
87
+ ? items.length - visibleCount
88
+ : visibleCount - 1;
89
+ return React.createElement(
90
+ React.Fragment,
91
+ null,
92
+ overflowButton &&
93
+ overflowPlacement === 'start' &&
94
+ React.createElement('div', null, overflowButton(overflowStart)),
95
+ overflowPlacement === 'start'
96
+ ? items.slice(overflowStart + 1)
97
+ : items.slice(0, Math.max(0, overflowStart)),
98
+ overflowButton &&
99
+ overflowPlacement === 'end' &&
100
+ React.createElement('div', null, overflowButton(overflowStart)),
101
+ );
102
+ })(),
103
+ ),
99
104
  );
100
105
  });
101
106
  exports.default = exports.ButtonGroup;
@@ -1,4 +1,5 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
+ import { ButtonBase } from '../../utils/index.js';
2
3
  import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
3
4
  export type ButtonProps = {
4
5
  /**
@@ -19,7 +20,19 @@ export type ButtonProps = {
19
20
  * Icon shown after the main button content.
20
21
  */
21
22
  endIcon?: JSX.Element;
22
- };
23
+ /**
24
+ * Passes props to the button label.
25
+ */
26
+ labelProps?: React.ComponentProps<'span'>;
27
+ /**
28
+ * Passes props to the start icon.
29
+ */
30
+ startIconProps?: React.ComponentProps<'span'>;
31
+ /**
32
+ * Passes props to the end icon.
33
+ */
34
+ endIconProps?: React.ComponentProps<'span'>;
35
+ } & Pick<React.ComponentProps<typeof ButtonBase>, 'htmlDisabled'>;
23
36
  /**
24
37
  * Generic button component
25
38
  * @example
@@ -23,36 +23,50 @@ exports.Button = React.forwardRef((props, ref) => {
23
23
  children,
24
24
  className,
25
25
  size,
26
- style,
27
26
  styleType = 'default',
28
- type = 'button',
29
27
  startIcon,
30
28
  endIcon,
29
+ labelProps,
30
+ startIconProps,
31
+ endIconProps,
31
32
  ...rest
32
33
  } = props;
33
34
  return React.createElement(
34
- index_js_1.Box,
35
+ index_js_1.ButtonBase,
35
36
  {
36
- as: 'button',
37
37
  ref: ref,
38
38
  className: (0, classnames_1.default)('iui-button', className),
39
39
  'data-iui-variant': styleType !== 'default' ? styleType : undefined,
40
40
  'data-iui-size': size,
41
- style: style,
42
- type: type,
43
41
  ...rest,
44
42
  },
45
43
  startIcon &&
46
44
  React.createElement(
47
45
  index_js_1.Box,
48
- { as: 'span', className: 'iui-button-icon', 'aria-hidden': true },
46
+ {
47
+ as: 'span',
48
+ 'aria-hidden': true,
49
+ ...startIconProps,
50
+ className: (0, classnames_1.default)(
51
+ 'iui-button-icon',
52
+ startIconProps?.className,
53
+ ),
54
+ },
49
55
  startIcon,
50
56
  ),
51
- children && React.createElement('span', null, children),
57
+ children && React.createElement('span', { ...labelProps }, children),
52
58
  endIcon &&
53
59
  React.createElement(
54
60
  index_js_1.Box,
55
- { as: 'span', className: 'iui-button-icon', 'aria-hidden': true },
61
+ {
62
+ as: 'span',
63
+ 'aria-hidden': true,
64
+ ...endIconProps,
65
+ className: (0, classnames_1.default)(
66
+ 'iui-button-icon',
67
+ endIconProps?.className,
68
+ ),
69
+ },
56
70
  endIcon,
57
71
  ),
58
72
  );
@@ -52,7 +52,7 @@ exports.DropdownButton = React.forwardRef((props, ref) => {
52
52
  setIsMenuOpen(false);
53
53
  dropdownMenuProps?.onHide?.(i);
54
54
  },
55
- style: { minWidth: menuWidth, ...dropdownMenuProps?.style },
55
+ style: { minInlineSize: menuWidth, ...dropdownMenuProps?.style },
56
56
  },
57
57
  React.createElement(
58
58
  index_js_1.Button,
@@ -11,7 +11,11 @@ export type IconButtonProps = {
11
11
  * Name of the button, shown in a tooltip and exposed to assistive technologies.
12
12
  */
13
13
  label?: React.ReactNode;
14
- } & Omit<ButtonProps, 'startIcon' | 'endIcon'>;
14
+ /**
15
+ * Passes props to IconButton icon.
16
+ */
17
+ iconProps?: React.ComponentProps<'span'>;
18
+ } & Omit<ButtonProps, 'startIcon' | 'endIcon' | 'startIconProps' | 'endIconProps' | 'labelProps'>;
15
19
  /**
16
20
  * Icon button
17
21
  * @example
@@ -9,6 +9,7 @@ const tslib_1 = require('tslib');
9
9
  const classnames_1 = tslib_1.__importDefault(require('classnames'));
10
10
  const React = tslib_1.__importStar(require('react'));
11
11
  const index_js_1 = require('../../utils/index.js');
12
+ const Tooltip_js_1 = require('../../Tooltip/Tooltip.js');
12
13
  /**
13
14
  * Icon button
14
15
  * @example
@@ -22,55 +23,43 @@ exports.IconButton = React.forwardRef((props, ref) => {
22
23
  children,
23
24
  styleType = 'default',
24
25
  size,
25
- type = 'button',
26
26
  className,
27
27
  label,
28
+ iconProps,
28
29
  ...rest
29
30
  } = props;
30
- return React.createElement(
31
- IconButtonTooltip,
32
- { label: label },
31
+ const button = React.createElement(
32
+ index_js_1.ButtonBase,
33
+ {
34
+ ref: ref,
35
+ className: (0, classnames_1.default)('iui-button', className),
36
+ 'data-iui-variant': styleType !== 'default' ? styleType : undefined,
37
+ 'data-iui-size': size,
38
+ 'data-iui-active': isActive,
39
+ 'aria-pressed': isActive,
40
+ ...rest,
41
+ },
33
42
  React.createElement(
34
43
  index_js_1.Box,
35
44
  {
36
- as: 'button',
37
- ref: ref,
38
- className: (0, classnames_1.default)('iui-button', className),
39
- 'data-iui-variant': styleType !== 'default' ? styleType : undefined,
40
- 'data-iui-size': size,
41
- 'data-iui-active': isActive,
42
- 'aria-pressed': isActive,
43
- type: type,
44
- ...rest,
45
+ as: 'span',
46
+ 'aria-hidden': true,
47
+ ...iconProps,
48
+ className: (0, classnames_1.default)(
49
+ 'iui-button-icon',
50
+ iconProps?.className,
51
+ ),
45
52
  },
46
- React.createElement(
47
- index_js_1.Box,
48
- { as: 'span', className: 'iui-button-icon', 'aria-hidden': true },
49
- children,
50
- ),
51
- label
52
- ? React.createElement(index_js_1.VisuallyHidden, null, label)
53
- : null,
53
+ children,
54
54
  ),
55
+ label ? React.createElement(index_js_1.VisuallyHidden, null, label) : null,
55
56
  );
56
- });
57
- const IconButtonTooltip = (props) => {
58
- const { label, children } = props;
59
57
  return label
60
58
  ? React.createElement(
61
- index_js_1.Popover,
62
- {
63
- interactive: false,
64
- offset: [0, 4],
65
- aria: { content: null },
66
- content: React.createElement(
67
- index_js_1.Box,
68
- { 'aria-hidden': 'true', className: 'iui-tooltip' },
69
- label,
70
- ),
71
- },
72
- children,
59
+ Tooltip_js_1.Tooltip,
60
+ { content: label, ariaStrategy: 'none' },
61
+ button,
73
62
  )
74
- : children;
75
- };
63
+ : button;
64
+ });
76
65
  exports.default = exports.IconButton;