@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,69 @@
|
|
|
1
|
+
export { default as Accordion } from "./components/Accordion";
|
|
2
|
+
export { default as ActionButton } from "./components/ActionButton";
|
|
3
|
+
export { default as ArticlePagination } from "./components/ArticlePagination";
|
|
4
|
+
export { default as ApplicationLayout } from "./components/ApplicationLayout";
|
|
5
|
+
export { default as AppAside } from "./components/ApplicationLayout/AppAside";
|
|
6
|
+
export { default as Application } from "./components/ApplicationLayout/Application";
|
|
7
|
+
export { default as AppMain } from "./components/ApplicationLayout/AppMain";
|
|
8
|
+
export { default as AppNavigation } from "./components/ApplicationLayout/AppNavigation";
|
|
9
|
+
export { default as AppNavigationBar } from "./components/ApplicationLayout/AppNavigationBar";
|
|
10
|
+
export { default as AppStatus } from "./components/ApplicationLayout/AppStatus";
|
|
11
|
+
export { default as Badge } from "./components/Badge";
|
|
12
|
+
export { default as Button, ButtonAppearance } from "./components/Button";
|
|
13
|
+
export { default as Card } from "./components/Card";
|
|
14
|
+
export { default as CheckboxInput } from "./components/CheckboxInput";
|
|
15
|
+
export { default as Chip } from "./components/Chip";
|
|
16
|
+
export { default as Code } from "./components/Code";
|
|
17
|
+
export { default as CodeSnippet, CodeSnippetBlockAppearance } from "./components/CodeSnippet";
|
|
18
|
+
export { default as Col } from "./components/Col";
|
|
19
|
+
export { default as ConfirmationButton } from "./components/ConfirmationButton";
|
|
20
|
+
export { default as ConfirmationModal } from "./components/ConfirmationModal";
|
|
21
|
+
export { default as ContextualMenu } from "./components/ContextualMenu";
|
|
22
|
+
export { default as EmptyState } from "./components/EmptyState";
|
|
23
|
+
export { default as Field } from "./components/Field";
|
|
24
|
+
export { default as Form } from "./components/Form";
|
|
25
|
+
export { default as FormikField } from "./components/FormikField";
|
|
26
|
+
export { default as Icon, ICONS } from "./components/Icon";
|
|
27
|
+
export { default as Input } from "./components/Input";
|
|
28
|
+
export { default as Label } from "./components/Label";
|
|
29
|
+
export { default as Link } from "./components/Link";
|
|
30
|
+
export { default as List } from "./components/List";
|
|
31
|
+
export { default as Loader } from "./components/Loader";
|
|
32
|
+
export { default as MainTable } from "./components/MainTable";
|
|
33
|
+
export { default as ModularTable } from "./components/ModularTable";
|
|
34
|
+
export { default as Navigation } from "./components/Navigation";
|
|
35
|
+
export { default as Modal } from "./components/Modal";
|
|
36
|
+
export * from "./components/MultiSelect";
|
|
37
|
+
export { default as Notification, NotificationSeverity } from "./components/Notification";
|
|
38
|
+
export { NotificationConsumer, NotificationProvider, useNotify, info, success, failure, queue } from "./components/NotificationProvider";
|
|
39
|
+
export { default as LoginPageLayout } from "./components/LoginPageLayout";
|
|
40
|
+
export { default as Pagination } from "./components/Pagination";
|
|
41
|
+
export { default as Panel } from "./components/Panel";
|
|
42
|
+
export { default as PasswordToggle } from "./components/PasswordToggle";
|
|
43
|
+
export { default as RadioInput } from "./components/RadioInput";
|
|
44
|
+
export { default as Row } from "./components/Row";
|
|
45
|
+
export { default as SearchAndFilter } from "./components/SearchAndFilter";
|
|
46
|
+
export { default as SearchBox } from "./components/SearchBox";
|
|
47
|
+
export { default as Select } from "./components/Select";
|
|
48
|
+
export { default as SideNavigation } from "./components/SideNavigation";
|
|
49
|
+
export { default as SideNavigationItem } from "./components/SideNavigation/SideNavigationItem";
|
|
50
|
+
export { default as SideNavigationLink } from "./components/SideNavigation/SideNavigationLink";
|
|
51
|
+
export { default as SideNavigationText } from "./components/SideNavigation/SideNavigationText";
|
|
52
|
+
export { default as Slider } from "./components/Slider";
|
|
53
|
+
export { default as Switch } from "./components/Switch";
|
|
54
|
+
export { default as Spinner } from "./components/Spinner";
|
|
55
|
+
export { default as StatusLabel, StatusLabelAppearance } from "./components/StatusLabel";
|
|
56
|
+
export { default as Strip } from "./components/Strip";
|
|
57
|
+
export { default as SummaryButton } from "./components/SummaryButton";
|
|
58
|
+
export { default as Table } from "./components/Table";
|
|
59
|
+
export { default as TableCell } from "./components/TableCell";
|
|
60
|
+
export { default as TableHeader } from "./components/TableHeader";
|
|
61
|
+
export { default as TableRow } from "./components/TableRow";
|
|
62
|
+
export { default as Tabs } from "./components/Tabs";
|
|
63
|
+
export { default as Textarea } from "./components/Textarea";
|
|
64
|
+
export { default as Tooltip } from "./components/Tooltip";
|
|
65
|
+
export { default as TablePagination } from "./components/TablePagination";
|
|
66
|
+
export { default as TablePaginationControls } from "./components/TablePagination/TablePaginationControls";
|
|
67
|
+
export { useOnClickOutside, useClickOutside, useId, useListener, useOnEscapePressed, usePagination, usePrevious, useThrottle, useWindowFitment } from "./hooks";
|
|
68
|
+
export { isNavigationAnchor, isNavigationButton } from "./utils";
|
|
69
|
+
export { Theme } from "./enums";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { isValidElement } from "react";
|
|
2
|
+
export var IS_DEV = process.env.NODE_ENV === "development";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Find substring and wrap in <strong /> tag
|
|
6
|
+
* @param {string} str - The string to search
|
|
7
|
+
* @param {string} subString - The substring to find
|
|
8
|
+
* @return {Obj} newStr - Object with text and match bool
|
|
9
|
+
*/
|
|
10
|
+
export var highlightSubString = (str, subString) => {
|
|
11
|
+
if (typeof str !== "string" || typeof subString !== "string") {
|
|
12
|
+
return {
|
|
13
|
+
text: str || "",
|
|
14
|
+
match: false
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
var escapedSubstring = subString.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
18
|
+
var caseInsensitiveRegex = new RegExp(escapedSubstring, "gi");
|
|
19
|
+
var newStr = str.replace(caseInsensitiveRegex, match => "<strong>".concat(match, "</strong>"));
|
|
20
|
+
return {
|
|
21
|
+
text: subString === "" ? str : newStr,
|
|
22
|
+
match: newStr !== str
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Whether a navigation item is an anchor.
|
|
28
|
+
* @param link - The navigation item.
|
|
29
|
+
*/
|
|
30
|
+
export var isNavigationAnchor = link => !!link.url;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Whether a navigation item is a button.
|
|
34
|
+
* @param link - The navigation item.
|
|
35
|
+
*/
|
|
36
|
+
export var isNavigationButton = link => !link.url;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A typeguard for whether an element is a ReactNode.
|
|
40
|
+
*/
|
|
41
|
+
export var isReactNode = element => /*#__PURE__*/isValidElement(element);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { HTMLProps } from "react";
|
|
2
|
+
import type { AccordionHeadings, AccordionSectionProps } from "./AccordionSection";
|
|
3
|
+
import type { ClassName, PropsWithSpread } from "../../types";
|
|
4
|
+
export type Section = AccordionSectionProps & {
|
|
5
|
+
/**
|
|
6
|
+
* An optional key for the section component. It will also be
|
|
7
|
+
* used to track which section is selected.
|
|
8
|
+
*/
|
|
9
|
+
key?: string | number;
|
|
10
|
+
};
|
|
11
|
+
export type Props = PropsWithSpread<{
|
|
12
|
+
/**
|
|
13
|
+
* Optional classes applied to the parent element.
|
|
14
|
+
*/
|
|
15
|
+
className?: ClassName;
|
|
16
|
+
/**
|
|
17
|
+
* An optional value to set the expanded section. The value must match a
|
|
18
|
+
* section key. This value will only set the expanded section on first render
|
|
19
|
+
* if externallyControlled is not set to `true`.
|
|
20
|
+
*/
|
|
21
|
+
expanded?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the expanded section will be controlled via external state.
|
|
24
|
+
*/
|
|
25
|
+
externallyControlled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Optional function that is called when the expanded section is changed.
|
|
28
|
+
* The function is provided the section title or null.
|
|
29
|
+
*/
|
|
30
|
+
onExpandedChange?: (id: string, title: string) => void;
|
|
31
|
+
/**
|
|
32
|
+
* An array of sections and content.
|
|
33
|
+
*/
|
|
34
|
+
sections: Section[];
|
|
35
|
+
/**
|
|
36
|
+
* Optional string describing heading element that should be used for the section titles.
|
|
37
|
+
*/
|
|
38
|
+
titleElement?: AccordionHeadings;
|
|
39
|
+
}, HTMLProps<HTMLElement>>;
|
|
40
|
+
/**
|
|
41
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Accordion](https://docs.vanillaframework.io/patterns/accordion/).
|
|
42
|
+
*
|
|
43
|
+
* The sidebar accordion, used in listing pages or as navigation, can hold multiple navigation items or to be used as a filter for content.
|
|
44
|
+
*/
|
|
45
|
+
declare const Accordion: ({ className, expanded, externallyControlled, onExpandedChange, sections, titleElement, ...asideProps }: Props) => JSX.Element;
|
|
46
|
+
export default Accordion;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { Headings } from "../../../types";
|
|
3
|
+
export type AccordionHeadings = Exclude<Headings, "h1">;
|
|
4
|
+
export type Props = {
|
|
5
|
+
/**
|
|
6
|
+
* The content of the section.
|
|
7
|
+
*/
|
|
8
|
+
content?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* An optional value to set the expanded section. The value must match a
|
|
11
|
+
* section key.
|
|
12
|
+
*/
|
|
13
|
+
expanded?: string | null;
|
|
14
|
+
headingLevel?: number;
|
|
15
|
+
/**
|
|
16
|
+
* An optional click event when the title is clicked.
|
|
17
|
+
*/
|
|
18
|
+
onTitleClick?: (expanded: boolean, key: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* An optional key to be used to track which section is selected.
|
|
21
|
+
*/
|
|
22
|
+
sectionKey?: string;
|
|
23
|
+
setExpanded?: (key: string | null, title: ReactNode | null) => void;
|
|
24
|
+
/**
|
|
25
|
+
* The title of the section.
|
|
26
|
+
*/
|
|
27
|
+
title?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Optional string describing heading element that should be used for the section titles.
|
|
30
|
+
*/
|
|
31
|
+
titleElement?: AccordionHeadings;
|
|
32
|
+
};
|
|
33
|
+
declare const AccordionSection: ({ content, expanded, onTitleClick, sectionKey, setExpanded, title, titleElement, headingLevel, }: Props) => JSX.Element;
|
|
34
|
+
export default AccordionSection;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { ButtonProps } from "../Button";
|
|
3
|
+
import type { ClassName, PropsWithSpread } from "../../types";
|
|
4
|
+
export declare const LOADER_MIN_DURATION = 400;
|
|
5
|
+
export declare const SUCCESS_DURATION = 2000;
|
|
6
|
+
export declare enum Label {
|
|
7
|
+
WAITING = "Waiting for action to complete",
|
|
8
|
+
SUCCESS = "Action completed"
|
|
9
|
+
}
|
|
10
|
+
export type Props = PropsWithSpread<{
|
|
11
|
+
/**
|
|
12
|
+
* The appearance of the button.
|
|
13
|
+
*/
|
|
14
|
+
appearance?: ButtonProps["appearance"];
|
|
15
|
+
/**
|
|
16
|
+
* The content of the button.
|
|
17
|
+
*/
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Optional class(es) to pass to the button element.
|
|
21
|
+
*/
|
|
22
|
+
className?: ClassName;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the button should be disabled.
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the button should display inline.
|
|
29
|
+
*/
|
|
30
|
+
inline?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the button should be in the loading state.
|
|
33
|
+
*/
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the button should be in the success state.
|
|
37
|
+
*/
|
|
38
|
+
success?: boolean;
|
|
39
|
+
}, ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
40
|
+
/**
|
|
41
|
+
* This is a not an existing Vanilla component. It can be used to display submitting states for forms or other actions.
|
|
42
|
+
*
|
|
43
|
+
* ActionButton accepts the props from
|
|
44
|
+
* [Button](?path=/docs/components-button--docs) in addition to those in the
|
|
45
|
+
* props table:
|
|
46
|
+
*/
|
|
47
|
+
declare const ActionButton: ({ appearance, children, className, disabled, inline, loading, success, ...buttonProps }: Props) => JSX.Element;
|
|
48
|
+
export default ActionButton;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PropsWithSpread } from "../../../types";
|
|
3
|
+
import { type HTMLProps, type PropsWithChildren } from "react";
|
|
4
|
+
export type Props = PropsWithSpread<{
|
|
5
|
+
/**
|
|
6
|
+
* Whether the aside panel should be collapsed. Toggling this state will animate
|
|
7
|
+
* the panel open or closed.
|
|
8
|
+
*/
|
|
9
|
+
collapsed?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The panel content.
|
|
12
|
+
*/
|
|
13
|
+
children?: PropsWithChildren["children"];
|
|
14
|
+
/**
|
|
15
|
+
* A ref that will be passed to the wrapping `<aside>` element.
|
|
16
|
+
*/
|
|
17
|
+
forwardRef?: React.Ref<HTMLElement> | null;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the aside panel should be narrow.
|
|
20
|
+
*/
|
|
21
|
+
narrow?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the aside panel should be pinned. When pinned the panel will appear
|
|
24
|
+
* beside the main content, instead of above it.
|
|
25
|
+
*/
|
|
26
|
+
pinned?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the aside panel should be wide.
|
|
29
|
+
*/
|
|
30
|
+
wide?: boolean;
|
|
31
|
+
}, HTMLProps<HTMLElement>>;
|
|
32
|
+
declare const AppAside: ({ children, className, collapsed, narrow, forwardRef, pinned, wide, ...props }: Props) => React.JSX.Element;
|
|
33
|
+
export default AppAside;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { HTMLProps, PropsWithChildren } from "react";
|
|
3
|
+
export type Props = {
|
|
4
|
+
/**
|
|
5
|
+
* The main content.
|
|
6
|
+
*/
|
|
7
|
+
children?: PropsWithChildren["children"];
|
|
8
|
+
} & HTMLProps<HTMLDivElement>;
|
|
9
|
+
/**
|
|
10
|
+
* This is a [React](https://reactjs.org/) component for main content area in the Vanilla
|
|
11
|
+
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
12
|
+
*/
|
|
13
|
+
declare const AppMain: ({ children, className, ...props }: Props) => React.JSX.Element;
|
|
14
|
+
export default AppMain;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PropsWithSpread } from "../../../types";
|
|
3
|
+
import type { HTMLProps, PropsWithChildren } from "react";
|
|
4
|
+
export type Props = PropsWithSpread<{
|
|
5
|
+
/**
|
|
6
|
+
* Whether the navigation panel should be collapsed.
|
|
7
|
+
*/
|
|
8
|
+
collapsed?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The navigation drawer content.
|
|
11
|
+
*/
|
|
12
|
+
children?: PropsWithChildren["children"];
|
|
13
|
+
/**
|
|
14
|
+
* Whether the navigation panel should be pinned.
|
|
15
|
+
*/
|
|
16
|
+
pinned?: boolean;
|
|
17
|
+
}, HTMLProps<HTMLDivElement>>;
|
|
18
|
+
/**
|
|
19
|
+
* This is a [React](https://reactjs.org/) component for the navigation panel in the Vanilla
|
|
20
|
+
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
21
|
+
*
|
|
22
|
+
* This component is used to display the left navigation panel. It should be
|
|
23
|
+
* used alongside [`AppNavigationBar`](/docs/components-applicationlayout-appnavigationbar--docs).
|
|
24
|
+
*/
|
|
25
|
+
declare const AppNavigation: ({ children, className, collapsed, pinned, ...props }: Props) => React.JSX.Element;
|
|
26
|
+
export default AppNavigation;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PropsWithSpread } from "../../../types";
|
|
3
|
+
import type { HTMLProps, PropsWithChildren } from "react";
|
|
4
|
+
export type Props = PropsWithSpread<{
|
|
5
|
+
/**
|
|
6
|
+
* The navigation content.
|
|
7
|
+
*/
|
|
8
|
+
children?: PropsWithChildren["children"];
|
|
9
|
+
}, HTMLProps<HTMLElement>>;
|
|
10
|
+
/**
|
|
11
|
+
* This is a [React](https://reactjs.org/) component for navigation bar in the Vanilla
|
|
12
|
+
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
13
|
+
*
|
|
14
|
+
* This component is used to display the navigation panel on mobile or small
|
|
15
|
+
* screens. It should be used alongside [`AppNavigation`](/docs/components-applicationlayout-appnavigation--docs).
|
|
16
|
+
*/
|
|
17
|
+
declare const AppNavigationBar: ({ children, className, ...props }: Props) => React.JSX.Element;
|
|
18
|
+
export default AppNavigationBar;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { HTMLProps, PropsWithChildren } from "react";
|
|
3
|
+
export type Props = {
|
|
4
|
+
/**
|
|
5
|
+
* The status content.
|
|
6
|
+
*/
|
|
7
|
+
children?: PropsWithChildren["children"];
|
|
8
|
+
} & HTMLProps<HTMLDivElement>;
|
|
9
|
+
/**
|
|
10
|
+
* This is a [React](https://reactjs.org/) component for status area in the Vanilla
|
|
11
|
+
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
12
|
+
*/
|
|
13
|
+
declare const AppStatus: ({ children, className, ...props }: Props) => React.JSX.Element;
|
|
14
|
+
export default AppStatus;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PropsWithSpread } from "../../../types";
|
|
3
|
+
import type { HTMLProps, PropsWithChildren } from "react";
|
|
4
|
+
export type Props = PropsWithSpread<{
|
|
5
|
+
/**
|
|
6
|
+
* The application content.
|
|
7
|
+
*/
|
|
8
|
+
children?: PropsWithChildren["children"];
|
|
9
|
+
}, HTMLProps<HTMLDivElement>>;
|
|
10
|
+
/**
|
|
11
|
+
* This is a [React](https://reactjs.org/) component for the application wrapper in the Vanilla
|
|
12
|
+
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
13
|
+
*/
|
|
14
|
+
declare const Application: ({ children, className, ...props }: Props) => React.JSX.Element;
|
|
15
|
+
export default Application;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PropsWithSpread } from "../../types";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import { type HTMLProps, type PropsWithChildren } from "react";
|
|
5
|
+
import type { PanelProps } from "../Panel";
|
|
6
|
+
import type { PanelLogoDefaultElement } from "../Panel";
|
|
7
|
+
import type { ExclusiveProps } from "../../types";
|
|
8
|
+
import type { SideNavigationProps } from "../SideNavigation";
|
|
9
|
+
import type { SideNavigationLinkDefaultElement } from "../SideNavigation/SideNavigationLink/index";
|
|
10
|
+
export type BaseProps<NI = SideNavigationLinkDefaultElement, PL = PanelLogoDefaultElement> = PropsWithSpread<{
|
|
11
|
+
/**
|
|
12
|
+
* The aside panel. This prop puts the panel in the correct position inside the
|
|
13
|
+
* application layout DOM structure, but does not wrap the content in an aside,
|
|
14
|
+
* so the content provided to this prop should include an `<AppAside>` or equivalent.
|
|
15
|
+
*/
|
|
16
|
+
aside?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* The content for the main area.
|
|
19
|
+
*/
|
|
20
|
+
children?: PropsWithChildren["children"];
|
|
21
|
+
/**
|
|
22
|
+
* Whether to use the dark theme.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
dark?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The logo to appear in the navigation panels.
|
|
28
|
+
*/
|
|
29
|
+
logo?: PanelProps<PL>["logo"];
|
|
30
|
+
/**
|
|
31
|
+
* The component to use to render links inside the navigation e.g. when
|
|
32
|
+
* using react-router you'd pass `Link` to this prop.
|
|
33
|
+
*/
|
|
34
|
+
navLinkComponent?: SideNavigationProps<NI>["linkComponent"];
|
|
35
|
+
/**
|
|
36
|
+
* Whether the navigation menu should be collapsed.
|
|
37
|
+
*/
|
|
38
|
+
menuCollapsed?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the navigation menu should be pinned.
|
|
41
|
+
*/
|
|
42
|
+
menuPinned?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* A function that is called to collapse the navigation menu.
|
|
45
|
+
*/
|
|
46
|
+
onCollapseMenu?: (menuCollapsed: boolean) => void;
|
|
47
|
+
/**
|
|
48
|
+
* A function that is called to pin the navigation menu.
|
|
49
|
+
*/
|
|
50
|
+
onPinMenu?: (menuPinned: boolean) => void;
|
|
51
|
+
/**
|
|
52
|
+
* The content to appear inside the status area.
|
|
53
|
+
*/
|
|
54
|
+
status?: ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Classes to apply to the navigation bar.
|
|
57
|
+
*/
|
|
58
|
+
navigationBarClassName?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Classes to apply to the navigation menu.
|
|
61
|
+
*/
|
|
62
|
+
navigationClassName?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Classes to apply to the main area.
|
|
65
|
+
*/
|
|
66
|
+
mainClassName?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Classes to apply to the status area.
|
|
69
|
+
*/
|
|
70
|
+
statusClassName?: string;
|
|
71
|
+
}, HTMLProps<HTMLDivElement>>;
|
|
72
|
+
export type Props<NI = SideNavigationLinkDefaultElement, PL = PanelLogoDefaultElement> = BaseProps<NI, PL> & ExclusiveProps<{
|
|
73
|
+
navItems?: SideNavigationProps<NI>["items"];
|
|
74
|
+
}, {
|
|
75
|
+
sideNavigation?: ReactNode;
|
|
76
|
+
}>;
|
|
77
|
+
/**
|
|
78
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla
|
|
79
|
+
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
80
|
+
*
|
|
81
|
+
* This component combines the various sub-components that make up the
|
|
82
|
+
* Application Layout to make it easier to consume. For some applications this
|
|
83
|
+
* component maybe not be flexible enough, in which case you may choose to use
|
|
84
|
+
* the sub-components directly. Be aware that the application layout requires a
|
|
85
|
+
* specific structure and states to function correctly so there will be a
|
|
86
|
+
* trade-off when using the sub-components directly.
|
|
87
|
+
*/
|
|
88
|
+
declare const ApplicationLayout: <NI = SideNavigationLinkDefaultElement, PL = PanelLogoDefaultElement>({ aside, children, dark, logo, mainClassName, menuCollapsed, menuPinned, navigationBarClassName, navigationClassName, navItems, navLinkComponent, onCollapseMenu, onPinMenu, sideNavigation, status, statusClassName, ...props }: Props<NI, PL>) => React.JSX.Element;
|
|
89
|
+
export default ApplicationLayout;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default, type Props as ApplicationLayoutProps, } from "./ApplicationLayout";
|
|
2
|
+
export { default as AppAside, type AppAsideProps } from "./AppAside";
|
|
3
|
+
export { default as Application, type ApplicationProps } from "./Application";
|
|
4
|
+
export { default as AppMain, type AppMainProps } from "./AppMain";
|
|
5
|
+
export { default as AppNavigation, type AppNavigationProps, } from "./AppNavigation";
|
|
6
|
+
export { default as AppNavigationBar, type AppNavigationBarProps, } from "./AppNavigationBar";
|
|
7
|
+
export { default as AppStatus, type AppStatusProps } from "./AppStatus";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { HTMLProps } from "react";
|
|
2
|
+
import type { ClassName, PropsWithSpread } from "../../types";
|
|
3
|
+
export type Props = PropsWithSpread<{
|
|
4
|
+
/**
|
|
5
|
+
* Optional classes to add to the wrapping element.
|
|
6
|
+
*/
|
|
7
|
+
className?: ClassName;
|
|
8
|
+
/**
|
|
9
|
+
* The URL for the next link.
|
|
10
|
+
*/
|
|
11
|
+
nextURL?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The label for the next link.
|
|
14
|
+
*/
|
|
15
|
+
nextLabel?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The URL for the previous link.
|
|
18
|
+
*/
|
|
19
|
+
previousURL?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The label for the previous link.
|
|
22
|
+
*/
|
|
23
|
+
previousLabel?: string;
|
|
24
|
+
}, HTMLProps<HTMLElement>>;
|
|
25
|
+
/**
|
|
26
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Article pagination](https://docs.vanillaframework.io/patterns/article-pagination/).
|
|
27
|
+
*
|
|
28
|
+
* The article pagination component should be used to navigate from one article to the next, or previous, in chronological order.
|
|
29
|
+
*/
|
|
30
|
+
declare const ArticlePagination: ({ className, nextURL, nextLabel, previousURL, previousLabel, ...props }: Props) => JSX.Element;
|
|
31
|
+
export default ArticlePagination;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { HTMLProps } from "react";
|
|
2
|
+
import type { ClassName, PropsWithSpread, ValueOf } from "../../types";
|
|
3
|
+
export declare const BadgeType: {
|
|
4
|
+
readonly ROUNDED_LARGE_NUMBER: "ROUNDED_LARGE_NUMBER";
|
|
5
|
+
readonly UNDEFINED_LARGE_NUMBER: "UNDEFINED_LARGE_NUMBER";
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The props for the Badge component.
|
|
9
|
+
*/
|
|
10
|
+
export type Props = PropsWithSpread<{
|
|
11
|
+
/**
|
|
12
|
+
* Numeric value to be displayed.
|
|
13
|
+
*/
|
|
14
|
+
value: number;
|
|
15
|
+
/**
|
|
16
|
+
* The type of the badge component.
|
|
17
|
+
*/
|
|
18
|
+
badgeType?: ValueOf<typeof BadgeType>;
|
|
19
|
+
/**
|
|
20
|
+
* The appearance of the badge.
|
|
21
|
+
*/
|
|
22
|
+
isNegative?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Optional class(es) to give to the badge.
|
|
25
|
+
*/
|
|
26
|
+
className?: ClassName;
|
|
27
|
+
}, HTMLProps<HTMLSpanElement>>;
|
|
28
|
+
/**
|
|
29
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Badge](https://vanillaframework.io/docs/patterns/badge).
|
|
30
|
+
*
|
|
31
|
+
* It can be used to display a numeric values.
|
|
32
|
+
*/
|
|
33
|
+
declare const Badge: ({ value, badgeType, className, isNegative, ...spanProps }: Props) => JSX.Element;
|
|
34
|
+
export default Badge;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ComponentType, ElementType, MouseEventHandler, ReactNode } from "react";
|
|
2
|
+
import type { ClassName, ValueOf } from "../../types";
|
|
3
|
+
export declare const ButtonAppearance: {
|
|
4
|
+
readonly BASE: "base";
|
|
5
|
+
readonly BRAND: "brand";
|
|
6
|
+
readonly DEFAULT: "";
|
|
7
|
+
readonly LINK: "link";
|
|
8
|
+
readonly NEGATIVE: "negative";
|
|
9
|
+
readonly POSITIVE: "positive";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The type of the Button props.
|
|
13
|
+
* @template P - The type of the props if providing a component to `element`
|
|
14
|
+
*/
|
|
15
|
+
export type Props<P = null> = {
|
|
16
|
+
/**
|
|
17
|
+
* The appearance of the button.
|
|
18
|
+
*/
|
|
19
|
+
appearance?: ValueOf<typeof ButtonAppearance> | string;
|
|
20
|
+
/**
|
|
21
|
+
* The content of the button.
|
|
22
|
+
*/
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Optional class(es) to pass to the button element.
|
|
26
|
+
*/
|
|
27
|
+
className?: ClassName;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the button should have dense padding.
|
|
30
|
+
*/
|
|
31
|
+
dense?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the button should be disabled.
|
|
34
|
+
*/
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Optional element or component to use instead of `button`.
|
|
38
|
+
*/
|
|
39
|
+
element?: ElementType | ComponentType<P>;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the button has an icon in the content.
|
|
42
|
+
*/
|
|
43
|
+
hasIcon?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the button should display inline.
|
|
46
|
+
*/
|
|
47
|
+
inline?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Function for handling button click event.
|
|
50
|
+
*/
|
|
51
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the button should be small.
|
|
54
|
+
*/
|
|
55
|
+
small?: boolean;
|
|
56
|
+
} & (Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onClick"> | P);
|
|
57
|
+
/**
|
|
58
|
+
* This is a [React](https://reactjs.org/) component for the Vanilla [Button](https://docs.vanillaframework.io/patterns/buttons/).
|
|
59
|
+
*
|
|
60
|
+
* Buttons are clickable elements used to perform an action, they can be used for buttons and link elements.
|
|
61
|
+
* @template P - The type of the props if providing a component to `element`
|
|
62
|
+
*/
|
|
63
|
+
declare const Button: <P>({ appearance, children, className, dense, disabled, element: Component, hasIcon, inline, onClick, small, ...buttonProps }: Props<P>) => JSX.Element;
|
|
64
|
+
export default Button;
|