@canonical/react-components 1.6.0 → 1.7.1
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.js +1 -1
- 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 +9 -9
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import CodeSnippetDropdown from "./CodeSnippetDropdown";
|
|
5
|
+
export var CodeSnippetBlockAppearance = {
|
|
6
|
+
LINUX_PROMPT: "linuxPrompt",
|
|
7
|
+
NUMBERED: "numbered",
|
|
8
|
+
URL: "url",
|
|
9
|
+
WINDOWS_PROMPT: "windowsPrompt"
|
|
10
|
+
};
|
|
11
|
+
export default function CodeSnippetBlock(_ref) {
|
|
12
|
+
var {
|
|
13
|
+
appearance,
|
|
14
|
+
code,
|
|
15
|
+
content,
|
|
16
|
+
dropdowns,
|
|
17
|
+
stacked = false,
|
|
18
|
+
title,
|
|
19
|
+
wrapLines = false
|
|
20
|
+
} = _ref;
|
|
21
|
+
var className = "p-code-snippet__block";
|
|
22
|
+
var isNumbered = appearance === CodeSnippetBlockAppearance.NUMBERED;
|
|
23
|
+
var hasIcon = appearance === CodeSnippetBlockAppearance.LINUX_PROMPT || appearance === CodeSnippetBlockAppearance.WINDOWS_PROMPT || appearance === CodeSnippetBlockAppearance.URL;
|
|
24
|
+
var numberedCode;
|
|
25
|
+
if (isNumbered) {
|
|
26
|
+
className += "--numbered";
|
|
27
|
+
|
|
28
|
+
// wrap code lines in spans (and preserve the whitespace)
|
|
29
|
+
var lines;
|
|
30
|
+
if (Array.isArray(code)) {
|
|
31
|
+
lines = code;
|
|
32
|
+
} else if (typeof code === "string") {
|
|
33
|
+
lines = code.split(/\r?\n/);
|
|
34
|
+
} else {
|
|
35
|
+
// If the code is not able to be split over multiple lines, then display
|
|
36
|
+
// a single line number.
|
|
37
|
+
lines = [code];
|
|
38
|
+
}
|
|
39
|
+
numberedCode = lines.map((line, i) => /*#__PURE__*/React.createElement(React.Fragment, {
|
|
40
|
+
key: "p-code-snippet__line-".concat(i)
|
|
41
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
42
|
+
className: "p-code-snippet__line"
|
|
43
|
+
}, line), "\n"));
|
|
44
|
+
} else if (hasIcon) {
|
|
45
|
+
className += "--icon";
|
|
46
|
+
}
|
|
47
|
+
className = classNames(className, {
|
|
48
|
+
"is-windows-prompt": appearance === CodeSnippetBlockAppearance.WINDOWS_PROMPT,
|
|
49
|
+
"is-url": appearance === CodeSnippetBlockAppearance.URL,
|
|
50
|
+
"is-wrapped": wrapLines
|
|
51
|
+
});
|
|
52
|
+
var hasDropdowns = dropdowns && dropdowns.length;
|
|
53
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, (title || hasDropdowns) && /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: "p-code-snippet__header ".concat(stacked ? "is-stacked" : "")
|
|
55
|
+
}, /*#__PURE__*/React.createElement("h5", {
|
|
56
|
+
className: "p-code-snippet__title"
|
|
57
|
+
}, title), hasDropdowns && /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "p-code-snippet__dropdowns"
|
|
59
|
+
}, dropdowns.map((dropdown, i) => /*#__PURE__*/React.createElement(CodeSnippetDropdown, _extends({}, dropdown, {
|
|
60
|
+
key: "code-snippet-dropdown-".concat(i)
|
|
61
|
+
}))))), /*#__PURE__*/React.createElement("pre", {
|
|
62
|
+
className: className
|
|
63
|
+
}, /*#__PURE__*/React.createElement("code", null, isNumbered ? numberedCode : code)), content);
|
|
64
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ChangeEventHandler, HTMLProps } from "react";
|
|
2
|
+
export type DropdownOptionProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The label of the dropdown option.
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
} & HTMLProps<HTMLOptionElement>;
|
|
8
|
+
export type Props = {
|
|
9
|
+
/**
|
|
10
|
+
* Function for handling the select value changing.
|
|
11
|
+
*/
|
|
12
|
+
onChange: ChangeEventHandler<HTMLSelectElement>;
|
|
13
|
+
/**
|
|
14
|
+
* Options to pass to the select.
|
|
15
|
+
*/
|
|
16
|
+
options: DropdownOptionProps[];
|
|
17
|
+
} & HTMLProps<HTMLSelectElement>;
|
|
18
|
+
export default function CodeSnippetDropdown({ options, onChange, ...props }: Props): JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var _excluded = ["options", "onChange"],
|
|
2
|
+
_excluded2 = ["label", "value"];
|
|
3
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
5
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
6
|
+
import React from "react";
|
|
7
|
+
export default function CodeSnippetDropdown(_ref) {
|
|
8
|
+
var {
|
|
9
|
+
options,
|
|
10
|
+
onChange
|
|
11
|
+
} = _ref,
|
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/React.createElement("select", _extends({
|
|
14
|
+
className: "p-code-snippet__dropdown",
|
|
15
|
+
onChange: onChange
|
|
16
|
+
}, props), options.map(_ref2 => {
|
|
17
|
+
var {
|
|
18
|
+
label,
|
|
19
|
+
value
|
|
20
|
+
} = _ref2,
|
|
21
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
22
|
+
return /*#__PURE__*/React.createElement("option", _extends({
|
|
23
|
+
value: value,
|
|
24
|
+
key: value + "" || label
|
|
25
|
+
}, props), label);
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default } from "./CodeSnippet";
|
|
2
|
+
export type { Props as CodeSnippetProps } from "./CodeSnippet";
|
|
3
|
+
export { CodeSnippetBlockAppearance } from "./CodeSnippetBlock";
|
|
4
|
+
export type { Props as CodeSnippetBlockProps } from "./CodeSnippetBlock";
|
|
5
|
+
export type { Props as CodeSnippetDropdownProps } from "./CodeSnippetDropdown";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ElementType, HTMLProps, ReactNode } from "react";
|
|
2
|
+
import type { ClassName, PropsWithSpread } from "../../types";
|
|
3
|
+
export type ColSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
4
|
+
export declare const colSizes: ColSize[];
|
|
5
|
+
export type Props = PropsWithSpread<{
|
|
6
|
+
/**
|
|
7
|
+
* The content of the column.
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Optional class(es) to pass to the wrapping element.
|
|
12
|
+
*/
|
|
13
|
+
className?: ClassName;
|
|
14
|
+
/**
|
|
15
|
+
* Optional element type to give the wrapper if not "div".
|
|
16
|
+
*/
|
|
17
|
+
element?: ElementType;
|
|
18
|
+
/**
|
|
19
|
+
* The number of columns to skip before starting on large screens.
|
|
20
|
+
*/
|
|
21
|
+
emptyLarge?: ColSize;
|
|
22
|
+
/**
|
|
23
|
+
* The number of columns to skip before starting on medium screens.
|
|
24
|
+
*/
|
|
25
|
+
emptyMedium?: ColSize;
|
|
26
|
+
/**
|
|
27
|
+
* The number of columns to skip before starting on small screens.
|
|
28
|
+
*/
|
|
29
|
+
emptySmall?: ColSize;
|
|
30
|
+
/**
|
|
31
|
+
* Override for the number of columns the content occupies on large screens.
|
|
32
|
+
*/
|
|
33
|
+
large?: ColSize;
|
|
34
|
+
/**
|
|
35
|
+
* Override for the number of columns the content occupies on medium screens.
|
|
36
|
+
*/
|
|
37
|
+
medium?: ColSize;
|
|
38
|
+
/**
|
|
39
|
+
* The number of columns the content occupies.
|
|
40
|
+
*/
|
|
41
|
+
size: ColSize;
|
|
42
|
+
/**
|
|
43
|
+
* Override for the number of columns the content occupies on small screens.
|
|
44
|
+
*/
|
|
45
|
+
small?: ColSize;
|
|
46
|
+
}, HTMLProps<HTMLElement>>;
|
|
47
|
+
/**
|
|
48
|
+
* This is a [React](https://reactjs.org/) component for use within the Vanilla [Grid](https://docs.vanillaframework.io/patterns/grid/).
|
|
49
|
+
*
|
|
50
|
+
* Vanilla has a responsive grid using a combination of rows and columns.
|
|
51
|
+
*/
|
|
52
|
+
declare const Col: ({ children, className, element: Component, emptyLarge, emptyMedium, emptySmall, large, medium, size, small, ...props }: Props) => JSX.Element;
|
|
53
|
+
export default Col;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var _excluded = ["children", "className", "element", "emptyLarge", "emptyMedium", "emptySmall", "large", "medium", "size", "small"];
|
|
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
|
+
export var colSizes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
8
|
+
/**
|
|
9
|
+
* This is a [React](https://reactjs.org/) component for use within the Vanilla [Grid](https://docs.vanillaframework.io/patterns/grid/).
|
|
10
|
+
*
|
|
11
|
+
* Vanilla has a responsive grid using a combination of rows and columns.
|
|
12
|
+
*/
|
|
13
|
+
var Col = _ref => {
|
|
14
|
+
var {
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
element: Component = "div",
|
|
18
|
+
emptyLarge,
|
|
19
|
+
emptyMedium,
|
|
20
|
+
emptySmall,
|
|
21
|
+
large,
|
|
22
|
+
medium,
|
|
23
|
+
size,
|
|
24
|
+
small
|
|
25
|
+
} = _ref,
|
|
26
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
28
|
+
className: classNames(className, "col-".concat(size), {
|
|
29
|
+
["col-small-".concat(small)]: !!small,
|
|
30
|
+
["col-medium-".concat(medium)]: !!medium,
|
|
31
|
+
["col-large-".concat(large)]: !!large,
|
|
32
|
+
["col-start-small-".concat(emptySmall)]: !!emptySmall,
|
|
33
|
+
["col-start-medium-".concat(emptyMedium)]: !!emptyMedium,
|
|
34
|
+
["col-start-large-".concat(emptyLarge)]: !!emptyLarge
|
|
35
|
+
})
|
|
36
|
+
}, props), children);
|
|
37
|
+
};
|
|
38
|
+
export default Col;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import Col from "./Col";
|
|
4
|
+
declare const Template: (args: any) => React.JSX.Element;
|
|
5
|
+
declare const meta: Meta<typeof Template>;
|
|
6
|
+
export default meta;
|
|
7
|
+
type Story = StoryObj<typeof Col>;
|
|
8
|
+
export declare const Default: Story;
|
|
9
|
+
export declare const Grid: Story;
|
|
10
|
+
export declare const NestedColumns: Story;
|
|
11
|
+
export declare const EmptyColumns: Story;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Col from "./Col";
|
|
3
|
+
import Row from "../Row";
|
|
4
|
+
var Template = args => {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: "grid-demo"
|
|
7
|
+
}, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, args)));
|
|
8
|
+
};
|
|
9
|
+
var meta = {
|
|
10
|
+
component: Col,
|
|
11
|
+
render: Template,
|
|
12
|
+
tags: ["autodocs"],
|
|
13
|
+
argTypes: {
|
|
14
|
+
children: {
|
|
15
|
+
control: {
|
|
16
|
+
type: "text"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "range",
|
|
22
|
+
min: 1,
|
|
23
|
+
max: 12,
|
|
24
|
+
step: 1
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
export var Default = {
|
|
31
|
+
name: "Default",
|
|
32
|
+
args: {
|
|
33
|
+
children: "Hi, I'm Col.",
|
|
34
|
+
size: 12
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export var Grid = {
|
|
38
|
+
render: () => {
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: "grid-demo"
|
|
41
|
+
}, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
42
|
+
size: 12
|
|
43
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-12"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
44
|
+
size: 11
|
|
45
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-11")), /*#__PURE__*/React.createElement(Col, {
|
|
46
|
+
size: 1
|
|
47
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-1"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
48
|
+
size: 10
|
|
49
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-10")), /*#__PURE__*/React.createElement(Col, {
|
|
50
|
+
size: 2
|
|
51
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-2"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
52
|
+
size: 9
|
|
53
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-9")), /*#__PURE__*/React.createElement(Col, {
|
|
54
|
+
size: 3
|
|
55
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-3"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
56
|
+
size: 8
|
|
57
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-8")), /*#__PURE__*/React.createElement(Col, {
|
|
58
|
+
size: 4
|
|
59
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-4"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
60
|
+
size: 7
|
|
61
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-7")), /*#__PURE__*/React.createElement(Col, {
|
|
62
|
+
size: 5
|
|
63
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-5"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
64
|
+
size: 6
|
|
65
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-6")), /*#__PURE__*/React.createElement(Col, {
|
|
66
|
+
size: 6
|
|
67
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-6"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
68
|
+
size: 5
|
|
69
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-5")), /*#__PURE__*/React.createElement(Col, {
|
|
70
|
+
size: 7
|
|
71
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-7"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
72
|
+
size: 4
|
|
73
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-4")), /*#__PURE__*/React.createElement(Col, {
|
|
74
|
+
size: 8
|
|
75
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-8"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
76
|
+
size: 3
|
|
77
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-3")), /*#__PURE__*/React.createElement(Col, {
|
|
78
|
+
size: 9
|
|
79
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-9"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
80
|
+
size: 2
|
|
81
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-2")), /*#__PURE__*/React.createElement(Col, {
|
|
82
|
+
size: 10
|
|
83
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-10"))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
84
|
+
size: 1
|
|
85
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-1")), /*#__PURE__*/React.createElement(Col, {
|
|
86
|
+
size: 11
|
|
87
|
+
}, /*#__PURE__*/React.createElement("span", null, ".col-11"))));
|
|
88
|
+
},
|
|
89
|
+
name: "Grid"
|
|
90
|
+
};
|
|
91
|
+
export var NestedColumns = {
|
|
92
|
+
render: () => {
|
|
93
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: "grid-demo"
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
96
|
+
small: 4,
|
|
97
|
+
medium: 6,
|
|
98
|
+
size: 12
|
|
99
|
+
}, "col-small-4 .col-medium-6 .col-12", /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
100
|
+
small: 3,
|
|
101
|
+
medium: 3,
|
|
102
|
+
size: 9
|
|
103
|
+
}, "col-small-3 .col-medium-3 .col-9", /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
104
|
+
small: 1,
|
|
105
|
+
medium: 1,
|
|
106
|
+
size: 2
|
|
107
|
+
}, "col-small-1 col-medium-1 col-2"), /*#__PURE__*/React.createElement(Col, {
|
|
108
|
+
small: 1,
|
|
109
|
+
medium: 1,
|
|
110
|
+
size: 3
|
|
111
|
+
}, "col-small-1 col-medium-1 col-2"), /*#__PURE__*/React.createElement(Col, {
|
|
112
|
+
small: 1,
|
|
113
|
+
medium: 1,
|
|
114
|
+
size: 3
|
|
115
|
+
}, "col-small-1 col-medium-1 col-2"))), /*#__PURE__*/React.createElement(Col, {
|
|
116
|
+
small: 1,
|
|
117
|
+
medium: 3,
|
|
118
|
+
size: 3
|
|
119
|
+
}, "col-small-2 col-medium-3 col-3")))));
|
|
120
|
+
},
|
|
121
|
+
name: "Nested columns"
|
|
122
|
+
};
|
|
123
|
+
export var EmptyColumns = {
|
|
124
|
+
render: () => {
|
|
125
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
126
|
+
className: "grid-demo"
|
|
127
|
+
}, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
128
|
+
size: 8
|
|
129
|
+
}, ".col-8"), /*#__PURE__*/React.createElement(Col, {
|
|
130
|
+
size: 4
|
|
131
|
+
}, ".col-4")), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
132
|
+
size: 7
|
|
133
|
+
}, ".col-7"), /*#__PURE__*/React.createElement(Col, {
|
|
134
|
+
size: 4
|
|
135
|
+
}, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
136
|
+
size: 3,
|
|
137
|
+
emptyLarge: 2
|
|
138
|
+
}, "col-3 col-start-large-2 inside col-4")))), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
139
|
+
size: 7
|
|
140
|
+
}, ".col-7"), /*#__PURE__*/React.createElement(Col, {
|
|
141
|
+
size: 4
|
|
142
|
+
}, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
143
|
+
size: 3
|
|
144
|
+
}, "col-3 inside col-4")))));
|
|
145
|
+
},
|
|
146
|
+
name: "Empty columns"
|
|
147
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, colSizes } from "./Col";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { PropsWithSpread, SubComponentProps } from "../../types";
|
|
3
|
+
import { ActionButtonProps } from "../ActionButton";
|
|
4
|
+
import { ConfirmationModalProps } from "../ConfirmationModal";
|
|
5
|
+
export type Props = PropsWithSpread<{
|
|
6
|
+
/**
|
|
7
|
+
* Additional props to pass to the confirmation modal.
|
|
8
|
+
*/
|
|
9
|
+
confirmationModalProps: SubComponentProps<ConfirmationModalProps>;
|
|
10
|
+
/**
|
|
11
|
+
* An optional text to be shown when hovering over the button.<br/>
|
|
12
|
+
* Defaults to the label of the confirm button in the modal.
|
|
13
|
+
*/
|
|
14
|
+
onHoverText?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether to enable the SHIFT+Click shortcut to skip the confirmation modal and perform the action.
|
|
17
|
+
*/
|
|
18
|
+
shiftClickEnabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether to show a hint about the SHIFT+Click shortcut to skip the confirmation modal.
|
|
21
|
+
*/
|
|
22
|
+
showShiftClickHint?: boolean;
|
|
23
|
+
}, ActionButtonProps>;
|
|
24
|
+
/**
|
|
25
|
+
* `ConfirmationButton` is a specialised version of the [ActionButton](?path=/docs/actionbutton--default-story) component that uses a [ConfirmationModal](?path=/docs/confirmationmodal--default-story) to prompt a confirmation from the user before executing an action.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ConfirmationButton: ({ confirmationModalProps, onHoverText, shiftClickEnabled, showShiftClickHint, ...actionButtonProps }: Props) => ReactElement;
|
|
28
|
+
export default ConfirmationButton;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var _excluded = ["confirmationModalProps", "onHoverText", "shiftClickEnabled", "showShiftClickHint"];
|
|
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 React from "react";
|
|
6
|
+
import ActionButton from "../ActionButton";
|
|
7
|
+
import ConfirmationModal from "../ConfirmationModal";
|
|
8
|
+
import usePortal from "react-useportal";
|
|
9
|
+
var generateTitle = title => {
|
|
10
|
+
if (typeof title === "string") {
|
|
11
|
+
return title;
|
|
12
|
+
}
|
|
13
|
+
if (typeof title === "number") {
|
|
14
|
+
return title.toString();
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* `ConfirmationButton` is a specialised version of the [ActionButton](?path=/docs/actionbutton--default-story) component that uses a [ConfirmationModal](?path=/docs/confirmationmodal--default-story) to prompt a confirmation from the user before executing an action.
|
|
20
|
+
*/
|
|
21
|
+
export var ConfirmationButton = _ref => {
|
|
22
|
+
var {
|
|
23
|
+
confirmationModalProps,
|
|
24
|
+
onHoverText,
|
|
25
|
+
shiftClickEnabled = false,
|
|
26
|
+
showShiftClickHint = false
|
|
27
|
+
} = _ref,
|
|
28
|
+
actionButtonProps = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
+
var {
|
|
30
|
+
openPortal,
|
|
31
|
+
closePortal,
|
|
32
|
+
isOpen,
|
|
33
|
+
Portal
|
|
34
|
+
} = usePortal();
|
|
35
|
+
var handleCancelModal = () => {
|
|
36
|
+
closePortal();
|
|
37
|
+
if (confirmationModalProps.close) {
|
|
38
|
+
confirmationModalProps.close();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var handleConfirmModal = e => {
|
|
42
|
+
closePortal();
|
|
43
|
+
confirmationModalProps.onConfirm(e);
|
|
44
|
+
};
|
|
45
|
+
var handleShiftClick = e => {
|
|
46
|
+
if (e.shiftKey) {
|
|
47
|
+
confirmationModalProps.onConfirm(e);
|
|
48
|
+
} else {
|
|
49
|
+
openPortal(e);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isOpen && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(ConfirmationModal, _extends({}, confirmationModalProps, {
|
|
53
|
+
close: handleCancelModal,
|
|
54
|
+
confirmButtonLabel: confirmationModalProps.confirmButtonLabel,
|
|
55
|
+
onConfirm: handleConfirmModal
|
|
56
|
+
}), confirmationModalProps.children, showShiftClickHint && /*#__PURE__*/React.createElement("p", {
|
|
57
|
+
className: "p-text--small u-text--muted u-hide--small"
|
|
58
|
+
}, "Next time, you can skip this confirmation by holding", " ", /*#__PURE__*/React.createElement("code", null, "SHIFT"), " and clicking the action."))), /*#__PURE__*/React.createElement(ActionButton, _extends({}, actionButtonProps, {
|
|
59
|
+
onClick: shiftClickEnabled ? handleShiftClick : openPortal,
|
|
60
|
+
title: generateTitle(onHoverText !== null && onHoverText !== void 0 ? onHoverText : confirmationModalProps.confirmButtonLabel)
|
|
61
|
+
}), actionButtonProps.children));
|
|
62
|
+
};
|
|
63
|
+
export default ConfirmationButton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import ConfirmationButton from "./ConfirmationButton";
|
|
3
|
+
declare const meta: Meta<typeof ConfirmationButton>;
|
|
4
|
+
export declare const Default: Story;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof ConfirmationButton>;
|
|
7
|
+
export declare const IconAndLabel: Story;
|
|
8
|
+
export declare const IconOnly: Story;
|
|
9
|
+
export declare const BaseAppearance: Story;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import ConfirmationButton from "./ConfirmationButton";
|
|
4
|
+
import Icon, { ICONS } from "../Icon";
|
|
5
|
+
var doNothing = () => {};
|
|
6
|
+
var meta = {
|
|
7
|
+
component: ConfirmationButton,
|
|
8
|
+
tags: ["autodocs"]
|
|
9
|
+
};
|
|
10
|
+
export var Default = {
|
|
11
|
+
render: () => /*#__PURE__*/React.createElement(ConfirmationButton, {
|
|
12
|
+
confirmationModalProps: {
|
|
13
|
+
title: "Confirm delete",
|
|
14
|
+
confirmButtonLabel: "Delete",
|
|
15
|
+
onConfirm: doNothing,
|
|
16
|
+
children: /*#__PURE__*/React.createElement("p", null, "This will permanently delete the user \"Simon\".", /*#__PURE__*/React.createElement("br", null), "You cannot undo this action.")
|
|
17
|
+
}
|
|
18
|
+
}, "Delete"),
|
|
19
|
+
name: "Default"
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
export var IconAndLabel = {
|
|
23
|
+
render: () => {
|
|
24
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
25
|
+
var [isLoading, setLoading] = useState(false);
|
|
26
|
+
var brieflyLoad = () => {
|
|
27
|
+
setLoading(true);
|
|
28
|
+
setTimeout(() => setLoading(false), 2000);
|
|
29
|
+
};
|
|
30
|
+
return /*#__PURE__*/React.createElement(ConfirmationButton, {
|
|
31
|
+
confirmationModalProps: {
|
|
32
|
+
title: "Confirm delete",
|
|
33
|
+
confirmButtonLabel: "Delete",
|
|
34
|
+
onConfirm: brieflyLoad,
|
|
35
|
+
children: /*#__PURE__*/React.createElement("p", null, "This will permanently delete the user \"Simon\".", /*#__PURE__*/React.createElement("br", null), "You cannot undo this action.")
|
|
36
|
+
},
|
|
37
|
+
className: "has-icon",
|
|
38
|
+
disabled: isLoading,
|
|
39
|
+
loading: isLoading,
|
|
40
|
+
shiftClickEnabled: true,
|
|
41
|
+
showShiftClickHint: true
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
43
|
+
name: ICONS.delete
|
|
44
|
+
}), /*#__PURE__*/React.createElement("span", null, "Delete"));
|
|
45
|
+
},
|
|
46
|
+
name: "Icon and label"
|
|
47
|
+
};
|
|
48
|
+
export var IconOnly = {
|
|
49
|
+
render: () => {
|
|
50
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
51
|
+
var [isLoading, setLoading] = useState(false);
|
|
52
|
+
var brieflyLoad = () => {
|
|
53
|
+
setLoading(true);
|
|
54
|
+
setTimeout(() => setLoading(false), 2000);
|
|
55
|
+
};
|
|
56
|
+
return /*#__PURE__*/React.createElement(ConfirmationButton, {
|
|
57
|
+
confirmationModalProps: {
|
|
58
|
+
title: "Confirm delete",
|
|
59
|
+
confirmButtonLabel: "Delete",
|
|
60
|
+
onConfirm: brieflyLoad,
|
|
61
|
+
children: /*#__PURE__*/React.createElement("p", null, "This will permanently delete the user \"Simon\".", /*#__PURE__*/React.createElement("br", null), "You cannot undo this action.")
|
|
62
|
+
},
|
|
63
|
+
className: "has-icon",
|
|
64
|
+
disabled: isLoading,
|
|
65
|
+
loading: isLoading,
|
|
66
|
+
shiftClickEnabled: true,
|
|
67
|
+
showShiftClickHint: true
|
|
68
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
69
|
+
name: ICONS.delete
|
|
70
|
+
}));
|
|
71
|
+
},
|
|
72
|
+
name: "Icon only"
|
|
73
|
+
};
|
|
74
|
+
export var BaseAppearance = {
|
|
75
|
+
render: () => {
|
|
76
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
77
|
+
var [isLoading, setLoading] = useState(false);
|
|
78
|
+
var brieflyLoad = () => {
|
|
79
|
+
setLoading(true);
|
|
80
|
+
setTimeout(() => setLoading(false), 2000);
|
|
81
|
+
};
|
|
82
|
+
return /*#__PURE__*/React.createElement(ConfirmationButton, {
|
|
83
|
+
appearance: "base",
|
|
84
|
+
confirmationModalProps: {
|
|
85
|
+
title: "Confirm delete",
|
|
86
|
+
confirmButtonLabel: "Delete",
|
|
87
|
+
onConfirm: brieflyLoad,
|
|
88
|
+
children: /*#__PURE__*/React.createElement("p", null, "This will permanently delete the user \"Simon\".", /*#__PURE__*/React.createElement("br", null), "You cannot undo this action.")
|
|
89
|
+
},
|
|
90
|
+
className: "has-icon",
|
|
91
|
+
disabled: isLoading,
|
|
92
|
+
loading: isLoading,
|
|
93
|
+
shiftClickEnabled: true,
|
|
94
|
+
showShiftClickHint: true
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
96
|
+
name: ICONS.delete
|
|
97
|
+
}));
|
|
98
|
+
},
|
|
99
|
+
name: "Base appearance"
|
|
100
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./ConfirmationButton";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { MouseEvent, ReactElement } from "react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import { PropsWithSpread, ValueOf } from "../../types";
|
|
4
|
+
import { ButtonAppearance, ButtonProps } from "../Button";
|
|
5
|
+
import { ModalProps } from "../Modal";
|
|
6
|
+
import { ActionButtonProps } from "../ActionButton";
|
|
7
|
+
export type Props = PropsWithSpread<{
|
|
8
|
+
/**
|
|
9
|
+
* Label for the cancel button.
|
|
10
|
+
*/
|
|
11
|
+
cancelButtonLabel?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Additional props to be spread on the cancel button.
|
|
14
|
+
*/
|
|
15
|
+
cancelButtonProps?: Partial<ButtonProps>;
|
|
16
|
+
/**
|
|
17
|
+
* The content of the modal.
|
|
18
|
+
*/
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Appearance of the confirm button.
|
|
22
|
+
*/
|
|
23
|
+
confirmButtonAppearance?: ValueOf<typeof ButtonAppearance> | string;
|
|
24
|
+
/**
|
|
25
|
+
* Label for the confirm button.
|
|
26
|
+
*/
|
|
27
|
+
confirmButtonLabel: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Additional props to be spread on the confirm button.
|
|
30
|
+
*/
|
|
31
|
+
confirmButtonProps?: Partial<ActionButtonProps>;
|
|
32
|
+
/**
|
|
33
|
+
* Extra elements to be placed in the button row of the modal.
|
|
34
|
+
*/
|
|
35
|
+
confirmExtra?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Function to perform the action prompted by the modal.
|
|
38
|
+
*/
|
|
39
|
+
onConfirm: (event: MouseEvent<HTMLElement>) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the confirm button should be in the loading state.
|
|
42
|
+
*/
|
|
43
|
+
confirmButtonLoading?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the confirm button should be disabled.
|
|
46
|
+
*/
|
|
47
|
+
confirmButtonDisabled?: boolean;
|
|
48
|
+
}, Omit<ModalProps, "buttonRow">>;
|
|
49
|
+
/**
|
|
50
|
+
* `ConfirmationModal` is a specialised version of the [Modal](?path=/docs/modal--default-story) component to prompt a confirmation from the user before executing an action.
|
|
51
|
+
*/
|
|
52
|
+
export declare const ConfirmationModal: ({ cancelButtonLabel, cancelButtonProps, children, confirmButtonAppearance, confirmButtonLabel, confirmExtra, onConfirm, confirmButtonLoading, confirmButtonDisabled, confirmButtonProps, ...props }: Props) => ReactElement;
|
|
53
|
+
export default ConfirmationModal;
|