@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,25 +1,22 @@
|
|
|
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 Icon, { ICON_SIZE_16 } from '../Icon';
|
|
8
|
-
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
8
|
/**
|
|
10
9
|
* `MenuBaseItem` component.
|
|
11
10
|
* @since 0.0.60
|
|
12
11
|
*/
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
12
|
const MenuBaseItem = _ref => {
|
|
16
13
|
let {
|
|
17
|
-
baseClassName,
|
|
18
14
|
className,
|
|
19
15
|
children,
|
|
20
16
|
icon,
|
|
21
17
|
label,
|
|
22
|
-
component: Component,
|
|
18
|
+
component: Component = 'div',
|
|
19
|
+
baseClassName = `${CLS_PREFIX}menu__base-item`,
|
|
23
20
|
...props
|
|
24
21
|
} = _ref;
|
|
25
22
|
return /*#__PURE__*/_jsxs(Component, {
|
|
@@ -39,42 +36,4 @@ const MenuBaseItem = _ref => {
|
|
|
39
36
|
})]
|
|
40
37
|
});
|
|
41
38
|
};
|
|
42
|
-
MenuBaseItem.propTypes = {
|
|
43
|
-
/**
|
|
44
|
-
* Icon
|
|
45
|
-
* @since 0.0.60
|
|
46
|
-
*/
|
|
47
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.element]),
|
|
48
|
-
/**
|
|
49
|
-
* Right label of item.
|
|
50
|
-
* @since 0.0.60
|
|
51
|
-
*/
|
|
52
|
-
label: PropTypes.node,
|
|
53
|
-
/**
|
|
54
|
-
* Content of the `MenuBaseItem`.
|
|
55
|
-
* @since 0.0.60
|
|
56
|
-
*/
|
|
57
|
-
children: PropTypes.node,
|
|
58
|
-
/**
|
|
59
|
-
* @ignore
|
|
60
|
-
*/
|
|
61
|
-
className: PropTypes.string,
|
|
62
|
-
/**
|
|
63
|
-
* @ignore
|
|
64
|
-
*/
|
|
65
|
-
baseClassName: PropTypes.string,
|
|
66
|
-
/**
|
|
67
|
-
* Component to render as the root element. Useful when rendering a `MenuBaseItem` as other component or tag.
|
|
68
|
-
* @since 1.9.1
|
|
69
|
-
*/
|
|
70
|
-
component: PropTypes.elementType
|
|
71
|
-
};
|
|
72
|
-
MenuBaseItem.defaultProps = {
|
|
73
|
-
icon: null,
|
|
74
|
-
label: null,
|
|
75
|
-
children: null,
|
|
76
|
-
className: null,
|
|
77
|
-
baseClassName: `${CLS_PREFIX}menu__base-item`,
|
|
78
|
-
component: 'div'
|
|
79
|
-
};
|
|
80
39
|
export default MenuBaseItem;
|
|
@@ -1,19 +1,16 @@
|
|
|
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";
|
|
8
6
|
/**
|
|
9
7
|
* `MenuDivider` is a part of [Menu](#!/Menu) component.
|
|
10
8
|
* @since 0.0.57
|
|
11
9
|
*/
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
10
|
const MenuDivider = _ref => {
|
|
14
11
|
let {
|
|
15
|
-
baseClassName,
|
|
16
12
|
className,
|
|
13
|
+
baseClassName = `${CLS_PREFIX}menu__divider`,
|
|
17
14
|
...props
|
|
18
15
|
} = _ref;
|
|
19
16
|
return /*#__PURE__*/_jsx("div", {
|
|
@@ -22,18 +19,4 @@ const MenuDivider = _ref => {
|
|
|
22
19
|
...props
|
|
23
20
|
});
|
|
24
21
|
};
|
|
25
|
-
MenuDivider.propTypes = {
|
|
26
|
-
/**
|
|
27
|
-
* @ignore
|
|
28
|
-
*/
|
|
29
|
-
className: PropTypes.string,
|
|
30
|
-
/**
|
|
31
|
-
* @ignore
|
|
32
|
-
*/
|
|
33
|
-
baseClassName: PropTypes.string
|
|
34
|
-
};
|
|
35
|
-
MenuDivider.defaultProps = {
|
|
36
|
-
className: null,
|
|
37
|
-
baseClassName: `${CLS_PREFIX}menu__divider`
|
|
38
|
-
};
|
|
39
22
|
export default MenuDivider;
|
|
@@ -1,21 +1,18 @@
|
|
|
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 MenuBaseItem from './MenuBaseItem';
|
|
8
|
-
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
7
|
/**
|
|
10
8
|
* `MenuHeader` is a part of [Menu](#!/Menu) component.
|
|
11
9
|
* @since 0.0.57
|
|
12
10
|
*/
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
11
|
const MenuHeader = _ref => {
|
|
15
12
|
let {
|
|
16
|
-
baseClassName,
|
|
17
13
|
className,
|
|
18
14
|
children,
|
|
15
|
+
baseClassName = `${CLS_PREFIX}menu__header`,
|
|
19
16
|
...props
|
|
20
17
|
} = _ref;
|
|
21
18
|
return /*#__PURE__*/_jsx(MenuBaseItem, {
|
|
@@ -25,24 +22,4 @@ const MenuHeader = _ref => {
|
|
|
25
22
|
children: children
|
|
26
23
|
});
|
|
27
24
|
};
|
|
28
|
-
MenuHeader.propTypes = {
|
|
29
|
-
/**
|
|
30
|
-
* Content of the `MenuHeader`.
|
|
31
|
-
* @since 0.0.57
|
|
32
|
-
*/
|
|
33
|
-
children: PropTypes.node,
|
|
34
|
-
/**
|
|
35
|
-
* @ignore
|
|
36
|
-
*/
|
|
37
|
-
className: PropTypes.string,
|
|
38
|
-
/**
|
|
39
|
-
* @ignore
|
|
40
|
-
*/
|
|
41
|
-
baseClassName: PropTypes.string
|
|
42
|
-
};
|
|
43
|
-
MenuHeader.defaultProps = {
|
|
44
|
-
children: null,
|
|
45
|
-
className: null,
|
|
46
|
-
baseClassName: `${CLS_PREFIX}menu__header`
|
|
47
|
-
};
|
|
48
25
|
export default MenuHeader;
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
3
|
+
import { cloneElement } from 'react';
|
|
5
4
|
import classNames from 'classnames';
|
|
6
5
|
import Tooltip from '../Tooltip';
|
|
7
6
|
import { CLS_PREFIX } from '../../constants';
|
|
8
7
|
import { createProxyProps } from '../utils';
|
|
9
8
|
import MenuBaseItem from './MenuBaseItem';
|
|
10
|
-
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
10
|
/**
|
|
12
11
|
* `MenuItem` is a part of [Menu](#!/Menu) component.
|
|
13
12
|
* @since 0.0.55
|
|
14
13
|
*/
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
14
|
const MenuItem = _ref => {
|
|
17
15
|
let {
|
|
18
|
-
baseClassName,
|
|
19
16
|
className,
|
|
20
17
|
children,
|
|
21
18
|
onClick,
|
|
22
|
-
active,
|
|
23
|
-
disabled,
|
|
24
19
|
icon,
|
|
25
20
|
label,
|
|
26
21
|
tooltip,
|
|
22
|
+
baseClassName = `${CLS_PREFIX}menu__item`,
|
|
23
|
+
disabled = false,
|
|
24
|
+
active = false,
|
|
27
25
|
...props
|
|
28
26
|
} = _ref;
|
|
29
27
|
const element = /*#__PURE__*/_jsx(MenuBaseItem, {
|
|
@@ -52,59 +50,4 @@ const MenuItem = _ref => {
|
|
|
52
50
|
}
|
|
53
51
|
return element;
|
|
54
52
|
};
|
|
55
|
-
MenuItem.propTypes = {
|
|
56
|
-
/**
|
|
57
|
-
* Whether item is active.
|
|
58
|
-
* @since 0.0.55
|
|
59
|
-
*/
|
|
60
|
-
active: PropTypes.bool,
|
|
61
|
-
/**
|
|
62
|
-
* Whether item is disabled.
|
|
63
|
-
* @since 0.0.55
|
|
64
|
-
*/
|
|
65
|
-
disabled: PropTypes.bool,
|
|
66
|
-
/**
|
|
67
|
-
* Icon
|
|
68
|
-
* @since 0.0.55
|
|
69
|
-
*/
|
|
70
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.element]),
|
|
71
|
-
/**
|
|
72
|
-
* Right label of item.
|
|
73
|
-
* @since 0.0.57
|
|
74
|
-
*/
|
|
75
|
-
label: PropTypes.node,
|
|
76
|
-
/**
|
|
77
|
-
* Tooltip for component.
|
|
78
|
-
* @since 2.6.1
|
|
79
|
-
*/
|
|
80
|
-
// eslint-disable-next-line react/require-default-props
|
|
81
|
-
tooltip: PropTypes.node,
|
|
82
|
-
/**
|
|
83
|
-
* Content of the `MenuItem`.
|
|
84
|
-
* @since 0.0.55
|
|
85
|
-
*/
|
|
86
|
-
children: PropTypes.node,
|
|
87
|
-
/**
|
|
88
|
-
* @ignore
|
|
89
|
-
*/
|
|
90
|
-
className: PropTypes.string,
|
|
91
|
-
/**
|
|
92
|
-
* @ignore
|
|
93
|
-
*/
|
|
94
|
-
baseClassName: PropTypes.string,
|
|
95
|
-
/**
|
|
96
|
-
* @ignore
|
|
97
|
-
*/
|
|
98
|
-
onClick: PropTypes.func
|
|
99
|
-
};
|
|
100
|
-
MenuItem.defaultProps = {
|
|
101
|
-
active: false,
|
|
102
|
-
disabled: false,
|
|
103
|
-
icon: null,
|
|
104
|
-
label: null,
|
|
105
|
-
children: null,
|
|
106
|
-
className: null,
|
|
107
|
-
baseClassName: `${CLS_PREFIX}menu__item`,
|
|
108
|
-
onClick: null
|
|
109
|
-
};
|
|
110
53
|
export default MenuItem;
|
|
@@ -1,22 +1,19 @@
|
|
|
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 MenuItem from './MenuItem';
|
|
8
|
-
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
7
|
/**
|
|
10
8
|
* `MenuSelectableItem` is a part of [Menu](#!/Menu) component.
|
|
11
9
|
* @since 0.0.57
|
|
12
10
|
*/
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
11
|
const MenuSelectableItem = _ref => {
|
|
15
12
|
let {
|
|
16
|
-
baseClassName,
|
|
17
13
|
className,
|
|
18
14
|
children,
|
|
19
|
-
selected,
|
|
15
|
+
selected = false,
|
|
16
|
+
baseClassName = `${CLS_PREFIX}menu__item`,
|
|
20
17
|
...props
|
|
21
18
|
} = _ref;
|
|
22
19
|
return /*#__PURE__*/_jsx(MenuItem, {
|
|
@@ -28,30 +25,4 @@ const MenuSelectableItem = _ref => {
|
|
|
28
25
|
children: children
|
|
29
26
|
});
|
|
30
27
|
};
|
|
31
|
-
MenuSelectableItem.propTypes = {
|
|
32
|
-
/**
|
|
33
|
-
* Whether item is selected.
|
|
34
|
-
* @since 0.0.57
|
|
35
|
-
*/
|
|
36
|
-
selected: PropTypes.bool,
|
|
37
|
-
/**
|
|
38
|
-
* Content of the `MenuSelectableItem`.
|
|
39
|
-
* @since 0.0.57
|
|
40
|
-
*/
|
|
41
|
-
children: PropTypes.node,
|
|
42
|
-
/**
|
|
43
|
-
* @ignore
|
|
44
|
-
*/
|
|
45
|
-
className: PropTypes.string,
|
|
46
|
-
/**
|
|
47
|
-
* @ignore
|
|
48
|
-
*/
|
|
49
|
-
baseClassName: PropTypes.string
|
|
50
|
-
};
|
|
51
|
-
MenuSelectableItem.defaultProps = {
|
|
52
|
-
selected: false,
|
|
53
|
-
children: null,
|
|
54
|
-
className: null,
|
|
55
|
-
baseClassName: `${CLS_PREFIX}menu__item`
|
|
56
|
-
};
|
|
57
28
|
export default MenuSelectableItem;
|
|
@@ -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";
|
|
@@ -11,32 +9,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
9
|
*/
|
|
12
10
|
const Plaintext = _ref => {
|
|
13
11
|
let {
|
|
14
|
-
baseClassName,
|
|
15
12
|
className,
|
|
16
|
-
children
|
|
13
|
+
children,
|
|
14
|
+
baseClassName = `${CLS_PREFIX}plaintext`
|
|
17
15
|
} = _ref;
|
|
18
16
|
return /*#__PURE__*/_jsx("pre", {
|
|
19
17
|
className: classNames(baseClassName, className),
|
|
20
18
|
children: children
|
|
21
19
|
});
|
|
22
20
|
};
|
|
23
|
-
Plaintext.propTypes = {
|
|
24
|
-
/**
|
|
25
|
-
* Content of the Plaintext
|
|
26
|
-
* @since 0.0.42
|
|
27
|
-
*/
|
|
28
|
-
children: PropTypes.node.isRequired,
|
|
29
|
-
/**
|
|
30
|
-
* @ignore
|
|
31
|
-
*/
|
|
32
|
-
className: PropTypes.string,
|
|
33
|
-
/**
|
|
34
|
-
* @ignore
|
|
35
|
-
*/
|
|
36
|
-
baseClassName: PropTypes.string
|
|
37
|
-
};
|
|
38
|
-
Plaintext.defaultProps = {
|
|
39
|
-
className: null,
|
|
40
|
-
baseClassName: `${CLS_PREFIX}plaintext`
|
|
41
|
-
};
|
|
42
21
|
export default Plaintext;
|
|
@@ -1,9 +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 React, { cloneElement, Component, createRef } from 'react';
|
|
5
4
|
import { findDOMNode } from 'react-dom';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
5
|
import classNames from 'classnames';
|
|
8
6
|
import Measure from 'react-measure';
|
|
9
7
|
import { CLS_PREFIX, Z_INDEX_POPOVER } from '../../constants';
|
|
@@ -15,6 +13,7 @@ import { isLikeText } from '../Translate';
|
|
|
15
13
|
import { wrapFunction } from '../utils';
|
|
16
14
|
import OnDarkContext from '../OnDarkContext';
|
|
17
15
|
import FocusTrap from '../FocusTrap';
|
|
16
|
+
import { cloneElement, Component, createRef } from 'react';
|
|
18
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
19
|
const PLACEMENT_MAP = {
|
|
@@ -25,12 +24,16 @@ const PLACEMENT_MAP = {
|
|
|
25
24
|
'bottom-left': 'bottom-end',
|
|
26
25
|
'bottom-right': 'bottom-start',
|
|
27
26
|
'left-top': 'left-end',
|
|
28
|
-
'left-bottom': 'left-start'
|
|
27
|
+
'left-bottom': 'left-start',
|
|
28
|
+
top: 'top',
|
|
29
|
+
right: 'right',
|
|
30
|
+
bottom: 'bottom',
|
|
31
|
+
left: 'left',
|
|
32
|
+
auto: 'auto'
|
|
29
33
|
};
|
|
30
34
|
const ARROW_HEIGHT = 26;
|
|
31
35
|
const isControlled = props => props.visible !== null;
|
|
32
36
|
const normalize = value => String(Number(value)) === String(value) ? `${value}px` : value;
|
|
33
|
-
|
|
34
37
|
/**
|
|
35
38
|
* `Popover` component is non-modal pop-up window used for providing additional information
|
|
36
39
|
* for an interface element. It also may contain Form with few fields or any other small content.
|
|
@@ -45,6 +48,9 @@ class Popover extends Component {
|
|
|
45
48
|
});
|
|
46
49
|
_defineProperty(this, "contentRef", /*#__PURE__*/createRef());
|
|
47
50
|
_defineProperty(this, "targetRef", /*#__PURE__*/createRef());
|
|
51
|
+
_defineProperty(this, "prevFocusElement", void 0);
|
|
52
|
+
_defineProperty(this, "popperData", void 0);
|
|
53
|
+
_defineProperty(this, "headerBounds", void 0);
|
|
48
54
|
_defineProperty(this, "checkArrowPosition", () => {
|
|
49
55
|
const {
|
|
50
56
|
title
|
|
@@ -60,10 +66,8 @@ class Popover extends Component {
|
|
|
60
66
|
actualPlacement,
|
|
61
67
|
arrowStyle
|
|
62
68
|
} = this.popperData;
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
} = arrowStyle;
|
|
66
|
-
const [direction] = actualPlacement.split('-');
|
|
69
|
+
const top = parseInt(arrowStyle?.top || '');
|
|
70
|
+
const [direction] = actualPlacement?.split('-') || [];
|
|
67
71
|
let newArrowInHeader = false;
|
|
68
72
|
const directionBottomOrPopoverLowEnough = direction === 'bottom' || top !== null && this.headerBounds && top < this.headerBounds.height - ARROW_HEIGHT / 2;
|
|
69
73
|
const rightDirection = direction !== 'top' && directionBottomOrPopoverLowEnough;
|
|
@@ -109,7 +113,7 @@ class Popover extends Component {
|
|
|
109
113
|
canCloseOnEscapePress,
|
|
110
114
|
autoFocus
|
|
111
115
|
} = this.props;
|
|
112
|
-
const isNeedFocus = autoFocus && canCloseOnEscapePress && this.prevFocusElement && (!document.activeElement || this.contentRef.current
|
|
116
|
+
const isNeedFocus = autoFocus && canCloseOnEscapePress && this.prevFocusElement && (!document.activeElement || this.contentRef.current?.contains(document.activeElement));
|
|
113
117
|
if (onClose) {
|
|
114
118
|
onClose();
|
|
115
119
|
} else {
|
|
@@ -118,7 +122,7 @@ class Popover extends Component {
|
|
|
118
122
|
});
|
|
119
123
|
}
|
|
120
124
|
if (isNeedFocus) {
|
|
121
|
-
this.prevFocusElement
|
|
125
|
+
this.prevFocusElement?.focus();
|
|
122
126
|
}
|
|
123
127
|
});
|
|
124
128
|
_defineProperty(this, "handleHeaderResize", contentRect => {
|
|
@@ -144,7 +148,7 @@ class Popover extends Component {
|
|
|
144
148
|
show: isControlled(props) ? props.visible : state.show
|
|
145
149
|
};
|
|
146
150
|
}
|
|
147
|
-
componentDidUpdate(
|
|
151
|
+
componentDidUpdate(_, prevState) {
|
|
148
152
|
const {
|
|
149
153
|
canCloseOnEscapePress,
|
|
150
154
|
autoFocus
|
|
@@ -198,7 +202,7 @@ class Popover extends Component {
|
|
|
198
202
|
} = this.state;
|
|
199
203
|
let behavior;
|
|
200
204
|
if (placement !== 'auto') {
|
|
201
|
-
const [direction] = placement
|
|
205
|
+
const [direction] = placement?.split('-') || [];
|
|
202
206
|
if (direction === 'top') {
|
|
203
207
|
behavior = ['top', 'bottom', 'right', 'left'];
|
|
204
208
|
} else if (direction === 'right') {
|
|
@@ -229,7 +233,7 @@ class Popover extends Component {
|
|
|
229
233
|
ref: measureRef,
|
|
230
234
|
className: `${baseClassName}__heading`,
|
|
231
235
|
children: [isLikeText(title) ? /*#__PURE__*/_jsx(Heading, {
|
|
232
|
-
level:
|
|
236
|
+
level: 5,
|
|
233
237
|
className: `${baseClassName}__title`,
|
|
234
238
|
children: title
|
|
235
239
|
}) : title, /*#__PURE__*/_jsxs("div", {
|
|
@@ -243,7 +247,7 @@ class Popover extends Component {
|
|
|
243
247
|
className: classNames(target.props.className, `${baseClassName}__target`),
|
|
244
248
|
onClick: wrapFunction(target.props.onClick, this.handleTargetClick)
|
|
245
249
|
});
|
|
246
|
-
const popperPlacement = PLACEMENT_MAP[placement]
|
|
250
|
+
const popperPlacement = placement ? PLACEMENT_MAP[placement] : undefined;
|
|
247
251
|
let wrapperStyle;
|
|
248
252
|
if (height) {
|
|
249
253
|
wrapperStyle = {
|
|
@@ -252,7 +256,7 @@ class Popover extends Component {
|
|
|
252
256
|
}
|
|
253
257
|
const content = /*#__PURE__*/_jsxs(FocusTrap, {
|
|
254
258
|
ref: this.contentRef,
|
|
255
|
-
onKeyUp: canCloseOnEscapePress && show ? this.hotkeyHandler :
|
|
259
|
+
onKeyUp: canCloseOnEscapePress && show ? this.hotkeyHandler : undefined,
|
|
256
260
|
className: `${baseClassName}__inner`,
|
|
257
261
|
style: wrapperStyle,
|
|
258
262
|
children: [height ? heading : heading || close, /*#__PURE__*/_jsx("div", {
|
|
@@ -296,104 +300,7 @@ class Popover extends Component {
|
|
|
296
300
|
}
|
|
297
301
|
// eslint-disable-next-line react/sort-comp
|
|
298
302
|
_defineProperty(Popover, "contextType", OnDarkContext);
|
|
299
|
-
Popover
|
|
300
|
-
/**
|
|
301
|
-
* The reference element used to position the popover.
|
|
302
|
-
* @since 0.0.65
|
|
303
|
-
*/
|
|
304
|
-
target: PropTypes.element.isRequired,
|
|
305
|
-
/**
|
|
306
|
-
* A React reference to the DOM element that needs for calculating the position of the popup.
|
|
307
|
-
* It is required only when visible or defaultVisible props are provided.
|
|
308
|
-
* @since 3.12.0
|
|
309
|
-
*/
|
|
310
|
-
targetRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
311
|
-
current: PropTypes.instanceOf(HTMLElement)
|
|
312
|
-
})]),
|
|
313
|
-
/**
|
|
314
|
-
* Popover visibility. For controlled component only.
|
|
315
|
-
* @since 0.0.65
|
|
316
|
-
*/
|
|
317
|
-
visible: PropTypes.bool,
|
|
318
|
-
/**
|
|
319
|
-
* Popover default (on init) visibility. For uncontrolled component only.
|
|
320
|
-
* @since 0.0.66
|
|
321
|
-
*/
|
|
322
|
-
defaultVisible: PropTypes.bool,
|
|
323
|
-
/**
|
|
324
|
-
* Popover title. Header will only be rendered if this prop is defined.
|
|
325
|
-
* @since 0.0.42
|
|
326
|
-
*/
|
|
327
|
-
title: PropTypes.node,
|
|
328
|
-
/**
|
|
329
|
-
* Click handler for close button. If it is not defined then default behavior (hide popover) will be used.
|
|
330
|
-
* @since 0.0.42
|
|
331
|
-
*/
|
|
332
|
-
onClose: PropTypes.func,
|
|
333
|
-
/**
|
|
334
|
-
* Popover placement
|
|
335
|
-
* @since 0.0.42
|
|
336
|
-
*/
|
|
337
|
-
placement: PropTypes.oneOf(['auto', 'top-left', 'top', 'top-right', 'right-top', 'right', 'right-bottom', 'bottom-right', 'bottom', 'bottom-left', 'left-bottom', 'left', 'left-top']),
|
|
338
|
-
/**
|
|
339
|
-
* Indicating if clicking outside the popover should close it.
|
|
340
|
-
* @since 0.0.65
|
|
341
|
-
*/
|
|
342
|
-
canCloseOnOutsideClick: PropTypes.bool,
|
|
343
|
-
/**
|
|
344
|
-
* Indicating if pressing the escape key should close the popover.
|
|
345
|
-
* @since 0.0.65
|
|
346
|
-
*/
|
|
347
|
-
canCloseOnEscapePress: PropTypes.bool,
|
|
348
|
-
/**
|
|
349
|
-
* Content of the Popover
|
|
350
|
-
* @since 0.0.42
|
|
351
|
-
*/
|
|
352
|
-
children: PropTypes.node,
|
|
353
|
-
/**
|
|
354
|
-
* Visual intent color to apply to component.
|
|
355
|
-
* @since 0.0.59
|
|
356
|
-
*/
|
|
357
|
-
intent: PropTypes.oneOf(['info', 'success', 'warning', 'danger']),
|
|
358
|
-
/**
|
|
359
|
-
* Undo predefined max-width.
|
|
360
|
-
* @since 2.4.0
|
|
361
|
-
*/
|
|
362
|
-
wide: PropTypes.bool,
|
|
363
|
-
/**
|
|
364
|
-
* Define the popover width.
|
|
365
|
-
* @since 3.2.0
|
|
366
|
-
*/
|
|
367
|
-
width: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']),
|
|
368
|
-
/**
|
|
369
|
-
* Define the popover height.
|
|
370
|
-
* @since 3.3.0
|
|
371
|
-
*/
|
|
372
|
-
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
373
|
-
/**
|
|
374
|
-
* A slot for buttons or links in the header.
|
|
375
|
-
* @since 3.16.0
|
|
376
|
-
*/
|
|
377
|
-
extra: PropTypes.node,
|
|
378
|
-
/**
|
|
379
|
-
* @ignore
|
|
380
|
-
*/
|
|
381
|
-
className: PropTypes.string,
|
|
382
|
-
/**
|
|
383
|
-
* @ignore
|
|
384
|
-
*/
|
|
385
|
-
baseClassName: PropTypes.string,
|
|
386
|
-
/**
|
|
387
|
-
* Boundaries element for preventOverflow property.
|
|
388
|
-
* @since 1.12.4
|
|
389
|
-
*/
|
|
390
|
-
boundariesElement: PropTypes.oneOfType([PropTypes.oneOf(['scrollParent', 'window', 'viewport']), PropTypes.instanceOf(HTMLElement)]),
|
|
391
|
-
/**
|
|
392
|
-
* @ignore
|
|
393
|
-
*/
|
|
394
|
-
autoFocus: PropTypes.bool
|
|
395
|
-
};
|
|
396
|
-
Popover.defaultProps = {
|
|
303
|
+
_defineProperty(Popover, "defaultProps", {
|
|
397
304
|
visible: null,
|
|
398
305
|
defaultVisible: false,
|
|
399
306
|
title: undefined,
|
|
@@ -412,5 +319,5 @@ Popover.defaultProps = {
|
|
|
412
319
|
boundariesElement: undefined,
|
|
413
320
|
autoFocus: true,
|
|
414
321
|
targetRef: undefined
|
|
415
|
-
};
|
|
322
|
+
});
|
|
416
323
|
export default Popover;
|