@plesk/ui-library 3.35.0 → 3.35.2

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 (183) hide show
  1. package/cjs/components/Button/Button.js +1 -2
  2. package/cjs/components/Carousel/Carousel.js +25 -39
  3. package/cjs/components/Drawer/Header.js +71 -108
  4. package/cjs/components/Form/Form.js +5 -7
  5. package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.js +8 -67
  6. package/cjs/components/Grid/Grid.js +9 -71
  7. package/cjs/components/GridCol/GridCol.js +3 -54
  8. package/cjs/components/Icon/constants.js +2 -2
  9. package/cjs/components/Icon/images/symbols.svg +15 -1
  10. package/cjs/components/Link/Link.js +1 -2
  11. package/cjs/components/List/List.js +11 -8
  12. package/cjs/components/Progress/Progress.js +8 -28
  13. package/cjs/components/ProgressDialog/ProgressDialog.js +12 -85
  14. package/cjs/components/ProgressStep/ProgressStep.js +4 -46
  15. package/cjs/components/ProgressStep/index.js +36 -12
  16. package/cjs/components/Rating/Rating.js +5 -36
  17. package/cjs/components/Skeleton/index.js +2 -2
  18. package/cjs/components/SplitButton/SplitButton.js +1 -2
  19. package/cjs/components/Switch/Switch.js +43 -118
  20. package/cjs/components/SwitchesPanel/SwitchesPanel.js +3 -26
  21. package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -57
  22. package/cjs/components/Toaster/Toaster.js +3 -3
  23. package/cjs/components/Tooltip/Tooltip.js +35 -64
  24. package/cjs/components/Translate/Translate.js +10 -78
  25. package/cjs/components/Translate/index.js +4 -4
  26. package/cjs/components/Translate/isLikeText.js +27 -0
  27. package/cjs/components/index.js +14 -11
  28. package/cjs/index.js +1 -1
  29. package/cjs/tests/index.js +13 -0
  30. package/cjs/tests/renderer.js +33 -0
  31. package/dist/images/symbols.svg +15 -1
  32. package/dist/plesk-ui-library-rtl.css +1 -1
  33. package/dist/plesk-ui-library-rtl.css.map +1 -1
  34. package/dist/plesk-ui-library.css +1 -1
  35. package/dist/plesk-ui-library.css.map +1 -1
  36. package/dist/plesk-ui-library.js +567 -1139
  37. package/dist/plesk-ui-library.js.map +1 -1
  38. package/dist/plesk-ui-library.min.js +5 -5
  39. package/dist/plesk-ui-library.min.js.map +1 -1
  40. package/esm/components/Button/Button.js +1 -2
  41. package/esm/components/Carousel/Carousel.js +25 -37
  42. package/esm/components/Drawer/Header.js +70 -107
  43. package/esm/components/Form/Form.js +5 -7
  44. package/esm/components/FormFieldCheckbox/FormFieldCheckbox.js +8 -65
  45. package/esm/components/Grid/Grid.js +9 -69
  46. package/esm/components/GridCol/GridCol.js +2 -55
  47. package/esm/components/Icon/constants.js +2 -2
  48. package/esm/components/Icon/images/symbols.svg +15 -1
  49. package/esm/components/Link/Link.js +1 -2
  50. package/esm/components/List/List.js +11 -8
  51. package/esm/components/Progress/Progress.js +8 -26
  52. package/esm/components/ProgressDialog/ProgressDialog.js +12 -83
  53. package/esm/components/ProgressStep/ProgressStep.js +6 -48
  54. package/esm/components/ProgressStep/index.js +1 -2
  55. package/esm/components/Rating/Rating.js +5 -36
  56. package/esm/components/Skeleton/index.js +2 -2
  57. package/esm/components/SplitButton/SplitButton.js +1 -2
  58. package/esm/components/Switch/Switch.js +43 -116
  59. package/esm/components/SwitchesPanel/SwitchesPanel.js +3 -24
  60. package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -55
  61. package/esm/components/Toaster/Toaster.js +3 -1
  62. package/esm/components/Tooltip/Tooltip.js +36 -62
  63. package/esm/components/Translate/Translate.js +9 -73
  64. package/esm/components/Translate/index.js +2 -1
  65. package/esm/components/Translate/isLikeText.js +19 -0
  66. package/esm/components/index.js +1 -2
  67. package/esm/index.js +1 -1
  68. package/esm/tests/index.js +3 -0
  69. package/esm/tests/renderer.js +25 -0
  70. package/package.json +25 -22
  71. package/styleguide/build/bundle.6318f4a5.js +2 -0
  72. package/styleguide/images/symbols.svg +15 -1
  73. package/styleguide/index.html +2 -2
  74. package/types/src/components/Button/Button.d.ts +2 -3
  75. package/types/src/components/Carousel/Carousel.d.ts +58 -0
  76. package/types/src/components/Carousel/index.d.ts +2 -0
  77. package/types/src/components/Dialog/Dialog.d.ts +1 -1
  78. package/types/src/components/Dialog/index.d.ts +1 -1
  79. package/types/src/components/Drawer/DrawerProgress.d.ts +3 -3
  80. package/types/src/components/Drawer/Header.d.ts +4 -20
  81. package/types/src/components/Form/Form.d.ts +5 -0
  82. package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.d.ts +53 -0
  83. package/types/src/components/FormFieldCheckbox/index.d.ts +2 -0
  84. package/types/src/components/FormFieldPassword/generatePassword.d.ts +2 -0
  85. package/types/src/components/Grid/Grid.d.ts +97 -0
  86. package/types/src/components/Grid/index.d.ts +2 -0
  87. package/types/src/components/GridCol/GridCol.d.ts +53 -0
  88. package/types/src/components/GridCol/index.d.ts +2 -0
  89. package/types/src/components/Icon/constants.d.ts +1 -1
  90. package/types/src/components/ItemList/index.d.ts +1 -0
  91. package/types/src/components/Link/Link.d.ts +1 -2
  92. package/types/src/components/LocaleProvider/LocaleProvider.d.ts +1 -1
  93. package/types/src/components/Pagination/index.d.ts +1 -0
  94. package/types/src/components/Panel/index.d.ts +1 -0
  95. package/types/src/components/Progress/Progress.d.ts +49 -0
  96. package/types/src/components/Progress/index.d.ts +2 -0
  97. package/types/src/components/ProgressDialog/ProgressDialog.d.ts +125 -0
  98. package/types/src/components/ProgressDialog/index.d.ts +2 -0
  99. package/types/src/components/ProgressStep/ProgressStep.d.ts +69 -0
  100. package/types/src/components/ProgressStep/index.d.ts +2 -0
  101. package/types/src/components/Rating/Rating.d.ts +27 -0
  102. package/types/src/components/Rating/index.d.ts +2 -0
  103. package/types/src/components/Skeleton/Skeleton.d.ts +3 -5
  104. package/types/src/components/Skeleton/SkeletonTabs.d.ts +4 -4
  105. package/types/src/components/Skeleton/SkeletonText.d.ts +2 -2
  106. package/types/src/components/Skeleton/index.d.ts +4 -1
  107. package/types/src/components/SplitButton/SplitButton.d.ts +1 -2
  108. package/types/src/components/Switch/Switch.d.ts +58 -0
  109. package/types/src/components/Switch/index.d.ts +2 -0
  110. package/types/src/components/SwitchesPanel/SwitchesPanel.d.ts +24 -0
  111. package/types/src/components/SwitchesPanel/index.d.ts +2 -0
  112. package/types/src/components/SwitchesPanelItem/SwitchesPanelItem.d.ts +78 -0
  113. package/types/src/components/SwitchesPanelItem/index.d.ts +2 -0
  114. package/types/src/components/TextArea/index.d.ts +1 -0
  115. package/types/src/components/Tooltip/Tooltip.d.ts +61 -0
  116. package/types/src/components/Tooltip/index.d.ts +2 -0
  117. package/types/src/components/Translate/Translate.d.ts +56 -0
  118. package/types/src/components/Translate/index.d.ts +3 -0
  119. package/types/src/components/Translate/isLikeText.d.ts +2 -0
  120. package/types/src/components/index.d.ts +15 -2
  121. package/types/src/components/utils.d.ts +1 -1
  122. package/cjs/components/Alert/Alert.stories.js +0 -34
  123. package/cjs/components/Button/Button.stories.js +0 -109
  124. package/cjs/components/Cuttable/Cuttable.stories.js +0 -46
  125. package/cjs/components/Dialog/Dialog.stories.js +0 -49
  126. package/cjs/components/Drawer/Drawer.stories.js +0 -65
  127. package/cjs/components/Form/Form.stories.js +0 -35
  128. package/cjs/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +0 -32
  129. package/cjs/components/Icon/Icon.stories.js +0 -32
  130. package/cjs/components/ItemLink/ItemLink.stories.js +0 -20
  131. package/cjs/components/ItemList/ItemList.stories.js +0 -122
  132. package/cjs/components/List/List.stories.js +0 -152
  133. package/cjs/components/Markdown/Markdown.stories.js +0 -51
  134. package/cjs/components/Menu/Menu.stories.js +0 -77
  135. package/cjs/components/Popover/Popover.stories.js +0 -60
  136. package/cjs/components/Select/Select.stories.js +0 -57
  137. package/cjs/components/Skeleton/Skeleton.stories.js +0 -24
  138. package/cjs/components/Skeleton/SkeletonTabs.stories.js +0 -15
  139. package/cjs/components/Skeleton/SkeletonText.stories.js +0 -33
  140. package/cjs/components/Status/Status.stories.js +0 -19
  141. package/cjs/components/Tabs/Tabs.stories.js +0 -24
  142. package/esm/components/Alert/Alert.stories.js +0 -27
  143. package/esm/components/Button/Button.stories.js +0 -99
  144. package/esm/components/Cuttable/Cuttable.stories.js +0 -39
  145. package/esm/components/Dialog/Dialog.stories.js +0 -42
  146. package/esm/components/Drawer/Drawer.stories.js +0 -56
  147. package/esm/components/Form/Form.stories.js +0 -27
  148. package/esm/components/FormFieldCheckbox/FormFieldCheckbox.stories.js +0 -23
  149. package/esm/components/Icon/Icon.stories.js +0 -23
  150. package/esm/components/ItemLink/ItemLink.stories.js +0 -12
  151. package/esm/components/ItemList/ItemList.stories.js +0 -109
  152. package/esm/components/List/List.stories.js +0 -139
  153. package/esm/components/Markdown/Markdown.stories.js +0 -43
  154. package/esm/components/Menu/Menu.stories.js +0 -65
  155. package/esm/components/Popover/Popover.stories.js +0 -52
  156. package/esm/components/Select/Select.stories.js +0 -48
  157. package/esm/components/Skeleton/Skeleton.stories.js +0 -15
  158. package/esm/components/Skeleton/SkeletonTabs.stories.js +0 -7
  159. package/esm/components/Skeleton/SkeletonText.stories.js +0 -23
  160. package/esm/components/Status/Status.stories.js +0 -11
  161. package/esm/components/Tabs/Tabs.stories.js +0 -16
  162. package/styleguide/build/bundle.2a886a79.js +0 -2
  163. package/types/src/components/Alert/Alert.stories.d.ts +0 -11
  164. package/types/src/components/Button/Button.stories.d.ts +0 -17
  165. package/types/src/components/Cuttable/Cuttable.stories.d.ts +0 -17
  166. package/types/src/components/Dialog/Dialog.stories.d.ts +0 -25
  167. package/types/src/components/Drawer/Drawer.stories.d.ts +0 -43
  168. package/types/src/components/Form/Form.stories.d.ts +0 -13
  169. package/types/src/components/FormFieldCheckbox/FormFieldCheckbox.stories.d.ts +0 -20
  170. package/types/src/components/Icon/Icon.stories.d.ts +0 -7
  171. package/types/src/components/ItemLink/ItemLink.stories.d.ts +0 -12
  172. package/types/src/components/ItemList/ItemList.stories.d.ts +0 -172
  173. package/types/src/components/List/List.stories.d.ts +0 -30
  174. package/types/src/components/Markdown/Markdown.stories.d.ts +0 -10
  175. package/types/src/components/Menu/Menu.stories.d.ts +0 -20
  176. package/types/src/components/Popover/Popover.stories.d.ts +0 -25
  177. package/types/src/components/Select/Select.stories.d.ts +0 -12
  178. package/types/src/components/Skeleton/Skeleton.stories.d.ts +0 -15
  179. package/types/src/components/Skeleton/SkeletonTabs.stories.d.ts +0 -5
  180. package/types/src/components/Skeleton/SkeletonText.stories.d.ts +0 -23
  181. package/types/src/components/Status/Status.stories.d.ts +0 -11
  182. package/types/src/components/Tabs/Tabs.stories.d.ts +0 -10
  183. /package/styleguide/build/{bundle.2a886a79.js.LICENSE.txt → bundle.6318f4a5.js.LICENSE.txt} +0 -0
