@yamada-ui/modal 0.4.18 → 0.5.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/dist/{chunk-F3SQ4LXC.mjs → chunk-RNM6GCUR.mjs} +2 -1
- package/dist/dialog.d.mts +1 -0
- package/dist/dialog.d.ts +1 -0
- package/dist/dialog.js +2 -1
- package/dist/dialog.mjs +1 -1
- package/dist/drawer.d.mts +1 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +2 -1
- package/dist/drawer.mjs +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/index.mjs +1 -1
- package/dist/modal-body.js +2 -1
- package/dist/modal-body.mjs +1 -1
- package/dist/modal-close-button.js +2 -1
- package/dist/modal-close-button.mjs +1 -1
- package/dist/modal-footer.js +2 -1
- package/dist/modal-footer.mjs +1 -1
- package/dist/modal-header.js +2 -1
- package/dist/modal-header.mjs +1 -1
- package/dist/modal-overlay.js +2 -1
- package/dist/modal-overlay.mjs +1 -1
- package/dist/modal.d.mts +5 -0
- package/dist/modal.d.ts +5 -0
- package/dist/modal.js +2 -1
- package/dist/modal.mjs +1 -1
- package/package.json +3 -3
|
@@ -415,6 +415,7 @@ var Modal = forwardRef7(
|
|
|
415
415
|
lockFocusAcrossFrames = true,
|
|
416
416
|
animation = "scale",
|
|
417
417
|
duration,
|
|
418
|
+
portalProps,
|
|
418
419
|
...rest
|
|
419
420
|
} = omitThemeProps2(mergedProps);
|
|
420
421
|
const onKeyDown = useCallback(
|
|
@@ -465,7 +466,7 @@ var Modal = forwardRef7(
|
|
|
465
466
|
duration,
|
|
466
467
|
styles
|
|
467
468
|
},
|
|
468
|
-
children: /* @__PURE__ */ jsx7(AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ jsx7(Portal, { children: /* @__PURE__ */ jsx7(
|
|
469
|
+
children: /* @__PURE__ */ jsx7(AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ jsx7(Portal, { ...portalProps, children: /* @__PURE__ */ jsx7(
|
|
469
470
|
FocusLock,
|
|
470
471
|
{
|
|
471
472
|
autoFocus,
|
package/dist/dialog.d.mts
CHANGED
package/dist/dialog.d.ts
CHANGED
package/dist/dialog.js
CHANGED
|
@@ -264,6 +264,7 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
264
264
|
lockFocusAcrossFrames = true,
|
|
265
265
|
animation = "scale",
|
|
266
266
|
duration,
|
|
267
|
+
portalProps,
|
|
267
268
|
...rest
|
|
268
269
|
} = (0, import_core2.omitThemeProps)(mergedProps);
|
|
269
270
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -314,7 +315,7 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
314
315
|
duration,
|
|
315
316
|
styles
|
|
316
317
|
},
|
|
317
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_motion.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
318
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_motion.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
318
319
|
import_focus_lock.FocusLock,
|
|
319
320
|
{
|
|
320
321
|
autoFocus,
|
package/dist/dialog.mjs
CHANGED
package/dist/drawer.d.mts
CHANGED
package/dist/drawer.d.ts
CHANGED
package/dist/drawer.js
CHANGED
|
@@ -410,6 +410,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
410
410
|
lockFocusAcrossFrames = true,
|
|
411
411
|
animation = "scale",
|
|
412
412
|
duration,
|
|
413
|
+
portalProps,
|
|
413
414
|
...rest
|
|
414
415
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
415
416
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -460,7 +461,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
460
461
|
duration,
|
|
461
462
|
styles
|
|
462
463
|
},
|
|
463
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
464
465
|
import_focus_lock.FocusLock,
|
|
465
466
|
{
|
|
466
467
|
autoFocus,
|
package/dist/drawer.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -9,6 +9,7 @@ export { Drawer, DrawerBody, DrawerBodyProps, DrawerCloseButton, DrawerCloseButt
|
|
|
9
9
|
import '@yamada-ui/core';
|
|
10
10
|
import '@yamada-ui/focus-lock';
|
|
11
11
|
import '@yamada-ui/motion';
|
|
12
|
+
import '@yamada-ui/portal';
|
|
12
13
|
import '@yamada-ui/close-button';
|
|
13
14
|
import '@yamada-ui/button';
|
|
14
15
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { Drawer, DrawerBody, DrawerBodyProps, DrawerCloseButton, DrawerCloseButt
|
|
|
9
9
|
import '@yamada-ui/core';
|
|
10
10
|
import '@yamada-ui/focus-lock';
|
|
11
11
|
import '@yamada-ui/motion';
|
|
12
|
+
import '@yamada-ui/portal';
|
|
12
13
|
import '@yamada-ui/close-button';
|
|
13
14
|
import '@yamada-ui/button';
|
|
14
15
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -273,6 +273,7 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
273
273
|
lockFocusAcrossFrames = true,
|
|
274
274
|
animation = "scale",
|
|
275
275
|
duration,
|
|
276
|
+
portalProps,
|
|
276
277
|
...rest
|
|
277
278
|
} = (0, import_core2.omitThemeProps)(mergedProps);
|
|
278
279
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -323,7 +324,7 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
323
324
|
duration,
|
|
324
325
|
styles
|
|
325
326
|
},
|
|
326
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_motion.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
327
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_motion.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
327
328
|
import_focus_lock.FocusLock,
|
|
328
329
|
{
|
|
329
330
|
autoFocus,
|
package/dist/index.mjs
CHANGED
package/dist/modal-body.js
CHANGED
|
@@ -563,6 +563,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
563
563
|
lockFocusAcrossFrames = true,
|
|
564
564
|
animation = "scale",
|
|
565
565
|
duration,
|
|
566
|
+
portalProps,
|
|
566
567
|
...rest
|
|
567
568
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
568
569
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -613,7 +614,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
613
614
|
duration,
|
|
614
615
|
styles
|
|
615
616
|
},
|
|
616
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
617
618
|
import_focus_lock.FocusLock,
|
|
618
619
|
{
|
|
619
620
|
autoFocus,
|
package/dist/modal-body.mjs
CHANGED
|
@@ -562,6 +562,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
562
562
|
lockFocusAcrossFrames = true,
|
|
563
563
|
animation = "scale",
|
|
564
564
|
duration,
|
|
565
|
+
portalProps,
|
|
565
566
|
...rest
|
|
566
567
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
567
568
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -612,7 +613,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
612
613
|
duration,
|
|
613
614
|
styles
|
|
614
615
|
},
|
|
615
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
616
617
|
import_focus_lock.FocusLock,
|
|
617
618
|
{
|
|
618
619
|
autoFocus,
|
package/dist/modal-footer.js
CHANGED
|
@@ -564,6 +564,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
564
564
|
lockFocusAcrossFrames = true,
|
|
565
565
|
animation = "scale",
|
|
566
566
|
duration,
|
|
567
|
+
portalProps,
|
|
567
568
|
...rest
|
|
568
569
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
569
570
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -614,7 +615,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
614
615
|
duration,
|
|
615
616
|
styles
|
|
616
617
|
},
|
|
617
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
618
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
618
619
|
import_focus_lock.FocusLock,
|
|
619
620
|
{
|
|
620
621
|
autoFocus,
|
package/dist/modal-footer.mjs
CHANGED
package/dist/modal-header.js
CHANGED
|
@@ -564,6 +564,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
564
564
|
lockFocusAcrossFrames = true,
|
|
565
565
|
animation = "scale",
|
|
566
566
|
duration,
|
|
567
|
+
portalProps,
|
|
567
568
|
...rest
|
|
568
569
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
569
570
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -614,7 +615,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
614
615
|
duration,
|
|
615
616
|
styles
|
|
616
617
|
},
|
|
617
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
618
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
618
619
|
import_focus_lock.FocusLock,
|
|
619
620
|
{
|
|
620
621
|
autoFocus,
|
package/dist/modal-header.mjs
CHANGED
package/dist/modal-overlay.js
CHANGED
|
@@ -546,6 +546,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
546
546
|
lockFocusAcrossFrames = true,
|
|
547
547
|
animation = "scale",
|
|
548
548
|
duration,
|
|
549
|
+
portalProps,
|
|
549
550
|
...rest
|
|
550
551
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
551
552
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -596,7 +597,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
596
597
|
duration,
|
|
597
598
|
styles
|
|
598
599
|
},
|
|
599
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_motion.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
600
601
|
import_focus_lock.FocusLock,
|
|
601
602
|
{
|
|
602
603
|
autoFocus,
|
package/dist/modal-overlay.mjs
CHANGED
package/dist/modal.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import * as _yamada_ui_core from '@yamada-ui/core';
|
|
|
2
2
|
import { HTMLUIProps, ThemeProps, CSSUIObject, Token, CSSUIProps } from '@yamada-ui/core';
|
|
3
3
|
import { FocusLockProps } from '@yamada-ui/focus-lock';
|
|
4
4
|
import { HTMLMotionProps, MotionTransitionProperties } from '@yamada-ui/motion';
|
|
5
|
+
import { PortalProps } from '@yamada-ui/portal';
|
|
5
6
|
|
|
6
7
|
type ModalContext = ModalOptions & {
|
|
7
8
|
styles: Record<string, CSSUIObject>;
|
|
@@ -94,6 +95,10 @@ type ModalOptions = Pick<FocusLockProps, "autoFocus" | "initialFocusRef" | "fina
|
|
|
94
95
|
* The animation duration.
|
|
95
96
|
*/
|
|
96
97
|
duration?: MotionTransitionProperties["duration"];
|
|
98
|
+
/**
|
|
99
|
+
* Props to be forwarded to the portal component.
|
|
100
|
+
*/
|
|
101
|
+
portalProps?: Omit<PortalProps, "children">;
|
|
97
102
|
};
|
|
98
103
|
type ModalProps = Omit<HTMLUIProps<"section">, "scrollBehavior" | "animation"> & Omit<HTMLMotionProps<"section">, "color" | "transition"> & ThemeProps<"Modal"> & ModalOptions;
|
|
99
104
|
declare const Modal: _yamada_ui_core.Component<"section", ModalProps>;
|
package/dist/modal.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as _yamada_ui_core from '@yamada-ui/core';
|
|
|
2
2
|
import { HTMLUIProps, ThemeProps, CSSUIObject, Token, CSSUIProps } from '@yamada-ui/core';
|
|
3
3
|
import { FocusLockProps } from '@yamada-ui/focus-lock';
|
|
4
4
|
import { HTMLMotionProps, MotionTransitionProperties } from '@yamada-ui/motion';
|
|
5
|
+
import { PortalProps } from '@yamada-ui/portal';
|
|
5
6
|
|
|
6
7
|
type ModalContext = ModalOptions & {
|
|
7
8
|
styles: Record<string, CSSUIObject>;
|
|
@@ -94,6 +95,10 @@ type ModalOptions = Pick<FocusLockProps, "autoFocus" | "initialFocusRef" | "fina
|
|
|
94
95
|
* The animation duration.
|
|
95
96
|
*/
|
|
96
97
|
duration?: MotionTransitionProperties["duration"];
|
|
98
|
+
/**
|
|
99
|
+
* Props to be forwarded to the portal component.
|
|
100
|
+
*/
|
|
101
|
+
portalProps?: Omit<PortalProps, "children">;
|
|
97
102
|
};
|
|
98
103
|
type ModalProps = Omit<HTMLUIProps<"section">, "scrollBehavior" | "animation"> & Omit<HTMLMotionProps<"section">, "color" | "transition"> & ThemeProps<"Modal"> & ModalOptions;
|
|
99
104
|
declare const Modal: _yamada_ui_core.Component<"section", ModalProps>;
|
package/dist/modal.js
CHANGED
|
@@ -586,6 +586,7 @@ var Modal = (0, import_core8.forwardRef)(
|
|
|
586
586
|
lockFocusAcrossFrames = true,
|
|
587
587
|
animation = "scale",
|
|
588
588
|
duration,
|
|
589
|
+
portalProps,
|
|
589
590
|
...rest
|
|
590
591
|
} = (0, import_core8.omitThemeProps)(mergedProps);
|
|
591
592
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -636,7 +637,7 @@ var Modal = (0, import_core8.forwardRef)(
|
|
|
636
637
|
duration,
|
|
637
638
|
styles
|
|
638
639
|
},
|
|
639
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
640
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_motion2.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
640
641
|
import_focus_lock.FocusLock,
|
|
641
642
|
{
|
|
642
643
|
autoFocus,
|
package/dist/modal.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/modal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Yamada UI modal component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"react-remove-scroll": "^2.5.4",
|
|
39
|
-
"@yamada-ui/core": "0.12.6",
|
|
40
39
|
"@yamada-ui/utils": "0.3.3",
|
|
41
40
|
"@yamada-ui/motion": "0.4.16",
|
|
41
|
+
"@yamada-ui/core": "0.12.6",
|
|
42
42
|
"@yamada-ui/portal": "0.3.6",
|
|
43
43
|
"@yamada-ui/button": "0.3.17",
|
|
44
44
|
"@yamada-ui/focus-lock": "0.3.5",
|
|
45
45
|
"@yamada-ui/close-button": "0.3.16",
|
|
46
|
-
"@yamada-ui/transitions": "0.3.
|
|
46
|
+
"@yamada-ui/transitions": "0.3.18",
|
|
47
47
|
"@yamada-ui/use-value": "0.2.16"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|