@plesk/ui-library 3.31.3 → 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 +30 -24
- package/cjs/components/Button/Button.stories.js +82 -49
- package/cjs/components/Button/ButtonContext.js +2 -3
- 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 -43
- package/cjs/components/Drawer/Drawer.stories.js +24 -16
- package/cjs/components/Drawer/DrawerProgress.js +34 -22
- 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 +80 -68
- 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 +31 -24
- 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/images/default.svg +1 -0
- package/dist/images/filtered.svg +1 -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 +4457 -2604
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +18 -5
- 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 +31 -25
- package/esm/components/Button/Button.stories.js +84 -49
- package/esm/components/Button/ButtonContext.js +2 -2
- 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 -43
- package/esm/components/Drawer/Drawer.stories.js +26 -14
- package/esm/components/Drawer/DrawerProgress.js +35 -22
- 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 +81 -68
- 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 +32 -24
- 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 +21 -20
- package/styleguide/build/bundle.57b0e524.js +2 -0
- package/styleguide/build/{bundle.bab12e1d.js.LICENSE.txt → bundle.57b0e524.js.LICENSE.txt} +12 -3
- package/styleguide/index.html +2 -2
- package/types/src/components/Alert/Alert.stories.d.ts +6 -9
- package/types/src/components/AutoClosable/AutoClosable.d.ts +3 -24
- package/types/src/components/Button/Button.stories.d.ts +7 -6
- package/types/src/components/Button/ButtonContext.d.ts +1 -2
- package/types/src/components/Card/PreviewPanel.d.ts +2 -2
- package/types/src/components/ClosingConfirmation/useClosingConfirmation.d.ts +2 -2
- package/types/src/components/ComboBox/ComboBox.d.ts +2 -2
- package/types/src/components/ComboBoxDropdown/ComboBoxDropdown.d.ts +2 -2
- package/types/src/components/ConsoleOutput/ConsoleOutput.d.ts +2 -2
- package/types/src/components/ContentLoader/IconsLoader.d.ts +2 -2
- package/types/src/components/Cuttable/Cuttable.d.ts +3 -3
- package/types/src/components/Cuttable/Cuttable.stories.d.ts +8 -25
- package/types/src/components/Dialog/Dialog.stories.d.ts +7 -4
- package/types/src/components/Drawer/Drawer.stories.d.ts +9 -6
- 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 +11 -11
- package/types/src/components/Form/Form.stories.d.ts +4 -3
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.stories.d.ts +6 -3
- package/types/src/components/FormFieldPassword/FormFieldPassword.d.ts +3 -3
- 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 +4 -3
- package/types/src/components/Input/Input.d.ts +0 -1
- package/types/src/components/InputFile/InputFile.d.ts +2 -2
- package/types/src/components/ItemLink/ItemLink.stories.d.ts +5 -7
- package/types/src/components/ItemList/ItemList.d.ts +5 -5
- 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/Link/Link.d.ts +2 -2
- package/types/src/components/List/List.stories.d.ts +9 -8
- package/types/src/components/List/ListAction.d.ts +2 -2
- package/types/src/components/List/ListActions.d.ts +2 -2
- package/types/src/components/List/ListActionsDivider.d.ts +4 -4
- package/types/src/components/LocaleProvider/LocaleProvider.d.ts +2 -2
- package/types/src/components/Menu/Menu.stories.d.ts +8 -7
- package/types/src/components/Panel/Panel.d.ts +3 -3
- package/types/src/components/Popover/Popover.stories.d.ts +12 -9
- package/types/src/components/Select/Select.d.ts +0 -1
- package/types/src/components/Select/Select.stories.d.ts +7 -18
- 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/Spot.d.ts +2 -2
- package/types/src/components/Spot/SpotPopup.d.ts +2 -2
- package/types/src/components/Spot/SpotPulsar.d.ts +2 -3
- package/types/src/components/Squeezer/Squeezer.d.ts +2 -2
- package/types/src/components/Status/Status.stories.d.ts +5 -16
- package/types/src/components/Tabs/Tabs.stories.d.ts +6 -3
- package/types/src/components/TextArea/TextArea.d.ts +5 -5
- package/types/src/components/Toast/Toast.d.ts +2 -2
- package/types/src/components/Toaster/Toaster.d.ts +2 -2
- package/types/src/components/Toolbar/ToolbarExpander.d.ts +2 -2
- package/types/src/components/Toolbar/ToolbarItem.d.ts +2 -2
- package/types/src/components/Toolbar/ToolbarMenu.d.ts +2 -2
- package/types/src/components/Tour/Tour.d.ts +2 -2
- package/types/src/components/utils.d.ts +5 -5
- package/types/src/utils.d.ts +0 -1
- package/styleguide/build/bundle.bab12e1d.js +0 -2
- package/types/package.d.ts +0 -135
|
@@ -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,8 +1,7 @@
|
|
|
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 { Component, cloneElement, isValidElement, useRef, forwardRef, useImperativeHandle } from 'react';
|
|
6
5
|
import { getIn, setIn } from './utils';
|
|
7
6
|
import classNames from 'classnames';
|
|
8
7
|
import Measure from 'react-measure';
|
|
@@ -16,6 +15,8 @@ import FormContext from './FormContext';
|
|
|
16
15
|
import VerticalContext, { VERTICAL_BREAKPOINT } from '../VerticalContext';
|
|
17
16
|
import DisabledContext from './DisabledContext';
|
|
18
17
|
import { safeInvoke } from '../utils';
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
20
|
const actionButtonsConfig = getButtonContextValue({
|
|
20
21
|
defaultProps: {
|
|
21
22
|
size: 'lg'
|
|
@@ -31,9 +32,7 @@ class Form extends Component {
|
|
|
31
32
|
vertical: this.props.vertical || false,
|
|
32
33
|
requiredFields: [],
|
|
33
34
|
formContext: {
|
|
34
|
-
getValues: () =>
|
|
35
|
-
return this.state.values;
|
|
36
|
-
},
|
|
35
|
+
getValues: () => this.state.values,
|
|
37
36
|
getValue: (name, def) => {
|
|
38
37
|
if (this.state.values) {
|
|
39
38
|
return getIn(this.state.values, name, def);
|
|
@@ -150,37 +149,43 @@ class Form extends Component {
|
|
|
150
149
|
vertical,
|
|
151
150
|
...props
|
|
152
151
|
} = _this.props;
|
|
153
|
-
return /*#__PURE__*/
|
|
154
|
-
value: _this.state.formContext
|
|
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
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
+
});
|
|
184
189
|
});
|
|
185
190
|
_defineProperty(this, "renderActionButtons", () => {
|
|
186
191
|
const {
|
|
@@ -192,22 +197,26 @@ class Form extends Component {
|
|
|
192
197
|
baseClassName,
|
|
193
198
|
footerClassName
|
|
194
199
|
} = this.props;
|
|
195
|
-
return /*#__PURE__*/
|
|
196
|
-
className: classNames(`${baseClassName}__footer`, footerClassName)
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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
|
+
});
|
|
211
220
|
});
|
|
212
221
|
}
|
|
213
222
|
static getDerivedStateFromProps(props, state) {
|
|
@@ -267,18 +276,19 @@ class Form extends Component {
|
|
|
267
276
|
if (!submitButton) {
|
|
268
277
|
return null;
|
|
269
278
|
}
|
|
270
|
-
return /*#__PURE__*/
|
|
279
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
271
280
|
intent: "primary",
|
|
272
281
|
state: state === 'submit' ? 'loading' : undefined,
|
|
273
282
|
disabled: !!state,
|
|
274
283
|
onClick: this.handleSubmitClick
|
|
275
284
|
// eslint-disable-next-line react/no-children-prop
|
|
276
285
|
,
|
|
277
|
-
children: /*#__PURE__*/
|
|
286
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
278
287
|
content: "Form.submitButton",
|
|
279
288
|
fallback: "Save"
|
|
280
|
-
})
|
|
281
|
-
|
|
289
|
+
}),
|
|
290
|
+
...(typeof submitButton === 'object' ? submitButton : {})
|
|
291
|
+
});
|
|
282
292
|
}
|
|
283
293
|
renderApplyButton(_ref5) {
|
|
284
294
|
let {
|
|
@@ -288,18 +298,19 @@ class Form extends Component {
|
|
|
288
298
|
if (!applyButton) {
|
|
289
299
|
return null;
|
|
290
300
|
}
|
|
291
|
-
return /*#__PURE__*/
|
|
301
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
292
302
|
intent: "primary",
|
|
293
303
|
state: state === 'apply' ? 'loading' : undefined,
|
|
294
304
|
disabled: !!state,
|
|
295
305
|
onClick: this.handleApplyClick
|
|
296
306
|
// eslint-disable-next-line react/no-children-prop
|
|
297
307
|
,
|
|
298
|
-
children: /*#__PURE__*/
|
|
308
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
299
309
|
content: "Form.applyButton",
|
|
300
310
|
fallback: "Apply"
|
|
301
|
-
})
|
|
302
|
-
|
|
311
|
+
}),
|
|
312
|
+
...(typeof applyButton === 'object' ? applyButton : {})
|
|
313
|
+
});
|
|
303
314
|
}
|
|
304
315
|
renderCancelButton(_ref6) {
|
|
305
316
|
let {
|
|
@@ -309,16 +320,17 @@ class Form extends Component {
|
|
|
309
320
|
if (!cancelButton) {
|
|
310
321
|
return null;
|
|
311
322
|
}
|
|
312
|
-
return /*#__PURE__*/
|
|
323
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
313
324
|
state: state === 'cancel' ? 'loading' : undefined,
|
|
314
325
|
disabled: !!state
|
|
315
326
|
// eslint-disable-next-line react/no-children-prop
|
|
316
327
|
,
|
|
317
|
-
children: /*#__PURE__*/
|
|
328
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
318
329
|
content: "Form.cancelButton",
|
|
319
330
|
fallback: "Cancel"
|
|
320
|
-
})
|
|
321
|
-
|
|
331
|
+
}),
|
|
332
|
+
...(typeof cancelButton === 'object' ? cancelButton : {})
|
|
333
|
+
});
|
|
322
334
|
}
|
|
323
335
|
renderAdditionalButtons(_ref7) {
|
|
324
336
|
let {
|
|
@@ -363,7 +375,7 @@ class Form extends Component {
|
|
|
363
375
|
*/
|
|
364
376
|
_defineProperty(Form, "defaultProps", {
|
|
365
377
|
children: undefined,
|
|
366
|
-
requiredMark: /*#__PURE__*/
|
|
378
|
+
requiredMark: /*#__PURE__*/_jsx("span", {
|
|
367
379
|
className: `${CLS_PREFIX}form__required`
|
|
368
380
|
}),
|
|
369
381
|
hideRequiredLegend: false,
|
|
@@ -393,9 +405,10 @@ const RefForwardingForm = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
393
405
|
}));
|
|
394
406
|
}
|
|
395
407
|
}));
|
|
396
|
-
return /*#__PURE__*/
|
|
397
|
-
innerRef: innerRef
|
|
398
|
-
|
|
408
|
+
return /*#__PURE__*/_jsx(Form, {
|
|
409
|
+
innerRef: innerRef,
|
|
410
|
+
...props
|
|
411
|
+
});
|
|
399
412
|
});
|
|
400
413
|
RefForwardingForm.displayName = 'Form';
|
|
401
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
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
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
|
-
/* eslint-disable react/no-deprecated */
|
|
6
|
-
|
|
7
4
|
import React, { Component, useContext } from 'react';
|
|
8
5
|
import { scrollIntoView, safeInvoke } from '../utils';
|
|
9
6
|
import PropTypes from 'prop-types';
|
|
@@ -22,6 +19,8 @@ import FormContext from '../Form/FormContext';
|
|
|
22
19
|
import VerticalContext from '../VerticalContext';
|
|
23
20
|
import ScrollableElementFormContext from '../Form/ScrollableElementFormContext';
|
|
24
21
|
import DisabledContext from '../Form/DisabledContext';
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
24
|
const defaultValue = undefined;
|
|
26
25
|
|
|
27
26
|
/**
|
|
@@ -42,9 +41,7 @@ const getArrayHelper = function (value) {
|
|
|
42
41
|
return result;
|
|
43
42
|
};
|
|
44
43
|
const isControlled = props => props.value !== undefined;
|
|
45
|
-
const isEmpty = value =>
|
|
46
|
-
return !value && value !== 0 || Array.isArray(value) && value.length === 0 || !Array.isArray(value) && typeof value === 'object' && Object.values(value).filter(t => Boolean(t)).length === 0;
|
|
47
|
-
};
|
|
44
|
+
const isEmpty = value => !value && value !== 0 || Array.isArray(value) && value.length === 0 || !Array.isArray(value) && typeof value === 'object' && Object.values(value).filter(t => Boolean(t)).length === 0;
|
|
48
45
|
|
|
49
46
|
/**
|
|
50
47
|
* @since 0.0.54
|
|
@@ -96,7 +93,7 @@ class FormField extends Component {
|
|
|
96
93
|
}
|
|
97
94
|
return null;
|
|
98
95
|
},
|
|
99
|
-
getSeparator: () => /*#__PURE__*/
|
|
96
|
+
getSeparator: () => /*#__PURE__*/_jsx("span", {
|
|
100
97
|
className: `${this.props.baseClassName}__separator`
|
|
101
98
|
}),
|
|
102
99
|
isDisabled: () => this.props.disabled,
|
|
@@ -175,10 +172,10 @@ class FormField extends Component {
|
|
|
175
172
|
if (!multi || value.length < 1 || value.length === 1 && isEmpty(value[0])) {
|
|
176
173
|
return null;
|
|
177
174
|
}
|
|
178
|
-
return /*#__PURE__*/
|
|
175
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
179
176
|
className: `${this.props.baseClassName}__remove`,
|
|
180
177
|
icon: isClearable ? 'clean' : 'cross-mark',
|
|
181
|
-
tooltip: /*#__PURE__*/
|
|
178
|
+
tooltip: /*#__PURE__*/_jsx(Translate, {
|
|
182
179
|
namespace: "FormField",
|
|
183
180
|
content: isClearable ? 'clear' : 'remove',
|
|
184
181
|
fallback: isClearable ? 'Clear' : 'Remove',
|
|
@@ -203,10 +200,11 @@ class FormField extends Component {
|
|
|
203
200
|
if (!description || multi && getArrayHelper(this.fieldApi.getValue()).length - 1 > index) {
|
|
204
201
|
return null;
|
|
205
202
|
}
|
|
206
|
-
return /*#__PURE__*/
|
|
203
|
+
return /*#__PURE__*/_jsx(Hint, {
|
|
207
204
|
component: "div",
|
|
208
|
-
className: `${baseClassName}__description
|
|
209
|
-
|
|
205
|
+
className: `${baseClassName}__description`,
|
|
206
|
+
children: description
|
|
207
|
+
});
|
|
210
208
|
});
|
|
211
209
|
/**
|
|
212
210
|
* Renders one field
|
|
@@ -248,42 +246,48 @@ class FormField extends Component {
|
|
|
248
246
|
}
|
|
249
247
|
let innerField = typeof children === 'function' ? children(fieldApi) : children;
|
|
250
248
|
if (multi) {
|
|
251
|
-
innerField = /*#__PURE__*/
|
|
252
|
-
className: `${baseClassName}__multi
|
|
253
|
-
|
|
249
|
+
innerField = /*#__PURE__*/_jsxs("div", {
|
|
250
|
+
className: `${baseClassName}__multi`,
|
|
251
|
+
children: [innerField, ` `, _this.renderRemoveButton(index)]
|
|
252
|
+
});
|
|
254
253
|
}
|
|
255
|
-
return /*#__PURE__*/
|
|
254
|
+
return /*#__PURE__*/_jsxs(SectionItem, {
|
|
256
255
|
className: classNames(baseClassName, {
|
|
257
256
|
[`${baseClassName}--error`]: hasErrors,
|
|
258
257
|
[`${baseClassName}--vertical-multi`]: multi && vertical
|
|
259
258
|
}, className),
|
|
260
|
-
title: label === null ? null : /*#__PURE__*/
|
|
261
|
-
className: `${baseClassName}__label
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
259
|
+
title: label === null ? null : /*#__PURE__*/_jsxs("div", {
|
|
260
|
+
className: `${baseClassName}__label`,
|
|
261
|
+
children: [/*#__PURE__*/_jsx("label", {
|
|
262
|
+
htmlFor: fieldApi.getId(),
|
|
263
|
+
children: label
|
|
264
|
+
}), fieldApi.getFullDescription(), required ? fieldApi.getRequiredMark() : null]
|
|
265
|
+
}),
|
|
266
|
+
vertical: vertical,
|
|
267
|
+
...props,
|
|
268
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
269
|
+
ref: _this.setTargetRef(index),
|
|
270
|
+
children: innerField
|
|
271
|
+
}), hasErrors && Object.keys(fieldErrors).map(key => /*#__PURE__*/_jsxs("span", {
|
|
272
|
+
className: `${baseClassName}__error`,
|
|
273
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
274
|
+
className: `${baseClassName}__error-icon`,
|
|
275
|
+
name: "exclamation-mark-circle-filled",
|
|
276
|
+
size: "12"
|
|
277
|
+
}), fieldErrors[key]]
|
|
278
|
+
}, key)), _this.renderDescription(index), renderAddMore && /*#__PURE__*/_jsx(Link, {
|
|
279
|
+
role: "button",
|
|
280
|
+
onClick: _this.handleAddMore,
|
|
281
|
+
className: `${baseClassName}__add-more`,
|
|
282
|
+
disabled: disabled,
|
|
283
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
284
|
+
namespace: "FormField",
|
|
285
|
+
content: "addMore",
|
|
286
|
+
fallback: "Add one more",
|
|
287
|
+
translators: locale
|
|
288
|
+
})
|
|
289
|
+
})]
|
|
290
|
+
}, index);
|
|
287
291
|
});
|
|
288
292
|
const {
|
|
289
293
|
value: _value,
|
|
@@ -348,8 +352,8 @@ class FormField extends Component {
|
|
|
348
352
|
if (!this.props.fullDescription) {
|
|
349
353
|
return null;
|
|
350
354
|
}
|
|
351
|
-
return /*#__PURE__*/
|
|
352
|
-
target: /*#__PURE__*/
|
|
355
|
+
return /*#__PURE__*/_jsx(Popover, {
|
|
356
|
+
target: /*#__PURE__*/_jsx(Action, {
|
|
353
357
|
outerProps: {
|
|
354
358
|
className: `${this.props.baseClassName}__full-description`
|
|
355
359
|
},
|
|
@@ -360,8 +364,9 @@ class FormField extends Component {
|
|
|
360
364
|
}
|
|
361
365
|
}),
|
|
362
366
|
placement: "right",
|
|
363
|
-
intent: "info"
|
|
364
|
-
|
|
367
|
+
intent: "info",
|
|
368
|
+
children: this.props.fullDescription
|
|
369
|
+
});
|
|
365
370
|
}
|
|
366
371
|
};
|
|
367
372
|
this.targetRefs = [];
|
|
@@ -567,12 +572,13 @@ const FormFieldWrapper = props => {
|
|
|
567
572
|
const vertical = props.vertical === undefined ? verticalContext : props.vertical;
|
|
568
573
|
const scrollableElement = useContext(ScrollableElementFormContext);
|
|
569
574
|
const disabled = useContext(DisabledContext);
|
|
570
|
-
return /*#__PURE__*/
|
|
575
|
+
return /*#__PURE__*/_jsx(FormField, {
|
|
576
|
+
...props,
|
|
571
577
|
form: form,
|
|
572
578
|
vertical: vertical,
|
|
573
579
|
scrollableElement: scrollableElement,
|
|
574
|
-
disabled: props.disabled
|
|
575
|
-
})
|
|
580
|
+
disabled: props.disabled || disabled
|
|
581
|
+
});
|
|
576
582
|
};
|
|
577
583
|
FormFieldWrapper.displayName = 'FormField';
|
|
578
584
|
FormFieldWrapper.propTypes = propTypes;
|