@noya-app/noya-designsystem 0.1.83 → 0.1.84
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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +6 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/contexts/DialogContext.tsx +12 -5
- package/src/contexts/__tests__/DialogContext.test.tsx +142 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -11,14 +11,14 @@ $ tsup
|
|
|
11
11
|
[32mCJS[39m [1mdist/index.js [22m[32m1.41 MB[39m
|
|
12
12
|
[32mCJS[39m [1mdist/emojis.js.map [22m[32m194.00 B[39m
|
|
13
13
|
[32mCJS[39m [1mdist/index.js.map [22m[32m2.74 MB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 1686ms
|
|
15
15
|
[32mESM[39m [1mdist/emojis.mjs [22m[32m300.00 B[39m
|
|
16
16
|
[32mESM[39m [1mdist/chunk-L6E2LZOL.mjs [22m[32m2.02 KB[39m
|
|
17
17
|
[32mESM[39m [1mdist/index.mjs [22m[32m1.37 MB[39m
|
|
18
18
|
[32mESM[39m [1mdist/emojis.mjs.map [22m[32m157.00 B[39m
|
|
19
19
|
[32mESM[39m [1mdist/chunk-L6E2LZOL.mjs.map [22m[32m71.00 B[39m
|
|
20
20
|
[32mESM[39m [1mdist/index.mjs.map [22m[32m2.74 MB[39m
|
|
21
|
-
[32mESM[39m ⚡️ Build success in
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 1770ms
|
|
22
22
|
Browserslist: caniuse-lite is outdated. Please run:
|
|
23
23
|
npx update-browserslist-db@latest
|
|
24
24
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
@@ -28,9 +28,9 @@ Browserslist: browsers data (caniuse-lite) is 15 months old. Please run:
|
|
|
28
28
|
|
|
29
29
|
Rebuilding...
|
|
30
30
|
|
|
31
|
-
Done in
|
|
31
|
+
Done in 2487ms.
|
|
32
32
|
|
|
33
|
-
[32mDTS[39m ⚡️ Build success in
|
|
33
|
+
[32mDTS[39m ⚡️ Build success in 16045ms
|
|
34
34
|
[32mDTS[39m [1mdist/emojis.d.ts [22m[32m43.00 B[39m
|
|
35
35
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m125.77 KB[39m
|
|
36
36
|
[32mDTS[39m [1mdist/emojis.d.mts [22m[32m43.00 B[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -22255,17 +22255,19 @@ var DialogProvider = function DialogProvider2({
|
|
|
22255
22255
|
const inputRef = (0, import_react35.useRef)(null);
|
|
22256
22256
|
const confirmButtonRef = (0, import_react35.useRef)(null);
|
|
22257
22257
|
const dialogRef = (0, import_react35.useRef)(null);
|
|
22258
|
+
const contentsType = contents?.type;
|
|
22259
|
+
const contentsInstance = contents?.resolve;
|
|
22258
22260
|
import_react35.default.useEffect(() => {
|
|
22259
|
-
if (!
|
|
22261
|
+
if (!contentsType || !contentsInstance) return;
|
|
22260
22262
|
requestAnimationFrame(() => {
|
|
22261
|
-
if (
|
|
22263
|
+
if (contentsType === "input") {
|
|
22262
22264
|
inputRef.current?.focus();
|
|
22263
22265
|
inputRef.current?.setSelectionRange(0, inputRef.current.value.length);
|
|
22264
|
-
} else if (
|
|
22266
|
+
} else if (contentsType === "confirmation") {
|
|
22265
22267
|
confirmButtonRef.current?.focus();
|
|
22266
22268
|
}
|
|
22267
22269
|
});
|
|
22268
|
-
}, [
|
|
22270
|
+
}, [contentsType, contentsInstance]);
|
|
22269
22271
|
const containsElement = (0, import_react35.useCallback)((element) => {
|
|
22270
22272
|
if (!dialogRef.current) return false;
|
|
22271
22273
|
return dialogRef.current.containsElement(element);
|