@canonical/react-components 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/dist-esm/components/Accordion/Accordion.js +52 -0
  2. package/dist-esm/components/Accordion/AccordionSection/AccordionSection.js +47 -0
  3. package/dist-esm/components/Accordion/AccordionSection/index.js +1 -0
  4. package/dist-esm/components/Accordion/index.js +1 -0
  5. package/dist-esm/components/ActionButton/ActionButton.js +106 -0
  6. package/dist-esm/components/ActionButton/index.js +1 -0
  7. package/dist-esm/components/ApplicationLayout/AppAside/AppAside.js +29 -0
  8. package/dist-esm/components/ApplicationLayout/AppAside/index.js +1 -0
  9. package/dist-esm/components/ApplicationLayout/AppMain/AppMain.js +21 -0
  10. package/dist-esm/components/ApplicationLayout/AppMain/index.js +1 -0
  11. package/dist-esm/components/ApplicationLayout/AppNavigation/AppNavigation.js +31 -0
  12. package/dist-esm/components/ApplicationLayout/AppNavigation/index.js +1 -0
  13. package/dist-esm/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.js +24 -0
  14. package/dist-esm/components/ApplicationLayout/AppNavigationBar/index.js +1 -0
  15. package/dist-esm/components/ApplicationLayout/AppStatus/AppStatus.js +21 -0
  16. package/dist-esm/components/ApplicationLayout/AppStatus/index.js +1 -0
  17. package/dist-esm/components/ApplicationLayout/Application/Application.js +22 -0
  18. package/dist-esm/components/ApplicationLayout/Application/index.js +1 -0
  19. package/dist-esm/components/ApplicationLayout/ApplicationLayout.js +113 -0
  20. package/dist-esm/components/ApplicationLayout/index.js +7 -0
  21. package/dist-esm/components/ArticlePagination/ArticlePagination.js +39 -0
  22. package/dist-esm/components/ArticlePagination/index.js +1 -0
  23. package/dist-esm/components/Badge/Badge.js +64 -0
  24. package/dist-esm/components/Badge/index.js +1 -0
  25. package/dist-esm/components/Button/Button.js +55 -0
  26. package/dist-esm/components/Button/index.js +1 -0
  27. package/dist-esm/components/Card/Card.js +45 -0
  28. package/dist-esm/components/Card/index.js +1 -0
  29. package/dist-esm/components/CheckboxInput/CheckableInput/CheckableInput.js +35 -0
  30. package/dist-esm/components/CheckboxInput/CheckableInput/index.js +1 -0
  31. package/dist-esm/components/CheckboxInput/CheckboxInput.js +24 -0
  32. package/dist-esm/components/CheckboxInput/index.js +1 -0
  33. package/dist-esm/components/Chip/Chip.js +81 -0
  34. package/dist-esm/components/Chip/index.js +1 -0
  35. package/dist-esm/components/Code/Code.js +49 -0
  36. package/dist-esm/components/Code/index.js +1 -0
  37. package/dist-esm/components/CodeSnippet/CodeSnippet.js +28 -0
  38. package/dist-esm/components/CodeSnippet/CodeSnippetBlock.js +64 -0
  39. package/dist-esm/components/CodeSnippet/CodeSnippetDropdown.js +27 -0
  40. package/dist-esm/components/CodeSnippet/index.js +2 -0
  41. package/dist-esm/components/Col/Col.js +38 -0
  42. package/dist-esm/components/Col/index.js +1 -0
  43. package/dist-esm/components/ConfirmationButton/ConfirmationButton.js +63 -0
  44. package/dist-esm/components/ConfirmationButton/index.js +1 -0
  45. package/dist-esm/components/ConfirmationModal/ConfirmationModal.js +47 -0
  46. package/dist-esm/components/ConfirmationModal/index.js +1 -0
  47. package/dist-esm/components/ContextualMenu/ContextualMenu.js +215 -0
  48. package/dist-esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +249 -0
  49. package/dist-esm/components/ContextualMenu/ContextualMenuDropdown/index.js +1 -0
  50. package/dist-esm/components/ContextualMenu/index.js +1 -0
  51. package/dist-esm/components/EmptyState/EmptyState.js +28 -0
  52. package/dist-esm/components/EmptyState/index.js +1 -0
  53. package/dist-esm/components/Field/Field.js +126 -0
  54. package/dist-esm/components/Field/index.js +1 -0
  55. package/dist-esm/components/Form/Form.js +28 -0
  56. package/dist-esm/components/Form/index.js +1 -0
  57. package/dist-esm/components/FormikField/FormikField.js +33 -0
  58. package/dist-esm/components/FormikField/index.js +1 -0
  59. package/dist-esm/components/Icon/Icon.js +61 -0
  60. package/dist-esm/components/Icon/index.js +1 -0
  61. package/dist-esm/components/Input/Input.js +103 -0
  62. package/dist-esm/components/Input/index.js +1 -0
  63. package/dist-esm/components/Label/Label.js +27 -0
  64. package/dist-esm/components/Label/index.js +1 -0
  65. package/dist-esm/components/Link/Link.js +37 -0
  66. package/dist-esm/components/Link/index.js +1 -0
  67. package/dist-esm/components/List/List.js +110 -0
  68. package/dist-esm/components/List/index.js +1 -0
  69. package/dist-esm/components/Loader/Loader.js +14 -0
  70. package/dist-esm/components/Loader/index.js +1 -0
  71. package/dist-esm/components/LoginPageLayout/LoginPageLayout.js +63 -0
  72. package/dist-esm/components/LoginPageLayout/index.js +1 -0
  73. package/dist-esm/components/MainTable/MainTable.js +211 -0
  74. package/dist-esm/components/MainTable/index.js +1 -0
  75. package/dist-esm/components/Modal/Modal.js +135 -0
  76. package/dist-esm/components/Modal/index.js +1 -0
  77. package/dist-esm/components/ModularTable/ModularTable.js +166 -0
  78. package/dist-esm/components/ModularTable/index.js +1 -0
  79. package/dist-esm/components/MultiSelect/FadeInDown/FadeInDown.js +25 -0
  80. package/dist-esm/components/MultiSelect/FadeInDown/index.js +1 -0
  81. package/dist-esm/components/MultiSelect/MultiSelect.js +308 -0
  82. package/dist-esm/components/MultiSelect/index.js +1 -0
  83. package/dist-esm/components/Navigation/Navigation.js +215 -0
  84. package/dist-esm/components/Navigation/NavigationLink/NavigationLink.js +58 -0
  85. package/dist-esm/components/Navigation/NavigationLink/index.js +1 -0
  86. package/dist-esm/components/Navigation/NavigationMenu/NavigationMenu.js +57 -0
  87. package/dist-esm/components/Navigation/NavigationMenu/index.js +1 -0
  88. package/dist-esm/components/Navigation/index.js +1 -0
  89. package/dist-esm/components/Navigation/types.js +1 -0
  90. package/dist-esm/components/Notification/Notification.js +119 -0
  91. package/dist-esm/components/Notification/index.js +1 -0
  92. package/dist-esm/components/NotificationProvider/NotificationProvider.js +83 -0
  93. package/dist-esm/components/NotificationProvider/index.js +2 -0
  94. package/dist-esm/components/NotificationProvider/messageBuilder.js +31 -0
  95. package/dist-esm/components/NotificationProvider/types.js +1 -0
  96. package/dist-esm/components/Pagination/Pagination.js +173 -0
  97. package/dist-esm/components/Pagination/PaginationButton/PaginationButton.js +31 -0
  98. package/dist-esm/components/Pagination/PaginationButton/index.js +1 -0
  99. package/dist-esm/components/Pagination/PaginationItem/PaginationItem.js +20 -0
  100. package/dist-esm/components/Pagination/PaginationItem/index.js +1 -0
  101. package/dist-esm/components/Pagination/index.js +1 -0
  102. package/dist-esm/components/Panel/Panel.js +89 -0
  103. package/dist-esm/components/Panel/index.js +1 -0
  104. package/dist-esm/components/PasswordToggle/PasswordToggle.js +90 -0
  105. package/dist-esm/components/PasswordToggle/index.js +1 -0
  106. package/dist-esm/components/RadioInput/RadioInput.js +22 -0
  107. package/dist-esm/components/RadioInput/index.js +1 -0
  108. package/dist-esm/components/Row/Row.js +22 -0
  109. package/dist-esm/components/Row/index.js +1 -0
  110. package/dist-esm/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.js +107 -0
  111. package/dist-esm/components/SearchAndFilter/FilterPanelSection/index.js +1 -0
  112. package/dist-esm/components/SearchAndFilter/SearchAndFilter.js +286 -0
  113. package/dist-esm/components/SearchAndFilter/index.js +1 -0
  114. package/dist-esm/components/SearchAndFilter/types.js +1 -0
  115. package/dist-esm/components/SearchAndFilter/utils.js +22 -0
  116. package/dist-esm/components/SearchBox/SearchBox.js +95 -0
  117. package/dist-esm/components/SearchBox/index.js +1 -0
  118. package/dist-esm/components/Select/Select.js +84 -0
  119. package/dist-esm/components/Select/index.js +1 -0
  120. package/dist-esm/components/SideNavigation/SideNavigation.js +89 -0
  121. package/dist-esm/components/SideNavigation/SideNavigationBase/SideNavigationBase.js +31 -0
  122. package/dist-esm/components/SideNavigation/SideNavigationBase/index.js +1 -0
  123. package/dist-esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.js +32 -0
  124. package/dist-esm/components/SideNavigation/SideNavigationItem/index.js +1 -0
  125. package/dist-esm/components/SideNavigation/SideNavigationLink/SideNavigationLink.js +25 -0
  126. package/dist-esm/components/SideNavigation/SideNavigationLink/index.js +1 -0
  127. package/dist-esm/components/SideNavigation/SideNavigationText/SideNavigationText.js +20 -0
  128. package/dist-esm/components/SideNavigation/SideNavigationText/index.js +1 -0
  129. package/dist-esm/components/SideNavigation/index.js +4 -0
  130. package/dist-esm/components/Slider/Slider.js +83 -0
  131. package/dist-esm/components/Slider/index.js +1 -0
  132. package/dist-esm/components/Spinner/Spinner.js +36 -0
  133. package/dist-esm/components/Spinner/index.js +1 -0
  134. package/dist-esm/components/StatusLabel/StatusLabel.js +36 -0
  135. package/dist-esm/components/StatusLabel/index.js +1 -0
  136. package/dist-esm/components/Strip/Strip.js +50 -0
  137. package/dist-esm/components/Strip/index.js +1 -0
  138. package/dist-esm/components/SummaryButton/SummaryButton.js +28 -0
  139. package/dist-esm/components/SummaryButton/index.js +1 -0
  140. package/dist-esm/components/Switch/Switch.js +28 -0
  141. package/dist-esm/components/Switch/index.js +1 -0
  142. package/dist-esm/components/Table/Table.js +23 -0
  143. package/dist-esm/components/Table/index.js +1 -0
  144. package/dist-esm/components/TableCell/TableCell.js +26 -0
  145. package/dist-esm/components/TableCell/index.js +1 -0
  146. package/dist-esm/components/TableHeader/TableHeader.js +17 -0
  147. package/dist-esm/components/TableHeader/index.js +1 -0
  148. package/dist-esm/components/TablePagination/TablePagination.js +104 -0
  149. package/dist-esm/components/TablePagination/TablePaginationControls/TablePaginationControls.js +120 -0
  150. package/dist-esm/components/TablePagination/TablePaginationControls/index.js +1 -0
  151. package/dist-esm/components/TablePagination/index.js +1 -0
  152. package/dist-esm/components/TablePagination/utils.js +67 -0
  153. package/dist-esm/components/TableRow/TableRow.js +15 -0
  154. package/dist-esm/components/TableRow/index.js +1 -0
  155. package/dist-esm/components/Tabs/Tabs.js +42 -0
  156. package/dist-esm/components/Tabs/index.js +1 -0
  157. package/dist-esm/components/Textarea/Textarea.js +115 -0
  158. package/dist-esm/components/Textarea/index.js +1 -0
  159. package/dist-esm/components/Tooltip/Tooltip.js +245 -0
  160. package/dist-esm/components/Tooltip/index.js +1 -0
  161. package/dist-esm/enums.js +8 -0
  162. package/dist-esm/hooks/index.js +8 -0
  163. package/dist-esm/hooks/useId.js +13 -0
  164. package/dist-esm/hooks/useListener.js +51 -0
  165. package/dist-esm/hooks/useOnClickOutside.js +38 -0
  166. package/dist-esm/hooks/useOnEscapePressed.js +25 -0
  167. package/dist-esm/hooks/usePagination.js +45 -0
  168. package/dist-esm/hooks/usePrevious.js +16 -0
  169. package/dist-esm/hooks/useThrottle.js +49 -0
  170. package/dist-esm/hooks/useWindowFitment.js +109 -0
  171. package/dist-esm/index.js +69 -0
  172. package/dist-esm/types/index.js +1 -0
  173. package/dist-esm/types/react-table-config.d.js +1 -0
  174. package/dist-esm/utils.js +41 -0
  175. package/dist-types/components/Accordion/Accordion.d.ts +46 -0
  176. package/dist-types/components/Accordion/AccordionSection/AccordionSection.d.ts +34 -0
  177. package/dist-types/components/Accordion/AccordionSection/index.d.ts +2 -0
  178. package/dist-types/components/Accordion/index.d.ts +2 -0
  179. package/dist-types/components/ActionButton/ActionButton.d.ts +48 -0
  180. package/dist-types/components/ActionButton/index.d.ts +2 -0
  181. package/dist-types/components/ApplicationLayout/AppAside/AppAside.d.ts +33 -0
  182. package/dist-types/components/ApplicationLayout/AppAside/index.d.ts +2 -0
  183. package/dist-types/components/ApplicationLayout/AppMain/AppMain.d.ts +14 -0
  184. package/dist-types/components/ApplicationLayout/AppMain/index.d.ts +2 -0
  185. package/dist-types/components/ApplicationLayout/AppNavigation/AppNavigation.d.ts +26 -0
  186. package/dist-types/components/ApplicationLayout/AppNavigation/index.d.ts +2 -0
  187. package/dist-types/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.d.ts +18 -0
  188. package/dist-types/components/ApplicationLayout/AppNavigationBar/index.d.ts +2 -0
  189. package/dist-types/components/ApplicationLayout/AppStatus/AppStatus.d.ts +14 -0
  190. package/dist-types/components/ApplicationLayout/AppStatus/index.d.ts +2 -0
  191. package/dist-types/components/ApplicationLayout/Application/Application.d.ts +15 -0
  192. package/dist-types/components/ApplicationLayout/Application/index.d.ts +2 -0
  193. package/dist-types/components/ApplicationLayout/ApplicationLayout.d.ts +89 -0
  194. package/dist-types/components/ApplicationLayout/index.d.ts +7 -0
  195. package/dist-types/components/ArticlePagination/ArticlePagination.d.ts +31 -0
  196. package/dist-types/components/ArticlePagination/index.d.ts +2 -0
  197. package/dist-types/components/Badge/Badge.d.ts +34 -0
  198. package/dist-types/components/Badge/index.d.ts +2 -0
  199. package/dist-types/components/Button/Button.d.ts +64 -0
  200. package/dist-types/components/Button/index.d.ts +2 -0
  201. package/dist-types/components/Card/Card.d.ts +35 -0
  202. package/dist-types/components/Card/index.d.ts +2 -0
  203. package/dist-types/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +27 -0
  204. package/dist-types/components/CheckboxInput/CheckableInput/index.d.ts +2 -0
  205. package/dist-types/components/CheckboxInput/CheckboxInput.d.ts +9 -0
  206. package/dist-types/components/CheckboxInput/index.d.ts +2 -0
  207. package/dist-types/components/Chip/Chip.d.ts +56 -0
  208. package/dist-types/components/Chip/index.d.ts +2 -0
  209. package/dist-types/components/Code/Code.d.ts +13 -0
  210. package/dist-types/components/Code/index.d.ts +2 -0
  211. package/dist-types/components/CodeSnippet/CodeSnippet.d.ts +21 -0
  212. package/dist-types/components/CodeSnippet/CodeSnippetBlock.d.ts +40 -0
  213. package/dist-types/components/CodeSnippet/CodeSnippetDropdown.d.ts +18 -0
  214. package/dist-types/components/CodeSnippet/index.d.ts +5 -0
  215. package/dist-types/components/Col/Col.d.ts +53 -0
  216. package/dist-types/components/Col/index.d.ts +2 -0
  217. package/dist-types/components/ConfirmationButton/ConfirmationButton.d.ts +28 -0
  218. package/dist-types/components/ConfirmationButton/index.d.ts +2 -0
  219. package/dist-types/components/ConfirmationModal/ConfirmationModal.d.ts +53 -0
  220. package/dist-types/components/ConfirmationModal/index.d.ts +2 -0
  221. package/dist-types/components/ContextualMenu/ContextualMenu.d.ts +110 -0
  222. package/dist-types/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +43 -0
  223. package/dist-types/components/ContextualMenu/ContextualMenuDropdown/index.d.ts +2 -0
  224. package/dist-types/components/ContextualMenu/index.d.ts +3 -0
  225. package/dist-types/components/EmptyState/EmptyState.d.ts +25 -0
  226. package/dist-types/components/EmptyState/index.d.ts +2 -0
  227. package/dist-types/components/Field/Field.d.ts +77 -0
  228. package/dist-types/components/Field/index.d.ts +2 -0
  229. package/dist-types/components/Form/Form.d.ts +21 -0
  230. package/dist-types/components/Form/index.d.ts +2 -0
  231. package/dist-types/components/FormikField/FormikField.d.ts +25 -0
  232. package/dist-types/components/FormikField/index.d.ts +1 -0
  233. package/dist-types/components/Icon/Icon.d.ts +59 -0
  234. package/dist-types/components/Icon/index.d.ts +2 -0
  235. package/dist-types/components/Input/Input.d.ts +70 -0
  236. package/dist-types/components/Input/index.d.ts +2 -0
  237. package/dist-types/components/Label/Label.d.ts +25 -0
  238. package/dist-types/components/Label/index.d.ts +2 -0
  239. package/dist-types/components/Link/Link.d.ts +31 -0
  240. package/dist-types/components/Link/index.d.ts +2 -0
  241. package/dist-types/components/List/List.d.ts +36 -0
  242. package/dist-types/components/List/index.d.ts +2 -0
  243. package/dist-types/components/Loader/Loader.d.ts +6 -0
  244. package/dist-types/components/Loader/index.d.ts +1 -0
  245. package/dist-types/components/LoginPageLayout/LoginPageLayout.d.ts +17 -0
  246. package/dist-types/components/LoginPageLayout/index.d.ts +2 -0
  247. package/dist-types/components/MainTable/MainTable.d.ts +102 -0
  248. package/dist-types/components/MainTable/index.d.ts +2 -0
  249. package/dist-types/components/Modal/Modal.d.ts +36 -0
  250. package/dist-types/components/Modal/index.d.ts +2 -0
  251. package/dist-types/components/ModularTable/ModularTable.d.ts +105 -0
  252. package/dist-types/components/ModularTable/index.d.ts +2 -0
  253. package/dist-types/components/MultiSelect/FadeInDown/FadeInDown.d.ts +10 -0
  254. package/dist-types/components/MultiSelect/FadeInDown/index.d.ts +1 -0
  255. package/dist-types/components/MultiSelect/MultiSelect.d.ts +57 -0
  256. package/dist-types/components/MultiSelect/index.d.ts +1 -0
  257. package/dist-types/components/Navigation/Navigation.d.ts +66 -0
  258. package/dist-types/components/Navigation/NavigationLink/NavigationLink.d.ts +10 -0
  259. package/dist-types/components/Navigation/NavigationLink/index.d.ts +1 -0
  260. package/dist-types/components/Navigation/NavigationMenu/NavigationMenu.d.ts +11 -0
  261. package/dist-types/components/Navigation/NavigationMenu/index.d.ts +1 -0
  262. package/dist-types/components/Navigation/index.d.ts +3 -0
  263. package/dist-types/components/Navigation/types.d.ts +64 -0
  264. package/dist-types/components/Notification/Notification.d.ts +110 -0
  265. package/dist-types/components/Notification/index.d.ts +2 -0
  266. package/dist-types/components/NotificationProvider/NotificationProvider.d.ts +5 -0
  267. package/dist-types/components/NotificationProvider/index.d.ts +3 -0
  268. package/dist-types/components/NotificationProvider/messageBuilder.d.ts +6 -0
  269. package/dist-types/components/NotificationProvider/types.d.ts +35 -0
  270. package/dist-types/components/Pagination/Pagination.d.ts +102 -0
  271. package/dist-types/components/Pagination/PaginationButton/PaginationButton.d.ts +30 -0
  272. package/dist-types/components/Pagination/PaginationButton/index.d.ts +2 -0
  273. package/dist-types/components/Pagination/PaginationItem/PaginationItem.d.ts +17 -0
  274. package/dist-types/components/Pagination/PaginationItem/index.d.ts +2 -0
  275. package/dist-types/components/Pagination/index.d.ts +2 -0
  276. package/dist-types/components/Panel/Panel.d.ts +123 -0
  277. package/dist-types/components/Panel/index.d.ts +1 -0
  278. package/dist-types/components/PasswordToggle/PasswordToggle.d.ts +108 -0
  279. package/dist-types/components/PasswordToggle/index.d.ts +2 -0
  280. package/dist-types/components/RadioInput/RadioInput.d.ts +9 -0
  281. package/dist-types/components/RadioInput/index.d.ts +2 -0
  282. package/dist-types/components/Row/Row.d.ts +19 -0
  283. package/dist-types/components/Row/index.d.ts +2 -0
  284. package/dist-types/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +25 -0
  285. package/dist-types/components/SearchAndFilter/FilterPanelSection/index.d.ts +1 -0
  286. package/dist-types/components/SearchAndFilter/SearchAndFilter.d.ts +33 -0
  287. package/dist-types/components/SearchAndFilter/index.d.ts +2 -0
  288. package/dist-types/components/SearchAndFilter/types.d.ts +11 -0
  289. package/dist-types/components/SearchAndFilter/utils.d.ts +13 -0
  290. package/dist-types/components/SearchBox/SearchBox.d.ts +63 -0
  291. package/dist-types/components/SearchBox/index.d.ts +2 -0
  292. package/dist-types/components/Select/Select.d.ts +71 -0
  293. package/dist-types/components/Select/index.d.ts +2 -0
  294. package/dist-types/components/SideNavigation/SideNavigation.d.ts +50 -0
  295. package/dist-types/components/SideNavigation/SideNavigationBase/SideNavigationBase.d.ts +31 -0
  296. package/dist-types/components/SideNavigation/SideNavigationBase/index.d.ts +1 -0
  297. package/dist-types/components/SideNavigation/SideNavigationItem/SideNavigationItem.d.ts +20 -0
  298. package/dist-types/components/SideNavigation/SideNavigationItem/index.d.ts +1 -0
  299. package/dist-types/components/SideNavigation/SideNavigationLink/SideNavigationLink.d.ts +18 -0
  300. package/dist-types/components/SideNavigation/SideNavigationLink/index.d.ts +1 -0
  301. package/dist-types/components/SideNavigation/SideNavigationText/SideNavigationText.d.ts +7 -0
  302. package/dist-types/components/SideNavigation/SideNavigationText/index.d.ts +1 -0
  303. package/dist-types/components/SideNavigation/index.d.ts +5 -0
  304. package/dist-types/components/Slider/Slider.d.ts +62 -0
  305. package/dist-types/components/Slider/index.d.ts +2 -0
  306. package/dist-types/components/Spinner/Spinner.d.ts +29 -0
  307. package/dist-types/components/Spinner/index.d.ts +2 -0
  308. package/dist-types/components/StatusLabel/StatusLabel.d.ts +33 -0
  309. package/dist-types/components/StatusLabel/index.d.ts +2 -0
  310. package/dist-types/components/Strip/Strip.d.ts +64 -0
  311. package/dist-types/components/Strip/index.d.ts +2 -0
  312. package/dist-types/components/SummaryButton/SummaryButton.d.ts +29 -0
  313. package/dist-types/components/SummaryButton/index.d.ts +2 -0
  314. package/dist-types/components/Switch/Switch.d.ts +17 -0
  315. package/dist-types/components/Switch/index.d.ts +2 -0
  316. package/dist-types/components/Table/Table.d.ts +22 -0
  317. package/dist-types/components/Table/index.d.ts +2 -0
  318. package/dist-types/components/TableCell/TableCell.d.ts +26 -0
  319. package/dist-types/components/TableCell/index.d.ts +2 -0
  320. package/dist-types/components/TableHeader/TableHeader.d.ts +14 -0
  321. package/dist-types/components/TableHeader/index.d.ts +2 -0
  322. package/dist-types/components/TablePagination/TablePagination.d.ts +98 -0
  323. package/dist-types/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +24 -0
  324. package/dist-types/components/TablePagination/TablePaginationControls/index.d.ts +2 -0
  325. package/dist-types/components/TablePagination/index.d.ts +2 -0
  326. package/dist-types/components/TablePagination/utils.d.ts +27 -0
  327. package/dist-types/components/TableRow/TableRow.d.ts +10 -0
  328. package/dist-types/components/TableRow/index.d.ts +2 -0
  329. package/dist-types/components/Tabs/Tabs.d.ts +45 -0
  330. package/dist-types/components/Tabs/index.d.ts +2 -0
  331. package/dist-types/components/Textarea/Textarea.d.ts +70 -0
  332. package/dist-types/components/Textarea/index.d.ts +2 -0
  333. package/dist-types/components/Tooltip/Tooltip.d.ts +75 -0
  334. package/dist-types/components/Tooltip/index.d.ts +2 -0
  335. package/dist-types/enums.d.ts +13 -0
  336. package/dist-types/hooks/index.d.ts +9 -0
  337. package/dist-types/hooks/useId.d.ts +4 -0
  338. package/dist-types/hooks/useListener.d.ts +11 -0
  339. package/dist-types/hooks/useOnClickOutside.d.ts +12 -0
  340. package/dist-types/hooks/useOnEscapePressed.d.ts +6 -0
  341. package/dist-types/hooks/usePagination.d.ts +19 -0
  342. package/dist-types/hooks/usePrevious.d.ts +7 -0
  343. package/dist-types/hooks/useThrottle.d.ts +9 -0
  344. package/dist-types/hooks/useWindowFitment.d.ts +54 -0
  345. package/dist-types/index.d.ts +132 -0
  346. package/dist-types/types/index.d.ts +38 -0
  347. package/dist-types/utils.d.ts +27 -0
  348. package/package.json +3 -1
