@plesk/ui-library 3.35.2 → 3.35.4

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.
Files changed (268) hide show
  1. package/cjs/components/Action/Action.js +1 -2
  2. package/cjs/components/Alert/Alert.js +1 -2
  3. package/cjs/components/AutoClosable/AutoClosable.js +1 -2
  4. package/cjs/components/AuxiliaryActions/AuxiliaryActions.js +1 -2
  5. package/cjs/components/Badge/Badge.js +1 -2
  6. package/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -2
  7. package/cjs/components/Button/Button.js +1 -2
  8. package/cjs/components/Button/ButtonContext.js +2 -4
  9. package/cjs/components/ButtonGroup/ButtonGroup.js +1 -2
  10. package/cjs/components/Card/Card.js +1 -2
  11. package/cjs/components/Card/CardButton.js +1 -2
  12. package/cjs/components/Card/PreviewPanel.js +1 -2
  13. package/cjs/components/CardList/CardList.js +5 -10
  14. package/cjs/components/CardList/CardListToolbar.js +1 -2
  15. package/cjs/components/Carousel/Carousel.js +1 -2
  16. package/cjs/components/Checkbox/Checkbox.js +1 -2
  17. package/cjs/components/ClosingConfirmation/locale/en-US.js +2 -3
  18. package/cjs/components/ClosingConfirmation/useClosingConfirmation.js +1 -2
  19. package/cjs/components/CodeEditor/CodeEditor.js +1 -2
  20. package/cjs/components/Columns/Column.js +1 -2
  21. package/cjs/components/Columns/Columns.js +1 -2
  22. package/cjs/components/ComboBox/ComboBox.js +1 -2
  23. package/cjs/components/ComboBox/ComboBoxOption.js +1 -2
  24. package/cjs/components/ComboBoxDropdown/ComboBoxDropdown.js +1 -2
  25. package/cjs/components/ConsoleOutput/ConsoleOutput.js +1 -2
  26. package/cjs/components/ContentLoader/ContentLoader.js +1 -2
  27. package/cjs/components/ContentLoader/IconsLoader.js +1 -2
  28. package/cjs/components/Cuttable/Cuttable.js +1 -2
  29. package/cjs/components/Dialog/Dialog.js +1 -2
  30. package/cjs/components/DistractionFreeModeContext/DistractionFreeModeContext.js +1 -2
  31. package/cjs/components/Drawer/Drawer.js +1 -2
  32. package/cjs/components/Drawer/DrawerProgress.js +1 -2
  33. package/cjs/components/Drawer/Header.js +1 -2
  34. package/cjs/components/Dropdown/Dropdown.js +1 -2
  35. package/cjs/components/Dropdown/locale/en-US.js +2 -3
  36. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessage.js +1 -2
  37. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageActions.js +1 -2
  38. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageDescription.js +1 -2
  39. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageSeparator.js +1 -2
  40. package/cjs/components/ExtendedStatusMessage/ExtendedStatusMessageTitle.js +1 -2
  41. package/cjs/components/Figure/Figure.js +1 -2
  42. package/cjs/components/FocusTrap/FocusTrap.js +1 -2
  43. package/cjs/components/Form/DisabledContext.js +1 -2
  44. package/cjs/components/Form/Form.js +1 -2
  45. package/cjs/components/Form/FormContext.js +1 -2
  46. package/cjs/components/Form/ScrollableElementFormContext.js +1 -2
  47. package/cjs/components/FormField/FormField.js +4 -4
  48. package/cjs/components/FormField/index.js +9 -2
  49. package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +1 -2
  50. package/cjs/components/FormFieldPassword/FormFieldPassword.js +1 -2
  51. package/cjs/components/FormFieldPassword/PasswordMeter.js +2 -3
  52. package/cjs/components/FormFieldPassword/estimatePassword.js +3 -5
  53. package/cjs/components/FormFieldPassword/generatePassword.js +1 -2
  54. package/cjs/components/FormFieldPassword/locale/en-US.js +2 -3
  55. package/cjs/components/FormFieldRadioButtons/FormFieldRadioButtons.js +65 -134
  56. package/cjs/components/FormFieldSelect/FormFieldSelect.js +1 -2
  57. package/cjs/components/FormFieldText/FormFieldText.js +56 -143
  58. package/cjs/components/Grid/Grid.js +1 -2
  59. package/cjs/components/GridCol/GridCol.js +1 -2
  60. package/cjs/components/Heading/Heading.js +1 -2
  61. package/cjs/components/Hint/Hint.js +1 -2
  62. package/cjs/components/Icon/Icon.js +10 -20
  63. package/cjs/components/Icon/constants.js +2 -4
  64. package/cjs/components/Icon/images/symbols.svg +39 -1
  65. package/cjs/components/Icon/oldIconNames.js +1 -2
  66. package/cjs/components/InPlaceEdit/InPlaceEdit.js +7 -29
  67. package/cjs/components/InPlaceEdit/locale/en-US.js +2 -3
  68. package/cjs/components/Input/Input.js +1 -2
  69. package/cjs/components/InputFile/InputFile.js +1 -2
  70. package/cjs/components/InputFile/locale/en-US.js +2 -3
  71. package/cjs/components/InputNumber/InputNumber.js +1 -2
  72. package/cjs/components/Item/Item.js +1 -2
  73. package/cjs/components/ItemLink/ItemLink.js +1 -2
  74. package/cjs/components/ItemList/ItemList.js +1 -2
  75. package/cjs/components/Label/Label.js +1 -2
  76. package/cjs/components/Layer/Layer.js +2 -4
  77. package/cjs/components/Layout/Layout.js +32 -123
  78. package/cjs/components/Link/Link.js +1 -2
  79. package/cjs/components/List/List.js +2 -2
  80. package/cjs/components/List/ListAction.js +1 -2
  81. package/cjs/components/List/ListActions.js +1 -2
  82. package/cjs/components/List/ListActionsDivider.js +1 -2
  83. package/cjs/components/List/ListEmptyView.js +1 -2
  84. package/cjs/components/List/ListOperation.js +2 -3
  85. package/cjs/components/List/ListOperationContext.js +1 -2
  86. package/cjs/components/LocaleProvider/LocaleProvider.js +1 -2
  87. package/cjs/components/Markdown/Markdown.js +1 -2
  88. package/cjs/components/Media/Media.js +5 -76
  89. package/cjs/components/Media/MediaSection.js +4 -26
  90. package/cjs/components/Menu/Menu.js +6 -58
  91. package/cjs/components/Menu/MenuBaseItem.js +5 -45
  92. package/cjs/components/Menu/MenuDivider.js +4 -20
  93. package/cjs/components/Menu/MenuHeader.js +4 -26
  94. package/cjs/components/Menu/MenuItem.js +7 -65
  95. package/cjs/components/Menu/MenuSelectableItem.js +5 -33
  96. package/cjs/components/OnDarkContext/OnDarkContext.js +1 -2
  97. package/cjs/components/Overlay/Overlay.js +1 -2
  98. package/cjs/components/PageHeader/PageHeader.js +1 -2
  99. package/cjs/components/Pagination/Pagination.js +2 -4
  100. package/cjs/components/Panel/Panel.js +1 -2
  101. package/cjs/components/Paragraph/Paragraph.js +1 -2
  102. package/cjs/components/Plaintext/Plaintext.js +3 -25
  103. package/cjs/components/Popover/Popover.js +22 -118
  104. package/cjs/components/Popper/Popper.js +1 -2
  105. package/cjs/components/Progress/Progress.js +1 -2
  106. package/cjs/components/ProgressBar/ProgressBar.js +1 -2
  107. package/cjs/components/ProgressBar/ProgressIndicator.js +1 -2
  108. package/cjs/components/ProgressDialog/ProgressDialog.js +1 -2
  109. package/cjs/components/ProgressDialogStep/ProgressDialogStep.js +1 -2
  110. package/cjs/components/ProgressStep/ProgressStep.js +7 -14
  111. package/cjs/components/Radio/Radio.js +1 -2
  112. package/cjs/components/Rating/Rating.js +1 -2
  113. package/cjs/components/ResponsiveContext/ResponsiveContext.js +1 -2
  114. package/cjs/components/Section/Section.js +30 -100
  115. package/cjs/components/Section/SectionItem.js +7 -46
  116. package/cjs/components/Section/index.js +16 -3
  117. package/cjs/components/SegmentedControl/SegmentedControl.js +1 -2
  118. package/cjs/components/Select/MultiValue.js +1 -2
  119. package/cjs/components/Select/Select.js +1 -2
  120. package/cjs/components/Select/SelectControl.js +1 -2
  121. package/cjs/components/Select/SelectOption.js +1 -2
  122. package/cjs/components/Select/SelectOptionGroup.js +1 -2
  123. package/cjs/components/Skeleton/Skeleton.js +1 -2
  124. package/cjs/components/Skeleton/SkeletonTabs.js +1 -2
  125. package/cjs/components/Skeleton/SkeletonText.js +1 -2
  126. package/cjs/components/Spinner/Spinner.js +1 -2
  127. package/cjs/components/SplitButton/SplitButton.js +1 -2
  128. package/cjs/components/Spot/Spot.js +1 -2
  129. package/cjs/components/Spot/SpotPopup.js +1 -2
  130. package/cjs/components/Spot/SpotPulsar.js +1 -2
  131. package/cjs/components/Squeezer/Squeezer.js +1 -2
  132. package/cjs/components/Status/Status.js +1 -2
  133. package/cjs/components/StatusMessage/StatusMessage.js +1 -2
  134. package/cjs/components/Subnav/Subnav.js +11 -58
  135. package/cjs/components/Subnav/index.js +6 -12
  136. package/cjs/components/Switch/Switch.js +1 -2
  137. package/cjs/components/SwitchesPanel/SwitchesPanel.js +1 -2
  138. package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +1 -2
  139. package/cjs/components/Tabs/SearchBar.js +1 -2
  140. package/cjs/components/Tabs/Tab.js +1 -2
  141. package/cjs/components/Tabs/Tabs.js +1 -2
  142. package/cjs/components/Text/Text.js +1 -2
  143. package/cjs/components/TextArea/TextArea.js +2 -3
  144. package/cjs/components/Toolbar/RegistryContext.js +1 -2
  145. package/cjs/components/Toolbar/Toolbar.js +6 -21
  146. package/cjs/components/Toolbar/ToolbarExpander.js +1 -2
  147. package/cjs/components/Toolbar/ToolbarGroup.js +21 -53
  148. package/cjs/components/Toolbar/ToolbarMenu.js +2 -3
  149. package/cjs/components/Tooltip/Tooltip.js +1 -2
  150. package/cjs/components/Tour/Tour.js +1 -2
  151. package/cjs/components/Translate/Translate.js +1 -2
  152. package/cjs/components/VerticalContext/VerticalContext.js +2 -4
  153. package/cjs/components/index.js +63 -55
  154. package/cjs/components/intentIconMap.js +2 -3
  155. package/cjs/index.js +1 -2
  156. package/cjs/publicPath.js +1 -2
  157. package/cjs/utils/types/DataAttributes.js +5 -0
  158. package/dist/images/symbols.svg +39 -1
  159. package/dist/plesk-ui-library-rtl.css +1 -1
  160. package/dist/plesk-ui-library-rtl.css.map +1 -1
  161. package/dist/plesk-ui-library.css +1 -1
  162. package/dist/plesk-ui-library.css.map +1 -1
  163. package/dist/plesk-ui-library.js +760 -1787
  164. package/dist/plesk-ui-library.js.map +1 -1
  165. package/dist/plesk-ui-library.min.js +5 -5
  166. package/dist/plesk-ui-library.min.js.map +1 -1
  167. package/esm/components/FormField/FormField.js +4 -2
  168. package/esm/components/FormField/index.js +2 -1
  169. package/esm/components/FormFieldPassword/PasswordMeter.js +1 -1
  170. package/esm/components/FormFieldRadioButtons/FormFieldRadioButtons.js +64 -132
  171. package/esm/components/FormFieldText/FormFieldText.js +55 -140
  172. package/esm/components/Icon/constants.js +2 -2
  173. package/esm/components/Icon/images/symbols.svg +39 -1
  174. package/esm/components/InPlaceEdit/InPlaceEdit.js +6 -25
  175. package/esm/components/Layout/Layout.js +32 -121
  176. package/esm/components/List/List.js +1 -0
  177. package/esm/components/List/ListOperation.js +1 -1
  178. package/esm/components/Media/Media.js +4 -74
  179. package/esm/components/Media/MediaSection.js +2 -25
  180. package/esm/components/Menu/Menu.js +5 -54
  181. package/esm/components/Menu/MenuBaseItem.js +4 -45
  182. package/esm/components/Menu/MenuDivider.js +2 -19
  183. package/esm/components/Menu/MenuHeader.js +2 -25
  184. package/esm/components/Menu/MenuItem.js +5 -62
  185. package/esm/components/Menu/MenuSelectableItem.js +3 -32
  186. package/esm/components/Plaintext/Plaintext.js +2 -23
  187. package/esm/components/Popover/Popover.js +21 -114
  188. package/esm/components/Section/Section.js +28 -97
  189. package/esm/components/Section/SectionItem.js +5 -41
  190. package/esm/components/Section/index.js +2 -1
  191. package/esm/components/Subnav/Subnav.js +10 -54
  192. package/esm/components/Subnav/index.js +1 -2
  193. package/esm/components/TextArea/TextArea.js +1 -1
  194. package/esm/components/Toolbar/Toolbar.js +7 -21
  195. package/esm/components/Toolbar/ToolbarGroup.js +17 -50
  196. package/esm/components/Toolbar/ToolbarMenu.js +1 -1
  197. package/esm/components/index.js +5 -10
  198. package/esm/index.js +1 -1
  199. package/esm/utils/types/DataAttributes.js +1 -0
  200. package/package.json +21 -21
  201. package/styleguide/build/bundle.17ad5082.js +2 -0
  202. package/styleguide/images/symbols.svg +39 -1
  203. package/styleguide/index.html +2 -2
  204. package/types/src/components/AutoClosable/AutoClosable.d.ts +23 -2
  205. package/types/src/components/Button/Button.d.ts +1 -4
  206. package/types/src/components/Columns/Column.d.ts +2 -2
  207. package/types/src/components/Columns/Columns.d.ts +2 -2
  208. package/types/src/components/Columns/index.d.ts +2 -0
  209. package/types/src/components/DistractionFreeModeContext/DistractionFreeModeContext.d.ts +1 -1
  210. package/types/src/components/DistractionFreeModeContext/index.d.ts +1 -0
  211. package/types/src/components/FormFieldPassword/PasswordMeter.d.ts +4 -3
  212. package/types/src/components/FormFieldRadioButtons/FormFieldRadioButtons.d.ts +72 -0
  213. package/types/src/components/FormFieldRadioButtons/index.d.ts +2 -0
  214. package/types/src/components/FormFieldSelect/FormFieldSelect.d.ts +1 -1
  215. package/types/src/components/FormFieldSelect/index.d.ts +1 -0
  216. package/types/src/components/FormFieldText/FormFieldText.d.ts +82 -0
  217. package/types/src/components/FormFieldText/index.d.ts +2 -0
  218. package/types/src/components/Icon/constants.d.ts +1 -1
  219. package/types/src/components/InPlaceEdit/InPlaceEdit.d.ts +50 -0
  220. package/types/src/components/InPlaceEdit/index.d.ts +2 -0
  221. package/types/src/components/Input/Input.d.ts +1 -1
  222. package/types/src/components/Input/index.d.ts +1 -0
  223. package/types/src/components/InputFile/InputFile.d.ts +3 -2
  224. package/types/src/components/InputFile/index.d.ts +1 -0
  225. package/types/src/components/InputNumber/InputNumber.d.ts +2 -2
  226. package/types/src/components/InputNumber/index.d.ts +1 -0
  227. package/types/src/components/Layout/Layout.d.ts +161 -0
  228. package/types/src/components/Layout/index.d.ts +2 -0
  229. package/types/src/components/Media/Media.d.ts +66 -0
  230. package/types/src/components/Media/MediaSection.d.ts +22 -0
  231. package/types/src/components/Media/index.d.ts +4 -0
  232. package/types/src/components/Menu/Menu.d.ts +40 -0
  233. package/types/src/components/Menu/MenuBaseItem.d.ts +41 -0
  234. package/types/src/components/Menu/MenuDivider.d.ts +16 -0
  235. package/types/src/components/Menu/MenuHeader.d.ts +22 -0
  236. package/types/src/components/Menu/MenuItem.d.ts +49 -0
  237. package/types/src/components/Menu/MenuSelectableItem.d.ts +28 -0
  238. package/types/src/components/Menu/index.d.ts +11 -0
  239. package/types/src/components/Panel/Panel.d.ts +2 -1
  240. package/types/src/components/Plaintext/Plaintext.d.ts +23 -0
  241. package/types/src/components/Plaintext/index.d.ts +2 -0
  242. package/types/src/components/Popover/Popover.d.ts +156 -0
  243. package/types/src/components/Popover/index.d.ts +2 -0
  244. package/types/src/components/Section/Section.d.ts +145 -0
  245. package/types/src/components/Section/SectionItem.d.ts +38 -0
  246. package/types/src/components/Section/index.d.ts +5 -0
  247. package/types/src/components/Spot/Spot.d.ts +3 -2
  248. package/types/src/components/Spot/SpotPulsar.d.ts +4 -2
  249. package/types/src/components/Spot/index.d.ts +1 -0
  250. package/types/src/components/Subnav/Subnav.d.ts +50 -0
  251. package/types/src/components/Subnav/index.d.ts +2 -0
  252. package/types/src/components/TextArea/TextArea.d.ts +4 -4
  253. package/types/src/components/TextArea/index.d.ts +1 -0
  254. package/types/src/components/Toolbar/RegistryContext.d.ts +2 -2
  255. package/types/src/components/Toolbar/Toolbar.d.ts +47 -0
  256. package/types/src/components/Toolbar/ToolbarGroup.d.ts +46 -0
  257. package/types/src/components/Toolbar/ToolbarMenu.d.ts +1 -1
  258. package/types/src/components/Toolbar/index.d.ts +5 -0
  259. package/types/src/components/Tour/Tour.d.ts +1 -1
  260. package/types/src/components/index.d.ts +21 -10
  261. package/types/src/utils/types/DataAttributes.d.ts +3 -0
  262. package/types/src/utils/types/index.d.ts +1 -0
  263. package/cjs/tests/index.js +0 -13
  264. package/cjs/tests/renderer.js +0 -33
  265. package/esm/tests/index.js +0 -3
  266. package/esm/tests/renderer.js +0 -25
  267. package/styleguide/build/bundle.6318f4a5.js +0 -2
  268. /package/styleguide/build/{bundle.6318f4a5.js.LICENSE.txt → bundle.17ad5082.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 React, { Component } from 'react';
5
- import PropTypes from 'prop-types';
4
+ import { Component } from 'react';
6
5
  import classNames from 'classnames';
7
6
  import { CLS_PREFIX } from '../../constants';
8
7
  import Button from '../Button';
@@ -49,7 +48,9 @@ class InPlaceEdit extends Component {
49
48
  });
