@plesk/ui-library 3.34.2 → 3.35.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.
Files changed (76) hide show
  1. package/cjs/components/ContentLoader/IconsLoader.js +1 -2
  2. package/cjs/components/Dropdown/Dropdown.js +0 -2
  3. package/cjs/components/Dropdown/index.js +15 -2
  4. package/cjs/components/Figure/Figure.js +1 -33
  5. package/cjs/components/Figure/index.js +15 -2
  6. package/cjs/components/Form/Form.js +3 -3
  7. package/cjs/components/Form/ScrollableElementFormContext.js +1 -1
  8. package/cjs/components/Form/index.js +19 -3
  9. package/cjs/components/FormFieldPassword/PasswordMeter.js +4 -4
  10. package/cjs/components/Icon/constants.js +2 -2
  11. package/cjs/components/Icon/images/symbols.svg +9 -1
  12. package/cjs/components/Link/Link.js +11 -18
  13. package/cjs/components/Overlay/Overlay.js +3 -4
  14. package/cjs/components/Popper/Popper.js +14 -79
  15. package/cjs/components/Popper/index.js +15 -2
  16. package/cjs/components/Section/Section.js +1 -2
  17. package/cjs/components/Skeleton/SkeletonText.js +1 -1
  18. package/cjs/components/SplitButton/SplitButton.js +10 -49
  19. package/cjs/components/SplitButton/index.js +15 -2
  20. package/cjs/components/utils.js +1 -1
  21. package/cjs/index.js +1 -1
  22. package/dist/images/symbols.svg +9 -1
  23. package/dist/plesk-ui-library-rtl.css.map +1 -1
  24. package/dist/plesk-ui-library.css.map +1 -1
  25. package/dist/plesk-ui-library.js +181 -261
  26. package/dist/plesk-ui-library.js.map +1 -1
  27. package/dist/plesk-ui-library.min.js +5 -5
  28. package/dist/plesk-ui-library.min.js.map +1 -1
  29. package/esm/components/ContentLoader/IconsLoader.js +1 -2
  30. package/esm/components/Dropdown/Dropdown.js +0 -2
  31. package/esm/components/Dropdown/index.js +2 -1
  32. package/esm/components/Figure/Figure.js +1 -33
  33. package/esm/components/Figure/index.js +2 -1
  34. package/esm/components/Form/Form.js +3 -3
  35. package/esm/components/Form/ScrollableElementFormContext.js +1 -1
  36. package/esm/components/Form/index.js +1 -0
  37. package/esm/components/FormFieldPassword/PasswordMeter.js +4 -4
  38. package/esm/components/Icon/constants.js +2 -2
  39. package/esm/components/Icon/images/symbols.svg +9 -1
  40. package/esm/components/Link/Link.js +11 -18
  41. package/esm/components/Overlay/Overlay.js +3 -4
  42. package/esm/components/Popper/Popper.js +14 -79
  43. package/esm/components/Popper/index.js +2 -1
  44. package/esm/components/Section/Section.js +1 -2
  45. package/esm/components/Skeleton/SkeletonText.js +1 -1
  46. package/esm/components/SplitButton/SplitButton.js +10 -47
  47. package/esm/components/SplitButton/index.js +2 -1
  48. package/esm/components/utils.js +1 -1
  49. package/esm/index.js +1 -1
  50. package/package.json +10 -13
  51. package/styleguide/build/bundle.2a886a79.js +2 -0
  52. package/styleguide/images/symbols.svg +9 -1
  53. package/styleguide/index.html +2 -2
  54. package/types/src/components/ButtonGroup/ButtonGroup.d.ts +2 -2
  55. package/types/src/components/Dialog/Dialog.d.ts +29 -9
  56. package/types/src/components/Drawer/Drawer.d.ts +10 -12
  57. package/types/src/components/Dropdown/Dropdown.d.ts +3 -4
  58. package/types/src/components/Dropdown/index.d.ts +2 -0
  59. package/types/src/components/Figure/Figure.d.ts +28 -0
  60. package/types/src/components/Figure/index.d.ts +2 -0
  61. package/types/src/components/Form/Form.d.ts +8 -103
  62. package/types/src/components/Form/ScrollableElementFormContext.d.ts +2 -0
  63. package/types/src/components/Form/index.d.ts +1 -0
  64. package/types/src/components/Form/types.d.ts +5 -3
  65. package/types/src/components/Icon/constants.d.ts +1 -1
  66. package/types/src/components/Link/Link.d.ts +14 -12
  67. package/types/src/components/Link/index.d.ts +1 -0
  68. package/types/src/components/Overlay/Overlay.d.ts +1 -1
  69. package/types/src/components/Popper/Popper.d.ts +96 -0
  70. package/types/src/components/Popper/index.d.ts +2 -0
  71. package/types/src/components/SplitButton/SplitButton.d.ts +53 -0
  72. package/types/src/components/SplitButton/index.d.ts +2 -0
  73. package/types/src/components/index.d.ts +6 -0
  74. package/types/src/components/utils.d.ts +6 -4
  75. package/styleguide/build/bundle.70f167a3.js +0 -2
  76. /package/styleguide/build/{bundle.70f167a3.js.LICENSE.txt → bundle.2a886a79.js.LICENSE.txt} +0 -0
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _react = require("react");
10
9
  var _classnames = _interopRequireDefault(require("classnames"));