@@ -201,7 +201,6 @@ Button.defaultProps = {
201
201
  /**
202
202
  * `Button` component is used for executing actions, changing the application state, opening forms or dialog windows, and submitting data.
203
203
  * As a rule, you should not use buttons for navigation between individual pages (use `Link` instead).
204
- *
205
- * Since: 0.0.37
204
+ * @since 0.0.37
206
205
  */
207
206
  export default Button;
@@ -2,8 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
3
3
 
4
4
  import { isRtl } from '../../utils';
5
- import React, { Component, createRef } from 'react';
6
- import PropTypes from 'prop-types';
5
+ import { Component, createRef } from 'react';
7
6
  import classNames from 'classnames';
8
7
  import Measure from 'react-measure';
9
8
  import { CLS_PREFIX } from '../../constants';
@@ -18,7 +17,6 @@ const calcWidths = node => {
18
17
  totalWidth
19
18
  };
20
19
  };
21
-
22
20
  /**
23
21
  * Carousel component is used for optimizing page space by displaying only some parts
24
22
  * of entire content in a cyclic view.
@@ -35,23 +33,27 @@ class Carousel extends Component {
35
33
  slideWidths: [],
36
34
  totalWidth: 0
37
35
  });
38
- this.speed = 500;
39
- this.movingCallback = null;
40
- this.playSpeed = 5000;
41
- this.playTimer = null;
36
+ _defineProperty(this, "speed", 500);
37
+ _defineProperty(this, "playSpeed", 5000);
38
+ _defineProperty(this, "isRtl", void 0);
39
+ _defineProperty(this, "playTimer", null);
40
+ _defineProperty(this, "movingCallback", null);
41
+ _defineProperty(this, "rootRef", /*#__PURE__*/createRef());
42
+ _defineProperty(this, "genuineRef", /*#__PURE__*/createRef());
42
43
  this.handlePrevClick = this.handlePrevClick.bind(this);
