@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,330 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.RenderBelow = exports.RenderAbove = exports.Default = exports.CustomPageLimit = exports.CustomDisplayTitle = exports.ControlsOnly = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _TablePagination = _interopRequireDefault(require("./TablePagination"));
|
|
9
|
-
var _MainTable = _interopRequireDefault(require("../MainTable"));
|
|
10
|
-
var _TablePaginationControls = _interopRequireDefault(require("./TablePaginationControls"));
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const meta = {
|
|
13
|
-
component: _TablePagination.default,
|
|
14
|
-
tags: ["autodocs"],
|
|
15
|
-
argTypes: {
|
|
16
|
-
totalItems: {
|
|
17
|
-
if: {
|
|
18
|
-
arg: "externallyControlled",
|
|
19
|
-
truthy: true
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
currentPage: {
|
|
23
|
-
if: {
|
|
24
|
-
arg: "externallyControlled",
|
|
25
|
-
truthy: true
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
pageSize: {
|
|
29
|
-
if: {
|
|
30
|
-
arg: "externallyControlled",
|
|
31
|
-
truthy: true
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
onPageChange: {
|
|
35
|
-
if: {
|
|
36
|
-
arg: "externallyControlled",
|
|
37
|
-
truthy: true
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
onPageSizeChange: {
|
|
41
|
-
if: {
|
|
42
|
-
arg: "externallyControlled",
|
|
43
|
-
truthy: true
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
var _default = exports.default = meta;
|
|
49
|
-
const Default = exports.Default = {
|
|
50
|
-
name: "Default",
|
|
51
|
-
args: {
|
|
52
|
-
data: [{
|
|
53
|
-
id: "row-1"
|
|
54
|
-
}, {
|
|
55
|
-
id: "row-2"
|
|
56
|
-
}, {
|
|
57
|
-
id: "row-3"
|
|
58
|
-
}, {
|
|
59
|
-
id: "row-4"
|
|
60
|
-
}, {
|
|
61
|
-
id: "row-5"
|
|
62
|
-
}]
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const CustomPageLimit = exports.CustomPageLimit = {
|
|
66
|
-
name: "CustomPageLimit",
|
|
67
|
-
args: {
|
|
68
|
-
data: [{
|
|
69
|
-
id: "row-1"
|
|
70
|
-
}, {
|
|
71
|
-
id: "row-2"
|
|
72
|
-
}, {
|
|
73
|
-
id: "row-3"
|
|
74
|
-
}, {
|
|
75
|
-
id: "row-4"
|
|
76
|
-
}, {
|
|
77
|
-
id: "row-5"
|
|
78
|
-
}],
|
|
79
|
-
pageLimits: [1, 2, 3]
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const CustomDisplayTitle = exports.CustomDisplayTitle = {
|
|
83
|
-
name: "CustomDisplayTitle",
|
|
84
|
-
args: {
|
|
85
|
-
data: [{
|
|
86
|
-
id: "row-1"
|
|
87
|
-
}, {
|
|
88
|
-
id: "row-2"
|
|
89
|
-
}, {
|
|
90
|
-
id: "row-3"
|
|
91
|
-
}, {
|
|
92
|
-
id: "row-4"
|
|
93
|
-
}, {
|
|
94
|
-
id: "row-5"
|
|
95
|
-
}],
|
|
96
|
-
description: /*#__PURE__*/_react.default.createElement("b", null, "Hello there")
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
const RenderAbove = exports.RenderAbove = {
|
|
100
|
-
render: () => {
|
|
101
|
-
const data = [{
|
|
102
|
-
columns: [{
|
|
103
|
-
content: "Ready",
|
|
104
|
-
role: "rowheader"
|
|
105
|
-
}, {
|
|
106
|
-
content: 1,
|
|
107
|
-
className: "u-align--right"
|
|
108
|
-
}, {
|
|
109
|
-
content: "1 GiB",
|
|
110
|
-
className: "u-align--right"
|
|
111
|
-
}, {
|
|
112
|
-
content: 2,
|
|
113
|
-
className: "u-align--right"
|
|
114
|
-
}, {
|
|
115
|
-
content: 42,
|
|
116
|
-
className: "u-align--right"
|
|
117
|
-
}],
|
|
118
|
-
sortData: {
|
|
119
|
-
status: "ready",
|
|
120
|
-
cores: 2,
|
|
121
|
-
ram: 1,
|
|
122
|
-
disks: 2
|
|
123
|
-
}
|
|
124
|
-
}, {
|
|
125
|
-
columns: [{
|
|
126
|
-
content: "Idle",
|
|
127
|
-
role: "rowheader"
|
|
128
|
-
}, {
|
|
129
|
-
content: 1,
|
|
130
|
-
className: "u-align--right"
|
|
131
|
-
}, {
|
|
132
|
-
content: "1 GiB",
|
|
133
|
-
className: "u-align--right"
|
|
134
|
-
}, {
|
|
135
|
-
content: 2,
|
|
136
|
-
className: "u-align--right"
|
|
137
|
-
}, {
|
|
138
|
-
content: 23,
|
|
139
|
-
className: "u-align--right"
|
|
140
|
-
}],
|
|
141
|
-
sortData: {
|
|
142
|
-
status: "idle",
|
|
143
|
-
cores: 1,
|
|
144
|
-
ram: 1,
|
|
145
|
-
disks: 2
|
|
146
|
-
}
|
|
147
|
-
}, {
|
|
148
|
-
columns: [{
|
|
149
|
-
content: "Waiting",
|
|
150
|
-
role: "rowheader"
|
|
151
|
-
}, {
|
|
152
|
-
content: 8,
|
|
153
|
-
className: "u-align--right"
|
|
154
|
-
}, {
|
|
155
|
-
content: "3.9 GiB",
|
|
156
|
-
className: "u-align--right"
|
|
157
|
-
}, {
|
|
158
|
-
content: 3,
|
|
159
|
-
className: "u-align--right"
|
|
160
|
-
}, {
|
|
161
|
-
content: 0,
|
|
162
|
-
className: "u-align--right"
|
|
163
|
-
}],
|
|
164
|
-
sortData: {
|
|
165
|
-
status: "waiting",
|
|
166
|
-
cores: 8,
|
|
167
|
-
ram: 3.9,
|
|
168
|
-
disks: 3
|
|
169
|
-
}
|
|
170
|
-
}];
|
|
171
|
-
const headers = [{
|
|
172
|
-
content: "Status",
|
|
173
|
-
sortKey: "status"
|
|
174
|
-
}, {
|
|
175
|
-
content: "Cores",
|
|
176
|
-
sortKey: "cores",
|
|
177
|
-
className: "u-align--right"
|
|
178
|
-
}, {
|
|
179
|
-
content: "RAM",
|
|
180
|
-
sortKey: "ram",
|
|
181
|
-
className: "u-align--right"
|
|
182
|
-
}, {
|
|
183
|
-
content: "Disks",
|
|
184
|
-
sortKey: "disks",
|
|
185
|
-
className: "u-align--right"
|
|
186
|
-
}, {
|
|
187
|
-
content: "Networks",
|
|
188
|
-
className: "u-align--right"
|
|
189
|
-
}];
|
|
190
|
-
return /*#__PURE__*/_react.default.createElement(_TablePagination.default, {
|
|
191
|
-
data: data,
|
|
192
|
-
pageLimits: [1, 2, 3]
|
|
193
|
-
}, /*#__PURE__*/_react.default.createElement(_MainTable.default, {
|
|
194
|
-
headers: headers,
|
|
195
|
-
rows: data,
|
|
196
|
-
sortable: true
|
|
197
|
-
}));
|
|
198
|
-
},
|
|
199
|
-
name: "RenderAbove"
|
|
200
|
-
};
|
|
201
|
-
const RenderBelow = exports.RenderBelow = {
|
|
202
|
-
render: () => {
|
|
203
|
-
const data = [{
|
|
204
|
-
columns: [{
|
|
205
|
-
content: "Ready",
|
|
206
|
-
role: "rowheader"
|
|
207
|
-
}, {
|
|
208
|
-
content: 1,
|
|
209
|
-
className: "u-align--right"
|
|
210
|
-
}, {
|
|
211
|
-
content: "1 GiB",
|
|
212
|
-
className: "u-align--right"
|
|
213
|
-
}, {
|
|
214
|
-
content: 2,
|
|
215
|
-
className: "u-align--right"
|
|
216
|
-
}, {
|
|
217
|
-
content: 42,
|
|
218
|
-
className: "u-align--right"
|
|
219
|
-
}],
|
|
220
|
-
sortData: {
|
|
221
|
-
status: "ready",
|
|
222
|
-
cores: 2,
|
|
223
|
-
ram: 1,
|
|
224
|
-
disks: 2
|
|
225
|
-
}
|
|
226
|
-
}, {
|
|
227
|
-
columns: [{
|
|
228
|
-
content: "Idle",
|
|
229
|
-
role: "rowheader"
|
|
230
|
-
}, {
|
|
231
|
-
content: 1,
|
|
232
|
-
className: "u-align--right"
|
|
233
|
-
}, {
|
|
234
|
-
content: "1 GiB",
|
|
235
|
-
className: "u-align--right"
|
|
236
|
-
}, {
|
|
237
|
-
content: 2,
|
|
238
|
-
className: "u-align--right"
|
|
239
|
-
}, {
|
|
240
|
-
content: 23,
|
|
241
|
-
className: "u-align--right"
|
|
242
|
-
}],
|
|
243
|
-
sortData: {
|
|
244
|
-
status: "idle",
|
|
245
|
-
cores: 1,
|
|
246
|
-
ram: 1,
|
|
247
|
-
disks: 2
|
|
248
|
-
}
|
|
249
|
-
}, {
|
|
250
|
-
columns: [{
|
|
251
|
-
content: "Waiting",
|
|
252
|
-
role: "rowheader"
|
|
253
|
-
}, {
|
|
254
|
-
content: 8,
|
|
255
|
-
className: "u-align--right"
|
|
256
|
-
}, {
|
|
257
|
-
content: "3.9 GiB",
|
|
258
|
-
className: "u-align--right"
|
|
259
|
-
}, {
|
|
260
|
-
content: 3,
|
|
261
|
-
className: "u-align--right"
|
|
262
|
-
}, {
|
|
263
|
-
content: 0,
|
|
264
|
-
className: "u-align--right"
|
|
265
|
-
}],
|
|
266
|
-
sortData: {
|
|
267
|
-
status: "waiting",
|
|
268
|
-
cores: 8,
|
|
269
|
-
ram: 3.9,
|
|
270
|
-
disks: 3
|
|
271
|
-
}
|
|
272
|
-
}];
|
|
273
|
-
const headers = [{
|
|
274
|
-
content: "Status",
|
|
275
|
-
sortKey: "status"
|
|
276
|
-
}, {
|
|
277
|
-
content: "Cores",
|
|
278
|
-
sortKey: "cores",
|
|
279
|
-
className: "u-align--right"
|
|
280
|
-
}, {
|
|
281
|
-
content: "RAM",
|
|
282
|
-
sortKey: "ram",
|
|
283
|
-
className: "u-align--right"
|
|
284
|
-
}, {
|
|
285
|
-
content: "Disks",
|
|
286
|
-
sortKey: "disks",
|
|
287
|
-
className: "u-align--right"
|
|
288
|
-
}, {
|
|
289
|
-
content: "Networks",
|
|
290
|
-
className: "u-align--right"
|
|
291
|
-
}];
|
|
292
|
-
return /*#__PURE__*/_react.default.createElement(_TablePagination.default, {
|
|
293
|
-
data: data,
|
|
294
|
-
pageLimits: [1, 2, 3],
|
|
295
|
-
position: "below"
|
|
296
|
-
}, /*#__PURE__*/_react.default.createElement(_MainTable.default, {
|
|
297
|
-
headers: headers,
|
|
298
|
-
rows: data,
|
|
299
|
-
sortable: true
|
|
300
|
-
}));
|
|
301
|
-
},
|
|
302
|
-
name: "RenderBelow"
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
/** The table pagination controls can be used without wrapping MainTable by
|
|
306
|
-
* using the `TablePaginationControls` component.
|
|
307
|
-
*/
|
|
308
|
-
const ControlsOnly = exports.ControlsOnly = {
|
|
309
|
-
render: () => {
|
|
310
|
-
return /*#__PURE__*/_react.default.createElement(_TablePaginationControls.default, {
|
|
311
|
-
currentPage: 1,
|
|
312
|
-
itemName: "row",
|
|
313
|
-
nextButtonProps: {
|
|
314
|
-
disabled: false
|
|
315
|
-
},
|
|
316
|
-
onInputPageChange: console.log,
|
|
317
|
-
onNextPage: console.log,
|
|
318
|
-
onPageSizeChange: console.log,
|
|
319
|
-
onPreviousPage: console.log,
|
|
320
|
-
pageLimits: [10, 25, 50],
|
|
321
|
-
pageSize: 20,
|
|
322
|
-
previousButtonProps: {
|
|
323
|
-
disabled: false
|
|
324
|
-
},
|
|
325
|
-
showPageInput: true,
|
|
326
|
-
totalItems: 100,
|
|
327
|
-
visibleCount: 10
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
};
|
package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from "../../Button";
|
|
2
|
-
import { HTMLAttributes } from "react";
|
|
3
|
-
import { BasePaginationProps, ExternalControlProps, InternalControlProps } from "../TablePagination";
|
|
4
|
-
export declare enum Label {
|
|
5
|
-
NEXT_PAGE = "Next page",
|
|
6
|
-
PREVIOUS_PAGE = "Previous page",
|
|
7
|
-
PAGE_NUMBER = "Page number"
|
|
8
|
-
}
|
|
9
|
-
export type AllProps = BasePaginationProps & InternalControlProps & ExternalControlProps;
|
|
10
|
-
export type Props = Omit<AllProps, "currentPage" | "data" | "dataForwardProp" | "externallyControlled" | "onPageChange" | "position" | "totalItems"> & {
|
|
11
|
-
currentPage?: AllProps["currentPage"];
|
|
12
|
-
displayDescription?: boolean;
|
|
13
|
-
onInputPageChange?: (page: number) => void;
|
|
14
|
-
nextButtonProps?: Partial<ButtonProps>;
|
|
15
|
-
onNextPage?: (page: number) => void;
|
|
16
|
-
onPageChange?: AllProps["onPageChange"];
|
|
17
|
-
onPreviousPage?: (page: number) => void;
|
|
18
|
-
previousButtonProps?: Partial<ButtonProps>;
|
|
19
|
-
totalItems?: AllProps["totalItems"];
|
|
20
|
-
visibleCount?: number;
|
|
21
|
-
showPageInput?: boolean;
|
|
22
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
23
|
-
declare const TablePaginationControls: ({ className, currentPage, description, displayDescription, onInputPageChange, itemName, nextButtonProps, onNextPage, onPageChange, onPageSizeChange, onPreviousPage, pageLimits, pageSize, previousButtonProps, showPageInput, totalItems, visibleCount, ...divProps }: Props) => JSX.Element;
|
|
24
|
-
export default TablePaginationControls;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Determine if we are working with a small screen.
|
|
4
|
-
* 'small screen' in this case is relative to the width of the description div
|
|
5
|
-
*/
|
|
6
|
-
export declare const figureSmallScreen: () => boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Iterate direct react child components and override the value of the prop specified by @param dataForwardProp
|
|
9
|
-
* for those child components.
|
|
10
|
-
* @param children - react node children to iterate
|
|
11
|
-
* @param dataForwardProp - the name of the prop from the children components to override
|
|
12
|
-
* @param data - actual data to be passed to the prop specified by @param dataForwardProp
|
|
13
|
-
*/
|
|
14
|
-
export declare const renderChildren: (children: ReactNode, dataForwardProp: string, data: unknown[]) => ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
|
|
15
|
-
export declare const DEFAULT_PAGE_LIMITS: number[];
|
|
16
|
-
export declare const generatePagingOptions: (pageLimits: number[]) => {
|
|
17
|
-
value: number;
|
|
18
|
-
label: string;
|
|
19
|
-
}[];
|
|
20
|
-
export declare const getDescription: ({ description, isSmallScreen, totalItems, itemName, visibleCount, }: {
|
|
21
|
-
description: ReactNode;
|
|
22
|
-
isSmallScreen: boolean;
|
|
23
|
-
totalItems: number;
|
|
24
|
-
itemName: string;
|
|
25
|
-
visibleCount: number;
|
|
26
|
-
}) => string | number | true | ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode>;
|
|
27
|
-
export declare const useFigureSmallScreen: () => boolean;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { HTMLProps, ReactNode } from "react";
|
|
2
|
-
import type { PropsWithSpread } from "../../types";
|
|
3
|
-
export type Props = PropsWithSpread<{
|
|
4
|
-
/**
|
|
5
|
-
* The content of the table row.
|
|
6
|
-
*/
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
}, HTMLProps<HTMLTableRowElement>>;
|
|
9
|
-
declare const TableRow: ({ children, ...trProps }: Props) => JSX.Element;
|
|
10
|
-
export default TableRow;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { HTMLProps, ElementType, ReactNode, ComponentType } from "react";
|
|
2
|
-
import type { ClassName } from "../../types";
|
|
3
|
-
export type TabLink<P = null> = {
|
|
4
|
-
/**
|
|
5
|
-
* Whether the tab link should have active styling.
|
|
6
|
-
*/
|
|
7
|
-
active?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Optional classes applied to the link element.
|
|
10
|
-
*/
|
|
11
|
-
className?: ClassName;
|
|
12
|
-
/**
|
|
13
|
-
* Optional component to be used instead of the default "a" element.
|
|
14
|
-
*/
|
|
15
|
-
component?: ElementType | ComponentType<P>;
|
|
16
|
-
/**
|
|
17
|
-
* Label to be displayed inside the tab link.
|
|
18
|
-
*/
|
|
19
|
-
label: ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* Optional classes applied to the "li" element.
|
|
22
|
-
*/
|
|
23
|
-
listItemClassName?: string;
|
|
24
|
-
} & (HTMLProps<HTMLElement> | P);
|
|
25
|
-
export type Props<P = null> = {
|
|
26
|
-
/**
|
|
27
|
-
* Optional classes applied to the parent "nav" element.
|
|
28
|
-
*/
|
|
29
|
-
className?: ClassName;
|
|
30
|
-
/**
|
|
31
|
-
* An array of tab link objects.
|
|
32
|
-
*/
|
|
33
|
-
links: TabLink<P>[];
|
|
34
|
-
/**
|
|
35
|
-
* Optional classes applied to the "ul" element.
|
|
36
|
-
*/
|
|
37
|
-
listClassName?: string;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* This is the [React](https://reactjs.org/) component for Vanilla [Tabs](https://vanillaframework.io/docs/patterns/tabs).
|
|
41
|
-
Tabs organise and allow navigation between groups of content that are related and at the same level
|
|
42
|
-
of hierarchy.
|
|
43
|
-
*/
|
|
44
|
-
declare const Tabs: <P>({ className, links, listClassName, }: Props<P>) => JSX.Element;
|
|
45
|
-
export default Tabs;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import Tabs from "./Tabs";
|
|
3
|
-
declare const meta: Meta<typeof Tabs>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Tabs>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
/**
|
|
8
|
-
* To horizontally align the Tabs with other content, they can be contained within a Row component to
|
|
9
|
-
provide correct gutters.
|
|
10
|
-
*/
|
|
11
|
-
export declare const HorizontallyAligned: Story;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.HorizontallyAligned = exports.Default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _Row = _interopRequireDefault(require("../Row"));
|
|
9
|
-
var _Tabs = _interopRequireDefault(require("./Tabs"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
const meta = {
|
|
12
|
-
component: _Tabs.default,
|
|
13
|
-
tags: ["autodocs"]
|
|
14
|
-
};
|
|
15
|
-
var _default = exports.default = meta;
|
|
16
|
-
const Default = exports.Default = {
|
|
17
|
-
name: "Default",
|
|
18
|
-
args: {
|
|
19
|
-
links: [{
|
|
20
|
-
active: true,
|
|
21
|
-
label: "Summary"
|
|
22
|
-
}, {
|
|
23
|
-
active: false,
|
|
24
|
-
label: "Network"
|
|
25
|
-
}, {
|
|
26
|
-
active: false,
|
|
27
|
-
label: "Storage"
|
|
28
|
-
}, {
|
|
29
|
-
active: false,
|
|
30
|
-
label: "Settings"
|
|
31
|
-
}]
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* To horizontally align the Tabs with other content, they can be contained within a Row component to
|
|
37
|
-
provide correct gutters.
|
|
38
|
-
*/
|
|
39
|
-
const HorizontallyAligned = exports.HorizontallyAligned = {
|
|
40
|
-
render: () => /*#__PURE__*/_react.default.createElement(_Row.default, null, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
|
41
|
-
links: [{
|
|
42
|
-
active: true,
|
|
43
|
-
label: "Summary"
|
|
44
|
-
}, {
|
|
45
|
-
active: false,
|
|
46
|
-
label: "Network"
|
|
47
|
-
}, {
|
|
48
|
-
active: false,
|
|
49
|
-
label: "Storage"
|
|
50
|
-
}, {
|
|
51
|
-
active: false,
|
|
52
|
-
label: "Settings"
|
|
53
|
-
}]
|
|
54
|
-
}), /*#__PURE__*/_react.default.createElement("p", null, "There should be gutters and the text should be horizontally aligned")),
|
|
55
|
-
name: "Horizontally aligned"
|
|
56
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { TextareaHTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import type { ClassName, PropsWithSpread } from "../../types";
|
|
3
|
-
/**
|
|
4
|
-
* The props for the Textarea component.
|
|
5
|
-
*/
|
|
6
|
-
export type Props = PropsWithSpread<{
|
|
7
|
-
/**
|
|
8
|
-
* The content for caution validation.
|
|
9
|
-
*/
|
|
10
|
-
caution?: ReactNode;
|
|
11
|
-
/**
|
|
12
|
-
* Optional class(es) to pass to the textarea element.
|
|
13
|
-
*/
|
|
14
|
-
className?: ClassName;
|
|
15
|
-
/**
|
|
16
|
-
* The content for error validation.
|
|
17
|
-
*/
|
|
18
|
-
error?: ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
* Whether the textarea should grow to fit the content automatically.
|
|
21
|
-
*/
|
|
22
|
-
grow?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Help text to show below the field.
|
|
25
|
-
*/
|
|
26
|
-
help?: ReactNode;
|
|
27
|
-
/**
|
|
28
|
-
* The id of the textarea.
|
|
29
|
-
*/
|
|
30
|
-
id?: string;
|
|
31
|
-
/**
|
|
32
|
-
* The label for the field.
|
|
33
|
-
*/
|
|
34
|
-
label?: ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* Optional class(es) to pass to the label component.
|
|
37
|
-
*/
|
|
38
|
-
labelClassName?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Whether the field is required.
|
|
41
|
-
*/
|
|
42
|
-
required?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether the form field should have a stacked appearance.
|
|
45
|
-
*/
|
|
46
|
-
stacked?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* The content for success validation.
|
|
49
|
-
*/
|
|
50
|
-
success?: ReactNode;
|
|
51
|
-
/**
|
|
52
|
-
* Whether to focus on the input on initial render.
|
|
53
|
-
*/
|
|
54
|
-
takeFocus?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Optional class(es) to pass to the wrapping Field component
|
|
57
|
-
*/
|
|
58
|
-
wrapperClassName?: string;
|
|
59
|
-
/**
|
|
60
|
-
* Function to occur on keyboard event, 'CTRL + Enter'
|
|
61
|
-
*/
|
|
62
|
-
onControlEnter?: () => void;
|
|
63
|
-
}, TextareaHTMLAttributes<HTMLTextAreaElement>>;
|
|
64
|
-
/**
|
|
65
|
-
* This is a [React](https://reactjs.org/) component for the Vanilla [Textarea](https://docs.vanillaframework.io/base/forms/#textarea).
|
|
66
|
-
*
|
|
67
|
-
* The Textarea component defines a multi-line text input control.
|
|
68
|
-
*/
|
|
69
|
-
declare const Textarea: ({ caution, className, error, grow, help, id, label, labelClassName, onKeyUp, onControlEnter, required, stacked, style, success, takeFocus, wrapperClassName, ...props }: Props) => JSX.Element;
|
|
70
|
-
export default Textarea;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import Textarea from "./Textarea";
|
|
3
|
-
declare const meta: Meta<typeof Textarea>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Textarea>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const DynamicHeight: Story;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.DynamicHeight = exports.Default = void 0;
|
|
7
|
-
var _Textarea = _interopRequireDefault(require("./Textarea"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
const meta = {
|
|
10
|
-
component: _Textarea.default,
|
|
11
|
-
tags: ["autodocs"],
|
|
12
|
-
argTypes: {
|
|
13
|
-
caution: {
|
|
14
|
-
control: {
|
|
15
|
-
type: "text"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
error: {
|
|
19
|
-
control: {
|
|
20
|
-
type: "text"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
help: {
|
|
24
|
-
control: {
|
|
25
|
-
type: "text"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
label: {
|
|
29
|
-
control: {
|
|
30
|
-
type: "text"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
success: {
|
|
34
|
-
control: {
|
|
35
|
-
type: "text"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
id: {
|
|
39
|
-
control: {
|
|
40
|
-
disable: true
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
var _default = exports.default = meta;
|
|
46
|
-
const Default = exports.Default = {
|
|
47
|
-
name: "Default",
|
|
48
|
-
args: {
|
|
49
|
-
label: "Tell us about your project or interest",
|
|
50
|
-
id: "textarea2",
|
|
51
|
-
rows: 3,
|
|
52
|
-
defaultValue: "Ubuntu"
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
const DynamicHeight = exports.DynamicHeight = {
|
|
56
|
-
name: "Dynamic Height",
|
|
57
|
-
args: {
|
|
58
|
-
label: "Text area that will dynamically adjust its height based on content",
|
|
59
|
-
defaultValue: "Ubuntu",
|
|
60
|
-
grow: true
|
|
61
|
-
}
|
|
62
|
-
};
|