@canonical/react-components 0.58.0 → 0.59.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.
- package/dist/components/Accordion/Accordion.d.ts +5 -0
- package/dist/components/Accordion/Accordion.js +6 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +18 -0
- package/dist/components/Accordion/Accordion.stories.js +117 -0
- package/dist/components/ActionButton/ActionButton.d.ts +7 -0
- package/dist/components/ActionButton/ActionButton.js +7 -0
- package/dist/components/ActionButton/ActionButton.stories.d.ts +7 -0
- package/dist/components/ActionButton/ActionButton.stories.js +36 -0
- package/dist/components/ApplicationLayout/AppAside/AppAside.d.ts +33 -0
- package/dist/components/ApplicationLayout/AppAside/AppAside.js +33 -0
- package/dist/components/ApplicationLayout/AppAside/AppAside.stories.d.ts +13 -0
- package/dist/components/ApplicationLayout/AppAside/AppAside.stories.js +116 -0
- package/dist/components/ApplicationLayout/AppAside/index.d.ts +2 -0
- package/dist/components/ApplicationLayout/AppAside/index.js +13 -0
- package/dist/components/ApplicationLayout/AppMain/AppMain.d.ts +14 -0
- package/dist/components/ApplicationLayout/AppMain/AppMain.js +25 -0
- package/dist/components/ApplicationLayout/AppMain/AppMain.stories.d.ts +14 -0
- package/dist/components/ApplicationLayout/AppMain/AppMain.stories.js +45 -0
- package/dist/components/ApplicationLayout/AppMain/index.d.ts +2 -0
- package/dist/components/ApplicationLayout/AppMain/index.js +13 -0
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.d.ts +26 -0
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.js +35 -0
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.stories.d.ts +12 -0
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.stories.js +104 -0
- package/dist/components/ApplicationLayout/AppNavigation/index.d.ts +2 -0
- package/dist/components/ApplicationLayout/AppNavigation/index.js +13 -0
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.d.ts +18 -0
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.js +28 -0
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.d.ts +15 -0
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.js +52 -0
- package/dist/components/ApplicationLayout/AppNavigationBar/index.d.ts +2 -0
- package/dist/components/ApplicationLayout/AppNavigationBar/index.js +13 -0
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.d.ts +14 -0
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.js +25 -0
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.stories.d.ts +13 -0
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.stories.js +41 -0
- package/dist/components/ApplicationLayout/AppStatus/index.d.ts +2 -0
- package/dist/components/ApplicationLayout/AppStatus/index.js +13 -0
- package/dist/components/ApplicationLayout/Application/Application.d.ts +15 -0
- package/dist/components/ApplicationLayout/Application/Application.js +26 -0
- package/dist/components/ApplicationLayout/Application/Application.stories.d.ts +6 -0
- package/dist/components/ApplicationLayout/Application/Application.stories.js +16 -0
- package/dist/components/ApplicationLayout/Application/index.d.ts +2 -0
- package/dist/components/ApplicationLayout/Application/index.js +13 -0
- package/dist/components/ApplicationLayout/ApplicationLayout.d.ts +89 -0
- package/dist/components/ApplicationLayout/ApplicationLayout.js +118 -0
- package/dist/components/ApplicationLayout/ApplicationLayout.stories.d.ts +24 -0
- package/dist/components/ApplicationLayout/ApplicationLayout.stories.js +232 -0
- package/dist/components/ApplicationLayout/index.d.ts +7 -0
- package/dist/components/ApplicationLayout/index.js +55 -0
- package/dist/components/ArticlePagination/ArticlePagination.d.ts +5 -0
- package/dist/components/ArticlePagination/ArticlePagination.js +5 -0
- package/dist/components/ArticlePagination/ArticlePagination.stories.d.ts +6 -0
- package/dist/components/ArticlePagination/ArticlePagination.stories.js +22 -0
- package/dist/components/Badge/Badge.d.ts +5 -0
- package/dist/components/Badge/Badge.js +6 -0
- package/dist/components/Badge/Badge.stories.d.ts +15 -0
- package/dist/components/Badge/Badge.stories.js +62 -0
- package/dist/components/Button/Button.d.ts +3 -1
- package/dist/components/Button/Button.js +3 -1
- package/dist/components/Button/Button.stories.d.ts +32 -0
- package/dist/components/Button/Button.stories.js +180 -0
- package/dist/components/Card/Card.stories.js +0 -1
- package/dist/components/CheckboxInput/CheckboxInput.d.ts +5 -0
- package/dist/components/CheckboxInput/CheckboxInput.js +5 -0
- package/dist/components/CheckboxInput/CheckboxInput.stories.d.ts +11 -0
- package/dist/components/CheckboxInput/CheckboxInput.stories.js +84 -0
- package/dist/components/Chip/Chip.d.ts +5 -0
- package/dist/components/Chip/Chip.js +5 -0
- package/dist/components/Chip/Chip.stories.d.ts +9 -0
- package/dist/components/Chip/Chip.stories.js +45 -0
- package/dist/components/CodeSnippet/CodeSnippet.d.ts +7 -0
- package/dist/components/CodeSnippet/CodeSnippet.js +7 -0
- package/dist/components/CodeSnippet/CodeSnippet.stories.d.ts +45 -0
- package/dist/components/CodeSnippet/CodeSnippet.stories.js +279 -0
- package/dist/components/Col/Col.d.ts +5 -0
- package/dist/components/Col/Col.js +5 -0
- package/dist/components/Col/Col.stories.d.ts +11 -0
- package/dist/components/Col/Col.stories.js +154 -0
- package/dist/components/ConfirmationButton/ConfirmationButton.d.ts +3 -0
- package/dist/components/ConfirmationButton/ConfirmationButton.js +3 -0
- package/dist/components/ConfirmationButton/ConfirmationButton.stories.d.ts +9 -0
- package/dist/components/ConfirmationButton/ConfirmationButton.stories.js +108 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +3 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.js +3 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts +18 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +135 -0
- package/dist/components/ContextualMenu/ContextualMenu.d.ts +3 -20
- package/dist/components/ContextualMenu/ContextualMenu.js +3 -20
- package/dist/components/ContextualMenu/ContextualMenu.stories.d.ts +13 -0
- package/dist/components/ContextualMenu/ContextualMenu.stories.js +107 -0
- package/dist/components/EmptyState/EmptyState.d.ts +3 -0
- package/dist/components/EmptyState/EmptyState.js +3 -0
- package/dist/components/EmptyState/EmptyState.stories.d.ts +7 -0
- package/dist/components/EmptyState/EmptyState.stories.js +49 -0
- package/dist/components/Form/Form.d.ts +5 -0
- package/dist/components/Form/Form.js +5 -0
- package/dist/components/Form/Form.stories.d.ts +12 -0
- package/dist/components/Form/Form.stories.js +179 -0
- package/dist/components/FormikField/FormikField.stories.js +0 -1
- package/dist/components/Icon/Icon.d.ts +3 -1
- package/dist/components/Icon/Icon.js +3 -1
- package/dist/components/Icon/Icon.stories.d.ts +16 -0
- package/dist/components/Icon/Icon.stories.js +49 -0
- package/dist/components/Input/Input.d.ts +5 -0
- package/dist/components/Input/Input.js +5 -0
- package/dist/components/Input/Input.stories.d.ts +14 -0
- package/dist/components/Input/Input.stories.js +148 -0
- package/dist/components/Link/Link.d.ts +5 -0
- package/dist/components/Link/Link.js +5 -0
- package/dist/components/Link/Link.stories.d.ts +9 -0
- package/dist/components/Link/Link.stories.js +48 -0
- package/dist/components/List/List.d.ts +5 -0
- package/dist/components/List/List.js +6 -0
- package/dist/components/List/List.stories.d.ts +15 -0
- package/dist/components/List/List.stories.js +122 -0
- package/dist/components/LoginPageLayout/LoginPageLayout.d.ts +4 -0
- package/dist/components/LoginPageLayout/LoginPageLayout.js +4 -0
- package/dist/components/LoginPageLayout/LoginPageLayout.stories.d.ts +9 -0
- package/dist/components/LoginPageLayout/LoginPageLayout.stories.js +58 -0
- package/dist/components/MainTable/MainTable.d.ts +3 -0
- package/dist/components/MainTable/MainTable.js +4 -0
- package/dist/components/MainTable/MainTable.stories.d.ts +15 -0
- package/dist/components/MainTable/MainTable.stories.js +553 -0
- package/dist/components/Modal/Modal.d.ts +5 -0
- package/dist/components/Modal/Modal.js +5 -0
- package/dist/components/Modal/Modal.stories.d.ts +6 -0
- package/dist/components/Modal/Modal.stories.js +57 -0
- package/dist/components/ModularTable/ModularTable.d.ts +52 -0
- package/dist/components/ModularTable/ModularTable.js +53 -0
- package/dist/components/ModularTable/ModularTable.stories.d.ts +27 -0
- package/dist/components/ModularTable/ModularTable.stories.js +343 -0
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +5 -64
- package/dist/components/MultiSelect/MultiSelect.stories.js +0 -1
- package/dist/components/Navigation/Navigation.d.ts +8 -0
- package/dist/components/Navigation/Navigation.js +9 -0
- package/dist/components/Navigation/Navigation.stories.d.ts +43 -0
- package/dist/components/Navigation/Navigation.stories.js +232 -0
- package/dist/components/Notification/Notification.d.ts +25 -0
- package/dist/components/Notification/Notification.js +25 -0
- package/dist/components/Notification/Notification.stories.d.ts +45 -0
- package/dist/components/Notification/Notification.stories.js +201 -0
- package/dist/components/Pagination/Pagination.d.ts +12 -0
- package/dist/components/Pagination/Pagination.js +12 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +14 -0
- package/dist/components/Pagination/Pagination.stories.js +94 -0
- package/dist/components/PasswordToggle/PasswordToggle.d.ts +5 -0
- package/dist/components/PasswordToggle/PasswordToggle.js +5 -0
- package/dist/components/PasswordToggle/PasswordToggle.stories.d.ts +12 -0
- package/dist/components/PasswordToggle/PasswordToggle.stories.js +74 -0
- package/dist/components/RadioInput/RadioInput.d.ts +5 -0
- package/dist/components/RadioInput/RadioInput.js +5 -0
- package/dist/components/RadioInput/RadioInput.stories.d.ts +10 -0
- package/dist/components/RadioInput/RadioInput.stories.js +83 -0
- package/dist/components/Row/Row.d.ts +5 -0
- package/dist/components/Row/Row.js +5 -0
- package/dist/components/Row/Row.stories.d.ts +9 -0
- package/dist/components/Row/Row.stories.js +29 -0
- package/dist/components/SearchAndFilter/SearchAndFilter.d.ts +3 -0
- package/dist/components/SearchAndFilter/SearchAndFilter.js +3 -0
- package/dist/components/SearchAndFilter/SearchAndFilter.stories.d.ts +8 -0
- package/dist/components/SearchAndFilter/SearchAndFilter.stories.js +218 -0
- package/dist/components/SearchBox/SearchBox.d.ts +5 -0
- package/dist/components/SearchBox/SearchBox.js +5 -0
- package/dist/components/SearchBox/SearchBox.stories.d.ts +14 -0
- package/dist/components/SearchBox/SearchBox.stories.js +106 -0
- package/dist/components/Select/Select.d.ts +5 -0
- package/dist/components/Select/Select.js +6 -0
- package/dist/components/Select/Select.stories.d.ts +7 -0
- package/dist/components/Select/Select.stories.js +97 -0
- package/dist/components/Slider/Slider.d.ts +6 -0
- package/dist/components/Slider/Slider.js +6 -0
- package/dist/components/Slider/Slider.stories.d.ts +10 -0
- package/dist/components/Slider/Slider.stories.js +74 -0
- package/dist/components/Spinner/Spinner.d.ts +3 -0
- package/dist/components/Spinner/Spinner.js +3 -0
- package/dist/components/Spinner/Spinner.stories.d.ts +8 -0
- package/dist/components/Spinner/Spinner.stories.js +28 -0
- package/dist/components/StatusLabel/StatusLabel.d.ts +3 -1
- package/dist/components/StatusLabel/StatusLabel.js +3 -1
- package/dist/components/StatusLabel/StatusLabel.stories.d.ts +10 -0
- package/dist/components/StatusLabel/StatusLabel.stories.js +61 -0
- package/dist/components/Strip/Strip.d.ts +5 -0
- package/dist/components/Strip/Strip.js +5 -0
- package/dist/components/Strip/Strip.stories.d.ts +12 -0
- package/dist/components/Strip/Strip.stories.js +130 -0
- package/dist/components/SummaryButton/SummaryButton.d.ts +3 -0
- package/dist/components/SummaryButton/SummaryButton.js +3 -0
- package/dist/components/SummaryButton/SummaryButton.stories.d.ts +18 -0
- package/dist/components/SummaryButton/SummaryButton.stories.js +59 -0
- package/dist/components/Switch/Switch.d.ts +3 -0
- package/dist/components/Switch/Switch.js +3 -0
- package/dist/components/Switch/Switch.stories.d.ts +7 -0
- package/dist/components/Switch/Switch.stories.js +26 -0
- package/dist/components/TablePagination/TablePagination.d.ts +21 -0
- package/dist/components/TablePagination/TablePagination.js +21 -0
- package/dist/components/TablePagination/TablePagination.stories.d.ts +10 -0
- package/dist/components/TablePagination/TablePagination.stories.js +302 -0
- package/dist/components/Tabs/Tabs.d.ts +5 -0
- package/dist/components/Tabs/Tabs.js +5 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +11 -0
- package/dist/components/Tabs/Tabs.stories.js +56 -0
- package/dist/components/Textarea/Textarea.d.ts +5 -0
- package/dist/components/Textarea/Textarea.js +5 -0
- package/dist/components/Textarea/Textarea.stories.d.ts +7 -0
- package/dist/components/Textarea/Textarea.stories.js +62 -0
- package/dist/components/Tooltip/Tooltip.d.ts +7 -11
- package/dist/components/Tooltip/Tooltip.js +7 -11
- package/dist/components/Tooltip/Tooltip.stories.d.ts +12 -0
- package/dist/components/Tooltip/Tooltip.stories.js +71 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +56 -0
- package/package.json +18 -15
|
@@ -0,0 +1,16 @@
|
|
|
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;
|
|
@@ -0,0 +1,49 @@
|
|
|
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 && Object.prototype.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(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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
|
+
};
|
|
@@ -61,5 +61,10 @@ export type Props = PropsWithSpread<{
|
|
|
61
61
|
*/
|
|
62
62
|
wrapperClassName?: string;
|
|
63
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
|
+
*/
|
|
64
69
|
declare const Input: ({ caution, className, error, help, helpClassName, id, label, labelClassName, required, stacked, success, takeFocus, takeFocusDelay, type, wrapperClassName, ...inputProps }: Props) => JSX.Element;
|
|
65
70
|
export default Input;
|
|
@@ -17,6 +17,11 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
17
17
|
* The props for the Input component.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Input](https://docs.vanillaframework.io/base/forms/#input).
|
|
22
|
+
*
|
|
23
|
+
* An input field where the user can enter data, which can vary in many ways, depending on the type attribute.
|
|
24
|
+
*/
|
|
20
25
|
const Input = _ref => {
|
|
21
26
|
let {
|
|
22
27
|
caution,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Input from "./Input";
|
|
3
|
+
declare const meta: Meta<typeof Input>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Input>;
|
|
6
|
+
export declare const TextInput: Story;
|
|
7
|
+
export declare const Stacked: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const Error: Story;
|
|
10
|
+
export declare const Success: Story;
|
|
11
|
+
export declare const Caution: Story;
|
|
12
|
+
export declare const Required: Story;
|
|
13
|
+
export declare const Checkbox: Story;
|
|
14
|
+
export declare const RadioButton: Story;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.TextInput = exports.Success = exports.Stacked = exports.Required = exports.RadioButton = exports.Error = exports.Disabled = exports.Checkbox = exports.Caution = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Input = _interopRequireDefault(require("./Input"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const meta = {
|
|
11
|
+
component: _Input.default,
|
|
12
|
+
tags: ["autodocs"],
|
|
13
|
+
argTypes: {
|
|
14
|
+
caution: {
|
|
15
|
+
control: {
|
|
16
|
+
type: "text"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
error: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "text"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
help: {
|
|
25
|
+
control: {
|
|
26
|
+
type: "text"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
helpClassName: {
|
|
30
|
+
control: {
|
|
31
|
+
type: "text"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
label: {
|
|
35
|
+
control: {
|
|
36
|
+
type: "text"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
success: {
|
|
40
|
+
control: {
|
|
41
|
+
type: "text"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
id: {
|
|
45
|
+
control: {
|
|
46
|
+
disable: true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
placeholder: {
|
|
50
|
+
control: {
|
|
51
|
+
type: "text"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var _default = exports.default = meta;
|
|
57
|
+
const TextInput = exports.TextInput = {
|
|
58
|
+
name: "Text input",
|
|
59
|
+
args: {
|
|
60
|
+
type: "text",
|
|
61
|
+
id: "exampleTextInput2",
|
|
62
|
+
placeholder: "example@canonical.com",
|
|
63
|
+
label: "Email address",
|
|
64
|
+
help: "Additional description for the field",
|
|
65
|
+
helpClassName: "u-no-margin--bottom"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const Stacked = exports.Stacked = {
|
|
69
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
70
|
+
type: "text",
|
|
71
|
+
id: "exampleTextInput3",
|
|
72
|
+
placeholder: "example@canonical.com",
|
|
73
|
+
stacked: true,
|
|
74
|
+
label: "Email address"
|
|
75
|
+
}),
|
|
76
|
+
name: "Stacked"
|
|
77
|
+
};
|
|
78
|
+
const Disabled = exports.Disabled = {
|
|
79
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
80
|
+
type: "text",
|
|
81
|
+
id: "exampleTextInput4",
|
|
82
|
+
placeholder: "example@canonical.com",
|
|
83
|
+
disabled: true,
|
|
84
|
+
label: "Email address"
|
|
85
|
+
}),
|
|
86
|
+
name: "Disabled"
|
|
87
|
+
};
|
|
88
|
+
const Error = exports.Error = {
|
|
89
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
90
|
+
type: "text",
|
|
91
|
+
id: "exampleTextInput5",
|
|
92
|
+
placeholder: "example@canonical.com",
|
|
93
|
+
error: "This field is required.",
|
|
94
|
+
label: "Email address"
|
|
95
|
+
}),
|
|
96
|
+
name: "Error"
|
|
97
|
+
};
|
|
98
|
+
const Success = exports.Success = {
|
|
99
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
100
|
+
type: "text",
|
|
101
|
+
id: "exampleTextInput6",
|
|
102
|
+
placeholder: "example@canonical.com",
|
|
103
|
+
success: "Verified.",
|
|
104
|
+
label: "Email address"
|
|
105
|
+
}),
|
|
106
|
+
name: "Success"
|
|
107
|
+
};
|
|
108
|
+
const Caution = exports.Caution = {
|
|
109
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
110
|
+
type: "text",
|
|
111
|
+
id: "exampleTextInput7",
|
|
112
|
+
placeholder: "example@canonical.com",
|
|
113
|
+
caution: "No validation is performed in preview mode.",
|
|
114
|
+
label: "Email address"
|
|
115
|
+
}),
|
|
116
|
+
name: "Caution"
|
|
117
|
+
};
|
|
118
|
+
const Required = exports.Required = {
|
|
119
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
120
|
+
type: "text",
|
|
121
|
+
id: "exampleTextInput8",
|
|
122
|
+
placeholder: "example@canonical.com",
|
|
123
|
+
required: true,
|
|
124
|
+
label: "Email address"
|
|
125
|
+
}),
|
|
126
|
+
name: "Required"
|
|
127
|
+
};
|
|
128
|
+
const Checkbox = exports.Checkbox = {
|
|
129
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
130
|
+
type: "checkbox",
|
|
131
|
+
id: "checkExample12",
|
|
132
|
+
defaultChecked: true,
|
|
133
|
+
label: "HTML"
|
|
134
|
+
}),
|
|
135
|
+
name: "Checkbox"
|
|
136
|
+
};
|
|
137
|
+
const RadioButton = exports.RadioButton = {
|
|
138
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Input.default, {
|
|
139
|
+
label: "Linux",
|
|
140
|
+
type: "radio",
|
|
141
|
+
name: "RadioOptions",
|
|
142
|
+
id: "Radio12",
|
|
143
|
+
defaultValue: "option1",
|
|
144
|
+
defaultChecked: true,
|
|
145
|
+
help: "Ubuntu"
|
|
146
|
+
}),
|
|
147
|
+
name: "Radio button"
|
|
148
|
+
};
|
|
@@ -22,5 +22,10 @@ export type Props = PropsWithSpread<{
|
|
|
22
22
|
*/
|
|
23
23
|
top?: boolean;
|
|
24
24
|
}, HTMLProps<HTMLAnchorElement>>;
|
|
25
|
+
/**
|
|
26
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Link](https://docs.vanillaframework.io/patterns/links/).
|
|
27
|
+
*
|
|
28
|
+
* Links are used to embed actions or pathways to more information, allowing users to click their way from page to page.
|
|
29
|
+
*/
|
|
25
30
|
declare const Link: ({ children, className, href, inverted, soft, top, ...props }: Props) => JSX.Element;
|
|
26
31
|
export default Link;
|
|
@@ -8,6 +8,11 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
/**
|
|
12
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Link](https://docs.vanillaframework.io/patterns/links/).
|
|
13
|
+
*
|
|
14
|
+
* Links are used to embed actions or pathways to more information, allowing users to click their way from page to page.
|
|
15
|
+
*/
|
|
11
16
|
const Link = _ref => {
|
|
12
17
|
let {
|
|
13
18
|
children,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Link from "./Link";
|
|
3
|
+
declare const meta: Meta<typeof Link>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Link>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Soft: Story;
|
|
8
|
+
export declare const Inverted: Story;
|
|
9
|
+
export declare const BackToTop: Story;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Soft = exports.Inverted = exports.Default = exports.BackToTop = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Link = _interopRequireDefault(require("./Link"));
|
|
9
|
+
var _Strip = _interopRequireDefault(require("../Strip"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
const meta = {
|
|
12
|
+
component: _Link.default,
|
|
13
|
+
tags: ["autodocs"],
|
|
14
|
+
argTypes: {
|
|
15
|
+
children: {
|
|
16
|
+
control: {
|
|
17
|
+
type: "text"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var _default = exports.default = meta;
|
|
23
|
+
const Default = exports.Default = {
|
|
24
|
+
name: "Default",
|
|
25
|
+
args: {
|
|
26
|
+
children: "Fast, secure and simple, Ubuntu powers millions of PCs worldwide"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const Soft = exports.Soft = {
|
|
30
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Link.default, {
|
|
31
|
+
soft: true
|
|
32
|
+
}, "Learn about MAAS"),
|
|
33
|
+
name: "Soft"
|
|
34
|
+
};
|
|
35
|
+
const Inverted = exports.Inverted = {
|
|
36
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Strip.default, {
|
|
37
|
+
type: "dark"
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement(_Link.default, {
|
|
39
|
+
inverted: true
|
|
40
|
+
}, "Package & publish your app")),
|
|
41
|
+
name: "Inverted"
|
|
42
|
+
};
|
|
43
|
+
const BackToTop = exports.BackToTop = {
|
|
44
|
+
render: () => /*#__PURE__*/_react.default.createElement(_Link.default, {
|
|
45
|
+
top: true
|
|
46
|
+
}, "Back to top"),
|
|
47
|
+
name: "Back to top"
|
|
48
|
+
};
|
|
@@ -27,5 +27,10 @@ export type Props = {
|
|
|
27
27
|
stretch?: boolean;
|
|
28
28
|
ticked?: boolean;
|
|
29
29
|
} & Omit<HTMLProps<HTMLOListElement>, "type">;
|
|
30
|
+
/**
|
|
31
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [List](https://docs.vanillaframework.io/patterns/lists/).
|
|
32
|
+
*
|
|
33
|
+
* If you want to display lists in a way that is more visually distinctive than the standard `<ol>` and `<ul>`, we have 7 list styles at your disposal.
|
|
34
|
+
*/
|
|
30
35
|
declare const List: ({ className, detailed, divided, inline, isDark, items, middot, stretch, split, stepped, ticked, ...props }: Props) => JSX.Element;
|
|
31
36
|
export default List;
|
|
@@ -63,6 +63,12 @@ const generateItems = _ref => {
|
|
|
63
63
|
}, liProps), body, middot ? " " : null);
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [List](https://docs.vanillaframework.io/patterns/lists/).
|
|
69
|
+
*
|
|
70
|
+
* If you want to display lists in a way that is more visually distinctive than the standard `<ol>` and `<ul>`, we have 7 list styles at your disposal.
|
|
71
|
+
*/
|
|
66
72
|
const List = _ref2 => {
|
|
67
73
|
let {
|
|
68
74
|
className,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import List from "./List";
|
|
3
|
+
declare const meta: Meta<typeof List>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof List>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Ticked: Story;
|
|
8
|
+
export declare const HorizontalDivider: Story;
|
|
9
|
+
export declare const TickedWithHorizontalDivider: Story;
|
|
10
|
+
export declare const Inline: Story;
|
|
11
|
+
export declare const Middot: Story;
|
|
12
|
+
export declare const Stretch: Story;
|
|
13
|
+
export declare const VerticalStepped: Story;
|
|
14
|
+
export declare const HorizontalStepped: Story;
|
|
15
|
+
export declare const Split: Story;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.VerticalStepped = exports.TickedWithHorizontalDivider = exports.Ticked = exports.Stretch = exports.Split = exports.Middot = exports.Inline = exports.HorizontalStepped = exports.HorizontalDivider = exports.Default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _List = _interopRequireDefault(require("./List"));
|
|
9
|
+
var _StatusLabel = _interopRequireDefault(require("../StatusLabel"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
const meta = {
|
|
12
|
+
component: _List.default,
|
|
13
|
+
tags: ["autodocs"],
|
|
14
|
+
argTypes: {
|
|
15
|
+
items: {
|
|
16
|
+
control: {
|
|
17
|
+
disable: true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
stepped: {
|
|
21
|
+
control: {
|
|
22
|
+
disable: true
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var _default = exports.default = meta;
|
|
28
|
+
const Default = exports.Default = {
|
|
29
|
+
name: "Default",
|
|
30
|
+
args: {
|
|
31
|
+
items: ["Digital signage", "Robotics", "Gateways"]
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const Ticked = exports.Ticked = {
|
|
35
|
+
render: () => /*#__PURE__*/_react.default.createElement(_List.default, {
|
|
36
|
+
items: ["Hardware guidance and sizing", "Fixed-price deployment", "Reference architecture"],
|
|
37
|
+
ticked: true
|
|
38
|
+
}),
|
|
39
|
+
name: "Ticked"
|
|
40
|
+
};
|
|
41
|
+
const HorizontalDivider = exports.HorizontalDivider = {
|
|
42
|
+
render: () => /*#__PURE__*/_react.default.createElement(_List.default, {
|
|
43
|
+
items: ["Single-command install and upgrade", "Postgres database for reliable state", "High availability for all services"],
|
|
44
|
+
divided: true
|
|
45
|
+
}),
|
|
46
|
+
name: "Horizontal divider"
|
|
47
|
+
};
|
|
48
|
+
const TickedWithHorizontalDivider = exports.TickedWithHorizontalDivider = {
|
|
49
|
+
render: () => /*#__PURE__*/_react.default.createElement(_List.default, {
|
|
50
|
+
items: ["Balance compute load in the cloud", "Optimise for specific workloads", "Assess overcommit ratios"],
|
|
51
|
+
divided: true,
|
|
52
|
+
ticked: true
|
|
53
|
+
}),
|
|
54
|
+
name: "Ticked with horizontal divider"
|
|
55
|
+
};
|
|
56
|
+
const Inline = exports.Inline = {
|
|
57
|
+
render: () => /*#__PURE__*/_react.default.createElement(_List.default, {
|
|
58
|
+
items: ["Community", "Careers", "Press centre"],
|
|
59
|
+
inline: true
|
|
60
|
+
}),
|
|
61
|
+
name: "Inline"
|
|
62
|
+
};
|
|
63
|
+
const Middot = exports.Middot = {
|
|
64
|
+
render: () => /*#__PURE__*/_react.default.createElement(_List.default, {
|
|
65
|
+
items: ["Legal information", "Data privacy", "Report a bug on this site"],
|
|
66
|
+
middot: true
|
|
67
|
+
}),
|
|
68
|
+
name: "Middot"
|
|
69
|
+
};
|
|
70
|
+
const Stretch = exports.Stretch = {
|
|
71
|
+
render: () => /*#__PURE__*/_react.default.createElement(_List.default, {
|
|
72
|
+
items: [{
|
|
73
|
+
content: /*#__PURE__*/_react.default.createElement("h3", null, "Documentation")
|
|
74
|
+
}, {
|
|
75
|
+
content: /*#__PURE__*/_react.default.createElement(_StatusLabel.default, {
|
|
76
|
+
appearance: "positive"
|
|
77
|
+
}, "New"),
|
|
78
|
+
className: "u-vertically-center u-align--right"
|
|
79
|
+
}],
|
|
80
|
+
stretch: true
|
|
81
|
+
}),
|
|
82
|
+
name: "Stretch"
|
|
83
|
+
};
|
|
84
|
+
const VerticalStepped = exports.VerticalStepped = {
|
|
85
|
+
render: () => /*#__PURE__*/_react.default.createElement(_List.default, {
|
|
86
|
+
items: [{
|
|
87
|
+
title: "Log in to JAAS",
|
|
88
|
+
content: "Ensure you have an Ubuntu SSO account before contacting JAAS. Log in to JAAS now."
|
|
89
|
+
}, {
|
|
90
|
+
title: "Configure a model",
|
|
91
|
+
content: 'Applications are contained within models and are installed via charms. Configure your model by pressing the "Start a new model" button.'
|
|
92
|
+
}, {
|
|
93
|
+
title: "Credentials and SSH keys",
|
|
94
|
+
content: "After having selected a cloud, a form will appear for submitting your credentials to JAAS. The below resources are available if you need help with gathering credentials."
|
|
95
|
+
}],
|
|
96
|
+
stepped: true
|
|
97
|
+
}),
|
|
98
|
+
name: "Vertical stepped"
|
|
99
|
+
};
|
|
100
|
+
const HorizontalStepped = exports.HorizontalStepped = {
|
|
101
|
+
render: () => /*#__PURE__*/_react.default.createElement(_List.default, {
|
|
102
|
+
items: [{
|
|
103
|
+
title: "Log in to JAAS",
|
|
104
|
+
content: "Ensure you have an Ubuntu SSO account before contacting JAAS. Log in to JAAS now."
|
|
105
|
+
}, {
|
|
106
|
+
title: "Configure a model",
|
|
107
|
+
content: 'Applications are contained within models and are installed via charms. Configure your model by pressing the "Start a new model" button.'
|
|
108
|
+
}],
|
|
109
|
+
stepped: true,
|
|
110
|
+
detailed: true
|
|
111
|
+
}),
|
|
112
|
+
name: "Horizontal stepped"
|
|
113
|
+
};
|
|
114
|
+
const Split = exports.Split = {
|
|
115
|
+
render: () => /*#__PURE__*/_react.default.createElement(_List.default, {
|
|
116
|
+
items: ["Jointly shape the OpenStack architecture", "We help you plan your cloud hardware requirements", "We build OpenStack in your data center", "We operate the cloud to an SLA", "Transparent audit, logging, monitoring and management", "When your team is ready, we hand over the keys"],
|
|
117
|
+
divided: true,
|
|
118
|
+
split: true,
|
|
119
|
+
ticked: true
|
|
120
|
+
}),
|
|
121
|
+
name: "Split"
|
|
122
|
+
};
|
|
@@ -9,5 +9,9 @@ export type Props = {
|
|
|
9
9
|
url: string;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* This is a layout component that is used to display a page with a title and children.
|
|
14
|
+
* The LoginPageLayout recommended usages are in the login flow like registration, sign up and error pages.
|
|
15
|
+
*/
|
|
12
16
|
declare const LoginPageLayout: FC<Props>;
|
|
13
17
|
export default LoginPageLayout;
|
|
@@ -20,6 +20,10 @@ const defaultLogo = {
|
|
|
20
20
|
title: "Canonical",
|
|
21
21
|
url: "/"
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* This is a layout component that is used to display a page with a title and children.
|
|
25
|
+
* The LoginPageLayout recommended usages are in the login flow like registration, sign up and error pages.
|
|
26
|
+
*/
|
|
23
27
|
const LoginPageLayout = _ref => {
|
|
24
28
|
let {
|
|
25
29
|
children,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import LoginPageLayout from "./LoginPageLayout";
|
|
3
|
+
declare const meta: Meta<typeof LoginPageLayout>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof LoginPageLayout>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const LoginPage: Story;
|
|
8
|
+
export declare const ErrorPage: Story;
|
|
9
|
+
export declare const RegistrationPage: Story;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.RegistrationPage = exports.LoginPage = exports.ErrorPage = exports.Default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _CodeSnippet = _interopRequireDefault(require("../CodeSnippet/CodeSnippet"));
|
|
9
|
+
var _Spinner = _interopRequireDefault(require("../Spinner/Spinner"));
|
|
10
|
+
var _LoginPageLayout = _interopRequireDefault(require("./LoginPageLayout"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
const meta = {
|
|
13
|
+
component: _LoginPageLayout.default,
|
|
14
|
+
tags: ["autodocs"]
|
|
15
|
+
};
|
|
16
|
+
var _default = exports.default = meta;
|
|
17
|
+
const Default = exports.Default = {
|
|
18
|
+
args: {
|
|
19
|
+
title: "This is the title"
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const LoginPage = exports.LoginPage = {
|
|
23
|
+
args: {
|
|
24
|
+
title: "Sign in",
|
|
25
|
+
children: /*#__PURE__*/_react.default.createElement(_Spinner.default, null)
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const ErrorPage = exports.ErrorPage = {
|
|
29
|
+
args: {
|
|
30
|
+
title: "Sign in failed",
|
|
31
|
+
children: /*#__PURE__*/_react.default.createElement(_CodeSnippet.default, {
|
|
32
|
+
blocks: [{
|
|
33
|
+
wrapLines: true,
|
|
34
|
+
code: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "An error occurred. Try signing in again.")
|
|
35
|
+
}]
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const RegistrationPage = exports.RegistrationPage = {
|
|
40
|
+
args: {
|
|
41
|
+
title: "Sign up",
|
|
42
|
+
children: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", null, "Fill in the form below to create an account"), /*#__PURE__*/_react.default.createElement("form", null, /*#__PURE__*/_react.default.createElement("input", {
|
|
43
|
+
type: "text",
|
|
44
|
+
placeholder: "Username"
|
|
45
|
+
}), /*#__PURE__*/_react.default.createElement("input", {
|
|
46
|
+
type: "email",
|
|
47
|
+
placeholder: "Email"
|
|
48
|
+
}), /*#__PURE__*/_react.default.createElement("input", {
|
|
49
|
+
type: "password",
|
|
50
|
+
placeholder: "Password"
|
|
51
|
+
}), /*#__PURE__*/_react.default.createElement("button", null, "Sign up"))),
|
|
52
|
+
logo: {
|
|
53
|
+
src: "https://anbox-cloud.io/static/logo.svg",
|
|
54
|
+
title: "Anbox Cloud",
|
|
55
|
+
url: "/"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -95,5 +95,8 @@ export type Props = PropsWithSpread<{
|
|
|
95
95
|
*/
|
|
96
96
|
hiddenCaption?: string | null;
|
|
97
97
|
}, TableProps>;
|
|
98
|
+
/**
|
|
99
|
+
* This is a [React](https://reactjs.org/) component to support many table use cases.
|
|
100
|
+
*/
|
|
98
101
|
declare const MainTable: ({ defaultSort, defaultSortDirection, emptyStateMsg, expanding, headers, onUpdateSort, paginate, rows, responsive, sortable, sortFunction, hiddenCaption, ...props }: Props) => JSX.Element;
|
|
99
102
|
export default MainTable;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import MainTable from "./MainTable";
|
|
3
|
+
declare const meta: Meta<typeof MainTable>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MainTable>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Sortable: Story;
|
|
8
|
+
export declare const Expanding: Story;
|
|
9
|
+
/**
|
|
10
|
+
* If the table cell may have overflowing content (such as contextual menu) use `hasOverflow` prop to avoid cropping it.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Overflow: Story;
|
|
13
|
+
export declare const Responsive: Story;
|
|
14
|
+
export declare const Paginated: Story;
|
|
15
|
+
export declare const Empty: Story;
|