11
10
  var _constants = require("../../constants");
12
11
  var _Button = _interopRequireDefault(require("../Button"));
@@ -14,8 +13,6 @@ var _ButtonGroup = _interopRequireDefault(require("../ButtonGroup"));
14
13
  var _Dropdown = _interopRequireDefault(require("../Dropdown"));
15
14
  var _utils = require("../utils");
16
15
  var _jsxRuntime = require("react/jsx-runtime");
17
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
16
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
20
17
 
21
18
  const focusStrategy = {
@@ -40,25 +37,26 @@ const focusStrategy = {
40
37
  return container.children[1].querySelector('button');
41
38
  }
42
39
  };
43
-
44
40
  /**
45
41
  * `Split Button` is a combination of a standard [Button](#!/Button) with a [Dropdown](#!/Dropdown) menu.
46
42
  * It is used for grouping several related actions when one of the actions should be accessible immediately
47
43
  * because it is used more often than others.
48
- * @since 0.0.40
44
+ *
45
+ * Since: 0.0.40
49
46
  */
50
47
  const SplitButton = _ref => {
51
48
  let {
52
- baseClassName,
49
+ baseClassName = `${_constants.CLS_PREFIX}split-button`,
53
50
  className,
54
51
  menu,
55
52
  children,
56
- opened,
57
53
  onClick,
58
54
  onKeyDown,
55
+ icon,
56
+ size,
59
57
  ...props
60
58
  } = _ref;
61
- const rootRef = (0, _react.useRef)();
59
+ const rootRef = (0, _react.useRef)(null);
62
60
  const {
63
61
  focusNext,
64
62
  focusPrev
@@ -82,6 +80,8 @@ const SplitButton = _ref => {
82
80
  onKeyDown: handleKeyDown,
83
81
  ...props,
84
82
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
83
+ icon: icon,
84
+ size: size,
85
85
  tabIndex: 0,
86
86
  onClick: onClick,
87
87
  children: children
@@ -90,51 +90,12 @@ const SplitButton = _ref => {
90
90
  menu: menu,
91
91
  menuPlacement: "bottom-end",
92
92
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
93
+ size: size,
93
94
  caret: true,
94
95
  tabIndex: -1
95
96
  })
96
97
  })]
97
98
  });
98
99
  };
99
- SplitButton.propTypes = {
100
- /**
101
- * @since 0.0.47
102
- */
103
- menu: _propTypes.default.any,
104
- /**
105
- * @since 0.0.47
106
- */
107
- opened: _propTypes.default.bool,
108
- /**
109
- * Content of the button group
110
- * @since 0.0.40
111
- */
112
- children: _propTypes.default.node,
113
- /**
114
- * @ignore
115
- */
116
- className: _propTypes.default.string,
117
- /**
118
- * @ignore
119
- */
120
- baseClassName: _propTypes.default.string,
121
- /**
122
- * @ignore
123
- */
124
- onClick: _propTypes.default.func,
125
- /**
126
- * @ignore
127
- */
128
- onKeyDown: _propTypes.default.func
129
- };
130
- SplitButton.defaultProps = {
131
- menu: null,
132
- opened: false,
133
- children: null,
134
- className: null,
135
- baseClassName: `${_constants.CLS_PREFIX}split-button`,
136
- onClick: undefined,
137
- onKeyDown: undefined
138
- };
139
100
  var _default = SplitButton;
140
101
  exports.default = _default;
