@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/expandable/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode, MouseEventHandler, CSSProperties } from 'react';
|
|
2
2
|
export interface ExpandableGroupProps {
|
|
3
3
|
/** Расстояние между элементами группы в пикселях. */
|
|
4
4
|
gap?: number;
|
|
@@ -38,5 +38,5 @@ export interface GroupItemProps {
|
|
|
38
38
|
export declare function ExpandableGroup({ gap, itemHeight, lineLimit, defaultExpanded, children, onExpand, opener, className, style, expanded: expandedProp, openerWidth, }: ExpandableGroupProps): JSX.Element;
|
|
39
39
|
export declare const Expandable: {
|
|
40
40
|
readonly Group: typeof ExpandableGroup;
|
|
41
|
-
readonly Item:
|
|
41
|
+
readonly Item: import("react").ForwardRefExoticComponent<GroupItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
42
42
|
};
|
package/expandable/index.js
CHANGED
|
@@ -1,33 +1,11 @@
|
|
|
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.Expandable = exports.ExpandableGroup = void 0;
|
|
30
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
31
9
|
const utils_1 = require("./utils");
|
|
32
10
|
const bind_1 = __importDefault(require("classnames/bind"));
|
|
33
11
|
const expandable_group_module_scss_1 = __importDefault(require("./expandable-group.module.scss"));
|
|
@@ -38,9 +16,7 @@ const ItemContext = (0, react_1.createContext)({});
|
|
|
38
16
|
* @param props Свойства.
|
|
39
17
|
* @return Элемент.
|
|
40
18
|
*/
|
|
41
|
-
function ExpandableGroup({ gap = 8, itemHeight = 32, lineLimit = 2, defaultExpanded = false, children, onExpand, opener = data =>
|
|
42
|
-
"\u0415\u0449\u0451 ",
|
|
43
|
-
data.hiddenCount), className, style, expanded: expandedProp, openerWidth = 72, }) {
|
|
19
|
+
function ExpandableGroup({ gap = 8, itemHeight = 32, lineLimit = 2, defaultExpanded = false, children, onExpand, opener = data => (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["\u0415\u0449\u0451 ", data.hiddenCount] }), className, style, expanded: expandedProp, openerWidth = 72, }) {
|
|
44
20
|
const wrapperRef = (0, react_1.useRef)(null);
|
|
45
21
|
const containerRef = (0, react_1.useRef)(null);
|
|
46
22
|
const openerRef = (0, react_1.useRef)(null);
|
|
@@ -65,19 +41,15 @@ function ExpandableGroup({ gap = 8, itemHeight = 32, lineLimit = 2, defaultExpan
|
|
|
65
41
|
openerRef,
|
|
66
42
|
gap,
|
|
67
43
|
});
|
|
68
|
-
return (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
react_1.default.createElement(ExpandableItem, { ref: openerRef, onClick: () => {
|
|
73
|
-
setExpanded(true);
|
|
74
|
-
onExpand === null || onExpand === void 0 ? void 0 : onExpand();
|
|
75
|
-
}, "data-testid": 'expandable:opener' }, opener({ hiddenCount })))))));
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: wrapperRef, className: cx('root', className), style: Object.assign(Object.assign({}, style), { maxHeight: expanded ? undefined : `${itemHeight * lineLimit + gap * (lineLimit - 1)}px`, '--expandable-item-height': `${itemHeight}px`, '--expandable-opener-width': `${openerWidth}px`, '--expandable-gap': `${gap}px` }) }, { children: (0, jsx_runtime_1.jsxs)("ul", Object.assign({ ref: containerRef, className: expandable_group_module_scss_1.default.inner }, { children: [items, mounted && !expanded && ((0, jsx_runtime_1.jsx)(ItemContext.Provider, Object.assign({ value: { invisible: hiddenCount === 0, opener: true } }, { children: (0, jsx_runtime_1.jsx)(ExpandableItem, Object.assign({ ref: openerRef, onClick: () => {
|
|
45
|
+
setExpanded(true);
|
|
46
|
+
onExpand === null || onExpand === void 0 ? void 0 : onExpand();
|
|
47
|
+
}, "data-testid": 'expandable:opener' }, { children: opener({ hiddenCount }) })) })))] })) })));
|
|
76
48
|
}
|
|
77
49
|
exports.ExpandableGroup = ExpandableGroup;
|
|
78
50
|
const ExpandableItem = (0, react_1.forwardRef)(({ children, onClick, 'data-testid': testId = 'expandable:item' }, ref) => {
|
|
79
51
|
const context = (0, react_1.useContext)(ItemContext);
|
|
80
|
-
return (
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)("li", Object.assign({ ref: ref, className: cx('item', context), "data-testid": testId, onClick: onClick }, { children: children })));
|
|
81
53
|
});
|
|
82
54
|
exports.Expandable = {
|
|
83
55
|
Group: ExpandableGroup,
|
package/field-block/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.FieldBlock = exports.FIELD_BLOCK_DEFAULTS = exports.FIELD_BLOCK_HEIGHT = void 0;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const bind_1 = __importDefault(require("classnames/bind"));
|
|
9
9
|
const field_block_module_scss_1 = __importDefault(require("./field-block.module.scss"));
|
|
10
10
|
const cx = bind_1.default.bind(field_block_module_scss_1.default);
|
|
@@ -31,13 +31,6 @@ function FieldBlock({ size = exports.FIELD_BLOCK_DEFAULTS.size, main, mainProps,
|
|
|
31
31
|
'no-label': !needLabel,
|
|
32
32
|
}, rootProps === null || rootProps === void 0 ? void 0 : rootProps.className);
|
|
33
33
|
const blockClassName = cx('block', fixedHeight && 'fixed-height', blockProps === null || blockProps === void 0 ? void 0 : blockProps.className);
|
|
34
|
-
return (
|
|
35
|
-
react_1.default.createElement("div", Object.assign({}, blockProps, { ref: blockRef, className: blockClassName, "data-testid": 'field-block:block' }),
|
|
36
|
-
adornmentStart && (react_1.default.createElement("div", { className: cx('col', 'adornment-col', 'start'), "data-testid": 'field-block:adornment-start' }, adornmentStart)),
|
|
37
|
-
react_1.default.createElement("div", { className: cx('col', 'main-col') },
|
|
38
|
-
needLabel && (react_1.default.createElement("label", Object.assign({}, labelProps, { className: cx('label', labelProps === null || labelProps === void 0 ? void 0 : labelProps.className), "data-testid": 'field-block:label' }), label)),
|
|
39
|
-
react_1.default.createElement("div", Object.assign({}, mainProps, { className: cx('main', mainProps === null || mainProps === void 0 ? void 0 : mainProps.className), "data-testid": 'field-block:main' }), main)),
|
|
40
|
-
adornmentEnd && (react_1.default.createElement("div", { className: cx('col', 'adornment-col', 'end'), "data-testid": 'field-block:adornment-end' }, adornmentEnd))),
|
|
41
|
-
caption && (react_1.default.createElement("div", { className: cx('caption'), "data-testid": 'field-block:caption' }, caption))));
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, rootProps, { ref: rootRef, className: rootClassName, "data-testid": testId }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({}, blockProps, { ref: blockRef, className: blockClassName, "data-testid": 'field-block:block' }, { children: [adornmentStart && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('col', 'adornment-col', 'start'), "data-testid": 'field-block:adornment-start' }, { children: adornmentStart }))), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('col', 'main-col') }, { children: [needLabel && ((0, jsx_runtime_1.jsx)("label", Object.assign({}, labelProps, { className: cx('label', labelProps === null || labelProps === void 0 ? void 0 : labelProps.className), "data-testid": 'field-block:label' }, { children: label }))), (0, jsx_runtime_1.jsx)("div", Object.assign({}, mainProps, { className: cx('main', mainProps === null || mainProps === void 0 ? void 0 : mainProps.className), "data-testid": 'field-block:main' }, { children: main }))] })), adornmentEnd && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('col', 'adornment-col', 'end'), "data-testid": 'field-block:adornment-end' }, { children: adornmentEnd })))] })), caption && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('caption'), "data-testid": 'field-block:caption' }, { children: caption })))] })));
|
|
42
35
|
}
|
|
43
36
|
exports.FieldBlock = FieldBlock;
|
package/field-grid/index.d.ts
CHANGED
package/field-grid/index.js
CHANGED
|
@@ -1,33 +1,11 @@
|
|
|
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.FieldGrid = void 0;
|
|
30
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
31
9
|
const bind_1 = __importDefault(require("classnames/bind"));
|
|
32
10
|
const field_grid_module_scss_1 = __importDefault(require("./field-grid.module.scss"));
|
|
33
11
|
const cx = bind_1.default.bind(field_grid_module_scss_1.default);
|
|
@@ -50,10 +28,10 @@ const TypeCheck = {
|
|
|
50
28
|
*/
|
|
51
29
|
const FieldGrid = ({ children, rootProps }) => {
|
|
52
30
|
const rows = react_1.Children.toArray(children).filter(TypeCheck.isRow);
|
|
53
|
-
return (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, rootProps, { className: cx('container', rootProps === null || rootProps === void 0 ? void 0 : rootProps.className) }, { children: rows.map((row, index) => (0, react_1.cloneElement)(row, {
|
|
32
|
+
isFirst: index === 0,
|
|
33
|
+
isLast: index === rows.length - 1,
|
|
34
|
+
})) })));
|
|
57
35
|
};
|
|
58
36
|
exports.FieldGrid = FieldGrid;
|
|
59
37
|
/**
|
|
@@ -69,45 +47,45 @@ const Row = ({ isFirst: isFirstRow, isLast: isLastRow, children }) => {
|
|
|
69
47
|
.filter(TypeCheck.isCell)
|
|
70
48
|
.slice(0, 3);
|
|
71
49
|
const cellSize = cellSizeByCount[cells.length];
|
|
72
|
-
return (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
else if (isFirstRow) {
|
|
88
|
-
if (isFirstCell && isLastCell) {
|
|
89
|
-
rounds = 'top';
|
|
90
|
-
}
|
|
91
|
-
else if (isFirstCell) {
|
|
92
|
-
rounds = 'topLeft';
|
|
93
|
-
}
|
|
94
|
-
else if (isLastCell) {
|
|
95
|
-
rounds = 'topRight';
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
else if (isLastRow) {
|
|
99
|
-
if (isFirstCell && isLastCell) {
|
|
100
|
-
rounds = 'bottom';
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: cells.map((cell, index) => {
|
|
51
|
+
const isFirstCell = index === 0;
|
|
52
|
+
const isLastCell = index === cells.length - 1;
|
|
53
|
+
let rounds = 'none';
|
|
54
|
+
if (isFirstRow && isLastRow) {
|
|
55
|
+
if (isFirstCell && isLastCell) {
|
|
56
|
+
rounds = 'all';
|
|
57
|
+
}
|
|
58
|
+
else if (isFirstCell) {
|
|
59
|
+
rounds = 'left';
|
|
60
|
+
}
|
|
61
|
+
else if (isLastCell) {
|
|
62
|
+
rounds = 'right';
|
|
63
|
+
}
|
|
101
64
|
}
|
|
102
|
-
else if (
|
|
103
|
-
|
|
65
|
+
else if (isFirstRow) {
|
|
66
|
+
if (isFirstCell && isLastCell) {
|
|
67
|
+
rounds = 'top';
|
|
68
|
+
}
|
|
69
|
+
else if (isFirstCell) {
|
|
70
|
+
rounds = 'topLeft';
|
|
71
|
+
}
|
|
72
|
+
else if (isLastCell) {
|
|
73
|
+
rounds = 'topRight';
|
|
74
|
+
}
|
|
104
75
|
}
|
|
105
|
-
else if (
|
|
106
|
-
|
|
76
|
+
else if (isLastRow) {
|
|
77
|
+
if (isFirstCell && isLastCell) {
|
|
78
|
+
rounds = 'bottom';
|
|
79
|
+
}
|
|
80
|
+
else if (isFirstCell) {
|
|
81
|
+
rounds = 'bottomLeft';
|
|
82
|
+
}
|
|
83
|
+
else if (isLastCell) {
|
|
84
|
+
rounds = 'bottomRight';
|
|
85
|
+
}
|
|
107
86
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
})));
|
|
87
|
+
return (0, react_1.cloneElement)(cell, { size: cellSize, rounds });
|
|
88
|
+
}) }));
|
|
111
89
|
};
|
|
112
90
|
/**
|
|
113
91
|
* Компонент элемента для сетки полей. Может быть использован только как дочерний для FieldGrid.Row.
|
|
@@ -132,7 +110,7 @@ const Cell = ({ size, rounds, field, renderField }) => {
|
|
|
132
110
|
className: cx(field.props.className, 'size-full'),
|
|
133
111
|
});
|
|
134
112
|
}
|
|
135
|
-
return
|
|
113
|
+
return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('cell', `size-${size}`) }, { children: content }));
|
|
136
114
|
};
|
|
137
115
|
exports.FieldGrid.Row = Row;
|
|
138
116
|
exports.FieldGrid.Cell = Cell;
|
package/file-icon/index.d.ts
CHANGED
package/file-icon/index.js
CHANGED
|
@@ -10,14 +10,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
}
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
14
|
exports.FileIcon = void 0;
|
|
18
|
-
const
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
16
|
const colors_1 = require("../colors");
|
|
20
|
-
const unknown_svg_1 = __importDefault(require("./unknown.svg"));
|
|
21
17
|
const VARIANTS = {
|
|
22
18
|
doc: { fill: colors_1.COLORS.get('additional-electric-blue') },
|
|
23
19
|
xls: { fill: colors_1.COLORS.get('additional-light-green') },
|
|
@@ -25,6 +21,9 @@ const VARIANTS = {
|
|
|
25
21
|
jpg: { fill: colors_1.COLORS.get('additional-deep-orange') },
|
|
26
22
|
xml: { fill: colors_1.COLORS.get('additional-deep-purple') },
|
|
27
23
|
zip: { fill: colors_1.COLORS.get('additional-teal') },
|
|
24
|
+
png: { fill: colors_1.COLORS.get('additional-purple') },
|
|
25
|
+
mov: { fill: colors_1.COLORS.get('additional-blue-gray') },
|
|
26
|
+
mp4: { fill: colors_1.COLORS.get('additional-blue-gray') },
|
|
28
27
|
};
|
|
29
28
|
/**
|
|
30
29
|
* Компонент иконки файла.
|
|
@@ -34,10 +33,6 @@ const VARIANTS = {
|
|
|
34
33
|
const FileIcon = (_a) => {
|
|
35
34
|
var { type } = _a, svgProps = __rest(_a, ["type"]);
|
|
36
35
|
const typeProps = VARIANTS[type];
|
|
37
|
-
return type && typeProps ? (
|
|
38
|
-
react_1.default.createElement("path", { opacity: '0.88', d: 'M6 5C6 3.89543 6.89543 3 8 3H20L26 9V27C26 28.1046 25.1046 29 24 29H8C6.89543 29 6 28.1046 6 27V5Z', fill: typeProps.fill }),
|
|
39
|
-
react_1.default.createElement("path", { opacity: '0.32', d: 'M21 9L26 9L20 3L20 8C20 8.55229 20.4477 9 21 9Z', fill: 'white' }),
|
|
40
|
-
react_1.default.createElement("path", { opacity: '0.24', d: 'M25.1667 9L21 9L26 15L26 9C25.5833 9 25.6269 9 25.1667 9Z', fill: 'black' }),
|
|
41
|
-
react_1.default.createElement("text", { x: '16', y: '23', textAnchor: 'middle', fontSize: '6.5', fontWeight: '700', fill: '#fff' }, type.toUpperCase()))) : (react_1.default.createElement(unknown_svg_1.default, Object.assign({}, svgProps)));
|
|
36
|
+
return type && typeProps ? ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ width: '32', height: '32', viewBox: '0 0 32 32' }, svgProps, { children: [(0, jsx_runtime_1.jsx)("path", { opacity: '0.88', d: 'M6 5C6 3.89543 6.89543 3 8 3H20L26 9V27C26 28.1046 25.1046 29 24 29H8C6.89543 29 6 28.1046 6 27V5Z', fill: typeProps.fill }), (0, jsx_runtime_1.jsx)("path", { opacity: '0.32', d: 'M21 9L26 9L20 3L20 8C20 8.55229 20.4477 9 21 9Z', fill: 'white' }), (0, jsx_runtime_1.jsx)("path", { opacity: '0.24', d: 'M25.1667 9L21 9L26 15L26 9C25.5833 9 25.6269 9 25.1667 9Z', fill: 'black' }), (0, jsx_runtime_1.jsx)("text", Object.assign({ x: '16', y: '23', textAnchor: 'middle', fontSize: '6.5', fontWeight: '700', fill: '#fff' }, { children: type.toUpperCase() }))] }))) : ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ width: '32', height: '32', viewBox: '0 0 32 32', fill: 'none' }, svgProps, { children: [(0, jsx_runtime_1.jsx)("path", { opacity: '0.88', d: 'M6 5C6 3.89543 6.89543 3 8 3H20L26 9V27C26 28.1046 25.1046 29 24 29H8C6.89543 29 6 28.1046 6 27V5Z', fill: '#C2C2C2' }), (0, jsx_runtime_1.jsx)("path", { opacity: '0.32', d: 'M21 9L26 9L20 3L20 8C20 8.55229 20.4477 9 21 9Z', fill: 'white' }), (0, jsx_runtime_1.jsx)("path", { opacity: '0.24', d: 'M25.1667 9L21 9L26 15L26 9C25.5833 9 25.6269 9 25.1667 9Z', fill: 'black' }), (0, jsx_runtime_1.jsxs)("g", Object.assign({ opacity: '0.8' }, { children: [(0, jsx_runtime_1.jsx)("path", { d: 'M9 22H23V24H9V22Z', fill: 'white' }), (0, jsx_runtime_1.jsx)("path", { d: 'M9 18H19V20H9V18Z', fill: 'white' })] }))] })));
|
|
42
37
|
};
|
|
43
38
|
exports.FileIcon = FileIcon;
|
package/group-overflow/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.GroupOverflow = void 0;
|
|
41
|
-
const
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const react_1 = require("react");
|
|
42
20
|
const utils_1 = require("./utils");
|
|
43
21
|
const classnames_1 = __importDefault(require("classnames"));
|
|
44
22
|
const group_overflow_module_scss_1 = __importDefault(require("./group-overflow.module.scss"));
|
|
@@ -52,10 +30,10 @@ function GroupOverflow(_a) {
|
|
|
52
30
|
const ref = (0, react_1.useRef)(null);
|
|
53
31
|
const { state, start } = (0, utils_1.useItemsHide)(ref, el => { var _a; return (_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement; });
|
|
54
32
|
const total = react_1.Children.count(children);
|
|
55
|
-
return (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(group_overflow_module_scss_1.default.root, className), style: typeof gap === 'number'
|
|
34
|
+
? Object.assign(Object.assign({}, style), { '--group-overflow-gap': `${gap}px` })
|
|
35
|
+
: style }, restProps, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, className: group_overflow_module_scss_1.default.items }, { children: state === 'initial'
|
|
36
|
+
? react_1.Children.toArray(children)
|
|
37
|
+
: react_1.Children.toArray(children).slice(0, start) })), state !== 'initial' && start < total && tail && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: group_overflow_module_scss_1.default.more }, { children: tail({ hiddenCount: total - start }) })))] })));
|
|
60
38
|
}
|
|
61
39
|
exports.GroupOverflow = GroupOverflow;
|
package/helpers/events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export type EventWithPosition<T extends HTMLElement = HTMLElement> = MouseEvent | TouchEvent | React.MouseEvent<T> | React.TouchEvent<T>;
|
|
3
3
|
/**
|
|
4
4
|
* Проверяет, является ли событие событием нажатия основной кнопки мыши.
|
package/helpers/on.d.ts
CHANGED
package/hint/hint-view.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.HintView = exports.arrowSquareSize = 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 hint_view_module_scss_1 = __importDefault(require("./hint-view.module.scss"));
|
|
21
21
|
const cx = bind_1.default.bind(hint_view_module_scss_1.default);
|
|
@@ -28,7 +28,7 @@ exports.arrowSquareSize = Math.sqrt(4 * 4 + 4 * 4);
|
|
|
28
28
|
*/
|
|
29
29
|
function HintView(_a) {
|
|
30
30
|
var { hintRef, className, children, 'data-testid': testId = 'hint' } = _a, rest = __rest(_a, ["hintRef", "className", "children", 'data-testid']);
|
|
31
|
-
return (
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: hintRef, className: cx('root', className), "data-testid": testId }, rest, { children: children })));
|
|
32
32
|
}
|
|
33
33
|
exports.HintView = HintView;
|
|
34
34
|
/**
|
|
@@ -38,6 +38,6 @@ exports.HintView = HintView;
|
|
|
38
38
|
*/
|
|
39
39
|
function HintArrow(_a) {
|
|
40
40
|
var { arrowRef, className } = _a, rest = __rest(_a, ["arrowRef", "className"]);
|
|
41
|
-
return
|
|
41
|
+
return (0, jsx_runtime_1.jsx)("div", Object.assign({ ref: arrowRef, className: cx('arrow', className) }, rest));
|
|
42
42
|
}
|
|
43
43
|
HintView.Arrow = HintArrow;
|
package/hint/hint.js
CHANGED
|
@@ -10,12 +10,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
}
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
14
|
exports.Hint = void 0;
|
|
18
|
-
const
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
16
|
const portal_1 = require("../portal");
|
|
20
17
|
const hint_view_1 = require("./hint-view");
|
|
21
18
|
/**
|
|
@@ -25,7 +22,7 @@ const hint_view_1 = require("./hint-view");
|
|
|
25
22
|
*/
|
|
26
23
|
function Hint(_a) {
|
|
27
24
|
var { open } = _a, rest = __rest(_a, ["open"]);
|
|
28
|
-
return
|
|
25
|
+
return (0, jsx_runtime_1.jsx)(portal_1.Portal, { children: open && (0, jsx_runtime_1.jsx)(HintInner, Object.assign({}, rest)) });
|
|
29
26
|
}
|
|
30
27
|
exports.Hint = Hint;
|
|
31
28
|
/**
|
|
@@ -35,7 +32,5 @@ exports.Hint = Hint;
|
|
|
35
32
|
*/
|
|
36
33
|
function HintInner(_a) {
|
|
37
34
|
var { arrowRef, children } = _a, rest = __rest(_a, ["arrowRef", "children"]);
|
|
38
|
-
return (
|
|
39
|
-
children,
|
|
40
|
-
react_1.default.createElement(hint_view_1.HintView.Arrow, { arrowRef: arrowRef })));
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)(hint_view_1.HintView, Object.assign({}, rest, { children: [children, (0, jsx_runtime_1.jsx)(hint_view_1.HintView.Arrow, { arrowRef: arrowRef })] })));
|
|
41
36
|
}
|
package/hint/utils.d.ts
CHANGED
|
@@ -56,7 +56,10 @@ export declare function useHintOnClick(floating: Pick<UseFloatingReturn, 'contex
|
|
|
56
56
|
/**
|
|
57
57
|
* Состояние хинта с автоматическим скрытием по таймауту.
|
|
58
58
|
* @param initialState Начальное состояние.
|
|
59
|
+
* @param options Опции.
|
|
59
60
|
* @return Результат вызова `useState`.
|
|
60
61
|
*/
|
|
61
|
-
export declare function useTempHintState(initialState: boolean
|
|
62
|
+
export declare function useTempHintState(initialState: boolean, { timeout }?: {
|
|
63
|
+
timeout?: number;
|
|
64
|
+
}): readonly [boolean, Dispatch<SetStateAction<boolean>>];
|
|
62
65
|
export {};
|
package/hint/utils.js
CHANGED
|
@@ -134,9 +134,10 @@ exports.useHintOnClick = useHintOnClick;
|
|
|
134
134
|
/**
|
|
135
135
|
* Состояние хинта с автоматическим скрытием по таймауту.
|
|
136
136
|
* @param initialState Начальное состояние.
|
|
137
|
+
* @param options Опции.
|
|
137
138
|
* @return Результат вызова `useState`.
|
|
138
139
|
*/
|
|
139
|
-
function useTempHintState(initialState) {
|
|
140
|
+
function useTempHintState(initialState, { timeout = 3000 } = {}) {
|
|
140
141
|
const [open, setOpen] = (0, react_1.useState)(initialState);
|
|
141
142
|
const timerRef = (0, react_1.useRef)(null);
|
|
142
143
|
const updateTimer = (0, react_1.useCallback)((value) => {
|
|
@@ -146,9 +147,9 @@ function useTempHintState(initialState) {
|
|
|
146
147
|
}
|
|
147
148
|
// запускаем новый таймер если надо
|
|
148
149
|
if (value) {
|
|
149
|
-
timerRef.current = window.setTimeout(() => setOpen(false),
|
|
150
|
+
timerRef.current = window.setTimeout(() => setOpen(false), timeout);
|
|
150
151
|
}
|
|
151
|
-
}, []);
|
|
152
|
+
}, [timeout]);
|
|
152
153
|
(0, react_1.useEffect)(() => {
|
|
153
154
|
updateTimer(open);
|
|
154
155
|
}, []);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
type Direction = 'top' | 'left' | 'bottom' | 'right';
|
|
3
3
|
export interface HintProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/** С какой стороны появляется хинт. */
|
|
@@ -7,5 +7,5 @@ export interface HintProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated Теперь нужно использовать `hint`.
|
|
9
9
|
*/
|
|
10
|
-
export declare const Hint:
|
|
10
|
+
export declare const Hint: import("react").ForwardRefExoticComponent<HintProps & import("react").RefAttributes<HTMLDivElement | null>>;
|
|
11
11
|
export {};
|
package/hint-deprecated/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.Hint = void 0;
|
|
41
|
-
const
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const react_1 = require("react");
|
|
42
20
|
const shadows_1 = require("../styling/shadows");
|
|
43
21
|
const bind_1 = __importDefault(require("classnames/bind"));
|
|
44
22
|
const hint_module_scss_1 = __importDefault(require("./hint.module.scss"));
|
|
@@ -48,6 +26,5 @@ const cx = bind_1.default.bind(hint_module_scss_1.default);
|
|
|
48
26
|
*/
|
|
49
27
|
exports.Hint = (0, react_1.forwardRef)((_a, ref) => {
|
|
50
28
|
var { children, className, direction } = _a, restProps = __rest(_a, ["children", "className", "direction"]);
|
|
51
|
-
return (
|
|
52
|
-
react_1.default.createElement("div", { className: cx('body', shadows_1.BoxShadow.z4) }, children)));
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, restProps, { ref: ref, className: cx('root', className, direction), "data-testid": 'hint' }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('body', shadows_1.BoxShadow.z4) }, { children: children })) })));
|
|
53
30
|
});
|
|
@@ -1,33 +1,11 @@
|
|
|
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.useBreakpoint = exports.BreakpointProvider = void 0;
|
|
30
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
31
9
|
const __1 = require("..");
|
|
32
10
|
const is_browser_1 = __importDefault(require("../../helpers/is-browser"));
|
|
33
11
|
const utils_1 = require("./utils");
|
|
@@ -43,7 +21,7 @@ function BreakpointProvider({ children }) {
|
|
|
43
21
|
(0, __1.useIsomorphicLayoutEffect)(() => {
|
|
44
22
|
(0, is_browser_1.default)() && setRegistry((0, utils_1.createRegistry)());
|
|
45
23
|
}, []);
|
|
46
|
-
return
|
|
24
|
+
return (0, jsx_runtime_1.jsx)(Context.Provider, Object.assign({ value: contextValue }, { children: children }));
|
|
47
25
|
}
|
|
48
26
|
exports.BreakpointProvider = BreakpointProvider;
|
|
49
27
|
/**
|