@@ -0,0 +1,2 @@
1
+ export { default, ButtonAppearance } from "./Button";
2
+ export type { Props as ButtonProps } from "./Button";
@@ -0,0 +1,35 @@
1
+ import type { HTMLProps, ReactNode } from "react";
2
+ import type { ClassName, PropsWithSpread } from "../../types";
3
+ export type Props = PropsWithSpread<{
4
+ /**
5
+ * The content of the card.
6
+ */
7
+ children?: ReactNode;
8
+ /**
9
+ * Optional class(es) to pass to the wrapping div element.
10
+ */
11
+ className?: ClassName;
12
+ /**
13
+ * Whether the card should have highlighted styling.
14
+ */
15
+ highlighted?: boolean;
16
+ /**
17
+ * Whether the card should have overlay styling.
18
+ */
19
+ overlay?: boolean;
20
+ /**
21
+ * The path to a thumbnail image.
22
+ */
23
+ thumbnail?: string;
24
+ /**
25
+ * The title of the card.
26
+ */
27
+ title?: ReactNode;
28
+ }, HTMLProps<HTMLDivElement>>;
29
+ /**
30
+ * This is a [React](https://reactjs.org/) component for the Vanilla [Card](https://docs.vanillaframework.io/patterns/card/).
31
+ *
32
+ * There are four card styles available to use in Vanilla: default, header, highlighted and overlay. Our card component will expand to fill the full width of its parent container.
33
+ */
34
+ declare const Card: ({ children, className, highlighted, overlay, thumbnail, title, ...props }: Props) => JSX.Element;
35
+ export default Card;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Card";
2
+ export type { Props as CardProps } from "./Card";
@@ -0,0 +1,27 @@
1
+ import { HTMLProps } from "react";
2
+ import type { ReactNode } from "react";
3
+ import type { PropsWithSpread } from "../../../types";
4
+ export type Props = PropsWithSpread<{
5
+ /**
6
+ * The type of the input element.
7
+ */
8
+ inputType: "radio" | "checkbox";
9
+ /**
10
+ * The label for the input element.
11
+ */
12
+ label: ReactNode;
13
+ /**
14
+ * Optional class(es) to pass to the label element.
15
+ */
16
+ labelClassName?: string;
17
+ /**
18
+ * Whether the input element should display in indeterminate state.
19
+ */
20
+ indeterminate?: boolean;
21
+ /**
22
+ * Ensures the input and the label text are properly aligned with other inline text.
23
+ */
24
+ inline?: boolean;
25
+ }, Omit<HTMLProps<HTMLInputElement>, "type">>;
26
+ declare const CheckableInput: ({ inputType, label, labelClassName, indeterminate, inline, ...checkboxProps }: Props) => JSX.Element;
27
+ export default CheckableInput;
@@ -0,0 +1,2 @@
1
+ export { default } from "./CheckableInput";
2
+ export type { Props as CheckableInputProps } from "./CheckableInput";
@@ -0,0 +1,9 @@
1
+ import type { CheckableInputProps } from "./CheckableInput";
2
+ export type Props = Omit<CheckableInputProps, "inputType">;
3
+ /**
4
+ * This is a [React](https://reactjs.org/) component for the Vanilla [Checkbox input](https://docs.vanillaframework.io/base/forms#checkbox).
5
+ *
6
+ * Use the checkbox component to select one or more options.
7
+ */
8
+ declare const CheckboxInput: ({ label, indeterminate, ...checkboxProps }: Props) => JSX.Element;
9
+ export default CheckboxInput;
@@ -0,0 +1,2 @@
1
+ export { default } from "./CheckboxInput";
2
+ export type { Props as CheckboxInputProps } from "./CheckboxInput";
@@ -0,0 +1,56 @@
1
+ import type { MouseEvent, HTMLProps } from "react";
2
+ import { ValueOf, PropsWithSpread } from "../../types";
3
+ export declare enum Label {
4
+ Dismiss = "Dismiss"
5
+ }
6
+ export declare const ChipType: {
7
+ readonly CAUTION: "caution";
8
+ readonly INFORMATION: "information";
9
+ readonly NEGATIVE: "negative";
10
+ readonly POSITIVE: "positive";
11
+ };
12
+ export type Props = PropsWithSpread<{
13
+ /**
14
+ * The appearance of the chip.
15
+ */
16
+ appearance?: ValueOf<typeof ChipType>;
17
+ /**
18
+ * The lead for the chip.
19
+ */
20
+ lead?: string;
21
+ /**
22
+ * Function for handling chip div click event.
23
+ */
24
+ onClick?: (event: MouseEvent<HTMLButtonElement> | {
25
+ lead: string;
26
+ value: string;
27
+ }) => void;
28
+ /**
29
+ * Function for handling dismissing a chip.
30
+ */
31
+ onDismiss?: (event: MouseEvent<HTMLButtonElement>) => void;
32
+ /**
33
+ * Whether the chip is selected.
34
+ */
35
+ selected?: boolean;
36
+ /**
37
+ * A substring to emphasise if it is part of the chip's value,
38
+ * e.g. "sit" => poSITive
39
+ */
40
+ subString?: string;
41
+ /**
42
+ * Whether to wrap the value in quotation marks.
43
+ */
44
+ quoteValue?: boolean;
45
+ /**
46
+ * The value of the chip.
47
+ */
48
+ value: string;
49
+ }, HTMLProps<HTMLButtonElement>>;
50
+ /**
51
+ * This is a [React](https://reactjs.org/) component for the Vanilla [Chip](https://vanillaframework.io/docs/patterns/chip).
52
+ *
53
+ * It can be used to display a small value attached to a component.
54
+ */
55
+ declare const Chip: ({ appearance, lead, onClick, onDismiss, quoteValue, selected, subString, value, ...props }: Props) => JSX.Element;
56
+ export default Chip;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Chip";
2
+ export type { Props as ChipProps } from "./Chip";
@@ -0,0 +1,13 @@
1
+ import type { ClassName } from "../../types";
2
+ export type Props = {
3
+ children: string;
4
+ className?: ClassName;
5
+ inline?: boolean;
6
+ copyable?: boolean;
7
+ numbered?: boolean;
8
+ };
9
+ /**
10
+ * @deprecated Code component is deprecated. Use CodeSnippet component or inline `<code>` instead.
11
+ */
12
+ declare const Code: ({ children, className, inline, copyable, numbered, ...props }: Props) => JSX.Element;
13
+ export default Code;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Code";
2
+ export type { Props as CodeProps } from "./Code";
@@ -0,0 +1,21 @@
1
+ import { HTMLProps } from "react";
2
+ import type { Props as CodeSnippetBlockProps } from "./CodeSnippetBlock";
3
+ import type { ClassName, PropsWithSpread } from "../../types";
4
+ export type Props = PropsWithSpread<{
5
+ /**
6
+ * Optional class(es) to pass to the wrapping div element.
7
+ */
8
+ className?: ClassName;
9
+ /**
10
+ * A list of code blocks to display.
11
+ */
12
+ blocks: CodeSnippetBlockProps[];
13
+ }, HTMLProps<HTMLDivElement>>;
14
+ /**
15
+ * This is a [React](https://reactjs.org/) component for the Vanilla [Code snippet](https://docs.vanillaframework.io/base/code#code-snippet).
16
+ *
17
+ * #### Blocks
18
+ *
19
+ * A single `CodeSnippet` component can render multiple separate code blocks. Blocks are provided as an array via the `blocks` prop. Each block object defines values of props for each code block of the snippet.
20
+ */
21
+ export default function CodeSnippet({ className, blocks, ...props }: Props): JSX.Element;
@@ -0,0 +1,40 @@
1
+ import type { ReactNode } from "react";
2
+ import type { Props as CodeSnippetDropdownProps } from "./CodeSnippetDropdown";
3
+ import type { ValueOf } from "../../types";
4
+ export declare const CodeSnippetBlockAppearance: {
5
+ readonly LINUX_PROMPT: "linuxPrompt";
6
+ readonly NUMBERED: "numbered";
7
+ readonly URL: "url";
8
+ readonly WINDOWS_PROMPT: "windowsPrompt";
9
+ };
10
+ export type Props = {
11
+ /**
12
+ * The appearance of the code block.
13
+ */
14
+ appearance?: ValueOf<typeof CodeSnippetBlockAppearance>;
15
+ /**
16
+ * The code snippet to display.
17
+ */
18
+ code: ReactNode;
19
+ /**
20
+ * Content to show below the code snippet.
21
+ */
22
+ content?: ReactNode;
23
+ /**
24
+ * A list of dropdowns to display in the header.
25
+ */
26
+ dropdowns?: CodeSnippetDropdownProps[];
27
+ /**
28
+ * Whether the title should display stacked on top of the dropdowns.
29
+ */
30
+ stacked?: boolean;
31
+ /**
32
+ * The title of the code block.
33
+ */
34
+ title?: string;
35
+ /**
36
+ * Whether to enable line wrapping inside the code block.
37
+ */
38
+ wrapLines?: boolean;
39
+ };
40
+ export default function CodeSnippetBlock({ appearance, code, content, dropdowns, stacked, title, wrapLines, }: Props): JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { ChangeEventHandler, HTMLProps } from "react";
2
+ export type DropdownOptionProps = {
3
+ /**
4
+ * The label of the dropdown option.
5
+ */
6
+ label: string;
7
+ } & HTMLProps<HTMLOptionElement>;
8
+ export type Props = {
9
+ /**
10
+ * Function for handling the select value changing.
11
+ */
12
+ onChange: ChangeEventHandler<HTMLSelectElement>;
13
+ /**
14
+ * Options to pass to the select.
15
+ */
16
+ options: DropdownOptionProps[];
17
+ } & HTMLProps<HTMLSelectElement>;
18
+ export default function CodeSnippetDropdown({ options, onChange, ...props }: Props): JSX.Element;
@@ -0,0 +1,5 @@
1
+ export { default } from "./CodeSnippet";
2
+ export type { Props as CodeSnippetProps } from "./CodeSnippet";
3
+ export { CodeSnippetBlockAppearance } from "./CodeSnippetBlock";
4
+ export type { Props as CodeSnippetBlockProps } from "./CodeSnippetBlock";
5
+ export type { Props as CodeSnippetDropdownProps } from "./CodeSnippetDropdown";
@@ -0,0 +1,53 @@
1
+ import type { ElementType, HTMLProps, ReactNode } from "react";
2
+ import type { ClassName, PropsWithSpread } from "../../types";
3
+ export type ColSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
4
+ export declare const colSizes: ColSize[];
5
+ export type Props = PropsWithSpread<{
6
+ /**
7
+ * The content of the column.
8
+ */
9
+ children?: ReactNode;
10
+ /**
11
+ * Optional class(es) to pass to the wrapping element.
12
+ */
13
+ className?: ClassName;
14
+ /**
15
+ * Optional element type to give the wrapper if not "div".
16
+ */
17
+ element?: ElementType;
18
+ /**
19
+ * The number of columns to skip before starting on large screens.
20
+ */
21
+ emptyLarge?: ColSize;
22
+ /**
23
+ * The number of columns to skip before starting on medium screens.
24
+ */
25
+ emptyMedium?: ColSize;
26
+ /**
27
+ * The number of columns to skip before starting on small screens.
28
+ */
29
+ emptySmall?: ColSize;
30
+ /**
31
+ * Override for the number of columns the content occupies on large screens.
32
+ */
33
+ large?: ColSize;
34
+ /**
35
+ * Override for the number of columns the content occupies on medium screens.
36
+ */
37
+ medium?: ColSize;
38
+ /**
39
+ * The number of columns the content occupies.
40
+ */
41
+ size: ColSize;
42
+ /**
43
+ * Override for the number of columns the content occupies on small screens.
44
+ */
45
+ small?: ColSize;
46
+ }, HTMLProps<HTMLElement>>;
47
+ /**
48
+ * This is a [React](https://reactjs.org/) component for use within the Vanilla [Grid](https://docs.vanillaframework.io/patterns/grid/).
49
+ *
50
+ * Vanilla has a responsive grid using a combination of rows and columns.
51
+ */
52
+ declare const Col: ({ children, className, element: Component, emptyLarge, emptyMedium, emptySmall, large, medium, size, small, ...props }: Props) => JSX.Element;
53
+ export default Col;
@@ -0,0 +1,2 @@
1
+ export { default, colSizes } from "./Col";
2
+ export type { ColSize, Props as ColProps } from "./Col";
@@ -0,0 +1,28 @@
1
+ import { ReactElement } from "react";
2
+ import { PropsWithSpread, SubComponentProps } from "../../types";
3
+ import { ActionButtonProps } from "../ActionButton";
4
+ import { ConfirmationModalProps } from "../ConfirmationModal";
5
+ export type Props = PropsWithSpread<{
6
+ /**
7
+ * Additional props to pass to the confirmation modal.
8
+ */
9
+ confirmationModalProps: SubComponentProps<ConfirmationModalProps>;
10
+ /**
11
+ * An optional text to be shown when hovering over the button.<br/>
12
+ * Defaults to the label of the confirm button in the modal.
13
+ */
14
+ onHoverText?: string;
15
+ /**
16
+ * Whether to enable the SHIFT+Click shortcut to skip the confirmation modal and perform the action.
17
+ */
18
+ shiftClickEnabled?: boolean;
19
+ /**
20
+ * Whether to show a hint about the SHIFT+Click shortcut to skip the confirmation modal.
21
+ */
22
+ showShiftClickHint?: boolean;
23
+ }, ActionButtonProps>;
24
+ /**
25
+ * `ConfirmationButton` is a specialised version of the [ActionButton](?path=/docs/actionbutton--default-story) component that uses a [ConfirmationModal](?path=/docs/confirmationmodal--default-story) to prompt a confirmation from the user before executing an action.
26
+ */
27
+ export declare const ConfirmationButton: ({ confirmationModalProps, onHoverText, shiftClickEnabled, showShiftClickHint, ...actionButtonProps }: Props) => ReactElement;
28
+ export default ConfirmationButton;
@@ -0,0 +1,2 @@
1
+ export { default } from "./ConfirmationButton";
2
+ export type { Props as ConfirmationButtonProps } from "./ConfirmationButton";
@@ -0,0 +1,53 @@
1
+ import { MouseEvent, ReactElement } from "react";
2
+ import type { ReactNode } from "react";
3
+ import { PropsWithSpread, ValueOf } from "../../types";
4
+ import { ButtonAppearance, ButtonProps } from "../Button";
5
+ import { ModalProps } from "../Modal";
6
+ import { ActionButtonProps } from "../ActionButton";
7
+ export type Props = PropsWithSpread<{
8
+ /**
9
+ * Label for the cancel button.
10
+ */
11
+ cancelButtonLabel?: ReactNode;
12
+ /**
13
+ * Additional props to be spread on the cancel button.
14
+ */
15
+ cancelButtonProps?: Partial<ButtonProps>;
16
+ /**
17
+ * The content of the modal.
18
+ */
19
+ children: ReactNode;
20
+ /**
21
+ * Appearance of the confirm button.
22
+ */
23
+ confirmButtonAppearance?: ValueOf<typeof ButtonAppearance> | string;
24
+ /**
25
+ * Label for the confirm button.
26
+ */
27
+ confirmButtonLabel: ReactNode;
28
+ /**
29
+ * Additional props to be spread on the confirm button.
30
+ */
31
+ confirmButtonProps?: Partial<ActionButtonProps>;
32
+ /**
33
+ * Extra elements to be placed in the button row of the modal.
34
+ */
35
+ confirmExtra?: ReactNode;
36
+ /**
37
+ * Function to perform the action prompted by the modal.
38
+ */
39
+ onConfirm: (event: MouseEvent<HTMLElement>) => void;
40
+ /**
41
+ * Whether the confirm button should be in the loading state.
42
+ */
43
+ confirmButtonLoading?: boolean;
44
+ /**
45
+ * Whether the confirm button should be disabled.
46
+ */
47
+ confirmButtonDisabled?: boolean;
48
+ }, Omit<ModalProps, "buttonRow">>;
49
+ /**
50
+ * `ConfirmationModal` is a specialised version of the [Modal](?path=/docs/modal--default-story) component to prompt a confirmation from the user before executing an action.
51
+ */
52
+ export declare const ConfirmationModal: ({ cancelButtonLabel, cancelButtonProps, children, confirmButtonAppearance, confirmButtonLabel, confirmExtra, onConfirm, confirmButtonLoading, confirmButtonDisabled, confirmButtonProps, ...props }: Props) => ReactElement;
53
+ export default ConfirmationModal;
@@ -0,0 +1,2 @@
1
+ export { default } from "./ConfirmationModal";
2
+ export type { Props as ConfirmationModalProps } from "./ConfirmationModal";
@@ -0,0 +1,110 @@
1
+ import React from "react";
2
+ import type { HTMLProps, ReactNode } from "react";
3
+ import type { ButtonProps } from "../Button";
4
+ import type { ContextualMenuDropdownProps } from "./ContextualMenuDropdown";
5
+ import type { MenuLink, Position } from "./ContextualMenuDropdown";
6
+ import { ClassName, ExclusiveProps, PropsWithSpread, SubComponentProps } from "../../types";
7
+ export declare enum Label {
8
+ Toggle = "Toggle menu"
9
+ }
10
+ export type BaseProps<L> = PropsWithSpread<{
11
+ /**
12
+ * Whether the menu should adjust its horizontal position to fit on the screen.
13
+ */
14
+ autoAdjust?: boolean;
15
+ /**
16
+ * The menu content (if the links prop is not supplied).
17
+ */
18
+ children?: ContextualMenuDropdownProps["dropdownContent"];
19
+ /**
20
+ * An optional class to apply to the wrapping element.
21
+ */
22
+ className?: ClassName;
23
+ /**
24
+ * Whether the menu should close when the escape key is pressed.
25
+ */
26
+ closeOnEsc?: boolean;
27
+ /**
28
+ * Whether the menu should close when clicking outside the menu.
29
+ */
30
+ closeOnOutsideClick?: boolean;
31
+ /**
32
+ * Whether the menu's width should match the toggle's width.
33
+ */
34
+ constrainPanelWidth?: boolean;
35
+ /**
36
+ * An optional class to apply to the dropdown.
37
+ */
38
+ dropdownClassName?: string | null;
39
+ /**
40
+ * Additional props to pass to the dropdown.
41
+ */
42
+ dropdownProps?: SubComponentProps<ContextualMenuDropdownProps>;
43
+ /**
44
+ * A list of links to display in the menu (if the children prop is not supplied.)
45
+ */
46
+ links?: MenuLink<L>[] | null;
47
+ /**
48
+ * A function to call when the menu is toggled.
49
+ */
50
+ onToggleMenu?: (isOpen: boolean) => void | null;
51
+ /**
52
+ * The horizontal position of the menu.
53
+ */
54
+ position?: Position | null;
55
+ /**
56
+ * An element to make the menu relative to.
57
+ */
58
+ positionNode?: HTMLElement | null;
59
+ /**
60
+ * Whether the dropdown should scroll if it is too long to fit on the screen.
61
+ */
62
+ scrollOverflow?: boolean;
63
+ /**
64
+ * Whether the menu should be visible.
65
+ */
66
+ visible?: boolean;
67
+ }, HTMLProps<HTMLSpanElement>>;
68
+ /**
69
+ * The props for the ContextualMenu component.
70
+ * @template L - The type of the link props.
71
+ */
72
+ export type Props<L> = BaseProps<L> & ExclusiveProps<{
73
+ /**
74
+ * Whether the toggle should display a chevron icon.
75
+ */
76
+ hasToggleIcon?: boolean;
77
+ /**
78
+ * The appearance of the toggle button.
79
+ */
80
+ toggleAppearance?: ButtonProps["appearance"] | null;
81
+ /**
82
+ * A class to apply to the toggle button.
83
+ */
84
+ toggleClassName?: string | null;
85
+ /**
86
+ * Whether the toggle button should be disabled.
87
+ */
88
+ toggleDisabled?: boolean;
89
+ /**
90
+ * The toggle button's label.
91
+ */
92
+ toggleLabel?: React.ReactNode | null;
93
+ /**
94
+ * Whether the toggle lable or icon should appear first.
95
+ */
96
+ toggleLabelFirst?: boolean;
97
+ /**
98
+ * Additional props to pass to the toggle button.
99
+ */
100
+ toggleProps?: SubComponentProps<ButtonProps>;
101
+ }, {
102
+ toggle: ReactNode;
103
+ }>;
104
+ /**
105
+ * This is a [React](https://reactjs.org/) component for the Vanilla [Contextual menu](https://docs.vanillaframework.io/patterns//contextual-menu/).
106
+ *
107
+ * A contextual menu can be used in conjunction with any page element to provide a contextual menu.
108
+ */
109
+ declare const ContextualMenu: <L>({ autoAdjust, children, className, closeOnEsc, closeOnOutsideClick, constrainPanelWidth, dropdownClassName, dropdownProps, hasToggleIcon, links, onToggleMenu, position, positionNode, scrollOverflow, toggle, toggleAppearance, toggleClassName, toggleDisabled, toggleLabel, toggleLabelFirst, toggleProps, visible, ...wrapperProps }: Props<L>) => JSX.Element;
110
+ export default ContextualMenu;
@@ -0,0 +1,43 @@
1
+ import { ReactElement } from "react";
2
+ import type { HTMLProps, ReactNode } from "react";
3
+ import type { ButtonProps } from "../../Button";
4
+ import type { WindowFitment } from "../../../hooks";
5
+ export declare enum Label {
6
+ Dropdown = "submenu"
7
+ }
8
+ /**
9
+ * The type of the menu links.
10
+ * @template L - The type of the link props.
11
+ */
12
+ export type MenuLink<L = null> = string | ButtonProps<L> | ButtonProps<L>[];
13
+ export type Position = "left" | "center" | "right";
14
+ /**
15
+ * The props for the ContextualMenuDropdown component.
16
+ * @template L - The type of the link props.
17
+ */
18
+ export type Props<L = null> = {
19
+ adjustedPosition?: Position;
20
+ autoAdjust?: boolean;
21
+ handleClose?: (evt?: MouseEvent) => void;
22
+ constrainPanelWidth?: boolean;
23
+ dropdownClassName?: string;
24
+ dropdownContent?: ReactNode | ((close: () => void) => ReactElement);
25
+ id?: string;
26
+ isOpen?: boolean;
27
+ links?: MenuLink<L>[];
28
+ position?: Position;
29
+ positionCoords?: DOMRect;
30
+ positionNode?: HTMLElement;
31
+ scrollOverflow?: boolean;
32
+ setAdjustedPosition?: (position: Position) => void;
33
+ contextualMenuClassName?: string;
34
+ } & HTMLProps<HTMLSpanElement>;
35
+ /**
36
+ * Calculate the adjusted position in relation to the window.
37
+ * @param position - The requested position.
38
+ * @param fitsWindow - The window fitment info.
39
+ * @return The new position.
40
+ */
41
+ export declare const adjustForWindow: (position: Position, fitsWindow: WindowFitment) => Position;
42
+ declare const ContextualMenuDropdown: <L>({ adjustedPosition, autoAdjust, handleClose, constrainPanelWidth, dropdownClassName, dropdownContent, id, isOpen, links, position, positionCoords, positionNode, scrollOverflow, setAdjustedPosition, contextualMenuClassName, ...props }: Props<L>) => JSX.Element;
43
+ export default ContextualMenuDropdown;
@@ -0,0 +1,2 @@
1
+ export { default } from "./ContextualMenuDropdown";
2
+ export type { MenuLink, Position, Props as ContextualMenuDropdownProps, } from "./ContextualMenuDropdown";
@@ -0,0 +1,3 @@
1
+ export { default } from "./ContextualMenu";
2
+ export type { Props as ContextualMenuProps } from "./ContextualMenu";
3
+ export type { ContextualMenuDropdownProps, MenuLink, Position, } from "./ContextualMenuDropdown";
@@ -0,0 +1,25 @@
1
+ import { ReactNode, HTMLProps, ReactElement } from "react";
2
+ import { PropsWithSpread } from "../../types";
3
+ export type Props = PropsWithSpread<{
4
+ /**
5
+ * The content of the empty state.
6
+ */
7
+ children?: ReactNode;
8
+ /**
9
+ * Optional class(es) to add to the wrapping element.
10
+ */
11
+ className?: string;
12
+ /**
13
+ * An image representing the empty state.
14
+ */
15
+ image: ReactNode;
16
+ /**
17
+ * The title of the empty state.
18
+ */
19
+ title: string;
20
+ }, HTMLProps<HTMLDivElement>>;
21
+ /**
22
+ * This is a [React](https://reactjs.org/) component to represent an empty state.
23
+ */
24
+ export declare const EmptyState: ({ children, className, image, title, ...props }: Props) => ReactElement;
25
+ export default EmptyState;
@@ -0,0 +1,2 @@
1
+ export { default } from "./EmptyState";
2
+ export type { Props as EmptyStateProps } from "./EmptyState";