@plesk/ui-library 3.31.2 → 3.32.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/Action/Action.js +20 -12
- package/cjs/components/Alert/Alert.js +9 -8
- package/cjs/components/Alert/Alert.stories.js +19 -12
- package/cjs/components/AutoClosable/AutoClosable.js +7 -9
- package/cjs/components/AuxiliaryActions/AuxiliaryActions.js +14 -12
- package/cjs/components/Badge/Badge.js +11 -10
- package/cjs/components/Breadcrumbs/Breadcrumbs.js +18 -15
- package/cjs/components/Button/Button.js +34 -25
- package/cjs/components/Button/Button.stories.js +82 -49
- package/cjs/components/Button/ButtonContext.js +27 -0
- package/cjs/components/ButtonGroup/ButtonGroup.js +6 -5
- package/cjs/components/Card/Card.js +132 -109
- package/cjs/components/Card/CardButton.js +5 -4
- package/cjs/components/Card/PreviewPanel.js +24 -21
- package/cjs/components/CardList/CardList.js +57 -50
- package/cjs/components/CardList/CardListToolbar.js +47 -40
- package/cjs/components/Carousel/Carousel.js +42 -35
- package/cjs/components/Checkbox/Checkbox.js +27 -22
- package/cjs/components/ClosingConfirmation/useClosingConfirmation.js +24 -22
- package/cjs/components/CodeEditor/CodeEditor.js +5 -5
- package/cjs/components/Columns/Column.js +7 -7
- package/cjs/components/Columns/Columns.js +18 -14
- package/cjs/components/ComboBox/ComboBox.js +17 -13
- package/cjs/components/ComboBox/ComboBoxOption.js +2 -3
- package/cjs/components/ComboBoxDropdown/ComboBoxDropdown.js +73 -68
- package/cjs/components/ConsoleOutput/ConsoleOutput.js +9 -9
- package/cjs/components/ContentLoader/ContentLoader.js +24 -16
- package/cjs/components/ContentLoader/IconsLoader.js +19 -17
- package/cjs/components/Cuttable/Cuttable.js +33 -30
- package/cjs/components/Cuttable/Cuttable.stories.js +27 -5
- package/cjs/components/Dialog/Dialog.js +74 -54
- package/cjs/components/Dialog/Dialog.stories.js +18 -14
- package/cjs/components/Drawer/Drawer.js +60 -50
- package/cjs/components/Drawer/Drawer.stories.js +24 -16
- package/cjs/components/Drawer/DrawerProgress.js +40 -31
- package/cjs/components/Drawer/Header.js +34 -26
- package/cjs/components/Dropdown/Dropdown.js +49 -41
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessage.js +21 -17
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +6 -5
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +6 -5
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +5 -5
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +6 -5
- package/cjs/components/Figure/Figure.js +12 -9
- package/cjs/components/FocusTrap/FocusTrap.js +13 -14
- package/cjs/components/Form/Form.js +89 -75
- package/cjs/components/Form/Form.stories.js +8 -9
- package/cjs/components/FormField/FormField.js +55 -50
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +36 -29
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +9 -3
- package/cjs/components/FormFieldPassword/FormFieldPassword.js +74 -66
- package/cjs/components/FormFieldPassword/PasswordMeter.js +34 -23
- package/cjs/components/FormFieldPassword/estimatePassword.js +11 -11
- package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +54 -50
- package/cjs/components/FormFieldSelect/FormFieldSelect.js +26 -24
- package/cjs/components/FormFieldText/FormFieldText.js +39 -35
- package/cjs/components/Grid/Grid.js +16 -13
- package/cjs/components/GridCol/GridCol.js +7 -7
- package/cjs/components/Heading/Heading.js +12 -10
- package/cjs/components/Hint/Hint.js +6 -5
- package/cjs/components/Icon/Icon.js +15 -14
- package/cjs/components/Icon/Icon.stories.js +15 -12
- package/cjs/components/Icon/utils.js +9 -6
- package/cjs/components/InPlaceEdit/InPlaceEdit.js +54 -49
- package/cjs/components/Input/Input.js +18 -14
- package/cjs/components/InputFile/InputFile.js +45 -42
- package/cjs/components/InputNumber/InputNumber.js +8 -10
- package/cjs/components/Item/Item.js +34 -22
- package/cjs/components/ItemLink/ItemLink.js +9 -7
- package/cjs/components/ItemLink/ItemLink.stories.js +4 -2
- package/cjs/components/ItemList/ItemList.js +39 -31
- package/cjs/components/ItemList/ItemList.stories.js +26 -27
- package/cjs/components/Label/Label.js +41 -8
- package/cjs/components/Layer/Layer.js +11 -10
- package/cjs/components/Layout/Layout.js +129 -101
- package/cjs/components/Link/Link.js +10 -10
- package/cjs/components/List/List.js +338 -279
- package/cjs/components/List/List.stories.js +21 -19
- package/cjs/components/List/ListAction.js +10 -8
- package/cjs/components/List/ListActions.js +21 -19
- package/cjs/components/List/ListActionsDivider.js +4 -3
- package/cjs/components/List/ListEmptyView.js +38 -23
- package/cjs/components/List/ListOperation.js +28 -21
- package/cjs/components/LocaleProvider/LocaleProvider.js +6 -6
- package/cjs/components/Markdown/Markdown.js +5 -4
- package/cjs/components/Media/Media.js +30 -22
- package/cjs/components/Media/MediaSection.js +7 -6
- package/cjs/components/Menu/Menu.js +7 -6
- package/cjs/components/Menu/Menu.stories.js +35 -33
- package/cjs/components/Menu/MenuBaseItem.js +18 -14
- package/cjs/components/Menu/MenuDivider.js +6 -6
- package/cjs/components/Menu/MenuHeader.js +7 -6
- package/cjs/components/Menu/MenuItem.js +12 -9
- package/cjs/components/Menu/MenuSelectableItem.js +7 -6
- package/cjs/components/Overlay/Backdrop.js +5 -4
- package/cjs/components/Overlay/Overlay.js +63 -52
- package/cjs/components/PageHeader/PageHeader.js +36 -25
- package/cjs/components/Pagination/Pagination.js +72 -66
- package/cjs/components/Panel/Panel.js +38 -36
- package/cjs/components/Paragraph/Paragraph.js +6 -5
- package/cjs/components/Plaintext/Plaintext.js +5 -3
- package/cjs/components/Popover/Popover.js +43 -34
- package/cjs/components/Popover/Popover.stories.js +33 -15
- package/cjs/components/Popper/Popper.js +19 -17
- package/cjs/components/Progress/Progress.js +6 -4
- package/cjs/components/ProgressBar/ProgressBar.js +10 -10
- package/cjs/components/ProgressBar/ProgressIndicator.js +5 -5
- package/cjs/components/ProgressDialog/ProgressDialog.js +16 -13
- package/cjs/components/ProgressDialogStep/ProgressDialogStep.js +5 -3
- package/cjs/components/ProgressStep/ProgressStep.js +34 -23
- package/cjs/components/Radio/Radio.js +21 -18
- package/cjs/components/Rating/Rating.js +10 -8
- package/cjs/components/Section/Section.js +55 -50
- package/cjs/components/Section/SectionItem.js +12 -8
- package/cjs/components/SegmentedControl/SegmentedControl.js +86 -75
- package/cjs/components/Select/MultiValue.js +26 -21
- package/cjs/components/Select/Select.js +8 -7
- package/cjs/components/Select/Select.stories.js +41 -40
- package/cjs/components/Select/SelectControl.js +87 -77
- package/cjs/components/Select/SelectOption.js +2 -3
- package/cjs/components/Select/SelectOptionGroup.js +2 -3
- package/cjs/components/Skeleton/Skeleton.js +5 -5
- package/cjs/components/Skeleton/Skeleton.stories.js +7 -3
- package/cjs/components/Skeleton/SkeletonTabs.js +11 -10
- package/cjs/components/Skeleton/SkeletonTabs.stories.js +4 -2
- package/cjs/components/Skeleton/SkeletonText.js +13 -13
- package/cjs/components/Skeleton/SkeletonText.stories.js +10 -4
- package/cjs/components/Spinner/Spinner.js +15 -15
- package/cjs/components/SplitButton/SplitButton.js +18 -14
- package/cjs/components/Spot/Spot.js +19 -15
- package/cjs/components/Spot/SpotPopup.js +33 -29
- package/cjs/components/Spot/SpotPulsar.js +12 -13
- package/cjs/components/Squeezer/Squeezer.js +11 -13
- package/cjs/components/Status/Status.js +7 -7
- package/cjs/components/Status/Status.stories.js +4 -2
- package/cjs/components/StatusMessage/StatusMessage.js +9 -8
- package/cjs/components/Subnav/Subnav.js +7 -6
- package/cjs/components/Switch/Switch.js +21 -17
- package/cjs/components/SwitchesPanel/SwitchesPanel.js +11 -8
- package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +34 -26
- package/cjs/components/Tabs/SearchBar.js +57 -51
- package/cjs/components/Tabs/Tab.js +5 -3
- package/cjs/components/Tabs/Tabs.js +157 -129
- package/cjs/components/Tabs/Tabs.stories.js +8 -6
- package/cjs/components/Text/Text.js +7 -7
- package/cjs/components/TextArea/TextArea.js +6 -7
- package/cjs/components/Toast/Toast.js +32 -29
- package/cjs/components/Toaster/Toaster.js +54 -48
- package/cjs/components/Toolbar/Toolbar.js +19 -14
- package/cjs/components/Toolbar/ToolbarExpander.js +7 -7
- package/cjs/components/Toolbar/ToolbarGroup.js +23 -17
- package/cjs/components/Toolbar/ToolbarItem.js +11 -9
- package/cjs/components/Toolbar/ToolbarMenu.js +21 -15
- package/cjs/components/Tooltip/Tooltip.js +26 -21
- package/cjs/components/Tour/Tour.js +3 -4
- package/cjs/components/Translate/Translate.js +4 -1
- package/cjs/components/utils.js +4 -8
- package/cjs/index.js +1 -1
- package/cjs/utils.js +0 -2
- package/dist/.DS_Store +0 -0
- 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 +4755 -2803
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +19 -6
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Action/Action.js +21 -12
- package/esm/components/Alert/Alert.js +10 -8
- package/esm/components/Alert/Alert.stories.js +21 -12
- package/esm/components/AutoClosable/AutoClosable.js +7 -7
- package/esm/components/AuxiliaryActions/AuxiliaryActions.js +14 -10
- package/esm/components/Badge/Badge.js +12 -8
- package/esm/components/Breadcrumbs/Breadcrumbs.js +19 -13
- package/esm/components/Button/Button.js +35 -26
- package/esm/components/Button/Button.stories.js +84 -49
- package/esm/components/Button/ButtonContext.js +18 -0
- package/esm/components/ButtonGroup/ButtonGroup.js +6 -5
- package/esm/components/Card/Card.js +133 -109
- package/esm/components/Card/CardButton.js +5 -4
- package/esm/components/Card/PreviewPanel.js +25 -19
- package/esm/components/CardList/CardList.js +58 -50
- package/esm/components/CardList/CardListToolbar.js +47 -40
- package/esm/components/Carousel/Carousel.js +43 -35
- package/esm/components/Checkbox/Checkbox.js +28 -22
- package/esm/components/ClosingConfirmation/useClosingConfirmation.js +24 -20
- package/esm/components/CodeEditor/CodeEditor.js +5 -6
- package/esm/components/Columns/Column.js +7 -5
- package/esm/components/Columns/Columns.js +18 -14
- package/esm/components/ComboBox/ComboBox.js +17 -13
- package/esm/components/ComboBox/ComboBoxOption.js +2 -2
- package/esm/components/ComboBoxDropdown/ComboBoxDropdown.js +75 -68
- package/esm/components/ConsoleOutput/ConsoleOutput.js +10 -7
- package/esm/components/ContentLoader/ContentLoader.js +25 -14
- package/esm/components/ContentLoader/IconsLoader.js +20 -15
- package/esm/components/Cuttable/Cuttable.js +34 -28
- package/esm/components/Cuttable/Cuttable.stories.js +29 -5
- package/esm/components/Dialog/Dialog.js +75 -53
- package/esm/components/Dialog/Dialog.stories.js +20 -12
- package/esm/components/Drawer/Drawer.js +61 -50
- package/esm/components/Drawer/Drawer.stories.js +26 -14
- package/esm/components/Drawer/DrawerProgress.js +41 -31
- package/esm/components/Drawer/Header.js +35 -26
- package/esm/components/Dropdown/Dropdown.js +51 -41
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessage.js +22 -17
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +6 -5
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +6 -5
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +5 -5
- package/esm/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +6 -5
- package/esm/components/Figure/Figure.js +13 -9
- package/esm/components/FocusTrap/FocusTrap.js +14 -11
- package/esm/components/Form/Form.js +90 -75
- package/esm/components/Form/Form.stories.js +8 -9
- package/esm/components/FormField/FormField.js +56 -50
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +38 -29
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +9 -3
- package/esm/components/FormFieldPassword/FormFieldPassword.js +75 -64
- package/esm/components/FormFieldPassword/PasswordMeter.js +36 -23
- package/esm/components/FormFieldPassword/estimatePassword.js +11 -11
- package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +55 -50
- package/esm/components/FormFieldSelect/FormFieldSelect.js +26 -24
- package/esm/components/FormFieldText/FormFieldText.js +39 -35
- package/esm/components/Grid/Grid.js +16 -13
- package/esm/components/GridCol/GridCol.js +6 -5
- package/esm/components/Heading/Heading.js +13 -10
- package/esm/components/Hint/Hint.js +6 -5
- package/esm/components/Icon/Icon.js +15 -12
- package/esm/components/Icon/Icon.stories.js +15 -12
- package/esm/components/Icon/utils.js +9 -6
- package/esm/components/InPlaceEdit/InPlaceEdit.js +55 -49
- package/esm/components/Input/Input.js +19 -14
- package/esm/components/InputFile/InputFile.js +47 -40
- package/esm/components/InputNumber/InputNumber.js +8 -8
- package/esm/components/Item/Item.js +35 -22
- package/esm/components/ItemLink/ItemLink.js +9 -7
- package/esm/components/ItemLink/ItemLink.stories.js +4 -2
- package/esm/components/ItemList/ItemList.js +39 -31
- package/esm/components/ItemList/ItemList.stories.js +26 -25
- package/esm/components/Label/Label.js +42 -8
- package/esm/components/Layer/Layer.js +11 -8
- package/esm/components/Layout/Layout.js +130 -101
- package/esm/components/Link/Link.js +11 -9
- package/esm/components/List/List.js +341 -280
- package/esm/components/List/List.stories.js +22 -17
- package/esm/components/List/ListAction.js +10 -8
- package/esm/components/List/ListActions.js +22 -17
- package/esm/components/List/ListActionsDivider.js +4 -2
- package/esm/components/List/ListEmptyView.js +39 -23
- package/esm/components/List/ListOperation.js +29 -19
- package/esm/components/LocaleProvider/LocaleProvider.js +6 -4
- package/esm/components/Markdown/Markdown.js +5 -4
- package/esm/components/Media/Media.js +31 -22
- package/esm/components/Media/MediaSection.js +6 -4
- package/esm/components/Menu/Menu.js +7 -6
- package/esm/components/Menu/Menu.stories.js +35 -33
- package/esm/components/Menu/MenuBaseItem.js +18 -12
- package/esm/components/Menu/MenuDivider.js +5 -4
- package/esm/components/Menu/MenuHeader.js +6 -4
- package/esm/components/Menu/MenuItem.js +11 -7
- package/esm/components/Menu/MenuSelectableItem.js +6 -4
- package/esm/components/Overlay/Backdrop.js +5 -4
- package/esm/components/Overlay/Overlay.js +65 -53
- package/esm/components/PageHeader/PageHeader.js +37 -23
- package/esm/components/Pagination/Pagination.js +73 -66
- package/esm/components/Panel/Panel.js +39 -34
- package/esm/components/Paragraph/Paragraph.js +6 -5
- package/esm/components/Plaintext/Plaintext.js +5 -3
- package/esm/components/Popover/Popover.js +44 -34
- package/esm/components/Popover/Popover.stories.js +35 -15
- package/esm/components/Popper/Popper.js +19 -15
- package/esm/components/Progress/Progress.js +6 -4
- package/esm/components/ProgressBar/ProgressBar.js +10 -8
- package/esm/components/ProgressBar/ProgressIndicator.js +5 -5
- package/esm/components/ProgressDialog/ProgressDialog.js +17 -13
- package/esm/components/ProgressDialogStep/ProgressDialogStep.js +4 -1
- package/esm/components/ProgressStep/ProgressStep.js +35 -23
- package/esm/components/Radio/Radio.js +22 -18
- package/esm/components/Rating/Rating.js +10 -8
- package/esm/components/Section/Section.js +56 -50
- package/esm/components/Section/SectionItem.js +13 -8
- package/esm/components/SegmentedControl/SegmentedControl.js +87 -75
- package/esm/components/Select/MultiValue.js +27 -21
- package/esm/components/Select/Select.js +8 -7
- package/esm/components/Select/Select.stories.js +41 -40
- package/esm/components/Select/SelectControl.js +88 -75
- package/esm/components/Select/SelectOption.js +2 -2
- package/esm/components/Select/SelectOptionGroup.js +2 -2
- package/esm/components/Skeleton/Skeleton.js +5 -5
- package/esm/components/Skeleton/Skeleton.stories.js +7 -3
- package/esm/components/Skeleton/SkeletonTabs.js +11 -10
- package/esm/components/Skeleton/SkeletonTabs.stories.js +4 -2
- package/esm/components/Skeleton/SkeletonText.js +13 -13
- package/esm/components/Skeleton/SkeletonText.stories.js +10 -4
- package/esm/components/Spinner/Spinner.js +15 -15
- package/esm/components/SplitButton/SplitButton.js +19 -14
- package/esm/components/Spot/Spot.js +19 -13
- package/esm/components/Spot/SpotPopup.js +34 -28
- package/esm/components/Spot/SpotPulsar.js +13 -11
- package/esm/components/Squeezer/Squeezer.js +11 -11
- package/esm/components/Status/Status.js +7 -5
- package/esm/components/Status/Status.stories.js +4 -2
- package/esm/components/StatusMessage/StatusMessage.js +10 -8
- package/esm/components/Subnav/Subnav.js +7 -6
- package/esm/components/Switch/Switch.js +22 -17
- package/esm/components/SwitchesPanel/SwitchesPanel.js +11 -8
- package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +35 -26
- package/esm/components/Tabs/SearchBar.js +60 -52
- package/esm/components/Tabs/Tab.js +4 -1
- package/esm/components/Tabs/Tabs.js +158 -129
- package/esm/components/Tabs/Tabs.stories.js +8 -6
- package/esm/components/Text/Text.js +7 -5
- package/esm/components/TextArea/TextArea.js +6 -5
- package/esm/components/Toast/Toast.js +33 -27
- package/esm/components/Toaster/Toaster.js +54 -46
- package/esm/components/Toolbar/Toolbar.js +19 -14
- package/esm/components/Toolbar/ToolbarExpander.js +7 -5
- package/esm/components/Toolbar/ToolbarGroup.js +22 -15
- package/esm/components/Toolbar/ToolbarItem.js +11 -7
- package/esm/components/Toolbar/ToolbarMenu.js +21 -15
- package/esm/components/Tooltip/Tooltip.js +27 -21
- package/esm/components/Tour/Tour.js +3 -2
- package/esm/components/Translate/Translate.js +4 -1
- package/esm/components/utils.js +4 -8
- package/esm/index.js +1 -1
- package/esm/utils.js +1 -3
- package/package.json +56 -60
- package/styleguide/build/bundle.57b0e524.js +2 -0
- package/styleguide/build/{bundle.26082873.js.LICENSE.txt → bundle.57b0e524.js.LICENSE.txt} +13 -4
- package/styleguide/index.html +2 -2
- package/types/src/components/Alert/Alert.stories.d.ts +5 -8
- package/types/src/components/AutoClosable/AutoClosable.d.ts +2 -23
- package/types/src/components/Button/Button.stories.d.ts +4 -2
- package/types/src/components/Button/ButtonContext.d.ts +8 -0
- package/types/src/components/ClosingConfirmation/useClosingConfirmation.d.ts +2 -2
- package/types/src/components/Cuttable/Cuttable.d.ts +2 -2
- package/types/src/components/Cuttable/Cuttable.stories.d.ts +6 -23
- package/types/src/components/Dialog/Dialog.stories.d.ts +6 -2
- package/types/src/components/Drawer/Drawer.stories.d.ts +8 -4
- package/types/src/components/Drawer/DrawerProgress.d.ts +1 -1
- package/types/src/components/FocusTrap/FocusTrap.d.ts +2 -2
- package/types/src/components/Form/Form.d.ts +17 -17
- package/types/src/components/Form/Form.stories.d.ts +3 -1
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.stories.d.ts +6 -2
- package/types/src/components/FormFieldSelect/FormFieldSelect.d.ts +0 -1
- package/types/src/components/Icon/Icon.d.ts +0 -1
- package/types/src/components/Icon/Icon.stories.d.ts +3 -1
- package/types/src/components/Input/Input.d.ts +0 -1
- package/types/src/components/ItemLink/ItemLink.stories.d.ts +5 -7
- package/types/src/components/ItemList/ItemList.d.ts +2 -2
- package/types/src/components/ItemList/ItemList.stories.d.ts +46 -175
- package/types/src/components/Label/Label.d.ts +32 -5
- package/types/src/components/Layer/Layer.d.ts +3 -3
- package/types/src/components/List/List.stories.d.ts +9 -7
- package/types/src/components/List/ListActionsDivider.d.ts +4 -4
- package/types/src/components/Menu/Menu.stories.d.ts +5 -3
- package/types/src/components/Panel/Panel.d.ts +2 -2
- package/types/src/components/Popover/Popover.stories.d.ts +7 -3
- package/types/src/components/Select/Select.d.ts +0 -1
- package/types/src/components/Select/Select.stories.d.ts +5 -16
- package/types/src/components/Select/SelectControl.d.ts +2 -2
- package/types/src/components/Skeleton/Skeleton.d.ts +1 -1
- package/types/src/components/Skeleton/Skeleton.stories.d.ts +6 -3
- package/types/src/components/Skeleton/SkeletonTabs.stories.d.ts +5 -6
- package/types/src/components/Skeleton/SkeletonText.d.ts +1 -1
- package/types/src/components/Skeleton/SkeletonText.stories.d.ts +7 -22
- package/types/src/components/Spot/SpotPulsar.d.ts +2 -3
- package/types/src/components/Status/Status.stories.d.ts +5 -16
- package/types/src/components/Tabs/Tabs.stories.d.ts +5 -1
- package/types/src/components/TextArea/TextArea.d.ts +4 -4
- package/types/src/components/Toolbar/ToolbarItem.d.ts +2 -2
- package/types/src/components/Toolbar/ToolbarMenu.d.ts +2 -2
- package/types/src/components/utils.d.ts +5 -5
- package/types/src/utils.d.ts +0 -1
- package/cjs/components/Drawer/ScrollDirection.js +0 -45
- package/esm/components/Drawer/ScrollDirection.js +0 -37
- package/styleguide/build/bundle.26082873.js +0 -2
- package/styleguide/images/default.svg +0 -1
- package/styleguide/images/empty-list_256.png +0 -0
- package/styleguide/images/filtered.svg +0 -1
- package/styleguide/patterns/controls/control-button-tooltip-1-do.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-1-dont.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-2-do.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-2-dont.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-3-do.png +0 -0
- package/styleguide/patterns/controls/control-button-tooltip-3-dont.png +0 -0
- package/styleguide/patterns/dialogsWindows/autoclose.png +0 -0
- package/styleguide/patterns/dialogsWindows/focus.png +0 -0
- package/styleguide/patterns/dialogsWindows/header.png +0 -0
- package/styleguide/patterns/dialogsWindows/image.png +0 -0
- package/styleguide/patterns/dialogsWindows/list_submit.png +0 -0
- package/styleguide/patterns/dialogsWindows/new_object.png +0 -0
- package/styleguide/patterns/dialogsWindows/popover-confirm.png +0 -0
- package/styleguide/patterns/dialogsWindows/popover.png +0 -0
- package/styleguide/patterns/dialogsWindows/similar_buttons.png +0 -0
- package/styleguide/patterns/dialogsWindows/submit.png +0 -0
- package/styleguide/patterns/dialogsWindows/toast_controls.png +0 -0
- package/styleguide/patterns/dialogsWindows/toaster_intent.png +0 -0
- package/styleguide/patterns/dialogsWindows/tooltip.png +0 -0
- package/styleguide/patterns/dialogsWindows/tour.png +0 -0
- package/styleguide/patterns/dialogsWindows/when_to_show.png +0 -0
- package/styleguide/patterns/dialogsWindows/width.png +0 -0
- package/types/package.d.ts +0 -138
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import React, { useRef, useState, useEffect, useLayoutEffect } from 'react';
|
|
3
|
+
import { useRef, useState, useEffect, useLayoutEffect } from 'react';
|
|
7
4
|
import { Z_INDEX_DROPDOWN, CLS_PREFIX } from '../../constants';
|
|
8
5
|
import classNames from 'classnames';
|
|
9
6
|
import Popper from '../Popper';
|
|
10
7
|
import Menu, { MenuItem, MenuHeader } from '../Menu';
|
|
11
8
|
import AutoClosable from '../AutoClosable';
|
|
12
9
|
import { safeInvoke, scrollIntoView } from '../utils';
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { createElement as _createElement } from "react";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
export const findNextSafeIndex = (currIndex, diff, options) => {
|
|
14
14
|
const maxIndex = options.length - 1;
|
|
15
15
|
let attempt = 0;
|
|
@@ -87,75 +87,82 @@ const ComboBoxDropdown = _ref => {
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
}, [emitter]);
|
|
90
|
-
const target = /*#__PURE__*/
|
|
90
|
+
const target = /*#__PURE__*/_jsx(AutoClosable, {
|
|
91
91
|
onClose: () => {
|
|
92
92
|
setTimeout(() => {
|
|
93
93
|
safeInvoke(onClose);
|
|
94
94
|
}, 0);
|
|
95
95
|
},
|
|
96
96
|
ignoreNodes: () => [menuRef.current],
|
|
97
|
-
nodeRef: controlRef
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
97
|
+
nodeRef: controlRef,
|
|
98
|
+
children: control
|
|
99
|
+
});
|
|
100
|
+
return /*#__PURE__*/_jsx("div", {
|
|
101
|
+
className: className,
|
|
102
|
+
...props,
|
|
103
|
+
ref: rootRef,
|
|
104
|
+
children: /*#__PURE__*/_jsx(Popper, {
|
|
105
|
+
target: target,
|
|
106
|
+
targetRef: controlRef,
|
|
107
|
+
show: opened && !disabled,
|
|
108
|
+
className: `${baseClassName}__popper`,
|
|
109
|
+
zIndex: Z_INDEX_DROPDOWN,
|
|
110
|
+
children: /*#__PURE__*/_jsxs(Menu, {
|
|
111
|
+
style: {
|
|
112
|
+
minWidth
|
|
113
|
+
},
|
|
114
|
+
ref: menuRef,
|
|
115
|
+
className: `${baseClassName}__menu`,
|
|
116
|
+
children: [groups.reduce((acc, group) => {
|
|
117
|
+
if (group.label) {
|
|
118
|
+
acc.push( /*#__PURE__*/_createElement(MenuHeader, {
|
|
119
|
+
...group.props,
|
|
120
|
+
key: `group_${group.label}`
|
|
121
|
+
}, group.label));
|
|
122
|
+
}
|
|
123
|
+
group.options.forEach(option => {
|
|
124
|
+
const optionIndex = options.indexOf(option);
|
|
125
|
+
let onClick;
|
|
126
|
+
let onMouseOver;
|
|
127
|
+
let onMouseDown;
|
|
128
|
+
if (!option.disabled) {
|
|
129
|
+
onClick = e => {
|
|
130
|
+
e.preventDefault();
|
|
131
|
+
safeInvoke(onSelect, option.value);
|
|
132
|
+
};
|
|
133
|
+
onMouseOver = () => {
|
|
134
|
+
// TODO: use throttle
|
|
135
|
+
safeInvoke(onHighlightedIndexChange, optionIndex);
|
|
136
|
+
};
|
|
137
|
+
onMouseDown = e => {
|
|
138
|
+
e.preventDefault();
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
const menuItemProps = {
|
|
142
|
+
...option.props,
|
|
143
|
+
active: value === option.value,
|
|
144
|
+
className: classNames(`${baseClassName}__option`, {
|
|
145
|
+
[`${baseClassName}__option--selected`]: optionIndex === highlightedIndex
|
|
146
|
+
}),
|
|
147
|
+
disabled: option.disabled,
|
|
148
|
+
onClick,
|
|
149
|
+
onMouseOver,
|
|
150
|
+
onMouseDown,
|
|
151
|
+
'data-index': optionIndex
|
|
152
|
+
};
|
|
153
|
+
acc.push( /*#__PURE__*/_jsx(MenuItem, {
|
|
154
|
+
...menuItemProps,
|
|
155
|
+
children: option.children
|
|
156
|
+
}, `option_${option.value}`));
|
|
157
|
+
});
|
|
158
|
+
return acc;
|
|
159
|
+
}, []), options.length === 0 && noOptions && /*#__PURE__*/_jsx(MenuItem, {
|
|
160
|
+
disabled: true,
|
|
161
|
+
className: `${baseClassName}__no-options`,
|
|
162
|
+
children: noOptions
|
|
163
|
+
})]
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
});
|
|
160
167
|
};
|
|
161
168
|
export default ComboBoxDropdown;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
4
3
|
|
|
5
|
-
import
|
|
4
|
+
import { PureComponent, createRef } from 'react';
|
|
6
5
|
import classNames from 'classnames';
|
|
7
6
|
import { CLS_PREFIX } from '../../constants';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
const scrollToBottom = el => {
|
|
9
10
|
el.scrollTop = el.scrollHeight;
|
|
10
11
|
};
|
|
@@ -62,15 +63,17 @@ class ConsoleOutput extends PureComponent {
|
|
|
62
63
|
...props
|
|
63
64
|
} = this.props;
|
|
64
65
|
const onScroll = autoscroll ? this.handleScroll : undefined;
|
|
65
|
-
return /*#__PURE__*/
|
|
66
|
+
return /*#__PURE__*/_jsxs("pre", {
|
|
66
67
|
className: classNames(baseClassName, {
|
|
67
68
|
[`${baseClassName}--wide`]: wide
|
|
68
69
|
}, className),
|
|
69
70
|
ref: this.rootRef,
|
|
70
|
-
onScroll: onScroll
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
onScroll: onScroll,
|
|
72
|
+
...props,
|
|
73
|
+
children: [children, cursor ? /*#__PURE__*/_jsx("span", {
|
|
74
|
+
className: `${baseClassName}__cursor`
|
|
75
|
+
}) : null]
|
|
76
|
+
});
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
_defineProperty(ConsoleOutput, "defaultProps", {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import { Children } from 'react';
|
|
5
4
|
import classNames from 'classnames';
|
|
6
5
|
import Spinner from '../Spinner';
|
|
7
6
|
import IconsLoader from './IconsLoader';
|
|
8
7
|
import { CLS_PREFIX } from '../../constants';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
const getLoader = loader => {
|
|
10
11
|
let loaderType;
|
|
11
12
|
let loaderProps = {};
|
|
@@ -49,9 +50,10 @@ const ContentLoader = _ref => {
|
|
|
49
50
|
return tmp;
|
|
50
51
|
}
|
|
51
52
|
if (Children.toArray(children).length && overlay) {
|
|
52
|
-
children = /*#__PURE__*/
|
|
53
|
-
className: classNames(`${baseClassName}__content`, blur && `${baseClassName}__content--blur`)
|
|
54
|
-
|
|
53
|
+
children = /*#__PURE__*/_jsx("div", {
|
|
54
|
+
className: classNames(`${baseClassName}__content`, blur && `${baseClassName}__content--blur`),
|
|
55
|
+
children: children
|
|
56
|
+
});
|
|
55
57
|
}
|
|
56
58
|
const {
|
|
57
59
|
loaderType,
|
|
@@ -60,14 +62,23 @@ const ContentLoader = _ref => {
|
|
|
60
62
|
loaderProps.className = classNames(`${baseClassName}__indicator`, {
|
|
61
63
|
[`${baseClassName}__indicator--sm`]: loaderType === 'spinner' && spinner && spinner.size === 'sm'
|
|
62
64
|
});
|
|
63
|
-
return /*#__PURE__*/
|
|
64
|
-
className: classNames(baseClassName, !Children.toArray(children).length && overlay && `${baseClassName}--overlay`, className)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
66
|
+
className: classNames(baseClassName, !Children.toArray(children).length && overlay && `${baseClassName}--overlay`, className),
|
|
67
|
+
...props,
|
|
68
|
+
children: [children, /*#__PURE__*/_jsx("div", {
|
|
69
|
+
className: classNames(`${baseClassName}__container`, overlay && `${baseClassName}__overlay`, backdrop && `${baseClassName}__backdrop`),
|
|
70
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
71
|
+
className: classNames(`${baseClassName}__loader`, `${baseClassName}__loader--${loaderType}`),
|
|
72
|
+
children: [loaderType === 'spinner' && /*#__PURE__*/_jsx(Spinner, {
|
|
73
|
+
...loaderProps
|
|
74
|
+
}), loaderType === 'icons' && /*#__PURE__*/_jsx(IconsLoader, {
|
|
75
|
+
...loaderProps
|
|
76
|
+
}), text && /*#__PURE__*/_jsx("div", {
|
|
77
|
+
className: `${baseClassName}__text`,
|
|
78
|
+
children: text
|
|
79
|
+
})]
|
|
80
|
+
})
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
72
83
|
};
|
|
73
84
|
export default ContentLoader;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2022. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
5
4
|
import classNames from 'classnames';
|
|
6
5
|
import Icon from '../Icon';
|
|
7
6
|
import { CLS_PREFIX } from '../../constants';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
const DEFAULT_ICONS = ['clock', 'emoticon-smile', 'rocket', 'sand-clock', 'sleep', 'web', 'star'];
|
|
9
10
|
const useIconCursor = (icons, initialCursor, isSync) => {
|
|
10
11
|
const targetRef = useRef(null);
|
|
@@ -57,22 +58,26 @@ const IconsLoader = _ref => {
|
|
|
57
58
|
}
|
|
58
59
|
return false;
|
|
59
60
|
});
|
|
60
|
-
return /*#__PURE__*/
|
|
61
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
61
62
|
className: classNames(baseClassName, className),
|
|
62
63
|
style: {
|
|
63
64
|
...style,
|
|
64
65
|
['--icons-loader-size']: size ? size : undefined
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
},
|
|
67
|
+
...props,
|
|
68
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
69
|
+
className: classNames(`${baseClassName}__icon`, `${baseClassName}__icon--1`),
|
|
70
|
+
ref: icon1Ref,
|
|
71
|
+
children: Icon.create(icon1, {
|
|
72
|
+
size: size ? size : '64'
|
|
73
|
+
})
|
|
74
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
75
|
+
className: classNames(`${baseClassName}__icon`, `${baseClassName}__icon--2`),
|
|
76
|
+
ref: icon2Ref,
|
|
77
|
+
children: Icon.create(icon2, {
|
|
78
|
+
size: size ? size : '64'
|
|
79
|
+
})
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
77
82
|
};
|
|
78
83
|
export default IconsLoader;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
4
|
-
/* eslint-disable react/no-did-mount-set-state */
|
|
5
3
|
|
|
6
|
-
import
|
|
4
|
+
import { Component, createRef } from 'react';
|
|
7
5
|
import classNames from 'classnames';
|
|
8
6
|
import Measure from 'react-measure';
|
|
9
7
|
import { CLS_PREFIX } from '../../constants';
|
|
10
8
|
import Translate from '../Translate';
|
|
11
9
|
import Link from '../Link';
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
/**
|
|
13
13
|
* `Cuttable` component is used for showing and hiding part of content.
|
|
14
14
|
* @since 0.0.42
|
|
@@ -55,35 +55,41 @@ class Cuttable extends Component {
|
|
|
55
55
|
...props
|
|
56
56
|
} = this.props;
|
|
57
57
|
const showMoreLessKey = this.state.collapsed ? 'showMore' : 'showLess';
|
|
58
|
-
return /*#__PURE__*/
|
|
58
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
59
59
|
className: classNames(baseClassName, {
|
|
60
60
|
[`${baseClassName}--collapse`]: this.state.collapsed === true,
|
|
61
61
|
[`${baseClassName}--expand`]: this.state.collapsed === false
|
|
62
|
-
}, className)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, _ref2 => {
|
|
69
|
-
let {
|
|
70
|
-
measureRef
|
|
71
|
-
} = _ref2;
|
|
72
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className: `${baseClassName}__content`,
|
|
74
|
-
style: {
|
|
75
|
-
maxHeight
|
|
62
|
+
}, className),
|
|
63
|
+
...props,
|
|
64
|
+
children: [/*#__PURE__*/_jsx(Measure, {
|
|
65
|
+
onResize: this.handleResize,
|
|
66
|
+
innerRef: el => {
|
|
67
|
+
this.contentRef.current = el;
|
|
76
68
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
69
|
+
children: _ref2 => {
|
|
70
|
+
let {
|
|
71
|
+
measureRef
|
|
72
|
+
} = _ref2;
|
|
73
|
+
return /*#__PURE__*/_jsx("div", {
|
|
74
|
+
className: `${baseClassName}__content`,
|
|
75
|
+
style: {
|
|
76
|
+
maxHeight
|
|
77
|
+
},
|
|
78
|
+
ref: measureRef,
|
|
79
|
+
children: children
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}), this.state.collapsed !== undefined && /*#__PURE__*/_jsx("div", {
|
|
83
|
+
className: `${baseClassName}__action`,
|
|
84
|
+
children: /*#__PURE__*/_jsx(Link, {
|
|
85
|
+
onClick: this.handleToggle,
|
|
86
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
87
|
+
content: `Cuttable.${showMoreLessKey}`,
|
|
88
|
+
fallback: locale[showMoreLessKey]
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
})]
|
|
92
|
+
});
|
|
87
93
|
}
|
|
88
94
|
}
|
|
89
95
|
_defineProperty(Cuttable, "defaultProps", {
|
|
@@ -1,15 +1,39 @@
|
|
|
1
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import Cuttable from './Cuttable';
|
|
5
4
|
import Paragraph from '../Paragraph';
|
|
6
5
|
import { Basic as BasicItemList } from '../ItemList/ItemList.stories';
|
|
7
|
-
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export const Basic = args => /*#__PURE__*/_jsx(Cuttable, {
|
|
10
|
+
...args
|
|
11
|
+
});
|
|
8
12
|
Basic.args = {
|
|
9
|
-
children: /*#__PURE__*/
|
|
13
|
+
children: /*#__PURE__*/_jsxs(_Fragment, {
|
|
14
|
+
children: [/*#__PURE__*/_jsx(Paragraph, {
|
|
15
|
+
children: 'Text 1'
|
|
16
|
+
}), /*#__PURE__*/_jsx(Paragraph, {
|
|
17
|
+
children: 'Text 2'
|
|
18
|
+
}), /*#__PURE__*/_jsx(Paragraph, {
|
|
19
|
+
children: 'Text 3'
|
|
20
|
+
}), /*#__PURE__*/_jsx(Paragraph, {
|
|
21
|
+
children: 'Text 4'
|
|
22
|
+
}), /*#__PURE__*/_jsx(Paragraph, {
|
|
23
|
+
children: 'Text 5'
|
|
24
|
+
}), /*#__PURE__*/_jsx(Paragraph, {
|
|
25
|
+
children: 'Text 6'
|
|
26
|
+
}), /*#__PURE__*/_jsx(Paragraph, {
|
|
27
|
+
children: 'Text 7'
|
|
28
|
+
})]
|
|
29
|
+
})
|
|
10
30
|
};
|
|
11
|
-
export const WithItemList = args => /*#__PURE__*/
|
|
31
|
+
export const WithItemList = args => /*#__PURE__*/_jsx(Cuttable, {
|
|
32
|
+
...args
|
|
33
|
+
});
|
|
12
34
|
WithItemList.args = {
|
|
13
35
|
maxHeight: 60,
|
|
14
|
-
children: /*#__PURE__*/
|
|
36
|
+
children: /*#__PURE__*/_jsx(BasicItemList, {
|
|
37
|
+
...BasicItemList.args
|
|
38
|
+
})
|
|
15
39
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
/* eslint-disable react/no-deprecated */
|
|
5
3
|
import React, { isValidElement, cloneElement, useEffect, useState } from 'react';
|
|
6
4
|
import PropTypes from 'prop-types';
|
|
7
5
|
import classNames from 'classnames';
|
|
@@ -14,6 +12,8 @@ import Heading from '../Heading';
|
|
|
14
12
|
import Text from '../Text';
|
|
15
13
|
import Translate, { isLikeText } from '../Translate';
|
|
16
14
|
import { safeInvoke } from '../utils';
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
const isProps = value => value && typeof value === 'object' && ! /*#__PURE__*/isValidElement(value);
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -59,23 +59,27 @@ const Dialog = _ref => {
|
|
|
59
59
|
const renderImage = (image, block) => {
|
|
60
60
|
const classPrefix = `${baseClassName}__${block}`;
|
|
61
61
|
if ( /*#__PURE__*/isValidElement(image)) {
|
|
62
|
-
return /*#__PURE__*/
|
|
63
|
-
className: classPrefix
|
|
64
|
-
|
|
62
|
+
return /*#__PURE__*/_jsx("div", {
|
|
63
|
+
className: classPrefix,
|
|
64
|
+
children: image
|
|
65
|
+
});
|
|
65
66
|
}
|
|
66
67
|
if (typeof image === 'string') {
|
|
67
|
-
return /*#__PURE__*/
|
|
68
|
-
className: classPrefix
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
return /*#__PURE__*/_jsx("div", {
|
|
69
|
+
className: classPrefix,
|
|
70
|
+
children: /*#__PURE__*/_jsx("img", {
|
|
71
|
+
className: `${classPrefix}-inner`,
|
|
72
|
+
src: image
|
|
73
|
+
})
|
|
74
|
+
});
|
|
73
75
|
}
|
|
74
|
-
return /*#__PURE__*/
|
|
75
|
-
className: classPrefix
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
return /*#__PURE__*/_jsx("div", {
|
|
77
|
+
className: classPrefix,
|
|
78
|
+
children: /*#__PURE__*/_jsx("img", {
|
|
79
|
+
className: `${classPrefix}-inner`,
|
|
80
|
+
...image
|
|
81
|
+
})
|
|
82
|
+
});
|
|
79
83
|
};
|
|
80
84
|
const getCancelButtonProps = function () {
|
|
81
85
|
let formProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : form;
|
|
@@ -87,7 +91,7 @@ const Dialog = _ref => {
|
|
|
87
91
|
}
|
|
88
92
|
let props = {
|
|
89
93
|
onClick: onCloseWithConfirmation,
|
|
90
|
-
children: cancelTitle || /*#__PURE__*/
|
|
94
|
+
children: cancelTitle || /*#__PURE__*/_jsx(Translate, {
|
|
91
95
|
content: "Dialog.cancelButton",
|
|
92
96
|
fallback: "Cancel"
|
|
93
97
|
})
|
|
@@ -113,12 +117,15 @@ const Dialog = _ref => {
|
|
|
113
117
|
let cancel;
|
|
114
118
|
const cancelButtonProps = getCancelButtonProps();
|
|
115
119
|
if (cancelButtonProps) {
|
|
116
|
-
cancel = /*#__PURE__*/
|
|
120
|
+
cancel = /*#__PURE__*/_jsx(Button, {
|
|
121
|
+
...cancelButtonProps
|
|
122
|
+
});
|
|
117
123
|
}
|
|
118
124
|
if (buttons || cancel) {
|
|
119
|
-
return /*#__PURE__*/
|
|
120
|
-
className: `${baseClassName}__buttons
|
|
121
|
-
|
|
125
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
126
|
+
className: `${baseClassName}__buttons`,
|
|
127
|
+
children: [buttons, cancel]
|
|
128
|
+
});
|
|
122
129
|
}
|
|
123
130
|
return null;
|
|
124
131
|
};
|
|
@@ -133,47 +140,62 @@ const Dialog = _ref => {
|
|
|
133
140
|
form.cancelButton = getCancelButtonProps();
|
|
134
141
|
form.footerClassName = classNames(form.footerClassName, `${baseClassName}__form-footer`);
|
|
135
142
|
form.applyButton = form.applyButton || false;
|
|
136
|
-
childrenElement = /*#__PURE__*/
|
|
143
|
+
childrenElement = /*#__PURE__*/_jsx(Form, {
|
|
144
|
+
...form,
|
|
145
|
+
children: children
|
|
146
|
+
});
|
|
137
147
|
}
|
|
138
148
|
} else {
|
|
139
149
|
childrenElement = children;
|
|
140
150
|
}
|
|
141
|
-
return /*#__PURE__*/
|
|
151
|
+
return /*#__PURE__*/_jsxs(Overlay, {
|
|
142
152
|
className: classNames(baseClassName, className),
|
|
143
153
|
isOpen: isVisible,
|
|
144
154
|
onClose: onCloseWithConfirmation,
|
|
145
155
|
canCloseOnBackdropClick: canClose && closable,
|
|
146
156
|
canCloseOnEscapePress: canClose && closable,
|
|
147
|
-
size: size
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
157
|
+
size: size,
|
|
158
|
+
...props,
|
|
159
|
+
children: [(title || subtitle || actions) && /*#__PURE__*/_jsxs("header", {
|
|
160
|
+
className: `${baseClassName}__header`,
|
|
161
|
+
children: [banner && renderImage(banner, 'banner'), /*#__PURE__*/_jsx("div", {
|
|
162
|
+
className: `${baseClassName}__header-inner`,
|
|
163
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
164
|
+
className: `${baseClassName}__header-body`,
|
|
165
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
166
|
+
className: `${baseClassName}__header-content`,
|
|
167
|
+
children: [isLikeText(title) ? /*#__PURE__*/_jsx(Heading, {
|
|
168
|
+
level: "2",
|
|
169
|
+
className: `${baseClassName}__title`,
|
|
170
|
+
children: title
|
|
171
|
+
}) : /*#__PURE__*/_jsx("div", {
|
|
172
|
+
className: `${baseClassName}__title`,
|
|
173
|
+
children: title
|
|
174
|
+
}), subtitle && /*#__PURE__*/_jsx("div", {
|
|
175
|
+
className: `${baseClassName}__subtitle`,
|
|
176
|
+
children: isLikeText(subtitle) ? /*#__PURE__*/_jsx(Text, {
|
|
177
|
+
intent: "muted",
|
|
178
|
+
children: subtitle
|
|
179
|
+
}) : subtitle
|
|
180
|
+
})]
|
|
181
|
+
}), (actions || closable) && /*#__PURE__*/_jsxs("div", {
|
|
182
|
+
className: `${baseClassName}__header-actions`,
|
|
183
|
+
children: [actions, closable && /*#__PURE__*/_jsx(Button, {
|
|
184
|
+
className: `${baseClassName}__header-close`,
|
|
185
|
+
disabled: !canClose,
|
|
186
|
+
ghost: true,
|
|
187
|
+
size: "lg",
|
|
188
|
+
icon: "cross-mark",
|
|
189
|
+
onClick: onCloseWithConfirmation
|
|
190
|
+
})]
|
|
191
|
+
})]
|
|
192
|
+
})
|
|
193
|
+
})]
|
|
194
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
195
|
+
className: `${baseClassName}__content`,
|
|
196
|
+
children: [image && renderImage(image, 'image'), childrenElement, renderButtons()]
|
|
197
|
+
}), closingConfirmationDialog]
|
|
198
|
+
});
|
|
177
199
|
};
|
|
178
200
|
Dialog.propTypes = {
|
|
179
201
|
/**
|