@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
|
@@ -2,56 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
6
|
var react = require('react');
|
|
6
7
|
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return n;
|
|
11
|
-
}
|
|
12
|
-
function _arrayWithHoles(r) {
|
|
13
|
-
if (Array.isArray(r)) return r;
|
|
14
|
-
}
|
|
15
|
-
function _iterableToArrayLimit(r, l) {
|
|
16
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
17
|
-
if (null != t) {
|
|
18
|
-
var e,
|
|
19
|
-
n,
|
|
20
|
-
i,
|
|
21
|
-
u,
|
|
22
|
-
a = [],
|
|
23
|
-
f = !0,
|
|
24
|
-
o = !1;
|
|
25
|
-
try {
|
|
26
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
27
|
-
if (Object(t) !== t) return;
|
|
28
|
-
f = !1;
|
|
29
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
30
|
-
} catch (r) {
|
|
31
|
-
o = !0, n = r;
|
|
32
|
-
} finally {
|
|
33
|
-
try {
|
|
34
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
35
|
-
} finally {
|
|
36
|
-
if (o) throw n;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return a;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function _nonIterableRest() {
|
|
43
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
44
|
-
}
|
|
45
|
-
function _slicedToArray(r, e) {
|
|
46
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
47
|
-
}
|
|
48
|
-
function _unsupportedIterableToArray(r, a) {
|
|
49
|
-
if (r) {
|
|
50
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
51
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
52
|
-
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;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultCompat(_slicedToArray);
|
|
55
11
|
|
|
56
12
|
/**
|
|
57
13
|
* Reack hook
|
|
@@ -59,7 +15,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
59
15
|
var useDebounce = function useDebounce(value, delay) {
|
|
60
16
|
// State and setters for debounced value
|
|
61
17
|
var _useState = react.useState(value),
|
|
62
|
-
_useState2 =
|
|
18
|
+
_useState2 = _slicedToArray__default.default(_useState, 2),
|
|
63
19
|
debouncedValue = _useState2[0],
|
|
64
20
|
setDebouncedValue = _useState2[1];
|
|
65
21
|
react.useEffect(function () {
|
|
@@ -2,56 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
6
|
var react = require('react');
|
|
6
7
|
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return n;
|
|
11
|
-
}
|
|
12
|
-
function _arrayWithHoles(r) {
|
|
13
|
-
if (Array.isArray(r)) return r;
|
|
14
|
-
}
|
|
15
|
-
function _iterableToArrayLimit(r, l) {
|
|
16
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
17
|
-
if (null != t) {
|
|
18
|
-
var e,
|
|
19
|
-
n,
|
|
20
|
-
i,
|
|
21
|
-
u,
|
|
22
|
-
a = [],
|
|
23
|
-
f = !0,
|
|
24
|
-
o = !1;
|
|
25
|
-
try {
|
|
26
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
27
|
-
if (Object(t) !== t) return;
|
|
28
|
-
f = !1;
|
|
29
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
30
|
-
} catch (r) {
|
|
31
|
-
o = !0, n = r;
|
|
32
|
-
} finally {
|
|
33
|
-
try {
|
|
34
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
35
|
-
} finally {
|
|
36
|
-
if (o) throw n;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return a;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function _nonIterableRest() {
|
|
43
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
44
|
-
}
|
|
45
|
-
function _slicedToArray(r, e) {
|
|
46
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
47
|
-
}
|
|
48
|
-
function _unsupportedIterableToArray(r, a) {
|
|
49
|
-
if (r) {
|
|
50
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
51
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
52
|
-
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;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultCompat(_slicedToArray);
|
|
55
11
|
|
|
56
12
|
/**
|
|
57
13
|
* Reack hook
|
|
@@ -59,7 +15,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
59
15
|
var useDebounce = function useDebounce(value, delay) {
|
|
60
16
|
// State and setters for debounced value
|
|
61
17
|
var _useState = react.useState(value),
|
|
62
|
-
_useState2 =
|
|
18
|
+
_useState2 = _slicedToArray__default.default(_useState, 2),
|
|
63
19
|
debouncedValue = _useState2[0],
|
|
64
20
|
setDebouncedValue = _useState2[1];
|
|
65
21
|
react.useEffect(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=r(e);exports.useDebounce=function(e,r){var n=t.useState(e),o=u.default(n,2),i=o[0],a=o[1];return t.useEffect((function(){var t=setTimeout((function(){a(e)}),r);return function(){clearTimeout(t)}}),[e,r]),i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=r(e);exports.useDebounce=function(e,r){var n=t.useState(e),o=u.default(n,2),i=o[0],a=o[1];return t.useEffect((function(){var t=setTimeout((function(){a(e)}),r);return function(){clearTimeout(t)}}),[e,r]),i};
|
package/useDebounce/package.json
CHANGED
package/useInView/package.json
CHANGED
|
@@ -2,84 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
7
10
|
function _interopNamespaceCompat(e) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
17
22
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
n.default = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
23
26
|
}
|
|
24
27
|
|
|
28
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultCompat(_slicedToArray);
|
|
25
29
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
26
30
|
|
|
27
|
-
function _arrayLikeToArray(r, a) {
|
|
28
|
-
(null == a || a > r.length) && (a = r.length);
|
|
29
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
30
|
-
return n;
|
|
31
|
-
}
|
|
32
|
-
function _arrayWithHoles(r) {
|
|
33
|
-
if (Array.isArray(r)) return r;
|
|
34
|
-
}
|
|
35
|
-
function _iterableToArrayLimit(r, l) {
|
|
36
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
37
|
-
if (null != t) {
|
|
38
|
-
var e,
|
|
39
|
-
n,
|
|
40
|
-
i,
|
|
41
|
-
u,
|
|
42
|
-
a = [],
|
|
43
|
-
f = !0,
|
|
44
|
-
o = !1;
|
|
45
|
-
try {
|
|
46
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
47
|
-
if (Object(t) !== t) return;
|
|
48
|
-
f = !1;
|
|
49
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
50
|
-
} catch (r) {
|
|
51
|
-
o = !0, n = r;
|
|
52
|
-
} finally {
|
|
53
|
-
try {
|
|
54
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
55
|
-
} finally {
|
|
56
|
-
if (o) throw n;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return a;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function _nonIterableRest() {
|
|
63
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
64
|
-
}
|
|
65
|
-
function _slicedToArray(r, e) {
|
|
66
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
67
|
-
}
|
|
68
|
-
function _unsupportedIterableToArray(r, a) {
|
|
69
|
-
if (r) {
|
|
70
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
71
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
72
|
-
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;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
31
|
/**
|
|
77
32
|
* Reack hook
|
|
78
33
|
*/
|
|
79
34
|
var useKeyPress = function useKeyPress(targetKey, handleKeyDown, handleKeyUp) {
|
|
80
35
|
// State for keeping track of whether key is pressed
|
|
81
36
|
var _React$useState = React__namespace.useState(false),
|
|
82
|
-
_React$useState2 =
|
|
37
|
+
_React$useState2 = _slicedToArray__default.default(_React$useState, 2),
|
|
83
38
|
keyPressed = _React$useState2[0],
|
|
84
39
|
setKeyPressed = _React$useState2[1];
|
|
85
40
|
|
|
@@ -2,84 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
6
|
var React = require('react');
|
|
6
7
|
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
7
10
|
function _interopNamespaceCompat(e) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
17
22
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
n.default = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
23
26
|
}
|
|
24
27
|
|
|
28
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultCompat(_slicedToArray);
|
|
25
29
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
26
30
|
|
|
27
|
-
function _arrayLikeToArray(r, a) {
|
|
28
|
-
(null == a || a > r.length) && (a = r.length);
|
|
29
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
30
|
-
return n;
|
|
31
|
-
}
|
|
32
|
-
function _arrayWithHoles(r) {
|
|
33
|
-
if (Array.isArray(r)) return r;
|
|
34
|
-
}
|
|
35
|
-
function _iterableToArrayLimit(r, l) {
|
|
36
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
37
|
-
if (null != t) {
|
|
38
|
-
var e,
|
|
39
|
-
n,
|
|
40
|
-
i,
|
|
41
|
-
u,
|
|
42
|
-
a = [],
|
|
43
|
-
f = !0,
|
|
44
|
-
o = !1;
|
|
45
|
-
try {
|
|
46
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
47
|
-
if (Object(t) !== t) return;
|
|
48
|
-
f = !1;
|
|
49
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
50
|
-
} catch (r) {
|
|
51
|
-
o = !0, n = r;
|
|
52
|
-
} finally {
|
|
53
|
-
try {
|
|
54
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
55
|
-
} finally {
|
|
56
|
-
if (o) throw n;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return a;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function _nonIterableRest() {
|
|
63
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
64
|
-
}
|
|
65
|
-
function _slicedToArray(r, e) {
|
|
66
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
67
|
-
}
|
|
68
|
-
function _unsupportedIterableToArray(r, a) {
|
|
69
|
-
if (r) {
|
|
70
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
71
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
72
|
-
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;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
31
|
/**
|
|
77
32
|
* Reack hook
|
|
78
33
|
*/
|
|
79
34
|
var useKeyPress = function useKeyPress(targetKey, handleKeyDown, handleKeyUp) {
|
|
80
35
|
// State for keeping track of whether key is pressed
|
|
81
36
|
var _React$useState = React__namespace.useState(false),
|
|
82
|
-
_React$useState2 =
|
|
37
|
+
_React$useState2 = _slicedToArray__default.default(_React$useState, 2),
|
|
83
38
|
keyPressed = _React$useState2[0],
|
|
84
39
|
setKeyPressed = _React$useState2[1];
|
|
85
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react");function r(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 n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var u=r(e),o=n(t);exports.useKeyPress=function(e,t,r){var n=o.useState(!1),i=u.default(n,2),f=i[0],c=i[1],a=function(r){r.key===e&&(t?t(r):c(!0))},d=function(t){t.key===e&&(r?r(t):c(!1))};return o.useEffect((function(){return window.addEventListener("keydown",a),window.addEventListener("keyup",d),function(){window.removeEventListener("keydown",a),window.removeEventListener("keyup",d)}}),[e,t,r]),f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react");function r(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 n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var u=r(e),o=n(t);exports.useKeyPress=function(e,t,r){var n=o.useState(!1),i=u.default(n,2),f=i[0],c=i[1],a=function(r){r.key===e&&(t?t(r):c(!0))},d=function(t){t.key===e&&(r?r(t):c(!1))};return o.useEffect((function(){return window.addEventListener("keydown",a),window.addEventListener("keyup",d),function(){window.removeEventListener("keydown",a),window.removeEventListener("keyup",d)}}),[e,t,r]),f};
|
package/useKeyPress/package.json
CHANGED
package/useMedia/package.json
CHANGED
package/usePortal/package.json
CHANGED