@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
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var Swipe = require('react-easy-swipe');
|
|
7
7
|
var classNames = require('clsx');
|
|
8
|
-
require('intersection-observer');
|
|
9
8
|
var Icon = require('@prom-ui/core/Icon');
|
|
10
9
|
var useBodyTTag = require('@prom-ui/core/useBodyTTag');
|
|
11
10
|
var Left = require('@prom-ui/icons/Left');
|
|
@@ -35,160 +34,140 @@ var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
|
35
34
|
var Swipe__default = /*#__PURE__*/_interopDefaultCompat(Swipe);
|
|
36
35
|
var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
|
|
37
36
|
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
function _arrayLikeToArray(r, a) {
|
|
38
|
+
(null == a || a > r.length) && (a = r.length);
|
|
39
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
40
|
+
return n;
|
|
41
|
+
}
|
|
42
|
+
function _arrayWithHoles(r) {
|
|
43
|
+
if (Array.isArray(r)) return r;
|
|
44
|
+
}
|
|
45
|
+
function _defineProperty(e, r, t) {
|
|
46
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
47
|
+
value: t,
|
|
48
|
+
enumerable: !0,
|
|
49
|
+
configurable: !0,
|
|
50
|
+
writable: !0
|
|
51
|
+
}) : e[r] = t, e;
|
|
52
|
+
}
|
|
53
|
+
function _extends() {
|
|
54
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
55
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
56
|
+
var t = arguments[e];
|
|
57
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
58
|
+
}
|
|
59
|
+
return n;
|
|
60
|
+
}, _extends.apply(null, arguments);
|
|
61
|
+
}
|
|
62
|
+
function _iterableToArrayLimit(r, l) {
|
|
63
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
64
|
+
if (null != t) {
|
|
65
|
+
var e,
|
|
66
|
+
n,
|
|
67
|
+
i,
|
|
68
|
+
u,
|
|
69
|
+
a = [],
|
|
70
|
+
f = !0,
|
|
71
|
+
o = !1;
|
|
48
72
|
try {
|
|
49
|
-
if (
|
|
50
|
-
if (Object(
|
|
51
|
-
|
|
52
|
-
} else for (; !(
|
|
53
|
-
} catch (
|
|
54
|
-
|
|
73
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
74
|
+
if (Object(t) !== t) return;
|
|
75
|
+
f = !1;
|
|
76
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
77
|
+
} catch (r) {
|
|
78
|
+
o = !0, n = r;
|
|
55
79
|
} finally {
|
|
56
80
|
try {
|
|
57
|
-
if (!
|
|
81
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
58
82
|
} finally {
|
|
59
|
-
if (
|
|
83
|
+
if (o) throw n;
|
|
60
84
|
}
|
|
61
85
|
}
|
|
62
|
-
return
|
|
86
|
+
return a;
|
|
63
87
|
}
|
|
64
88
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
89
|
+
function _nonIterableRest() {
|
|
90
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
91
|
+
}
|
|
92
|
+
function ownKeys(e, r) {
|
|
93
|
+
var t = Object.keys(e);
|
|
67
94
|
if (Object.getOwnPropertySymbols) {
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
return Object.getOwnPropertyDescriptor(
|
|
71
|
-
})),
|
|
95
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
96
|
+
r && (o = o.filter(function (r) {
|
|
97
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
98
|
+
})), t.push.apply(t, o);
|
|
72
99
|
}
|
|
73
|
-
return
|
|
100
|
+
return t;
|
|
74
101
|
}
|
|
75
|
-
function _objectSpread2(
|
|
76
|
-
for (var
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
_defineProperty(
|
|
80
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
81
|
-
Object.defineProperty(
|
|
102
|
+
function _objectSpread2(e) {
|
|
103
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
104
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
105
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
106
|
+
_defineProperty(e, r, t[r]);
|
|
107
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
108
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
82
109
|
});
|
|
83
110
|
}
|
|
84
|
-
return
|
|
111
|
+
return e;
|
|
85
112
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
});
|
|
95
|
-
} else {
|
|
96
|
-
obj[key] = value;
|
|
113
|
+
function _objectWithoutProperties(e, t) {
|
|
114
|
+
if (null == e) return {};
|
|
115
|
+
var o,
|
|
116
|
+
r,
|
|
117
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
118
|
+
if (Object.getOwnPropertySymbols) {
|
|
119
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
120
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
97
121
|
}
|
|
98
|
-
return
|
|
122
|
+
return i;
|
|
99
123
|
}
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
target[key] = source[key];
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return target;
|
|
111
|
-
};
|
|
112
|
-
return _extends.apply(this, arguments);
|
|
113
|
-
}
|
|
114
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
115
|
-
if (source == null) return {};
|
|
116
|
-
var target = {};
|
|
117
|
-
var sourceKeys = Object.keys(source);
|
|
118
|
-
var key, i;
|
|
119
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
120
|
-
key = sourceKeys[i];
|
|
121
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
122
|
-
target[key] = source[key];
|
|
124
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
125
|
+
if (null == r) return {};
|
|
126
|
+
var t = {};
|
|
127
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
128
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
129
|
+
t[n] = r[n];
|
|
123
130
|
}
|
|
124
|
-
return
|
|
131
|
+
return t;
|
|
125
132
|
}
|
|
126
|
-
function
|
|
127
|
-
|
|
128
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
129
|
-
var key, i;
|
|
130
|
-
if (Object.getOwnPropertySymbols) {
|
|
131
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
132
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
133
|
-
key = sourceSymbolKeys[i];
|
|
134
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
135
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
136
|
-
target[key] = source[key];
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return target;
|
|
133
|
+
function _slicedToArray(r, e) {
|
|
134
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
140
135
|
}
|
|
141
|
-
function _taggedTemplateLiteral(
|
|
142
|
-
|
|
143
|
-
raw = strings.slice(0);
|
|
144
|
-
}
|
|
145
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
136
|
+
function _taggedTemplateLiteral(e, t) {
|
|
137
|
+
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
146
138
|
raw: {
|
|
147
|
-
value: Object.freeze(
|
|
139
|
+
value: Object.freeze(t)
|
|
148
140
|
}
|
|
149
141
|
}));
|
|
150
142
|
}
|
|
151
|
-
function
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
158
|
-
if (!o) return;
|
|
159
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
160
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
161
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
162
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
163
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
164
|
-
}
|
|
165
|
-
function _arrayLikeToArray(arr, len) {
|
|
166
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
167
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
168
|
-
return arr2;
|
|
169
|
-
}
|
|
170
|
-
function _nonIterableRest() {
|
|
171
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
172
|
-
}
|
|
173
|
-
function _toPrimitive(input, hint) {
|
|
174
|
-
if (typeof input !== "object" || input === null) return input;
|
|
175
|
-
var prim = input[Symbol.toPrimitive];
|
|
176
|
-
if (prim !== undefined) {
|
|
177
|
-
var res = prim.call(input, hint || "default");
|
|
178
|
-
if (typeof res !== "object") return res;
|
|
143
|
+
function _toPrimitive(t, r) {
|
|
144
|
+
if ("object" != typeof t || !t) return t;
|
|
145
|
+
var e = t[Symbol.toPrimitive];
|
|
146
|
+
if (void 0 !== e) {
|
|
147
|
+
var i = e.call(t, r || "default");
|
|
148
|
+
if ("object" != typeof i) return i;
|
|
179
149
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
180
150
|
}
|
|
181
|
-
return (
|
|
151
|
+
return ("string" === r ? String : Number)(t);
|
|
182
152
|
}
|
|
183
|
-
function _toPropertyKey(
|
|
184
|
-
var
|
|
185
|
-
return
|
|
153
|
+
function _toPropertyKey(t) {
|
|
154
|
+
var i = _toPrimitive(t, "string");
|
|
155
|
+
return "symbol" == typeof i ? i : i + "";
|
|
156
|
+
}
|
|
157
|
+
function _unsupportedIterableToArray(r, a) {
|
|
158
|
+
if (r) {
|
|
159
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
160
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
161
|
+
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;
|
|
162
|
+
}
|
|
186
163
|
}
|
|
187
164
|
|
|
188
165
|
var useAutoPlay = function useAutoPlay(callback, delay) {
|
|
189
166
|
var timeout = React.useRef(null);
|
|
190
167
|
var stop = function stop() {
|
|
191
|
-
|
|
168
|
+
if (timeout.current) {
|
|
169
|
+
clearTimeout(timeout.current);
|
|
170
|
+
}
|
|
192
171
|
};
|
|
193
172
|
var start = function start() {
|
|
194
173
|
stop();
|
|
@@ -240,8 +219,8 @@ var css = {"root":"SimpleSlider__root___WuTIM","track":"SimpleSlider__track___G8
|
|
|
240
219
|
|
|
241
220
|
var _templateObject, _templateObject2, _templateObject3;
|
|
242
221
|
var _excluded = ["showIndex", "autoPlay", "children", "className", "duration", "height", "infinite", "ratio", "style", "width", "onChangeIndex", "onClickDot", "onClickItem", "onClickButtonNext", "onClickButtonPrev", "onSwipeNext", "onSwipePrev", "showOnHoverButtons", "showOnHoverDots", "isDotsTransparent"];
|
|
222
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
243
223
|
var SimpleSlider = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
244
|
-
var _classNames;
|
|
245
224
|
var _ref$showIndex = _ref.showIndex,
|
|
246
225
|
showIndex = _ref$showIndex === void 0 ? 0 : _ref$showIndex,
|
|
247
226
|
_ref$autoPlay = _ref.autoPlay,
|
|
@@ -397,15 +376,15 @@ var SimpleSlider = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref)
|
|
|
397
376
|
stopAutoPlay();
|
|
398
377
|
}
|
|
399
378
|
});
|
|
400
|
-
(_refTrack$current = refTrack.current) === null || _refTrack$current === void 0
|
|
401
|
-
(_refTrack$current2 = refTrack.current) === null || _refTrack$current2 === void 0
|
|
379
|
+
(_refTrack$current = refTrack.current) === null || _refTrack$current === void 0 || _refTrack$current.addEventListener('transitionstart', handleTransitionStart);
|
|
380
|
+
(_refTrack$current2 = refTrack.current) === null || _refTrack$current2 === void 0 || _refTrack$current2.addEventListener('transitionend', handleTransitionEnd);
|
|
402
381
|
if (isAutoPlay && refTrack.current) {
|
|
403
382
|
autoPlayObserver.observe(refTrack.current);
|
|
404
383
|
}
|
|
405
384
|
return function () {
|
|
406
385
|
var _refTrack$current3, _refTrack$current4;
|
|
407
|
-
(_refTrack$current3 = refTrack.current) === null || _refTrack$current3 === void 0
|
|
408
|
-
(_refTrack$current4 = refTrack.current) === null || _refTrack$current4 === void 0
|
|
386
|
+
(_refTrack$current3 = refTrack.current) === null || _refTrack$current3 === void 0 || _refTrack$current3.removeEventListener('transitionstart', handleTransitionStart);
|
|
387
|
+
(_refTrack$current4 = refTrack.current) === null || _refTrack$current4 === void 0 || _refTrack$current4.removeEventListener('transitionend', handleTransitionEnd);
|
|
409
388
|
stopAutoPlay();
|
|
410
389
|
autoPlayObserver.disconnect();
|
|
411
390
|
};
|
|
@@ -423,7 +402,7 @@ var SimpleSlider = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref)
|
|
|
423
402
|
onSwipeLeft: handleSwipeNext,
|
|
424
403
|
onSwipeRight: handleSwipePrev,
|
|
425
404
|
onSwipeMove: handleSwipeMove,
|
|
426
|
-
className: classNames__default.default(css.root, className, (
|
|
405
|
+
className: classNames__default.default(css.root, className, _defineProperty(_defineProperty({}, css.showOnHoverButtons, showOnHoverButtons), css.showOnHoverDots, showOnHoverDots)),
|
|
427
406
|
style: getRootStyle({
|
|
428
407
|
width: width,
|
|
429
408
|
height: height,
|
|
@@ -458,7 +437,7 @@ var SimpleSlider = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref)
|
|
|
458
437
|
className: css.trackItem
|
|
459
438
|
}, childrenArray[childrenArray.length - 1]), childrenArray.map(function (child, index) {
|
|
460
439
|
return /*#__PURE__*/React__namespace.createElement("li", {
|
|
461
|
-
key:
|
|
440
|
+
key: index,
|
|
462
441
|
className: css.trackItem,
|
|
463
442
|
onClick: function onClick() {
|
|
464
443
|
if (typeof onClickItem === 'function') {
|
|
@@ -491,11 +470,11 @@ var SimpleSlider = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref)
|
|
|
491
470
|
"icon-as": Right.SvgRight
|
|
492
471
|
}))), isShowDots && /*#__PURE__*/React__namespace.createElement("ul", {
|
|
493
472
|
className: classNames__default.default(css.dots, _defineProperty({}, css.dotsTransparent, isDotsTransparent))
|
|
494
|
-
}, childrenArray.map(function (
|
|
473
|
+
}, childrenArray.map(function (_, index) {
|
|
495
474
|
var viewIndex = index + 1;
|
|
496
475
|
return /*#__PURE__*/React__namespace.createElement("li", {
|
|
497
476
|
className: css.dotsItem,
|
|
498
|
-
key:
|
|
477
|
+
key: index
|
|
499
478
|
}, /*#__PURE__*/React__namespace.createElement("button", {
|
|
500
479
|
type: "button",
|
|
501
480
|
className: css.dotsButton,
|