@prom-ui/core 1.19.1 → 2.0.0-alpha.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 +40 -59
- package/Avatar/cjs/index.development.v2.js +40 -59
- package/Avatar/cjs/index.production.js +1 -1
- package/Avatar/cjs/index.production.v2.js +1 -1
- package/Avatar/package.json +1 -1
- package/Backdrop/cjs/index.development.js +62 -77
- package/Backdrop/cjs/index.development.v2.js +62 -77
- package/Backdrop/cjs/index.production.js +1 -1
- package/Backdrop/cjs/index.production.v2.js +1 -1
- package/Backdrop/package.json +1 -1
- package/Badge/cjs/index.development.js +39 -57
- package/Badge/cjs/index.development.v2.js +39 -57
- package/Badge/cjs/index.production.js +1 -1
- package/Badge/cjs/index.production.v2.js +1 -1
- package/Badge/index.d.ts +5 -5
- package/Badge/package.json +1 -1
- package/Body/package.json +1 -1
- package/BodyContext/cjs/index.development.js +0 -21
- package/BodyContext/cjs/index.development.v2.js +0 -21
- package/BodyContext/cjs/index.production.js +1 -1
- package/BodyContext/cjs/index.production.v2.js +1 -1
- package/BodyContext/index.d.ts +0 -7
- package/BodyContext/package.json +1 -1
- package/BodyProvider/cjs/index.development.js +3 -6
- package/BodyProvider/cjs/index.development.v2.js +3 -6
- package/BodyProvider/cjs/index.production.js +1 -1
- package/BodyProvider/cjs/index.production.v2.js +1 -1
- package/BodyProvider/index.d.ts +0 -3
- package/BodyProvider/package.json +1 -1
- package/BodyScrollLock/cjs/index.development.js +1 -0
- package/BodyScrollLock/cjs/index.development.v2.js +1 -0
- package/BodyScrollLock/package.json +1 -1
- package/Box/package.json +1 -1
- package/Button/cjs/index.development.js +23 -34
- package/Button/cjs/index.development.v2.js +23 -34
- package/Button/cjs/index.production.js +1 -1
- package/Button/cjs/index.production.v2.js +1 -1
- package/Button/package.json +1 -1
- package/ButtonPageUp/cjs/index.development.js +100 -122
- package/ButtonPageUp/cjs/index.development.v2.js +100 -122
- package/ButtonPageUp/cjs/index.production.js +1 -1
- package/ButtonPageUp/cjs/index.production.v2.js +1 -1
- package/ButtonPageUp/index.d.ts +1 -1
- package/ButtonPageUp/package.json +1 -1
- package/Checkbox/cjs/index.development.js +43 -59
- package/Checkbox/cjs/index.development.v2.js +43 -59
- package/Checkbox/cjs/index.production.js +1 -1
- package/Checkbox/cjs/index.production.v2.js +1 -1
- package/Checkbox/package.json +1 -1
- package/ContextMenu/cjs/index.development.js +72 -86
- package/ContextMenu/cjs/index.development.v2.js +72 -86
- package/ContextMenu/cjs/index.production.js +1 -1
- package/ContextMenu/cjs/index.production.v2.js +1 -1
- package/ContextMenu/package.json +1 -1
- package/ErrorCatch/cjs/index.development.js +115 -160
- package/ErrorCatch/cjs/index.development.v2.js +115 -160
- package/ErrorCatch/cjs/index.production.js +1 -1
- package/ErrorCatch/cjs/index.production.v2.js +1 -1
- package/ErrorCatch/package.json +1 -1
- package/ErrorCatch/utils.d.ts +0 -2
- package/ErrorCatch/withErrorCatch.d.ts +1 -1
- 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 +24 -34
- package/ImageEmoji/cjs/index.development.v2.js +24 -34
- package/ImageEmoji/cjs/index.production.js +1 -1
- package/ImageEmoji/cjs/index.production.v2.js +1 -1
- package/ImageEmoji/package.json +1 -1
- package/Input/package.json +1 -1
- package/InputField/cjs/index.development.js +71 -101
- package/InputField/cjs/index.development.v2.js +71 -101
- package/InputField/cjs/index.production.js +1 -1
- package/InputField/cjs/index.production.v2.js +1 -1
- package/InputField/package.json +1 -1
- package/InputField/utils.d.ts +0 -1
- package/KeyPress/package.json +1 -1
- package/Label/cjs/index.development.js +2 -0
- package/Label/cjs/index.development.v2.js +2 -0
- 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 +37 -38
- package/Media/cjs/index.development.v2.js +37 -38
- package/Media/cjs/index.production.js +1 -1
- package/Media/cjs/index.production.v2.js +1 -1
- package/Media/index.d.ts +1 -1
- package/Media/package.json +1 -1
- package/Modal/cjs/index.development.js +64 -82
- package/Modal/cjs/index.development.v2.js +64 -82
- package/Modal/cjs/index.production.js +1 -1
- package/Modal/cjs/index.production.v2.js +1 -1
- package/Modal/package.json +1 -1
- package/OutsideClick/cjs/index.development.js +62 -75
- package/OutsideClick/cjs/index.development.v2.js +62 -75
- package/OutsideClick/cjs/index.production.js +1 -1
- package/OutsideClick/cjs/index.production.v2.js +1 -1
- package/OutsideClick/package.json +1 -1
- package/Overlay/cjs/index.development.js +94 -110
- package/Overlay/cjs/index.development.v2.js +94 -110
- package/Overlay/cjs/index.production.js +1 -1
- package/Overlay/cjs/index.production.v2.js +1 -1
- package/Overlay/components/OverlayErrCatch.d.ts +1 -1
- package/Overlay/components/SwipeClose.d.ts +3 -3
- package/Overlay/index.d.ts +1 -1
- package/Overlay/package.json +1 -1
- package/PhotoGallery/cjs/index.development.js +78 -75
- package/PhotoGallery/cjs/index.development.v2.js +78 -75
- package/PhotoGallery/cjs/index.production.js +1 -1
- package/PhotoGallery/cjs/index.production.v2.js +1 -1
- package/PhotoGallery/package.json +1 -1
- package/PhotoGallery/utils.d.ts +1 -1
- package/Picture/package.json +1 -1
- package/Portal/index.d.ts +1 -1
- package/Portal/package.json +1 -1
- package/Progress/cjs/index.development.js +58 -76
- package/Progress/cjs/index.development.v2.js +58 -76
- package/Progress/cjs/index.production.js +1 -1
- package/Progress/cjs/index.production.v2.js +1 -1
- package/Progress/package.json +1 -1
- package/QRCode/package.json +1 -1
- package/Rating/cjs/index.development.js +23 -36
- package/Rating/cjs/index.development.v2.js +23 -36
- package/Rating/cjs/index.production.js +1 -1
- package/Rating/cjs/index.production.v2.js +1 -1
- package/Rating/package.json +1 -1
- package/RatingSelect/cjs/index.development.js +74 -89
- package/RatingSelect/cjs/index.development.v2.js +74 -89
- package/RatingSelect/cjs/index.production.js +1 -1
- package/RatingSelect/cjs/index.production.v2.js +1 -1
- package/RatingSelect/package.json +1 -1
- package/Scroll/package.json +1 -1
- package/ScrollControls/ScrollControlsButton.d.ts +1 -1
- package/ScrollControls/cjs/index.development.js +86 -108
- package/ScrollControls/cjs/index.development.v2.js +86 -108
- package/ScrollControls/cjs/index.production.js +1 -1
- package/ScrollControls/cjs/index.production.v2.js +1 -1
- package/ScrollControls/index.d.ts +1 -1
- package/ScrollControls/package.json +1 -1
- package/SimpleSlider/cjs/index.development.js +112 -133
- package/SimpleSlider/cjs/index.development.v2.js +112 -133
- package/SimpleSlider/cjs/index.production.js +1 -1
- package/SimpleSlider/cjs/index.production.v2.js +1 -1
- package/SimpleSlider/index.d.ts +0 -1
- package/SimpleSlider/package.json +1 -2
- package/SimpleSlider/utils.d.ts +1 -1
- package/Skeleton/cjs/index.development.js +58 -76
- package/Skeleton/cjs/index.development.v2.js +58 -76
- package/Skeleton/cjs/index.production.js +1 -1
- package/Skeleton/cjs/index.production.v2.js +1 -1
- package/Skeleton/index.d.ts +6 -6
- package/Skeleton/package.json +1 -1
- package/SnackBar/cjs/index.development.js +62 -77
- package/SnackBar/cjs/index.development.v2.js +62 -77
- package/SnackBar/cjs/index.production.js +1 -1
- package/SnackBar/cjs/index.production.v2.js +1 -1
- package/SnackBar/index.d.ts +8 -8
- package/SnackBar/package.json +1 -1
- package/SnackBarManager/cjs/index.development.js +81 -93
- package/SnackBarManager/cjs/index.development.v2.js +81 -93
- package/SnackBarManager/cjs/index.production.js +1 -1
- package/SnackBarManager/cjs/index.production.v2.js +1 -1
- package/SnackBarManager/package.json +1 -1
- package/Spinner/cjs/index.development.js +22 -34
- package/Spinner/cjs/index.development.v2.js +22 -34
- package/Spinner/cjs/index.production.js +1 -1
- package/Spinner/cjs/index.production.v2.js +1 -1
- package/Spinner/index.d.ts +3 -3
- package/Spinner/package.json +1 -1
- package/Text/package.json +1 -1
- package/TextEmoji/cjs/index.development.js +22 -34
- package/TextEmoji/cjs/index.development.v2.js +22 -34
- package/TextEmoji/cjs/index.production.js +1 -1
- package/TextEmoji/cjs/index.production.v2.js +1 -1
- package/TextEmoji/package.json +1 -1
- package/Tooltip/cjs/index.development.js +12 -12
- package/Tooltip/cjs/index.development.v2.js +12 -12
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/package.json +1 -1
- package/Tumbler/cjs/index.development.js +42 -57
- package/Tumbler/cjs/index.development.v2.js +42 -57
- package/Tumbler/cjs/index.production.js +1 -1
- package/Tumbler/cjs/index.production.v2.js +1 -1
- package/Tumbler/package.json +1 -1
- package/Viewport/cjs/index.development.js +22 -34
- package/Viewport/cjs/index.development.v2.js +22 -34
- package/Viewport/cjs/index.production.js +1 -1
- package/Viewport/cjs/index.production.v2.js +1 -1
- package/Viewport/package.json +1 -1
- package/base/types.d.ts +1 -1
- package/package.json +6 -15
- package/useBodyTTag/package.json +1 -1
- package/useBrowserLayoutEffect/package.json +1 -1
- package/useDebounce/cjs/index.development.js +37 -39
- package/useDebounce/cjs/index.development.v2.js +37 -39
- package/useDebounce/cjs/index.production.js +1 -1
- package/useDebounce/cjs/index.production.v2.js +1 -1
- package/useDebounce/index.d.ts +1 -1
- package/useDebounce/package.json +1 -1
- package/useForwardRef/index.d.ts +1 -1
- package/useForwardRef/package.json +1 -1
- package/useInView/cjs/index.development.js +0 -1
- package/useInView/cjs/index.development.v2.js +0 -1
- package/useInView/cjs/index.production.js +1 -1
- package/useInView/cjs/index.production.v2.js +1 -1
- package/useInView/index.d.ts +0 -1
- package/useInView/package.json +1 -2
- package/useIsMounted/package.json +1 -1
- package/useKeyPress/cjs/index.development.js +47 -40
- package/useKeyPress/cjs/index.development.v2.js +47 -40
- package/useKeyPress/cjs/index.production.js +1 -1
- package/useKeyPress/cjs/index.production.v2.js +1 -1
- package/useKeyPress/package.json +1 -1
- package/useMedia/package.json +1 -1
- package/useOutsideClick/package.json +1 -1
- package/usePortal/cjs/index.development.js +1 -1
- package/usePortal/cjs/index.development.v2.js +1 -1
- package/usePortal/cjs/index.production.js +1 -1
- package/usePortal/cjs/index.production.v2.js +1 -1
- package/usePortal/package.json +1 -1
- package/useScrollPosition/package.json +1 -1
- package/useSnackBar/package.json +1 -1
- package/SafeQuery/cjs/index.development.js +0 -73
- package/SafeQuery/cjs/index.development.v2.js +0 -73
- package/SafeQuery/cjs/index.production.js +0 -1
- package/SafeQuery/cjs/index.production.v2.js +0 -1
- package/SafeQuery/index.d.ts +0 -10
- package/SafeQuery/index.js +0 -7
- package/SafeQuery/index.v2.js +0 -7
- package/SafeQuery/package.json +0 -9
- package/useId/cjs/index.development.js +0 -43
- package/useId/cjs/index.development.v2.js +0 -43
- package/useId/cjs/index.production.js +0 -1
- package/useId/cjs/index.production.v2.js +0 -1
- package/useId/index.d.ts +0 -4
- package/useId/index.js +0 -7
- package/useId/index.v2.js +0 -7
- package/useId/package.json +0 -9
|
@@ -30,74 +30,56 @@ function _interopNamespaceCompat(e) {
|
|
|
30
30
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
31
31
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
32
32
|
|
|
33
|
-
function _defineProperty(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
writable: true
|
|
41
|
-
});
|
|
42
|
-
} else {
|
|
43
|
-
obj[key] = value;
|
|
44
|
-
}
|
|
45
|
-
return obj;
|
|
33
|
+
function _defineProperty(e, r, t) {
|
|
34
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
35
|
+
value: t,
|
|
36
|
+
enumerable: !0,
|
|
37
|
+
configurable: !0,
|
|
38
|
+
writable: !0
|
|
39
|
+
}) : e[r] = t, e;
|
|
46
40
|
}
|
|
47
41
|
function _extends() {
|
|
48
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
49
|
-
for (var
|
|
50
|
-
var
|
|
51
|
-
for (var
|
|
52
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
53
|
-
target[key] = source[key];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
42
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
43
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
44
|
+
var t = arguments[e];
|
|
45
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
56
46
|
}
|
|
57
|
-
return
|
|
58
|
-
};
|
|
59
|
-
return _extends.apply(this, arguments);
|
|
47
|
+
return n;
|
|
48
|
+
}, _extends.apply(null, arguments);
|
|
60
49
|
}
|
|
61
|
-
function
|
|
62
|
-
if (
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
target[key] = source[key];
|
|
50
|
+
function _objectWithoutProperties(e, t) {
|
|
51
|
+
if (null == e) return {};
|
|
52
|
+
var o,
|
|
53
|
+
r,
|
|
54
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
55
|
+
if (Object.getOwnPropertySymbols) {
|
|
56
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
57
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
70
58
|
}
|
|
71
|
-
return
|
|
59
|
+
return i;
|
|
72
60
|
}
|
|
73
|
-
function
|
|
74
|
-
if (
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
80
|
-
key = sourceSymbolKeys[i];
|
|
81
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
82
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
83
|
-
target[key] = source[key];
|
|
84
|
-
}
|
|
61
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
62
|
+
if (null == r) return {};
|
|
63
|
+
var t = {};
|
|
64
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
65
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
66
|
+
t[n] = r[n];
|
|
85
67
|
}
|
|
86
|
-
return
|
|
68
|
+
return t;
|
|
87
69
|
}
|
|
88
|
-
function _toPrimitive(
|
|
89
|
-
if (
|
|
90
|
-
var
|
|
91
|
-
if (
|
|
92
|
-
var
|
|
93
|
-
if (
|
|
70
|
+
function _toPrimitive(t, r) {
|
|
71
|
+
if ("object" != typeof t || !t) return t;
|
|
72
|
+
var e = t[Symbol.toPrimitive];
|
|
73
|
+
if (void 0 !== e) {
|
|
74
|
+
var i = e.call(t, r || "default");
|
|
75
|
+
if ("object" != typeof i) return i;
|
|
94
76
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
95
77
|
}
|
|
96
|
-
return (
|
|
78
|
+
return ("string" === r ? String : Number)(t);
|
|
97
79
|
}
|
|
98
|
-
function _toPropertyKey(
|
|
99
|
-
var
|
|
100
|
-
return
|
|
80
|
+
function _toPropertyKey(t) {
|
|
81
|
+
var i = _toPrimitive(t, "string");
|
|
82
|
+
return "symbol" == typeof i ? i : i + "";
|
|
101
83
|
}
|
|
102
84
|
|
|
103
85
|
function stringToColor(string) {
|
|
@@ -124,7 +106,6 @@ var css = {"root":"Avatar__root___ap8QD","image":"Avatar__image___52SeG","text":
|
|
|
124
106
|
|
|
125
107
|
var _excluded = ["image", "name", "size", "loading", "theme", "objectFit", "className"];
|
|
126
108
|
var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
127
|
-
var _classNames;
|
|
128
109
|
var image = _ref.image,
|
|
129
110
|
name = _ref.name,
|
|
130
111
|
_ref$size = _ref.size,
|
|
@@ -148,7 +129,7 @@ var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
148
129
|
shortName = stringAvatar(trimName);
|
|
149
130
|
}
|
|
150
131
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
151
|
-
className: classNames__default.default(css.root, className, (
|
|
132
|
+
className: classNames__default.default(css.root, className, _defineProperty(_defineProperty({}, css["theme_".concat(theme)], !isImage), css["objectFit_".concat(objectFit)], true)),
|
|
152
133
|
"data-qaid": "avatar",
|
|
153
134
|
"data-testid": "avatar"
|
|
154
135
|
}, props, {
|
|
@@ -30,74 +30,56 @@ function _interopNamespaceCompat(e) {
|
|
|
30
30
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
31
31
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
32
32
|
|
|
33
|
-
function _defineProperty(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
writable: true
|
|
41
|
-
});
|
|
42
|
-
} else {
|
|
43
|
-
obj[key] = value;
|
|
44
|
-
}
|
|
45
|
-
return obj;
|
|
33
|
+
function _defineProperty(e, r, t) {
|
|
34
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
35
|
+
value: t,
|
|
36
|
+
enumerable: !0,
|
|
37
|
+
configurable: !0,
|
|
38
|
+
writable: !0
|
|
39
|
+
}) : e[r] = t, e;
|
|
46
40
|
}
|
|
47
41
|
function _extends() {
|
|
48
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
49
|
-
for (var
|
|
50
|
-
var
|
|
51
|
-
for (var
|
|
52
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
53
|
-
target[key] = source[key];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
42
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
43
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
44
|
+
var t = arguments[e];
|
|
45
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
56
46
|
}
|
|
57
|
-
return
|
|
58
|
-
};
|
|
59
|
-
return _extends.apply(this, arguments);
|
|
47
|
+
return n;
|
|
48
|
+
}, _extends.apply(null, arguments);
|
|
60
49
|
}
|
|
61
|
-
function
|
|
62
|
-
if (
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
target[key] = source[key];
|
|
50
|
+
function _objectWithoutProperties(e, t) {
|
|
51
|
+
if (null == e) return {};
|
|
52
|
+
var o,
|
|
53
|
+
r,
|
|
54
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
55
|
+
if (Object.getOwnPropertySymbols) {
|
|
56
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
57
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
70
58
|
}
|
|
71
|
-
return
|
|
59
|
+
return i;
|
|
72
60
|
}
|
|
73
|
-
function
|
|
74
|
-
if (
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
80
|
-
key = sourceSymbolKeys[i];
|
|
81
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
82
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
83
|
-
target[key] = source[key];
|
|
84
|
-
}
|
|
61
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
62
|
+
if (null == r) return {};
|
|
63
|
+
var t = {};
|
|
64
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
65
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
66
|
+
t[n] = r[n];
|
|
85
67
|
}
|
|
86
|
-
return
|
|
68
|
+
return t;
|
|
87
69
|
}
|
|
88
|
-
function _toPrimitive(
|
|
89
|
-
if (
|
|
90
|
-
var
|
|
91
|
-
if (
|
|
92
|
-
var
|
|
93
|
-
if (
|
|
70
|
+
function _toPrimitive(t, r) {
|
|
71
|
+
if ("object" != typeof t || !t) return t;
|
|
72
|
+
var e = t[Symbol.toPrimitive];
|
|
73
|
+
if (void 0 !== e) {
|
|
74
|
+
var i = e.call(t, r || "default");
|
|
75
|
+
if ("object" != typeof i) return i;
|
|
94
76
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
95
77
|
}
|
|
96
|
-
return (
|
|
78
|
+
return ("string" === r ? String : Number)(t);
|
|
97
79
|
}
|
|
98
|
-
function _toPropertyKey(
|
|
99
|
-
var
|
|
100
|
-
return
|
|
80
|
+
function _toPropertyKey(t) {
|
|
81
|
+
var i = _toPrimitive(t, "string");
|
|
82
|
+
return "symbol" == typeof i ? i : i + "";
|
|
101
83
|
}
|
|
102
84
|
|
|
103
85
|
function stringToColor(string) {
|
|
@@ -124,7 +106,6 @@ var css = {"root":"Avatar__root___G2c2y","image":"Avatar__image___A7F5c","text":
|
|
|
124
106
|
|
|
125
107
|
var _excluded = ["image", "name", "size", "loading", "theme", "objectFit", "className"];
|
|
126
108
|
var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
127
|
-
var _classNames;
|
|
128
109
|
var image = _ref.image,
|
|
129
110
|
name = _ref.name,
|
|
130
111
|
_ref$size = _ref.size,
|
|
@@ -148,7 +129,7 @@ var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
148
129
|
shortName = stringAvatar(trimName);
|
|
149
130
|
}
|
|
150
131
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
151
|
-
className: classNames__default.default(css.root, className, (
|
|
132
|
+
className: classNames__default.default(css.root, className, _defineProperty(_defineProperty({}, css["theme_".concat(theme)], !isImage), css["objectFit_".concat(objectFit)], true)),
|
|
152
133
|
"data-qaid": "avatar",
|
|
153
134
|
"data-testid": "avatar"
|
|
154
135
|
}, props, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("clsx"),r=require("@prom-ui/core/Icon"),a=require("@prom-ui/icons/User");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(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 a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=n(e),c=i(t);function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("clsx"),r=require("@prom-ui/core/Icon"),a=require("@prom-ui/icons/User");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(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 a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=n(e),c=i(t);function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},u.apply(null,arguments)}var s={root:"ap8QD",image:"_52SeG",text:"-Fg0p",icon:"-JCN2",theme_white:"VDWp7","theme_black-100":"AQ1tT","theme_violet-300":"yK-3d","theme_yellow-500":"O2My9",theme_multicolor:"xV5U3",objectFit_fill:"MyUzF",objectFit_contain:"Us7n4",objectFit_cover:"fwC58","objectFit_scale-down":"s0abY",objectFit_none:"uABHG"},f=["image","name","size","loading","theme","objectFit","className"],m=o.forwardRef((function(e,t){var i=e.image,n=e.name,m=e.size,d=void 0===m?40:m,v=e.loading,b=void 0===v?"eager":v,g=e.theme,p=void 0===g?"violet-300":g,y=e.objectFit,h=void 0===y?"cover":y,_=e.className,j=function(e,t){if(null==e)return{};var r,a,i=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,f),O=!!i,w=void 0,F=null;if(!O){var P=n?n.trim():"";"multicolor"===p&&(w=function(e){var t,r=0;for(t=0;t<e.length;t+=1)r=e.charCodeAt(t)+((r<<5)-r);var a="#";for(t=0;t<3;t+=1)a+="00".concat((r>>8*t&255).toString(16)).slice(-2);return a}(P)),F=function(e){return e.split(" ").slice(0,2).map((function(e){return e[0]})).join("")}(P)}return o.createElement("div",u({className:c.default(s.root,_,l(l({},s["theme_".concat(p)],!O),s["objectFit_".concat(h)],!0)),"data-qaid":"avatar","data-testid":"avatar"},j,{style:{background:w,width:d,height:d,fontSize:d/2.2},ref:t}),O?o.createElement("img",{className:s.image,src:i,alt:n,width:d,height:d,loading:b,"data-qaid":"avatar_image","data-testid":"avatar_image"}):o.createElement(o.Fragment,null,F?o.createElement("span",{className:s.text,"data-qaid":"avatar_short_name","data-testid":"avatar_short_name"},F):o.createElement(r.Icon,{className:s.icon,"icon-as":a.SvgUser,"data-qaid":"avatar_user_icon","data-testid":"avatar_user_icon"})))}));m.displayName="Avatar",exports.Avatar=m,require("./style.production.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("clsx"),r=require("@prom-ui/core/Icon"),a=require("@prom-ui/icons/User");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(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 a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=n(e),c=i(t);function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("clsx"),r=require("@prom-ui/core/Icon"),a=require("@prom-ui/icons/User");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(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 a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=n(e),c=i(t);function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},u.apply(null,arguments)}var f={root:"G2c2y",image:"A7F5c",text:"ZWoLT",icon:"sQ5M9",theme_white:"alKXP","theme_black-100":"mN0Ch","theme_violet-300":"MEUSj","theme_yellow-500":"lfsbh",theme_multicolor:"zMJTY",objectFit_fill:"SpfXf",objectFit_contain:"XuTkK",objectFit_cover:"aNZ54","objectFit_scale-down":"FacDj",objectFit_none:"maThn"},s=["image","name","size","loading","theme","objectFit","className"],m=o.forwardRef((function(e,t){var i=e.image,n=e.name,m=e.size,d=void 0===m?40:m,v=e.loading,b=void 0===v?"eager":v,g=e.theme,p=void 0===g?"violet-300":g,h=e.objectFit,j=void 0===h?"cover":h,y=e.className,_=function(e,t){if(null==e)return{};var r,a,i=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,s),O=!!i,w=void 0,F=null;if(!O){var P=n?n.trim():"";"multicolor"===p&&(w=function(e){var t,r=0;for(t=0;t<e.length;t+=1)r=e.charCodeAt(t)+((r<<5)-r);var a="#";for(t=0;t<3;t+=1)a+="00".concat((r>>8*t&255).toString(16)).slice(-2);return a}(P)),F=function(e){return e.split(" ").slice(0,2).map((function(e){return e[0]})).join("")}(P)}return o.createElement("div",u({className:c.default(f.root,y,l(l({},f["theme_".concat(p)],!O),f["objectFit_".concat(j)],!0)),"data-qaid":"avatar","data-testid":"avatar"},_,{style:{background:w,width:d,height:d,fontSize:d/2.2},ref:t}),O?o.createElement("img",{className:f.image,src:i,alt:n,width:d,height:d,loading:b,"data-qaid":"avatar_image","data-testid":"avatar_image"}):o.createElement(o.Fragment,null,F?o.createElement("span",{className:f.text,"data-qaid":"avatar_short_name","data-testid":"avatar_short_name"},F):o.createElement(r.Icon,{className:f.icon,"icon-as":a.SvgUser,"data-qaid":"avatar_user_icon","data-testid":"avatar_user_icon"})))}));m.displayName="Avatar",exports.Avatar=m,require("./style.production.v2.css");
|
package/Avatar/package.json
CHANGED
|
@@ -7,6 +7,7 @@ var reactTransitionGroup = require('react-transition-group');
|
|
|
7
7
|
var classNames = require('clsx');
|
|
8
8
|
var Portal = require('@prom-ui/core/Portal');
|
|
9
9
|
var BodyScrollLock = require('@prom-ui/core/BodyScrollLock');
|
|
10
|
+
var useForwardRef = require('@prom-ui/core/useForwardRef');
|
|
10
11
|
|
|
11
12
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
13
|
|
|
@@ -31,95 +32,77 @@ function _interopNamespaceCompat(e) {
|
|
|
31
32
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
32
33
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
33
34
|
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
return keys;
|
|
35
|
+
function _defineProperty(e, r, t) {
|
|
36
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
37
|
+
value: t,
|
|
38
|
+
enumerable: !0,
|
|
39
|
+
configurable: !0,
|
|
40
|
+
writable: !0
|
|
41
|
+
}) : e[r] = t, e;
|
|
43
42
|
}
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
function _extends() {
|
|
44
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
45
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
46
|
+
var t = arguments[e];
|
|
47
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
48
|
+
}
|
|
49
|
+
return n;
|
|
50
|
+
}, _extends.apply(null, arguments);
|
|
51
|
+
}
|
|
52
|
+
function ownKeys(e, r) {
|
|
53
|
+
var t = Object.keys(e);
|
|
54
|
+
if (Object.getOwnPropertySymbols) {
|
|
55
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
56
|
+
r && (o = o.filter(function (r) {
|
|
57
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
58
|
+
})), t.push.apply(t, o);
|
|
52
59
|
}
|
|
53
|
-
return
|
|
60
|
+
return t;
|
|
54
61
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Object
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
writable: true
|
|
62
|
+
function _objectSpread2(e) {
|
|
63
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
64
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
65
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
66
|
+
_defineProperty(e, r, t[r]);
|
|
67
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
68
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
63
69
|
});
|
|
64
|
-
} else {
|
|
65
|
-
obj[key] = value;
|
|
66
70
|
}
|
|
67
|
-
return
|
|
71
|
+
return e;
|
|
68
72
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return target;
|
|
80
|
-
};
|
|
81
|
-
return _extends.apply(this, arguments);
|
|
82
|
-
}
|
|
83
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
84
|
-
if (source == null) return {};
|
|
85
|
-
var target = {};
|
|
86
|
-
var sourceKeys = Object.keys(source);
|
|
87
|
-
var key, i;
|
|
88
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
89
|
-
key = sourceKeys[i];
|
|
90
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
91
|
-
target[key] = source[key];
|
|
73
|
+
function _objectWithoutProperties(e, t) {
|
|
74
|
+
if (null == e) return {};
|
|
75
|
+
var o,
|
|
76
|
+
r,
|
|
77
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
78
|
+
if (Object.getOwnPropertySymbols) {
|
|
79
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
80
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
92
81
|
}
|
|
93
|
-
return
|
|
82
|
+
return i;
|
|
94
83
|
}
|
|
95
|
-
function
|
|
96
|
-
if (
|
|
97
|
-
var
|
|
98
|
-
var
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
102
|
-
key = sourceSymbolKeys[i];
|
|
103
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
104
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
105
|
-
target[key] = source[key];
|
|
106
|
-
}
|
|
84
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
85
|
+
if (null == r) return {};
|
|
86
|
+
var t = {};
|
|
87
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
88
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
89
|
+
t[n] = r[n];
|
|
107
90
|
}
|
|
108
|
-
return
|
|
91
|
+
return t;
|
|
109
92
|
}
|
|
110
|
-
function _toPrimitive(
|
|
111
|
-
if (
|
|
112
|
-
var
|
|
113
|
-
if (
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
93
|
+
function _toPrimitive(t, r) {
|
|
94
|
+
if ("object" != typeof t || !t) return t;
|
|
95
|
+
var e = t[Symbol.toPrimitive];
|
|
96
|
+
if (void 0 !== e) {
|
|
97
|
+
var i = e.call(t, r || "default");
|
|
98
|
+
if ("object" != typeof i) return i;
|
|
116
99
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
117
100
|
}
|
|
118
|
-
return (
|
|
101
|
+
return ("string" === r ? String : Number)(t);
|
|
119
102
|
}
|
|
120
|
-
function _toPropertyKey(
|
|
121
|
-
var
|
|
122
|
-
return
|
|
103
|
+
function _toPropertyKey(t) {
|
|
104
|
+
var i = _toPrimitive(t, "string");
|
|
105
|
+
return "symbol" == typeof i ? i : i + "";
|
|
123
106
|
}
|
|
124
107
|
|
|
125
108
|
var css = {"root":"Backdrop__root___mZ7dv","backdrop":"Backdrop__backdrop___AJyr0","enterActive":"Backdrop__enterActive___aDdF3","exitActive":"Backdrop__exitActive___rC-Zl","enter":"Backdrop__enter___NgQBr","exit":"Backdrop__exit___9LKEC"};
|
|
@@ -147,7 +130,9 @@ var Backdrop = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
147
130
|
className = _ref.className,
|
|
148
131
|
onClick = _ref.onClick,
|
|
149
132
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
133
|
+
var nodeRef = useForwardRef.useForwardRef(ref, null);
|
|
150
134
|
return /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.CSSTransition, {
|
|
135
|
+
nodeRef: nodeRef,
|
|
151
136
|
"in": isOpen,
|
|
152
137
|
timeout: isAnimated ? 225 : 0,
|
|
153
138
|
classNames: css,
|
|
@@ -157,7 +142,7 @@ var Backdrop = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
157
142
|
}, /*#__PURE__*/React__namespace.createElement(BodyScrollLock.BodyScrollLock, {
|
|
158
143
|
isActive: isBodyScrollLock
|
|
159
144
|
}), /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
160
|
-
ref:
|
|
145
|
+
ref: nodeRef,
|
|
161
146
|
className: classNames__default.default(css.root, className),
|
|
162
147
|
style: _objectSpread2({
|
|
163
148
|
zIndex: zIndex
|