@plesk/ui-library 3.40.5 → 3.40.6

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.
@@ -3204,20 +3204,6 @@ class Carousel extends _react.Component {
3204
3204
  if (prevProps.autoplay !== this.props.autoplay) {
3205
3205
  this.props.autoplay ? this.play() : this.stop();
3206
3206
  }
3207
- const {
3208
- width
3209
- } = this.rootRef.current.getBoundingClientRect();
3210
- const {
3211
- slideWidths,
3212
- totalWidth
3213
- } = calcWidths(this.genuineRef.current);
3214
- if (this.state.totalWidth !== totalWidth) {
3215
- this.setState({
3216
- slideWidths,
3217
- totalWidth,
3218
- showControls: width < totalWidth
3219
- });
3220
- }
3221
3207
  }
3222
3208
  componentWillUnmount() {
3223
3209
  this.stop();
@@ -13375,7 +13361,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
13375
13361
  Object.defineProperty(exports, "__esModule", ({
13376
13362
  value: true
13377
13363
  }));
13378
- exports.useTranslate = exports["default"] = exports.LocaleContext = void 0;
13364
+ exports.useTranslate = exports["default"] = exports.LocaleContext = exports.LocaleBetaProvider = void 0;
13379
13365
  var _react = __webpack_require__(/*! react */ "react");
13380
13366
  var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"));
13381
13367
  var _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
@@ -13451,6 +13437,22 @@ const useTranslate = namespace => {
13451
13437
  }, [context, namespace]);
13452
13438
  };
13453
13439
  exports.useTranslate = useTranslate;
13440
+ const LocaleBetaProvider = _ref => {
13441
+ let {
13442
+ messages,
13443
+ children
13444
+ } = _ref;
13445
+ const value = (0, _react.useMemo)(() => ({
13446
+ locale: {
13447
+ lmsg: createTranslate(messages)
13448
+ }
13449
+ }), [messages]);
13450
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(LocaleContext.Provider, {
13451
+ value: value,
13452
+ children: children
13453
+ });
13454
+ };
13455
+ exports.LocaleBetaProvider = LocaleBetaProvider;
13454
13456
  /**
13455
13457
  * LocaleProvider provides a uniform localization support for built-in text of components.
13456
13458
  * @since 0.0.42
@@ -19088,6 +19090,7 @@ const StatusMessage = _ref => {
19088
19090
  ...props,
19089
19091
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
19090
19092
  name: _intentIconMap.intentIconMap[intent],
19093
+ intent: intent,
19091
19094
  className: `${baseClassName}__icon`
19092
19095
  }), children]
19093
19096
  });
@@ -19569,7 +19572,6 @@ var _constants = __webpack_require__(/*! ../../constants */ "./constants.js");
19569
19572
  var _utils = __webpack_require__(/*! ../../utils */ "./utils.tsx");
19570
19573
  var _Badge = _interopRequireDefault(__webpack_require__(/*! ../Badge */ "./components/Badge/index.tsx"));
19571
19574
  var _Button = _interopRequireDefault(__webpack_require__(/*! ../Button */ "./components/Button/index.tsx"));
19572
- var _ButtonGroup = _interopRequireDefault(__webpack_require__(/*! ../ButtonGroup */ "./components/ButtonGroup/index.tsx"));
19573
19575
  var _DistractionFreeModeContext = _interopRequireDefault(__webpack_require__(/*! ../DistractionFreeModeContext */ "./components/DistractionFreeModeContext/index.tsx"));
19574
19576
  var _Input = _interopRequireDefault(__webpack_require__(/*! ../Input */ "./components/Input/index.tsx"));
19575
19577
  var _Menu = _interopRequireWildcard(__webpack_require__(/*! ../Menu */ "./components/Menu/index.tsx"));
@@ -19908,7 +19910,7 @@ class SearchBar extends _react.Component {
19908
19910
  } = this.state;
19909
19911
  const isCollapsed = this.isResponsive();
19910
19912
  const distractionFreeModeEnabled = Boolean(distractionFreeMode && distractionFreeMode.enabled);
19911
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
19913
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
19912
19914
  className: (0, _classnames.default)(baseClassName, {
19913
19915
  [`${baseClassName}--focused`]: focused
19914
19916
  }, className),
