@itwin/itwinui-react 1.20.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/cjs/core/Alert/Alert.d.ts +1 -1
  3. package/cjs/core/Alert/Alert.js +3 -4
  4. package/cjs/core/Badge/Badge.d.ts +1 -2
  5. package/cjs/core/Badge/Badge.js +4 -5
  6. package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  7. package/cjs/core/Breadcrumbs/Breadcrumbs.js +4 -6
  8. package/cjs/core/ButtonGroup/ButtonGroup.d.ts +1 -1
  9. package/cjs/core/ButtonGroup/ButtonGroup.js +3 -4
  10. package/cjs/core/Buttons/Button/Button.js +2 -2
  11. package/cjs/core/Buttons/DropdownButton/DropdownButton.js +3 -4
  12. package/cjs/core/Buttons/IconButton/IconButton.js +2 -2
  13. package/cjs/core/Buttons/IdeasButton/IdeasButton.js +2 -2
  14. package/cjs/core/Buttons/SplitButton/SplitButton.js +2 -2
  15. package/cjs/core/Checkbox/Checkbox.js +3 -4
  16. package/cjs/core/ComboBox/ComboBox.d.ts +51 -0
  17. package/cjs/core/ComboBox/ComboBox.js +268 -0
  18. package/cjs/core/ComboBox/index.d.ts +4 -0
  19. package/cjs/core/ComboBox/index.js +10 -0
  20. package/cjs/core/DatePicker/DatePicker.js +2 -2
  21. package/cjs/core/DropdownMenu/DropdownMenu.d.ts +1 -2
  22. package/cjs/core/DropdownMenu/DropdownMenu.js +4 -6
  23. package/cjs/core/ErrorPage/ErrorPage.js +2 -2
  24. package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +1 -1
  25. package/cjs/core/ExpandableBlock/ExpandableBlock.js +3 -4
  26. package/cjs/core/Fieldset/Fieldset.js +2 -2
  27. package/cjs/core/FileUpload/FileUpload.d.ts +2 -2
  28. package/cjs/core/FileUpload/FileUpload.js +3 -4
  29. package/cjs/core/FileUpload/FileUploadTemplate.js +2 -2
  30. package/cjs/core/Footer/Footer.d.ts +1 -1
  31. package/cjs/core/Footer/Footer.js +2 -2
  32. package/cjs/core/Header/Header.d.ts +1 -1
  33. package/cjs/core/Header/Header.js +2 -2
  34. package/cjs/core/Header/HeaderBreadcrumbs.js +2 -2
  35. package/cjs/core/Header/HeaderButton.js +2 -2
  36. package/cjs/core/Header/HeaderLogo.d.ts +1 -1
  37. package/cjs/core/Header/HeaderLogo.js +2 -2
  38. package/cjs/core/Input/Input.js +3 -4
  39. package/cjs/core/InputGroup/InputGroup.d.ts +1 -1
  40. package/cjs/core/InputGroup/InputGroup.js +4 -6
  41. package/cjs/core/LabeledInput/LabeledInput.js +4 -6
  42. package/cjs/core/LabeledSelect/LabeledSelect.js +4 -6
  43. package/cjs/core/LabeledTextarea/LabeledTextarea.js +4 -6
  44. package/cjs/core/Menu/Menu.d.ts +11 -1
  45. package/cjs/core/Menu/Menu.js +11 -11
  46. package/cjs/core/Menu/MenuDivider.js +2 -2
  47. package/cjs/core/Menu/MenuItem.d.ts +2 -2
  48. package/cjs/core/Menu/MenuItem.js +5 -7
  49. package/cjs/core/Modal/Modal.d.ts +1 -1
  50. package/cjs/core/Modal/Modal.js +5 -7
  51. package/cjs/core/Modal/ModalButtonBar.js +2 -2
  52. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
  53. package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +2 -2
  54. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +1 -1
  55. package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -2
  56. package/cjs/core/Radio/Radio.js +3 -4
  57. package/cjs/core/RadioTiles/RadioTile.js +3 -4
  58. package/cjs/core/RadioTiles/RadioTileGroup.js +2 -2
  59. package/cjs/core/Select/Select.d.ts +1 -2
  60. package/cjs/core/Select/Select.js +4 -4
  61. package/cjs/core/SideNavigation/SideNavigation.d.ts +1 -1
  62. package/cjs/core/SideNavigation/SideNavigation.js +2 -2
  63. package/cjs/core/SideNavigation/SidenavButton.js +2 -2
  64. package/cjs/core/Slider/Slider.d.ts +1 -1
  65. package/cjs/core/Slider/Slider.js +7 -9
  66. package/cjs/core/Table/Table.d.ts +1 -1
  67. package/cjs/core/Table/Table.js +4 -4
  68. package/cjs/core/Table/TableRowMemoized.js +3 -4
  69. package/cjs/core/Table/filters/BaseFilter.d.ts +1 -1
  70. package/cjs/core/Table/filters/BaseFilter.js +2 -2
  71. package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +2 -2
  72. package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -2
  73. package/cjs/core/Table/filters/FilterButtonBar.d.ts +1 -1
  74. package/cjs/core/Table/filters/FilterButtonBar.js +2 -2
  75. package/cjs/core/Table/filters/FilterToggle.d.ts +1 -1
  76. package/cjs/core/Table/filters/FilterToggle.js +4 -6
  77. package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +2 -2
  78. package/cjs/core/Table/filters/TextFilter/TextFilter.js +2 -2
  79. package/cjs/core/Tabs/Tab.js +2 -2
  80. package/cjs/core/Tabs/Tabs.js +6 -9
  81. package/cjs/core/Tag/Tag.d.ts +1 -1
  82. package/cjs/core/Tag/Tag.js +2 -2
  83. package/cjs/core/Tag/TagContainer.d.ts +1 -1
  84. package/cjs/core/Tag/TagContainer.js +2 -2
  85. package/cjs/core/Textarea/Textarea.js +3 -4
  86. package/cjs/core/ThemeProvider/ThemeProvider.d.ts +1 -1
  87. package/cjs/core/ThemeProvider/ThemeProvider.js +2 -2
  88. package/cjs/core/Tile/Tile.d.ts +2 -2
  89. package/cjs/core/Tile/Tile.js +4 -4
  90. package/cjs/core/TimePicker/TimePicker.d.ts +1 -1
  91. package/cjs/core/TimePicker/TimePicker.js +2 -2
  92. package/cjs/core/Toast/Toast.d.ts +1 -1
  93. package/cjs/core/Toast/Toast.js +5 -6
  94. package/cjs/core/Toast/Toaster.js +2 -2
  95. package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +1 -1
  96. package/cjs/core/ToggleSwitch/ToggleSwitch.js +3 -4
  97. package/cjs/core/Tooltip/Tooltip.d.ts +1 -2
  98. package/cjs/core/Tooltip/Tooltip.js +3 -4
  99. package/cjs/core/Typography/Blockquote/Blockquote.js +2 -2
  100. package/cjs/core/Typography/Body/Body.js +2 -2
  101. package/cjs/core/Typography/Code/Code.d.ts +1 -1
  102. package/cjs/core/Typography/Code/Code.js +2 -2
  103. package/cjs/core/Typography/Headline/Headline.js +2 -2
  104. package/cjs/core/Typography/Kbd/Kbd.d.ts +1 -1
  105. package/cjs/core/Typography/Kbd/Kbd.js +2 -2
  106. package/cjs/core/Typography/Leading/Leading.js +2 -2
  107. package/cjs/core/Typography/Small/Small.js +2 -2
  108. package/cjs/core/Typography/Subheading/Subheading.js +2 -2
  109. package/cjs/core/Typography/Text/Text.d.ts +1 -1
  110. package/cjs/core/Typography/Text/Text.js +2 -2
  111. package/cjs/core/Typography/Title/Title.js +2 -2
  112. package/cjs/core/UserIcon/UserIcon.d.ts +1 -1
  113. package/cjs/core/UserIcon/UserIcon.js +2 -2
  114. package/cjs/core/UserIconGroup/UserIconGroup.d.ts +1 -1
  115. package/cjs/core/UserIconGroup/UserIconGroup.js +2 -2
  116. package/cjs/core/Wizard/Step.d.ts +1 -1
  117. package/cjs/core/Wizard/Wizard.js +2 -2
  118. package/cjs/core/index.d.ts +4 -3
  119. package/cjs/core/index.js +7 -6
  120. package/cjs/core/utils/{FocusTrap.d.ts → components/FocusTrap.d.ts} +0 -0
  121. package/cjs/core/utils/{FocusTrap.js → components/FocusTrap.js} +3 -3
  122. package/cjs/core/utils/{InputContainer.d.ts → components/InputContainer.d.ts} +0 -0
  123. package/cjs/core/utils/{InputContainer.js → components/InputContainer.js} +25 -3
  124. package/cjs/core/utils/{Popover.d.ts → components/Popover.d.ts} +1 -1
  125. package/cjs/core/utils/{Popover.js → components/Popover.js} +1 -1
  126. package/cjs/core/utils/components/icons.d.ts +8 -0
  127. package/cjs/core/utils/components/icons.js +32 -0
  128. package/cjs/core/utils/components/index.d.ts +4 -0
  129. package/cjs/core/utils/components/index.js +20 -0
  130. package/cjs/core/utils/functions/colors.d.ts +20 -0
  131. package/cjs/core/utils/functions/colors.js +52 -0
  132. package/cjs/core/utils/functions/dom.d.ts +18 -0
  133. package/cjs/core/utils/functions/dom.js +42 -0
  134. package/cjs/core/utils/functions/focusable.d.ts +8 -0
  135. package/cjs/core/utils/functions/focusable.js +34 -0
  136. package/cjs/core/utils/functions/index.d.ts +4 -0
  137. package/cjs/core/utils/functions/index.js +20 -0
  138. package/cjs/core/utils/functions/numbers.d.ts +8 -0
  139. package/cjs/core/utils/functions/numbers.js +27 -0
  140. package/cjs/core/utils/hooks/index.d.ts +6 -0
  141. package/cjs/core/utils/hooks/index.js +22 -0
  142. package/cjs/core/utils/hooks/useIntersection.js +2 -2
  143. package/cjs/core/utils/hooks/useResizeObserver.js +2 -2
  144. package/cjs/core/utils/hooks/useTheme.js +3 -3
  145. package/cjs/core/utils/index.d.ts +4 -0
  146. package/cjs/core/utils/index.js +20 -0
  147. package/esm/core/Alert/Alert.d.ts +1 -1
  148. package/esm/core/Alert/Alert.js +1 -2
  149. package/esm/core/Badge/Badge.d.ts +1 -2
  150. package/esm/core/Badge/Badge.js +1 -2
  151. package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  152. package/esm/core/Breadcrumbs/Breadcrumbs.js +1 -3
  153. package/esm/core/ButtonGroup/ButtonGroup.d.ts +1 -1
  154. package/esm/core/ButtonGroup/ButtonGroup.js +1 -2
  155. package/esm/core/Buttons/Button/Button.js +1 -1
  156. package/esm/core/Buttons/DropdownButton/DropdownButton.js +1 -2
  157. package/esm/core/Buttons/IconButton/IconButton.js +1 -1
  158. package/esm/core/Buttons/IdeasButton/IdeasButton.js +1 -1
  159. package/esm/core/Buttons/SplitButton/SplitButton.js +1 -1
  160. package/esm/core/Checkbox/Checkbox.js +1 -2
  161. package/esm/core/ComboBox/ComboBox.d.ts +51 -0
  162. package/esm/core/ComboBox/ComboBox.js +261 -0
  163. package/esm/core/ComboBox/index.d.ts +4 -0
  164. package/esm/core/ComboBox/index.js +6 -0
  165. package/esm/core/DatePicker/DatePicker.js +1 -1
  166. package/esm/core/DropdownMenu/DropdownMenu.d.ts +1 -2
  167. package/esm/core/DropdownMenu/DropdownMenu.js +1 -3
  168. package/esm/core/ErrorPage/ErrorPage.js +1 -1
  169. package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +1 -1
  170. package/esm/core/ExpandableBlock/ExpandableBlock.js +1 -2
  171. package/esm/core/Fieldset/Fieldset.js +1 -1
  172. package/esm/core/FileUpload/FileUpload.d.ts +2 -2
  173. package/esm/core/FileUpload/FileUpload.js +1 -2
  174. package/esm/core/FileUpload/FileUploadTemplate.js +1 -1
  175. package/esm/core/Footer/Footer.d.ts +1 -1
  176. package/esm/core/Footer/Footer.js +1 -1
  177. package/esm/core/Header/Header.d.ts +1 -1
  178. package/esm/core/Header/Header.js +1 -1
  179. package/esm/core/Header/HeaderBreadcrumbs.js +1 -1
  180. package/esm/core/Header/HeaderButton.js +1 -1
  181. package/esm/core/Header/HeaderLogo.d.ts +1 -1
  182. package/esm/core/Header/HeaderLogo.js +1 -1
  183. package/esm/core/Input/Input.js +1 -2
  184. package/esm/core/InputGroup/InputGroup.d.ts +1 -1
  185. package/esm/core/InputGroup/InputGroup.js +1 -3
  186. package/esm/core/LabeledInput/LabeledInput.js +1 -3
  187. package/esm/core/LabeledSelect/LabeledSelect.js +1 -3
  188. package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -3
  189. package/esm/core/Menu/Menu.d.ts +11 -1
  190. package/esm/core/Menu/Menu.js +7 -7
  191. package/esm/core/Menu/MenuDivider.js +1 -1
  192. package/esm/core/Menu/MenuItem.d.ts +2 -2
  193. package/esm/core/Menu/MenuItem.js +2 -4
  194. package/esm/core/Modal/Modal.d.ts +1 -1
  195. package/esm/core/Modal/Modal.js +1 -3
  196. package/esm/core/Modal/ModalButtonBar.js +1 -1
  197. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +1 -1
  198. package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +1 -1
  199. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +1 -1
  200. package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +1 -1
  201. package/esm/core/Radio/Radio.js +1 -2
  202. package/esm/core/RadioTiles/RadioTile.js +1 -2
  203. package/esm/core/RadioTiles/RadioTileGroup.js +1 -1
  204. package/esm/core/Select/Select.d.ts +1 -2
  205. package/esm/core/Select/Select.js +2 -2
  206. package/esm/core/SideNavigation/SideNavigation.d.ts +1 -1
  207. package/esm/core/SideNavigation/SideNavigation.js +1 -1
  208. package/esm/core/SideNavigation/SidenavButton.js +1 -1
  209. package/esm/core/Slider/Slider.d.ts +1 -1
  210. package/esm/core/Slider/Slider.js +1 -3
  211. package/esm/core/Table/Table.d.ts +1 -1
  212. package/esm/core/Table/Table.js +1 -1
  213. package/esm/core/Table/TableRowMemoized.js +1 -2
  214. package/esm/core/Table/filters/BaseFilter.d.ts +1 -1
  215. package/esm/core/Table/filters/BaseFilter.js +1 -1
  216. package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +1 -1
  217. package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +1 -1
  218. package/esm/core/Table/filters/FilterButtonBar.d.ts +1 -1
  219. package/esm/core/Table/filters/FilterButtonBar.js +1 -1
  220. package/esm/core/Table/filters/FilterToggle.d.ts +1 -1
  221. package/esm/core/Table/filters/FilterToggle.js +1 -3
  222. package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +1 -1
  223. package/esm/core/Table/filters/TextFilter/TextFilter.js +1 -1
  224. package/esm/core/Tabs/Tab.js +1 -1
  225. package/esm/core/Tabs/Tabs.js +1 -4
  226. package/esm/core/Tag/Tag.d.ts +1 -1
  227. package/esm/core/Tag/Tag.js +1 -1
  228. package/esm/core/Tag/TagContainer.d.ts +1 -1
  229. package/esm/core/Tag/TagContainer.js +1 -1
  230. package/esm/core/Textarea/Textarea.js +1 -2
  231. package/esm/core/ThemeProvider/ThemeProvider.d.ts +1 -1
  232. package/esm/core/ThemeProvider/ThemeProvider.js +1 -1
  233. package/esm/core/Tile/Tile.d.ts +2 -2
  234. package/esm/core/Tile/Tile.js +3 -3
  235. package/esm/core/TimePicker/TimePicker.d.ts +1 -1
  236. package/esm/core/TimePicker/TimePicker.js +1 -1
  237. package/esm/core/Toast/Toast.d.ts +1 -1
  238. package/esm/core/Toast/Toast.js +1 -2
  239. package/esm/core/Toast/Toaster.js +1 -1
  240. package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +1 -1
  241. package/esm/core/ToggleSwitch/ToggleSwitch.js +1 -2
  242. package/esm/core/Tooltip/Tooltip.d.ts +1 -2
  243. package/esm/core/Tooltip/Tooltip.js +1 -2
  244. package/esm/core/Typography/Blockquote/Blockquote.js +1 -1
  245. package/esm/core/Typography/Body/Body.js +1 -1
  246. package/esm/core/Typography/Code/Code.d.ts +1 -1
  247. package/esm/core/Typography/Code/Code.js +1 -1
  248. package/esm/core/Typography/Headline/Headline.js +1 -1
  249. package/esm/core/Typography/Kbd/Kbd.d.ts +1 -1
  250. package/esm/core/Typography/Kbd/Kbd.js +1 -1
  251. package/esm/core/Typography/Leading/Leading.js +1 -1
  252. package/esm/core/Typography/Small/Small.js +1 -1
  253. package/esm/core/Typography/Subheading/Subheading.js +1 -1
  254. package/esm/core/Typography/Text/Text.d.ts +1 -1
  255. package/esm/core/Typography/Text/Text.js +1 -1
  256. package/esm/core/Typography/Title/Title.js +1 -1
  257. package/esm/core/UserIcon/UserIcon.d.ts +1 -1
  258. package/esm/core/UserIcon/UserIcon.js +1 -1
  259. package/esm/core/UserIconGroup/UserIconGroup.d.ts +1 -1
  260. package/esm/core/UserIconGroup/UserIconGroup.js +1 -1
  261. package/esm/core/Wizard/Step.d.ts +1 -1
  262. package/esm/core/Wizard/Wizard.js +1 -1
  263. package/esm/core/index.d.ts +4 -3
  264. package/esm/core/index.js +2 -2
  265. package/esm/core/utils/{FocusTrap.d.ts → components/FocusTrap.d.ts} +0 -0
  266. package/esm/core/utils/{FocusTrap.js → components/FocusTrap.js} +2 -2
  267. package/esm/core/utils/{InputContainer.d.ts → components/InputContainer.d.ts} +0 -0
  268. package/esm/core/utils/{InputContainer.js → components/InputContainer.js} +25 -3
  269. package/esm/core/utils/{Popover.d.ts → components/Popover.d.ts} +1 -1
  270. package/esm/core/utils/{Popover.js → components/Popover.js} +1 -1
  271. package/esm/core/utils/components/icons.d.ts +8 -0
  272. package/esm/core/utils/components/icons.js +26 -0
  273. package/esm/core/utils/components/index.d.ts +4 -0
  274. package/esm/core/utils/components/index.js +8 -0
  275. package/esm/core/utils/functions/colors.d.ts +20 -0
  276. package/esm/core/utils/functions/colors.js +47 -0
  277. package/esm/core/utils/functions/dom.d.ts +18 -0
  278. package/esm/core/utils/functions/dom.js +36 -0
  279. package/esm/core/utils/functions/focusable.d.ts +8 -0
  280. package/esm/core/utils/functions/focusable.js +29 -0
  281. package/esm/core/utils/functions/index.d.ts +4 -0
  282. package/esm/core/utils/functions/index.js +8 -0
  283. package/esm/core/utils/functions/numbers.d.ts +8 -0
  284. package/esm/core/utils/functions/numbers.js +22 -0
  285. package/esm/core/utils/hooks/index.d.ts +6 -0
  286. package/esm/core/utils/hooks/index.js +10 -0
  287. package/esm/core/utils/hooks/useIntersection.js +1 -1
  288. package/esm/core/utils/hooks/useResizeObserver.js +1 -1
  289. package/esm/core/utils/hooks/useTheme.js +1 -1
  290. package/esm/core/utils/index.d.ts +4 -0
  291. package/esm/core/utils/index.js +8 -0
  292. package/package.json +5 -3
  293. package/cjs/core/utils/common.d.ts +0 -58
  294. package/cjs/core/utils/common.js +0 -146
  295. package/esm/core/utils/common.d.ts +0 -58
  296. package/esm/core/utils/common.js +0 -132
