@sima-land/ui-nucleons 45.0.0-alpha.3 → 45.0.0-alpha.5

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 (199) hide show
  1. package/_internal/custom-scrollbar/index.d.ts +2 -2
  2. package/_internal/custom-scrollbar/index.js +17 -14
  3. package/_internal/dropdown-loading/index.js +2 -3
  4. package/_internal/page-scroll-lock/context.js +3 -25
  5. package/alert/index.d.ts +2 -2
  6. package/alert/index.js +4 -30
  7. package/arrow-button/arrow-button.module.scss +5 -5
  8. package/arrow-button/index.js +18 -19
  9. package/autocomplete/autocomplete.js +49 -76
  10. package/autocomplete-deprecated/index.d.ts +1 -1
  11. package/autocomplete-deprecated/index.js +43 -67
  12. package/avatar/avatar.module.scss +3 -1
  13. package/avatar/index.d.ts +1 -1
  14. package/avatar/index.js +10 -36
  15. package/avatar/user.d.ts +1 -1
  16. package/avatar/user.js +8 -29
  17. package/avatar/utils.d.ts +1 -1
  18. package/avatar/utils.js +12 -10
  19. package/base-input/base-input.js +5 -31
  20. package/base-input-deprecated/index.d.ts +2 -2
  21. package/base-input-deprecated/index.js +8 -34
  22. package/bordered-layout/index.d.ts +1 -1
  23. package/bordered-layout/index.js +2 -3
  24. package/bottom-bar/bottom-bar.js +2 -3
  25. package/box/index.d.ts +1 -1
  26. package/box/index.js +2 -2
  27. package/button/index.d.ts +2 -2
  28. package/button/index.js +6 -32
  29. package/card/index.js +2 -8
  30. package/card/slots.d.ts +1 -1
  31. package/card/slots.js +9 -31
  32. package/carousel/draggable.d.ts +1 -1
  33. package/carousel/draggable.js +5 -28
  34. package/carousel/index.d.ts +1 -1
  35. package/carousel/index.js +17 -43
  36. package/checkbox/index.d.ts +2 -2
  37. package/checkbox/index.js +3 -29
  38. package/checkbox-field/index.d.ts +2 -2
  39. package/checkbox-field/index.js +3 -31
  40. package/chips/index.d.ts +1 -1
  41. package/chips/index.js +3 -25
  42. package/chips/item.d.ts +1 -1
  43. package/chips/item.js +3 -5
  44. package/clean-buttons/index.js +6 -28
  45. package/dot-nav/index.d.ts +1 -1
  46. package/dot-nav/index.js +12 -34
  47. package/dropdown/index.d.ts +2 -2
  48. package/dropdown/index.js +3 -26
  49. package/dropdown-item/index.d.ts +1 -1
  50. package/dropdown-item/index.js +4 -9
  51. package/expandable/index.d.ts +2 -2
  52. package/expandable/index.js +8 -36
  53. package/field-block/index.js +2 -9
  54. package/field-grid/index.d.ts +1 -1
  55. package/field-grid/index.js +43 -65
  56. package/file-icon/index.d.ts +1 -1
  57. package/file-icon/index.js +5 -10
  58. package/group-overflow/index.js +7 -29
  59. package/helpers/define-slots.d.ts +1 -1
  60. package/helpers/events.d.ts +1 -1
  61. package/helpers/on.d.ts +1 -1
  62. package/hint/hint-view.js +3 -3
  63. package/hint/hint.js +3 -8
  64. package/hint/utils.d.ts +4 -1
  65. package/hint/utils.js +4 -3
  66. package/hint-deprecated/index.d.ts +2 -2
  67. package/hint-deprecated/index.js +3 -26
  68. package/hooks/breakpoint/index.js +3 -25
  69. package/info-text/index.js +15 -42
  70. package/input/index.js +8 -30
  71. package/layout/layout.js +2 -2
  72. package/layout/legacy.d.ts +5 -5
  73. package/layout/legacy.js +3 -25
  74. package/link/index.d.ts +6 -3
  75. package/link/index.js +3 -25
  76. package/loading-overlay/index.d.ts +1 -1
  77. package/loading-overlay/index.js +2 -3
  78. package/masked-field/index.d.ts +2 -2
  79. package/masked-field/index.js +3 -25
  80. package/masked-input/masked-input.js +3 -25
  81. package/modal/index.d.ts +1 -1
  82. package/modal/index.js +3 -10
  83. package/modal/slots.js +6 -29
  84. package/modal-overlay/index.js +3 -26
  85. package/no-index/index.d.ts +3 -3
  86. package/no-index/index.js +4 -8
  87. package/no-index-mark/index.d.ts +2 -2
  88. package/no-index-mark/index.js +7 -6
  89. package/package.json +6 -11
  90. package/pagination/index.d.ts +4 -20
  91. package/pagination/index.js +8 -15
  92. package/pagination/pagination-item.d.ts +8 -0
  93. package/pagination/pagination-item.js +31 -0
  94. package/pagination/pagination-item.module.scss +49 -0
  95. package/pagination/pagination.d.ts +8 -0
  96. package/pagination/pagination.js +78 -0
  97. package/pagination/pagination.module.scss +14 -70
  98. package/pagination/types.d.ts +28 -0
  99. package/pagination/types.js +2 -0
  100. package/pagination/utils.d.ts +15 -43
  101. package/pagination/utils.js +38 -87
  102. package/{pagination → pagination-deprecated}/base-pagination.d.ts +6 -1
  103. package/{pagination → pagination-deprecated}/base-pagination.js +33 -33
  104. package/pagination-deprecated/index.d.ts +22 -0
  105. package/pagination-deprecated/index.js +15 -0
  106. package/{pagination → pagination-deprecated}/page-button.d.ts +2 -1
  107. package/{pagination → pagination-deprecated}/page-button.js +3 -5
  108. package/pagination-deprecated/pagination.module.scss +76 -0
  109. package/pagination-deprecated/utils.d.ts +58 -0
  110. package/pagination-deprecated/utils.js +124 -0
  111. package/panel/index.js +3 -6
  112. package/phone-input/images/armenia.png +0 -0
  113. package/phone-input/images/azerbaijan.png +0 -0
  114. package/phone-input/images/belarus.png +0 -0
  115. package/phone-input/images/georgia.png +0 -0
  116. package/phone-input/images/kazakhstan.png +0 -0
  117. package/phone-input/images/kyrgyzstan.png +0 -0
  118. package/phone-input/images/moldova.png +0 -0
  119. package/phone-input/images/other.png +0 -0
  120. package/phone-input/images/russia.png +0 -0
  121. package/phone-input/images/tajikistan.png +0 -0
  122. package/phone-input/images/turkmenistan.png +0 -0
  123. package/phone-input/images/ukraine.png +0 -0
  124. package/phone-input/images/uzbekistan.png +0 -0
  125. package/phone-input/phone-input.js +13 -37
  126. package/phone-input/presets.js +2 -0
  127. package/phone-input-deprecated/index.d.ts +1 -1
  128. package/phone-input-deprecated/index.js +31 -57
  129. package/plate/index.d.ts +2 -2
  130. package/plate/index.js +3 -25
  131. package/popup/popup-view.js +3 -6
  132. package/popup/popup.js +4 -26
  133. package/portal/index.d.ts +1 -1
  134. package/price/index.js +2 -2
  135. package/radio-button/index.js +2 -4
  136. package/range/index.d.ts +1 -1
  137. package/range/index.js +6 -33
  138. package/rating/index.d.ts +1 -1
  139. package/rating/index.js +4 -9
  140. package/readme.md +4 -67
  141. package/screen/index.d.ts +5 -5
  142. package/screen/index.js +11 -37
  143. package/screen/slots.d.ts +3 -3
  144. package/screen/slots.js +9 -31
  145. package/select/parts/block.js +6 -28
  146. package/select/parts/button.js +7 -29
  147. package/select/parts/menu.js +12 -33
  148. package/select/select.js +4 -28
  149. package/select-deprecated/index.d.ts +1 -1
  150. package/select-deprecated/index.js +32 -56
  151. package/side-page/index.js +4 -30
  152. package/side-page/slots.js +4 -4
  153. package/spinner/index.d.ts +1 -1
  154. package/spinner/index.js +3 -5
  155. package/spinner/spinner.module.scss +3 -1
  156. package/stepper/index.d.ts +2 -2
  157. package/stepper/index.js +11 -38
  158. package/stroked-svg/index.d.ts +2 -2
  159. package/stroked-svg/index.js +3 -27
  160. package/styling/sizes.module.scss +3 -1
  161. package/super-ellipse-clip-path/index.js +2 -8
  162. package/switcher-row/index.js +5 -10
  163. package/tabs/index.d.ts +1 -1
  164. package/tabs/index.js +4 -26
  165. package/text/index.d.ts +2 -2
  166. package/text/index.js +3 -25
  167. package/text-button/index.d.ts +2 -2
  168. package/text-button/index.js +4 -7
  169. package/text-button/text-button.module.scss +1 -1
  170. package/text-field/index.d.ts +2 -2
  171. package/text-field/index.js +25 -55
  172. package/textarea/index.js +4 -26
  173. package/timer/index.d.ts +1 -1
  174. package/timer/index.js +3 -25
  175. package/toggle/index.d.ts +2 -2
  176. package/toggle/index.js +3 -27
  177. package/tooltip/index.d.ts +2 -2
  178. package/tooltip/index.js +4 -28
  179. package/top-bar/index.d.ts +1 -1
  180. package/top-bar/index.js +3 -1
  181. package/top-bar/top-bar.js +5 -45
  182. package/top-bar/utils.d.ts +2 -2
  183. package/top-bar/utils.js +6 -28
  184. package/touch-slider/index.d.ts +1 -1
  185. package/touch-slider/index.js +2 -4
  186. package/unknown-content/index.d.ts +1 -1
  187. package/unknown-content/index.js +3 -25
  188. package/upload-area/upload-area.js +8 -38
  189. package/with-hint/index.d.ts +1 -1
  190. package/with-hint/index.js +3 -28
  191. package/with-hint/positioning-hint.d.ts +1 -1
  192. package/with-hint/positioning-hint.js +3 -25
  193. package/with-tooltip/index.d.ts +1 -1
  194. package/with-tooltip/index.js +6 -31
  195. package/with-tooltip/positioning-tooltip.d.ts +1 -1
  196. package/with-tooltip/positioning-tooltip.js +4 -26
  197. package/file-icon/unknown.svg +0 -9
  198. package/rating/star.svg +0 -3
  199. package/upload-area/upload.svg +0 -6
