@lumx/react 3.0.2 → 3.0.3

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 (391) hide show
  1. package/{esm/_internal/_rollupPluginBabelHelpers.js → _internal/ClickAwayProvider.js} +107 -2
  2. package/_internal/ClickAwayProvider.js.map +1 -0
  3. package/_internal/types.d.ts +271 -0
  4. package/index.d.ts +2686 -0
  5. package/index.js +12533 -0
  6. package/index.js.map +1 -0
  7. package/package.json +7 -6
  8. package/src/components/alert-dialog/AlertDialog.tsx +2 -1
  9. package/src/components/autocomplete/Autocomplete.tsx +2 -2
  10. package/src/components/autocomplete/AutocompleteMultiple.tsx +2 -1
  11. package/src/components/avatar/Avatar.tsx +2 -1
  12. package/src/components/badge/Badge.test.tsx +1 -1
  13. package/src/components/badge/Badge.tsx +2 -1
  14. package/src/components/button/Button.test.tsx +1 -1
  15. package/src/components/button/Button.tsx +2 -1
  16. package/src/components/button/ButtonGroup.tsx +2 -1
  17. package/src/components/button/ButtonRoot.test.tsx +1 -1
  18. package/src/components/button/ButtonRoot.tsx +2 -1
  19. package/src/components/button/IconButton.tsx +2 -1
  20. package/src/components/checkbox/Checkbox.test.tsx +1 -1
  21. package/src/components/checkbox/Checkbox.tsx +2 -1
  22. package/src/components/chip/Chip.test.tsx +1 -1
  23. package/src/components/chip/Chip.tsx +3 -1
  24. package/src/components/chip/ChipGroup.tsx +2 -1
  25. package/src/components/comment-block/CommentBlock.tsx +2 -1
  26. package/src/components/date-picker/DatePicker.tsx +1 -1
  27. package/src/components/date-picker/DatePickerControlled.tsx +1 -1
  28. package/src/components/date-picker/DatePickerField.tsx +1 -1
  29. package/src/components/date-picker/constants.ts +1 -1
  30. package/src/components/date-picker/types.ts +1 -1
  31. package/src/components/dialog/Dialog.tsx +4 -8
  32. package/src/components/divider/Divider.test.tsx +1 -1
  33. package/src/components/divider/Divider.tsx +3 -2
  34. package/src/components/drag-handle/DragHandle.tsx +2 -1
  35. package/src/components/dropdown/Dropdown.tsx +2 -1
  36. package/src/components/expansion-panel/ExpansionPanel.test.tsx +1 -1
  37. package/src/components/expansion-panel/ExpansionPanel.tsx +3 -10
  38. package/src/components/flag/Flag.test.tsx +1 -1
  39. package/src/components/flag/Flag.tsx +2 -1
  40. package/src/components/flex-box/FlexBox.stories.tsx +8 -0
  41. package/src/components/flex-box/FlexBox.tsx +7 -3
  42. package/src/components/flex-box/__snapshots__/FlexBox.test.tsx.snap +16 -0
  43. package/src/components/generic-block/GenericBlock.stories.jsx +23 -1
  44. package/src/components/generic-block/GenericBlock.tsx +18 -4
  45. package/src/components/generic-block/constants.ts +9 -0
  46. package/src/components/generic-block/index.ts +1 -0
  47. package/src/components/grid/Grid.tsx +2 -1
  48. package/src/components/grid/GridItem.tsx +2 -1
  49. package/src/components/heading/Heading.tsx +2 -1
  50. package/src/components/heading/HeadingLevelProvider.tsx +1 -1
  51. package/src/components/heading/context.tsx +1 -1
  52. package/src/components/icon/Icon.test.tsx +1 -1
  53. package/src/components/icon/Icon.tsx +2 -1
  54. package/src/components/image-block/ImageBlock.tsx +2 -1
  55. package/src/components/index.ts +1 -1
  56. package/src/components/inline-list/InlineList.stories.tsx +40 -0
  57. package/src/components/inline-list/InlineList.test.tsx +41 -0
  58. package/src/components/inline-list/InlineList.tsx +80 -0
  59. package/src/components/inline-list/index.ts +1 -0
  60. package/src/components/input-helper/InputHelper.tsx +2 -1
  61. package/src/components/input-label/InputLabel.tsx +2 -1
  62. package/src/components/lightbox/Lightbox.tsx +2 -1
  63. package/src/components/link/Link.tsx +2 -1
  64. package/src/components/link-preview/LinkPreview.test.tsx +1 -1
  65. package/src/components/link-preview/LinkPreview.tsx +2 -1
  66. package/src/components/list/List.tsx +2 -1
  67. package/src/components/list/ListDivider.tsx +2 -1
  68. package/src/components/list/ListItem.tsx +3 -8
  69. package/src/components/list/ListSubheader.tsx +2 -1
  70. package/src/components/list/useInteractiveList.tsx +1 -1
  71. package/src/components/message/Message.test.tsx +1 -1
  72. package/src/components/message/Message.tsx +2 -1
  73. package/src/components/mosaic/Mosaic.tsx +2 -1
  74. package/src/components/notification/Notification.tsx +2 -1
  75. package/src/components/popover/Popover.tsx +2 -1
  76. package/src/components/post-block/PostBlock.tsx +2 -1
  77. package/src/components/progress/Progress.tsx +2 -1
  78. package/src/components/progress-tracker/ProgressTracker.tsx +2 -1
  79. package/src/components/progress-tracker/ProgressTrackerStep.test.tsx +1 -1
  80. package/src/components/progress-tracker/ProgressTrackerStep.tsx +2 -1
  81. package/src/components/progress-tracker/ProgressTrackerStepPanel.tsx +2 -1
  82. package/src/components/radio-button/RadioButton.test.tsx +1 -1
  83. package/src/components/radio-button/RadioButton.tsx +2 -1
  84. package/src/components/radio-button/RadioGroup.tsx +2 -1
  85. package/src/components/select/Select.test.tsx +1 -1
  86. package/src/components/select/Select.tsx +2 -1
  87. package/src/components/select/SelectMultiple.test.tsx +1 -1
  88. package/src/components/select/SelectMultiple.tsx +2 -1
  89. package/src/components/select/WithSelectContext.tsx +1 -1
  90. package/src/components/select/constants.ts +1 -1
  91. package/src/components/side-navigation/SideNavigation.tsx +2 -1
  92. package/src/components/side-navigation/SideNavigationItem.test.tsx +1 -1
  93. package/src/components/side-navigation/SideNavigationItem.tsx +3 -9
  94. package/src/components/skeleton/SkeletonCircle.tsx +2 -1
  95. package/src/components/skeleton/SkeletonRectangle.tsx +2 -1
  96. package/src/components/skeleton/SkeletonTypography.tsx +2 -1
  97. package/src/components/slider/Slider.tsx +2 -1
  98. package/src/components/slideshow/Slides.tsx +2 -1
  99. package/src/components/slideshow/Slideshow.tsx +1 -1
  100. package/src/components/slideshow/SlideshowControls.tsx +2 -1
  101. package/src/components/slideshow/SlideshowItem.tsx +2 -1
  102. package/src/components/slideshow/SlideshowItemGroup.tsx +2 -1
  103. package/src/components/switch/Switch.test.tsx +1 -1
  104. package/src/components/switch/Switch.tsx +2 -1
  105. package/src/components/table/Table.tsx +2 -1
  106. package/src/components/table/TableBody.tsx +2 -1
  107. package/src/components/table/TableCell.tsx +3 -1
  108. package/src/components/table/TableHeader.tsx +2 -1
  109. package/src/components/table/TableRow.tsx +2 -1
  110. package/src/components/tabs/Tab.test.tsx +1 -1
  111. package/src/components/tabs/Tab.tsx +2 -1
  112. package/src/components/tabs/TabList.test.tsx +1 -1
  113. package/src/components/tabs/TabList.tsx +2 -1
  114. package/src/components/tabs/TabPanel.tsx +2 -1
  115. package/src/components/text/{Text.stories.tsx → Text.stories.jsx} +23 -28
  116. package/src/components/text/Text.test.tsx +15 -1
  117. package/src/components/text/Text.tsx +38 -12
  118. package/src/components/text-field/TextField.test.tsx +1 -1
  119. package/src/components/text-field/TextField.tsx +2 -1
  120. package/src/components/thumbnail/Thumbnail.tsx +2 -1
  121. package/src/components/thumbnail/types.ts +1 -1
  122. package/src/components/toolbar/Toolbar.tsx +2 -1
  123. package/src/components/tooltip/Tooltip.tsx +2 -1
  124. package/src/components/tooltip/useTooltipOpen.tsx +1 -1
  125. package/src/components/uploader/Uploader.test.tsx +1 -1
  126. package/src/components/uploader/Uploader.tsx +2 -1
  127. package/src/components/user-block/UserBlock.tsx +2 -1
  128. package/src/hooks/useCallbackOnEscape.ts +2 -1
  129. package/src/hooks/useClickAway.tsx +1 -1
  130. package/src/hooks/useDisableBodyScroll.ts +1 -1
  131. package/src/hooks/useFocusTrap.ts +1 -1
  132. package/src/hooks/useInterval.tsx +1 -1
  133. package/src/hooks/useOnResize.ts +1 -1
  134. package/src/index.ts +5 -0
  135. package/src/stories/generated/GenericBlock/Demos.stories.tsx +3 -1
  136. package/src/stories/generated/Heading/Demos.stories.tsx +6 -0
  137. package/src/stories/withResizableBox.tsx +18 -0
  138. package/src/testing/utils/commonTestsSuite.ts +1 -1
  139. package/src/utils/{getRootClassName.ts → className.ts} +19 -0
  140. package/src/utils/event.ts +1 -0
  141. package/src/utils/index.ts +5 -0
  142. package/src/utils/type.ts +3 -0
  143. package/src/utils/utils.test.ts +1 -1
  144. package/types.d.ts +68 -11
  145. package/utils/index.d.ts +29 -0
  146. package/utils/index.js +2 -0
  147. package/utils/index.js.map +1 -0
  148. package/esm/_internal/AlertDialog.js +0 -141
  149. package/esm/_internal/AlertDialog.js.map +0 -1
  150. package/esm/_internal/AutocompleteMultiple.js +0 -257
  151. package/esm/_internal/AutocompleteMultiple.js.map +0 -1
  152. package/esm/_internal/Avatar2.js +0 -82
  153. package/esm/_internal/Avatar2.js.map +0 -1
  154. package/esm/_internal/Badge2.js +0 -54
  155. package/esm/_internal/Badge2.js.map +0 -1
  156. package/esm/_internal/Button2.js +0 -84
  157. package/esm/_internal/Button2.js.map +0 -1
  158. package/esm/_internal/ButtonGroup.js +0 -51
  159. package/esm/_internal/ButtonGroup.js.map +0 -1
  160. package/esm/_internal/ButtonRoot.js +0 -135
  161. package/esm/_internal/ButtonRoot.js.map +0 -1
  162. package/esm/_internal/Checkbox2.js +0 -116
  163. package/esm/_internal/Checkbox2.js.map +0 -1
  164. package/esm/_internal/Chip2.js +0 -118
  165. package/esm/_internal/Chip2.js.map +0 -1
  166. package/esm/_internal/ChipGroup.js +0 -122
  167. package/esm/_internal/ChipGroup.js.map +0 -1
  168. package/esm/_internal/ClickAwayProvider.js +0 -217
  169. package/esm/_internal/ClickAwayProvider.js.map +0 -1
  170. package/esm/_internal/CommentBlock.js +0 -124
  171. package/esm/_internal/CommentBlock.js.map +0 -1
  172. package/esm/_internal/DatePickerField.js +0 -347
  173. package/esm/_internal/DatePickerField.js.map +0 -1
  174. package/esm/_internal/Dialog2.js +0 -274
  175. package/esm/_internal/Dialog2.js.map +0 -1
  176. package/esm/_internal/Divider2.js +0 -53
  177. package/esm/_internal/Divider2.js.map +0 -1
  178. package/esm/_internal/DragHandle.js +0 -50
  179. package/esm/_internal/DragHandle.js.map +0 -1
  180. package/esm/_internal/Dropdown2.js +0 -157
  181. package/esm/_internal/Dropdown2.js.map +0 -1
  182. package/esm/_internal/ExpansionPanel.js +0 -156
  183. package/esm/_internal/ExpansionPanel.js.map +0 -1
  184. package/esm/_internal/Flag2.js +0 -48
  185. package/esm/_internal/Flag2.js.map +0 -1
  186. package/esm/_internal/FlexBox.js +0 -55
  187. package/esm/_internal/FlexBox.js.map +0 -1
  188. package/esm/_internal/GenericBlock.js +0 -125
  189. package/esm/_internal/GenericBlock.js.map +0 -1
  190. package/esm/_internal/GridItem.js +0 -96
  191. package/esm/_internal/GridItem.js.map +0 -1
  192. package/esm/_internal/HeadingLevelProvider.js +0 -112
  193. package/esm/_internal/HeadingLevelProvider.js.map +0 -1
  194. package/esm/_internal/Icon2.js +0 -120
  195. package/esm/_internal/Icon2.js.map +0 -1
  196. package/esm/_internal/IconButton.js +0 -74
  197. package/esm/_internal/IconButton.js.map +0 -1
  198. package/esm/_internal/ImageBlock.js +0 -101
  199. package/esm/_internal/ImageBlock.js.map +0 -1
  200. package/esm/_internal/InputHelper.js +0 -72
  201. package/esm/_internal/InputHelper.js.map +0 -1
  202. package/esm/_internal/InputLabel.js +0 -58
  203. package/esm/_internal/InputLabel.js.map +0 -1
  204. package/esm/_internal/Lightbox2.js +0 -123
  205. package/esm/_internal/Lightbox2.js.map +0 -1
  206. package/esm/_internal/Link2.js +0 -122
  207. package/esm/_internal/Link2.js.map +0 -1
  208. package/esm/_internal/LinkPreview.js +0 -105
  209. package/esm/_internal/LinkPreview.js.map +0 -1
  210. package/esm/_internal/List2.js +0 -799
  211. package/esm/_internal/List2.js.map +0 -1
  212. package/esm/_internal/ListSubheader.js +0 -79
  213. package/esm/_internal/ListSubheader.js.map +0 -1
  214. package/esm/_internal/Message2.js +0 -78
  215. package/esm/_internal/Message2.js.map +0 -1
  216. package/esm/_internal/Mosaic2.js +0 -89
  217. package/esm/_internal/Mosaic2.js.map +0 -1
  218. package/esm/_internal/Notification2.js +0 -133
  219. package/esm/_internal/Notification2.js.map +0 -1
  220. package/esm/_internal/Popover2.js +0 -2473
  221. package/esm/_internal/Popover2.js.map +0 -1
  222. package/esm/_internal/PostBlock.js +0 -96
  223. package/esm/_internal/PostBlock.js.map +0 -1
  224. package/esm/_internal/Progress2.js +0 -81
  225. package/esm/_internal/Progress2.js.map +0 -1
  226. package/esm/_internal/ProgressTrackerStepPanel.js +0 -313
  227. package/esm/_internal/ProgressTrackerStepPanel.js.map +0 -1
  228. package/esm/_internal/RadioGroup.js +0 -147
  229. package/esm/_internal/RadioGroup.js.map +0 -1
  230. package/esm/_internal/SelectMultiple.js +0 -424
  231. package/esm/_internal/SelectMultiple.js.map +0 -1
  232. package/esm/_internal/SideNavigationItem.js +0 -151
  233. package/esm/_internal/SideNavigationItem.js.map +0 -1
  234. package/esm/_internal/SkeletonTypography.js +0 -168
  235. package/esm/_internal/SkeletonTypography.js.map +0 -1
  236. package/esm/_internal/Slider2.js +0 -327
  237. package/esm/_internal/Slider2.js.map +0 -1
  238. package/esm/_internal/Slides.js +0 -864
  239. package/esm/_internal/Slides.js.map +0 -1
  240. package/esm/_internal/Switch2.js +0 -116
  241. package/esm/_internal/Switch2.js.map +0 -1
  242. package/esm/_internal/TabPanel.js +0 -280
  243. package/esm/_internal/TabPanel.js.map +0 -1
  244. package/esm/_internal/TableRow.js +0 -291
  245. package/esm/_internal/TableRow.js.map +0 -1
  246. package/esm/_internal/Text2.js +0 -63
  247. package/esm/_internal/Text2.js.map +0 -1
  248. package/esm/_internal/TextField.js +0 -322
  249. package/esm/_internal/TextField.js.map +0 -1
  250. package/esm/_internal/Thumbnail2.js +0 -301
  251. package/esm/_internal/Thumbnail2.js.map +0 -1
  252. package/esm/_internal/Toolbar2.js +0 -60
  253. package/esm/_internal/Toolbar2.js.map +0 -1
  254. package/esm/_internal/Tooltip2.js +0 -282
  255. package/esm/_internal/Tooltip2.js.map +0 -1
  256. package/esm/_internal/Uploader2.js +0 -84
  257. package/esm/_internal/Uploader2.js.map +0 -1
  258. package/esm/_internal/UserBlock.js +0 -132
  259. package/esm/_internal/UserBlock.js.map +0 -1
  260. package/esm/_internal/_rollupPluginBabelHelpers.js.map +0 -1
  261. package/esm/_internal/alert-dialog.js +0 -34
  262. package/esm/_internal/alert-dialog.js.map +0 -1
  263. package/esm/_internal/autocomplete.js +0 -32
  264. package/esm/_internal/autocomplete.js.map +0 -1
  265. package/esm/_internal/avatar.js +0 -13
  266. package/esm/_internal/avatar.js.map +0 -1
  267. package/esm/_internal/badge.js +0 -10
  268. package/esm/_internal/badge.js.map +0 -1
  269. package/esm/_internal/button.js +0 -25
  270. package/esm/_internal/button.js.map +0 -1
  271. package/esm/_internal/checkbox.js +0 -14
  272. package/esm/_internal/checkbox.js.map +0 -1
  273. package/esm/_internal/chip.js +0 -12
  274. package/esm/_internal/chip.js.map +0 -1
  275. package/esm/_internal/comment-block.js +0 -24
  276. package/esm/_internal/comment-block.js.map +0 -1
  277. package/esm/_internal/components.js +0 -156
  278. package/esm/_internal/components.js.map +0 -1
  279. package/esm/_internal/constants.js +0 -13
  280. package/esm/_internal/constants.js.map +0 -1
  281. package/esm/_internal/date-picker.js +0 -32
  282. package/esm/_internal/date-picker.js.map +0 -1
  283. package/esm/_internal/dialog.js +0 -27
  284. package/esm/_internal/dialog.js.map +0 -1
  285. package/esm/_internal/divider.js +0 -10
  286. package/esm/_internal/divider.js.map +0 -1
  287. package/esm/_internal/drag-handle.js +0 -11
  288. package/esm/_internal/drag-handle.js.map +0 -1
  289. package/esm/_internal/dropdown.js +0 -21
  290. package/esm/_internal/dropdown.js.map +0 -1
  291. package/esm/_internal/expansion-panel.js +0 -32
  292. package/esm/_internal/expansion-panel.js.map +0 -1
  293. package/esm/_internal/flag.js +0 -11
  294. package/esm/_internal/flag.js.map +0 -1
  295. package/esm/_internal/flex-box.js +0 -11
  296. package/esm/_internal/flex-box.js.map +0 -1
  297. package/esm/_internal/generic-block.js +0 -20
  298. package/esm/_internal/generic-block.js.map +0 -1
  299. package/esm/_internal/getRootClassName.js +0 -346
  300. package/esm/_internal/getRootClassName.js.map +0 -1
  301. package/esm/_internal/grid.js +0 -10
  302. package/esm/_internal/grid.js.map +0 -1
  303. package/esm/_internal/heading.js +0 -11
  304. package/esm/_internal/heading.js.map +0 -1
  305. package/esm/_internal/icon.js +0 -10
  306. package/esm/_internal/icon.js.map +0 -1
  307. package/esm/_internal/image-block.js +0 -14
  308. package/esm/_internal/image-block.js.map +0 -1
  309. package/esm/_internal/input-helper.js +0 -10
  310. package/esm/_internal/input-helper.js.map +0 -1
  311. package/esm/_internal/input-label.js +0 -10
  312. package/esm/_internal/input-label.js.map +0 -1
  313. package/esm/_internal/lightbox.js +0 -27
  314. package/esm/_internal/lightbox.js.map +0 -1
  315. package/esm/_internal/link-preview.js +0 -15
  316. package/esm/_internal/link-preview.js.map +0 -1
  317. package/esm/_internal/link.js +0 -12
  318. package/esm/_internal/link.js.map +0 -1
  319. package/esm/_internal/list.js +0 -15
  320. package/esm/_internal/list.js.map +0 -1
  321. package/esm/_internal/mergeRefs.js +0 -25
  322. package/esm/_internal/mergeRefs.js.map +0 -1
  323. package/esm/_internal/message.js +0 -11
  324. package/esm/_internal/message.js.map +0 -1
  325. package/esm/_internal/mosaic.js +0 -14
  326. package/esm/_internal/mosaic.js.map +0 -1
  327. package/esm/_internal/notification.js +0 -18
  328. package/esm/_internal/notification.js.map +0 -1
  329. package/esm/_internal/partitionMulti.js +0 -27
  330. package/esm/_internal/partitionMulti.js.map +0 -1
  331. package/esm/_internal/popover.js +0 -15
  332. package/esm/_internal/popover.js.map +0 -1
  333. package/esm/_internal/post-block.js +0 -15
  334. package/esm/_internal/post-block.js.map +0 -1
  335. package/esm/_internal/progress-tracker.js +0 -17
  336. package/esm/_internal/progress-tracker.js.map +0 -1
  337. package/esm/_internal/progress.js +0 -10
  338. package/esm/_internal/progress.js.map +0 -1
  339. package/esm/_internal/radio-button.js +0 -13
  340. package/esm/_internal/radio-button.js.map +0 -1
  341. package/esm/_internal/renderLink.js +0 -25
  342. package/esm/_internal/renderLink.js.map +0 -1
  343. package/esm/_internal/select.js +0 -31
  344. package/esm/_internal/select.js.map +0 -1
  345. package/esm/_internal/side-navigation.js +0 -25
  346. package/esm/_internal/side-navigation.js.map +0 -1
  347. package/esm/_internal/skeleton.js +0 -10
  348. package/esm/_internal/skeleton.js.map +0 -1
  349. package/esm/_internal/slider.js +0 -13
  350. package/esm/_internal/slider.js.map +0 -1
  351. package/esm/_internal/slideshow.js +0 -29
  352. package/esm/_internal/slideshow.js.map +0 -1
  353. package/esm/_internal/state.js +0 -145
  354. package/esm/_internal/state.js.map +0 -1
  355. package/esm/_internal/switch.js +0 -13
  356. package/esm/_internal/switch.js.map +0 -1
  357. package/esm/_internal/table.js +0 -12
  358. package/esm/_internal/table.js.map +0 -1
  359. package/esm/_internal/tabs.js +0 -15
  360. package/esm/_internal/tabs.js.map +0 -1
  361. package/esm/_internal/text-field.js +0 -26
  362. package/esm/_internal/text-field.js.map +0 -1
  363. package/esm/_internal/text.js +0 -10
  364. package/esm/_internal/text.js.map +0 -1
  365. package/esm/_internal/thumbnail.js +0 -13
  366. package/esm/_internal/thumbnail.js.map +0 -1
  367. package/esm/_internal/toolbar.js +0 -9
  368. package/esm/_internal/toolbar.js.map +0 -1
  369. package/esm/_internal/tooltip.js +0 -18
  370. package/esm/_internal/tooltip.js.map +0 -1
  371. package/esm/_internal/type.js +0 -40
  372. package/esm/_internal/type.js.map +0 -1
  373. package/esm/_internal/types.js +0 -23
  374. package/esm/_internal/types.js.map +0 -1
  375. package/esm/_internal/uploader.js +0 -11
  376. package/esm/_internal/uploader.js.map +0 -1
  377. package/esm/_internal/useDelayedVisibility.js +0 -47
  378. package/esm/_internal/useDelayedVisibility.js.map +0 -1
  379. package/esm/_internal/useDisableBodyScroll.js +0 -220
  380. package/esm/_internal/useDisableBodyScroll.js.map +0 -1
  381. package/esm/_internal/useFocusTrap.js +0 -86
  382. package/esm/_internal/useFocusTrap.js.map +0 -1
  383. package/esm/_internal/useRovingTabIndex.js +0 -87
  384. package/esm/_internal/useRovingTabIndex.js.map +0 -1
  385. package/esm/_internal/user-block.js +0 -17
  386. package/esm/_internal/user-block.js.map +0 -1
  387. package/esm/index.js +0 -95
  388. package/esm/index.js.map +0 -1
  389. package/esm/index2.js +0 -16
  390. package/esm/index2.js.map +0 -1
  391. package/src/utils/index.tsx +0 -7
