@canonical/react-components 1.3.0 → 1.3.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-esm/components/Accordion/Accordion.js +52 -0
- package/dist-esm/components/Accordion/AccordionSection/AccordionSection.js +47 -0
- package/dist-esm/components/Accordion/AccordionSection/index.js +1 -0
- package/dist-esm/components/Accordion/index.js +1 -0
- package/dist-esm/components/ActionButton/ActionButton.js +106 -0
- package/dist-esm/components/ActionButton/index.js +1 -0
- package/dist-esm/components/ApplicationLayout/AppAside/AppAside.js +29 -0
- package/dist-esm/components/ApplicationLayout/AppAside/index.js +1 -0
- package/dist-esm/components/ApplicationLayout/AppMain/AppMain.js +21 -0
- package/dist-esm/components/ApplicationLayout/AppMain/index.js +1 -0
- package/dist-esm/components/ApplicationLayout/AppNavigation/AppNavigation.js +31 -0
- package/dist-esm/components/ApplicationLayout/AppNavigation/index.js +1 -0
- package/dist-esm/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.js +24 -0
- package/dist-esm/components/ApplicationLayout/AppNavigationBar/index.js +1 -0
- package/dist-esm/components/ApplicationLayout/AppStatus/AppStatus.js +21 -0
- package/dist-esm/components/ApplicationLayout/AppStatus/index.js +1 -0
- package/dist-esm/components/ApplicationLayout/Application/Application.js +22 -0
- package/dist-esm/components/ApplicationLayout/Application/index.js +1 -0
- package/dist-esm/components/ApplicationLayout/ApplicationLayout.js +113 -0
- package/dist-esm/components/ApplicationLayout/index.js +7 -0
- package/dist-esm/components/ArticlePagination/ArticlePagination.js +39 -0
- package/dist-esm/components/ArticlePagination/index.js +1 -0
- package/dist-esm/components/Badge/Badge.js +64 -0
- package/dist-esm/components/Badge/index.js +1 -0
- package/dist-esm/components/Button/Button.js +55 -0
- package/dist-esm/components/Button/index.js +1 -0
- package/dist-esm/components/Card/Card.js +45 -0
- package/dist-esm/components/Card/index.js +1 -0
- package/dist-esm/components/CheckboxInput/CheckableInput/CheckableInput.js +35 -0
- package/dist-esm/components/CheckboxInput/CheckableInput/index.js +1 -0
- package/dist-esm/components/CheckboxInput/CheckboxInput.js +24 -0
- package/dist-esm/components/CheckboxInput/index.js +1 -0
- package/dist-esm/components/Chip/Chip.js +81 -0
- package/dist-esm/components/Chip/index.js +1 -0
- package/dist-esm/components/Code/Code.js +49 -0
- package/dist-esm/components/Code/index.js +1 -0
- package/dist-esm/components/CodeSnippet/CodeSnippet.js +28 -0
- package/dist-esm/components/CodeSnippet/CodeSnippetBlock.js +64 -0
- package/dist-esm/components/CodeSnippet/CodeSnippetDropdown.js +27 -0
- package/dist-esm/components/CodeSnippet/index.js +2 -0
- package/dist-esm/components/Col/Col.js +38 -0
- package/dist-esm/components/Col/index.js +1 -0
- package/dist-esm/components/ConfirmationButton/ConfirmationButton.js +63 -0
- package/dist-esm/components/ConfirmationButton/index.js +1 -0
- package/dist-esm/components/ConfirmationModal/ConfirmationModal.js +47 -0
- package/dist-esm/components/ConfirmationModal/index.js +1 -0
- package/dist-esm/components/ContextualMenu/ContextualMenu.js +215 -0
- package/dist-esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +249 -0
- package/dist-esm/components/ContextualMenu/ContextualMenuDropdown/index.js +1 -0
- package/dist-esm/components/ContextualMenu/index.js +1 -0
- package/dist-esm/components/EmptyState/EmptyState.js +28 -0
- package/dist-esm/components/EmptyState/index.js +1 -0
- package/dist-esm/components/Field/Field.js +126 -0
- package/dist-esm/components/Field/index.js +1 -0
- package/dist-esm/components/Form/Form.js +28 -0
- package/dist-esm/components/Form/index.js +1 -0
- package/dist-esm/components/FormikField/FormikField.js +33 -0
- package/dist-esm/components/FormikField/index.js +1 -0
- package/dist-esm/components/Icon/Icon.js +61 -0
- package/dist-esm/components/Icon/index.js +1 -0
- package/dist-esm/components/Input/Input.js +103 -0
- package/dist-esm/components/Input/index.js +1 -0
- package/dist-esm/components/Label/Label.js +27 -0
- package/dist-esm/components/Label/index.js +1 -0
- package/dist-esm/components/Link/Link.js +37 -0
- package/dist-esm/components/Link/index.js +1 -0
- package/dist-esm/components/List/List.js +110 -0
- package/dist-esm/components/List/index.js +1 -0
- package/dist-esm/components/Loader/Loader.js +14 -0
- package/dist-esm/components/Loader/index.js +1 -0
- package/dist-esm/components/LoginPageLayout/LoginPageLayout.js +63 -0
- package/dist-esm/components/LoginPageLayout/index.js +1 -0
- package/dist-esm/components/MainTable/MainTable.js +211 -0
- package/dist-esm/components/MainTable/index.js +1 -0
- package/dist-esm/components/Modal/Modal.js +135 -0
- package/dist-esm/components/Modal/index.js +1 -0
- package/dist-esm/components/ModularTable/ModularTable.js +166 -0
- package/dist-esm/components/ModularTable/index.js +1 -0
- package/dist-esm/components/MultiSelect/FadeInDown/FadeInDown.js +25 -0
- package/dist-esm/components/MultiSelect/FadeInDown/index.js +1 -0
- package/dist-esm/components/MultiSelect/MultiSelect.js +308 -0
- package/dist-esm/components/MultiSelect/index.js +1 -0
- package/dist-esm/components/Navigation/Navigation.js +215 -0
- package/dist-esm/components/Navigation/NavigationLink/NavigationLink.js +58 -0
- package/dist-esm/components/Navigation/NavigationLink/index.js +1 -0
- package/dist-esm/components/Navigation/NavigationMenu/NavigationMenu.js +57 -0
- package/dist-esm/components/Navigation/NavigationMenu/index.js +1 -0
- package/dist-esm/components/Navigation/index.js +1 -0
- package/dist-esm/components/Navigation/types.js +1 -0
- package/dist-esm/components/Notification/Notification.js +119 -0
- package/dist-esm/components/Notification/index.js +1 -0
- package/dist-esm/components/NotificationProvider/NotificationProvider.js +83 -0
- package/dist-esm/components/NotificationProvider/index.js +2 -0
- package/dist-esm/components/NotificationProvider/messageBuilder.js +31 -0
- package/dist-esm/components/NotificationProvider/types.js +1 -0
- package/dist-esm/components/Pagination/Pagination.js +173 -0
- package/dist-esm/components/Pagination/PaginationButton/PaginationButton.js +31 -0
- package/dist-esm/components/Pagination/PaginationButton/index.js +1 -0
- package/dist-esm/components/Pagination/PaginationItem/PaginationItem.js +20 -0
- package/dist-esm/components/Pagination/PaginationItem/index.js +1 -0
- package/dist-esm/components/Pagination/index.js +1 -0
- package/dist-esm/components/Panel/Panel.js +89 -0
- package/dist-esm/components/Panel/index.js +1 -0
- package/dist-esm/components/PasswordToggle/PasswordToggle.js +90 -0
- package/dist-esm/components/PasswordToggle/index.js +1 -0
- package/dist-esm/components/RadioInput/RadioInput.js +22 -0
- package/dist-esm/components/RadioInput/index.js +1 -0
- package/dist-esm/components/Row/Row.js +22 -0
- package/dist-esm/components/Row/index.js +1 -0
- package/dist-esm/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.js +107 -0
- package/dist-esm/components/SearchAndFilter/FilterPanelSection/index.js +1 -0
- package/dist-esm/components/SearchAndFilter/SearchAndFilter.js +286 -0
- package/dist-esm/components/SearchAndFilter/index.js +1 -0
- package/dist-esm/components/SearchAndFilter/types.js +1 -0
- package/dist-esm/components/SearchAndFilter/utils.js +22 -0
- package/dist-esm/components/SearchBox/SearchBox.js +95 -0
- package/dist-esm/components/SearchBox/index.js +1 -0
- package/dist-esm/components/Select/Select.js +84 -0
- package/dist-esm/components/Select/index.js +1 -0
- package/dist-esm/components/SideNavigation/SideNavigation.js +89 -0
- package/dist-esm/components/SideNavigation/SideNavigationBase/SideNavigationBase.js +31 -0
- package/dist-esm/components/SideNavigation/SideNavigationBase/index.js +1 -0
- package/dist-esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.js +32 -0
- package/dist-esm/components/SideNavigation/SideNavigationItem/index.js +1 -0
- package/dist-esm/components/SideNavigation/SideNavigationLink/SideNavigationLink.js +25 -0
- package/dist-esm/components/SideNavigation/SideNavigationLink/index.js +1 -0
- package/dist-esm/components/SideNavigation/SideNavigationText/SideNavigationText.js +20 -0
- package/dist-esm/components/SideNavigation/SideNavigationText/index.js +1 -0
- package/dist-esm/components/SideNavigation/index.js +4 -0
- package/dist-esm/components/Slider/Slider.js +83 -0
- package/dist-esm/components/Slider/index.js +1 -0
- package/dist-esm/components/Spinner/Spinner.js +36 -0
- package/dist-esm/components/Spinner/index.js +1 -0
- package/dist-esm/components/StatusLabel/StatusLabel.js +36 -0
- package/dist-esm/components/StatusLabel/index.js +1 -0
- package/dist-esm/components/Strip/Strip.js +50 -0
- package/dist-esm/components/Strip/index.js +1 -0
- package/dist-esm/components/SummaryButton/SummaryButton.js +28 -0
- package/dist-esm/components/SummaryButton/index.js +1 -0
- package/dist-esm/components/Switch/Switch.js +28 -0
- package/dist-esm/components/Switch/index.js +1 -0
- package/dist-esm/components/Table/Table.js +23 -0
- package/dist-esm/components/Table/index.js +1 -0
- package/dist-esm/components/TableCell/TableCell.js +26 -0
- package/dist-esm/components/TableCell/index.js +1 -0
- package/dist-esm/components/TableHeader/TableHeader.js +17 -0
- package/dist-esm/components/TableHeader/index.js +1 -0
- package/dist-esm/components/TablePagination/TablePagination.js +104 -0
- package/dist-esm/components/TablePagination/TablePaginationControls/TablePaginationControls.js +120 -0
- package/dist-esm/components/TablePagination/TablePaginationControls/index.js +1 -0
- package/dist-esm/components/TablePagination/index.js +1 -0
- package/dist-esm/components/TablePagination/utils.js +67 -0
- package/dist-esm/components/TableRow/TableRow.js +15 -0
- package/dist-esm/components/TableRow/index.js +1 -0
- package/dist-esm/components/Tabs/Tabs.js +42 -0
- package/dist-esm/components/Tabs/index.js +1 -0
- package/dist-esm/components/Textarea/Textarea.js +115 -0
- package/dist-esm/components/Textarea/index.js +1 -0
- package/dist-esm/components/Tooltip/Tooltip.js +245 -0
- package/dist-esm/components/Tooltip/index.js +1 -0
- package/dist-esm/enums.js +8 -0
- package/dist-esm/hooks/index.js +8 -0
- package/dist-esm/hooks/useId.js +13 -0
- package/dist-esm/hooks/useListener.js +51 -0
- package/dist-esm/hooks/useOnClickOutside.js +38 -0
- package/dist-esm/hooks/useOnEscapePressed.js +25 -0
- package/dist-esm/hooks/usePagination.js +45 -0
- package/dist-esm/hooks/usePrevious.js +16 -0
- package/dist-esm/hooks/useThrottle.js +49 -0
- package/dist-esm/hooks/useWindowFitment.js +109 -0
- package/dist-esm/index.js +69 -0
- package/dist-esm/types/index.js +1 -0
- package/dist-esm/types/react-table-config.d.js +1 -0
- package/dist-esm/utils.js +41 -0
- package/dist-types/components/Accordion/Accordion.d.ts +46 -0
- package/dist-types/components/Accordion/AccordionSection/AccordionSection.d.ts +34 -0
- package/dist-types/components/Accordion/AccordionSection/index.d.ts +2 -0
- package/dist-types/components/Accordion/index.d.ts +2 -0
- package/dist-types/components/ActionButton/ActionButton.d.ts +48 -0
- package/dist-types/components/ActionButton/index.d.ts +2 -0
- package/dist-types/components/ApplicationLayout/AppAside/AppAside.d.ts +33 -0
- package/dist-types/components/ApplicationLayout/AppAside/index.d.ts +2 -0
- package/dist-types/components/ApplicationLayout/AppMain/AppMain.d.ts +14 -0
- package/dist-types/components/ApplicationLayout/AppMain/index.d.ts +2 -0
- package/dist-types/components/ApplicationLayout/AppNavigation/AppNavigation.d.ts +26 -0
- package/dist-types/components/ApplicationLayout/AppNavigation/index.d.ts +2 -0
- package/dist-types/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.d.ts +18 -0
- package/dist-types/components/ApplicationLayout/AppNavigationBar/index.d.ts +2 -0
- package/dist-types/components/ApplicationLayout/AppStatus/AppStatus.d.ts +14 -0
- package/dist-types/components/ApplicationLayout/AppStatus/index.d.ts +2 -0
- package/dist-types/components/ApplicationLayout/Application/Application.d.ts +15 -0
- package/dist-types/components/ApplicationLayout/Application/index.d.ts +2 -0
- package/dist-types/components/ApplicationLayout/ApplicationLayout.d.ts +89 -0
- package/dist-types/components/ApplicationLayout/index.d.ts +7 -0
- package/dist-types/components/ArticlePagination/ArticlePagination.d.ts +31 -0
- package/dist-types/components/ArticlePagination/index.d.ts +2 -0
- package/dist-types/components/Badge/Badge.d.ts +34 -0
- package/dist-types/components/Badge/index.d.ts +2 -0
- package/dist-types/components/Button/Button.d.ts +64 -0
- package/dist-types/components/Button/index.d.ts +2 -0
- package/dist-types/components/Card/Card.d.ts +35 -0
- package/dist-types/components/Card/index.d.ts +2 -0
- package/dist-types/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +27 -0
- package/dist-types/components/CheckboxInput/CheckableInput/index.d.ts +2 -0
- package/dist-types/components/CheckboxInput/CheckboxInput.d.ts +9 -0
- package/dist-types/components/CheckboxInput/index.d.ts +2 -0
- package/dist-types/components/Chip/Chip.d.ts +56 -0
- package/dist-types/components/Chip/index.d.ts +2 -0
- package/dist-types/components/Code/Code.d.ts +13 -0
- package/dist-types/components/Code/index.d.ts +2 -0
- package/dist-types/components/CodeSnippet/CodeSnippet.d.ts +21 -0
- package/dist-types/components/CodeSnippet/CodeSnippetBlock.d.ts +40 -0
- package/dist-types/components/CodeSnippet/CodeSnippetDropdown.d.ts +18 -0
- package/dist-types/components/CodeSnippet/index.d.ts +5 -0
- package/dist-types/components/Col/Col.d.ts +53 -0
- package/dist-types/components/Col/index.d.ts +2 -0
- package/dist-types/components/ConfirmationButton/ConfirmationButton.d.ts +28 -0
- package/dist-types/components/ConfirmationButton/index.d.ts +2 -0
- package/dist-types/components/ConfirmationModal/ConfirmationModal.d.ts +53 -0
- package/dist-types/components/ConfirmationModal/index.d.ts +2 -0
- package/dist-types/components/ContextualMenu/ContextualMenu.d.ts +110 -0
- package/dist-types/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +43 -0
- package/dist-types/components/ContextualMenu/ContextualMenuDropdown/index.d.ts +2 -0
- package/dist-types/components/ContextualMenu/index.d.ts +3 -0
- package/dist-types/components/EmptyState/EmptyState.d.ts +25 -0
- package/dist-types/components/EmptyState/index.d.ts +2 -0
- package/dist-types/components/Field/Field.d.ts +77 -0
- package/dist-types/components/Field/index.d.ts +2 -0
- package/dist-types/components/Form/Form.d.ts +21 -0
- package/dist-types/components/Form/index.d.ts +2 -0
- package/dist-types/components/FormikField/FormikField.d.ts +25 -0
- package/dist-types/components/FormikField/index.d.ts +1 -0
- package/dist-types/components/Icon/Icon.d.ts +59 -0
- package/dist-types/components/Icon/index.d.ts +2 -0
- package/dist-types/components/Input/Input.d.ts +70 -0
- package/dist-types/components/Input/index.d.ts +2 -0
- package/dist-types/components/Label/Label.d.ts +25 -0
- package/dist-types/components/Label/index.d.ts +2 -0
- package/dist-types/components/Link/Link.d.ts +31 -0
- package/dist-types/components/Link/index.d.ts +2 -0
- package/dist-types/components/List/List.d.ts +36 -0
- package/dist-types/components/List/index.d.ts +2 -0
- package/dist-types/components/Loader/Loader.d.ts +6 -0
- package/dist-types/components/Loader/index.d.ts +1 -0
- package/dist-types/components/LoginPageLayout/LoginPageLayout.d.ts +17 -0
- package/dist-types/components/LoginPageLayout/index.d.ts +2 -0
- package/dist-types/components/MainTable/MainTable.d.ts +102 -0
- package/dist-types/components/MainTable/index.d.ts +2 -0
- package/dist-types/components/Modal/Modal.d.ts +36 -0
- package/dist-types/components/Modal/index.d.ts +2 -0
- package/dist-types/components/ModularTable/ModularTable.d.ts +105 -0
- package/dist-types/components/ModularTable/index.d.ts +2 -0
- package/dist-types/components/MultiSelect/FadeInDown/FadeInDown.d.ts +10 -0
- package/dist-types/components/MultiSelect/FadeInDown/index.d.ts +1 -0
- package/dist-types/components/MultiSelect/MultiSelect.d.ts +57 -0
- package/dist-types/components/MultiSelect/index.d.ts +1 -0
- package/dist-types/components/Navigation/Navigation.d.ts +66 -0
- package/dist-types/components/Navigation/NavigationLink/NavigationLink.d.ts +10 -0
- package/dist-types/components/Navigation/NavigationLink/index.d.ts +1 -0
- package/dist-types/components/Navigation/NavigationMenu/NavigationMenu.d.ts +11 -0
- package/dist-types/components/Navigation/NavigationMenu/index.d.ts +1 -0
- package/dist-types/components/Navigation/index.d.ts +3 -0
- package/dist-types/components/Navigation/types.d.ts +64 -0
- package/dist-types/components/Notification/Notification.d.ts +110 -0
- package/dist-types/components/Notification/index.d.ts +2 -0
- package/dist-types/components/NotificationProvider/NotificationProvider.d.ts +5 -0
- package/dist-types/components/NotificationProvider/index.d.ts +3 -0
- package/dist-types/components/NotificationProvider/messageBuilder.d.ts +6 -0
- package/dist-types/components/NotificationProvider/types.d.ts +35 -0
- package/dist-types/components/Pagination/Pagination.d.ts +102 -0
- package/dist-types/components/Pagination/PaginationButton/PaginationButton.d.ts +30 -0
- package/dist-types/components/Pagination/PaginationButton/index.d.ts +2 -0
- package/dist-types/components/Pagination/PaginationItem/PaginationItem.d.ts +17 -0
- package/dist-types/components/Pagination/PaginationItem/index.d.ts +2 -0
- package/dist-types/components/Pagination/index.d.ts +2 -0
- package/dist-types/components/Panel/Panel.d.ts +123 -0
- package/dist-types/components/Panel/index.d.ts +1 -0
- package/dist-types/components/PasswordToggle/PasswordToggle.d.ts +108 -0
- package/dist-types/components/PasswordToggle/index.d.ts +2 -0
- package/dist-types/components/RadioInput/RadioInput.d.ts +9 -0
- package/dist-types/components/RadioInput/index.d.ts +2 -0
- package/dist-types/components/Row/Row.d.ts +19 -0
- package/dist-types/components/Row/index.d.ts +2 -0
- package/dist-types/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +25 -0
- package/dist-types/components/SearchAndFilter/FilterPanelSection/index.d.ts +1 -0
- package/dist-types/components/SearchAndFilter/SearchAndFilter.d.ts +33 -0
- package/dist-types/components/SearchAndFilter/index.d.ts +2 -0
- package/dist-types/components/SearchAndFilter/types.d.ts +11 -0
- package/dist-types/components/SearchAndFilter/utils.d.ts +13 -0
- package/dist-types/components/SearchBox/SearchBox.d.ts +63 -0
- package/dist-types/components/SearchBox/index.d.ts +2 -0
- package/dist-types/components/Select/Select.d.ts +71 -0
- package/dist-types/components/Select/index.d.ts +2 -0
- package/dist-types/components/SideNavigation/SideNavigation.d.ts +50 -0
- package/dist-types/components/SideNavigation/SideNavigationBase/SideNavigationBase.d.ts +31 -0
- package/dist-types/components/SideNavigation/SideNavigationBase/index.d.ts +1 -0
- package/dist-types/components/SideNavigation/SideNavigationItem/SideNavigationItem.d.ts +20 -0
- package/dist-types/components/SideNavigation/SideNavigationItem/index.d.ts +1 -0
- package/dist-types/components/SideNavigation/SideNavigationLink/SideNavigationLink.d.ts +18 -0
- package/dist-types/components/SideNavigation/SideNavigationLink/index.d.ts +1 -0
- package/dist-types/components/SideNavigation/SideNavigationText/SideNavigationText.d.ts +7 -0
- package/dist-types/components/SideNavigation/SideNavigationText/index.d.ts +1 -0
- package/dist-types/components/SideNavigation/index.d.ts +5 -0
- package/dist-types/components/Slider/Slider.d.ts +62 -0
- package/dist-types/components/Slider/index.d.ts +2 -0
- package/dist-types/components/Spinner/Spinner.d.ts +29 -0
- package/dist-types/components/Spinner/index.d.ts +2 -0
- package/dist-types/components/StatusLabel/StatusLabel.d.ts +33 -0
- package/dist-types/components/StatusLabel/index.d.ts +2 -0
- package/dist-types/components/Strip/Strip.d.ts +64 -0
- package/dist-types/components/Strip/index.d.ts +2 -0
- package/dist-types/components/SummaryButton/SummaryButton.d.ts +29 -0
- package/dist-types/components/SummaryButton/index.d.ts +2 -0
- package/dist-types/components/Switch/Switch.d.ts +17 -0
- package/dist-types/components/Switch/index.d.ts +2 -0
- package/dist-types/components/Table/Table.d.ts +22 -0
- package/dist-types/components/Table/index.d.ts +2 -0
- package/dist-types/components/TableCell/TableCell.d.ts +26 -0
- package/dist-types/components/TableCell/index.d.ts +2 -0
- package/dist-types/components/TableHeader/TableHeader.d.ts +14 -0
- package/dist-types/components/TableHeader/index.d.ts +2 -0
- package/dist-types/components/TablePagination/TablePagination.d.ts +98 -0
- package/dist-types/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +24 -0
- package/dist-types/components/TablePagination/TablePaginationControls/index.d.ts +2 -0
- package/dist-types/components/TablePagination/index.d.ts +2 -0
- package/dist-types/components/TablePagination/utils.d.ts +27 -0
- package/dist-types/components/TableRow/TableRow.d.ts +10 -0
- package/dist-types/components/TableRow/index.d.ts +2 -0
- package/dist-types/components/Tabs/Tabs.d.ts +45 -0
- package/dist-types/components/Tabs/index.d.ts +2 -0
- package/dist-types/components/Textarea/Textarea.d.ts +70 -0
- package/dist-types/components/Textarea/index.d.ts +2 -0
- package/dist-types/components/Tooltip/Tooltip.d.ts +75 -0
- package/dist-types/components/Tooltip/index.d.ts +2 -0
- package/dist-types/enums.d.ts +13 -0
- package/dist-types/hooks/index.d.ts +9 -0
- package/dist-types/hooks/useId.d.ts +4 -0
- package/dist-types/hooks/useListener.d.ts +11 -0
- package/dist-types/hooks/useOnClickOutside.d.ts +12 -0
- package/dist-types/hooks/useOnEscapePressed.d.ts +6 -0
- package/dist-types/hooks/usePagination.d.ts +19 -0
- package/dist-types/hooks/usePrevious.d.ts +7 -0
- package/dist-types/hooks/useThrottle.d.ts +9 -0
- package/dist-types/hooks/useWindowFitment.d.ts +54 -0
- package/dist-types/index.d.ts +132 -0
- package/dist-types/types/index.d.ts +38 -0
- package/dist-types/utils.d.ts +27 -0
- package/package.json +3 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var _excluded = ["items"],
|
|
2
|
+
_excluded2 = ["children", "className", "dark", "hasIcons", "items", "linkComponent", "listClassName", "navClassName"];
|
|
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
|
+
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); }
|
|
6
|
+
import React from "react";
|
|
7
|
+
import classNames from "classnames";
|
|
8
|
+
import SideNavigationItem from "./SideNavigationItem";
|
|
9
|
+
import { isReactNode } from "../../utils";
|
|
10
|
+
var generateItem = (item, index, linkComponent, dark) => {
|
|
11
|
+
if (isReactNode(item)) {
|
|
12
|
+
return /*#__PURE__*/React.createElement(SideNavigationItem, {
|
|
13
|
+
key: index
|
|
14
|
+
}, item);
|
|
15
|
+
}
|
|
16
|
+
if ("nonInteractive" in item) {
|
|
17
|
+
var _item$dark;
|
|
18
|
+
return /*#__PURE__*/React.createElement(SideNavigationItem, _extends({}, item, {
|
|
19
|
+
dark: (_item$dark = item.dark) !== null && _item$dark !== void 0 ? _item$dark : dark,
|
|
20
|
+
key: index
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
if ("children" in item) {
|
|
24
|
+
return /*#__PURE__*/React.createElement(SideNavigationItem, _extends({
|
|
25
|
+
key: index
|
|
26
|
+
}, item));
|
|
27
|
+
}
|
|
28
|
+
if ("label" in item) {
|
|
29
|
+
var _item$component, _item$dark2;
|
|
30
|
+
return /*#__PURE__*/React.createElement(SideNavigationItem, _extends({
|
|
31
|
+
component: (_item$component = item.component) !== null && _item$component !== void 0 ? _item$component : linkComponent,
|
|
32
|
+
dark: (_item$dark2 = item.dark) !== null && _item$dark2 !== void 0 ? _item$dark2 : dark
|
|
33
|
+
}, item, {
|
|
34
|
+
key: index
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
};
|
|
39
|
+
var generateItems = (groups, listClassName, linkComponent, dark) => {
|
|
40
|
+
return groups === null || groups === void 0 ? void 0 : groups.filter(Boolean).map((group, g) => {
|
|
41
|
+
var items;
|
|
42
|
+
var props = {};
|
|
43
|
+
if (typeof group === "object" && "items" in group) {
|
|
44
|
+
var _group = group;
|
|
45
|
+
({
|
|
46
|
+
items
|
|
47
|
+
} = _group);
|
|
48
|
+
props = _objectWithoutProperties(_group, _excluded);
|
|
49
|
+
_group;
|
|
50
|
+
} else {
|
|
51
|
+
items = group;
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/React.createElement("ul", _extends({}, props, {
|
|
54
|
+
className: classNames("p-side-navigation__list", listClassName, "className" in group ? group.className : null),
|
|
55
|
+
key: g
|
|
56
|
+
}), items.filter(Boolean).map((item, i) => generateItem(item, i, linkComponent, dark)));
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
var getHasIcons = groups => groups === null || groups === void 0 ? void 0 : groups.some(group => {
|
|
60
|
+
var _ref;
|
|
61
|
+
return (_ref = group && "items" in group ? group.items : group) === null || _ref === void 0 ? void 0 : _ref.some(item => isReactNode(item) ? false : item && "icon" in item && !!item.icon);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* This is a [React](https://reactjs.org/) component for side navigation, used
|
|
66
|
+
* in the [Vanilla](https://vanillaframework.io/docs/) layouts.
|
|
67
|
+
*/
|
|
68
|
+
var SideNavigation = _ref2 => {
|
|
69
|
+
var {
|
|
70
|
+
children,
|
|
71
|
+
className,
|
|
72
|
+
dark,
|
|
73
|
+
hasIcons,
|
|
74
|
+
items,
|
|
75
|
+
linkComponent,
|
|
76
|
+
listClassName,
|
|
77
|
+
navClassName
|
|
78
|
+
} = _ref2,
|
|
79
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
81
|
+
className: classNames(className, {
|
|
82
|
+
"p-side-navigation--icons": hasIcons || getHasIcons(items),
|
|
83
|
+
"is-dark": dark
|
|
84
|
+
})
|
|
85
|
+
}, props), /*#__PURE__*/React.createElement("nav", {
|
|
86
|
+
className: navClassName
|
|
87
|
+
}, children !== null && children !== void 0 ? children : generateItems(items, listClassName, linkComponent, dark)));
|
|
88
|
+
};
|
|
89
|
+
export default SideNavigation;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var _excluded = ["component", "dark", "icon", "label", "status", "forwardRef"];
|
|
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 Icon from "../../Icon";
|
|
7
|
+
var SideNavigationBase = _ref => {
|
|
8
|
+
var {
|
|
9
|
+
component: Component,
|
|
10
|
+
dark,
|
|
11
|
+
icon,
|
|
12
|
+
label,
|
|
13
|
+
status,
|
|
14
|
+
forwardRef
|
|
15
|
+
} = _ref,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
18
|
+
ref: forwardRef
|
|
19
|
+
}, props), icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
20
|
+
name: icon,
|
|
21
|
+
light: dark,
|
|
22
|
+
className: "p-side-navigation__icon"
|
|
23
|
+
}) : null, /*#__PURE__*/React.createElement("span", {
|
|
24
|
+
className: "p-side-navigation__label"
|
|
25
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
26
|
+
className: "p-side-navigation__label"
|
|
27
|
+
}, label)), status ? /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: "p-side-navigation__status"
|
|
29
|
+
}, status) : null);
|
|
30
|
+
};
|
|
31
|
+
export default SideNavigationBase;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SideNavigationBase";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var _excluded = ["nonInteractive"],
|
|
2
|
+
_excluded2 = ["children"];
|
|
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
|
+
import SideNavigationLink from "../SideNavigationLink";
|
|
8
|
+
import SideNavigationText from "../SideNavigationText";
|
|
9
|
+
var SideNavigationItem = props => {
|
|
10
|
+
var content;
|
|
11
|
+
var liProps = {};
|
|
12
|
+
if ("nonInteractive" in props) {
|
|
13
|
+
var {
|
|
14
|
+
nonInteractive: _
|
|
15
|
+
} = props,
|
|
16
|
+
textProps = _objectWithoutProperties(props, _excluded);
|
|
17
|
+
content = /*#__PURE__*/React.createElement(SideNavigationText, textProps);
|
|
18
|
+
} else if (!("children" in props)) {
|
|
19
|
+
content = /*#__PURE__*/React.createElement(SideNavigationLink, props);
|
|
20
|
+
} else {
|
|
21
|
+
var _props = props;
|
|
22
|
+
({
|
|
23
|
+
children: content
|
|
24
|
+
} = _props);
|
|
25
|
+
liProps = _objectWithoutProperties(_props, _excluded2);
|
|
26
|
+
_props;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/React.createElement("li", _extends({
|
|
29
|
+
className: "p-side-navigation__item"
|
|
30
|
+
}, liProps), content);
|
|
31
|
+
};
|
|
32
|
+
export default SideNavigationItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SideNavigationItem";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var _excluded = ["component", "forwardRef"];
|
|
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 classNames from "classnames";
|
|
7
|
+
import SideNavigationBase from "../SideNavigationBase";
|
|
8
|
+
var SideNavigationLink = _ref => {
|
|
9
|
+
var {
|
|
10
|
+
component,
|
|
11
|
+
forwardRef
|
|
12
|
+
} = _ref,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
var className = null;
|
|
15
|
+
if ("className" in props && typeof props.className === "string") {
|
|
16
|
+
className = props.className;
|
|
17
|
+
delete props.className;
|
|
18
|
+
}
|
|
19
|
+
return /*#__PURE__*/React.createElement(SideNavigationBase, _extends({
|
|
20
|
+
className: classNames("p-side-navigation__link", className),
|
|
21
|
+
component: component !== null && component !== void 0 ? component : "a",
|
|
22
|
+
forwardRef: forwardRef
|
|
23
|
+
}, props));
|
|
24
|
+
};
|
|
25
|
+
export default SideNavigationLink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SideNavigationLink";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var _excluded = ["children", "className"];
|
|
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 classNames from "classnames";
|
|
7
|
+
import SideNavigationBase from "../SideNavigationBase";
|
|
8
|
+
var SideNavigationText = _ref => {
|
|
9
|
+
var {
|
|
10
|
+
children,
|
|
11
|
+
className
|
|
12
|
+
} = _ref,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
return /*#__PURE__*/React.createElement(SideNavigationBase, _extends({
|
|
15
|
+
className: classNames("p-side-navigation__text", className),
|
|
16
|
+
component: "span",
|
|
17
|
+
label: children
|
|
18
|
+
}, props));
|
|
19
|
+
};
|
|
20
|
+
export default SideNavigationText;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SideNavigationText";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var _excluded = ["caution", "disabled", "error", "help", "id", "inputDisabled", "label", "max", "min", "onChange", "required", "showInput"];
|
|
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, { useId } from "react";
|
|
6
|
+
import Field from "../Field";
|
|
7
|
+
export var FILLED_COLOR = "#0066CC";
|
|
8
|
+
export var EMPTY_COLOR = "#D9D9D9";
|
|
9
|
+
/**
|
|
10
|
+
* This is the [React](https://reactjs.org/) component for the Vanilla [Slider](https://vanillaframework.io/docs/patterns/slider).
|
|
11
|
+
*
|
|
12
|
+
* Sliders should be used to let a user specify a numeric value between a defined
|
|
13
|
+
minimum and maximum value, however the precise value is not especially important.
|
|
14
|
+
*/
|
|
15
|
+
export var Slider = _ref => {
|
|
16
|
+
var _navigator;
|
|
17
|
+
var {
|
|
18
|
+
caution,
|
|
19
|
+
disabled = false,
|
|
20
|
+
error,
|
|
21
|
+
help,
|
|
22
|
+
id,
|
|
23
|
+
inputDisabled = false,
|
|
24
|
+
label,
|
|
25
|
+
max,
|
|
26
|
+
min,
|
|
27
|
+
onChange,
|
|
28
|
+
required = false,
|
|
29
|
+
showInput = false
|
|
30
|
+
} = _ref,
|
|
31
|
+
inputProps = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var validationId = useId();
|
|
33
|
+
var helpId = useId();
|
|
34
|
+
var defaultSliderId = useId();
|
|
35
|
+
var sliderId = id || defaultSliderId;
|
|
36
|
+
var hasError = !!error;
|
|
37
|
+
var style = {};
|
|
38
|
+
if ((_navigator = navigator) !== null && _navigator !== void 0 && (_navigator = _navigator.userAgent) !== null && _navigator !== void 0 && _navigator.includes("AppleWebKit")) {
|
|
39
|
+
var _inputProps$value;
|
|
40
|
+
// Range inputs on Webkit browsers don't have a built-in "filled" portion,
|
|
41
|
+
// so instead it is handled here as a background.
|
|
42
|
+
var val = (_inputProps$value = inputProps.value) !== null && _inputProps$value !== void 0 ? _inputProps$value : inputProps.defaultValue;
|
|
43
|
+
var filledPercentage = "".concat((Number(val) - min) / (max - min) * 100, "%");
|
|
44
|
+
style = {
|
|
45
|
+
background: "linear-gradient(\n to right,\n ".concat(FILLED_COLOR, " 0%,\n ").concat(FILLED_COLOR, " ").concat(filledPercentage, ",\n ").concat(EMPTY_COLOR, " ").concat(filledPercentage, ",\n ").concat(EMPTY_COLOR, " 100%\n )")
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return /*#__PURE__*/React.createElement(Field, {
|
|
49
|
+
caution: caution,
|
|
50
|
+
error: error,
|
|
51
|
+
help: help,
|
|
52
|
+
forId: sliderId,
|
|
53
|
+
helpId: helpId,
|
|
54
|
+
label: label,
|
|
55
|
+
required: required,
|
|
56
|
+
validationId: validationId
|
|
57
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "p-slider__wrapper"
|
|
59
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
60
|
+
"aria-describedby": help ? helpId : null,
|
|
61
|
+
"aria-errormessage": hasError ? validationId : null,
|
|
62
|
+
"aria-invalid": hasError,
|
|
63
|
+
disabled: disabled,
|
|
64
|
+
id: sliderId,
|
|
65
|
+
max: max,
|
|
66
|
+
min: min,
|
|
67
|
+
onChange: onChange,
|
|
68
|
+
required: required,
|
|
69
|
+
style: style,
|
|
70
|
+
type: "range"
|
|
71
|
+
}, inputProps)), showInput && /*#__PURE__*/React.createElement("input", _extends({
|
|
72
|
+
"aria-describedby": help ? helpId : null,
|
|
73
|
+
"aria-errormessage": hasError ? validationId : null,
|
|
74
|
+
"aria-invalid": hasError,
|
|
75
|
+
className: "p-slider__input",
|
|
76
|
+
disabled: disabled || inputDisabled,
|
|
77
|
+
max: max,
|
|
78
|
+
min: min,
|
|
79
|
+
onChange: onChange,
|
|
80
|
+
type: "number"
|
|
81
|
+
}, inputProps))));
|
|
82
|
+
};
|
|
83
|
+
export default Slider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Slider";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _pt from "prop-types";
|
|
2
|
+
var _excluded = ["className", "text", "isLight", "ariaLive", "role"];
|
|
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
|
+
import classNames from "classnames";
|
|
8
|
+
/**
|
|
9
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Spin](https://docs.vanillaframework.io/settings/animation-settings/#spin) animation.
|
|
10
|
+
*/
|
|
11
|
+
var Spinner = _ref => {
|
|
12
|
+
var {
|
|
13
|
+
className,
|
|
14
|
+
text,
|
|
15
|
+
isLight = false,
|
|
16
|
+
ariaLive = "polite",
|
|
17
|
+
role = "alert"
|
|
18
|
+
} = _ref,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
21
|
+
className: classNames(className, "p-text--default"),
|
|
22
|
+
role: role,
|
|
23
|
+
"aria-live": ariaLive
|
|
24
|
+
}), /*#__PURE__*/React.createElement("i", {
|
|
25
|
+
className: classNames("p-icon--spinner", "u-animation--spin", {
|
|
26
|
+
"is-light": isLight
|
|
27
|
+
})
|
|
28
|
+
}, text ? "" : "Loading"), text && /*#__PURE__*/React.createElement(React.Fragment, null, "\u2002", /*#__PURE__*/React.createElement("span", null, text)));
|
|
29
|
+
};
|
|
30
|
+
Spinner.propTypes = {
|
|
31
|
+
isLight: _pt.bool,
|
|
32
|
+
text: _pt.string,
|
|
33
|
+
role: _pt.string,
|
|
34
|
+
ariaLive: _pt.oneOf(["assertive", "off", "polite"])
|
|
35
|
+
};
|
|
36
|
+
export default Spinner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Spinner";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var _excluded = ["appearance", "children", "className"];
|
|
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 classNames from "classnames";
|
|
7
|
+
export var StatusLabelAppearance = {
|
|
8
|
+
CAUTION: "caution",
|
|
9
|
+
DEFAULT: "",
|
|
10
|
+
INFORMATION: "information",
|
|
11
|
+
NEGATIVE: "negative",
|
|
12
|
+
POSITIVE: "positive"
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The type of the StatusLabel props.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Label](https://vanillaframework.io/docs/patterns/labels).
|
|
21
|
+
*
|
|
22
|
+
* Labels are static elements which you can apply to signify status, tags or any other information you find useful.
|
|
23
|
+
*/
|
|
24
|
+
var StatusLabel = _ref => {
|
|
25
|
+
var {
|
|
26
|
+
appearance,
|
|
27
|
+
children,
|
|
28
|
+
className
|
|
29
|
+
} = _ref,
|
|
30
|
+
labelProps = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
var classes = classNames(appearance ? "p-status-label--".concat(appearance) : "p-status-label", className);
|
|
32
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, labelProps, {
|
|
33
|
+
className: classes
|
|
34
|
+
}), children);
|
|
35
|
+
};
|
|
36
|
+
export default StatusLabel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, StatusLabelAppearance } from "./StatusLabel";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var _excluded = ["background", "bordered", "children", "className", "colSize", "dark", "deep", "includeCol", "element", "light", "rowClassName", "shallow", "type"];
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
import classNames from "classnames";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import Col from "../Col";
|
|
8
|
+
import Row from "../Row";
|
|
9
|
+
/**
|
|
10
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Strip](https://docs.vanillaframework.io/patterns/strip/).
|
|
11
|
+
*
|
|
12
|
+
* The strip pattern provides a full width strip container in which to wrap a row.
|
|
13
|
+
*/
|
|
14
|
+
var Strip = _ref => {
|
|
15
|
+
var {
|
|
16
|
+
background,
|
|
17
|
+
bordered = false,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
colSize = 12,
|
|
21
|
+
dark = false,
|
|
22
|
+
deep = false,
|
|
23
|
+
includeCol = true,
|
|
24
|
+
element: Component = "div",
|
|
25
|
+
light = false,
|
|
26
|
+
rowClassName,
|
|
27
|
+
shallow = false,
|
|
28
|
+
type
|
|
29
|
+
} = _ref,
|
|
30
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
32
|
+
className: classNames(className, {
|
|
33
|
+
["p-strip--".concat(type)]: !!type,
|
|
34
|
+
"p-strip": !type,
|
|
35
|
+
"is-bordered": bordered,
|
|
36
|
+
"is-dark": dark,
|
|
37
|
+
"is-deep": deep,
|
|
38
|
+
"is-light": light,
|
|
39
|
+
"is-shallow": shallow
|
|
40
|
+
}),
|
|
41
|
+
style: background && {
|
|
42
|
+
backgroundImage: "url('".concat(background, "')")
|
|
43
|
+
}
|
|
44
|
+
}, props), /*#__PURE__*/React.createElement(Row, {
|
|
45
|
+
className: rowClassName
|
|
46
|
+
}, includeCol ? /*#__PURE__*/React.createElement(Col, {
|
|
47
|
+
size: colSize
|
|
48
|
+
}, children) : children));
|
|
49
|
+
};
|
|
50
|
+
export default Strip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Strip";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import ActionButton from "../ActionButton";
|
|
4
|
+
/**
|
|
5
|
+
* `SummaryButton` is a component to render a short summary with an action button. It's initial use case is a summary of table contents with action to load more items.
|
|
6
|
+
*/
|
|
7
|
+
var SummaryButton = _ref => {
|
|
8
|
+
var {
|
|
9
|
+
className,
|
|
10
|
+
isLoading,
|
|
11
|
+
summary,
|
|
12
|
+
label,
|
|
13
|
+
onClick
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/React.createElement("small", {
|
|
16
|
+
className: className
|
|
17
|
+
}, summary && /*#__PURE__*/React.createElement("span", {
|
|
18
|
+
className: "u-text--muted"
|
|
19
|
+
}, summary), onClick && /*#__PURE__*/React.createElement(ActionButton, {
|
|
20
|
+
className: classNames("is-small", "is-dense", {
|
|
21
|
+
"is-inline": summary
|
|
22
|
+
}),
|
|
23
|
+
onClick: onClick,
|
|
24
|
+
loading: isLoading,
|
|
25
|
+
disabled: isLoading
|
|
26
|
+
}, label));
|
|
27
|
+
};
|
|
28
|
+
export default SummaryButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./SummaryButton";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var _excluded = ["label", "disabled"];
|
|
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
|
+
/**
|
|
7
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Switch](https://vanillaframework.io/docs/patterns/switch) component.
|
|
8
|
+
*/
|
|
9
|
+
export var Switch = _ref => {
|
|
10
|
+
var {
|
|
11
|
+
label,
|
|
12
|
+
disabled = false
|
|
13
|
+
} = _ref,
|
|
14
|
+
inputProps = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/React.createElement("label", {
|
|
16
|
+
className: "p-switch"
|
|
17
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
18
|
+
type: "checkbox",
|
|
19
|
+
className: "p-switch__input",
|
|
20
|
+
role: "switch",
|
|
21
|
+
disabled: disabled
|
|
22
|
+
}, inputProps)), /*#__PURE__*/React.createElement("span", {
|
|
23
|
+
className: "p-switch__slider"
|
|
24
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
25
|
+
className: "p-switch__label"
|
|
26
|
+
}, label));
|
|
27
|
+
};
|
|
28
|
+
export default Switch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Switch";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var _excluded = ["children", "className", "expanding", "responsive"];
|
|
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
|
+
var Table = _ref => {
|
|
8
|
+
var {
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
expanding = false,
|
|
12
|
+
responsive = false
|
|
13
|
+
} = _ref,
|
|
14
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/React.createElement("table", _extends({
|
|
16
|
+
role: "grid",
|
|
17
|
+
className: classNames(className, {
|
|
18
|
+
"p-table--mobile-card": responsive,
|
|
19
|
+
"p-table--expanding": expanding
|
|
20
|
+
})
|
|
21
|
+
}, props), children);
|
|
22
|
+
};
|
|
23
|
+
export default Table;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Table";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var _excluded = ["children", "className", "hasOverflow", "expanding", "hidden", "role"];
|
|
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
|
+
var TableCell = _ref => {
|
|
8
|
+
var {
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
hasOverflow = false,
|
|
12
|
+
expanding = false,
|
|
13
|
+
hidden = false,
|
|
14
|
+
role = "gridcell"
|
|
15
|
+
} = _ref,
|
|
16
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
return /*#__PURE__*/React.createElement("td", _extends({
|
|
18
|
+
role: role,
|
|
19
|
+
"aria-hidden": hidden,
|
|
20
|
+
className: classNames(className, {
|
|
21
|
+
"p-table__expanding-panel": expanding,
|
|
22
|
+
"has-overflow": hasOverflow
|
|
23
|
+
})
|
|
24
|
+
}, props), children);
|
|
25
|
+
};
|
|
26
|
+
export default TableCell;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./TableCell";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var _excluded = ["children", "sort"];
|
|
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
|
+
var TableHeader = _ref => {
|
|
7
|
+
var {
|
|
8
|
+
children,
|
|
9
|
+
sort
|
|
10
|
+
} = _ref,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
return /*#__PURE__*/React.createElement("th", _extends({
|
|
13
|
+
role: "columnheader",
|
|
14
|
+
"aria-sort": sort
|
|
15
|
+
}, props), children);
|
|
16
|
+
};
|
|
17
|
+
export default TableHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./TableHeader";
|