@@ -1,34 +1,12 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
6
  exports.InfoText = void 0;
30
- const react_1 = __importStar(require("react"));
31
- const information_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/information"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
9
+ const Information_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/Information"));
32
10
  const bind_1 = __importDefault(require("classnames/bind"));
33
11
  const info_text_module_scss_1 = __importDefault(require("./info-text.module.scss"));
34
12
  const cx = bind_1.default.bind(info_text_module_scss_1.default);
@@ -39,22 +17,17 @@ const cx = bind_1.default.bind(info_text_module_scss_1.default);
39
17
  * @return Элемент.
40
18
  */
41
19
  function InfoText({ children, style, className, iconRef, onIconClick, iconActive, 'data-testid': testId = 'info-text', }) {
42
- return (react_1.default.createElement("span", { style: style, className: className, "data-testid": testId }, react_1.Children.toArray(children).map((item, index, array) => {
43
- if (index < array.length - 1) {
44
- return item;
45
- }
46
- else {
47
- const text = String(item);
48
- const lastSpaceIndex = text.lastIndexOf(' ');
49
- const head = text.slice(0, lastSpaceIndex);
50
- const last = text.slice(lastSpaceIndex);
51
- return (react_1.default.createElement(react_1.Fragment, { key: index },
52
- head,
53
- last && (react_1.default.createElement("span", { className: info_text_module_scss_1.default.last },
54
- last,
55
- react_1.default.createElement("button", { ref: iconRef, type: 'button', "aria-label": '\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435', disabled: !onIconClick, "aria-hidden": !onIconClick, onClick: onIconClick, className: cx('button', { active: iconActive }), "data-testid": 'info-text:icon' },
56
- react_1.default.createElement(information_1.default, { className: cx('icon') }))))));
57
- }
58
- })));
20
+ return ((0, jsx_runtime_1.jsx)("span", Object.assign({ style: style, className: className, "data-testid": testId }, { children: react_1.Children.toArray(children).map((item, index, array) => {
21
+ if (index < array.length - 1) {
22
+ return item;
23
+ }
24
+ else {
25
+ const text = String(item);
26
+ const lastSpaceIndex = text.lastIndexOf(' ');
27
+ const head = text.slice(0, lastSpaceIndex);
28
+ const last = text.slice(lastSpaceIndex);
29
+ return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [head, last && ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: info_text_module_scss_1.default.last }, { children: [last, (0, jsx_runtime_1.jsx)("button", Object.assign({ ref: iconRef, type: 'button', "aria-label": '\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435', disabled: !onIconClick, "aria-hidden": !onIconClick, onClick: onIconClick, className: cx('button', { active: iconActive }), "data-testid": 'info-text:icon' }, { children: (0, jsx_runtime_1.jsx)(Information_1.default, { className: cx('icon') }) }))] })))] }, index));
30
+ }
31
+ }) })));
59
32
  }