50
49
  });
51
50
  _defineProperty(this, "handleEditOk", () => {
52
- this.props.onChange(this.state.draft);
51
+ if (this.props.onChange) {
52
+ this.props.onChange(this.state.draft);
53
+ }
53
54
  this.handleEdit();
54
55
  });
55
56
  }
@@ -120,30 +121,10 @@ class InPlaceEdit extends Component {
120
121
  });
121
122
  }
122
123
  }
123
- InPlaceEdit.propTypes = {
124
- /**
125
- * Value of the component.
126
- * @since 1.8.3
127
- */
128
- value: PropTypes.node,
129
- /**
130
- * Event handler of value change with inline editing form.
131
- * @since 1.8.3
132
- */
133
- onChange: PropTypes.func,
134
- /**
135
- * @ignore
136
- */
137
- className: PropTypes.string,
138
- /**
139
- * @ignore
140
- */
141
- baseClassName: PropTypes.string
142
- };
143
- InPlaceEdit.defaultProps = {
124
+ _defineProperty(InPlaceEdit, "defaultProps", {
144
125
  value: null,
145
126
  onChange: null,
146
127
  className: null,
147
128
  baseClassName: `${CLS_PREFIX}in-place-edit`
148
- };
129
+ });
149
130
  export default InPlaceEdit;