package/index.d.ts ADDED
@@ -0,0 +1,2686 @@
1
+ import React, { ReactNode, SyntheticEvent, ReactElement, MouseEventHandler, KeyboardEventHandler, AriaAttributes, DetailedHTMLProps, ButtonHTMLAttributes, InputHTMLAttributes, Ref, RefObject, ImgHTMLAttributes, CSSProperties, SetStateAction, Key } from 'react';
2
+ import { K as Kind, C as Comp, G as GenericProps, H as HasTheme, a as HorizontalAlignment, S as Size, b as Color, E as Emphasis, V as ValueOf, c as Callback, d as ColorPalette, A as Alignment, e as VerticalAlignment, O as Orientation, f as ColorVariant, T as Typography, g as TextElement, h as HeadingElement, i as AspectRatio, F as Falsy, j as FocusPoint, k as ThumbnailSize, l as ThumbnailVariant, m as GlobalSize, n as TypographyInterface } from './_internal/types.js';
3
+ export { A as Alignment, i as AspectRatio, b as Color, d as ColorPalette, f as ColorVariant, E as Emphasis, j as FocusPoint, m as GlobalSize, a as HorizontalAlignment, K as Kind, O as Orientation, S as Size, o as Theme, r as ThumbnailAspectRatio, k as ThumbnailSize, l as ThumbnailVariant, T as Typography, q as TypographyCustom, n as TypographyInterface, p as TypographyTitleCustom, e as VerticalAlignment } from './_internal/types.js';
4
+
5
+ interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'> {
6
+ /** Message variant. */
7
+ kind?: Kind;
8
+ /** Dialog title. */
9
+ title?: string;
10
+ /** Props forwarded to the confirm button */
11
+ confirmProps: ButtonProps & {
12
+ onClick(): void;
13
+ label: string;
14
+ };
15
+ /**
16
+ * Props forwarded to the cancel button.
17
+ * Will not render a cancel button if undefined.
18
+ */
19
+ cancelProps?: ButtonProps & {
20
+ onClick(): void;
21
+ label: string;
22
+ };
23
+ }
24
+ /**
25
+ * AlertDialog component.
26
+ *
27
+ * An alert dialog is a modal dialog that interrupts the user's workflow to
28
+ * communicate an important message and acquire a response.
29
+ *
30
+ * It should not have a complex content.
31
+ * Children of this component should only be strings, paragraphs or links.
32
+ */
33
+ declare const AlertDialog: Comp<AlertDialogProps, HTMLDivElement>;
34
+
35
+ /**
36
+ * Defines the props of the component.
37
+ */
38
+ interface AutocompleteProps extends GenericProps, HasTheme {
39
+ /**
40
+ * Whether the suggestions list should display anchored to the input or to the wrapper.
41
+ * @see {@link DropdownProps#anchorToInput}
42
+ */
43
+ anchorToInput?: boolean;
44
+ /**
45
+ * Props to pass to the clear button (minus those already set by the TextField props).
46
+ * If not specified, the button won't be displayed.
47
+ * @see {@link TextFieldProps#clearButtonProps}
48
+ */
49
+ clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
50
+ /**
51
+ * Reference to the <input> or <textarea> element.
52
+ * @see {@link TextFieldProps#inputRef}
53
+ */
54
+ inputRef?: TextFieldProps['inputRef'];
55
+ /**
56
+ * The offset that will be applied to the Dropdown position.
57
+ * @see {@link DropdownProps#offset}
58
+ */
59
+ offset?: Offset;
60
+ /**
61
+ * The preferred Dropdown location against the anchor element.
62
+ * @see {@link DropdownProps#placement}
63
+ */
64
+ placement?: Placement;
65
+ /**
66
+ * Whether the dropdown should fit to the anchor width or not.
67
+ * @see {@link DropdownProps#fitToAnchorWidth}
68
+ */
69
+ fitToAnchorWidth?: boolean;
70
+ /**
71
+ * The error related to the component.
72
+ * @see {@link TextFieldProps#error}
73
+ */
74
+ error?: string | ReactNode;
75
+ /**
76
+ * Whether the text field is displayed with error style or not.
77
+ * @see {@link TextFieldProps#hasError}
78
+ */
79
+ hasError?: boolean;
80
+ /**
81
+ * Whether the text box should be focused upon closing the suggestions or not.
82
+ */
83
+ shouldFocusOnClose?: boolean;
84
+ /**
85
+ * The helper message of the text field.
86
+ * @see {@link TextFieldProps#helper}
87
+ */
88
+ helper?: string;
89
+ /**
90
+ * The icon of the text field (SVG path).
91
+ * @see {@link TextFieldProps#icon}
92
+ */
93
+ icon?: string;
94
+ /**
95
+ * Whether the component is disabled or not.
96
+ * @see {@link TextFieldProps#isDisabled}
97
+ */
98
+ isDisabled?: boolean;
99
+ /**
100
+ * Whether the component is required or not.
101
+ * @see {@link TextFieldProps#isRequired}
102
+ */
103
+ isRequired?: boolean;
104
+ /**
105
+ * Whether the text field is displayed with valid style or not.
106
+ * @see {@link TextFieldProps#isValid}
107
+ */
108
+ isValid?: boolean;
109
+ /**
110
+ * The label of the text field displayed in a label tag.
111
+ * @see {@link TextFieldProps#label}
112
+ */
113
+ label?: string;
114
+ /**
115
+ * The placeholder message of the text field.
116
+ * @see {@link TextFieldProps#placeholder}
117
+ */
118
+ placeholder?: string;
119
+ /** List of suggestions to display during autocomplete. */
120
+ children: React.ReactNode;
121
+ /**
122
+ * The list of chips to be displayed before the text field input.
123
+ */
124
+ chips?: React.ReactNode;
125
+ /**
126
+ * The value of the text field.
127
+ * @see {@link TextFieldProps#value}
128
+ */
129
+ value: string;
130
+ /**
131
+ * Whether the suggestions from the autocomplete should be displayed or not.
132
+ * @see {@link DropdownProps#isOpen}
133
+ */
134
+ isOpen: boolean;
135
+ /**
136
+ * The native input name property.
137
+ * @see {@link TextFieldProps#name}
138
+ */
139
+ name?: string;
140
+ /**
141
+ * Whether a click in the Autocomplete dropdown would close it or not.
142
+ * @see {@link DropdownProps#closeOnClick}
143
+ */
144
+ closeOnClick?: boolean;
145
+ /**
146
+ * Whether a click anywhere out of the Autocomplete would close it or not.
147
+ * @see {@link DropdownProps#closeOnClickAway}
148
+ */
149
+ closeOnClickAway?: boolean;
150
+ /**
151
+ * Whether an escape key press would close the Autocomplete or not.
152
+ * @see {@link DropdownProps#closeOnEscape}
153
+ */
154
+ closeOnEscape?: boolean;
155
+ /**
156
+ * The function called on blur.
157
+ * @see {@link TextFieldProps#onBlur}
158
+ */
159
+ onBlur?(event: React.FocusEvent): void;
160
+ /**
161
+ * On change callback.
162
+ * @see {@link TextFieldProps#onChange}
163
+ */
164
+ onChange(value: string, name?: string, event?: SyntheticEvent): void;
165
+ /**
166
+ * The function called on close.
167
+ * @see {@link DropdownProps#onClose}
168
+ */
169
+ onClose?(): void;
170
+ /**
171
+ * The function called on focus.
172
+ * @see {@link TextFieldProps#onFocus}
173
+ */
174
+ onFocus?(event: React.FocusEvent): void;
175
+ /**
176
+ * The function called when the bottom of the dropdown is reached.
177
+ * @see {@link DropdownProps#onInfiniteScroll}
178
+ */
179
+ onInfiniteScroll?(): void;
180
+ }
181
+ /**
182
+ * Autocomplete component.
183
+ *
184
+ * @param props Component props.
185
+ * @param ref Component ref.
186
+ * @return React element.
187
+ */
188
+ declare const Autocomplete: Comp<AutocompleteProps, HTMLDivElement>;
189
+
190
+ /**
191
+ * Defines the props of the component.
192
+ */
193
+ interface AutocompleteMultipleProps extends AutocompleteProps {
194
+ /** Selected values. */
195
+ values: any[];
196
+ /** Alignment of the chips in the autocomplete. */
197
+ chipsAlignment?: HorizontalAlignment;
198
+ /** Selected value render function. Default: Renders the value inside of a Chip. */
199
+ selectedChipRender(choice: any, index: number, onClear?: (event: React.MouseEvent, choice: any) => void, isDisabled?: boolean): ReactNode | string;
200
+ }
201
+ /**
202
+ * AutocompleteMultiple component.
203
+ *
204
+ * @param props Component props.
205
+ * @param ref Component ref.
206
+ * @return React element.
207
+ */
208
+ declare const AutocompleteMultiple: Comp<AutocompleteMultipleProps, HTMLDivElement>;
209
+
210
+ /**
211
+ * Avatar sizes.
212
+ */
213
+ declare type AvatarSize = Extract<Size, 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
214
+ /**
215
+ * Defines the props of the component.
216
+ */
217
+ interface AvatarProps extends GenericProps, HasTheme {
218
+ /** Action toolbar content. */
219
+ actions?: ReactNode;
220
+ /** Image alternative text. */
221
+ alt: string;
222
+ /** Badge. */
223
+ badge?: ReactElement;
224
+ /** Image URL. */
225
+ image: string;
226
+ /** Props to pass to the link wrapping the thumbnail. */
227
+ linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
228
+ /** Custom react component for the link (can be used to inject react router Link). */
229
+ linkAs?: 'a' | any;
230
+ /** On click callback. */
231
+ onClick?: MouseEventHandler<HTMLDivElement>;
232
+ /** On key press callback. */
233
+ onKeyPress?: KeyboardEventHandler<HTMLDivElement>;
234
+ /** Size variant. */
235
+ size?: AvatarSize;
236
+ /** Props to pass to the thumbnail (minus those already set by the Avatar props). */
237
+ thumbnailProps?: Omit<ThumbnailProps, 'image' | 'alt' | 'size' | 'theme' | 'align' | 'fillHeight' | 'variant' | 'aspectRatio'>;
238
+ }
239
+ /**
240
+ * Avatar component.
241
+ *
242
+ * @param props Component props.
243
+ * @param ref Component ref.
244
+ * @return React element.
245
+ */
246
+ declare const Avatar: Comp<AvatarProps, HTMLDivElement>;
247
+
248
+ /**
249
+ * Defines the props of the component.
250
+ */
251
+ interface BadgeProps extends GenericProps {
252
+ /** Badge content. */
253
+ children?: ReactNode;
254
+ /** Color variant. */
255
+ color?: Color;
256
+ }
257
+ /**
258
+ * Badge component.
259
+ *
260
+ * @param props Component props.
261
+ * @param ref Component ref.
262
+ * @return React element.
263
+ */
264
+ declare const Badge: Comp<BadgeProps, HTMLDivElement>;
265
+
266
+ declare type HTMLButtonProps = DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
267
+ /**
268
+ * Button size definition.
269
+ */
270
+ declare type ButtonSize = Extract<Size, 's' | 'm'>;
271
+ interface BaseButtonProps extends GenericProps, Pick<AriaAttributes, 'aria-expanded' | 'aria-haspopup' | 'aria-pressed' | 'aria-label'>, HasTheme {
272
+ /** Color variant. */
273
+ color?: Color;
274
+ /** Emphasis variant. */
275
+ emphasis?: Emphasis;
276
+ /** Whether or not the button has a background color in low emphasis. */
277
+ hasBackground?: boolean;
278
+ /** Native anchor href property. It determines whether the Button will be a <button> or an <a>. */
279
+ href?: string;
280
+ /** Whether the component is disabled or not. */
281
+ isDisabled?: boolean;
282
+ /** Whether the component is selected or not. */
283
+ isSelected?: boolean;
284
+ /** Native button name property. */
285
+ name?: string;
286
+ /** Size variant. */
287
+ size?: ButtonSize;
288
+ /** Native anchor target property. */
289
+ target?: '_self' | '_blank' | '_parent' | '_top';
290
+ /** Native button type. */
291
+ type?: HTMLButtonProps['type'];
292
+ /** Custom react component for the link (can be used to inject react router Link). */
293
+ linkAs?: 'a' | any;
294
+ }
295
+
296
+ /**
297
+ * Button emphasis definition.
298
+ * @deprecated Use Emphasis instead.
299
+ */
300
+ declare const ButtonEmphasis: {
301
+ readonly low: "low";
302
+ readonly medium: "medium";
303
+ readonly high: "high";
304
+ };
305
+ /**
306
+ * Defines the props of the component.
307
+ */
308
+ interface ButtonProps extends BaseButtonProps {
309
+ /** Button content. */
310
+ children?: ReactNode;
311
+ /** Left icon (SVG path). */
312
+ leftIcon?: string;
313
+ /** Right icon (SVG path). */
314
+ rightIcon?: string;
315
+ /** When `true`, the button gets as large as possible. */
316
+ fullWidth?: boolean;
317
+ }
318
+ /**
319
+ * Button component.
320
+ *
321
+ * @param props Component props.
322
+ * @param ref Component ref.
323
+ * @return React element.
324
+ */
325
+ declare const Button: Comp<ButtonProps, HTMLButtonElement | HTMLAnchorElement>;
326
+
327
+ interface IconButtonProps extends BaseButtonProps {
328
+ /**
329
+ * Icon (SVG path).
330
+ * If `image` is also set, `image` will be used instead.
331
+ */
332
+ icon?: string;
333
+ /**
334
+ * Image (image url).
335
+ * Has priority over `icon`.
336
+ */
337
+ image?: string;
338
+ /**
339
+ * Label text (required for a11y purpose).
340
+ * If you really don't want an aria-label, you can set an empty label (this is not recommended).
341
+ */
342
+ label: string;
343
+ /**
344
+ * Props to pass to the tooltip.
345
+ * If undefined or if tooltipProps.label is undefined, the label prop will be used as tooltip label.
346
+ * */
347
+ tooltipProps?: Partial<TooltipProps>;
348
+ /** Whether the tooltip should be hidden or not. */
349
+ hideTooltip?: boolean;
350
+ }
351
+ /**
352
+ * IconButton component.
353
+ *
354
+ * @param props Component props.
355
+ * @param ref Component ref.
356
+ * @return React element.
357
+ */
358
+ declare const IconButton: Comp<IconButtonProps, HTMLButtonElement>;
359
+
360
+ /**
361
+ * Defines the props of the component
362
+ */
363
+ declare type ButtonGroupProps = GenericProps;
364
+ /**
365
+ * ButtonGroup component.
366
+ *
367
+ * @param props Component props.
368
+ * @param ref Component ref.
369
+ * @return React element.
370
+ */
371
+ declare const ButtonGroup: Comp<ButtonGroupProps, HTMLDivElement>;
372
+
373
+ /**
374
+ * Defines the props of the component.
375
+ */
376
+ interface CheckboxProps extends GenericProps, HasTheme {
377
+ /** Helper text. */
378
+ helper?: string;
379
+ /** Native input id property. */
380
+ id?: string;
381
+ /** Native input ref. */
382
+ inputRef?: React.Ref<HTMLInputElement>;
383
+ /** Whether it is checked or not. */
384
+ isChecked?: boolean;
385
+ /** Whether the component is disabled or not. */
386
+ isDisabled?: boolean;
387
+ /** Label text. */
388
+ label?: ReactNode;
389
+ /** Native input name property. */
390
+ name?: string;
391
+ /** Native input value property. */
392
+ value?: string;
393
+ /** On change callback. */
394
+ onChange?(isChecked: boolean, value?: string, name?: string, event?: SyntheticEvent): void;
395
+ /** optional props for input */
396
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
397
+ }
398
+ /**
399
+ * Checkbox component.
400
+ *
401
+ * @param props Component props.
402
+ * @param ref Component ref.
403
+ * @return React element.
404
+ */
405
+ declare const Checkbox: Comp<CheckboxProps, HTMLDivElement>;
406
+
407
+ /**
408
+ * Chip sizes.
409
+ */
410
+ declare type ChipSize = Extract<Size, 's' | 'm'>;
411
+ /**
412
+ * Defines the props of the component.
413
+ */
414
+ interface ChipProps extends GenericProps, HasTheme {
415
+ /** A component to be rendered after the content. */
416
+ after?: ReactNode;
417
+ /** A component to be rendered before the content. */
418
+ before?: ReactNode;
419
+ /** Color variant. */
420
+ color?: Color;
421
+ /** Whether the component is clickable or not. */
422
+ isClickable?: boolean;
423
+ /** Whether the component is disabled or not. */
424
+ isDisabled?: boolean;
425
+ /** Whether the chip is currently in a highlighted state or not. */
426
+ isHighlighted?: boolean;
427
+ /** Whether the component is selected or not. */
428
+ isSelected?: boolean;
429
+ /** Size variant. */
430
+ size?: ChipSize;
431
+ /** On "after" element clicked callback. */
432
+ onAfterClick?: MouseEventHandler;
433
+ /** On "before" element clicked callback. */
434
+ onBeforeClick?: MouseEventHandler;
435
+ }
436
+ /**
437
+ * Chip component.
438
+ *
439
+ * @param props Component props.
440
+ * @param ref Component ref.
441
+ * @return React element.
442
+ */
443
+ declare const Chip: Comp<ChipProps, HTMLAnchorElement>;
444
+
445
+ interface UseChipGroupNavigation {
446
+ /** the current active chip index */
447
+ activeChip: number;
448
+ /** callback to be executed when the backspace was pressed */
449
+ onBackspacePressed(): void;
450
+ /** function that allows to reset the navigation */
451
+ resetChipNavigation(): void;
452
+ }
453
+ declare type useChipGroupNavigationType<C = any> = (chips: C[], onChipDeleted: (chip: C) => void, initialActiveChip?: number) => UseChipGroupNavigation;
454
+
455
+ /**
456
+ * Defines the props of the component.
457
+ */
458
+ interface ChipGroupProps extends GenericProps {
459
+ /** Chip horizontal alignment. */
460
+ align?: HorizontalAlignment;
461
+ /** List of Chip. */
462
+ children: ReactNode;
463
+ }
464
+ declare const ChipGroup: Comp<ChipGroupProps, HTMLDivElement> & {
465
+ useChipGroupNavigation: useChipGroupNavigationType<any>;
466
+ };
467
+
468
+ /**
469
+ * Comment block variants.
470
+ */
471
+ declare const CommentBlockVariant: {
472
+ readonly indented: "indented";
473
+ readonly linear: "linear";
474
+ };
475
+ declare type CommentBlockVariant = ValueOf<typeof CommentBlockVariant>;
476
+ /**
477
+ * Defines the props of the component.
478
+ */
479
+ interface CommentBlockProps extends GenericProps, HasTheme {
480
+ /** Action toolbar content. */
481
+ actions?: ReactNode;
482
+ /** Props to pass to the avatar. */
483
+ avatarProps: AvatarProps;
484
+ /** Comment block replies. */
485
+ children?: ReactNode;
486
+ /** Comment date with the minimal timestamp informations (xx minutes, x hours, yesterday, 6 days, Month Day, Month Day Year)*/
487
+ date: string;
488
+ /** Comment date with the full timestamp informations (day, month, year, time) */
489
+ fullDate?: string;
490
+ /** Whether the component has actions to display or not. */
491
+ hasActions?: boolean;
492
+ /** Action toolbar header content. */
493
+ headerActions?: ReactNode;
494
+ /** Whether the component is open or not. */
495
+ isOpen?: boolean;
496
+ /** Whether the comment is relevant or not. */
497
+ isRelevant?: boolean;
498
+ /** Comment author name. */
499
+ name: string;
500
+ /** On click callback. */
501
+ onClick?(): void;
502
+ /** On mouse enter callback. */
503
+ onMouseEnter?(): void;
504
+ /** On mouse leave callback. */
505
+ onMouseLeave?(): void;
506
+ /** Comment content. */
507
+ text: ReactNode | string;
508
+ /** Comment variant. */
509
+ variant?: CommentBlockVariant;
510
+ }
511
+ /**
512
+ * CommentBlock component.
513
+ *
514
+ * @param props Component props.
515
+ * @param ref Component ref.
516
+ * @return React element.
517
+ */
518
+ declare const CommentBlock: Comp<CommentBlockProps, HTMLDivElement>;
519
+
520
+ /**
521
+ * Defines the props of the component.
522
+ */
523
+ interface DatePickerProps extends GenericProps {
524
+ /** Default month. */
525
+ defaultMonth?: Date;
526
+ /** Locale (language or region) to use. */
527
+ locale: string;
528
+ /** Date after which dates can't be selected. */
529
+ maxDate?: Date;
530
+ /** Date before which dates can't be selected. */
531
+ minDate?: Date;
532
+ /** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */
533
+ nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
534
+ /** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */
535
+ previousButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
536
+ /** Reference to the <button> element corresponding to the current date or the selected date. */
537
+ todayOrSelectedDateRef?: Ref<HTMLButtonElement>;
538
+ /** Currently selected date. */
539
+ value: Date | undefined;
540
+ /** On change callback. */
541
+ onChange(value: Date | undefined): void;
542
+ }
543
+
544
+ /**
545
+ * DatePicker component.
546
+ *
547
+ * @param props Component props.
548
+ * @param ref Component ref.
549
+ * @return React element.
550
+ */
551
+ declare const DatePicker: Comp<DatePickerProps, HTMLDivElement>;
552
+
553
+ /**
554
+ * Defines the props of the component.
555
+ */
556
+ interface DatePickerControlledProps extends DatePickerProps {
557
+ /** Selected month to display. */
558
+ selectedMonth: Date;
559
+ /** On previous month change callback. */
560
+ onPrevMonthChange(): void;
561
+ /** On next month change callback. */
562
+ onNextMonthChange(): void;
563
+ }
564
+ /**
565
+ * DatePickerControlled component.
566
+ *
567
+ * @param props Component props.
568
+ * @param ref Component ref.
569
+ * @return React element.
570
+ */
571
+ declare const DatePickerControlled: Comp<DatePickerControlledProps, HTMLDivElement>;
572
+
573
+ /**
574
+ * Defines the props of the component.
575
+ */
576
+ interface DatePickerFieldProps extends GenericProps {
577
+ /** Default month. */
578
+ defaultMonth?: Date;
579
+ /** Whether the component is disabled or not. */
580
+ isDisabled?: boolean;
581
+ /** Locale (language or region) to use. */
582
+ locale: string;
583
+ /** Date after which dates can't be selected. */
584
+ maxDate?: Date;
585
+ /** Date before which dates can't be selected. */
586
+ minDate?: Date;
587
+ /** Native input name property. */
588
+ name?: string;
589
+ /** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */
590
+ nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
591
+ /** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */
592
+ previousButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
593
+ /** Currently selected date. */
594
+ value: Date | undefined;
595
+ /** On change callback. */
596
+ onChange(value: Date | undefined, name?: string, event?: SyntheticEvent): void;
597
+ }
598
+ /**
599
+ * DatePickerField component.
600
+ *
601
+ * @param props Component props.
602
+ * @param ref Component ref.
603
+ * @return React element.
604
+ */
605
+ declare const DatePickerField: Comp<DatePickerFieldProps, HTMLDivElement>;
606
+
607
+ /**
608
+ * Defines the props of the component.
609
+ */
610
+ interface DialogProps extends GenericProps {
611
+ /** Footer content. */
612
+ footer?: ReactNode;
613
+ /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
614
+ forceFooterDivider?: boolean;
615
+ /** Header content. */
616
+ header?: ReactNode;
617
+ /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
618
+ forceHeaderDivider?: boolean;
619
+ /** Whether the indefinite progress indicator over the dialog content is displayed or not. */
620
+ isLoading?: boolean;
621
+ /** Whether the component is open or not. */
622
+ isOpen?: boolean;
623
+ /** Reference to the parent element that triggered modal opening (will get back focus on close). */
624
+ parentElement?: RefObject<HTMLElement>;
625
+ /** Reference to the dialog content element. */
626
+ contentRef?: Ref<HTMLDivElement>;
627
+ /** Reference to the of the element that should get the focus when the dialogs opens. By default, the first child will take focus. */
628
+ focusElement?: RefObject<HTMLElement>;
629
+ /** Whether to keep the dialog open on clickaway or escape press. */
630
+ preventAutoClose?: boolean;
631
+ /** Size variant. */
632
+ size?: DialogSizes;
633
+ /** Z-axis position. */
634
+ zIndex?: number;
635
+ /** Z-axis position. */
636
+ dialogProps?: GenericProps;
637
+ /** On close callback. */
638
+ onClose?(): void;
639
+ /** Callback called when the open animation starts and the close animation finishes. */
640
+ onVisibilityChange?(isVisible: boolean): void;
641
+ }
642
+ declare type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
643
+ /**
644
+ * Dialog component.
645
+ *
646
+ * @param props Component props.
647
+ * @param ref Component ref.
648
+ * @return React element.
649
+ */
650
+ declare const Dialog: Comp<DialogProps, HTMLDivElement>;
651
+
652
+ /**
653
+ * Defines the props of the component.
654
+ */
655
+ interface DividerProps extends GenericProps, HasTheme {
656
+ }
657
+ /**
658
+ * Divider component.
659
+ *
660
+ * @param props Component props.
661
+ * @param ref Component ref.
662
+ * @return React element.
663
+ */
664
+ declare const Divider: Comp<DividerProps, HTMLHRElement>;
665
+
666
+ /**
667
+ * Defines the props of the component.
668
+ */
669
+ interface DragHandleProps extends GenericProps, HasTheme {
670
+ }
671
+ /**
672
+ * DragHandle component.
673
+ *
674
+ * @param props Component props.
675
+ * @param ref Component ref.
676
+ * @return React element.
677
+ */
678
+ declare const DragHandle: Comp<DragHandleProps, HTMLDivElement>;
679
+
680
+ /**
681
+ * Different possible placements for the popover.
682
+ */
683
+ declare const Placement: {
684
+ readonly AUTO: "auto";
685
+ readonly AUTO_END: "auto-end";
686
+ readonly AUTO_START: "auto-start";
687
+ readonly TOP: "top";
688
+ readonly TOP_END: "top-end";
689
+ readonly TOP_START: "top-start";
690
+ readonly RIGHT: "right";
691
+ readonly RIGHT_END: "right-end";
692
+ readonly RIGHT_START: "right-start";
693
+ readonly BOTTOM: "bottom";
694
+ readonly BOTTOM_END: "bottom-end";
695
+ readonly BOTTOM_START: "bottom-start";
696
+ readonly LEFT: "left";
697
+ readonly LEFT_END: "left-end";
698
+ readonly LEFT_START: "left-start";
699
+ };
700
+ declare type Placement = ValueOf<typeof Placement>;
701
+ /**
702
+ * Offset of the popover.
703
+ */
704
+ interface Offset {
705
+ /** Offset size along the reference. */
706
+ along?: number;
707
+ /** Offset size away from the reference. */
708
+ away?: number;
709
+ }
710
+ /**
711
+ * Popover elevation index.
712
+ */
713
+ declare type Elevation = 1 | 2 | 3 | 4 | 5;
714
+ /**
715
+ * Defines the props of the component.
716
+ */
717
+ interface PopoverProps extends GenericProps {
718
+ /** Reference to the DOM element used to set the position of the popover. */
719
+ anchorRef: React.RefObject<HTMLElement>;
720
+ /** Element which will act as boundary when opening the popover. */
721
+ boundaryRef?: RefObject<HTMLElement>;
722
+ /** Content. */
723
+ children: ReactNode;
724
+ /** Whether a click anywhere out of the popover would close it. */
725
+ closeOnClickAway?: boolean;
726
+ /** Whether an escape key press would close the popover. */
727
+ closeOnEscape?: boolean;
728
+ /** Shadow elevation. */
729
+ elevation?: Elevation;
730
+ /** Whether the dropdown should fit to the anchor width (if dropdown is smaller). */
731
+ fitToAnchorWidth?: boolean;
732
+ /** Shrink popover if even after flipping there is not enough space. */
733
+ fitWithinViewportHeight?: boolean;
734
+ /** Element to focus when opening the popover. */
735
+ focusElement?: RefObject<HTMLElement>;
736
+ /** Whether the focus should go back on the anchor when popover closes and focus is within. */
737
+ focusAnchorOnClose?: boolean;
738
+ /** Whether we put an arrow or not. */
739
+ hasArrow?: boolean;
740
+ /** Whether the popover is open or not. */
741
+ isOpen: boolean;
742
+ /** Offset placement relative to anchor. */
743
+ offset?: Offset;
744
+ /** Reference to the parent element that triggered the popover (will get back focus on close or else fallback on the anchor element). */
745
+ parentElement?: RefObject<HTMLElement>;
746
+ /** Placement relative to anchor. */
747
+ placement?: Placement;
748
+ /** Whether the popover should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */
749
+ usePortal?: boolean;
750
+ /** Z-axis position. */
751
+ zIndex?: number;
752
+ /** On close callback (on click away or Escape pressed). */
753
+ onClose?(): void;
754
+ }
755
+ /**
756
+ * Popover component.
757
+ *
758
+ * @param props Component props.
759
+ * @param ref Component ref.
760
+ * @return React element.
761
+ */
762
+ declare const Popover: Comp<PopoverProps, HTMLDivElement>;
763
+
764
+ /**
765
+ * Defines the props of the component.
766
+ */
767
+ interface DropdownProps extends GenericProps {
768
+ /**
769
+ * Reference to the element around which the dropdown is placed.
770
+ * @see {@link PopoverProps#anchorRef}
771
+ */
772
+ anchorRef: PopoverProps['anchorRef'];
773
+ /** Dropdown content. */
774
+ children: React.ReactNode;
775
+ /**
776
+ * Whether a click anywhere out of the Dropdown would close it or not.
777
+ * @see {@link PopoverProps#closeOnClickAway}
778
+ */
779
+ closeOnClickAway?: boolean;
780
+ /**
781
+ * Whether to close the Dropdown when clicking in it or not.
782
+ */
783
+ closeOnClick?: boolean;
784
+ /**
785
+ * Whether an escape key press would close the Dropdown or not.
786
+ * @see {@link PopoverProps#closeOnEscape}
787
+ */
788
+ closeOnEscape?: boolean;
789
+ /**
790
+ * Whether the dropdown should fit to the anchor width (if dropdown is smaller) or not.
791
+ * @see {@link PopoverProps#fitToAnchorWidth}
792
+ */
793
+ fitToAnchorWidth?: boolean;
794
+ /**
795
+ * Whether the dropdown should shrink to fit within the viewport height or not.
796
+ * @see {@link PopoverProps#fitWithinViewportHeight}
797
+ */
798
+ fitWithinViewportHeight?: boolean;
799
+ /**
800
+ * Whether the dropdown should be displayed or not. Useful to control the Dropdown from outside the component.
801
+ * @see {@link PopoverProps#isOpen}
802
+ */
803
+ isOpen: boolean;
804
+ /**
805
+ * Offset applied to the Dropdown position.
806
+ * @see {@link PopoverProps#offset}
807
+ */
808
+ offset?: Offset;
809
+ /**
810
+ * Preferred Dropdown placement against the anchor element.
811
+ * @see {@link PopoverProps#placement}
812
+ */
813
+ placement?: Placement;
814
+ /** Whether the focus should be set on the list when the dropdown is open or not. */
815
+ shouldFocusOnOpen?: boolean;
816
+ /** Whether the focus should go back on the anchor when dropdown closes and focus is within. */
817
+ focusAnchorOnClose?: boolean;
818
+ /**
819
+ * Z-axis position.
820
+ * @see {@link PopoverProps#zIndex}
821
+ */
822
+ zIndex?: number;
823
+ /**
824
+ * On close callback.
825
+ * @see {@link PopoverProps#onClose}
826
+ */
827
+ onClose?(): void;
828
+ /** On scroll end callback. */
829
+ onInfiniteScroll?(): void;
830
+ }
831
+ /**
832
+ * Dropdown component.
833
+ *
834
+ * @param props Component props.
835
+ * @param ref Component ref.
836
+ * @return React element.
837
+ */
838
+ declare const Dropdown: Comp<DropdownProps, HTMLDivElement>;
839
+
840
+ /**
841
+ * Defines the props of the component.
842
+ */
843
+ interface ExpansionPanelProps extends GenericProps, HasTheme {
844
+ /** Whether the expansion panel has a background. */
845
+ hasBackground?: boolean;
846
+ /** Whether the header has a divider. */
847
+ hasHeaderDivider?: boolean;
848
+ /** Whether the component is open or not. */
849
+ isOpen?: boolean;
850
+ /** Label text (overwritten if a `<header>` is provided in the children). */
851
+ label?: string;
852
+ /** On open callback. */
853
+ onOpen?: Callback;
854
+ /** On close callback. */
855
+ onClose?: Callback;
856
+ /** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */
857
+ toggleButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
858
+ /** On toggle open or close callback. */
859
+ onToggleOpen?(shouldOpen: boolean): void;
860
+ }
861
+ /**
862
+ * ExpansionPanel component.
863
+ *
864
+ * @param props Component props.
865
+ * @param ref Component ref.
866
+ * @return React element.
867
+ */
868
+ declare const ExpansionPanel: Comp<ExpansionPanelProps, HTMLDivElement>;
869
+
870
+ interface FlagProps extends GenericProps, HasTheme {
871
+ /** Color of the component. */
872
+ color?: ColorPalette;
873
+ /** Icon to use before the label. */
874
+ icon?: string;
875
+ /** Text label of the flag. */
876
+ label: string;
877
+ }
878
+ /**
879
+ * Flag component.
880
+ *
881
+ * @param props Component props.
882
+ * @param ref Component ref.
883
+ * @return React element.
884
+ */
885
+ declare const Flag: Comp<FlagProps, HTMLDivElement>;
886
+
887
+ declare type MarginAutoAlignment = Extract<Alignment, 'top' | 'bottom' | 'right' | 'left'>;
888
+ declare type GapSize = Extract<Size, 'tiny' | 'regular' | 'medium' | 'big' | 'huge'>;
889
+ declare type SpaceAlignment = Extract<Alignment, 'space-between' | 'space-evenly' | 'space-around'>;
890
+ declare type FlexVerticalAlignment = VerticalAlignment | SpaceAlignment;
891
+ declare type FlexHorizontalAlignment = HorizontalAlignment | SpaceAlignment;
892
+ /**
893
+ * Defines the props of the component.
894
+ */
895
+ interface FlexBoxProps extends GenericProps {
896
+ /** Customize the root element. */
897
+ as?: React.ElementType;
898
+ /** Children elements. */
899
+ children?: ReactNode;
900
+ /** Whether the "content filling space" is enabled or not. */
901
+ fillSpace?: boolean;
902
+ /** Gap space between flexbox items. */
903
+ gap?: GapSize;
904
+ /** Flex horizontal alignment. */
905
+ hAlign?: FlexVerticalAlignment;
906
+ /** Whether the "auto margin" is enabled all around or not. */
907
+ marginAuto?: MarginAutoAlignment | MarginAutoAlignment[];
908
+ /** Whether the "content shrink" is disabled or not. */
909
+ noShrink?: boolean;
910
+ /** Flex direction. */
911
+ orientation?: Orientation;
912
+ /** Flex vertical alignment. */
913
+ vAlign?: FlexHorizontalAlignment;
914
+ /** Whether the "flex wrap" is enabled or not. */
915
+ wrap?: boolean;
916
+ }
917
+ /**
918
+ * FlexBox component.
919
+ *
920
+ * @param props Component props.
921
+ * @param ref Component ref.
922
+ * @return React element.
923
+ */
924
+ declare const FlexBox: Comp<FlexBoxProps, HTMLDivElement>;
925
+
926
+ /**
927
+ * Accepted gap sizes for the generic block.
928
+ */
929
+ declare const GenericBlockGapSize: Pick<{
930
+ readonly xxs: "xxs";
931
+ readonly xs: "xs";
932
+ readonly s: "s";
933
+ readonly m: "m";
934
+ readonly l: "l";
935
+ readonly xl: "xl";
936
+ readonly xxl: "xxl";
937
+ readonly tiny: "tiny";
938
+ readonly regular: "regular";
939
+ readonly medium: "medium";
940
+ readonly big: "big";
941
+ readonly huge: "huge";
942
+ }, "tiny" | "regular" | "medium" | "big" | "huge">;
943
+ declare type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;
944
+
945
+ interface GenericBlockProps extends FlexBoxProps {
946
+ /**
947
+ * Component to use as visual element.
948
+ */
949
+ figure?: ReactNode;
950
+ /**
951
+ * Actions to set after the main content.
952
+ */
953
+ actions?: ReactNode;
954
+ /**
955
+ * Main content to display or sections components
956
+ * ({@see GenericBlock.Figure}, {@see GenericBlock.Content} & {@see GenericBlock.Actions})
957
+ */
958
+ children: ReactNode;
959
+ /**
960
+ * Orientation of the 3 sections
961
+ */
962
+ orientation?: FlexBoxProps['orientation'];
963
+ /**
964
+ * Horizontal alignment.
965
+ */
966
+ hAlign?: FlexBoxProps['hAlign'];
967
+ /**
968
+ * Vertical alignment.
969
+ */
970
+ vAlign?: FlexBoxProps['vAlign'];
971
+ /**
972
+ * The props to forward to the content.
973
+ * By default, the content will have the same alignment as wrapper.
974
+ */
975
+ contentProps?: Omit<FlexBoxProps, 'children'>;
976
+ /**
977
+ * props to forward to the actions element.
978
+ */
979
+ actionsProps?: Omit<FlexBoxProps, 'children'>;
980
+ /**
981
+ * props to forward to the figure element.
982
+ */
983
+ figureProps?: Omit<FlexBoxProps, 'children'>;
984
+ /**
985
+ * Gap space between sections.
986
+ */
987
+ gap?: GenericBlockGapSize;
988
+ }
989
+ interface GenericBlockSectionProps extends FlexBoxProps {
990
+ /**
991
+ * Gap space between items.
992
+ */
993
+ gap?: GenericBlockGapSize;
994
+ }
995
+ declare type BaseGenericBlock = Comp<GenericBlockProps, HTMLDivElement>;
996
+ /**
997
+ * The GenericBlock is a layout component made of 3 sections that can be
998
+ * displayed either horizontally of vertically with the same gap between each section.
999
+ *
1000
+ * The sections are:
1001
+ * - `Figure` => A visual element to display before the main content.
1002
+ * - `Content` => The main content displayed
1003
+ * - `Actions` => One or more actions to set after the element.
1004
+ *
1005
+ * @see https://www.figma.com/file/lzzrQmsfaXRaOyRfoEogPZ/DS%3A-playground?node-id=1%3A4076
1006
+ */
1007
+ declare const BaseGenericBlock: BaseGenericBlock;
1008
+ interface GenericBlock extends BaseGenericBlock {
1009
+ /**
1010
+ * Use `GenericBlock.Figure` component as children of the `GenericBlock` component as an alternative way to inject
1011
+ * the "figure" section of the block (instead of using `figure` and `figureProps` props).
1012
+ */
1013
+ Figure: Comp<GenericBlockSectionProps>;
1014
+ /**
1015
+ * Use `GenericBlock.Content` component as children of the `GenericBlock` component as an alternative way to inject
1016
+ * the "content" section of the block (instead of using `content` and `contentProps` props).
1017
+ */
1018
+ Content: Comp<GenericBlockSectionProps>;
1019
+ /**
1020
+ * Use `GenericBlock.Actions` component as children of the `GenericBlock` component as an alternative way to inject
1021
+ * the "actions" section of the block (instead of using `actions` and `actionsProps` props).
1022
+ */
1023
+ Actions: Comp<GenericBlockSectionProps>;
1024
+ }
1025
+ declare const GenericBlock: GenericBlock;
1026
+
1027
+ /**
1028
+ * Defines the props of the component.
1029
+ */
1030
+ interface TextProps extends GenericProps {
1031
+ /**
1032
+ * Color variant.
1033
+ */
1034
+ color?: ColorPalette;
1035
+ /**
1036
+ * Lightened or darkened variant of the selected color.
1037
+ */
1038
+ colorVariant?: ColorVariant;
1039
+ /**
1040
+ * Typography variant.
1041
+ */
1042
+ typography?: Typography;
1043
+ /**
1044
+ * Custom component to render the text.
1045
+ */
1046
+ as: TextElement;
1047
+ /**
1048
+ * Control whether the text should truncate or not.
1049
+ * Setting as `true` will make the text truncate on a single line.
1050
+ * Setting as `{ lines: number }` will make the text truncate on a multiple lines.
1051
+ */
1052
+ truncate?: boolean | {
1053
+ lines: number;
1054
+ };
1055
+ /**
1056
+ * Prevents text to wrap on multiple lines
1057
+ * (automatically activated when single line text truncate is activated).
1058
+ */
1059
+ noWrap?: boolean;
1060
+ }
1061
+ /**
1062
+ * Text component.
1063
+ *
1064
+ * @param props Component props.
1065
+ * @param ref Component ref.
1066
+ * @return React element.
1067
+ */
1068
+ declare const Text: Comp<TextProps>;
1069
+
1070
+ /**
1071
+ * Defines the props of the component.
1072
+ */
1073
+ interface HeadingProps extends Partial<TextProps> {
1074
+ /**
1075
+ * Display a specific heading level instead of the one provided by parent context provider.
1076
+ */
1077
+ as?: HeadingElement;
1078
+ }
1079
+ /**
1080
+ * Renders a heading component.
1081
+ * Extends the `Text` Component with the heading level automatically computed based on
1082
+ * the current level provided by the context.
1083
+ */
1084
+ declare const Heading: Comp<HeadingProps>;
1085
+
1086
+ interface HeadingLevelProviderProps {
1087
+ /** The heading level to start at. If left undefined, the parent context will be used, if any. */
1088
+ level?: number;
1089
+ /** The children to display */
1090
+ children: ReactNode;
1091
+ }
1092
+ /**
1093
+ * Provide a new heading level context.
1094
+ */
1095
+ declare const HeadingLevelProvider: React.FC<HeadingLevelProviderProps>;
1096
+
1097
+ declare const useHeadingLevel: () => {
1098
+ level: number;
1099
+ headingElement: HeadingElement;
1100
+ };
1101
+
1102
+ declare type GridGutterSize = Extract<Size, 'regular' | 'big' | 'huge'>;
1103
+ /**
1104
+ * Defines the props of the component.
1105
+ */
1106
+ interface GridProps extends GenericProps {
1107
+ /** Orientation. */
1108
+ orientation?: Orientation;
1109
+ /** Whether the children are wrapped or not. */
1110
+ wrap?: string;
1111
+ /** Vertical alignment. */
1112
+ vAlign?: Alignment;
1113
+ /** Horizontal alignment. */
1114
+ hAlign?: Alignment;
1115
+ /** Gutter size. */
1116
+ gutter?: GridGutterSize;
1117
+ }
1118
+ /**
1119
+ * Grid component.
1120
+ *
1121
+ * @param props Component props.
1122
+ * @param ref Component ref.
1123
+ * @return React element.
1124
+ */
1125
+ declare const Grid: Comp<GridProps, HTMLDivElement>;
1126
+
1127
+ declare type Columns = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
1128
+ /**
1129
+ * Defines the props of the component.
1130
+ */
1131
+ interface GridItemProps extends GenericProps {
1132
+ /** Alignment. */
1133
+ align?: Alignment;
1134
+ /** Order. */
1135
+ order?: Columns;
1136
+ /** Width. */
1137
+ width?: Columns;
1138
+ }
1139
+ /**
1140
+ * GridItem component.
1141
+ *
1142
+ * @param props Component props.
1143
+ * @param ref Component ref.
1144
+ * @return React element.
1145
+ */
1146
+ declare const GridItem: Comp<GridItemProps, HTMLDivElement>;
1147
+
1148
+ declare type IconSizes = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
1149
+ /**
1150
+ * Defines the props of the component.
1151
+ */
1152
+ interface IconProps extends GenericProps, HasTheme {
1153
+ /** Color variant. */
1154
+ color?: Color;
1155
+ /** Lightened or darkened variant of the selected icon color. */
1156
+ colorVariant?: ColorVariant;
1157
+ /** Whether the icon has a shape. */
1158
+ hasShape?: boolean;
1159
+ /**
1160
+ * Icon (SVG path) draw code (`d` property of the `<path>` SVG element).
1161
+ * See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
1162
+ */
1163
+ icon: string;
1164
+ /** Size variant. */
1165
+ size?: IconSizes;
1166
+ /** Sets an alternative text on the svg. Will set an `img` role to the svg. */
1167
+ alt?: string;
1168
+ }
1169
+ /**
1170
+ * Icon component.
1171
+ *
1172
+ * @param props Component props.
1173
+ * @param ref Component ref.
1174
+ * @return React element.
1175
+ */
1176
+ declare const Icon: Comp<IconProps, HTMLElement>;
1177
+
1178
+ declare type ImgHTMLProps = ImgHTMLAttributes<HTMLImageElement>;
1179
+ /**
1180
+ * Defines the props of the component.
1181
+ */
1182
+ interface ThumbnailProps extends GenericProps, HasTheme {
1183
+ /** Alignment of the thumbnail in it's parent (requires flex parent). */
1184
+ align?: HorizontalAlignment;
1185
+ /** Image alternative text. */
1186
+ alt: string;
1187
+ /** Image aspect ratio. */
1188
+ aspectRatio?: AspectRatio;
1189
+ /** Badge. */
1190
+ badge?: ReactElement | Falsy;
1191
+ /** Image cross origin resource policy. */
1192
+ crossOrigin?: ImgHTMLProps['crossOrigin'];
1193
+ /** Fallback icon (SVG path) or react node when image fails to load. */
1194
+ fallback?: string | ReactNode;
1195
+ /** Whether the thumbnail should fill it's parent size (requires flex parent) or not. */
1196
+ fillHeight?: boolean;
1197
+ /** Apply relative vertical and horizontal shift (from -1 to 1) on the image position inside the thumbnail. */
1198
+ focusPoint?: FocusPoint;
1199
+ /** Image URL. */
1200
+ image: string;
1201
+ /** Props to inject into the native <img> element. */
1202
+ imgProps?: ImgHTMLProps;
1203
+ /** Reference to the native <img> element. */
1204
+ imgRef?: Ref<HTMLImageElement>;
1205
+ /** Set to true to force the display of the loading skeleton. */
1206
+ isLoading?: boolean;
1207
+ /** Size variant of the component. */
1208
+ size?: ThumbnailSize;
1209
+ /** Image loading mode. */
1210
+ loading?: ImgHTMLProps['loading'];
1211
+ /** On click callback. */
1212
+ onClick?: MouseEventHandler<HTMLDivElement>;
1213
+ /** On key press callback. */
1214
+ onKeyPress?: KeyboardEventHandler<HTMLDivElement>;
1215
+ /** Variant of the component. */
1216
+ variant?: ThumbnailVariant;
1217
+ /** Props to pass to the link wrapping the thumbnail. */
1218
+ linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
1219
+ /** Custom react component for the link (can be used to inject react router Link). */
1220
+ linkAs?: 'a' | any;
1221
+ }
1222
+ /**
1223
+ * Thumbnail component.
1224
+ *
1225
+ * @param props Component props.
1226
+ * @param ref Component ref.
1227
+ * @return React element.
1228
+ */
1229
+ declare const Thumbnail: Comp<ThumbnailProps>;
1230
+
1231
+ /**
1232
+ * Image block variants.
1233
+ */
1234
+ declare const ImageBlockCaptionPosition: {
1235
+ readonly below: "below";
1236
+ readonly over: "over";
1237
+ };
1238
+ declare type ImageBlockCaptionPosition = ValueOf<typeof ImageBlockCaptionPosition>;
1239
+ /**
1240
+ * Image block sizes.
1241
+ */
1242
+ declare type ImageBlockSize = Extract<Size, 'xl' | 'xxl'>;
1243
+ /**
1244
+ * Defines the props of the component.
1245
+ */
1246
+ interface ImageBlockProps extends GenericProps, HasTheme {
1247
+ /** Action toolbar content. */
1248
+ actions?: ReactNode;
1249
+ /** Alignment. */
1250
+ align?: HorizontalAlignment;
1251
+ /** Image alternative text. */
1252
+ alt: string;
1253
+ /** Caption position. */
1254
+ captionPosition?: ImageBlockCaptionPosition;
1255
+ /** Caption custom CSS style. */
1256
+ captionStyle?: CSSProperties;
1257
+ /** Image description. Can be either a string, or sanitized html. */
1258
+ description?: string | {
1259
+ __html: string;
1260
+ };
1261
+ /** Whether the image has to fill its container height or not. */
1262
+ fillHeight?: boolean;
1263
+ /** Image URL. */
1264
+ image: string;
1265
+ /** Size variant. */
1266
+ size?: ImageBlockSize;
1267
+ /** Tag content. */
1268
+ tags?: ReactNode;
1269
+ /** Props to pass to the thumbnail (minus those already set by the ImageBlock props). */
1270
+ thumbnailProps?: Omit<ThumbnailProps, 'image' | 'size' | 'theme' | 'align' | 'fillHeight'>;
1271
+ /** Image title to display in the caption. */
1272
+ title?: string;
1273
+ }
1274
+ /**
1275
+ * ImageBlock component.
1276
+ *
1277
+ * @param props Component props.
1278
+ * @param ref Component ref.
1279
+ * @return React element.
1280
+ */
1281
+ declare const ImageBlock: Comp<ImageBlockProps, HTMLDivElement>;
1282
+
1283
+ /**
1284
+ * Defines the props of the component.
1285
+ */
1286
+ interface InlineListProps extends GenericProps {
1287
+ /**
1288
+ * Text color.
1289
+ */
1290
+ color?: ColorPalette;
1291
+ /**
1292
+ * Lightened or darkened variant of the selected color.
1293
+ */
1294
+ colorVariant?: ColorVariant;
1295
+ /**
1296
+ * Typography variant.
1297
+ */
1298
+ typography?: Typography;
1299
+ }
1300
+ /**
1301
+ * InlineList component.
1302
+ *
1303
+ * @param props Component props.
1304
+ * @param ref Component ref.
1305
+ * @return React element.
1306
+ */
1307
+ declare const InlineList: Comp<InlineListProps>;
1308
+
1309
+ /**
1310
+ * Defines the props of the component.
1311
+ */
1312
+ interface InputHelperProps extends GenericProps, HasTheme {
1313
+ /** Helper content. */
1314
+ children: string | ReactNode;
1315
+ /** Helper variant. */
1316
+ kind?: Kind;
1317
+ }
1318
+ /**
1319
+ * InputHelper component.
1320
+ *
1321
+ * @param props Component props.
1322
+ * @param ref Component ref.
1323
+ * @return React element.
1324
+ */
1325
+ declare const InputHelper: Comp<InputHelperProps, HTMLSpanElement>;
1326
+
1327
+ /**
1328
+ * Defines the props of the component.
1329
+ */
1330
+ interface InputLabelProps extends GenericProps, HasTheme {
1331
+ /** Label content. */
1332
+ children: string | ReactNode;
1333
+ /** Native htmlFor property. */
1334
+ htmlFor: string;
1335
+ /** Whether the component is required or not. */
1336
+ isRequired?: boolean;
1337
+ }
1338
+ /**
1339
+ * InputLabel component.
1340
+ *
1341
+ * @param props Component props.
1342
+ * @param ref Component ref.
1343
+ * @return React element.
1344
+ */
1345
+ declare const InputLabel: Comp<InputLabelProps, HTMLLabelElement>;
1346
+
1347
+ /**
1348
+ * Defines the props of the component.
1349
+ */
1350
+ interface LightboxProps extends GenericProps, HasTheme {
1351
+ /** Props to pass to the close button (minus those already set by the Lightbox props). */
1352
+ closeButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
1353
+ /** Whether the component is open or not. */
1354
+ isOpen?: boolean;
1355
+ /** Reference to the element that triggered modal opening to set focus on. */
1356
+ parentElement: RefObject<any>;
1357
+ /** Whether to keep the dialog open on clickaway or escape press. */
1358
+ preventAutoClose?: boolean;
1359
+ /** Z-axis position. */
1360
+ zIndex?: number;
1361
+ /** On close callback. */
1362
+ onClose?(): void;
1363
+ }
1364
+ /**
1365
+ * Lightbox component.
1366
+ *
1367
+ * @param props Component props.
1368
+ * @param ref Component ref.
1369
+ * @return React element.
1370
+ */
1371
+ declare const Lightbox: Comp<LightboxProps, HTMLDivElement>;
1372
+
1373
+ declare type HTMLAnchorProps = React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
1374
+ /**
1375
+ * Defines the props of the component.
1376
+ */
1377
+ interface LinkProps extends GenericProps {
1378
+ /** Color variant. */
1379
+ color?: Color;
1380
+ /** Lightened or darkened variant of the selected icon color. */
1381
+ colorVariant?: ColorVariant;
1382
+ /** Link href. */
1383
+ href?: HTMLAnchorProps['href'];
1384
+ /** Whether the component is disabled or not. */
1385
+ isDisabled?: boolean;
1386
+ /** Left icon (SVG path). */
1387
+ leftIcon?: string;
1388
+ /** Custom react component for the link (can be used to inject react router Link). */
1389
+ linkAs?: 'a' | any;
1390
+ /** Right icon (SVG path). */
1391
+ rightIcon?: string;
1392
+ /** Link target. */
1393
+ target?: HTMLAnchorProps['target'];
1394
+ /** Typography variant. */
1395
+ typography?: Typography;
1396
+ }
1397
+ /**
1398
+ * Link component.
1399
+ *
1400
+ * @param props Component props.
1401
+ * @param ref Component ref.
1402
+ * @return React element.
1403
+ */
1404
+ declare const Link: Comp<LinkProps, HTMLAnchorElement | HTMLButtonElement>;
1405
+
1406
+ /**
1407
+ * Defines the props of the component.
1408
+ */
1409
+ interface LinkPreviewProps extends GenericProps, HasTheme {
1410
+ /** Description. */
1411
+ description?: string;
1412
+ /** Link URL. */
1413
+ link: string;
1414
+ /** Custom react component for the link (can be used to inject react router Link). */
1415
+ linkAs?: 'a' | any;
1416
+ /** Props to pass to the link (minus those already set by the LinkPreview props). */
1417
+ linkProps?: Omit<LinkProps, 'color' | 'colorVariant' | 'href' | 'target'>;
1418
+ /** Size variant. */
1419
+ size?: Extract<Size, 'regular' | 'big'>;
1420
+ /** Thumbnail for the link preview. */
1421
+ thumbnailProps?: ThumbnailProps;
1422
+ /** Title. */
1423
+ title?: string;
1424
+ /** Customize the title heading tag. */
1425
+ titleHeading?: HeadingElement;
1426
+ }
1427
+ /**
1428
+ * LinkPreview component.
1429
+ *
1430
+ * @param props Component props.
1431
+ * @param ref Component ref.
1432
+ * @return React element.
1433
+ */
1434
+ declare const LinkPreview: Comp<LinkPreviewProps, HTMLDivElement>;
1435
+
1436
+ declare type Listener = (evt: KeyboardEvent) => void;
1437
+ interface UseKeyboardListNavigationType {
1438
+ /** the current active index */
1439
+ activeItemIndex: number;
1440
+ /** callback to be used when a key is pressed. usually used with the native prop `onKeyDown` */
1441
+ onKeyboardNavigation: Listener;
1442
+ /** Resets the active index to the initial state */
1443
+ resetActiveIndex(): void;
1444
+ /** Sets the active index to a given value */
1445
+ setActiveItemIndex(value: SetStateAction<number>): void;
1446
+ }
1447
+ declare type useKeyboardListNavigationType = <I>(items: I[], ref: RefObject<HTMLElement>, onListItemSelected: (itemSelected: I) => void, onListItemNavigated?: (itemSelected: I) => void, onEnterPressed?: (itemSelected: string) => void, onBackspacePressed?: Listener, keepFocusAfterSelection?: boolean, initialIndex?: number, preventTabOnEnteredValue?: boolean) => UseKeyboardListNavigationType;
1448
+
1449
+ /**
1450
+ * Defines the props of the component.
1451
+ */
1452
+ interface ListProps extends GenericProps {
1453
+ /** List content (should be ListItem, ListSubheader or ListDivider). */
1454
+ children: ReactNode;
1455
+ /**
1456
+ * Whether the list items are clickable.
1457
+ * @deprecated not needed anymore.
1458
+ */
1459
+ isClickable?: boolean;
1460
+ /** Item padding size. */
1461
+ itemPadding?: Extract<Size, 'big' | 'huge'>;
1462
+ /** Tab index of the list. Default to -1 */
1463
+ tabIndex?: number;
1464
+ /**
1465
+ * On list item selected callback.
1466
+ *
1467
+ * @param key React key of the selected item.
1468
+ * @param index Index of the selected item among the sibling items.
1469
+ * @param evt Source event (either mouse or keyboard event).
1470
+ */
1471
+ onListItemSelected?(key: Key, index: number, evt: SyntheticEvent): void;
1472
+ }
1473
+ declare const List: Comp<ListProps, HTMLUListElement> & {
1474
+ useKeyboardListNavigation: useKeyboardListNavigationType;
1475
+ };
1476
+
1477
+ declare type ListItemSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
1478
+ /**
1479
+ * Defines the props of the component.
1480
+ */
1481
+ interface ListItemProps extends GenericProps {
1482
+ /** A component to be rendered after the content. */
1483
+ after?: ReactNode;
1484
+ /** A component to be rendered before the content. */
1485
+ before?: ReactNode;
1486
+ /** Content. */
1487
+ children: string | ReactNode;
1488
+ /** Whether the list item should be highlighted or not. */
1489
+ isHighlighted?: boolean;
1490
+ /** Whether the component is selected or not. */
1491
+ isSelected?: boolean;
1492
+ /** Whether link/button is disabled or not. */
1493
+ isDisabled?: boolean;
1494
+ /** Reference to the <li> element. */
1495
+ listItemRef?: Ref<HTMLLIElement>;
1496
+ /** Custom react component for the link (can be used to inject react router Link). */
1497
+ linkAs?: 'a' | any;
1498
+ /** Props that will be passed on to the Link */
1499
+ linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
1500
+ /** Reference to the link element. */
1501
+ linkRef?: Ref<HTMLAnchorElement>;
1502
+ /** Size variant. */
1503
+ size?: ListItemSize;
1504
+ /** On selected callback. */
1505
+ onItemSelected?(evt: SyntheticEvent): void;
1506
+ }
1507
+ /**
1508
+ * Check if the list item is clickable.
1509
+ * @return `true` if the list item is clickable; `false` otherwise.
1510
+ */
1511
+ declare function isClickable({ linkProps, onItemSelected }: Partial<ListItemProps>): boolean;
1512
+ /**
1513
+ * ListItem component.
1514
+ *
1515
+ * @param props Component props.
1516
+ * @param ref Component ref.
1517
+ * @return React element.
1518
+ */
1519
+ declare const ListItem: Comp<ListItemProps, HTMLLIElement>;
1520
+
1521
+ /**
1522
+ * Defines the props of the component.
1523
+ */
1524
+ declare type ListDividerProps = GenericProps;
1525
+ /**
1526
+ * ListDivider component.
1527
+ *
1528
+ * @param props Component props.
1529
+ * @param ref Component ref.
1530
+ * @return React element.
1531
+ */
1532
+ declare const ListDivider: Comp<ListDividerProps, HTMLLIElement>;
1533
+
1534
+ /**
1535
+ * Defines the props of the component.
1536
+ */
1537
+ interface ListSubheaderProps extends GenericProps {
1538
+ /** Content. */
1539
+ children: string | ReactNode;
1540
+ }
1541
+ /**
1542
+ * ListSubheader component.
1543
+ *
1544
+ * @param props Component props.
1545
+ * @param ref Component ref.
1546
+ * @return React element.
1547
+ */
1548
+ declare const ListSubheader: Comp<ListSubheaderProps, HTMLLIElement>;
1549
+
1550
+ /**
1551
+ * Defines the props of the component.
1552
+ */
1553
+ interface MessageProps extends GenericProps {
1554
+ /** Content. */
1555
+ children?: ReactNode;
1556
+ /** Whether the message has a background or not. */
1557
+ hasBackground?: boolean;
1558
+ /** Message variant. */
1559
+ kind?: Kind;
1560
+ /** Message custom icon SVG path. */
1561
+ icon?: string;
1562
+ }
1563
+ /**
1564
+ * Message component.
1565
+ *
1566
+ * @param props Component props.
1567
+ * @param ref Component ref.
1568
+ * @return React element.
1569
+ */
1570
+ declare const Message: Comp<MessageProps, HTMLDivElement>;
1571
+
1572
+ /**
1573
+ * Defines the props of the component.
1574
+ */
1575
+ interface MosaicProps extends GenericProps, HasTheme {
1576
+ /** Thumbnails. */
1577
+ thumbnails: ThumbnailProps[];
1578
+ /** On image click callback. */
1579
+ onImageClick?(index: number): void;
1580
+ }
1581
+ /**
1582
+ * Mosaic component.
1583
+ *
1584
+ * @param props Component props.
1585
+ * @param ref Component ref.
1586
+ * @return React element.
1587
+ */
1588
+ declare const Mosaic: Comp<MosaicProps, HTMLDivElement>;
1589
+
1590
+ /**
1591
+ * Defines the props of the component.
1592
+ */
1593
+ interface NotificationProps extends GenericProps, HasTheme {
1594
+ /** Action button label. */
1595
+ actionLabel?: string;
1596
+ /** Content. */
1597
+ content?: React.ReactNode;
1598
+ /** Whether the component is open or not. */
1599
+ isOpen?: boolean;
1600
+ /** Notification type. */
1601
+ type?: Kind;
1602
+ /** Z-axis position. */
1603
+ zIndex?: number;
1604
+ /** On action button click callback. */
1605
+ onActionClick?(): void;
1606
+ /** On click callback. */
1607
+ onClick?(): void;
1608
+ }
1609
+ /**
1610
+ * Notification component.
1611
+ *
1612
+ * @param props Component props.
1613
+ * @param ref Component ref.
1614
+ * @return React element.
1615
+ */
1616
+ declare const Notification: Comp<NotificationProps, HTMLDivElement>;
1617
+
1618
+ /**
1619
+ * Defines the props of the component.
1620
+ */
1621
+ interface PostBlockProps extends GenericProps, HasTheme {
1622
+ /** Action toolbar content. */
1623
+ actions?: ReactNode;
1624
+ /** Attachment content. */
1625
+ attachments?: ReactNode;
1626
+ /** Author content. */
1627
+ author?: ReactNode;
1628
+ /** Metadata content. */
1629
+ meta?: ReactNode;
1630
+ /** Orientation. */
1631
+ orientation?: Orientation;
1632
+ /** Tag content. */
1633
+ tags?: ReactNode;
1634
+ /** Content (string, or sanitized html). */
1635
+ text?: string | {
1636
+ __html: string;
1637
+ };
1638
+ /** Thumbnail. */
1639
+ thumbnailProps?: ThumbnailProps;
1640
+ /** Title. */
1641
+ title: string;
1642
+ /** On click callback. */
1643
+ onClick?(): void;
1644
+ }
1645
+ /**
1646
+ * PostBlock component.
1647
+ *
1648
+ * @param props Component props.
1649
+ * @param ref Component ref.
1650
+ * @return React element.
1651
+ */
1652
+ declare const PostBlock: Comp<PostBlockProps, HTMLDivElement>;
1653
+
1654
+ /**
1655
+ * Progress variants.
1656
+ */
1657
+ declare const ProgressVariant: {
1658
+ readonly linear: "linear";
1659
+ readonly circular: "circular";
1660
+ };
1661
+ declare type ProgressVariant = ValueOf<typeof ProgressVariant>;
1662
+ /**
1663
+ * Defines the props of the component.
1664
+ */
1665
+ interface ProgressProps extends GenericProps, HasTheme {
1666
+ /** Progress variant. */
1667
+ variant?: ProgressVariant;
1668
+ }
1669
+ /**
1670
+ * Progress component.
1671
+ *
1672
+ * @param props Component props.
1673
+ * @param ref Component ref.
1674
+ * @return React element.
1675
+ */
1676
+ declare const Progress: Comp<ProgressProps, HTMLDivElement>;
1677
+
1678
+ interface ProgressTrackerProviderProps {
1679
+ /** Active step index. */
1680
+ activeStepIndex?: number;
1681
+ /** ProgressTrackerProvider children. */
1682
+ children: ReactNode;
1683
+ /** Step panel children should not render if the step panel is hidden. */
1684
+ isLazy?: boolean;
1685
+ /** Activate tabs on focus. */
1686
+ shouldActivateOnFocus?: boolean;
1687
+ /** Step change callback. */
1688
+ onChange?(index: number): void;
1689
+ }
1690
+ /**
1691
+ * This component provides a context in which steps can be defined and linked to their step panel.
1692
+ *
1693
+ * It does not produce any markup so you can wrap it around any React elements and then split the ProgressTracker and ProgressTrackerPanel
1694
+ * components in the react tree.
1695
+ *
1696
+ * This works exactly as TabProvider so it uses TabProviderContext and tabs state.
1697
+ *
1698
+ * @param props React component props.
1699
+ * @return React element.
1700
+ */
1701
+ declare const ProgressTrackerProvider: React.FC<ProgressTrackerProviderProps>;
1702
+
1703
+ /**
1704
+ * Defines the props of the component.
1705
+ */
1706
+ interface ProgressTrackerProps extends GenericProps {
1707
+ /** ARIA label (purpose of the set of steps). */
1708
+ ['aria-label']: string;
1709
+ /** Step list. */
1710
+ children: ReactNode;
1711
+ }
1712
+ /**
1713
+ * ProgressTracker component.
1714
+ *
1715
+ * Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
1716
+ *
1717
+ * @param props Component props.
1718
+ * @param ref Component ref.
1719
+ * @return React element.
1720
+ */
1721
+ declare const ProgressTracker: Comp<ProgressTrackerProps, HTMLDivElement>;
1722
+
1723
+ /**
1724
+ * Defines the props of the component.
1725
+ */
1726
+ interface ProgressTrackerStepProps extends GenericProps {
1727
+ /** Children are not supported. */
1728
+ children?: never;
1729
+ /** Whether the step should be in error state or not. */
1730
+ hasError?: boolean;
1731
+ /** Helper text. */
1732
+ helper?: string | null;
1733
+ /** Native id property. */
1734
+ id?: string;
1735
+ /** Whether the current step is active or not. */
1736
+ isActive?: boolean;
1737
+ /** Whether the current step is completed or not. */
1738
+ isComplete?: boolean;
1739
+ /** Whether the component is disabled or not. */
1740
+ isDisabled?: boolean;
1741
+ /** Label text. */
1742
+ label?: string | null;
1743
+ }
1744
+ /**
1745
+ * ProgressTrackerStep component.
1746
+ *
1747
+ * Implements WAI-ARIA `tab` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
1748
+ *
1749
+ * @param props Component props.
1750
+ * @param ref Component ref.
1751
+ * @return React element.
1752
+ */
1753
+ declare const ProgressTrackerStep: Comp<ProgressTrackerStepProps, HTMLButtonElement>;
1754
+
1755
+ /**
1756
+ * Defines the props of the component.
1757
+ */
1758
+ interface ProgressTrackerStepPanelProps extends GenericProps {
1759
+ /** Native id property. */
1760
+ id?: string;
1761
+ /** Whether the step is active or not. */
1762
+ isActive?: boolean;
1763
+ }
1764
+ /**
1765
+ * ProgressTrackerStepPanel component.
1766
+ *
1767
+ * Implements WAI-ARIA `tabpanel` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
1768
+ *
1769
+ * @param props Component props.
1770
+ * @param ref Component ref.
1771
+ * @return React element.
1772
+ */
1773
+ declare const ProgressTrackerStepPanel: Comp<ProgressTrackerStepPanelProps, HTMLDivElement>;
1774
+
1775
+ /**
1776
+ * Defines the props of the component.
1777
+ */
1778
+ interface RadioButtonProps extends GenericProps, HasTheme {
1779
+ /** Helper text. */
1780
+ helper?: string;
1781
+ /** Native input id property. */
1782
+ id?: string;
1783
+ /** Native input ref. */
1784
+ inputRef?: React.Ref<HTMLInputElement>;
1785
+ /** Whether it is checked or not. */
1786
+ isChecked?: boolean;
1787
+ /** Whether the component is disabled or not. */
1788
+ isDisabled?: boolean;
1789
+ /** Label content. */
1790
+ label?: ReactNode;
1791
+ /** Native input name property. */
1792
+ name?: string;
1793
+ /** Native input value property. */
1794
+ value?: string;
1795
+ /** On change callback. */
1796
+ onChange?(value?: string, name?: string, event?: SyntheticEvent): void;
1797
+ }
1798
+ /**
1799
+ * RadioButton component.
1800
+ *
1801
+ * @param props Component props.
1802
+ * @param ref Component ref.
1803
+ * @return React element.
1804
+ */
1805
+ declare const RadioButton: Comp<RadioButtonProps, HTMLDivElement>;
1806
+
1807
+ /**
1808
+ * Defines the props of the component.
1809
+ */
1810
+ interface RadioGroupProps extends GenericProps {
1811
+ /** RadioButton elements */
1812
+ children: ReactNode;
1813
+ }
1814
+ /**
1815
+ * RadioGroup component.
1816
+ *
1817
+ * @param props Component props.
1818
+ * @param ref Component ref.
1819
+ * @return React element.
1820
+ */
1821
+ declare const RadioGroup: Comp<RadioGroupProps, HTMLDivElement>;
1822
+
1823
+ /**
1824
+ * Select variants.
1825
+ */
1826
+ declare const SelectVariant: {
1827
+ readonly input: "input";
1828
+ readonly chip: "chip";
1829
+ };
1830
+ declare type SelectVariant = ValueOf<typeof SelectVariant>;
1831
+ interface CoreSelectProps extends GenericProps, HasTheme {
1832
+ /** Props to pass to the clear button (minus those already set by the Select props). If not specified, the button won't be displayed. */
1833
+ clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
1834
+ /** Whether the select (input variant) is displayed with error style or not. */
1835
+ hasError?: boolean;
1836
+ /** Error message. */
1837
+ error?: string | ReactNode;
1838
+ /** Helper text. */
1839
+ helper?: string;
1840
+ /** Whether the select should close on click. */
1841
+ closeOnClick?: boolean;
1842
+ /** Icon (SVG path). */
1843
+ icon?: string;
1844
+ /** Whether the component is disabled or not. */
1845
+ isDisabled?: boolean;
1846
+ /** Whether the component is required or not. */
1847
+ isRequired?: boolean;
1848
+ /** Whether the component is open or not. */
1849
+ isOpen?: boolean;
1850
+ /** Whether the select (input variant) is displayed with valid style or not. */
1851
+ isValid?: boolean;
1852
+ /** Label text. */
1853
+ label?: string;
1854
+ /** Placeholder input text. */
1855
+ placeholder?: string;
1856
+ /** Select variant. */
1857
+ variant?: SelectVariant;
1858
+ /** On clear callback. */
1859
+ onClear?(event: SyntheticEvent, value?: string): void;
1860
+ /** On blur callback. */
1861
+ onBlur?(): void;
1862
+ /** On filter text change callback (with 500ms debounce). */
1863
+ onFilter?(): void;
1864
+ /** On input click callback (can be used for dropdown toggle). */
1865
+ onInputClick?(): void;
1866
+ /** On dropdown close callback. */
1867
+ onDropdownClose?(): void;
1868
+ /** On scroll end callback. */
1869
+ onInfiniteScroll?(): void;
1870
+ /** Render value function. Default: Renders the value as a string. */
1871
+ selectedValueRender?(choice: string): ReactNode | string;
1872
+ }
1873
+
1874
+ /** Defines the props of the component. */
1875
+ interface SelectProps extends CoreSelectProps {
1876
+ /** Selected value. */
1877
+ value: string;
1878
+ }
1879
+
1880
+ /**
1881
+ * Select component.
1882
+ *
1883
+ * @param props Component props.
1884
+ * @param ref Component ref.
1885
+ * @return React element.
1886
+ */
1887
+ declare const Select: Comp<SelectProps, HTMLDivElement>;
1888
+
1889
+ /** Defines the props of the component. */
1890
+ interface SelectMultipleProps extends CoreSelectProps {
1891
+ /** Selected values. */
1892
+ value: string[];
1893
+ /** Selected value render function. Default: Renders the value inside of a Chip. */
1894
+ selectedChipRender?(choice: string, index: number, onClear?: (event: SyntheticEvent, choice: string) => void, isDisabled?: boolean, theme?: any): ReactNode | string;
1895
+ }
1896
+ declare const SelectMultipleField: React.FC<SelectMultipleProps>;
1897
+ /**
1898
+ * SelectMultiple component.
1899
+ *
1900
+ * @param props Component props.
1901
+ * @param ref Component ref.
1902
+ * @return React element.
1903
+ */
1904
+ declare const SelectMultiple: Comp<SelectMultipleProps, HTMLDivElement>;
1905
+
1906
+ /**
1907
+ * Defines the props of the component.
1908
+ */
1909
+ interface SideNavigationProps extends GenericProps, HasTheme {
1910
+ /** SideNavigationItem elements. */
1911
+ children: ReactNode;
1912
+ }
1913
+ /**
1914
+ * SideNavigation component.
1915
+ *
1916
+ * @param props Component props.
1917
+ * @param ref Component ref.
1918
+ * @return React element.
1919
+ */
1920
+ declare const SideNavigation: Comp<SideNavigationProps, HTMLUListElement>;
1921
+
1922
+ /**
1923
+ * Defines the props of the component.
1924
+ */
1925
+ interface SideNavigationItemProps extends GenericProps {
1926
+ /** SideNavigationItem elements. */
1927
+ children?: ReactNode;
1928
+ /** Emphasis variant. */
1929
+ emphasis?: Emphasis;
1930
+ /** Label content. */
1931
+ label: string | ReactNode;
1932
+ /** Icon (SVG path). */
1933
+ icon?: string;
1934
+ /** Whether the component is open or not. */
1935
+ isOpen?: boolean;
1936
+ /** Whether the component is selected or not. */
1937
+ isSelected?: boolean;
1938
+ /** Custom react component for the link (can be used to inject react router Link). */
1939
+ linkAs?: 'a' | any;
1940
+ /** Props to pass to the link (minus those already set by the SideNavigationItem props). */
1941
+ linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
1942
+ /** Props to pass to the toggle button (minus those already set by the SideNavigationItem props). */
1943
+ toggleButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color' | 'size'>;
1944
+ /**
1945
+ * Choose how the children are hidden when closed
1946
+ * ('hide' keeps the children in DOM but hide them, 'unmount' remove the children from the DOM).
1947
+ */
1948
+ closeMode?: 'hide' | 'unmount';
1949
+ /** On action button click callback. */
1950
+ onActionClick?(evt: React.MouseEvent): void;
1951
+ /** On click callback. */
1952
+ onClick?(evt: React.MouseEvent): void;
1953
+ }
1954
+ /**
1955
+ * SideNavigationItem component.
1956
+ *
1957
+ * @param props Component props.
1958
+ * @param ref Component ref.
1959
+ * @return React element.
1960
+ */
1961
+ declare const SideNavigationItem: Comp<SideNavigationItemProps, HTMLLIElement>;
1962
+
1963
+ /**
1964
+ * Defines the props of the component.
1965
+ */
1966
+ interface SkeletonCircleProps extends GenericProps, HasTheme {
1967
+ /** Size variant. */
1968
+ size: GlobalSize;
1969
+ /** The color of the skeleton. */
1970
+ color?: ColorPalette;
1971
+ }
1972
+ /**
1973
+ * SkeletonCircle component.
1974
+ *
1975
+ * @param props Component props.
1976
+ * @param ref Component ref.
1977
+ * @return React element.
1978
+ */
1979
+ declare const SkeletonCircle: Comp<SkeletonCircleProps, HTMLDivElement>;
1980
+
1981
+ /**
1982
+ * Skeleton variants.
1983
+ */
1984
+ declare const SkeletonRectangleVariant: {
1985
+ readonly squared: "squared";
1986
+ readonly rounded: "rounded";
1987
+ readonly pill: "pill";
1988
+ };
1989
+ declare type SkeletonRectangleVariant = ValueOf<typeof SkeletonRectangleVariant>;
1990
+ /**
1991
+ * Defines the props of the component.
1992
+ */
1993
+ interface SkeletonRectangleProps extends GenericProps, HasTheme {
1994
+ /** Aspect ratio (use with width and not height). */
1995
+ aspectRatio?: Extract<AspectRatio, 'square' | 'horizontal' | 'vertical' | 'wide'>;
1996
+ /** Height size. */
1997
+ height?: GlobalSize;
1998
+ /** Border variant. */
1999
+ variant?: SkeletonRectangleVariant;
2000
+ /** Width size. */
2001
+ width?: GlobalSize;
2002
+ /** The color of the skeleton. */
2003
+ color?: ColorPalette;
2004
+ }
2005
+ /**
2006
+ * SkeletonRectangle component.
2007
+ *
2008
+ * @param props Component props.
2009
+ * @param ref Component ref.
2010
+ * @return React element.
2011
+ */
2012
+ declare const SkeletonRectangle: Comp<SkeletonRectangleProps, HTMLDivElement>;
2013
+
2014
+ /**
2015
+ * Defines the props of the component.
2016
+ */
2017
+ interface SkeletonTypographyProps extends GenericProps, HasTheme {
2018
+ /** Typography variant. */
2019
+ typography: TypographyInterface;
2020
+ /** Width CSS property. */
2021
+ width?: CSSProperties['width'];
2022
+ /** The color of the skeleton. */
2023
+ color?: ColorPalette;
2024
+ }
2025
+ /**
2026
+ * SkeletonTypography component.
2027
+ *
2028
+ * @param props Component props.
2029
+ * @param ref Component ref.
2030
+ * @return React element.
2031
+ */
2032
+ declare const SkeletonTypography: Comp<SkeletonTypographyProps, HTMLDivElement>;
2033
+
2034
+ /**
2035
+ * Defines the props of the component.
2036
+ */
2037
+ interface SliderProps extends GenericProps, HasTheme {
2038
+ /** Helper text. */
2039
+ helper?: string;
2040
+ /** Whether the min and max labels should be hidden or not. */
2041
+ hideMinMaxLabel?: boolean;
2042
+ /** Whether the component is disabled or not. */
2043
+ isDisabled?: boolean;
2044
+ /** Label text. */
2045
+ label?: string;
2046
+ /** Maximum value on the range. */
2047
+ max: number;
2048
+ /** Minimum value of the range. */
2049
+ min: number;
2050
+ /** Native input name property. */
2051
+ name?: string;
2052
+ /** Number of digits in the fractional part of the selected value. */
2053
+ precision?: number;
2054
+ /** Range step value. */
2055
+ steps?: number;
2056
+ /** Selected ranged value. */
2057
+ value: number;
2058
+ /** On change callback. */
2059
+ onChange(value: number, name?: string, event?: SyntheticEvent): void;
2060
+ /** On click callback. */
2061
+ onMouseDown?(event: React.SyntheticEvent): void;
2062
+ }
2063
+ /**
2064
+ * Slider component.
2065
+ *
2066
+ * @param props Component props.
2067
+ * @param ref Component ref.
2068
+ * @return React element.
2069
+ */
2070
+ declare const Slider: Comp<SliderProps, HTMLDivElement>;
2071
+
2072
+ /**
2073
+ * Clamp value in range.
2074
+ *
2075
+ * @param value Value to clamp.
2076
+ * @param min Minimum value.
2077
+ * @param max Maximum value.
2078
+ * @return Clamped value.
2079
+ */
2080
+ declare const clamp: (value: number, min: number, max: number) => number;
2081
+
2082
+ /**
2083
+ * Defines the props of the component.
2084
+ */
2085
+ interface SlideshowProps extends GenericProps, Pick<SlidesProps, 'autoPlay' | 'slidesId' | 'id' | 'theme' | 'fillHeight' | 'groupBy' | 'slideGroupLabel'> {
2086
+ /** current slide active */
2087
+ activeIndex?: SlidesProps['activeIndex'];
2088
+ /** Interval between each slide when automatic rotation is enabled. */
2089
+ interval?: number;
2090
+ /** Props to pass to the slideshow controls (minus those already set by the Slideshow props). */
2091
+ slideshowControlsProps?: Pick<SlideshowControlsProps, 'nextButtonProps' | 'previousButtonProps' | 'paginationItemProps'> & Omit<SlideshowControlsProps, 'activeIndex' | 'onPaginationClick' | 'onNextClick' | 'onPreviousClick' | 'slidesCount' | 'parentRef' | 'theme'>;
2092
+ /** Callback when slide changes */
2093
+ onChange?(index: number): void;
2094
+ }
2095
+ /**
2096
+ * Slideshow component.
2097
+ *
2098
+ * @param props Component props.
2099
+ * @param ref Component ref.
2100
+ * @return React element.
2101
+ */
2102
+ declare const Slideshow: Comp<SlideshowProps, HTMLDivElement>;
2103
+
2104
+ /**
2105
+ * Defines the props of the component.
2106
+ */
2107
+ interface SlideshowItemProps extends GenericProps {
2108
+ /** interval in which slides are automatically shown */
2109
+ interval?: number;
2110
+ }
2111
+ /**
2112
+ * SlideshowItem component.
2113
+ *
2114
+ * @param props Component props.
2115
+ * @param ref Component ref.
2116
+ * @return React element.
2117
+ */
2118
+ declare const SlideshowItem: Comp<SlideshowItemProps, HTMLDivElement>;
2119
+
2120
+ interface UseSlideshowControlsOptions {
2121
+ /** default active index to be displayed */
2122
+ defaultActiveIndex?: number;
2123
+ /** total slides to display */
2124
+ itemsCount: number;
2125
+ /** Index of the current slide. */
2126
+ activeIndex?: number;
2127
+ /** Whether the automatic rotation of the slideshow is enabled or not. */
2128
+ autoPlay?: boolean;
2129
+ /** Whether the image has to fill its container height or not. */
2130
+ fillHeight?: boolean;
2131
+ /** Number of slides to group together. */
2132
+ groupBy?: number;
2133
+ /** Interval between each slide when automatic rotation is enabled. */
2134
+ interval?: number;
2135
+ /** Callback when slide changes */
2136
+ onChange?(index: number): void;
2137
+ /** slideshow HTML id attribute */
2138
+ id?: string;
2139
+ /** slides wrapper HTML id attribute */
2140
+ slidesId?: string;
2141
+ }
2142
+ interface UseSlideshowControls {
2143
+ /** Index for the first visible slide, should be used when groupBy is passed in */
2144
+ startIndexVisible: number;
2145
+ /** Index for the last visible slide, should be used when groupBy is passed in */
2146
+ endIndexVisible: number;
2147
+ /** total slides to be displayed */
2148
+ slidesCount: number;
2149
+ /** callback to set */
2150
+ setSlideshow: (element: HTMLDivElement | null) => void;
2151
+ /** reference to the slideshow element */
2152
+ slideshow: HTMLDivElement | null;
2153
+ /** id to be used for the slideshow */
2154
+ slideshowId: string;
2155
+ /** id to be used for the wrapper that contains the slides */
2156
+ slideshowSlidesId: string;
2157
+ /** callback that triggers the previous slide while using the slideshow controls */
2158
+ onPreviousClick: (loopback: boolean) => void;
2159
+ /** callback that triggers the next slide while using the slideshow controls */
2160
+ onNextClick: (loopback: boolean) => void;
2161
+ /** callback that triggers a specific page while using the slideshow controls */
2162
+ onPaginationClick: (index: number) => void;
2163
+ /** whether the slideshow is autoplaying or not */
2164
+ isAutoPlaying: boolean;
2165
+ /** whether the slideshow was force paused or not */
2166
+ isForcePaused: boolean;
2167
+ /** callback to change whether the slideshow is autoplaying or not */
2168
+ toggleAutoPlay: () => void;
2169
+ /** calback to change whether the slideshow should be force paused or not */
2170
+ toggleForcePause: () => void;
2171
+ /** current active slide index */
2172
+ activeIndex: number;
2173
+ /** set the current index as the active one */
2174
+ setActiveIndex: (index: number) => void;
2175
+ /** callback that stops the auto play */
2176
+ stopAutoPlay: () => void;
2177
+ /** callback that starts the auto play */
2178
+ startAutoPlay: () => void;
2179
+ }
2180
+
2181
+ /**
2182
+ * Defines the props of the component.
2183
+ */
2184
+ interface SlideshowControlsProps extends GenericProps, HasTheme {
2185
+ /** Index of the current slide. */
2186
+ activeIndex?: number;
2187
+ /** Props to pass to the next button (minus those already set by the SlideshowControls props). */
2188
+ nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
2189
+ /** Reference to the parent element on which we want to listen touch swipe. */
2190
+ parentRef?: RefObject<HTMLDivElement> | HTMLDivElement | null;
2191
+ /** Props to pass to the previous button (minus those already set by the SlideshowControls props). */
2192
+ previousButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
2193
+ /** Props to pass to the pagination wrapper */
2194
+ paginationProps?: Omit<React.HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'role'>;
2195
+ /** Number of slides. */
2196
+ slidesCount: number;
2197
+ /** On next button click callback. */
2198
+ onNextClick?(loopback?: boolean): void;
2199
+ /** On pagination change callback. */
2200
+ onPaginationClick?(index: number): void;
2201
+ /** On previous button click callback. */
2202
+ onPreviousClick?(loopback?: boolean): void;
2203
+ /** whether the slideshow is currently playing */
2204
+ isAutoPlaying?: boolean;
2205
+ /**
2206
+ * function to be executed in order to retrieve the label for the pagination item
2207
+ * @deprecated Use paginationItemProps instead.
2208
+ * */
2209
+ paginationItemLabel?: (index: number) => string;
2210
+ /**
2211
+ * function to be executed in order to retrieve the props for a pagination item.
2212
+ */
2213
+ paginationItemProps?: (itemIndex: number) => React.HTMLAttributes<HTMLButtonElement> & {
2214
+ label?: string;
2215
+ };
2216
+ /** Props to pass to the lay button (minus those already set by the SlideshowControls props). */
2217
+ playButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
2218
+ }
2219
+ declare const SlideshowControls: Comp<SlideshowControlsProps, HTMLDivElement> & {
2220
+ useSlideshowControls: ({ activeIndex, groupBy, interval, autoPlay, defaultActiveIndex, onChange, itemsCount, id, slidesId, }: UseSlideshowControlsOptions) => UseSlideshowControls;
2221
+ useSlideshowControlsDefaultOptions: Partial<UseSlideshowControlsOptions>;
2222
+ };
2223
+
2224
+ interface SlidesProps extends GenericProps, HasTheme {
2225
+ /** current slide active */
2226
+ activeIndex: number;
2227
+ /** slides id to be added to the wrapper */
2228
+ id?: string;
2229
+ /** Whether the automatic rotation of the slideshow is enabled or not. */
2230
+ autoPlay?: boolean;
2231
+ /** Whether the image has to fill its container height or not. */
2232
+ fillHeight?: boolean;
2233
+ /** Number of slides to group together. */
2234
+ groupBy?: number;
2235
+ /** whether the slides are currently playing or not */
2236
+ isAutoPlaying?: boolean;
2237
+ /** id to be passed in into the slides */
2238
+ slidesId?: string;
2239
+ /** callback to change whether the slideshow is playing or not */
2240
+ toggleAutoPlay: () => void;
2241
+ /** component to be rendered after the slides */
2242
+ afterSlides?: React.ReactNode;
2243
+ /** Whether the slides have controls linked */
2244
+ hasControls?: boolean;
2245
+ /**
2246
+ * Accessible label to set on a slide group.
2247
+ * Receives the group position starting from 1 and the total number of groups.
2248
+ * */
2249
+ slideGroupLabel?: (groupPosition: number, groupTotal: number) => string;
2250
+ }
2251
+ /**
2252
+ * Slides component.
2253
+ *
2254
+ * @param props Component props.
2255
+ * @param ref Component ref.
2256
+ * @return React element.
2257
+ */
2258
+ declare const Slides: Comp<SlidesProps, HTMLDivElement>;
2259
+
2260
+ /**
2261
+ * Defines the props of the component.
2262
+ */
2263
+ interface SwitchProps extends GenericProps, HasTheme {
2264
+ /** Helper text. */
2265
+ helper?: string;
2266
+ /** Whether it is checked or not. */
2267
+ isChecked?: boolean;
2268
+ /** Whether the component is disabled or not. */
2269
+ isDisabled?: boolean;
2270
+ /** Native input name property. */
2271
+ name?: string;
2272
+ /** Position of the switch relative to the label. */
2273
+ position?: Extract<Alignment, 'right' | 'left'>;
2274
+ /** Native input value property. */
2275
+ value?: string;
2276
+ /** On change callback. */
2277
+ onChange?(isChecked: boolean, value?: string, name?: string, event?: SyntheticEvent): void;
2278
+ /** optional props for input */
2279
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
2280
+ }
2281
+ /**
2282
+ * Switch component.
2283
+ *
2284
+ * @param props Component props.
2285
+ * @param ref Component ref.
2286
+ * @return React element.
2287
+ */
2288
+ declare const Switch: Comp<SwitchProps, HTMLDivElement>;
2289
+
2290
+ /**
2291
+ * Defines the props of the component.
2292
+ */
2293
+ interface TableProps extends GenericProps, HasTheme {
2294
+ /** Whether the table has checkbox or thumbnail on first cell or not. */
2295
+ hasBefore?: boolean;
2296
+ /** Whether the table has dividers or not. */
2297
+ hasDividers?: boolean;
2298
+ }
2299
+ /**
2300
+ * Table component.
2301
+ *
2302
+ * @param props Component props.
2303
+ * @param ref Component ref.
2304
+ * @return React element.
2305
+ */
2306
+ declare const Table: Comp<TableProps, HTMLTableElement>;
2307
+
2308
+ /**
2309
+ * Defines the props of the component.
2310
+ */
2311
+ declare type TableBodyProps = GenericProps;
2312
+ /**
2313
+ * TableBody component.
2314
+ *
2315
+ * @param props Component props.
2316
+ * @param ref Component ref.
2317
+ * @return React element.
2318
+ */
2319
+ declare const TableBody: Comp<TableBodyProps, HTMLTableSectionElement>;
2320
+
2321
+ /**
2322
+ * Table head cell sort order.
2323
+ */
2324
+ declare const ThOrder: {
2325
+ readonly asc: "asc";
2326
+ readonly desc: "desc";
2327
+ };
2328
+ declare type ThOrder = ValueOf<typeof ThOrder>;
2329
+ /**
2330
+ * Table cell variants.
2331
+ */
2332
+ declare const TableCellVariant: {
2333
+ readonly body: "body";
2334
+ readonly head: "head";
2335
+ };
2336
+ declare type TableCellVariant = ValueOf<typeof TableCellVariant>;
2337
+ /**
2338
+ * Defines the props of the component.
2339
+ */
2340
+ interface TableCellProps extends GenericProps {
2341
+ /** Icon (SVG path).(thead only). */
2342
+ icon?: string;
2343
+ /** Whether the column is sortable or not (thead only). */
2344
+ isSortable?: boolean;
2345
+ /** Sort order displayed as icon (sortable thead only). */
2346
+ sortOrder?: ThOrder;
2347
+ /** Variant. */
2348
+ variant?: TableCellVariant;
2349
+ /** On header cell click callback. */
2350
+ onHeaderClick?(): void;
2351
+ }
2352
+ /**
2353
+ * TableCell component.
2354
+ *
2355
+ * @param props Component props.
2356
+ * @param ref Component ref.
2357
+ * @return React element.
2358
+ */
2359
+ declare const TableCell: Comp<TableCellProps, HTMLTableCellElement>;
2360
+
2361
+ /**
2362
+ * Defines the props of the component.
2363
+ */
2364
+ declare type TableHeaderProps = GenericProps;
2365
+ /**
2366
+ * TableHeader component.
2367
+ *
2368
+ * @param props Component props.
2369
+ * @param ref Component ref.
2370
+ * @return React element.
2371
+ */
2372
+ declare const TableHeader: Comp<TableHeaderProps, HTMLTableSectionElement>;
2373
+
2374
+ /**
2375
+ * Defines the props of the component.
2376
+ */
2377
+ interface TableRowProps extends GenericProps {
2378
+ /** Whether the component is clickable or not. */
2379
+ isClickable?: boolean;
2380
+ /** Whether the component is disabled or not. */
2381
+ isDisabled?: boolean;
2382
+ /** Whether the component is selected or not. */
2383
+ isSelected?: boolean;
2384
+ }
2385
+ /**
2386
+ * TableRow component.
2387
+ *
2388
+ * @param props Component props.
2389
+ * @param ref Component ref.
2390
+ * @return React element.
2391
+ */
2392
+ declare const TableRow: Comp<TableRowProps, HTMLTableRowElement>;
2393
+
2394
+ interface TabProviderProps {
2395
+ /** Active tab index. */
2396
+ activeTabIndex?: number;
2397
+ /** Tab provider children. */
2398
+ children: ReactNode;
2399
+ /** Tab panel children should not render if the tab panel is hidden. */
2400
+ isLazy?: boolean;
2401
+ /** Activate tabs on focus. */
2402
+ shouldActivateOnFocus?: boolean;
2403
+ /** Tab change callback. */
2404
+ onChange?(index: number): void;
2405
+ }
2406
+ /**
2407
+ * This component provides a context in which tabs can be defined and linked to their tab panel.
2408
+ *
2409
+ * It does not produce any markup so you can wrap it around any React elements and then split the TabList and TabPanel
2410
+ * components in the react tree.
2411
+ *
2412
+ * @param props React component props.
2413
+ * @return React element.
2414
+ */
2415
+ declare const TabProvider: React.FC<TabProviderProps>;
2416
+
2417
+ declare enum TabListLayout {
2418
+ clustered = "clustered",
2419
+ fixed = "fixed"
2420
+ }
2421
+ /**
2422
+ * Defines the props of the component.
2423
+ */
2424
+ interface TabListProps extends GenericProps, HasTheme {
2425
+ /** ARIA label (purpose of the set of tabs). */
2426
+ ['aria-label']: string;
2427
+ /** Tab list. */
2428
+ children: ReactNode;
2429
+ /** Layout of the tabs in the list. */
2430
+ layout?: TabListLayout;
2431
+ /** Position of the tabs in the list (requires 'clustered' layout). */
2432
+ position?: Alignment;
2433
+ }
2434
+ /**
2435
+ * TabList component.
2436
+ *
2437
+ * Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
2438
+ *
2439
+ * @param props Component props.
2440
+ * @param ref Component ref.
2441
+ * @return React element.
2442
+ */
2443
+ declare const TabList: Comp<TabListProps, HTMLDivElement>;
2444
+
2445
+ /**
2446
+ * Defines the props of the component.
2447
+ */
2448
+ interface TabProps extends GenericProps {
2449
+ /** Children are not supported. */
2450
+ children?: never;
2451
+ /** Icon (SVG path). */
2452
+ icon?: IconProps['icon'];
2453
+ /** Native id property. */
2454
+ id?: string;
2455
+ /** Whether the tab is active or not. */
2456
+ isActive?: boolean;
2457
+ /** Whether the component is disabled or not. */
2458
+ isDisabled?: boolean;
2459
+ /** Label content. */
2460
+ label: string | ReactNode;
2461
+ }
2462
+ /**
2463
+ * Tab component.
2464
+ *
2465
+ * Implements WAI-ARIA `tab` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
2466
+ *
2467
+ * @param props Component props.
2468
+ * @param ref Component ref.
2469
+ * @return React element.
2470
+ */
2471
+ declare const Tab: Comp<TabProps, HTMLButtonElement>;
2472
+
2473
+ /**
2474
+ * Defines the props of the component.
2475
+ */
2476
+ interface TabPanelProps extends GenericProps {
2477
+ /** Native id property */
2478
+ id?: string;
2479
+ /** Whether the tab is active or not. */
2480
+ isActive?: boolean;
2481
+ }
2482
+ /**
2483
+ * TabPanel component.
2484
+ *
2485
+ * Implements WAI-ARIA `tabpanel` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
2486
+ *
2487
+ * @param props Component props.
2488
+ * @param ref Component ref.
2489
+ * @return React element.
2490
+ */
2491
+ declare const TabPanel: Comp<TabPanelProps, HTMLDivElement>;
2492
+
2493
+ /**
2494
+ * Defines the props of the component.
2495
+ */
2496
+ interface TextFieldProps extends GenericProps, HasTheme {
2497
+ /** Chip Group to be rendered before the main text input. */
2498
+ chips?: HTMLElement | ReactNode;
2499
+ /** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
2500
+ clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
2501
+ /** Error message. */
2502
+ error?: string | ReactNode;
2503
+ /** Whether we force the focus style or not. */
2504
+ forceFocusStyle?: boolean;
2505
+ /** Whether the text field is displayed with error style or not. */
2506
+ hasError?: boolean;
2507
+ /** Additional element to put at the end of the text field. */
2508
+ afterElement?: ReactNode;
2509
+ /** Helper text. */
2510
+ helper?: string | ReactNode;
2511
+ /** Icon (SVG path). */
2512
+ icon?: string;
2513
+ /** Native input id property (generated if not provided to link the label element). */
2514
+ id?: string;
2515
+ /** Reference to the <input> or <textarea> element. */
2516
+ inputRef?: Ref<HTMLInputElement | HTMLTextAreaElement>;
2517
+ /** Whether the component is disabled or not. */
2518
+ isDisabled?: boolean;
2519
+ /** Whether the component is required or not. */
2520
+ isRequired?: boolean;
2521
+ /** Whether the text field is displayed with valid style or not. */
2522
+ isValid?: boolean;
2523
+ /** Label text. */
2524
+ label?: string;
2525
+ /** Max string length the input accepts (constrains the input and displays a character counter). */
2526
+ maxLength?: number;
2527
+ /** Minimum number of rows displayed in multiline mode (requires `multiline` to be enabled). */
2528
+ minimumRows?: number;
2529
+ /** Whether the text field is a textarea or an input. */
2530
+ multiline?: boolean;
2531
+ /** Native input name property. */
2532
+ name?: string;
2533
+ /** Placeholder text. */
2534
+ placeholder?: string;
2535
+ /** Reference to the wrapper. */
2536
+ textFieldRef?: Ref<HTMLDivElement>;
2537
+ /** Value. */
2538
+ value?: string;
2539
+ /** On blur callback. */
2540
+ onBlur?(event: React.FocusEvent): void;
2541
+ /** On change callback. */
2542
+ onChange(value: string, name?: string, event?: SyntheticEvent): void;
2543
+ /** On focus callback. */
2544
+ onFocus?(event: React.FocusEvent): void;
2545
+ }
2546
+ /**
2547
+ * TextField component.
2548
+ *
2549
+ * @param props Component props.
2550
+ * @param ref Component ref.
2551
+ * @return React element.
2552
+ */
2553
+ declare const TextField: Comp<TextFieldProps, HTMLDivElement>;
2554
+
2555
+ declare const useFocusPointStyle: ({ image, aspectRatio, focusPoint, imgProps: { width, height } }: ThumbnailProps, element: HTMLImageElement | undefined, isLoaded: boolean) => CSSProperties;
2556
+
2557
+ /**
2558
+ * Defines the props of the component.
2559
+ */
2560
+ interface ToolbarProps extends GenericProps {
2561
+ /** After content (placed after the label). */
2562
+ after?: ReactNode;
2563
+ /** Before content (placed before the label). */
2564
+ before?: ReactNode;
2565
+ /** Label content. */
2566
+ label?: ReactNode;
2567
+ }
2568
+ /**
2569
+ * Toolbar component.
2570
+ *
2571
+ * @param props Component props.
2572
+ * @param ref Component ref.
2573
+ * @return React element.
2574
+ */
2575
+ declare const Toolbar: Comp<ToolbarProps, HTMLDivElement>;
2576
+
2577
+ /** Position of the tooltip relative to the anchor element. */
2578
+ declare type TooltipPlacement = Extract<Placement, 'top' | 'right' | 'bottom' | 'left'>;
2579
+ /**
2580
+ * Defines the props of the component.
2581
+ */
2582
+ interface TooltipProps extends GenericProps {
2583
+ /** Anchor (element on which we activate the tooltip). */
2584
+ children: ReactNode;
2585
+ /** Delay (in ms) before closing the tooltip. */
2586
+ delay?: number;
2587
+ /** Whether the tooltip is displayed even without the mouse hovering the anchor. */
2588
+ forceOpen?: boolean;
2589
+ /** Label text. */
2590
+ label?: string | null | false;
2591
+ /** Placement of the tooltip relative to the anchor. */
2592
+ placement?: TooltipPlacement;
2593
+ }
2594
+ /**
2595
+ * Tooltip component.
2596
+ *
2597
+ * @param props Component props.
2598
+ * @param ref Component ref.
2599
+ * @return React element.
2600
+ */
2601
+ declare const Tooltip: Comp<TooltipProps, HTMLDivElement>;
2602
+
2603
+ /**
2604
+ * Uploader variants.
2605
+ */
2606
+ declare const UploaderVariant: {
2607
+ readonly square: "square";
2608
+ readonly rounded: "rounded";
2609
+ readonly circle: "circle";
2610
+ };
2611
+ declare type UploaderVariant = ValueOf<typeof UploaderVariant>;
2612
+ /**
2613
+ * Uploader sizes.
2614
+ */
2615
+ declare type UploaderSize = Extract<Size, 'xl' | 'xxl'>;
2616
+ /**
2617
+ * Defines the props of the component.
2618
+ */
2619
+ interface UploaderProps extends GenericProps, HasTheme {
2620
+ /** Image aspect ratio. */
2621
+ aspectRatio?: AspectRatio;
2622
+ /** Icon (SVG path). */
2623
+ icon?: string;
2624
+ /** Label text. */
2625
+ label?: string;
2626
+ /** Size variant. */
2627
+ size?: UploaderSize;
2628
+ /** Variant. */
2629
+ variant?: UploaderVariant;
2630
+ /** On click callback. */
2631
+ onClick?: MouseEventHandler<HTMLDivElement>;
2632
+ }
2633
+ /**
2634
+ * Uploader component.
2635
+ *
2636
+ * @param props Component props.
2637
+ * @param ref Component ref.
2638
+ * @return React element.
2639
+ */
2640
+ declare const Uploader: Comp<UploaderProps, HTMLDivElement>;
2641
+
2642
+ /**
2643
+ * User block sizes.
2644
+ */
2645
+ declare type UserBlockSize = Extract<Size, 's' | 'm' | 'l'>;
2646
+ /**
2647
+ * Defines the props of the component.
2648
+ */
2649
+ interface UserBlockProps extends GenericProps, HasTheme {
2650
+ /** Props to pass to the avatar. */
2651
+ avatarProps?: Omit<AvatarProps, 'alt'>;
2652
+ /** Additional fields used to describe the user. */
2653
+ fields?: string[];
2654
+ /** Props to pass to the link wrapping the avatar thumbnail. */
2655
+ linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
2656
+ /** Custom react component for the link (can be used to inject react router Link). */
2657
+ linkAs?: 'a' | any;
2658
+ /** Multiple action toolbar content. */
2659
+ multipleActions?: ReactNode;
2660
+ /** User name. */
2661
+ name?: string;
2662
+ /** Props to pass to the name block. */
2663
+ nameProps?: GenericProps;
2664
+ /** Orientation. */
2665
+ orientation?: Orientation;
2666
+ /** Simple action toolbar content. */
2667
+ simpleAction?: ReactNode;
2668
+ /** Size variant. */
2669
+ size?: UserBlockSize;
2670
+ /** On click callback. */
2671
+ onClick?(): void;
2672
+ /** On mouse enter callback. */
2673
+ onMouseEnter?(): void;
2674
+ /** On mouse leave callback. */
2675
+ onMouseLeave?(): void;
2676
+ }
2677
+ /**
2678
+ * UserBlock component.
2679
+ *
2680
+ * @param props Component props.
2681
+ * @param ref Component ref.
2682
+ * @return React element.
2683
+ */
2684
+ declare const UserBlock: Comp<UserBlockProps, HTMLDivElement>;
2685
+
2686
+ export { AlertDialog, AlertDialogProps, Autocomplete, AutocompleteMultiple, AutocompleteMultipleProps, AutocompleteProps, Avatar, AvatarProps, AvatarSize, Badge, BadgeProps, Button, ButtonEmphasis, ButtonGroup, ButtonGroupProps, ButtonProps, Checkbox, CheckboxProps, Chip, ChipGroup, ChipGroupProps, ChipProps, CommentBlock, CommentBlockProps, CommentBlockVariant, DatePicker, DatePickerControlled, DatePickerControlledProps, DatePickerField, DatePickerFieldProps, DatePickerProps, Dialog, DialogProps, DialogSizes, Divider, DividerProps, DragHandle, DragHandleProps, Dropdown, DropdownProps, Elevation, ExpansionPanel, ExpansionPanelProps, Flag, FlagProps, FlexBox, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, GapSize, GenericBlock, GenericBlockGapSize, GenericBlockProps, Grid, GridItem, GridItemProps, GridProps, Heading, HeadingLevelProvider, HeadingLevelProviderProps, HeadingProps, Icon, IconButton, IconButtonProps, IconProps, IconSizes, ImageBlock, ImageBlockCaptionPosition, ImageBlockProps, ImageBlockSize, InlineList, InlineListProps, InputHelper, InputHelperProps, InputLabel, InputLabelProps, Lightbox, LightboxProps, Link, LinkPreview, LinkPreviewProps, LinkProps, List, ListDivider, ListDividerProps, ListItem, ListItemProps, ListItemSize, ListProps, ListSubheader, ListSubheaderProps, MarginAutoAlignment, Message, MessageProps, Mosaic, MosaicProps, Notification, NotificationProps, Offset, Placement, Popover, PopoverProps, PostBlock, PostBlockProps, Progress, ProgressProps, ProgressTracker, ProgressTrackerProps, ProgressTrackerProvider, ProgressTrackerProviderProps, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressTrackerStepPanelProps, ProgressTrackerStepProps, ProgressVariant, RadioButton, RadioButtonProps, RadioGroup, RadioGroupProps, Select, SelectMultiple, SelectMultipleField, SelectMultipleProps, SelectProps, SelectVariant, SideNavigation, SideNavigationItem, SideNavigationItemProps, SideNavigationProps, SkeletonCircle, SkeletonCircleProps, SkeletonRectangle, SkeletonRectangleProps, SkeletonRectangleVariant, SkeletonTypography, SkeletonTypographyProps, Slider, SliderProps, Slides, SlidesProps, Slideshow, SlideshowControls, SlideshowControlsProps, SlideshowItem, SlideshowItemProps, SlideshowProps, Switch, SwitchProps, Tab, TabList, TabListLayout, TabListProps, TabPanel, TabPanelProps, TabProps, TabProvider, TabProviderProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableCellVariant, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps, Text, TextField, TextFieldProps, TextProps, ThOrder, Thumbnail, ThumbnailProps, Toolbar, ToolbarProps, Tooltip, TooltipPlacement, TooltipProps, Uploader, UploaderProps, UploaderSize, UploaderVariant, UserBlock, UserBlockProps, UserBlockSize, clamp, isClickable, useFocusPointStyle, useHeadingLevel };