60
33
  exports.InfoText = InfoText;
package/input/index.js CHANGED
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -38,13 +15,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.Input = void 0;
41
- const react_1 = __importStar(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = require("react");
42
20
  const base_input_1 = require("../base-input");
43
21
  const field_block_1 = require("../field-block");
44
22
  const utils_1 = require("./utils");
45
23
  const events_1 = require("../helpers/events");
46
- const cross_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Filled/cross"));
47
- const cross_2 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Filled/cross"));
24
+ const Cross_1 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Filled/Cross"));
25
+ const Cross_2 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Filled/Cross"));
48
26
  const bind_1 = __importDefault(require("classnames/bind"));
49
27
  const input_module_scss_1 = __importDefault(require("./input.module.scss"));
50
28
  const cx = bind_1.default.bind(input_module_scss_1.default);
@@ -66,18 +44,18 @@ function Input(_a) {
66
44
  const ref = (0, react_1.useRef)(null);
67
45
  const [filled, updateFilled] = (0, utils_1.useFilledState)(ref, { value, defaultValue });
68
46
  const [focused, setFocused] = (0, react_1.useState)(false);
69
- const CrossSVG = size === 's' ? cross_1.default : cross_2.default;
47
+ const CrossSVG = size === 's' ? Cross_1.default : Cross_2.default;
70
48
  const handleMouseDown = (0, utils_1.useFieldMouseDown)(ref, blockProps === null || blockProps === void 0 ? void 0 : blockProps.onMouseDown);
71
49
  (0, react_1.useImperativeHandle)(inputRef, () => ref.current);
72
- return (react_1.default.createElement(field_block_1.FieldBlock, Object.assign({}, restProps, { rootProps: Object.assign(Object.assign({}, restProps.rootProps), { style,
50
+ return ((0, jsx_runtime_1.jsx)(field_block_1.FieldBlock, Object.assign({}, restProps, { rootProps: Object.assign(Object.assign({}, restProps.rootProps), { style,
73
51
  className }), "data-testid": testId, caption: caption, disabled: disabled, failed: failed, focused: focusedProp !== null && focusedProp !== void 0 ? focusedProp : focused, label: label, labelAsPlaceholder: !focused && !filled, labelProps: { htmlFor: id }, size: size }, (clearable &&
74
52
  focused &&
75
53
  filled && {
76
- adornmentEnd: (react_1.default.createElement(CrossSVG, { "data-testid": 'input:clear-button', role: 'button', "aria-label": '\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043F\u043E\u043B\u0435', className: cx('clear-button'), onClick: e => {
54
+ adornmentEnd: ((0, jsx_runtime_1.jsx)(CrossSVG, { "data-testid": 'input:clear-button', role: 'button', "aria-label": '\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043F\u043E\u043B\u0435', className: cx('clear-button'), onClick: e => {
77
55
  ref.current && (0, events_1.triggerInput)(ref.current, '');
78
56
  onClear === null || onClear === void 0 ? void 0 : onClear(e);
79
57
  } })),
80
- }), { blockProps: Object.assign(Object.assign({}, blockProps), { onMouseDown: handleMouseDown }), main: react_1.default.createElement(base_input_1.BaseInput, Object.assign({}, baseInputProps, { inputRef: ref, multiline: false, className: cx('input', baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.className), style: Object.assign(Object.assign({}, baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.style), { '--placeholder-color': (0, utils_1.definePlaceholderColor)({ failed, disabled }) }), autoComplete: autoComplete, autoFocus: autoFocus, defaultValue: defaultValue, disabled: disabled, id: id, name: name, placeholder: !focused ? label || placeholder : placeholder, readOnly: readOnly, required: required, type: type, value: value, onFocus: event => {
58
+ }), { blockProps: Object.assign(Object.assign({}, blockProps), { onMouseDown: handleMouseDown }), main: (0, jsx_runtime_1.jsx)(base_input_1.BaseInput, Object.assign({}, baseInputProps, { inputRef: ref, multiline: false, className: cx('input', baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.className), style: Object.assign(Object.assign({}, baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.style), { '--placeholder-color': (0, utils_1.definePlaceholderColor)({ failed, disabled }) }), autoComplete: autoComplete, autoFocus: autoFocus, defaultValue: defaultValue, disabled: disabled, id: id, name: name, placeholder: !focused ? label || placeholder : placeholder, readOnly: readOnly, required: required, type: type, value: value, onFocus: event => {
81
59
  onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
82
60
  updateFilled(event);
83
61
  setFocused(true);
package/layout/layout.js CHANGED
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.Layout = void 0;
18
- const react_1 = __importDefault(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const bind_1 = __importDefault(require("classnames/bind"));
20
20
  const layout_module_scss_1 = __importDefault(require("./layout.module.scss"));
21
21
  const cx = bind_1.default.bind(layout_module_scss_1.default);
@@ -27,6 +27,6 @@ const cx = bind_1.default.bind(layout_module_scss_1.default);
27
27
  function Layout(_a) {
28
28
  var { children, className, disabledOn = [], rootRef } = _a, rest = __rest(_a, ["children", "className", "disabledOn", "rootRef"]);
29
29
  const rootClassName = cx('layout', className, disabledOn.map(key => `disabled-${key}`));
30
- return (react_1.default.createElement("div", Object.assign({}, rest, { ref: rootRef, className: rootClassName }), children));
30
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, rest, { ref: rootRef, className: rootClassName }, { children: children })));
31
31
  }
32
32
  exports.Layout = Layout;
@@ -1,15 +1,15 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { LayoutProps } from './types';
3
3
  /**
4
4
  * @deprecated На адаптивных страницах стоит использовать Layout.
5
5
  */
6
- declare const DesktopLayout: React.ForwardRefExoticComponent<LayoutProps & {
6
+ declare const DesktopLayout: import("react").ForwardRefExoticComponent<LayoutProps & {
7
7
  element?: string | undefined;
8
- } & React.RefAttributes<HTMLElement>>;
8
+ } & import("react").RefAttributes<HTMLElement>>;
9
9
  /**
10
10
  * @deprecated На адаптивных страницах стоит использовать Layout.
11
11
  */
12
- declare const MobileLayout: React.ForwardRefExoticComponent<LayoutProps & {
12
+ declare const MobileLayout: import("react").ForwardRefExoticComponent<LayoutProps & {
13
13
  element?: string | undefined;
14
- } & React.RefAttributes<HTMLElement>>;
14
+ } & import("react").RefAttributes<HTMLElement>>;
15
15
  export { DesktopLayout, MobileLayout };
package/layout/legacy.js CHANGED
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -38,7 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.MobileLayout = exports.DesktopLayout = void 0;
41
- const react_1 = __importStar(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = require("react");
42
20
  const bind_1 = __importDefault(require("classnames/bind"));
43
21
  const legacy_module_scss_1 = __importDefault(require("./legacy.module.scss"));
44
22
  const cx = bind_1.default.bind(legacy_module_scss_1.default);
@@ -51,7 +29,7 @@ const cx = bind_1.default.bind(legacy_module_scss_1.default);
51
29
  const createLayout = (specificClass, displayName) => {
52
30
  const Component = (0, react_1.forwardRef)((_a, ref) => {
53
31
  var { className, element: Element = 'div', disabledOn = [] } = _a, restProps = __rest(_a, ["className", "element", "disabledOn"]);
54
- return (react_1.default.createElement(Element, Object.assign({}, restProps, { ref: ref, className: cx('layout', specificClass, className, disabledOn.map(key => `disabled-${key}`)) })));
32
+ return ((0, jsx_runtime_1.jsx)(Element, Object.assign({}, restProps, { ref: ref, className: cx('layout', specificClass, className, disabledOn.map(key => `disabled-${key}`)) })));
55
33
  });
56
34
  Component.displayName = displayName;
57
35
  return Component;
package/link/index.d.ts CHANGED
@@ -1,10 +1,13 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { Token } from '../colors';
3
3
  export type LinkColor = Extract<Token, 'basic-blue' | 'basic-gray87' | 'basic-gray38' | 'basic-white' | 'additional-red' | 'additional-teal'>;
4
4
  export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
5
5
  /** Цвет (название токена). */
6
6
  color?: LinkColor;
7
- /** Нужно ли оборачивать содержимое комментариями no-index. */
7
+ /**
8
+ * Нужно ли оборачивать содержимое комментариями no-index.
9
+ * @deprecated
10
+ */
8
11
  noIndex?: boolean;
9
12
  /** Выводить как псевдо-ссылку. */
10
13
  pseudo?: boolean;
@@ -21,4 +24,4 @@ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>
21
24
  * @param ref Реф для DOM-элемента ссылки.
22
25
  * @return Элемент.
23
26
  */
24
- export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
27
+ export declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
package/link/index.js CHANGED
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -38,7 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.Link = void 0;
41
- const react_1 = __importStar(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = require("react");
42
20
  const get_no_index_1 = require("../helpers/get-no-index");
43
21
  const bind_1 = __importDefault(require("classnames/bind"));
44
22
  const link_module_scss_1 = __importDefault(require("./link.module.scss"));
@@ -64,5 +42,5 @@ exports.Link = (0, react_1.forwardRef)(function Link(_a, ref) {
64
42
  tabIndex: disabled ? undefined : tabIndex || 0,
65
43
  }
66
44
  : { role, tabIndex };
67
- return (react_1.default.createElement("a", Object.assign({}, baseProps, restProps, { "data-testid": testId, ref: ref, className: cx('link', className, color, { disabled, underline }) }, getContentProps(children, noIndex))));
45
+ return ((0, jsx_runtime_1.jsx)("a", Object.assign({}, baseProps, restProps, { "data-testid": testId, ref: ref, className: cx('link', className, color, { disabled, underline }) }, getContentProps(children, noIndex))));
68
46
  });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { SpinnerProps } from '../spinner';
3
3
  export interface LoadingOverlayProps {
4
4
  /** Пользовательский CSS-класс корневого элемента. */
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.LoadingOverlay = void 0;
7
- const react_1 = __importDefault(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const spinner_1 = require("../spinner");
9
9
  const bind_1 = __importDefault(require("classnames/bind"));
10
10
  const loading_overlay_module_scss_1 = __importDefault(require("./loading-overlay.module.scss"));
@@ -15,6 +15,5 @@ const cx = bind_1.default.bind(loading_overlay_module_scss_1.default);
15
15
  * @param props Свойства.
16
16
  * @return Элемент.
17
17
  */
18
- const LoadingOverlay = ({ style, className, spinnerProps = {}, fill = true, }) => (react_1.default.createElement("div", { className: cx('loading-overlay', fill && 'fill', className), style: style },
19
- react_1.default.createElement(spinner_1.Spinner, Object.assign({}, spinnerProps))));
18
+ const LoadingOverlay = ({ style, className, spinnerProps = {}, fill = true, }) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('loading-overlay', fill && 'fill', className), style: style }, { children: (0, jsx_runtime_1.jsx)(spinner_1.Spinner, Object.assign({}, spinnerProps)) })));
20
19
  exports.LoadingOverlay = LoadingOverlay;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { TextFieldProps } from '../text-field';
3
3
  export interface MaskState {
4
4
  value: string;
@@ -20,4 +20,4 @@ export interface MaskedFieldProps extends Omit<TextFieldProps, 'value' | 'onBlur
20
20
  * @param props.value Значение.
21
21
  * @param props.onBlur Сработает при событии blur.
22
22
  */
23
- export declare const MaskedField: React.ForwardRefExoticComponent<MaskedFieldProps & React.RefAttributes<HTMLInputElement | undefined>>;
23
+ export declare const MaskedField: import("react").ForwardRefExoticComponent<MaskedFieldProps & import("react").RefAttributes<HTMLInputElement | undefined>>;
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -35,7 +12,8 @@ var __rest = (this && this.__rest) || function (s, e) {
35
12
  };
36
13
  Object.defineProperty(exports, "__esModule", { value: true });
37
14
  exports.MaskedField = void 0;
38
- const react_1 = __importStar(require("react"));
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ const react_1 = require("react");
39
17
  const text_field_1 = require("../text-field");
40
18
  const dom_1 = require("@krutoo/input-mask/dist/dom");
41
19
  const maskCommons = { placeholder: '_', pattern: /\d/ };
@@ -62,7 +40,7 @@ exports.MaskedField = (0, react_1.forwardRef)(function MaskedField(_a, ref) {
62
40
  (0, react_1.useEffect)(() => {
63
41
  inputMask && inputMask.setValue(value);
64
42
  }, [value, inputMask]);
65
- return (react_1.default.createElement(text_field_1.TextField, Object.assign({}, restOptions, { ref: innerRef, multiline: false, restPlaceholder: {
43
+ return ((0, jsx_runtime_1.jsx)(text_field_1.TextField, Object.assign({}, restOptions, { ref: innerRef, multiline: false, restPlaceholder: {
66
44
  value: mask.slice(inputState.value.length),
67
45
  shiftValue: inputState.value,
68
46
  },
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -35,7 +12,8 @@ var __rest = (this && this.__rest) || function (s, e) {
35
12
  };
36
13
  Object.defineProperty(exports, "__esModule", { value: true });
37
14
  exports.MaskedInput = void 0;
38
- const react_1 = __importStar(require("react"));
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ const react_1 = require("react");
39
17
  const input_1 = require("../input");
40
18
  const utils_1 = require("@krutoo/input-mask/dist/dom/utils");
41
19
  const hook_1 = require("./hook");
@@ -58,7 +36,7 @@ function MaskedInput(_a) {
58
36
  cleanValue: utils_1.Value.toClean({ mask, placeholder }, store.getState().value),
59
37
  completed: store.getState().value.length === mask.length,
60
38
  }), [store, mask, placeholder]);
61
- return (react_1.default.createElement(input_1.Input, Object.assign({}, props, { baseInputProps: Object.assign(Object.assign({}, baseInputProps), { restPlaceholder: (_b = baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.restPlaceholder) !== null && _b !== void 0 ? _b : {
39
+ return ((0, jsx_runtime_1.jsx)(input_1.Input, Object.assign({}, props, { baseInputProps: Object.assign(Object.assign({}, baseInputProps), { restPlaceholder: (_b = baseInputProps === null || baseInputProps === void 0 ? void 0 : baseInputProps.restPlaceholder) !== null && _b !== void 0 ? _b : {
62
40
  value: mask.slice(store.getState().value.length),
63
41
  shiftValue: store.getState().value,
64
42
  } }), inputRef: bind.ref, value: bind.value, onFocus: event => {
package/modal/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { ModalBody, ModalFooter, ModalHeader, ModalOverlap } from './slots';
3
3
  import { WithPageScrollLock } from '../_internal/page-scroll-lock';
4
4
  export type ModalSize = 's' | 'm' | 'l' | 'xl' | 'fullscreen';
package/modal/index.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Modal = void 0;
7
- const react_1 = __importDefault(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const utils_1 = require("./utils");
9
9
  const slots_1 = require("./slots");
10
10
  const modal_overlay_1 = require("../modal-overlay");
@@ -33,19 +33,12 @@ function Modal({ children, height, onClose, scrollDisableOptions, size = 'm', fo
33
33
  ? `${Math.min(696, height)}px`
34
34
  : undefined,
35
35
  };
36
- return (react_1.default.createElement(modal_overlay_1.ModalOverlay, Object.assign({ className: cx('overlay') }, overlayClickBind),
37
- react_1.default.createElement(plate_1.Plate, { rounds: null, shadow: fullscreen ? null : 'z4', style: style, className: cx('modal', `size-${size}`, header && 'has-header', footer && 'has-footer'), "data-testid": testId },
38
- react_1.default.createElement(utils_1.ModalContext.Provider, { value: {
36
+ return ((0, jsx_runtime_1.jsx)(modal_overlay_1.ModalOverlay, Object.assign({ className: cx('overlay') }, overlayClickBind, { children: (0, jsx_runtime_1.jsx)(plate_1.Plate, Object.assign({ rounds: null, shadow: fullscreen ? null : 'z4', style: style, className: cx('modal', `size-${size}`, header && 'has-header', footer && 'has-footer'), "data-testid": testId }, { children: (0, jsx_runtime_1.jsxs)(utils_1.ModalContext.Provider, Object.assign({ value: {
39
37
  withScrollDisable,
40
38
  scrollDisableOptions,
41
39
  topBarSize: 'unset',
42
40
  bottomBarSize: 'unset',
43
- } },
44
- header,
45
- content,
46
- footer,
47
- !footer && footerStub && react_1.default.createElement("div", { className: cx('footer-stub') }),
48
- overlap && (react_1.default.createElement("div", { className: cx('overlap-content'), "data-testid": 'modal:overlap' }, overlap))))));
41
+ } }, { children: [header, content, footer, !footer && footerStub && (0, jsx_runtime_1.jsx)("div", { className: cx('footer-stub') }), overlap && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('overlap-content'), "data-testid": 'modal:overlap' }, { children: overlap })))] })) })) })));
49
42
  }
50
43
  exports.Modal = Modal;
51
44
  Modal.Header = slots_1.ModalHeader;
package/modal/slots.js CHANGED
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -38,7 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.ModalOverlap = exports.ModalFooter = exports.ModalBody = exports.ModalHeader = void 0;
41
- const react_1 = __importStar(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = require("react");
42
20
  const top_bar_1 = require("../top-bar");
43
21
  const utils_1 = require("../top-bar/utils");
44
22
  const bottom_bar_1 = require("../bottom-bar");
@@ -57,7 +35,7 @@ const cx = bind_1.default.bind(modal_module_scss_1.default);
57
35
  function ModalHeader(_a) {
58
36
  var { className, onBack, onClose, buttons } = _a, rest = __rest(_a, ["className", "onBack", "onClose", "buttons"]);
59
37
  const { topBarSize } = (0, react_1.useContext)(utils_2.ModalContext);
60
- return (react_1.default.createElement(top_bar_1.TopBar, Object.assign({}, rest, { size: topBarSize, buttons: (0, utils_1.navigationButtons)({ buttons, onBack, onClose }), className: cx('header', className) })));
38
+ return ((0, jsx_runtime_1.jsx)(top_bar_1.TopBar, Object.assign({}, rest, { size: topBarSize, buttons: (0, utils_1.navigationButtons)({ buttons, onBack, onClose }), className: cx('header', className) })));
61
39
  }
62
40
  exports.ModalHeader = ModalHeader;
63
41
  /**
@@ -73,8 +51,7 @@ function ModalBody({ children, onFullScroll, fullScrollThreshold, }) {
73
51
  (0, react_1.useImperativeHandle)(scrollableRef, () => (0, custom_scrollbar_1.getViewport)(osComponentRef.current));
74
52
  (0, react_1.useImperativeHandle)(viewportRef, () => (0, custom_scrollbar_1.getViewport)(osComponentRef.current));
75
53
  (0, page_scroll_lock_1.usePageScrollLock)(scrollableRef, Object.assign({ lockEnabled: withScrollDisable }, scrollDisableOptions));
76
- return (react_1.default.createElement(viewport_1.ViewportContext.Provider, { value: viewportRef },
77
- react_1.default.createElement(custom_scrollbar_1.CustomScrollbar, { inFlexBox: true, osComponentRef: osComponentRef, className: modal_module_scss_1.default.body, overflow: { x: 'hidden', y: 'scroll' }, onFullScroll: onFullScroll, fullScrollThreshold: fullScrollThreshold }, children)));
54
+ return ((0, jsx_runtime_1.jsx)(viewport_1.ViewportContext.Provider, Object.assign({ value: viewportRef }, { children: (0, jsx_runtime_1.jsx)(custom_scrollbar_1.CustomScrollbar, Object.assign({ inFlexBox: true, osComponentRef: osComponentRef, className: modal_module_scss_1.default.body, overflow: { x: 'hidden', y: 'scroll' }, onFullScroll: onFullScroll, fullScrollThreshold: fullScrollThreshold }, { children: children })) })));
78
55
  }
79
56
  exports.ModalBody = ModalBody;
80
57
  /**
@@ -85,7 +62,7 @@ exports.ModalBody = ModalBody;
85
62
  function ModalFooter(_a) {
86
63
  var { className } = _a, rest = __rest(_a, ["className"]);
87
64
  const { bottomBarSize } = (0, react_1.useContext)(utils_2.ModalContext);
88
- return react_1.default.createElement(bottom_bar_1.BottomBar, Object.assign({}, rest, { size: bottomBarSize, className: cx('footer', className) }));
65
+ return (0, jsx_runtime_1.jsx)(bottom_bar_1.BottomBar, Object.assign({}, rest, { size: bottomBarSize, className: cx('footer', className) }));
89
66
  }
90
67
  exports.ModalFooter = ModalFooter;
91
68
  /**
@@ -94,6 +71,6 @@ exports.ModalFooter = ModalFooter;
94
71
  * @return Элемент.
95
72
  */
96
73
  function ModalOverlap({ children }) {
97
- return react_1.default.createElement(react_1.default.Fragment, null, children);
74
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
98
75
  }
99
76
  exports.ModalOverlap = ModalOverlap;
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __rest = (this && this.__rest) || function (s, e) {
26
3
  var t = {};
27
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -38,7 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
15
  };
39
16
  Object.defineProperty(exports, "__esModule", { value: true });
40
17
  exports.ModalOverlay = void 0;
41
- const react_1 = __importStar(require("react"));
18
+ const jsx_runtime_1 = require("react/jsx-runtime");
19
+ const react_1 = require("react");
42
20
  const styles_1 = require("../hooks/styles");
43
21
  const layer_1 = require("../helpers/layer");
44
22
  const classnames_1 = __importDefault(require("classnames"));
@@ -54,7 +32,6 @@ function ModalOverlay(_a) {
54
32
  const ref = (0, react_1.useRef)(null);
55
33
  (0, react_1.useImperativeHandle)(rootRef, () => ref.current);
56
34
  (0, styles_1.useViewportHeightUnit)(ref);
57
- return (react_1.default.createElement(layer_1.LayerProvider, { value: layer },
58
- react_1.default.createElement("div", Object.assign({}, restProps, { ref: ref, className: (0, classnames_1.default)(modal_overlay_module_scss_1.default.root, className), "data-testid": testId, style: Object.assign(Object.assign({}, style), { zIndex: layer }) }), children)));
35
+ return ((0, jsx_runtime_1.jsx)(layer_1.LayerProvider, Object.assign({ value: layer }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({}, restProps, { ref: ref, className: (0, classnames_1.default)(modal_overlay_module_scss_1.default.root, className), "data-testid": testId, style: Object.assign(Object.assign({}, style), { zIndex: layer }) }, { children: children })) })));
59
36
  }
60
37
  exports.ModalOverlay = ModalOverlay;
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export interface NoIndexProps {
3
3
  /** Содержимое. */
4
- children?: React.ReactNode;
4
+ children?: ReactNode;
5
5
  }
6
6
  /**
7
7
  * Компонент отображает неиндексируемый контент.
8
8
  * @param props Свойства.
9
9
  * @return Элемент.
10
10
  */
11
- export declare const NoIndex: React.FC<NoIndexProps>;
11
+ export declare function NoIndex({ children }: NoIndexProps): JSX.Element;
package/no-index/index.js CHANGED
@@ -1,18 +1,14 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.NoIndex = void 0;
7
- const react_1 = __importDefault(require("react"));
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
5
  const no_index_mark_1 = require("../no-index-mark");
9
6
  /**
10
7
  * Компонент отображает неиндексируемый контент.
11
8
  * @param props Свойства.
12
9
  * @return Элемент.
13
10
  */
14
- const NoIndex = ({ children }) => (react_1.default.createElement(react_1.default.Fragment, null,
15
- react_1.default.createElement(no_index_mark_1.NoIndexMark, null),
16
- children,
17
- react_1.default.createElement(no_index_mark_1.NoIndexMark, { closing: true })));
11
+ function NoIndex({ children }) {
12
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(no_index_mark_1.NoIndexMark, {}), children, (0, jsx_runtime_1.jsx)(no_index_mark_1.NoIndexMark, { closing: true })] }));
13
+ }
18
14
  exports.NoIndex = NoIndex;