@plesk/ui-library 3.29.1 → 3.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,7 +103,9 @@ const propTypes = {
103
103
  closingConfirmation: _propTypes.default.bool,
104
104
 
105
105
  /**
106
- * Wraps children into [Form](#!/Form) if not empty.
106
+ * Wraps children into [Form](#!/Form) if not empty.<br>
107
+ * **Note:** in case of *element* you should take care of providing additional form props from [Drawer](#!/Drawer) through your custom component. See example below for more details
108
+ *
107
109
  * @since 0.0.66
108
110
  */
109
111
  form: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.element]),
@@ -230,6 +230,7 @@ class FormField extends _react.Component {
230
230
  }
231
231
 
232
232
  return /*#__PURE__*/_react.default.createElement(_Hint.default, {
233
+ component: "div",
233
234
  className: `${baseClassName}__description`
234
235
  }, description);
235
236
  });
@@ -137,10 +137,12 @@ FormFieldText.propTypes = {
137
137
  autoComplete: _propTypes.default.oneOf(['on', 'off']),
138
138
 
139
139
  /**
140
- * If 'true', a field will be multiple
140
+ * If 'true', a field will be multiple. You can also limit the number of fields with a value like { max: 5 }.
141
141
  * @since 1.12.0
142
142
  */
143
- multi: _propTypes.default.bool,
143
+ multi: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.shape({
144
+ max: _propTypes.default.number.isRequired
145
+ })]),
144
146
 
145
147
  /**
146
148
  * @ignore
@@ -15,7 +15,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
16
  var _constants = require("../../constants");
17
17
 
18
- // Copyright 1999-2020. Plesk International GmbH. All rights reserved.
18
+ // Copyright 1999-2022. Plesk International GmbH. All rights reserved.
19
19
 
20
20
  /**
21
21
  * `Hint` component is used for auxiliary text like advice, suggestion or other useful practical information.
@@ -25,10 +25,13 @@ const Hint = ({
25
25
  baseClassName = `${_constants.CLS_PREFIX}hint`,
26
26
  className,
27
27
  children,
28
+ component: Tag = 'span',
28
29
  ...props
29
- }) => /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
30
- className: (0, _classnames.default)(baseClassName, className)
31
- }, props), children);
30
+ }) => {
31
+ return /*#__PURE__*/_react.default.createElement(Tag, (0, _extends2.default)({
32
+ className: (0, _classnames.default)(baseClassName, className)
33
+ }, props), children);
34
+ };
32
35
 
33
36
  var _default = Hint;
34
37
  exports.default = _default;
@@ -64,10 +64,10 @@ const getMessage = (fullKey, messages) => {
64
64
  }
65
65
 
66
66
  return messages[fullKey];
67
- }; // eslint-disable-next-line default-param-last
68
-
67
+ };
69
68
 
70
- const createTranslate = messages => (key, params = {}, fallback) => {
69
+ const createTranslate = messages => // eslint-disable-next-line default-param-last
70
+ (key, params = {}, fallback) => {
71
71
  if (typeof key !== 'string') {
72
72
  return '';
73
73
  }
package/cjs/index.js CHANGED
@@ -54,6 +54,6 @@ Object.keys(_components).forEach(function (key) {
54
54
  });
55
55
  });
56
56
  // Copyright 1999-2018. Plesk International GmbH. All rights reserved.
57
- const version = "3.29.1";
57
+ const version = "3.30.0";
58
58
  exports.version = version;
59
59
  (0, _svg4everybody.default)();