@doist/reactist 21.2.2 → 22.0.1-beta
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/dist/reactist.cjs.development.js +139 -185
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/checkbox-field/checkbox-field.js +1 -1
- package/es/checkbox-field/checkbox-field.js.map +1 -1
- package/es/checkbox-field/use-fork-ref.js +35 -0
- package/es/checkbox-field/use-fork-ref.js.map +1 -0
- package/es/menu/menu.js +35 -38
- package/es/menu/menu.js.map +1 -1
- package/es/modal/modal.js +3 -4
- package/es/modal/modal.js.map +1 -1
- package/es/tabs/tabs.js +40 -47
- package/es/tabs/tabs.js.map +1 -1
- package/es/toast/use-toasts.js +1 -1
- package/es/toast/use-toasts.js.map +1 -1
- package/es/tooltip/tooltip.js +20 -62
- package/es/tooltip/tooltip.js.map +1 -1
- package/lib/checkbox-field/checkbox-field.js +1 -1
- package/lib/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/checkbox-field/use-fork-ref.d.ts +11 -0
- package/lib/checkbox-field/use-fork-ref.js +2 -0
- package/lib/checkbox-field/use-fork-ref.js.map +1 -0
- package/lib/menu/menu.d.ts +4 -4
- package/lib/menu/menu.js +1 -1
- package/lib/menu/menu.js.map +1 -1
- package/lib/modal/modal.d.ts +1 -2
- package/lib/modal/modal.js +1 -1
- package/lib/modal/modal.js.map +1 -1
- package/lib/tabs/tabs.d.ts +10 -8
- package/lib/tabs/tabs.js +1 -1
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/toast/use-toasts.js +1 -1
- package/lib/toast/use-toasts.js.map +1 -1
- package/lib/tooltip/tooltip.d.ts +2 -4
- package/lib/tooltip/tooltip.js +1 -1
- package/lib/tooltip/tooltip.js.map +1 -1
- package/lib/utils/test-helpers.d.ts +13 -2
- package/package.json +2 -4
- package/es/hooks/use-previous/use-previous.js +0 -26
- package/es/hooks/use-previous/use-previous.js.map +0 -1
- package/lib/hooks/use-previous/use-previous.js +0 -2
- package/lib/hooks/use-previous/use-previous.js.map +0 -1
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"email": "henning@doist.com",
|
|
7
7
|
"url": "http://doist.com"
|
|
8
8
|
},
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "22.0.1-beta",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"homepage": "https://github.com/Doist/reactist#readme",
|
|
12
12
|
"repository": {
|
|
@@ -143,11 +143,9 @@
|
|
|
143
143
|
"webpack": "^4.43.0"
|
|
144
144
|
},
|
|
145
145
|
"dependencies": {
|
|
146
|
+
"@ariakit/react": "^0.2.3",
|
|
146
147
|
"@reach/dialog": "^0.16.0",
|
|
147
148
|
"aria-hidden": "^1.2.1",
|
|
148
|
-
"ariakit": "2.0.0-next.43",
|
|
149
|
-
"ariakit-react-utils": "0.17.0-next.27",
|
|
150
|
-
"ariakit-utils": "0.17.0-next.27",
|
|
151
149
|
"dayjs": "^1.8.10",
|
|
152
150
|
"patch-package": "^6.4.6",
|
|
153
151
|
"react-focus-lock": "^2.9.1",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* usePrevious tracks the change of the given value -
|
|
5
|
-
* when a given value has been changed from a previous call,
|
|
6
|
-
* it will return the value prior to the change.
|
|
7
|
-
*
|
|
8
|
-
* Example:
|
|
9
|
-
*
|
|
10
|
-
* const [x, setX] = useState(1)
|
|
11
|
-
* const prevX = usePrevious(x)
|
|
12
|
-
*
|
|
13
|
-
* Suppose `setX(2)` is called, then in the next component render
|
|
14
|
-
* x = 2 and prevX = 1
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
function usePrevious(value) {
|
|
18
|
-
const ref = useRef(null);
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
ref.current = value;
|
|
21
|
-
}, [value]);
|
|
22
|
-
return ref.current;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { usePrevious };
|
|
26
|
-
//# sourceMappingURL=use-previous.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-previous.js","sources":["../../../src/hooks/use-previous/use-previous.ts"],"sourcesContent":["import * as React from 'react'\n\n/**\n * usePrevious tracks the change of the given value -\n * when a given value has been changed from a previous call,\n * it will return the value prior to the change.\n *\n * Example:\n *\n * const [x, setX] = useState(1)\n * const prevX = usePrevious(x)\n *\n * Suppose `setX(2)` is called, then in the next component render\n * x = 2 and prevX = 1\n */\nfunction usePrevious<T>(value: T): T | null {\n const ref = React.useRef<T | null>(null)\n\n React.useEffect(() => {\n ref.current = value\n }, [value])\n\n return ref.current\n}\n\nexport { usePrevious }\n"],"names":["usePrevious","value","ref","React","current"],"mappings":";;AAEA;;;;;;;;;;;;;;AAaA,SAASA,WAAT,CAAwBC,KAAxB;EACI,MAAMC,GAAG,GAAGC,MAAA,CAAuB,IAAvB,CAAZ;EAEAA,SAAA,CAAgB;IACZD,GAAG,CAACE,OAAJ,GAAcH,KAAd;GADJ,EAEG,CAACA,KAAD,CAFH;EAIA,OAAOC,GAAG,CAACE,OAAX;AACH;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-previous.js","sources":["../../../src/hooks/use-previous/use-previous.ts"],"sourcesContent":["import * as React from 'react'\n\n/**\n * usePrevious tracks the change of the given value -\n * when a given value has been changed from a previous call,\n * it will return the value prior to the change.\n *\n * Example:\n *\n * const [x, setX] = useState(1)\n * const prevX = usePrevious(x)\n *\n * Suppose `setX(2)` is called, then in the next component render\n * x = 2 and prevX = 1\n */\nfunction usePrevious<T>(value: T): T | null {\n const ref = React.useRef<T | null>(null)\n\n React.useEffect(() => {\n ref.current = value\n }, [value])\n\n return ref.current\n}\n\nexport { usePrevious }\n"],"names":["value","ref","React","current"],"mappings":"+GAeA,SAAwBA,GACpB,MAAMC,EAAMC,SAAuB,MAMnC,OAJAA,YAAgB,KACZD,EAAIE,QAAUH,GACf,CAACA,IAEGC,EAAIE"}
|