@canonical/react-components 1.2.4 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/README.md +2 -2
  2. package/package.json +9 -6
  3. package/dist/components/Accordion/Accordion.d.ts +0 -46
  4. package/dist/components/Accordion/Accordion.stories.d.ts +0 -18
  5. package/dist/components/Accordion/Accordion.stories.js +0 -117
  6. package/dist/components/Accordion/AccordionSection/AccordionSection.d.ts +0 -34
  7. package/dist/components/Accordion/AccordionSection/index.d.ts +0 -2
  8. package/dist/components/Accordion/index.d.ts +0 -2
  9. package/dist/components/ActionButton/ActionButton.d.ts +0 -48
  10. package/dist/components/ActionButton/ActionButton.stories.d.ts +0 -7
  11. package/dist/components/ActionButton/ActionButton.stories.js +0 -36
  12. package/dist/components/ActionButton/index.d.ts +0 -2
  13. package/dist/components/ApplicationLayout/AppAside/AppAside.d.ts +0 -33
  14. package/dist/components/ApplicationLayout/AppAside/AppAside.stories.d.ts +0 -13
  15. package/dist/components/ApplicationLayout/AppAside/AppAside.stories.js +0 -116
  16. package/dist/components/ApplicationLayout/AppAside/index.d.ts +0 -2
  17. package/dist/components/ApplicationLayout/AppMain/AppMain.d.ts +0 -14
  18. package/dist/components/ApplicationLayout/AppMain/AppMain.stories.d.ts +0 -14
  19. package/dist/components/ApplicationLayout/AppMain/AppMain.stories.js +0 -45
  20. package/dist/components/ApplicationLayout/AppMain/index.d.ts +0 -2
  21. package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.d.ts +0 -26
  22. package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.stories.d.ts +0 -12
  23. package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.stories.js +0 -104
  24. package/dist/components/ApplicationLayout/AppNavigation/index.d.ts +0 -2
  25. package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.d.ts +0 -18
  26. package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.d.ts +0 -15
  27. package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.js +0 -52
  28. package/dist/components/ApplicationLayout/AppNavigationBar/index.d.ts +0 -2
  29. package/dist/components/ApplicationLayout/AppStatus/AppStatus.d.ts +0 -14
  30. package/dist/components/ApplicationLayout/AppStatus/AppStatus.stories.d.ts +0 -13
  31. package/dist/components/ApplicationLayout/AppStatus/AppStatus.stories.js +0 -41
  32. package/dist/components/ApplicationLayout/AppStatus/index.d.ts +0 -2
  33. package/dist/components/ApplicationLayout/Application/Application.d.ts +0 -15
  34. package/dist/components/ApplicationLayout/Application/Application.stories.d.ts +0 -6
  35. package/dist/components/ApplicationLayout/Application/Application.stories.js +0 -16
  36. package/dist/components/ApplicationLayout/Application/index.d.ts +0 -2
  37. package/dist/components/ApplicationLayout/ApplicationLayout.d.ts +0 -89
  38. package/dist/components/ApplicationLayout/ApplicationLayout.stories.d.ts +0 -24
  39. package/dist/components/ApplicationLayout/ApplicationLayout.stories.js +0 -232
  40. package/dist/components/ApplicationLayout/index.d.ts +0 -7
  41. package/dist/components/ArticlePagination/ArticlePagination.d.ts +0 -31
  42. package/dist/components/ArticlePagination/ArticlePagination.stories.d.ts +0 -6
  43. package/dist/components/ArticlePagination/ArticlePagination.stories.js +0 -22
  44. package/dist/components/ArticlePagination/index.d.ts +0 -2
  45. package/dist/components/Badge/Badge.d.ts +0 -34
  46. package/dist/components/Badge/Badge.stories.d.ts +0 -15
  47. package/dist/components/Badge/Badge.stories.js +0 -62
  48. package/dist/components/Badge/index.d.ts +0 -2
  49. package/dist/components/Button/Button.d.ts +0 -64
  50. package/dist/components/Button/Button.stories.d.ts +0 -32
  51. package/dist/components/Button/Button.stories.js +0 -180
  52. package/dist/components/Button/index.d.ts +0 -2
  53. package/dist/components/Card/Card.d.ts +0 -35
  54. package/dist/components/Card/Card.stories.d.ts +0 -33
  55. package/dist/components/Card/Card.stories.js +0 -51
  56. package/dist/components/Card/index.d.ts +0 -2
  57. package/dist/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +0 -27
  58. package/dist/components/CheckboxInput/CheckableInput/index.d.ts +0 -2
  59. package/dist/components/CheckboxInput/CheckboxInput.d.ts +0 -9
  60. package/dist/components/CheckboxInput/CheckboxInput.stories.d.ts +0 -11
  61. package/dist/components/CheckboxInput/CheckboxInput.stories.js +0 -84
  62. package/dist/components/CheckboxInput/index.d.ts +0 -2
  63. package/dist/components/Chip/Chip.d.ts +0 -56
  64. package/dist/components/Chip/Chip.stories.d.ts +0 -9
  65. package/dist/components/Chip/Chip.stories.js +0 -45
  66. package/dist/components/Chip/index.d.ts +0 -2
  67. package/dist/components/Code/Code.d.ts +0 -13
  68. package/dist/components/Code/index.d.ts +0 -2
  69. package/dist/components/CodeSnippet/CodeSnippet.d.ts +0 -21
  70. package/dist/components/CodeSnippet/CodeSnippet.stories.d.ts +0 -45
  71. package/dist/components/CodeSnippet/CodeSnippet.stories.js +0 -279
  72. package/dist/components/CodeSnippet/CodeSnippetBlock.d.ts +0 -40
  73. package/dist/components/CodeSnippet/CodeSnippetDropdown.d.ts +0 -18
  74. package/dist/components/CodeSnippet/index.d.ts +0 -5
  75. package/dist/components/Col/Col.d.ts +0 -53
  76. package/dist/components/Col/Col.stories.d.ts +0 -11
  77. package/dist/components/Col/Col.stories.js +0 -154
  78. package/dist/components/Col/index.d.ts +0 -2
  79. package/dist/components/ConfirmationButton/ConfirmationButton.d.ts +0 -28
  80. package/dist/components/ConfirmationButton/ConfirmationButton.stories.d.ts +0 -9
  81. package/dist/components/ConfirmationButton/ConfirmationButton.stories.js +0 -108
  82. package/dist/components/ConfirmationButton/index.d.ts +0 -2
  83. package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +0 -53
  84. package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -18
  85. package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +0 -135
  86. package/dist/components/ConfirmationModal/index.d.ts +0 -2
  87. package/dist/components/ContextualMenu/ContextualMenu.d.ts +0 -110
  88. package/dist/components/ContextualMenu/ContextualMenu.stories.d.ts +0 -13
  89. package/dist/components/ContextualMenu/ContextualMenu.stories.js +0 -107
  90. package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +0 -43
  91. package/dist/components/ContextualMenu/ContextualMenuDropdown/index.d.ts +0 -2
  92. package/dist/components/ContextualMenu/index.d.ts +0 -3
  93. package/dist/components/EmptyState/EmptyState.d.ts +0 -25
  94. package/dist/components/EmptyState/EmptyState.stories.d.ts +0 -7
  95. package/dist/components/EmptyState/EmptyState.stories.js +0 -49
  96. package/dist/components/EmptyState/index.d.ts +0 -2
  97. package/dist/components/Field/Field.d.ts +0 -77
  98. package/dist/components/Field/index.d.ts +0 -2
  99. package/dist/components/Form/Form.d.ts +0 -21
  100. package/dist/components/Form/Form.stories.d.ts +0 -12
  101. package/dist/components/Form/Form.stories.js +0 -179
  102. package/dist/components/Form/index.d.ts +0 -2
  103. package/dist/components/FormikField/FormikField.d.ts +0 -25
  104. package/dist/components/FormikField/FormikField.stories.d.ts +0 -8
  105. package/dist/components/FormikField/FormikField.stories.js +0 -85
  106. package/dist/components/FormikField/index.d.ts +0 -1
  107. package/dist/components/Icon/Icon.d.ts +0 -59
  108. package/dist/components/Icon/Icon.stories.d.ts +0 -16
  109. package/dist/components/Icon/Icon.stories.js +0 -49
  110. package/dist/components/Icon/index.d.ts +0 -2
  111. package/dist/components/Input/Input.d.ts +0 -70
  112. package/dist/components/Input/Input.stories.d.ts +0 -14
  113. package/dist/components/Input/Input.stories.js +0 -148
  114. package/dist/components/Input/index.d.ts +0 -2
  115. package/dist/components/Label/Label.d.ts +0 -25
  116. package/dist/components/Label/index.d.ts +0 -2
  117. package/dist/components/Link/Link.d.ts +0 -31
  118. package/dist/components/Link/Link.stories.d.ts +0 -9
  119. package/dist/components/Link/Link.stories.js +0 -48
  120. package/dist/components/Link/index.d.ts +0 -2
  121. package/dist/components/List/List.d.ts +0 -36
  122. package/dist/components/List/List.stories.d.ts +0 -15
  123. package/dist/components/List/List.stories.js +0 -122
  124. package/dist/components/List/index.d.ts +0 -2
  125. package/dist/components/Loader/Loader.d.ts +0 -6
  126. package/dist/components/Loader/index.d.ts +0 -1
  127. package/dist/components/LoginPageLayout/LoginPageLayout.d.ts +0 -17
  128. package/dist/components/LoginPageLayout/LoginPageLayout.stories.d.ts +0 -9
  129. package/dist/components/LoginPageLayout/LoginPageLayout.stories.js +0 -58
  130. package/dist/components/LoginPageLayout/index.d.ts +0 -2
  131. package/dist/components/MainTable/MainTable.d.ts +0 -102
  132. package/dist/components/MainTable/MainTable.stories.d.ts +0 -15
  133. package/dist/components/MainTable/MainTable.stories.js +0 -553
  134. package/dist/components/MainTable/index.d.ts +0 -2
  135. package/dist/components/Modal/Modal.d.ts +0 -36
  136. package/dist/components/Modal/Modal.stories.d.ts +0 -6
  137. package/dist/components/Modal/Modal.stories.js +0 -57
  138. package/dist/components/Modal/index.d.ts +0 -2
  139. package/dist/components/ModularTable/ModularTable.d.ts +0 -105
  140. package/dist/components/ModularTable/ModularTable.stories.d.ts +0 -27
  141. package/dist/components/ModularTable/ModularTable.stories.js +0 -343
  142. package/dist/components/ModularTable/index.d.ts +0 -2
  143. package/dist/components/MultiSelect/FadeInDown/FadeInDown.d.ts +0 -10
  144. package/dist/components/MultiSelect/FadeInDown/index.d.ts +0 -1
  145. package/dist/components/MultiSelect/MultiSelect.d.ts +0 -57
  146. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -8
  147. package/dist/components/MultiSelect/MultiSelect.stories.js +0 -70
  148. package/dist/components/MultiSelect/index.d.ts +0 -1
  149. package/dist/components/Navigation/Navigation.d.ts +0 -66
  150. package/dist/components/Navigation/Navigation.stories.d.ts +0 -43
  151. package/dist/components/Navigation/Navigation.stories.js +0 -232
  152. package/dist/components/Navigation/NavigationLink/NavigationLink.d.ts +0 -10
  153. package/dist/components/Navigation/NavigationLink/index.d.ts +0 -1
  154. package/dist/components/Navigation/NavigationMenu/NavigationMenu.d.ts +0 -11
  155. package/dist/components/Navigation/NavigationMenu/index.d.ts +0 -1
  156. package/dist/components/Navigation/index.d.ts +0 -3
  157. package/dist/components/Navigation/types.d.ts +0 -64
  158. package/dist/components/Notification/Notification.d.ts +0 -110
  159. package/dist/components/Notification/Notification.stories.d.ts +0 -45
  160. package/dist/components/Notification/Notification.stories.js +0 -201
  161. package/dist/components/Notification/index.d.ts +0 -2
  162. package/dist/components/NotificationProvider/NotificationProvider.d.ts +0 -5
  163. package/dist/components/NotificationProvider/index.d.ts +0 -3
  164. package/dist/components/NotificationProvider/messageBuilder.d.ts +0 -6
  165. package/dist/components/NotificationProvider/types.d.ts +0 -35
  166. package/dist/components/Pagination/Pagination.d.ts +0 -102
  167. package/dist/components/Pagination/Pagination.stories.d.ts +0 -14
  168. package/dist/components/Pagination/Pagination.stories.js +0 -94
  169. package/dist/components/Pagination/PaginationButton/PaginationButton.d.ts +0 -30
  170. package/dist/components/Pagination/PaginationButton/index.d.ts +0 -2
  171. package/dist/components/Pagination/PaginationItem/PaginationItem.d.ts +0 -17
  172. package/dist/components/Pagination/PaginationItem/index.d.ts +0 -2
  173. package/dist/components/Pagination/index.d.ts +0 -2
  174. package/dist/components/Panel/Panel.d.ts +0 -123
  175. package/dist/components/Panel/Panel.stories.d.ts +0 -17
  176. package/dist/components/Panel/Panel.stories.js +0 -60
  177. package/dist/components/Panel/index.d.ts +0 -1
  178. package/dist/components/PasswordToggle/PasswordToggle.d.ts +0 -108
  179. package/dist/components/PasswordToggle/PasswordToggle.stories.d.ts +0 -12
  180. package/dist/components/PasswordToggle/PasswordToggle.stories.js +0 -74
  181. package/dist/components/PasswordToggle/index.d.ts +0 -2
  182. package/dist/components/RadioInput/RadioInput.d.ts +0 -9
  183. package/dist/components/RadioInput/RadioInput.stories.d.ts +0 -10
  184. package/dist/components/RadioInput/RadioInput.stories.js +0 -83
  185. package/dist/components/RadioInput/index.d.ts +0 -2
  186. package/dist/components/Row/Row.d.ts +0 -19
  187. package/dist/components/Row/Row.stories.d.ts +0 -9
  188. package/dist/components/Row/Row.stories.js +0 -29
  189. package/dist/components/Row/index.d.ts +0 -2
  190. package/dist/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +0 -25
  191. package/dist/components/SearchAndFilter/FilterPanelSection/index.d.ts +0 -1
  192. package/dist/components/SearchAndFilter/SearchAndFilter.d.ts +0 -33
  193. package/dist/components/SearchAndFilter/SearchAndFilter.stories.d.ts +0 -8
  194. package/dist/components/SearchAndFilter/SearchAndFilter.stories.js +0 -218
  195. package/dist/components/SearchAndFilter/index.d.ts +0 -2
  196. package/dist/components/SearchAndFilter/types.d.ts +0 -11
  197. package/dist/components/SearchAndFilter/utils.d.ts +0 -13
  198. package/dist/components/SearchBox/SearchBox.d.ts +0 -63
  199. package/dist/components/SearchBox/SearchBox.stories.d.ts +0 -14
  200. package/dist/components/SearchBox/SearchBox.stories.js +0 -106
  201. package/dist/components/SearchBox/index.d.ts +0 -2
  202. package/dist/components/Select/Select.d.ts +0 -71
  203. package/dist/components/Select/Select.stories.d.ts +0 -7
  204. package/dist/components/Select/Select.stories.js +0 -97
  205. package/dist/components/Select/index.d.ts +0 -2
  206. package/dist/components/SideNavigation/SideNavigation.d.ts +0 -50
  207. package/dist/components/SideNavigation/SideNavigation.stories.d.ts +0 -14
  208. package/dist/components/SideNavigation/SideNavigation.stories.js +0 -62
  209. package/dist/components/SideNavigation/SideNavigationBase/SideNavigationBase.d.ts +0 -31
  210. package/dist/components/SideNavigation/SideNavigationBase/index.d.ts +0 -1
  211. package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.d.ts +0 -20
  212. package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.d.ts +0 -22
  213. package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.js +0 -70
  214. package/dist/components/SideNavigation/SideNavigationItem/index.d.ts +0 -1
  215. package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.d.ts +0 -21
  216. package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.stories.d.ts +0 -7
  217. package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.stories.js +0 -32
  218. package/dist/components/SideNavigation/SideNavigationLink/index.d.ts +0 -1
  219. package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.d.ts +0 -7
  220. package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.stories.d.ts +0 -6
  221. package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.stories.js +0 -25
  222. package/dist/components/SideNavigation/SideNavigationText/index.d.ts +0 -1
  223. package/dist/components/SideNavigation/index.d.ts +0 -5
  224. package/dist/components/Slider/Slider.d.ts +0 -62
  225. package/dist/components/Slider/Slider.stories.d.ts +0 -10
  226. package/dist/components/Slider/Slider.stories.js +0 -74
  227. package/dist/components/Slider/index.d.ts +0 -2
  228. package/dist/components/Spinner/Spinner.d.ts +0 -29
  229. package/dist/components/Spinner/Spinner.stories.d.ts +0 -8
  230. package/dist/components/Spinner/Spinner.stories.js +0 -28
  231. package/dist/components/Spinner/index.d.ts +0 -2
  232. package/dist/components/StatusLabel/StatusLabel.d.ts +0 -33
  233. package/dist/components/StatusLabel/StatusLabel.stories.d.ts +0 -10
  234. package/dist/components/StatusLabel/StatusLabel.stories.js +0 -61
  235. package/dist/components/StatusLabel/index.d.ts +0 -2
  236. package/dist/components/Strip/Strip.d.ts +0 -64
  237. package/dist/components/Strip/Strip.stories.d.ts +0 -12
  238. package/dist/components/Strip/Strip.stories.js +0 -130
  239. package/dist/components/Strip/index.d.ts +0 -2
  240. package/dist/components/SummaryButton/SummaryButton.d.ts +0 -29
  241. package/dist/components/SummaryButton/SummaryButton.stories.d.ts +0 -18
  242. package/dist/components/SummaryButton/SummaryButton.stories.js +0 -59
  243. package/dist/components/SummaryButton/index.d.ts +0 -2
  244. package/dist/components/Switch/Switch.d.ts +0 -17
  245. package/dist/components/Switch/Switch.stories.d.ts +0 -7
  246. package/dist/components/Switch/Switch.stories.js +0 -26
  247. package/dist/components/Switch/index.d.ts +0 -2
  248. package/dist/components/Table/Table.d.ts +0 -22
  249. package/dist/components/Table/index.d.ts +0 -2
  250. package/dist/components/TableCell/TableCell.d.ts +0 -26
  251. package/dist/components/TableCell/index.d.ts +0 -2
  252. package/dist/components/TableHeader/TableHeader.d.ts +0 -14
  253. package/dist/components/TableHeader/index.d.ts +0 -2
  254. package/dist/components/TablePagination/TablePagination.d.ts +0 -98
  255. package/dist/components/TablePagination/TablePagination.stories.d.ts +0 -14
  256. package/dist/components/TablePagination/TablePagination.stories.js +0 -330
  257. package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +0 -24
  258. package/dist/components/TablePagination/TablePaginationControls/index.d.ts +0 -2
  259. package/dist/components/TablePagination/index.d.ts +0 -2
  260. package/dist/components/TablePagination/utils.d.ts +0 -27
  261. package/dist/components/TableRow/TableRow.d.ts +0 -10
  262. package/dist/components/TableRow/index.d.ts +0 -2
  263. package/dist/components/Tabs/Tabs.d.ts +0 -45
  264. package/dist/components/Tabs/Tabs.stories.d.ts +0 -11
  265. package/dist/components/Tabs/Tabs.stories.js +0 -56
  266. package/dist/components/Tabs/index.d.ts +0 -2
  267. package/dist/components/Textarea/Textarea.d.ts +0 -70
  268. package/dist/components/Textarea/Textarea.stories.d.ts +0 -7
  269. package/dist/components/Textarea/Textarea.stories.js +0 -62
  270. package/dist/components/Textarea/index.d.ts +0 -2
  271. package/dist/components/Tooltip/Tooltip.d.ts +0 -75
  272. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -12
  273. package/dist/components/Tooltip/Tooltip.stories.js +0 -71
  274. package/dist/components/Tooltip/index.d.ts +0 -2
  275. package/dist/enums.d.ts +0 -13
  276. package/dist/hooks/index.d.ts +0 -9
  277. package/dist/hooks/useId.d.ts +0 -4
  278. package/dist/hooks/useListener.d.ts +0 -11
  279. package/dist/hooks/useOnClickOutside.d.ts +0 -12
  280. package/dist/hooks/useOnEscapePressed.d.ts +0 -6
  281. package/dist/hooks/usePagination.d.ts +0 -19
  282. package/dist/hooks/usePrevious.d.ts +0 -7
  283. package/dist/hooks/useThrottle.d.ts +0 -9
  284. package/dist/hooks/useWindowFitment.d.ts +0 -54
  285. package/dist/index.d.ts +0 -132
  286. package/dist/types/index.d.ts +0 -38
  287. package/dist/utils.d.ts +0 -27