@@ -1,119 +1,13 @@
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, createRef } from 'react';
5
- import PropTypes from 'prop-types';
4
+ import { Component, createRef } from 'react';
6
5
  import Measure from 'react-measure';
7
6
  import classNames from 'classnames';
8
7
  import { CSSTransition } from 'react-transition-group';
9
8
  import { CLS_PREFIX } from '../../constants';
10
9
  import { jsx as _jsx } from "react/jsx-runtime";
11
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
- const propTypes = {
13
- /**
14
- * Type of the `Layout`
15
- * @since 1.4.0
16
- */
17
- type: PropTypes.oneOf(['fluid', 'simplified']),
18
- /**
19
- * Header content.
20
- * @since 1.4.0
21
- */
22
- header: PropTypes.node,
23
- /**
24
- * Define header position - always on top (fixed) or static.
25
- * @since 1.4.0
26
- */
27
- headerFixed: PropTypes.bool,
28
- /**
29
- * Additional content at the top of the header.
30
- * @since 3.2.0
31
- */
32
- headerAddon: PropTypes.node,
33
- /**
34
- * Sidebar content.
35
- * @since 1.4.0
36
- */
37
- sidebar: PropTypes.node,
38
- /**
39
- * Sidebar type.
40
- * @since 3.2.0
41
- */
42
- sidebarType: PropTypes.oneOf(['collapsed', 'folded']),
43
- /**
44
- * Define if sidebar can collapse.
45
- * @since 1.4.0
46
- */
47
- sidebarCollapsible: PropTypes.bool,
48
- /**
49
- * Sidebar collapsed state.
50
- * A boolean value is used for desktop mode only, but you can set an array with collapsed states for all modes, e.g. `['responsive', 'desktop']`.
51
- *
52
- * @since 1.4.0
53
- */
54
- sidebarCollapsed: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),
55
- /**
56
- * Additional content between header and main content.
57
- * @since 1.4.0
58
- */
59
- contentAddon: PropTypes.node,
60
- /**
61
- * Content header.
62
- * @since 3.0.0
63
- */
64
- contentHeader: PropTypes.node,
65
- /**
66
- * Footer content.
67
- * @since 1.4.0
68
- */
69
- footer: PropTypes.node,
70
- /**
71
- * Main content of the `Layout`.
72
- * @since 1.4.0
73
- */
74
- children: PropTypes.node,
75
- /**
76
- * Width of the content
77
- * @since 3.0.0
78
- */
79
- width: PropTypes.oneOf(['sm', 'md', 'lg']),
80
- /**
81
- * Sidebar onToggle handler.
82
- * The handler is called with two args:
83
- *
84
- * * Whether collapsed or not.
85
- * * In which mode: responsive or desktop.
86
- *
87
- * @since 1.4.0
88
- */
89
- onSidebarToggle: PropTypes.func,
90
- /**
91
- * @ignore
92
- */
93
- className: PropTypes.string,
94
- /**
95
- * @ignore
96
- */
97
- baseClassName: PropTypes.string
98
- };
99
- const defaultProps = {
100
- type: 'fluid',
101
- header: undefined,
102
- headerFixed: true,
103
- headerAddon: undefined,
104
- sidebar: undefined,
105
- sidebarType: 'collapsed',
106
- sidebarCollapsible: true,
107
- sidebarCollapsed: false,
108
- contentAddon: undefined,
109
- contentHeader: undefined,
110
- footer: undefined,
111
- width: undefined,
112
- onSidebarToggle: undefined,
113
- children: undefined,
114
- className: undefined,
115
- baseClassName: `${CLS_PREFIX}layout`
116
- };
117
11
  const subscribeMatchMedia = (query, handler) => {
118
12
  const mq = window.matchMedia(query);
119
13
  handler(mq);
@@ -128,7 +22,7 @@ const subscribeClickOutside = (refs, handler) => {
128
22
  let {
129
23
  current
130
24
  } = _ref;
131
- return !current || current.contains(event.target);
25
+ return current && current.contains(event.target);
132
26
  })) {
133
27
  return;
134
28
  }
