@canonical/react-components 3.12.0 → 3.12.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/dist/components/Accordion/Accordion.js +5 -6
- package/dist/components/Accordion/Accordion.stories.js +2 -3
- package/dist/components/Accordion/AccordionSection/AccordionSection.js +1 -2
- package/dist/components/Accordion/AccordionSection/index.js +1 -1
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/ActionButton/ActionButton.js +5 -6
- package/dist/components/ActionButton/ActionButton.stories.js +1 -1
- package/dist/components/ActionButton/index.js +1 -1
- package/dist/components/ApplicationLayout/AppAside/AppAside.js +4 -4
- package/dist/components/ApplicationLayout/AppAside/AppAside.stories.js +3 -4
- package/dist/components/ApplicationLayout/AppAside/index.js +1 -1
- package/dist/components/ApplicationLayout/AppMain/AppMain.js +4 -4
- package/dist/components/ApplicationLayout/AppMain/AppMain.stories.js +1 -1
- package/dist/components/ApplicationLayout/AppMain/index.js +1 -1
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.js +4 -4
- package/dist/components/ApplicationLayout/AppNavigation/AppNavigation.stories.js +3 -4
- package/dist/components/ApplicationLayout/AppNavigation/index.js +1 -1
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.js +4 -4
- package/dist/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.stories.js +2 -3
- package/dist/components/ApplicationLayout/AppNavigationBar/index.js +1 -1
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.js +4 -4
- package/dist/components/ApplicationLayout/AppStatus/AppStatus.stories.js +1 -1
- package/dist/components/ApplicationLayout/AppStatus/index.js +1 -1
- package/dist/components/ApplicationLayout/Application/Application.js +4 -4
- package/dist/components/ApplicationLayout/Application/Application.stories.js +1 -1
- package/dist/components/ApplicationLayout/Application/index.js +1 -1
- package/dist/components/ApplicationLayout/ApplicationLayout.js +4 -5
- package/dist/components/ApplicationLayout/ApplicationLayout.stories.js +2 -3
- package/dist/components/ApplicationLayout/index.js +1 -1
- package/dist/components/ArticlePagination/ArticlePagination.js +4 -4
- package/dist/components/ArticlePagination/ArticlePagination.stories.js +1 -1
- package/dist/components/ArticlePagination/index.js +1 -1
- package/dist/components/Badge/Badge.js +4 -4
- package/dist/components/Badge/Badge.stories.js +2 -3
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Button/Button.js +4 -4
- package/dist/components/Button/Button.stories.js +2 -3
- package/dist/components/Button/index.js +1 -2
- package/dist/components/Card/Card.js +5 -6
- package/dist/components/Card/Card.stories.js +3 -3
- package/dist/components/Card/index.js +1 -1
- package/dist/components/CheckboxInput/CheckableInput/CheckableInput.js +5 -6
- package/dist/components/CheckboxInput/CheckableInput/index.js +1 -1
- package/dist/components/CheckboxInput/CheckboxInput.js +4 -4
- package/dist/components/CheckboxInput/CheckboxInput.stories.js +1 -1
- package/dist/components/CheckboxInput/index.js +1 -1
- package/dist/components/Chip/Chip.js +4 -4
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Chip/index.js +1 -1
- package/dist/components/Code/Code.js +5 -6
- package/dist/components/Code/index.js +1 -1
- package/dist/components/CodeSnippet/CodeSnippet.js +4 -4
- package/dist/components/CodeSnippet/CodeSnippet.stories.js +2 -3
- package/dist/components/CodeSnippet/CodeSnippetBlock.js +2 -2
- package/dist/components/CodeSnippet/CodeSnippetDropdown.js +4 -4
- package/dist/components/CodeSnippet/index.js +1 -1
- package/dist/components/Col/Col.js +4 -4
- package/dist/components/Col/Col.stories.js +1 -1
- package/dist/components/Col/index.js +1 -2
- package/dist/components/ColumnSelector/ColumnSelector.js +2 -2
- package/dist/components/ColumnSelector/ColumnSelector.stories.js +2 -3
- package/dist/components/ColumnSelector/ColumnSelectorStoriesHelper.js +1 -1
- package/dist/components/ColumnSelector/columnSelectorHelper.js +2 -2
- package/dist/components/ColumnSelector/index.js +1 -1
- package/dist/components/ConfirmationButton/ConfirmationButton.js +4 -4
- package/dist/components/ConfirmationButton/ConfirmationButton.stories.js +2 -3
- package/dist/components/ConfirmationButton/index.js +1 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.js +4 -4
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +2 -3
- package/dist/components/ConfirmationModal/index.js +1 -1
- package/dist/components/ContextualMenu/ContextualMenu.d.ts +10 -5
- package/dist/components/ContextualMenu/ContextualMenu.js +109 -14
- package/dist/components/ContextualMenu/ContextualMenu.stories.js +2 -2
- package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +1 -1
- package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +10 -9
- package/dist/components/ContextualMenu/ContextualMenuDropdown/index.js +1 -1
- package/dist/components/ContextualMenu/index.js +1 -1
- package/dist/components/CustomLayout/CustomLayout.js +1 -1
- package/dist/components/CustomLayout/CustomLayout.stories.js +1 -1
- package/dist/components/CustomLayout/index.js +1 -1
- package/dist/components/CustomSelect/CustomSelect.js +6 -6
- package/dist/components/CustomSelect/CustomSelect.stories.d.ts +1 -1
- package/dist/components/CustomSelect/CustomSelect.stories.js +6 -7
- package/dist/components/CustomSelect/CustomSelectDropdown/CustomSelectDropdown.js +2 -3
- package/dist/components/CustomSelect/CustomSelectDropdown/index.js +1 -2
- package/dist/components/CustomSelect/index.js +1 -1
- package/dist/components/DoughnutChart/DoughnutChart.js +31 -14
- package/dist/components/DoughnutChart/DoughnutChart.stories.js +1 -1
- package/dist/components/DoughnutChart/index.js +1 -1
- package/dist/components/EmptyState/EmptyState.js +4 -4
- package/dist/components/EmptyState/EmptyState.stories.js +2 -3
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/EventQueue/EventQueue.js +1 -2
- package/dist/components/EventQueue/EventQueue.stories.js +2 -3
- package/dist/components/Field/Field.js +4 -4
- package/dist/components/Field/index.js +1 -1
- package/dist/components/Form/Form.js +4 -4
- package/dist/components/Form/Form.stories.js +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/FormikField/FormikField.js +4 -4
- package/dist/components/FormikField/FormikField.stories.js +1 -1
- package/dist/components/FormikField/index.js +1 -1
- package/dist/components/Icon/Icon.js +4 -4
- package/dist/components/Icon/Icon.stories.js +2 -3
- package/dist/components/Icon/index.js +1 -2
- package/dist/components/Input/Input.js +7 -8
- package/dist/components/Input/Input.stories.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Label/Label.js +4 -4
- package/dist/components/Label/index.js +1 -1
- package/dist/components/Link/Link.js +4 -4
- package/dist/components/Link/Link.stories.js +1 -1
- package/dist/components/Link/index.js +1 -1
- package/dist/components/List/List.js +5 -5
- package/dist/components/List/List.stories.js +1 -1
- package/dist/components/List/index.js +1 -1
- package/dist/components/Loader/Loader.js +1 -1
- package/dist/components/Loader/index.js +1 -1
- package/dist/components/LoginPageLayout/LoginPageLayout.js +1 -1
- package/dist/components/LoginPageLayout/LoginPageLayout.stories.js +1 -1
- package/dist/components/LoginPageLayout/index.js +1 -1
- package/dist/components/MainTable/MainTable.js +6 -7
- package/dist/components/MainTable/MainTable.stories.js +2 -3
- package/dist/components/MainTable/index.js +1 -1
- package/dist/components/Modal/Modal.js +5 -6
- package/dist/components/Modal/Modal.stories.js +2 -3
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/ModularTable/ModularTable.js +9 -10
- package/dist/components/ModularTable/ModularTable.stories.js +8 -9
- package/dist/components/ModularTable/index.js +1 -1
- package/dist/components/MultiSelect/FadeInDown/FadeInDown.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +5 -6
- package/dist/components/MultiSelect/MultiSelect.stories.js +4 -5
- package/dist/components/Navigation/Navigation.js +7 -8
- package/dist/components/Navigation/Navigation.stories.js +1 -1
- package/dist/components/Navigation/NavigationLink/NavigationLink.js +6 -6
- package/dist/components/Navigation/NavigationLink/index.js +1 -1
- package/dist/components/Navigation/NavigationMenu/NavigationMenu.js +7 -8
- package/dist/components/Navigation/NavigationMenu/index.js +1 -1
- package/dist/components/Navigation/index.js +1 -1
- package/dist/components/NotificationProvider/NotificationProvider.js +2 -3
- package/dist/components/NotificationProvider/messageBuilder.js +1 -1
- package/dist/components/Notifications/Notification/Notification.js +5 -6
- package/dist/components/Notifications/Notification/Notification.stories.js +1 -2
- package/dist/components/Notifications/Notification/index.js +1 -2
- package/dist/components/Notifications/ToastNotification/Animate.js +1 -2
- package/dist/components/Notifications/ToastNotification/ToastNotification.js +2 -2
- package/dist/components/Notifications/ToastNotification/ToastNotification.stories.js +2 -3
- package/dist/components/Notifications/ToastNotification/ToastNotificationList.js +3 -4
- package/dist/components/Notifications/ToastNotification/ToastNotificationProvider.js +4 -5
- package/dist/components/Notifications/ToastNotification/index.js +2 -3
- package/dist/components/Notifications/index.js +1 -2
- package/dist/components/Pagination/Pagination.js +8 -8
- package/dist/components/Pagination/Pagination.stories.js +1 -1
- package/dist/components/Pagination/PaginationButton/PaginationButton.js +1 -1
- package/dist/components/Pagination/PaginationButton/index.js +1 -1
- package/dist/components/Pagination/PaginationItem/PaginationItem.js +1 -1
- package/dist/components/Pagination/PaginationItem/index.js +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/Panel/Panel.js +4 -4
- package/dist/components/Panel/Panel.stories.js +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/PasswordToggle/PasswordToggle.js +5 -6
- package/dist/components/PasswordToggle/PasswordToggle.stories.js +1 -1
- package/dist/components/PasswordToggle/index.js +1 -1
- package/dist/components/PrefixedInput/PrefixedInput.js +5 -6
- package/dist/components/PrefixedInput/PrefixedInput.stories.js +1 -1
- package/dist/components/PrefixedInput/index.js +1 -1
- package/dist/components/PrefixedIpInput/PrefixedIpInput.js +4 -4
- package/dist/components/PrefixedIpInput/PrefixedIpInput.stories.js +3 -4
- package/dist/components/PrefixedIpInput/index.js +1 -1
- package/dist/components/RadioInput/RadioInput.js +4 -4
- package/dist/components/RadioInput/RadioInput.stories.js +1 -1
- package/dist/components/RadioInput/index.js +1 -1
- package/dist/components/Row/Row.js +4 -4
- package/dist/components/Row/Row.stories.js +1 -1
- package/dist/components/Row/index.js +1 -1
- package/dist/components/ScrollableContainer/ScrollableContainer.js +2 -3
- package/dist/components/ScrollableContainer/ScrollableContainer.stories.js +1 -1
- package/dist/components/ScrollableContainer/index.js +1 -1
- package/dist/components/ScrollableTable/ScrollableTable.js +1 -2
- package/dist/components/ScrollableTable/ScrollableTable.stories.js +3 -3
- package/dist/components/ScrollableTable/index.js +1 -1
- package/dist/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.js +4 -5
- package/dist/components/SearchAndFilter/FilterPanelSection/index.js +1 -1
- package/dist/components/SearchAndFilter/SearchAndFilter.js +5 -6
- package/dist/components/SearchAndFilter/SearchAndFilter.stories.js +1 -1
- package/dist/components/SearchAndFilter/index.js +1 -1
- package/dist/components/SearchBox/SearchBox.js +5 -6
- package/dist/components/SearchBox/SearchBox.stories.js +1 -1
- package/dist/components/SearchBox/index.js +1 -1
- package/dist/components/Select/Select.js +5 -6
- package/dist/components/Select/Select.stories.js +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/SideNavigation/SideNavigation.js +4 -4
- package/dist/components/SideNavigation/SideNavigation.stories.js +1 -1
- package/dist/components/SideNavigation/SideNavigationBase/SideNavigationBase.js +4 -4
- package/dist/components/SideNavigation/SideNavigationBase/index.js +1 -1
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.js +4 -4
- package/dist/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.js +2 -2
- package/dist/components/SideNavigation/SideNavigationItem/index.js +1 -1
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.js +4 -4
- package/dist/components/SideNavigation/SideNavigationLink/SideNavigationLink.stories.js +1 -1
- package/dist/components/SideNavigation/SideNavigationLink/index.js +1 -1
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.js +4 -4
- package/dist/components/SideNavigation/SideNavigationText/SideNavigationText.stories.js +1 -1
- package/dist/components/SideNavigation/SideNavigationText/index.js +1 -1
- package/dist/components/SideNavigation/index.js +1 -1
- package/dist/components/SidePanel/SidePanel.js +3 -4
- package/dist/components/SidePanel/SidePanel.stories.js +2 -3
- package/dist/components/SidePanel/common/Content.js +1 -1
- package/dist/components/SidePanel/common/Footer.js +1 -1
- package/dist/components/SidePanel/common/Header.js +1 -1
- package/dist/components/SidePanel/common/HeaderControls.js +1 -1
- package/dist/components/SidePanel/common/HeaderTitle.js +1 -1
- package/dist/components/SidePanel/common/Sticky.js +1 -1
- package/dist/components/SidePanel/index.js +1 -1
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/SkipLink/SkipLink.stories.js +1 -1
- package/dist/components/SkipLink/index.js +1 -1
- package/dist/components/Slider/Slider.js +5 -6
- package/dist/components/Slider/Slider.stories.js +3 -4
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Spinner/Spinner.js +4 -4
- package/dist/components/Spinner/Spinner.stories.js +1 -1
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/StatusLabel/StatusLabel.js +4 -4
- package/dist/components/StatusLabel/StatusLabel.stories.js +2 -3
- package/dist/components/StatusLabel/index.js +1 -2
- package/dist/components/Stepper/Step/Step.js +4 -4
- package/dist/components/Stepper/Step/Step.stories.js +2 -2
- package/dist/components/Stepper/Step/index.js +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/Stepper.stories.js +1 -1
- package/dist/components/Stepper/index.js +1 -1
- package/dist/components/Strip/Strip.js +4 -4
- package/dist/components/Strip/Strip.stories.js +1 -1
- package/dist/components/Strip/index.js +1 -1
- package/dist/components/SummaryButton/SummaryButton.js +1 -1
- package/dist/components/SummaryButton/SummaryButton.stories.js +1 -1
- package/dist/components/SummaryButton/index.js +1 -1
- package/dist/components/Switch/Switch.js +5 -6
- package/dist/components/Switch/Switch.stories.js +1 -1
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Table/Table.js +4 -4
- package/dist/components/Table/index.js +1 -1
- package/dist/components/TableCell/TableCell.js +4 -4
- package/dist/components/TableCell/index.js +1 -1
- package/dist/components/TableHeader/TableHeader.d.ts +3 -1
- package/dist/components/TableHeader/TableHeader.js +12 -7
- package/dist/components/TableHeader/index.js +1 -1
- package/dist/components/TablePagination/TablePagination.js +5 -6
- package/dist/components/TablePagination/TablePagination.stories.js +1 -1
- package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.js +4 -4
- package/dist/components/TablePagination/TablePaginationControls/index.js +1 -1
- package/dist/components/TablePagination/index.js +1 -1
- package/dist/components/TableRow/TableRow.js +4 -4
- package/dist/components/TableRow/index.js +1 -1
- package/dist/components/Tabs/Tabs.js +4 -4
- package/dist/components/Tabs/Tabs.stories.js +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Textarea/Textarea.js +7 -8
- package/dist/components/Textarea/Textarea.stories.js +1 -1
- package/dist/components/Textarea/index.js +1 -1
- package/dist/components/ThemeSwitcher/ThemeSwitcher.js +1 -2
- package/dist/components/ThemeSwitcher/ThemeSwitcher.stories.js +1 -1
- package/dist/components/ThemeSwitcher/index.js +1 -2
- package/dist/components/Tooltip/Tooltip.js +2 -3
- package/dist/components/Tooltip/Tooltip.stories.js +2 -3
- package/dist/components/Tooltip/index.js +1 -2
- package/dist/esm/components/Accordion/Accordion.js +3 -3
- package/dist/esm/components/ActionButton/ActionButton.js +3 -3
- package/dist/esm/components/ApplicationLayout/AppAside/AppAside.js +3 -3
- package/dist/esm/components/ApplicationLayout/AppAside/AppAside.stories.js +1 -1
- package/dist/esm/components/ApplicationLayout/AppMain/AppMain.js +3 -3
- package/dist/esm/components/ApplicationLayout/AppNavigation/AppNavigation.js +3 -3
- package/dist/esm/components/ApplicationLayout/AppNavigation/AppNavigation.stories.js +1 -1
- package/dist/esm/components/ApplicationLayout/AppNavigationBar/AppNavigationBar.js +3 -3
- package/dist/esm/components/ApplicationLayout/AppStatus/AppStatus.js +3 -3
- package/dist/esm/components/ApplicationLayout/Application/Application.js +3 -3
- package/dist/esm/components/ApplicationLayout/ApplicationLayout.js +2 -2
- package/dist/esm/components/ArticlePagination/ArticlePagination.js +3 -3
- package/dist/esm/components/Badge/Badge.js +3 -3
- package/dist/esm/components/Button/Button.js +3 -3
- package/dist/esm/components/Card/Card.js +3 -3
- package/dist/esm/components/Card/Card.stories.js +2 -2
- package/dist/esm/components/CheckboxInput/CheckableInput/CheckableInput.js +3 -3
- package/dist/esm/components/CheckboxInput/CheckboxInput.js +3 -3
- package/dist/esm/components/Chip/Chip.js +3 -3
- package/dist/esm/components/Code/Code.js +3 -3
- package/dist/esm/components/CodeSnippet/CodeSnippet.js +3 -3
- package/dist/esm/components/CodeSnippet/CodeSnippetBlock.js +1 -1
- package/dist/esm/components/CodeSnippet/CodeSnippetDropdown.js +3 -3
- package/dist/esm/components/Col/Col.js +3 -3
- package/dist/esm/components/ColumnSelector/ColumnSelector.js +1 -1
- package/dist/esm/components/ColumnSelector/columnSelectorHelper.js +2 -2
- package/dist/esm/components/ConfirmationButton/ConfirmationButton.js +3 -3
- package/dist/esm/components/ConfirmationModal/ConfirmationModal.js +3 -3
- package/dist/esm/components/ContextualMenu/ContextualMenu.d.ts +10 -5
- package/dist/esm/components/ContextualMenu/ContextualMenu.js +107 -11
- package/dist/esm/components/ContextualMenu/ContextualMenu.stories.js +1 -1
- package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +1 -1
- package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.js +8 -6
- package/dist/esm/components/CustomSelect/CustomSelect.js +4 -3
- package/dist/esm/components/CustomSelect/CustomSelect.stories.d.ts +1 -1
- package/dist/esm/components/CustomSelect/CustomSelect.stories.js +4 -4
- package/dist/esm/components/DoughnutChart/DoughnutChart.js +29 -11
- package/dist/esm/components/EmptyState/EmptyState.js +3 -3
- package/dist/esm/components/Field/Field.js +3 -3
- package/dist/esm/components/Form/Form.js +3 -3
- package/dist/esm/components/FormikField/FormikField.js +3 -3
- package/dist/esm/components/Icon/Icon.js +3 -3
- package/dist/esm/components/Input/Input.js +5 -5
- package/dist/esm/components/Label/Label.js +3 -3
- package/dist/esm/components/Link/Link.js +3 -3
- package/dist/esm/components/List/List.js +4 -4
- package/dist/esm/components/MainTable/MainTable.js +4 -4
- package/dist/esm/components/Modal/Modal.js +3 -3
- package/dist/esm/components/ModularTable/ModularTable.js +7 -7
- package/dist/esm/components/ModularTable/ModularTable.stories.js +6 -6
- package/dist/esm/components/MultiSelect/MultiSelect.js +3 -3
- package/dist/esm/components/MultiSelect/MultiSelect.stories.js +3 -3
- package/dist/esm/components/Navigation/Navigation.js +5 -5
- package/dist/esm/components/Navigation/NavigationLink/NavigationLink.js +5 -5
- package/dist/esm/components/Navigation/NavigationMenu/NavigationMenu.js +5 -5
- package/dist/esm/components/Notifications/Notification/Notification.js +3 -3
- package/dist/esm/components/Notifications/ToastNotification/ToastNotification.js +1 -1
- package/dist/esm/components/Notifications/ToastNotification/ToastNotificationList.js +1 -1
- package/dist/esm/components/Notifications/ToastNotification/ToastNotificationProvider.js +2 -2
- package/dist/esm/components/Pagination/Pagination.js +7 -7
- package/dist/esm/components/Panel/Panel.js +3 -3
- package/dist/esm/components/PasswordToggle/PasswordToggle.js +3 -3
- package/dist/esm/components/PrefixedInput/PrefixedInput.js +3 -3
- package/dist/esm/components/PrefixedIpInput/PrefixedIpInput.js +3 -3
- package/dist/esm/components/PrefixedIpInput/PrefixedIpInput.stories.js +1 -1
- package/dist/esm/components/RadioInput/RadioInput.js +3 -3
- package/dist/esm/components/Row/Row.js +3 -3
- package/dist/esm/components/ScrollableTable/ScrollableTable.stories.js +2 -2
- package/dist/esm/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.js +3 -3
- package/dist/esm/components/SearchAndFilter/SearchAndFilter.js +3 -3
- package/dist/esm/components/SearchBox/SearchBox.js +3 -3
- package/dist/esm/components/Select/Select.js +3 -3
- package/dist/esm/components/SideNavigation/SideNavigation.js +3 -3
- package/dist/esm/components/SideNavigation/SideNavigationBase/SideNavigationBase.js +3 -3
- package/dist/esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.js +3 -3
- package/dist/esm/components/SideNavigation/SideNavigationItem/SideNavigationItem.stories.js +1 -1
- package/dist/esm/components/SideNavigation/SideNavigationLink/SideNavigationLink.js +3 -3
- package/dist/esm/components/SideNavigation/SideNavigationText/SideNavigationText.js +3 -3
- package/dist/esm/components/SidePanel/SidePanel.js +1 -1
- package/dist/esm/components/Slider/Slider.js +3 -3
- package/dist/esm/components/Slider/Slider.stories.js +1 -1
- package/dist/esm/components/Spinner/Spinner.js +3 -3
- package/dist/esm/components/StatusLabel/StatusLabel.js +3 -3
- package/dist/esm/components/Stepper/Step/Step.js +3 -3
- package/dist/esm/components/Stepper/Step/Step.stories.js +1 -1
- package/dist/esm/components/Strip/Strip.js +3 -3
- package/dist/esm/components/Switch/Switch.js +3 -3
- package/dist/esm/components/Table/Table.js +3 -3
- package/dist/esm/components/TableCell/TableCell.js +3 -3
- package/dist/esm/components/TableHeader/TableHeader.d.ts +3 -1
- package/dist/esm/components/TableHeader/TableHeader.js +11 -6
- package/dist/esm/components/TablePagination/TablePagination.js +3 -3
- package/dist/esm/components/TablePagination/TablePaginationControls/TablePaginationControls.js +3 -3
- package/dist/esm/components/TableRow/TableRow.js +3 -3
- package/dist/esm/components/Tabs/Tabs.js +3 -3
- package/dist/esm/components/Textarea/Textarea.js +5 -5
- package/dist/esm/external/useSSR.js +2 -2
- package/dist/esm/hooks/usePagination.js +9 -5
- package/dist/external/useSSR.js +2 -2
- package/dist/hooks/usePagination.js +8 -4
- package/dist/index.js +2 -3
- package/package.json +17 -17
|
@@ -5,18 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Label = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
-
var
|
|
8
|
+
var _external = require("../../external");
|
|
9
9
|
var _hooks = require("../../hooks");
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
11
12
|
var _ContextualMenuDropdown = _interopRequireDefault(require("./ContextualMenuDropdown"));
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
|
+
const _excluded = ["autoAdjust", "children", "className", "closeOnEsc", "closeOnOutsideClick", "constrainPanelWidth", "dropdownClassName", "dropdownProps", "hasToggleIcon", "links", "onToggleMenu", "position", "positionNode", "scrollOverflow", "toggle", "toggleAppearance", "toggleClassName", "toggleDisabled", "toggleLabel", "toggleLabelFirst", "toggleProps", "visible", "focusFirstItemOnOpen"];
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
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); }
|
|
17
|
+
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], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
18
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
19
|
+
const focusableElementSelectors = 'a[href]:not([tabindex="-1"]), button:not([disabled]):not([aria-disabled="true"]), textarea:not([disabled]):not([aria-disabled="true"]):not([tabindex="-1"]), input:not([disabled]):not([aria-disabled="true"]):not([tabindex="-1"]), select:not([disabled]):not([aria-disabled="true"]):not([tabindex="-1"]), area[href]:not([tabindex="-1"]), iframe:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"]), [contentEditable=true]:not([tabindex="-1"])';
|
|
20
20
|
let Label = exports.Label = /*#__PURE__*/function (Label) {
|
|
21
21
|
Label["Toggle"] = "Toggle menu";
|
|
22
22
|
return Label;
|
|
@@ -79,13 +79,15 @@ const ContextualMenu = _ref => {
|
|
|
79
79
|
toggleLabel,
|
|
80
80
|
toggleLabelFirst = true,
|
|
81
81
|
toggleProps,
|
|
82
|
-
visible = false
|
|
82
|
+
visible = false,
|
|
83
|
+
focusFirstItemOnOpen = true
|
|
83
84
|
} = _ref,
|
|
84
85
|
wrapperProps = _objectWithoutProperties(_ref, _excluded);
|
|
85
|
-
const
|
|
86
|
+
const dropdownId = (0, _react.useId)();
|
|
86
87
|
const wrapper = (0, _react.useRef)(null);
|
|
87
88
|
const [positionCoords, setPositionCoords] = (0, _react.useState)();
|
|
88
89
|
const [adjustedPosition, setAdjustedPosition] = (0, _react.useState)(position);
|
|
90
|
+
const focusAnimationFrameId = (0, _react.useRef)(null);
|
|
89
91
|
(0, _react.useEffect)(() => {
|
|
90
92
|
setAdjustedPosition(position);
|
|
91
93
|
}, [position, autoAdjust]);
|
|
@@ -98,6 +100,60 @@ const ContextualMenu = _ref => {
|
|
|
98
100
|
}
|
|
99
101
|
setPositionCoords(parent.getBoundingClientRect());
|
|
100
102
|
}, [wrapper, positionNode]);
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Gets the dropdopwn element (`ContextualMenuDropdown`).
|
|
106
|
+
* @returns The dropdown element or null if it does not exist.
|
|
107
|
+
*/
|
|
108
|
+
const getDropdown = (0, _react.useCallback)(() => {
|
|
109
|
+
if (typeof document === "undefined") return null;
|
|
110
|
+
/**
|
|
111
|
+
* This is Using `document` instead of refs because `dropdownProps` may include a ref,
|
|
112
|
+
* while `dropdownId` is unique and controlled by us.
|
|
113
|
+
*/
|
|
114
|
+
return document.getElementById(dropdownId);
|
|
115
|
+
}, [dropdownId]);
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Gets all focusable items in the dropdown element.
|
|
119
|
+
* @returns Array of focusable items in the dropdown element.
|
|
120
|
+
*/
|
|
121
|
+
const getFocusableDropdownItems = (0, _react.useCallback)(() => {
|
|
122
|
+
var _getDropdown;
|
|
123
|
+
return Array.from(((_getDropdown = getDropdown()) === null || _getDropdown === void 0 ? void 0 : _getDropdown.querySelectorAll(focusableElementSelectors)) || []);
|
|
124
|
+
}, [getDropdown]);
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Focuses the first focusable item in the dropdown element.
|
|
128
|
+
* This is useful for keyboard users (who expect focus to move into the menu when it opens).
|
|
129
|
+
*/
|
|
130
|
+
const focusFirstDropdownItem = (0, _react.useCallback)(() => {
|
|
131
|
+
var _focusableElements$;
|
|
132
|
+
const focusableElements = getFocusableDropdownItems();
|
|
133
|
+
(_focusableElements$ = focusableElements[0]) === null || _focusableElements$ === void 0 || _focusableElements$.focus();
|
|
134
|
+
}, [getFocusableDropdownItems]);
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Cleans up any pending dropdown focus animation frames.
|
|
138
|
+
*/
|
|
139
|
+
const cleanupDropdownFocus = () => {
|
|
140
|
+
if (focusAnimationFrameId.current) {
|
|
141
|
+
cancelAnimationFrame(focusAnimationFrameId.current);
|
|
142
|
+
focusAnimationFrameId.current = null;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
const returnFocusToTrigger = () => {
|
|
146
|
+
var _wrapper$current;
|
|
147
|
+
// Button element does not accept refs.
|
|
148
|
+
const trigger = (_wrapper$current = wrapper.current) === null || _wrapper$current === void 0 ? void 0 : _wrapper$current.querySelector(".p-contextual-menu__toggle");
|
|
149
|
+
// return focus to the trigger button when the menu closes
|
|
150
|
+
if (trigger) {
|
|
151
|
+
trigger.focus();
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
(0, _react.useEffect)(() => {
|
|
155
|
+
return () => cleanupDropdownFocus();
|
|
156
|
+
}, []);
|
|
101
157
|
const {
|
|
102
158
|
openPortal,
|
|
103
159
|
closePortal,
|
|
@@ -107,18 +163,57 @@ const ContextualMenu = _ref => {
|
|
|
107
163
|
closeOnEsc,
|
|
108
164
|
closeOnOutsideClick,
|
|
109
165
|
isOpen: visible,
|
|
110
|
-
onOpen:
|
|
166
|
+
onOpen: event => {
|
|
111
167
|
// Call the toggle callback, if supplied.
|
|
112
168
|
onToggleMenu === null || onToggleMenu === void 0 || onToggleMenu(true);
|
|
113
169
|
// When the menu opens then update the coordinates of the parent.
|
|
114
170
|
updatePositionCoords();
|
|
171
|
+
if (focusFirstItemOnOpen && // Don't focus the item unless it was opened by a keyboard event
|
|
172
|
+
// This type silliness is because `detail` isn't on the type for `event.nativeEvent` passed from `usePortal`,
|
|
173
|
+
// as we are using `CustomEvent<HTMLElement>` which does not have `detail` defined.
|
|
174
|
+
event !== null && event !== void 0 && event.nativeEvent && "detail" in event.nativeEvent && event.nativeEvent.detail === 0) {
|
|
175
|
+
cleanupDropdownFocus();
|
|
176
|
+
// We need to wait a frame for any pending focus events to complete.
|
|
177
|
+
focusAnimationFrameId.current = requestAnimationFrame(() => focusFirstDropdownItem());
|
|
178
|
+
}
|
|
115
179
|
},
|
|
116
180
|
onClose: () => {
|
|
117
181
|
// Call the toggle callback, if supplied.
|
|
118
182
|
onToggleMenu === null || onToggleMenu === void 0 || onToggleMenu(false);
|
|
183
|
+
cleanupDropdownFocus();
|
|
184
|
+
returnFocusToTrigger();
|
|
119
185
|
},
|
|
120
186
|
programmaticallyOpen: true
|
|
121
187
|
});
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Trap focus within the dropdown
|
|
191
|
+
*/
|
|
192
|
+
(0, _react.useEffect)(() => {
|
|
193
|
+
const handleKeyDown = e => {
|
|
194
|
+
if (e.key !== "Tab" || !isOpen) return;
|
|
195
|
+
const items = getFocusableDropdownItems();
|
|
196
|
+
if (items.length === 0) return;
|
|
197
|
+
const active = document.activeElement;
|
|
198
|
+
const first = items[0];
|
|
199
|
+
const last = items[items.length - 1];
|
|
200
|
+
if (!e.shiftKey && active === last) {
|
|
201
|
+
// Tab on the last item: wrap back to the first focusable item
|
|
202
|
+
e.preventDefault();
|
|
203
|
+
first.focus();
|
|
204
|
+
} else if (e.shiftKey && active === first) {
|
|
205
|
+
// Shift+Tab on the first item: wrap back to the last focusable item
|
|
206
|
+
e.preventDefault();
|
|
207
|
+
last.focus();
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
const dropdown = getDropdown();
|
|
211
|
+
if (!dropdown) return undefined;
|
|
212
|
+
dropdown.addEventListener("keydown", handleKeyDown);
|
|
213
|
+
return () => {
|
|
214
|
+
dropdown.removeEventListener("keydown", handleKeyDown);
|
|
215
|
+
};
|
|
216
|
+
}, [getDropdown, getFocusableDropdownItems, isOpen]);
|
|
122
217
|
const previousVisible = (0, _hooks.usePrevious)(visible);
|
|
123
218
|
const labelNode = toggleLabel && typeof toggleLabel === "string" ? /*#__PURE__*/_react.default.createElement("span", null, toggleLabel) : /*#__PURE__*/_react.default.isValidElement(toggleLabel) ? toggleLabel : null;
|
|
124
219
|
const contextualMenuClassName = (0, _classnames.default)(className, "p-contextual-menu", {
|
|
@@ -183,7 +278,7 @@ const ContextualMenu = _ref => {
|
|
|
183
278
|
} else if (hasToggleIcon || toggleLabel) {
|
|
184
279
|
toggleNode = /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
|
|
185
280
|
appearance: toggleAppearance,
|
|
186
|
-
"aria-controls":
|
|
281
|
+
"aria-controls": dropdownId,
|
|
187
282
|
"aria-expanded": isOpen ? "true" : "false",
|
|
188
283
|
"aria-label": toggleLabel ? null : Label.Toggle,
|
|
189
284
|
"aria-pressed": isOpen ? "true" : "false",
|
|
@@ -215,7 +310,7 @@ const ContextualMenu = _ref => {
|
|
|
215
310
|
constrainPanelWidth: constrainPanelWidth,
|
|
216
311
|
dropdownClassName: dropdownClassName,
|
|
217
312
|
dropdownContent: children,
|
|
218
|
-
id:
|
|
313
|
+
id: dropdownId,
|
|
219
314
|
isOpen: isOpen,
|
|
220
315
|
links: links,
|
|
221
316
|
position: position,
|
|
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
9
9
|
var _ContextualMenu = _interopRequireDefault(require("./ContextualMenu"));
|
|
10
10
|
var _Modal = _interopRequireDefault(require("../Modal"));
|
|
11
|
-
function _interopRequireDefault(
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
const ScrollTemplate = args => /*#__PURE__*/_react.default.createElement("div", {
|
|
13
13
|
style: {
|
|
14
14
|
maxWidth: "30rem",
|
|
@@ -16,7 +16,7 @@ const ScrollTemplate = args => /*#__PURE__*/_react.default.createElement("div",
|
|
|
16
16
|
overflow: "auto",
|
|
17
17
|
padding: "1rem"
|
|
18
18
|
}
|
|
19
|
-
}, /*#__PURE__*/_react.default.createElement(_ContextualMenu.default, args), Array(3).fill(
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement(_ContextualMenu.default, args), Array(3).fill(/*#__PURE__*/_react.default.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur cum dicta beatae nostrum eligendi similique earum, dolorem fuga quis, sequi voluptates architecto ipsa dolorum eaque rem expedita inventore voluptas odit aspernatur alias molestias facere.")), /*#__PURE__*/_react.default.createElement(_ContextualMenu.default, args));
|
|
20
20
|
const Template = args => /*#__PURE__*/_react.default.createElement("div", {
|
|
21
21
|
className: "u-align--center"
|
|
22
22
|
}, /*#__PURE__*/_react.default.createElement(_ContextualMenu.default, args));
|
|
@@ -3,7 +3,7 @@ import type { HTMLProps, ReactNode } from "react";
|
|
|
3
3
|
import type { ButtonProps } from "../../Button";
|
|
4
4
|
import type { WindowFitment } from "../../../hooks";
|
|
5
5
|
export declare enum Label {
|
|
6
|
-
Dropdown = "
|
|
6
|
+
Dropdown = "sub"
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* The type of the menu links.
|
|
@@ -10,19 +10,18 @@ var _hooks = require("../../../hooks");
|
|
|
10
10
|
var _Button = _interopRequireDefault(require("../../Button"));
|
|
11
11
|
const _excluded = ["children", "className", "onClick"],
|
|
12
12
|
_excluded2 = ["adjustedPosition", "autoAdjust", "handleClose", "constrainPanelWidth", "dropdownClassName", "dropdownContent", "id", "isOpen", "links", "position", "positionCoords", "positionNode", "scrollOverflow", "setAdjustedPosition", "contextualMenuClassName"];
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
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); }
|
|
16
|
+
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], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
17
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
19
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
-
function _defineProperty(
|
|
22
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
20
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
23
22
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
24
23
|
let Label = exports.Label = /*#__PURE__*/function (Label) {
|
|
25
|
-
Label["Dropdown"] = "
|
|
24
|
+
Label["Dropdown"] = "sub";
|
|
26
25
|
return Label;
|
|
27
26
|
}({});
|
|
28
27
|
/**
|
|
@@ -121,6 +120,7 @@ const generateLink = (link, key, handleClose) => {
|
|
|
121
120
|
return /*#__PURE__*/_react.default.createElement(_Button.default, _extends({
|
|
122
121
|
className: (0, _classnames.default)("p-contextual-menu__link", className),
|
|
123
122
|
key: key,
|
|
123
|
+
role: "menuitem",
|
|
124
124
|
onClick: onClick ? evt => {
|
|
125
125
|
handleClose(evt.nativeEvent);
|
|
126
126
|
onClick(evt);
|
|
@@ -249,6 +249,7 @@ const ContextualMenuDropdown = _ref => {
|
|
|
249
249
|
style: positionStyle
|
|
250
250
|
}, /*#__PURE__*/_react.default.createElement("span", _extends({
|
|
251
251
|
className: (0, _classnames.default)("p-contextual-menu__dropdown", dropdownClassName),
|
|
252
|
+
role: "menu",
|
|
252
253
|
id: id,
|
|
253
254
|
"aria-hidden": isOpen ? "false" : "true",
|
|
254
255
|
"aria-label": Label.Dropdown,
|
|
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
var _ContextualMenuDropdown = _interopRequireDefault(require("./ContextualMenuDropdown"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
var _ContextualMenu = _interopRequireDefault(require("./ContextualMenu"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _ApplicationLayout = require("../ApplicationLayout");
|
|
9
9
|
var _Panel = _interopRequireDefault(require("../Panel"));
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
const CustomLayout = _ref => {
|
|
12
12
|
let {
|
|
13
13
|
header,
|
|
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _Panel = _interopRequireDefault(require("../Panel"));
|
|
9
9
|
var _CustomLayout = _interopRequireDefault(require("./CustomLayout"));
|
|
10
10
|
var _AppMain = _interopRequireDefault(require("../ApplicationLayout/AppMain"));
|
|
11
|
-
function _interopRequireDefault(
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
const meta = {
|
|
13
13
|
component: _CustomLayout.default,
|
|
14
14
|
tags: ["autodocs"]
|
|
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
var _CustomLayout = _interopRequireDefault(require("./CustomLayout"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -12,12 +12,11 @@ var _hooks = require("../../hooks");
|
|
|
12
12
|
var _CustomSelectDropdown = _interopRequireWildcard(require("./CustomSelectDropdown"));
|
|
13
13
|
require("./CustomSelect.scss");
|
|
14
14
|
const _excluded = ["value", "options", "onChange", "onSearch", "id", "name", "disabled", "success", "error", "help", "wrapperClassName", "toggleClassName", "dropdownClassName", "defaultToggleLabel", "searchable", "searchPlaceholder", "takeFocus", "header", "selectRef", "initialPosition"];
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
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); }
|
|
18
|
+
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], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
19
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
21
20
|
/**
|
|
22
21
|
* This is a [React](https://reactjs.org/) component that extends from the Vanilla [Select](https://vanillaframework.io/docs/base/forms#select) element.
|
|
23
22
|
*
|
|
@@ -106,6 +105,7 @@ const CustomSelect = _ref => {
|
|
|
106
105
|
"aria-describedby": [help ? helpId : null, success ? validationId : null].filter(Boolean).join(" "),
|
|
107
106
|
"aria-errormessage": hasError ? validationId : undefined,
|
|
108
107
|
"aria-invalid": hasError,
|
|
108
|
+
focusFirstItemOnOpen: false,
|
|
109
109
|
toggleClassName: (0, _classnames.default)("p-custom-select__toggle", "p-form-validation__input", toggleClassName, {
|
|
110
110
|
active: isOpen
|
|
111
111
|
}),
|
|
@@ -6,16 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.StandardOptions = exports.ManualSearchable = exports.DisabledOptions = exports.CustomOptionsAndSelectedLabel = exports.CustomOptions = exports.AutoSearchable = exports.AsyncSearchable = void 0;
|
|
7
7
|
var _CustomSelect = _interopRequireDefault(require("./CustomSelect"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
-
function _defineProperty(
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
15
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
-
function _objectDestructuringEmpty(
|
|
18
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
16
|
+
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
17
|
+
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); }
|
|
19
18
|
const generateStandardOptions = num => Array(num).fill(null).map((_, i) => ({
|
|
20
19
|
value: "option-".concat(i + 1),
|
|
21
20
|
label: "Option ".concat(i + 1),
|
|
@@ -9,9 +9,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _hooks = require("../../../hooks");
|
|
11
11
|
var _SearchBox = _interopRequireDefault(require("../../SearchBox"));
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
14
|
const DROPDOWN_MAX_HEIGHT = 16 * 30; // 30rem with base 16px
|
|
16
15
|
const DROPDOWN_MARGIN = 20;
|
|
17
16
|
const adjustDropdownHeightBelow = dropdown => {
|
|
@@ -16,5 +16,4 @@ Object.defineProperty(exports, "getOptionText", {
|
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
var _CustomSelectDropdown = _interopRequireWildcard(require("./CustomSelectDropdown"));
|
|
19
|
-
function
|
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
var _CustomSelect = _interopRequireDefault(require("./CustomSelect"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -9,9 +9,13 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _Tooltip = _interopRequireDefault(require("../Tooltip"));
|
|
11
11
|
require("./DoughnutChart.scss");
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
function
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
19
|
let TestIds = exports.TestIds = /*#__PURE__*/function (TestIds) {
|
|
16
20
|
TestIds["Label"] = "label";
|
|
17
21
|
TestIds["Segment"] = "segment";
|
|
@@ -41,21 +45,34 @@ const DoughnutChart = _ref => {
|
|
|
41
45
|
const circumference = Math.round(diameter * Math.PI);
|
|
42
46
|
// Calculate the total value of all segments.
|
|
43
47
|
const total = segments.reduce((totalValue, segment) => totalValue += segment.value, 0);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
tooltip,
|
|
49
|
-
value
|
|
50
|
-
} = _ref2;
|
|
48
|
+
|
|
49
|
+
// Pre-calculate the accumulated lengths.
|
|
50
|
+
const segmentsWithOffsets = segments.reduce((acc, segment, i) => {
|
|
51
|
+
const previousSegment = i > 0 ? acc[i - 1] : null;
|
|
51
52
|
// The start position is the value of all previous segments.
|
|
52
|
-
const startPosition =
|
|
53
|
+
const startPosition = i === 0 ? 0 : previousSegment.startPosition + previousSegment.segmentLength;
|
|
53
54
|
// The length of the segment (as a portion of the doughnut circumference)
|
|
54
|
-
const segmentLength = value / total * circumference;
|
|
55
|
+
const segmentLength = segment.value / total * circumference;
|
|
55
56
|
// The space left until the end of the circle.
|
|
56
57
|
const remainingSpace = circumference - (segmentLength + startPosition);
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
acc.push(_objectSpread(_objectSpread({}, segment), {}, {
|
|
59
|
+
startPosition,
|
|
60
|
+
segmentLength,
|
|
61
|
+
remainingSpace
|
|
62
|
+
}));
|
|
63
|
+
return acc;
|
|
64
|
+
}, []);
|
|
65
|
+
|
|
66
|
+
// Map over the enriched data.
|
|
67
|
+
const segmentNodes = segmentsWithOffsets.map((_ref2, i) => {
|
|
68
|
+
let {
|
|
69
|
+
color,
|
|
70
|
+
tooltip,
|
|
71
|
+
value,
|
|
72
|
+
startPosition,
|
|
73
|
+
segmentLength,
|
|
74
|
+
remainingSpace
|
|
75
|
+
} = _ref2;
|
|
59
76
|
return /*#__PURE__*/_react.default.createElement("circle", {
|
|
60
77
|
className: "doughnut-chart__segment",
|
|
61
78
|
cx: radius - segmentThickness / 2 - hoverIncrease,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Default = void 0;
|
|
7
7
|
var _DoughnutChart = _interopRequireDefault(require("./DoughnutChart"));
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
const meta = {
|
|
10
10
|
component: _DoughnutChart.default,
|
|
11
11
|
tags: ["autodocs"]
|
|
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
var _DoughnutChart = _interopRequireDefault(require("./DoughnutChart"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -7,10 +7,10 @@ exports.default = exports.EmptyState = void 0;
|
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
const _excluded = ["children", "className", "image", "title"];
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
12
|
-
function _objectWithoutProperties(
|
|
13
|
-
function _objectWithoutPropertiesLoose(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
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); }
|
|
12
|
+
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], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
14
14
|
/**
|
|
15
15
|
* This is a [React](https://reactjs.org/) component to represent an empty state.
|
|
16
16
|
*/
|
|
@@ -8,9 +8,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _EmptyState = _interopRequireDefault(require("./EmptyState"));
|
|
9
9
|
var _Icon = _interopRequireWildcard(require("../Icon"));
|
|
10
10
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
13
|
const boxImage = /*#__PURE__*/_react.default.createElement("img", {
|
|
15
14
|
src: "https://assets.ubuntu.com/v1/c17e0d92-container.svg",
|
|
16
15
|
style: {
|
|
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
var _EmptyState = _interopRequireDefault(require("./EmptyState"));
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createEventQueue = createEventQueue;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
function
|
|
9
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
9
|
function createEventQueue() {
|
|
11
10
|
const EventQueueContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
12
11
|
const eventQueue = new Map();
|
|
@@ -7,9 +7,8 @@ exports.default = exports.Default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _EventQueue = require("./EventQueue");
|
|
9
9
|
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
12
|
const {
|
|
14
13
|
EventQueueProvider,
|
|
15
14
|
useEventQueue
|