@@ -1,232 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.NoNavigation = exports.Navigation = exports.ExternalStates = exports.Default = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _Form = _interopRequireDefault(require("../Form"));
9
- var _Input = _interopRequireDefault(require("../Input"));
10
- var _Button = _interopRequireDefault(require("../Button"));
11
- var _Row = _interopRequireDefault(require("../Row"));
12
- var _Col = _interopRequireDefault(require("../Col"));
13
- var _ApplicationLayout = _interopRequireDefault(require("./ApplicationLayout"));
14
- var _AppAside = _interopRequireDefault(require("./AppAside"));
15
- var _Panel = _interopRequireDefault(require("../Panel"));
16
- var _Icon = _interopRequireDefault(require("../Icon"));
17
- var _SideNavigation = _interopRequireDefault(require("../SideNavigation"));
18
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
- /* eslint-disable react-hooks/rules-of-hooks */
22
-
23
- const meta = {
24
- component: _ApplicationLayout.default,
25
- tags: ["autodocs"]
26
- };
27
- var _default = exports.default = meta;
28
- const Default = exports.Default = {
29
- render: () => {
30
- const [showAside, setShowAside] = (0, _react.useState)(true);
31
- const [asidePinned, setAsidePinned] = (0, _react.useState)(false);
32
- return /*#__PURE__*/_react.default.createElement(_ApplicationLayout.default, {
33
- logo: {
34
- icon: "https://assets.ubuntu.com/v1/7144ec6d-logo-jaas-icon.svg",
35
- name: "https://assets.ubuntu.com/v1/2e04d794-logo-jaas.svg",
36
- nameAlt: "JAAS",
37
- href: "/"
38
- },
39
- navItems: [{
40
- items: [{
41
- icon: "drag",
42
- label: "Models",
43
- href: "/models"
44
- }, {
45
- icon: "menu",
46
- label: "Controllers",
47
- href: "/controllers"
48
- }, {
49
- icon: "user",
50
- label: "Permissions",
51
- href: "/users"
52
- }]
53
- }],
54
- aside: showAside ? /*#__PURE__*/_react.default.createElement(_AppAside.default, {
55
- pinned: asidePinned
56
- }, /*#__PURE__*/_react.default.createElement(_Panel.default, {
57
- title: "Aside panel",
58
- controls: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {
59
- onClick: () => setAsidePinned(!asidePinned),
60
- dense: true,
61
- className: "u-no-margin"
62
- }, "Pin aside"), /*#__PURE__*/_react.default.createElement(_Button.default, {
63
- appearance: "base",
64
- className: "u-no-margin--bottom",
65
- hasIcon: true,
66
- onClick: () => {
67
- setShowAside(false);
68
- setAsidePinned(false);
69
- }
70
- }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
71
- name: "close"
72
- }, "Close")))
73
- }, /*#__PURE__*/_react.default.createElement(_Form.default, {
74
- stacked: true
75
- }, /*#__PURE__*/_react.default.createElement(_Input.default, {
76
- label: "Full name",
77
- type: "text",
78
- name: "fullName",
79
- autoComplete: "name",
80
- stacked: true
81
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
82
- label: "Username",
83
- type: "text",
84
- name: "username-stacked",
85
- autoComplete: "username",
86
- "aria-describedby": "exampleHelpTextMessage",
87
- stacked: true,
88
- help: "30 characters or fewer."
89
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
90
- type: "text",
91
- label: "Email address",
92
- "aria-invalid": "true",
93
- name: "username-stackederror",
94
- autoComplete: "email",
95
- required: true,
96
- error: "This field is required.",
97
- stacked: true
98
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
99
- label: "Address line 1",
100
- type: "text",
101
- name: "address-optional-stacked",
102
- autoComplete: "address-line1",
103
- stacked: true
104
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
105
- label: "Address line 2",
106
- type: "text",
107
- name: "address-optional-stacked",
108
- autoComplete: "address-line3",
109
- stacked: true
110
- }), /*#__PURE__*/_react.default.createElement(_Row.default, null, /*#__PURE__*/_react.default.createElement(_Col.default, {
111
- size: 12
112
- }, /*#__PURE__*/_react.default.createElement(_Button.default, {
113
- appearance: "positive",
114
- className: "u-float-right",
115
- name: "add-details"
116
- }, "Add details")))))) : null,
117
- status: /*#__PURE__*/_react.default.createElement(_Button.default, {
118
- onClick: () => setShowAside(!showAside),
119
- dense: true,
120
- appearance: "base",
121
- className: "u-no-margin"
122
- }, "Toggle aside")
123
- }, /*#__PURE__*/_react.default.createElement(_Panel.default, {
124
- title: "Application Layout"
125
- }, /*#__PURE__*/_react.default.createElement(_Row.default, null, /*#__PURE__*/_react.default.createElement(_Col.default, {
126
- size: 12
127
- }, "Content"))));
128
- }
129
- };
130
-
131
- /**
132
- * The pinned and collapsed states can be handled externally if you need access
133
- * to these outside the application layout.
134
- */
135
- const ExternalStates = exports.ExternalStates = {
136
- render: () => {
137
- const [menuPinned, setMenuPinned] = (0, _react.useState)(false);
138
- const [menuCollapsed, setMenuCollapsed] = (0, _react.useState)(true);
139
- return /*#__PURE__*/_react.default.createElement(_ApplicationLayout.default, {
140
- menuPinned: menuPinned,
141
- onPinMenu: setMenuPinned,
142
- menuCollapsed: menuCollapsed,
143
- onCollapseMenu: setMenuCollapsed,
144
- logo: {
145
- icon: "https://assets.ubuntu.com/v1/7144ec6d-logo-jaas-icon.svg",
146
- name: "https://assets.ubuntu.com/v1/2e04d794-logo-jaas.svg",
147
- nameAlt: "JAAS",
148
- href: "/"
149
- },
150
- navItems: [{
151
- items: [{
152
- icon: "drag",
153
- label: "Models",
154
- href: "/models"
155
- }, {
156
- icon: "menu",
157
- label: "Controllers",
158
- href: "/controllers"
159
- }, {
160
- icon: "user",
161
- label: "Permissions",
162
- href: "/users"
163
- }]
164
- }]
165
- }, /*#__PURE__*/_react.default.createElement(_Panel.default, {
166
- title: "Application Layout"
167
- }, /*#__PURE__*/_react.default.createElement(_Row.default, null, /*#__PURE__*/_react.default.createElement(_Col.default, {
168
- size: 12
169
- }, "Content"))));
170
- }
171
- };
172
-
173
- /**
174
- * Menu items can either be provided as an array given to `navItems` or when
175
- * more control is needed then by proving `sideNavigation`.
176
- *
177
- * For more details about how to provide navigation items see the
178
- * [`SideNavigation`](/docs/components-sidenavigation--docs) docs.
179
- */
180
- const Navigation = exports.Navigation = {
181
- render: () => {
182
- const [menuPinned, setMenuPinned] = (0, _react.useState)(false);
183
- const [menuCollapsed, setMenuCollapsed] = (0, _react.useState)(true);
184
- return /*#__PURE__*/_react.default.createElement(_ApplicationLayout.default, {
185
- menuPinned: menuPinned,
186
- onPinMenu: setMenuPinned,
187
- menuCollapsed: menuCollapsed,
188
- onCollapseMenu: setMenuCollapsed,
189
- logo: {
190
- icon: "https://assets.ubuntu.com/v1/7144ec6d-logo-jaas-icon.svg",
191
- name: "https://assets.ubuntu.com/v1/2e04d794-logo-jaas.svg",
192
- nameAlt: "JAAS",
193
- href: "/"
194
- },
195
- sideNavigation: /*#__PURE__*/_react.default.createElement(_SideNavigation.default, {
196
- items: [{
197
- items: [{
198
- icon: "drag",
199
- label: "Models",
200
- href: "/models"
201
- }, {
202
- icon: "menu",
203
- label: "Controllers",
204
- href: "/controllers"
205
- }, {
206
- icon: "user",
207
- label: "Permissions",
208
- href: "/users"
209
- }]
210
- }]
211
- })
212
- }, /*#__PURE__*/_react.default.createElement(_Panel.default, {
213
- title: "Application Layout"
214
- }, /*#__PURE__*/_react.default.createElement(_Row.default, null, /*#__PURE__*/_react.default.createElement(_Col.default, {
215
- size: 12
216
- }, "Content"))));
217
- }
218
- };
219
-
220
- /**
221
- * App navigation can also be completely opted out of, for some
222
- * particular scenarios (e.g. login page, error pages).
223
- */
224
- const NoNavigation = exports.NoNavigation = {
225
- render: () => {
226
- return /*#__PURE__*/_react.default.createElement(_ApplicationLayout.default, null, /*#__PURE__*/_react.default.createElement(_Panel.default, {
227
- title: "Application Layout with no navigation"
228
- }, /*#__PURE__*/_react.default.createElement(_Row.default, null, /*#__PURE__*/_react.default.createElement(_Col.default, {
229
- size: 12
230
- }, "Content"))));
231
- }
232
- };
@@ -1,7 +0,0 @@
1
- export { default, type Props as ApplicationLayoutProps, } from "./ApplicationLayout";
2
- export { default as AppAside, type AppAsideProps } from "./AppAside";
3
- export { default as Application, type ApplicationProps } from "./Application";
4
- export { default as AppMain, type AppMainProps } from "./AppMain";
5
- export { default as AppNavigation, type AppNavigationProps, } from "./AppNavigation";
6
- export { default as AppNavigationBar, type AppNavigationBarProps, } from "./AppNavigationBar";
7
- export { default as AppStatus, type AppStatusProps } from "./AppStatus";
@@ -1,31 +0,0 @@
1
- import type { HTMLProps } from "react";
2
- import type { ClassName, PropsWithSpread } from "../../types";
3
- export type Props = PropsWithSpread<{
4
- /**
5
- * Optional classes to add to the wrapping element.
6
- */
7
- className?: ClassName;
8
- /**
9
- * The URL for the next link.
10
- */
11
- nextURL?: string;
12
- /**
13
- * The label for the next link.
14
- */
15
- nextLabel?: string;
16
- /**
17
- * The URL for the previous link.
18
- */
19
- previousURL?: string;
20
- /**
21
- * The label for the previous link.
22
- */
23
- previousLabel?: string;
24
- }, HTMLProps<HTMLElement>>;
25
- /**
26
- * This is a [React](https://reactjs.org/) component for the Vanilla [Article pagination](https://docs.vanillaframework.io/patterns/article-pagination/).
27
- *
28
- * The article pagination component should be used to navigate from one article to the next, or previous, in chronological order.
29
- */
30
- declare const ArticlePagination: ({ className, nextURL, nextLabel, previousURL, previousLabel, ...props }: Props) => JSX.Element;
31
- export default ArticlePagination;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import ArticlePagination from "./ArticlePagination";
3
- declare const meta: Meta<typeof ArticlePagination>;
4
- export default meta;
5
- type Story = StoryObj<typeof ArticlePagination>;
6
- export declare const Default: Story;
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Default = void 0;
7
- var _ArticlePagination = _interopRequireDefault(require("./ArticlePagination"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- const meta = {
10
- component: _ArticlePagination.default,
11
- tags: ["autodocs"]
12
- };
13
- var _default = exports.default = meta;
14
- const Default = exports.Default = {
15
- name: "Default",
16
- args: {
17
- nextLabel: "Consectetur adipisicing elit",
18
- nextURL: "#next",
19
- previousLabel: "Lorem ipsum dolor sit amet",
20
- previousURL: "#previous"
21
- }
22
- };
@@ -1,2 +0,0 @@
1
- export { default } from "./ArticlePagination";
2
- export type { Props as ArticlePaginationProps } from "./ArticlePagination";
@@ -1,34 +0,0 @@
1
- import { HTMLProps } from "react";
2
- import type { ClassName, PropsWithSpread, ValueOf } from "../../types";
3
- export declare const BadgeType: {
4
- readonly ROUNDED_LARGE_NUMBER: "ROUNDED_LARGE_NUMBER";
5
- readonly UNDEFINED_LARGE_NUMBER: "UNDEFINED_LARGE_NUMBER";
6
- };
7
- /**
8
- * The props for the Badge component.
9
- */
10
- export type Props = PropsWithSpread<{
11
- /**
12
- * Numeric value to be displayed.
13
- */
14
- value: number;
15
- /**
16
- * The type of the badge component.
17
- */
18
- badgeType?: ValueOf<typeof BadgeType>;
19
- /**
20
- * The appearance of the badge.
21
- */
22
- isNegative?: boolean;
23
- /**
24
- * Optional class(es) to give to the badge.
25
- */
26
- className?: ClassName;
27
- }, HTMLProps<HTMLSpanElement>>;
28
- /**
29
- * This is a [React](https://reactjs.org/) component for the Vanilla [Badge](https://vanillaframework.io/docs/patterns/badge).
30
- *
31
- * It can be used to display a numeric values.
32
- */
33
- declare const Badge: ({ value, badgeType, className, isNegative, ...spanProps }: Props) => JSX.Element;
34
- export default Badge;
@@ -1,15 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import Badge from "./Badge";
3
- declare const meta: Meta<typeof Badge>;
4
- export default meta;
5
- type Story = StoryObj<typeof Badge>;
6
- export declare const Default: Story;
7
- export declare const ColourCoding: Story;
8
- /**
9
- * When the amount of items is only relevant for small values, this variant should be used. When the value grows further than 999, the badge should show "999+".
10
- */
11
- export declare const UndefinedLargeNumber: Story;
12
- /**
13
- * When the value of the badge represents a type of information where differences between large amounts of items are relevant, it should include a decimal unit prefix and round the value.
14
- */
15
- export declare const RoundedLargeNumber: Story;
@@ -1,62 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.UndefinedLargeNumber = exports.RoundedLargeNumber = exports.Default = exports.ColourCoding = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _Badge = _interopRequireWildcard(require("./Badge"));
9
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
10
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const meta = {
13
- component: _Badge.default,
14
- tags: ["autodocs"],
15
- argTypes: {
16
- badgeType: {
17
- control: {
18
- options: _Badge.BadgeType,
19
- type: "select"
20
- }
21
- }
22
- },
23
- args: {
24
- badgeType: _Badge.BadgeType.UNDEFINED_LARGE_NUMBER
25
- }
26
- };
27
- var _default = exports.default = meta;
28
- const Default = exports.Default = {
29
- name: "Default",
30
- args: {
31
- value: 9
32
- }
33
- };
34
- const ColourCoding = exports.ColourCoding = {
35
- render: () => /*#__PURE__*/_react.default.createElement(_Badge.default, {
36
- value: 9,
37
- isNegative: true
38
- }),
39
- name: "Colour Coding"
40
- };
41
-
42
- /**
43
- * When the amount of items is only relevant for small values, this variant should be used. When the value grows further than 999, the badge should show "999+".
44
- */
45
- const UndefinedLargeNumber = exports.UndefinedLargeNumber = {
46
- render: () => /*#__PURE__*/_react.default.createElement(_Badge.default, {
47
- value: 1000,
48
- badgeType: _Badge.BadgeType.UNDEFINED_LARGE_NUMBER
49
- }),
50
- name: "Undefined Large Number"
51
- };
52
-
53
- /**
54
- * When the value of the badge represents a type of information where differences between large amounts of items are relevant, it should include a decimal unit prefix and round the value.
55
- */
56
- const RoundedLargeNumber = exports.RoundedLargeNumber = {
57
- render: () => /*#__PURE__*/_react.default.createElement(_Badge.default, {
58
- value: 1234,
59
- badgeType: _Badge.BadgeType.ROUNDED_LARGE_NUMBER
60
- }),
61
- name: "Rounded Large Number"
62
- };
@@ -1,2 +0,0 @@
1
- export { default } from "./Badge";
2
- export type { Props as BadgeProps } from "./Badge";
@@ -1,64 +0,0 @@
1
- import type { ButtonHTMLAttributes, ComponentType, ElementType, MouseEventHandler, ReactNode } from "react";
2
- import type { ClassName, ValueOf } from "../../types";
3
- export declare const ButtonAppearance: {
4
- readonly BASE: "base";
5
- readonly BRAND: "brand";
6
- readonly DEFAULT: "";
7
- readonly LINK: "link";
8
- readonly NEGATIVE: "negative";
9
- readonly POSITIVE: "positive";
10
- };
11
- /**
12
- * The type of the Button props.
13
- * @template P - The type of the props if providing a component to `element`
14
- */
15
- export type Props<P = null> = {
16
- /**
17
- * The appearance of the button.
18
- */
19
- appearance?: ValueOf<typeof ButtonAppearance> | string;
20
- /**
21
- * The content of the button.
22
- */
23
- children?: ReactNode;
24
- /**
25
- * Optional class(es) to pass to the button element.
26
- */
27
- className?: ClassName;
28
- /**
29
- * Whether the button should have dense padding.
30
- */
31
- dense?: boolean;
32
- /**
33
- * Whether the button should be disabled.
34
- */
35
- disabled?: boolean;
36
- /**
37
- * Optional element or component to use instead of `button`.
38
- */
39
- element?: ElementType | ComponentType<P>;
40
- /**
41
- * Whether the button has an icon in the content.
42
- */
43
- hasIcon?: boolean;
44
- /**
45
- * Whether the button should display inline.
46
- */
47
- inline?: boolean;
48
- /**
49
- * Function for handling button click event.
50
- */
51
- onClick?: MouseEventHandler<HTMLButtonElement>;
52
- /**
53
- * Whether the button should be small.
54
- */
55
- small?: boolean;
56
- } & (Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onClick"> | P);
57
- /**
58
- * This is a [React](https://reactjs.org/) component for the Vanilla [Button](https://docs.vanillaframework.io/patterns/buttons/).
59
- *
60
- * Buttons are clickable elements used to perform an action, they can be used for buttons and link elements.
61
- * @template P - The type of the props if providing a component to `element`
62
- */
63
- declare const Button: <P>({ appearance, children, className, dense, disabled, element: Component, hasIcon, inline, onClick, small, ...buttonProps }: Props<P>) => JSX.Element;
64
- export default Button;
@@ -1,32 +0,0 @@
1
- import { HTMLProps } from "react";
2
- import { Meta, StoryObj } from "@storybook/react";
3
- import Button from "./Button";
4
- declare const meta: Meta<typeof Button>;
5
- export default meta;
6
- type Story<P = null> = StoryObj<typeof Button<P>>;
7
- export declare const Default: Story;
8
- export declare const DefaultDisabled: Story;
9
- export declare const Base: Story;
10
- export declare const BaseDisabled: Story;
11
- export declare const Link: {
12
- name: string;
13
- args: {
14
- children: string;
15
- appearance: string;
16
- element: string;
17
- href: string;
18
- };
19
- };
20
- export declare const LinkDisabled: Story<HTMLProps<HTMLAnchorElement>>;
21
- export declare const Positive: Story;
22
- export declare const PositiveDisabled: Story;
23
- export declare const Negative: Story;
24
- export declare const NegativeDisabled: Story;
25
- export declare const Brand: Story;
26
- export declare const BrandDisabled: Story;
27
- export declare const Inline: Story;
28
- export declare const Dense: Story;
29
- export declare const Small: Story;
30
- export declare const Icon: Story;
31
- export declare const IconText: Story;
32
- export declare const IconWithTooltip: Story;