@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,218 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.WithExistingSearchData = exports.WithDataSet = exports.Default = void 0;
|
|
7
|
-
var _SearchAndFilter = _interopRequireDefault(require("./SearchAndFilter"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
const meta = {
|
|
10
|
-
component: _SearchAndFilter.default,
|
|
11
|
-
tags: ["autodocs"]
|
|
12
|
-
};
|
|
13
|
-
var _default = exports.default = meta;
|
|
14
|
-
const Default = exports.Default = {
|
|
15
|
-
name: "Default",
|
|
16
|
-
args: {
|
|
17
|
-
returnSearchData: () => {},
|
|
18
|
-
filterPanelData: [{
|
|
19
|
-
id: 0,
|
|
20
|
-
heading: "Cloud",
|
|
21
|
-
chips: [{
|
|
22
|
-
lead: "Cloud",
|
|
23
|
-
value: "Google"
|
|
24
|
-
}, {
|
|
25
|
-
lead: "Cloud",
|
|
26
|
-
value: "AWS"
|
|
27
|
-
}, {
|
|
28
|
-
lead: "Cloud",
|
|
29
|
-
value: "Azure"
|
|
30
|
-
}]
|
|
31
|
-
}, {
|
|
32
|
-
id: 1,
|
|
33
|
-
heading: "Region",
|
|
34
|
-
chips: [{
|
|
35
|
-
lead: "Region",
|
|
36
|
-
value: "us-east1"
|
|
37
|
-
}, {
|
|
38
|
-
lead: "Region",
|
|
39
|
-
value: "us-north2"
|
|
40
|
-
}, {
|
|
41
|
-
lead: "Region",
|
|
42
|
-
value: "us-south3"
|
|
43
|
-
}, {
|
|
44
|
-
lead: "Region",
|
|
45
|
-
value: "us-north4"
|
|
46
|
-
}, {
|
|
47
|
-
lead: "Region",
|
|
48
|
-
value: "us-east5"
|
|
49
|
-
}, {
|
|
50
|
-
lead: "Region",
|
|
51
|
-
value: "us-south6"
|
|
52
|
-
}, {
|
|
53
|
-
lead: "Region",
|
|
54
|
-
value: "us-east7"
|
|
55
|
-
}, {
|
|
56
|
-
lead: "Region",
|
|
57
|
-
value: "us-east8"
|
|
58
|
-
}, {
|
|
59
|
-
lead: "Region",
|
|
60
|
-
value: "us-east9"
|
|
61
|
-
}, {
|
|
62
|
-
lead: "Region",
|
|
63
|
-
value: "us-east10"
|
|
64
|
-
}]
|
|
65
|
-
}, {
|
|
66
|
-
id: 2,
|
|
67
|
-
heading: "Owner",
|
|
68
|
-
chips: [{
|
|
69
|
-
lead: "Owner",
|
|
70
|
-
value: "foo"
|
|
71
|
-
}, {
|
|
72
|
-
lead: "Owner",
|
|
73
|
-
value: "bar"
|
|
74
|
-
}, {
|
|
75
|
-
lead: "Owner",
|
|
76
|
-
value: "baz"
|
|
77
|
-
}]
|
|
78
|
-
}]
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const WithDataSet = exports.WithDataSet = {
|
|
82
|
-
name: "With data set",
|
|
83
|
-
args: {
|
|
84
|
-
filterPanelData: [{
|
|
85
|
-
id: 0,
|
|
86
|
-
heading: "Cloud",
|
|
87
|
-
chips: [{
|
|
88
|
-
lead: "Cloud",
|
|
89
|
-
value: "Google"
|
|
90
|
-
}, {
|
|
91
|
-
lead: "Cloud",
|
|
92
|
-
value: "AWS"
|
|
93
|
-
}, {
|
|
94
|
-
lead: "Cloud",
|
|
95
|
-
value: "Azure"
|
|
96
|
-
}]
|
|
97
|
-
}, {
|
|
98
|
-
id: 1,
|
|
99
|
-
heading: "Region",
|
|
100
|
-
chips: [{
|
|
101
|
-
lead: "Region",
|
|
102
|
-
value: "us-east1"
|
|
103
|
-
}, {
|
|
104
|
-
lead: "Region",
|
|
105
|
-
value: "us-north2"
|
|
106
|
-
}, {
|
|
107
|
-
lead: "Region",
|
|
108
|
-
value: "us-south3"
|
|
109
|
-
}, {
|
|
110
|
-
lead: "Region",
|
|
111
|
-
value: "us-north4"
|
|
112
|
-
}, {
|
|
113
|
-
lead: "Region",
|
|
114
|
-
value: "us-east5"
|
|
115
|
-
}, {
|
|
116
|
-
lead: "Region",
|
|
117
|
-
value: "us-south6"
|
|
118
|
-
}, {
|
|
119
|
-
lead: "Region",
|
|
120
|
-
value: "us-east7"
|
|
121
|
-
}, {
|
|
122
|
-
lead: "Region",
|
|
123
|
-
value: "us-east8"
|
|
124
|
-
}, {
|
|
125
|
-
lead: "Region",
|
|
126
|
-
value: "us-east9"
|
|
127
|
-
}, {
|
|
128
|
-
lead: "Region",
|
|
129
|
-
value: "us-east10"
|
|
130
|
-
}]
|
|
131
|
-
}, {
|
|
132
|
-
id: 2,
|
|
133
|
-
heading: "Owner",
|
|
134
|
-
chips: [{
|
|
135
|
-
lead: "Owner",
|
|
136
|
-
value: "foo"
|
|
137
|
-
}, {
|
|
138
|
-
lead: "Owner",
|
|
139
|
-
value: "bar"
|
|
140
|
-
}, {
|
|
141
|
-
lead: "Owner",
|
|
142
|
-
value: "baz"
|
|
143
|
-
}]
|
|
144
|
-
}],
|
|
145
|
-
returnSearchData: () => {}
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
const WithExistingSearchData = exports.WithExistingSearchData = {
|
|
149
|
-
name: "With existing search data",
|
|
150
|
-
args: {
|
|
151
|
-
existingSearchData: [{
|
|
152
|
-
lead: "Cloud",
|
|
153
|
-
value: "Google"
|
|
154
|
-
}],
|
|
155
|
-
filterPanelData: [{
|
|
156
|
-
id: 0,
|
|
157
|
-
heading: "Cloud",
|
|
158
|
-
chips: [{
|
|
159
|
-
lead: "Cloud",
|
|
160
|
-
value: "Google"
|
|
161
|
-
}, {
|
|
162
|
-
lead: "Cloud",
|
|
163
|
-
value: "AWS"
|
|
164
|
-
}, {
|
|
165
|
-
lead: "Cloud",
|
|
166
|
-
value: "Azure"
|
|
167
|
-
}]
|
|
168
|
-
}, {
|
|
169
|
-
id: 1,
|
|
170
|
-
heading: "Region",
|
|
171
|
-
chips: [{
|
|
172
|
-
lead: "Region",
|
|
173
|
-
value: "us-east1"
|
|
174
|
-
}, {
|
|
175
|
-
lead: "Region",
|
|
176
|
-
value: "us-north2"
|
|
177
|
-
}, {
|
|
178
|
-
lead: "Region",
|
|
179
|
-
value: "us-south3"
|
|
180
|
-
}, {
|
|
181
|
-
lead: "Region",
|
|
182
|
-
value: "us-north4"
|
|
183
|
-
}, {
|
|
184
|
-
lead: "Region",
|
|
185
|
-
value: "us-east5"
|
|
186
|
-
}, {
|
|
187
|
-
lead: "Region",
|
|
188
|
-
value: "us-south6"
|
|
189
|
-
}, {
|
|
190
|
-
lead: "Region",
|
|
191
|
-
value: "us-east7"
|
|
192
|
-
}, {
|
|
193
|
-
lead: "Region",
|
|
194
|
-
value: "us-east8"
|
|
195
|
-
}, {
|
|
196
|
-
lead: "Region",
|
|
197
|
-
value: "us-east9"
|
|
198
|
-
}, {
|
|
199
|
-
lead: "Region",
|
|
200
|
-
value: "us-east10"
|
|
201
|
-
}]
|
|
202
|
-
}, {
|
|
203
|
-
id: 2,
|
|
204
|
-
heading: "Owner",
|
|
205
|
-
chips: [{
|
|
206
|
-
lead: "Owner",
|
|
207
|
-
value: "foo"
|
|
208
|
-
}, {
|
|
209
|
-
lead: "Owner",
|
|
210
|
-
value: "bar"
|
|
211
|
-
}, {
|
|
212
|
-
lead: "Owner",
|
|
213
|
-
value: "baz"
|
|
214
|
-
}]
|
|
215
|
-
}],
|
|
216
|
-
returnSearchData: () => {}
|
|
217
|
-
}
|
|
218
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return number of overflowing chips given a row threshold
|
|
3
|
-
* @param {array} chips - An array of chips
|
|
4
|
-
* @param {Integer} overflowRowLimit - Number of rows to show before counting
|
|
5
|
-
* overflow
|
|
6
|
-
*/
|
|
7
|
-
export declare const overflowingChipsCount: (chips: any, overflowRowLimit: any) => number;
|
|
8
|
-
/**
|
|
9
|
-
* Check if supplied chip object already exists in searchData prop
|
|
10
|
-
* @param {Object} chip - A chip object {lead: 'foo', value: 'bar'}
|
|
11
|
-
* @param {Array} existingArr - An array of chip objects
|
|
12
|
-
*/
|
|
13
|
-
export declare const isChipInArray: (chip: any, existingArr: any) => any;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React, { HTMLProps } from "react";
|
|
2
|
-
import type { ClassName, PropsWithSpread } from "../../types";
|
|
3
|
-
export declare enum Label {
|
|
4
|
-
Clear = "Clear search field",
|
|
5
|
-
Search = "Search"
|
|
6
|
-
}
|
|
7
|
-
export type Props = PropsWithSpread<{
|
|
8
|
-
/**
|
|
9
|
-
* Whether autocomplete should be enabled for the search input.
|
|
10
|
-
*/
|
|
11
|
-
autocomplete?: "on" | "off";
|
|
12
|
-
/**
|
|
13
|
-
* Optional classes to pass to the form element.
|
|
14
|
-
*/
|
|
15
|
-
className?: ClassName;
|
|
16
|
-
/**
|
|
17
|
-
* Whether the input and buttons should be disabled.
|
|
18
|
-
*/
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Whether the input value will be controlled via external state.
|
|
22
|
-
*/
|
|
23
|
-
externallyControlled?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* A function that will be called when the input value changes.
|
|
26
|
-
*/
|
|
27
|
-
onChange?: (inputValue: string) => void;
|
|
28
|
-
/**
|
|
29
|
-
* A function that is called when the user clicks the search icon or presses enter
|
|
30
|
-
*/
|
|
31
|
-
onSearch?: (inputValue: string) => void;
|
|
32
|
-
/**
|
|
33
|
-
* A function that is called when the user clicks the reset icon
|
|
34
|
-
*/
|
|
35
|
-
onClear?: () => void;
|
|
36
|
-
/**
|
|
37
|
-
* A search input placeholder message.
|
|
38
|
-
*/
|
|
39
|
-
placeholder?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Whether the search input should lose focus when searching.
|
|
42
|
-
*/
|
|
43
|
-
shouldBlurOnSearch?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Whether the search input should receive focus after pressing the reset button
|
|
46
|
-
*/
|
|
47
|
-
shouldRefocusAfterReset?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* A ref that is passed to the input element.
|
|
50
|
-
*/
|
|
51
|
-
ref?: string;
|
|
52
|
-
/**
|
|
53
|
-
* The value of the search input when the state is externally controlled.
|
|
54
|
-
*/
|
|
55
|
-
value?: string;
|
|
56
|
-
}, HTMLProps<HTMLInputElement>>;
|
|
57
|
-
/**
|
|
58
|
-
* This is a [React](https://reactjs.org/) component for the Vanilla [SearchBox](https://docs.vanillaframework.io/patterns/search-box/).
|
|
59
|
-
*
|
|
60
|
-
* Search boxes enable search functionality on a page and are typically used in a navigation bar. SearchBox elements should be wrapped within a form element that handles its own submit action.
|
|
61
|
-
*/
|
|
62
|
-
declare const SearchBox: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
63
|
-
export default SearchBox;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import SearchBox from "./SearchBox";
|
|
3
|
-
declare const meta: Meta<typeof SearchBox>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof SearchBox>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Disabled: Story;
|
|
8
|
-
/**
|
|
9
|
-
* If you wish to control the value of the input via external state you can set
|
|
10
|
-
the `externallyControlled` prop and provide an `onChange` method to update the
|
|
11
|
-
state and the `value` from state.
|
|
12
|
-
*/
|
|
13
|
-
export declare const ExternalState: Story;
|
|
14
|
-
export declare const Navigation: Story;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Navigation = exports.ExternalState = exports.Disabled = exports.Default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _SearchBox = _interopRequireDefault(require("./SearchBox"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
const meta = {
|
|
11
|
-
component: _SearchBox.default,
|
|
12
|
-
tags: ["autodocs"]
|
|
13
|
-
};
|
|
14
|
-
var _default = exports.default = meta;
|
|
15
|
-
const Default = exports.Default = {
|
|
16
|
-
name: "Default"
|
|
17
|
-
};
|
|
18
|
-
const Disabled = exports.Disabled = {
|
|
19
|
-
render: () => /*#__PURE__*/_react.default.createElement(_SearchBox.default, {
|
|
20
|
-
disabled: true
|
|
21
|
-
}),
|
|
22
|
-
name: "Disabled"
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* If you wish to control the value of the input via external state you can set
|
|
27
|
-
the `externallyControlled` prop and provide an `onChange` method to update the
|
|
28
|
-
state and the `value` from state.
|
|
29
|
-
*/
|
|
30
|
-
const ExternalState = exports.ExternalState = {
|
|
31
|
-
render: () => /*#__PURE__*/_react.default.createElement(_SearchBox.default, {
|
|
32
|
-
externallyControlled: true,
|
|
33
|
-
shouldRefocusAfterReset: true,
|
|
34
|
-
onChange: () => {},
|
|
35
|
-
value: "..."
|
|
36
|
-
}),
|
|
37
|
-
name: "External state"
|
|
38
|
-
};
|
|
39
|
-
const Navigation = exports.Navigation = {
|
|
40
|
-
render: () => /*#__PURE__*/_react.default.createElement("header", {
|
|
41
|
-
id: "navigation",
|
|
42
|
-
className: "p-navigation"
|
|
43
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
-
className: "p-navigation__row--full-width"
|
|
45
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
-
className: "p-navigation__banner"
|
|
47
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
-
className: "p-navigation__logo"
|
|
49
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
50
|
-
className: "p-navigation__item",
|
|
51
|
-
href: "#test"
|
|
52
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
53
|
-
className: "p-navigation__image",
|
|
54
|
-
src: "https://assets.ubuntu.com/v1/5d6da5c4-logo-canonical-aubergine.svg",
|
|
55
|
-
alt: "",
|
|
56
|
-
width: "95"
|
|
57
|
-
}))), /*#__PURE__*/_react.default.createElement("a", {
|
|
58
|
-
href: "#navigation",
|
|
59
|
-
className: "p-navigation__toggle--open",
|
|
60
|
-
title: "menu"
|
|
61
|
-
}, "Menu"), /*#__PURE__*/_react.default.createElement("a", {
|
|
62
|
-
href: "#navigation-closed",
|
|
63
|
-
className: "p-navigation__toggle--close",
|
|
64
|
-
title: "close menu"
|
|
65
|
-
}, "Close menu")), /*#__PURE__*/_react.default.createElement("nav", {
|
|
66
|
-
className: "p-navigation__nav"
|
|
67
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
68
|
-
className: "u-off-screen"
|
|
69
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
70
|
-
href: "#main-content"
|
|
71
|
-
}, "Jump to main content")), /*#__PURE__*/_react.default.createElement("ul", {
|
|
72
|
-
className: "p-navigation__items",
|
|
73
|
-
role: "menu"
|
|
74
|
-
}, /*#__PURE__*/_react.default.createElement("li", {
|
|
75
|
-
className: "p-navigation__item",
|
|
76
|
-
role: "menuitem"
|
|
77
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
78
|
-
href: "#test",
|
|
79
|
-
className: "p-navigation__link"
|
|
80
|
-
}, "Products")), /*#__PURE__*/_react.default.createElement("li", {
|
|
81
|
-
className: "p-navigation__item",
|
|
82
|
-
role: "menuitem"
|
|
83
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
84
|
-
href: "#test",
|
|
85
|
-
className: "p-navigation__link"
|
|
86
|
-
}, "Services")), /*#__PURE__*/_react.default.createElement("li", {
|
|
87
|
-
className: "p-navigation__item",
|
|
88
|
-
role: "menuitem"
|
|
89
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
90
|
-
href: "#test",
|
|
91
|
-
className: "p-navigation__link"
|
|
92
|
-
}, "Partners")), /*#__PURE__*/_react.default.createElement("li", {
|
|
93
|
-
className: "p-navigation__item",
|
|
94
|
-
role: "menuitem"
|
|
95
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
96
|
-
href: "#test",
|
|
97
|
-
className: "p-navigation__link"
|
|
98
|
-
}, "About")), /*#__PURE__*/_react.default.createElement("li", {
|
|
99
|
-
className: "p-navigation__item",
|
|
100
|
-
role: "menuitem"
|
|
101
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
102
|
-
href: "#test",
|
|
103
|
-
className: "p-navigation__link"
|
|
104
|
-
}, "Partners"))), /*#__PURE__*/_react.default.createElement(_SearchBox.default, null)))),
|
|
105
|
-
name: "Navigation"
|
|
106
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { ChangeEventHandler, ReactNode, OptionHTMLAttributes, SelectHTMLAttributes } from "react";
|
|
2
|
-
import type { ClassName, PropsWithSpread } from "../../types";
|
|
3
|
-
type Option = OptionHTMLAttributes<HTMLOptionElement>;
|
|
4
|
-
/**
|
|
5
|
-
* The props for the Select component.
|
|
6
|
-
*/
|
|
7
|
-
export type Props = PropsWithSpread<{
|
|
8
|
-
/**
|
|
9
|
-
* The content for caution validation.
|
|
10
|
-
*/
|
|
11
|
-
caution?: ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Optional class(es) to pass to the input element.
|
|
14
|
-
*/
|
|
15
|
-
className?: ClassName;
|
|
16
|
-
/**
|
|
17
|
-
* The content for error validation.
|
|
18
|
-
*/
|
|
19
|
-
error?: ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* Help text to show below the field.
|
|
22
|
-
*/
|
|
23
|
-
help?: ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* The id of the input.
|
|
26
|
-
*/
|
|
27
|
-
id?: string | null;
|
|
28
|
-
/**
|
|
29
|
-
* The label for the field.
|
|
30
|
-
*/
|
|
31
|
-
label?: ReactNode;
|
|
32
|
-
/**
|
|
33
|
-
* Optional class(es) to pass to the label component.
|
|
34
|
-
*/
|
|
35
|
-
labelClassName?: string | null;
|
|
36
|
-
/**
|
|
37
|
-
* Function to run when select value changes.
|
|
38
|
-
*/
|
|
39
|
-
onChange?: ChangeEventHandler<HTMLSelectElement> | null;
|
|
40
|
-
/**
|
|
41
|
-
* Array of options that the select can choose from.
|
|
42
|
-
*/
|
|
43
|
-
options?: Option[] | null;
|
|
44
|
-
/**
|
|
45
|
-
* Whether the field is required.
|
|
46
|
-
*/
|
|
47
|
-
required?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Whether the form field should have a stacked appearance.
|
|
50
|
-
*/
|
|
51
|
-
stacked?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* The content for success validation.
|
|
54
|
-
*/
|
|
55
|
-
success?: ReactNode;
|
|
56
|
-
/**
|
|
57
|
-
* Whether to focus on the input on initial render.
|
|
58
|
-
*/
|
|
59
|
-
takeFocus?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Optional class(es) to pass to the wrapping Field component
|
|
62
|
-
*/
|
|
63
|
-
wrapperClassName?: ClassName;
|
|
64
|
-
}, SelectHTMLAttributes<HTMLSelectElement>>;
|
|
65
|
-
/**
|
|
66
|
-
* This is a [React](https://reactjs.org/) component for the Vanilla [Select](https://docs.vanillaframework.io/base/forms/#select).
|
|
67
|
-
*
|
|
68
|
-
* Use the Select component to create a drop-down list.
|
|
69
|
-
*/
|
|
70
|
-
declare const Select: ({ caution, className, error, help, id, label, labelClassName, onChange, options, required, stacked, success, takeFocus, wrapperClassName, ...selectProps }: Props) => JSX.Element;
|
|
71
|
-
export default Select;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import Select from "./Select";
|
|
3
|
-
declare const meta: Meta<typeof Select>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Select>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const SelectMultiple: Story;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.SelectMultiple = exports.Default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _Select = _interopRequireDefault(require("./Select"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
const meta = {
|
|
11
|
-
component: _Select.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
|
-
label: {
|
|
30
|
-
control: {
|
|
31
|
-
type: "text"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
success: {
|
|
35
|
-
control: {
|
|
36
|
-
type: "text"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
id: {
|
|
40
|
-
control: {
|
|
41
|
-
disable: true
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
options: {
|
|
45
|
-
control: {
|
|
46
|
-
disable: true
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
var _default = exports.default = meta;
|
|
52
|
-
const Default = exports.Default = {
|
|
53
|
-
name: "Select",
|
|
54
|
-
args: {
|
|
55
|
-
name: "exampleSelect",
|
|
56
|
-
id: "exampleSelect2",
|
|
57
|
-
defaultValue: "",
|
|
58
|
-
options: [{
|
|
59
|
-
value: "",
|
|
60
|
-
disabled: true,
|
|
61
|
-
label: "Select an option"
|
|
62
|
-
}, {
|
|
63
|
-
value: "1",
|
|
64
|
-
label: "Cosmic Cuttlefish"
|
|
65
|
-
}, {
|
|
66
|
-
value: "2",
|
|
67
|
-
label: "Bionic Beaver"
|
|
68
|
-
}, {
|
|
69
|
-
value: "3",
|
|
70
|
-
label: "Xenial Xerus"
|
|
71
|
-
}],
|
|
72
|
-
label: "Ubuntu releases"
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
const SelectMultiple = exports.SelectMultiple = {
|
|
76
|
-
render: () => /*#__PURE__*/_react.default.createElement(_Select.default, {
|
|
77
|
-
name: "exampleSelectMulti",
|
|
78
|
-
id: "exampleSelectMulti2",
|
|
79
|
-
options: [{
|
|
80
|
-
value: "",
|
|
81
|
-
disabled: true,
|
|
82
|
-
label: "Select..."
|
|
83
|
-
}, {
|
|
84
|
-
value: "1",
|
|
85
|
-
label: "Cosmic Cuttlefish"
|
|
86
|
-
}, {
|
|
87
|
-
value: "2",
|
|
88
|
-
label: "Bionic Beaver"
|
|
89
|
-
}, {
|
|
90
|
-
value: "3",
|
|
91
|
-
label: "Xenial Xerus"
|
|
92
|
-
}],
|
|
93
|
-
label: "Ubuntu releases",
|
|
94
|
-
multiple: true
|
|
95
|
-
}),
|
|
96
|
-
name: "Select multiple"
|
|
97
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren, ReactNode } from "react";
|
|
2
|
-
import type { PropsWithSpread } from "../../types";
|
|
3
|
-
import { type HTMLProps } from "react";
|
|
4
|
-
import type { SideNavigationItemProps } from "./SideNavigationItem";
|
|
5
|
-
import type { SideNavigationLinkDefaultElement, SideNavigationLinkProps } from "./SideNavigationLink";
|
|
6
|
-
export type NavItem<L = SideNavigationLinkDefaultElement> = SideNavigationItemProps<L> | ReactNode | null;
|
|
7
|
-
export type NavItemGroup<L = SideNavigationLinkDefaultElement> = NavItem<L>[];
|
|
8
|
-
export type NavGroup<L = SideNavigationLinkDefaultElement> = PropsWithSpread<{
|
|
9
|
-
/**
|
|
10
|
-
* The navigation items.
|
|
11
|
-
*/
|
|
12
|
-
items: NavItemGroup<L>;
|
|
13
|
-
}, HTMLProps<HTMLUListElement>>;
|
|
14
|
-
export type Props<L = SideNavigationLinkDefaultElement> = PropsWithSpread<{
|
|
15
|
-
/**
|
|
16
|
-
* The navigation content. This can be used instead of supplying `items`.
|
|
17
|
-
*/
|
|
18
|
-
children?: PropsWithChildren["children"];
|
|
19
|
-
/**
|
|
20
|
-
* Whether to use the dark theme.
|
|
21
|
-
*/
|
|
22
|
-
dark?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Whether the navigation items contain icons.
|
|
25
|
-
*/
|
|
26
|
-
hasIcons?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* The navigation items.
|
|
29
|
-
*/
|
|
30
|
-
items?: (NavGroup<L> | null)[];
|
|
31
|
-
/**
|
|
32
|
-
* The component or element to use for the link elements e.g. `a` or `NavLink`.
|
|
33
|
-
* @default a
|
|
34
|
-
*/
|
|
35
|
-
linkComponent?: SideNavigationLinkProps["component"];
|
|
36
|
-
/**
|
|
37
|
-
* Classes to apply to the navigation list(s).
|
|
38
|
-
*/
|
|
39
|
-
listClassName?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Classes to apply to the nav element.
|
|
42
|
-
*/
|
|
43
|
-
navClassName?: string;
|
|
44
|
-
}, HTMLProps<HTMLDivElement>>;
|
|
45
|
-
/**
|
|
46
|
-
* This is a [React](https://reactjs.org/) component for side navigation, used
|
|
47
|
-
* in the [Vanilla](https://vanillaframework.io/docs/) layouts.
|
|
48
|
-
*/
|
|
49
|
-
declare const SideNavigation: <L = SideNavigationLinkDefaultElement>({ children, className, dark, hasIcons, items, linkComponent, listClassName, navClassName, ...props }: Props<L>) => React.JSX.Element;
|
|
50
|
-
export default SideNavigation;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import SideNavigation from "./SideNavigation";
|
|
3
|
-
declare const meta: Meta<typeof SideNavigation>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof SideNavigation>;
|
|
6
|
-
/**
|
|
7
|
-
* 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: [...] }`.
|
|
8
|
-
*/
|
|
9
|
-
export declare const Default: Story;
|
|
10
|
-
/**
|
|
11
|
-
* `children` can be provided instead of `items` in cases where custom content
|
|
12
|
-
* is required.
|
|
13
|
-
*/
|
|
14
|
-
export declare const CustomContent: Story;
|