@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/unknown-content/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.UnknownContent = 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 classnames_1 = __importDefault(require("classnames"));
|
|
33
11
|
const unknown_content_module_scss_1 = __importDefault(require("./unknown-content.module.scss"));
|
|
@@ -41,6 +19,6 @@ function UnknownContent({ markup, children, className }) {
|
|
|
41
19
|
(0, react_1.useEffect)(() => {
|
|
42
20
|
ref.current && (0, utils_1.setTableRowLabels)(ref.current);
|
|
43
21
|
});
|
|
44
|
-
return (
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, className: (0, classnames_1.default)(unknown_content_module_scss_1.default.root, className) }, (children ? { children } : { dangerouslySetInnerHTML: { __html: markup || '' } }))));
|
|
45
23
|
}
|
|
46
24
|
exports.UnknownContent = UnknownContent;
|
|
@@ -1,38 +1,16 @@
|
|
|
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.UploadArea = void 0;
|
|
30
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
31
9
|
const link_1 = require("../link");
|
|
32
10
|
const utils_1 = require("./utils");
|
|
33
11
|
const lodash_1 = require("lodash");
|
|
34
12
|
const get_declination_1 = require("../helpers/get-declination");
|
|
35
|
-
const
|
|
13
|
+
const Upload_1 = __importDefault(require("@sima-land/ui-quarks/icons/64x64/Stroked/Upload"));
|
|
36
14
|
const bind_1 = __importDefault(require("classnames/bind"));
|
|
37
15
|
const upload_area_module_scss_1 = __importDefault(require("./upload-area.module.scss"));
|
|
38
16
|
const cx = bind_1.default.bind(upload_area_module_scss_1.default);
|
|
@@ -68,7 +46,7 @@ function UploadArea({ className, style, size = 'm', multiple, disabled, failed,
|
|
|
68
46
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect(filterFiles(event.dataTransfer.files), event);
|
|
69
47
|
});
|
|
70
48
|
const rootClassName = cx('root', size !== 'unset' && `size-${size}`, { active, failed, disabled }, className);
|
|
71
|
-
return (
|
|
49
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, rootProps, bind, { "data-testid": testId, style: style, className: rootClassName, tabIndex: disabled ? -1 : 0, role: 'button', onFocus: event => {
|
|
72
50
|
var _a;
|
|
73
51
|
if (!disabled) {
|
|
74
52
|
(_a = rootProps === null || rootProps === void 0 ? void 0 : rootProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(rootProps, event);
|
|
@@ -89,17 +67,9 @@ function UploadArea({ className, style, size = 'm', multiple, disabled, failed,
|
|
|
89
67
|
}, onBlur: event => {
|
|
90
68
|
var _a;
|
|
91
69
|
(_a = rootProps === null || rootProps === void 0 ? void 0 : rootProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(rootProps, event);
|
|
92
|
-
} }),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
react_1.default.createElement("input", Object.assign({}, inputProps, { ref: inputRef, type: 'file', multiple: multiple, className: cx('input'), onChange: onInputChange, onClick: e => {
|
|
97
|
-
// для того чтобы при клике на корневом элементе не вызывался второй клик
|
|
98
|
-
e.stopPropagation();
|
|
99
|
-
}, "data-testid": 'upload-area:input', disabled: disabled })),
|
|
100
|
-
react_1.default.createElement(link_1.Link, { pseudo: true, "data-testid": 'upload-area:anchor', disabled: disabled },
|
|
101
|
-
"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 ",
|
|
102
|
-
fileRole)),
|
|
103
|
-
secondaryInfo && react_1.default.createElement("div", { className: cx('text', 'secondary') }, secondaryInfo))));
|
|
70
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(Upload_1.default, { className: cx('icon') }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('info') }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: cx('text', 'primary') }, { children: [(0, jsx_runtime_1.jsx)("input", Object.assign({}, inputProps, { ref: inputRef, type: 'file', multiple: multiple, className: cx('input'), onChange: onInputChange, onClick: e => {
|
|
71
|
+
// для того чтобы при клике на корневом элементе не вызывался второй клик
|
|
72
|
+
e.stopPropagation();
|
|
73
|
+
}, "data-testid": 'upload-area:input', disabled: disabled })), (0, jsx_runtime_1.jsxs)(link_1.Link, Object.assign({ pseudo: true, "data-testid": 'upload-area:anchor', disabled: disabled }, { children: ["\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 ", fileRole] }))] })), secondaryInfo && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: cx('text', 'secondary') }, { children: secondaryInfo }))] }))] })));
|
|
104
74
|
}
|
|
105
75
|
exports.UploadArea = UploadArea;
|
package/with-hint/index.d.ts
CHANGED
package/with-hint/index.js
CHANGED
|
@@ -1,30 +1,8 @@
|
|
|
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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.useTempHint = exports.WithHint = void 0;
|
|
27
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
28
6
|
const portal_1 = require("../portal");
|
|
29
7
|
const positioning_hint_1 = require("./positioning-hint");
|
|
30
8
|
const utils_1 = require("./utils");
|
|
@@ -47,10 +25,7 @@ const WithHint = ({ children, direction = 'top', hint, onClose, shown: shownProp
|
|
|
47
25
|
});
|
|
48
26
|
}
|
|
49
27
|
}, [shown]);
|
|
50
|
-
return (
|
|
51
|
-
children(openerRef, toggle),
|
|
52
|
-
shown && hint && (react_1.default.createElement(portal_1.Portal, null,
|
|
53
|
-
react_1.default.createElement(positioning_hint_1.PositioningHint, { openerRef: openerRef, direction: direction, children: hint })))));
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children(openerRef, toggle), shown && hint && ((0, jsx_runtime_1.jsx)(portal_1.Portal, { children: (0, jsx_runtime_1.jsx)(positioning_hint_1.PositioningHint, { openerRef: openerRef, direction: direction, children: hint }) }))] }));
|
|
54
29
|
};
|
|
55
30
|
exports.WithHint = WithHint;
|
|
56
31
|
/**
|
|
@@ -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.PositioningHint = void 0;
|
|
30
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
31
9
|
const hint_deprecated_1 = require("../hint-deprecated");
|
|
32
10
|
const utils_1 = require("./utils");
|
|
33
11
|
const bind_1 = __importDefault(require("classnames/bind"));
|
|
@@ -48,6 +26,6 @@ const PositioningHint = ({ children, direction, openerRef }) => {
|
|
|
48
26
|
utils_1.PlaceAt[direction](ref.current, openerRef.current);
|
|
49
27
|
}
|
|
50
28
|
}, [direction, children]);
|
|
51
|
-
return (
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(hint_deprecated_1.Hint, { ref: ref, direction: direction, className: cx('hint', 'hidden'), style: { zIndex: layer + 1 }, children: children }));
|
|
52
30
|
};
|
|
53
31
|
exports.PositioningHint = PositioningHint;
|
package/with-tooltip/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
type ChildrenFn = (ref: React.RefObject<HTMLElement>, toggle: (opened: boolean) => void, shown: boolean) => React.ReactNode;
|
|
3
3
|
export interface WithTooltipProps {
|
|
4
4
|
/** Сработает при клике вне подсказки или на крестик в ней. */
|
package/with-tooltip/index.js
CHANGED
|
@@ -1,30 +1,8 @@
|
|
|
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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.WithTooltip = void 0;
|
|
27
|
-
const
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
28
6
|
const get_scroll_parent_1 = require("../helpers/get-scroll-parent");
|
|
29
7
|
const portal_1 = require("../portal");
|
|
30
8
|
const positioning_tooltip_1 = require("./positioning-tooltip");
|
|
@@ -37,12 +15,9 @@ const positioning_tooltip_1 = require("./positioning-tooltip");
|
|
|
37
15
|
const WithTooltip = ({ onDismiss, children, tooltip }) => {
|
|
38
16
|
const openerRef = (0, react_1.useRef)(null);
|
|
39
17
|
const [shown, toggle] = (0, react_1.useState)(false);
|
|
40
|
-
return (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
onDismiss && onDismiss();
|
|
45
|
-
toggle(false);
|
|
46
|
-
} })))));
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children(openerRef, toggle, shown), shown && ((0, jsx_runtime_1.jsx)(portal_1.Portal, Object.assign({ defineRoot: () => (0, get_scroll_parent_1.getScrollParent)(openerRef.current) }, { children: (0, jsx_runtime_1.jsx)(positioning_tooltip_1.PositioningTooltip, { openerRef: openerRef, children: tooltip, onDismiss: () => {
|
|
19
|
+
onDismiss && onDismiss();
|
|
20
|
+
toggle(false);
|
|
21
|
+
} }) })))] }));
|
|
47
22
|
};
|
|
48
23
|
exports.WithTooltip = WithTooltip;
|
|
@@ -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.PositioningTooltip = void 0;
|
|
30
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
31
9
|
const viewport_1 = require("../context/viewport");
|
|
32
10
|
const lodash_1 = require("lodash");
|
|
33
11
|
const get_scroll_parent_1 = require("../helpers/get-scroll-parent");
|
|
@@ -69,12 +47,12 @@ const PositioningTooltip = ({ openerRef, children, onDismiss }) => {
|
|
|
69
47
|
(0, hooks_1.useOutsideClick)(tooltipRef, () => {
|
|
70
48
|
onDismiss && onDismiss();
|
|
71
49
|
});
|
|
72
|
-
return (
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, Object.assign({ ref: tooltipRef, style: {
|
|
73
51
|
position: 'absolute',
|
|
74
52
|
top: 0,
|
|
75
53
|
left: 0,
|
|
76
54
|
opacity: 0,
|
|
77
55
|
zIndex: layer + 1,
|
|
78
|
-
}, onClose: onDismiss }, children));
|
|
56
|
+
}, onClose: onDismiss }, { children: children })));
|
|
79
57
|
};
|
|
80
58
|
exports.PositioningTooltip = PositioningTooltip;
|
package/file-icon/unknown.svg
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<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"/>
|
|
3
|
-
<path opacity="0.32" d="M21 9L26 9L20 3L20 8C20 8.55229 20.4477 9 21 9Z" fill="white"/>
|
|
4
|
-
<path opacity="0.24" d="M25.1667 9L21 9L26 15L26 9C25.5833 9 25.6269 9 25.1667 9Z" fill="black"/>
|
|
5
|
-
<g opacity="0.8">
|
|
6
|
-
<path d="M9 22H23V24H9V22Z" fill="white"/>
|
|
7
|
-
<path d="M9 18H19V20H9V18Z" fill="white"/>
|
|
8
|
-
</g>
|
|
9
|
-
</svg>
|
package/rating/star.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M11.304 2.31811C11.556 1.69076 12.4441 1.69076 12.696 2.31811L15.2632 8.71108L22.1366 9.17714C22.8111 9.22287 23.0856 10.0675 22.5668 10.501L17.28 14.9181L18.9608 21.5991C19.1257 22.2547 18.4072 22.7767 17.8347 22.4173L12 18.7542L6.16538 22.4173C5.59282 22.7767 4.87433 22.2547 5.03926 21.5991L6.72002 14.9181L1.43326 10.501C0.914465 10.0675 1.1889 9.22287 1.8634 9.17714L8.7368 8.71108L11.304 2.31811Z" />
|
|
3
|
-
</svg>
|
package/upload-area/upload.svg
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M57.2474 30.4336C55.7344 28.9358 53.7859 28.0106 51.6717 27.7685C51.693 27.4015 51.7037 27.0334 51.7037 26.6667C51.7037 16.3739 43.3299 8 33.037 8C24.6272 8 17.3482 13.5368 15.0787 21.5554C8.80692 22.2366 4 27.5639 4 33.9608C4 40.8226 9.58272 46.4401 16.4445 46.4401H23.7037C24.2764 46.4401 24.7408 45.9758 24.7408 45.403C24.7408 44.8302 24.2764 44.3659 23.7037 44.3659H16.4445C10.726 44.3659 6.07408 39.679 6.07408 33.9607C6.07408 28.4146 10.4096 23.8475 15.9442 23.5852C16.405 23.5634 16.7953 23.2311 16.9032 22.783C18.7008 15.3055 25.3351 10.0786 33.037 10.0786C42.186 10.0786 49.6296 17.52 49.6296 26.669C49.6296 27.3212 49.5917 27.9779 49.5162 28.6224C49.4817 28.9167 49.5749 29.2451 49.7714 29.4664C49.9683 29.6871 50.2504 29.8474 50.5461 29.8474H50.548C52.5406 29.8474 54.4015 30.5691 55.7884 31.9419C57.1667 33.3065 57.9258 35.1461 57.9258 37.0889C57.9258 41.092 54.6694 44.3659 50.6666 44.3659H42.3703C41.7976 44.3659 41.3332 44.8302 41.3332 45.403C41.3332 45.9758 41.7975 46.4401 42.3703 46.4401H50.6666C55.8128 46.4401 59.9999 42.2182 59.9999 37.0719C60 34.5711 59.0227 32.1907 57.2474 30.4336Z" fill="#C2C2C2"/>
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M33 31.8519C33.5523 31.8519 34 32.2996 34 32.8519V54.8519C34 55.4042 33.5523 55.8519 33 55.8519C32.4477 55.8519 32 55.4042 32 54.8519V32.8519C32 32.2996 32.4477 31.8519 33 31.8519Z" fill="#C2C2C2"/>
|
|
4
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M39.7318 39.1191C39.3555 39.5233 38.7228 39.5459 38.3185 39.1696L32.3185 33.5838C31.9143 33.2074 31.8916 32.5747 32.268 32.1704C32.6443 31.7662 33.277 31.7436 33.6813 32.1199L39.6813 37.7058C40.0855 38.0821 40.1082 38.7149 39.7318 39.1191Z" fill="#C2C2C2"/>
|
|
5
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.2682 39.1191C26.6445 39.5233 27.2772 39.5459 27.6815 39.1696L33.6815 33.5838C34.0857 33.2074 34.1084 32.5747 33.732 32.1704C33.3557 31.7662 32.723 31.7436 32.3187 32.1199L26.3187 37.7058C25.9145 38.0821 25.8918 38.7149 26.2682 39.1191Z" fill="#C2C2C2"/>
|
|
6
|
-
</svg>
|