@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,249 @@
|
|
|
1
|
+
var _excluded = ["children", "className", "onClick"],
|
|
2
|
+
_excluded2 = ["adjustedPosition", "autoAdjust", "handleClose", "constrainPanelWidth", "dropdownClassName", "dropdownContent", "id", "isOpen", "links", "position", "positionCoords", "positionNode", "scrollOverflow", "setAdjustedPosition", "contextualMenuClassName"];
|
|
3
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
5
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
10
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
+
import classNames from "classnames";
|
|
12
|
+
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
13
|
+
import { useWindowFitment } from "../../../hooks";
|
|
14
|
+
import Button from "../../Button";
|
|
15
|
+
export var Label = /*#__PURE__*/function (Label) {
|
|
16
|
+
Label["Dropdown"] = "submenu";
|
|
17
|
+
return Label;
|
|
18
|
+
}({});
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The type of the menu links.
|
|
22
|
+
* @template L - The type of the link props.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The props for the ContextualMenuDropdown component.
|
|
27
|
+
* @template L - The type of the link props.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Calculate the styles for the menu.
|
|
32
|
+
* @param position - The menu position.
|
|
33
|
+
* @param positionCoords - The coordinates of the position node.
|
|
34
|
+
* @param constrainPanelWidth - Whether the menu width should be constrained to the position width.
|
|
35
|
+
*/
|
|
36
|
+
var getPositionStyle = (position, verticalPosition, positionCoords, constrainPanelWidth) => {
|
|
37
|
+
if (!positionCoords) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
var {
|
|
41
|
+
height,
|
|
42
|
+
left,
|
|
43
|
+
top,
|
|
44
|
+
width
|
|
45
|
+
} = positionCoords;
|
|
46
|
+
var topPos = verticalPosition === "bottom" ? top + height + (window.scrollY || 0) : top + (window.scrollY || 0);
|
|
47
|
+
var leftPos = left;
|
|
48
|
+
switch (position) {
|
|
49
|
+
case "left":
|
|
50
|
+
leftPos = left;
|
|
51
|
+
break;
|
|
52
|
+
case "center":
|
|
53
|
+
leftPos = left + width / 2;
|
|
54
|
+
break;
|
|
55
|
+
case "right":
|
|
56
|
+
leftPos = left + width;
|
|
57
|
+
break;
|
|
58
|
+
default:
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
return _objectSpread({
|
|
62
|
+
position: "absolute",
|
|
63
|
+
left: leftPos,
|
|
64
|
+
top: topPos
|
|
65
|
+
}, constrainPanelWidth ? {
|
|
66
|
+
width
|
|
67
|
+
} : null);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Calculate the adjusted position in relation to the window.
|
|
72
|
+
* @param position - The requested position.
|
|
73
|
+
* @param fitsWindow - The window fitment info.
|
|
74
|
+
* @return The new position.
|
|
75
|
+
*/
|
|
76
|
+
export var adjustForWindow = (position, fitsWindow) => {
|
|
77
|
+
var newPosition = position;
|
|
78
|
+
if (!fitsWindow.fromRight.fitsLeft && newPosition === "right") {
|
|
79
|
+
newPosition = "left";
|
|
80
|
+
}
|
|
81
|
+
if (!fitsWindow.fromLeft.fitsRight && newPosition === "left") {
|
|
82
|
+
newPosition = "right";
|
|
83
|
+
}
|
|
84
|
+
// If the menu doesn't fit to the left or the right then center it.
|
|
85
|
+
if (!fitsWindow.fromLeft.fitsRight && !fitsWindow.fromRight.fitsLeft && (newPosition === "left" || newPosition === "right")) {
|
|
86
|
+
newPosition = "center";
|
|
87
|
+
}
|
|
88
|
+
// If the menu doesn't fit when centered then find a new position.
|
|
89
|
+
if (newPosition === "center" && (!fitsWindow.fromCenter.fitsCentered.fitsRight || !fitsWindow.fromCenter.fitsCentered.fitsLeft)) {
|
|
90
|
+
if (fitsWindow.fromLeft.fitsRight) {
|
|
91
|
+
newPosition = "left";
|
|
92
|
+
}
|
|
93
|
+
if (fitsWindow.fromRight.fitsLeft) {
|
|
94
|
+
newPosition = "right";
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return newPosition;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Generate a menu link
|
|
102
|
+
* @template L - The type of the link props.
|
|
103
|
+
* @param link - A button
|
|
104
|
+
* @param key - A key for the DOM.
|
|
105
|
+
* @param handleClose - The function to close the menu.
|
|
106
|
+
*/
|
|
107
|
+
var generateLink = (link, key, handleClose) => {
|
|
108
|
+
var {
|
|
109
|
+
children,
|
|
110
|
+
className,
|
|
111
|
+
onClick
|
|
112
|
+
} = link,
|
|
113
|
+
props = _objectWithoutProperties(link, _excluded);
|
|
114
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
115
|
+
className: classNames("p-contextual-menu__link", className),
|
|
116
|
+
key: key,
|
|
117
|
+
onClick: onClick ? evt => {
|
|
118
|
+
handleClose(evt.nativeEvent);
|
|
119
|
+
onClick(evt);
|
|
120
|
+
} : null
|
|
121
|
+
}, props), children);
|
|
122
|
+
};
|
|
123
|
+
var getClosestScrollableParent = node => {
|
|
124
|
+
var currentNode = node;
|
|
125
|
+
while (currentNode && currentNode !== document.body) {
|
|
126
|
+
var {
|
|
127
|
+
overflowY,
|
|
128
|
+
overflowX
|
|
129
|
+
} = window.getComputedStyle(currentNode);
|
|
130
|
+
if (["auto", "scroll", "overlay"].includes(overflowY) && ["auto", "scroll", "overlay"].includes(overflowX)) {
|
|
131
|
+
return currentNode;
|
|
132
|
+
}
|
|
133
|
+
currentNode = currentNode.parentElement;
|
|
134
|
+
}
|
|
135
|
+
return document.body;
|
|
136
|
+
};
|
|
137
|
+
var ContextualMenuDropdown = _ref => {
|
|
138
|
+
var {
|
|
139
|
+
adjustedPosition,
|
|
140
|
+
autoAdjust,
|
|
141
|
+
handleClose,
|
|
142
|
+
constrainPanelWidth,
|
|
143
|
+
dropdownClassName,
|
|
144
|
+
dropdownContent,
|
|
145
|
+
id,
|
|
146
|
+
isOpen,
|
|
147
|
+
links,
|
|
148
|
+
position,
|
|
149
|
+
positionCoords,
|
|
150
|
+
positionNode,
|
|
151
|
+
scrollOverflow,
|
|
152
|
+
setAdjustedPosition,
|
|
153
|
+
contextualMenuClassName
|
|
154
|
+
} = _ref,
|
|
155
|
+
props = _objectWithoutProperties(_ref, _excluded2);
|
|
156
|
+
var dropdown = useRef(null);
|
|
157
|
+
var [verticalPosition, setVerticalPosition] = useState("bottom");
|
|
158
|
+
var [positionStyle, setPositionStyle] = useState(getPositionStyle(adjustedPosition, verticalPosition, positionCoords, constrainPanelWidth));
|
|
159
|
+
var [maxHeight, setMaxHeight] = useState();
|
|
160
|
+
// Update the styles to position the menu.
|
|
161
|
+
var updatePositionStyle = useCallback(() => {
|
|
162
|
+
setPositionStyle(getPositionStyle(adjustedPosition, verticalPosition, positionCoords, constrainPanelWidth));
|
|
163
|
+
}, [adjustedPosition, positionCoords, verticalPosition, constrainPanelWidth]);
|
|
164
|
+
var updateVerticalPosition = useCallback(() => {
|
|
165
|
+
var _dropdown$current$get;
|
|
166
|
+
if (!positionNode) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
var scrollableParent = getClosestScrollableParent(positionNode);
|
|
170
|
+
if (!scrollableParent) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
var scrollableParentRect = scrollableParent.getBoundingClientRect();
|
|
174
|
+
var toggleRect = positionNode.getBoundingClientRect();
|
|
175
|
+
|
|
176
|
+
// Calculate the rect in relation to the scrollableParent
|
|
177
|
+
var relativeToScrollParentRect = {
|
|
178
|
+
top: toggleRect.top - scrollableParentRect.top,
|
|
179
|
+
bottom: toggleRect.bottom - scrollableParentRect.top
|
|
180
|
+
};
|
|
181
|
+
var scrollParentSpaceBelow = scrollableParentRect.height - relativeToScrollParentRect.bottom;
|
|
182
|
+
var scrollParentSpaceAbove = relativeToScrollParentRect.top;
|
|
183
|
+
var dropdownHeight = (_dropdown$current$get = dropdown.current.getBoundingClientRect().height) !== null && _dropdown$current$get !== void 0 ? _dropdown$current$get : 0;
|
|
184
|
+
var windowSpaceBelow = window.innerHeight - toggleRect.bottom;
|
|
185
|
+
setVerticalPosition(scrollParentSpaceBelow >= dropdownHeight && windowSpaceBelow >= dropdownHeight || windowSpaceBelow > scrollParentSpaceAbove ? "bottom" : "top");
|
|
186
|
+
}, [positionNode]);
|
|
187
|
+
|
|
188
|
+
// Update the position when the window fitment info changes.
|
|
189
|
+
var onUpdateWindowFitment = useCallback(fitsWindow => {
|
|
190
|
+
if (autoAdjust) {
|
|
191
|
+
setAdjustedPosition(adjustForWindow(position, fitsWindow));
|
|
192
|
+
updateVerticalPosition();
|
|
193
|
+
}
|
|
194
|
+
if (scrollOverflow) {
|
|
195
|
+
setMaxHeight(fitsWindow.fromBottom.spaceBelow - 16);
|
|
196
|
+
}
|
|
197
|
+
}, [autoAdjust, position, scrollOverflow, setAdjustedPosition, updateVerticalPosition]);
|
|
198
|
+
|
|
199
|
+
// Handle adjusting the horizontal position and scrolling of the dropdown so that it remains on screen.
|
|
200
|
+
useWindowFitment(dropdown.current, positionNode, onUpdateWindowFitment, 0, isOpen && (autoAdjust || scrollOverflow));
|
|
201
|
+
|
|
202
|
+
// Update the styles when the position changes.
|
|
203
|
+
useEffect(() => {
|
|
204
|
+
updatePositionStyle();
|
|
205
|
+
}, [adjustedPosition, updatePositionStyle]);
|
|
206
|
+
useEffect(() => {
|
|
207
|
+
updateVerticalPosition();
|
|
208
|
+
}, [updateVerticalPosition]);
|
|
209
|
+
return (
|
|
210
|
+
/*#__PURE__*/
|
|
211
|
+
// Vanilla Framework uses .p-contextual-menu parent modifier classnames to determine the correct position of the .p-contextual-menu__dropdown dropdown (left, center, right).
|
|
212
|
+
// Extra span wrapper is required as the dropdown is rendered in a portal.
|
|
213
|
+
React.createElement("span", {
|
|
214
|
+
className: contextualMenuClassName,
|
|
215
|
+
style: positionStyle
|
|
216
|
+
}, /*#__PURE__*/React.createElement("span", _extends({
|
|
217
|
+
className: classNames("p-contextual-menu__dropdown", dropdownClassName),
|
|
218
|
+
id: id,
|
|
219
|
+
"aria-hidden": isOpen ? "false" : "true",
|
|
220
|
+
"aria-label": Label.Dropdown,
|
|
221
|
+
ref: dropdown,
|
|
222
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, constrainPanelWidth && positionStyle !== null && positionStyle !== void 0 && positionStyle.width ? {
|
|
223
|
+
width: positionStyle.width,
|
|
224
|
+
minWidth: 0,
|
|
225
|
+
maxWidth: "none"
|
|
226
|
+
} : {}), scrollOverflow ? {
|
|
227
|
+
maxHeight,
|
|
228
|
+
minHeight: "2rem",
|
|
229
|
+
overflowX: "auto"
|
|
230
|
+
} : {}), verticalPosition === "top" ? {
|
|
231
|
+
bottom: "0"
|
|
232
|
+
} : {})
|
|
233
|
+
}, props), dropdownContent ? typeof dropdownContent === "function" ? dropdownContent(handleClose) : dropdownContent : links.map((item, i) => {
|
|
234
|
+
if (Array.isArray(item)) {
|
|
235
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
236
|
+
className: "p-contextual-menu__group",
|
|
237
|
+
key: i
|
|
238
|
+
}, item.map((link, j) => generateLink(link, j, handleClose)));
|
|
239
|
+
} else if (typeof item === "string") {
|
|
240
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
241
|
+
className: "p-contextual-menu__non-interactive",
|
|
242
|
+
key: i
|
|
243
|
+
}, item);
|
|
244
|
+
}
|
|
245
|
+
return generateLink(item, i, handleClose);
|
|
246
|
+
})))
|
|
247
|
+
);
|
|
248
|
+
};
|
|
249
|
+
export default ContextualMenuDropdown;
|
package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./ContextualMenuDropdown";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./ContextualMenu";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import "./DoughnutChart.scss";
|
|
3
|
+
export type Segment = {
|
|
4
|
+
/**
|
|
5
|
+
* The colour of the segment.
|
|
6
|
+
*/
|
|
7
|
+
color: string;
|
|
8
|
+
/**
|
|
9
|
+
* The segment tooltip.
|
|
10
|
+
*/
|
|
11
|
+
tooltip?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The segment length.
|
|
14
|
+
*/
|
|
15
|
+
value: number;
|
|
16
|
+
};
|
|
17
|
+
export type Props = {
|
|
18
|
+
/**
|
|
19
|
+
* The label in the centre of the doughnut.
|
|
20
|
+
*/
|
|
21
|
+
label?: string;
|
|
22
|
+
/**
|
|
23
|
+
* An optional class name applied to the label.
|
|
24
|
+
*/
|
|
25
|
+
labelClassname?: string;
|
|
26
|
+
/**
|
|
27
|
+
* An optional class name applied to the wrapping element.
|
|
28
|
+
*/
|
|
29
|
+
className?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The width of the segments when hovered.
|
|
32
|
+
*/
|
|
33
|
+
segmentHoverWidth: number;
|
|
34
|
+
/**
|
|
35
|
+
* The width of the segments.
|
|
36
|
+
*/
|
|
37
|
+
segmentThickness: number;
|
|
38
|
+
/**
|
|
39
|
+
* The doughnut segments.
|
|
40
|
+
*/
|
|
41
|
+
segments: Segment[];
|
|
42
|
+
/**
|
|
43
|
+
* The size of the doughnut.
|
|
44
|
+
*/
|
|
45
|
+
size: number;
|
|
46
|
+
/**
|
|
47
|
+
* ID associated to the specific instance of a Chart.
|
|
48
|
+
*/
|
|
49
|
+
chartID: string;
|
|
50
|
+
};
|
|
51
|
+
export declare enum TestIds {
|
|
52
|
+
Label = "label",
|
|
53
|
+
Segment = "segment",
|
|
54
|
+
Chart = "chart",
|
|
55
|
+
Section = "Section"
|
|
56
|
+
}
|
|
57
|
+
declare const DoughnutChart: FC<Props>;
|
|
58
|
+
export default DoughnutChart;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import _pt from "prop-types";
|
|
2
|
+
import React, { useRef, useState } from "react";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import Tooltip from "../Tooltip";
|
|
5
|
+
import "./DoughnutChart.scss";
|
|
6
|
+
export var TestIds = /*#__PURE__*/function (TestIds) {
|
|
7
|
+
TestIds["Label"] = "label";
|
|
8
|
+
TestIds["Segment"] = "segment";
|
|
9
|
+
TestIds["Chart"] = "chart";
|
|
10
|
+
TestIds["Section"] = "Section";
|
|
11
|
+
return TestIds;
|
|
12
|
+
}({});
|
|
13
|
+
var DoughnutChart = _ref => {
|
|
14
|
+
var {
|
|
15
|
+
className,
|
|
16
|
+
label,
|
|
17
|
+
labelClassname,
|
|
18
|
+
segmentHoverWidth,
|
|
19
|
+
segmentThickness,
|
|
20
|
+
segments,
|
|
21
|
+
size,
|
|
22
|
+
chartID
|
|
23
|
+
} = _ref;
|
|
24
|
+
var [tooltipMessage, setTooltipMessage] = useState(null);
|
|
25
|
+
var id = useRef("doughnut-chart-".concat(chartID));
|
|
26
|
+
var hoverIncrease = segmentHoverWidth - segmentThickness;
|
|
27
|
+
var adjustedHoverWidth = segmentHoverWidth + hoverIncrease;
|
|
28
|
+
// The canvas needs enough space so that the hover state does not get cut off.
|
|
29
|
+
var canvasSize = size + adjustedHoverWidth - segmentThickness;
|
|
30
|
+
var diameter = size - segmentThickness;
|
|
31
|
+
var radius = diameter / 2;
|
|
32
|
+
var circumference = Math.round(diameter * Math.PI);
|
|
33
|
+
// Calculate the total value of all segments.
|
|
34
|
+
var total = segments.reduce((totalValue, segment) => totalValue += segment.value, 0);
|
|
35
|
+
var accumulatedLength = 0;
|
|
36
|
+
var segmentNodes = segments.map((_ref2, i) => {
|
|
37
|
+
var {
|
|
38
|
+
color,
|
|
39
|
+
tooltip,
|
|
40
|
+
value
|
|
41
|
+
} = _ref2;
|
|
42
|
+
// The start position is the value of all previous segments.
|
|
43
|
+
var startPosition = accumulatedLength;
|
|
44
|
+
// The length of the segment (as a portion of the doughnut circumference)
|
|
45
|
+
var segmentLength = value / total * circumference;
|
|
46
|
+
// The space left until the end of the circle.
|
|
47
|
+
var remainingSpace = circumference - (segmentLength + startPosition);
|
|
48
|
+
// Add this segment length to the running tally.
|
|
49
|
+
accumulatedLength += segmentLength;
|
|
50
|
+
return /*#__PURE__*/React.createElement("circle", {
|
|
51
|
+
className: "doughnut-chart__segment",
|
|
52
|
+
cx: radius - segmentThickness / 2 - hoverIncrease,
|
|
53
|
+
cy: radius + segmentThickness / 2 + hoverIncrease,
|
|
54
|
+
"data-testid": TestIds.Segment,
|
|
55
|
+
key: i,
|
|
56
|
+
tabIndex: 0,
|
|
57
|
+
"aria-label": tooltip ? "".concat(tooltip, ": ").concat(value) : "".concat(value),
|
|
58
|
+
onMouseOut: tooltip ? () => {
|
|
59
|
+
// Hide the tooltip.
|
|
60
|
+
setTooltipMessage(null);
|
|
61
|
+
} : undefined,
|
|
62
|
+
onMouseOver: tooltip ? () => {
|
|
63
|
+
setTooltipMessage(tooltip);
|
|
64
|
+
} : undefined,
|
|
65
|
+
r: radius,
|
|
66
|
+
style: {
|
|
67
|
+
stroke: color,
|
|
68
|
+
strokeWidth: segmentThickness,
|
|
69
|
+
// The dash array used is:
|
|
70
|
+
// 1 - We want there to be a space before the first visible dash so
|
|
71
|
+
// by setting this to 0 we can use the next dash for the space.
|
|
72
|
+
// 2 - This gap is the distance of all previous segments
|
|
73
|
+
// so that the segment starts in the correct spot.
|
|
74
|
+
// 3 - A dash that is the length of the segment.
|
|
75
|
+
// 4 - A gap from the end of the segment to the start of the circle
|
|
76
|
+
// so that the dash array doesn't repeat and be visible.
|
|
77
|
+
strokeDasharray: "0 ".concat(startPosition.toFixed(2), " ").concat(segmentLength.toFixed(2), " ").concat(remainingSpace.toFixed(2))
|
|
78
|
+
}
|
|
79
|
+
// Rotate the segment so that the segments start at the top of
|
|
80
|
+
// the chart.
|
|
81
|
+
,
|
|
82
|
+
transform: "rotate(-90 ".concat(radius, ",").concat(radius, ")")
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: classNames("doughnut-chart", className),
|
|
87
|
+
style: {
|
|
88
|
+
maxWidth: "".concat(canvasSize, "px")
|
|
89
|
+
},
|
|
90
|
+
"data-testid": TestIds.Chart
|
|
91
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
92
|
+
className: "doughnut-chart__tooltip",
|
|
93
|
+
followMouse: true,
|
|
94
|
+
message: tooltipMessage,
|
|
95
|
+
position: "right"
|
|
96
|
+
}, /*#__PURE__*/React.createElement("style", null, "#".concat(id.current, " .doughnut-chart__segment:hover {\n stroke-width: ").concat(adjustedHoverWidth, " !important;\n }")), /*#__PURE__*/React.createElement("svg", {
|
|
97
|
+
className: "doughnut-chart__chart",
|
|
98
|
+
id: id.current,
|
|
99
|
+
viewBox: "0 0 ".concat(canvasSize, " ").concat(canvasSize),
|
|
100
|
+
"data-testid": TestIds.Section,
|
|
101
|
+
"aria-labelledby": "".concat(id.current, "-chart-title ").concat(id.current, "-chart-desc")
|
|
102
|
+
}, label && /*#__PURE__*/React.createElement("title", {
|
|
103
|
+
id: "".concat(id.current, "-chart-title")
|
|
104
|
+
}, label), /*#__PURE__*/React.createElement("desc", {
|
|
105
|
+
id: "".concat(id.current, "-chart-desc")
|
|
106
|
+
}, segments.map(segment => {
|
|
107
|
+
var description = "";
|
|
108
|
+
if (segment.tooltip) description += "".concat(segment.tooltip, ": ");
|
|
109
|
+
description += segment.value;
|
|
110
|
+
return description;
|
|
111
|
+
}).join(",")), /*#__PURE__*/React.createElement("mask", {
|
|
112
|
+
id: "canvasMask"
|
|
113
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
114
|
+
fill: "white",
|
|
115
|
+
height: canvasSize,
|
|
116
|
+
width: canvasSize,
|
|
117
|
+
x: "0",
|
|
118
|
+
y: "0"
|
|
119
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
120
|
+
cx: canvasSize / 2,
|
|
121
|
+
cy: canvasSize / 2,
|
|
122
|
+
fill: "black",
|
|
123
|
+
r: radius - segmentThickness / 2
|
|
124
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
125
|
+
mask: "url(#canvasMask)"
|
|
126
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
127
|
+
fill: "transparent",
|
|
128
|
+
height: canvasSize,
|
|
129
|
+
width: canvasSize,
|
|
130
|
+
x: "0",
|
|
131
|
+
y: "0"
|
|
132
|
+
}), /*#__PURE__*/React.createElement("g", null, segmentNodes)), label ? /*#__PURE__*/React.createElement("text", {
|
|
133
|
+
x: radius + adjustedHoverWidth / 2,
|
|
134
|
+
y: radius + adjustedHoverWidth / 2
|
|
135
|
+
}, /*#__PURE__*/React.createElement("tspan", {
|
|
136
|
+
className: classNames("doughnut-chart__label", labelClassname),
|
|
137
|
+
"data-testid": TestIds.Label
|
|
138
|
+
}, label)) : null)));
|
|
139
|
+
};
|
|
140
|
+
DoughnutChart.propTypes = {
|
|
141
|
+
label: _pt.string,
|
|
142
|
+
labelClassname: _pt.string,
|
|
143
|
+
className: _pt.string,
|
|
144
|
+
segmentHoverWidth: _pt.number.isRequired,
|
|
145
|
+
segmentThickness: _pt.number.isRequired,
|
|
146
|
+
segments: _pt.arrayOf(_pt.shape({
|
|
147
|
+
color: _pt.string.isRequired,
|
|
148
|
+
tooltip: _pt.string,
|
|
149
|
+
value: _pt.number.isRequired
|
|
150
|
+
})).isRequired,
|
|
151
|
+
size: _pt.number.isRequired,
|
|
152
|
+
chartID: _pt.string.isRequired
|
|
153
|
+
};
|
|
154
|
+
export default DoughnutChart;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@import "vanilla-framework";
|
|
2
|
+
|
|
3
|
+
.doughnut-chart {
|
|
4
|
+
width: 6.5rem;
|
|
5
|
+
|
|
6
|
+
.doughnut-chart__tooltip {
|
|
7
|
+
display: block;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.doughnut-chart__tooltip > :only-child {
|
|
11
|
+
// Override the tooltip wrapper.
|
|
12
|
+
display: block !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.doughnut-chart__chart {
|
|
16
|
+
// Restrict hover areas to the strokes.
|
|
17
|
+
pointer-events: stroke;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.doughnut-chart__segment {
|
|
21
|
+
fill: transparent;
|
|
22
|
+
|
|
23
|
+
// Animate stroke size changes on hover.
|
|
24
|
+
transition: stroke-width 0.3s ease;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.doughnut-chart__legend {
|
|
29
|
+
list-style-type: none;
|
|
30
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import DoughnutChart from "./DoughnutChart";
|
|
3
|
+
declare const meta: Meta<typeof DoughnutChart>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof DoughnutChart>;
|
|
6
|
+
/**
|
|
7
|
+
* The Doughnut Chart component visually represents data segments in a circular format, with tooltips that appear on hover, and segments that can be customized via props.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import DoughnutChart from "./DoughnutChart";
|
|
2
|
+
var meta = {
|
|
3
|
+
component: DoughnutChart,
|
|
4
|
+
tags: ["autodocs"]
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
/**
|
|
8
|
+
* The Doughnut Chart component visually represents data segments in a circular format, with tooltips that appear on hover, and segments that can be customized via props.
|
|
9
|
+
*/
|
|
10
|
+
export var Default = {
|
|
11
|
+
name: "Default",
|
|
12
|
+
args: {
|
|
13
|
+
chartID: "default",
|
|
14
|
+
segmentHoverWidth: 45,
|
|
15
|
+
segmentThickness: 40,
|
|
16
|
+
segments: [{
|
|
17
|
+
color: "#0E8420",
|
|
18
|
+
tooltip: "Running",
|
|
19
|
+
value: 10
|
|
20
|
+
}, {
|
|
21
|
+
color: "#CC7900",
|
|
22
|
+
tooltip: "Stopped",
|
|
23
|
+
value: 15
|
|
24
|
+
}, {
|
|
25
|
+
color: "#C7162B",
|
|
26
|
+
tooltip: "Frozen",
|
|
27
|
+
value: 5
|
|
28
|
+
}, {
|
|
29
|
+
color: "#000",
|
|
30
|
+
tooltip: "Error",
|
|
31
|
+
value: 5
|
|
32
|
+
}],
|
|
33
|
+
size: 150
|
|
34
|
+
}
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./DoughnutChart";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode, HTMLProps, ReactElement } from "react";
|
|
2
|
+
import { PropsWithSpread } from "../../types";
|
|
3
|
+
export type Props = PropsWithSpread<{
|
|
4
|
+
/**
|
|
5
|
+
* The content of the empty state.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Optional class(es) to add to the wrapping element.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* An image representing the empty state.
|
|
14
|
+
*/
|
|
15
|
+
image: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* The title of the empty state.
|
|
18
|
+
*/
|
|
19
|
+
title: string;
|
|
20
|
+
}, HTMLProps<HTMLDivElement>>;
|
|
21
|
+
/**
|
|
22
|
+
* This is a [React](https://reactjs.org/) component to represent an empty state.
|
|
23
|
+
*/
|
|
24
|
+
export declare const EmptyState: ({ children, className, image, title, ...props }: Props) => ReactElement;
|
|
25
|
+
export default EmptyState;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var _excluded = ["children", "className", "image", "title"];
|
|
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
|
+
/**
|
|
8
|
+
* This is a [React](https://reactjs.org/) component to represent an empty state.
|
|
9
|
+
*/
|
|
10
|
+
export var EmptyState = _ref => {
|
|
11
|
+
var {
|
|
12
|
+
children,
|
|
13
|
+
className,
|
|
14
|
+
image,
|
|
15
|
+
title
|
|
16
|
+
} = _ref,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
19
|
+
className: classNames(["row", className])
|
|
20
|
+
}, props), /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: "u-align--right col-4 col-medium-2 col-small-1"
|
|
22
|
+
}, image), /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "u-align--left col-8 col-medium-4 col-small-3"
|
|
24
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
25
|
+
className: "p-heading--4 u-no-margin--bottom"
|
|
26
|
+
}, title), children));
|
|
27
|
+
};
|
|
28
|
+
export default EmptyState;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import EmptyState from "./EmptyState";
|
|
3
|
+
declare const meta: Meta<typeof EmptyState>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof EmptyState>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithContent: Story;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import EmptyState from "./EmptyState";
|
|
3
|
+
import Icon, { ICONS } from "../Icon";
|
|
4
|
+
import Button from "../Button";
|
|
5
|
+
var boxImage = /*#__PURE__*/React.createElement("img", {
|
|
6
|
+
src: "https://assets.ubuntu.com/v1/c17e0d92-container.svg",
|
|
7
|
+
style: {
|
|
8
|
+
maxWidth: "10rem",
|
|
9
|
+
maxHeight: "10rem"
|
|
10
|
+
},
|
|
11
|
+
alt: "empty state"
|
|
12
|
+
});
|
|
13
|
+
var doNothing = () => {};
|
|
14
|
+
var meta = {
|
|
15
|
+
component: EmptyState,
|
|
16
|
+
tags: ["autodocs"]
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
export var Default = {
|
|
20
|
+
render: () => /*#__PURE__*/React.createElement(EmptyState, {
|
|
21
|
+
image: boxImage,
|
|
22
|
+
title: "This application doesn't have any configuration parameters"
|
|
23
|
+
}),
|
|
24
|
+
name: "Default"
|
|
25
|
+
};
|
|
26
|
+
export var WithContent = {
|
|
27
|
+
render: () => /*#__PURE__*/React.createElement(EmptyState, {
|
|
28
|
+
image: boxImage,
|
|
29
|
+
title: "No instances found"
|
|
30
|
+
}, /*#__PURE__*/React.createElement("p", null, "There are no instances in this project. Spin up your first instance!"), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("a", {
|
|
31
|
+
href: "#todo",
|
|
32
|
+
target: "_blank"
|
|
33
|
+
}, "How to create instances", /*#__PURE__*/React.createElement(Icon, {
|
|
34
|
+
name: ICONS.externalLink
|
|
35
|
+
}))), /*#__PURE__*/React.createElement(Button, {
|
|
36
|
+
appearance: "positive",
|
|
37
|
+
onClick: doNothing
|
|
38
|
+
}, "Create instance")),
|
|
39
|
+
name: "With content"
|
|
40
|
+
};
|