@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,49 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.WithContent = exports.Default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _EmptyState = _interopRequireDefault(require("./EmptyState"));
9
- var _Icon = _interopRequireWildcard(require("../Icon"));
10
- var _Button = _interopRequireDefault(require("../Button"));
11
- 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); }
12
- 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; }
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- const boxImage = /*#__PURE__*/_react.default.createElement("img", {
15
- src: "https://assets.ubuntu.com/v1/c17e0d92-container.svg",
16
- style: {
17
- maxWidth: "10rem",
18
- maxHeight: "10rem"
19
- },
20
- alt: "empty state"
21
- });
22
- const doNothing = () => {};
23
- const meta = {
24
- component: _EmptyState.default,
25
- tags: ["autodocs"]
26
- };
27
- var _default = exports.default = meta;
28
- const Default = exports.Default = {
29
- render: () => /*#__PURE__*/_react.default.createElement(_EmptyState.default, {
30
- image: boxImage,
31
- title: "This application doesn't have any configuration parameters"
32
- }),
33
- name: "Default"
34
- };
35
- const WithContent = exports.WithContent = {
36
- render: () => /*#__PURE__*/_react.default.createElement(_EmptyState.default, {
37
- image: boxImage,
38
- title: "No instances found"
39
- }, /*#__PURE__*/_react.default.createElement("p", null, "There are no instances in this project. Spin up your first instance!"), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("a", {
40
- href: "#todo",
41
- target: "_blank"
42
- }, "How to create instances", /*#__PURE__*/_react.default.createElement(_Icon.default, {
43
- name: _Icon.ICONS.externalLink
44
- }))), /*#__PURE__*/_react.default.createElement(_Button.default, {
45
- appearance: "positive",
46
- onClick: doNothing
47
- }, "Create instance")),
48
- name: "With content"
49
- };
@@ -1,2 +0,0 @@
1
- export { default } from "./EmptyState";
2
- export type { Props as EmptyStateProps } from "./EmptyState";
@@ -1,77 +0,0 @@
1
- import type { ReactNode } from "react";
2
- import type { ClassName } from "../../types";
3
- /**
4
- * The props for the Field component.
5
- */
6
- export type Props = {
7
- /**
8
- * The content for caution validation.
9
- */
10
- caution?: ReactNode;
11
- /**
12
- * The content of the Field component.
13
- */
14
- children?: ReactNode;
15
- /**
16
- * Optional class(es) to pass to the Field wrapper div.
17
- */
18
- className?: ClassName;
19
- /**
20
- * The content for error validation.
21
- */
22
- error?: ReactNode;
23
- /**
24
- * The id of the input this Field component is controlling.
25
- */
26
- forId?: string;
27
- /**
28
- * Help text to show below the field.
29
- */
30
- help?: ReactNode;
31
- /**
32
- * Optional class(es) to pass to the help text element.
33
- */
34
- helpClassName?: string;
35
- /**
36
- * An id to give to the help element.
37
- */
38
- helpId?: string;
39
- /**
40
- * Whether the component is wrapping a select element.
41
- */
42
- isSelect?: boolean;
43
- /**
44
- * Whether the component is wrapping a checkbox or radio element.
45
- */
46
- isTickElement?: boolean;
47
- /**
48
- * The label for the field.
49
- */
50
- label?: ReactNode;
51
- /**
52
- * Optional class(es) to pass to the label component.
53
- */
54
- labelClassName?: string | null;
55
- /**
56
- * Whether the label should show before the input.
57
- */
58
- labelFirst?: boolean;
59
- /**
60
- * Whether the field is required.
61
- */
62
- required?: boolean;
63
- /**
64
- * Whether the form field should have a stacked appearance.
65
- */
66
- stacked?: boolean;
67
- /**
68
- * The content for success validation.
69
- */
70
- success?: ReactNode;
71
- /**
72
- * An id to give to the caution, error or success element.
73
- */
74
- validationId?: string;
75
- };
76
- declare const Field: ({ caution, children, className, error, forId, help, helpClassName, helpId, isSelect, isTickElement, label, labelClassName, labelFirst, required, stacked, success, validationId, ...props }: Props) => JSX.Element;
77
- export default Field;
@@ -1,2 +0,0 @@
1
- export { default } from "./Field";
2
- export type { Props as FieldProps } from "./Field";
@@ -1,21 +0,0 @@
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 form.
6
- */
7
- children?: ReactNode;
8
- /**
9
- * Optional class(es) to pass to the form element.
10
- */
11
- className?: ClassName;
12
- inline?: boolean;
13
- stacked?: boolean;
14
- }, HTMLProps<HTMLFormElement>>;
15
- /**
16
- * This is a [React](https://reactjs.org/) component for the Vanilla [Form](https://docs.vanillaframework.io/base/forms).
17
- *
18
- * Form controls have global styling defined at the HTML element level. Labels and most input types are 100% width of the `<form>` parent element.
19
- */
20
- declare const Form: ({ children, className, inline, stacked, ...props }: Props) => JSX.Element;
21
- export default Form;
@@ -1,12 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import Form from "./Form";
3
- declare const meta: Meta<typeof Form>;
4
- export default meta;
5
- type Story = StoryObj<typeof Form>;
6
- export declare const Default: Story;
7
- export declare const Fieldset: Story;
8
- export declare const Inline: Story;
9
- export declare const Stacked: Story;
10
- export declare const Disabled: Story;
11
- export declare const Validation: Story;
12
- export declare const Required: Story;
@@ -1,179 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Validation = exports.Stacked = exports.Required = exports.Inline = exports.Fieldset = exports.Disabled = exports.Default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _Form = _interopRequireDefault(require("./Form"));
9
- var _Input = _interopRequireDefault(require("../Input"));
10
- var _Select = _interopRequireDefault(require("../Select"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const meta = {
13
- component: _Form.default,
14
- tags: ["autodocs"],
15
- argTypes: {
16
- children: {
17
- control: {
18
- disable: true
19
- }
20
- }
21
- }
22
- };
23
- var _default = exports.default = meta;
24
- const Default = exports.Default = {
25
- name: "Default",
26
- args: {
27
- children: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Input.default, {
28
- type: "text",
29
- id: "exampleInputEmail12",
30
- placeholder: "example@canonical.com",
31
- label: "Email address"
32
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
33
- type: "password",
34
- id: "exampleInputPassword12",
35
- placeholder: "******",
36
- label: "Password"
37
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
38
- type: "file",
39
- id: "exampleInputFile2",
40
- label: "File input"
41
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
42
- type: "checkbox",
43
- id: "CheckMe2",
44
- label: "I agree to receive information about Canonical’s products and services."
45
- }))
46
- }
47
- };
48
- const Fieldset = exports.Fieldset = {
49
- render: () => /*#__PURE__*/_react.default.createElement(_Form.default, null, /*#__PURE__*/_react.default.createElement("fieldset", null, /*#__PURE__*/_react.default.createElement(_Input.default, {
50
- placeholder: "Joe",
51
- id: "list-input-12",
52
- type: "text",
53
- label: "First name"
54
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
55
- placeholder: "Bloggs",
56
- id: "list-input-22",
57
- type: "text",
58
- label: "Last name"
59
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
60
- placeholder: "example@canonical.com",
61
- id: "list-input-32",
62
- type: "text",
63
- label: "Email address"
64
- }))),
65
- name: "Fieldset"
66
- };
67
- const Inline = exports.Inline = {
68
- render: () => /*#__PURE__*/_react.default.createElement(_Form.default, {
69
- inline: true
70
- }, /*#__PURE__*/_react.default.createElement(_Input.default, {
71
- type: "text",
72
- id: "username-inline2",
73
- className: "p-form__control",
74
- label: "Username",
75
- help: "30 characters or fewer."
76
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
77
- type: "text",
78
- id: "address-inline22",
79
- "aria-invalid": "true",
80
- label: "Email address",
81
- error: "Please enter a valid email address."
82
- })),
83
- name: "Inline"
84
- };
85
- const Stacked = exports.Stacked = {
86
- render: () => /*#__PURE__*/_react.default.createElement(_Form.default, {
87
- stacked: true
88
- }, /*#__PURE__*/_react.default.createElement(_Input.default, {
89
- type: "text",
90
- id: "full-name-stacked2",
91
- label: "Full name",
92
- stacked: true
93
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
94
- type: "text",
95
- id: "username-stacked2",
96
- label: "Username",
97
- stacked: true,
98
- help: "30 characters or fewer."
99
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
100
- type: "text",
101
- id: "username-stacked-error2",
102
- label: "Email address",
103
- stacked: true,
104
- error: "This field is required"
105
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
106
- type: "text",
107
- id: "address-optional-stacked2",
108
- label: "Address line 1",
109
- stacked: true
110
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
111
- type: "text",
112
- id: "address-optional-stacked3",
113
- label: "Address line 2",
114
- stacked: true
115
- })),
116
- name: "Stacked"
117
- };
118
- const Disabled = exports.Disabled = {
119
- render: () => /*#__PURE__*/_react.default.createElement(_Form.default, null, /*#__PURE__*/_react.default.createElement(_Input.default, {
120
- label: "Email address",
121
- type: "text",
122
- id: "disabled-input2",
123
- placeholder: "example@canonical.com",
124
- disabled: true
125
- })),
126
- name: "Disabled"
127
- };
128
- const Validation = exports.Validation = {
129
- render: () => /*#__PURE__*/_react.default.createElement(_Form.default, null, /*#__PURE__*/_react.default.createElement(_Input.default, {
130
- type: "text",
131
- id: "exampleTextInputError2",
132
- placeholder: "example@canonical.com",
133
- label: "Email address",
134
- error: "This field is required."
135
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
136
- type: "text",
137
- id: "exampleTextInputCaution2",
138
- placeholder: "14",
139
- label: "Mail configuration ID",
140
- caution: "No validation is performed in preview mode."
141
- }), /*#__PURE__*/_react.default.createElement(_Input.default, {
142
- type: "text",
143
- id: "exampleTextInputSuccess2",
144
- placeholder: "**** **** **** ****",
145
- label: "Card number",
146
- success: "Verified."
147
- }), /*#__PURE__*/_react.default.createElement(_Select.default, {
148
- id: "exampleSelectInputError3",
149
- defaultValue: "",
150
- options: [{
151
- value: "",
152
- disabled: true,
153
- label: "--Select an option--"
154
- }, {
155
- value: "1",
156
- label: "Cosmic Cuttlefish"
157
- }, {
158
- value: "2",
159
- label: "Bionic Beaver"
160
- }, {
161
- value: "3",
162
- label: "Xenial Xerus"
163
- }],
164
- label: "Ubuntu releases",
165
- error: "You need to select an OS to complete your install."
166
- })),
167
- name: "Validation"
168
- };
169
- const Required = exports.Required = {
170
- render: () => /*#__PURE__*/_react.default.createElement(_Form.default, null, /*#__PURE__*/_react.default.createElement(_Input.default, {
171
- type: "text",
172
- id: "exampleTextInputError3",
173
- placeholder: "e.g joe@bloggs.com",
174
- error: "This field is required.",
175
- label: "Email address",
176
- required: true
177
- })),
178
- name: "Required"
179
- };
@@ -1,2 +0,0 @@
1
- export { default } from "./Form";
2
- export type { Props as FormProps } from "./Form";
@@ -1,25 +0,0 @@
1
- import { type ComponentProps, type ComponentType, type ElementType, type HTMLProps } from "react";
2
- import Input from "../Input";
3
- export type Props<C extends ElementType | ComponentType = typeof Input> = {
4
- /**
5
- * The component to display.
6
- * @default Input
7
- */
8
- component?: C;
9
- /**
10
- * This can be used to hide errors returned by Formik.
11
- */
12
- displayError?: boolean;
13
- /**
14
- * The name of the field as given to Formik.
15
- */
16
- name: string;
17
- value?: HTMLProps<HTMLElement>["value"];
18
- } & ComponentProps<C>;
19
- /**
20
- * This component makes it easier to use Vanilla form inputs with Formik. It
21
- * makes use of Formik's context to automatically map errors, values, states
22
- * etc. onto the provided field.
23
- */
24
- declare const FormikField: <C extends ElementType | ComponentType = ({ caution, className, error, help, helpClassName, id, label, labelClassName, required, stacked, success, takeFocus, takeFocusDelay, type, wrapperClassName, ...inputProps }: import("../Input").InputProps) => JSX.Element>({ component: Component, displayError, name, value, label, ...props }: Props<C>) => JSX.Element;
25
- export default FormikField;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import FormikField from "./FormikField";
3
- declare const meta: Meta<typeof FormikField>;
4
- export default meta;
5
- type Story = StoryObj<typeof FormikField>;
6
- export declare const Default: Story;
7
- export declare const Fields: Story;
8
- export declare const Errors: Story;
@@ -1,85 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Fields = exports.Errors = exports.Default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _FormikField = _interopRequireDefault(require("./FormikField"));
9
- var _Select = _interopRequireDefault(require("../Select"));
10
- var _formik = require("formik");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const meta = {
13
- component: _FormikField.default,
14
- tags: ["autodocs"]
15
- };
16
- var _default = exports.default = meta;
17
- const Default = exports.Default = {
18
- args: {
19
- name: "username",
20
- label: "Username",
21
- type: "text"
22
- },
23
- render: args => /*#__PURE__*/_react.default.createElement(_formik.Formik, {
24
- initialValues: {
25
- username: ""
26
- },
27
- onSubmit: () => {}
28
- }, /*#__PURE__*/_react.default.createElement(_FormikField.default, args))
29
- };
30
- const Fields = exports.Fields = {
31
- args: {
32
- component: _Select.default,
33
- name: "release",
34
- label: "Release",
35
- options: [{
36
- value: "",
37
- disabled: true,
38
- label: "Select an option"
39
- }, {
40
- value: "1",
41
- label: "Cosmic Cuttlefish"
42
- }, {
43
- value: "2",
44
- label: "Bionic Beaver"
45
- }, {
46
- value: "3",
47
- label: "Xenial Xerus"
48
- }]
49
- },
50
- parameters: {
51
- docs: {
52
- description: {
53
- story: "\nAny React Components input can be provided to FormikField (e.g. Input, Textarea or Select) or you may provide a custom component.\n\nAny additional props that need to be passed can be given to FormikField.\n "
54
- }
55
- }
56
- },
57
- render: args => /*#__PURE__*/_react.default.createElement(_formik.Formik, {
58
- initialValues: {
59
- release: ""
60
- },
61
- onSubmit: () => {}
62
- }, /*#__PURE__*/_react.default.createElement(_FormikField.default, args))
63
- };
64
- const Errors = exports.Errors = {
65
- args: Default.args,
66
- parameters: {
67
- docs: {
68
- description: {
69
- story: "\nFormik parameters are passed to the field using Formik's `useField`. This means that validation and errors, state handlers etc. should all just work.\n "
70
- }
71
- }
72
- },
73
- render: args => /*#__PURE__*/_react.default.createElement(_formik.Formik, {
74
- initialErrors: {
75
- username: "This username has already been taken."
76
- },
77
- initialTouched: {
78
- username: true
79
- },
80
- initialValues: {
81
- username: ""
82
- },
83
- onSubmit: () => {}
84
- }, /*#__PURE__*/_react.default.createElement(_FormikField.default, args))
85
- };
@@ -1 +0,0 @@
1
- export { default, type Props as FormikFieldProps } from "./FormikField";
@@ -1,59 +0,0 @@
1
- import type { HTMLProps } from "react";
2
- import type { ClassName, PropsWithSpread, ValueOf } from "../../types";
3
- export declare const ICONS: {
4
- readonly anchor: "anchor";
5
- readonly chevronDown: "chevron-down";
6
- readonly chevronUp: "chevron-up";
7
- readonly close: "close";
8
- readonly code: "code";
9
- readonly collapse: "collapse";
10
- readonly copy: "copy";
11
- readonly delete: "delete";
12
- readonly drag: "drag";
13
- readonly error: "error";
14
- readonly expand: "expand";
15
- readonly externalLink: "external-link";
16
- readonly help: "help";
17
- readonly information: "information";
18
- readonly menu: "menu";
19
- readonly minus: "minus";
20
- readonly plus: "plus";
21
- readonly search: "search";
22
- readonly share: "share";
23
- readonly spinner: "spinner";
24
- readonly success: "success";
25
- readonly user: "user";
26
- readonly warning: "warning";
27
- readonly facebook: "facebook";
28
- readonly twitter: "twitter";
29
- readonly instagram: "instagram";
30
- readonly linkedin: "linkedin";
31
- readonly youtube: "youtube";
32
- readonly github: "github";
33
- readonly rss: "rss";
34
- readonly email: "email";
35
- };
36
- export type Props = PropsWithSpread<{
37
- /**
38
- * Optional classes to add to the icon element.
39
- */
40
- className?: ClassName;
41
- /**
42
- * Whether to show the light variant of the icon.
43
- */
44
- light?: boolean;
45
- /**
46
- * The name of the icon.
47
- */
48
- name: ValueOf<typeof ICONS> | string;
49
- }, HTMLProps<HTMLElement>>;
50
- /**
51
- * This is a [React](https://reactjs.org/) component for the Vanilla [Icon](https://docs.vanillaframework.io/patterns/icons/).
52
- *
53
- * Icons provide visual context and enhance usability.
54
- *
55
- * @param name One of built-in Vanilla icons or a name of a custom icon that follows `p-icon--{name}` convention.
56
- * @returns Icon
57
- */
58
- declare const Icon: ({ className, light, name, ...props }: Props) => JSX.Element;
59
- export default Icon;
@@ -1,16 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import Icon from "./Icon";
3
- import "./Icon.stories.scss";
4
- declare const meta: Meta<typeof Icon>;
5
- export default meta;
6
- type Story = StoryObj<typeof Icon>;
7
- export declare const Base: Story;
8
- export declare const Default: Story;
9
- /**
10
- * To use custom icons that are not included in Vanilla you need to provide your own icon styling following the `.p-icon--{name}` convention.
11
- */
12
- export declare const Custom: Story;
13
- /**
14
- * To use custom icons that provide the name of the social media icon following the `.p-icon--{name}` convention.
15
- */
16
- export declare const Social: Story;
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Social = exports.Default = exports.Custom = exports.Base = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _Icon = _interopRequireWildcard(require("./Icon"));
9
- require("./Icon.stories.scss");
10
- 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); }
11
- 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; }
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- const meta = {
14
- component: _Icon.default,
15
- tags: ["autodocs"]
16
- };
17
- var _default = exports.default = meta;
18
- const Base = exports.Base = {
19
- name: "Base",
20
- args: {
21
- name: "facebook"
22
- }
23
- };
24
- const Default = exports.Default = {
25
- render: () => /*#__PURE__*/_react.default.createElement(_Icon.default, {
26
- name: _Icon.ICONS.plus
27
- }),
28
- name: "Default"
29
- };
30
-
31
- /**
32
- * To use custom icons that are not included in Vanilla you need to provide your own icon styling following the `.p-icon--{name}` convention.
33
- */
34
- const Custom = exports.Custom = {
35
- render: () => /*#__PURE__*/_react.default.createElement(_Icon.default, {
36
- name: "custom"
37
- }),
38
- name: "Custom"
39
- };
40
-
41
- /**
42
- * To use custom icons that provide the name of the social media icon following the `.p-icon--{name}` convention.
43
- */
44
- const Social = exports.Social = {
45
- render: () => /*#__PURE__*/_react.default.createElement(_Icon.default, {
46
- name: _Icon.ICONS.facebook
47
- }),
48
- name: "Social"
49
- };
@@ -1,2 +0,0 @@
1
- export { default, ICONS } from "./Icon";
2
- export type { Props as IconProps } from "./Icon";
@@ -1,70 +0,0 @@
1
- import type { InputHTMLAttributes, ReactNode } from "react";
2
- import type { ClassName, PropsWithSpread } from "../../types";
3
- /**
4
- * The props for the Input component.
5
- */
6
- export type Props = PropsWithSpread<{
7
- /**
8
- * The content for caution validation.
9
- */
10
- caution?: ReactNode;
11
- /**
12
- * Optional class(es) to pass to the input element.
13
- */
14
- className?: ClassName;
15
- /**
16
- * The content for error validation message. Controls the value of aria-invalid attribute.
17
- */
18
- error?: ReactNode;
19
- /**
20
- * Help text to show below the field.
21
- */
22
- help?: ReactNode;
23
- /**
24
- * Optional class(es) to pass to the help text element.
25
- */
26
- helpClassName?: ReactNode;
27
- /**
28
- * The id of the input.
29
- */
30
- id?: string;
31
- /**
32
- * The label for the field.
33
- */
34
- label?: ReactNode;
35
- /**
36
- * Optional class(es) to pass to the label component.
37
- */
38
- labelClassName?: string;
39
- /**
40
- * Whether the field is required.
41
- */
42
- required?: boolean;
43
- /**
44
- * Whether the form field should have a stacked appearance.
45
- */
46
- stacked?: boolean;
47
- /**
48
- * The content for success validation.
49
- */
50
- success?: ReactNode;
51
- /**
52
- * Whether to focus on the input on initial render.
53
- */
54
- takeFocus?: boolean;
55
- /**
56
- * Delay takeFocus in milliseconds i.e. to let animations finish
57
- */
58
- takeFocusDelay?: number;
59
- /**
60
- * Optional class(es) to pass to the wrapping Field component
61
- */
62
- wrapperClassName?: string;
63
- }, InputHTMLAttributes<HTMLInputElement>>;
64
- /**
65
- * This is a [React](https://reactjs.org/) component for the Vanilla [Input](https://docs.vanillaframework.io/base/forms/#input).
66
- *
67
- * An input field where the user can enter data, which can vary in many ways, depending on the type attribute.
68
- */
69
- declare const Input: ({ caution, className, error, help, helpClassName, id, label, labelClassName, required, stacked, success, takeFocus, takeFocusDelay, type, wrapperClassName, ...inputProps }: Props) => JSX.Element;
70
- export default Input;