@canonical/react-components 1.6.0 → 1.7.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/dist/components/Accordion/Accordion.stories.d.ts +18 -0
- package/dist/components/Accordion/Accordion.stories.js +117 -0
- package/dist/components/Accordion/Accordion.test.d.ts +1 -0
- package/dist/components/Accordion/AccordionSection/AccordionSection.test.d.ts +1 -0
- package/dist/components/ActionButton/ActionButton.stories.d.ts +7 -0
- package/dist/components/ActionButton/ActionButton.stories.js +36 -0
- package/dist/components/ActionButton/ActionButton.test.d.ts +1 -0
- package/dist/components/ApplicationLayout/AppAside/AppAside.stories.d.ts +13 -0
- package/dist/components/ApplicationLayout/AppAside/AppAside.stories.js +116 -0
- package/dist/components/ApplicationLayout/AppAside/AppAside.test.d.ts +1 -0
- package/dist/components/ApplicationLayout/AppMain/AppMain.stories.d.ts +14 -0
- package/dist/components/ApplicationLayout/AppMain/AppMain.stories.js +45 -0
- package/dist/components/ApplicationLayout/AppMain/AppMain.test.d.ts +1 -0
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.stories.d.ts +12 -0
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.stories.js +104 -0
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.test.d.ts +1 -0
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.d.ts +15 -0
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.js +52 -0
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.test.d.ts +1 -0
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.stories.d.ts +13 -0
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.stories.js +41 -0
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.test.d.ts +1 -0
- package/dist/components/ApplicationLayout/Application/Application.stories.d.ts +6 -0
- package/dist/components/ApplicationLayout/Application/Application.stories.js +16 -0
- package/dist/components/ApplicationLayout/Application/Application.test.d.ts +1 -0
- package/dist/components/ApplicationLayout/ApplicationLayout.stories.d.ts +24 -0
- package/dist/components/ApplicationLayout/ApplicationLayout.stories.js +232 -0
- package/dist/components/ApplicationLayout/ApplicationLayout.test.d.ts +1 -0
- package/dist/components/ArticlePagination/ArticlePagination.stories.d.ts +6 -0
- package/dist/components/ArticlePagination/ArticlePagination.stories.js +22 -0
- package/dist/components/ArticlePagination/ArticlePagination.test.d.ts +1 -0
- package/dist/components/Badge/Badge.stories.d.ts +15 -0
- package/dist/components/Badge/Badge.stories.js +62 -0
- package/dist/components/Badge/Badge.test.d.ts +1 -0
- package/dist/components/Button/Button.stories.d.ts +32 -0
- package/dist/components/Button/Button.stories.js +180 -0
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Card/Card.stories.d.ts +33 -0
- package/dist/components/Card/Card.stories.js +51 -0
- package/dist/components/Card/Card.test.d.ts +1 -0
- package/dist/components/CheckboxInput/CheckableInput/CheckableInput.test.d.ts +1 -0
- package/dist/components/CheckboxInput/CheckboxInput.stories.d.ts +11 -0
- package/dist/components/CheckboxInput/CheckboxInput.stories.js +84 -0
- package/dist/components/CheckboxInput/CheckboxInput.test.d.ts +1 -0
- package/dist/components/Chip/Chip.stories.d.ts +9 -0
- package/dist/components/Chip/Chip.stories.js +45 -0
- package/dist/components/Chip/Chip.test.d.ts +1 -0
- package/dist/components/CodeSnippet/CodeSnippet.stories.d.ts +45 -0
- package/dist/components/CodeSnippet/CodeSnippet.stories.js +281 -0
- package/dist/components/CodeSnippet/CodeSnippet.test.d.ts +1 -0
- package/dist/components/Col/Col.stories.d.ts +11 -0
- package/dist/components/Col/Col.stories.js +154 -0
- package/dist/components/Col/Col.test.d.ts +1 -0
- package/dist/components/ConfirmationButton/ConfirmationButton.stories.d.ts +9 -0
- package/dist/components/ConfirmationButton/ConfirmationButton.stories.js +108 -0
- package/dist/components/ConfirmationButton/ConfirmationButton.test.d.ts +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts +18 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +135 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.test.d.ts +1 -0
- package/dist/components/ContextualMenu/ContextualMenu.stories.d.ts +13 -0
- package/dist/components/ContextualMenu/ContextualMenu.stories.js +107 -0
- package/dist/components/ContextualMenu/ContextualMenu.test.d.ts +1 -0
- package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.test.d.ts +1 -0
- package/dist/components/DoughnutChart/DoughnutChart.stories.d.ts +9 -0
- package/dist/components/DoughnutChart/DoughnutChart.stories.js +42 -0
- package/dist/components/DoughnutChart/DoughnutChart.test.d.ts +1 -0
- package/dist/components/EmptyState/EmptyState.stories.d.ts +7 -0
- package/dist/components/EmptyState/EmptyState.stories.js +49 -0
- package/dist/components/EmptyState/EmptyState.test.d.ts +1 -0
- package/dist/components/Field/Field.test.d.ts +1 -0
- package/dist/components/Form/Form.stories.d.ts +12 -0
- package/dist/components/Form/Form.stories.js +179 -0
- package/dist/components/Form/Form.test.d.ts +1 -0
- package/dist/components/FormikField/FormikField.stories.d.ts +8 -0
- package/dist/components/FormikField/FormikField.stories.js +85 -0
- package/dist/components/FormikField/FormikField.test.d.ts +1 -0
- package/dist/components/Icon/Icon.stories.d.ts +16 -0
- package/dist/components/Icon/Icon.stories.js +49 -0
- package/dist/components/Icon/Icon.test.d.ts +1 -0
- package/dist/components/Input/Input.stories.d.ts +14 -0
- package/dist/components/Input/Input.stories.js +148 -0
- package/dist/components/Input/Input.test.d.ts +1 -0
- package/dist/components/Label/Label.test.d.ts +1 -0
- package/dist/components/Link/Link.stories.d.ts +9 -0
- package/dist/components/Link/Link.stories.js +48 -0
- package/dist/components/Link/Link.test.d.ts +1 -0
- package/dist/components/List/List.stories.d.ts +15 -0
- package/dist/components/List/List.stories.js +122 -0
- package/dist/components/List/List.test.d.ts +1 -0
- package/dist/components/LoginPageLayout/LoginPageLayout.stories.d.ts +9 -0
- package/dist/components/LoginPageLayout/LoginPageLayout.stories.js +58 -0
- package/dist/components/LoginPageLayout/LoginPageLayout.test.d.ts +1 -0
- package/dist/components/MainTable/MainTable.stories.d.ts +15 -0
- package/dist/components/MainTable/MainTable.stories.js +553 -0
- package/dist/components/MainTable/MainTable.test.d.ts +1 -0
- package/dist/components/Modal/Modal.stories.d.ts +6 -0
- package/dist/components/Modal/Modal.stories.js +57 -0
- package/dist/components/Modal/Modal.test.d.ts +1 -0
- package/dist/components/ModularTable/ModularTable.stories.d.ts +27 -0
- package/dist/components/ModularTable/ModularTable.stories.js +343 -0
- package/dist/components/ModularTable/ModularTable.test.d.ts +1 -0
- package/dist/components/MultiSelect/FadeInDown/FadeInDown.test.d.ts +1 -0
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +8 -0
- package/dist/components/MultiSelect/MultiSelect.stories.js +70 -0
- package/dist/components/MultiSelect/MultiSelect.test.d.ts +1 -0
- package/dist/components/Navigation/Navigation.stories.d.ts +43 -0
- package/dist/components/Navigation/Navigation.stories.js +232 -0
- package/dist/components/Navigation/Navigation.test.d.ts +1 -0
- package/dist/components/Navigation/NavigationLink/NavigationLink.test.d.ts +1 -0
- package/dist/components/Navigation/NavigationMenu/NavigationMenu.test.d.ts +1 -0
- package/dist/components/Notification/Notification.stories.d.ts +45 -0
- package/dist/components/Notification/Notification.stories.js +201 -0
- package/dist/components/Notification/Notification.test.d.ts +1 -0
- package/dist/components/NotificationProvider/NotificationProvider.test.d.ts +1 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +14 -0
- package/dist/components/Pagination/Pagination.stories.js +94 -0
- package/dist/components/Pagination/Pagination.test.d.ts +1 -0
- package/dist/components/Pagination/PaginationButton/PaginationButton.test.d.ts +4 -0
- package/dist/components/Pagination/PaginationItem/PaginationItem.test.d.ts +1 -0
- package/dist/components/Panel/Panel.stories.d.ts +17 -0
- package/dist/components/Panel/Panel.stories.js +60 -0
- package/dist/components/Panel/Panel.test.d.ts +1 -0
- package/dist/components/PasswordToggle/PasswordToggle.stories.d.ts +12 -0
- package/dist/components/PasswordToggle/PasswordToggle.stories.js +74 -0
- package/dist/components/PasswordToggle/PasswordToggle.test.d.ts +1 -0
- package/dist/components/RadioInput/RadioInput.stories.d.ts +10 -0
- package/dist/components/RadioInput/RadioInput.stories.js +83 -0
- package/dist/components/RadioInput/RadioInput.test.d.ts +1 -0
- package/dist/components/Row/Row.stories.d.ts +9 -0
- package/dist/components/Row/Row.stories.js +29 -0
- package/dist/components/Row/Row.test.d.ts +1 -0
- package/dist/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.test.d.ts +1 -0
- package/dist/components/SearchAndFilter/SearchAndFilter.stories.d.ts +8 -0
- package/dist/components/SearchAndFilter/SearchAndFilter.stories.js +218 -0
- package/dist/components/SearchAndFilter/SearchAndFilter.test.d.ts +1 -0
- package/dist/components/SearchBox/SearchBox.stories.d.ts +14 -0
- package/dist/components/SearchBox/SearchBox.stories.js +106 -0
- package/dist/components/SearchBox/SearchBox.test.d.ts +1 -0
- package/dist/components/Select/Select.stories.d.ts +7 -0
- package/dist/components/Select/Select.stories.js +97 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/SideNavigation/SideNavigation.stories.d.ts +14 -0
- package/dist/components/SideNavigation/SideNavigation.stories.js +62 -0
- package/dist/components/SideNavigation/SideNavigation.test.d.ts +1 -0
- package/dist/components/SideNavigation/SideNavigationBase/SideNavigationBase.test.d.ts +1 -0
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.d.ts +22 -0
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.js +70 -0
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.test.d.ts +1 -0
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.stories.d.ts +7 -0
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.stories.js +32 -0
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.test.d.ts +1 -0
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.stories.d.ts +6 -0
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.stories.js +25 -0
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.test.d.ts +1 -0
- package/dist/components/SkipLink/SkipLink.stories.d.ts +6 -0
- package/dist/components/SkipLink/SkipLink.stories.js +18 -0
- package/dist/components/SkipLink/SkipLink.test.d.ts +1 -0
- package/dist/components/Slider/Slider.stories.d.ts +10 -0
- package/dist/components/Slider/Slider.stories.js +74 -0
- package/dist/components/Slider/Slider.test.d.ts +1 -0
- package/dist/components/Spinner/Spinner.stories.d.ts +8 -0
- package/dist/components/Spinner/Spinner.stories.js +28 -0
- package/dist/components/Spinner/Spinner.test.d.ts +1 -0
- package/dist/components/StatusLabel/StatusLabel.stories.d.ts +10 -0
- package/dist/components/StatusLabel/StatusLabel.stories.js +61 -0
- package/dist/components/StatusLabel/StatusLabel.test.d.ts +1 -0
- package/dist/components/Stepper/Step/Step.stories.d.ts +6 -0
- package/dist/components/Stepper/Step/Step.stories.js +33 -0
- package/dist/components/Stepper/Step/Step.test.d.ts +1 -0
- package/dist/components/Stepper/Stepper.stories.d.ts +11 -0
- package/dist/components/Stepper/Stepper.stories.js +289 -0
- package/dist/components/Stepper/Stepper.test.d.ts +1 -0
- package/dist/components/Strip/Strip.stories.d.ts +12 -0
- package/dist/components/Strip/Strip.stories.js +130 -0
- package/dist/components/Strip/Strip.test.d.ts +1 -0
- package/dist/components/SummaryButton/SummaryButton.stories.d.ts +18 -0
- package/dist/components/SummaryButton/SummaryButton.stories.js +59 -0
- package/dist/components/SummaryButton/SummaryButton.test.d.ts +1 -0
- package/dist/components/Switch/Switch.stories.d.ts +7 -0
- package/dist/components/Switch/Switch.stories.js +26 -0
- package/dist/components/Switch/Switch.test.d.ts +1 -0
- package/dist/components/Table/Table.test.d.ts +1 -0
- package/dist/components/TableCell/TableCell.test.d.ts +1 -0
- package/dist/components/TableHeader/TableHeader.test.d.ts +1 -0
- package/dist/components/TablePagination/TablePagination.stories.d.ts +14 -0
- package/dist/components/TablePagination/TablePagination.stories.js +330 -0
- package/dist/components/TablePagination/TablePagination.test.d.ts +1 -0
- package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.test.d.ts +1 -0
- package/dist/components/TableRow/TableRow.test.d.ts +1 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +11 -0
- package/dist/components/Tabs/Tabs.stories.js +56 -0
- package/dist/components/Tabs/Tabs.test.d.ts +1 -0
- package/dist/components/Textarea/Textarea.stories.d.ts +7 -0
- package/dist/components/Textarea/Textarea.stories.js +62 -0
- package/dist/components/Textarea/Textarea.test.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +12 -0
- package/dist/components/Tooltip/Tooltip.stories.js +71 -0
- package/dist/components/Tooltip/Tooltip.test.d.ts +1 -0
- package/dist/esm/components/Accordion/Accordion.d.ts +46 -0
- package/dist/esm/components/Accordion/Accordion.js +52 -0
- package/dist/esm/components/Accordion/Accordion.stories.d.ts +18 -0
- package/dist/esm/components/Accordion/Accordion.stories.js +109 -0
- package/dist/esm/components/Accordion/Accordion.test.d.ts +1 -0
- package/dist/esm/components/Accordion/AccordionSection/AccordionSection.d.ts +34 -0
- package/dist/esm/components/Accordion/AccordionSection/AccordionSection.js +47 -0
- package/dist/esm/components/Accordion/AccordionSection/AccordionSection.test.d.ts +1 -0
- package/dist/esm/components/Accordion/AccordionSection/index.d.ts +2 -0
- package/dist/esm/components/Accordion/AccordionSection/index.js +1 -0
- package/dist/esm/components/Accordion/index.d.ts +2 -0
- package/dist/esm/components/Accordion/index.js +1 -0
- package/dist/esm/components/ActionButton/ActionButton.d.ts +48 -0
- package/dist/esm/components/ActionButton/ActionButton.js +106 -0
- package/dist/esm/components/ActionButton/ActionButton.stories.d.ts +7 -0
- package/dist/esm/components/ActionButton/ActionButton.stories.js +29 -0
- package/dist/esm/components/ActionButton/ActionButton.test.d.ts +1 -0
- package/dist/esm/components/ActionButton/index.d.ts +2 -0
- package/dist/esm/components/ActionButton/index.js +1 -0
- package/dist/esm/components/ApplicationLayout/AppAside/AppAside.d.ts +33 -0
- package/dist/esm/components/ApplicationLayout/AppAside/AppAside.js +29 -0
- package/dist/esm/components/ApplicationLayout/AppAside/AppAside.stories.d.ts +13 -0
- package/dist/esm/components/ApplicationLayout/AppAside/AppAside.stories.js +108 -0
- package/dist/esm/components/ApplicationLayout/AppAside/AppAside.test.d.ts +1 -0
- package/dist/esm/components/ApplicationLayout/AppAside/index.d.ts +2 -0
- package/dist/esm/components/ApplicationLayout/AppAside/index.js +1 -0
- package/dist/esm/components/ApplicationLayout/AppMain/AppMain.d.ts +14 -0
- package/dist/esm/components/ApplicationLayout/AppMain/AppMain.js +21 -0
- package/dist/esm/components/ApplicationLayout/AppMain/AppMain.stories.d.ts +14 -0
- package/dist/esm/components/ApplicationLayout/AppMain/AppMain.stories.js +38 -0
- package/dist/esm/components/ApplicationLayout/AppMain/AppMain.test.d.ts +1 -0
- package/dist/esm/components/ApplicationLayout/AppMain/index.d.ts +2 -0
- package/dist/esm/components/ApplicationLayout/AppMain/index.js +1 -0
- package/dist/esm/components/ApplicationLayout/AppNavigation/AppNavigation.d.ts +26 -0
- package/dist/esm/components/ApplicationLayout/AppNavigation/AppNavigation.js +31 -0
- package/dist/esm/components/ApplicationLayout/AppNavigation/AppNavigation.stories.d.ts +12 -0
- package/dist/esm/components/ApplicationLayout/AppNavigation/AppNavigation.stories.js +97 -0
- package/dist/esm/components/ApplicationLayout/AppNavigation/AppNavigation.test.d.ts +1 -0
- package/dist/esm/components/ApplicationLayout/AppNavigation/index.d.ts +2 -0
- package/dist/esm/components/ApplicationLayout/AppNavigation/index.js +1 -0
- package/dist/esm/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.d.ts +18 -0
- package/dist/esm/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.js +24 -0
- package/dist/esm/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.d.ts +15 -0
- package/dist/esm/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.js +44 -0
- package/dist/esm/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.test.d.ts +1 -0
- package/dist/esm/components/ApplicationLayout/AppNavigationBar/index.d.ts +2 -0
- package/dist/esm/components/ApplicationLayout/AppNavigationBar/index.js +1 -0
- package/dist/esm/components/ApplicationLayout/AppStatus/AppStatus.d.ts +14 -0
- package/dist/esm/components/ApplicationLayout/AppStatus/AppStatus.js +21 -0
- package/dist/esm/components/ApplicationLayout/AppStatus/AppStatus.stories.d.ts +13 -0
- package/dist/esm/components/ApplicationLayout/AppStatus/AppStatus.stories.js +34 -0
- package/dist/esm/components/ApplicationLayout/AppStatus/AppStatus.test.d.ts +1 -0
- package/dist/esm/components/ApplicationLayout/AppStatus/index.d.ts +2 -0
- package/dist/esm/components/ApplicationLayout/AppStatus/index.js +1 -0
- package/dist/esm/components/ApplicationLayout/Application/Application.d.ts +15 -0
- package/dist/esm/components/ApplicationLayout/Application/Application.js +22 -0
- package/dist/esm/components/ApplicationLayout/Application/Application.stories.d.ts +6 -0
- package/dist/esm/components/ApplicationLayout/Application/Application.stories.js +9 -0
- package/dist/esm/components/ApplicationLayout/Application/Application.test.d.ts +1 -0
- package/dist/esm/components/ApplicationLayout/Application/index.d.ts +2 -0
- package/dist/esm/components/ApplicationLayout/Application/index.js +1 -0
- package/dist/esm/components/ApplicationLayout/ApplicationLayout.d.ts +93 -0
- package/dist/esm/components/ApplicationLayout/ApplicationLayout.js +118 -0
- package/dist/esm/components/ApplicationLayout/ApplicationLayout.stories.d.ts +24 -0
- package/dist/esm/components/ApplicationLayout/ApplicationLayout.stories.js +222 -0
- package/dist/esm/components/ApplicationLayout/ApplicationLayout.test.d.ts +1 -0
- package/dist/esm/components/ApplicationLayout/index.d.ts +7 -0
- package/dist/esm/components/ApplicationLayout/index.js +7 -0
- package/dist/esm/components/ArticlePagination/ArticlePagination.d.ts +31 -0
- package/dist/esm/components/ArticlePagination/ArticlePagination.js +39 -0
- package/dist/esm/components/ArticlePagination/ArticlePagination.stories.d.ts +6 -0
- package/dist/esm/components/ArticlePagination/ArticlePagination.stories.js +15 -0
- package/dist/esm/components/ArticlePagination/ArticlePagination.test.d.ts +1 -0
- package/dist/esm/components/ArticlePagination/index.d.ts +2 -0
- package/dist/esm/components/ArticlePagination/index.js +1 -0
- package/dist/esm/components/Badge/Badge.d.ts +34 -0
- package/dist/esm/components/Badge/Badge.js +64 -0
- package/dist/esm/components/Badge/Badge.stories.d.ts +15 -0
- package/dist/esm/components/Badge/Badge.stories.js +53 -0
- package/dist/esm/components/Badge/Badge.test.d.ts +1 -0
- package/dist/esm/components/Badge/index.d.ts +2 -0
- package/dist/esm/components/Badge/index.js +1 -0
- package/dist/esm/components/Button/Button.d.ts +64 -0
- package/dist/esm/components/Button/Button.js +55 -0
- package/dist/esm/components/Button/Button.stories.d.ts +32 -0
- package/dist/esm/components/Button/Button.stories.js +171 -0
- package/dist/esm/components/Button/Button.test.d.ts +1 -0
- package/dist/esm/components/Button/index.d.ts +2 -0
- package/dist/esm/components/Button/index.js +1 -0
- package/dist/esm/components/Card/Card.d.ts +35 -0
- package/dist/esm/components/Card/Card.js +45 -0
- package/dist/esm/components/Card/Card.stories.d.ts +33 -0
- package/dist/esm/components/Card/Card.stories.js +48 -0
- package/dist/esm/components/Card/Card.test.d.ts +1 -0
- package/dist/esm/components/Card/index.d.ts +2 -0
- package/dist/esm/components/Card/index.js +1 -0
- package/dist/esm/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +27 -0
- package/dist/esm/components/CheckboxInput/CheckableInput/CheckableInput.js +35 -0
- package/dist/esm/components/CheckboxInput/CheckableInput/CheckableInput.test.d.ts +1 -0
- package/dist/esm/components/CheckboxInput/CheckableInput/index.d.ts +2 -0
- package/dist/esm/components/CheckboxInput/CheckableInput/index.js +1 -0
- package/dist/esm/components/CheckboxInput/CheckboxInput.d.ts +9 -0
- package/dist/esm/components/CheckboxInput/CheckboxInput.js +24 -0
- package/dist/esm/components/CheckboxInput/CheckboxInput.stories.d.ts +11 -0
- package/dist/esm/components/CheckboxInput/CheckboxInput.stories.js +77 -0
- package/dist/esm/components/CheckboxInput/CheckboxInput.test.d.ts +1 -0
- package/dist/esm/components/CheckboxInput/index.d.ts +2 -0
- package/dist/esm/components/CheckboxInput/index.js +1 -0
- package/dist/esm/components/Chip/Chip.d.ts +56 -0
- package/dist/esm/components/Chip/Chip.js +81 -0
- package/dist/esm/components/Chip/Chip.stories.d.ts +9 -0
- package/dist/esm/components/Chip/Chip.stories.js +38 -0
- package/dist/esm/components/Chip/Chip.test.d.ts +1 -0
- package/dist/esm/components/Chip/index.d.ts +2 -0
- package/dist/esm/components/Chip/index.js +1 -0
- package/dist/esm/components/Code/Code.d.ts +13 -0
- package/dist/esm/components/Code/Code.js +49 -0
- package/dist/esm/components/Code/index.d.ts +2 -0
- package/dist/esm/components/Code/index.js +1 -0
- package/dist/esm/components/CodeSnippet/CodeSnippet.d.ts +21 -0
- package/dist/esm/components/CodeSnippet/CodeSnippet.js +28 -0
- package/dist/esm/components/CodeSnippet/CodeSnippet.stories.d.ts +45 -0
- package/dist/esm/components/CodeSnippet/CodeSnippet.stories.js +273 -0
- package/dist/esm/components/CodeSnippet/CodeSnippet.test.d.ts +1 -0
- package/dist/esm/components/CodeSnippet/CodeSnippetBlock.d.ts +40 -0
- package/dist/esm/components/CodeSnippet/CodeSnippetBlock.js +64 -0
- package/dist/esm/components/CodeSnippet/CodeSnippetDropdown.d.ts +18 -0
- package/dist/esm/components/CodeSnippet/CodeSnippetDropdown.js +27 -0
- package/dist/esm/components/CodeSnippet/index.d.ts +5 -0
- package/dist/esm/components/CodeSnippet/index.js +2 -0
- package/dist/esm/components/Col/Col.d.ts +53 -0
- package/dist/esm/components/Col/Col.js +38 -0
- package/dist/esm/components/Col/Col.stories.d.ts +11 -0
- package/dist/esm/components/Col/Col.stories.js +147 -0
- package/dist/esm/components/Col/Col.test.d.ts +1 -0
- package/dist/esm/components/Col/index.d.ts +2 -0
- package/dist/esm/components/Col/index.js +1 -0
- package/dist/esm/components/ConfirmationButton/ConfirmationButton.d.ts +28 -0
- package/dist/esm/components/ConfirmationButton/ConfirmationButton.js +63 -0
- package/dist/esm/components/ConfirmationButton/ConfirmationButton.stories.d.ts +9 -0
- package/dist/esm/components/ConfirmationButton/ConfirmationButton.stories.js +100 -0
- package/dist/esm/components/ConfirmationButton/ConfirmationButton.test.d.ts +1 -0
- package/dist/esm/components/ConfirmationButton/index.d.ts +2 -0
- package/dist/esm/components/ConfirmationButton/index.js +1 -0
- package/dist/esm/components/ConfirmationModal/ConfirmationModal.d.ts +53 -0
- package/dist/esm/components/ConfirmationModal/ConfirmationModal.js +47 -0
- package/dist/esm/components/ConfirmationModal/ConfirmationModal.stories.d.ts +18 -0
- package/dist/esm/components/ConfirmationModal/ConfirmationModal.stories.js +127 -0
- package/dist/esm/components/ConfirmationModal/ConfirmationModal.test.d.ts +1 -0
- package/dist/esm/components/ConfirmationModal/index.d.ts +2 -0
- package/dist/esm/components/ConfirmationModal/index.js +1 -0
- package/dist/esm/components/ContextualMenu/ContextualMenu.d.ts +110 -0
- package/dist/esm/components/ContextualMenu/ContextualMenu.js +215 -0
- package/dist/esm/components/ContextualMenu/ContextualMenu.stories.d.ts +13 -0
- package/dist/esm/components/ContextualMenu/ContextualMenu.stories.js +100 -0
- package/dist/esm/components/ContextualMenu/ContextualMenu.test.d.ts +1 -0
- package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +43 -0
- package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +249 -0
- package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.test.d.ts +1 -0
- package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/index.d.ts +2 -0
- package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/index.js +1 -0
- package/dist/esm/components/ContextualMenu/index.d.ts +3 -0
- package/dist/esm/components/ContextualMenu/index.js +1 -0
- package/dist/esm/components/DoughnutChart/DoughnutChart.d.ts +58 -0
- package/dist/esm/components/DoughnutChart/DoughnutChart.js +154 -0
- package/dist/esm/components/DoughnutChart/DoughnutChart.scss +30 -0
- package/dist/esm/components/DoughnutChart/DoughnutChart.stories.d.ts +9 -0
- package/dist/esm/components/DoughnutChart/DoughnutChart.stories.js +35 -0
- package/dist/esm/components/DoughnutChart/DoughnutChart.test.d.ts +1 -0
- package/dist/esm/components/DoughnutChart/index.d.ts +3 -0
- package/dist/esm/components/DoughnutChart/index.js +1 -0
- package/dist/esm/components/EmptyState/EmptyState.d.ts +25 -0
- package/dist/esm/components/EmptyState/EmptyState.js +28 -0
- package/dist/esm/components/EmptyState/EmptyState.stories.d.ts +7 -0
- package/dist/esm/components/EmptyState/EmptyState.stories.js +40 -0
- package/dist/esm/components/EmptyState/EmptyState.test.d.ts +1 -0
- package/dist/esm/components/EmptyState/index.d.ts +2 -0
- package/dist/esm/components/EmptyState/index.js +1 -0
- package/dist/esm/components/Field/Field.d.ts +77 -0
- package/dist/esm/components/Field/Field.js +126 -0
- package/dist/esm/components/Field/Field.test.d.ts +1 -0
- package/dist/esm/components/Field/index.d.ts +2 -0
- package/dist/esm/components/Field/index.js +1 -0
- package/dist/esm/components/Form/Form.d.ts +21 -0
- package/dist/esm/components/Form/Form.js +28 -0
- package/dist/esm/components/Form/Form.stories.d.ts +12 -0
- package/dist/esm/components/Form/Form.stories.js +172 -0
- package/dist/esm/components/Form/Form.test.d.ts +1 -0
- package/dist/esm/components/Form/index.d.ts +2 -0
- package/dist/esm/components/Form/index.js +1 -0
- package/dist/esm/components/FormikField/FormikField.d.ts +25 -0
- package/dist/esm/components/FormikField/FormikField.js +33 -0
- package/dist/esm/components/FormikField/FormikField.stories.d.ts +8 -0
- package/dist/esm/components/FormikField/FormikField.stories.js +78 -0
- package/dist/esm/components/FormikField/FormikField.test.d.ts +1 -0
- package/dist/esm/components/FormikField/index.d.ts +1 -0
- package/dist/esm/components/FormikField/index.js +1 -0
- package/dist/esm/components/Icon/Icon.d.ts +59 -0
- package/dist/esm/components/Icon/Icon.js +61 -0
- package/dist/esm/components/Icon/Icon.stories.d.ts +16 -0
- package/dist/esm/components/Icon/Icon.stories.js +40 -0
- package/dist/esm/components/Icon/Icon.stories.scss +11 -0
- package/dist/esm/components/Icon/Icon.test.d.ts +1 -0
- package/dist/esm/components/Icon/index.d.ts +2 -0
- package/dist/esm/components/Icon/index.js +1 -0
- package/dist/esm/components/Input/Input.d.ts +70 -0
- package/dist/esm/components/Input/Input.js +103 -0
- package/dist/esm/components/Input/Input.stories.d.ts +14 -0
- package/dist/esm/components/Input/Input.stories.js +141 -0
- package/dist/esm/components/Input/Input.test.d.ts +1 -0
- package/dist/esm/components/Input/index.d.ts +2 -0
- package/dist/esm/components/Input/index.js +1 -0
- package/dist/esm/components/Label/Label.d.ts +25 -0
- package/dist/esm/components/Label/Label.js +27 -0
- package/dist/esm/components/Label/Label.test.d.ts +1 -0
- package/dist/esm/components/Label/index.d.ts +2 -0
- package/dist/esm/components/Label/index.js +1 -0
- package/dist/esm/components/Link/Link.d.ts +31 -0
- package/dist/esm/components/Link/Link.js +37 -0
- package/dist/esm/components/Link/Link.stories.d.ts +9 -0
- package/dist/esm/components/Link/Link.stories.js +41 -0
- package/dist/esm/components/Link/Link.test.d.ts +1 -0
- package/dist/esm/components/Link/index.d.ts +2 -0
- package/dist/esm/components/Link/index.js +1 -0
- package/dist/esm/components/List/List.d.ts +36 -0
- package/dist/esm/components/List/List.js +110 -0
- package/dist/esm/components/List/List.stories.d.ts +15 -0
- package/dist/esm/components/List/List.stories.js +115 -0
- package/dist/esm/components/List/List.test.d.ts +1 -0
- package/dist/esm/components/List/index.d.ts +2 -0
- package/dist/esm/components/List/index.js +1 -0
- package/dist/esm/components/Loader/Loader.d.ts +6 -0
- package/dist/esm/components/Loader/Loader.js +14 -0
- package/dist/esm/components/Loader/index.d.ts +1 -0
- package/dist/esm/components/Loader/index.js +1 -0
- package/dist/esm/components/LoginPageLayout/LoginPageLayout.d.ts +17 -0
- package/dist/esm/components/LoginPageLayout/LoginPageLayout.js +63 -0
- package/dist/esm/components/LoginPageLayout/LoginPageLayout.scss +19 -0
- package/dist/esm/components/LoginPageLayout/LoginPageLayout.stories.d.ts +9 -0
- package/dist/esm/components/LoginPageLayout/LoginPageLayout.stories.js +51 -0
- package/dist/esm/components/LoginPageLayout/LoginPageLayout.test.d.ts +1 -0
- package/dist/esm/components/LoginPageLayout/index.d.ts +2 -0
- package/dist/esm/components/LoginPageLayout/index.js +1 -0
- package/dist/esm/components/MainTable/MainTable.d.ts +102 -0
- package/dist/esm/components/MainTable/MainTable.js +211 -0
- package/dist/esm/components/MainTable/MainTable.stories.d.ts +15 -0
- package/dist/esm/components/MainTable/MainTable.stories.js +545 -0
- package/dist/esm/components/MainTable/MainTable.test.d.ts +1 -0
- package/dist/esm/components/MainTable/index.d.ts +2 -0
- package/dist/esm/components/MainTable/index.js +1 -0
- package/dist/esm/components/Modal/Modal.d.ts +36 -0
- package/dist/esm/components/Modal/Modal.js +135 -0
- package/dist/esm/components/Modal/Modal.stories.d.ts +6 -0
- package/dist/esm/components/Modal/Modal.stories.js +49 -0
- package/dist/esm/components/Modal/Modal.test.d.ts +1 -0
- package/dist/esm/components/Modal/index.d.ts +2 -0
- package/dist/esm/components/Modal/index.js +1 -0
- package/dist/esm/components/ModularTable/ModularTable.d.ts +105 -0
- package/dist/esm/components/ModularTable/ModularTable.js +166 -0
- package/dist/esm/components/ModularTable/ModularTable.stories.d.ts +27 -0
- package/dist/esm/components/ModularTable/ModularTable.stories.js +335 -0
- package/dist/esm/components/ModularTable/ModularTable.test.d.ts +1 -0
- package/dist/esm/components/ModularTable/index.d.ts +2 -0
- package/dist/esm/components/ModularTable/index.js +1 -0
- package/dist/esm/components/MultiSelect/FadeInDown/FadeInDown.d.ts +10 -0
- package/dist/esm/components/MultiSelect/FadeInDown/FadeInDown.js +25 -0
- package/dist/esm/components/MultiSelect/FadeInDown/FadeInDown.scss +22 -0
- package/dist/esm/components/MultiSelect/FadeInDown/FadeInDown.test.d.ts +1 -0
- package/dist/esm/components/MultiSelect/FadeInDown/index.d.ts +1 -0
- package/dist/esm/components/MultiSelect/FadeInDown/index.js +1 -0
- package/dist/esm/components/MultiSelect/MultiSelect.d.ts +57 -0
- package/dist/esm/components/MultiSelect/MultiSelect.js +308 -0
- package/dist/esm/components/MultiSelect/MultiSelect.scss +151 -0
- package/dist/esm/components/MultiSelect/MultiSelect.stories.d.ts +8 -0
- package/dist/esm/components/MultiSelect/MultiSelect.stories.js +65 -0
- package/dist/esm/components/MultiSelect/MultiSelect.test.d.ts +1 -0
- package/dist/esm/components/MultiSelect/index.d.ts +1 -0
- package/dist/esm/components/MultiSelect/index.js +1 -0
- package/dist/esm/components/Navigation/Navigation.d.ts +66 -0
- package/dist/esm/components/Navigation/Navigation.js +215 -0
- package/dist/esm/components/Navigation/Navigation.stories.d.ts +43 -0
- package/dist/esm/components/Navigation/Navigation.stories.js +225 -0
- package/dist/esm/components/Navigation/Navigation.test.d.ts +1 -0
- package/dist/esm/components/Navigation/NavigationLink/NavigationLink.d.ts +10 -0
- package/dist/esm/components/Navigation/NavigationLink/NavigationLink.js +58 -0
- package/dist/esm/components/Navigation/NavigationLink/NavigationLink.test.d.ts +1 -0
- package/dist/esm/components/Navigation/NavigationLink/index.d.ts +1 -0
- package/dist/esm/components/Navigation/NavigationLink/index.js +1 -0
- package/dist/esm/components/Navigation/NavigationMenu/NavigationMenu.d.ts +11 -0
- package/dist/esm/components/Navigation/NavigationMenu/NavigationMenu.js +57 -0
- package/dist/esm/components/Navigation/NavigationMenu/NavigationMenu.test.d.ts +1 -0
- package/dist/esm/components/Navigation/NavigationMenu/index.d.ts +1 -0
- package/dist/esm/components/Navigation/NavigationMenu/index.js +1 -0
- package/dist/esm/components/Navigation/index.d.ts +3 -0
- package/dist/esm/components/Navigation/index.js +1 -0
- package/dist/esm/components/Navigation/types.d.ts +64 -0
- package/dist/esm/components/Navigation/types.js +1 -0
- package/dist/esm/components/Notification/Notification.d.ts +110 -0
- package/dist/esm/components/Notification/Notification.js +119 -0
- package/dist/esm/components/Notification/Notification.stories.d.ts +45 -0
- package/dist/esm/components/Notification/Notification.stories.js +194 -0
- package/dist/esm/components/Notification/Notification.test.d.ts +1 -0
- package/dist/esm/components/Notification/index.d.ts +2 -0
- package/dist/esm/components/Notification/index.js +1 -0
- package/dist/esm/components/NotificationProvider/NotificationProvider.d.ts +5 -0
- package/dist/esm/components/NotificationProvider/NotificationProvider.js +83 -0
- package/dist/esm/components/NotificationProvider/NotificationProvider.test.d.ts +1 -0
- package/dist/esm/components/NotificationProvider/index.d.ts +3 -0
- package/dist/esm/components/NotificationProvider/index.js +2 -0
- package/dist/esm/components/NotificationProvider/messageBuilder.d.ts +6 -0
- package/dist/esm/components/NotificationProvider/messageBuilder.js +31 -0
- package/dist/esm/components/NotificationProvider/types.d.ts +35 -0
- package/dist/esm/components/NotificationProvider/types.js +1 -0
- package/dist/esm/components/Pagination/Pagination.d.ts +102 -0
- package/dist/esm/components/Pagination/Pagination.js +173 -0
- package/dist/esm/components/Pagination/Pagination.stories.d.ts +14 -0
- package/dist/esm/components/Pagination/Pagination.stories.js +87 -0
- package/dist/esm/components/Pagination/Pagination.test.d.ts +1 -0
- package/dist/esm/components/Pagination/PaginationButton/PaginationButton.d.ts +30 -0
- package/dist/esm/components/Pagination/PaginationButton/PaginationButton.js +31 -0
- package/dist/esm/components/Pagination/PaginationButton/PaginationButton.test.d.ts +4 -0
- package/dist/esm/components/Pagination/PaginationButton/index.d.ts +2 -0
- package/dist/esm/components/Pagination/PaginationButton/index.js +1 -0
- package/dist/esm/components/Pagination/PaginationItem/PaginationItem.d.ts +17 -0
- package/dist/esm/components/Pagination/PaginationItem/PaginationItem.js +20 -0
- package/dist/esm/components/Pagination/PaginationItem/PaginationItem.test.d.ts +1 -0
- package/dist/esm/components/Pagination/PaginationItem/index.d.ts +2 -0
- package/dist/esm/components/Pagination/PaginationItem/index.js +1 -0
- package/dist/esm/components/Pagination/index.d.ts +2 -0
- package/dist/esm/components/Pagination/index.js +1 -0
- package/dist/esm/components/Panel/Panel.d.ts +123 -0
- package/dist/esm/components/Panel/Panel.js +89 -0
- package/dist/esm/components/Panel/Panel.stories.d.ts +17 -0
- package/dist/esm/components/Panel/Panel.stories.js +53 -0
- package/dist/esm/components/Panel/Panel.test.d.ts +1 -0
- package/dist/esm/components/Panel/index.d.ts +1 -0
- package/dist/esm/components/Panel/index.js +1 -0
- package/dist/esm/components/PasswordToggle/PasswordToggle.d.ts +108 -0
- package/dist/esm/components/PasswordToggle/PasswordToggle.js +90 -0
- package/dist/esm/components/PasswordToggle/PasswordToggle.stories.d.ts +12 -0
- package/dist/esm/components/PasswordToggle/PasswordToggle.stories.js +67 -0
- package/dist/esm/components/PasswordToggle/PasswordToggle.test.d.ts +1 -0
- package/dist/esm/components/PasswordToggle/index.d.ts +2 -0
- package/dist/esm/components/PasswordToggle/index.js +1 -0
- package/dist/esm/components/RadioInput/RadioInput.d.ts +9 -0
- package/dist/esm/components/RadioInput/RadioInput.js +22 -0
- package/dist/esm/components/RadioInput/RadioInput.stories.d.ts +10 -0
- package/dist/esm/components/RadioInput/RadioInput.stories.js +76 -0
- package/dist/esm/components/RadioInput/RadioInput.test.d.ts +1 -0
- package/dist/esm/components/RadioInput/index.d.ts +2 -0
- package/dist/esm/components/RadioInput/index.js +1 -0
- package/dist/esm/components/Row/Row.d.ts +19 -0
- package/dist/esm/components/Row/Row.js +22 -0
- package/dist/esm/components/Row/Row.stories.d.ts +9 -0
- package/dist/esm/components/Row/Row.stories.js +22 -0
- package/dist/esm/components/Row/Row.test.d.ts +1 -0
- package/dist/esm/components/Row/index.d.ts +2 -0
- package/dist/esm/components/Row/index.js +1 -0
- package/dist/esm/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +25 -0
- package/dist/esm/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.js +107 -0
- package/dist/esm/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.test.d.ts +1 -0
- package/dist/esm/components/SearchAndFilter/FilterPanelSection/index.d.ts +1 -0
- package/dist/esm/components/SearchAndFilter/FilterPanelSection/index.js +1 -0
- package/dist/esm/components/SearchAndFilter/SearchAndFilter.d.ts +33 -0
- package/dist/esm/components/SearchAndFilter/SearchAndFilter.js +286 -0
- package/dist/esm/components/SearchAndFilter/SearchAndFilter.stories.d.ts +8 -0
- package/dist/esm/components/SearchAndFilter/SearchAndFilter.stories.js +211 -0
- package/dist/esm/components/SearchAndFilter/SearchAndFilter.test.d.ts +1 -0
- package/dist/esm/components/SearchAndFilter/index.d.ts +2 -0
- package/dist/esm/components/SearchAndFilter/index.js +1 -0
- package/dist/esm/components/SearchAndFilter/types.d.ts +11 -0
- package/dist/esm/components/SearchAndFilter/types.js +1 -0
- package/dist/esm/components/SearchAndFilter/utils.d.ts +13 -0
- package/dist/esm/components/SearchAndFilter/utils.js +22 -0
- package/dist/esm/components/SearchBox/SearchBox.d.ts +63 -0
- package/dist/esm/components/SearchBox/SearchBox.js +95 -0
- package/dist/esm/components/SearchBox/SearchBox.stories.d.ts +14 -0
- package/dist/esm/components/SearchBox/SearchBox.stories.js +99 -0
- package/dist/esm/components/SearchBox/SearchBox.test.d.ts +1 -0
- package/dist/esm/components/SearchBox/index.d.ts +2 -0
- package/dist/esm/components/SearchBox/index.js +1 -0
- package/dist/esm/components/Select/Select.d.ts +71 -0
- package/dist/esm/components/Select/Select.js +84 -0
- package/dist/esm/components/Select/Select.stories.d.ts +7 -0
- package/dist/esm/components/Select/Select.stories.js +90 -0
- package/dist/esm/components/Select/Select.test.d.ts +1 -0
- package/dist/esm/components/Select/index.d.ts +2 -0
- package/dist/esm/components/Select/index.js +1 -0
- package/dist/esm/components/SideNavigation/SideNavigation.d.ts +50 -0
- package/dist/esm/components/SideNavigation/SideNavigation.js +89 -0
- package/dist/esm/components/SideNavigation/SideNavigation.stories.d.ts +14 -0
- package/dist/esm/components/SideNavigation/SideNavigation.stories.js +55 -0
- package/dist/esm/components/SideNavigation/SideNavigation.test.d.ts +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationBase/SideNavigationBase.d.ts +31 -0
- package/dist/esm/components/SideNavigation/SideNavigationBase/SideNavigationBase.js +31 -0
- package/dist/esm/components/SideNavigation/SideNavigationBase/SideNavigationBase.test.d.ts +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationBase/index.d.ts +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationBase/index.js +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.d.ts +20 -0
- package/dist/esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.js +32 -0
- package/dist/esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.d.ts +22 -0
- package/dist/esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.js +63 -0
- package/dist/esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.test.d.ts +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationItem/index.d.ts +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationItem/index.js +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationLink/SideNavigationLink.d.ts +18 -0
- package/dist/esm/components/SideNavigation/SideNavigationLink/SideNavigationLink.js +25 -0
- package/dist/esm/components/SideNavigation/SideNavigationLink/SideNavigationLink.stories.d.ts +7 -0
- package/dist/esm/components/SideNavigation/SideNavigationLink/SideNavigationLink.stories.js +25 -0
- package/dist/esm/components/SideNavigation/SideNavigationLink/SideNavigationLink.test.d.ts +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationLink/index.d.ts +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationLink/index.js +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationText/SideNavigationText.d.ts +7 -0
- package/dist/esm/components/SideNavigation/SideNavigationText/SideNavigationText.js +20 -0
- package/dist/esm/components/SideNavigation/SideNavigationText/SideNavigationText.stories.d.ts +6 -0
- package/dist/esm/components/SideNavigation/SideNavigationText/SideNavigationText.stories.js +18 -0
- package/dist/esm/components/SideNavigation/SideNavigationText/SideNavigationText.test.d.ts +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationText/index.d.ts +1 -0
- package/dist/esm/components/SideNavigation/SideNavigationText/index.js +1 -0
- package/dist/esm/components/SideNavigation/index.d.ts +5 -0
- package/dist/esm/components/SideNavigation/index.js +4 -0
- package/dist/esm/components/SkipLink/SkipLink.d.ts +12 -0
- package/dist/esm/components/SkipLink/SkipLink.js +18 -0
- package/dist/esm/components/SkipLink/SkipLink.stories.d.ts +6 -0
- package/dist/esm/components/SkipLink/SkipLink.stories.js +11 -0
- package/dist/esm/components/SkipLink/SkipLink.test.d.ts +1 -0
- package/dist/esm/components/SkipLink/index.d.ts +2 -0
- package/dist/esm/components/SkipLink/index.js +1 -0
- package/dist/esm/components/Slider/Slider.d.ts +62 -0
- package/dist/esm/components/Slider/Slider.js +83 -0
- package/dist/esm/components/Slider/Slider.stories.d.ts +10 -0
- package/dist/esm/components/Slider/Slider.stories.js +66 -0
- package/dist/esm/components/Slider/Slider.test.d.ts +1 -0
- package/dist/esm/components/Slider/index.d.ts +2 -0
- package/dist/esm/components/Slider/index.js +1 -0
- package/dist/esm/components/Spinner/Spinner.d.ts +29 -0
- package/dist/esm/components/Spinner/Spinner.js +36 -0
- package/dist/esm/components/Spinner/Spinner.stories.d.ts +8 -0
- package/dist/esm/components/Spinner/Spinner.stories.js +21 -0
- package/dist/esm/components/Spinner/Spinner.test.d.ts +1 -0
- package/dist/esm/components/Spinner/index.d.ts +2 -0
- package/dist/esm/components/Spinner/index.js +1 -0
- package/dist/esm/components/StatusLabel/StatusLabel.d.ts +33 -0
- package/dist/esm/components/StatusLabel/StatusLabel.js +36 -0
- package/dist/esm/components/StatusLabel/StatusLabel.stories.d.ts +10 -0
- package/dist/esm/components/StatusLabel/StatusLabel.stories.js +52 -0
- package/dist/esm/components/StatusLabel/StatusLabel.test.d.ts +1 -0
- package/dist/esm/components/StatusLabel/index.d.ts +2 -0
- package/dist/esm/components/StatusLabel/index.js +1 -0
- package/dist/esm/components/Stepper/Step/Step.d.ts +47 -0
- package/dist/esm/components/Stepper/Step/Step.js +61 -0
- package/dist/esm/components/Stepper/Step/Step.scss +113 -0
- package/dist/esm/components/Stepper/Step/Step.stories.d.ts +6 -0
- package/dist/esm/components/Stepper/Step/Step.stories.js +26 -0
- package/dist/esm/components/Stepper/Step/Step.test.d.ts +1 -0
- package/dist/esm/components/Stepper/Step/index.d.ts +2 -0
- package/dist/esm/components/Stepper/Step/index.js +1 -0
- package/dist/esm/components/Stepper/Stepper.d.ts +17 -0
- package/dist/esm/components/Stepper/Stepper.js +27 -0
- package/dist/esm/components/Stepper/Stepper.stories.d.ts +11 -0
- package/dist/esm/components/Stepper/Stepper.stories.js +282 -0
- package/dist/esm/components/Stepper/Stepper.test.d.ts +1 -0
- package/dist/esm/components/Stepper/index.d.ts +2 -0
- package/dist/esm/components/Stepper/index.js +2 -0
- package/dist/esm/components/Strip/Strip.d.ts +64 -0
- package/dist/esm/components/Strip/Strip.js +50 -0
- package/dist/esm/components/Strip/Strip.stories.d.ts +12 -0
- package/dist/esm/components/Strip/Strip.stories.js +123 -0
- package/dist/esm/components/Strip/Strip.test.d.ts +1 -0
- package/dist/esm/components/Strip/index.d.ts +2 -0
- package/dist/esm/components/Strip/index.js +1 -0
- package/dist/esm/components/SummaryButton/SummaryButton.d.ts +29 -0
- package/dist/esm/components/SummaryButton/SummaryButton.js +28 -0
- package/dist/esm/components/SummaryButton/SummaryButton.stories.d.ts +18 -0
- package/dist/esm/components/SummaryButton/SummaryButton.stories.js +52 -0
- package/dist/esm/components/SummaryButton/SummaryButton.test.d.ts +1 -0
- package/dist/esm/components/SummaryButton/index.d.ts +2 -0
- package/dist/esm/components/SummaryButton/index.js +1 -0
- package/dist/esm/components/Switch/Switch.d.ts +17 -0
- package/dist/esm/components/Switch/Switch.js +28 -0
- package/dist/esm/components/Switch/Switch.stories.d.ts +7 -0
- package/dist/esm/components/Switch/Switch.stories.js +19 -0
- package/dist/esm/components/Switch/Switch.test.d.ts +1 -0
- package/dist/esm/components/Switch/index.d.ts +2 -0
- package/dist/esm/components/Switch/index.js +1 -0
- package/dist/esm/components/Table/Table.d.ts +22 -0
- package/dist/esm/components/Table/Table.js +23 -0
- package/dist/esm/components/Table/Table.test.d.ts +1 -0
- package/dist/esm/components/Table/index.d.ts +2 -0
- package/dist/esm/components/Table/index.js +1 -0
- package/dist/esm/components/TableCell/TableCell.d.ts +26 -0
- package/dist/esm/components/TableCell/TableCell.js +26 -0
- package/dist/esm/components/TableCell/TableCell.test.d.ts +1 -0
- package/dist/esm/components/TableCell/index.d.ts +2 -0
- package/dist/esm/components/TableCell/index.js +1 -0
- package/dist/esm/components/TableHeader/TableHeader.d.ts +14 -0
- package/dist/esm/components/TableHeader/TableHeader.js +17 -0
- package/dist/esm/components/TableHeader/TableHeader.test.d.ts +1 -0
- package/dist/esm/components/TableHeader/index.d.ts +2 -0
- package/dist/esm/components/TableHeader/index.js +1 -0
- package/dist/esm/components/TablePagination/TablePagination.d.ts +98 -0
- package/dist/esm/components/TablePagination/TablePagination.js +104 -0
- package/dist/esm/components/TablePagination/TablePagination.scss +48 -0
- package/dist/esm/components/TablePagination/TablePagination.stories.d.ts +14 -0
- package/dist/esm/components/TablePagination/TablePagination.stories.js +323 -0
- package/dist/esm/components/TablePagination/TablePagination.test.d.ts +1 -0
- package/dist/esm/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +24 -0
- package/dist/esm/components/TablePagination/TablePaginationControls/TablePaginationControls.js +120 -0
- package/dist/esm/components/TablePagination/TablePaginationControls/TablePaginationControls.test.d.ts +1 -0
- package/dist/esm/components/TablePagination/TablePaginationControls/index.d.ts +2 -0
- package/dist/esm/components/TablePagination/TablePaginationControls/index.js +1 -0
- package/dist/esm/components/TablePagination/index.d.ts +2 -0
- package/dist/esm/components/TablePagination/index.js +1 -0
- package/dist/esm/components/TablePagination/utils.d.ts +27 -0
- package/dist/esm/components/TablePagination/utils.js +67 -0
- package/dist/esm/components/TableRow/TableRow.d.ts +10 -0
- package/dist/esm/components/TableRow/TableRow.js +15 -0
- package/dist/esm/components/TableRow/TableRow.test.d.ts +1 -0
- package/dist/esm/components/TableRow/index.d.ts +2 -0
- package/dist/esm/components/TableRow/index.js +1 -0
- package/dist/esm/components/Tabs/Tabs.d.ts +45 -0
- package/dist/esm/components/Tabs/Tabs.js +42 -0
- package/dist/esm/components/Tabs/Tabs.stories.d.ts +11 -0
- package/dist/esm/components/Tabs/Tabs.stories.js +49 -0
- package/dist/esm/components/Tabs/Tabs.test.d.ts +1 -0
- package/dist/esm/components/Tabs/index.d.ts +2 -0
- package/dist/esm/components/Tabs/index.js +1 -0
- package/dist/esm/components/Textarea/Textarea.d.ts +70 -0
- package/dist/esm/components/Textarea/Textarea.js +115 -0
- package/dist/esm/components/Textarea/Textarea.stories.d.ts +7 -0
- package/dist/esm/components/Textarea/Textarea.stories.js +55 -0
- package/dist/esm/components/Textarea/Textarea.test.d.ts +1 -0
- package/dist/esm/components/Textarea/index.d.ts +2 -0
- package/dist/esm/components/Textarea/index.js +1 -0
- package/dist/esm/components/Tooltip/Tooltip.d.ts +75 -0
- package/dist/esm/components/Tooltip/Tooltip.js +245 -0
- package/dist/esm/components/Tooltip/Tooltip.stories.d.ts +12 -0
- package/dist/esm/components/Tooltip/Tooltip.stories.js +62 -0
- package/dist/esm/components/Tooltip/Tooltip.test.d.ts +1 -0
- package/dist/esm/components/Tooltip/index.d.ts +2 -0
- package/dist/esm/components/Tooltip/index.js +1 -0
- package/dist/esm/enums.d.ts +13 -0
- package/dist/esm/enums.js +8 -0
- package/dist/esm/hooks/index.d.ts +9 -0
- package/dist/esm/hooks/index.js +8 -0
- package/dist/esm/hooks/useId.d.ts +4 -0
- package/dist/esm/hooks/useId.js +13 -0
- package/dist/esm/hooks/useListener.d.ts +11 -0
- package/dist/esm/hooks/useListener.js +51 -0
- package/dist/esm/hooks/useListener.test.d.ts +1 -0
- package/dist/esm/hooks/useOnClickOutside.d.ts +12 -0
- package/dist/esm/hooks/useOnClickOutside.js +38 -0
- package/dist/esm/hooks/useOnClickOutside.test.d.ts +1 -0
- package/dist/esm/hooks/useOnEscapePressed.d.ts +6 -0
- package/dist/esm/hooks/useOnEscapePressed.js +25 -0
- package/dist/esm/hooks/useOnEscapePressed.test.d.ts +1 -0
- package/dist/esm/hooks/usePagination.d.ts +19 -0
- package/dist/esm/hooks/usePagination.js +45 -0
- package/dist/esm/hooks/usePagination.test.d.ts +1 -0
- package/dist/esm/hooks/usePrevious.d.ts +7 -0
- package/dist/esm/hooks/usePrevious.js +16 -0
- package/dist/esm/hooks/usePrevious.test.d.ts +1 -0
- package/dist/esm/hooks/useThrottle.d.ts +9 -0
- package/dist/esm/hooks/useThrottle.js +49 -0
- package/dist/esm/hooks/useThrottle.test.d.ts +1 -0
- package/dist/esm/hooks/useWindowFitment.d.ts +54 -0
- package/dist/esm/hooks/useWindowFitment.js +109 -0
- package/dist/esm/hooks/useWindowFitment.test.d.ts +1 -0
- package/dist/esm/index.d.ts +138 -0
- package/dist/esm/index.js +72 -0
- package/dist/esm/index.test.d.ts +1 -0
- package/dist/esm/setupTests.js +1 -0
- package/dist/esm/testing/mock-scss.js +2 -0
- package/dist/esm/types/index.d.ts +38 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/types/react-table-config.d.js +1 -0
- package/dist/esm/utils.d.ts +27 -0
- package/dist/esm/utils.js +41 -0
- package/dist/esm/utils.test.d.ts +1 -0
- package/dist/hooks/useListener.test.d.ts +1 -0
- package/dist/hooks/useOnClickOutside.test.d.ts +1 -0
- package/dist/hooks/useOnEscapePressed.test.d.ts +1 -0
- package/dist/hooks/usePagination.test.d.ts +1 -0
- package/dist/hooks/usePrevious.test.d.ts +1 -0
- package/dist/hooks/useThrottle.test.d.ts +1 -0
- package/dist/hooks/useWindowFitment.test.d.ts +1 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/utils.test.d.ts +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1,7 @@
|
|
|
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;
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Tooltip from "./Tooltip";
|
|
3
|
+
declare const meta: Meta<typeof Tooltip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Tooltip>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const FollowMouse: Story;
|
|
8
|
+
/**
|
|
9
|
+
* The tooltip elements are displayed inside a [Portal](https://reactjs.org/docs/portals.html) so that the tooltip is not constrained by its current position in the DOM.
|
|
10
|
+
* Sometimes however, you need to target the tooltip elements. This can be achieved by passing class names to the tooltip elements. You can also pass classes to the elements that trigger and position the tooltip.
|
|
11
|
+
*/
|
|
12
|
+
export declare const TargetingElements: Story;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.TargetingElements = exports.FollowMouse = exports.Default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Button = _interopRequireDefault(require("../Button"));
|
|
9
|
+
var _Tooltip = _interopRequireWildcard(require("./Tooltip"));
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const Template = args => {
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
15
|
+
style: {
|
|
16
|
+
display: "flex",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
padding: "3rem"
|
|
19
|
+
}
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, args, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
21
|
+
className: "u-no-margin--bottom"
|
|
22
|
+
}, "Hover over me!")));
|
|
23
|
+
};
|
|
24
|
+
const meta = {
|
|
25
|
+
component: _Tooltip.default,
|
|
26
|
+
render: Template,
|
|
27
|
+
tags: ["autodocs"],
|
|
28
|
+
argTypes: {
|
|
29
|
+
position: {
|
|
30
|
+
control: {
|
|
31
|
+
type: "radio"
|
|
32
|
+
},
|
|
33
|
+
options: Object.values(_Tooltip.position)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var _default = exports.default = meta;
|
|
38
|
+
const Default = exports.Default = {
|
|
39
|
+
render: Template.bind({}),
|
|
40
|
+
name: "Default",
|
|
41
|
+
args: {
|
|
42
|
+
message: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "Tooltip", " ", /*#__PURE__*/_react.default.createElement("a", {
|
|
43
|
+
href: "#todo",
|
|
44
|
+
target: "_blank"
|
|
45
|
+
}, "Link1"))
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const FollowMouse = exports.FollowMouse = {
|
|
49
|
+
render: Template.bind({}),
|
|
50
|
+
name: "Follow mouse",
|
|
51
|
+
args: {
|
|
52
|
+
followMouse: true,
|
|
53
|
+
message: "Tooltip message to display.",
|
|
54
|
+
position: "top-center"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The tooltip elements are displayed inside a [Portal](https://reactjs.org/docs/portals.html) so that the tooltip is not constrained by its current position in the DOM.
|
|
60
|
+
* Sometimes however, you need to target the tooltip elements. This can be achieved by passing class names to the tooltip elements. You can also pass classes to the elements that trigger and position the tooltip.
|
|
61
|
+
*/
|
|
62
|
+
const TargetingElements = exports.TargetingElements = {
|
|
63
|
+
render: Template.bind({}),
|
|
64
|
+
name: "Targeting elements",
|
|
65
|
+
args: {
|
|
66
|
+
className: "custom-wrapping-class",
|
|
67
|
+
positionElementClassName: "custom-position-class",
|
|
68
|
+
tooltipClassName: "custom-tooltip-class",
|
|
69
|
+
message: "Tooltip message to display."
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { HTMLProps } from "react";
|
|
2
|
+
import type { AccordionHeadings, AccordionSectionProps } from "./AccordionSection";
|
|
3
|
+
import type { ClassName, PropsWithSpread } from "../../types";
|
|
4
|
+
export type Section = AccordionSectionProps & {
|
|
5
|
+
/**
|
|
6
|
+
* An optional key for the section component. It will also be
|
|
7
|
+
* used to track which section is selected.
|
|
8
|
+
*/
|
|
9
|
+
key?: string | number;
|
|
10
|
+
};
|
|
11
|
+
export type Props = PropsWithSpread<{
|
|
12
|
+
/**
|
|
13
|
+
* Optional classes applied to the parent element.
|
|
14
|
+
*/
|
|
15
|
+
className?: ClassName;
|
|
16
|
+
/**
|
|
17
|
+
* An optional value to set the expanded section. The value must match a
|
|
18
|
+
* section key. This value will only set the expanded section on first render
|
|
19
|
+
* if externallyControlled is not set to `true`.
|
|
20
|
+
*/
|
|
21
|
+
expanded?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the expanded section will be controlled via external state.
|
|
24
|
+
*/
|
|
25
|
+
externallyControlled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Optional function that is called when the expanded section is changed.
|
|
28
|
+
* The function is provided the section title or null.
|
|
29
|
+
*/
|
|
30
|
+
onExpandedChange?: (id: string, title: string) => void;
|
|
31
|
+
/**
|
|
32
|
+
* An array of sections and content.
|
|
33
|
+
*/
|
|
34
|
+
sections: Section[];
|
|
35
|
+
/**
|
|
36
|
+
* Optional string describing heading element that should be used for the section titles.
|
|
37
|
+
*/
|
|
38
|
+
titleElement?: AccordionHeadings;
|
|
39
|
+
}, HTMLProps<HTMLElement>>;
|
|
40
|
+
/**
|
|
41
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Accordion](https://docs.vanillaframework.io/patterns/accordion/).
|
|
42
|
+
*
|
|
43
|
+
* The sidebar accordion, used in listing pages or as navigation, can hold multiple navigation items or to be used as a filter for content.
|
|
44
|
+
*/
|
|
45
|
+
declare const Accordion: ({ className, expanded, externallyControlled, onExpandedChange, sections, titleElement, ...asideProps }: Props) => JSX.Element;
|
|
46
|
+
export default Accordion;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var _excluded = ["key"],
|
|
2
|
+
_excluded2 = ["className", "expanded", "externallyControlled", "onExpandedChange", "sections", "titleElement"];
|
|
3
|
+
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); }
|
|
4
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
5
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
import React, { useState } from "react";
|
|
8
|
+
import AccordionSection from "./AccordionSection";
|
|
9
|
+
var generateSections = (sections, setExpanded, expanded, titleElement) => sections.map((_ref, i) => {
|
|
10
|
+
var {
|
|
11
|
+
key
|
|
12
|
+
} = _ref,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
return /*#__PURE__*/React.createElement(AccordionSection, _extends({
|
|
15
|
+
expanded: expanded,
|
|
16
|
+
key: key || i,
|
|
17
|
+
sectionKey: key === null || key === void 0 ? void 0 : key.toString(),
|
|
18
|
+
setExpanded: setExpanded,
|
|
19
|
+
titleElement: titleElement
|
|
20
|
+
}, props));
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Accordion](https://docs.vanillaframework.io/patterns/accordion/).
|
|
25
|
+
*
|
|
26
|
+
* The sidebar accordion, used in listing pages or as navigation, can hold multiple navigation items or to be used as a filter for content.
|
|
27
|
+
*/
|
|
28
|
+
var Accordion = _ref2 => {
|
|
29
|
+
var {
|
|
30
|
+
className,
|
|
31
|
+
expanded,
|
|
32
|
+
externallyControlled,
|
|
33
|
+
onExpandedChange,
|
|
34
|
+
sections,
|
|
35
|
+
titleElement
|
|
36
|
+
} = _ref2,
|
|
37
|
+
asideProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
38
|
+
var [expandedSection, setExpandedSection] = useState(expanded);
|
|
39
|
+
var setExpanded = (id, title) => {
|
|
40
|
+
setExpandedSection(id);
|
|
41
|
+
onExpandedChange && onExpandedChange(id, title);
|
|
42
|
+
};
|
|
43
|
+
return /*#__PURE__*/React.createElement("aside", _extends({
|
|
44
|
+
className: classNames(className, "p-accordion")
|
|
45
|
+
}, asideProps, {
|
|
46
|
+
role: "tablist",
|
|
47
|
+
"aria-multiselectable": "true"
|
|
48
|
+
}), /*#__PURE__*/React.createElement("ul", {
|
|
49
|
+
className: "p-accordion__list"
|
|
50
|
+
}, generateSections(sections, setExpanded, externallyControlled ? expanded : expandedSection, titleElement)));
|
|
51
|
+
};
|
|
52
|
+
export default Accordion;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Accordion from "./Accordion";
|
|
3
|
+
declare const meta: Meta<typeof Accordion>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Accordion>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
/**
|
|
8
|
+
* The expanded accordion section can be controlled by external state.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ExternalState: Story;
|
|
11
|
+
/**
|
|
12
|
+
* `titleElement` prop can be used to define heading element for section titles.
|
|
13
|
+
*/
|
|
14
|
+
export declare const Headings: Story;
|
|
15
|
+
/**
|
|
16
|
+
* The `title` prop can be a `ReactNode`, allowing a higher degree of customisation of the section titles.
|
|
17
|
+
*/
|
|
18
|
+
export declare const CustomHeadings: Story;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Accordion from "./Accordion";
|
|
4
|
+
var meta = {
|
|
5
|
+
component: Accordion,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
argTypes: {
|
|
8
|
+
sections: {
|
|
9
|
+
control: {
|
|
10
|
+
disable: true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
externallyControlled: {
|
|
14
|
+
control: {
|
|
15
|
+
disable: true
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
export var Default = {
|
|
22
|
+
name: "Default",
|
|
23
|
+
args: {
|
|
24
|
+
sections: [{
|
|
25
|
+
title: "Advanced topics",
|
|
26
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Charm bundles"), /*#__PURE__*/React.createElement("p", null, "Machine authentication"), /*#__PURE__*/React.createElement("p", null, "Migrating models"), /*#__PURE__*/React.createElement("p", null, "Using storage"), /*#__PURE__*/React.createElement("p", null, "Working with actions"), /*#__PURE__*/React.createElement("p", null, "Working with resources"), /*#__PURE__*/React.createElement("p", null, "Cloud image metadata"), /*#__PURE__*/React.createElement("p", null, "Tools"))
|
|
27
|
+
}, {
|
|
28
|
+
title: "Networking",
|
|
29
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Working offline"), /*#__PURE__*/React.createElement("p", null, "Fan container networking"), /*#__PURE__*/React.createElement("p", null, "Network spaces"))
|
|
30
|
+
}, {
|
|
31
|
+
title: "Miscellaneous",
|
|
32
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Juju GUI"), /*#__PURE__*/React.createElement("p", null, "CentOS support"), /*#__PURE__*/React.createElement("p", null, "Collecting Juju metrics"))
|
|
33
|
+
}]
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The expanded accordion section can be controlled by external state.
|
|
39
|
+
*/
|
|
40
|
+
export var ExternalState = {
|
|
41
|
+
render: () => {
|
|
42
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
43
|
+
var [expandedSection, setExpandedSection] = useState();
|
|
44
|
+
return /*#__PURE__*/React.createElement(Accordion, {
|
|
45
|
+
expanded: expandedSection,
|
|
46
|
+
externallyControlled: true,
|
|
47
|
+
onExpandedChange: setExpandedSection,
|
|
48
|
+
sections: [{
|
|
49
|
+
title: "Advanced topics",
|
|
50
|
+
key: "advanced-topics",
|
|
51
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Charm bundles"), /*#__PURE__*/React.createElement("p", null, "Machine authentication"), /*#__PURE__*/React.createElement("p", null, "Migrating models"), /*#__PURE__*/React.createElement("p", null, "Using storage"), /*#__PURE__*/React.createElement("p", null, "Working with actions"), /*#__PURE__*/React.createElement("p", null, "Working with resources"), /*#__PURE__*/React.createElement("p", null, "Cloud image metadata"), /*#__PURE__*/React.createElement("p", null, "Tools"))
|
|
52
|
+
}, {
|
|
53
|
+
title: "Networking",
|
|
54
|
+
key: "networking",
|
|
55
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Working offline"), /*#__PURE__*/React.createElement("p", null, "Fan container networking"), /*#__PURE__*/React.createElement("p", null, "Network spaces"))
|
|
56
|
+
}, {
|
|
57
|
+
title: "Miscellaneous",
|
|
58
|
+
key: "miscellaneous",
|
|
59
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Juju GUI"), /*#__PURE__*/React.createElement("p", null, "CentOS support"), /*#__PURE__*/React.createElement("p", null, "Collecting Juju metrics"))
|
|
60
|
+
}]
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
name: "External state"
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* `titleElement` prop can be used to define heading element for section titles.
|
|
68
|
+
*/
|
|
69
|
+
export var Headings = {
|
|
70
|
+
name: "Headings",
|
|
71
|
+
args: {
|
|
72
|
+
sections: [{
|
|
73
|
+
title: "Advanced topics",
|
|
74
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Charm bundles"), /*#__PURE__*/React.createElement("p", null, "Machine authentication"), /*#__PURE__*/React.createElement("p", null, "Migrating models"), /*#__PURE__*/React.createElement("p", null, "Using storage"), /*#__PURE__*/React.createElement("p", null, "Working with actions"), /*#__PURE__*/React.createElement("p", null, "Working with resources"), /*#__PURE__*/React.createElement("p", null, "Cloud image metadata"), /*#__PURE__*/React.createElement("p", null, "Tools"))
|
|
75
|
+
}, {
|
|
76
|
+
title: "Networking",
|
|
77
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Working offline"), /*#__PURE__*/React.createElement("p", null, "Fan container networking"), /*#__PURE__*/React.createElement("p", null, "Network spaces"))
|
|
78
|
+
}, {
|
|
79
|
+
title: "Miscellaneous",
|
|
80
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Juju GUI"), /*#__PURE__*/React.createElement("p", null, "CentOS support"), /*#__PURE__*/React.createElement("p", null, "Collecting Juju metrics"))
|
|
81
|
+
}],
|
|
82
|
+
titleElement: "h3"
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The `title` prop can be a `ReactNode`, allowing a higher degree of customisation of the section titles.
|
|
88
|
+
*/
|
|
89
|
+
export var CustomHeadings = {
|
|
90
|
+
args: {
|
|
91
|
+
sections: [{
|
|
92
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, "Advanced topics", " ", /*#__PURE__*/React.createElement("span", {
|
|
93
|
+
className: "u-text--muted p-text--small"
|
|
94
|
+
}, "optional")),
|
|
95
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Charm bundles"), /*#__PURE__*/React.createElement("p", null, "Machine authentication"), /*#__PURE__*/React.createElement("p", null, "Migrating models"), /*#__PURE__*/React.createElement("p", null, "Using storage"), /*#__PURE__*/React.createElement("p", null, "Working with actions"), /*#__PURE__*/React.createElement("p", null, "Working with resources"), /*#__PURE__*/React.createElement("p", null, "Cloud image metadata"), /*#__PURE__*/React.createElement("p", null, "Tools"))
|
|
96
|
+
}, {
|
|
97
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, "Networking", " ", /*#__PURE__*/React.createElement("span", {
|
|
98
|
+
className: "u-text--muted p-text--small"
|
|
99
|
+
}, "optional")),
|
|
100
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Working offline"), /*#__PURE__*/React.createElement("p", null, "Fan container networking"), /*#__PURE__*/React.createElement("p", null, "Network spaces"))
|
|
101
|
+
}, {
|
|
102
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, "Miscellaneous", " ", /*#__PURE__*/React.createElement("span", {
|
|
103
|
+
className: "u-text--muted p-text--small"
|
|
104
|
+
}, "optional")),
|
|
105
|
+
content: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, "Juju GUI"), /*#__PURE__*/React.createElement("p", null, "CentOS support"), /*#__PURE__*/React.createElement("p", null, "Collecting Juju metrics"))
|
|
106
|
+
}],
|
|
107
|
+
titleElement: "h3"
|
|
108
|
+
}
|
|
109
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { Headings } from "../../../types";
|
|
3
|
+
export type AccordionHeadings = Exclude<Headings, "h1">;
|
|
4
|
+
export type Props = {
|
|
5
|
+
/**
|
|
6
|
+
* The content of the section.
|
|
7
|
+
*/
|
|
8
|
+
content?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* An optional value to set the expanded section. The value must match a
|
|
11
|
+
* section key.
|
|
12
|
+
*/
|
|
13
|
+
expanded?: string | null;
|
|
14
|
+
headingLevel?: number;
|
|
15
|
+
/**
|
|
16
|
+
* An optional click event when the title is clicked.
|
|
17
|
+
*/
|
|
18
|
+
onTitleClick?: (expanded: boolean, key: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* An optional key to be used to track which section is selected.
|
|
21
|
+
*/
|
|
22
|
+
sectionKey?: string;
|
|
23
|
+
setExpanded?: (key: string | null, title: ReactNode | null) => void;
|
|
24
|
+
/**
|
|
25
|
+
* The title of the section.
|
|
26
|
+
*/
|
|
27
|
+
title?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Optional string describing heading element that should be used for the section titles.
|
|
30
|
+
*/
|
|
31
|
+
titleElement?: AccordionHeadings;
|
|
32
|
+
};
|
|
33
|
+
declare const AccordionSection: ({ content, expanded, onTitleClick, sectionKey, setExpanded, title, titleElement, headingLevel, }: Props) => JSX.Element;
|
|
34
|
+
export default AccordionSection;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { useId } from "react";
|
|
2
|
+
var AccordionSection = _ref => {
|
|
3
|
+
var {
|
|
4
|
+
content,
|
|
5
|
+
expanded,
|
|
6
|
+
onTitleClick,
|
|
7
|
+
sectionKey,
|
|
8
|
+
setExpanded,
|
|
9
|
+
title,
|
|
10
|
+
titleElement,
|
|
11
|
+
headingLevel = 3
|
|
12
|
+
} = _ref;
|
|
13
|
+
var sectionId = useId();
|
|
14
|
+
var tabId = useId();
|
|
15
|
+
var key = sectionKey || sectionId;
|
|
16
|
+
var isExpanded = expanded === key;
|
|
17
|
+
var Title = titleElement || "div";
|
|
18
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
19
|
+
className: "p-accordion__group"
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Title, {
|
|
21
|
+
role: titleElement ? null : "heading",
|
|
22
|
+
"aria-level": titleElement ? null : headingLevel,
|
|
23
|
+
className: "p-accordion__heading"
|
|
24
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
25
|
+
"aria-controls": "#".concat(sectionId),
|
|
26
|
+
"aria-expanded": isExpanded ? "true" : "false",
|
|
27
|
+
className: "p-accordion__tab",
|
|
28
|
+
id: tabId,
|
|
29
|
+
onClick: () => {
|
|
30
|
+
if (isExpanded) {
|
|
31
|
+
setExpanded(null, null);
|
|
32
|
+
} else {
|
|
33
|
+
setExpanded(key, title);
|
|
34
|
+
}
|
|
35
|
+
onTitleClick && onTitleClick(!isExpanded, key);
|
|
36
|
+
},
|
|
37
|
+
role: "tab",
|
|
38
|
+
type: "button"
|
|
39
|
+
}, title)), /*#__PURE__*/React.createElement("section", {
|
|
40
|
+
"aria-hidden": isExpanded ? "false" : "true",
|
|
41
|
+
"aria-labelledby": tabId,
|
|
42
|
+
className: "p-accordion__panel",
|
|
43
|
+
id: sectionId,
|
|
44
|
+
role: "tabpanel"
|
|
45
|
+
}, content));
|
|
46
|
+
};
|
|
47
|
+
export default AccordionSection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./AccordionSection";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Accordion";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { ButtonProps } from "../Button";
|
|
3
|
+
import type { ClassName, PropsWithSpread } from "../../types";
|
|
4
|
+
export declare const LOADER_MIN_DURATION = 400;
|
|
5
|
+
export declare const SUCCESS_DURATION = 2000;
|
|
6
|
+
export declare enum Label {
|
|
7
|
+
WAITING = "Waiting for action to complete",
|
|
8
|
+
SUCCESS = "Action completed"
|
|
9
|
+
}
|
|
10
|
+
export type Props = PropsWithSpread<{
|
|
11
|
+
/**
|
|
12
|
+
* The appearance of the button.
|
|
13
|
+
*/
|
|
14
|
+
appearance?: ButtonProps["appearance"];
|
|
15
|
+
/**
|
|
16
|
+
* The content of the button.
|
|
17
|
+
*/
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Optional class(es) to pass to the button element.
|
|
21
|
+
*/
|
|
22
|
+
className?: ClassName;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the button should be disabled.
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the button should display inline.
|
|
29
|
+
*/
|
|
30
|
+
inline?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the button should be in the loading state.
|
|
33
|
+
*/
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the button should be in the success state.
|
|
37
|
+
*/
|
|
38
|
+
success?: boolean;
|
|
39
|
+
}, ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
40
|
+
/**
|
|
41
|
+
* This is a not an existing Vanilla component. It can be used to display submitting states for forms or other actions.
|
|
42
|
+
*
|
|
43
|
+
* ActionButton accepts the props from
|
|
44
|
+
* [Button](?path=/docs/components-button--docs) in addition to those in the
|
|
45
|
+
* props table:
|
|
46
|
+
*/
|
|
47
|
+
declare const ActionButton: ({ appearance, children, className, disabled, inline, loading, success, ...buttonProps }: Props) => JSX.Element;
|
|
48
|
+
export default ActionButton;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var _excluded = ["appearance", "children", "className", "disabled", "inline", "loading", "success"];
|
|
2
|
+
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); }
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
import classNames from "classnames";
|
|
6
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
7
|
+
import Icon from "../Icon";
|
|
8
|
+
export var LOADER_MIN_DURATION = 400; // minimium duration (ms) loader displays
|
|
9
|
+
export var SUCCESS_DURATION = 2000; // duration (ms) success tick is displayed
|
|
10
|
+
|
|
11
|
+
export var Label = /*#__PURE__*/function (Label) {
|
|
12
|
+
Label["WAITING"] = "Waiting for action to complete";
|
|
13
|
+
Label["SUCCESS"] = "Action completed";
|
|
14
|
+
return Label;
|
|
15
|
+
}({});
|
|
16
|
+
/**
|
|
17
|
+
* This is a not an existing Vanilla component. It can be used to display submitting states for forms or other actions.
|
|
18
|
+
*
|
|
19
|
+
* ActionButton accepts the props from
|
|
20
|
+
* [Button](?path=/docs/components-button--docs) in addition to those in the
|
|
21
|
+
* props table:
|
|
22
|
+
*/
|
|
23
|
+
var ActionButton = _ref => {
|
|
24
|
+
var {
|
|
25
|
+
appearance,
|
|
26
|
+
children,
|
|
27
|
+
className,
|
|
28
|
+
disabled = false,
|
|
29
|
+
inline = false,
|
|
30
|
+
loading = false,
|
|
31
|
+
success = false
|
|
32
|
+
} = _ref,
|
|
33
|
+
buttonProps = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
+
var [height, setHeight] = useState();
|
|
35
|
+
var [width, setWidth] = useState();
|
|
36
|
+
var [showLoader, setShowLoader] = useState(false);
|
|
37
|
+
var [showSuccess, setShowSuccess] = useState(false);
|
|
38
|
+
var ref = useRef(null);
|
|
39
|
+
|
|
40
|
+
// Set up loader timer
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
var loaderTimeout;
|
|
43
|
+
if (loading) {
|
|
44
|
+
// Explicitly set button dimensions
|
|
45
|
+
if (ref.current && !!ref.current.getBoundingClientRect()) {
|
|
46
|
+
setHeight(ref.current.getBoundingClientRect().height);
|
|
47
|
+
setWidth(ref.current.getBoundingClientRect().width);
|
|
48
|
+
}
|
|
49
|
+
setShowLoader(true);
|
|
50
|
+
}
|
|
51
|
+
if (!loading && showLoader) {
|
|
52
|
+
loaderTimeout = window.setTimeout(() => {
|
|
53
|
+
setShowLoader(false);
|
|
54
|
+
if (success) {
|
|
55
|
+
setShowSuccess(true);
|
|
56
|
+
}
|
|
57
|
+
}, LOADER_MIN_DURATION);
|
|
58
|
+
}
|
|
59
|
+
if (!loading && !showLoader) {
|
|
60
|
+
setHeight(null);
|
|
61
|
+
setWidth(null);
|
|
62
|
+
}
|
|
63
|
+
return () => window.clearTimeout(loaderTimeout);
|
|
64
|
+
}, [loading, showLoader, success]);
|
|
65
|
+
|
|
66
|
+
// Set up success timer
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
var successTimeout;
|
|
69
|
+
if (showSuccess) {
|
|
70
|
+
successTimeout = window.setTimeout(() => {
|
|
71
|
+
setHeight(null);
|
|
72
|
+
setWidth(null);
|
|
73
|
+
setShowSuccess(false);
|
|
74
|
+
}, SUCCESS_DURATION);
|
|
75
|
+
}
|
|
76
|
+
return () => window.clearTimeout(successTimeout);
|
|
77
|
+
}, [showSuccess]);
|
|
78
|
+
var buttonClasses = classNames(className, "p-action-button", appearance ? "p-button--".concat(appearance) : "p-button", {
|
|
79
|
+
"is-processing": showLoader || showSuccess,
|
|
80
|
+
"is-disabled": disabled,
|
|
81
|
+
"is-inline": inline
|
|
82
|
+
});
|
|
83
|
+
var showIcon = showLoader || showSuccess;
|
|
84
|
+
var icon = showLoader && "spinner" || showSuccess && "success" || null;
|
|
85
|
+
var iconLight = appearance === "positive" || appearance === "negative";
|
|
86
|
+
|
|
87
|
+
// This component uses the base button element instead of the Button component
|
|
88
|
+
// as the button requires a ref and Button would have to be updated to use
|
|
89
|
+
// forwardRef which is not currently supported by components that use
|
|
90
|
+
// typescript generics.
|
|
91
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
92
|
+
className: buttonClasses,
|
|
93
|
+
disabled: disabled,
|
|
94
|
+
ref: ref,
|
|
95
|
+
style: height && width ? {
|
|
96
|
+
height: "".concat(height, "px"),
|
|
97
|
+
width: "".concat(width, "px")
|
|
98
|
+
} : undefined
|
|
99
|
+
}, buttonProps), showIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
100
|
+
"aria-label": showLoader ? Label.WAITING : Label.SUCCESS,
|
|
101
|
+
className: showLoader ? "u-animation--spin" : null,
|
|
102
|
+
light: iconLight,
|
|
103
|
+
name: icon
|
|
104
|
+
}) : children);
|
|
105
|
+
};
|
|
106
|
+
export default ActionButton;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import ActionButton from "./ActionButton";
|
|
3
|
+
declare const meta: Meta<typeof ActionButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ActionButton>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Loading: Story;
|