@@ -141,18 +35,23 @@ const subscribeClickOutside = (refs, handler) => {
141
35
  document.removeEventListener('touchstart', listener);
142
36
  };
143
37
  };
144
-
145
38
  /**
146
39
  * @since 1.4.0
147
40
  */
148
41
  export default class Layout extends Component {
149
- constructor(props) {
150
- super(props);
42
+ constructor() {
43
+ super(...arguments);
151
44
  _defineProperty(this, "state", {
45
+ isSidebarClosedDesktop: false,
152
46
  isSidebarClosedResponsive: true,
153
47
  headerHeight: null,
154
48
  isResponsive: window.matchMedia('(max-width: 1022px)').matches
155
49
  });
50
+ _defineProperty(this, "headerRef", /*#__PURE__*/createRef());
51
+ _defineProperty(this, "sidebarRef", /*#__PURE__*/createRef());
52
+ _defineProperty(this, "responsiveSidebarTogglerRef", /*#__PURE__*/createRef());
53
+ _defineProperty(this, "unsubscribeMatchMedia", void 0);
54
+ _defineProperty(this, "unsubscribeClickOutside", void 0);
156
55
  _defineProperty(this, "handleMatchMedia", _ref2 => {
157
56
  let {
158
57
  matches
@@ -188,7 +87,7 @@ export default class Layout extends Component {
188
87
  bounds
189
88
  } = _ref3;
190
89
  this.setState({
191
- headerHeight: bounds.height
90
+ headerHeight: bounds?.height
192
91
  });
193
92
  });
194
93
  _defineProperty(this, "getSidebarClosed", () => {
@@ -199,9 +98,6 @@ export default class Layout extends Component {
199
98
  } = this.state;
200
99
  return isResponsive ? isSidebarClosedResponsive : isSidebarClosedDesktop;
201
100
  });
202
- this.headerRef = /*#__PURE__*/createRef();
203
- this.sidebarRef = /*#__PURE__*/createRef();
204
- this.responsiveSidebarTogglerRef = /*#__PURE__*/createRef();
205
101
  }
206
102
  static getDerivedStateFromProps(props, state) {
207
103
  const {
@@ -227,8 +123,8 @@ export default class Layout extends Component {
227
123
  this.unsubscribeClickOutside = subscribeClickOutside([this.sidebarRef, this.responsiveSidebarTogglerRef], this.handleClickOutside);
228
124
  }
229
125
  componentWillUnmount() {
230
- this.unsubscribeMatchMedia();
231
- this.unsubscribeClickOutside();
126
+ this.unsubscribeMatchMedia?.();
127
+ this.unsubscribeClickOutside?.();
232
128
  }
233
129
  renderHeader(_ref4) {
234
130
  let {
@@ -471,8 +367,7 @@ export default class Layout extends Component {
471
367
  }), /*#__PURE__*/_jsxs("div", {
472
368
  className: `${baseClassName}__container`,
473
369
  children: [this.renderSidebar({
474
- sidebar,
475
- headerFixed: headerPositionFixed
370
+ sidebar
476
371
  }), /*#__PURE__*/_jsxs("div", {
477
372
  className: `${baseClassName}__content`,
478
373
  children: [this.renderContentAddon({
@@ -490,5 +385,21 @@ export default class Layout extends Component {
490
385
  });
491
386
  }
492
387
  }
493
- Layout.propTypes = propTypes;
494
- Layout.defaultProps = defaultProps;
388
+ _defineProperty(Layout, "defaultProps", {
389
+ type: 'fluid',
390
+ header: undefined,
391
+ headerFixed: true,
392
+ headerAddon: undefined,
393
+ sidebar: undefined,
394
+ sidebarType: 'collapsed',
395
+ sidebarCollapsible: true,
396
+ sidebarCollapsed: false,
397
+ contentAddon: undefined,
398
+ contentHeader: undefined,
399
+ footer: undefined,
400
+ width: undefined,
401
+ onSidebarToggle: undefined,
402
+ children: undefined,
403
+ className: undefined,
404
+ baseClassName: `${CLS_PREFIX}layout`
405
+ });
@@ -1250,6 +1250,7 @@ class List extends Component {
1250
1250
  fill: true,
1251
1251
  children: content
1252
1252
  }), /*#__PURE__*/_jsx(Column, {
1253
+ className: `${baseClassName}__sidebar`,
1253
1254
  children: sidebar
1254
1255
  })]
1255
1256
  });
@@ -51,7 +51,7 @@ const ListOperation = _ref => {
51
51
  selectedRowTitle
52
52
  } = useContext(ListOperationContext);
53
53
  const [settings, setSettings] = useState(null);
54
- const targetRef = useRef();
54
+ const targetRef = useRef(null);
55
55
  if (! /*#__PURE__*/isValidElement(children)) {
56
56
  throw new Error('The "children" property must be an element.');
57
57
  }
@@ -1,11 +1,10 @@
1
1
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
2
2
 
3
- import React, { isValidElement, cloneElement, Children } from 'react';
4
- import PropTypes from 'prop-types';
3
+ import { isValidElement, cloneElement, Children } from 'react';
5
4
  import classNames from 'classnames';
6
5
  import { CLS_PREFIX } from '../../constants';
7
- import Icon, { ICON_SIZE_12, ICON_SIZE_16, ICON_SIZE_24, ICON_SIZE_32, ICON_SIZE_48, ICON_SIZE_64, ICON_SIZE_96, ICON_SIZE_128, ICON_SIZE_192 } from '../Icon';
8
6
  import Heading from '../Heading';
7
+ import Icon, { ICON_SIZE_12, ICON_SIZE_16, ICON_SIZE_24, ICON_SIZE_32, ICON_SIZE_48, ICON_SIZE_64, ICON_SIZE_96, ICON_SIZE_128, ICON_SIZE_192 } from '../Icon';
9
8
  import { jsx as _jsx } from "react/jsx-runtime";
10
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
10
  /**
@@ -16,7 +15,6 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
16
15
  */
17
16
  const Media = _ref => {
18
17
  let {
19
- baseClassName,
20
18
  className,
21
19
  children,
22
20
  title,
@@ -26,7 +24,8 @@ const Media = _ref => {
26
24
  imageSpacing,
27
25
  imageAlign,
28
26
  align,
29
- vertical,
27
+ vertical = false,
28
+ baseClassName = `${CLS_PREFIX}media`,
30
29
  ...props
31
30
  } = _ref;
32
31
  if (!imageSpacing && /*#__PURE__*/isValidElement(image) && image.type === Icon) {
@@ -90,73 +89,4 @@ const Media = _ref => {
90
89
  })]
91
90
  });
92
91
  };
93
- Media.propTypes = {
94
- /**
95
- * Title
96
- * @since 0.0.45
97
- */
98
- title: PropTypes.node,
99
- /**
100
- * Title addon
101
- * @since 0.0.68
102
- */
103
- titleAddon: PropTypes.node,
104
- /**
105
- * Title size
106
- * @deprecated Pass a component as a title prop
107
- * @since 0.0.68
108
- */
109
- titleSize: PropTypes.oneOf(['md', 'lg', 'xl']),
110
- /**
111
- * Image
112
- * @since 0.0.45
113
- */
114
- image: PropTypes.any,
115
- /**
116
- * Spacings between image and content
117
- * @since 0.3.0
118
- */
119
- imageSpacing: PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
120
- /**
121
- * Media object and content alignment
122
- * @since 3.19.0
123
- */
124
- align: PropTypes.oneOf(['start', 'center', 'end']),
125
- /**
126
- * Media object (image) alignment
127
- * @since 3.19.0
128
- */
129
- imageAlign: PropTypes.oneOf(['start', 'center', 'end']),
130
- /**
131
- * Media vertical direction
132
- * @since 3.19.0
133
- */
134
- vertical: PropTypes.bool,
135
- /**
136
- * Content of the `Media`.
137
- * @since 0.0.45
138
- */
139
- children: PropTypes.node,
140
- /**
141
- * @ignore
142
- */
143
- className: PropTypes.string,
144
- /**
145
- * @ignore
146
- */
147
- baseClassName: PropTypes.string
148
- };
149
- Media.defaultProps = {
150
- title: null,
151
- titleAddon: null,
152
- titleSize: null,
153
- image: null,
154
- imageSpacing: null,
155
- align: null,
156
- imageAlign: null,
157
- vertical: false,
158
- children: null,
159
- className: null,
160
- baseClassName: `${CLS_PREFIX}media`
161
- };
162
92
  export default Media;
@@ -1,20 +1,17 @@
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
  * `MediaSection` is a part of [Media](#!/Media) component.
10
8
  * @since 0.0.68
11
9
  */
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
10
  const MediaSection = _ref => {
14
11
  let {
15
- baseClassName,
16
12
  className,
17
13
  children,
14
+ baseClassName = `${CLS_PREFIX}media-section`,
18
15
  ...props
19
16
  } = _ref;
20
17
  return /*#__PURE__*/_jsx("div", {
@@ -23,24 +20,4 @@ const MediaSection = _ref => {
23
20
  children: children
24
21
  });
25
22
  };
26
- MediaSection.propTypes = {
27
- /**
28
- * Content of the `MediaSection`.
29
- * @since 0.0.68
30
- */
31
- children: PropTypes.node,
32
- /**
33
- * @ignore
34
- */
35
- className: PropTypes.string,
36
- /**
37
- * @ignore
38
- */
39
- baseClassName: PropTypes.string
40
- };
41
- MediaSection.defaultProps = {
42
- children: null,
43
- className: null,
44
- baseClassName: `${CLS_PREFIX}media-section`
45
- };
46
23
  export default MediaSection;
@@ -1,12 +1,11 @@
1
1
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
2
2
 
3
- import React, { Children, cloneElement, isValidElement, forwardRef, useRef, useMemo } from 'react';
4
3
  import { wrapFunction, safeInvoke, createFocusManager } from '../utils';
5
- import PropTypes from 'prop-types';
6
4
  import classNames from 'classnames';
7
5
  import { CLS_PREFIX } from '../../constants';
8
6
  import MenuItem from './MenuItem';
9
7
  import MenuSelectableItem from './MenuSelectableItem';
8
+ import { Children, cloneElement, isValidElement, forwardRef, useRef, useMemo } from 'react';
10
9
  import { jsx as _jsx } from "react/jsx-runtime";
11
10
  const hasIconItem = children => {
12
11
  let result = false;
@@ -17,7 +16,6 @@ const hasIconItem = children => {
17
16
  });
18
17
  return result;
19
18
  };
20
-
21
19
  /**
22
20
  * `Menu` component displays grouped controls for navigating the UI, performing actions on objects, or showing
23
21
  * options for [Lists](#!/List) (for example, sorting and filtering settings). `Menu` is most typically used in a
@@ -30,17 +28,17 @@ const hasIconItem = children => {
30
28
  */
31
29
  const Menu = /*#__PURE__*/forwardRef(function Menu(_ref, ref) {
32
30
  let {
33
- baseClassName,
34
31
  className,
35
32
  children,
36
33
  onItemClick,
37
- overlay,
38
34
  onKeyDown,
39
35
  onFocus,
40
36
  autoFocus,
37
+ overlay = false,
38
+ baseClassName = `${CLS_PREFIX}menu`,
41
39
  ...props
42
40
  } = _ref;
43
- const rootRef = useRef();
41
+ const rootRef = useRef(null);
44
42
  const {
45
43
  focusNext,
46
44
  focusPrev,
@@ -104,7 +102,7 @@ const Menu = /*#__PURE__*/forwardRef(function Menu(_ref, ref) {
104
102
  ...props,
105
103
  ref: el => {
106
104
  rootRef.current = el;
107
- if (ref) {
105
+ if (ref && typeof ref !== 'function') {
108
106
  ref.current = el;
109
107
  }
110
108
  },
@@ -115,51 +113,4 @@ const Menu = /*#__PURE__*/forwardRef(function Menu(_ref, ref) {
115
113
  });
116
114
  });
117
115
  Menu.displayName = 'Menu';
118
- Menu.propTypes = {
119
- /**
120
- * Triggered when menu item was clicked.
121
- * @since 0.0.56
122
- */
123
- onItemClick: PropTypes.func,
124
- /**
125
- * Content of the `Menu`.
126
- * @since 0.0.55
127
- */
128
- children: PropTypes.node,
129
- /**
130
- * @ignore
131
- */
132
- onKeyDown: PropTypes.func,
133
- /**
134
- * @ignore
135
- */
136
- onFocus: PropTypes.func,
137
- /**
138
- * @ignore
139
- */
140
- autoFocus: PropTypes.bool,
141
- /**
142
- * Show menu in overlay.
143
- * @ignore
144
- */
145
- overlay: PropTypes.bool,
146
- /**
147
- * @ignore
148
- */
149
- className: PropTypes.string,
150
- /**
151
- * @ignore
152
- */
153
- baseClassName: PropTypes.string
154
- };
155
- Menu.defaultProps = {
156
- onItemClick: null,
157
- children: null,
158
- overlay: false,
159
- className: null,
160
- baseClassName: `${CLS_PREFIX}menu`,
161
- onKeyDown: undefined,
162
- onFocus: undefined,
163
- autoFocus: undefined
164
- };
165
116
  export default Menu;
@@ -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;