43
44
  this.handleNextClick = this.handleNextClick.bind(this);
44
45
  this.stop = this.stop.bind(this);
45
46
  this.play = this.play.bind(this);
46
47
  this.handleResize = this.handleResize.bind(this);
47
- this.rootRef = /*#__PURE__*/createRef();
48
- this.genuineRef = /*#__PURE__*/createRef();
49
48
  }
50
49
  componentDidMount() {
51
50
  this.isRtl = isRtl();
52
51
  this.play();
53
52
  }
54
53
  componentDidUpdate() {
54
+ if (!this.rootRef.current || !this.genuineRef.current) {
55
+ return;
56
+ }
55
57
  const {
56
58
  width
57
59
  } = this.rootRef.current.getBoundingClientRect();
@@ -69,7 +71,9 @@ class Carousel extends Component {
69
71
  }
70
72
  componentWillUnmount() {
71
73
  this.stop();
72
- clearTimeout(this.movingCallback);
74
+ if (this.movingCallback) {
75
+ clearTimeout(this.movingCallback);
76
+ }
73
77
  }
74
78
  handlePrevClick() {
75
79
  this.stop();
@@ -120,11 +124,12 @@ class Carousel extends Component {
120
124
  }
121
125
  handleResize(_ref) {
122
126
  let {
123
- bounds: {
124
- width
125
- }
127
+ bounds
126
128
  } = _ref;
127
129
  const node = this.genuineRef.current;
130
+ if (!node) {
131
+ return;
132
+ }
128
133
  const {
129
134
  slideWidths,
130
135
  totalWidth
@@ -132,7 +137,7 @@ class Carousel extends Component {
132
137
  this.setState({
133
138
  slideWidths,
134
139
  totalWidth,
135
- showControls: width < totalWidth
140
+ showControls: (bounds?.width || 0) < totalWidth
136
141
  });
137
142
  }
138
143
  listStyle() {
@@ -160,8 +165,8 @@ class Carousel extends Component {
160
165
  return {
161
166
  WebkitTransform: `translateX(${x ? `${x}px` : 0})`,
162
167
  transform: `translateX(${x ? `${x}px` : 0})`,
163
- WebkitTransition: moving ? `-webkit-transform ${this.speed}ms ease` : null,
164
- transition: moving ? `transform ${this.speed}ms ease` : null
168
+ WebkitTransition: moving ? `-webkit-transform ${this.speed}ms ease` : undefined,
169
+ transition: moving ? `transform ${this.speed}ms ease` : undefined
165
170
  };
166
171
  }
167
172
  render() {
@@ -177,9 +182,7 @@ class Carousel extends Component {
177
182
  return /*#__PURE__*/_jsx(Measure, {
178
183
  onResize: this.handleResize,
179
184
  bounds: true,
180
- innerRef: node => {
181
- this.rootRef.current = node;
182
- },
185
+ innerRef: this.rootRef,
183
186
  children: _ref2 => {
184
187
  let {
185
188
  measureRef
@@ -190,7 +193,7 @@ class Carousel extends Component {
190
193
  ...props,
191
194
  children: [/*#__PURE__*/_jsxs("div", {
192
195
  className: `${baseClassName}__slides`,
193
- style: showControls ? this.listStyle() : null,
196
+ style: showControls ? this.listStyle() : undefined,
194
197
  children: [showControls && children, /*#__PURE__*/_jsx("div", {
195
198
  className: `${baseClassName}__genuine-slides`,
196
199
  ref: this.genuineRef,
@@ -223,24 +226,9 @@ class Carousel extends Component {
223
226
  });
224
227
  }
225
228
  }
226
- Carousel.propTypes = {
227
- /**
228
- * Slides
229
- * @since 0.0.42
230
- */
231
- children: PropTypes.node,
232
- /**
233
- * @ignore
234
- */
235
- className: PropTypes.string,
236
- /**
237
- * @ignore
238
- */
239
- baseClassName: PropTypes.string
240
- };
241
- Carousel.defaultProps = {
229
+ _defineProperty(Carousel, "defaultProps", {
242
230
  children: null,
243
231
  className: null,
244
232
  baseClassName: `${CLS_PREFIX}carousel`
245
- };
233
+ });
246
234
  export default Carousel;
@@ -1,131 +1,94 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
1
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
3
2
 
4
3
  import { isRtl } from '../../utils';
5
- import { Component } from 'react';
6
4
  import classNames from 'classnames';
7
5
  import { CLS_PREFIX } from '../../constants';
8
6
  import Button from '../Button';
9
7
  import Icon from '../Icon';
10
8
  import { jsx as _jsx } from "react/jsx-runtime";
11
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
- export default class Header extends Component {
13
- constructor() {
14
- super(...arguments);
15
- _defineProperty(this, "isRtl", false);
16
- }
17
- componentDidMount() {
18
- this.isRtl = isRtl();
19
- }
20
- renderBackButton() {
21
- const {
22
- baseClassName,
23
- onClose
24
- } = this.props;
25
- return /*#__PURE__*/_jsx(Button, {
26
- ghost: true,
27
- className: classNames(`${baseClassName}__button`, `${baseClassName}__button--back`),
28
- size: "lg",
29
- icon: /*#__PURE__*/_jsx(Icon, {
30
- name: "chevron-left",
31
- flipHorizontal: this.isRtl,
32
- className: `${baseClassName}__icon`
33
- }),
34
- onClick: onClose
35
- });
36
- }
37
- renderHideButton() {
38
- const {
39
- baseClassName,
40
- onClose
41
- } = this.props;
42
- return /*#__PURE__*/_jsx(Button, {
43
- ghost: true,
44
- className: classNames(`${baseClassName}__button`, `${baseClassName}__button--hide`),
45
- size: "lg",
46
- icon: /*#__PURE__*/_jsx(Icon, {
47
- className: `${baseClassName}__icon`,
48
- name: "minimize"
49
- }),
50
- onClick: onClose
51
- });
52
- }
53
- renderCloseButton() {
10
+ const Header = _ref => {
11
+ let {
12
+ baseClassName = `${CLS_PREFIX}drawer-header`,
13
+ onClose,
14
+ children,
15
+ backButton = false,
16
+ hideButton = false,
17
+ tabs,
18
+ ...props
19
+ } = _ref;
20
+ const renderBackButton = () => /*#__PURE__*/_jsx(Button, {
21
+ ghost: true,
22
+ className: classNames(`${baseClassName}__button`, `${baseClassName}__button--back`),
23
+ size: "lg",
24
+ icon: /*#__PURE__*/_jsx(Icon, {
25
+ name: "chevron-left",
26
+ flipHorizontal: isRtl(),
27
+ className: `${baseClassName}__icon`
28
+ }),
29
+ onClick: onClose
30
+ });
31
+ const renderHideButton = () => /*#__PURE__*/_jsx(Button, {
32
+ ghost: true,
33
+ className: classNames(`${baseClassName}__button`, `${baseClassName}__button--hide`),
34
+ size: "lg",
35
+ icon: /*#__PURE__*/_jsx(Icon, {
36
+ className: `${baseClassName}__icon`,
37
+ name: "minimize"
38
+ }),
39
+ onClick: onClose
40
+ });
41
+ const renderCloseButton = function () {
54
42
  let {
55
43
  disabled = false
56
44
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
57
- const {
58
- baseClassName,
59
- onClose
60
- } = this.props;
61
45
  return /*#__PURE__*/_jsx(Button, {
62
46
  ghost: true,
63
47
  className: classNames(`${baseClassName}__button`, `${baseClassName}__button--close`),
64
48
  size: "lg",
65
49
  icon: /*#__PURE__*/_jsx(Icon, {
66
- name: 'cross-mark',
50
+ name: "cross-mark",
67
51
  className: `${baseClassName}__icon`
68
52
  }),
69
53
  onClick: onClose,
70
54
  disabled: disabled
71
55
  });
72
- }
73
- render() {
74
- const {
75
- baseClassName,
76
- onClose,
77
- children,
78
- backButton,
79
- hideButton,
80
- tabs,
81
- ...props
82
- } = this.props;
83
- let prefix;
84
- let suffix;
85
- if (onClose) {
86
- switch (true) {
87
- case backButton:
88
- prefix = this.renderBackButton();
89
- break;
90
- case hideButton:
91
- suffix = /*#__PURE__*/_jsxs("div", {
92
- className: `${baseClassName}__actions`,
93
- children: [this.renderHideButton(), this.renderCloseButton({
94
- disabled: true
95
- })]
96
- });
97
- break;
98
- default:
99
- suffix = /*#__PURE__*/_jsx("div", {
100
- className: `${baseClassName}__actions`,
101
- children: this.renderCloseButton()
102
- });
103
- break;
104
- }
56
+ };
57
+ let prefix;
58
+ let suffix;
59
+ if (onClose) {
60
+ if (backButton) {
61
+ prefix = renderBackButton();
62
+ } else if (hideButton) {
63
+ suffix = /*#__PURE__*/_jsxs("div", {
64
+ className: `${baseClassName}__actions`,
65
+ children: [renderHideButton(), renderCloseButton({
66
+ disabled: true
67
+ })]
68
+ });
69
+ } else {
70
+ suffix = /*#__PURE__*/_jsx("div", {
71
+ className: `${baseClassName}__actions`,
72
+ children: renderCloseButton()
73
+ });
105
74
  }
106
- return /*#__PURE__*/_jsx("div", {
107
- className: baseClassName,
108
- ...props,
109
- children: /*#__PURE__*/_jsxs("div", {
110
- className: `${baseClassName}__inner`,
111
- children: [prefix, /*#__PURE__*/_jsxs("div", {
112
- className: `${baseClassName}__content`,
113
- children: [children, tabs && /*#__PURE__*/_jsx("div", {
114
- className: `${baseClassName}__tabs`,
115
- children: /*#__PURE__*/_jsx("div", {
116
- className: `${baseClassName}__tabs-inner`,
117
- children: tabs
118
- })
119
- })]
120
- }), suffix]
121
- })
122
- });
123
75
  }
124
- }
125
- _defineProperty(Header, "defaultProps", {
126
- onClose: null,
127
- baseClassName: `${CLS_PREFIX}drawer-header`,
128
- backButton: false,
129
- hideButton: false,
130
- tabs: undefined
131
- });
76
+ return /*#__PURE__*/_jsx("div", {
77
+ className: baseClassName,
78
+ ...props,
79
+ children: /*#__PURE__*/_jsxs("div", {
80
+ className: `${baseClassName}__inner`,
81
+ children: [prefix, /*#__PURE__*/_jsxs("div", {
82
+ className: `${baseClassName}__content`,
83
+ children: [children, tabs && /*#__PURE__*/_jsx("div", {
84
+ className: `${baseClassName}__tabs`,
85
+ children: /*#__PURE__*/_jsx("div", {
86
+ className: `${baseClassName}__tabs-inner`,
87
+ children: tabs
88
+ })
89
+ })]
90
+ }), suffix]
91
+ })
92
+ });
93
+ };
94
+ export default Header;
@@ -367,13 +367,6 @@ class Form extends Component {
367
367
  });
368
368
  }
369
369
  }
370
-
371
- /**
372
- * `Form` component is used for entering and submitting of user data.
373
- * [More details about designing of forms.](#!/Good%20Forms)
374
- *
375
- * Since: 0.0.54
376
- */
377
370
  _defineProperty(Form, "defaultProps", {
378
371
  children: undefined,
379
372
  requiredMark: /*#__PURE__*/_jsx("span", {
@@ -412,4 +405,9 @@ const RefForwardingForm = /*#__PURE__*/forwardRef((props, ref) => {
412
405
  });
413
406
  });
414
407
  RefForwardingForm.displayName = 'Form';
408
+ /**
409
+ * `Form` component is used for entering and submitting of user data.
410
+ * [More details about designing of forms.](#!/Good%20Forms)
411
+ * @since 0.0.54
412
+ */
415
413
  export default RefForwardingForm;
@@ -1,7 +1,6 @@
1
1
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
2
2
 
3
- import React, { Fragment } from 'react';
4
- import PropTypes from 'prop-types';
3
+ import { Fragment } from 'react';
5
4
  import classNames from 'classnames';
6
5
  import { CLS_PREFIX } from '../../constants';
7
6
  import Checkbox from '../Checkbox';
@@ -10,20 +9,19 @@ import { jsx as _jsx } from "react/jsx-runtime";
10
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
11
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
11
  /**
13
- * `FormFieldCheckbox` component component is used for turning an option on or off
12
+ * `FormFieldCheckbox` component is used for turning an option on or off
14
13
  * and selecting or deselecting an item.
15
14
  * @since 0.0.58
16
15
  */
17
16
  const FormFieldCheckbox = _ref => {
18
17
  let {
19
- baseClassName,
20
18
  className,
21
19
  label,
22
- required,
23
- checkedValue,
24
- uncheckedValue,
25
20
  autoFocus,
26
- multi,
21
+ required = false,
22
+ checkedValue = true,
23
+ uncheckedValue = false,
24
+ baseClassName = `${CLS_PREFIX}form-field-checkbox`,
27
25
  ...props
28
26
  } = _ref;
29
27
  return /*#__PURE__*/_jsx(FormField, {
@@ -45,14 +43,14 @@ const FormFieldCheckbox = _ref => {
45
43
  children: [/*#__PURE__*/_jsx("input", {
46
44
  type: "hidden",
47
45
  name: getName(),
48
- value: uncheckedValue
46
+ value: uncheckedValue.toString()
49
47
  }), /*#__PURE__*/_jsx(Checkbox, {
50
48
  checked: getValue() === checkedValue,
51
49
  onChange: checked => setValue(checked ? checkedValue : uncheckedValue),
52
50
  inputProps: {
53
51
  id: getId(),
54
52
  name: getName(),
55
- value: checkedValue,
53
+ value: checkedValue.toString(),
56
54
  autoFocus
57
55
  },
58
56
  disabled: isDisabled(),
@@ -65,59 +63,4 @@ const FormFieldCheckbox = _ref => {
65
63
  }
66
64
  });
67
65
  };
68
- FormFieldCheckbox.propTypes = {
69
- /**
70
- * Disabled state of field.
71
- * @since 0.1.0
72
- */
73
- disabled: PropTypes.bool,
74
- /**
75
- * Custom checked value. Default is boolean true.
76
- * @since 0.0.59
77
- */
78
- checkedValue: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
79
- /**
80
- * Custom unchecked value. Default is boolean false.
81
- * @since 0.0.59
82
- */
83
- uncheckedValue: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
84
- /**
85
- * The browser will automatically focus on the component upon rendering the screen
86
- * @since 1.9.0
87
- */
88
- autoFocus: PropTypes.bool,
89
- /**
90
- * @ignore Field cannot be multiple
91
- */
92
- multi: PropTypes.bool,
93
- /**
94
- * @ignore
95
- */
96
- label: PropTypes.any,
97
- /**
98
- * @ignore
99
- */
100
- required: PropTypes.bool,
101
- /**
102
- * @ignore
103
- */
104
- className: PropTypes.string,
105
- /**
106
- * @ignore
107
- */
108
- baseClassName: PropTypes.string,
109
- fullDescription: PropTypes.string
110
- };
111
- FormFieldCheckbox.defaultProps = {
112
- disabled: undefined,
113
- checkedValue: true,
114
- uncheckedValue: false,
115
- autoFocus: undefined,
116
- multi: undefined,
117
- label: undefined,
118
- required: false,
119
- className: undefined,
120
- baseClassName: `${CLS_PREFIX}form-field-checkbox`,
121
- fullDescription: undefined
122
- };
123
66
  export default FormFieldCheckbox;
@@ -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, { cloneElement, Component } from 'react';
5
- import PropTypes from 'prop-types';
4
+ import { cloneElement, Component } from 'react';
6
5
  import classNames from 'classnames';
7
6
  import Measure from 'react-measure';
8
7
  import { CLS_PREFIX } from '../../constants';
@@ -19,10 +18,11 @@ class Grid extends Component {
19
18
  });
20
19
  _defineProperty(this, "handleResize", _ref => {
21
20
  let {
22
- bounds: {
23
- width
24
- }
21
+ bounds
25
22
  } = _ref;
23
+ const {
24
+ width
25
+ } = bounds;
26
26
  let {
27
27
  maxColumnsNumber
28
28
  } = this.props;
@@ -87,9 +87,9 @@ class Grid extends Component {
87
87
  const result = /*#__PURE__*/_jsx("div", {
88
88
  className: computedClassName,
89
89
  ...props,
90
- children: minColumnWidth > 0 && !this.state.xs ? null : children
90
+ children: minColumnWidth && !this.state.xs ? null : children
91
91
  });
92
- if (minColumnWidth > 0) {
92
+ if (minColumnWidth) {
93
93
  return /*#__PURE__*/_jsx(Measure, {
94
94
  bounds: true,
95
95
  onResize: this.handleResize,
@@ -106,67 +106,7 @@ class Grid extends Component {
106
106
  return result;
107
107
  }
108
108
  }
109
- Grid.propTypes = {
110
- /**
111
- * Content of the `Grid`.
112
- * @since 0.0.48
113
- */
114
- children: PropTypes.node,
115
- /**
116
- * @ignore
117
- */
118
- className: PropTypes.string,
119
- /**
120
- * @ignore
121
- */
122
- baseClassName: PropTypes.string,
123
- /**
124
- * Minimal column width
125
- * @since 0.0.50
126
- */
127
- minColumnWidth: PropTypes.number,
128
- /**
129
- * Maximum columns number
130
- * @since 0.0.53
131
- */
132
- maxColumnsNumber: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
133
- /**
134
- * Number of columns for `xs` breakpoint
135
- * @since 0.0.53
136
- */
137
- xs: PropTypes.PropTypes.oneOf([1, 2, 3, 4, 5, 6, 'auto']),
138
- /**
139
- * Number of columns for `sm` breakpoint
140
- * @since 0.0.48
141
- */
142
- sm: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 'auto']),
143
- /**
144
- * Number of columns for `md` breakpoint
145
- * @since 0.0.48
146
- */
147
- md: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 'auto']),
148
- /**
149
- * Number of columns for `lg` breakpoint
150
- * @since 0.0.48
151
- */
152
- lg: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 'auto']),
153
- /**
154
- * Number of columns for `xl` breakpoint
155
- * @since 0.0.48
156
- */
157
- xl: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 'auto']),
158
- /**
159
- * Specifying the gutters between grid items
160
- * @since 0.0.53
161
- */
162
- gap: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
163
- /**
164
- * Columns number change notifier
165
- * @since 0.0.50
166
- */
167
- onColumnsChange: PropTypes.func
168
- };
169
- Grid.defaultProps = {
109
+ _defineProperty(Grid, "defaultProps", {
170
110
  children: null,
171
111
  className: null,
172
112
  baseClassName: `${CLS_PREFIX}grid`,
@@ -179,5 +119,5 @@ Grid.defaultProps = {
179
119
  xl: null,
180
120
  gap: null,
181
121
  onColumnsChange: null
182
- };
122
+ });
183
123
  export default Grid;
@@ -1,18 +1,15 @@
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
  * `GridCol` component is a part of [Grid](#!/Grid) component.
10
8
  * @since 0.0.48
11
9
  */
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
10
  const GridCol = _ref => {
14
11
  let {
15
- baseClassName,
12
+ baseClassName = `${CLS_PREFIX}grid__col`,
16
13
  className,
17
14
  children,
18
15
  xs,
@@ -35,54 +32,4 @@ const GridCol = _ref => {
35
32
  children: children
36
33
  });
37
34
  };
38
- GridCol.propTypes = {
39
- /**
40
- * Content of the `GridCol`.
41
- * @since 0.0.48
42
- */
43
- children: PropTypes.node,
44
- /**
45
- * @ignore
46
- */
47
- className: PropTypes.string,
48
- /**
49
- * @ignore
50
- */
51
- baseClassName: PropTypes.string,
52
- /**
53
- * Column size for `xs` breakpoint (from 1 to 12)
54
- * @since 0.0.53
55
- */
56
- xs: PropTypes.number,
57
- /**
58
- * Column size for `sm` breakpoint (from 1 to 12)
59
- * @since 0.0.53
60
- */
61
- sm: PropTypes.number,
62
- /**
63
- * Column size for `sm` breakpoint (from 1 to 12)
64
- * @since 0.0.53
65
- */
66
- md: PropTypes.number,
67
- /**
68
- * Column size for `md` breakpoint (from 1 to 12)
69
- * @since 0.0.53
70
- */
71
- lg: PropTypes.number,
72
- /**
73
- * Column size for `lg` breakpoint (from 1 to 12)
74
- * @since 0.0.53
75
- */
76
- xl: PropTypes.number
77
- };
78
- GridCol.defaultProps = {
79
- children: null,
80
- className: null,
81
- baseClassName: `${CLS_PREFIX}grid__col`,
82
- xs: null,
83
- sm: null,
84
- md: null,
85
- lg: null,
86
- xl: null
87
- };
88
35
  export default GridCol;