@plesk/ui-library 3.35.1 → 3.35.3
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 +1 -2
- package/cjs/components/Alert/Alert.js +1 -2
- package/cjs/components/AutoClosable/AutoClosable.js +1 -2
- package/cjs/components/AuxiliaryActions/AuxiliaryActions.js +1 -2
- package/cjs/components/Badge/Badge.js +1 -2
- package/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -2
- package/cjs/components/Button/Button.js +2 -4
- package/cjs/components/Button/ButtonContext.js +2 -4
- package/cjs/components/ButtonGroup/ButtonGroup.js +1 -2
- package/cjs/components/Card/Card.js +1 -2
- package/cjs/components/Card/CardButton.js +1 -2
- package/cjs/components/Card/PreviewPanel.js +1 -2
- package/cjs/components/CardList/CardList.js +5 -10
- package/cjs/components/CardList/CardListToolbar.js +1 -2
- package/cjs/components/Carousel/Carousel.js +26 -41
- package/cjs/components/Checkbox/Checkbox.js +1 -2
- package/cjs/components/ClosingConfirmation/locale/en-US.js +2 -3
- package/cjs/components/ClosingConfirmation/useClosingConfirmation.js +1 -2
- package/cjs/components/CodeEditor/CodeEditor.js +1 -2
- package/cjs/components/Columns/Column.js +1 -2
- package/cjs/components/Columns/Columns.js +1 -2
- package/cjs/components/ComboBox/ComboBox.js +1 -2
- package/cjs/components/ComboBox/ComboBoxOption.js +1 -2
- package/cjs/components/ComboBoxDropdown/ComboBoxDropdown.js +1 -2
- package/cjs/components/ConsoleOutput/ConsoleOutput.js +1 -2
- package/cjs/components/ContentLoader/ContentLoader.js +1 -2
- package/cjs/components/ContentLoader/IconsLoader.js +1 -2
- package/cjs/components/Cuttable/Cuttable.js +1 -2
- package/cjs/components/Dialog/Dialog.js +1 -2
- package/cjs/components/DistractionFreeModeContext/DistractionFreeModeContext.js +1 -2
- package/cjs/components/Drawer/Drawer.js +1 -2
- package/cjs/components/Drawer/DrawerProgress.js +1 -2
- package/cjs/components/Drawer/Header.js +70 -108
- package/cjs/components/Dropdown/Dropdown.js +1 -2
- package/cjs/components/Dropdown/locale/en-US.js +2 -3
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessage.js +1 -2
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +1 -2
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +1 -2
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +1 -2
- package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +1 -2
- package/cjs/components/Figure/Figure.js +1 -2
- package/cjs/components/FocusTrap/FocusTrap.js +1 -2
- package/cjs/components/Form/DisabledContext.js +1 -2
- package/cjs/components/Form/Form.js +6 -9
- package/cjs/components/Form/FormContext.js +1 -2
- package/cjs/components/Form/ScrollableElementFormContext.js +1 -2
- package/cjs/components/FormField/FormField.js +4 -4
- package/cjs/components/FormField/index.js +9 -2
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +9 -69
- package/cjs/components/FormFieldPassword/FormFieldPassword.js +1 -2
- package/cjs/components/FormFieldPassword/PasswordMeter.js +2 -3
- package/cjs/components/FormFieldPassword/estimatePassword.js +3 -5
- package/cjs/components/FormFieldPassword/generatePassword.js +1 -2
- package/cjs/components/FormFieldPassword/locale/en-US.js +2 -3
- package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +65 -134
- package/cjs/components/FormFieldSelect/FormFieldSelect.js +1 -2
- package/cjs/components/FormFieldText/FormFieldText.js +56 -143
- package/cjs/components/Grid/Grid.js +10 -73
- package/cjs/components/GridCol/GridCol.js +4 -56
- package/cjs/components/Heading/Heading.js +1 -2
- package/cjs/components/Hint/Hint.js +1 -2
- package/cjs/components/Icon/Icon.js +10 -20
- package/cjs/components/Icon/constants.js +2 -4
- package/cjs/components/Icon/images/symbols.svg +39 -1
- package/cjs/components/Icon/oldIconNames.js +1 -2
- package/cjs/components/InPlaceEdit/InPlaceEdit.js +7 -29
- package/cjs/components/InPlaceEdit/locale/en-US.js +2 -3
- package/cjs/components/Input/Input.js +1 -2
- package/cjs/components/InputFile/InputFile.js +1 -2
- package/cjs/components/InputFile/locale/en-US.js +2 -3
- package/cjs/components/InputNumber/InputNumber.js +1 -2
- package/cjs/components/Item/Item.js +1 -2
- package/cjs/components/ItemLink/ItemLink.js +1 -2
- package/cjs/components/ItemList/ItemList.js +1 -2
- package/cjs/components/Label/Label.js +1 -2
- package/cjs/components/Layer/Layer.js +2 -4
- package/cjs/components/Layout/Layout.js +32 -123
- package/cjs/components/Link/Link.js +2 -4
- package/cjs/components/List/List.js +13 -10
- package/cjs/components/List/ListAction.js +1 -2
- package/cjs/components/List/ListActions.js +1 -2
- package/cjs/components/List/ListActionsDivider.js +1 -2
- package/cjs/components/List/ListEmptyView.js +1 -2
- package/cjs/components/List/ListOperation.js +2 -3
- package/cjs/components/List/ListOperationContext.js +1 -2
- package/cjs/components/LocaleProvider/LocaleProvider.js +1 -2
- package/cjs/components/Markdown/Markdown.js +1 -2
- package/cjs/components/Media/Media.js +5 -76
- package/cjs/components/Media/MediaSection.js +4 -26
- package/cjs/components/Menu/Menu.js +6 -58
- package/cjs/components/Menu/MenuBaseItem.js +5 -45
- package/cjs/components/Menu/MenuDivider.js +4 -20
- package/cjs/components/Menu/MenuHeader.js +4 -26
- package/cjs/components/Menu/MenuItem.js +7 -65
- package/cjs/components/Menu/MenuSelectableItem.js +5 -33
- package/cjs/components/OnDarkContext/OnDarkContext.js +1 -2
- package/cjs/components/Overlay/Overlay.js +1 -2
- package/cjs/components/PageHeader/PageHeader.js +1 -2
- package/cjs/components/Pagination/Pagination.js +2 -4
- package/cjs/components/Panel/Panel.js +1 -2
- package/cjs/components/Paragraph/Paragraph.js +1 -2
- package/cjs/components/Plaintext/Plaintext.js +3 -25
- package/cjs/components/Popover/Popover.js +22 -118
- package/cjs/components/Popper/Popper.js +1 -2
- package/cjs/components/Progress/Progress.js +1 -2
- package/cjs/components/ProgressBar/ProgressBar.js +1 -2
- package/cjs/components/ProgressBar/ProgressIndicator.js +1 -2
- package/cjs/components/ProgressDialog/ProgressDialog.js +13 -87
- package/cjs/components/ProgressDialogStep/ProgressDialogStep.js +1 -2
- package/cjs/components/ProgressStep/ProgressStep.js +7 -14
- package/cjs/components/Radio/Radio.js +1 -2
- package/cjs/components/Rating/Rating.js +6 -38
- package/cjs/components/ResponsiveContext/ResponsiveContext.js +1 -2
- package/cjs/components/Section/Section.js +30 -100
- package/cjs/components/Section/SectionItem.js +7 -46
- package/cjs/components/Section/index.js +16 -3
- package/cjs/components/SegmentedControl/SegmentedControl.js +1 -2
- package/cjs/components/Select/MultiValue.js +1 -2
- package/cjs/components/Select/Select.js +1 -2
- package/cjs/components/Select/SelectControl.js +1 -2
- package/cjs/components/Select/SelectOption.js +1 -2
- package/cjs/components/Select/SelectOptionGroup.js +1 -2
- package/cjs/components/Skeleton/Skeleton.js +1 -2
- package/cjs/components/Skeleton/SkeletonTabs.js +1 -2
- package/cjs/components/Skeleton/SkeletonText.js +1 -2
- package/cjs/components/Skeleton/index.js +2 -2
- package/cjs/components/Spinner/Spinner.js +1 -2
- package/cjs/components/SplitButton/SplitButton.js +2 -4
- package/cjs/components/Spot/Spot.js +1 -2
- package/cjs/components/Spot/SpotPopup.js +1 -2
- package/cjs/components/Spot/SpotPulsar.js +1 -2
- package/cjs/components/Squeezer/Squeezer.js +1 -2
- package/cjs/components/Status/Status.js +1 -2
- package/cjs/components/StatusMessage/StatusMessage.js +1 -2
- package/cjs/components/Subnav/Subnav.js +11 -58
- package/cjs/components/Subnav/index.js +6 -12
- package/cjs/components/Switch/Switch.js +1 -2
- package/cjs/components/SwitchesPanel/SwitchesPanel.js +4 -28
- package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +4 -59
- package/cjs/components/Tabs/SearchBar.js +1 -2
- package/cjs/components/Tabs/Tab.js +1 -2
- package/cjs/components/Tabs/Tabs.js +1 -2
- package/cjs/components/Text/Text.js +1 -2
- package/cjs/components/TextArea/TextArea.js +1 -2
- package/cjs/components/Toaster/Toaster.js +3 -3
- package/cjs/components/Toolbar/RegistryContext.js +1 -2
- package/cjs/components/Toolbar/Toolbar.js +6 -21
- package/cjs/components/Toolbar/ToolbarExpander.js +1 -2
- package/cjs/components/Toolbar/ToolbarGroup.js +21 -53
- package/cjs/components/Toolbar/ToolbarMenu.js +2 -3
- package/cjs/components/Tooltip/Tooltip.js +1 -2
- package/cjs/components/Tour/Tour.js +1 -2
- package/cjs/components/Translate/Translate.js +1 -2
- package/cjs/components/VerticalContext/VerticalContext.js +2 -4
- package/cjs/components/index.js +77 -66
- package/cjs/components/intentIconMap.js +2 -3
- package/cjs/index.js +1 -2
- package/cjs/publicPath.js +1 -2
- package/cjs/utils/types/DataAttributes.js +5 -0
- package/dist/images/symbols.svg +39 -1
- 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 +1029 -2455
- package/dist/plesk-ui-library.js.map +1 -1
- package/dist/plesk-ui-library.min.js +5 -5
- package/dist/plesk-ui-library.min.js.map +1 -1
- package/esm/components/Button/Button.js +1 -2
- package/esm/components/Carousel/Carousel.js +25 -37
- package/esm/components/Drawer/Header.js +70 -107
- package/esm/components/Form/Form.js +5 -7
- package/esm/components/FormField/FormField.js +4 -2
- package/esm/components/FormField/index.js +2 -1
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +8 -65
- package/esm/components/FormFieldPassword/PasswordMeter.js +1 -1
- package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +64 -132
- package/esm/components/FormFieldText/FormFieldText.js +55 -140
- package/esm/components/Grid/Grid.js +9 -69
- package/esm/components/GridCol/GridCol.js +2 -55
- package/esm/components/Icon/constants.js +2 -2
- package/esm/components/Icon/images/symbols.svg +39 -1
- package/esm/components/InPlaceEdit/InPlaceEdit.js +6 -25
- package/esm/components/Layout/Layout.js +32 -121
- package/esm/components/Link/Link.js +1 -2
- package/esm/components/List/List.js +12 -8
- package/esm/components/List/ListOperation.js +1 -1
- package/esm/components/Media/Media.js +4 -74
- package/esm/components/Media/MediaSection.js +2 -25
- package/esm/components/Menu/Menu.js +5 -54
- package/esm/components/Menu/MenuBaseItem.js +4 -45
- package/esm/components/Menu/MenuDivider.js +2 -19
- package/esm/components/Menu/MenuHeader.js +2 -25
- package/esm/components/Menu/MenuItem.js +5 -62
- package/esm/components/Menu/MenuSelectableItem.js +3 -32
- package/esm/components/Plaintext/Plaintext.js +2 -23
- package/esm/components/Popover/Popover.js +21 -114
- package/esm/components/ProgressDialog/ProgressDialog.js +12 -83
- package/esm/components/Rating/Rating.js +5 -36
- package/esm/components/Section/Section.js +28 -97
- package/esm/components/Section/SectionItem.js +5 -41
- package/esm/components/Section/index.js +2 -1
- package/esm/components/Skeleton/index.js +2 -2
- package/esm/components/SplitButton/SplitButton.js +1 -2
- package/esm/components/Subnav/Subnav.js +10 -54
- package/esm/components/Subnav/index.js +1 -2
- package/esm/components/SwitchesPanel/SwitchesPanel.js +3 -24
- package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -55
- package/esm/components/Toaster/Toaster.js +3 -1
- package/esm/components/Toolbar/Toolbar.js +7 -21
- package/esm/components/Toolbar/ToolbarGroup.js +17 -50
- package/esm/components/Toolbar/ToolbarMenu.js +1 -1
- package/esm/components/index.js +6 -12
- package/esm/index.js +1 -1
- package/esm/utils/types/DataAttributes.js +1 -0
- package/package.json +24 -25
- package/styleguide/build/bundle.8058bbce.js +2 -0
- package/styleguide/images/symbols.svg +39 -1
- package/styleguide/index.html +2 -2
- package/types/src/components/AutoClosable/AutoClosable.d.ts +23 -2
- package/types/src/components/Button/Button.d.ts +3 -7
- package/types/src/components/Carousel/Carousel.d.ts +58 -0
- package/types/src/components/Carousel/index.d.ts +2 -0
- package/types/src/components/Columns/Column.d.ts +2 -2
- package/types/src/components/Columns/Columns.d.ts +2 -2
- package/types/src/components/Columns/index.d.ts +2 -0
- package/types/src/components/Dialog/Dialog.d.ts +1 -1
- package/types/src/components/Dialog/index.d.ts +1 -1
- package/types/src/components/DistractionFreeModeContext/DistractionFreeModeContext.d.ts +1 -1
- package/types/src/components/DistractionFreeModeContext/index.d.ts +1 -0
- package/types/src/components/Drawer/Header.d.ts +4 -20
- package/types/src/components/Form/Form.d.ts +5 -0
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.d.ts +53 -0
- package/types/src/components/FormFieldCheckbox/index.d.ts +2 -0
- package/types/src/components/FormFieldPassword/PasswordMeter.d.ts +4 -3
- package/types/src/components/FormFieldPassword/generatePassword.d.ts +2 -0
- package/types/src/components/FormFieldRadioButtons/FormFieldRadioButtons.d.ts +72 -0
- package/types/src/components/FormFieldRadioButtons/index.d.ts +2 -0
- package/types/src/components/FormFieldSelect/FormFieldSelect.d.ts +1 -1
- package/types/src/components/FormFieldSelect/index.d.ts +1 -0
- package/types/src/components/FormFieldText/FormFieldText.d.ts +82 -0
- package/types/src/components/FormFieldText/index.d.ts +2 -0
- package/types/src/components/Grid/Grid.d.ts +97 -0
- package/types/src/components/Grid/index.d.ts +2 -0
- package/types/src/components/GridCol/GridCol.d.ts +53 -0
- package/types/src/components/GridCol/index.d.ts +2 -0
- package/types/src/components/Icon/constants.d.ts +1 -1
- package/types/src/components/InPlaceEdit/InPlaceEdit.d.ts +50 -0
- package/types/src/components/InPlaceEdit/index.d.ts +2 -0
- package/types/src/components/Input/Input.d.ts +1 -1
- package/types/src/components/Input/index.d.ts +1 -0
- package/types/src/components/InputFile/InputFile.d.ts +3 -2
- package/types/src/components/InputFile/index.d.ts +1 -0
- package/types/src/components/InputNumber/InputNumber.d.ts +2 -2
- package/types/src/components/InputNumber/index.d.ts +1 -0
- package/types/src/components/Layout/Layout.d.ts +161 -0
- package/types/src/components/Layout/index.d.ts +2 -0
- package/types/src/components/Link/Link.d.ts +1 -2
- package/types/src/components/LocaleProvider/LocaleProvider.d.ts +1 -1
- package/types/src/components/Media/Media.d.ts +66 -0
- package/types/src/components/Media/MediaSection.d.ts +22 -0
- package/types/src/components/Media/index.d.ts +4 -0
- package/types/src/components/Menu/Menu.d.ts +40 -0
- package/types/src/components/Menu/MenuBaseItem.d.ts +41 -0
- package/types/src/components/Menu/MenuDivider.d.ts +16 -0
- package/types/src/components/Menu/MenuHeader.d.ts +22 -0
- package/types/src/components/Menu/MenuItem.d.ts +49 -0
- package/types/src/components/Menu/MenuSelectableItem.d.ts +28 -0
- package/types/src/components/Menu/index.d.ts +11 -0
- package/types/src/components/Panel/Panel.d.ts +2 -1
- package/types/src/components/Plaintext/Plaintext.d.ts +23 -0
- package/types/src/components/Plaintext/index.d.ts +2 -0
- package/types/src/components/Popover/Popover.d.ts +156 -0
- package/types/src/components/Popover/index.d.ts +2 -0
- package/types/src/components/ProgressDialog/ProgressDialog.d.ts +125 -0
- package/types/src/components/ProgressDialog/index.d.ts +2 -0
- package/types/src/components/Rating/Rating.d.ts +27 -0
- package/types/src/components/Rating/index.d.ts +2 -0
- package/types/src/components/Section/Section.d.ts +145 -0
- package/types/src/components/Section/SectionItem.d.ts +38 -0
- package/types/src/components/Section/index.d.ts +5 -0
- package/types/src/components/Skeleton/Skeleton.d.ts +3 -5
- package/types/src/components/Skeleton/SkeletonTabs.d.ts +4 -4
- package/types/src/components/Skeleton/SkeletonText.d.ts +2 -2
- package/types/src/components/Skeleton/index.d.ts +4 -1
- package/types/src/components/SplitButton/SplitButton.d.ts +1 -2
- package/types/src/components/Spot/Spot.d.ts +3 -2
- package/types/src/components/Spot/SpotPulsar.d.ts +4 -2
- package/types/src/components/Spot/index.d.ts +1 -0
- package/types/src/components/Subnav/Subnav.d.ts +50 -0
- package/types/src/components/Subnav/index.d.ts +2 -0
- package/types/src/components/SwitchesPanel/SwitchesPanel.d.ts +24 -0
- package/types/src/components/SwitchesPanel/index.d.ts +2 -0
- package/types/src/components/SwitchesPanelItem/SwitchesPanelItem.d.ts +78 -0
- package/types/src/components/SwitchesPanelItem/index.d.ts +2 -0
- package/types/src/components/TextArea/TextArea.d.ts +3 -3
- package/types/src/components/TextArea/index.d.ts +1 -0
- package/types/src/components/Toolbar/RegistryContext.d.ts +2 -2
- package/types/src/components/Toolbar/Toolbar.d.ts +47 -0
- package/types/src/components/Toolbar/ToolbarGroup.d.ts +46 -0
- package/types/src/components/Toolbar/ToolbarMenu.d.ts +1 -1
- package/types/src/components/Toolbar/index.d.ts +5 -0
- package/types/src/components/Tour/Tour.d.ts +1 -1
- package/types/src/components/index.d.ts +31 -12
- package/types/src/components/utils.d.ts +1 -1
- package/types/src/utils/types/DataAttributes.d.ts +3 -0
- package/types/src/utils/types/index.d.ts +1 -0
- package/cjs/components/Alert/Alert.stories.js +0 -34
- package/cjs/components/Button/Button.stories.js +0 -109
- package/cjs/components/Cuttable/Cuttable.stories.js +0 -46
- package/cjs/components/Dialog/Dialog.stories.js +0 -49
- package/cjs/components/Drawer/Drawer.stories.js +0 -65
- package/cjs/components/Form/Form.stories.js +0 -35
- package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +0 -32
- package/cjs/components/Icon/Icon.stories.js +0 -32
- package/cjs/components/ItemLink/ItemLink.stories.js +0 -20
- package/cjs/components/ItemList/ItemList.stories.js +0 -122
- package/cjs/components/List/List.stories.js +0 -152
- package/cjs/components/Markdown/Markdown.stories.js +0 -51
- package/cjs/components/Menu/Menu.stories.js +0 -77
- package/cjs/components/Popover/Popover.stories.js +0 -60
- package/cjs/components/Select/Select.stories.js +0 -57
- package/cjs/components/Skeleton/Skeleton.stories.js +0 -24
- package/cjs/components/Skeleton/SkeletonTabs.stories.js +0 -15
- package/cjs/components/Skeleton/SkeletonText.stories.js +0 -33
- package/cjs/components/Status/Status.stories.js +0 -19
- package/cjs/components/Tabs/Tabs.stories.js +0 -24
- package/cjs/tests/index.js +0 -13
- package/cjs/tests/renderer.js +0 -27
- package/dist/.DS_Store +0 -0
- package/dist/images/default.svg +0 -1
- package/dist/images/filtered.svg +0 -1
- package/esm/components/Alert/Alert.stories.js +0 -27
- package/esm/components/Button/Button.stories.js +0 -99
- package/esm/components/Cuttable/Cuttable.stories.js +0 -39
- package/esm/components/Dialog/Dialog.stories.js +0 -42
- package/esm/components/Drawer/Drawer.stories.js +0 -56
- package/esm/components/Form/Form.stories.js +0 -27
- package/esm/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +0 -23
- package/esm/components/Icon/Icon.stories.js +0 -23
- package/esm/components/ItemLink/ItemLink.stories.js +0 -12
- package/esm/components/ItemList/ItemList.stories.js +0 -109
- package/esm/components/List/List.stories.js +0 -139
- package/esm/components/Markdown/Markdown.stories.js +0 -43
- package/esm/components/Menu/Menu.stories.js +0 -65
- package/esm/components/Popover/Popover.stories.js +0 -52
- package/esm/components/Select/Select.stories.js +0 -48
- package/esm/components/Skeleton/Skeleton.stories.js +0 -15
- package/esm/components/Skeleton/SkeletonTabs.stories.js +0 -7
- package/esm/components/Skeleton/SkeletonText.stories.js +0 -23
- package/esm/components/Status/Status.stories.js +0 -11
- package/esm/components/Tabs/Tabs.stories.js +0 -16
- package/esm/tests/index.js +0 -3
- package/esm/tests/renderer.js +0 -19
- package/styleguide/build/bundle.edc3f2a1.js +0 -2
- package/types/src/components/Alert/Alert.stories.d.ts +0 -11
- package/types/src/components/Button/Button.stories.d.ts +0 -17
- package/types/src/components/Cuttable/Cuttable.stories.d.ts +0 -17
- package/types/src/components/Dialog/Dialog.stories.d.ts +0 -25
- package/types/src/components/Drawer/Drawer.stories.d.ts +0 -43
- package/types/src/components/Form/Form.stories.d.ts +0 -13
- package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.stories.d.ts +0 -20
- package/types/src/components/Icon/Icon.stories.d.ts +0 -7
- package/types/src/components/ItemLink/ItemLink.stories.d.ts +0 -12
- package/types/src/components/ItemList/ItemList.stories.d.ts +0 -172
- package/types/src/components/List/List.stories.d.ts +0 -30
- package/types/src/components/Markdown/Markdown.stories.d.ts +0 -10
- package/types/src/components/Menu/Menu.stories.d.ts +0 -20
- package/types/src/components/Popover/Popover.stories.d.ts +0 -25
- package/types/src/components/Select/Select.stories.d.ts +0 -12
- package/types/src/components/Skeleton/Skeleton.stories.d.ts +0 -15
- package/types/src/components/Skeleton/SkeletonTabs.stories.d.ts +0 -5
- package/types/src/components/Skeleton/SkeletonText.stories.d.ts +0 -23
- package/types/src/components/Status/Status.stories.d.ts +0 -11
- package/types/src/components/Tabs/Tabs.stories.d.ts +0 -10
- package/types/src/tests/index.d.ts +0 -1
- package/types/src/tests/renderer.d.ts +0 -23
- /package/styleguide/build/{bundle.edc3f2a1.js.LICENSE.txt → bundle.8058bbce.js.LICENSE.txt} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
4
|
+
import { Component } from 'react';
|
|
6
5
|
import classNames from 'classnames';
|
|
7
6
|
import Dialog from '../Dialog';
|
|
8
7
|
import { CLS_PREFIX } from '../../constants';
|
|
@@ -44,7 +43,7 @@ class ProgressDialog extends Component {
|
|
|
44
43
|
isFinished,
|
|
45
44
|
isFailed
|
|
46
45
|
} = this.state;
|
|
47
|
-
|
|
46
|
+
this.clearCloseTimeout();
|
|
48
47
|
if (!isOpen) {
|
|
49
48
|
return;
|
|
50
49
|
}
|
|
@@ -68,7 +67,7 @@ class ProgressDialog extends Component {
|
|
|
68
67
|
isOpen
|
|
69
68
|
};
|
|
70
69
|
}
|
|
71
|
-
componentDidUpdate(
|
|
70
|
+
componentDidUpdate(_, prevState) {
|
|
72
71
|
const {
|
|
73
72
|
isFinished
|
|
74
73
|
} = this.state;
|
|
@@ -76,13 +75,19 @@ class ProgressDialog extends Component {
|
|
|
76
75
|
autoCloseTimeout
|
|
77
76
|
} = this.props;
|
|
78
77
|
if (prevState.isFinished === false && isFinished === true) {
|
|
79
|
-
|
|
78
|
+
this.clearCloseTimeout();
|
|
80
79
|
if (autoCloseTimeout) {
|
|
81
80
|
this.closeTimeout = setTimeout(this.handleClose, autoCloseTimeout);
|
|
82
81
|
}
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
componentWillUnmount() {
|
|
85
|
+
this.clearCloseTimeout();
|
|
86
|
+
}
|
|
87
|
+
clearCloseTimeout() {
|
|
88
|
+
if (!this.closeTimeout) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
86
91
|
clearTimeout(this.closeTimeout);
|
|
87
92
|
}
|
|
88
93
|
render() {
|
|
@@ -133,83 +138,7 @@ class ProgressDialog extends Component {
|
|
|
133
138
|
});
|
|
134
139
|
}
|
|
135
140
|
}
|
|
136
|
-
ProgressDialog
|
|
137
|
-
/**
|
|
138
|
-
* Toggles visibility.
|
|
139
|
-
* @since 1.2.0
|
|
140
|
-
*/
|
|
141
|
-
isOpen: PropTypes.bool,
|
|
142
|
-
/**
|
|
143
|
-
* Banner. Renders in front of content as wide as dialog.
|
|
144
|
-
* @since 1.2.0
|
|
145
|
-
*/
|
|
146
|
-
banner: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.element]),
|
|
147
|
-
/**
|
|
148
|
-
* Image. Renders into content.
|
|
149
|
-
* @since 1.2.0
|
|
150
|
-
*/
|
|
151
|
-
image: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.element]),
|
|
152
|
-
/**
|
|
153
|
-
* Title
|
|
154
|
-
* @since 1.2.0
|
|
155
|
-
*/
|
|
156
|
-
title: PropTypes.node,
|
|
157
|
-
/**
|
|
158
|
-
* Description of the `ProgressDialog`.
|
|
159
|
-
* @since 1.2.0
|
|
160
|
-
*/
|
|
161
|
-
description: PropTypes.node,
|
|
162
|
-
/**
|
|
163
|
-
* Actions which will be shown in Dialog header.
|
|
164
|
-
* @since 1.2.0
|
|
165
|
-
*/
|
|
166
|
-
actions: PropTypes.node,
|
|
167
|
-
/**
|
|
168
|
-
* Whether the dialog should be canceled with the cancel button.
|
|
169
|
-
* @since 1.2.0
|
|
170
|
-
*/
|
|
171
|
-
cancelable: PropTypes.bool,
|
|
172
|
-
/**
|
|
173
|
-
* The interval of time to auto close dialog when it successful finished.
|
|
174
|
-
* Set `null` for disable auto close.
|
|
175
|
-
* @since 1.2.0
|
|
176
|
-
*/
|
|
177
|
-
autoCloseTimeout: PropTypes.number,
|
|
178
|
-
/**
|
|
179
|
-
* On cancel event handler.
|
|
180
|
-
* @since 1.2.0
|
|
181
|
-
*/
|
|
182
|
-
onCancel: PropTypes.func,
|
|
183
|
-
/**
|
|
184
|
-
* On close event handler.
|
|
185
|
-
* @since 1.2.0
|
|
186
|
-
*/
|
|
187
|
-
onClose: PropTypes.func,
|
|
188
|
-
/**
|
|
189
|
-
* On finish event handler.
|
|
190
|
-
* @since 1.2.0
|
|
191
|
-
*/
|
|
192
|
-
onFinish: PropTypes.func,
|
|
193
|
-
/**
|
|
194
|
-
* On fail event handler.
|
|
195
|
-
* @since 1.2.0
|
|
196
|
-
*/
|
|
197
|
-
onFail: PropTypes.func,
|
|
198
|
-
/**
|
|
199
|
-
* Content of the `ProgressDialog`.
|
|
200
|
-
* @since 1.2.0
|
|
201
|
-
*/
|
|
202
|
-
children: PropTypes.node,
|
|
203
|
-
/**
|
|
204
|
-
* @ignore
|
|
205
|
-
*/
|
|
206
|
-
className: PropTypes.string,
|
|
207
|
-
/**
|
|
208
|
-
* @ignore
|
|
209
|
-
*/
|
|
210
|
-
baseClassName: PropTypes.string
|
|
211
|
-
};
|
|
212
|
-
ProgressDialog.defaultProps = {
|
|
141
|
+
_defineProperty(ProgressDialog, "defaultProps", {
|
|
213
142
|
isOpen: false,
|
|
214
143
|
banner: null,
|
|
215
144
|
image: null,
|
|
@@ -225,5 +154,5 @@ ProgressDialog.defaultProps = {
|
|
|
225
154
|
children: null,
|
|
226
155
|
className: null,
|
|
227
156
|
baseClassName: `${CLS_PREFIX}progress-dialog`
|
|
228
|
-
};
|
|
157
|
+
});
|
|
229
158
|
export default ProgressDialog;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
import classNames from 'classnames';
|
|
6
4
|
import { CLS_PREFIX } from '../../constants';
|
|
7
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -14,25 +12,22 @@ const width = value => {
|
|
|
14
12
|
}
|
|
15
13
|
return result;
|
|
16
14
|
};
|
|
17
|
-
|
|
18
15
|
/**
|
|
19
16
|
* `Rating` component is used for showing and collecting feedback of users' opinion in 0-5 grade scale.
|
|
20
17
|
* @since 0.0.42
|
|
21
18
|
*/
|
|
22
19
|
const Rating = _ref => {
|
|
23
20
|
let {
|
|
24
|
-
baseClassName
|
|
21
|
+
baseClassName = `${CLS_PREFIX}rating`,
|
|
25
22
|
className,
|
|
26
|
-
value,
|
|
27
|
-
small,
|
|
23
|
+
value = 0,
|
|
24
|
+
small = false,
|
|
28
25
|
...props
|
|
29
26
|
} = _ref;
|
|
30
27
|
return /*#__PURE__*/_jsx("div", {
|
|
31
|
-
className: classNames({
|
|
32
|
-
[baseClassName]: true,
|
|
28
|
+
className: classNames(baseClassName, className, {
|
|
33
29
|
[`${baseClassName}--static`]: true,
|
|
34
|
-
[`${baseClassName}--small`]: small
|
|
35
|
-
[className]: true
|
|
30
|
+
[`${baseClassName}--small`]: small
|
|
36
31
|
}),
|
|
37
32
|
...props,
|
|
38
33
|
children: /*#__PURE__*/_jsx("div", {
|
|
@@ -43,30 +38,4 @@ const Rating = _ref => {
|
|
|
43
38
|
})
|
|
44
39
|
});
|
|
45
40
|
};
|
|
46
|
-
Rating.propTypes = {
|
|
47
|
-
/**
|
|
48
|
-
* Rating value from 0 to 5.
|
|
49
|
-
* @since 0.0.42
|
|
50
|
-
*/
|
|
51
|
-
value: PropTypes.number,
|
|
52
|
-
/**
|
|
53
|
-
* Small variant.
|
|
54
|
-
* @since 0.0.42
|
|
55
|
-
*/
|
|
56
|
-
small: PropTypes.bool,
|
|
57
|
-
/**
|
|
58
|
-
* @ignore
|
|
59
|
-
*/
|
|
60
|
-
className: PropTypes.string,
|
|
61
|
-
/**
|
|
62
|
-
* @ignore
|
|
63
|
-
*/
|
|
64
|
-
baseClassName: PropTypes.string
|
|
65
|
-
};
|
|
66
|
-
Rating.defaultProps = {
|
|
67
|
-
value: 0,
|
|
68
|
-
small: false,
|
|
69
|
-
className: null,
|
|
70
|
-
baseClassName: `${CLS_PREFIX}rating`
|
|
71
|
-
};
|
|
72
41
|
export default Rating;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
3
3
|
|
|
4
|
-
import React, { Component, Children, isValidElement, useContext } from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
4
|
import classNames from 'classnames';
|
|
5
|
+
import { Children, Component, isValidElement, useContext } from 'react';
|
|
7
6
|
import Measure from 'react-measure';
|
|
8
7
|
import { CLS_PREFIX } from '../../constants';
|
|
9
|
-
import { isClickable } from '../utils';
|
|
10
|
-
import InPlaceEdit from '../InPlaceEdit';
|
|
11
8
|
import Button from '../Button';
|
|
12
|
-
import VerticalContext, { VERTICAL_BREAKPOINT } from '../VerticalContext';
|
|
13
9
|
import FormContext from '../Form/FormContext';
|
|
10
|
+
import InPlaceEdit from '../InPlaceEdit';
|
|
11
|
+
import { isClickable } from '../utils';
|
|
12
|
+
import VerticalContext, { VERTICAL_BREAKPOINT } from '../VerticalContext';
|
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
15
|
const getErrorsForChildren = (form, children) => {
|
|
@@ -34,6 +33,22 @@ const getErrorsForChildren = (form, children) => {
|
|
|
34
33
|
});
|
|
35
34
|
return errors;
|
|
36
35
|
};
|
|
36
|
+
export const SECTION_BASE_CLASS_NAME = `${CLS_PREFIX}section`;
|
|
37
|
+
const DEFAULT_PROPS = {
|
|
38
|
+
title: undefined,
|
|
39
|
+
intent: undefined,
|
|
40
|
+
collapsible: false,
|
|
41
|
+
collapsed: false,
|
|
42
|
+
onTitleChange: undefined,
|
|
43
|
+
onClose: undefined,
|
|
44
|
+
onToggle: undefined,
|
|
45
|
+
buttons: undefined,
|
|
46
|
+
vertical: undefined,
|
|
47
|
+
children: undefined,
|
|
48
|
+
className: undefined,
|
|
49
|
+
baseClassName: SECTION_BASE_CLASS_NAME,
|
|
50
|
+
form: undefined
|
|
51
|
+
};
|
|
37
52
|
class Section extends Component {
|
|
38
53
|
constructor() {
|
|
39
54
|
super(...arguments);
|
|
@@ -44,7 +59,7 @@ class Section extends Component {
|
|
|
44
59
|
let {
|
|
45
60
|
bounds
|
|
46
61
|
} = _ref;
|
|
47
|
-
if (this.props.vertical !== undefined) {
|
|
62
|
+
if (this.props.vertical !== undefined || !bounds) {
|
|
48
63
|
return;
|
|
49
64
|
}
|
|
50
65
|
this.setState({
|
|
@@ -63,9 +78,7 @@ class Section extends Component {
|
|
|
63
78
|
collapsed: !collapsed
|
|
64
79
|
};
|
|
65
80
|
}, () => {
|
|
66
|
-
|
|
67
|
-
this.props.onToggle(this.state.collapsed);
|
|
68
|
-
}
|
|
81
|
+
this.props.onToggle?.(this.state.collapsed ?? false);
|
|
69
82
|
});
|
|
70
83
|
});
|
|
71
84
|
}
|
|
@@ -139,7 +152,8 @@ class Section extends Component {
|
|
|
139
152
|
value: title,
|
|
140
153
|
onChange: onTitleChange,
|
|
141
154
|
onClick: e => {
|
|
142
|
-
e.target
|
|
155
|
+
const button = e.target?.closest(`.${baseClassName}__header`)?.querySelector(`.${baseClassName}__control-button`);
|
|
156
|
+
button?.click();
|
|
143
157
|
}
|
|
144
158
|
});
|
|
145
159
|
}
|
|
@@ -158,10 +172,10 @@ class Section extends Component {
|
|
|
158
172
|
}
|
|
159
173
|
render() {
|
|
160
174
|
const {
|
|
161
|
-
baseClassName,
|
|
175
|
+
baseClassName = SECTION_BASE_CLASS_NAME,
|
|
162
176
|
className,
|
|
163
177
|
intent,
|
|
164
|
-
collapsible,
|
|
178
|
+
collapsible = false,
|
|
165
179
|
title,
|
|
166
180
|
collapsed,
|
|
167
181
|
onTitleChange,
|
|
@@ -216,95 +230,13 @@ class Section extends Component {
|
|
|
216
230
|
});
|
|
217
231
|
}
|
|
218
232
|
}
|
|
219
|
-
const propTypes = {
|
|
220
|
-
/**
|
|
221
|
-
* Title of the section.
|
|
222
|
-
* @since 0.0.54
|
|
223
|
-
*/
|
|
224
|
-
title: PropTypes.node,
|
|
225
|
-
/**
|
|
226
|
-
* Visual intent color to apply to component.
|
|
227
|
-
* @since 0.0.54
|
|
228
|
-
*/
|
|
229
|
-
intent: PropTypes.oneOf(['danger', 'warning', 'success', 'inactive']),
|
|
230
|
-
/**
|
|
231
|
-
* Is section collapsible.
|
|
232
|
-
* @since 0.0.54
|
|
233
|
-
*/
|
|
234
|
-
collapsible: PropTypes.bool,
|
|
235
|
-
/**
|
|
236
|
-
* Is section collapsed now.
|
|
237
|
-
* @since 0.0.54
|
|
238
|
-
*/
|
|
239
|
-
collapsed: PropTypes.bool,
|
|
240
|
-
/**
|
|
241
|
-
* Event handler of title change with inline editing form.
|
|
242
|
-
* @since 0.0.54
|
|
243
|
-
*/
|
|
244
|
-
onTitleChange: PropTypes.func,
|
|
245
|
-
/**
|
|
246
|
-
* Event handler of closing section with X-sign at the right.
|
|
247
|
-
* @since 0.0.54
|
|
248
|
-
*/
|
|
249
|
-
onClose: PropTypes.func,
|
|
250
|
-
/**
|
|
251
|
-
* A callback executed when the section collapsing.
|
|
252
|
-
* @since 3.26.0
|
|
253
|
-
*/
|
|
254
|
-
onToggle: PropTypes.func,
|
|
255
|
-
/**
|
|
256
|
-
* Array of custom section action button at the right.
|
|
257
|
-
* @since 0.0.54
|
|
258
|
-
*/
|
|
259
|
-
buttons: PropTypes.arrayOf(PropTypes.element),
|
|
260
|
-
/**
|
|
261
|
-
* Vertical or horizontal section view.
|
|
262
|
-
* Section view will be automatically switched if this parameter is not specified explicitly.
|
|
263
|
-
* @since 0.3.0
|
|
264
|
-
*/
|
|
265
|
-
vertical: PropTypes.bool,
|
|
266
|
-
/**
|
|
267
|
-
* Content of the `Section`.
|
|
268
|
-
* @since 0.0.54
|
|
269
|
-
*/
|
|
270
|
-
children: PropTypes.node,
|
|
271
|
-
/**
|
|
272
|
-
* @ignore
|
|
273
|
-
*/
|
|
274
|
-
className: PropTypes.string,
|
|
275
|
-
/**
|
|
276
|
-
* @ignore
|
|
277
|
-
*/
|
|
278
|
-
baseClassName: PropTypes.string,
|
|
279
|
-
/**
|
|
280
|
-
* @ignore
|
|
281
|
-
*/
|
|
282
|
-
form: PropTypes.object
|
|
283
|
-
};
|
|
284
|
-
const defaultProps = {
|
|
285
|
-
title: undefined,
|
|
286
|
-
intent: undefined,
|
|
287
|
-
collapsible: false,
|
|
288
|
-
collapsed: false,
|
|
289
|
-
onTitleChange: undefined,
|
|
290
|
-
onClose: undefined,
|
|
291
|
-
onToggle: undefined,
|
|
292
|
-
buttons: undefined,
|
|
293
|
-
vertical: undefined,
|
|
294
|
-
children: undefined,
|
|
295
|
-
className: undefined,
|
|
296
|
-
baseClassName: `${CLS_PREFIX}section`,
|
|
297
|
-
form: undefined
|
|
298
|
-
};
|
|
299
|
-
Section.propTypes = propTypes;
|
|
300
|
-
Section.defaultProps = defaultProps;
|
|
301
233
|
|
|
302
234
|
/**
|
|
303
235
|
* `Section` component is used for dividing of complex content into groups for better readability
|
|
304
236
|
* and comprehension of the presented information.
|
|
305
237
|
* @since 0.0.54
|
|
306
238
|
*/
|
|
307
|
-
|
|
239
|
+
_defineProperty(Section, "defaultProps", DEFAULT_PROPS);
|
|
308
240
|
const SectionWrapper = props => {
|
|
309
241
|
const form = useContext(FormContext);
|
|
310
242
|
const verticalContext = useContext(VerticalContext);
|
|
@@ -316,7 +248,6 @@ const SectionWrapper = props => {
|
|
|
316
248
|
});
|
|
317
249
|
};
|
|
318
250
|
SectionWrapper.displayName = 'Section';
|
|
319
|
-
SectionWrapper.
|
|
320
|
-
SectionWrapper.defaultProps = defaultProps;
|
|
251
|
+
SectionWrapper.defaultProps = DEFAULT_PROPS;
|
|
321
252
|
SectionWrapper.WrappedComponent = Section;
|
|
322
253
|
export default SectionWrapper;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
|
-
import React, { useContext } from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
import classNames from 'classnames';
|
|
4
|
+
import { useContext } from 'react';
|
|
6
5
|
import { CLS_PREFIX } from '../../constants';
|
|
7
6
|
import VerticalContext from '../VerticalContext';
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export const SECTION_ITEM_BASE_CLASS_NAME = `${CLS_PREFIX}section-item`;
|
|
10
|
+
|
|
10
11
|
/**
|
|
11
12
|
* `SectionItem` component is used for showing parameters and its values in [Section](#!/Section).
|
|
12
13
|
* @since 0.0.54
|
|
13
14
|
*/
|
|
14
15
|
const SectionItem = _ref => {
|
|
15
16
|
let {
|
|
16
|
-
baseClassName,
|
|
17
|
+
baseClassName = SECTION_ITEM_BASE_CLASS_NAME,
|
|
17
18
|
className,
|
|
18
19
|
children,
|
|
19
20
|
title,
|
|
20
|
-
actions,
|
|
21
|
+
actions = false,
|
|
21
22
|
vertical,
|
|
22
23
|
...props
|
|
23
24
|
} = _ref;
|
|
@@ -37,41 +38,4 @@ const SectionItem = _ref => {
|
|
|
37
38
|
})]
|
|
38
39
|
});
|
|
39
40
|
};
|
|
40
|
-
SectionItem.propTypes = {
|
|
41
|
-
/**
|
|
42
|
-
* Content of the `SectionItem`.
|
|
43
|
-
* @since 0.0.54
|
|
44
|
-
*/
|
|
45
|
-
children: PropTypes.node,
|
|
46
|
-
/**
|
|
47
|
-
* @ignore
|
|
48
|
-
*/
|
|
49
|
-
className: PropTypes.string,
|
|
50
|
-
/**
|
|
51
|
-
* @ignore
|
|
52
|
-
*/
|
|
53
|
-
baseClassName: PropTypes.string,
|
|
54
|
-
/**
|
|
55
|
-
* Title of the section item.
|
|
56
|
-
* @since 0.0.54
|
|
57
|
-
*/
|
|
58
|
-
title: PropTypes.node,
|
|
59
|
-
/**
|
|
60
|
-
* Is this section item contains actions? If it so than there should be extra whitespaces.
|
|
61
|
-
* @since 0.0.54
|
|
62
|
-
*/
|
|
63
|
-
actions: PropTypes.bool,
|
|
64
|
-
/**
|
|
65
|
-
* @ignore
|
|
66
|
-
*/
|
|
67
|
-
vertical: PropTypes.bool
|
|
68
|
-
};
|
|
69
|
-
SectionItem.defaultProps = {
|
|
70
|
-
children: undefined,
|
|
71
|
-
className: undefined,
|
|
72
|
-
baseClassName: `${CLS_PREFIX}section-item`,
|
|
73
|
-
title: undefined,
|
|
74
|
-
actions: false,
|
|
75
|
-
vertical: undefined
|
|
76
|
-
};
|
|
77
41
|
export default SectionItem;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
3
|
export { default } from './Section';
|
|
4
|
-
export {
|
|
4
|
+
export { SECTION_BASE_CLASS_NAME } from './Section';
|
|
5
|
+
export { default as SectionItem, SECTION_ITEM_BASE_CLASS_NAME } from './SectionItem';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
3
|
export { default } from './Skeleton';
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
4
|
+
export { default as SkeletonTabs } from './SkeletonTabs';
|
|
5
|
+
export { default as SkeletonText } from './SkeletonText';
|
|
@@ -35,8 +35,7 @@ const focusStrategy = {
|
|
|
35
35
|
* `Split Button` is a combination of a standard [Button](#!/Button) with a [Dropdown](#!/Dropdown) menu.
|
|
36
36
|
* It is used for grouping several related actions when one of the actions should be accessible immediately
|
|
37
37
|
* because it is used more often than others.
|
|
38
|
-
*
|
|
39
|
-
* Since: 0.0.40
|
|
38
|
+
* @since 0.0.40
|
|
40
39
|
*/
|
|
41
40
|
const SplitButton = _ref => {
|
|
42
41
|
let {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
|
-
import React, { cloneElement, Children, isValidElement, useRef, useMemo } from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
3
|
import classNames from 'classnames';
|
|
6
4
|
import { CLS_PREFIX } from '../../constants';
|
|
7
5
|
import { safeInvoke, createFocusManager } from '../utils';
|
|
6
|
+
import { cloneElement, Children, isValidElement, useRef, useMemo } from 'react';
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
8
|
/**
|
|
10
9
|
* `Subnav` component is used when you need a second level navigation under [Tabs](#!/Tabs) on the screen.
|
|
@@ -12,13 +11,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
12
11
|
*/
|
|
13
12
|
const Subnav = _ref => {
|
|
14
13
|
let {
|
|
15
|
-
baseClassName,
|
|
16
14
|
className,
|
|
17
15
|
children,
|
|
18
16
|
onKeyDown,
|
|
17
|
+
baseClassName = `${CLS_PREFIX}subnav`,
|
|
19
18
|
...props
|
|
20
19
|
} = _ref;
|
|
21
|
-
const rootRef = useRef();
|
|
20
|
+
const rootRef = useRef(null);
|
|
22
21
|
const {
|
|
23
22
|
focusNext,
|
|
24
23
|
focusPrev,
|
|
@@ -47,7 +46,9 @@ const Subnav = _ref => {
|
|
|
47
46
|
break;
|
|
48
47
|
case 'Enter':
|
|
49
48
|
e.preventDefault();
|
|
50
|
-
e.target
|
|
49
|
+
if (e.target instanceof HTMLElement) {
|
|
50
|
+
e.target.click();
|
|
51
|
+
}
|
|
51
52
|
break;
|
|
52
53
|
}
|
|
53
54
|
safeInvoke(onKeyDown, e);
|
|
@@ -67,6 +68,9 @@ const Subnav = _ref => {
|
|
|
67
68
|
});
|
|
68
69
|
const items = Children.map(children, (child, index) => {
|
|
69
70
|
if (itemIndex === index) {
|
|
71
|
+
if (! /*#__PURE__*/isValidElement(child)) {
|
|
72
|
+
return child;
|
|
73
|
+
}
|
|
70
74
|
return /*#__PURE__*/cloneElement(child, {
|
|
71
75
|
tabIndex: 0
|
|
72
76
|
});
|
|
@@ -81,41 +85,15 @@ const Subnav = _ref => {
|
|
|
81
85
|
children: items
|
|
82
86
|
});
|
|
83
87
|
};
|
|
84
|
-
Subnav.propTypes = {
|
|
85
|
-
/**
|
|
86
|
-
* Subnav items
|
|
87
|
-
* @since 0.0.42
|
|
88
|
-
*/
|
|
89
|
-
children: PropTypes.node,
|
|
90
|
-
/**
|
|
91
|
-
* @ignore
|
|
92
|
-
*/
|
|
93
|
-
className: PropTypes.string,
|
|
94
|
-
/**
|
|
95
|
-
* @ignore
|
|
96
|
-
*/
|
|
97
|
-
baseClassName: PropTypes.string,
|
|
98
|
-
/**
|
|
99
|
-
* @ignore
|
|
100
|
-
*/
|
|
101
|
-
onKeyDown: PropTypes.string
|
|
102
|
-
};
|
|
103
|
-
Subnav.defaultProps = {
|
|
104
|
-
children: null,
|
|
105
|
-
className: null,
|
|
106
|
-
baseClassName: `${CLS_PREFIX}subnav`,
|
|
107
|
-
onKeyDown: undefined
|
|
108
|
-
};
|
|
109
|
-
|
|
110
88
|
/**
|
|
111
89
|
* SubnavItem component.
|
|
112
90
|
*/
|
|
113
91
|
const SubnavItem = _ref2 => {
|
|
114
92
|
let {
|
|
115
|
-
baseClassName,
|
|
116
93
|
className,
|
|
117
94
|
active,
|
|
118
95
|
children,
|
|
96
|
+
baseClassName = `${CLS_PREFIX}subnav__item`,
|
|
119
97
|
...props
|
|
120
98
|
} = _ref2;
|
|
121
99
|
return /*#__PURE__*/cloneElement(children, {
|
|
@@ -124,27 +102,5 @@ const SubnavItem = _ref2 => {
|
|
|
124
102
|
...props
|
|
125
103
|
});
|
|
126
104
|
};
|
|
127
|
-
SubnavItem.propTypes = {
|
|
128
|
-
/**
|
|
129
|
-
* Is item active.
|
|
130
|
-
*/
|
|
131
|
-
active: PropTypes.bool,
|
|
132
|
-
/**
|
|
133
|
-
* Content of the item
|
|
134
|
-
*/
|
|
135
|
-
children: PropTypes.element.isRequired,
|
|
136
|
-
/**
|
|
137
|
-
* @ignore
|
|
138
|
-
*/
|
|
139
|
-
className: PropTypes.string,
|
|
140
|
-
/**
|
|
141
|
-
* @ignore
|
|
142
|
-
*/
|
|
143
|
-
baseClassName: PropTypes.string
|
|
144
|
-
};
|
|
145
|
-
SubnavItem.defaultProps = {
|
|
146
|
-
className: null,
|
|
147
|
-
baseClassName: `${CLS_PREFIX}subnav__item`
|
|
148
|
-
};
|
|
149
105
|
export default Subnav;
|
|
150
106
|
export { SubnavItem };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
3
|
+
import { Children, cloneElement } from 'react';
|
|
5
4
|
import classNames from 'classnames';
|
|
6
5
|
import { CLS_PREFIX } from '../../constants';
|
|
7
6
|
import Section from '../Section';
|
|
@@ -12,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
12
11
|
*/
|
|
13
12
|
const SwitchesPanel = _ref => {
|
|
14
13
|
let {
|
|
15
|
-
baseClassName
|
|
14
|
+
baseClassName = `${CLS_PREFIX}switches-panel`,
|
|
16
15
|
className,
|
|
17
16
|
children,
|
|
18
17
|
...props
|
|
@@ -22,30 +21,10 @@ const SwitchesPanel = _ref => {
|
|
|
22
21
|
...props,
|
|
23
22
|
children: /*#__PURE__*/_jsx("div", {
|
|
24
23
|
className: `${baseClassName}__items`,
|
|
25
|
-
children: Children.map(children, child => /*#__PURE__*/cloneElement(child, {
|
|
24
|
+
children: children && Children.map(children, child => /*#__PURE__*/cloneElement(child, {
|
|
26
25
|
className: classNames(child.props.className, `${baseClassName}__item`)
|
|
27
26
|
}))
|
|
28
27
|
})
|
|
29
28
|
});
|
|
30
29
|
};
|
|
31
|
-
SwitchesPanel.propTypes = {
|
|
32
|
-
/**
|
|
33
|
-
* Content of the `SwitchesPanel`. Recommended to use [SwitchesPanelItem](#!/SwitchesPanelItem) components.
|
|
34
|
-
* @since 0.3.0
|
|
35
|
-
*/
|
|
36
|
-
children: PropTypes.node,
|
|
37
|
-
/**
|
|
38
|
-
* @ignore
|
|
39
|
-
*/
|
|
40
|
-
className: PropTypes.string,
|
|
41
|
-
/**
|
|
42
|
-
* @ignore
|
|
43
|
-
*/
|
|
44
|
-
baseClassName: PropTypes.string
|
|
45
|
-
};
|
|
46
|
-
SwitchesPanel.defaultProps = {
|
|
47
|
-
children: null,
|
|
48
|
-
className: null,
|
|
49
|
-
baseClassName: `${CLS_PREFIX}switches-panel`
|
|
50
|
-
};
|
|
51
30
|
export default SwitchesPanel;
|