@@ -1,13 +1,26 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
6
+ var _exportNames = {};
7
7
  Object.defineProperty(exports, "default", {
8
8
  enumerable: true,
9
9
  get: function () {
10
10
  return _SplitButton.default;
11
11
  }
12
12
  });
13
- var _SplitButton = _interopRequireDefault(require("./SplitButton"));
13
+ var _SplitButton = _interopRequireWildcard(require("./SplitButton"));
14
+ Object.keys(_SplitButton).forEach(function (key) {
15
+ if (key === "default" || key === "__esModule") return;
16
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
17
+ if (key in exports && exports[key] === _SplitButton[key]) return;
18
+ Object.defineProperty(exports, key, {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _SplitButton[key];
22
+ }
23
+ });
24
+ });
25
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -122,7 +122,7 @@ const createStrategy = () => {
122
122
  };
123
123
  };
124
124
  const createFocusManager = function (containerRef) {
125
- let isFitForFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _node => true;
125
+ let isFitForFocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => true;
126
126
  let strategy = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createStrategy();
127
127
  const tryFocus = node => {
128
128
  if (isFitForFocus(node) && node instanceof HTMLElement) {
package/cjs/index.js CHANGED
@@ -46,6 +46,6 @@ Object.keys(_components).forEach(function (key) {
46
46
  });
47
47
  });
48
48
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
49
- const version = "3.34.2";
49
+ const version = "3.35.0";
50
50
  exports.version = version;
51
51
  (0, _svg4everybody.default)();
@@ -1,4 +1,4 @@
1
- <svg width="16" height="11712" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
1
+ <svg width="16" height="11760" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
2
  <defs>
3
3
  <symbol viewBox="0 0 12 12" id="archive:12">
4
4
  <path d="M2 1h7v.5a.5.5 0 0 0 1 0V1a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-.5a.5.5 0 0 0-1 0v.5H2V1z" />
@@ -181,6 +181,14 @@
181
181
  <path d="M4.145 11.855a.496.496 0 0 1 0-.702L13.298 2H9.5a.5.5 0 0 1 0-1h5.002a.495.495 0 0 1 .498.5v5a.5.5 0 0 1-1 0V2.702l-9.153 9.153a.496.496 0 0 1-.702 0z" />
182
182
  <path d="M1.5 15a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0V14h12.5a.5.5 0 0 1 0 1h-13z" />
183
183
  </symbol>
184
+ <symbol viewBox="0 0 12 12" id="bar-chart-vertical-lock:12">
185
+ <path d="M4 .5a.5.5 0 0 1 1 0v9a.5.5 0 0 1-1 0v-9zM1.5 5a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 1 0v-4a.5.5 0 0 0-.5-.5zM.5 11a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zM7.5 3a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 1 0v-1a.5.5 0 0 0-.5-.5zM10 1.5a.5.5 0 0 1 1 0v3a.5.5 0 0 1-1 0v-3z" />
186
+ <path d="M7 9a1 1 0 0 1 1-1V7a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V9zm3-1V7H9v1h1z" />
187
+ </symbol>
188
+ <symbol viewBox="0 0 16 16" id="bar-chart-vertical-lock:16">
189
+ <path d="M13 .5a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0v-7zM4.5 2a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 1 0v-11a.5.5 0 0 0-.5-.5zM1 9.5a.5.5 0 0 1 1 0v4a.5.5 0 0 1-1 0v-4zm-1 6a.5.5 0 0 1 .5-.5h8a.5.5 0 0 1 0 1h-8a.5.5 0 0 1-.5-.5zm7-9a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0v-7zM10.5 4a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 1 0v-3a.5.5 0 0 0-.5-.5z" />
190
+ <path d="M10 12a1 1 0 0 1 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-3zm3-1v-1h-1v1h1z" />
191
+ </symbol>
184
192
  <symbol viewBox="0 0 12 12" id="bar-chart-vertical:12">
185
193
  <path d="M0 11.5a.5.5 0 01.5-.5h11a.5.5 0 010 1H.5a.5.5 0 01-.5-.5zM1 5.5a.5.5 0 011 0v4a.5.5 0 01-1 0v-4zM4 .5a.5.5 0 011 0v9a.5.5 0 01-1 0v-9zM7 4.5a.5.5 0 011 0v5a.5.5 0 01-1 0v-5zM10 2.5a.5.5 0 011 0v7a.5.5 0 01-1 0v-7z" />
186
194
  </symbol>