@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"),r=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/objectWithoutProperties"),o=require("react"),i=require("react-transition-group"),n=require("clsx"),c=require("@prom-ui/core/Portal"),a=require("@prom-ui/core/BodyScrollLock"),l=require("@prom-ui/core/useForwardRef");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&"object"==typeof e&&"default"in e)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var d=u(e),p=u(r),f=u(t),b=s(o),m=u(n),y={root:"p-RA9",backdrop:"XNSpt",enterActive:"ATDSq",exitActive:"bnta5",enter:"NmGm7",exit:"sD9v-"},O=["isOpen","isRenderPortal","isAnimated","isBodyScrollLock","style","zIndex","children","className","onClick"];function v(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function j(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?v(Object(t),!0).forEach((function(r){p.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var P=b.forwardRef((function(e,r){var t=e.isOpen,o=void 0!==t&&t,n=e.isRenderPortal,u=void 0===n||n,s=e.isAnimated,p=void 0===s||s,v=e.isBodyScrollLock,P=void 0!==v&&v,k=e.style,h=void 0===k?{}:k,q=e.zIndex,g=void 0===q?1e3:q,w=e.children,x=e.className,S=e.onClick,E=f.default(e,O),A=l.useForwardRef(r,null);return b.createElement(i.CSSTransition,{nodeRef:A,in:o,timeout:p?225:0,classNames:y,unmountOnExit:!0},b.createElement(c.Portal,{isActive:u},b.createElement(a.BodyScrollLock,{isActive:P}),b.createElement("div",d.default({ref:A,className:m.default(y.root,x),style:j({zIndex:g},h),"aria-hidden":!0,"data-testid":"backdrop","data-qaid":"backdrop"},E),b.createElement("div",{className:y.backdrop,onClick:S}),w)))}));P.displayName="Backdrop",exports.Backdrop=P,require("./style.production.v2.css");
|
package/Backdrop/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prom-ui/core/Backdrop",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.css"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {
|
|
10
|
+
"@babel/runtime": "^7.28.2",
|
|
10
11
|
"clsx": "^2.0.0",
|
|
11
12
|
"react-transition-group": "^4.4.2"
|
|
12
13
|
}
|
|
@@ -2,84 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
8
|
var React = require('react');
|
|
6
9
|
var classNames = require('clsx');
|
|
7
10
|
|
|
8
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
12
|
|
|
10
13
|
function _interopNamespaceCompat(e) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
20
25
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
n.default = e;
|
|
25
|
-
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
26
29
|
}
|
|
27
30
|
|
|
31
|
+
var _extends__default = /*#__PURE__*/_interopDefaultCompat(_extends);
|
|
32
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultCompat(_defineProperty);
|
|
33
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultCompat(_objectWithoutProperties);
|
|
28
34
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
29
35
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
30
36
|
|
|
31
|
-
function _defineProperty(e, r, t) {
|
|
32
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
33
|
-
value: t,
|
|
34
|
-
enumerable: !0,
|
|
35
|
-
configurable: !0,
|
|
36
|
-
writable: !0
|
|
37
|
-
}) : e[r] = t, e;
|
|
38
|
-
}
|
|
39
|
-
function _extends() {
|
|
40
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
41
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
42
|
-
var t = arguments[e];
|
|
43
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
44
|
-
}
|
|
45
|
-
return n;
|
|
46
|
-
}, _extends.apply(null, arguments);
|
|
47
|
-
}
|
|
48
|
-
function _objectWithoutProperties(e, t) {
|
|
49
|
-
if (null == e) return {};
|
|
50
|
-
var o,
|
|
51
|
-
r,
|
|
52
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
53
|
-
if (Object.getOwnPropertySymbols) {
|
|
54
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
55
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
56
|
-
}
|
|
57
|
-
return i;
|
|
58
|
-
}
|
|
59
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
60
|
-
if (null == r) return {};
|
|
61
|
-
var t = {};
|
|
62
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
63
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
64
|
-
t[n] = r[n];
|
|
65
|
-
}
|
|
66
|
-
return t;
|
|
67
|
-
}
|
|
68
|
-
function _toPrimitive(t, r) {
|
|
69
|
-
if ("object" != typeof t || !t) return t;
|
|
70
|
-
var e = t[Symbol.toPrimitive];
|
|
71
|
-
if (void 0 !== e) {
|
|
72
|
-
var i = e.call(t, r || "default");
|
|
73
|
-
if ("object" != typeof i) return i;
|
|
74
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
75
|
-
}
|
|
76
|
-
return ("string" === r ? String : Number)(t);
|
|
77
|
-
}
|
|
78
|
-
function _toPropertyKey(t) {
|
|
79
|
-
var i = _toPrimitive(t, "string");
|
|
80
|
-
return "symbol" == typeof i ? i : i + "";
|
|
81
|
-
}
|
|
82
|
-
|
|
83
37
|
var css = {"root":"Badge__root___QNSvz","root_variant_dot":"Badge__root_variant_dot___LQAyB","wrapper":"Badge__wrapper___uSbS1","wrapper_position_top-left":"Badge__wrapper_position_top-left___XQbSE","wrapper_position_top-right":"Badge__wrapper_position_top-right___RHHgB","wrapper_position_bottom-left":"Badge__wrapper_position_bottom-left___UCIFU","wrapper_position_bottom-right":"Badge__wrapper_position_bottom-right___MA0aH"};
|
|
84
38
|
|
|
85
39
|
var _excluded = ["value", "isShowZero", "max", "position", "variant", "children", "className"];
|
|
@@ -97,7 +51,7 @@ var Badge = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
97
51
|
variant = _ref.variant,
|
|
98
52
|
children = _ref.children,
|
|
99
53
|
className = _ref.className,
|
|
100
|
-
props =
|
|
54
|
+
props = _objectWithoutProperties__default.default(_ref, _excluded);
|
|
101
55
|
var wrapperPosition = position || 'top-right';
|
|
102
56
|
var badgeContent = value;
|
|
103
57
|
var badgeResult = null;
|
|
@@ -105,8 +59,8 @@ var Badge = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
105
59
|
badgeContent = "".concat(max, "+");
|
|
106
60
|
}
|
|
107
61
|
if (badgeContent || badgeContent === 0 && isShowZero) {
|
|
108
|
-
badgeResult = /*#__PURE__*/React__namespace.createElement("span",
|
|
109
|
-
className: classNames__default.default(css.root,
|
|
62
|
+
badgeResult = /*#__PURE__*/React__namespace.createElement("span", _extends__default.default({
|
|
63
|
+
className: classNames__default.default(css.root, _defineProperty__default.default({}, css.root_variant_dot, variant === 'dot'), className),
|
|
110
64
|
ref: ref,
|
|
111
65
|
"data-qaid": "badge",
|
|
112
66
|
"data-testid": "badge"
|
|
@@ -2,84 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
8
|
var React = require('react');
|
|
6
9
|
var classNames = require('clsx');
|
|
7
10
|
|
|
8
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
12
|
|
|
10
13
|
function _interopNamespaceCompat(e) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
20
25
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
n.default = e;
|
|
25
|
-
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
26
29
|
}
|
|
27
30
|
|
|
31
|
+
var _extends__default = /*#__PURE__*/_interopDefaultCompat(_extends);
|
|
32
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultCompat(_defineProperty);
|
|
33
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultCompat(_objectWithoutProperties);
|
|
28
34
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
29
35
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
30
36
|
|
|
31
|
-
function _defineProperty(e, r, t) {
|
|
32
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
33
|
-
value: t,
|
|
34
|
-
enumerable: !0,
|
|
35
|
-
configurable: !0,
|
|
36
|
-
writable: !0
|
|
37
|
-
}) : e[r] = t, e;
|
|
38
|
-
}
|
|
39
|
-
function _extends() {
|
|
40
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
41
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
42
|
-
var t = arguments[e];
|
|
43
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
44
|
-
}
|
|
45
|
-
return n;
|
|
46
|
-
}, _extends.apply(null, arguments);
|
|
47
|
-
}
|
|
48
|
-
function _objectWithoutProperties(e, t) {
|
|
49
|
-
if (null == e) return {};
|
|
50
|
-
var o,
|
|
51
|
-
r,
|
|
52
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
53
|
-
if (Object.getOwnPropertySymbols) {
|
|
54
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
55
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
56
|
-
}
|
|
57
|
-
return i;
|
|
58
|
-
}
|
|
59
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
60
|
-
if (null == r) return {};
|
|
61
|
-
var t = {};
|
|
62
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
63
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
64
|
-
t[n] = r[n];
|
|
65
|
-
}
|
|
66
|
-
return t;
|
|
67
|
-
}
|
|
68
|
-
function _toPrimitive(t, r) {
|
|
69
|
-
if ("object" != typeof t || !t) return t;
|
|
70
|
-
var e = t[Symbol.toPrimitive];
|
|
71
|
-
if (void 0 !== e) {
|
|
72
|
-
var i = e.call(t, r || "default");
|
|
73
|
-
if ("object" != typeof i) return i;
|
|
74
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
75
|
-
}
|
|
76
|
-
return ("string" === r ? String : Number)(t);
|
|
77
|
-
}
|
|
78
|
-
function _toPropertyKey(t) {
|
|
79
|
-
var i = _toPrimitive(t, "string");
|
|
80
|
-
return "symbol" == typeof i ? i : i + "";
|
|
81
|
-
}
|
|
82
|
-
|
|
83
37
|
var css = {"root":"Badge__root___-2hEg","root_variant_dot":"Badge__root_variant_dot___4qcc0","wrapper":"Badge__wrapper___7bkFh","wrapper_position_top-left":"Badge__wrapper_position_top-left___k-olF","wrapper_position_top-right":"Badge__wrapper_position_top-right___MTPK-","wrapper_position_bottom-left":"Badge__wrapper_position_bottom-left___WZaNZ","wrapper_position_bottom-right":"Badge__wrapper_position_bottom-right___blz1u"};
|
|
84
38
|
|
|
85
39
|
var _excluded = ["value", "isShowZero", "max", "position", "variant", "children", "className"];
|
|
@@ -97,7 +51,7 @@ var Badge = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
97
51
|
variant = _ref.variant,
|
|
98
52
|
children = _ref.children,
|
|
99
53
|
className = _ref.className,
|
|
100
|
-
props =
|
|
54
|
+
props = _objectWithoutProperties__default.default(_ref, _excluded);
|
|
101
55
|
var wrapperPosition = position || 'top-right';
|
|
102
56
|
var badgeContent = value;
|
|
103
57
|
var badgeResult = null;
|
|
@@ -105,8 +59,8 @@ var Badge = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
105
59
|
badgeContent = "".concat(max, "+");
|
|
106
60
|
}
|
|
107
61
|
if (badgeContent || badgeContent === 0 && isShowZero) {
|
|
108
|
-
badgeResult = /*#__PURE__*/React__namespace.createElement("span",
|
|
109
|
-
className: classNames__default.default(css.root,
|
|
62
|
+
badgeResult = /*#__PURE__*/React__namespace.createElement("span", _extends__default.default({
|
|
63
|
+
className: classNames__default.default(css.root, _defineProperty__default.default({}, css.root_variant_dot, variant === 'dot'), className),
|
|
110
64
|
ref: ref,
|
|
111
65
|
"data-qaid": "badge",
|
|
112
66
|
"data-testid": "badge"
|
|
@@ -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/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),a=require("react"),o=require("clsx");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 u=i(e),p=i(t),l=i(r),s=n(a),d=i(o),c={root:"QNSvz",root_variant_dot:"LQAyB",wrapper:"uSbS1","wrapper_position_top-left":"XQbSE","wrapper_position_top-right":"RHHgB","wrapper_position_bottom-left":"UCIFU","wrapper_position_bottom-right":"MA0aH"},f=["value","isShowZero","max","position","variant","children","className"],b=s.forwardRef((function(e,t){var r=e.value,a=e.isShowZero,o=void 0!==a&&a,i=e.max,n=void 0===i?9:i,b=e.position,m=void 0===b?"top-right":b,v=e.variant,_=e.children,g=e.className,h=l.default(e,f),w=m||"top-right",y=r,j=null;return Number.isInteger(n)&&Number(r)>n&&(y="".concat(n,"+")),(y||0===y&&o)&&(j=s.createElement("span",u.default({className:d.default(c.root,p.default({},c.root_variant_dot,"dot"===v),g),ref:t,"data-qaid":"badge","data-testid":"badge"},h),y)),_?s.createElement("div",{className:d.default(c.wrapper,c["wrapper_position_".concat(w)])},_,j):j}));b.displayName="Badge",exports.Badge=b,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/extends"),t=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),a=require("react"),o=require("clsx");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 u=i(e),p=i(t),l=i(r),s=n(a),c=i(o),d={root:"_-2hEg",root_variant_dot:"_4qcc0",wrapper:"_7bkFh","wrapper_position_top-left":"k-olF","wrapper_position_top-right":"MTPK-","wrapper_position_bottom-left":"WZaNZ","wrapper_position_bottom-right":"blz1u"},f=["value","isShowZero","max","position","variant","children","className"],b=s.forwardRef((function(e,t){var r=e.value,a=e.isShowZero,o=void 0!==a&&a,i=e.max,n=void 0===i?9:i,b=e.position,_=void 0===b?"top-right":b,m=e.variant,v=e.children,h=e.className,g=l.default(e,f),w=_||"top-right",j=r,y=null;return Number.isInteger(n)&&Number(r)>n&&(j="".concat(n,"+")),(j||0===j&&o)&&(y=s.createElement("span",u.default({className:c.default(d.root,p.default({},d.root_variant_dot,"dot"===m),h),ref:t,"data-qaid":"badge","data-testid":"badge"},g),j)),v?s.createElement("div",{className:c.default(d.wrapper,d["wrapper_position_".concat(w)])},v,y):y}));b.displayName="Badge",exports.Badge=b,require("./style.production.v2.css");
|
package/Badge/package.json
CHANGED
package/Body/package.json
CHANGED
package/BodyContext/package.json
CHANGED