@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,64 @@
|
|
|
1
|
+
import type { HTMLAttributes, HTMLProps, ReactNode } from "react";
|
|
2
|
+
import { PropsWithSpread } from "../../types";
|
|
3
|
+
export type NavLinkBase = {
|
|
4
|
+
/**
|
|
5
|
+
* Whether this nav item is currently selected.
|
|
6
|
+
*/
|
|
7
|
+
isSelected?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The label of the link.
|
|
10
|
+
*/
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* The URL of the link.
|
|
14
|
+
*/
|
|
15
|
+
url?: string;
|
|
16
|
+
};
|
|
17
|
+
export type NavLinkAnchor = PropsWithSpread<NavLinkBase & {
|
|
18
|
+
url: string;
|
|
19
|
+
}, HTMLAttributes<HTMLAnchorElement>>;
|
|
20
|
+
export type NavLinkButton = PropsWithSpread<NavLinkBase & {
|
|
21
|
+
url?: never;
|
|
22
|
+
}, HTMLAttributes<HTMLButtonElement>>;
|
|
23
|
+
export type NavLink = NavLinkAnchor | NavLinkButton;
|
|
24
|
+
export type NavMenu = {
|
|
25
|
+
/**
|
|
26
|
+
* Whether to align the dropdown to the right edge of the navigation item.
|
|
27
|
+
*/
|
|
28
|
+
alignRight?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The links to appear in the dropdown.
|
|
31
|
+
*/
|
|
32
|
+
items: NavLink[];
|
|
33
|
+
/**
|
|
34
|
+
* The label of the navigation item that opens the menu.
|
|
35
|
+
*/
|
|
36
|
+
label: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Navigation items which can be either a link or a menu containing links.
|
|
40
|
+
*/
|
|
41
|
+
export type NavItem = NavLink | NavMenu;
|
|
42
|
+
/**
|
|
43
|
+
* A function that can be used to generate link elements when you don't want to
|
|
44
|
+
* use a standard HTML anchor.
|
|
45
|
+
*/
|
|
46
|
+
export type GenerateLink = (item: NavLink) => ReactNode;
|
|
47
|
+
export type LogoProps = PropsWithSpread<{
|
|
48
|
+
/**
|
|
49
|
+
* An icon to display in the tag.
|
|
50
|
+
*/
|
|
51
|
+
icon?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* The logo image source URL.
|
|
54
|
+
*/
|
|
55
|
+
src?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The site's title.
|
|
58
|
+
*/
|
|
59
|
+
title: string;
|
|
60
|
+
/**
|
|
61
|
+
* The URL to navigate to when the logo is clicked.
|
|
62
|
+
*/
|
|
63
|
+
url: string;
|
|
64
|
+
}, HTMLProps<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ElementType } from "react";
|
|
2
|
+
import type { HTMLProps, ReactNode } from "react";
|
|
3
|
+
import type { ClassName, PropsWithSpread, ValueOf } from "../../types";
|
|
4
|
+
export declare enum Label {
|
|
5
|
+
Close = "Close notification"
|
|
6
|
+
}
|
|
7
|
+
export declare const NotificationSeverity: {
|
|
8
|
+
readonly CAUTION: "caution";
|
|
9
|
+
readonly INFORMATION: "information";
|
|
10
|
+
readonly NEGATIVE: "negative";
|
|
11
|
+
readonly POSITIVE: "positive";
|
|
12
|
+
};
|
|
13
|
+
export declare const DefaultTitles: {
|
|
14
|
+
caution: string;
|
|
15
|
+
information: string;
|
|
16
|
+
negative: string;
|
|
17
|
+
positive: string;
|
|
18
|
+
};
|
|
19
|
+
type NotificationAction = {
|
|
20
|
+
label: string;
|
|
21
|
+
onClick: () => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The props for the Notification component.
|
|
25
|
+
*/
|
|
26
|
+
export type Props = PropsWithSpread<{
|
|
27
|
+
/**
|
|
28
|
+
* A list of up to two actions that the notification can perform.
|
|
29
|
+
*/
|
|
30
|
+
actions?: NotificationAction[];
|
|
31
|
+
/**
|
|
32
|
+
* Whether the notification should not have a border.
|
|
33
|
+
*/
|
|
34
|
+
borderless?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The notification message content.
|
|
37
|
+
*/
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Optional class(es) to apply to the parent notification element.
|
|
41
|
+
*/
|
|
42
|
+
className?: ClassName;
|
|
43
|
+
/**
|
|
44
|
+
* **Deprecated**. Use `onDismiss` instead.
|
|
45
|
+
*/
|
|
46
|
+
close?: never;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the title should display inline with the message.
|
|
49
|
+
*/
|
|
50
|
+
inline?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The function to run when dismissing/closing the notification.
|
|
53
|
+
*/
|
|
54
|
+
onDismiss?: () => void;
|
|
55
|
+
/**
|
|
56
|
+
* The severity of the notification.
|
|
57
|
+
*/
|
|
58
|
+
severity?: ValueOf<typeof NotificationSeverity>;
|
|
59
|
+
/**
|
|
60
|
+
* **Deprecated**. Use `title` instead.
|
|
61
|
+
*/
|
|
62
|
+
status?: never;
|
|
63
|
+
/**
|
|
64
|
+
* The amount of time (in ms) until the notification is automatically dismissed.
|
|
65
|
+
*/
|
|
66
|
+
timeout?: number;
|
|
67
|
+
/**
|
|
68
|
+
* A relevant timestamp for the notification, e.g. when it was created.
|
|
69
|
+
*/
|
|
70
|
+
timestamp?: ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* The title of the notification.
|
|
73
|
+
*/
|
|
74
|
+
title?: ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* Optional element or component to use for the title.
|
|
77
|
+
*/
|
|
78
|
+
titleElement?: ElementType;
|
|
79
|
+
/**
|
|
80
|
+
* **Deprecated**. Use `severity` instead.
|
|
81
|
+
*/
|
|
82
|
+
type?: never;
|
|
83
|
+
}, HTMLProps<HTMLDivElement>>;
|
|
84
|
+
/**
|
|
85
|
+
This is a [React](https://reactjs.org/) component for the Vanilla [Notification](https://docs.vanillaframework.io/patterns/notification/).
|
|
86
|
+
|
|
87
|
+
Notifications are used to display global information, our notification variants consist of default, caution, negative or positive.
|
|
88
|
+
|
|
89
|
+
The `NotificationProvider` component can be used to manage the notification state globally. Wrap your application components with it and then in any child component you can get the helper with `const notify = useNotify()` to easily trigger notifications:
|
|
90
|
+
|
|
91
|
+
* `notify.info("You should keep this in mind")`
|
|
92
|
+
* `notify.failure("Error when fooing a bar", errorObjectFromCatch)`
|
|
93
|
+
* `notify.success("The bar was foo'd", "Success")`
|
|
94
|
+
|
|
95
|
+
The `NotificationConsumer` component can be used to display notifications. It will automatically display any notifications that are added to the `NotificationProvider` state.
|
|
96
|
+
|
|
97
|
+
The Notification API has changed since v0.18 in order to support new variants
|
|
98
|
+
and align with our component prop naming conventions.
|
|
99
|
+
|
|
100
|
+
| Deprecated prop names | Replaced by |
|
|
101
|
+
| --------------------- | ----------- |
|
|
102
|
+
| `type` | `severity` |
|
|
103
|
+
| `status` | `title` |
|
|
104
|
+
| `close` | `onDismiss` |
|
|
105
|
+
|
|
106
|
+
The `notificationTypes` const has also been replaced with `NotificationSeverity`
|
|
107
|
+
to reflect the new prop name.
|
|
108
|
+
*/
|
|
109
|
+
declare const Notification: ({ actions, borderless, children, className, close, inline, onDismiss, severity, status, timeout, timestamp, title, titleElement: TitleComponent, type, ...props }: Props) => JSX.Element;
|
|
110
|
+
export default Notification;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
var _excluded = ["actions", "borderless", "children", "className", "close", "inline", "onDismiss", "severity", "status", "timeout", "timestamp", "title", "titleElement", "type"];
|
|
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 } from "react";
|
|
7
|
+
import Button, { ButtonAppearance } from "../Button";
|
|
8
|
+
import { IS_DEV } from "../../utils";
|
|
9
|
+
export var Label = /*#__PURE__*/function (Label) {
|
|
10
|
+
Label["Close"] = "Close notification";
|
|
11
|
+
return Label;
|
|
12
|
+
}({});
|
|
13
|
+
export var NotificationSeverity = {
|
|
14
|
+
CAUTION: "caution",
|
|
15
|
+
INFORMATION: "information",
|
|
16
|
+
NEGATIVE: "negative",
|
|
17
|
+
POSITIVE: "positive"
|
|
18
|
+
};
|
|
19
|
+
export var DefaultTitles = {
|
|
20
|
+
[NotificationSeverity.CAUTION]: "Warning",
|
|
21
|
+
[NotificationSeverity.INFORMATION]: "Info",
|
|
22
|
+
[NotificationSeverity.NEGATIVE]: "Error",
|
|
23
|
+
[NotificationSeverity.POSITIVE]: "Success"
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The props for the Notification component.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
This is a [React](https://reactjs.org/) component for the Vanilla [Notification](https://docs.vanillaframework.io/patterns/notification/).
|
|
32
|
+
|
|
33
|
+
Notifications are used to display global information, our notification variants consist of default, caution, negative or positive.
|
|
34
|
+
|
|
35
|
+
The `NotificationProvider` component can be used to manage the notification state globally. Wrap your application components with it and then in any child component you can get the helper with `const notify = useNotify()` to easily trigger notifications:
|
|
36
|
+
|
|
37
|
+
* `notify.info("You should keep this in mind")`
|
|
38
|
+
* `notify.failure("Error when fooing a bar", errorObjectFromCatch)`
|
|
39
|
+
* `notify.success("The bar was foo'd", "Success")`
|
|
40
|
+
|
|
41
|
+
The `NotificationConsumer` component can be used to display notifications. It will automatically display any notifications that are added to the `NotificationProvider` state.
|
|
42
|
+
|
|
43
|
+
The Notification API has changed since v0.18 in order to support new variants
|
|
44
|
+
and align with our component prop naming conventions.
|
|
45
|
+
|
|
46
|
+
| Deprecated prop names | Replaced by |
|
|
47
|
+
| --------------------- | ----------- |
|
|
48
|
+
| `type` | `severity` |
|
|
49
|
+
| `status` | `title` |
|
|
50
|
+
| `close` | `onDismiss` |
|
|
51
|
+
|
|
52
|
+
The `notificationTypes` const has also been replaced with `NotificationSeverity`
|
|
53
|
+
to reflect the new prop name.
|
|
54
|
+
*/
|
|
55
|
+
var Notification = _ref => {
|
|
56
|
+
var {
|
|
57
|
+
actions,
|
|
58
|
+
borderless = false,
|
|
59
|
+
children,
|
|
60
|
+
className,
|
|
61
|
+
close,
|
|
62
|
+
inline = false,
|
|
63
|
+
onDismiss,
|
|
64
|
+
severity = NotificationSeverity.INFORMATION,
|
|
65
|
+
status,
|
|
66
|
+
timeout,
|
|
67
|
+
timestamp,
|
|
68
|
+
title,
|
|
69
|
+
titleElement: TitleComponent = "h5",
|
|
70
|
+
type
|
|
71
|
+
} = _ref,
|
|
72
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
73
|
+
var timeoutId = useRef(null);
|
|
74
|
+
var hasActions = (actions === null || actions === void 0 ? void 0 : actions.length) > 0;
|
|
75
|
+
var showMeta = !!timestamp || hasActions;
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
if (timeout && onDismiss) {
|
|
78
|
+
timeoutId.current = setTimeout(() => onDismiss(), timeout);
|
|
79
|
+
}
|
|
80
|
+
return () => clearTimeout(timeoutId.current);
|
|
81
|
+
}, [onDismiss, timeout]);
|
|
82
|
+
if (IS_DEV && (close || status || type)) {
|
|
83
|
+
console.warn("The Notification component is using deprecated props. Refer to the deprecated list for details: https://canonical.github.io/react-components/?path=/docs/notification--information#deprecated");
|
|
84
|
+
}
|
|
85
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
86
|
+
className: classNames(className, {
|
|
87
|
+
["p-notification--".concat(severity)]: !!severity,
|
|
88
|
+
"p-notification": !severity,
|
|
89
|
+
"is-borderless": borderless,
|
|
90
|
+
"is-inline": inline
|
|
91
|
+
})
|
|
92
|
+
}, props), /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: "p-notification__content"
|
|
94
|
+
}, title && /*#__PURE__*/React.createElement(TitleComponent, {
|
|
95
|
+
className: "p-notification__title",
|
|
96
|
+
"data-testid": "notification-title"
|
|
97
|
+
}, title), inline && /*#__PURE__*/React.createElement(React.Fragment, null, "\u2002"), /*#__PURE__*/React.createElement("p", {
|
|
98
|
+
className: "p-notification__message"
|
|
99
|
+
}, children), onDismiss && /*#__PURE__*/React.createElement("button", {
|
|
100
|
+
className: "p-notification__close",
|
|
101
|
+
"data-testid": "notification-close-button",
|
|
102
|
+
onClick: onDismiss
|
|
103
|
+
}, Label.Close)), showMeta && /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
className: "p-notification__meta",
|
|
105
|
+
"data-testid": "notification-meta"
|
|
106
|
+
}, timestamp && /*#__PURE__*/React.createElement("span", {
|
|
107
|
+
className: "p-notification__timestamp",
|
|
108
|
+
"data-testid": "notification-timestamp"
|
|
109
|
+
}, timestamp), hasActions ? /*#__PURE__*/React.createElement("div", {
|
|
110
|
+
className: "p-notification__actions"
|
|
111
|
+
}, actions.map((action, i) => /*#__PURE__*/React.createElement(Button, {
|
|
112
|
+
appearance: ButtonAppearance.LINK,
|
|
113
|
+
className: "p-notification__action",
|
|
114
|
+
"data-testid": "notification-action",
|
|
115
|
+
key: "".concat(action.label, "-").concat(i),
|
|
116
|
+
onClick: action.onClick
|
|
117
|
+
}, action.label))) : null));
|
|
118
|
+
};
|
|
119
|
+
export default Notification;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Notification from "./Notification";
|
|
3
|
+
declare const meta: Meta<typeof Notification>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Notification>;
|
|
6
|
+
/**
|
|
7
|
+
* The information severity should be used to convey an information message.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Information: Story;
|
|
10
|
+
/**
|
|
11
|
+
* The caution severity should be used to convey information that is not critical but the user should be aware of.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Caution: Story;
|
|
14
|
+
/**
|
|
15
|
+
* The negative severity should be used to convey information that is critical and the user should take action.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Negative: Story;
|
|
18
|
+
/**
|
|
19
|
+
* The positive severity should be used to convey success or completion.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Positive: Story;
|
|
22
|
+
/**
|
|
23
|
+
* When vertical space is limited, you can use the inline variant.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Inline: Story;
|
|
26
|
+
/**
|
|
27
|
+
* In cases where a notification sits inside another component, such as a table cell or a card, it may be useful to remove the outer border and highlight bar.
|
|
28
|
+
*/
|
|
29
|
+
export declare const Borderless: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Actions will appear below the notification message.
|
|
32
|
+
*/
|
|
33
|
+
export declare const Actions: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Notifications that can be dismissed should be given an onDismiss function.
|
|
36
|
+
*/
|
|
37
|
+
export declare const Dismissible: Story;
|
|
38
|
+
/**
|
|
39
|
+
* Notifications can be automatically dismissed after a timeout interval.
|
|
40
|
+
*/
|
|
41
|
+
export declare const Timeout: Story;
|
|
42
|
+
/**
|
|
43
|
+
* For notifications in which recency is important, you can include a section for time.
|
|
44
|
+
*/
|
|
45
|
+
export declare const Timestamp: Story;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import Notification, { NotificationSeverity } from "./Notification";
|
|
4
|
+
var meta = {
|
|
5
|
+
component: Notification,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
argTypes: {
|
|
8
|
+
borderless: {
|
|
9
|
+
control: {
|
|
10
|
+
type: "boolean"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
children: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "text"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
inline: {
|
|
19
|
+
control: {
|
|
20
|
+
type: "boolean"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
severity: {
|
|
24
|
+
control: {
|
|
25
|
+
type: "radio"
|
|
26
|
+
},
|
|
27
|
+
options: Object.values(NotificationSeverity)
|
|
28
|
+
},
|
|
29
|
+
timestamp: {
|
|
30
|
+
control: {
|
|
31
|
+
type: "text"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
control: {
|
|
36
|
+
type: "text"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
args: {
|
|
41
|
+
borderless: false,
|
|
42
|
+
inline: false,
|
|
43
|
+
severity: NotificationSeverity.INFORMATION
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export default meta;
|
|
47
|
+
/**
|
|
48
|
+
* The information severity should be used to convey an information message.
|
|
49
|
+
*/
|
|
50
|
+
export var Information = {
|
|
51
|
+
name: "Information",
|
|
52
|
+
args: {
|
|
53
|
+
children: "Anyone with access can view your invited users.",
|
|
54
|
+
severity: "information",
|
|
55
|
+
title: "Permissions changed"
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The caution severity should be used to convey information that is not critical but the user should be aware of.
|
|
61
|
+
*/
|
|
62
|
+
export var Caution = {
|
|
63
|
+
name: "Caution",
|
|
64
|
+
args: {
|
|
65
|
+
children: "Custom storage configuration is only supported on Ubuntu, CentOS and RHEL.",
|
|
66
|
+
severity: "caution",
|
|
67
|
+
title: "Blocked"
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The negative severity should be used to convey information that is critical and the user should take action.
|
|
73
|
+
*/
|
|
74
|
+
export var Negative = {
|
|
75
|
+
name: "Negative",
|
|
76
|
+
args: {
|
|
77
|
+
children: "Node must be connected to a network.",
|
|
78
|
+
severity: "negative",
|
|
79
|
+
title: "Error"
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The positive severity should be used to convey success or completion.
|
|
85
|
+
*/
|
|
86
|
+
export var Positive = {
|
|
87
|
+
name: "Positive",
|
|
88
|
+
args: {
|
|
89
|
+
children: "Code successfully reformatted.",
|
|
90
|
+
severity: "positive",
|
|
91
|
+
title: "Success"
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* When vertical space is limited, you can use the inline variant.
|
|
97
|
+
*/
|
|
98
|
+
export var Inline = {
|
|
99
|
+
name: "Inline",
|
|
100
|
+
args: {
|
|
101
|
+
children: "Not enough space.",
|
|
102
|
+
inline: true,
|
|
103
|
+
severity: "negative",
|
|
104
|
+
title: "Error:"
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* In cases where a notification sits inside another component, such as a table cell or a card, it may be useful to remove the outer border and highlight bar.
|
|
110
|
+
*/
|
|
111
|
+
export var Borderless = {
|
|
112
|
+
name: "Borderless",
|
|
113
|
+
args: {
|
|
114
|
+
borderless: true,
|
|
115
|
+
children: "Only 8GB storage remaining.",
|
|
116
|
+
severity: "caution",
|
|
117
|
+
title: "Warning"
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Actions will appear below the notification message.
|
|
123
|
+
*/
|
|
124
|
+
export var Actions = {
|
|
125
|
+
name: "Actions",
|
|
126
|
+
args: {
|
|
127
|
+
actions: [{
|
|
128
|
+
label: "Action 1",
|
|
129
|
+
onClick: () => null
|
|
130
|
+
}, {
|
|
131
|
+
label: "Action 2",
|
|
132
|
+
onClick: () => null
|
|
133
|
+
}],
|
|
134
|
+
children: "Body lorem ipsum dolor sit amet consequiteor. Lorem ipsum dolor sit amet consequiteor.",
|
|
135
|
+
severity: "information",
|
|
136
|
+
title: "Title"
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Notifications that can be dismissed should be given an onDismiss function.
|
|
142
|
+
*/
|
|
143
|
+
export var Dismissible = {
|
|
144
|
+
render: () => {
|
|
145
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
146
|
+
var [show, setShow] = useState(true);
|
|
147
|
+
if (!show) {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
return /*#__PURE__*/React.createElement(Notification, {
|
|
151
|
+
onDismiss: () => setShow(false),
|
|
152
|
+
title: "Dismissible"
|
|
153
|
+
}, "Click the dismiss button to get rid of me.");
|
|
154
|
+
},
|
|
155
|
+
name: "Dismissible"
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Notifications can be automatically dismissed after a timeout interval.
|
|
160
|
+
*/
|
|
161
|
+
export var Timeout = {
|
|
162
|
+
render: () => {
|
|
163
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
164
|
+
var [show, setShow] = useState(true);
|
|
165
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
166
|
+
var [timer, setTimer] = useState(0);
|
|
167
|
+
if (!show) {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
return /*#__PURE__*/React.createElement(Notification, {
|
|
171
|
+
actions: [{
|
|
172
|
+
label: "Start timer",
|
|
173
|
+
onClick: () => setTimer(3000)
|
|
174
|
+
}],
|
|
175
|
+
onDismiss: () => setShow(false),
|
|
176
|
+
timeout: timer,
|
|
177
|
+
title: "Timeout"
|
|
178
|
+
}, "Click the action to start a 3 second timer.");
|
|
179
|
+
},
|
|
180
|
+
name: "Timeout"
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* For notifications in which recency is important, you can include a section for time.
|
|
185
|
+
*/
|
|
186
|
+
export var Timestamp = {
|
|
187
|
+
name: "Timestamp",
|
|
188
|
+
args: {
|
|
189
|
+
children: "Body lorem ipsum dolor sit amet consequiteor. Lorem ipsum dolor sit amet consequiteor.",
|
|
190
|
+
severity: "information",
|
|
191
|
+
timestamp: "1h ago",
|
|
192
|
+
title: "Title"
|
|
193
|
+
}
|
|
194
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, NotificationSeverity } from "./Notification";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { NotificationHelper, NotifyProviderProps } from "./types";
|
|
3
|
+
export declare const NotificationProvider: FC<NotifyProviderProps>;
|
|
4
|
+
export declare function useNotify(): NotificationHelper;
|
|
5
|
+
export declare const NotificationConsumer: FC;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { createContext, useContext, useEffect, useRef, useState } from "react";
|
|
2
|
+
import isEqual from "lodash/isEqual";
|
|
3
|
+
import { info as _info, failure as _failure, success as _success, queue } from "./messageBuilder";
|
|
4
|
+
import Notification, { DefaultTitles } from "../Notification/Notification";
|
|
5
|
+
var NotifyContext = /*#__PURE__*/createContext({
|
|
6
|
+
notification: null,
|
|
7
|
+
clear: () => undefined,
|
|
8
|
+
failure: () => undefined,
|
|
9
|
+
success: () => undefined,
|
|
10
|
+
info: () => undefined,
|
|
11
|
+
queue: () => undefined,
|
|
12
|
+
setDeduplicated: () => undefined
|
|
13
|
+
});
|
|
14
|
+
export var NotificationProvider = _ref => {
|
|
15
|
+
var {
|
|
16
|
+
children,
|
|
17
|
+
state,
|
|
18
|
+
pathname
|
|
19
|
+
} = _ref;
|
|
20
|
+
var [notification, setNotification] = useState(null);
|
|
21
|
+
var clear = () => notification !== null && setNotification(null);
|
|
22
|
+
var setDeduplicated = value => {
|
|
23
|
+
if (!isEqual(value, notification)) {
|
|
24
|
+
setNotification(value);
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
};
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (state !== null && state !== void 0 && state.queuedNotification) {
|
|
30
|
+
setDeduplicated(state.queuedNotification);
|
|
31
|
+
window.history.replaceState({}, "");
|
|
32
|
+
} else {
|
|
33
|
+
clear();
|
|
34
|
+
}
|
|
35
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
+
}, [state, pathname]);
|
|
37
|
+
var helper = {
|
|
38
|
+
notification,
|
|
39
|
+
clear,
|
|
40
|
+
queue,
|
|
41
|
+
failure: (title, error, message, actions) => setDeduplicated(_failure(title, error, message, actions)),
|
|
42
|
+
info: (message, title) => setDeduplicated(_info(message, title)),
|
|
43
|
+
success: (message, title) => setDeduplicated(_success(message, title)),
|
|
44
|
+
setDeduplicated
|
|
45
|
+
};
|
|
46
|
+
return /*#__PURE__*/React.createElement(NotifyContext.Provider, {
|
|
47
|
+
value: helper
|
|
48
|
+
}, children);
|
|
49
|
+
};
|
|
50
|
+
export function useNotify() {
|
|
51
|
+
return useContext(NotifyContext);
|
|
52
|
+
}
|
|
53
|
+
export var NotificationConsumer = () => {
|
|
54
|
+
var notify = useNotify();
|
|
55
|
+
var ref = useRef(null);
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
var _ref$current;
|
|
58
|
+
if ((_ref$current = ref.current) !== null && _ref$current !== void 0 && _ref$current.hasAttribute("scrollIntoView")) {
|
|
59
|
+
ref.current.scrollIntoView({
|
|
60
|
+
behavior: "smooth",
|
|
61
|
+
block: "center",
|
|
62
|
+
inline: "start"
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}, [notify.notification]);
|
|
66
|
+
if (!notify.notification) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
var {
|
|
70
|
+
actions,
|
|
71
|
+
title,
|
|
72
|
+
type,
|
|
73
|
+
message
|
|
74
|
+
} = notify.notification;
|
|
75
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
ref: ref
|
|
77
|
+
}, /*#__PURE__*/React.createElement(Notification, {
|
|
78
|
+
title: title !== null && title !== void 0 ? title : DefaultTitles[type],
|
|
79
|
+
actions: actions,
|
|
80
|
+
severity: type,
|
|
81
|
+
onDismiss: notify.clear
|
|
82
|
+
}, message));
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { NotificationConsumer, NotificationProvider, useNotify, } from "./NotificationProvider";
|
|
2
|
+
export { info, success, failure, queue } from "./messageBuilder";
|
|
3
|
+
export type { NotificationAction, NotificationType, QueuedNotification, NotificationHelper, } from "./types";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NotificationAction, NotificationType, QueuedNotification } from "./types";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export declare const queue: (notification: NotificationType) => QueuedNotification;
|
|
4
|
+
export declare const info: (message: ReactNode, title?: string) => NotificationType;
|
|
5
|
+
export declare const success: (message: ReactNode, title?: string) => NotificationType;
|
|
6
|
+
export declare const failure: (title: string, error: unknown, message?: ReactNode, actions?: NotificationAction[]) => NotificationType;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { NotificationSeverity } from "../Notification";
|
|
3
|
+
export var queue = notification => {
|
|
4
|
+
return {
|
|
5
|
+
state: {
|
|
6
|
+
queuedNotification: notification
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export var info = (message, title) => {
|
|
11
|
+
return {
|
|
12
|
+
message,
|
|
13
|
+
title,
|
|
14
|
+
type: NotificationSeverity.INFORMATION
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export var success = (message, title) => {
|
|
18
|
+
return {
|
|
19
|
+
message,
|
|
20
|
+
title,
|
|
21
|
+
type: NotificationSeverity.POSITIVE
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export var failure = (title, error, message, actions) => {
|
|
25
|
+
return {
|
|
26
|
+
actions,
|
|
27
|
+
message: error && error instanceof Error ? /*#__PURE__*/React.createElement(React.Fragment, null, message, " ", error.message) : message,
|
|
28
|
+
title,
|
|
29
|
+
type: NotificationSeverity.NEGATIVE
|
|
30
|
+
};
|
|
31
|
+
};
|