@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,35 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { ValueOf } from "../../types";
|
|
3
|
+
import { NotificationSeverity } from "../Notification";
|
|
4
|
+
export interface NotifyProviderProps {
|
|
5
|
+
state?: {
|
|
6
|
+
queuedNotification: NotificationType | null;
|
|
7
|
+
};
|
|
8
|
+
pathname?: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface NotificationAction {
|
|
12
|
+
label: string;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface NotificationType {
|
|
16
|
+
actions?: NotificationAction[];
|
|
17
|
+
message: ReactNode;
|
|
18
|
+
title?: string;
|
|
19
|
+
type: ValueOf<typeof NotificationSeverity>;
|
|
20
|
+
}
|
|
21
|
+
export interface QueuedNotification {
|
|
22
|
+
state?: {
|
|
23
|
+
queuedNotification: NotificationType | null;
|
|
24
|
+
};
|
|
25
|
+
pathname?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface NotificationHelper {
|
|
28
|
+
notification: NotificationType | null;
|
|
29
|
+
clear: () => void;
|
|
30
|
+
failure: (title: string, error: unknown, message?: ReactNode, actions?: NotificationAction[]) => NotificationType;
|
|
31
|
+
info: (message: ReactNode, title?: string) => NotificationType;
|
|
32
|
+
success: (message: ReactNode, title?: string) => NotificationType;
|
|
33
|
+
queue: (notification: NotificationType) => QueuedNotification;
|
|
34
|
+
setDeduplicated: (value: NotificationType) => NotificationType;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { HTMLProps } from "react";
|
|
2
|
+
import type { PropsWithSpread } from "../../types";
|
|
3
|
+
type BaseProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Whether to scroll to the top of the list on page change.
|
|
6
|
+
*/
|
|
7
|
+
scrollToTop?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The number of pages at which to truncate the pagination items.
|
|
10
|
+
*/
|
|
11
|
+
truncateThreshold?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the pagination is ceneterd on the page.
|
|
14
|
+
*/
|
|
15
|
+
centered?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to show the labels for forward and back buttons.
|
|
18
|
+
*/
|
|
19
|
+
showLabels?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether forward button is disabled.
|
|
22
|
+
*/
|
|
23
|
+
forwardDisabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether back button is disabled.
|
|
26
|
+
*/
|
|
27
|
+
backDisabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Custom label for forward button.
|
|
30
|
+
*/
|
|
31
|
+
forwardLabel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Custom label for back button.
|
|
34
|
+
*/
|
|
35
|
+
backLabel?: string;
|
|
36
|
+
};
|
|
37
|
+
type NumberedPagination = BaseProps & {
|
|
38
|
+
/**
|
|
39
|
+
* The current page being viewed.<br>
|
|
40
|
+
* **Required for Numbered Pagination.**
|
|
41
|
+
*/
|
|
42
|
+
currentPage: number;
|
|
43
|
+
/**
|
|
44
|
+
* The number of items to show per page.<br>
|
|
45
|
+
* **Required for numbered pagination.**
|
|
46
|
+
*/
|
|
47
|
+
itemsPerPage: number;
|
|
48
|
+
/**
|
|
49
|
+
* Function to handle paginating the items.<br>
|
|
50
|
+
* **Required for numbered pagination.**
|
|
51
|
+
*/
|
|
52
|
+
paginate: (page: number) => void;
|
|
53
|
+
/**
|
|
54
|
+
* The total number of items.<br>
|
|
55
|
+
* **Required for numbered pagination.**
|
|
56
|
+
*/
|
|
57
|
+
totalItems: number;
|
|
58
|
+
/**
|
|
59
|
+
* Whether to hide the pagination items.
|
|
60
|
+
*/
|
|
61
|
+
hideNumbers?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Function to handle page transition to a higher-numbered page for
|
|
64
|
+
* numbered pagination and to next page for buttons-only pagination.<br>
|
|
65
|
+
* _Called with page parameter for numbered pagination and_
|
|
66
|
+
* _with no parameter for buttons-only pagination._<br>
|
|
67
|
+
* **Required for buttons-only pagination.**
|
|
68
|
+
*/
|
|
69
|
+
onForward?: (page: number) => void;
|
|
70
|
+
/**
|
|
71
|
+
* Function to handle page transition to a lower-numbered page for
|
|
72
|
+
* numbered pagination and to next page for buttons-only pagination.<br>
|
|
73
|
+
* _Called with page parameter for numbered pagination and_
|
|
74
|
+
* _with no parameter for buttons-only pagination._<br>
|
|
75
|
+
* **Required for buttons-only pagination.**
|
|
76
|
+
*/
|
|
77
|
+
onBack?: (page: number) => void;
|
|
78
|
+
};
|
|
79
|
+
type ButtonsOnlyPagination = BaseProps & {
|
|
80
|
+
itemsPerPage?: never;
|
|
81
|
+
totalItems?: never;
|
|
82
|
+
currentPage?: never;
|
|
83
|
+
paginate?: never;
|
|
84
|
+
hideNumbers?: never;
|
|
85
|
+
onForward: () => void;
|
|
86
|
+
onBack: () => void;
|
|
87
|
+
};
|
|
88
|
+
export type Props = PropsWithSpread<NumberedPagination | ButtonsOnlyPagination, HTMLProps<HTMLElement>>;
|
|
89
|
+
/**
|
|
90
|
+
This is a [React](https://reactjs.org/) component for the Vanilla [Pagination](https://docs.vanillaframework.io/patterns/pagination/).
|
|
91
|
+
|
|
92
|
+
The pagination component should be used to navigate between pages of content. There are two types of pagination being provided:
|
|
93
|
+
|
|
94
|
+
* **Numbered Pagination:** used when the total number of items is known.<br />
|
|
95
|
+
Depending on the length provided, the pagination component will automatically scale.<br />
|
|
96
|
+
**Required props:** itemsPerPage, totalItems, paginate, currentPage.
|
|
97
|
+
|
|
98
|
+
* **Buttons-only Pagination:** used when the total number of items is unknown.<br />
|
|
99
|
+
**Required props:** onForward, onBack.
|
|
100
|
+
*/
|
|
101
|
+
declare const Pagination: ({ itemsPerPage, totalItems, paginate, currentPage, scrollToTop, truncateThreshold, centered, showLabels, hideNumbers, onForward, onBack, forwardDisabled, backDisabled, forwardLabel, backLabel, ...navProps }: Props) => JSX.Element;
|
|
102
|
+
export default Pagination;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
var _excluded = ["itemsPerPage", "totalItems", "paginate", "currentPage", "scrollToTop", "truncateThreshold", "centered", "showLabels", "hideNumbers", "onForward", "onBack", "forwardDisabled", "backDisabled", "forwardLabel", "backLabel"];
|
|
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 from "react";
|
|
7
|
+
import PaginationButton from "./PaginationButton";
|
|
8
|
+
import PaginationItem from "./PaginationItem";
|
|
9
|
+
var scrollTop = () => window.scrollTo(0, 0);
|
|
10
|
+
var generatePaginationItems = (pageNumbers, currentPage, truncateThreshold, changePage) => {
|
|
11
|
+
var lastPage = pageNumbers.length;
|
|
12
|
+
var truncated = lastPage > truncateThreshold;
|
|
13
|
+
var visiblePages;
|
|
14
|
+
if (truncated) {
|
|
15
|
+
// the default range for pages outside the start and end threshold
|
|
16
|
+
var start = currentPage - 2;
|
|
17
|
+
var end = currentPage + 1;
|
|
18
|
+
// on page 1, also show pages 2, 3 and 4
|
|
19
|
+
if (currentPage === 1) {
|
|
20
|
+
start = 1;
|
|
21
|
+
end = Math.min(lastPage - 1, currentPage + 3);
|
|
22
|
+
}
|
|
23
|
+
// on page 2, show page 1, and also pages 3, and 4
|
|
24
|
+
if (currentPage === 2) {
|
|
25
|
+
start = 1;
|
|
26
|
+
end = Math.min(lastPage - 1, currentPage + 3);
|
|
27
|
+
}
|
|
28
|
+
// on the last page and page before last, also show the 3 previous pages
|
|
29
|
+
if (currentPage === lastPage || currentPage === lastPage - 1) {
|
|
30
|
+
start = Math.max(1, lastPage - 4);
|
|
31
|
+
end = lastPage - 1;
|
|
32
|
+
}
|
|
33
|
+
visiblePages = pageNumbers.slice(start, end);
|
|
34
|
+
} else {
|
|
35
|
+
visiblePages = pageNumbers;
|
|
36
|
+
}
|
|
37
|
+
var items = [];
|
|
38
|
+
if (truncated) {
|
|
39
|
+
// render first in sequence
|
|
40
|
+
items.push( /*#__PURE__*/React.createElement(PaginationItem, {
|
|
41
|
+
key: 1,
|
|
42
|
+
number: 1,
|
|
43
|
+
isActive: currentPage === 1,
|
|
44
|
+
onClick: () => changePage(1)
|
|
45
|
+
}));
|
|
46
|
+
if (!visiblePages.includes(2)) {
|
|
47
|
+
items.push( /*#__PURE__*/React.createElement(PaginationItemSeparator, {
|
|
48
|
+
key: "sep1"
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
items.push(visiblePages.map(number => /*#__PURE__*/React.createElement(PaginationItem, {
|
|
53
|
+
key: number,
|
|
54
|
+
number: number,
|
|
55
|
+
isActive: number === currentPage,
|
|
56
|
+
onClick: () => changePage(number)
|
|
57
|
+
})));
|
|
58
|
+
if (truncated) {
|
|
59
|
+
// render last in sequence
|
|
60
|
+
if (!visiblePages.includes(lastPage - 1)) {
|
|
61
|
+
items.push( /*#__PURE__*/React.createElement(PaginationItemSeparator, {
|
|
62
|
+
key: "sep2"
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
items.push( /*#__PURE__*/React.createElement(PaginationItem, {
|
|
66
|
+
key: lastPage,
|
|
67
|
+
number: lastPage,
|
|
68
|
+
isActive: currentPage === lastPage,
|
|
69
|
+
onClick: () => changePage(lastPage)
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
return items;
|
|
73
|
+
};
|
|
74
|
+
var PaginationItemSeparator = () => /*#__PURE__*/React.createElement("li", {
|
|
75
|
+
className: "p-pagination__item p-pagination__item--truncation"
|
|
76
|
+
}, "\u2026");
|
|
77
|
+
|
|
78
|
+
// Props that are used in both types of paginations.
|
|
79
|
+
|
|
80
|
+
// Used when number of items per page, number of total items,
|
|
81
|
+
// current page and paginate function is defined. Pagination
|
|
82
|
+
// is handled by paginate function and optional onForward and
|
|
83
|
+
// onBack functions.
|
|
84
|
+
|
|
85
|
+
// Used when number of items per page, number of total items,
|
|
86
|
+
// current page and paginate function are undefined.
|
|
87
|
+
// Pagination is handled by onForward and onBack function.
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
This is a [React](https://reactjs.org/) component for the Vanilla [Pagination](https://docs.vanillaframework.io/patterns/pagination/).
|
|
91
|
+
|
|
92
|
+
The pagination component should be used to navigate between pages of content. There are two types of pagination being provided:
|
|
93
|
+
|
|
94
|
+
* **Numbered Pagination:** used when the total number of items is known.<br />
|
|
95
|
+
Depending on the length provided, the pagination component will automatically scale.<br />
|
|
96
|
+
**Required props:** itemsPerPage, totalItems, paginate, currentPage.
|
|
97
|
+
|
|
98
|
+
* **Buttons-only Pagination:** used when the total number of items is unknown.<br />
|
|
99
|
+
**Required props:** onForward, onBack.
|
|
100
|
+
*/
|
|
101
|
+
var Pagination = _ref => {
|
|
102
|
+
var {
|
|
103
|
+
itemsPerPage,
|
|
104
|
+
totalItems,
|
|
105
|
+
paginate,
|
|
106
|
+
currentPage,
|
|
107
|
+
scrollToTop,
|
|
108
|
+
truncateThreshold = 10,
|
|
109
|
+
centered,
|
|
110
|
+
showLabels,
|
|
111
|
+
hideNumbers,
|
|
112
|
+
onForward,
|
|
113
|
+
onBack,
|
|
114
|
+
forwardDisabled,
|
|
115
|
+
backDisabled,
|
|
116
|
+
forwardLabel,
|
|
117
|
+
backLabel
|
|
118
|
+
} = _ref,
|
|
119
|
+
navProps = _objectWithoutProperties(_ref, _excluded);
|
|
120
|
+
var isNumberedPagination = !!itemsPerPage && !!totalItems && !!currentPage && !!paginate;
|
|
121
|
+
var pageNumbers = [];
|
|
122
|
+
if (isNumberedPagination) {
|
|
123
|
+
// return early if no pagination is required
|
|
124
|
+
if (totalItems <= itemsPerPage) {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
for (var i = 1; i <= Math.ceil(totalItems / itemsPerPage); i++) {
|
|
128
|
+
pageNumbers.push(i);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
var changeNumberedPage = page => {
|
|
132
|
+
paginate(page);
|
|
133
|
+
if (page > currentPage) {
|
|
134
|
+
onForward === null || onForward === void 0 || onForward(page);
|
|
135
|
+
}
|
|
136
|
+
if (page < currentPage) {
|
|
137
|
+
onBack === null || onBack === void 0 || onBack(page);
|
|
138
|
+
}
|
|
139
|
+
scrollToTop && scrollTop();
|
|
140
|
+
};
|
|
141
|
+
var changeButtonsOnlyPage = direction => {
|
|
142
|
+
if (direction === "forward") {
|
|
143
|
+
onForward === null || onForward === void 0 || onForward(undefined);
|
|
144
|
+
}
|
|
145
|
+
if (direction === "back") {
|
|
146
|
+
onBack === null || onBack === void 0 || onBack(undefined);
|
|
147
|
+
}
|
|
148
|
+
scrollToTop && scrollTop();
|
|
149
|
+
};
|
|
150
|
+
return /*#__PURE__*/React.createElement("nav", _extends({
|
|
151
|
+
className: "p-pagination",
|
|
152
|
+
"aria-label": "Pagination"
|
|
153
|
+
}, navProps), /*#__PURE__*/React.createElement("ol", {
|
|
154
|
+
className: classNames("p-pagination__items", {
|
|
155
|
+
"u-align--center": centered
|
|
156
|
+
})
|
|
157
|
+
}, /*#__PURE__*/React.createElement(PaginationButton, {
|
|
158
|
+
key: "back",
|
|
159
|
+
direction: "back",
|
|
160
|
+
disabled: backDisabled || currentPage === 1,
|
|
161
|
+
onClick: () => isNumberedPagination ? changeNumberedPage(currentPage - 1) : changeButtonsOnlyPage("back"),
|
|
162
|
+
showLabel: showLabels,
|
|
163
|
+
label: backLabel
|
|
164
|
+
}), isNumberedPagination && !hideNumbers ? generatePaginationItems(pageNumbers, currentPage, truncateThreshold, changeNumberedPage) : null, /*#__PURE__*/React.createElement(PaginationButton, {
|
|
165
|
+
key: "forward",
|
|
166
|
+
direction: "forward",
|
|
167
|
+
disabled: forwardDisabled || currentPage === pageNumbers.length,
|
|
168
|
+
onClick: () => isNumberedPagination ? changeNumberedPage(currentPage + 1) : changeButtonsOnlyPage("forward"),
|
|
169
|
+
showLabel: showLabels,
|
|
170
|
+
label: forwardLabel
|
|
171
|
+
})));
|
|
172
|
+
};
|
|
173
|
+
export default Pagination;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Pagination from "./Pagination";
|
|
3
|
+
declare const meta: Meta<typeof Pagination>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Pagination>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const TruncatedNumberedPagination: Story;
|
|
8
|
+
export declare const DisabledControlsNumberedPagination: Story;
|
|
9
|
+
export declare const CenteredNumberedPagination: Story;
|
|
10
|
+
export declare const DisabledPaginationItemsNumberedPagination: Story;
|
|
11
|
+
export declare const DefaultButtonsOnlyPagination: Story;
|
|
12
|
+
export declare const DefaultButtonLabelsButtonsOnlyPagination: Story;
|
|
13
|
+
export declare const CustomButtonLabelsButtonsOnlyPagination: Story;
|
|
14
|
+
export declare const CenteredButtonsOnlyPagination: Story;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Pagination from "./Pagination";
|
|
3
|
+
var meta = {
|
|
4
|
+
component: Pagination,
|
|
5
|
+
tags: ["autodocs"]
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
export var Default = {
|
|
9
|
+
name: "Default",
|
|
10
|
+
args: {
|
|
11
|
+
itemsPerPage: 20,
|
|
12
|
+
totalItems: 100,
|
|
13
|
+
paginate: () => {},
|
|
14
|
+
currentPage: 3
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export var TruncatedNumberedPagination = {
|
|
18
|
+
render: () => /*#__PURE__*/React.createElement(Pagination, {
|
|
19
|
+
itemsPerPage: 10,
|
|
20
|
+
totalItems: 1000,
|
|
21
|
+
paginate: () => {},
|
|
22
|
+
currentPage: 34
|
|
23
|
+
}),
|
|
24
|
+
name: "Truncated (Numbered Pagination)"
|
|
25
|
+
};
|
|
26
|
+
export var DisabledControlsNumberedPagination = {
|
|
27
|
+
render: () => /*#__PURE__*/React.createElement(Pagination, {
|
|
28
|
+
itemsPerPage: 20,
|
|
29
|
+
totalItems: 100,
|
|
30
|
+
paginate: () => {},
|
|
31
|
+
currentPage: 1
|
|
32
|
+
}),
|
|
33
|
+
name: "Disabled controls (Numbered Pagination)"
|
|
34
|
+
};
|
|
35
|
+
export var CenteredNumberedPagination = {
|
|
36
|
+
render: () => /*#__PURE__*/React.createElement(Pagination, {
|
|
37
|
+
itemsPerPage: 10,
|
|
38
|
+
totalItems: 50,
|
|
39
|
+
paginate: () => {},
|
|
40
|
+
currentPage: 1,
|
|
41
|
+
centered: true
|
|
42
|
+
}),
|
|
43
|
+
name: "Centered (Numbered Pagination)"
|
|
44
|
+
};
|
|
45
|
+
export var DisabledPaginationItemsNumberedPagination = {
|
|
46
|
+
render: () => /*#__PURE__*/React.createElement(Pagination, {
|
|
47
|
+
itemsPerPage: 10,
|
|
48
|
+
totalItems: 50,
|
|
49
|
+
paginate: () => {},
|
|
50
|
+
currentPage: 1,
|
|
51
|
+
hideNumbers: true
|
|
52
|
+
}),
|
|
53
|
+
name: "Disabled pagination items (Numbered Pagination)"
|
|
54
|
+
};
|
|
55
|
+
export var DefaultButtonsOnlyPagination = {
|
|
56
|
+
render: () => /*#__PURE__*/React.createElement(Pagination, {
|
|
57
|
+
onForward: () => {},
|
|
58
|
+
onBack: () => {}
|
|
59
|
+
}),
|
|
60
|
+
name: "Default (Buttons-only Pagination)"
|
|
61
|
+
};
|
|
62
|
+
export var DefaultButtonLabelsButtonsOnlyPagination = {
|
|
63
|
+
render: () => /*#__PURE__*/React.createElement(Pagination, {
|
|
64
|
+
onForward: () => {},
|
|
65
|
+
onBack: () => {},
|
|
66
|
+
showLabels: true
|
|
67
|
+
}),
|
|
68
|
+
name: "Default button labels (Buttons-only Pagination)"
|
|
69
|
+
};
|
|
70
|
+
export var CustomButtonLabelsButtonsOnlyPagination = {
|
|
71
|
+
render: () => /*#__PURE__*/React.createElement(Pagination, {
|
|
72
|
+
onForward: () => {},
|
|
73
|
+
onBack: () => {},
|
|
74
|
+
showLabels: true,
|
|
75
|
+
forwardLabel: "Custom forward label",
|
|
76
|
+
backLabel: "Custom back label"
|
|
77
|
+
}),
|
|
78
|
+
name: "Custom button labels (Buttons-only Pagination)"
|
|
79
|
+
};
|
|
80
|
+
export var CenteredButtonsOnlyPagination = {
|
|
81
|
+
render: () => /*#__PURE__*/React.createElement(Pagination, {
|
|
82
|
+
onForward: () => {},
|
|
83
|
+
onBack: () => {},
|
|
84
|
+
centered: true
|
|
85
|
+
}),
|
|
86
|
+
name: "Centered (Buttons-only Pagination)"
|
|
87
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MouseEventHandler } from "react";
|
|
2
|
+
export declare enum Label {
|
|
3
|
+
Next = "Next page",
|
|
4
|
+
Previous = "Previous page"
|
|
5
|
+
}
|
|
6
|
+
export type PaginationDirection = "forward" | "back";
|
|
7
|
+
export type Props = {
|
|
8
|
+
/**
|
|
9
|
+
* The direction of the pagination.
|
|
10
|
+
*/
|
|
11
|
+
direction: PaginationDirection;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the pagination button should be disabled.
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Function to handle clicking the pagination button.
|
|
18
|
+
*/
|
|
19
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to show the label for button.
|
|
22
|
+
*/
|
|
23
|
+
showLabel?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Custom label for button.
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
};
|
|
29
|
+
declare const PaginationButton: ({ direction, onClick, disabled, showLabel, label, }: Props) => JSX.Element;
|
|
30
|
+
export default PaginationButton;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export var Label = /*#__PURE__*/function (Label) {
|
|
4
|
+
Label["Next"] = "Next page";
|
|
5
|
+
Label["Previous"] = "Previous page";
|
|
6
|
+
return Label;
|
|
7
|
+
}({});
|
|
8
|
+
var PaginationButton = _ref => {
|
|
9
|
+
var {
|
|
10
|
+
direction,
|
|
11
|
+
onClick,
|
|
12
|
+
disabled = false,
|
|
13
|
+
showLabel,
|
|
14
|
+
label
|
|
15
|
+
} = _ref;
|
|
16
|
+
var buttonLabel = label || (direction === "back" ? Label.Previous : Label.Next);
|
|
17
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
18
|
+
className: "p-pagination__item"
|
|
19
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
20
|
+
className: classNames({
|
|
21
|
+
"p-pagination__link--previous": direction === "back",
|
|
22
|
+
"p-pagination__link--next": direction === "forward"
|
|
23
|
+
}),
|
|
24
|
+
disabled: disabled,
|
|
25
|
+
onClick: onClick,
|
|
26
|
+
type: "button"
|
|
27
|
+
}, direction === "forward" && showLabel && /*#__PURE__*/React.createElement("span", null, buttonLabel), /*#__PURE__*/React.createElement("i", {
|
|
28
|
+
className: "p-icon--chevron-down"
|
|
29
|
+
}, buttonLabel), direction === "back" && showLabel && /*#__PURE__*/React.createElement("span", null, buttonLabel)));
|
|
30
|
+
};
|
|
31
|
+
export default PaginationButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./PaginationButton";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MouseEventHandler } from "react";
|
|
2
|
+
export type Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the pagination item is active, i.e. the current page is this page.
|
|
5
|
+
*/
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The page number.
|
|
9
|
+
*/
|
|
10
|
+
number: number;
|
|
11
|
+
/**
|
|
12
|
+
* Function to handle clicking the pagination item.
|
|
13
|
+
*/
|
|
14
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
15
|
+
};
|
|
16
|
+
declare const PaginationItem: ({ number, onClick, isActive, }: Props) => JSX.Element;
|
|
17
|
+
export default PaginationItem;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
|
+
var PaginationItem = _ref => {
|
|
4
|
+
var {
|
|
5
|
+
number,
|
|
6
|
+
onClick,
|
|
7
|
+
isActive = false
|
|
8
|
+
} = _ref;
|
|
9
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
10
|
+
className: "p-pagination__item"
|
|
11
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
12
|
+
className: classNames("p-pagination__link", {
|
|
13
|
+
"is-active": isActive
|
|
14
|
+
}),
|
|
15
|
+
onClick: onClick,
|
|
16
|
+
"aria-current": isActive ? "page" : undefined,
|
|
17
|
+
type: "button"
|
|
18
|
+
}, number));
|
|
19
|
+
};
|
|
20
|
+
export default PaginationItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./PaginationItem";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Pagination";
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PropsWithSpread } from "../../types";
|
|
3
|
+
import type { ComponentType, ElementType, HTMLProps, PropsWithChildren, ReactNode } from "react";
|
|
4
|
+
import type { ExclusiveProps } from "../../types";
|
|
5
|
+
export type LogoDefaultElement = HTMLProps<HTMLAnchorElement>;
|
|
6
|
+
type PanelLogo<L = LogoDefaultElement> = ReactNode | PropsWithSpread<{
|
|
7
|
+
/**
|
|
8
|
+
* The url of the icon image.
|
|
9
|
+
*/
|
|
10
|
+
icon: string;
|
|
11
|
+
/**
|
|
12
|
+
* The alt text for the icon image.
|
|
13
|
+
*/
|
|
14
|
+
iconAlt?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The url of the name image.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* The alt text for the name image.
|
|
21
|
+
*/
|
|
22
|
+
nameAlt?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The element or component to use for displaying the logo e.g. `a` or `NavLink`.
|
|
25
|
+
* @default a
|
|
26
|
+
*/
|
|
27
|
+
component?: ElementType | ComponentType<L>;
|
|
28
|
+
}, L>;
|
|
29
|
+
type PanelToggle = {
|
|
30
|
+
/**
|
|
31
|
+
* The panel toggle label.
|
|
32
|
+
*/
|
|
33
|
+
label: string;
|
|
34
|
+
/**
|
|
35
|
+
* The function to call when clicking the panel toggle.
|
|
36
|
+
*/
|
|
37
|
+
onClick: () => void;
|
|
38
|
+
};
|
|
39
|
+
type LogoProps<L = LogoDefaultElement> = {
|
|
40
|
+
/**
|
|
41
|
+
* The panel logo content or attributes.
|
|
42
|
+
*/
|
|
43
|
+
logo?: PanelLogo<L>;
|
|
44
|
+
};
|
|
45
|
+
type TitleProps = {
|
|
46
|
+
/**
|
|
47
|
+
* The panel title.
|
|
48
|
+
*/
|
|
49
|
+
title: ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Classes to apply to the title element.
|
|
52
|
+
*/
|
|
53
|
+
titleClassName?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The element to use for the panel title e.g. `h1`.
|
|
56
|
+
* @default h4
|
|
57
|
+
*/
|
|
58
|
+
titleComponent?: ElementType;
|
|
59
|
+
/**
|
|
60
|
+
* An ID for the title element.
|
|
61
|
+
*/
|
|
62
|
+
titleId?: string;
|
|
63
|
+
};
|
|
64
|
+
type HeaderProps<L = LogoDefaultElement> = ExclusiveProps<{
|
|
65
|
+
/**
|
|
66
|
+
* This prop can be used to replace the header area of the panel when the default implementation is not sufficient.
|
|
67
|
+
*/
|
|
68
|
+
header: ReactNode;
|
|
69
|
+
}, {
|
|
70
|
+
/**
|
|
71
|
+
* Content that will be displayed in the controls area.
|
|
72
|
+
*/
|
|
73
|
+
controls?: ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* Classes that will be applied to the controls element.
|
|
76
|
+
*/
|
|
77
|
+
controlsClassName?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the header should be sticky.
|
|
80
|
+
*/
|
|
81
|
+
stickyHeader?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The panel toggle attributes.
|
|
84
|
+
*/
|
|
85
|
+
toggle?: PanelToggle;
|
|
86
|
+
} & ExclusiveProps<LogoProps<L>, TitleProps>>;
|
|
87
|
+
export type Props<L = LogoDefaultElement> = {
|
|
88
|
+
/**
|
|
89
|
+
* The panel content.
|
|
90
|
+
*/
|
|
91
|
+
children?: PropsWithChildren["children"];
|
|
92
|
+
/**
|
|
93
|
+
* Classes that are applied to the content container (when using `wrapContent`).
|
|
94
|
+
*/
|
|
95
|
+
contentClassName?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* Classes that are applied to the top level panel element.
|
|
98
|
+
*/
|
|
99
|
+
className?: string | null;
|
|
100
|
+
/**
|
|
101
|
+
* Whether to use the dark theme.
|
|
102
|
+
*/
|
|
103
|
+
dark?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Whether the panel should wrap the content in the `p-panel__content` element.
|
|
106
|
+
* @default true
|
|
107
|
+
*/
|
|
108
|
+
wrapContent?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* A ref to pass to the top level panel element.
|
|
111
|
+
*/
|
|
112
|
+
forwardRef?: React.Ref<HTMLDivElement> | null;
|
|
113
|
+
} & HeaderProps<L>;
|
|
114
|
+
/**
|
|
115
|
+
* This is a [React](https://reactjs.org/) component for panels in the
|
|
116
|
+
* [Vanilla](https://vanillaframework.io/docs/) layouts.
|
|
117
|
+
*
|
|
118
|
+
* The Panel component can be used in many areas of the application layout. It
|
|
119
|
+
* can be the child element of `AppAside`, `AppMain`, `AppNavigation`, `AppNavigationBar`
|
|
120
|
+
* and `AppStatus`.
|
|
121
|
+
*/
|
|
122
|
+
declare const Panel: <L = LogoDefaultElement>({ forwardRef, children, className, contentClassName, controlsClassName, controls, dark, header, logo, stickyHeader, title, titleClassName, titleComponent: TitleComponent, titleId, toggle, wrapContent, ...props }: Props<L>) => React.JSX.Element;
|
|
123
|
+
export default Panel;
|