@@ -26,8 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useMergedRefs } from '../utils/hooks/useMergedRefs';
30
- import { useTheme } from '../utils/hooks/useTheme';
29
+ import { useMergedRefs, useTheme } from '../utils';
31
30
  import '@itwin/itwinui-css/css/inputs.css';
32
31
  /**
33
32
  * Basic textarea component
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ThemeOptions, ThemeType } from '../utils/hooks/useTheme';
2
+ import { ThemeOptions, ThemeType } from '../utils';
3
3
  export declare type ThemeProviderProps = {
4
4
  /**
5
5
  * Theme to be applied. If not set, light theme will be used.
@@ -3,7 +3,7 @@
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 { useTheme } from '../utils/hooks/useTheme';
6
+ import { useTheme } from '../utils';
7
7
  /**
8
8
  * Component providing global styles that are required for all components and allows changing theme.
9
9
  */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import { CommonProps } from '../utils';
2
3
  import '@itwin/itwinui-css/css/tile.css';
3
- import { CommonProps } from '../utils/props';
4
4
  export declare type TileProps = {
5
5
  /**
6
6
  * Name or title of the tile.
@@ -39,7 +39,7 @@ export declare type TileProps = {
39
39
  * thumbnail={<SvgImodelHollow />}
40
40
  * />
41
41
  */
42
- thumbnail: string | React.ReactNode;
42
+ thumbnail?: string | React.ReactNode;
43
43
  /**
44
44
  * `Badge` shown on the bottom right of thumbnail.
45
45
  */
@@ -29,7 +29,7 @@ import cx from 'classnames';
29
29
  import SvgCheckmark from '@itwin/itwinui-icons-react/cjs/icons/Checkmark';
30
30
  import SvgMore from '@itwin/itwinui-icons-react/cjs/icons/More';
31
31
  import SvgNew from '@itwin/itwinui-icons-react/cjs/icons/New';
32
- import { useTheme } from '../utils/hooks/useTheme';
32
+ import { useTheme } from '../utils';
33
33
  import '@itwin/itwinui-css/css/tile.css';
34
34
  import { DropdownMenu } from '../DropdownMenu';
35
35
  import { IconButton } from '../Buttons';
@@ -57,7 +57,7 @@ export var Tile = function (props) {
57
57
  var showMenu = React.useCallback(function () { return setIsMenuVisible(true); }, []);
58
58
  var hideMenu = React.useCallback(function () { return setIsMenuVisible(false); }, []);
59
59
  return (React.createElement("div", __assign({ className: cx('iui-tile', { 'iui-folder': variant === 'folder' }, { 'iui-new': isNew }, { 'iui-selected': isSelected }, className) }, rest),
60
- React.createElement("div", { className: 'iui-thumbnail' },
60
+ thumbnail && (React.createElement("div", { className: 'iui-thumbnail' },
61
61
  typeof thumbnail === 'string' ? (React.createElement("div", { className: 'iui-picture', style: { backgroundImage: "url(" + thumbnail + ")" } })) : thumbnail && thumbnail.type === 'img' ? (React.cloneElement(thumbnail, {
62
62
  className: 'iui-picture',
63
63
  })) : React.isValidElement(thumbnail) ? (React.cloneElement(thumbnail, {
@@ -71,7 +71,7 @@ export var Tile = function (props) {
71
71
  React.cloneElement(rightIcon, {
72
72
  className: 'iui-small iui-quick-action',
73
73
  }),
74
- badge && React.createElement("div", { className: 'iui-badge-container' }, badge)),
74
+ badge && React.createElement("div", { className: 'iui-badge-container' }, badge))),
75
75
  React.createElement("div", { className: 'iui-content' },
76
76
  React.createElement("div", { className: 'iui-name' },
77
77
  isSelected && (React.createElement(SvgCheckmark, { className: cx('iui-tile-status-icon', 'iui-informational'), "aria-hidden": true })),
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import { StylingProps } from '../utils';
2
3
  import '@itwin/itwinui-css/css/time-picker.css';
3
- import { StylingProps } from '../utils/props';
4
4
  export declare type MeridiemType = 'AM' | 'PM';
5
5
  export declare type TimePickerProps = {
6
6
  /**
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../utils/hooks/useTheme';
29
+ import { useTheme } from '../utils';
30
30
  import '@itwin/itwinui-css/css/time-picker.css';
31
31
  var isSameHour = function (date1, date2, meridiem) {
32
32
  var adjustedHours = meridiem
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
+ import { CommonProps } from '../utils';
2
3
  import '@itwin/itwinui-css/css/toast-notification.css';
3
- import { CommonProps } from '../utils/props';
4
4
  export declare type ToastCategory = 'informational' | 'negative' | 'positive' | 'warning';
5
5
  export declare type ToastProps = {
6
6
  /**
@@ -28,10 +28,9 @@ import React from 'react';
28
28
  import { Transition } from 'react-transition-group';
29
29
  import SvgCloseSmall from '@itwin/itwinui-icons-react/cjs/icons/CloseSmall';
30
30
  import cx from 'classnames';
31
- import { useTheme } from '../utils/hooks/useTheme';
31
+ import { useTheme, getWindow, StatusIconMap } from '../utils';
32
32
  import '@itwin/itwinui-css/css/toast-notification.css';
33
33
  import { IconButton } from '../Buttons';
34
- import { getWindow, StatusIconMap } from '../utils/common';
35
34
  /**
36
35
  * Generic Toast Notification Component
37
36
  * @example
@@ -24,7 +24,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
24
24
  *--------------------------------------------------------------------------------------------*/
25
25
  import React from 'react';
26
26
  import ReactDOM from 'react-dom';
27
- import { getContainer } from '../utils/common';
27
+ import { getContainer } from '../utils';
28
28
  import { ToastWrapper } from './ToastWrapper';
29
29
  var TOASTS_CONTAINER_ID = 'iui-toasts-container';
30
30
  var Toaster = /** @class */ (function () {
@@ -47,7 +47,7 @@ export declare const ToggleSwitch: React.ForwardRefExoticComponent<{
47
47
  * Position of the label.
48
48
  * @default 'right'
49
49
  */
50
- labelPosition?: "left" | "right" | undefined;
50
+ labelPosition?: "right" | "left" | undefined;
51
51
  /**
52
52
  * Set focus on toggle.
53
53
  * @default false
@@ -26,8 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import React from 'react';
28
28
  import cx from 'classnames';
29
- import { useMergedRefs } from '../utils/hooks/useMergedRefs';
30
- import { useTheme } from '../utils/hooks/useTheme';
29
+ import { useMergedRefs, useTheme } from '../utils';
31
30
  import '@itwin/itwinui-css/css/toggle-switch.css';
32
31
  /**
33
32
  * A switch for turning on and off.
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { CommonProps } from '../utils/props';
2
+ import { CommonProps, PopoverProps } from '../utils';
3
3
  import '@itwin/itwinui-css/css/tooltip.css';
4
- import { PopoverProps } from '../utils/Popover';
5
4
  export declare type TooltipProps = {
6
5
  /**
7
6
  * Content of the tooltip.
@@ -26,9 +26,8 @@ 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 } from '../utils/hooks/useTheme';
29
+ import { useTheme, Popover } from '../utils';
30
30
  import '@itwin/itwinui-css/css/tooltip.css';
31
- import { Popover } from '../utils/Popover';
32
31
  /**
33
32
  * Basic tooltip component to display informative content when an element is hovered or focused.
34
33
  * Uses the {@link Popover} component, which is a wrapper around [tippy.js](https://atomiks.github.io/tippyjs).
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/blockquote.css';
31
31
  /**
32
32
  * Basic blockquote component
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/text.css';
31
31
  /**
32
32
  * Body text, renders a paragraph element
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CommonProps } from '../../utils/props';
2
+ import { CommonProps } from '../../utils';
3
3
  import '@itwin/itwinui-css/css/code.css';
4
4
  export declare type CodeProps = {
5
5
  /**
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/code.css';
31
31
  /**
32
32
  * Inline code element.
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/text.css';
31
31
  /**
32
32
  * The biggest title on the page, renders a h1 element
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CommonProps } from '../../utils/props';
2
+ import { CommonProps } from '../../utils';
3
3
  import '@itwin/itwinui-css/css/keyboard.css';
4
4
  /**
5
5
  * Some predefined strings for common keyboard keys.
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/keyboard.css';
31
31
  /**
32
32
  * Some predefined strings for common keyboard keys.
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/text.css';
31
31
  /**
32
32
  * The third biggest title on the page, renders a h3 element
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/text.css';
31
31
  /**
32
32
  * Small text, renders a paragraph element
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/text.css';
31
31
  /**
32
32
  * The third biggest title on the page, renders a h3 element
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CommonProps } from '../../utils/props';
2
+ import { CommonProps } from '../../utils';
3
3
  import '@itwin/itwinui-css/css/text.css';
4
4
  declare type TextOwnProps<T extends React.ElementType | React.ComponentType = 'div'> = {
5
5
  /**
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/text.css';
31
31
  /**
32
32
  * Polymorphic typography component to render any kind of text as any kind of element.
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../../utils/hooks/useTheme';
29
+ import { useTheme } from '../../utils';
30
30
  import '@itwin/itwinui-css/css/text.css';
31
31
  /**
32
32
  * The second biggest title on the page, renders a h2 element
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CommonProps } from '../utils/props';
2
+ import { CommonProps } from '../utils';
3
3
  import '@itwin/itwinui-css/css/user-icon.css';
4
4
  export declare type UserIconStatus = 'online' | 'busy' | 'away' | 'offline';
5
5
  export declare type StatusTitles = {
@@ -29,7 +29,7 @@ import SvgCheckmark from '@itwin/itwinui-icons-react/cjs/icons/Checkmark';
29
29
  import SvgCloseSmall from '@itwin/itwinui-icons-react/cjs/icons/CloseSmall';
30
30
  import cx from 'classnames';
31
31
  import React from 'react';
32
- import { useTheme } from '../utils/hooks/useTheme';
32
+ import { useTheme } from '../utils';
33
33
  import '@itwin/itwinui-css/css/user-icon.css';
34
34
  export var defaultStatusTitles = {
35
35
  away: 'Away',
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CommonProps } from '../utils/props';
2
+ import { CommonProps } from '../utils';
3
3
  import '@itwin/itwinui-css/css/user-icon.css';
4
4
  export declare type UserIconGroupProps = {
5
5
  /**
@@ -25,8 +25,8 @@ 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 { useTheme } from '../utils/hooks/useTheme';
29
28
  import cx from 'classnames';
29
+ import { useTheme } from '../utils';
30
30
  import '@itwin/itwinui-css/css/user-icon.css';
31
31
  /**
32
32
  * Group User Icons together.
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { StylingProps } from '../utils/props';
2
+ import { StylingProps } from '../utils';
3
3
  import { WizardType } from './Wizard';
4
4
  export declare type StepProps = {
5
5
  /**
@@ -26,7 +26,7 @@ var __rest = (this && this.__rest) || function (s, e) {
26
26
  *--------------------------------------------------------------------------------------------*/
27
27
  import cx from 'classnames';
28
28
  import React from 'react';
29
- import { useTheme } from '../utils/hooks/useTheme';
29
+ import { useTheme } from '../utils';
30
30
  import '@itwin/itwinui-css/css/wizard.css';
31
31
  import { Step } from './Step';
32
32
  var defaultWizardLocalization = {
@@ -10,6 +10,8 @@ export { ButtonGroup } from './ButtonGroup';
10
10
  export type { ButtonGroupProps } from './ButtonGroup';
11
11
  export { Checkbox } from './Checkbox';
12
12
  export type { CheckboxProps } from './Checkbox';
13
+ export { ComboBox } from './ComboBox';
14
+ export type { ComboBoxProps } from './ComboBox';
13
15
  export { DatePicker, generateLocalizedStrings } from './DatePicker';
14
16
  export type { DatePickerProps } from './DatePicker';
15
17
  export { DropdownMenu } from './DropdownMenu';
@@ -80,6 +82,5 @@ export { UserIconGroup } from './UserIconGroup';
80
82
  export type { UserIconGroupProps } from './UserIconGroup';
81
83
  export { Wizard } from './Wizard';
82
84
  export type { WizardProps, StepProperties, WizardType, WizardLocalization, } from './Wizard';
83
- export { getUserColor } from './utils/common';
84
- export { useTheme } from './utils/hooks/useTheme';
85
- export type { ThemeType } from './utils/hooks/useTheme';
85
+ export { getUserColor, useTheme } from './utils';
86
+ export type { ThemeType } from './utils';
package/esm/core/index.js CHANGED
@@ -8,6 +8,7 @@ export { Breadcrumbs } from './Breadcrumbs';
8
8
  export { Button, DropdownButton, IconButton, IdeasButton, SplitButton, } from './Buttons';
9
9
  export { ButtonGroup } from './ButtonGroup';
10
10
  export { Checkbox } from './Checkbox';
11
+ export { ComboBox } from './ComboBox';
11
12
  export { DatePicker, generateLocalizedStrings } from './DatePicker';
12
13
  export { DropdownMenu } from './DropdownMenu';
13
14
  export { ErrorPage } from './ErrorPage';
@@ -43,5 +44,4 @@ export { Body, Headline, Leading, Small, Subheading, Title, Blockquote, Code, Kb
43
44
  export { UserIcon } from './UserIcon';
44
45
  export { UserIconGroup } from './UserIconGroup';
45
46
  export { Wizard } from './Wizard';
46
- export { getUserColor } from './utils/common';
47
- export { useTheme } from './utils/hooks/useTheme';
47
+ export { getUserColor, useTheme } from './utils';
@@ -3,8 +3,8 @@
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 { getTabbableElements } from './common';
7
- import { mergeRefs } from './hooks/useMergedRefs';
6
+ import { getTabbableElements } from '../functions/focusable';
7
+ import { mergeRefs } from '../hooks/useMergedRefs';
8
8
  /**
9
9
  * Trap focus within child container.
10
10
  * Used for modals and dialogs.
@@ -1,3 +1,25 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
1
23
  /*---------------------------------------------------------------------------------------------
2
24
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
25
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -11,15 +33,15 @@ import cx from 'classnames';
11
33
  export var InputContainer = function (props) {
12
34
  var _a;
13
35
  var _b;
14
- var _c = props.as, Element = _c === void 0 ? 'div' : _c, label = props.label, disabled = props.disabled, required = props.required, status = props.status, message = props.message, icon = props.icon, isLabelInline = props.isLabelInline, isIconInline = props.isIconInline, children = props.children, className = props.className, style = props.style;
15
- return (React.createElement(Element, { className: cx('iui-input-container', (_a = {
36
+ var _c = props.as, Element = _c === void 0 ? 'div' : _c, label = props.label, disabled = props.disabled, required = props.required, status = props.status, message = props.message, icon = props.icon, isLabelInline = props.isLabelInline, isIconInline = props.isIconInline, children = props.children, className = props.className, style = props.style, rest = __rest(props, ["as", "label", "disabled", "required", "status", "message", "icon", "isLabelInline", "isIconInline", "children", "className", "style"]);
37
+ return (React.createElement(Element, __assign({ className: cx('iui-input-container', (_a = {
16
38
  'iui-disabled': disabled
17
39
  },
18
40
  _a["iui-" + status] = !!status,
19
41
  _a['iui-inline-label'] = isLabelInline,
20
42
  _a['iui-inline-icon'] = isIconInline,
21
43
  _a['iui-with-message'] = !!message && !isLabelInline,
22
- _a), className), style: style },
44
+ _a), className), style: style }, rest),
23
45
  label && (React.createElement("div", { className: cx('iui-label', {
24
46
  'iui-required': required,
25
47
  }) }, label)),
@@ -42,7 +42,7 @@ export declare const Popover: React.ForwardRefExoticComponent<Pick<{
42
42
  * @see [tippy.js placement prop](https://atomiks.github.io/tippyjs/v6/all-props/#placement).
43
43
  */
44
44
  placement?: import("@popperjs/core").Placement | undefined;
45
- } & Omit<TippyProps, "visible" | "placement" | "trigger">, "disabled" | "children" | "className" | "role" | "visible" | "content" | "sticky" | "touch" | "placement" | "trigger" | "render" | "animateFill" | "appendTo" | "aria" | "delay" | "duration" | "followCursor" | "getReferenceClientRect" | "hideOnClick" | "ignoreAttributes" | "inlinePositioning" | "interactive" | "interactiveBorder" | "interactiveDebounce" | "moveTransition" | "offset" | "plugins" | "popperOptions" | "showOnCreate" | "triggerTarget" | "onAfterUpdate" | "onBeforeUpdate" | "onCreate" | "onDestroy" | "onHidden" | "onHide" | "onMount" | "onShow" | "onShown" | "onTrigger" | "onUntrigger" | "onClickOutside" | "allowHTML" | "animation" | "arrow" | "inertia" | "maxWidth" | "theme" | "zIndex" | "singleton" | "reference"> & React.RefAttributes<unknown>>;
45
+ } & Omit<TippyProps, "placement" | "trigger" | "visible">, "disabled" | "placement" | "trigger" | "visible" | "content" | "render" | "animateFill" | "appendTo" | "aria" | "delay" | "duration" | "followCursor" | "getReferenceClientRect" | "hideOnClick" | "ignoreAttributes" | "inlinePositioning" | "interactive" | "interactiveBorder" | "interactiveDebounce" | "moveTransition" | "offset" | "plugins" | "popperOptions" | "showOnCreate" | "sticky" | "touch" | "triggerTarget" | "onAfterUpdate" | "onBeforeUpdate" | "onCreate" | "onDestroy" | "onHidden" | "onHide" | "onMount" | "onShow" | "onShown" | "onTrigger" | "onUntrigger" | "onClickOutside" | "allowHTML" | "animation" | "arrow" | "inertia" | "maxWidth" | "role" | "theme" | "zIndex" | "children" | "className" | "singleton" | "reference"> & React.RefAttributes<unknown>>;
46
46
  /**
47
47
  * Plugin to hide Popover when either Esc key is pressed,
48
48
  * or when the content inside is not tabbable and Tab key is pressed.
@@ -24,7 +24,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
24
24
  };
25
25
  import React from 'react';
26
26
  import Tippy from '@tippyjs/react';
27
- import { useMergedRefs } from './hooks/useMergedRefs';
27
+ import { useMergedRefs } from '../hooks/useMergedRefs';
28
28
  /**
29
29
  * Wrapper around [tippy.js](https://atomiks.github.io/tippyjs)
30
30
  * with pre-configured props and plugins (e.g. lazy mounting, focus, etc).
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { CommonProps } from '../props';
3
+ export declare const StatusIconMap: {
4
+ negative: (args?: CommonProps | undefined) => JSX.Element;
5
+ positive: (args?: CommonProps | undefined) => JSX.Element;
6
+ warning: (args?: CommonProps | undefined) => JSX.Element;
7
+ informational: (args?: CommonProps | undefined) => JSX.Element;
8
+ };
@@ -0,0 +1,26 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ /*---------------------------------------------------------------------------------------------
13
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
14
+ * See LICENSE.md in the project root for license terms and full copyright notice.
15
+ *--------------------------------------------------------------------------------------------*/
16
+ import SvgInfoCircular from '@itwin/itwinui-icons-react/cjs/icons/InfoCircular';
17
+ import SvgStatusError from '@itwin/itwinui-icons-react/cjs/icons/StatusError';
18
+ import SvgStatusSuccess from '@itwin/itwinui-icons-react/cjs/icons/StatusSuccess';
19
+ import SvgStatusWarning from '@itwin/itwinui-icons-react/cjs/icons/StatusWarning';
20
+ import React from 'react';
21
+ export var StatusIconMap = {
22
+ negative: function (args) { return React.createElement(SvgStatusError, __assign({ "aria-hidden": true }, args)); },
23
+ positive: function (args) { return React.createElement(SvgStatusSuccess, __assign({ "aria-hidden": true }, args)); },
24
+ warning: function (args) { return React.createElement(SvgStatusWarning, __assign({ "aria-hidden": true }, args)); },
25
+ informational: function (args) { return (React.createElement(SvgInfoCircular, __assign({ "aria-hidden": true }, args))); },
26
+ };
@@ -0,0 +1,4 @@
1
+ export * from './Popover';
2
+ export * from './FocusTrap';
3
+ export * from './InputContainer';
4
+ export * from './icons';
@@ -0,0 +1,8 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ export * from './Popover';
6
+ export * from './FocusTrap';
7
+ export * from './InputContainer';
8
+ export * from './icons';
@@ -0,0 +1,20 @@
1
+ export declare const SoftBackgrounds: {
2
+ readonly skyblue: "hsl(197, 71%, 83%)";
3
+ readonly celery: "hsl(72, 51%, 66%)";
4
+ readonly froly: "hsl(2, 90%, 83%)";
5
+ readonly steelblue: "hsl(207, 44%, 73%)";
6
+ readonly sunglow: "hsl(42, 100%, 70%)";
7
+ readonly seabuckthorn: "hsl(29, 92%, 71%)";
8
+ readonly montecarlo: "hsl(176, 43%, 72%)";
9
+ readonly poloblue: "hsl(211, 44%, 77%)";
10
+ readonly bouquet: "hsl(305, 19%, 75%)";
11
+ readonly ash: "hsl(42, 15%, 85%)";
12
+ readonly oak: "hsl(27, 32%, 72%)";
13
+ };
14
+ /** Returns true if a string value is one of the SoftBackgrounds keys */
15
+ export declare const isSoftBackground: (value: string) => value is "skyblue" | "celery" | "froly" | "steelblue" | "sunglow" | "seabuckthorn" | "montecarlo" | "poloblue" | "bouquet" | "ash" | "oak";
16
+ /**
17
+ * Generate color from user name or email.
18
+ * Recommended to use for `backgroundColor` in `UserIcon` component.
19
+ */
20
+ export declare const getUserColor: (emailOrName: string) => string;
@@ -0,0 +1,47 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ export var SoftBackgrounds = {
6
+ skyblue: 'hsl(197, 71%, 83%)',
7
+ celery: 'hsl(72, 51%, 66%)',
8
+ froly: 'hsl(2, 90%, 83%)',
9
+ steelblue: 'hsl(207, 44%, 73%)',
10
+ sunglow: 'hsl(42, 100%, 70%)',
11
+ seabuckthorn: 'hsl(29, 92%, 71%)',
12
+ montecarlo: 'hsl(176, 43%, 72%)',
13
+ poloblue: 'hsl(211, 44%, 77%)',
14
+ bouquet: 'hsl(305, 19%, 75%)',
15
+ ash: 'hsl(42, 15%, 85%)',
16
+ oak: 'hsl(27, 32%, 72%)',
17
+ };
18
+ /** Returns true if a string value is one of the SoftBackgrounds keys */
19
+ export var isSoftBackground = function (value) {
20
+ return Object.keys(SoftBackgrounds).includes(value);
21
+ };
22
+ var USER_COLORS = [
23
+ '#6AB9EC',
24
+ '#B1C854',
25
+ '#F7706C',
26
+ '#4585A5',
27
+ '#FFC335',
28
+ '#F7963E',
29
+ '#73C7C1',
30
+ '#85A9CF',
31
+ '#A3779F',
32
+ '#C8C2B4',
33
+ '#A47854',
34
+ ];
35
+ /**
36
+ * Generate color from user name or email.
37
+ * Recommended to use for `backgroundColor` in `UserIcon` component.
38
+ */
39
+ export var getUserColor = function (emailOrName) {
40
+ var normalizedString = emailOrName.trim().toLowerCase();
41
+ var hash = 0;
42
+ for (var i = 0; i < normalizedString.length; i++) {
43
+ var charCode = normalizedString.charCodeAt(i);
44
+ hash = (hash + charCode) % USER_COLORS.length;
45
+ }
46
+ return USER_COLORS[hash];
47
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Get the container as a child of body, or create one if it doesn't exist.
3
+ * Mostly used for dynamic components like Modal or Toast.
4
+ *
5
+ * @param containerId id of the container to find or create
6
+ * @param ownerDocument Can be changed if the container should be in a different document (e.g. in popup).
7
+ */
8
+ export declare const getContainer: (containerId: string, ownerDocument?: Document | undefined) => HTMLElement | undefined;
9
+ /**
10
+ * Get document if it is defined.
11
+ * Used to support SSR/SSG applications.
12
+ */
13
+ export declare const getDocument: () => Document | undefined;
14
+ /**
15
+ * Get window if it is defined.
16
+ * Used to support SSR/SSG applications.
17
+ */
18
+ export declare const getWindow: () => (Window & typeof globalThis) | undefined;