@@ -19917,16 +19919,16 @@ class SearchBar extends _react.Component {
19917
19919
  minWidth
19918
19920
  },
19919
19921
  ...props,
19920
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonGroup.default, {
19922
+ children: isCollapsed && (collapsable || !distractionFreeModeEnabled) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
19923
+ intent: "info",
19924
+ hidden: !value,
19925
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
19926
+ icon: "search",
19927
+ onClick: this.handleExpand
19928
+ })
19929
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
19921
19930
  className: `${baseClassName}__group`,
19922
- children: isCollapsed && (collapsable || !distractionFreeModeEnabled) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
19923
- intent: "info",
19924
- hidden: !value,
19925
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
19926
- icon: "search",
19927
- onClick: this.handleExpand
19928
- })
19929
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, {
19931
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, {
19930
19932
  innerRef: ref => this.search = ref,
19931
19933
  className: `${baseClassName}__input`,
19932
19934
  size: "fill",
@@ -19956,8 +19958,8 @@ class SearchBar extends _react.Component {
19956
19958
  ghost: true
19957
19959
  })]
19958
19960
  })
19959
- })
19960
- }), Array.isArray(results) && this.renderResults(results), results && !Array.isArray(results) && results.type === _Menu.default && this.renderResultsMenu(results)]
19961
+ }), Array.isArray(results) && this.renderResults(results), results && !Array.isArray(results) && results.type === _Menu.default && this.renderResultsMenu(results)]
19962
+ })
19961
19963
  });
19962
19964
  }
19963
19965
  }
@@ -22877,6 +22879,9 @@ var _exportNames = {
22877
22879
  ListEmptyView: true,
22878
22880
  ListActionsDivider: true,
22879
22881
  LocaleProvider: true,
22882
+ useTranslate: true,
22883
+ LocaleContext: true,
22884
+ LocaleBetaProvider: true,
22880
22885
  Markdown: true,
22881
22886
  Media: true,
22882
22887
  MediaSection: true,
@@ -23248,6 +23253,18 @@ Object.defineProperty(exports, "ListOperation", ({
23248
23253
  return _List.ListOperation;
23249
23254
  }
23250
23255
  }));
