@sima-land/ui-nucleons 44.2.4 → 44.2.7

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.
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.allowTouchMove = exports.useBodyScrollLock = void 0;
4
4
  const body_scroll_lock_1 = require("body-scroll-lock");
5
- const react_1 = require("react");
6
5
  const constants_1 = require("../constants");
6
+ const hooks_1 = require("../hooks");
7
7
  /**
8
8
  * Хук управления блокировкой прокрутки body.
9
9
  * @param ref Реф элемента для которого нужно отключить прокрутку body.
@@ -11,7 +11,7 @@ const constants_1 = require("../constants");
11
11
  * @param options Опции.
12
12
  */
13
13
  const useBodyScrollLock = (ref, needDisable, options) => {
14
- (0, react_1.useEffect)(() => {
14
+ (0, hooks_1.useIsomorphicLayoutEffect)(() => {
15
15
  const element = ref.current;
16
16
  if (element && needDisable) {
17
17
  (0, body_scroll_lock_1.disableBodyScroll)(element, options);
package/hooks/index.d.ts CHANGED
@@ -26,4 +26,4 @@ export declare const useOutsideClick: (elementRef: React.MutableRefObject<HTMLEl
26
26
  * Нужен для того чтобы не получать ошибку при использовании в SSR с NodeJS.
27
27
  * @see {@link https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85#gistcomment-2911761}
28
28
  */
29
- export declare const useIsomorphicLayoutEffect: typeof React.useEffect;
29
+ export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sima-land/ui-nucleons",
3
- "version": "44.2.4",
3
+ "version": "44.2.7",
4
4
  "repository": "ssh://git@github.com:sima-land/ui-nucleons.git",
5
5
  "author": "www.sima-land.ru team",
6
6
  "license": "Apache-2.0",
package/range/index.js CHANGED
@@ -280,8 +280,8 @@ class Range extends react_1.Component {
280
280
  width: `${finish - start}%`,
281
281
  } }),
282
282
  react_1.default.createElement("div", { ref: this.containerRef, className: cx('range-container-base', 'range-container-styled') },
283
- react_1.default.createElement("button", { type: 'button', ref: this.startThumbRef, className: cx('thumb-base', 'thumb-styled'), style: { left: `${start}%` } }),
284
- react_1.default.createElement("button", { type: 'button', ref: this.finishThumbRef, className: cx('thumb-base', 'thumb-styled'), style: { left: `${finish}%` } }))));
283
+ react_1.default.createElement("button", { type: 'button', "aria-label": '\u041D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0430', ref: this.startThumbRef, className: cx('thumb-base', 'thumb-styled'), style: { left: `${start}%` }, "data-testid": 'range:thumb-start' }),
284
+ react_1.default.createElement("button", { type: 'button', "aria-label": '\u041A\u043E\u043D\u0435\u0447\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0430', ref: this.finishThumbRef, className: cx('thumb-base', 'thumb-styled'), style: { left: `${finish}%` }, "data-testid": 'range:thumb-end' }))));
285
285
  }
286
286
  }
287
287
  exports.Range = Range;
package/screen/slots.js CHANGED
@@ -48,6 +48,7 @@ const hooks_1 = require("../hooks");
48
48
  const loading_overlay_1 = require("../loading-overlay");
49
49
  const utils_1 = require("./utils");
50
50
  const screen_module_scss_1 = __importDefault(require("./screen.module.scss"));
51
+ const constants_1 = require("../constants");
51
52
  /**
52
53
  * Слот шапки экрана.
53
54
  * @param props Свойства.
@@ -90,7 +91,7 @@ exports.BodySlot = (0, react_1.forwardRef)(function BodySlot({ children }, outer
90
91
  (0, hooks_1.useInfiniteScroll)(ref, { onFullScroll, threshold: fullScrollThreshold });
91
92
  return (
92
93
  // ВАЖНО: элемент с ref должен выводиться всегда (без условий), т.к. он нужен для блокировки прокрутки
93
- react_1.default.createElement("div", { ref: ref, className: screen_module_scss_1.default.body, "data-testid": 'screen:body' }, loading ? (react_1.default.createElement(loading_overlay_1.LoadingOverlay, Object.assign({}, loadingOverlayProps, { fill: false, style: { height: '100%' } }))) : (children)));
94
+ react_1.default.createElement("div", Object.assign({ ref: ref, className: screen_module_scss_1.default.body, "data-testid": 'screen:body' }, { [constants_1.BSL_IGNORE_ATTR]: true }), loading ? (react_1.default.createElement(loading_overlay_1.LoadingOverlay, Object.assign({}, loadingOverlayProps, { fill: false, style: { height: '100%' } }))) : (children)));
94
95
  });
95
96
  /**
96
97
  * Слот футера экрана.