@plesk/ui-library 3.40.12 → 3.41.0
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/cjs/components/ItemList/ItemList.js +2 -1
- package/cjs/components/List/ListEmptyView.js +1 -1
- package/cjs/components/Spinner/Spinner.js +4 -1
- package/cjs/components/Toast/Toast.js +58 -88
- package/cjs/components/Toast/useAutoClose.js +34 -0
- package/cjs/components/Toaster/GroupLabel.js +54 -0
- package/cjs/components/Toaster/PanelView.js +175 -0
- package/cjs/components/Toaster/ToastView.js +66 -0
- package/cjs/components/Toaster/Toaster.js +95 -186
- package/cjs/components/Toaster/getGroups.js +40 -0
- package/cjs/components/index.js +8 -0
- package/cjs/index.js +1 -1
- package/dist/plesk-ui-library-rtl.css +1 -1
- package/dist/plesk-ui-library-rtl.css.map +1 -1
- package/dist/plesk-ui-library.css +1 -1
- package/dist/plesk-ui-library.css.map +1 -1
- package/dist/plesk-ui-library.js +8508 -12290
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +6 -6
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/ItemList/ItemList.js +2 -1
- package/esm/components/List/ListEmptyView.js +1 -1
- package/esm/components/Spinner/Spinner.js +4 -1
- package/esm/components/Toast/Toast.js +58 -87
- package/esm/components/Toast/useAutoClose.js +27 -0
- package/esm/components/Toaster/GroupLabel.js +47 -0
- package/esm/components/Toaster/PanelView.js +168 -0
- package/esm/components/Toaster/ToastView.js +59 -0
- package/esm/components/Toaster/Toaster.js +94 -186
- package/esm/components/Toaster/getGroups.js +33 -0
- package/esm/components/index.js +1 -0
- package/esm/index.js +1 -1
- package/package.json +19 -19
- package/styleguide/build/bundle.8483c3ef.js +2 -0
- package/styleguide/index.html +2 -2
- package/types/{src/components → components}/Button/Button.d.ts +1 -1
- package/types/{src/components → components}/Button/ButtonContext.d.ts +0 -1
- package/types/{src/components → components}/CodeEditor/CodeEditor.d.ts +11 -11
- package/types/{src/components → components}/ComboBox/ComboBox.d.ts +7 -1
- package/types/{src/components → components}/DistractionFreeModeContext/DistractionFreeModeContext.d.ts +0 -1
- package/types/{src/components → components}/FocusTrap/FocusTrap.d.ts +1 -1
- package/types/{src/components → components}/Form/DisabledContext.d.ts +0 -1
- package/types/{src/components → components}/Form/FormContext.d.ts +0 -1
- package/types/{src/components → components}/Form/ScrollableElementFormContext.d.ts +0 -1
- package/types/{src/components → components}/List/List.d.ts +14 -14
- package/types/{src/components → components}/OnDarkContext/OnDarkContext.d.ts +0 -1
- package/types/{src/components → components}/ResponsiveContext/ResponsiveContext.d.ts +0 -1
- package/types/{src/components → components}/Section/Section.d.ts +1 -1
- package/types/{src/components → components}/Spinner/Spinner.d.ts +7 -2
- package/types/components/Spinner/index.d.ts +2 -0
- package/types/{src/components → components}/Squeezer/Squeezer.d.ts +0 -1
- package/types/{src/components → components}/Toast/Toast.d.ts +11 -11
- package/types/components/Toast/useAutoClose.d.ts +7 -0
- package/types/components/Toaster/GroupLabel.d.ts +7 -0
- package/types/components/Toaster/PanelView.d.ts +14 -0
- package/types/components/Toaster/ToastView.d.ts +10 -0
- package/types/components/Toaster/Toaster.d.ts +84 -0
- package/types/components/Toaster/getGroups.d.ts +31 -0
- package/types/{src/components → components}/Toolbar/RegistryContext.d.ts +0 -1
- package/types/{src/components → components}/Toolbar/ToolbarGroup.d.ts +1 -1
- package/types/{src/components → components}/VerticalContext/VerticalContext.d.ts +0 -1
- package/types/{src/components → components}/index.d.ts +2 -0
- package/types/{src/components → components}/utils.d.ts +1 -1
- package/types/{src/hooks → hooks}/useMutationObserver.d.ts +1 -1
- package/types/{src/hooks → hooks}/useResizeObserver.d.ts +1 -1
- package/types/{src/hooks → hooks}/useSqueeze.d.ts +1 -1
- package/styleguide/build/bundle.0d8a8996.js +0 -2
- package/types/src/components/Spinner/index.d.ts +0 -1
- package/types/src/components/Toaster/Toaster.d.ts +0 -95
- /package/styleguide/build/{bundle.0d8a8996.js.LICENSE.txt → bundle.8483c3ef.js.LICENSE.txt} +0 -0
- /package/types/{src/components → components}/Action/Action.d.ts +0 -0
- /package/types/{src/components → components}/Action/index.d.ts +0 -0
- /package/types/{src/components → components}/Alert/Alert.d.ts +0 -0
- /package/types/{src/components → components}/Alert/index.d.ts +0 -0
- /package/types/{src/components → components}/AutoClosable/AutoClosable.d.ts +0 -0
- /package/types/{src/components → components}/AutoClosable/index.d.ts +0 -0
- /package/types/{src/components → components}/AuxiliaryActions/AuxiliaryActions.d.ts +0 -0
- /package/types/{src/components → components}/AuxiliaryActions/index.d.ts +0 -0
- /package/types/{src/components → components}/Badge/Badge.d.ts +0 -0
- /package/types/{src/components → components}/Badge/index.d.ts +0 -0
- /package/types/{src/components → components}/Breadcrumbs/Breadcrumbs.d.ts +0 -0
- /package/types/{src/components → components}/Breadcrumbs/index.d.ts +0 -0
- /package/types/{src/components → components}/Button/index.d.ts +0 -0
- /package/types/{src/components → components}/ButtonGroup/ButtonGroup.d.ts +0 -0
- /package/types/{src/components → components}/ButtonGroup/index.d.ts +0 -0
- /package/types/{src/components → components}/Card/PreviewPanel.d.ts +0 -0
- /package/types/{src/components → components}/Card/helpers.d.ts +0 -0
- /package/types/{src/components → components}/Carousel/Carousel.d.ts +0 -0
- /package/types/{src/components → components}/Carousel/index.d.ts +0 -0
- /package/types/{src/components → components}/Checkbox/Checkbox.d.ts +0 -0
- /package/types/{src/components → components}/Checkbox/index.d.ts +0 -0
- /package/types/{src/components → components}/ClosingConfirmation/index.d.ts +0 -0
- /package/types/{src/components → components}/ClosingConfirmation/useClosingConfirmation.d.ts +0 -0
- /package/types/{src/components → components}/CodeEditor/CodeMirror.d.ts +0 -0
- /package/types/{src/components → components}/CodeEditor/index.d.ts +0 -0
- /package/types/{src/components → components}/Columns/Column.d.ts +0 -0
- /package/types/{src/components → components}/Columns/Columns.d.ts +0 -0
- /package/types/{src/components → components}/Columns/index.d.ts +0 -0
- /package/types/{src/components → components}/ComboBox/ComboBoxOption.d.ts +0 -0
- /package/types/{src/components → components}/ComboBox/index.d.ts +0 -0
- /package/types/{src/components → components}/ComboBoxDropdown/ComboBoxDropdown.d.ts +0 -0
- /package/types/{src/components → components}/ComboBoxDropdown/index.d.ts +0 -0
- /package/types/{src/components → components}/ConsoleOutput/ConsoleOutput.d.ts +0 -0
- /package/types/{src/components → components}/ConsoleOutput/index.d.ts +0 -0
- /package/types/{src/components → components}/ContentLoader/ContentLoader.d.ts +0 -0
- /package/types/{src/components → components}/ContentLoader/IconsLoader.d.ts +0 -0
- /package/types/{src/components → components}/ContentLoader/index.d.ts +0 -0
- /package/types/{src/components → components}/Cuttable/Cuttable.d.ts +0 -0
- /package/types/{src/components → components}/Cuttable/index.d.ts +0 -0
- /package/types/{src/components → components}/Cuttable/useContentOverflow.d.ts +0 -0
- /package/types/{src/components → components}/Dialog/Dialog.d.ts +0 -0
- /package/types/{src/components → components}/Dialog/index.d.ts +0 -0
- /package/types/{src/components → components}/DistractionFreeModeContext/index.d.ts +0 -0
- /package/types/{src/components → components}/Drawer/Drawer.d.ts +0 -0
- /package/types/{src/components → components}/Drawer/DrawerProgress.d.ts +0 -0
- /package/types/{src/components → components}/Drawer/Header.d.ts +0 -0
- /package/types/{src/components → components}/Drawer/index.d.ts +0 -0
- /package/types/{src/components → components}/Dropdown/Dropdown.d.ts +0 -0
- /package/types/{src/components → components}/Dropdown/index.d.ts +0 -0
- /package/types/{src/components → components}/ExtendedStatusMessage/ExtendedStatusMessage.d.ts +0 -0
- /package/types/{src/components → components}/ExtendedStatusMessage/ExtendedStatusMessageActions.d.ts +0 -0
- /package/types/{src/components → components}/ExtendedStatusMessage/ExtendedStatusMessageDescription.d.ts +0 -0
- /package/types/{src/components → components}/ExtendedStatusMessage/ExtendedStatusMessageSeparator.d.ts +0 -0
- /package/types/{src/components → components}/ExtendedStatusMessage/ExtendedStatusMessageTitle.d.ts +0 -0
- /package/types/{src/components → components}/ExtendedStatusMessage/index.d.ts +0 -0
- /package/types/{src/components → components}/Figure/Figure.d.ts +0 -0
- /package/types/{src/components → components}/Figure/index.d.ts +0 -0
- /package/types/{src/components → components}/FocusTrap/index.d.ts +0 -0
- /package/types/{src/components → components}/Form/Form.d.ts +0 -0
- /package/types/{src/components → components}/Form/index.d.ts +0 -0
- /package/types/{src/components → components}/Form/types.d.ts +0 -0
- /package/types/{src/components → components}/Form/utils.d.ts +0 -0
- /package/types/{src/components → components}/FormField/FormField.d.ts +0 -0
- /package/types/{src/components → components}/FormField/index.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldCheckbox/FormFieldCheckbox.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldCheckbox/index.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldPassword/FormFieldPassword.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldPassword/PasswordMeter.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldPassword/estimatePassword.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldPassword/generatePassword.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldPassword/index.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldRadioButtons/FormFieldRadioButtons.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldRadioButtons/index.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldSelect/FormFieldSelect.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldSelect/index.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldText/FormFieldText.d.ts +0 -0
- /package/types/{src/components → components}/FormFieldText/index.d.ts +0 -0
- /package/types/{src/components → components}/Grid/Grid.d.ts +0 -0
- /package/types/{src/components → components}/Grid/index.d.ts +0 -0
- /package/types/{src/components → components}/GridCol/GridCol.d.ts +0 -0
- /package/types/{src/components → components}/GridCol/index.d.ts +0 -0
- /package/types/{src/components → components}/Heading/Heading.d.ts +0 -0
- /package/types/{src/components → components}/Heading/index.d.ts +0 -0
- /package/types/{src/components → components}/Hint/Hint.d.ts +0 -0
- /package/types/{src/components → components}/Hint/index.d.ts +0 -0
- /package/types/{src/components → components}/Icon/Icon.d.ts +0 -0
- /package/types/{src/components → components}/Icon/constants.d.ts +0 -0
- /package/types/{src/components → components}/Icon/index.d.ts +0 -0
- /package/types/{src/components → components}/Icon/oldIconNames.d.ts +0 -0
- /package/types/{src/components → components}/InPlaceEdit/Editor.d.ts +0 -0
- /package/types/{src/components → components}/InPlaceEdit/InPlaceEdit.d.ts +0 -0
- /package/types/{src/components → components}/InPlaceEdit/index.d.ts +0 -0
- /package/types/{src/components → components}/InPlaceEdit/locale/en-US.d.ts +0 -0
- /package/types/{src/components → components}/Input/Input.d.ts +0 -0
- /package/types/{src/components → components}/Input/index.d.ts +0 -0
- /package/types/{src/components → components}/InputFile/InputFile.d.ts +0 -0
- /package/types/{src/components → components}/InputFile/index.d.ts +0 -0
- /package/types/{src/components → components}/InputNumber/InputNumber.d.ts +0 -0
- /package/types/{src/components → components}/InputNumber/index.d.ts +0 -0
- /package/types/{src/components → components}/Item/Item.d.ts +0 -0
- /package/types/{src/components → components}/Item/index.d.ts +0 -0
- /package/types/{src/components → components}/ItemLink/ItemLink.d.ts +0 -0
- /package/types/{src/components → components}/ItemLink/index.d.ts +0 -0
- /package/types/{src/components → components}/ItemList/ItemList.d.ts +0 -0
- /package/types/{src/components → components}/ItemList/index.d.ts +0 -0
- /package/types/{src/components → components}/Label/Label.d.ts +0 -0
- /package/types/{src/components → components}/Label/index.d.ts +0 -0
- /package/types/{src/components → components}/Layer/Layer.d.ts +0 -0
- /package/types/{src/components → components}/Layer/index.d.ts +0 -0
- /package/types/{src/components → components}/Layout/Layout.d.ts +0 -0
- /package/types/{src/components → components}/Layout/index.d.ts +0 -0
- /package/types/{src/components → components}/Link/Link.d.ts +0 -0
- /package/types/{src/components → components}/Link/index.d.ts +0 -0
- /package/types/{src/components → components}/List/ListAction.d.ts +0 -0
- /package/types/{src/components → components}/List/ListActions.d.ts +0 -0
- /package/types/{src/components → components}/List/ListActionsDivider.d.ts +0 -0
- /package/types/{src/components → components}/List/ListEmptyView.d.ts +0 -0
- /package/types/{src/components → components}/List/ListOperation.d.ts +0 -0
- /package/types/{src/components → components}/List/ListOperationContext.d.ts +0 -0
- /package/types/{src/components → components}/List/index.d.ts +0 -0
- /package/types/{src/components → components}/LocaleProvider/LocaleProvider.d.ts +0 -0
- /package/types/{src/components → components}/LocaleProvider/index.d.ts +0 -0
- /package/types/{src/components → components}/Markdown/Markdown.d.ts +0 -0
- /package/types/{src/components → components}/Markdown/index.d.ts +0 -0
- /package/types/{src/components → components}/Media/Media.d.ts +0 -0
- /package/types/{src/components → components}/Media/MediaSection.d.ts +0 -0
- /package/types/{src/components → components}/Media/index.d.ts +0 -0
- /package/types/{src/components → components}/Menu/Menu.d.ts +0 -0
- /package/types/{src/components → components}/Menu/MenuBaseItem.d.ts +0 -0
- /package/types/{src/components → components}/Menu/MenuDivider.d.ts +0 -0
- /package/types/{src/components → components}/Menu/MenuHeader.d.ts +0 -0
- /package/types/{src/components → components}/Menu/MenuItem.d.ts +0 -0
- /package/types/{src/components → components}/Menu/MenuSelectableItem.d.ts +0 -0
- /package/types/{src/components → components}/Menu/index.d.ts +0 -0
- /package/types/{src/components → components}/OnDarkContext/index.d.ts +0 -0
- /package/types/{src/components → components}/Overlay/Overlay.d.ts +0 -0
- /package/types/{src/components → components}/Overlay/index.d.ts +0 -0
- /package/types/{src/components → components}/PageHeader/PageHeader.d.ts +0 -0
- /package/types/{src/components → components}/PageHeader/index.d.ts +0 -0
- /package/types/{src/components → components}/Pagination/Pagination.d.ts +0 -0
- /package/types/{src/components → components}/Pagination/index.d.ts +0 -0
- /package/types/{src/components → components}/Panel/Panel.d.ts +0 -0
- /package/types/{src/components → components}/Panel/index.d.ts +0 -0
- /package/types/{src/components → components}/Paragraph/Paragraph.d.ts +0 -0
- /package/types/{src/components → components}/Paragraph/index.d.ts +0 -0
- /package/types/{src/components → components}/Plaintext/Plaintext.d.ts +0 -0
- /package/types/{src/components → components}/Plaintext/index.d.ts +0 -0
- /package/types/{src/components → components}/Popover/Popover.d.ts +0 -0
- /package/types/{src/components → components}/Popover/index.d.ts +0 -0
- /package/types/{src/components → components}/Popper/Popper.d.ts +0 -0
- /package/types/{src/components → components}/Popper/index.d.ts +0 -0
- /package/types/{src/components → components}/Progress/Progress.d.ts +0 -0
- /package/types/{src/components → components}/Progress/index.d.ts +0 -0
- /package/types/{src/components → components}/ProgressBar/ProgressBar.d.ts +0 -0
- /package/types/{src/components → components}/ProgressBar/ProgressIndicator.d.ts +0 -0
- /package/types/{src/components → components}/ProgressBar/index.d.ts +0 -0
- /package/types/{src/components → components}/ProgressDialog/ProgressDialog.d.ts +0 -0
- /package/types/{src/components → components}/ProgressDialog/index.d.ts +0 -0
- /package/types/{src/components → components}/ProgressStep/ProgressStep.d.ts +0 -0
- /package/types/{src/components → components}/ProgressStep/index.d.ts +0 -0
- /package/types/{src/components → components}/Radio/Radio.d.ts +0 -0
- /package/types/{src/components → components}/Radio/index.d.ts +0 -0
- /package/types/{src/components → components}/Rating/Rating.d.ts +0 -0
- /package/types/{src/components → components}/Rating/index.d.ts +0 -0
- /package/types/{src/components → components}/ResponsiveContext/index.d.ts +0 -0
- /package/types/{src/components → components}/Section/SectionItem.d.ts +0 -0
- /package/types/{src/components → components}/Section/index.d.ts +0 -0
- /package/types/{src/components → components}/SegmentedControl/ButtonGroupControl.d.ts +0 -0
- /package/types/{src/components → components}/SegmentedControl/DropdownControl.d.ts +0 -0
- /package/types/{src/components → components}/SegmentedControl/SegmentedControl.d.ts +0 -0
- /package/types/{src/components → components}/SegmentedControl/getSelectedValues.d.ts +0 -0
- /package/types/{src/components → components}/SegmentedControl/index.d.ts +0 -0
- /package/types/{src/components → components}/SegmentedControl/types.d.ts +0 -0
- /package/types/{src/components → components}/SegmentedControl/useResponsive.d.ts +0 -0
- /package/types/{src/components → components}/SegmentedControl/useSelected.d.ts +0 -0
- /package/types/{src/components → components}/Select/MultiValue.d.ts +0 -0
- /package/types/{src/components → components}/Select/Select.d.ts +0 -0
- /package/types/{src/components → components}/Select/SelectControl.d.ts +0 -0
- /package/types/{src/components → components}/Select/SelectOption.d.ts +0 -0
- /package/types/{src/components → components}/Select/SelectOptionGroup.d.ts +0 -0
- /package/types/{src/components → components}/Select/index.d.ts +0 -0
- /package/types/{src/components → components}/Select/structures.d.ts +0 -0
- /package/types/{src/components → components}/Skeleton/Skeleton.d.ts +0 -0
- /package/types/{src/components → components}/Skeleton/SkeletonTabs.d.ts +0 -0
- /package/types/{src/components → components}/Skeleton/SkeletonText.d.ts +0 -0
- /package/types/{src/components → components}/Skeleton/index.d.ts +0 -0
- /package/types/{src/components → components}/SplitButton/SplitButton.d.ts +0 -0
- /package/types/{src/components → components}/SplitButton/index.d.ts +0 -0
- /package/types/{src/components → components}/Spot/Spot.d.ts +0 -0
- /package/types/{src/components → components}/Spot/SpotPopup.d.ts +0 -0
- /package/types/{src/components → components}/Spot/SpotPulsar.d.ts +0 -0
- /package/types/{src/components → components}/Spot/index.d.ts +0 -0
- /package/types/{src/components → components}/Squeezer/index.d.ts +0 -0
- /package/types/{src/components → components}/Status/Status.d.ts +0 -0
- /package/types/{src/components → components}/Status/index.d.ts +0 -0
- /package/types/{src/components → components}/StatusMessage/StatusMessage.d.ts +0 -0
- /package/types/{src/components → components}/StatusMessage/index.d.ts +0 -0
- /package/types/{src/components → components}/Subnav/Subnav.d.ts +0 -0
- /package/types/{src/components → components}/Subnav/index.d.ts +0 -0
- /package/types/{src/components → components}/Switch/Switch.d.ts +0 -0
- /package/types/{src/components → components}/Switch/index.d.ts +0 -0
- /package/types/{src/components → components}/SwitchesPanel/SwitchesPanel.d.ts +0 -0
- /package/types/{src/components → components}/SwitchesPanel/index.d.ts +0 -0
- /package/types/{src/components → components}/SwitchesPanelItem/SwitchesPanelItem.d.ts +0 -0
- /package/types/{src/components → components}/SwitchesPanelItem/index.d.ts +0 -0
- /package/types/{src/components → components}/Tabs/SearchBar.d.ts +0 -0
- /package/types/{src/components → components}/Tabs/Tab.d.ts +0 -0
- /package/types/{src/components → components}/Tabs/Tabs.d.ts +0 -0
- /package/types/{src/components → components}/Tabs/index.d.ts +0 -0
- /package/types/{src/components → components}/Text/Text.d.ts +0 -0
- /package/types/{src/components → components}/Text/index.d.ts +0 -0
- /package/types/{src/components → components}/TextArea/TextArea.d.ts +0 -0
- /package/types/{src/components → components}/TextArea/calculateNodeHeight.d.ts +0 -0
- /package/types/{src/components → components}/TextArea/index.d.ts +0 -0
- /package/types/{src/components → components}/Toast/index.d.ts +0 -0
- /package/types/{src/components → components}/Toaster/index.d.ts +0 -0
- /package/types/{src/components → components}/Toolbar/Toolbar.d.ts +0 -0
- /package/types/{src/components → components}/Toolbar/ToolbarBetaProvider.d.ts +0 -0
- /package/types/{src/components → components}/Toolbar/ToolbarExpander.d.ts +0 -0
- /package/types/{src/components → components}/Toolbar/ToolbarItem.d.ts +0 -0
- /package/types/{src/components → components}/Toolbar/ToolbarMenu.d.ts +0 -0
- /package/types/{src/components → components}/Toolbar/index.d.ts +0 -0
- /package/types/{src/components → components}/Tooltip/Tooltip.d.ts +0 -0
- /package/types/{src/components → components}/Tooltip/index.d.ts +0 -0
- /package/types/{src/components → components}/Tour/Tour.d.ts +0 -0
- /package/types/{src/components → components}/Tour/index.d.ts +0 -0
- /package/types/{src/components → components}/Translate/Translate.d.ts +0 -0
- /package/types/{src/components → components}/Translate/index.d.ts +0 -0
- /package/types/{src/components → components}/Translate/isLikeText.d.ts +0 -0
- /package/types/{src/components → components}/VerticalContext/index.d.ts +0 -0
- /package/types/{src/components → components}/intentIconMap.d.ts +0 -0
- /package/types/{src/hooks → hooks}/index.d.ts +0 -0
- /package/types/{src/index.d.ts → index.d.ts} +0 -0
- /package/types/{src/utils → utils}/types/ComponentProps.d.ts +0 -0
- /package/types/{src/utils → utils}/types/DataAttributes.d.ts +0 -0
- /package/types/{src/utils → utils}/types/PolymorphicComponent.d.ts +0 -0
- /package/types/{src/utils → utils}/types/index.d.ts +0 -0
- /package/types/{src/utils.d.ts → utils.d.ts} +0 -0
|
@@ -125,8 +125,9 @@ class ItemList extends _react.Component {
|
|
|
125
125
|
reorderable
|
|
126
126
|
} = this.props;
|
|
127
127
|
if (reorderable) {
|
|
128
|
+
Promise.resolve().then(() => _interopRequireWildcard(require(/* webpackChunkName: "react-sortable-hoc" */'react-sortable-hoc'))).then(
|
|
128
129
|
// @ts-ignore
|
|
129
|
-
|
|
130
|
+
_ref2 => {
|
|
130
131
|
let {
|
|
131
132
|
sortableContainer,
|
|
132
133
|
sortableElement
|
|
@@ -17,10 +17,13 @@ const Spinner = _ref => {
|
|
|
17
17
|
let {
|
|
18
18
|
baseClassName = `${_constants.CLS_PREFIX}spinner`,
|
|
19
19
|
className,
|
|
20
|
+
colorAnimation = true,
|
|
20
21
|
...props
|
|
21
22
|
} = _ref;
|
|
22
23
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
23
|
-
className: (0, _classnames.default)(baseClassName, className
|
|
24
|
+
className: (0, _classnames.default)(baseClassName, className, {
|
|
25
|
+
[`${baseClassName}--color-animation`]: colorAnimation
|
|
26
|
+
}),
|
|
24
27
|
...props,
|
|
25
28
|
viewBox: "0 0 48 48",
|
|
26
29
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5,101 +5,71 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = require("react");
|
|
10
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
9
|
var _constants = require("../../constants");
|
|
12
10
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
13
11
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
14
12
|
var _intentIconMap = require("../intentIconMap");
|
|
15
13
|
var _OnDarkContext = _interopRequireDefault(require("../OnDarkContext"));
|
|
14
|
+
var _useAutoClose = require("./useAutoClose");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
16
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
18
17
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const Toast = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
baseClassName = `${_constants.CLS_PREFIX}toast`,
|
|
21
|
+
className,
|
|
22
|
+
message,
|
|
23
|
+
intent,
|
|
24
|
+
accent,
|
|
25
|
+
icon = intent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
26
|
+
name: _intentIconMap.intentIconMap[intent]
|
|
27
|
+
}),
|
|
28
|
+
onClose,
|
|
29
|
+
closable = true,
|
|
30
|
+
autoClosable,
|
|
31
|
+
autoCloseTimeout,
|
|
32
|
+
innerRef,
|
|
33
|
+
groupKey,
|
|
34
|
+
...props
|
|
35
|
+
} = _ref;
|
|
36
|
+
(0, _useAutoClose.useAutoClose)({
|
|
37
|
+
autoClosable,
|
|
38
|
+
autoCloseTimeout,
|
|
39
|
+
onClose
|
|
40
|
+
});
|
|
41
|
+
const result = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
42
|
+
tabIndex: 0,
|
|
43
|
+
className: (0, _classnames.default)(baseClassName, intent && `${baseClassName}--${intent}`, accent && `${baseClassName}--accent`, className),
|
|
44
|
+
...props,
|
|
45
|
+
ref: innerRef,
|
|
46
|
+
children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
47
|
+
className: `${baseClassName}__icon`,
|
|
48
|
+
children: _Icon.default.create(icon, {
|
|
49
|
+
intent
|
|
50
|
+
})
|
|
51
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
52
|
+
className: `${baseClassName}__content`,
|
|
53
|
+
children: message
|
|
54
|
+
}), closable && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
|
+
className: `${baseClassName}__action`,
|
|
56
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
57
|
+
ghost: true,
|
|
58
|
+
icon: {
|
|
59
|
+
name: 'cross-mark',
|
|
60
|
+
size: '12'
|
|
61
|
+
},
|
|
62
|
+
className: `${baseClassName}__close`,
|
|
63
|
+
onClick: onClose
|
|
64
|
+
})
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
67
|
+
if (accent) {
|
|
68
|
+
return result;
|
|
24
69
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
autoCloseTimeout
|
|
32
|
-
} = this.props;
|
|
33
|
-
switch (autoClosable) {
|
|
34
|
-
case true:
|
|
35
|
-
autoCloseTimeout = AUTOCLOSE_TIMEOUT;
|
|
36
|
-
break;
|
|
37
|
-
case false:
|
|
38
|
-
autoCloseTimeout = undefined;
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
if (autoCloseTimeout && onClose) {
|
|
42
|
-
this.timer = window.setTimeout(onClose, autoCloseTimeout);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
componentWillUnmount() {
|
|
46
|
-
if (this.timer) {
|
|
47
|
-
clearTimeout(this.timer);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
render() {
|
|
51
|
-
const {
|
|
52
|
-
baseClassName,
|
|
53
|
-
className,
|
|
54
|
-
message,
|
|
55
|
-
intent,
|
|
56
|
-
accent,
|
|
57
|
-
icon = intent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
58
|
-
name: _intentIconMap.intentIconMap[intent]
|
|
59
|
-
}),
|
|
60
|
-
onClose,
|
|
61
|
-
closable = true,
|
|
62
|
-
autoClosable,
|
|
63
|
-
autoCloseTimeout,
|
|
64
|
-
innerRef,
|
|
65
|
-
...props
|
|
66
|
-
} = this.props;
|
|
67
|
-
const result = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
68
|
-
tabIndex: 0,
|
|
69
|
-
className: (0, _classnames.default)(baseClassName, intent && `${baseClassName}--${intent}`, accent && `${baseClassName}--accent`, className),
|
|
70
|
-
...props,
|
|
71
|
-
ref: innerRef,
|
|
72
|
-
children: [icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
73
|
-
className: `${baseClassName}__icon`,
|
|
74
|
-
children: _Icon.default.create(icon, {
|
|
75
|
-
intent
|
|
76
|
-
})
|
|
77
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
|
-
className: `${baseClassName}__content`,
|
|
79
|
-
children: message
|
|
80
|
-
}), closable ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
81
|
-
className: `${baseClassName}__action`,
|
|
82
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
83
|
-
ghost: true,
|
|
84
|
-
icon: {
|
|
85
|
-
name: 'cross-mark',
|
|
86
|
-
size: '12'
|
|
87
|
-
},
|
|
88
|
-
className: `${baseClassName}__close`,
|
|
89
|
-
onClick: onClose
|
|
90
|
-
})
|
|
91
|
-
}) : null]
|
|
92
|
-
});
|
|
93
|
-
if (accent) {
|
|
94
|
-
return result;
|
|
95
|
-
}
|
|
96
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_OnDarkContext.default.Provider, {
|
|
97
|
-
value: true,
|
|
98
|
-
children: result
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.default = Toast;
|
|
103
|
-
(0, _defineProperty2.default)(Toast, "defaultProps", {
|
|
104
|
-
baseClassName: `${_constants.CLS_PREFIX}toast`
|
|
105
|
-
});
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_OnDarkContext.default.Provider, {
|
|
71
|
+
value: true,
|
|
72
|
+
children: result
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
var _default = exports.default = Toast;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useAutoClose = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
9
|
+
|
|
10
|
+
const AUTOCLOSE_TIMEOUT = 6000;
|
|
11
|
+
const getAutoCloseTimeout = (autoClosable, autoCloseTimeout) => {
|
|
12
|
+
if (typeof autoClosable !== 'boolean') {
|
|
13
|
+
return autoCloseTimeout;
|
|
14
|
+
}
|
|
15
|
+
return autoClosable ? AUTOCLOSE_TIMEOUT : undefined;
|
|
16
|
+
};
|
|
17
|
+
const useAutoClose = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
autoClosable,
|
|
20
|
+
autoCloseTimeout: externalAutoCloseTimeout,
|
|
21
|
+
onClose
|
|
22
|
+
} = _ref;
|
|
23
|
+
const onCloseRef = (0, _react.useRef)(onClose);
|
|
24
|
+
onCloseRef.current = onClose;
|
|
25
|
+
(0, _react.useEffect)(() => {
|
|
26
|
+
const autoCloseTimeout = getAutoCloseTimeout(autoClosable, externalAutoCloseTimeout);
|
|
27
|
+
let timeoutId;
|
|
28
|
+
if (autoCloseTimeout && onCloseRef.current) {
|
|
29
|
+
timeoutId = window.setTimeout(onCloseRef.current, autoCloseTimeout);
|
|
30
|
+
}
|
|
31
|
+
return () => window.clearTimeout(timeoutId);
|
|
32
|
+
}, [autoClosable, externalAutoCloseTimeout]);
|
|
33
|
+
};
|
|
34
|
+
exports.useAutoClose = useAutoClose;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _Label = _interopRequireDefault(require("../Label"));
|
|
9
|
+
var _Tooltip = _interopRequireDefault(require("../Tooltip"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
12
|
+
|
|
13
|
+
const GroupLabel = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
group,
|
|
16
|
+
onClose
|
|
17
|
+
} = _ref;
|
|
18
|
+
const {
|
|
19
|
+
renderHeaderLabel,
|
|
20
|
+
renderHeaderLabelTitle,
|
|
21
|
+
closable = false,
|
|
22
|
+
renderHeaderLabelTooltip = closable ? () => 'Close group' : undefined,
|
|
23
|
+
intent
|
|
24
|
+
} = group;
|
|
25
|
+
if (!renderHeaderLabel && !renderHeaderLabelTitle) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const handleClick = closable ? onClose : undefined;
|
|
29
|
+
const labelProps = {
|
|
30
|
+
intent,
|
|
31
|
+
onClick: handleClick,
|
|
32
|
+
icon: closable ? 'cross-mark' : undefined,
|
|
33
|
+
children: renderHeaderLabelTitle ? renderHeaderLabelTitle(group) : null,
|
|
34
|
+
caps: false,
|
|
35
|
+
size: 'md'
|
|
36
|
+
};
|
|
37
|
+
if (renderHeaderLabel) {
|
|
38
|
+
return renderHeaderLabel(group, labelProps);
|
|
39
|
+
}
|
|
40
|
+
const wrapInTooltip = content => {
|
|
41
|
+
if (!renderHeaderLabelTooltip) return content;
|
|
42
|
+
const title = renderHeaderLabelTooltip(group);
|
|
43
|
+
if (!title) return content;
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
45
|
+
title: title,
|
|
46
|
+
children: content
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
const label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Label.default, {
|
|
50
|
+
...labelProps
|
|
51
|
+
});
|
|
52
|
+
return wrapInTooltip(label);
|
|
53
|
+
};
|
|
54
|
+
var _default = exports.default = GroupLabel;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _reactTransitionGroup = require("react-transition-group");
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _Button = _interopRequireDefault(require("../Button"));
|
|
12
|
+
var _Toast = _interopRequireDefault(require("../Toast"));
|
|
13
|
+
var _OnDarkContext = _interopRequireDefault(require("../OnDarkContext"));
|
|
14
|
+
var _GroupLabel = _interopRequireDefault(require("./GroupLabel"));
|
|
15
|
+
var _getGroups = require("./getGroups");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
18
|
+
|
|
19
|
+
const PanelView = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
toasts,
|
|
22
|
+
onToastClose,
|
|
23
|
+
onToastGroupClose,
|
|
24
|
+
baseClassName,
|
|
25
|
+
groupConfigs,
|
|
26
|
+
isCollapsed: externalIsCollapsed,
|
|
27
|
+
onCollapseStateChange
|
|
28
|
+
} = _ref;
|
|
29
|
+
const groups = (0, _getGroups.getGroups)({
|
|
30
|
+
toasts,
|
|
31
|
+
groupConfigs
|
|
32
|
+
});
|
|
33
|
+
const notEmptyGroups = groups.filter(_ref2 => {
|
|
34
|
+
let {
|
|
35
|
+
count
|
|
36
|
+
} = _ref2;
|
|
37
|
+
return count > 0;
|
|
38
|
+
});
|
|
39
|
+
const panelRef = (0, _react.useRef)(null);
|
|
40
|
+
const headerRef = (0, _react.useRef)(null);
|
|
41
|
+
const isCollapsed = externalIsCollapsed ?? false;
|
|
42
|
+
const [isHeaderVisible, setIsHeaderVisible] = (0, _react.useState)(toasts.length > 1 || isCollapsed);
|
|
43
|
+
const isEmpty = toasts.length === 0;
|
|
44
|
+
const isSingleToast = toasts.length === 1;
|
|
45
|
+
const isSingleNonClosableToast = toasts.length === 1 && !(toasts[0].closable ?? true);
|
|
46
|
+
const handleToastCollapse = () => {
|
|
47
|
+
onCollapseStateChange?.(true);
|
|
48
|
+
setIsHeaderVisible(true);
|
|
49
|
+
};
|
|
50
|
+
if (toasts.length > 1 && !isHeaderVisible) {
|
|
51
|
+
setIsHeaderVisible(true);
|
|
52
|
+
}
|
|
53
|
+
if (isSingleToast && !isCollapsed && isHeaderVisible) {
|
|
54
|
+
setIsHeaderVisible(false);
|
|
55
|
+
}
|
|
56
|
+
if (isEmpty && isHeaderVisible) {
|
|
57
|
+
setIsHeaderVisible(false);
|
|
58
|
+
}
|
|
59
|
+
if (isEmpty && isCollapsed) {
|
|
60
|
+
onCollapseStateChange?.(false);
|
|
61
|
+
}
|
|
62
|
+
const panelHeader = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
63
|
+
nodeRef: headerRef,
|
|
64
|
+
in: isHeaderVisible,
|
|
65
|
+
timeout: {
|
|
66
|
+
enter: isSingleNonClosableToast ? 600 : 300,
|
|
67
|
+
exit: 300
|
|
68
|
+
},
|
|
69
|
+
classNames: `${baseClassName}__header`,
|
|
70
|
+
unmountOnExit: true,
|
|
71
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
72
|
+
ref: headerRef,
|
|
73
|
+
className: `${baseClassName}__header`,
|
|
74
|
+
style: {
|
|
75
|
+
'--_pul-toaster--panel-header-enter-delay': isSingleNonClosableToast ? '300ms' : 0,
|
|
76
|
+
'--_pul-toaster--panel-header-exit-delay': isEmpty ? '300ms' : undefined
|
|
77
|
+
},
|
|
78
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
+
className: `${baseClassName}__header-labels`,
|
|
80
|
+
children: notEmptyGroups.map(group => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GroupLabel.default, {
|
|
81
|
+
group: group,
|
|
82
|
+
onClose: () => onToastGroupClose?.(group.keys)
|
|
83
|
+
}, group.groupKey))
|
|
84
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
85
|
+
ghost: true,
|
|
86
|
+
icon: isCollapsed ? 'chevron-up' : 'chevron-down',
|
|
87
|
+
onClick: () => onCollapseStateChange?.(!isCollapsed),
|
|
88
|
+
className: `${baseClassName}__header-collapse`,
|
|
89
|
+
"aria-label": "Collapse"
|
|
90
|
+
})]
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
const panelContent = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
94
|
+
className: (0, _classnames.default)(`${baseClassName}__content-wrapper`, {
|
|
95
|
+
[`${baseClassName}__content-wrapper--collapsed`]: isCollapsed
|
|
96
|
+
}),
|
|
97
|
+
style: {
|
|
98
|
+
'--_pul-toaster--panel-content-enter-delay': isSingleToast || isEmpty ? '300ms' : undefined
|
|
99
|
+
},
|
|
100
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.TransitionGroup, {
|
|
101
|
+
component: "div",
|
|
102
|
+
className: `${baseClassName}__content`,
|
|
103
|
+
children: toasts.map(_ref3 => {
|
|
104
|
+
let {
|
|
105
|
+
key,
|
|
106
|
+
...toastProps
|
|
107
|
+
} = _ref3;
|
|
108
|
+
const toastRef = /*#__PURE__*/(0, _react.createRef)();
|
|
109
|
+
const toastClassName = `${baseClassName}__toast`;
|
|
110
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
111
|
+
classNames: `${toastClassName}__wrapper`,
|
|
112
|
+
timeout: {
|
|
113
|
+
enter: 30000,
|
|
114
|
+
exit: 300
|
|
115
|
+
},
|
|
116
|
+
nodeRef: toastRef,
|
|
117
|
+
enter: toasts.length > 1,
|
|
118
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
119
|
+
className: `${toastClassName}__wrapper`,
|
|
120
|
+
ref: toastRef,
|
|
121
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
122
|
+
className: `${toastClassName}__sub-wrapper`,
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toast.default, {
|
|
124
|
+
...toastProps,
|
|
125
|
+
onClose: () => {
|
|
126
|
+
onToastClose({
|
|
127
|
+
key,
|
|
128
|
+
...toastProps
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
className: (0, _classnames.default)(toastProps.className, toastClassName, isSingleNonClosableToast && `${toastClassName}--with-collapse`),
|
|
132
|
+
message: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
133
|
+
children: [toastProps.message, isSingleNonClosableToast && !isHeaderVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
134
|
+
size: "md",
|
|
135
|
+
ghost: true,
|
|
136
|
+
icon: {
|
|
137
|
+
name: 'chevron-down'
|
|
138
|
+
},
|
|
139
|
+
className: `${baseClassName}__toast-collapse`,
|
|
140
|
+
onClick: handleToastCollapse,
|
|
141
|
+
"aria-label": "Collapse"
|
|
142
|
+
})]
|
|
143
|
+
})
|
|
144
|
+
}, key)
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
}, key);
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
});
|
|
151
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_OnDarkContext.default.Provider, {
|
|
152
|
+
value: true,
|
|
153
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
154
|
+
className: `${baseClassName}__wrapper`,
|
|
155
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
156
|
+
nodeRef: panelRef,
|
|
157
|
+
in: toasts.length > 0,
|
|
158
|
+
timeout: {
|
|
159
|
+
enter: 300,
|
|
160
|
+
exit: 300
|
|
161
|
+
},
|
|
162
|
+
classNames: baseClassName,
|
|
163
|
+
unmountOnExit: true,
|
|
164
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
165
|
+
ref: panelRef,
|
|
166
|
+
className: (0, _classnames.default)(baseClassName, {
|
|
167
|
+
[`${baseClassName}--empty`]: isEmpty
|
|
168
|
+
}),
|
|
169
|
+
children: [panelHeader, panelContent]
|
|
170
|
+
})
|
|
171
|
+
})
|
|
172
|
+
})
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
var _default = exports.default = PanelView;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _reactTransitionGroup = require("react-transition-group");
|
|
11
|
+
var _Toast = _interopRequireDefault(require("../Toast"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
14
|
+
|
|
15
|
+
const ToastView = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
toasts,
|
|
18
|
+
onToastClose,
|
|
19
|
+
position,
|
|
20
|
+
baseClassName
|
|
21
|
+
} = _ref;
|
|
22
|
+
let stack = toasts;
|
|
23
|
+
if (position === 'bottom-end') {
|
|
24
|
+
stack = [...stack];
|
|
25
|
+
stack.reverse();
|
|
26
|
+
}
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.TransitionGroup, {
|
|
28
|
+
component: "span",
|
|
29
|
+
className: baseClassName,
|
|
30
|
+
children: stack.map(_ref2 => {
|
|
31
|
+
let {
|
|
32
|
+
key,
|
|
33
|
+
...toastProps
|
|
34
|
+
} = _ref2;
|
|
35
|
+
const {
|
|
36
|
+
intent
|
|
37
|
+
} = toastProps;
|
|
38
|
+
let {
|
|
39
|
+
autoClosable
|
|
40
|
+
} = toastProps;
|
|
41
|
+
if (autoClosable === undefined && intent === 'success' && position === 'top-end') {
|
|
42
|
+
autoClosable = true;
|
|
43
|
+
}
|
|
44
|
+
const toastRef = /*#__PURE__*/(0, _react.createRef)();
|
|
45
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition, {
|
|
46
|
+
classNames: `${baseClassName}__toast-`,
|
|
47
|
+
timeout: {
|
|
48
|
+
enter: 300,
|
|
49
|
+
exit: 300
|
|
50
|
+
},
|
|
51
|
+
nodeRef: toastRef,
|
|
52
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toast.default, {
|
|
53
|
+
...toastProps,
|
|
54
|
+
autoClosable: autoClosable,
|
|
55
|
+
onClose: () => onToastClose({
|
|
56
|
+
...toastProps,
|
|
57
|
+
key
|
|
58
|
+
}),
|
|
59
|
+
innerRef: toastRef,
|
|
60
|
+
className: (0, _classnames.default)(toastProps.className, `${baseClassName}__toast`)
|
|
61
|
+
})
|
|
62
|
+
}, key);
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
var _default = exports.default = ToastView;
|