23256
+ Object.defineProperty(exports, "LocaleBetaProvider", ({
23257
+ enumerable: true,
23258
+ get: function () {
23259
+ return _LocaleProvider.LocaleBetaProvider;
23260
+ }
23261
+ }));
23262
+ Object.defineProperty(exports, "LocaleContext", ({
23263
+ enumerable: true,
23264
+ get: function () {
23265
+ return _LocaleProvider.LocaleContext;
23266
+ }
23267
+ }));
23251
23268
  Object.defineProperty(exports, "LocaleProvider", ({
23252
23269
  enumerable: true,
23253
23270
  get: function () {
@@ -23578,6 +23595,12 @@ Object.defineProperty(exports, "Translate", ({
23578
23595
  return _Translate.default;
23579
23596
  }
23580
23597
  }));
23598
+ Object.defineProperty(exports, "useTranslate", ({
23599
+ enumerable: true,
23600
+ get: function () {
23601
+ return _LocaleProvider.useTranslate;
23602
+ }
23603
+ }));
23581
23604
  var _Action = _interopRequireDefault(__webpack_require__(/*! ./Action */ "./components/Action/index.tsx"));
23582
23605
  var _Alert = _interopRequireDefault(__webpack_require__(/*! ./Alert */ "./components/Alert/index.tsx"));
23583
23606
  var _AutoClosable = _interopRequireDefault(__webpack_require__(/*! ./AutoClosable */ "./components/AutoClosable/index.tsx"));
@@ -23682,17 +23705,6 @@ var _Label = _interopRequireDefault(__webpack_require__(/*! ./Label */ "./compon
23682
23705
  var _Layout = _interopRequireDefault(__webpack_require__(/*! ./Layout */ "./components/Layout/index.tsx"));
23683
23706
  var _List = _interopRequireWildcard(__webpack_require__(/*! ./List */ "./components/List/index.tsx"));
23684
23707
  var _LocaleProvider = _interopRequireWildcard(__webpack_require__(/*! ./LocaleProvider */ "./components/LocaleProvider/index.tsx"));
23685
- Object.keys(_LocaleProvider).forEach(function (key) {
23686
- if (key === "default" || key === "__esModule") return;
23687
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
23688
- if (key in exports && exports[key] === _LocaleProvider[key]) return;
23689
- Object.defineProperty(exports, key, {
23690
- enumerable: true,
23691
- get: function () {
23692
- return _LocaleProvider[key];
23693
- }
23694
- });
23695
- });
23696
23708
  var _Markdown = _interopRequireDefault(__webpack_require__(/*! ./Markdown */ "./components/Markdown/index.tsx"));
23697
23709
  var _Media = _interopRequireWildcard(__webpack_require__(/*! ./Media */ "./components/Media/index.tsx"));
23698
23710
  var _Menu = _interopRequireWildcard(__webpack_require__(/*! ./Menu */ "./components/Menu/index.tsx"));
@@ -24158,7 +24170,9 @@ const useSqueeze = _ref => {
24158
24170
  if (!ref.current) return;
24159
24171
  const root = ref.current;
24160
24172
  const width = Math.ceil(root.getBoundingClientRect().width);
24161
- const scrollWidth = Math.floor(root.scrollWidth);
24173
+ const {
24174
+ scrollWidth
24175
+ } = root;
24162
24176
  let isCompactChanged = false;
24163
24177
  if (scrollWidth > width) {
24164
24178
  isCompactChanged = compact();
@@ -87923,7 +87937,7 @@ function _objectWithoutPropertiesLoose(r, e) {
87923
87937
  if (null == r) return {};
87924
87938
  var t = {};
87925
87939
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
87926
- if (e.indexOf(n) >= 0) continue;
87940
+ if (e.includes(n)) continue;
87927
87941
  t[n] = r[n];
87928
87942
  }
87929
87943
  return t;
@@ -87959,7 +87973,7 @@ function _setPrototypeOf(t, e) {
87959
87973
  /***/ ((module) => {
87960
87974
 
87961
87975
  "use strict";
87962
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@plesk/ui-library","version":"3.40.5","description":"Plesk UI Library","main":"index.js","module":"esm/index.js","types":"./types/src","sideEffects":["cjs/index.js","esm/index.js","dist/*.js","dist/*.css"],"scripts":{"pretest":"yarn lint","test":"jest --ci --coverage --coverageReporters text-summary","test:vr":"cross-env VISUAL_REGRESSION=true jest","build":"yarn build:types && yarn build:umd && yarn build:esm && yarn build:cjs","build:umd":"webpack --config ./configs/build.config.js","build:esm":"cross-env NODE_ENV=esm node ./scripts/build.js","build:cjs":"cross-env NODE_ENV=cjs node ./scripts/build.js","build:types":"rimraf ./types && tsc --project ./configs/types-generator.config.json","create-svg-sprite":"node ./scripts/create-svg-sprite.js","lint":"yarn lint:es && yarn lint:types && yarn lint:style && yarn format:check","lint:es":"eslint --ext js,md,tsx src configs scripts styleguidist","lint:types":"tsc","lint:style":"stylelint \\"{src,styleguidist}/**/*.less\\"","format:check":"prettier --check src","format":"prettier --write src","styleguide":"styleguidist server --config ./configs/styleguide.config.js","styleguide:build":"styleguidist build --config ./configs/styleguide.config.js","prepublishOnly":"yarn install && yarn test && yarn build && yarn styleguide:build","storybook":"webpack serve --config ./configs/storybook.config.js --allowed-hosts all","postinstall":"node ./scripts/postinstall.js"},"files":["esm","cjs","dist","styleguide","types","/scripts/postinstall.js","/index.js"],"dependencies":{"@babel/runtime":"^7.24.7","@plesk/react-movable":"^2.7.1","classnames":"^2.5.1","codemirror":"5.58.2","marked":"4.2.12","memoize-one":"^5.2.1","popper.js":"1.16.1","prop-types":"^15.8.1","react-measure":"2.5.2","react-sortable-hoc":"0.6.8","react-transition-group":"^4.4.5","scroll-into-view-if-needed":"^2.2.31","svg4everybody":"2.1.9","use-focus-visible":"^1.0.2"},"devDependencies":{"@babel/core":"^7.24.7","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.24.7","@babel/preset-env":"^7.24.7","@babel/preset-react":"^7.24.7","@babel/preset-typescript":"^7.24.7","@babel/types":"^7.24.7","@csstools/postcss-logical-float-and-clear":"^1.0.1","@plesk/eslint-config":"^3.0.0","@plesk/stylelint-config":"^2.0.0","@testing-library/dom":"^9.3.4","@testing-library/jest-dom":"^6.4.6","@testing-library/react":"^14.3.1","@testing-library/user-event":"^14.5.2","@types/buble":"^0.20.5","@types/classnames":"2.3.1","@types/codemirror":"^5.60.15","@types/doctrine":"^0.0.5","@types/jest":"^29.5.12","@types/jest-image-snapshot":"^6.4.0","@types/marked":"^4.3.2","@types/node":"^16.18.98","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@types/react-measure":"2.0.9","@types/react-transition-group":"^4.4.10","@types/svg4everybody":"2.1.2","@types/webpack-env":"^1.18.5","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","autoprefixer":"^10.4.19","babel-loader":"^8.3.0","babel-plugin-transform-require-ignore":"^0.1.1","clean-webpack-plugin":"^4.0.0","cross-env":"^7.0.3","css-loader":"^6.11.0","css-minimizer-webpack-plugin":"^5.0.1","eslint":"^8.57.0","eslint-config-prettier":"^8.10.0","eslint-plugin-markdown":"^3.0.1","html-webpack-plugin":"^5.6.0","jest":"^29.7.0","jest-dev-server":"^9.0.2","jest-environment-jsdom":"^29.7.0","jest-image-snapshot":"^6.4.0","less":"^4.2.0","less-loader":"^11.1.4","mini-css-extract-plugin":"^2.9.0","postcss":"^8.4.38","postcss-less":"^6.0.0","postcss-loader":"^7.3.4","postcss-logical":"^6.2.0","prettier":"^2.8.8","puppeteer-core":"21.7.0","react":"^18.3.1","react-docgen-typescript":"^2.2.2","react-dom":"^18.3.1","react-styleguidist":"^13.1.2","rimraf":"^5.0.7","rtlcss":"^4.1.1","style-loader":"^3.3.4","stylelint":"^15.11.0","stylelint-declaration-block-no-ignored-properties":"^2.8.0","stylelint-no-unsupported-browser-features":"^6.1.0","stylelint-prettier":"^3.0.0","stylelint-use-logical-spec":"^5.0.1","svg-mixer":"^2.3.14","terser-webpack-plugin":"^5.3.10","typescript":"5.2.2","webpack":"^5.92.0","webpack-cli":"^5.1.4"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"resolutions":{"trim":">=0.0.3","postcss":"^8.4.23"},"browserslist":["defaults","not op_mini all","not kaios > 0"],"author":"Plesk Developers <plesk-dev-leads@plesk.com> (https://www.plesk.com/)","license":"Apache-2.0"}');
87976
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@plesk/ui-library","version":"3.40.6","description":"Plesk UI Library","main":"index.js","module":"esm/index.js","types":"./types/src","sideEffects":["cjs/index.js","esm/index.js","dist/*.js","dist/*.css"],"scripts":{"pretest":"yarn lint","test":"jest --ci --coverage --coverageReporters text-summary","test:vr":"cross-env VISUAL_REGRESSION=true jest","build":"yarn build:types && yarn build:umd && yarn build:esm && yarn build:cjs","build:umd":"webpack --config ./configs/build.config.js","build:esm":"cross-env NODE_ENV=esm node ./scripts/build.js","build:cjs":"cross-env NODE_ENV=cjs node ./scripts/build.js","build:types":"rimraf ./types && tsc --project ./configs/types-generator.config.json","create-svg-sprite":"node ./scripts/create-svg-sprite.js","lint":"yarn lint:es && yarn lint:types && yarn lint:style && yarn format:check","lint:es":"eslint --ext js,md,tsx src configs scripts styleguidist","lint:types":"tsc","lint:style":"stylelint \\"{src,styleguidist}/**/*.less\\"","format:check":"prettier --check src","format":"prettier --write src","styleguide":"styleguidist server --config ./configs/styleguide.config.js","styleguide:build":"styleguidist build --config ./configs/styleguide.config.js","prepublishOnly":"yarn install && yarn test && yarn build && yarn styleguide:build","storybook":"webpack serve --config ./configs/storybook.config.js --allowed-hosts all","postinstall":"node ./scripts/postinstall.js"},"files":["esm","cjs","dist","styleguide","types","/scripts/postinstall.js","/index.js"],"dependencies":{"@babel/runtime":"^7.24.8","@plesk/react-movable":"^2.7.1","classnames":"^2.5.1","codemirror":"5.58.2","marked":"4.2.12","memoize-one":"^5.2.1","popper.js":"1.16.1","prop-types":"^15.8.1","react-measure":"2.5.2","react-sortable-hoc":"0.6.8","react-transition-group":"^4.4.5","scroll-into-view-if-needed":"^2.2.31","svg4everybody":"2.1.9","use-focus-visible":"^1.0.2"},"devDependencies":{"@babel/core":"^7.24.9","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-transform-runtime":"^7.24.7","@babel/preset-env":"^7.24.8","@babel/preset-react":"^7.24.7","@babel/preset-typescript":"^7.24.7","@babel/types":"^7.24.9","@csstools/postcss-logical-float-and-clear":"^1.0.1","@plesk/eslint-config":"^3.0.0","@plesk/stylelint-config":"^2.0.0","@testing-library/dom":"^9.3.4","@testing-library/jest-dom":"^6.4.6","@testing-library/react":"^14.3.1","@testing-library/user-event":"^14.5.2","@types/buble":"^0.20.5","@types/classnames":"2.3.1","@types/codemirror":"^5.60.15","@types/doctrine":"^0.0.5","@types/jest":"^29.5.12","@types/jest-image-snapshot":"^6.4.0","@types/marked":"^4.3.2","@types/node":"^16.18.101","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@types/react-measure":"2.0.9","@types/react-transition-group":"^4.4.10","@types/svg4everybody":"2.1.2","@types/webpack-env":"^1.18.5","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0","autoprefixer":"^10.4.19","babel-loader":"^8.3.0","babel-plugin-transform-require-ignore":"^0.1.1","clean-webpack-plugin":"^4.0.0","cross-env":"^7.0.3","css-loader":"^6.11.0","css-minimizer-webpack-plugin":"^5.0.1","eslint":"^8.57.0","eslint-config-prettier":"^8.10.0","eslint-plugin-markdown":"^3.0.1","html-webpack-plugin":"^5.6.0","jest":"^29.7.0","jest-dev-server":"^9.0.2","jest-environment-jsdom":"^29.7.0","jest-image-snapshot":"^6.4.0","less":"^4.2.0","less-loader":"^11.1.4","mini-css-extract-plugin":"^2.9.0","postcss":"^8.4.39","postcss-less":"^6.0.0","postcss-loader":"^7.3.4","postcss-logical":"^6.2.0","prettier":"^2.8.8","puppeteer-core":"21.7.0","react":"^18.3.1","react-docgen-typescript":"^2.2.2","react-dom":"^18.3.1","react-styleguidist":"^13.1.3","rimraf":"^5.0.9","rtlcss":"^4.1.1","style-loader":"^3.3.4","stylelint":"^15.11.0","stylelint-declaration-block-no-ignored-properties":"^2.8.0","stylelint-no-unsupported-browser-features":"^6.1.0","stylelint-prettier":"^3.0.0","stylelint-use-logical-spec":"^5.0.1","svg-mixer":"^2.3.14","terser-webpack-plugin":"^5.3.10","typescript":"5.2.2","webpack":"^5.93.0","webpack-cli":"^5.1.4"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0"},"resolutions":{"trim":">=0.0.3","postcss":"^8.4.23"},"browserslist":["defaults","not op_mini all","not kaios > 0"],"author":"Plesk Developers <plesk-dev-leads@plesk.com> (https://www.plesk.com/)","license":"Apache-2.0"}');
87963
87977
 
87964
87978
  /***/ }),
87965
87979