@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.
- package/README.md +2 -2
- package/package.json +9 -6
- package/dist/components/Accordion/Accordion.d.ts +0 -46
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -18
- package/dist/components/Accordion/Accordion.stories.js +0 -117
- package/dist/components/Accordion/AccordionSection/AccordionSection.d.ts +0 -34
- package/dist/components/Accordion/AccordionSection/index.d.ts +0 -2
- package/dist/components/Accordion/index.d.ts +0 -2
- package/dist/components/ActionButton/ActionButton.d.ts +0 -48
- package/dist/components/ActionButton/ActionButton.stories.d.ts +0 -7
- package/dist/components/ActionButton/ActionButton.stories.js +0 -36
- package/dist/components/ActionButton/index.d.ts +0 -2
- package/dist/components/ApplicationLayout/AppAside/AppAside.d.ts +0 -33
- package/dist/components/ApplicationLayout/AppAside/AppAside.stories.d.ts +0 -13
- package/dist/components/ApplicationLayout/AppAside/AppAside.stories.js +0 -116
- package/dist/components/ApplicationLayout/AppAside/index.d.ts +0 -2
- package/dist/components/ApplicationLayout/AppMain/AppMain.d.ts +0 -14
- package/dist/components/ApplicationLayout/AppMain/AppMain.stories.d.ts +0 -14
- package/dist/components/ApplicationLayout/AppMain/AppMain.stories.js +0 -45
- package/dist/components/ApplicationLayout/AppMain/index.d.ts +0 -2
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.d.ts +0 -26
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.stories.d.ts +0 -12
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.stories.js +0 -104
- package/dist/components/ApplicationLayout/AppNavigation/index.d.ts +0 -2
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.d.ts +0 -18
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.d.ts +0 -15
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.js +0 -52
- package/dist/components/ApplicationLayout/AppNavigationBar/index.d.ts +0 -2
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.d.ts +0 -14
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.stories.d.ts +0 -13
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.stories.js +0 -41
- package/dist/components/ApplicationLayout/AppStatus/index.d.ts +0 -2
- package/dist/components/ApplicationLayout/Application/Application.d.ts +0 -15
- package/dist/components/ApplicationLayout/Application/Application.stories.d.ts +0 -6
- package/dist/components/ApplicationLayout/Application/Application.stories.js +0 -16
- package/dist/components/ApplicationLayout/Application/index.d.ts +0 -2
- package/dist/components/ApplicationLayout/ApplicationLayout.d.ts +0 -89
- package/dist/components/ApplicationLayout/ApplicationLayout.stories.d.ts +0 -24
- package/dist/components/ApplicationLayout/ApplicationLayout.stories.js +0 -232
- package/dist/components/ApplicationLayout/index.d.ts +0 -7
- package/dist/components/ArticlePagination/ArticlePagination.d.ts +0 -31
- package/dist/components/ArticlePagination/ArticlePagination.stories.d.ts +0 -6
- package/dist/components/ArticlePagination/ArticlePagination.stories.js +0 -22
- package/dist/components/ArticlePagination/index.d.ts +0 -2
- package/dist/components/Badge/Badge.d.ts +0 -34
- package/dist/components/Badge/Badge.stories.d.ts +0 -15
- package/dist/components/Badge/Badge.stories.js +0 -62
- package/dist/components/Badge/index.d.ts +0 -2
- package/dist/components/Button/Button.d.ts +0 -64
- package/dist/components/Button/Button.stories.d.ts +0 -32
- package/dist/components/Button/Button.stories.js +0 -180
- package/dist/components/Button/index.d.ts +0 -2
- package/dist/components/Card/Card.d.ts +0 -35
- package/dist/components/Card/Card.stories.d.ts +0 -33
- package/dist/components/Card/Card.stories.js +0 -51
- package/dist/components/Card/index.d.ts +0 -2
- package/dist/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +0 -27
- package/dist/components/CheckboxInput/CheckableInput/index.d.ts +0 -2
- package/dist/components/CheckboxInput/CheckboxInput.d.ts +0 -9
- package/dist/components/CheckboxInput/CheckboxInput.stories.d.ts +0 -11
- package/dist/components/CheckboxInput/CheckboxInput.stories.js +0 -84
- package/dist/components/CheckboxInput/index.d.ts +0 -2
- package/dist/components/Chip/Chip.d.ts +0 -56
- package/dist/components/Chip/Chip.stories.d.ts +0 -9
- package/dist/components/Chip/Chip.stories.js +0 -45
- package/dist/components/Chip/index.d.ts +0 -2
- package/dist/components/Code/Code.d.ts +0 -13
- package/dist/components/Code/index.d.ts +0 -2
- package/dist/components/CodeSnippet/CodeSnippet.d.ts +0 -21
- package/dist/components/CodeSnippet/CodeSnippet.stories.d.ts +0 -45
- package/dist/components/CodeSnippet/CodeSnippet.stories.js +0 -279
- package/dist/components/CodeSnippet/CodeSnippetBlock.d.ts +0 -40
- package/dist/components/CodeSnippet/CodeSnippetDropdown.d.ts +0 -18
- package/dist/components/CodeSnippet/index.d.ts +0 -5
- package/dist/components/Col/Col.d.ts +0 -53
- package/dist/components/Col/Col.stories.d.ts +0 -11
- package/dist/components/Col/Col.stories.js +0 -154
- package/dist/components/Col/index.d.ts +0 -2
- package/dist/components/ConfirmationButton/ConfirmationButton.d.ts +0 -28
- package/dist/components/ConfirmationButton/ConfirmationButton.stories.d.ts +0 -9
- package/dist/components/ConfirmationButton/ConfirmationButton.stories.js +0 -108
- package/dist/components/ConfirmationButton/index.d.ts +0 -2
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +0 -53
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -18
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +0 -135
- package/dist/components/ConfirmationModal/index.d.ts +0 -2
- package/dist/components/ContextualMenu/ContextualMenu.d.ts +0 -110
- package/dist/components/ContextualMenu/ContextualMenu.stories.d.ts +0 -13
- package/dist/components/ContextualMenu/ContextualMenu.stories.js +0 -107
- package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +0 -43
- package/dist/components/ContextualMenu/ContextualMenuDropdown/index.d.ts +0 -2
- package/dist/components/ContextualMenu/index.d.ts +0 -3
- package/dist/components/EmptyState/EmptyState.d.ts +0 -25
- package/dist/components/EmptyState/EmptyState.stories.d.ts +0 -7
- package/dist/components/EmptyState/EmptyState.stories.js +0 -49
- package/dist/components/EmptyState/index.d.ts +0 -2
- package/dist/components/Field/Field.d.ts +0 -77
- package/dist/components/Field/index.d.ts +0 -2
- package/dist/components/Form/Form.d.ts +0 -21
- package/dist/components/Form/Form.stories.d.ts +0 -12
- package/dist/components/Form/Form.stories.js +0 -179
- package/dist/components/Form/index.d.ts +0 -2
- package/dist/components/FormikField/FormikField.d.ts +0 -25
- package/dist/components/FormikField/FormikField.stories.d.ts +0 -8
- package/dist/components/FormikField/FormikField.stories.js +0 -85
- package/dist/components/FormikField/index.d.ts +0 -1
- package/dist/components/Icon/Icon.d.ts +0 -59
- package/dist/components/Icon/Icon.stories.d.ts +0 -16
- package/dist/components/Icon/Icon.stories.js +0 -49
- package/dist/components/Icon/index.d.ts +0 -2
- package/dist/components/Input/Input.d.ts +0 -70
- package/dist/components/Input/Input.stories.d.ts +0 -14
- package/dist/components/Input/Input.stories.js +0 -148
- package/dist/components/Input/index.d.ts +0 -2
- package/dist/components/Label/Label.d.ts +0 -25
- package/dist/components/Label/index.d.ts +0 -2
- package/dist/components/Link/Link.d.ts +0 -31
- package/dist/components/Link/Link.stories.d.ts +0 -9
- package/dist/components/Link/Link.stories.js +0 -48
- package/dist/components/Link/index.d.ts +0 -2
- package/dist/components/List/List.d.ts +0 -36
- package/dist/components/List/List.stories.d.ts +0 -15
- package/dist/components/List/List.stories.js +0 -122
- package/dist/components/List/index.d.ts +0 -2
- package/dist/components/Loader/Loader.d.ts +0 -6
- package/dist/components/Loader/index.d.ts +0 -1
- package/dist/components/LoginPageLayout/LoginPageLayout.d.ts +0 -17
- package/dist/components/LoginPageLayout/LoginPageLayout.stories.d.ts +0 -9
- package/dist/components/LoginPageLayout/LoginPageLayout.stories.js +0 -58
- package/dist/components/LoginPageLayout/index.d.ts +0 -2
- package/dist/components/MainTable/MainTable.d.ts +0 -102
- package/dist/components/MainTable/MainTable.stories.d.ts +0 -15
- package/dist/components/MainTable/MainTable.stories.js +0 -553
- package/dist/components/MainTable/index.d.ts +0 -2
- package/dist/components/Modal/Modal.d.ts +0 -36
- package/dist/components/Modal/Modal.stories.d.ts +0 -6
- package/dist/components/Modal/Modal.stories.js +0 -57
- package/dist/components/Modal/index.d.ts +0 -2
- package/dist/components/ModularTable/ModularTable.d.ts +0 -105
- package/dist/components/ModularTable/ModularTable.stories.d.ts +0 -27
- package/dist/components/ModularTable/ModularTable.stories.js +0 -343
- package/dist/components/ModularTable/index.d.ts +0 -2
- package/dist/components/MultiSelect/FadeInDown/FadeInDown.d.ts +0 -10
- package/dist/components/MultiSelect/FadeInDown/index.d.ts +0 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +0 -57
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -8
- package/dist/components/MultiSelect/MultiSelect.stories.js +0 -70
- package/dist/components/MultiSelect/index.d.ts +0 -1
- package/dist/components/Navigation/Navigation.d.ts +0 -66
- package/dist/components/Navigation/Navigation.stories.d.ts +0 -43
- package/dist/components/Navigation/Navigation.stories.js +0 -232
- package/dist/components/Navigation/NavigationLink/NavigationLink.d.ts +0 -10
- package/dist/components/Navigation/NavigationLink/index.d.ts +0 -1
- package/dist/components/Navigation/NavigationMenu/NavigationMenu.d.ts +0 -11
- package/dist/components/Navigation/NavigationMenu/index.d.ts +0 -1
- package/dist/components/Navigation/index.d.ts +0 -3
- package/dist/components/Navigation/types.d.ts +0 -64
- package/dist/components/Notification/Notification.d.ts +0 -110
- package/dist/components/Notification/Notification.stories.d.ts +0 -45
- package/dist/components/Notification/Notification.stories.js +0 -201
- package/dist/components/Notification/index.d.ts +0 -2
- package/dist/components/NotificationProvider/NotificationProvider.d.ts +0 -5
- package/dist/components/NotificationProvider/index.d.ts +0 -3
- package/dist/components/NotificationProvider/messageBuilder.d.ts +0 -6
- package/dist/components/NotificationProvider/types.d.ts +0 -35
- package/dist/components/Pagination/Pagination.d.ts +0 -102
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -14
- package/dist/components/Pagination/Pagination.stories.js +0 -94
- package/dist/components/Pagination/PaginationButton/PaginationButton.d.ts +0 -30
- package/dist/components/Pagination/PaginationButton/index.d.ts +0 -2
- package/dist/components/Pagination/PaginationItem/PaginationItem.d.ts +0 -17
- package/dist/components/Pagination/PaginationItem/index.d.ts +0 -2
- package/dist/components/Pagination/index.d.ts +0 -2
- package/dist/components/Panel/Panel.d.ts +0 -123
- package/dist/components/Panel/Panel.stories.d.ts +0 -17
- package/dist/components/Panel/Panel.stories.js +0 -60
- package/dist/components/Panel/index.d.ts +0 -1
- package/dist/components/PasswordToggle/PasswordToggle.d.ts +0 -108
- package/dist/components/PasswordToggle/PasswordToggle.stories.d.ts +0 -12
- package/dist/components/PasswordToggle/PasswordToggle.stories.js +0 -74
- package/dist/components/PasswordToggle/index.d.ts +0 -2
- package/dist/components/RadioInput/RadioInput.d.ts +0 -9
- package/dist/components/RadioInput/RadioInput.stories.d.ts +0 -10
- package/dist/components/RadioInput/RadioInput.stories.js +0 -83
- package/dist/components/RadioInput/index.d.ts +0 -2
- package/dist/components/Row/Row.d.ts +0 -19
- package/dist/components/Row/Row.stories.d.ts +0 -9
- package/dist/components/Row/Row.stories.js +0 -29
- package/dist/components/Row/index.d.ts +0 -2
- package/dist/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +0 -25
- package/dist/components/SearchAndFilter/FilterPanelSection/index.d.ts +0 -1
- package/dist/components/SearchAndFilter/SearchAndFilter.d.ts +0 -33
- package/dist/components/SearchAndFilter/SearchAndFilter.stories.d.ts +0 -8
- package/dist/components/SearchAndFilter/SearchAndFilter.stories.js +0 -218
- package/dist/components/SearchAndFilter/index.d.ts +0 -2
- package/dist/components/SearchAndFilter/types.d.ts +0 -11
- package/dist/components/SearchAndFilter/utils.d.ts +0 -13
- package/dist/components/SearchBox/SearchBox.d.ts +0 -63
- package/dist/components/SearchBox/SearchBox.stories.d.ts +0 -14
- package/dist/components/SearchBox/SearchBox.stories.js +0 -106
- package/dist/components/SearchBox/index.d.ts +0 -2
- package/dist/components/Select/Select.d.ts +0 -71
- package/dist/components/Select/Select.stories.d.ts +0 -7
- package/dist/components/Select/Select.stories.js +0 -97
- package/dist/components/Select/index.d.ts +0 -2
- package/dist/components/SideNavigation/SideNavigation.d.ts +0 -50
- package/dist/components/SideNavigation/SideNavigation.stories.d.ts +0 -14
- package/dist/components/SideNavigation/SideNavigation.stories.js +0 -62
- package/dist/components/SideNavigation/SideNavigationBase/SideNavigationBase.d.ts +0 -31
- package/dist/components/SideNavigation/SideNavigationBase/index.d.ts +0 -1
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.d.ts +0 -20
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.d.ts +0 -22
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.js +0 -70
- package/dist/components/SideNavigation/SideNavigationItem/index.d.ts +0 -1
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.d.ts +0 -21
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.stories.d.ts +0 -7
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.stories.js +0 -32
- package/dist/components/SideNavigation/SideNavigationLink/index.d.ts +0 -1
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.d.ts +0 -7
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.stories.d.ts +0 -6
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.stories.js +0 -25
- package/dist/components/SideNavigation/SideNavigationText/index.d.ts +0 -1
- package/dist/components/SideNavigation/index.d.ts +0 -5
- package/dist/components/Slider/Slider.d.ts +0 -62
- package/dist/components/Slider/Slider.stories.d.ts +0 -10
- package/dist/components/Slider/Slider.stories.js +0 -74
- package/dist/components/Slider/index.d.ts +0 -2
- package/dist/components/Spinner/Spinner.d.ts +0 -29
- package/dist/components/Spinner/Spinner.stories.d.ts +0 -8
- package/dist/components/Spinner/Spinner.stories.js +0 -28
- package/dist/components/Spinner/index.d.ts +0 -2
- package/dist/components/StatusLabel/StatusLabel.d.ts +0 -33
- package/dist/components/StatusLabel/StatusLabel.stories.d.ts +0 -10
- package/dist/components/StatusLabel/StatusLabel.stories.js +0 -61
- package/dist/components/StatusLabel/index.d.ts +0 -2
- package/dist/components/Strip/Strip.d.ts +0 -64
- package/dist/components/Strip/Strip.stories.d.ts +0 -12
- package/dist/components/Strip/Strip.stories.js +0 -130
- package/dist/components/Strip/index.d.ts +0 -2
- package/dist/components/SummaryButton/SummaryButton.d.ts +0 -29
- package/dist/components/SummaryButton/SummaryButton.stories.d.ts +0 -18
- package/dist/components/SummaryButton/SummaryButton.stories.js +0 -59
- package/dist/components/SummaryButton/index.d.ts +0 -2
- package/dist/components/Switch/Switch.d.ts +0 -17
- package/dist/components/Switch/Switch.stories.d.ts +0 -7
- package/dist/components/Switch/Switch.stories.js +0 -26
- package/dist/components/Switch/index.d.ts +0 -2
- package/dist/components/Table/Table.d.ts +0 -22
- package/dist/components/Table/index.d.ts +0 -2
- package/dist/components/TableCell/TableCell.d.ts +0 -26
- package/dist/components/TableCell/index.d.ts +0 -2
- package/dist/components/TableHeader/TableHeader.d.ts +0 -14
- package/dist/components/TableHeader/index.d.ts +0 -2
- package/dist/components/TablePagination/TablePagination.d.ts +0 -98
- package/dist/components/TablePagination/TablePagination.stories.d.ts +0 -14
- package/dist/components/TablePagination/TablePagination.stories.js +0 -330
- package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +0 -24
- package/dist/components/TablePagination/TablePaginationControls/index.d.ts +0 -2
- package/dist/components/TablePagination/index.d.ts +0 -2
- package/dist/components/TablePagination/utils.d.ts +0 -27
- package/dist/components/TableRow/TableRow.d.ts +0 -10
- package/dist/components/TableRow/index.d.ts +0 -2
- package/dist/components/Tabs/Tabs.d.ts +0 -45
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -11
- package/dist/components/Tabs/Tabs.stories.js +0 -56
- package/dist/components/Tabs/index.d.ts +0 -2
- package/dist/components/Textarea/Textarea.d.ts +0 -70
- package/dist/components/Textarea/Textarea.stories.d.ts +0 -7
- package/dist/components/Textarea/Textarea.stories.js +0 -62
- package/dist/components/Textarea/index.d.ts +0 -2
- package/dist/components/Tooltip/Tooltip.d.ts +0 -75
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -12
- package/dist/components/Tooltip/Tooltip.stories.js +0 -71
- package/dist/components/Tooltip/index.d.ts +0 -2
- package/dist/enums.d.ts +0 -13
- package/dist/hooks/index.d.ts +0 -9
- package/dist/hooks/useId.d.ts +0 -4
- package/dist/hooks/useListener.d.ts +0 -11
- package/dist/hooks/useOnClickOutside.d.ts +0 -12
- package/dist/hooks/useOnEscapePressed.d.ts +0 -6
- package/dist/hooks/usePagination.d.ts +0 -19
- package/dist/hooks/usePrevious.d.ts +0 -7
- package/dist/hooks/useThrottle.d.ts +0 -9
- package/dist/hooks/useWindowFitment.d.ts +0 -54
- package/dist/index.d.ts +0 -132
- package/dist/types/index.d.ts +0 -38
- package/dist/utils.d.ts +0 -27
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Default = exports.CustomContent = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _Badge = _interopRequireDefault(require("../Badge"));
|
|
9
|
-
var _SideNavigation = _interopRequireDefault(require("./SideNavigation"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
const meta = {
|
|
12
|
-
component: _SideNavigation.default,
|
|
13
|
-
tags: ["autodocs"]
|
|
14
|
-
};
|
|
15
|
-
var _default = exports.default = meta;
|
|
16
|
-
/**
|
|
17
|
-
* Menu items can be provided as links, text or custom components. To provide attributes to individual menus then each menu can be provided as a object containing an items array: `{ className: "menu-one", items: [...] }`.
|
|
18
|
-
*/
|
|
19
|
-
const Default = exports.Default = {
|
|
20
|
-
args: {
|
|
21
|
-
items: [{
|
|
22
|
-
className: "menu-one",
|
|
23
|
-
items: [{
|
|
24
|
-
icon: "drag",
|
|
25
|
-
label: "Models",
|
|
26
|
-
href: "/models",
|
|
27
|
-
status: /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
28
|
-
value: 9,
|
|
29
|
-
isNegative: true
|
|
30
|
-
})
|
|
31
|
-
}, {
|
|
32
|
-
icon: "menu",
|
|
33
|
-
label: "Controllers",
|
|
34
|
-
nonInteractive: true
|
|
35
|
-
}, {
|
|
36
|
-
icon: "user",
|
|
37
|
-
label: "Permissions",
|
|
38
|
-
href: "/users"
|
|
39
|
-
}]
|
|
40
|
-
}, {
|
|
41
|
-
className: "menu-two",
|
|
42
|
-
items: [{
|
|
43
|
-
icon: "information",
|
|
44
|
-
label: "Docs",
|
|
45
|
-
href: "/docs"
|
|
46
|
-
}, {
|
|
47
|
-
label: "Logout",
|
|
48
|
-
href: "/logout"
|
|
49
|
-
}]
|
|
50
|
-
}]
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* `children` can be provided instead of `items` in cases where custom content
|
|
56
|
-
* is required.
|
|
57
|
-
*/
|
|
58
|
-
const CustomContent = exports.CustomContent = {
|
|
59
|
-
args: {
|
|
60
|
-
children: /*#__PURE__*/_react.default.createElement("div", null, "Custom menu content.")
|
|
61
|
-
}
|
|
62
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { PropsWithSpread } from "../../../types";
|
|
3
|
-
import type { ComponentType, ElementType, ReactNode } from "react";
|
|
4
|
-
export type Props<C> = PropsWithSpread<{
|
|
5
|
-
/**
|
|
6
|
-
* The component or element to use for the element e.g. `span` or `NavLink`.
|
|
7
|
-
*/
|
|
8
|
-
component: ElementType | ComponentType<C>;
|
|
9
|
-
/**
|
|
10
|
-
* Whether to use the dark theme.
|
|
11
|
-
*/
|
|
12
|
-
dark?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* The navigation item's icon.
|
|
15
|
-
*/
|
|
16
|
-
icon?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The navigation item's label.
|
|
19
|
-
*/
|
|
20
|
-
label: ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* The navigation item's status.
|
|
23
|
-
*/
|
|
24
|
-
status?: ReactNode;
|
|
25
|
-
/**
|
|
26
|
-
* A ref to pass to the element.
|
|
27
|
-
*/
|
|
28
|
-
forwardRef?: React.Ref<C> | null;
|
|
29
|
-
}, C>;
|
|
30
|
-
declare const SideNavigationBase: <C>({ component: Component, dark, icon, label, status, forwardRef, ...props }: Props<C>) => React.JSX.Element;
|
|
31
|
-
export default SideNavigationBase;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, type Props as SideNavigationBaseProps, } from "./SideNavigationBase";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { HTMLProps, PropsWithChildren } from "react";
|
|
3
|
-
import type { SideNavigationLinkProps } from "../SideNavigationLink";
|
|
4
|
-
import type { SideNavigationLinkDefaultElement } from "../SideNavigationLink";
|
|
5
|
-
import { SideNavigationTextProps } from "../SideNavigationText";
|
|
6
|
-
type ItemProps = {
|
|
7
|
-
/**
|
|
8
|
-
* The item content.
|
|
9
|
-
*/
|
|
10
|
-
children: NonNullable<PropsWithChildren["children"]>;
|
|
11
|
-
} & HTMLProps<HTMLLIElement>;
|
|
12
|
-
type ContentProps<L = SideNavigationLinkDefaultElement> = SideNavigationLinkProps<L> | (SideNavigationTextProps & {
|
|
13
|
-
/**
|
|
14
|
-
* Whether this should be a content-only item.
|
|
15
|
-
*/
|
|
16
|
-
nonInteractive: true;
|
|
17
|
-
});
|
|
18
|
-
export type Props<L = SideNavigationLinkDefaultElement> = ItemProps | ContentProps<L>;
|
|
19
|
-
declare const SideNavigationItem: <L = SideNavigationLinkDefaultElement>(props: Props<L>) => React.JSX.Element;
|
|
20
|
-
export default SideNavigationItem;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import SideNavigationItem from "./SideNavigationItem";
|
|
3
|
-
declare const meta: Meta<typeof SideNavigationItem>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof SideNavigationItem>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
/**
|
|
8
|
-
* The navigation item can appear as a link and accept the props from [`SideNavigationLink`](/docs/components-sidenavigation-sidenavigationlink--docs).
|
|
9
|
-
*/
|
|
10
|
-
export declare const Links: Story;
|
|
11
|
-
/**
|
|
12
|
-
* By providing the `nonInteractive` prop the navigation item will appear as a
|
|
13
|
-
* text entry and accept the props from
|
|
14
|
-
* [`SideNavigationText`](/docs/components-sidenavigation-sidenavigationtext--docs).
|
|
15
|
-
*/
|
|
16
|
-
export declare const Text: Story;
|
|
17
|
-
/**
|
|
18
|
-
* The navigation item can display custom content by providing the `children` prop.
|
|
19
|
-
* In this case, any other attributes provided to the object will be given to
|
|
20
|
-
* the list item.
|
|
21
|
-
*/
|
|
22
|
-
export declare const CustomContent: Story;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Text = exports.Links = exports.Default = exports.CustomContent = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _SideNavigation = _interopRequireDefault(require("../SideNavigation"));
|
|
9
|
-
var _SideNavigationItem = _interopRequireDefault(require("./SideNavigationItem"));
|
|
10
|
-
var _SideNavigationText = _interopRequireDefault(require("../SideNavigationText"));
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
|
-
const meta = {
|
|
14
|
-
component: _SideNavigationItem.default,
|
|
15
|
-
render: args => /*#__PURE__*/_react.default.createElement(_SideNavigation.default, {
|
|
16
|
-
dark: false,
|
|
17
|
-
items: [{
|
|
18
|
-
items: [/*#__PURE__*/_react.default.createElement(_SideNavigationItem.default, _extends({
|
|
19
|
-
key: "item"
|
|
20
|
-
}, args, {
|
|
21
|
-
dark: false
|
|
22
|
-
}))]
|
|
23
|
-
}]
|
|
24
|
-
}),
|
|
25
|
-
tags: ["autodocs"]
|
|
26
|
-
};
|
|
27
|
-
var _default = exports.default = meta;
|
|
28
|
-
const Default = exports.Default = {
|
|
29
|
-
args: {
|
|
30
|
-
icon: "drag",
|
|
31
|
-
label: "Models",
|
|
32
|
-
href: "/models"
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* The navigation item can appear as a link and accept the props from [`SideNavigationLink`](/docs/components-sidenavigation-sidenavigationlink--docs).
|
|
38
|
-
*/
|
|
39
|
-
const Links = exports.Links = {
|
|
40
|
-
args: {
|
|
41
|
-
icon: "drag",
|
|
42
|
-
label: "Models",
|
|
43
|
-
href: "/models"
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* By providing the `nonInteractive` prop the navigation item will appear as a
|
|
49
|
-
* text entry and accept the props from
|
|
50
|
-
* [`SideNavigationText`](/docs/components-sidenavigation-sidenavigationtext--docs).
|
|
51
|
-
*/
|
|
52
|
-
const Text = exports.Text = {
|
|
53
|
-
args: {
|
|
54
|
-
icon: "drag",
|
|
55
|
-
label: "Models",
|
|
56
|
-
nonInteractive: true
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* The navigation item can display custom content by providing the `children` prop.
|
|
62
|
-
* In this case, any other attributes provided to the object will be given to
|
|
63
|
-
* the list item.
|
|
64
|
-
*/
|
|
65
|
-
const CustomContent = exports.CustomContent = {
|
|
66
|
-
args: {
|
|
67
|
-
className: "custom-class",
|
|
68
|
-
children: /*#__PURE__*/_react.default.createElement(_SideNavigationText.default, null, "This item has been given a custom class")
|
|
69
|
-
}
|
|
70
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, type Props as SideNavigationItemProps, } from "./SideNavigationItem";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { HTMLProps, ReactNode } from "react";
|
|
3
|
-
import type { SideNavigationBaseProps } from "../SideNavigationBase";
|
|
4
|
-
export type LinkDefaultElement = HTMLProps<HTMLAnchorElement>;
|
|
5
|
-
export type Props<L = LinkDefaultElement, E = HTMLAnchorElement> = Partial<Omit<SideNavigationBaseProps<L>, "component">> & {
|
|
6
|
-
/**
|
|
7
|
-
* The navigation item's label.
|
|
8
|
-
*/
|
|
9
|
-
label: ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* The component or element to use for the link element e.g. `a` or `NavLink`.
|
|
12
|
-
* @default a
|
|
13
|
-
*/
|
|
14
|
-
component?: SideNavigationBaseProps<L>["component"];
|
|
15
|
-
/**
|
|
16
|
-
* A ref to pass to the link element.
|
|
17
|
-
*/
|
|
18
|
-
forwardRef?: React.Ref<E> | null;
|
|
19
|
-
};
|
|
20
|
-
declare const SideNavigationLink: <L = LinkDefaultElement, E = HTMLAnchorElement>({ component, forwardRef, ...props }: Props<L, E>) => React.JSX.Element;
|
|
21
|
-
export default SideNavigationLink;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import SideNavigationLink from "./SideNavigationLink";
|
|
3
|
-
declare const meta: Meta<typeof SideNavigationLink>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof SideNavigationLink>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const CustomComponent: Story;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Default = exports.CustomComponent = void 0;
|
|
7
|
-
var _Badge = _interopRequireDefault(require("../../Badge"));
|
|
8
|
-
var _SideNavigationLink = _interopRequireDefault(require("./SideNavigationLink"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
const meta = {
|
|
12
|
-
component: _SideNavigationLink.default,
|
|
13
|
-
tags: ["autodocs"]
|
|
14
|
-
};
|
|
15
|
-
var _default = exports.default = meta;
|
|
16
|
-
const Default = exports.Default = {
|
|
17
|
-
args: {
|
|
18
|
-
icon: "drag",
|
|
19
|
-
label: "Models",
|
|
20
|
-
status: /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
21
|
-
value: 9,
|
|
22
|
-
isNegative: true
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const CustomComponent = exports.CustomComponent = {
|
|
27
|
-
args: {
|
|
28
|
-
component: props => /*#__PURE__*/_react.default.createElement("button", props),
|
|
29
|
-
icon: "drag",
|
|
30
|
-
label: "Models"
|
|
31
|
-
}
|
|
32
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, type LinkDefaultElement as SideNavigationLinkDefaultElement, type Props as SideNavigationLinkProps, } from "./SideNavigationLink";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { HTMLProps } from "react";
|
|
3
|
-
import type { SideNavigationBaseProps } from "../SideNavigationBase";
|
|
4
|
-
export type TextDefaultElement = HTMLProps<HTMLSpanElement>;
|
|
5
|
-
export type Props = Omit<SideNavigationBaseProps<TextDefaultElement>, "component" | "label">;
|
|
6
|
-
declare const SideNavigationText: ({ children, className, ...props }: Props) => React.JSX.Element;
|
|
7
|
-
export default SideNavigationText;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import SideNavigationText from "./SideNavigationText";
|
|
3
|
-
declare const meta: Meta<typeof SideNavigationText>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof SideNavigationText>;
|
|
6
|
-
export declare const Default: Story;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _Badge = _interopRequireDefault(require("../../Badge"));
|
|
9
|
-
var _SideNavigationText = _interopRequireDefault(require("./SideNavigationText"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
const meta = {
|
|
12
|
-
component: _SideNavigationText.default,
|
|
13
|
-
tags: ["autodocs"]
|
|
14
|
-
};
|
|
15
|
-
var _default = exports.default = meta;
|
|
16
|
-
const Default = exports.Default = {
|
|
17
|
-
args: {
|
|
18
|
-
icon: "drag",
|
|
19
|
-
children: "Models",
|
|
20
|
-
status: /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
21
|
-
value: 9,
|
|
22
|
-
isNegative: true
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, type Props as SideNavigationTextProps, } from "./SideNavigationText";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default } from "./SideNavigation";
|
|
2
|
-
export type { Props as SideNavigationProps } from "./SideNavigation";
|
|
3
|
-
export { default as SideNavigationItem } from "./SideNavigationItem";
|
|
4
|
-
export { default as SideNavigationText } from "./SideNavigationText";
|
|
5
|
-
export { default as SideNavigationLink, type SideNavigationLinkDefaultElement, } from "./SideNavigationLink";
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { ChangeEventHandler, HTMLProps, ReactNode } from "react";
|
|
2
|
-
import type { PropsWithSpread } from "../../types";
|
|
3
|
-
export declare const FILLED_COLOR = "#0066CC";
|
|
4
|
-
export declare const EMPTY_COLOR = "#D9D9D9";
|
|
5
|
-
export type Props = PropsWithSpread<{
|
|
6
|
-
/**
|
|
7
|
-
* Field caution message.
|
|
8
|
-
*/
|
|
9
|
-
caution?: ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* Whether to disable the slider and input (if showInput is true).
|
|
12
|
-
*/
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Field error message.
|
|
16
|
-
*/
|
|
17
|
-
error?: ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* Field help message.
|
|
20
|
-
*/
|
|
21
|
-
help?: ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* Field id. Only passed to range input, not to number input.
|
|
24
|
-
*/
|
|
25
|
-
id?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Whether to disable only the input, but not the slider.
|
|
28
|
-
*/
|
|
29
|
-
inputDisabled?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Field label.
|
|
32
|
-
*/
|
|
33
|
-
label?: ReactNode;
|
|
34
|
-
/**
|
|
35
|
-
* Maximum value of the slider.
|
|
36
|
-
*/
|
|
37
|
-
max: number;
|
|
38
|
-
/**
|
|
39
|
-
* Minimum value of the slider.
|
|
40
|
-
*/
|
|
41
|
-
min: number;
|
|
42
|
-
/**
|
|
43
|
-
* Change event handler.
|
|
44
|
-
*/
|
|
45
|
-
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
46
|
-
/**
|
|
47
|
-
* Whether the field is required for the form to submit.
|
|
48
|
-
*/
|
|
49
|
-
required?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Whether to show a number input with the numerical value next to the slider.
|
|
52
|
-
*/
|
|
53
|
-
showInput?: boolean;
|
|
54
|
-
}, HTMLProps<HTMLInputElement>>;
|
|
55
|
-
/**
|
|
56
|
-
* This is the [React](https://reactjs.org/) component for the Vanilla [Slider](https://vanillaframework.io/docs/patterns/slider).
|
|
57
|
-
*
|
|
58
|
-
* Sliders should be used to let a user specify a numeric value between a defined
|
|
59
|
-
minimum and maximum value, however the precise value is not especially important.
|
|
60
|
-
*/
|
|
61
|
-
export declare const Slider: ({ caution, disabled, error, help, id, inputDisabled, label, max, min, onChange, required, showInput, ...inputProps }: Props) => JSX.Element;
|
|
62
|
-
export default Slider;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import Slider from "./Slider";
|
|
3
|
-
declare const meta: Meta<typeof Slider>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Slider>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
/**
|
|
8
|
-
* You can also optionally provide a numeric representation of the slider value.
|
|
9
|
-
*/
|
|
10
|
-
export declare const WithInput: Story;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.WithInput = exports.Default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _Slider = _interopRequireDefault(require("./Slider"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
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 _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
|
-
const Template = args => {
|
|
14
|
-
const [selectedValue, setSelectedValue] = (0, _react.useState)(50);
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(_Slider.default, _extends({}, args, {
|
|
16
|
-
onChange: e => setSelectedValue(Number(e.target.value)),
|
|
17
|
-
value: selectedValue
|
|
18
|
-
}));
|
|
19
|
-
};
|
|
20
|
-
const meta = {
|
|
21
|
-
component: _Slider.default,
|
|
22
|
-
render: Template,
|
|
23
|
-
tags: ["autodocs"],
|
|
24
|
-
argTypes: {
|
|
25
|
-
caution: {
|
|
26
|
-
control: {
|
|
27
|
-
type: "text"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
error: {
|
|
31
|
-
control: {
|
|
32
|
-
type: "text"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
help: {
|
|
36
|
-
control: {
|
|
37
|
-
type: "text"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
label: {
|
|
41
|
-
control: {
|
|
42
|
-
type: "text"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
var _default = exports.default = meta;
|
|
48
|
-
const Default = exports.Default = {
|
|
49
|
-
render: Template.bind({}),
|
|
50
|
-
name: "Default",
|
|
51
|
-
args: {
|
|
52
|
-
disabled: false,
|
|
53
|
-
label: "Volume",
|
|
54
|
-
max: 100,
|
|
55
|
-
min: 0,
|
|
56
|
-
showInput: false
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* You can also optionally provide a numeric representation of the slider value.
|
|
62
|
-
*/
|
|
63
|
-
const WithInput = exports.WithInput = {
|
|
64
|
-
render: Template.bind({}),
|
|
65
|
-
name: "With input",
|
|
66
|
-
args: {
|
|
67
|
-
disabled: false,
|
|
68
|
-
inputDisabled: false,
|
|
69
|
-
label: "Volume",
|
|
70
|
-
max: 100,
|
|
71
|
-
min: 0,
|
|
72
|
-
showInput: true
|
|
73
|
-
}
|
|
74
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { HTMLProps } from "react";
|
|
2
|
-
import type { ClassName } from "../../types";
|
|
3
|
-
export type Props = {
|
|
4
|
-
/**
|
|
5
|
-
* Optional class(es) to pass to the wrapping span element.
|
|
6
|
-
*/
|
|
7
|
-
className?: ClassName;
|
|
8
|
-
/**
|
|
9
|
-
* Whether the spinner should have a light appearance.
|
|
10
|
-
*/
|
|
11
|
-
isLight?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Text to display next to the spinner.
|
|
14
|
-
*/
|
|
15
|
-
text?: string;
|
|
16
|
-
/**
|
|
17
|
-
* What the role of the spinner should be.
|
|
18
|
-
*/
|
|
19
|
-
role?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The politeness setting of the spinner alert.
|
|
22
|
-
*/
|
|
23
|
-
ariaLive?: "assertive" | "off" | "polite";
|
|
24
|
-
} & HTMLProps<HTMLSpanElement>;
|
|
25
|
-
/**
|
|
26
|
-
* This is a [React](https://reactjs.org/) component for the Vanilla [Spin](https://docs.vanillaframework.io/settings/animation-settings/#spin) animation.
|
|
27
|
-
*/
|
|
28
|
-
declare const Spinner: ({ className, text, isLight, ariaLive, role, ...props }: Props) => JSX.Element;
|
|
29
|
-
export default Spinner;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import Spinner from "./Spinner";
|
|
3
|
-
declare const meta: Meta<typeof Spinner>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Spinner>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Text: Story;
|
|
8
|
-
export declare const Assertive: Story;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Text = exports.Default = exports.Assertive = void 0;
|
|
7
|
-
var _Spinner = _interopRequireDefault(require("./Spinner"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
const meta = {
|
|
10
|
-
component: _Spinner.default,
|
|
11
|
-
tags: ["autodocs"]
|
|
12
|
-
};
|
|
13
|
-
var _default = exports.default = meta;
|
|
14
|
-
const Default = exports.Default = {
|
|
15
|
-
name: "Default"
|
|
16
|
-
};
|
|
17
|
-
const Text = exports.Text = {
|
|
18
|
-
name: "Text",
|
|
19
|
-
args: {
|
|
20
|
-
text: "Loading..."
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const Assertive = exports.Assertive = {
|
|
24
|
-
name: "Assertive",
|
|
25
|
-
args: {
|
|
26
|
-
ariaLive: "assertive"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { HTMLProps, ReactNode } from "react";
|
|
2
|
-
import { ClassName, PropsWithSpread, ValueOf } from "../../types";
|
|
3
|
-
export declare const StatusLabelAppearance: {
|
|
4
|
-
readonly CAUTION: "caution";
|
|
5
|
-
readonly DEFAULT: "";
|
|
6
|
-
readonly INFORMATION: "information";
|
|
7
|
-
readonly NEGATIVE: "negative";
|
|
8
|
-
readonly POSITIVE: "positive";
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* The type of the StatusLabel props.
|
|
12
|
-
*/
|
|
13
|
-
export type Props = PropsWithSpread<{
|
|
14
|
-
/**
|
|
15
|
-
* The appearance of the label.
|
|
16
|
-
*/
|
|
17
|
-
appearance?: ValueOf<typeof StatusLabelAppearance> | string;
|
|
18
|
-
/**
|
|
19
|
-
* The content of the label.
|
|
20
|
-
*/
|
|
21
|
-
children?: ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* Optional class(es) to pass to the wrapping element.
|
|
24
|
-
*/
|
|
25
|
-
className?: ClassName;
|
|
26
|
-
}, HTMLProps<HTMLDivElement>>;
|
|
27
|
-
/**
|
|
28
|
-
* This is a [React](https://reactjs.org/) component for the Vanilla [Label](https://vanillaframework.io/docs/patterns/labels).
|
|
29
|
-
*
|
|
30
|
-
* Labels are static elements which you can apply to signify status, tags or any other information you find useful.
|
|
31
|
-
*/
|
|
32
|
-
declare const StatusLabel: ({ appearance, children, className, ...labelProps }: Props) => JSX.Element;
|
|
33
|
-
export default StatusLabel;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import StatusLabel from "./StatusLabel";
|
|
3
|
-
declare const meta: Meta<typeof StatusLabel>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof StatusLabel>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Positive: Story;
|
|
8
|
-
export declare const Caution: Story;
|
|
9
|
-
export declare const Negative: Story;
|
|
10
|
-
export declare const Information: Story;
|