@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.
- package/_internal/custom-scrollbar/index.d.ts +2 -2
- package/_internal/custom-scrollbar/index.js +17 -14
- package/_internal/dropdown-loading/index.js +2 -3
- package/_internal/page-scroll-lock/context.js +3 -25
- package/alert/index.d.ts +2 -2
- package/alert/index.js +4 -30
- package/arrow-button/arrow-button.module.scss +5 -5
- package/arrow-button/index.js +18 -19
- package/autocomplete/autocomplete.js +49 -76
- package/autocomplete-deprecated/index.d.ts +1 -1
- package/autocomplete-deprecated/index.js +43 -67
- package/avatar/avatar.module.scss +3 -1
- package/avatar/index.d.ts +1 -1
- package/avatar/index.js +10 -36
- package/avatar/user.d.ts +1 -1
- package/avatar/user.js +8 -29
- package/avatar/utils.d.ts +1 -1
- package/avatar/utils.js +12 -10
- package/base-input/base-input.js +5 -31
- package/base-input-deprecated/index.d.ts +2 -2
- package/base-input-deprecated/index.js +8 -34
- package/bordered-layout/index.d.ts +1 -1
- package/bordered-layout/index.js +2 -3
- package/bottom-bar/bottom-bar.js +2 -3
- package/box/index.d.ts +1 -1
- package/box/index.js +2 -2
- package/button/index.d.ts +2 -2
- package/button/index.js +6 -32
- package/card/index.js +2 -8
- package/card/slots.d.ts +1 -1
- package/card/slots.js +9 -31
- package/carousel/draggable.d.ts +1 -1
- package/carousel/draggable.js +5 -28
- package/carousel/index.d.ts +1 -1
- package/carousel/index.js +17 -43
- package/checkbox/index.d.ts +2 -2
- package/checkbox/index.js +3 -29
- package/checkbox-field/index.d.ts +2 -2
- package/checkbox-field/index.js +3 -31
- package/chips/index.d.ts +1 -1
- package/chips/index.js +3 -25
- package/chips/item.d.ts +1 -1
- package/chips/item.js +3 -5
- package/clean-buttons/index.js +6 -28
- package/dot-nav/index.d.ts +1 -1
- package/dot-nav/index.js +12 -34
- package/dropdown/index.d.ts +2 -2
- package/dropdown/index.js +3 -26
- package/dropdown-item/index.d.ts +1 -1
- package/dropdown-item/index.js +4 -9
- package/expandable/index.d.ts +2 -2
- package/expandable/index.js +8 -36
- package/field-block/index.js +2 -9
- package/field-grid/index.d.ts +1 -1
- package/field-grid/index.js +43 -65
- package/file-icon/index.d.ts +1 -1
- package/file-icon/index.js +5 -10
- package/group-overflow/index.js +7 -29
- package/helpers/define-slots.d.ts +1 -1
- package/helpers/events.d.ts +1 -1
- package/helpers/on.d.ts +1 -1
- package/hint/hint-view.js +3 -3
- package/hint/hint.js +3 -8
- package/hint/utils.d.ts +4 -1
- package/hint/utils.js +4 -3
- package/hint-deprecated/index.d.ts +2 -2
- package/hint-deprecated/index.js +3 -26
- package/hooks/breakpoint/index.js +3 -25
- package/info-text/index.js +15 -42
- package/input/index.js +8 -30
- package/layout/layout.js +2 -2
- package/layout/legacy.d.ts +5 -5
- package/layout/legacy.js +3 -25
- package/link/index.d.ts +6 -3
- package/link/index.js +3 -25
- package/loading-overlay/index.d.ts +1 -1
- package/loading-overlay/index.js +2 -3
- package/masked-field/index.d.ts +2 -2
- package/masked-field/index.js +3 -25
- package/masked-input/masked-input.js +3 -25
- package/modal/index.d.ts +1 -1
- package/modal/index.js +3 -10
- package/modal/slots.js +6 -29
- package/modal-overlay/index.js +3 -26
- package/no-index/index.d.ts +3 -3
- package/no-index/index.js +4 -8
- package/no-index-mark/index.d.ts +2 -2
- package/no-index-mark/index.js +7 -6
- package/package.json +6 -11
- package/pagination/index.d.ts +4 -20
- package/pagination/index.js +8 -15
- package/pagination/pagination-item.d.ts +8 -0
- package/pagination/pagination-item.js +31 -0
- package/pagination/pagination-item.module.scss +49 -0
- package/pagination/pagination.d.ts +8 -0
- package/pagination/pagination.js +78 -0
- package/pagination/pagination.module.scss +14 -70
- package/pagination/types.d.ts +28 -0
- package/pagination/types.js +2 -0
- package/pagination/utils.d.ts +15 -43
- package/pagination/utils.js +38 -87
- package/{pagination → pagination-deprecated}/base-pagination.d.ts +6 -1
- package/{pagination → pagination-deprecated}/base-pagination.js +33 -33
- package/pagination-deprecated/index.d.ts +22 -0
- package/pagination-deprecated/index.js +15 -0
- package/{pagination → pagination-deprecated}/page-button.d.ts +2 -1
- package/{pagination → pagination-deprecated}/page-button.js +3 -5
- package/pagination-deprecated/pagination.module.scss +76 -0
- package/pagination-deprecated/utils.d.ts +58 -0
- package/pagination-deprecated/utils.js +124 -0
- package/panel/index.js +3 -6
- package/phone-input/images/armenia.png +0 -0
- package/phone-input/images/azerbaijan.png +0 -0
- package/phone-input/images/belarus.png +0 -0
- package/phone-input/images/georgia.png +0 -0
- package/phone-input/images/kazakhstan.png +0 -0
- package/phone-input/images/kyrgyzstan.png +0 -0
- package/phone-input/images/moldova.png +0 -0
- package/phone-input/images/other.png +0 -0
- package/phone-input/images/russia.png +0 -0
- package/phone-input/images/tajikistan.png +0 -0
- package/phone-input/images/turkmenistan.png +0 -0
- package/phone-input/images/ukraine.png +0 -0
- package/phone-input/images/uzbekistan.png +0 -0
- package/phone-input/phone-input.js +13 -37
- package/phone-input/presets.js +2 -0
- package/phone-input-deprecated/index.d.ts +1 -1
- package/phone-input-deprecated/index.js +31 -57
- package/plate/index.d.ts +2 -2
- package/plate/index.js +3 -25
- package/popup/popup-view.js +3 -6
- package/popup/popup.js +4 -26
- package/portal/index.d.ts +1 -1
- package/price/index.js +2 -2
- package/radio-button/index.js +2 -4
- package/range/index.d.ts +1 -1
- package/range/index.js +6 -33
- package/rating/index.d.ts +1 -1
- package/rating/index.js +4 -9
- package/readme.md +4 -67
- package/screen/index.d.ts +5 -5
- package/screen/index.js +11 -37
- package/screen/slots.d.ts +3 -3
- package/screen/slots.js +9 -31
- package/select/parts/block.js +6 -28
- package/select/parts/button.js +7 -29
- package/select/parts/menu.js +12 -33
- package/select/select.js +4 -28
- package/select-deprecated/index.d.ts +1 -1
- package/select-deprecated/index.js +32 -56
- package/side-page/index.js +4 -30
- package/side-page/slots.js +4 -4
- package/spinner/index.d.ts +1 -1
- package/spinner/index.js +3 -5
- package/spinner/spinner.module.scss +3 -1
- package/stepper/index.d.ts +2 -2
- package/stepper/index.js +11 -38
- package/stroked-svg/index.d.ts +2 -2
- package/stroked-svg/index.js +3 -27
- package/styling/sizes.module.scss +3 -1
- package/super-ellipse-clip-path/index.js +2 -8
- package/switcher-row/index.js +5 -10
- package/tabs/index.d.ts +1 -1
- package/tabs/index.js +4 -26
- package/text/index.d.ts +2 -2
- package/text/index.js +3 -25
- package/text-button/index.d.ts +2 -2
- package/text-button/index.js +4 -7
- package/text-button/text-button.module.scss +1 -1
- package/text-field/index.d.ts +2 -2
- package/text-field/index.js +25 -55
- package/textarea/index.js +4 -26
- package/timer/index.d.ts +1 -1
- package/timer/index.js +3 -25
- package/toggle/index.d.ts +2 -2
- package/toggle/index.js +3 -27
- package/tooltip/index.d.ts +2 -2
- package/tooltip/index.js +4 -28
- package/top-bar/index.d.ts +1 -1
- package/top-bar/index.js +3 -1
- package/top-bar/top-bar.js +5 -45
- package/top-bar/utils.d.ts +2 -2
- package/top-bar/utils.js +6 -28
- package/touch-slider/index.d.ts +1 -1
- package/touch-slider/index.js +2 -4
- package/unknown-content/index.d.ts +1 -1
- package/unknown-content/index.js +3 -25
- package/upload-area/upload-area.js +8 -38
- package/with-hint/index.d.ts +1 -1
- package/with-hint/index.js +3 -28
- package/with-hint/positioning-hint.d.ts +1 -1
- package/with-hint/positioning-hint.js +3 -25
- package/with-tooltip/index.d.ts +1 -1
- package/with-tooltip/index.js +6 -31
- package/with-tooltip/positioning-tooltip.d.ts +1 -1
- package/with-tooltip/positioning-tooltip.js +4 -26
- package/file-icon/unknown.svg +0 -9
- package/rating/star.svg +0 -3
- package/upload-area/upload.svg +0 -6
package/info-text/index.js
CHANGED
|
@@ -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
|
|
31
|
-
const
|
|
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 (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
|
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
|
|
47
|
-
const
|
|
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' ?
|
|
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 (
|
|
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: (
|
|
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:
|
|
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
|
|
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 (
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, rest, { ref: rootRef, className: rootClassName }, { children: children })));
|
|
31
31
|
}
|
|
32
32
|
exports.Layout = Layout;
|
package/layout/legacy.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { LayoutProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated На адаптивных страницах стоит использовать Layout.
|
|
5
5
|
*/
|
|
6
|
-
declare const DesktopLayout:
|
|
6
|
+
declare const DesktopLayout: import("react").ForwardRefExoticComponent<LayoutProps & {
|
|
7
7
|
element?: string | undefined;
|
|
8
|
-
} &
|
|
8
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated На адаптивных страницах стоит использовать Layout.
|
|
11
11
|
*/
|
|
12
|
-
declare const MobileLayout:
|
|
12
|
+
declare const MobileLayout: import("react").ForwardRefExoticComponent<LayoutProps & {
|
|
13
13
|
element?: string | undefined;
|
|
14
|
-
} &
|
|
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
|
|
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 (
|
|
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
|
-
|
|
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
|
-
/**
|
|
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:
|
|
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
|
|
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 (
|
|
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
|
});
|
package/loading-overlay/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.LoadingOverlay = void 0;
|
|
7
|
-
const
|
|
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, }) => (
|
|
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;
|
package/masked-field/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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:
|
|
23
|
+
export declare const MaskedField: import("react").ForwardRefExoticComponent<MaskedFieldProps & import("react").RefAttributes<HTMLInputElement | undefined>>;
|
package/masked-field/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)
|
|
@@ -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
|
|
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 (
|
|
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
|
|
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 (
|
|
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
|
-
|
|
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
|
|
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 (
|
|
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
|
|
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 (
|
|
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 (
|
|
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
|
|
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
|
|
74
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
98
75
|
}
|
|
99
76
|
exports.ModalOverlap = ModalOverlap;
|
package/modal-overlay/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.ModalOverlay = void 0;
|
|
41
|
-
const
|
|
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 (
|
|
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;
|
package/no-index/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface NoIndexProps {
|
|
3
3
|
/** Содержимое. */
|
|
4
|
-
children?:
|
|
4
|
+
children?: ReactNode;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Компонент отображает неиндексируемый контент.
|
|
8
8
|
* @param props Свойства.
|
|
9
9
|
* @return Элемент.
|
|
10
10
|
*/
|
|
11
|
-
export declare
|
|
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
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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;
|