@prom-ui/core 1.19.0 → 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/cjs/index.development.js +1 -1
- package/Box/cjs/index.development.v2.js +1 -1
- package/Box/cjs/index.production.js +1 -1
- package/Box/cjs/index.production.v2.js +1 -1
- package/Box/cjs/style.development.css +1 -1
- package/Box/cjs/style.development.v2.css +1 -1
- package/Box/cjs/style.production.css +1 -1
- package/Box/cjs/style.production.v2.css +1 -1
- package/Box/index.d.ts +2 -2
- 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 +82 -76
- package/PhotoGallery/cjs/index.development.v2.js +82 -76
- package/PhotoGallery/cjs/index.production.js +1 -1
- package/PhotoGallery/cjs/index.production.v2.js +1 -1
- package/PhotoGallery/cjs/style.development.css +1 -1
- package/PhotoGallery/cjs/style.development.v2.css +1 -1
- package/PhotoGallery/cjs/style.production.css +1 -1
- package/PhotoGallery/cjs/style.production.v2.css +1 -1
- package/PhotoGallery/index.d.ts +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
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@prom-ui/core/ErrorCatch"),t=require("@prom-ui/core/useInView");function n(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 n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var i=n(e);function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@prom-ui/core/ErrorCatch"),t=require("@prom-ui/core/useInView");function n(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 n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var i=n(e);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},a.apply(null,arguments)}function o(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==r.indexOf(n))continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var c=["isActive","children","fallback","onChange","rootMargin"],u=["errorCatchName"],l=function(e){var r=e.isActive,n=void 0===r||r,u=e.children,l=e.fallback,f=e.onChange,p=e.rootMargin,s=void 0===p?"40% 0px":p,v=o(e,c),d=t.useInView({triggerOnce:!0,skip:!n,rootMargin:s,onChange:f}),b=d.ref,g=d.inView;return!n||g?u:i.createElement("div",a({style:{minHeight:1},"data-qaid":"viewport","data-testid":"viewport"},v,{ref:b}),l)},f=function(e){var t=e.errorCatchName,n=void 0===t?"Viewport":t,a=o(e,u);return i.createElement(r.ErrorCatch,{name:n},i.createElement(l,a))};f.displayName="Viewport",exports.Viewport=f;
|
package/Viewport/package.json
CHANGED
package/base/types.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ type BaseProps<T extends React.ElementType, N extends string> = PropsPrefix<
|
|
|
31
31
|
type PolymorphicComponentProp<
|
|
32
32
|
T extends React.ElementType,
|
|
33
33
|
N extends string,
|
|
34
|
-
P = {}
|
|
34
|
+
P = {},
|
|
35
35
|
> = React.ComponentPropsWithoutRef<T> & React.PropsWithChildren<P & BaseProps<T, N>>;
|
|
36
36
|
|
|
37
37
|
type PolymorphicComponentPropWithRef<T extends React.ElementType, N extends string, P = {}> = PolymorphicComponentProp<
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prom-ui/core",
|
|
3
3
|
"author": "e.marchenko",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0-alpha.0",
|
|
5
5
|
"description": "core ui blocks",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"lint": "eslint ./src",
|
|
7
8
|
"ts-types": "tsc --project tsconfig.build.json --declaration --emitDeclarationOnly",
|
|
8
9
|
"ts-check": "tsc --project tsconfig.build.json --noEmit --skipLibCheck",
|
|
9
10
|
"test": "jest --verbose ./src",
|
|
@@ -29,9 +30,6 @@
|
|
|
29
30
|
"access": "public",
|
|
30
31
|
"directory": "dist"
|
|
31
32
|
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@apollo/client": "^3.6.5"
|
|
34
|
-
},
|
|
35
33
|
"dependencies": {
|
|
36
34
|
"@evo/emoji": "^0.2.0",
|
|
37
35
|
"@evo/emoji-text": "^0.1.1",
|
|
@@ -50,7 +48,6 @@
|
|
|
50
48
|
"evokit-list": "^3.3.0",
|
|
51
49
|
"evokit-picture": "^3.2.0",
|
|
52
50
|
"evokit-text": "^3.3.0",
|
|
53
|
-
"intersection-observer": "^0.12.0",
|
|
54
51
|
"qrcode.react": "^3.1.0",
|
|
55
52
|
"react-easy-swipe": "^0.0.22",
|
|
56
53
|
"react-intersection-observer": "^9.16.0",
|
|
@@ -61,15 +58,9 @@
|
|
|
61
58
|
"ttag": "^1.8.0"
|
|
62
59
|
},
|
|
63
60
|
"peerDependencies": {
|
|
64
|
-
"@
|
|
65
|
-
"
|
|
66
|
-
"react": "
|
|
67
|
-
"react-dom": "*"
|
|
68
|
-
},
|
|
69
|
-
"peerDependenciesMeta": {
|
|
70
|
-
"@apollo/client": {
|
|
71
|
-
"optional": true
|
|
72
|
-
}
|
|
61
|
+
"@prom-ui/icons": "^2.0.0",
|
|
62
|
+
"react": ">=18.0.0",
|
|
63
|
+
"react-dom": ">=18.0.0"
|
|
73
64
|
},
|
|
74
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "86a02fb8680b4cb3aa2350f9d3df1f250de36335"
|
|
75
66
|
}
|
package/useBodyTTag/package.json
CHANGED
|
@@ -4,55 +4,54 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var react = require('react');
|
|
6
6
|
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
function _arrayLikeToArray(r, a) {
|
|
8
|
+
(null == a || a > r.length) && (a = r.length);
|
|
9
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
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;
|
|
17
25
|
try {
|
|
18
|
-
if (
|
|
19
|
-
if (Object(
|
|
20
|
-
|
|
21
|
-
} else for (; !(
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
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;
|
|
24
32
|
} finally {
|
|
25
33
|
try {
|
|
26
|
-
if (!
|
|
34
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
27
35
|
} finally {
|
|
28
|
-
if (
|
|
36
|
+
if (o) throw n;
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
|
-
return
|
|
39
|
+
return a;
|
|
32
40
|
}
|
|
33
41
|
}
|
|
34
|
-
function _slicedToArray(arr, i) {
|
|
35
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
36
|
-
}
|
|
37
|
-
function _arrayWithHoles(arr) {
|
|
38
|
-
if (Array.isArray(arr)) return arr;
|
|
39
|
-
}
|
|
40
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
41
|
-
if (!o) return;
|
|
42
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
43
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
44
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
45
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
46
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
47
|
-
}
|
|
48
|
-
function _arrayLikeToArray(arr, len) {
|
|
49
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
50
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
51
|
-
return arr2;
|
|
52
|
-
}
|
|
53
42
|
function _nonIterableRest() {
|
|
54
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.");
|
|
55
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
|
+
}
|
|
56
55
|
|
|
57
56
|
/**
|
|
58
57
|
* Reack hook
|
|
@@ -77,7 +76,6 @@ var useDebounce = function useDebounce(value, delay) {
|
|
|
77
76
|
};
|
|
78
77
|
}, [value, delay] // Only re-call effect if value or delay changes
|
|
79
78
|
);
|
|
80
|
-
|
|
81
79
|
return debouncedValue;
|
|
82
80
|
};
|
|
83
81
|
|
|
@@ -4,55 +4,54 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var react = require('react');
|
|
6
6
|
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
function _arrayLikeToArray(r, a) {
|
|
8
|
+
(null == a || a > r.length) && (a = r.length);
|
|
9
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
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;
|
|
17
25
|
try {
|
|
18
|
-
if (
|
|
19
|
-
if (Object(
|
|
20
|
-
|
|
21
|
-
} else for (; !(
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
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;
|
|
24
32
|
} finally {
|
|
25
33
|
try {
|
|
26
|
-
if (!
|
|
34
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
27
35
|
} finally {
|
|
28
|
-
if (
|
|
36
|
+
if (o) throw n;
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
|
-
return
|
|
39
|
+
return a;
|
|
32
40
|
}
|
|
33
41
|
}
|
|
34
|
-
function _slicedToArray(arr, i) {
|
|
35
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
36
|
-
}
|
|
37
|
-
function _arrayWithHoles(arr) {
|
|
38
|
-
if (Array.isArray(arr)) return arr;
|
|
39
|
-
}
|
|
40
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
41
|
-
if (!o) return;
|
|
42
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
43
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
44
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
45
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
46
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
47
|
-
}
|
|
48
|
-
function _arrayLikeToArray(arr, len) {
|
|
49
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
50
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
51
|
-
return arr2;
|
|
52
|
-
}
|
|
53
42
|
function _nonIterableRest() {
|
|
54
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.");
|
|
55
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
|
+
}
|
|
56
55
|
|
|
57
56
|
/**
|
|
58
57
|
* Reack hook
|
|
@@ -77,7 +76,6 @@ var useDebounce = function useDebounce(value, delay) {
|
|
|
77
76
|
};
|
|
78
77
|
}, [value, delay] // Only re-call effect if value or delay changes
|
|
79
78
|
);
|
|
80
|
-
|
|
81
79
|
return debouncedValue;
|
|
82
80
|
};
|
|
83
81
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react");function t(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var n,u,o,i,a=[],l=!0,c=!1;try{if(o=(e=e.call(r)).next,0===t){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=o.call(e)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react");function t(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}function e(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var n,u,o,i,a=[],l=!0,c=!1;try{if(o=(e=e.call(r)).next,0===t){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=o.call(e)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(r){c=!0,u=r}finally{try{if(!l&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(c)throw u}}return a}}(r,e)||function(r,e){if(r){if("string"==typeof r)return t(r,e);var n={}.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(r,e):void 0}}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}exports.useDebounce=function(t,n){var u=e(r.useState(t),2),o=u[0],i=u[1];return r.useEffect((function(){var r=setTimeout((function(){i(t)}),n);return function(){clearTimeout(r)}}),[t,n]),o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react");function t(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var n,u,o,i,a=[],l=!0,c=!1;try{if(o=(e=e.call(r)).next,0===t){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=o.call(e)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react");function t(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=Array(t);e<t;e++)n[e]=r[e];return n}function e(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,t){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var n,u,o,i,a=[],l=!0,c=!1;try{if(o=(e=e.call(r)).next,0===t){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=o.call(e)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(r){c=!0,u=r}finally{try{if(!l&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(c)throw u}}return a}}(r,e)||function(r,e){if(r){if("string"==typeof r)return t(r,e);var n={}.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(r,e):void 0}}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}exports.useDebounce=function(t,n){var u=e(r.useState(t),2),o=u[0],i=u[1];return r.useEffect((function(){var r=setTimeout((function(){i(t)}),n);return function(){clearTimeout(r)}}),[t,n]),o};
|
package/useDebounce/index.d.ts
CHANGED
package/useDebounce/package.json
CHANGED
package/useForwardRef/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import * as React from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* React hook that permits to use the forwarded ref, or a fallback when it's not provided.
|
|
4
4
|
*/
|
|
5
|
-
export declare const useForwardRef: <T>(ref: React.ForwardedRef<T>, initialValue?:
|
|
5
|
+
export declare const useForwardRef: <T>(ref: React.ForwardedRef<T>, initialValue?: T | null) => React.RefObject<T | null>;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var reactIntersectionObserver = require('react-intersection-observer');
|
|
6
|
-
require('intersection-observer');
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* React-реалізація API Intersection Observer, яка визначає, коли елемент входить у видиму область екрану або залишає її.
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var reactIntersectionObserver = require('react-intersection-observer');
|
|
6
|
-
require('intersection-observer');
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* React-реалізація API Intersection Observer, яка визначає, коли елемент входить у видиму область екрану або залишає її.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react-intersection-observer")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react-intersection-observer").useInView;exports.useInView=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react-intersection-observer")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react-intersection-observer").useInView;exports.useInView=e;
|
package/useInView/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useInView as useReactInView } from 'react-intersection-observer';
|
|
2
|
-
import 'intersection-observer';
|
|
3
2
|
export type UseInViewOptions = NonNullable<Parameters<typeof useReactInView>[0]>;
|
|
4
3
|
/**
|
|
5
4
|
* React-реалізація API Intersection Observer, яка визначає, коли елемент входить у видиму область екрану або залишає її.
|
package/useInView/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prom-ui/core/useInView",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.css"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"intersection-observer": "^0.12.0",
|
|
11
10
|
"react-intersection-observer": "^9.16.0"
|
|
12
11
|
}
|
|
13
12
|
}
|
|
@@ -24,55 +24,54 @@ function _interopNamespaceCompat(e) {
|
|
|
24
24
|
|
|
25
25
|
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
26
26
|
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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;
|
|
37
45
|
try {
|
|
38
|
-
if (
|
|
39
|
-
if (Object(
|
|
40
|
-
|
|
41
|
-
} else for (; !(
|
|
42
|
-
} catch (
|
|
43
|
-
|
|
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;
|
|
44
52
|
} finally {
|
|
45
53
|
try {
|
|
46
|
-
if (!
|
|
54
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
47
55
|
} finally {
|
|
48
|
-
if (
|
|
56
|
+
if (o) throw n;
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
|
-
return
|
|
59
|
+
return a;
|
|
52
60
|
}
|
|
53
61
|
}
|
|
54
|
-
function _slicedToArray(arr, i) {
|
|
55
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
56
|
-
}
|
|
57
|
-
function _arrayWithHoles(arr) {
|
|
58
|
-
if (Array.isArray(arr)) return arr;
|
|
59
|
-
}
|
|
60
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
61
|
-
if (!o) return;
|
|
62
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
63
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
64
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
65
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
66
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
67
|
-
}
|
|
68
|
-
function _arrayLikeToArray(arr, len) {
|
|
69
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
70
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
71
|
-
return arr2;
|
|
72
|
-
}
|
|
73
62
|
function _nonIterableRest() {
|
|
74
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.");
|
|
75
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
|
+
}
|
|
76
75
|
|
|
77
76
|
/**
|
|
78
77
|
* Reack hook
|
|
@@ -87,14 +86,22 @@ var useKeyPress = function useKeyPress(targetKey, handleKeyDown, handleKeyUp) {
|
|
|
87
86
|
// If pressed key is our target key then set to true
|
|
88
87
|
var downHandler = function downHandler(event) {
|
|
89
88
|
if (event.key === targetKey) {
|
|
90
|
-
|
|
89
|
+
if (handleKeyDown) {
|
|
90
|
+
handleKeyDown(event);
|
|
91
|
+
} else {
|
|
92
|
+
setKeyPressed(true);
|
|
93
|
+
}
|
|
91
94
|
}
|
|
92
95
|
};
|
|
93
96
|
|
|
94
97
|
// If released key is our target key then set to false
|
|
95
98
|
var upHandler = function upHandler(event) {
|
|
96
99
|
if (event.key === targetKey) {
|
|
97
|
-
|
|
100
|
+
if (handleKeyUp) {
|
|
101
|
+
handleKeyUp(event);
|
|
102
|
+
} else {
|
|
103
|
+
setKeyPressed(false);
|
|
104
|
+
}
|
|
98
105
|
}
|
|
99
106
|
};
|
|
100
107
|
|