@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,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;
|
|
@@ -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 React, { Fragment } from 'react';
|
|
@@ -7,6 +6,9 @@ import classNames from 'classnames';
|
|
|
7
6
|
import { CLS_PREFIX } from '../../constants';
|
|
8
7
|
import Checkbox from '../Checkbox';
|
|
9
8
|
import FormField from '../FormField';
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
/**
|
|
11
13
|
* `FormFieldCheckbox` component component is used for turning an option on or off
|
|
12
14
|
* and selecting or deselecting an item.
|
|
@@ -24,36 +26,43 @@ const FormFieldCheckbox = _ref => {
|
|
|
24
26
|
multi,
|
|
25
27
|
...props
|
|
26
28
|
} = _ref;
|
|
27
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/_jsx(FormField, {
|
|
28
30
|
className: classNames(baseClassName, className),
|
|
29
31
|
label: null,
|
|
30
|
-
required: required
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
32
|
+
required: required,
|
|
33
|
+
...props,
|
|
34
|
+
children: _ref2 => {
|
|
35
|
+
let {
|
|
36
|
+
getId,
|
|
37
|
+
getName,
|
|
38
|
+
getValue,
|
|
39
|
+
setValue,
|
|
40
|
+
getRequiredMark,
|
|
41
|
+
getFullDescription,
|
|
42
|
+
isDisabled
|
|
43
|
+
} = _ref2;
|
|
44
|
+
return /*#__PURE__*/_jsxs(Fragment, {
|
|
45
|
+
children: [/*#__PURE__*/_jsx("input", {
|
|
46
|
+
type: "hidden",
|
|
47
|
+
name: getName(),
|
|
48
|
+
value: uncheckedValue
|
|
49
|
+
}), /*#__PURE__*/_jsx(Checkbox, {
|
|
50
|
+
checked: getValue() === checkedValue,
|
|
51
|
+
onChange: checked => setValue(checked ? checkedValue : uncheckedValue),
|
|
52
|
+
inputProps: {
|
|
53
|
+
id: getId(),
|
|
54
|
+
name: getName(),
|
|
55
|
+
value: checkedValue,
|
|
56
|
+
autoFocus
|
|
57
|
+
},
|
|
58
|
+
disabled: isDisabled(),
|
|
59
|
+
rightAddon: /*#__PURE__*/_jsxs(_Fragment, {
|
|
60
|
+
children: [getFullDescription(), required ? getRequiredMark() : null]
|
|
61
|
+
}),
|
|
62
|
+
children: label
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
57
66
|
});
|
|
58
67
|
};
|
|
59
68
|
FormFieldCheckbox.propTypes = {
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
// Copyright 1999-2021. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import Form from '../Form';
|
|
5
4
|
import FormFieldCheckbox from './FormFieldCheckbox';
|
|
6
|
-
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const Basic = args => /*#__PURE__*/_jsx(Form, {
|
|
7
|
+
children: /*#__PURE__*/_jsx(FormFieldCheckbox, {
|
|
8
|
+
...args
|
|
9
|
+
})
|
|
10
|
+
});
|
|
7
11
|
Basic.args = {
|
|
8
12
|
name: 'name',
|
|
9
13
|
label: 'Lorem ipsum dolor sit amet.'
|
|
10
14
|
};
|
|
11
|
-
export const WithFullDescription = args => /*#__PURE__*/
|
|
15
|
+
export const WithFullDescription = args => /*#__PURE__*/_jsx(Basic, {
|
|
16
|
+
...args
|
|
17
|
+
});
|
|
12
18
|
WithFullDescription.args = {
|
|
13
19
|
...Basic.args,
|
|
14
20
|
label: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac justo sed neque interdum varius. Aenean sollicitudin placerat orci, quis viverra libero mattis a. Morbi ac erat sed elit ullamcorper laoreet sed eget tortor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.',
|
|
@@ -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-2022. Plesk International GmbH. All rights reserved.
|
|
4
3
|
|
|
5
|
-
import
|
|
4
|
+
import { Component, Fragment, createRef } from 'react';
|
|
6
5
|
import classNames from 'classnames';
|
|
7
6
|
import { CLS_PREFIX } from '../../constants';
|
|
8
7
|
import Button from '../Button';
|
|
@@ -12,6 +11,8 @@ import Translate from '../Translate';
|
|
|
12
11
|
import PasswordMeter from './PasswordMeter';
|
|
13
12
|
import generatePassword from './generatePassword';
|
|
14
13
|
import locale from './locale/en-US';
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
16
|
/**
|
|
16
17
|
* `FormFieldPassword` component provides secure way to enter a password.
|
|
17
18
|
* @since 0.0.58
|
|
@@ -53,12 +54,12 @@ class FormFieldPassword extends Component {
|
|
|
53
54
|
const generateButtonProps = {
|
|
54
55
|
className: `${baseClassName}__button--generate`,
|
|
55
56
|
onClick: () => setValue(generatePassword()),
|
|
56
|
-
tooltip: /*#__PURE__*/
|
|
57
|
+
tooltip: /*#__PURE__*/_jsx(Translate, {
|
|
57
58
|
content: "FormFieldPassword.generateButtonHint",
|
|
58
59
|
fallback: locale.generateButtonHint
|
|
59
60
|
}),
|
|
60
61
|
disabled: isDisabled(),
|
|
61
|
-
children: /*#__PURE__*/
|
|
62
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
62
63
|
content: "FormFieldPassword.generateButton",
|
|
63
64
|
fallback: locale.generateButton
|
|
64
65
|
})
|
|
@@ -67,9 +68,13 @@ class FormFieldPassword extends Component {
|
|
|
67
68
|
if (typeof generateButton === 'function') {
|
|
68
69
|
button = generateButton(generateButtonProps);
|
|
69
70
|
} else {
|
|
70
|
-
button = /*#__PURE__*/
|
|
71
|
+
button = /*#__PURE__*/_jsx(Button, {
|
|
72
|
+
...generateButtonProps
|
|
73
|
+
});
|
|
71
74
|
}
|
|
72
|
-
return /*#__PURE__*/
|
|
75
|
+
return /*#__PURE__*/_jsxs(Fragment, {
|
|
76
|
+
children: [` `, button]
|
|
77
|
+
});
|
|
73
78
|
}
|
|
74
79
|
render() {
|
|
75
80
|
const {
|
|
@@ -89,65 +94,71 @@ class FormFieldPassword extends Component {
|
|
|
89
94
|
visible,
|
|
90
95
|
passwordMeterVisible
|
|
91
96
|
} = this.state;
|
|
92
|
-
return /*#__PURE__*/
|
|
93
|
-
className: classNames(baseClassName, className)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
97
|
+
return /*#__PURE__*/_jsx(FormField, {
|
|
98
|
+
className: classNames(baseClassName, className),
|
|
99
|
+
...props,
|
|
100
|
+
children: _ref3 => {
|
|
101
|
+
let {
|
|
102
|
+
getId,
|
|
103
|
+
getName,
|
|
104
|
+
getValue,
|
|
105
|
+
setValue,
|
|
106
|
+
isDisabled
|
|
107
|
+
} = _ref3;
|
|
108
|
+
const value = getValue('');
|
|
109
|
+
const input = /*#__PURE__*/_jsx(Input, {
|
|
110
|
+
id: getId(),
|
|
111
|
+
name: getName(),
|
|
112
|
+
type: visible ? 'text' : 'password',
|
|
113
|
+
value: value,
|
|
114
|
+
onChange: e => {
|
|
115
|
+
setValue(e.target.value);
|
|
116
|
+
this.setState({
|
|
117
|
+
passwordMeterVisible: true
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
onBlur: this.handleBlur,
|
|
121
|
+
autoFocus: autoFocus,
|
|
122
|
+
autoComplete: autoComplete,
|
|
123
|
+
className: `${baseClassName}__input`,
|
|
124
|
+
size: size,
|
|
125
|
+
suffix: hideShowButton ? null : /*#__PURE__*/_jsx(Button, {
|
|
126
|
+
className: `${baseClassName}__button--show`,
|
|
127
|
+
onClick: this.handleToggleClick,
|
|
128
|
+
icon: visible ? 'visible' : 'invisible',
|
|
129
|
+
tooltip: visible ? /*#__PURE__*/_jsx(Translate, {
|
|
130
|
+
content: "FormFieldPassword.hidePassword",
|
|
131
|
+
fallback: locale.hidePassword
|
|
132
|
+
}) : /*#__PURE__*/_jsx(Translate, {
|
|
133
|
+
content: "FormFieldPassword.showPassword",
|
|
134
|
+
fallback: locale.showPassword
|
|
135
|
+
}),
|
|
136
|
+
ghost: true,
|
|
137
|
+
disabled: isDisabled()
|
|
129
138
|
}),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
139
|
+
disabled: isDisabled(),
|
|
140
|
+
rootProps: {
|
|
141
|
+
ref: this.targetRef
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
145
|
+
className: classNames(`${baseClassName}__control`, `${baseClassName}__control--${size}`),
|
|
146
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
147
|
+
className: classNames(`${baseClassName}__field`, `${baseClassName}__field--${size}`),
|
|
148
|
+
children: hidePasswordMeter ? input : /*#__PURE__*/_jsx(PasswordMeter, {
|
|
149
|
+
value: value,
|
|
150
|
+
targetRef: this.targetRef,
|
|
151
|
+
visible: passwordMeterVisible && value !== '',
|
|
152
|
+
onClose: this.handleClosePasswordMeter,
|
|
153
|
+
...passwordMeterProps,
|
|
154
|
+
children: input
|
|
155
|
+
})
|
|
156
|
+
}), hideGenerateButton ? null : this.renderGenerateButton({
|
|
157
|
+
setValue,
|
|
158
|
+
isDisabled
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
}
|
|
151
162
|
});
|
|
152
163
|
}
|
|
153
164
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
// Copyright 1999-2022. Plesk International GmbH. All rights reserved.
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
5
4
|
import Popover from '../Popover';
|
|
6
5
|
import Translate from '../Translate';
|
|
7
6
|
import estimatePassword, { DEFAULT_RULES } from './estimatePassword';
|
|
8
7
|
import locale from './locale/en-US';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
11
|
const strengthIntents = {
|
|
10
12
|
VeryWeak: 'danger',
|
|
11
13
|
Weak: 'danger',
|
|
@@ -30,31 +32,42 @@ const PasswordMeter = _ref => {
|
|
|
30
32
|
setResult(result);
|
|
31
33
|
});
|
|
32
34
|
}, [visible, value, onEstimate]);
|
|
33
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/_jsxs(Popover, {
|
|
34
36
|
visible: visible && result !== null,
|
|
35
37
|
target: children,
|
|
36
38
|
placement: "bottom-right",
|
|
37
39
|
intent: result ? strengthIntents[result.strength] : undefined,
|
|
38
40
|
canCloseOnOutsideClick: false,
|
|
39
|
-
canCloseOnEscapePress: false
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
canCloseOnEscapePress: false,
|
|
42
|
+
...props,
|
|
43
|
+
children: [result?.strength ? /*#__PURE__*/_jsx(Translate, {
|
|
44
|
+
component: "div",
|
|
45
|
+
content: "FormFieldPassword.passwordStrength",
|
|
46
|
+
fallback: locale.passwordStrength,
|
|
47
|
+
params: {
|
|
48
|
+
strength: /*#__PURE__*/_jsx("b", {
|
|
49
|
+
children: /*#__PURE__*/_jsx(Translate, {
|
|
50
|
+
content: `FormFieldPassword.strength${result?.strength}`,
|
|
51
|
+
fallback: locale[`strength${result?.strength}`]
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
}) : null, result?.suggestions.length ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
56
|
+
children: [/*#__PURE__*/_jsx(Translate, {
|
|
57
|
+
content: "FormFieldPassword.improvePassword",
|
|
58
|
+
fallback: locale.improvePassword
|
|
59
|
+
}), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx("ul", {
|
|
60
|
+
children: result.suggestions.slice(0, 3).map((suggestion, index) =>
|
|
61
|
+
/*#__PURE__*/
|
|
62
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
63
|
+
_jsx("li", {
|
|
64
|
+
children: suggestion
|
|
65
|
+
}, index.toString()))
|
|
66
|
+
})]
|
|
67
|
+
}) : /*#__PURE__*/_jsx(Translate, {
|
|
68
|
+
content: "FormFieldPassword.yourPasswordIsStrong",
|
|
69
|
+
fallback: locale.yourPasswordIsStrong
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
59
72
|
};
|
|
60
73
|
export default PasswordMeter;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Copyright 1999-2022. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import Translate from '../Translate';
|
|
5
4
|
import locale from './locale/en-US';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const EXCLUSIONS = {
|
|
7
7
|
numbers1: 'numbers3',
|
|
8
8
|
specialChar1: 'specialChar2',
|
|
@@ -11,7 +11,7 @@ const EXCLUSIONS = {
|
|
|
11
11
|
};
|
|
12
12
|
export const DEFAULT_RULES = [{
|
|
13
13
|
name: 'passwordTooShort',
|
|
14
|
-
suggestion: /*#__PURE__*/
|
|
14
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
15
15
|
content: `FormFieldPassword.passwordTooShort`,
|
|
16
16
|
fallback: locale.passwordTooShort
|
|
17
17
|
}),
|
|
@@ -34,7 +34,7 @@ export const DEFAULT_RULES = [{
|
|
|
34
34
|
}
|
|
35
35
|
}, {
|
|
36
36
|
name: 'lettersLowerCase',
|
|
37
|
-
suggestion: /*#__PURE__*/
|
|
37
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
38
38
|
content: `FormFieldPassword.lettersLowerCase`,
|
|
39
39
|
fallback: locale.lettersLowerCase
|
|
40
40
|
}),
|
|
@@ -44,7 +44,7 @@ export const DEFAULT_RULES = [{
|
|
|
44
44
|
}
|
|
45
45
|
}, {
|
|
46
46
|
name: 'lettersUpperCase',
|
|
47
|
-
suggestion: /*#__PURE__*/
|
|
47
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
48
48
|
content: `FormFieldPassword.lettersUpperCase`,
|
|
49
49
|
fallback: locale.lettersUpperCase
|
|
50
50
|
}),
|
|
@@ -54,7 +54,7 @@ export const DEFAULT_RULES = [{
|
|
|
54
54
|
}
|
|
55
55
|
}, {
|
|
56
56
|
name: 'numbers1',
|
|
57
|
-
suggestion: /*#__PURE__*/
|
|
57
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
58
58
|
content: `FormFieldPassword.numbers1`,
|
|
59
59
|
fallback: locale.numbers1
|
|
60
60
|
}),
|
|
@@ -64,7 +64,7 @@ export const DEFAULT_RULES = [{
|
|
|
64
64
|
}
|
|
65
65
|
}, {
|
|
66
66
|
name: 'numbers3',
|
|
67
|
-
suggestion: /*#__PURE__*/
|
|
67
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
68
68
|
content: `FormFieldPassword.numbers3`,
|
|
69
69
|
fallback: locale.numbers3
|
|
70
70
|
}),
|
|
@@ -74,7 +74,7 @@ export const DEFAULT_RULES = [{
|
|
|
74
74
|
}
|
|
75
75
|
}, {
|
|
76
76
|
name: 'specialChar1',
|
|
77
|
-
suggestion: /*#__PURE__*/
|
|
77
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
78
78
|
content: `FormFieldPassword.specialChar1`,
|
|
79
79
|
fallback: locale.specialChar1
|
|
80
80
|
}),
|
|
@@ -84,7 +84,7 @@ export const DEFAULT_RULES = [{
|
|
|
84
84
|
}
|
|
85
85
|
}, {
|
|
86
86
|
name: 'specialChar2',
|
|
87
|
-
suggestion: /*#__PURE__*/
|
|
87
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
88
88
|
content: `FormFieldPassword.specialChar2`,
|
|
89
89
|
fallback: locale.specialChar2
|
|
90
90
|
}),
|
|
@@ -94,7 +94,7 @@ export const DEFAULT_RULES = [{
|
|
|
94
94
|
}
|
|
95
95
|
}, {
|
|
96
96
|
name: 'comboUpperAndLower',
|
|
97
|
-
suggestion: /*#__PURE__*/
|
|
97
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
98
98
|
content: `FormFieldPassword.comboUpperAndLower`,
|
|
99
99
|
fallback: locale.comboUpperAndLower
|
|
100
100
|
}),
|
|
@@ -104,7 +104,7 @@ export const DEFAULT_RULES = [{
|
|
|
104
104
|
}
|
|
105
105
|
}, {
|
|
106
106
|
name: 'comboLettersAndNumbers',
|
|
107
|
-
suggestion: /*#__PURE__*/
|
|
107
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
108
108
|
content: `FormFieldPassword.comboLettersAndNumbers`,
|
|
109
109
|
fallback: locale.comboLettersAndNumbers
|
|
110
110
|
}),
|
|
@@ -114,7 +114,7 @@ export const DEFAULT_RULES = [{
|
|
|
114
114
|
}
|
|
115
115
|
}, {
|
|
116
116
|
name: 'comboLettersNumbersSpecial',
|
|
117
|
-
suggestion: /*#__PURE__*/
|
|
117
|
+
suggestion: /*#__PURE__*/_jsx(Translate, {
|
|
118
118
|
content: `FormFieldPassword.comboLettersNumbersSpecial`,
|
|
119
119
|
fallback: locale.comboLettersNumbersSpecial
|
|
120
120
|
}),
|