@prom-ui/core 2.0.0 → 2.0.1
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 +23 -69
- package/Avatar/cjs/index.development.v2.js +23 -69
- package/Avatar/cjs/index.production.js +1 -1
- package/Avatar/cjs/index.production.v2.js +1 -1
- package/Avatar/package.json +2 -1
- package/Backdrop/cjs/index.development.js +25 -90
- package/Backdrop/cjs/index.development.v2.js +25 -90
- package/Backdrop/cjs/index.production.js +1 -1
- package/Backdrop/cjs/index.production.v2.js +1 -1
- package/Backdrop/package.json +2 -1
- package/Badge/cjs/index.development.js +23 -69
- package/Badge/cjs/index.development.v2.js +23 -69
- package/Badge/cjs/index.production.js +1 -1
- package/Badge/cjs/index.production.v2.js +1 -1
- package/Badge/package.json +2 -1
- package/Body/package.json +1 -1
- package/BodyContext/package.json +1 -1
- package/BodyProvider/package.json +1 -1
- package/BodyScrollLock/package.json +1 -1
- package/Box/package.json +1 -1
- package/Button/cjs/index.development.js +22 -46
- package/Button/cjs/index.development.v2.js +22 -46
- package/Button/cjs/index.production.js +1 -1
- package/Button/cjs/index.production.v2.js +1 -1
- package/Button/package.json +2 -1
- package/ButtonPageUp/cjs/index.development.js +32 -148
- package/ButtonPageUp/cjs/index.development.v2.js +32 -148
- package/ButtonPageUp/cjs/index.production.js +1 -1
- package/ButtonPageUp/cjs/index.production.v2.js +1 -1
- package/ButtonPageUp/package.json +2 -1
- package/Checkbox/cjs/index.development.js +23 -69
- package/Checkbox/cjs/index.development.v2.js +23 -69
- package/Checkbox/cjs/index.production.js +1 -1
- package/Checkbox/cjs/index.production.v2.js +1 -1
- package/Checkbox/package.json +2 -1
- package/ContextMenu/cjs/index.development.js +23 -108
- package/ContextMenu/cjs/index.development.v2.js +23 -108
- package/ContextMenu/cjs/index.production.js +1 -1
- package/ContextMenu/cjs/index.production.v2.js +1 -1
- package/ContextMenu/package.json +2 -1
- package/ErrorCatch/cjs/index.development.js +30 -144
- package/ErrorCatch/cjs/index.development.v2.js +30 -144
- package/ErrorCatch/cjs/index.production.js +1 -1
- package/ErrorCatch/cjs/index.production.v2.js +1 -1
- package/ErrorCatch/package.json +5 -2
- package/Flex/package.json +1 -1
- package/Grid/package.json +1 -1
- package/Icon/package.json +1 -1
- package/Image/package.json +1 -1
- package/ImageEmoji/cjs/index.development.js +22 -46
- package/ImageEmoji/cjs/index.development.v2.js +22 -46
- package/ImageEmoji/cjs/index.production.js +1 -1
- package/ImageEmoji/cjs/index.production.v2.js +1 -1
- package/ImageEmoji/package.json +2 -1
- package/Input/package.json +1 -1
- package/InputField/cjs/index.development.js +32 -107
- package/InputField/cjs/index.development.v2.js +32 -107
- package/InputField/cjs/index.production.js +1 -1
- package/InputField/cjs/index.production.v2.js +1 -1
- package/InputField/package.json +5 -2
- package/KeyPress/package.json +1 -1
- package/Label/package.json +1 -1
- package/Line/package.json +1 -1
- package/Link/package.json +1 -1
- package/List/package.json +1 -1
- package/Media/cjs/index.development.js +7 -54
- package/Media/cjs/index.development.v2.js +7 -54
- package/Media/cjs/index.production.js +1 -1
- package/Media/cjs/index.production.v2.js +1 -1
- package/Media/package.json +2 -1
- package/Modal/cjs/index.development.js +28 -98
- package/Modal/cjs/index.development.v2.js +28 -98
- package/Modal/cjs/index.production.js +1 -1
- package/Modal/cjs/index.production.v2.js +1 -1
- package/Modal/package.json +2 -1
- package/OutsideClick/cjs/index.development.js +27 -97
- package/OutsideClick/cjs/index.development.v2.js +27 -97
- package/OutsideClick/cjs/index.production.js +1 -1
- package/OutsideClick/cjs/index.production.v2.js +1 -1
- package/OutsideClick/package.json +5 -2
- package/Overlay/cjs/index.development.js +37 -134
- package/Overlay/cjs/index.development.v2.js +37 -134
- package/Overlay/cjs/index.production.js +1 -1
- package/Overlay/cjs/index.production.v2.js +1 -1
- package/Overlay/package.json +2 -1
- package/PhotoGallery/cjs/index.development.js +23 -82
- package/PhotoGallery/cjs/index.development.v2.js +23 -82
- package/PhotoGallery/cjs/index.production.js +1 -1
- package/PhotoGallery/cjs/index.production.v2.js +1 -1
- package/PhotoGallery/package.json +2 -1
- package/Picture/package.json +1 -1
- package/Portal/package.json +1 -1
- package/Progress/cjs/index.development.js +25 -90
- package/Progress/cjs/index.development.v2.js +25 -90
- package/Progress/cjs/index.production.js +1 -1
- package/Progress/cjs/index.production.v2.js +1 -1
- package/Progress/package.json +2 -1
- package/QRCode/package.json +1 -1
- package/Rating/cjs/index.development.js +20 -46
- package/Rating/cjs/index.development.v2.js +20 -46
- package/Rating/cjs/index.production.js +1 -1
- package/Rating/cjs/index.production.v2.js +1 -1
- package/Rating/package.json +2 -1
- package/RatingSelect/cjs/index.development.js +24 -109
- package/RatingSelect/cjs/index.development.v2.js +24 -109
- package/RatingSelect/cjs/index.production.js +1 -1
- package/RatingSelect/cjs/index.production.v2.js +1 -1
- package/RatingSelect/package.json +2 -1
- package/Scroll/package.json +1 -1
- package/ScrollControls/cjs/index.development.js +32 -129
- package/ScrollControls/cjs/index.development.v2.js +32 -129
- package/ScrollControls/cjs/index.production.js +1 -1
- package/ScrollControls/cjs/index.production.v2.js +1 -1
- package/ScrollControls/package.json +2 -1
- package/SimpleSlider/cjs/index.development.js +37 -153
- package/SimpleSlider/cjs/index.development.v2.js +37 -153
- package/SimpleSlider/cjs/index.production.js +1 -1
- package/SimpleSlider/cjs/index.production.v2.js +1 -1
- package/SimpleSlider/package.json +2 -1
- package/Skeleton/cjs/index.development.js +27 -90
- package/Skeleton/cjs/index.development.v2.js +27 -90
- package/Skeleton/cjs/index.production.js +1 -1
- package/Skeleton/cjs/index.production.v2.js +1 -1
- package/Skeleton/package.json +2 -1
- package/SnackBar/cjs/index.development.js +25 -90
- package/SnackBar/cjs/index.development.v2.js +25 -90
- package/SnackBar/cjs/index.production.js +1 -1
- package/SnackBar/cjs/index.production.v2.js +1 -1
- package/SnackBar/package.json +2 -1
- package/SnackBarManager/cjs/index.development.js +29 -120
- package/SnackBarManager/cjs/index.development.v2.js +29 -120
- package/SnackBarManager/cjs/index.production.js +1 -1
- package/SnackBarManager/cjs/index.production.v2.js +1 -1
- package/SnackBarManager/package.json +5 -2
- package/Spinner/cjs/index.development.js +22 -46
- package/Spinner/cjs/index.development.v2.js +22 -46
- package/Spinner/cjs/index.production.js +1 -1
- package/Spinner/cjs/index.production.v2.js +1 -1
- package/Spinner/package.json +2 -1
- package/Text/package.json +1 -1
- package/TextEmoji/cjs/index.development.js +22 -46
- package/TextEmoji/cjs/index.development.v2.js +22 -46
- package/TextEmoji/cjs/index.production.js +1 -1
- package/TextEmoji/cjs/index.production.v2.js +1 -1
- package/TextEmoji/package.json +2 -1
- package/Tooltip/cjs/index.development.js +17 -25
- package/Tooltip/cjs/index.development.v2.js +17 -25
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/package.json +2 -1
- package/Tumbler/cjs/index.development.js +23 -69
- package/Tumbler/cjs/index.development.v2.js +23 -69
- package/Tumbler/cjs/index.production.js +1 -1
- package/Tumbler/cjs/index.production.v2.js +1 -1
- package/Tumbler/package.json +2 -1
- package/Viewport/cjs/index.development.js +23 -47
- package/Viewport/cjs/index.development.v2.js +23 -47
- package/Viewport/cjs/index.production.js +1 -1
- package/Viewport/cjs/index.production.v2.js +1 -1
- package/Viewport/package.json +5 -2
- package/package.json +3 -2
- package/useBodyTTag/package.json +1 -1
- package/useBrowserLayoutEffect/package.json +1 -1
- package/useDebounce/cjs/index.development.js +5 -49
- package/useDebounce/cjs/index.development.v2.js +5 -49
- package/useDebounce/cjs/index.production.js +1 -1
- package/useDebounce/cjs/index.production.v2.js +1 -1
- package/useDebounce/package.json +5 -2
- package/useForwardRef/package.json +1 -1
- package/useInView/package.json +1 -1
- package/useIsMounted/package.json +1 -1
- package/useKeyPress/cjs/index.development.js +19 -64
- package/useKeyPress/cjs/index.development.v2.js +19 -64
- package/useKeyPress/cjs/index.production.js +1 -1
- package/useKeyPress/cjs/index.production.v2.js +1 -1
- package/useKeyPress/package.json +5 -2
- package/useMedia/package.json +1 -1
- package/useOutsideClick/package.json +1 -1
- package/usePortal/package.json +1 -1
- package/useScrollPosition/package.json +1 -1
- package/useSnackBar/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/extends"),t=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("react"),C=require("clsx");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function L(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 C=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,C.get?C:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=a(e),n=a(t),o=L(r),c=a(C),i="aJlm0",u=["value","percent","size","theme","className"],s=o.forwardRef((function(e,t){var r=e.value,C=void 0===r?0:r,a=e.percent,L=void 0===a?0:a,s=e.size,f=void 0===s?18:s,d=e.theme,p=void 0===d?"violet-500":d,b=e.className,v=n.default(e,u),m=Math.round(L>0?L:C/5*100),h=o.useId(),j=f;return"small"===f?j=14:"default"===f?j=18:"big"===f&&(j=22),o.createElement("svg",l.default({className:c.default(i,b),height:j},v,{ref:t,viewBox:"0 0 120 24",tabIndex:-1,focusable:!1}),o.createElement("defs",null,o.createElement("linearGradient",{id:h},o.createElement("stop",{offset:"".concat(m,"%"),stopColor:"var(--".concat(p,")")}),o.createElement("stop",{offset:"".concat(m,"%"),stopColor:"var(--black-400)"}))),o.createElement("path",{fill:"url(#".concat(h,")"),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"}))}));s.displayName="Rating",exports.Rating=s,require("./style.production.v2.css");
|
package/Rating/package.json
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
8
|
var React = require('react');
|
|
6
9
|
var classNames = require('clsx');
|
|
7
10
|
var useIsMounted = require('@prom-ui/core/useIsMounted');
|
|
@@ -10,117 +13,29 @@ var StarFill = require('@prom-ui/icons/StarFill');
|
|
|
10
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
14
|
|
|
12
15
|
function _interopNamespaceCompat(e) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
17
|
+
var n = Object.create(null);
|
|
18
|
+
if (e) {
|
|
19
|
+
Object.keys(e).forEach(function (k) {
|
|
20
|
+
if (k !== 'default') {
|
|
21
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return e[k]; }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
22
27
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
n.default = e;
|
|
27
|
-
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
n.default = e;
|
|
30
|
+
return Object.freeze(n);
|
|
28
31
|
}
|
|
29
32
|
|
|
33
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultCompat(_defineProperty);
|
|
34
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultCompat(_slicedToArray);
|
|
35
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultCompat(_objectWithoutProperties);
|
|
30
36
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
31
37
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
32
38
|
|
|
33
|
-
function _arrayLikeToArray(r, a) {
|
|
34
|
-
(null == a || a > r.length) && (a = r.length);
|
|
35
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
36
|
-
return n;
|
|
37
|
-
}
|
|
38
|
-
function _arrayWithHoles(r) {
|
|
39
|
-
if (Array.isArray(r)) return r;
|
|
40
|
-
}
|
|
41
|
-
function _defineProperty(e, r, t) {
|
|
42
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
43
|
-
value: t,
|
|
44
|
-
enumerable: !0,
|
|
45
|
-
configurable: !0,
|
|
46
|
-
writable: !0
|
|
47
|
-
}) : e[r] = t, e;
|
|
48
|
-
}
|
|
49
|
-
function _iterableToArrayLimit(r, l) {
|
|
50
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
51
|
-
if (null != t) {
|
|
52
|
-
var e,
|
|
53
|
-
n,
|
|
54
|
-
i,
|
|
55
|
-
u,
|
|
56
|
-
a = [],
|
|
57
|
-
f = !0,
|
|
58
|
-
o = !1;
|
|
59
|
-
try {
|
|
60
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
61
|
-
if (Object(t) !== t) return;
|
|
62
|
-
f = !1;
|
|
63
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
64
|
-
} catch (r) {
|
|
65
|
-
o = !0, n = r;
|
|
66
|
-
} finally {
|
|
67
|
-
try {
|
|
68
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
69
|
-
} finally {
|
|
70
|
-
if (o) throw n;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return a;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function _nonIterableRest() {
|
|
77
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
78
|
-
}
|
|
79
|
-
function _objectWithoutProperties(e, t) {
|
|
80
|
-
if (null == e) return {};
|
|
81
|
-
var o,
|
|
82
|
-
r,
|
|
83
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
84
|
-
if (Object.getOwnPropertySymbols) {
|
|
85
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
86
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
87
|
-
}
|
|
88
|
-
return i;
|
|
89
|
-
}
|
|
90
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
91
|
-
if (null == r) return {};
|
|
92
|
-
var t = {};
|
|
93
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
94
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
95
|
-
t[n] = r[n];
|
|
96
|
-
}
|
|
97
|
-
return t;
|
|
98
|
-
}
|
|
99
|
-
function _slicedToArray(r, e) {
|
|
100
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
101
|
-
}
|
|
102
|
-
function _toPrimitive(t, r) {
|
|
103
|
-
if ("object" != typeof t || !t) return t;
|
|
104
|
-
var e = t[Symbol.toPrimitive];
|
|
105
|
-
if (void 0 !== e) {
|
|
106
|
-
var i = e.call(t, r || "default");
|
|
107
|
-
if ("object" != typeof i) return i;
|
|
108
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
109
|
-
}
|
|
110
|
-
return ("string" === r ? String : Number)(t);
|
|
111
|
-
}
|
|
112
|
-
function _toPropertyKey(t) {
|
|
113
|
-
var i = _toPrimitive(t, "string");
|
|
114
|
-
return "symbol" == typeof i ? i : i + "";
|
|
115
|
-
}
|
|
116
|
-
function _unsupportedIterableToArray(r, a) {
|
|
117
|
-
if (r) {
|
|
118
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
119
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
120
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
39
|
var css = {"root":"RatingSelect__root___8RSGF","label":"RatingSelect__label___FF3m3","icon":"RatingSelect__icon___1Zpyt","input":"RatingSelect__input___25gdX","hovered":"RatingSelect__hovered___DscdS"};
|
|
125
40
|
|
|
126
41
|
var _excluded = ["value", "name", "onChange", "onHover", "size", "disabled"];
|
|
@@ -133,15 +48,15 @@ var RatingSelect = function RatingSelect(_ref) {
|
|
|
133
48
|
_ref$size = _ref.size,
|
|
134
49
|
size = _ref$size === void 0 ? 18 : _ref$size,
|
|
135
50
|
disabled = _ref.disabled,
|
|
136
|
-
props =
|
|
51
|
+
props = _objectWithoutProperties__default.default(_ref, _excluded);
|
|
137
52
|
var isMounted = useIsMounted.useIsMounted();
|
|
138
53
|
var componentId = React__namespace.useId();
|
|
139
54
|
var _React$useState = React__namespace.useState(value),
|
|
140
|
-
_React$useState2 =
|
|
55
|
+
_React$useState2 = _slicedToArray__default.default(_React$useState, 2),
|
|
141
56
|
selectedValue = _React$useState2[0],
|
|
142
57
|
setSelectedValue = _React$useState2[1];
|
|
143
58
|
var _React$useState3 = React__namespace.useState(true),
|
|
144
|
-
_React$useState4 =
|
|
59
|
+
_React$useState4 = _slicedToArray__default.default(_React$useState3, 2),
|
|
145
60
|
isHovered = _React$useState4[0],
|
|
146
61
|
setIsHovered = _React$useState4[1];
|
|
147
62
|
var inputName = name || componentId;
|
|
@@ -180,7 +95,7 @@ var RatingSelect = function RatingSelect(_ref) {
|
|
|
180
95
|
}
|
|
181
96
|
};
|
|
182
97
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
183
|
-
className: classNames__default.default(css.root,
|
|
98
|
+
className: classNames__default.default(css.root, _defineProperty__default.default({}, css.hovered, isHovered)),
|
|
184
99
|
style: {
|
|
185
100
|
fontSize: size
|
|
186
101
|
},
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
8
|
var React = require('react');
|
|
6
9
|
var classNames = require('clsx');
|
|
7
10
|
var useIsMounted = require('@prom-ui/core/useIsMounted');
|
|
@@ -10,117 +13,29 @@ var StarFill = require('@prom-ui/icons/StarFill');
|
|
|
10
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
14
|
|
|
12
15
|
function _interopNamespaceCompat(e) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
17
|
+
var n = Object.create(null);
|
|
18
|
+
if (e) {
|
|
19
|
+
Object.keys(e).forEach(function (k) {
|
|
20
|
+
if (k !== 'default') {
|
|
21
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return e[k]; }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
22
27
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
n.default = e;
|
|
27
|
-
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
n.default = e;
|
|
30
|
+
return Object.freeze(n);
|
|
28
31
|
}
|
|
29
32
|
|
|
33
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultCompat(_defineProperty);
|
|
34
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultCompat(_slicedToArray);
|
|
35
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultCompat(_objectWithoutProperties);
|
|
30
36
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
31
37
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
32
38
|
|
|
33
|
-
function _arrayLikeToArray(r, a) {
|
|
34
|
-
(null == a || a > r.length) && (a = r.length);
|
|
35
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
36
|
-
return n;
|
|
37
|
-
}
|
|
38
|
-
function _arrayWithHoles(r) {
|
|
39
|
-
if (Array.isArray(r)) return r;
|
|
40
|
-
}
|
|
41
|
-
function _defineProperty(e, r, t) {
|
|
42
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
43
|
-
value: t,
|
|
44
|
-
enumerable: !0,
|
|
45
|
-
configurable: !0,
|
|
46
|
-
writable: !0
|
|
47
|
-
}) : e[r] = t, e;
|
|
48
|
-
}
|
|
49
|
-
function _iterableToArrayLimit(r, l) {
|
|
50
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
51
|
-
if (null != t) {
|
|
52
|
-
var e,
|
|
53
|
-
n,
|
|
54
|
-
i,
|
|
55
|
-
u,
|
|
56
|
-
a = [],
|
|
57
|
-
f = !0,
|
|
58
|
-
o = !1;
|
|
59
|
-
try {
|
|
60
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
61
|
-
if (Object(t) !== t) return;
|
|
62
|
-
f = !1;
|
|
63
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
64
|
-
} catch (r) {
|
|
65
|
-
o = !0, n = r;
|
|
66
|
-
} finally {
|
|
67
|
-
try {
|
|
68
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
69
|
-
} finally {
|
|
70
|
-
if (o) throw n;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return a;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function _nonIterableRest() {
|
|
77
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
78
|
-
}
|
|
79
|
-
function _objectWithoutProperties(e, t) {
|
|
80
|
-
if (null == e) return {};
|
|
81
|
-
var o,
|
|
82
|
-
r,
|
|
83
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
84
|
-
if (Object.getOwnPropertySymbols) {
|
|
85
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
86
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
87
|
-
}
|
|
88
|
-
return i;
|
|
89
|
-
}
|
|
90
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
91
|
-
if (null == r) return {};
|
|
92
|
-
var t = {};
|
|
93
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
94
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
95
|
-
t[n] = r[n];
|
|
96
|
-
}
|
|
97
|
-
return t;
|
|
98
|
-
}
|
|
99
|
-
function _slicedToArray(r, e) {
|
|
100
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
101
|
-
}
|
|
102
|
-
function _toPrimitive(t, r) {
|
|
103
|
-
if ("object" != typeof t || !t) return t;
|
|
104
|
-
var e = t[Symbol.toPrimitive];
|
|
105
|
-
if (void 0 !== e) {
|
|
106
|
-
var i = e.call(t, r || "default");
|
|
107
|
-
if ("object" != typeof i) return i;
|
|
108
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
109
|
-
}
|
|
110
|
-
return ("string" === r ? String : Number)(t);
|
|
111
|
-
}
|
|
112
|
-
function _toPropertyKey(t) {
|
|
113
|
-
var i = _toPrimitive(t, "string");
|
|
114
|
-
return "symbol" == typeof i ? i : i + "";
|
|
115
|
-
}
|
|
116
|
-
function _unsupportedIterableToArray(r, a) {
|
|
117
|
-
if (r) {
|
|
118
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
119
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
120
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
39
|
var css = {"root":"RatingSelect__root___V-LdE","label":"RatingSelect__label___sgjOY","icon":"RatingSelect__icon___FTT2B","input":"RatingSelect__input___DxUIq","hovered":"RatingSelect__hovered___LD2kV"};
|
|
125
40
|
|
|
126
41
|
var _excluded = ["value", "name", "onChange", "onHover", "size", "disabled"];
|
|
@@ -133,15 +48,15 @@ var RatingSelect = function RatingSelect(_ref) {
|
|
|
133
48
|
_ref$size = _ref.size,
|
|
134
49
|
size = _ref$size === void 0 ? 18 : _ref$size,
|
|
135
50
|
disabled = _ref.disabled,
|
|
136
|
-
props =
|
|
51
|
+
props = _objectWithoutProperties__default.default(_ref, _excluded);
|
|
137
52
|
var isMounted = useIsMounted.useIsMounted();
|
|
138
53
|
var componentId = React__namespace.useId();
|
|
139
54
|
var _React$useState = React__namespace.useState(value),
|
|
140
|
-
_React$useState2 =
|
|
55
|
+
_React$useState2 = _slicedToArray__default.default(_React$useState, 2),
|
|
141
56
|
selectedValue = _React$useState2[0],
|
|
142
57
|
setSelectedValue = _React$useState2[1];
|
|
143
58
|
var _React$useState3 = React__namespace.useState(true),
|
|
144
|
-
_React$useState4 =
|
|
59
|
+
_React$useState4 = _slicedToArray__default.default(_React$useState3, 2),
|
|
145
60
|
isHovered = _React$useState4[0],
|
|
146
61
|
setIsHovered = _React$useState4[1];
|
|
147
62
|
var inputName = name || componentId;
|
|
@@ -180,7 +95,7 @@ var RatingSelect = function RatingSelect(_ref) {
|
|
|
180
95
|
}
|
|
181
96
|
};
|
|
182
97
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
183
|
-
className: classNames__default.default(css.root,
|
|
98
|
+
className: classNames__default.default(css.root, _defineProperty__default.default({}, css.hovered, isHovered)),
|
|
184
99
|
style: {
|
|
185
100
|
fontSize: size
|
|
186
101
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),n=require("@babel/runtime/helpers/objectWithoutProperties"),a=require("react"),r=require("clsx"),i=require("@prom-ui/core/useIsMounted"),u=require("@prom-ui/icons/StarFill");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var l=c(e),s=c(t),d=c(n),f=o(a),p=c(r),b="_8RSGF",m="FF3m3",v="_1Zpyt",_="_25gdX",y="DscdS",g=["value","name","onChange","onHover","size","disabled"],q=[1,2,3,4,5],h=function(e){var t=e.value,n=e.name,a=e.onChange,r=e.onHover,c=e.size,o=void 0===c?18:c,h=e.disabled,S=d.default(e,g),j=i.useIsMounted(),E=f.useId(),O=f.useState(t),F=s.default(O,2),k=F[0],M=F[1],N=f.useState(!0),P=s.default(N,2),z=P[0],C=P[1],x=n||E;f.useEffect((function(){j&&"function"==typeof a&&a(k)}),[k]),f.useEffect((function(){t!==k&&M(t)}),[t]);return f.createElement("div",{className:p.default(b,l.default({},y,z)),style:{fontSize:o},onMouseLeave:function(){"function"==typeof r&&r(void 0)},"data-qaid":S["data-qaid"]||"rating_select","data-testid":S["data-testid"]||"rating_select"},q.map((function(e){var t="".concat(x,"-").concat(e);return f.createElement("input",{key:e,id:t,className:_,type:"radio",name:x,value:e,checked:k===e,onChange:function(){return function(e){C(!1),M(e)}(e)},disabled:h,"data-qaid":"rating_select_input_".concat(e),"data-testid":"rating_select_input_".concat(e)})})),q.map((function(e){var t="".concat(x,"-").concat(e);return f.createElement("label",{key:e,className:m,htmlFor:t,onClick:function(t){return function(e,t){C(!1),h||k!==e||(null==t||t.preventDefault(),M(void 0))}(e,t)},onMouseEnter:function(){return function(e){z||C(!0),"function"==typeof r&&r(e)}(e)},"data-qaid":"rating_select_label_".concat(e),"data-testid":"rating_select_label_".concat(e)},f.createElement(u.SvgStarFill,{className:v,focusable:!1,"aria-hidden":!0}))})))};h.displayName="RatingSelect",exports.RatingSelect=h,require("./style.production.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),n=require("@babel/runtime/helpers/objectWithoutProperties"),a=require("react"),r=require("clsx"),i=require("@prom-ui/core/useIsMounted"),u=require("@prom-ui/icons/StarFill");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var l=c(e),s=c(t),d=c(n),f=o(a),p=c(r),b="V-LdE",m="sgjOY",v="FTT2B",y="DxUIq",g="LD2kV",_=["value","name","onChange","onHover","size","disabled"],q=[1,2,3,4,5],h=function(e){var t=e.value,n=e.name,a=e.onChange,r=e.onHover,c=e.size,o=void 0===c?18:c,h=e.disabled,j=d.default(e,_),E=i.useIsMounted(),O=f.useId(),S=f.useState(t),k=s.default(S,2),M=k[0],N=k[1],P=f.useState(!0),x=s.default(P,2),z=x[0],C=x[1],D=n||O;f.useEffect((function(){E&&"function"==typeof a&&a(M)}),[M]),f.useEffect((function(){t!==M&&N(t)}),[t]);return f.createElement("div",{className:p.default(b,l.default({},g,z)),style:{fontSize:o},onMouseLeave:function(){"function"==typeof r&&r(void 0)},"data-qaid":j["data-qaid"]||"rating_select","data-testid":j["data-testid"]||"rating_select"},q.map((function(e){var t="".concat(D,"-").concat(e);return f.createElement("input",{key:e,id:t,className:y,type:"radio",name:D,value:e,checked:M===e,onChange:function(){return function(e){C(!1),N(e)}(e)},disabled:h,"data-qaid":"rating_select_input_".concat(e),"data-testid":"rating_select_input_".concat(e)})})),q.map((function(e){var t="".concat(D,"-").concat(e);return f.createElement("label",{key:e,className:m,htmlFor:t,onClick:function(t){return function(e,t){C(!1),h||M!==e||(null==t||t.preventDefault(),N(void 0))}(e,t)},onMouseEnter:function(){return function(e){z||C(!0),"function"==typeof r&&r(e)}(e)},"data-qaid":"rating_select_label_".concat(e),"data-testid":"rating_select_label_".concat(e)},f.createElement(u.SvgStarFill,{className:v,focusable:!1,"aria-hidden":!0}))})))};h.displayName="RatingSelect",exports.RatingSelect=h,require("./style.production.v2.css");
|