@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,31 +1,39 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import { useState } from 'react';
|
|
5
4
|
import Button from '../Button';
|
|
6
5
|
import Dialog from './Dialog';
|
|
7
6
|
import image from '../../docs/public/placeholders/placeholder_400x400.svg';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
10
|
export const Basic = args => {
|
|
9
11
|
const [isOpen, setIsOpen] = useState(false);
|
|
10
|
-
return /*#__PURE__*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
13
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
14
|
+
onClick: () => setIsOpen(true),
|
|
15
|
+
"data-id": "trigger",
|
|
16
|
+
children: 'Open'
|
|
17
|
+
}), /*#__PURE__*/_jsx(Dialog, {
|
|
18
|
+
...args,
|
|
19
|
+
"data-type": "test",
|
|
20
|
+
isOpen: isOpen,
|
|
21
|
+
onClose: () => setIsOpen(false)
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
18
24
|
};
|
|
19
25
|
Basic.args = {
|
|
20
26
|
children: 'Dialog content.',
|
|
21
27
|
title: 'Title',
|
|
22
28
|
subtitle: 'Subtitle'
|
|
23
29
|
};
|
|
24
|
-
export const WithSideBanner = args => /*#__PURE__*/
|
|
30
|
+
export const WithSideBanner = args => /*#__PURE__*/_jsx(Basic, {
|
|
31
|
+
...args
|
|
32
|
+
});
|
|
25
33
|
WithSideBanner.args = {
|
|
26
34
|
...Basic.args,
|
|
27
35
|
size: 'xs',
|
|
28
|
-
sideBanner: /*#__PURE__*/
|
|
36
|
+
sideBanner: /*#__PURE__*/_jsx("img", {
|
|
29
37
|
src: image
|
|
30
38
|
}),
|
|
31
39
|
sideBannerContainer: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
3
|
import React, { Fragment, isValidElement, cloneElement, useRef, useState } from 'react';
|
|
@@ -8,12 +7,13 @@ import { CLS_PREFIX } from '../../constants';
|
|
|
8
7
|
import Overlay from '../Overlay';
|
|
9
8
|
import { useClosingConfirmation } from '../ClosingConfirmation';
|
|
10
9
|
import Header from './Header';
|
|
11
|
-
import ScrollDirection from './ScrollDirection';
|
|
12
10
|
import Form from '../Form';
|
|
13
11
|
import Heading from '../Heading';
|
|
14
12
|
import { isLikeText } from '../Translate';
|
|
15
13
|
import ScrollableElementFormContext from '../Form/ScrollableElementFormContext';
|
|
16
14
|
import DrawerProgress from './DrawerProgress';
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
const propTypes = {
|
|
18
18
|
/**
|
|
19
19
|
* Toggles visibility.
|
|
@@ -163,7 +163,7 @@ const defaultProps = {
|
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* `Drawer` component is used for working with properties of an object (or system) without leaving the context of the object.
|
|
166
|
-
*
|
|
166
|
+
* [Read more when to use Drawer](#!/Drawers%2C%20pages%2C%20popovers).
|
|
167
167
|
* @since 0.0.65
|
|
168
168
|
*/
|
|
169
169
|
const Drawer = _ref => {
|
|
@@ -201,15 +201,17 @@ const Drawer = _ref => {
|
|
|
201
201
|
footer
|
|
202
202
|
} = _ref2;
|
|
203
203
|
return render({
|
|
204
|
-
content: /*#__PURE__*/
|
|
205
|
-
className: `${baseClassName}__form
|
|
206
|
-
|
|
204
|
+
content: /*#__PURE__*/_jsx("div", {
|
|
205
|
+
className: `${baseClassName}__form`,
|
|
206
|
+
children: content
|
|
207
|
+
}),
|
|
207
208
|
footer
|
|
208
209
|
});
|
|
209
210
|
};
|
|
210
|
-
return /*#__PURE__*/
|
|
211
|
-
render: drawerProgressRender
|
|
212
|
-
|
|
211
|
+
return /*#__PURE__*/_jsx(DrawerProgress, {
|
|
212
|
+
render: drawerProgressRender,
|
|
213
|
+
...progress
|
|
214
|
+
});
|
|
213
215
|
}
|
|
214
216
|
if (form) {
|
|
215
217
|
if ( /*#__PURE__*/isValidElement(form)) {
|
|
@@ -239,7 +241,8 @@ const Drawer = _ref => {
|
|
|
239
241
|
...form.cancelButton
|
|
240
242
|
};
|
|
241
243
|
}
|
|
242
|
-
return /*#__PURE__*/
|
|
244
|
+
return /*#__PURE__*/_jsx(Form, {
|
|
245
|
+
...form,
|
|
243
246
|
render: _ref4 => {
|
|
244
247
|
let {
|
|
245
248
|
renderForm,
|
|
@@ -249,56 +252,64 @@ const Drawer = _ref => {
|
|
|
249
252
|
content: renderForm(),
|
|
250
253
|
footer: renderActionButtons()
|
|
251
254
|
});
|
|
252
|
-
}
|
|
253
|
-
|
|
255
|
+
},
|
|
256
|
+
children: children
|
|
257
|
+
});
|
|
254
258
|
}
|
|
255
259
|
}
|
|
256
260
|
return render({
|
|
257
|
-
content: /*#__PURE__*/
|
|
258
|
-
className: `${baseClassName}__inner-body
|
|
259
|
-
|
|
261
|
+
content: /*#__PURE__*/_jsx("div", {
|
|
262
|
+
className: `${baseClassName}__inner-body`,
|
|
263
|
+
children: children
|
|
264
|
+
})
|
|
260
265
|
});
|
|
261
266
|
};
|
|
262
|
-
return /*#__PURE__*/
|
|
267
|
+
return /*#__PURE__*/_jsxs(Overlay, {
|
|
263
268
|
className: classNames(baseClassName, {
|
|
264
269
|
[`${baseClassName}--form`]: form
|
|
265
270
|
}, className),
|
|
266
271
|
onClose: onCloseWithConfirmation,
|
|
267
|
-
canCloseOnBackdropClick: true
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
content,
|
|
271
|
-
footer
|
|
272
|
-
} = _ref5;
|
|
273
|
-
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Header, {
|
|
274
|
-
backButton: backButton,
|
|
275
|
-
hideButton: typeof hideButton === 'boolean' ? hideButton : Boolean(progress && !isClosable),
|
|
276
|
-
onClose: onCloseWithConfirmation,
|
|
277
|
-
tabs: tabs
|
|
278
|
-
}, isLikeText(title) ? /*#__PURE__*/React.createElement(Heading, {
|
|
279
|
-
level: "2",
|
|
280
|
-
className: `${baseClassName}__title`
|
|
281
|
-
}, title) : /*#__PURE__*/React.createElement("div", {
|
|
282
|
-
className: `${baseClassName}__title`
|
|
283
|
-
}, title), subtitle && /*#__PURE__*/React.createElement("div", {
|
|
284
|
-
className: `${baseClassName}__subtitle`
|
|
285
|
-
}, subtitle)), /*#__PURE__*/React.createElement(ScrollDirection, null, _ref6 => {
|
|
272
|
+
canCloseOnBackdropClick: true,
|
|
273
|
+
...props,
|
|
274
|
+
children: [takeApart(_ref5 => {
|
|
286
275
|
let {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
276
|
+
content,
|
|
277
|
+
footer
|
|
278
|
+
} = _ref5;
|
|
279
|
+
return /*#__PURE__*/_jsxs(Fragment, {
|
|
280
|
+
children: [/*#__PURE__*/_jsxs(Header, {
|
|
281
|
+
backButton: backButton,
|
|
282
|
+
hideButton: typeof hideButton === 'boolean' ? hideButton : Boolean(progress && !isClosable),
|
|
283
|
+
onClose: onCloseWithConfirmation,
|
|
284
|
+
tabs: tabs,
|
|
285
|
+
children: [isLikeText(title) ? /*#__PURE__*/_jsx(Heading, {
|
|
286
|
+
level: "2",
|
|
287
|
+
className: `${baseClassName}__title`,
|
|
288
|
+
children: title
|
|
289
|
+
}) : /*#__PURE__*/_jsx("div", {
|
|
290
|
+
className: `${baseClassName}__title`,
|
|
291
|
+
children: title
|
|
292
|
+
}), subtitle && /*#__PURE__*/_jsx("div", {
|
|
293
|
+
className: `${baseClassName}__subtitle`,
|
|
294
|
+
children: subtitle
|
|
295
|
+
})]
|
|
296
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
297
|
+
className: `${baseClassName}__body`,
|
|
298
|
+
ref: scrollableRef,
|
|
299
|
+
children: /*#__PURE__*/_jsx(ScrollableElementFormContext.Provider, {
|
|
300
|
+
value: scrollableRef.current,
|
|
301
|
+
children: content
|
|
302
|
+
})
|
|
303
|
+
}), footer && /*#__PURE__*/_jsx("footer", {
|
|
304
|
+
className: `${baseClassName}__footer`,
|
|
305
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
306
|
+
className: `${baseClassName}__footer-inner`,
|
|
307
|
+
children: footer
|
|
308
|
+
})
|
|
309
|
+
})]
|
|
310
|
+
});
|
|
311
|
+
}), closingConfirmationDialog]
|
|
312
|
+
});
|
|
302
313
|
};
|
|
303
314
|
Drawer.propTypes = propTypes;
|
|
304
315
|
Drawer.defaultProps = defaultProps;
|
|
@@ -1,43 +1,55 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import { useState } from 'react';
|
|
5
4
|
import Button from '../Button';
|
|
6
5
|
import Drawer from './Drawer';
|
|
7
6
|
import image from '../../docs/public/placeholders/placeholder_400x400.svg';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
10
|
export const Basic = args => {
|
|
9
11
|
const [isOpen, setIsOpen] = useState(false);
|
|
10
|
-
return /*#__PURE__*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
13
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
14
|
+
onClick: () => setIsOpen(true),
|
|
15
|
+
"data-id": "trigger",
|
|
16
|
+
children: 'Open'
|
|
17
|
+
}), /*#__PURE__*/_jsx(Drawer, {
|
|
18
|
+
...args,
|
|
19
|
+
"data-type": "test",
|
|
20
|
+
isOpen: isOpen,
|
|
21
|
+
onClose: () => setIsOpen(false)
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
18
24
|
};
|
|
19
25
|
Basic.args = {
|
|
20
26
|
children: 'Drawer content.',
|
|
21
27
|
title: 'Title',
|
|
22
28
|
subtitle: 'Subtitle'
|
|
23
29
|
};
|
|
24
|
-
export const WithForm = args => /*#__PURE__*/
|
|
30
|
+
export const WithForm = args => /*#__PURE__*/_jsx(Basic, {
|
|
31
|
+
...args
|
|
32
|
+
});
|
|
25
33
|
WithForm.args = {
|
|
26
34
|
...Basic.args,
|
|
27
35
|
form: {}
|
|
28
36
|
};
|
|
29
|
-
export const WithSideBanner = args => /*#__PURE__*/
|
|
37
|
+
export const WithSideBanner = args => /*#__PURE__*/_jsx(Basic, {
|
|
38
|
+
...args
|
|
39
|
+
});
|
|
30
40
|
WithSideBanner.args = {
|
|
31
41
|
...Basic.args,
|
|
32
42
|
size: 'xs',
|
|
33
|
-
sideBanner: /*#__PURE__*/
|
|
43
|
+
sideBanner: /*#__PURE__*/_jsx("img", {
|
|
34
44
|
src: image
|
|
35
45
|
}),
|
|
36
46
|
sideBannerContainer: {
|
|
37
47
|
background: 'skyblue'
|
|
38
48
|
}
|
|
39
49
|
};
|
|
40
|
-
export const WithClosingConfirmation = args => /*#__PURE__*/
|
|
50
|
+
export const WithClosingConfirmation = args => /*#__PURE__*/_jsx(Basic, {
|
|
51
|
+
...args
|
|
52
|
+
});
|
|
41
53
|
WithClosingConfirmation.args = {
|
|
42
54
|
...Basic.args,
|
|
43
55
|
closingConfirmation: true
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
// Copyright 1999-2019. Plesk International GmbH. All rights reserved.
|
|
4
3
|
|
|
5
|
-
import
|
|
4
|
+
import { Component, Fragment } from 'react';
|
|
6
5
|
import Button from '../Button';
|
|
6
|
+
import { ButtonContext, getButtonContextValue } from '../Button/ButtonContext';
|
|
7
7
|
import Translate from '../Translate';
|
|
8
8
|
import Progress from '../Progress';
|
|
9
9
|
import ProgressStep, { STATUS_DONE, STATUS_ERROR, STATUS_NOT_STARTED } from '../ProgressStep';
|
|
10
10
|
import { CLS_PREFIX } from '../../constants';
|
|
11
11
|
import { safeInvoke } from '../utils';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return button;
|
|
20
|
-
};
|
|
21
|
-
return Array.isArray(buttons) ? buttons.map(buttonProcessing) : buttonProcessing(buttons);
|
|
22
|
-
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const additionalButtonsConfig = getButtonContextValue({
|
|
15
|
+
defaultProps: {
|
|
16
|
+
size: 'lg'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
23
19
|
class DrawerProgress extends Component {
|
|
24
20
|
constructor() {
|
|
25
21
|
super(...arguments);
|
|
@@ -110,27 +106,41 @@ class DrawerProgress extends Component {
|
|
|
110
106
|
const isFailed = status === STATUS_ERROR;
|
|
111
107
|
const canCancel = cancelable && !(isFinished || isFailed);
|
|
112
108
|
const hasFooter = !!(buttons || canCancel);
|
|
113
|
-
const content = /*#__PURE__*/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
109
|
+
const content = /*#__PURE__*/_jsxs(Fragment, {
|
|
110
|
+
children: [title && /*#__PURE__*/_jsx("div", {
|
|
111
|
+
className: `${baseClassName}__title`,
|
|
112
|
+
children: title
|
|
113
|
+
}), /*#__PURE__*/_jsx(Progress, {
|
|
114
|
+
onStatusChange: this.handleStatusChange,
|
|
115
|
+
className: `${baseClassName}__progress`,
|
|
116
|
+
children: steps.map((step, index) =>
|
|
117
|
+
/*#__PURE__*/
|
|
118
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
119
|
+
_jsx(ProgressStep, {
|
|
120
|
+
...step
|
|
121
|
+
}, index.toString()))
|
|
122
|
+
})]
|
|
123
|
+
});
|
|
124
|
+
const footer = hasFooter ? /*#__PURE__*/_jsxs("div", {
|
|
125
|
+
className: `${baseClassName}__footer`,
|
|
126
|
+
children: [/*#__PURE__*/_jsx(ButtonContext.Provider, {
|
|
127
|
+
value: additionalButtonsConfig,
|
|
128
|
+
children: buttons
|
|
129
|
+
}), canCancel && /*#__PURE__*/_jsx(Button, {
|
|
130
|
+
onClick: this.handleCancel,
|
|
131
|
+
size: "lg",
|
|
132
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
133
|
+
content: "DrawerProgress.cancelButton",
|
|
134
|
+
fallback: "Cancel"
|
|
135
|
+
})
|
|
136
|
+
})]
|
|
137
|
+
}) : null;
|
|
130
138
|
return typeof render === 'function' ? render({
|
|
131
139
|
content,
|
|
132
140
|
footer
|
|
133
|
-
}) : /*#__PURE__*/
|
|
141
|
+
}) : /*#__PURE__*/_jsxs(Fragment, {
|
|
142
|
+
children: [content, footer]
|
|
143
|
+
});
|
|
134
144
|
}
|
|
135
145
|
}
|
|
136
146
|
_defineProperty(DrawerProgress, "defaultProps", {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
4
3
|
|
|
@@ -9,6 +8,8 @@ import classNames from 'classnames';
|
|
|
9
8
|
import { CLS_PREFIX } from '../../constants';
|
|
10
9
|
import Button from '../Button';
|
|
11
10
|
import Icon from '../Icon';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
13
|
export default class Header extends Component {
|
|
13
14
|
componentDidMount() {
|
|
14
15
|
this.isRtl = isRtl();
|
|
@@ -18,11 +19,11 @@ export default class Header extends Component {
|
|
|
18
19
|
baseClassName,
|
|
19
20
|
onClose
|
|
20
21
|
} = this.props;
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
22
23
|
ghost: true,
|
|
23
24
|
className: classNames(`${baseClassName}__button`, `${baseClassName}__button--back`),
|
|
24
25
|
size: "lg",
|
|
25
|
-
icon: /*#__PURE__*/
|
|
26
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
26
27
|
name: "chevron-left",
|
|
27
28
|
flipHorizontal: this.isRtl,
|
|
28
29
|
className: `${baseClassName}__icon`
|
|
@@ -35,11 +36,11 @@ export default class Header extends Component {
|
|
|
35
36
|
baseClassName,
|
|
36
37
|
onClose
|
|
37
38
|
} = this.props;
|
|
38
|
-
return /*#__PURE__*/
|
|
39
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
39
40
|
ghost: true,
|
|
40
41
|
className: classNames(`${baseClassName}__button`, `${baseClassName}__button--hide`),
|
|
41
42
|
size: "lg",
|
|
42
|
-
icon: /*#__PURE__*/
|
|
43
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
43
44
|
className: `${baseClassName}__icon`,
|
|
44
45
|
name: "minimize"
|
|
45
46
|
}),
|
|
@@ -54,11 +55,11 @@ export default class Header extends Component {
|
|
|
54
55
|
baseClassName,
|
|
55
56
|
onClose
|
|
56
57
|
} = this.props;
|
|
57
|
-
return /*#__PURE__*/
|
|
58
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
58
59
|
ghost: true,
|
|
59
60
|
className: classNames(`${baseClassName}__button`, `${baseClassName}__button--close`),
|
|
60
61
|
size: "lg",
|
|
61
|
-
icon: /*#__PURE__*/
|
|
62
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
62
63
|
name: 'cross-mark',
|
|
63
64
|
className: `${baseClassName}__icon`
|
|
64
65
|
}),
|
|
@@ -84,30 +85,38 @@ export default class Header extends Component {
|
|
|
84
85
|
prefix = this.renderBackButton();
|
|
85
86
|
break;
|
|
86
87
|
case hideButton:
|
|
87
|
-
suffix = /*#__PURE__*/
|
|
88
|
-
className: `${baseClassName}__actions
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
suffix = /*#__PURE__*/_jsxs("div", {
|
|
89
|
+
className: `${baseClassName}__actions`,
|
|
90
|
+
children: [this.renderHideButton(), this.renderCloseButton({
|
|
91
|
+
disabled: true
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
92
94
|
break;
|
|
93
95
|
default:
|
|
94
|
-
suffix = /*#__PURE__*/
|
|
95
|
-
className: `${baseClassName}__actions
|
|
96
|
-
|
|
96
|
+
suffix = /*#__PURE__*/_jsx("div", {
|
|
97
|
+
className: `${baseClassName}__actions`,
|
|
98
|
+
children: this.renderCloseButton()
|
|
99
|
+
});
|
|
97
100
|
break;
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
|
-
return /*#__PURE__*/
|
|
101
|
-
className: baseClassName
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
103
|
+
return /*#__PURE__*/_jsx("div", {
|
|
104
|
+
className: baseClassName,
|
|
105
|
+
...props,
|
|
106
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
107
|
+
className: `${baseClassName}__inner`,
|
|
108
|
+
children: [prefix, /*#__PURE__*/_jsxs("div", {
|
|
109
|
+
className: `${baseClassName}__content`,
|
|
110
|
+
children: [children, tabs && /*#__PURE__*/_jsx("div", {
|
|
111
|
+
className: `${baseClassName}__tabs`,
|
|
112
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
113
|
+
className: `${baseClassName}__tabs-inner`,
|
|
114
|
+
children: tabs
|
|
115
|
+
})
|
|
116
|
+
})]
|
|
117
|
+
}), suffix]
|
|
118
|
+
})
|
|
119
|
+
});
|
|
111
120
|
}
|
|
112
121
|
}
|
|
113
122
|
_defineProperty(Header, "propTypes", {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
3
|
import { isRtl } from '../../utils';
|
|
@@ -14,15 +13,19 @@ import Layer from '../Layer';
|
|
|
14
13
|
import { MenuItem, MenuDivider } from '../Menu';
|
|
15
14
|
import Translate from '../Translate';
|
|
16
15
|
import localeFallback from './locale/en-US';
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
19
|
const createTarget = (node, _ref) => {
|
|
18
20
|
let {
|
|
19
21
|
onToggle,
|
|
20
22
|
targetRef
|
|
21
23
|
} = _ref;
|
|
22
24
|
if (false === ( /*#__PURE__*/isValidElement(node) && node.type !== Translate)) {
|
|
23
|
-
node = /*#__PURE__*/
|
|
24
|
-
caret: true
|
|
25
|
-
|
|
25
|
+
node = /*#__PURE__*/_jsx(Button, {
|
|
26
|
+
caret: true,
|
|
27
|
+
children: node
|
|
28
|
+
});
|
|
26
29
|
}
|
|
27
30
|
let isKeyboardEvent = false;
|
|
28
31
|
return /*#__PURE__*/cloneElement(node, {
|
|
@@ -90,18 +93,17 @@ const useEnhancedMenu = (menu, _ref2) => {
|
|
|
90
93
|
children
|
|
91
94
|
} = menu.props;
|
|
92
95
|
if (overlay) {
|
|
93
|
-
children = [...menu.props.children, /*#__PURE__*/
|
|
94
|
-
className: `${baseClassName}__overlay-menu-divider
|
|
95
|
-
|
|
96
|
-
}), /*#__PURE__*/React.createElement(MenuItem, {
|
|
96
|
+
children = [...menu.props.children, /*#__PURE__*/_jsx(MenuDivider, {
|
|
97
|
+
className: `${baseClassName}__overlay-menu-divider`
|
|
98
|
+
}, "divider"), /*#__PURE__*/_jsx(MenuItem, {
|
|
97
99
|
onClick: handleClose,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
})
|
|
100
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
101
|
+
namespace: "Dropdown",
|
|
102
|
+
content: "close",
|
|
103
|
+
translators: locale,
|
|
104
|
+
fallback: localeFallback.close
|
|
105
|
+
})
|
|
106
|
+
}, "close")];
|
|
105
107
|
}
|
|
106
108
|
const clone = /*#__PURE__*/cloneElement(menu, {
|
|
107
109
|
onItemClick: wrapFunction(menu.props.onItemClick, handleClose),
|
|
@@ -138,10 +140,8 @@ const Dropdown = _ref3 => {
|
|
|
138
140
|
const [opened, setOpened] = useState(false);
|
|
139
141
|
const [autoFocus, setAutoFocus] = useState(false);
|
|
140
142
|
const closeTimerRef = useRef();
|
|
141
|
-
useEffect(() => {
|
|
142
|
-
|
|
143
|
-
clearTimeout(closeTimerRef.current);
|
|
144
|
-
};
|
|
143
|
+
useEffect(() => () => {
|
|
144
|
+
clearTimeout(closeTimerRef.current);
|
|
145
145
|
}, []);
|
|
146
146
|
const handleOpen = isKeyboardEvent => {
|
|
147
147
|
setAutoFocus(isKeyboardEvent);
|
|
@@ -167,30 +167,40 @@ const Dropdown = _ref3 => {
|
|
|
167
167
|
onToggle: handleOpen,
|
|
168
168
|
targetRef
|
|
169
169
|
});
|
|
170
|
-
return /*#__PURE__*/
|
|
170
|
+
return /*#__PURE__*/_jsx("div", {
|
|
171
171
|
className: classNames(baseClassName, {
|
|
172
172
|
[`${baseClassName}--opened`]: opened
|
|
173
|
-
}, className)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
173
|
+
}, className),
|
|
174
|
+
...props,
|
|
175
|
+
children: overlay ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
176
|
+
children: [target, opened && /*#__PURE__*/_jsx(Layer, {
|
|
177
|
+
level: Z_INDEX_OVERLAY,
|
|
178
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
179
|
+
className: `${baseClassName}__overlay`,
|
|
180
|
+
children: /*#__PURE__*/_jsx(AutoClosable, {
|
|
181
|
+
onClose: handleClose,
|
|
182
|
+
nodeRef: menuRef,
|
|
183
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
184
|
+
className: `${baseClassName}__overlay-menu`,
|
|
185
|
+
children: enhancedMenu
|
|
186
|
+
})
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
})]
|
|
190
|
+
}) : /*#__PURE__*/_jsx(Popper, {
|
|
191
|
+
target: target,
|
|
192
|
+
targetRef: targetRef,
|
|
193
|
+
placement: computePlacement(menuPlacement),
|
|
194
|
+
show: opened,
|
|
195
|
+
className: `${baseClassName}__popper`,
|
|
196
|
+
zIndex: Z_INDEX_DROPDOWN,
|
|
197
|
+
children: /*#__PURE__*/_jsx(AutoClosable, {
|
|
198
|
+
onClose: handleClose,
|
|
199
|
+
nodeRef: menuRef,
|
|
200
|
+
children: enhancedMenu
|
|
201
|
+
})
|
|
202
|
+
})
|
|
203
|
+
});
|
|
194
204
|
};
|
|
195
205
|
Dropdown.propTypes = {
|
|
196
206
|
/**
|