@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,10 +1,10 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import React from 'react';
|
|
5
3
|
import classNames from 'classnames';
|
|
6
4
|
import ContentLoader from '../ContentLoader';
|
|
7
5
|
import { CLS_PREFIX } from '../../constants';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
/**
|
|
9
9
|
* `ExtendedStatusMessage` component is similar to regular [StatusMessage](#!/StatusMessage)
|
|
10
10
|
* but it is used when the message itself is the primary content on the page.
|
|
@@ -20,20 +20,25 @@ const ExtendedStatusMessage = _ref => {
|
|
|
20
20
|
loading,
|
|
21
21
|
...props
|
|
22
22
|
} = _ref;
|
|
23
|
-
return /*#__PURE__*/
|
|
24
|
-
className: `${baseClassName}__container
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
return /*#__PURE__*/_jsx("div", {
|
|
24
|
+
className: `${baseClassName}__container`,
|
|
25
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
26
|
+
className: classNames(baseClassName, {
|
|
27
|
+
[`${baseClassName}--${intent}`]: intent,
|
|
28
|
+
[`${baseClassName}--loading`]: loading
|
|
29
|
+
}, className),
|
|
30
|
+
...props,
|
|
31
|
+
children: [image ? /*#__PURE__*/_jsx("div", {
|
|
32
|
+
className: `${baseClassName}__image`,
|
|
33
|
+
children: image
|
|
34
|
+
}) : null, /*#__PURE__*/_jsx("div", {
|
|
35
|
+
className: `${baseClassName}__body`,
|
|
36
|
+
children: children
|
|
37
|
+
}), loading && /*#__PURE__*/_jsx(ContentLoader, {
|
|
38
|
+
overlay: true,
|
|
39
|
+
text: loading === true ? null : loading
|
|
40
|
+
})]
|
|
41
|
+
})
|
|
42
|
+
});
|
|
38
43
|
};
|
|
39
44
|
export default ExtendedStatusMessage;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import React from 'react';
|
|
5
3
|
import classNames from 'classnames';
|
|
6
4
|
import { CLS_PREFIX } from '../../constants';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
6
|
/**
|
|
8
7
|
* `ExtendedStatusMessageActions` is a part of [ExtendedStatusMessage](#!/ExtendedStatusMessage) component.
|
|
9
8
|
* @since 0.0.35
|
|
@@ -16,8 +15,10 @@ const ExtendedStatusMessageActions = _ref => {
|
|
|
16
15
|
children,
|
|
17
16
|
...props
|
|
18
17
|
} = _ref;
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
className: classNames(`${baseClassName}__actions`, className)
|
|
21
|
-
|
|
18
|
+
return /*#__PURE__*/_jsx("div", {
|
|
19
|
+
className: classNames(`${baseClassName}__actions`, className),
|
|
20
|
+
...props,
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
22
23
|
};
|
|
23
24
|
export default ExtendedStatusMessageActions;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import React from 'react';
|
|
5
3
|
import classNames from 'classnames';
|
|
6
4
|
import { CLS_PREFIX } from '../../constants';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
6
|
/**
|
|
8
7
|
* `ExtendedStatusMessageDescription` is a part of [ExtendedStatusMessage](#!/ExtendedStatusMessage) component.
|
|
9
8
|
* @since 0.0.35
|
|
@@ -16,8 +15,10 @@ const ExtendedStatusMessageDescription = _ref => {
|
|
|
16
15
|
children,
|
|
17
16
|
...props
|
|
18
17
|
} = _ref;
|
|
19
|
-
return /*#__PURE__*/
|
|
20
|
-
className: classNames(`${baseClassName}__description`, className)
|
|
21
|
-
|
|
18
|
+
return /*#__PURE__*/_jsx("div", {
|
|
19
|
+
className: classNames(`${baseClassName}__description`, className),
|
|
20
|
+
...props,
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
22
23
|
};
|
|
23
24
|
export default ExtendedStatusMessageDescription;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import React from 'react';
|
|
5
3
|
import classNames from 'classnames';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
5
|
/**
|
|
7
6
|
* `ExtendedStatusMessageSeparator` is a part of [ExtendedStatusMessage](#!/ExtendedStatusMessage) component.
|
|
8
7
|
* @since 0.0.35
|
|
@@ -13,8 +12,9 @@ const ExtendedStatusMessageSeparator = _ref => {
|
|
|
13
12
|
className,
|
|
14
13
|
...props
|
|
15
14
|
} = _ref;
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
className: classNames(className)
|
|
18
|
-
|
|
15
|
+
return /*#__PURE__*/_jsx("hr", {
|
|
16
|
+
className: classNames(className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
19
|
};
|
|
20
20
|
export default ExtendedStatusMessageSeparator;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import React from 'react';
|
|
5
3
|
import classNames from 'classnames';
|
|
6
4
|
import { CLS_PREFIX } from '../../constants';
|
|
7
5
|
import Heading from '../Heading';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
7
|
/**
|
|
9
8
|
* `ExtendedStatusMessageTitle` is a part of [ExtendedStatusMessage](#!/ExtendedStatusMessage) component.
|
|
10
9
|
* @since 0.0.35
|
|
@@ -17,9 +16,11 @@ const ExtendedStatusMessageTitle = _ref => {
|
|
|
17
16
|
children,
|
|
18
17
|
...props
|
|
19
18
|
} = _ref;
|
|
20
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/_jsx(Heading, {
|
|
21
20
|
level: 3,
|
|
22
|
-
className: classNames(`${baseClassName}__title`, className)
|
|
23
|
-
|
|
21
|
+
className: classNames(`${baseClassName}__title`, className),
|
|
22
|
+
...props,
|
|
23
|
+
children: children
|
|
24
|
+
});
|
|
24
25
|
};
|
|
25
26
|
export default ExtendedStatusMessageTitle;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
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
|
/**
|
|
9
10
|
* Figure component.
|
|
10
11
|
* @since 0.0.42
|
|
@@ -18,14 +19,17 @@ const Figure = _ref => {
|
|
|
18
19
|
children,
|
|
19
20
|
...props
|
|
20
21
|
} = _ref;
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
-
className: classNames(baseClassName, className)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
return /*#__PURE__*/_jsxs("figure", {
|
|
23
|
+
className: classNames(baseClassName, className),
|
|
24
|
+
...props,
|
|
25
|
+
children: [children, href && /*#__PURE__*/_jsx("a", {
|
|
26
|
+
href: href,
|
|
27
|
+
className: classNames(`${baseClassName}__overlay`, `${baseClassName}__overlay--cover`, `${baseClassName}__action`)
|
|
28
|
+
}), caption && /*#__PURE__*/_jsx("figcaption", {
|
|
29
|
+
className: classNames(`${baseClassName}__overlay`, `${baseClassName}__overlay--bottom`),
|
|
30
|
+
children: caption
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
29
33
|
};
|
|
30
34
|
Figure.propTypes = {
|
|
31
35
|
/**
|
|
@@ -1,9 +1,10 @@
|
|
|
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 { useRef, useMemo, forwardRef } from 'react';
|
|
5
4
|
import { createFocusManager, mergeRefs, wrapFunction } from '../utils';
|
|
6
5
|
import { isFocusable } from '../Overlay/Focuser';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
8
|
const canSkip = node => node instanceof HTMLElement && node.dataset && node.dataset.skipAutoFocus;
|
|
8
9
|
const createFocusStrategy = checkSkipAutoFocusRef => {
|
|
9
10
|
const elements = [];
|
|
@@ -97,17 +98,19 @@ const FocusTrap = (_ref, ref) => {
|
|
|
97
98
|
break;
|
|
98
99
|
}
|
|
99
100
|
});
|
|
100
|
-
return /*#__PURE__*/
|
|
101
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
101
102
|
onFocus: handleFocus,
|
|
102
103
|
ref: mergeRefs(rootRef, ref),
|
|
103
|
-
tabIndex: -1
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
tabIndex: -1,
|
|
105
|
+
...props,
|
|
106
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
107
|
+
tabIndex: 0,
|
|
108
|
+
ref: trapBeforeRef
|
|
109
|
+
}), children, /*#__PURE__*/_jsx("div", {
|
|
110
|
+
tabIndex: 0,
|
|
111
|
+
ref: trapAfterRef
|
|
112
|
+
})]
|
|
113
|
+
});
|
|
111
114
|
};
|
|
112
115
|
FocusTrap.displayName = 'FocusTrap';
|
|
113
116
|
export default /*#__PURE__*/forwardRef(FocusTrap);
|
|
@@ -1,15 +1,13 @@
|
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
import React, { createElement, Component, cloneElement, isValidElement, useRef, forwardRef, useImperativeHandle } from 'react';
|
|
4
|
+
import { Component, cloneElement, isValidElement, useRef, forwardRef, useImperativeHandle } from 'react';
|
|
8
5
|
import { getIn, setIn } from './utils';
|
|
9
6
|
import classNames from 'classnames';
|
|
10
7
|
import Measure from 'react-measure';
|
|
11
8
|
import { CLS_PREFIX } from '../../constants';
|
|
12
9
|
import Button from '../Button';
|
|
10
|
+
import { ButtonContext, getButtonContextValue } from '../Button/ButtonContext';
|
|
13
11
|
import FormField from '../FormField';
|
|
14
12
|
import Section from '../Section';
|
|
15
13
|
import Translate from '../Translate';
|
|
@@ -17,6 +15,13 @@ import FormContext from './FormContext';
|
|
|
17
15
|
import VerticalContext, { VERTICAL_BREAKPOINT } from '../VerticalContext';
|
|
18
16
|
import DisabledContext from './DisabledContext';
|
|
19
17
|
import { safeInvoke } from '../utils';
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
const actionButtonsConfig = getButtonContextValue({
|
|
21
|
+
defaultProps: {
|
|
22
|
+
size: 'lg'
|
|
23
|
+
}
|
|
24
|
+
});
|
|
20
25
|
class Form extends Component {
|
|
21
26
|
constructor() {
|
|
22
27
|
var _this;
|
|
@@ -27,9 +32,7 @@ class Form extends Component {
|
|
|
27
32
|
vertical: this.props.vertical || false,
|
|
28
33
|
requiredFields: [],
|
|
29
34
|
formContext: {
|
|
30
|
-
getValues: () =>
|
|
31
|
-
return this.state.values;
|
|
32
|
-
},
|
|
35
|
+
getValues: () => this.state.values,
|
|
33
36
|
getValue: (name, def) => {
|
|
34
37
|
if (this.state.values) {
|
|
35
38
|
return getIn(this.state.values, name, def);
|
|
@@ -146,37 +149,43 @@ class Form extends Component {
|
|
|
146
149
|
vertical,
|
|
147
150
|
...props
|
|
148
151
|
} = _this.props;
|
|
149
|
-
return /*#__PURE__*/
|
|
150
|
-
value: _this.state.formContext
|
|
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
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
152
|
+
return /*#__PURE__*/_jsx(FormContext.Provider, {
|
|
153
|
+
value: _this.state.formContext,
|
|
154
|
+
children: /*#__PURE__*/_jsx(VerticalContext.Provider, {
|
|
155
|
+
value: _this.state.vertical,
|
|
156
|
+
children: /*#__PURE__*/_jsx(DisabledContext.Provider, {
|
|
157
|
+
value: !!state,
|
|
158
|
+
children: /*#__PURE__*/_jsx(Measure, {
|
|
159
|
+
onResize: _this.handleResize,
|
|
160
|
+
innerRef: innerRef,
|
|
161
|
+
bounds: true,
|
|
162
|
+
children: _ref3 => {
|
|
163
|
+
let {
|
|
164
|
+
measureRef
|
|
165
|
+
} = _ref3;
|
|
166
|
+
return /*#__PURE__*/_jsxs("form", {
|
|
167
|
+
ref: measureRef,
|
|
168
|
+
className: classNames(baseClassName, {
|
|
169
|
+
[`${baseClassName}--has-required`]: _this.hasRequiredField()
|
|
170
|
+
}, className),
|
|
171
|
+
onSubmit: _this.handleSubmit,
|
|
172
|
+
...props,
|
|
173
|
+
children: [children, actionButtons, /*#__PURE__*/_jsx("input", {
|
|
174
|
+
type: "image",
|
|
175
|
+
src: "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",
|
|
176
|
+
style: {
|
|
177
|
+
border: 0,
|
|
178
|
+
height: 0,
|
|
179
|
+
width: 0,
|
|
180
|
+
position: 'absolute'
|
|
181
|
+
}
|
|
182
|
+
})]
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
})
|
|
187
|
+
})
|
|
188
|
+
});
|
|
180
189
|
});
|
|
181
190
|
_defineProperty(this, "renderActionButtons", () => {
|
|
182
191
|
const {
|
|
@@ -188,20 +197,26 @@ class Form extends Component {
|
|
|
188
197
|
baseClassName,
|
|
189
198
|
footerClassName
|
|
190
199
|
} = this.props;
|
|
191
|
-
return /*#__PURE__*/
|
|
192
|
-
className: classNames(`${baseClassName}__footer`, footerClassName)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
200
|
+
return /*#__PURE__*/_jsx(Section, {
|
|
201
|
+
className: classNames(`${baseClassName}__footer`, footerClassName),
|
|
202
|
+
children: /*#__PURE__*/_jsx(FormField, {
|
|
203
|
+
children: /*#__PURE__*/_jsxs(ButtonContext.Provider, {
|
|
204
|
+
value: actionButtonsConfig,
|
|
205
|
+
children: [this.renderSubmitButton({
|
|
206
|
+
submitButton,
|
|
207
|
+
state
|
|
208
|
+
}), this.renderApplyButton({
|
|
209
|
+
applyButton,
|
|
210
|
+
state
|
|
211
|
+
}), this.renderAdditionalButtons({
|
|
212
|
+
additionalButtons
|
|
213
|
+
}), this.renderCancelButton({
|
|
214
|
+
cancelButton,
|
|
215
|
+
state
|
|
216
|
+
})]
|
|
217
|
+
})
|
|
218
|
+
})
|
|
219
|
+
});
|
|
205
220
|
});
|
|
206
221
|
}
|
|
207
222
|
static getDerivedStateFromProps(props, state) {
|
|
@@ -261,19 +276,19 @@ class Form extends Component {
|
|
|
261
276
|
if (!submitButton) {
|
|
262
277
|
return null;
|
|
263
278
|
}
|
|
264
|
-
return /*#__PURE__*/
|
|
265
|
-
size: "lg",
|
|
279
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
266
280
|
intent: "primary",
|
|
267
281
|
state: state === 'submit' ? 'loading' : undefined,
|
|
268
282
|
disabled: !!state,
|
|
269
283
|
onClick: this.handleSubmitClick
|
|
270
284
|
// eslint-disable-next-line react/no-children-prop
|
|
271
285
|
,
|
|
272
|
-
children: /*#__PURE__*/
|
|
286
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
273
287
|
content: "Form.submitButton",
|
|
274
288
|
fallback: "Save"
|
|
275
|
-
})
|
|
276
|
-
|
|
289
|
+
}),
|
|
290
|
+
...(typeof submitButton === 'object' ? submitButton : {})
|
|
291
|
+
});
|
|
277
292
|
}
|
|
278
293
|
renderApplyButton(_ref5) {
|
|
279
294
|
let {
|
|
@@ -283,17 +298,18 @@ class Form extends Component {
|
|
|
283
298
|
if (!applyButton) {
|
|
284
299
|
return null;
|
|
285
300
|
}
|
|
286
|
-
return /*#__PURE__*/
|
|
287
|
-
|
|
288
|
-
intent: 'primary',
|
|
301
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
302
|
+
intent: "primary",
|
|
289
303
|
state: state === 'apply' ? 'loading' : undefined,
|
|
290
304
|
disabled: !!state,
|
|
291
|
-
onClick: this.handleApplyClick
|
|
292
|
-
|
|
305
|
+
onClick: this.handleApplyClick
|
|
306
|
+
// eslint-disable-next-line react/no-children-prop
|
|
307
|
+
,
|
|
308
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
293
309
|
content: "Form.applyButton",
|
|
294
310
|
fallback: "Apply"
|
|
295
311
|
}),
|
|
296
|
-
...applyButton
|
|
312
|
+
...(typeof applyButton === 'object' ? applyButton : {})
|
|
297
313
|
});
|
|
298
314
|
}
|
|
299
315
|
renderCancelButton(_ref6) {
|
|
@@ -304,15 +320,16 @@ class Form extends Component {
|
|
|
304
320
|
if (!cancelButton) {
|
|
305
321
|
return null;
|
|
306
322
|
}
|
|
307
|
-
return /*#__PURE__*/
|
|
308
|
-
size: 'lg',
|
|
323
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
309
324
|
state: state === 'cancel' ? 'loading' : undefined,
|
|
310
|
-
disabled: !!state
|
|
311
|
-
|
|
325
|
+
disabled: !!state
|
|
326
|
+
// eslint-disable-next-line react/no-children-prop
|
|
327
|
+
,
|
|
328
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
312
329
|
content: "Form.cancelButton",
|
|
313
330
|
fallback: "Cancel"
|
|
314
331
|
}),
|
|
315
|
-
...cancelButton
|
|
332
|
+
...(typeof cancelButton === 'object' ? cancelButton : {})
|
|
316
333
|
});
|
|
317
334
|
}
|
|
318
335
|
renderAdditionalButtons(_ref7) {
|
|
@@ -328,9 +345,6 @@ class Form extends Component {
|
|
|
328
345
|
const props = {
|
|
329
346
|
className: classNames(element.props.className, `${baseClassName}__additional-button`)
|
|
330
347
|
};
|
|
331
|
-
if (element.type === Button) {
|
|
332
|
-
props.size = 'lg';
|
|
333
|
-
}
|
|
334
348
|
return /*#__PURE__*/cloneElement(element, props);
|
|
335
349
|
}
|
|
336
350
|
return element;
|
|
@@ -361,7 +375,7 @@ class Form extends Component {
|
|
|
361
375
|
*/
|
|
362
376
|
_defineProperty(Form, "defaultProps", {
|
|
363
377
|
children: undefined,
|
|
364
|
-
requiredMark: /*#__PURE__*/
|
|
378
|
+
requiredMark: /*#__PURE__*/_jsx("span", {
|
|
365
379
|
className: `${CLS_PREFIX}form__required`
|
|
366
380
|
}),
|
|
367
381
|
hideRequiredLegend: false,
|
|
@@ -391,9 +405,10 @@ const RefForwardingForm = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
391
405
|
}));
|
|
392
406
|
}
|
|
393
407
|
}));
|
|
394
|
-
return /*#__PURE__*/
|
|
395
|
-
innerRef: innerRef
|
|
396
|
-
|
|
408
|
+
return /*#__PURE__*/_jsx(Form, {
|
|
409
|
+
innerRef: innerRef,
|
|
410
|
+
...props
|
|
411
|
+
});
|
|
397
412
|
});
|
|
398
413
|
RefForwardingForm.displayName = 'Form';
|
|
399
414
|
export default RefForwardingForm;
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
// Copyright 1999-2020. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import Form from './Form';
|
|
5
4
|
import FormFieldText from '../FormFieldText';
|
|
6
5
|
import FormFieldPassword from '../FormFieldPassword';
|
|
7
6
|
import FormFieldCheckbox from '../FormFieldCheckbox';
|
|
8
|
-
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export const Basic = args => /*#__PURE__*/_jsx(Form, {
|
|
9
|
+
...args
|
|
10
|
+
});
|
|
9
11
|
Basic.args = {
|
|
10
12
|
values: {
|
|
11
13
|
field1: 'Value 1',
|
|
12
14
|
field2: 'Value 2',
|
|
13
15
|
field3: true
|
|
14
16
|
},
|
|
15
|
-
children: [/*#__PURE__*/
|
|
16
|
-
key: "1",
|
|
17
|
+
children: [/*#__PURE__*/_jsx(FormFieldText, {
|
|
17
18
|
label: "Field 1",
|
|
18
19
|
name: "field1"
|
|
19
|
-
}), /*#__PURE__*/
|
|
20
|
-
key: "2",
|
|
20
|
+
}, "1"), /*#__PURE__*/_jsx(FormFieldPassword, {
|
|
21
21
|
label: "Field 2",
|
|
22
22
|
name: "field2"
|
|
23
|
-
}), /*#__PURE__*/
|
|
24
|
-
key: "3",
|
|
23
|
+
}, "2"), /*#__PURE__*/_jsx(FormFieldCheckbox, {
|
|
25
24
|
label: "Field 3",
|
|
26
25
|
name: "field3"
|
|
27
|
-
})]
|
|
26
|
+
}, "3")]
|
|
28
27
|
};
|