@canonical/react-components 1.3.1 → 1.3.2
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/package.json +7 -10
- package/dist-esm/components/Accordion/Accordion.js +0 -52
- package/dist-esm/components/Accordion/AccordionSection/AccordionSection.js +0 -47
- package/dist-esm/components/Accordion/AccordionSection/index.js +0 -1
- package/dist-esm/components/Accordion/index.js +0 -1
- package/dist-esm/components/ActionButton/ActionButton.js +0 -106
- package/dist-esm/components/ActionButton/index.js +0 -1
- package/dist-esm/components/ApplicationLayout/AppAside/AppAside.js +0 -29
- package/dist-esm/components/ApplicationLayout/AppAside/index.js +0 -1
- package/dist-esm/components/ApplicationLayout/AppMain/AppMain.js +0 -21
- package/dist-esm/components/ApplicationLayout/AppMain/index.js +0 -1
- package/dist-esm/components/ApplicationLayout/AppNavigation/AppNavigation.js +0 -31
- package/dist-esm/components/ApplicationLayout/AppNavigation/index.js +0 -1
- package/dist-esm/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.js +0 -24
- package/dist-esm/components/ApplicationLayout/AppNavigationBar/index.js +0 -1
- package/dist-esm/components/ApplicationLayout/AppStatus/AppStatus.js +0 -21
- package/dist-esm/components/ApplicationLayout/AppStatus/index.js +0 -1
- package/dist-esm/components/ApplicationLayout/Application/Application.js +0 -22
- package/dist-esm/components/ApplicationLayout/Application/index.js +0 -1
- package/dist-esm/components/ApplicationLayout/ApplicationLayout.js +0 -113
- package/dist-esm/components/ApplicationLayout/index.js +0 -7
- package/dist-esm/components/ArticlePagination/ArticlePagination.js +0 -39
- package/dist-esm/components/ArticlePagination/index.js +0 -1
- package/dist-esm/components/Badge/Badge.js +0 -64
- package/dist-esm/components/Badge/index.js +0 -1
- package/dist-esm/components/Button/Button.js +0 -55
- package/dist-esm/components/Button/index.js +0 -1
- package/dist-esm/components/Card/Card.js +0 -45
- package/dist-esm/components/Card/index.js +0 -1
- package/dist-esm/components/CheckboxInput/CheckableInput/CheckableInput.js +0 -35
- package/dist-esm/components/CheckboxInput/CheckableInput/index.js +0 -1
- package/dist-esm/components/CheckboxInput/CheckboxInput.js +0 -24
- package/dist-esm/components/CheckboxInput/index.js +0 -1
- package/dist-esm/components/Chip/Chip.js +0 -81
- package/dist-esm/components/Chip/index.js +0 -1
- package/dist-esm/components/Code/Code.js +0 -49
- package/dist-esm/components/Code/index.js +0 -1
- package/dist-esm/components/CodeSnippet/CodeSnippet.js +0 -28
- package/dist-esm/components/CodeSnippet/CodeSnippetBlock.js +0 -64
- package/dist-esm/components/CodeSnippet/CodeSnippetDropdown.js +0 -27
- package/dist-esm/components/CodeSnippet/index.js +0 -2
- package/dist-esm/components/Col/Col.js +0 -38
- package/dist-esm/components/Col/index.js +0 -1
- package/dist-esm/components/ConfirmationButton/ConfirmationButton.js +0 -63
- package/dist-esm/components/ConfirmationButton/index.js +0 -1
- package/dist-esm/components/ConfirmationModal/ConfirmationModal.js +0 -47
- package/dist-esm/components/ConfirmationModal/index.js +0 -1
- package/dist-esm/components/ContextualMenu/ContextualMenu.js +0 -215
- package/dist-esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +0 -249
- package/dist-esm/components/ContextualMenu/ContextualMenuDropdown/index.js +0 -1
- package/dist-esm/components/ContextualMenu/index.js +0 -1
- package/dist-esm/components/EmptyState/EmptyState.js +0 -28
- package/dist-esm/components/EmptyState/index.js +0 -1
- package/dist-esm/components/Field/Field.js +0 -126
- package/dist-esm/components/Field/index.js +0 -1
- package/dist-esm/components/Form/Form.js +0 -28
- package/dist-esm/components/Form/index.js +0 -1
- package/dist-esm/components/FormikField/FormikField.js +0 -33
- package/dist-esm/components/FormikField/index.js +0 -1
- package/dist-esm/components/Icon/Icon.js +0 -61
- package/dist-esm/components/Icon/index.js +0 -1
- package/dist-esm/components/Input/Input.js +0 -103
- package/dist-esm/components/Input/index.js +0 -1
- package/dist-esm/components/Label/Label.js +0 -27
- package/dist-esm/components/Label/index.js +0 -1
- package/dist-esm/components/Link/Link.js +0 -37
- package/dist-esm/components/Link/index.js +0 -1
- package/dist-esm/components/List/List.js +0 -110
- package/dist-esm/components/List/index.js +0 -1
- package/dist-esm/components/Loader/Loader.js +0 -14
- package/dist-esm/components/Loader/index.js +0 -1
- package/dist-esm/components/LoginPageLayout/LoginPageLayout.js +0 -63
- package/dist-esm/components/LoginPageLayout/index.js +0 -1
- package/dist-esm/components/MainTable/MainTable.js +0 -211
- package/dist-esm/components/MainTable/index.js +0 -1
- package/dist-esm/components/Modal/Modal.js +0 -135
- package/dist-esm/components/Modal/index.js +0 -1
- package/dist-esm/components/ModularTable/ModularTable.js +0 -166
- package/dist-esm/components/ModularTable/index.js +0 -1
- package/dist-esm/components/MultiSelect/FadeInDown/FadeInDown.js +0 -25
- package/dist-esm/components/MultiSelect/FadeInDown/index.js +0 -1
- package/dist-esm/components/MultiSelect/MultiSelect.js +0 -308
- package/dist-esm/components/MultiSelect/index.js +0 -1
- package/dist-esm/components/Navigation/Navigation.js +0 -215
- package/dist-esm/components/Navigation/NavigationLink/NavigationLink.js +0 -58
- package/dist-esm/components/Navigation/NavigationLink/index.js +0 -1
- package/dist-esm/components/Navigation/NavigationMenu/NavigationMenu.js +0 -57
- package/dist-esm/components/Navigation/NavigationMenu/index.js +0 -1
- package/dist-esm/components/Navigation/index.js +0 -1
- package/dist-esm/components/Navigation/types.js +0 -1
- package/dist-esm/components/Notification/Notification.js +0 -119
- package/dist-esm/components/Notification/index.js +0 -1
- package/dist-esm/components/NotificationProvider/NotificationProvider.js +0 -83
- package/dist-esm/components/NotificationProvider/index.js +0 -2
- package/dist-esm/components/NotificationProvider/messageBuilder.js +0 -31
- package/dist-esm/components/NotificationProvider/types.js +0 -1
- package/dist-esm/components/Pagination/Pagination.js +0 -173
- package/dist-esm/components/Pagination/PaginationButton/PaginationButton.js +0 -31
- package/dist-esm/components/Pagination/PaginationButton/index.js +0 -1
- package/dist-esm/components/Pagination/PaginationItem/PaginationItem.js +0 -20
- package/dist-esm/components/Pagination/PaginationItem/index.js +0 -1
- package/dist-esm/components/Pagination/index.js +0 -1
- package/dist-esm/components/Panel/Panel.js +0 -89
- package/dist-esm/components/Panel/index.js +0 -1
- package/dist-esm/components/PasswordToggle/PasswordToggle.js +0 -90
- package/dist-esm/components/PasswordToggle/index.js +0 -1
- package/dist-esm/components/RadioInput/RadioInput.js +0 -22
- package/dist-esm/components/RadioInput/index.js +0 -1
- package/dist-esm/components/Row/Row.js +0 -22
- package/dist-esm/components/Row/index.js +0 -1
- package/dist-esm/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.js +0 -107
- package/dist-esm/components/SearchAndFilter/FilterPanelSection/index.js +0 -1
- package/dist-esm/components/SearchAndFilter/SearchAndFilter.js +0 -286
- package/dist-esm/components/SearchAndFilter/index.js +0 -1
- package/dist-esm/components/SearchAndFilter/types.js +0 -1
- package/dist-esm/components/SearchAndFilter/utils.js +0 -22
- package/dist-esm/components/SearchBox/SearchBox.js +0 -95
- package/dist-esm/components/SearchBox/index.js +0 -1
- package/dist-esm/components/Select/Select.js +0 -84
- package/dist-esm/components/Select/index.js +0 -1
- package/dist-esm/components/SideNavigation/SideNavigation.js +0 -89
- package/dist-esm/components/SideNavigation/SideNavigationBase/SideNavigationBase.js +0 -31
- package/dist-esm/components/SideNavigation/SideNavigationBase/index.js +0 -1
- package/dist-esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.js +0 -32
- package/dist-esm/components/SideNavigation/SideNavigationItem/index.js +0 -1
- package/dist-esm/components/SideNavigation/SideNavigationLink/SideNavigationLink.js +0 -25
- package/dist-esm/components/SideNavigation/SideNavigationLink/index.js +0 -1
- package/dist-esm/components/SideNavigation/SideNavigationText/SideNavigationText.js +0 -20
- package/dist-esm/components/SideNavigation/SideNavigationText/index.js +0 -1
- package/dist-esm/components/SideNavigation/index.js +0 -4
- package/dist-esm/components/Slider/Slider.js +0 -83
- package/dist-esm/components/Slider/index.js +0 -1
- package/dist-esm/components/Spinner/Spinner.js +0 -36
- package/dist-esm/components/Spinner/index.js +0 -1
- package/dist-esm/components/StatusLabel/StatusLabel.js +0 -36
- package/dist-esm/components/StatusLabel/index.js +0 -1
- package/dist-esm/components/Strip/Strip.js +0 -50
- package/dist-esm/components/Strip/index.js +0 -1
- package/dist-esm/components/SummaryButton/SummaryButton.js +0 -28
- package/dist-esm/components/SummaryButton/index.js +0 -1
- package/dist-esm/components/Switch/Switch.js +0 -28
- package/dist-esm/components/Switch/index.js +0 -1
- package/dist-esm/components/Table/Table.js +0 -23
- package/dist-esm/components/Table/index.js +0 -1
- package/dist-esm/components/TableCell/TableCell.js +0 -26
- package/dist-esm/components/TableCell/index.js +0 -1
- package/dist-esm/components/TableHeader/TableHeader.js +0 -17
- package/dist-esm/components/TableHeader/index.js +0 -1
- package/dist-esm/components/TablePagination/TablePagination.js +0 -104
- package/dist-esm/components/TablePagination/TablePaginationControls/TablePaginationControls.js +0 -120
- package/dist-esm/components/TablePagination/TablePaginationControls/index.js +0 -1
- package/dist-esm/components/TablePagination/index.js +0 -1
- package/dist-esm/components/TablePagination/utils.js +0 -67
- package/dist-esm/components/TableRow/TableRow.js +0 -15
- package/dist-esm/components/TableRow/index.js +0 -1
- package/dist-esm/components/Tabs/Tabs.js +0 -42
- package/dist-esm/components/Tabs/index.js +0 -1
- package/dist-esm/components/Textarea/Textarea.js +0 -115
- package/dist-esm/components/Textarea/index.js +0 -1
- package/dist-esm/components/Tooltip/Tooltip.js +0 -245
- package/dist-esm/components/Tooltip/index.js +0 -1
- package/dist-esm/enums.js +0 -8
- package/dist-esm/hooks/index.js +0 -8
- package/dist-esm/hooks/useId.js +0 -13
- package/dist-esm/hooks/useListener.js +0 -51
- package/dist-esm/hooks/useOnClickOutside.js +0 -38
- package/dist-esm/hooks/useOnEscapePressed.js +0 -25
- package/dist-esm/hooks/usePagination.js +0 -45
- package/dist-esm/hooks/usePrevious.js +0 -16
- package/dist-esm/hooks/useThrottle.js +0 -49
- package/dist-esm/hooks/useWindowFitment.js +0 -109
- package/dist-esm/index.js +0 -69
- package/dist-esm/types/index.js +0 -1
- package/dist-esm/types/react-table-config.d.js +0 -1
- package/dist-esm/utils.js +0 -41
- /package/{dist-types → dist}/components/Accordion/Accordion.d.ts +0 -0
- /package/{dist-types → dist}/components/Accordion/AccordionSection/AccordionSection.d.ts +0 -0
- /package/{dist-types → dist}/components/Accordion/AccordionSection/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Accordion/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ActionButton/ActionButton.d.ts +0 -0
- /package/{dist-types → dist}/components/ActionButton/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppAside/AppAside.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppAside/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppMain/AppMain.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppMain/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppNavigation/AppNavigation.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppNavigation/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppNavigationBar/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppStatus/AppStatus.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/AppStatus/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/Application/Application.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/Application/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/ApplicationLayout.d.ts +0 -0
- /package/{dist-types → dist}/components/ApplicationLayout/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ArticlePagination/ArticlePagination.d.ts +0 -0
- /package/{dist-types → dist}/components/ArticlePagination/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Badge/Badge.d.ts +0 -0
- /package/{dist-types → dist}/components/Badge/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Button/Button.d.ts +0 -0
- /package/{dist-types → dist}/components/Button/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Card/Card.d.ts +0 -0
- /package/{dist-types → dist}/components/Card/index.d.ts +0 -0
- /package/{dist-types → dist}/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +0 -0
- /package/{dist-types → dist}/components/CheckboxInput/CheckableInput/index.d.ts +0 -0
- /package/{dist-types → dist}/components/CheckboxInput/CheckboxInput.d.ts +0 -0
- /package/{dist-types → dist}/components/CheckboxInput/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Chip/Chip.d.ts +0 -0
- /package/{dist-types → dist}/components/Chip/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Code/Code.d.ts +0 -0
- /package/{dist-types → dist}/components/Code/index.d.ts +0 -0
- /package/{dist-types → dist}/components/CodeSnippet/CodeSnippet.d.ts +0 -0
- /package/{dist-types → dist}/components/CodeSnippet/CodeSnippetBlock.d.ts +0 -0
- /package/{dist-types → dist}/components/CodeSnippet/CodeSnippetDropdown.d.ts +0 -0
- /package/{dist-types → dist}/components/CodeSnippet/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Col/Col.d.ts +0 -0
- /package/{dist-types → dist}/components/Col/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ConfirmationButton/ConfirmationButton.d.ts +0 -0
- /package/{dist-types → dist}/components/ConfirmationButton/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ConfirmationModal/ConfirmationModal.d.ts +0 -0
- /package/{dist-types → dist}/components/ConfirmationModal/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ContextualMenu/ContextualMenu.d.ts +0 -0
- /package/{dist-types → dist}/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +0 -0
- /package/{dist-types → dist}/components/ContextualMenu/ContextualMenuDropdown/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ContextualMenu/index.d.ts +0 -0
- /package/{dist-types → dist}/components/EmptyState/EmptyState.d.ts +0 -0
- /package/{dist-types → dist}/components/EmptyState/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Field/Field.d.ts +0 -0
- /package/{dist-types → dist}/components/Field/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Form/Form.d.ts +0 -0
- /package/{dist-types → dist}/components/Form/index.d.ts +0 -0
- /package/{dist-types → dist}/components/FormikField/FormikField.d.ts +0 -0
- /package/{dist-types → dist}/components/FormikField/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Icon/Icon.d.ts +0 -0
- /package/{dist-types → dist}/components/Icon/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Input/Input.d.ts +0 -0
- /package/{dist-types → dist}/components/Input/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Label/Label.d.ts +0 -0
- /package/{dist-types → dist}/components/Label/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Link/Link.d.ts +0 -0
- /package/{dist-types → dist}/components/Link/index.d.ts +0 -0
- /package/{dist-types → dist}/components/List/List.d.ts +0 -0
- /package/{dist-types → dist}/components/List/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Loader/Loader.d.ts +0 -0
- /package/{dist-types → dist}/components/Loader/index.d.ts +0 -0
- /package/{dist-types → dist}/components/LoginPageLayout/LoginPageLayout.d.ts +0 -0
- /package/{dist-types → dist}/components/LoginPageLayout/index.d.ts +0 -0
- /package/{dist-types → dist}/components/MainTable/MainTable.d.ts +0 -0
- /package/{dist-types → dist}/components/MainTable/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Modal/Modal.d.ts +0 -0
- /package/{dist-types → dist}/components/Modal/index.d.ts +0 -0
- /package/{dist-types → dist}/components/ModularTable/ModularTable.d.ts +0 -0
- /package/{dist-types → dist}/components/ModularTable/index.d.ts +0 -0
- /package/{dist-types → dist}/components/MultiSelect/FadeInDown/FadeInDown.d.ts +0 -0
- /package/{dist-types → dist}/components/MultiSelect/FadeInDown/index.d.ts +0 -0
- /package/{dist-types → dist}/components/MultiSelect/MultiSelect.d.ts +0 -0
- /package/{dist-types → dist}/components/MultiSelect/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Navigation/Navigation.d.ts +0 -0
- /package/{dist-types → dist}/components/Navigation/NavigationLink/NavigationLink.d.ts +0 -0
- /package/{dist-types → dist}/components/Navigation/NavigationLink/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Navigation/NavigationMenu/NavigationMenu.d.ts +0 -0
- /package/{dist-types → dist}/components/Navigation/NavigationMenu/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Navigation/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Navigation/types.d.ts +0 -0
- /package/{dist-types → dist}/components/Notification/Notification.d.ts +0 -0
- /package/{dist-types → dist}/components/Notification/index.d.ts +0 -0
- /package/{dist-types → dist}/components/NotificationProvider/NotificationProvider.d.ts +0 -0
- /package/{dist-types → dist}/components/NotificationProvider/index.d.ts +0 -0
- /package/{dist-types → dist}/components/NotificationProvider/messageBuilder.d.ts +0 -0
- /package/{dist-types → dist}/components/NotificationProvider/types.d.ts +0 -0
- /package/{dist-types → dist}/components/Pagination/Pagination.d.ts +0 -0
- /package/{dist-types → dist}/components/Pagination/PaginationButton/PaginationButton.d.ts +0 -0
- /package/{dist-types → dist}/components/Pagination/PaginationButton/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Pagination/PaginationItem/PaginationItem.d.ts +0 -0
- /package/{dist-types → dist}/components/Pagination/PaginationItem/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Pagination/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Panel/Panel.d.ts +0 -0
- /package/{dist-types → dist}/components/Panel/index.d.ts +0 -0
- /package/{dist-types → dist}/components/PasswordToggle/PasswordToggle.d.ts +0 -0
- /package/{dist-types → dist}/components/PasswordToggle/index.d.ts +0 -0
- /package/{dist-types → dist}/components/RadioInput/RadioInput.d.ts +0 -0
- /package/{dist-types → dist}/components/RadioInput/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Row/Row.d.ts +0 -0
- /package/{dist-types → dist}/components/Row/index.d.ts +0 -0
- /package/{dist-types → dist}/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +0 -0
- /package/{dist-types → dist}/components/SearchAndFilter/FilterPanelSection/index.d.ts +0 -0
- /package/{dist-types → dist}/components/SearchAndFilter/SearchAndFilter.d.ts +0 -0
- /package/{dist-types → dist}/components/SearchAndFilter/index.d.ts +0 -0
- /package/{dist-types → dist}/components/SearchAndFilter/types.d.ts +0 -0
- /package/{dist-types → dist}/components/SearchAndFilter/utils.d.ts +0 -0
- /package/{dist-types → dist}/components/SearchBox/SearchBox.d.ts +0 -0
- /package/{dist-types → dist}/components/SearchBox/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Select/Select.d.ts +0 -0
- /package/{dist-types → dist}/components/Select/index.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/SideNavigation.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/SideNavigationBase/SideNavigationBase.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/SideNavigationBase/index.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/SideNavigationItem/SideNavigationItem.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/SideNavigationItem/index.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/SideNavigationLink/SideNavigationLink.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/SideNavigationLink/index.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/SideNavigationText/SideNavigationText.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/SideNavigationText/index.d.ts +0 -0
- /package/{dist-types → dist}/components/SideNavigation/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Slider/Slider.d.ts +0 -0
- /package/{dist-types → dist}/components/Slider/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Spinner/Spinner.d.ts +0 -0
- /package/{dist-types → dist}/components/Spinner/index.d.ts +0 -0
- /package/{dist-types → dist}/components/StatusLabel/StatusLabel.d.ts +0 -0
- /package/{dist-types → dist}/components/StatusLabel/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Strip/Strip.d.ts +0 -0
- /package/{dist-types → dist}/components/Strip/index.d.ts +0 -0
- /package/{dist-types → dist}/components/SummaryButton/SummaryButton.d.ts +0 -0
- /package/{dist-types → dist}/components/SummaryButton/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Switch/Switch.d.ts +0 -0
- /package/{dist-types → dist}/components/Switch/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Table/Table.d.ts +0 -0
- /package/{dist-types → dist}/components/Table/index.d.ts +0 -0
- /package/{dist-types → dist}/components/TableCell/TableCell.d.ts +0 -0
- /package/{dist-types → dist}/components/TableCell/index.d.ts +0 -0
- /package/{dist-types → dist}/components/TableHeader/TableHeader.d.ts +0 -0
- /package/{dist-types → dist}/components/TableHeader/index.d.ts +0 -0
- /package/{dist-types → dist}/components/TablePagination/TablePagination.d.ts +0 -0
- /package/{dist-types → dist}/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +0 -0
- /package/{dist-types → dist}/components/TablePagination/TablePaginationControls/index.d.ts +0 -0
- /package/{dist-types → dist}/components/TablePagination/index.d.ts +0 -0
- /package/{dist-types → dist}/components/TablePagination/utils.d.ts +0 -0
- /package/{dist-types → dist}/components/TableRow/TableRow.d.ts +0 -0
- /package/{dist-types → dist}/components/TableRow/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Tabs/Tabs.d.ts +0 -0
- /package/{dist-types → dist}/components/Tabs/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Textarea/Textarea.d.ts +0 -0
- /package/{dist-types → dist}/components/Textarea/index.d.ts +0 -0
- /package/{dist-types → dist}/components/Tooltip/Tooltip.d.ts +0 -0
- /package/{dist-types → dist}/components/Tooltip/index.d.ts +0 -0
- /package/{dist-types → dist}/enums.d.ts +0 -0
- /package/{dist-types → dist}/hooks/index.d.ts +0 -0
- /package/{dist-types → dist}/hooks/useId.d.ts +0 -0
- /package/{dist-types → dist}/hooks/useListener.d.ts +0 -0
- /package/{dist-types → dist}/hooks/useOnClickOutside.d.ts +0 -0
- /package/{dist-types → dist}/hooks/useOnEscapePressed.d.ts +0 -0
- /package/{dist-types → dist}/hooks/usePagination.d.ts +0 -0
- /package/{dist-types → dist}/hooks/usePrevious.d.ts +0 -0
- /package/{dist-types → dist}/hooks/useThrottle.d.ts +0 -0
- /package/{dist-types → dist}/hooks/useWindowFitment.d.ts +0 -0
- /package/{dist-types → dist}/index.d.ts +0 -0
- /package/{dist-types → dist}/types/index.d.ts +0 -0
- /package/{dist-types → dist}/utils.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/react-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
-
"module": "dist
|
|
6
|
-
"types": "dist-types/index.d.ts",
|
|
5
|
+
"module": "dist/index.js",
|
|
7
6
|
"author": {
|
|
8
7
|
"email": "webteam@canonical.com",
|
|
9
8
|
"name": "Canonical Webteam"
|
|
@@ -96,7 +95,7 @@
|
|
|
96
95
|
"tsc-alias": "1.8.10",
|
|
97
96
|
"typescript": "5.5.4",
|
|
98
97
|
"typescript-eslint": "8.4.0",
|
|
99
|
-
"vanilla-framework": "4.
|
|
98
|
+
"vanilla-framework": "4.16.0",
|
|
100
99
|
"wait-on": "8.0.0",
|
|
101
100
|
"webpack": "5.94.0"
|
|
102
101
|
},
|
|
@@ -129,12 +128,10 @@
|
|
|
129
128
|
"vanilla-framework": "^3.15.1 || ^4.0.0"
|
|
130
129
|
},
|
|
131
130
|
"scripts": {
|
|
132
|
-
"build": "
|
|
133
|
-
"build-
|
|
134
|
-
"build-
|
|
135
|
-
"build-
|
|
136
|
-
"build-declaration": "rm -rf dist-types && tsc --project tsconfig.build.json --outDir dist-types && tsc-alias -p tsconfig.build.json --outDir dist-types",
|
|
137
|
-
"build-watch": "yarn run build-cjs --watch",
|
|
131
|
+
"build": "rm -rf dist && yarn build-local; yarn build-declaration",
|
|
132
|
+
"build-local": "NODE_ENV=production babel src --out-dir dist --copy-files --no-copy-ignored --extensions '.js,.jsx,.ts,.tsx,.snap' --ignore '**/*.test.ts','**/*.test.tsx','**/*.stories.tsx','**/__snapshots__','src/setupTests.js','src/testing'",
|
|
133
|
+
"build-declaration": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
134
|
+
"build-watch": "yarn run build-local --watch",
|
|
138
135
|
"build-docs": "storybook build -c .storybook -o docs",
|
|
139
136
|
"clean": "rm -rf node_modules dist .out",
|
|
140
137
|
"docs": "storybook dev -p ${PORT:-9009} --no-open",
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var _excluded = ["key"],
|
|
2
|
-
_excluded2 = ["className", "expanded", "externallyControlled", "onExpandedChange", "sections", "titleElement"];
|
|
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 classNames from "classnames";
|
|
7
|
-
import React, { useState } from "react";
|
|
8
|
-
import AccordionSection from "./AccordionSection";
|
|
9
|
-
var generateSections = (sections, setExpanded, expanded, titleElement) => sections.map((_ref, i) => {
|
|
10
|
-
var {
|
|
11
|
-
key
|
|
12
|
-
} = _ref,
|
|
13
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
return /*#__PURE__*/React.createElement(AccordionSection, _extends({
|
|
15
|
-
expanded: expanded,
|
|
16
|
-
key: key || i,
|
|
17
|
-
sectionKey: key === null || key === void 0 ? void 0 : key.toString(),
|
|
18
|
-
setExpanded: setExpanded,
|
|
19
|
-
titleElement: titleElement
|
|
20
|
-
}, props));
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* This is a [React](https://reactjs.org/) component for the Vanilla [Accordion](https://docs.vanillaframework.io/patterns/accordion/).
|
|
25
|
-
*
|
|
26
|
-
* The sidebar accordion, used in listing pages or as navigation, can hold multiple navigation items or to be used as a filter for content.
|
|
27
|
-
*/
|
|
28
|
-
var Accordion = _ref2 => {
|
|
29
|
-
var {
|
|
30
|
-
className,
|
|
31
|
-
expanded,
|
|
32
|
-
externallyControlled,
|
|
33
|
-
onExpandedChange,
|
|
34
|
-
sections,
|
|
35
|
-
titleElement
|
|
36
|
-
} = _ref2,
|
|
37
|
-
asideProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
38
|
-
var [expandedSection, setExpandedSection] = useState(expanded);
|
|
39
|
-
var setExpanded = (id, title) => {
|
|
40
|
-
setExpandedSection(id);
|
|
41
|
-
onExpandedChange && onExpandedChange(id, title);
|
|
42
|
-
};
|
|
43
|
-
return /*#__PURE__*/React.createElement("aside", _extends({
|
|
44
|
-
className: classNames(className, "p-accordion")
|
|
45
|
-
}, asideProps, {
|
|
46
|
-
role: "tablist",
|
|
47
|
-
"aria-multiselectable": "true"
|
|
48
|
-
}), /*#__PURE__*/React.createElement("ul", {
|
|
49
|
-
className: "p-accordion__list"
|
|
50
|
-
}, generateSections(sections, setExpanded, externallyControlled ? expanded : expandedSection, titleElement)));
|
|
51
|
-
};
|
|
52
|
-
export default Accordion;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React, { useId } from "react";
|
|
2
|
-
var AccordionSection = _ref => {
|
|
3
|
-
var {
|
|
4
|
-
content,
|
|
5
|
-
expanded,
|
|
6
|
-
onTitleClick,
|
|
7
|
-
sectionKey,
|
|
8
|
-
setExpanded,
|
|
9
|
-
title,
|
|
10
|
-
titleElement,
|
|
11
|
-
headingLevel = 3
|
|
12
|
-
} = _ref;
|
|
13
|
-
var sectionId = useId();
|
|
14
|
-
var tabId = useId();
|
|
15
|
-
var key = sectionKey || sectionId;
|
|
16
|
-
var isExpanded = expanded === key;
|
|
17
|
-
var Title = titleElement || "div";
|
|
18
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
19
|
-
className: "p-accordion__group"
|
|
20
|
-
}, /*#__PURE__*/React.createElement(Title, {
|
|
21
|
-
role: titleElement ? null : "heading",
|
|
22
|
-
"aria-level": titleElement ? null : headingLevel,
|
|
23
|
-
className: "p-accordion__heading"
|
|
24
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
25
|
-
"aria-controls": "#".concat(sectionId),
|
|
26
|
-
"aria-expanded": isExpanded ? "true" : "false",
|
|
27
|
-
className: "p-accordion__tab",
|
|
28
|
-
id: tabId,
|
|
29
|
-
onClick: () => {
|
|
30
|
-
if (isExpanded) {
|
|
31
|
-
setExpanded(null, null);
|
|
32
|
-
} else {
|
|
33
|
-
setExpanded(key, title);
|
|
34
|
-
}
|
|
35
|
-
onTitleClick && onTitleClick(!isExpanded, key);
|
|
36
|
-
},
|
|
37
|
-
role: "tab",
|
|
38
|
-
type: "button"
|
|
39
|
-
}, title)), /*#__PURE__*/React.createElement("section", {
|
|
40
|
-
"aria-hidden": isExpanded ? "false" : "true",
|
|
41
|
-
"aria-labelledby": tabId,
|
|
42
|
-
className: "p-accordion__panel",
|
|
43
|
-
id: sectionId,
|
|
44
|
-
role: "tabpanel"
|
|
45
|
-
}, content));
|
|
46
|
-
};
|
|
47
|
-
export default AccordionSection;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./AccordionSection";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Accordion";
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
var _excluded = ["appearance", "children", "className", "disabled", "inline", "loading", "success"];
|
|
2
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
5
|
-
import classNames from "classnames";
|
|
6
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
7
|
-
import Icon from "../Icon";
|
|
8
|
-
export var LOADER_MIN_DURATION = 400; // minimium duration (ms) loader displays
|
|
9
|
-
export var SUCCESS_DURATION = 2000; // duration (ms) success tick is displayed
|
|
10
|
-
|
|
11
|
-
export var Label = /*#__PURE__*/function (Label) {
|
|
12
|
-
Label["WAITING"] = "Waiting for action to complete";
|
|
13
|
-
Label["SUCCESS"] = "Action completed";
|
|
14
|
-
return Label;
|
|
15
|
-
}({});
|
|
16
|
-
/**
|
|
17
|
-
* This is a not an existing Vanilla component. It can be used to display submitting states for forms or other actions.
|
|
18
|
-
*
|
|
19
|
-
* ActionButton accepts the props from
|
|
20
|
-
* [Button](?path=/docs/components-button--docs) in addition to those in the
|
|
21
|
-
* props table:
|
|
22
|
-
*/
|
|
23
|
-
var ActionButton = _ref => {
|
|
24
|
-
var {
|
|
25
|
-
appearance,
|
|
26
|
-
children,
|
|
27
|
-
className,
|
|
28
|
-
disabled = false,
|
|
29
|
-
inline = false,
|
|
30
|
-
loading = false,
|
|
31
|
-
success = false
|
|
32
|
-
} = _ref,
|
|
33
|
-
buttonProps = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
var [height, setHeight] = useState();
|
|
35
|
-
var [width, setWidth] = useState();
|
|
36
|
-
var [showLoader, setShowLoader] = useState(false);
|
|
37
|
-
var [showSuccess, setShowSuccess] = useState(false);
|
|
38
|
-
var ref = useRef(null);
|
|
39
|
-
|
|
40
|
-
// Set up loader timer
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
var loaderTimeout;
|
|
43
|
-
if (loading) {
|
|
44
|
-
// Explicitly set button dimensions
|
|
45
|
-
if (ref.current && !!ref.current.getBoundingClientRect()) {
|
|
46
|
-
setHeight(ref.current.getBoundingClientRect().height);
|
|
47
|
-
setWidth(ref.current.getBoundingClientRect().width);
|
|
48
|
-
}
|
|
49
|
-
setShowLoader(true);
|
|
50
|
-
}
|
|
51
|
-
if (!loading && showLoader) {
|
|
52
|
-
loaderTimeout = window.setTimeout(() => {
|
|
53
|
-
setShowLoader(false);
|
|
54
|
-
if (success) {
|
|
55
|
-
setShowSuccess(true);
|
|
56
|
-
}
|
|
57
|
-
}, LOADER_MIN_DURATION);
|
|
58
|
-
}
|
|
59
|
-
if (!loading && !showLoader) {
|
|
60
|
-
setHeight(null);
|
|
61
|
-
setWidth(null);
|
|
62
|
-
}
|
|
63
|
-
return () => window.clearTimeout(loaderTimeout);
|
|
64
|
-
}, [loading, showLoader, success]);
|
|
65
|
-
|
|
66
|
-
// Set up success timer
|
|
67
|
-
useEffect(() => {
|
|
68
|
-
var successTimeout;
|
|
69
|
-
if (showSuccess) {
|
|
70
|
-
successTimeout = window.setTimeout(() => {
|
|
71
|
-
setHeight(null);
|
|
72
|
-
setWidth(null);
|
|
73
|
-
setShowSuccess(false);
|
|
74
|
-
}, SUCCESS_DURATION);
|
|
75
|
-
}
|
|
76
|
-
return () => window.clearTimeout(successTimeout);
|
|
77
|
-
}, [showSuccess]);
|
|
78
|
-
var buttonClasses = classNames(className, "p-action-button", appearance ? "p-button--".concat(appearance) : "p-button", {
|
|
79
|
-
"is-processing": showLoader || showSuccess,
|
|
80
|
-
"is-disabled": disabled,
|
|
81
|
-
"is-inline": inline
|
|
82
|
-
});
|
|
83
|
-
var showIcon = showLoader || showSuccess;
|
|
84
|
-
var icon = showLoader && "spinner" || showSuccess && "success" || null;
|
|
85
|
-
var iconLight = appearance === "positive" || appearance === "negative";
|
|
86
|
-
|
|
87
|
-
// This component uses the base button element instead of the Button component
|
|
88
|
-
// as the button requires a ref and Button would have to be updated to use
|
|
89
|
-
// forwardRef which is not currently supported by components that use
|
|
90
|
-
// typescript generics.
|
|
91
|
-
return /*#__PURE__*/React.createElement("button", _extends({
|
|
92
|
-
className: buttonClasses,
|
|
93
|
-
disabled: disabled,
|
|
94
|
-
ref: ref,
|
|
95
|
-
style: height && width ? {
|
|
96
|
-
height: "".concat(height, "px"),
|
|
97
|
-
width: "".concat(width, "px")
|
|
98
|
-
} : undefined
|
|
99
|
-
}, buttonProps), showIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
100
|
-
"aria-label": showLoader ? Label.WAITING : Label.SUCCESS,
|
|
101
|
-
className: showLoader ? "u-animation--spin" : null,
|
|
102
|
-
light: iconLight,
|
|
103
|
-
name: icon
|
|
104
|
-
}) : children);
|
|
105
|
-
};
|
|
106
|
-
export default ActionButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./ActionButton";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "collapsed", "narrow", "forwardRef", "pinned", "wide"];
|
|
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
|
-
var AppAside = _ref => {
|
|
8
|
-
var {
|
|
9
|
-
children,
|
|
10
|
-
className,
|
|
11
|
-
collapsed,
|
|
12
|
-
narrow,
|
|
13
|
-
forwardRef,
|
|
14
|
-
pinned,
|
|
15
|
-
wide
|
|
16
|
-
} = _ref,
|
|
17
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
-
return /*#__PURE__*/React.createElement("aside", _extends({
|
|
19
|
-
className: classNames("l-aside", className, {
|
|
20
|
-
"is-collapsed": collapsed,
|
|
21
|
-
"is-narrow": narrow,
|
|
22
|
-
"is-pinned": pinned,
|
|
23
|
-
"is-wide": wide
|
|
24
|
-
})
|
|
25
|
-
}, props, {
|
|
26
|
-
ref: forwardRef
|
|
27
|
-
}), children);
|
|
28
|
-
};
|
|
29
|
-
export default AppAside;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./AppAside";
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
/**
|
|
8
|
-
* This is a [React](https://reactjs.org/) component for main content area in the Vanilla
|
|
9
|
-
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
10
|
-
*/
|
|
11
|
-
var AppMain = _ref => {
|
|
12
|
-
var {
|
|
13
|
-
children,
|
|
14
|
-
className
|
|
15
|
-
} = _ref,
|
|
16
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
return /*#__PURE__*/React.createElement("main", _extends({
|
|
18
|
-
className: classNames("l-main", className)
|
|
19
|
-
}, props), children);
|
|
20
|
-
};
|
|
21
|
-
export default AppMain;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./AppMain";
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "collapsed", "pinned"];
|
|
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
|
-
/**
|
|
8
|
-
* This is a [React](https://reactjs.org/) component for the navigation panel in the Vanilla
|
|
9
|
-
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
10
|
-
*
|
|
11
|
-
* This component is used to display the left navigation panel. It should be
|
|
12
|
-
* used alongside [`AppNavigationBar`](/docs/components-applicationlayout-appnavigationbar--docs).
|
|
13
|
-
*/
|
|
14
|
-
var AppNavigation = _ref => {
|
|
15
|
-
var {
|
|
16
|
-
children,
|
|
17
|
-
className,
|
|
18
|
-
collapsed,
|
|
19
|
-
pinned
|
|
20
|
-
} = _ref,
|
|
21
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
-
return /*#__PURE__*/React.createElement("header", _extends({
|
|
23
|
-
className: classNames("l-navigation", className, {
|
|
24
|
-
"is-collapsed": collapsed,
|
|
25
|
-
"is-pinned": pinned
|
|
26
|
-
})
|
|
27
|
-
}, props), /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
className: "l-navigation__drawer"
|
|
29
|
-
}, children));
|
|
30
|
-
};
|
|
31
|
-
export default AppNavigation;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./AppNavigation";
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
/**
|
|
8
|
-
* This is a [React](https://reactjs.org/) component for navigation bar in the Vanilla
|
|
9
|
-
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
10
|
-
*
|
|
11
|
-
* This component is used to display the navigation panel on mobile or small
|
|
12
|
-
* screens. It should be used alongside [`AppNavigation`](/docs/components-applicationlayout-appnavigation--docs).
|
|
13
|
-
*/
|
|
14
|
-
var AppNavigationBar = _ref => {
|
|
15
|
-
var {
|
|
16
|
-
children,
|
|
17
|
-
className
|
|
18
|
-
} = _ref,
|
|
19
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
-
return /*#__PURE__*/React.createElement("header", _extends({
|
|
21
|
-
className: classNames("l-navigation-bar", className)
|
|
22
|
-
}, props), children);
|
|
23
|
-
};
|
|
24
|
-
export default AppNavigationBar;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./AppNavigationBar";
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
/**
|
|
8
|
-
* This is a [React](https://reactjs.org/) component for status area in the Vanilla
|
|
9
|
-
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
10
|
-
*/
|
|
11
|
-
var AppStatus = _ref => {
|
|
12
|
-
var {
|
|
13
|
-
children,
|
|
14
|
-
className
|
|
15
|
-
} = _ref,
|
|
16
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
return /*#__PURE__*/React.createElement("aside", _extends({
|
|
18
|
-
className: classNames("l-status", className)
|
|
19
|
-
}, props), children);
|
|
20
|
-
};
|
|
21
|
-
export default AppStatus;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./AppStatus";
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
/**
|
|
8
|
-
* This is a [React](https://reactjs.org/) component for the application wrapper in the Vanilla
|
|
9
|
-
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
10
|
-
*/
|
|
11
|
-
var Application = _ref => {
|
|
12
|
-
var {
|
|
13
|
-
children,
|
|
14
|
-
className
|
|
15
|
-
} = _ref,
|
|
16
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
18
|
-
className: classNames("l-application", className),
|
|
19
|
-
role: "presentation"
|
|
20
|
-
}, props), children);
|
|
21
|
-
};
|
|
22
|
-
export default Application;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Application";
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
var _excluded = ["aside", "children", "dark", "logo", "mainClassName", "menuCollapsed", "menuPinned", "navigationBarClassName", "navigationClassName", "navItems", "navLinkComponent", "onCollapseMenu", "onPinMenu", "sideNavigation", "status", "statusClassName"];
|
|
2
|
-
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; }
|
|
3
|
-
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; }
|
|
4
|
-
import React from "react";
|
|
5
|
-
import classNames from "classnames";
|
|
6
|
-
import { useState } from "react";
|
|
7
|
-
import Panel from "../Panel";
|
|
8
|
-
import SideNavigation from "../SideNavigation";
|
|
9
|
-
import AppMain from "./AppMain";
|
|
10
|
-
import AppNavigation from "./AppNavigation";
|
|
11
|
-
import AppNavigationBar from "./AppNavigationBar";
|
|
12
|
-
import AppStatus from "./AppStatus";
|
|
13
|
-
import Application from "./Application";
|
|
14
|
-
import Button from "../Button";
|
|
15
|
-
import Icon from "../Icon";
|
|
16
|
-
/**
|
|
17
|
-
* This is a [React](https://reactjs.org/) component for the Vanilla
|
|
18
|
-
* [Application Layout](https://vanillaframework.io/docs/layouts/application).
|
|
19
|
-
*
|
|
20
|
-
* This component combines the various sub-components that make up the
|
|
21
|
-
* Application Layout to make it easier to consume. For some applications this
|
|
22
|
-
* component maybe not be flexible enough, in which case you may choose to use
|
|
23
|
-
* the sub-components directly. Be aware that the application layout requires a
|
|
24
|
-
* specific structure and states to function correctly so there will be a
|
|
25
|
-
* trade-off when using the sub-components directly.
|
|
26
|
-
*/
|
|
27
|
-
var ApplicationLayout = _ref => {
|
|
28
|
-
var {
|
|
29
|
-
aside,
|
|
30
|
-
children,
|
|
31
|
-
dark = true,
|
|
32
|
-
logo,
|
|
33
|
-
mainClassName,
|
|
34
|
-
menuCollapsed,
|
|
35
|
-
menuPinned,
|
|
36
|
-
navigationBarClassName,
|
|
37
|
-
navigationClassName,
|
|
38
|
-
navItems,
|
|
39
|
-
navLinkComponent,
|
|
40
|
-
onCollapseMenu,
|
|
41
|
-
onPinMenu,
|
|
42
|
-
sideNavigation,
|
|
43
|
-
status,
|
|
44
|
-
statusClassName
|
|
45
|
-
} = _ref,
|
|
46
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
-
var [internalMenuPinned, setInternalMenuPinned] = useState(false);
|
|
48
|
-
var [internalMenuCollapsed, setInternalMenuCollapsed] = useState(true);
|
|
49
|
-
var menuIsPinned = menuPinned !== null && menuPinned !== void 0 ? menuPinned : internalMenuPinned;
|
|
50
|
-
var setMenuPinned = onPinMenu !== null && onPinMenu !== void 0 ? onPinMenu : setInternalMenuPinned;
|
|
51
|
-
var menuIsCollapsed = menuCollapsed !== null && menuCollapsed !== void 0 ? menuCollapsed : internalMenuCollapsed;
|
|
52
|
-
var setMenuCollapsed = onCollapseMenu !== null && onCollapseMenu !== void 0 ? onCollapseMenu : setInternalMenuCollapsed;
|
|
53
|
-
return /*#__PURE__*/React.createElement(Application, props, (navItems || sideNavigation) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AppNavigationBar, {
|
|
54
|
-
className: navigationBarClassName
|
|
55
|
-
}, /*#__PURE__*/React.createElement(Panel, {
|
|
56
|
-
dark: dark,
|
|
57
|
-
logo: logo,
|
|
58
|
-
toggle: {
|
|
59
|
-
label: "Menu",
|
|
60
|
-
onClick: () => setMenuCollapsed(!menuIsCollapsed)
|
|
61
|
-
}
|
|
62
|
-
})), /*#__PURE__*/React.createElement(AppNavigation, {
|
|
63
|
-
className: navigationClassName,
|
|
64
|
-
collapsed: menuIsCollapsed,
|
|
65
|
-
pinned: menuIsPinned
|
|
66
|
-
}, /*#__PURE__*/React.createElement(Panel, {
|
|
67
|
-
dark: dark,
|
|
68
|
-
controls: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
69
|
-
hasIcon: true,
|
|
70
|
-
appearance: "base",
|
|
71
|
-
className: classNames("u-no-margin u-hide--medium", {
|
|
72
|
-
"is-dark": dark
|
|
73
|
-
}),
|
|
74
|
-
onClick: evt => {
|
|
75
|
-
setMenuCollapsed(true);
|
|
76
|
-
// The menu stays open while its content has focus, so the
|
|
77
|
-
// close button must blur to actually close the menu.
|
|
78
|
-
evt.currentTarget.blur();
|
|
79
|
-
}
|
|
80
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
81
|
-
name: "close",
|
|
82
|
-
className: classNames({
|
|
83
|
-
"is-light": dark
|
|
84
|
-
})
|
|
85
|
-
}, "Close menu")), /*#__PURE__*/React.createElement(Button, {
|
|
86
|
-
hasIcon: true,
|
|
87
|
-
appearance: "base",
|
|
88
|
-
className: classNames("u-no-margin u-hide--small", {
|
|
89
|
-
"is-dark": dark
|
|
90
|
-
}),
|
|
91
|
-
onClick: () => {
|
|
92
|
-
setMenuPinned(!menuIsPinned);
|
|
93
|
-
}
|
|
94
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
95
|
-
name: menuIsPinned ? "close" : "pin",
|
|
96
|
-
className: classNames({
|
|
97
|
-
"is-light": dark
|
|
98
|
-
})
|
|
99
|
-
}, menuIsPinned ? "Unpin menu" : "Pin menu"))),
|
|
100
|
-
controlsClassName: "u-hide--large",
|
|
101
|
-
stickyHeader: true,
|
|
102
|
-
logo: logo
|
|
103
|
-
}, navItems ? /*#__PURE__*/React.createElement(SideNavigation, {
|
|
104
|
-
dark: dark,
|
|
105
|
-
items: navItems,
|
|
106
|
-
linkComponent: navLinkComponent
|
|
107
|
-
}) : sideNavigation))), /*#__PURE__*/React.createElement(AppMain, {
|
|
108
|
-
className: mainClassName
|
|
109
|
-
}, children), aside, status && /*#__PURE__*/React.createElement(AppStatus, {
|
|
110
|
-
className: statusClassName
|
|
111
|
-
}, status));
|
|
112
|
-
};
|
|
113
|
-
export default ApplicationLayout;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { default } from "./ApplicationLayout";
|
|
2
|
-
export { default as AppAside } from "./AppAside";
|
|
3
|
-
export { default as Application } from "./Application";
|
|
4
|
-
export { default as AppMain } from "./AppMain";
|
|
5
|
-
export { default as AppNavigation } from "./AppNavigation";
|
|
6
|
-
export { default as AppNavigationBar } from "./AppNavigationBar";
|
|
7
|
-
export { default as AppStatus } from "./AppStatus";
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var _excluded = ["className", "nextURL", "nextLabel", "previousURL", "previousLabel"];
|
|
2
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
5
|
-
import classNames from "classnames";
|
|
6
|
-
import React from "react";
|
|
7
|
-
/**
|
|
8
|
-
* This is a [React](https://reactjs.org/) component for the Vanilla [Article pagination](https://docs.vanillaframework.io/patterns/article-pagination/).
|
|
9
|
-
*
|
|
10
|
-
* The article pagination component should be used to navigate from one article to the next, or previous, in chronological order.
|
|
11
|
-
*/
|
|
12
|
-
var ArticlePagination = _ref => {
|
|
13
|
-
var {
|
|
14
|
-
className,
|
|
15
|
-
nextURL,
|
|
16
|
-
nextLabel,
|
|
17
|
-
previousURL,
|
|
18
|
-
previousLabel
|
|
19
|
-
} = _ref,
|
|
20
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
return /*#__PURE__*/React.createElement("footer", _extends({
|
|
22
|
-
className: classNames(className, "p-article-pagination")
|
|
23
|
-
}, props), previousURL && previousLabel && /*#__PURE__*/React.createElement("a", {
|
|
24
|
-
className: "p-article-pagination__link--previous",
|
|
25
|
-
href: previousURL
|
|
26
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
27
|
-
className: "p-article-pagination__label"
|
|
28
|
-
}, "Previous"), /*#__PURE__*/React.createElement("span", {
|
|
29
|
-
className: "p-article-pagination__title"
|
|
30
|
-
}, previousLabel)), nextURL && nextLabel && /*#__PURE__*/React.createElement("a", {
|
|
31
|
-
className: "p-article-pagination__link--next",
|
|
32
|
-
href: nextURL
|
|
33
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
34
|
-
className: "p-article-pagination__label"
|
|
35
|
-
}, "Next"), /*#__PURE__*/React.createElement("span", {
|
|
36
|
-
className: "p-article-pagination__title"
|
|
37
|
-
}, nextLabel)));
|
|
38
|
-
};
|
|
39
|
-
export default ArticlePagination;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./ArticlePagination";
|