@prom-ui/core 1.3.1 → 1.4.0
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/Avatar/cjs/index.development.js +99 -67
- package/Avatar/cjs/index.development.v2.js +99 -67
- package/Avatar/cjs/index.production.js +1 -1
- package/Avatar/cjs/index.production.v2.js +1 -1
- package/Avatar/index.d.ts +14 -14
- package/Avatar/package.json +1 -1
- package/Avatar/utils.d.ts +2 -2
- package/Backdrop/cjs/index.development.js +131 -77
- package/Backdrop/cjs/index.development.v2.js +131 -77
- package/Backdrop/cjs/index.production.js +1 -1
- package/Backdrop/cjs/index.production.v2.js +1 -1
- package/Backdrop/index.d.ts +25 -25
- package/Backdrop/package.json +1 -1
- package/Body/cjs/index.development.js +2 -0
- package/Body/cjs/index.development.v2.js +2 -0
- package/Body/index.d.ts +36 -36
- package/Body/package.json +1 -1
- package/BodyContext/cjs/index.development.js +6 -7
- package/BodyContext/cjs/index.development.v2.js +6 -7
- package/BodyContext/cjs/index.production.js +1 -1
- package/BodyContext/cjs/index.production.v2.js +1 -1
- package/BodyContext/index.d.ts +12 -12
- package/BodyContext/package.json +1 -1
- package/BodyProvider/cjs/index.development.js +7 -6
- package/BodyProvider/cjs/index.development.v2.js +7 -6
- package/BodyProvider/index.d.ts +10 -10
- package/BodyProvider/package.json +1 -1
- package/Box/cjs/index.development.js +4 -4
- package/Box/cjs/index.development.v2.js +4 -4
- package/Box/index.d.ts +106 -106
- package/Box/package.json +1 -1
- package/Button/cjs/index.development.js +67 -62
- package/Button/cjs/index.development.v2.js +67 -62
- package/Button/cjs/index.production.js +1 -1
- package/Button/cjs/index.production.v2.js +1 -1
- package/Button/index.d.ts +45 -45
- package/Button/package.json +1 -1
- package/ButtonPageUp/cjs/index.development.js +195 -85
- package/ButtonPageUp/cjs/index.development.v2.js +195 -85
- package/ButtonPageUp/cjs/index.production.js +1 -1
- package/ButtonPageUp/cjs/index.production.v2.js +1 -1
- package/ButtonPageUp/index.d.ts +18 -18
- package/ButtonPageUp/package.json +1 -1
- package/Checkbox/cjs/index.development.js +99 -67
- package/Checkbox/cjs/index.development.v2.js +99 -67
- package/Checkbox/cjs/index.production.js +1 -1
- package/Checkbox/cjs/index.production.v2.js +1 -1
- package/Checkbox/index.d.ts +8 -8
- package/Checkbox/package.json +1 -1
- package/Flex/index.d.ts +34 -34
- package/Flex/package.json +1 -1
- package/Grid/index.d.ts +46 -46
- package/Grid/package.json +1 -1
- package/Icon/index.d.ts +9 -9
- package/Icon/package.json +1 -1
- package/Image/index.d.ts +42 -42
- package/Image/package.json +1 -1
- package/ImageEmoji/cjs/index.development.js +70 -63
- package/ImageEmoji/cjs/index.development.v2.js +70 -63
- package/ImageEmoji/cjs/index.production.js +1 -1
- package/ImageEmoji/cjs/index.production.v2.js +1 -1
- package/ImageEmoji/index.d.ts +9 -9
- package/ImageEmoji/package.json +1 -1
- package/Input/index.d.ts +18 -18
- package/Input/package.json +1 -1
- package/InputField/addons/AfterClearValue.d.ts +3 -3
- package/InputField/addons/AfterCorrectValue.d.ts +2 -2
- package/InputField/addons/AfterLoading.d.ts +2 -2
- package/InputField/addons/AfterTogglePassword.d.ts +6 -6
- package/InputField/addons/ErrorText.d.ts +6 -6
- package/InputField/cjs/index.development.js +237 -173
- package/InputField/cjs/index.development.v2.js +237 -173
- package/InputField/cjs/index.production.js +1 -1
- package/InputField/cjs/index.production.v2.js +1 -1
- package/InputField/index.d.ts +18 -18
- package/InputField/package.json +1 -1
- package/InputField/utils.d.ts +10 -10
- package/KeyPress/cjs/index.development.js +13 -13
- package/KeyPress/cjs/index.development.v2.js +13 -13
- package/KeyPress/index.d.ts +14 -14
- package/KeyPress/package.json +1 -1
- package/Line/index.d.ts +13 -13
- package/Line/package.json +1 -1
- package/Link/cjs/index.development.js +5 -5
- package/Link/cjs/index.development.v2.js +5 -5
- package/Link/index.d.ts +28 -28
- package/Link/package.json +1 -1
- package/List/index.d.ts +23 -23
- package/List/package.json +1 -1
- package/Media/MediaProvider.d.ts +8 -8
- package/Media/cjs/index.development.js +70 -19
- package/Media/cjs/index.development.v2.js +70 -19
- package/Media/cjs/index.production.js +1 -1
- package/Media/cjs/index.production.v2.js +1 -1
- package/Media/index.d.ts +20 -20
- package/Media/package.json +1 -1
- package/OutsideClick/cjs/index.development.js +117 -61
- package/OutsideClick/cjs/index.development.v2.js +117 -61
- package/OutsideClick/cjs/index.production.js +1 -1
- package/OutsideClick/cjs/index.production.v2.js +1 -1
- package/OutsideClick/index.d.ts +12 -12
- package/OutsideClick/package.json +1 -1
- package/Overlay/cjs/index.development.js +197 -183
- package/Overlay/cjs/index.development.v2.js +197 -183
- package/Overlay/cjs/index.production.js +1 -1
- package/Overlay/cjs/index.production.v2.js +1 -1
- package/Overlay/components/OverlayHeader.d.ts +11 -11
- package/Overlay/components/SwipeClose.d.ts +11 -11
- package/Overlay/components/TouchScrollable.d.ts +8 -8
- package/Overlay/index.d.ts +76 -76
- package/Overlay/package.json +1 -1
- package/Overlay/utils.d.ts +10 -10
- package/Picture/index.d.ts +70 -70
- package/Picture/package.json +1 -1
- package/Portal/cjs/index.development.js +11 -11
- package/Portal/cjs/index.development.v2.js +11 -11
- package/Portal/index.d.ts +10 -10
- package/Portal/package.json +1 -1
- package/QRCode/cjs/index.development.js +11 -11
- package/QRCode/cjs/index.development.v2.js +11 -11
- package/QRCode/index.d.ts +17 -17
- package/QRCode/package.json +1 -1
- package/Rating/cjs/index.development.js +75 -69
- package/Rating/cjs/index.development.v2.js +75 -69
- package/Rating/cjs/index.production.js +1 -1
- package/Rating/cjs/index.production.v2.js +1 -1
- package/Rating/index.d.ts +17 -17
- package/Rating/package.json +1 -1
- package/RatingSelect/cjs/index.development.js +148 -68
- package/RatingSelect/cjs/index.development.v2.js +148 -68
- package/RatingSelect/cjs/index.production.js +1 -1
- package/RatingSelect/cjs/index.production.v2.js +1 -1
- package/RatingSelect/index.d.ts +22 -18
- package/RatingSelect/package.json +1 -1
- package/SafeQuery/cjs/index.development.js +158 -110
- package/SafeQuery/cjs/index.development.v2.js +158 -110
- package/SafeQuery/cjs/index.production.js +1 -1
- package/SafeQuery/cjs/index.production.v2.js +1 -1
- package/SafeQuery/components/Error.d.ts +7 -7
- package/SafeQuery/index.d.ts +10 -10
- package/SafeQuery/package.json +1 -1
- package/Scroll/index.d.ts +25 -25
- package/Scroll/package.json +1 -1
- package/ScrollControls/ScrollControlsButton.d.ts +11 -11
- package/ScrollControls/cjs/index.development.js +201 -113
- package/ScrollControls/cjs/index.development.v2.js +201 -113
- package/ScrollControls/cjs/index.production.js +1 -1
- package/ScrollControls/cjs/index.production.v2.js +1 -1
- package/ScrollControls/index.d.ts +16 -16
- package/ScrollControls/package.json +1 -1
- package/SimpleSlider/cjs/index.development.js +270 -158
- package/SimpleSlider/cjs/index.development.v2.js +270 -158
- package/SimpleSlider/cjs/index.production.js +1 -1
- package/SimpleSlider/cjs/index.production.v2.js +1 -1
- package/SimpleSlider/index.d.ts +41 -41
- package/SimpleSlider/package.json +1 -1
- package/SimpleSlider/useAutoPlay.d.ts +3 -3
- package/SimpleSlider/utils.d.ts +19 -19
- package/Skeleton/cjs/index.development.js +118 -64
- package/Skeleton/cjs/index.development.v2.js +118 -64
- package/Skeleton/cjs/index.production.js +1 -1
- package/Skeleton/cjs/index.production.v2.js +1 -1
- package/Skeleton/index.d.ts +37 -37
- package/Skeleton/package.json +1 -1
- package/Spinner/cjs/index.development.js +66 -61
- package/Spinner/cjs/index.development.v2.js +66 -61
- package/Spinner/cjs/index.production.js +1 -1
- package/Spinner/cjs/index.production.v2.js +1 -1
- package/Spinner/index.d.ts +29 -29
- package/Spinner/package.json +1 -1
- package/Text/index.d.ts +25 -25
- package/Text/package.json +1 -1
- package/TextEmoji/cjs/index.development.js +65 -60
- package/TextEmoji/cjs/index.development.v2.js +65 -60
- package/TextEmoji/cjs/index.production.js +1 -1
- package/TextEmoji/cjs/index.production.v2.js +1 -1
- package/TextEmoji/index.d.ts +9 -9
- package/TextEmoji/package.json +1 -1
- package/Tooltip/cjs/index.development.js +80 -91
- package/Tooltip/cjs/index.development.v2.js +80 -91
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/index.d.ts +87 -87
- package/Tooltip/package.json +1 -1
- package/Tumbler/cjs/index.development.js +98 -66
- package/Tumbler/cjs/index.development.v2.js +98 -66
- package/Tumbler/cjs/index.production.js +1 -1
- package/Tumbler/cjs/index.production.v2.js +1 -1
- package/Tumbler/index.d.ts +8 -8
- package/Tumbler/package.json +1 -1
- package/package.json +7 -5
- package/useBodyTTag/cjs/index.development.js +1 -1
- package/useBodyTTag/cjs/index.development.v2.js +1 -1
- package/useBodyTTag/index.d.ts +2 -2
- package/useBodyTTag/package.json +1 -1
- package/useDebounce/cjs/index.development.js +58 -6
- package/useDebounce/cjs/index.development.v2.js +58 -6
- package/useDebounce/cjs/index.production.js +1 -1
- package/useDebounce/cjs/index.production.v2.js +1 -1
- package/useDebounce/index.d.ts +4 -4
- package/useDebounce/package.json +1 -1
- package/useId/cjs/index.development.js +6 -7
- package/useId/cjs/index.development.v2.js +6 -7
- package/useId/cjs/index.production.js +1 -1
- package/useId/cjs/index.production.v2.js +1 -1
- package/useId/index.d.ts +4 -4
- package/useId/package.json +1 -1
- package/useIsMounted/cjs/index.development.js +3 -3
- package/useIsMounted/cjs/index.development.v2.js +3 -3
- package/useIsMounted/index.d.ts +4 -4
- package/useIsMounted/package.json +1 -1
- package/useKeyPress/cjs/index.development.js +76 -22
- package/useKeyPress/cjs/index.development.v2.js +76 -22
- package/useKeyPress/cjs/index.production.js +1 -1
- package/useKeyPress/cjs/index.production.v2.js +1 -1
- package/useKeyPress/index.d.ts +6 -6
- package/useKeyPress/package.json +1 -1
- package/useMedia/cjs/index.development.js +5 -5
- package/useMedia/cjs/index.development.v2.js +5 -5
- package/useMedia/index.d.ts +21 -21
- package/useMedia/package.json +1 -1
- package/useOutsideClick/cjs/index.development.js +2 -2
- package/useOutsideClick/cjs/index.development.v2.js +2 -2
- package/useOutsideClick/index.d.ts +5 -5
- package/useOutsideClick/package.json +1 -1
- package/usePortal/cjs/index.development.js +32 -27
- package/usePortal/cjs/index.development.v2.js +32 -27
- package/usePortal/index.d.ts +12 -12
- package/usePortal/package.json +1 -1
- package/useScrollPosition/cjs/index.development.js +2 -2
- package/useScrollPosition/cjs/index.development.v2.js +2 -2
- package/useScrollPosition/index.d.ts +5 -5
- package/useScrollPosition/package.json +1 -1
package/QRCode/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type QRCodeProps = {
|
|
3
|
-
/** Значение, например ссылка на сайт */
|
|
4
|
-
value: string;
|
|
5
|
-
/** Размер в px */
|
|
6
|
-
size?: number;
|
|
7
|
-
/**
|
|
8
|
-
* Error correction
|
|
9
|
-
* <br>
|
|
10
|
-
* https://en.wikipedia.org/wiki/QR_code#Error_correction */
|
|
11
|
-
level?: 'L' | 'M' | 'Q' | 'H';
|
|
12
|
-
/** Цвет фона */
|
|
13
|
-
bgColor?: string;
|
|
14
|
-
/** Основной цвет */
|
|
15
|
-
fgColor?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const QRCode: React.FC<QRCodeProps>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type QRCodeProps = {
|
|
3
|
+
/** Значение, например ссылка на сайт */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Размер в px */
|
|
6
|
+
size?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Error correction
|
|
9
|
+
* <br>
|
|
10
|
+
* https://en.wikipedia.org/wiki/QR_code#Error_correction */
|
|
11
|
+
level?: 'L' | 'M' | 'Q' | 'H';
|
|
12
|
+
/** Цвет фона */
|
|
13
|
+
bgColor?: string;
|
|
14
|
+
/** Основной цвет */
|
|
15
|
+
fgColor?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const QRCode: React.FC<QRCodeProps>;
|
package/QRCode/package.json
CHANGED
|
@@ -9,80 +9,86 @@ var useId = require('@prom-ui/core/useId');
|
|
|
9
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceCompat(e) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
}
|
|
12
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
23
21
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
30
30
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
32
|
+
function _extends() {
|
|
33
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
34
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
35
|
+
var source = arguments[i];
|
|
36
|
+
for (var key in source) {
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
38
|
+
target[key] = source[key];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return target;
|
|
43
|
+
};
|
|
44
|
+
return _extends.apply(this, arguments);
|
|
45
|
+
}
|
|
46
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
47
|
+
if (source == null) return {};
|
|
48
|
+
var target = {};
|
|
49
|
+
var sourceKeys = Object.keys(source);
|
|
50
|
+
var key, i;
|
|
51
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
52
|
+
key = sourceKeys[i];
|
|
53
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
54
|
+
target[key] = source[key];
|
|
55
|
+
}
|
|
56
|
+
return target;
|
|
57
|
+
}
|
|
58
|
+
function _objectWithoutProperties(source, excluded) {
|
|
59
|
+
if (source == null) return {};
|
|
60
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
61
|
+
var key, i;
|
|
62
|
+
if (Object.getOwnPropertySymbols) {
|
|
63
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
64
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
65
|
+
key = sourceSymbolKeys[i];
|
|
66
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
67
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
68
|
+
target[key] = source[key];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return target;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
var css = {"root":"Rating__root___AYAsy"};
|
|
71
75
|
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
percent =
|
|
77
|
-
|
|
78
|
-
size =
|
|
79
|
-
|
|
80
|
-
theme =
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
var _excluded = ["value", "percent", "size", "theme", "className"];
|
|
77
|
+
var Rating = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
78
|
+
var _ref$value = _ref.value,
|
|
79
|
+
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
80
|
+
_ref$percent = _ref.percent,
|
|
81
|
+
percent = _ref$percent === void 0 ? 0 : _ref$percent,
|
|
82
|
+
_ref$size = _ref.size,
|
|
83
|
+
size = _ref$size === void 0 ? 18 : _ref$size,
|
|
84
|
+
_ref$theme = _ref.theme,
|
|
85
|
+
theme = _ref$theme === void 0 ? 'violet-500' : _ref$theme,
|
|
86
|
+
className = _ref.className,
|
|
87
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
83
88
|
var gradientOffset = Math.round(percent > 0 ? percent : value / 5 * 100);
|
|
84
89
|
var gradientId = useId.useId();
|
|
85
90
|
var currentSize = size;
|
|
91
|
+
|
|
86
92
|
// DEPRECATED
|
|
87
93
|
if (size === 'small') {
|
|
88
94
|
currentSize = 14;
|
|
@@ -91,25 +97,25 @@ var Rating = React__namespace.forwardRef(function (_a, ref) {
|
|
|
91
97
|
} else if (size === 'big') {
|
|
92
98
|
currentSize = 22;
|
|
93
99
|
}
|
|
94
|
-
return React__namespace.createElement("svg",
|
|
100
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
95
101
|
className: classNames__default.default(css.root, className),
|
|
96
102
|
height: currentSize
|
|
97
103
|
}, props, {
|
|
98
104
|
ref: ref,
|
|
99
|
-
viewBox:
|
|
105
|
+
viewBox: "0 0 120 24",
|
|
100
106
|
tabIndex: -1,
|
|
101
107
|
focusable: false
|
|
102
|
-
}), React__namespace.createElement("defs", null, React__namespace.createElement("linearGradient", {
|
|
108
|
+
}), /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
103
109
|
id: gradientId
|
|
104
|
-
}, React__namespace.createElement("stop", {
|
|
110
|
+
}, /*#__PURE__*/React__namespace.createElement("stop", {
|
|
105
111
|
offset: "".concat(gradientOffset, "%"),
|
|
106
112
|
stopColor: "var(--".concat(theme, ")")
|
|
107
|
-
}), React__namespace.createElement("stop", {
|
|
113
|
+
}), /*#__PURE__*/React__namespace.createElement("stop", {
|
|
108
114
|
offset: "".concat(gradientOffset, "%"),
|
|
109
|
-
stopColor:
|
|
110
|
-
}))), React__namespace.createElement("path", {
|
|
115
|
+
stopColor: "var(--black-400)"
|
|
116
|
+
}))), /*#__PURE__*/React__namespace.createElement("path", {
|
|
111
117
|
fill: "url(#".concat(gradientId, ")"),
|
|
112
|
-
d:
|
|
118
|
+
d: "M 17.138 22 C 16.863 22 16.588 21.931 16.335 21.792 L 12 19.405 L 7.665 21.792 C 7.102 22.1 6.428 22.063 5.902 21.692 C 5.359 21.308 5.09 20.658 5.199 19.994 L 6.037 14.877 L 2.4939999999999998 11.26 C 2.036 10.792 1.883 10.113 2.092 9.488 C 2.2960000000000003 8.878 2.8120000000000003 8.438 3.439 8.343 L 8.297 7.604 L 10.479 2.974 C 10.763 2.374 11.345 2 12 2 C 12.654 2 13.237 2.374 13.52 2.974 L 15.703 7.604 L 20.561 8.343 C 21.187 8.438 21.704 8.878 21.908 9.488 C 22.117 10.113 21.964 10.792 21.508 11.258 L 17.963 14.877 L 18.802 19.995 C 18.91 20.658 18.641 21.308 18.098 21.692 C 17.809 21.896 17.475 22 17.138 22 Z M 41.138 22 C 40.863 22 40.588 21.931 40.335 21.792 L 36 19.405 L 31.665 21.792 C 31.102 22.1 30.428 22.063 29.902 21.692 C 29.359 21.308 29.09 20.658 29.199 19.994 L 30.037 14.877 L 26.494 11.26 C 26.036 10.792 25.883 10.113 26.092 9.488 C 26.296 8.878 26.812 8.438 27.439 8.343 L 32.297 7.604 L 34.479 2.974 C 34.763 2.374 35.345 2 36 2 C 36.654 2 37.237 2.374 37.52 2.974 L 39.703 7.604 L 44.561 8.343 C 45.187 8.438 45.704 8.878 45.908 9.488 C 46.117 10.113 45.964 10.792 45.508 11.258 L 41.963 14.877 L 42.802 19.995 C 42.91 20.658 42.641 21.308 42.098 21.692 C 41.809 21.896 41.475 22 41.138 22 Z M 65.138 22 C 64.863 22 64.588 21.931 64.335 21.792 L 60 19.405 L 55.665 21.792 C 55.102 22.1 54.428 22.063 53.902 21.692 C 53.359 21.308 53.09 20.658 53.199 19.994 L 54.037 14.877 L 50.494 11.26 C 50.036 10.792 49.883 10.113 50.092 9.488 C 50.296 8.878 50.812 8.438 51.439 8.343 L 56.297 7.604 L 58.479 2.974 C 58.763 2.374 59.345 2 60 2 C 60.654 2 61.237 2.374 61.52 2.974 L 63.703 7.604 L 68.561 8.343 C 69.187 8.438 69.704 8.878 69.908 9.488 C 70.117 10.113 69.964 10.792 69.508 11.258 L 65.963 14.877 L 66.802 19.995 C 66.91 20.658 66.641 21.308 66.098 21.692 C 65.809 21.896 65.475 22 65.138 22 Z M 89.138 22 C 88.863 22 88.588 21.931 88.335 21.792 L 84 19.405 L 79.665 21.792 C 79.102 22.1 78.428 22.063 77.902 21.692 C 77.359 21.308 77.09 20.658 77.199 19.994 L 78.037 14.877 L 74.494 11.26 C 74.036 10.792 73.883 10.113 74.092 9.488 C 74.296 8.878 74.812 8.438 75.439 8.343 L 80.297 7.604 L 82.479 2.974 C 82.763 2.374 83.345 2 84 2 C 84.654 2 85.237 2.374 85.52 2.974 L 87.703 7.604 L 92.561 8.343 C 93.187 8.438 93.704 8.878 93.908 9.488 C 94.117 10.113 93.964 10.792 93.508 11.258 L 89.963 14.877 L 90.802 19.995 C 90.91 20.658 90.641 21.308 90.098 21.692 C 89.809 21.896 89.475 22 89.138 22 Z M 113.138 22 C 112.863 22 112.588 21.931 112.335 21.792 L 108 19.405 L 103.665 21.792 C 103.102 22.1 102.428 22.063 101.902 21.692 C 101.359 21.308 101.09 20.658 101.199 19.994 L 102.037 14.877 L 98.494 11.26 C 98.036 10.792 97.883 10.113 98.092 9.488 C 98.296 8.878 98.812 8.438 99.439 8.343 L 104.297 7.604 L 106.479 2.974 C 106.763 2.374 107.345 2 108 2 C 108.654 2 109.237 2.374 109.52 2.974 L 111.703 7.604 L 116.561 8.343 C 117.187 8.438 117.704 8.878 117.908 9.488 C 118.117 10.113 117.964 10.792 117.508 11.258 L 113.963 14.877 L 114.802 19.995 C 114.91 20.658 114.641 21.308 114.098 21.692 C 113.809 21.896 113.475 22 113.138 22 Z"
|
|
113
119
|
}));
|
|
114
120
|
});
|
|
115
121
|
Rating.displayName = 'Rating';
|
|
@@ -9,80 +9,86 @@ var useId = require('@prom-ui/core/useId');
|
|
|
9
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceCompat(e) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
}
|
|
12
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
23
21
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
30
30
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
32
|
+
function _extends() {
|
|
33
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
34
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
35
|
+
var source = arguments[i];
|
|
36
|
+
for (var key in source) {
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
38
|
+
target[key] = source[key];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return target;
|
|
43
|
+
};
|
|
44
|
+
return _extends.apply(this, arguments);
|
|
45
|
+
}
|
|
46
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
47
|
+
if (source == null) return {};
|
|
48
|
+
var target = {};
|
|
49
|
+
var sourceKeys = Object.keys(source);
|
|
50
|
+
var key, i;
|
|
51
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
52
|
+
key = sourceKeys[i];
|
|
53
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
54
|
+
target[key] = source[key];
|
|
55
|
+
}
|
|
56
|
+
return target;
|
|
57
|
+
}
|
|
58
|
+
function _objectWithoutProperties(source, excluded) {
|
|
59
|
+
if (source == null) return {};
|
|
60
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
61
|
+
var key, i;
|
|
62
|
+
if (Object.getOwnPropertySymbols) {
|
|
63
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
64
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
65
|
+
key = sourceSymbolKeys[i];
|
|
66
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
67
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
68
|
+
target[key] = source[key];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return target;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
var css = {"root":"Rating__root___aJlm0"};
|
|
71
75
|
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
percent =
|
|
77
|
-
|
|
78
|
-
size =
|
|
79
|
-
|
|
80
|
-
theme =
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
var _excluded = ["value", "percent", "size", "theme", "className"];
|
|
77
|
+
var Rating = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
78
|
+
var _ref$value = _ref.value,
|
|
79
|
+
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
80
|
+
_ref$percent = _ref.percent,
|
|
81
|
+
percent = _ref$percent === void 0 ? 0 : _ref$percent,
|
|
82
|
+
_ref$size = _ref.size,
|
|
83
|
+
size = _ref$size === void 0 ? 18 : _ref$size,
|
|
84
|
+
_ref$theme = _ref.theme,
|
|
85
|
+
theme = _ref$theme === void 0 ? 'violet-500' : _ref$theme,
|
|
86
|
+
className = _ref.className,
|
|
87
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
83
88
|
var gradientOffset = Math.round(percent > 0 ? percent : value / 5 * 100);
|
|
84
89
|
var gradientId = useId.useId();
|
|
85
90
|
var currentSize = size;
|
|
91
|
+
|
|
86
92
|
// DEPRECATED
|
|
87
93
|
if (size === 'small') {
|
|
88
94
|
currentSize = 14;
|
|
@@ -91,25 +97,25 @@ var Rating = React__namespace.forwardRef(function (_a, ref) {
|
|
|
91
97
|
} else if (size === 'big') {
|
|
92
98
|
currentSize = 22;
|
|
93
99
|
}
|
|
94
|
-
return React__namespace.createElement("svg",
|
|
100
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
95
101
|
className: classNames__default.default(css.root, className),
|
|
96
102
|
height: currentSize
|
|
97
103
|
}, props, {
|
|
98
104
|
ref: ref,
|
|
99
|
-
viewBox:
|
|
105
|
+
viewBox: "0 0 120 24",
|
|
100
106
|
tabIndex: -1,
|
|
101
107
|
focusable: false
|
|
102
|
-
}), React__namespace.createElement("defs", null, React__namespace.createElement("linearGradient", {
|
|
108
|
+
}), /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
103
109
|
id: gradientId
|
|
104
|
-
}, React__namespace.createElement("stop", {
|
|
110
|
+
}, /*#__PURE__*/React__namespace.createElement("stop", {
|
|
105
111
|
offset: "".concat(gradientOffset, "%"),
|
|
106
112
|
stopColor: "var(--".concat(theme, ")")
|
|
107
|
-
}), React__namespace.createElement("stop", {
|
|
113
|
+
}), /*#__PURE__*/React__namespace.createElement("stop", {
|
|
108
114
|
offset: "".concat(gradientOffset, "%"),
|
|
109
|
-
stopColor:
|
|
110
|
-
}))), React__namespace.createElement("path", {
|
|
115
|
+
stopColor: "var(--black-400)"
|
|
116
|
+
}))), /*#__PURE__*/React__namespace.createElement("path", {
|
|
111
117
|
fill: "url(#".concat(gradientId, ")"),
|
|
112
|
-
d:
|
|
118
|
+
d: "M 17.138 22 C 16.863 22 16.588 21.931 16.335 21.792 L 12 19.405 L 7.665 21.792 C 7.102 22.1 6.428 22.063 5.902 21.692 C 5.359 21.308 5.09 20.658 5.199 19.994 L 6.037 14.877 L 2.4939999999999998 11.26 C 2.036 10.792 1.883 10.113 2.092 9.488 C 2.2960000000000003 8.878 2.8120000000000003 8.438 3.439 8.343 L 8.297 7.604 L 10.479 2.974 C 10.763 2.374 11.345 2 12 2 C 12.654 2 13.237 2.374 13.52 2.974 L 15.703 7.604 L 20.561 8.343 C 21.187 8.438 21.704 8.878 21.908 9.488 C 22.117 10.113 21.964 10.792 21.508 11.258 L 17.963 14.877 L 18.802 19.995 C 18.91 20.658 18.641 21.308 18.098 21.692 C 17.809 21.896 17.475 22 17.138 22 Z M 41.138 22 C 40.863 22 40.588 21.931 40.335 21.792 L 36 19.405 L 31.665 21.792 C 31.102 22.1 30.428 22.063 29.902 21.692 C 29.359 21.308 29.09 20.658 29.199 19.994 L 30.037 14.877 L 26.494 11.26 C 26.036 10.792 25.883 10.113 26.092 9.488 C 26.296 8.878 26.812 8.438 27.439 8.343 L 32.297 7.604 L 34.479 2.974 C 34.763 2.374 35.345 2 36 2 C 36.654 2 37.237 2.374 37.52 2.974 L 39.703 7.604 L 44.561 8.343 C 45.187 8.438 45.704 8.878 45.908 9.488 C 46.117 10.113 45.964 10.792 45.508 11.258 L 41.963 14.877 L 42.802 19.995 C 42.91 20.658 42.641 21.308 42.098 21.692 C 41.809 21.896 41.475 22 41.138 22 Z M 65.138 22 C 64.863 22 64.588 21.931 64.335 21.792 L 60 19.405 L 55.665 21.792 C 55.102 22.1 54.428 22.063 53.902 21.692 C 53.359 21.308 53.09 20.658 53.199 19.994 L 54.037 14.877 L 50.494 11.26 C 50.036 10.792 49.883 10.113 50.092 9.488 C 50.296 8.878 50.812 8.438 51.439 8.343 L 56.297 7.604 L 58.479 2.974 C 58.763 2.374 59.345 2 60 2 C 60.654 2 61.237 2.374 61.52 2.974 L 63.703 7.604 L 68.561 8.343 C 69.187 8.438 69.704 8.878 69.908 9.488 C 70.117 10.113 69.964 10.792 69.508 11.258 L 65.963 14.877 L 66.802 19.995 C 66.91 20.658 66.641 21.308 66.098 21.692 C 65.809 21.896 65.475 22 65.138 22 Z M 89.138 22 C 88.863 22 88.588 21.931 88.335 21.792 L 84 19.405 L 79.665 21.792 C 79.102 22.1 78.428 22.063 77.902 21.692 C 77.359 21.308 77.09 20.658 77.199 19.994 L 78.037 14.877 L 74.494 11.26 C 74.036 10.792 73.883 10.113 74.092 9.488 C 74.296 8.878 74.812 8.438 75.439 8.343 L 80.297 7.604 L 82.479 2.974 C 82.763 2.374 83.345 2 84 2 C 84.654 2 85.237 2.374 85.52 2.974 L 87.703 7.604 L 92.561 8.343 C 93.187 8.438 93.704 8.878 93.908 9.488 C 94.117 10.113 93.964 10.792 93.508 11.258 L 89.963 14.877 L 90.802 19.995 C 90.91 20.658 90.641 21.308 90.098 21.692 C 89.809 21.896 89.475 22 89.138 22 Z M 113.138 22 C 112.863 22 112.588 21.931 112.335 21.792 L 108 19.405 L 103.665 21.792 C 103.102 22.1 102.428 22.063 101.902 21.692 C 101.359 21.308 101.09 20.658 101.199 19.994 L 102.037 14.877 L 98.494 11.26 C 98.036 10.792 97.883 10.113 98.092 9.488 C 98.296 8.878 98.812 8.438 99.439 8.343 L 104.297 7.604 L 106.479 2.974 C 106.763 2.374 107.345 2 108 2 C 108.654 2 109.237 2.374 109.52 2.974 L 111.703 7.604 L 116.561 8.343 C 117.187 8.438 117.704 8.878 117.908 9.488 C 118.117 10.113 117.964 10.792 117.508 11.258 L 113.963 14.877 L 114.802 19.995 C 114.91 20.658 114.641 21.308 114.098 21.692 C 113.809 21.896 113.475 22 113.138 22 Z"
|
|
113
119
|
}));
|
|
114
120
|
});
|
|
115
121
|
Rating.displayName = 'Rating';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/useId");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=a(e),C=n(t);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function l(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i="AYAsy",L=["value","percent","size","theme","className"],u=o.forwardRef((function(e,t){var n=e.value,a=void 0===n?0:n,u=e.percent,s=void 0===u?0:u,f=e.size,p=void 0===f?18:f,d=e.theme,b=void 0===d?"violet-500":d,v=e.className,m=l(e,L),y=Math.round(s>0?s:a/5*100),O=r.useId(),g=p;return"small"===p?g=14:"default"===p?g=18:"big"===p&&(g=22),o.createElement("svg",c({className:C.default(i,v),height:g},m,{ref:t,viewBox:"0 0 120 24",tabIndex:-1,focusable:!1}),o.createElement("defs",null,o.createElement("linearGradient",{id:O},o.createElement("stop",{offset:"".concat(y,"%"),stopColor:"var(--".concat(b,")")}),o.createElement("stop",{offset:"".concat(y,"%"),stopColor:"var(--black-400)"}))),o.createElement("path",{fill:"url(#".concat(O,")"),d:"M 17.138 22 C 16.863 22 16.588 21.931 16.335 21.792 L 12 19.405 L 7.665 21.792 C 7.102 22.1 6.428 22.063 5.902 21.692 C 5.359 21.308 5.09 20.658 5.199 19.994 L 6.037 14.877 L 2.4939999999999998 11.26 C 2.036 10.792 1.883 10.113 2.092 9.488 C 2.2960000000000003 8.878 2.8120000000000003 8.438 3.439 8.343 L 8.297 7.604 L 10.479 2.974 C 10.763 2.374 11.345 2 12 2 C 12.654 2 13.237 2.374 13.52 2.974 L 15.703 7.604 L 20.561 8.343 C 21.187 8.438 21.704 8.878 21.908 9.488 C 22.117 10.113 21.964 10.792 21.508 11.258 L 17.963 14.877 L 18.802 19.995 C 18.91 20.658 18.641 21.308 18.098 21.692 C 17.809 21.896 17.475 22 17.138 22 Z M 41.138 22 C 40.863 22 40.588 21.931 40.335 21.792 L 36 19.405 L 31.665 21.792 C 31.102 22.1 30.428 22.063 29.902 21.692 C 29.359 21.308 29.09 20.658 29.199 19.994 L 30.037 14.877 L 26.494 11.26 C 26.036 10.792 25.883 10.113 26.092 9.488 C 26.296 8.878 26.812 8.438 27.439 8.343 L 32.297 7.604 L 34.479 2.974 C 34.763 2.374 35.345 2 36 2 C 36.654 2 37.237 2.374 37.52 2.974 L 39.703 7.604 L 44.561 8.343 C 45.187 8.438 45.704 8.878 45.908 9.488 C 46.117 10.113 45.964 10.792 45.508 11.258 L 41.963 14.877 L 42.802 19.995 C 42.91 20.658 42.641 21.308 42.098 21.692 C 41.809 21.896 41.475 22 41.138 22 Z M 65.138 22 C 64.863 22 64.588 21.931 64.335 21.792 L 60 19.405 L 55.665 21.792 C 55.102 22.1 54.428 22.063 53.902 21.692 C 53.359 21.308 53.09 20.658 53.199 19.994 L 54.037 14.877 L 50.494 11.26 C 50.036 10.792 49.883 10.113 50.092 9.488 C 50.296 8.878 50.812 8.438 51.439 8.343 L 56.297 7.604 L 58.479 2.974 C 58.763 2.374 59.345 2 60 2 C 60.654 2 61.237 2.374 61.52 2.974 L 63.703 7.604 L 68.561 8.343 C 69.187 8.438 69.704 8.878 69.908 9.488 C 70.117 10.113 69.964 10.792 69.508 11.258 L 65.963 14.877 L 66.802 19.995 C 66.91 20.658 66.641 21.308 66.098 21.692 C 65.809 21.896 65.475 22 65.138 22 Z M 89.138 22 C 88.863 22 88.588 21.931 88.335 21.792 L 84 19.405 L 79.665 21.792 C 79.102 22.1 78.428 22.063 77.902 21.692 C 77.359 21.308 77.09 20.658 77.199 19.994 L 78.037 14.877 L 74.494 11.26 C 74.036 10.792 73.883 10.113 74.092 9.488 C 74.296 8.878 74.812 8.438 75.439 8.343 L 80.297 7.604 L 82.479 2.974 C 82.763 2.374 83.345 2 84 2 C 84.654 2 85.237 2.374 85.52 2.974 L 87.703 7.604 L 92.561 8.343 C 93.187 8.438 93.704 8.878 93.908 9.488 C 94.117 10.113 93.964 10.792 93.508 11.258 L 89.963 14.877 L 90.802 19.995 C 90.91 20.658 90.641 21.308 90.098 21.692 C 89.809 21.896 89.475 22 89.138 22 Z M 113.138 22 C 112.863 22 112.588 21.931 112.335 21.792 L 108 19.405 L 103.665 21.792 C 103.102 22.1 102.428 22.063 101.902 21.692 C 101.359 21.308 101.09 20.658 101.199 19.994 L 102.037 14.877 L 98.494 11.26 C 98.036 10.792 97.883 10.113 98.092 9.488 C 98.296 8.878 98.812 8.438 99.439 8.343 L 104.297 7.604 L 106.479 2.974 C 106.763 2.374 107.345 2 108 2 C 108.654 2 109.237 2.374 109.52 2.974 L 111.703 7.604 L 116.561 8.343 C 117.187 8.438 117.704 8.878 117.908 9.488 C 118.117 10.113 117.964 10.792 117.508 11.258 L 113.963 14.877 L 114.802 19.995 C 114.91 20.658 114.641 21.308 114.098 21.692 C 113.809 21.896 113.475 22 113.138 22 Z"}))}));u.displayName="Rating",exports.Rating=u,require("./style.production.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/useId");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=a(e),C=n(t);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function l(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i="aJlm0",L=["value","percent","size","theme","className"],u=o.forwardRef((function(e,t){var n=e.value,a=void 0===n?0:n,u=e.percent,s=void 0===u?0:u,f=e.size,p=void 0===f?18:f,d=e.theme,v=void 0===d?"violet-500":d,b=e.className,m=l(e,L),O=Math.round(s>0?s:a/5*100),y=r.useId(),g=p;return"small"===p?g=14:"default"===p?g=18:"big"===p&&(g=22),o.createElement("svg",c({className:C.default(i,b),height:g},m,{ref:t,viewBox:"0 0 120 24",tabIndex:-1,focusable:!1}),o.createElement("defs",null,o.createElement("linearGradient",{id:y},o.createElement("stop",{offset:"".concat(O,"%"),stopColor:"var(--".concat(v,")")}),o.createElement("stop",{offset:"".concat(O,"%"),stopColor:"var(--black-400)"}))),o.createElement("path",{fill:"url(#".concat(y,")"),d:"M 17.138 22 C 16.863 22 16.588 21.931 16.335 21.792 L 12 19.405 L 7.665 21.792 C 7.102 22.1 6.428 22.063 5.902 21.692 C 5.359 21.308 5.09 20.658 5.199 19.994 L 6.037 14.877 L 2.4939999999999998 11.26 C 2.036 10.792 1.883 10.113 2.092 9.488 C 2.2960000000000003 8.878 2.8120000000000003 8.438 3.439 8.343 L 8.297 7.604 L 10.479 2.974 C 10.763 2.374 11.345 2 12 2 C 12.654 2 13.237 2.374 13.52 2.974 L 15.703 7.604 L 20.561 8.343 C 21.187 8.438 21.704 8.878 21.908 9.488 C 22.117 10.113 21.964 10.792 21.508 11.258 L 17.963 14.877 L 18.802 19.995 C 18.91 20.658 18.641 21.308 18.098 21.692 C 17.809 21.896 17.475 22 17.138 22 Z M 41.138 22 C 40.863 22 40.588 21.931 40.335 21.792 L 36 19.405 L 31.665 21.792 C 31.102 22.1 30.428 22.063 29.902 21.692 C 29.359 21.308 29.09 20.658 29.199 19.994 L 30.037 14.877 L 26.494 11.26 C 26.036 10.792 25.883 10.113 26.092 9.488 C 26.296 8.878 26.812 8.438 27.439 8.343 L 32.297 7.604 L 34.479 2.974 C 34.763 2.374 35.345 2 36 2 C 36.654 2 37.237 2.374 37.52 2.974 L 39.703 7.604 L 44.561 8.343 C 45.187 8.438 45.704 8.878 45.908 9.488 C 46.117 10.113 45.964 10.792 45.508 11.258 L 41.963 14.877 L 42.802 19.995 C 42.91 20.658 42.641 21.308 42.098 21.692 C 41.809 21.896 41.475 22 41.138 22 Z M 65.138 22 C 64.863 22 64.588 21.931 64.335 21.792 L 60 19.405 L 55.665 21.792 C 55.102 22.1 54.428 22.063 53.902 21.692 C 53.359 21.308 53.09 20.658 53.199 19.994 L 54.037 14.877 L 50.494 11.26 C 50.036 10.792 49.883 10.113 50.092 9.488 C 50.296 8.878 50.812 8.438 51.439 8.343 L 56.297 7.604 L 58.479 2.974 C 58.763 2.374 59.345 2 60 2 C 60.654 2 61.237 2.374 61.52 2.974 L 63.703 7.604 L 68.561 8.343 C 69.187 8.438 69.704 8.878 69.908 9.488 C 70.117 10.113 69.964 10.792 69.508 11.258 L 65.963 14.877 L 66.802 19.995 C 66.91 20.658 66.641 21.308 66.098 21.692 C 65.809 21.896 65.475 22 65.138 22 Z M 89.138 22 C 88.863 22 88.588 21.931 88.335 21.792 L 84 19.405 L 79.665 21.792 C 79.102 22.1 78.428 22.063 77.902 21.692 C 77.359 21.308 77.09 20.658 77.199 19.994 L 78.037 14.877 L 74.494 11.26 C 74.036 10.792 73.883 10.113 74.092 9.488 C 74.296 8.878 74.812 8.438 75.439 8.343 L 80.297 7.604 L 82.479 2.974 C 82.763 2.374 83.345 2 84 2 C 84.654 2 85.237 2.374 85.52 2.974 L 87.703 7.604 L 92.561 8.343 C 93.187 8.438 93.704 8.878 93.908 9.488 C 94.117 10.113 93.964 10.792 93.508 11.258 L 89.963 14.877 L 90.802 19.995 C 90.91 20.658 90.641 21.308 90.098 21.692 C 89.809 21.896 89.475 22 89.138 22 Z M 113.138 22 C 112.863 22 112.588 21.931 112.335 21.792 L 108 19.405 L 103.665 21.792 C 103.102 22.1 102.428 22.063 101.902 21.692 C 101.359 21.308 101.09 20.658 101.199 19.994 L 102.037 14.877 L 98.494 11.26 C 98.036 10.792 97.883 10.113 98.092 9.488 C 98.296 8.878 98.812 8.438 99.439 8.343 L 104.297 7.604 L 106.479 2.974 C 106.763 2.374 107.345 2 108 2 C 108.654 2 109.237 2.374 109.52 2.974 L 111.703 7.604 L 116.561 8.343 C 117.187 8.438 117.704 8.878 117.908 9.488 C 118.117 10.113 117.964 10.792 117.508 11.258 L 113.963 14.877 L 114.802 19.995 C 114.91 20.658 114.641 21.308 114.098 21.692 C 113.809 21.896 113.475 22 113.138 22 Z"}))}));u.displayName="Rating",exports.Rating=u,require("./style.production.v2.css");
|
package/Rating/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type RatingProps = React.ComponentPropsWithRef<'svg'> & {
|
|
3
|
-
/** Значение рейтинга, от 0 до 5 */
|
|
4
|
-
value?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
5
|
-
/** Значение рейтинга в процентах от `0` до `100` */
|
|
6
|
-
percent?: number;
|
|
7
|
-
/** Размер */
|
|
8
|
-
size?: React.ComponentPropsWithRef<'svg'>['height'];
|
|
9
|
-
/** Цвет звезд */
|
|
10
|
-
theme?: 'violet-500' | 'yellow-500';
|
|
11
|
-
/**
|
|
12
|
-
* @ignore
|
|
13
|
-
* HIT FIX property 'fr' is missing in type '{}' but required in type
|
|
14
|
-
* */
|
|
15
|
-
fr?: string | number;
|
|
16
|
-
};
|
|
17
|
-
export declare const Rating: React.ForwardRefExoticComponent<Omit<RatingProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type RatingProps = React.ComponentPropsWithRef<'svg'> & {
|
|
3
|
+
/** Значение рейтинга, от 0 до 5 */
|
|
4
|
+
value?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
5
|
+
/** Значение рейтинга в процентах от `0` до `100` */
|
|
6
|
+
percent?: number;
|
|
7
|
+
/** Размер */
|
|
8
|
+
size?: React.ComponentPropsWithRef<'svg'>['height'];
|
|
9
|
+
/** Цвет звезд */
|
|
10
|
+
theme?: 'violet-500' | 'yellow-500';
|
|
11
|
+
/**
|
|
12
|
+
* @ignore
|
|
13
|
+
* HIT FIX property 'fr' is missing in type '{}' but required in type
|
|
14
|
+
* */
|
|
15
|
+
fr?: string | number;
|
|
16
|
+
};
|
|
17
|
+
export declare const Rating: React.ForwardRefExoticComponent<Omit<RatingProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|