@yamada-ui/modal 0.4.19 → 0.5.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/dist/{chunk-F3SQ4LXC.mjs → chunk-7OEZ4TWM.mjs} +5 -2
- package/dist/dialog.d.mts +1 -0
- package/dist/dialog.d.ts +1 -0
- package/dist/dialog.js +5 -2
- package/dist/dialog.mjs +1 -1
- package/dist/drawer.d.mts +1 -0
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.js +5 -2
- package/dist/drawer.mjs +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -2
- package/dist/index.mjs +1 -1
- package/dist/modal-body.js +5 -2
- package/dist/modal-body.mjs +1 -1
- package/dist/modal-close-button.js +5 -2
- package/dist/modal-close-button.mjs +1 -1
- package/dist/modal-footer.js +5 -2
- package/dist/modal-footer.mjs +1 -1
- package/dist/modal-header.js +5 -2
- package/dist/modal-header.mjs +1 -1
- package/dist/modal-overlay.js +5 -2
- 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 +5 -2
- package/dist/modal.mjs +1 -1
- package/package.json +2 -2
|
@@ -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,
|
|
@@ -606,6 +607,7 @@ var Drawer = forwardRef8(
|
|
|
606
607
|
closeOnEsc,
|
|
607
608
|
lockFocusAcrossFrames,
|
|
608
609
|
duration = { enter: 0.4, exit: 0.3 },
|
|
610
|
+
portalProps,
|
|
609
611
|
...rest
|
|
610
612
|
} = omitThemeProps3(mergedProps);
|
|
611
613
|
const validChildren = getValidChildren3(children);
|
|
@@ -634,7 +636,8 @@ var Drawer = forwardRef8(
|
|
|
634
636
|
closeOnOverlay,
|
|
635
637
|
closeOnEsc,
|
|
636
638
|
lockFocusAcrossFrames,
|
|
637
|
-
duration
|
|
639
|
+
duration,
|
|
640
|
+
portalProps
|
|
638
641
|
},
|
|
639
642
|
children: [
|
|
640
643
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ jsx8(DrawerOverlay, {}) : null,
|
package/dist/dialog.d.mts
CHANGED
package/dist/dialog.d.ts
CHANGED
package/dist/dialog.js
CHANGED
|
@@ -79,6 +79,7 @@ var Drawer = (0, import_core.forwardRef)(
|
|
|
79
79
|
closeOnEsc,
|
|
80
80
|
lockFocusAcrossFrames,
|
|
81
81
|
duration = { enter: 0.4, exit: 0.3 },
|
|
82
|
+
portalProps,
|
|
82
83
|
...rest
|
|
83
84
|
} = (0, import_core.omitThemeProps)(mergedProps);
|
|
84
85
|
const validChildren = (0, import_utils.getValidChildren)(children);
|
|
@@ -107,7 +108,8 @@ var Drawer = (0, import_core.forwardRef)(
|
|
|
107
108
|
closeOnOverlay,
|
|
108
109
|
closeOnEsc,
|
|
109
110
|
lockFocusAcrossFrames,
|
|
110
|
-
duration
|
|
111
|
+
duration,
|
|
112
|
+
portalProps
|
|
111
113
|
},
|
|
112
114
|
children: [
|
|
113
115
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerOverlay, {}) : null,
|
|
@@ -264,6 +266,7 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
264
266
|
lockFocusAcrossFrames = true,
|
|
265
267
|
animation = "scale",
|
|
266
268
|
duration,
|
|
269
|
+
portalProps,
|
|
267
270
|
...rest
|
|
268
271
|
} = (0, import_core2.omitThemeProps)(mergedProps);
|
|
269
272
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -314,7 +317,7 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
314
317
|
duration,
|
|
315
318
|
styles
|
|
316
319
|
},
|
|
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)(
|
|
320
|
+
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
321
|
import_focus_lock.FocusLock,
|
|
319
322
|
{
|
|
320
323
|
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,
|
|
@@ -601,6 +602,7 @@ var Drawer = (0, import_core8.forwardRef)(
|
|
|
601
602
|
closeOnEsc,
|
|
602
603
|
lockFocusAcrossFrames,
|
|
603
604
|
duration = { enter: 0.4, exit: 0.3 },
|
|
605
|
+
portalProps,
|
|
604
606
|
...rest
|
|
605
607
|
} = (0, import_core8.omitThemeProps)(mergedProps);
|
|
606
608
|
const validChildren = (0, import_utils8.getValidChildren)(children);
|
|
@@ -629,7 +631,8 @@ var Drawer = (0, import_core8.forwardRef)(
|
|
|
629
631
|
closeOnOverlay,
|
|
630
632
|
closeOnEsc,
|
|
631
633
|
lockFocusAcrossFrames,
|
|
632
|
-
duration
|
|
634
|
+
duration,
|
|
635
|
+
portalProps
|
|
633
636
|
},
|
|
634
637
|
children: [
|
|
635
638
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DrawerOverlay, {}) : null,
|
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
|
@@ -88,6 +88,7 @@ var Drawer = (0, import_core.forwardRef)(
|
|
|
88
88
|
closeOnEsc,
|
|
89
89
|
lockFocusAcrossFrames,
|
|
90
90
|
duration = { enter: 0.4, exit: 0.3 },
|
|
91
|
+
portalProps,
|
|
91
92
|
...rest
|
|
92
93
|
} = (0, import_core.omitThemeProps)(mergedProps);
|
|
93
94
|
const validChildren = (0, import_utils.getValidChildren)(children);
|
|
@@ -116,7 +117,8 @@ var Drawer = (0, import_core.forwardRef)(
|
|
|
116
117
|
closeOnOverlay,
|
|
117
118
|
closeOnEsc,
|
|
118
119
|
lockFocusAcrossFrames,
|
|
119
|
-
duration
|
|
120
|
+
duration,
|
|
121
|
+
portalProps
|
|
120
122
|
},
|
|
121
123
|
children: [
|
|
122
124
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerOverlay, {}) : null,
|
|
@@ -273,6 +275,7 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
273
275
|
lockFocusAcrossFrames = true,
|
|
274
276
|
animation = "scale",
|
|
275
277
|
duration,
|
|
278
|
+
portalProps,
|
|
276
279
|
...rest
|
|
277
280
|
} = (0, import_core2.omitThemeProps)(mergedProps);
|
|
278
281
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -323,7 +326,7 @@ var Modal = (0, import_core2.forwardRef)(
|
|
|
323
326
|
duration,
|
|
324
327
|
styles
|
|
325
328
|
},
|
|
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)(
|
|
329
|
+
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
330
|
import_focus_lock.FocusLock,
|
|
328
331
|
{
|
|
329
332
|
autoFocus,
|
package/dist/index.mjs
CHANGED
package/dist/modal-body.js
CHANGED
|
@@ -378,6 +378,7 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
378
378
|
closeOnEsc,
|
|
379
379
|
lockFocusAcrossFrames,
|
|
380
380
|
duration = { enter: 0.4, exit: 0.3 },
|
|
381
|
+
portalProps,
|
|
381
382
|
...rest
|
|
382
383
|
} = (0, import_core6.omitThemeProps)(mergedProps);
|
|
383
384
|
const validChildren = (0, import_utils6.getValidChildren)(children);
|
|
@@ -406,7 +407,8 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
406
407
|
closeOnOverlay,
|
|
407
408
|
closeOnEsc,
|
|
408
409
|
lockFocusAcrossFrames,
|
|
409
|
-
duration
|
|
410
|
+
duration,
|
|
411
|
+
portalProps
|
|
410
412
|
},
|
|
411
413
|
children: [
|
|
412
414
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerOverlay, {}) : null,
|
|
@@ -563,6 +565,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
563
565
|
lockFocusAcrossFrames = true,
|
|
564
566
|
animation = "scale",
|
|
565
567
|
duration,
|
|
568
|
+
portalProps,
|
|
566
569
|
...rest
|
|
567
570
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
568
571
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -613,7 +616,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
613
616
|
duration,
|
|
614
617
|
styles
|
|
615
618
|
},
|
|
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)(
|
|
619
|
+
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
620
|
import_focus_lock.FocusLock,
|
|
618
621
|
{
|
|
619
622
|
autoFocus,
|
package/dist/modal-body.mjs
CHANGED
|
@@ -377,6 +377,7 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
377
377
|
closeOnEsc,
|
|
378
378
|
lockFocusAcrossFrames,
|
|
379
379
|
duration = { enter: 0.4, exit: 0.3 },
|
|
380
|
+
portalProps,
|
|
380
381
|
...rest
|
|
381
382
|
} = (0, import_core6.omitThemeProps)(mergedProps);
|
|
382
383
|
const validChildren = (0, import_utils6.getValidChildren)(children);
|
|
@@ -405,7 +406,8 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
405
406
|
closeOnOverlay,
|
|
406
407
|
closeOnEsc,
|
|
407
408
|
lockFocusAcrossFrames,
|
|
408
|
-
duration
|
|
409
|
+
duration,
|
|
410
|
+
portalProps
|
|
409
411
|
},
|
|
410
412
|
children: [
|
|
411
413
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerOverlay, {}) : null,
|
|
@@ -562,6 +564,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
562
564
|
lockFocusAcrossFrames = true,
|
|
563
565
|
animation = "scale",
|
|
564
566
|
duration,
|
|
567
|
+
portalProps,
|
|
565
568
|
...rest
|
|
566
569
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
567
570
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -612,7 +615,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
612
615
|
duration,
|
|
613
616
|
styles
|
|
614
617
|
},
|
|
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)(
|
|
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)(
|
|
616
619
|
import_focus_lock.FocusLock,
|
|
617
620
|
{
|
|
618
621
|
autoFocus,
|
package/dist/modal-footer.js
CHANGED
|
@@ -379,6 +379,7 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
379
379
|
closeOnEsc,
|
|
380
380
|
lockFocusAcrossFrames,
|
|
381
381
|
duration = { enter: 0.4, exit: 0.3 },
|
|
382
|
+
portalProps,
|
|
382
383
|
...rest
|
|
383
384
|
} = (0, import_core6.omitThemeProps)(mergedProps);
|
|
384
385
|
const validChildren = (0, import_utils6.getValidChildren)(children);
|
|
@@ -407,7 +408,8 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
407
408
|
closeOnOverlay,
|
|
408
409
|
closeOnEsc,
|
|
409
410
|
lockFocusAcrossFrames,
|
|
410
|
-
duration
|
|
411
|
+
duration,
|
|
412
|
+
portalProps
|
|
411
413
|
},
|
|
412
414
|
children: [
|
|
413
415
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerOverlay, {}) : null,
|
|
@@ -564,6 +566,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
564
566
|
lockFocusAcrossFrames = true,
|
|
565
567
|
animation = "scale",
|
|
566
568
|
duration,
|
|
569
|
+
portalProps,
|
|
567
570
|
...rest
|
|
568
571
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
569
572
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -614,7 +617,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
614
617
|
duration,
|
|
615
618
|
styles
|
|
616
619
|
},
|
|
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)(
|
|
620
|
+
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
621
|
import_focus_lock.FocusLock,
|
|
619
622
|
{
|
|
620
623
|
autoFocus,
|
package/dist/modal-footer.mjs
CHANGED
package/dist/modal-header.js
CHANGED
|
@@ -379,6 +379,7 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
379
379
|
closeOnEsc,
|
|
380
380
|
lockFocusAcrossFrames,
|
|
381
381
|
duration = { enter: 0.4, exit: 0.3 },
|
|
382
|
+
portalProps,
|
|
382
383
|
...rest
|
|
383
384
|
} = (0, import_core6.omitThemeProps)(mergedProps);
|
|
384
385
|
const validChildren = (0, import_utils6.getValidChildren)(children);
|
|
@@ -407,7 +408,8 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
407
408
|
closeOnOverlay,
|
|
408
409
|
closeOnEsc,
|
|
409
410
|
lockFocusAcrossFrames,
|
|
410
|
-
duration
|
|
411
|
+
duration,
|
|
412
|
+
portalProps
|
|
411
413
|
},
|
|
412
414
|
children: [
|
|
413
415
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerOverlay, {}) : null,
|
|
@@ -564,6 +566,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
564
566
|
lockFocusAcrossFrames = true,
|
|
565
567
|
animation = "scale",
|
|
566
568
|
duration,
|
|
569
|
+
portalProps,
|
|
567
570
|
...rest
|
|
568
571
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
569
572
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -614,7 +617,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
614
617
|
duration,
|
|
615
618
|
styles
|
|
616
619
|
},
|
|
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)(
|
|
620
|
+
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
621
|
import_focus_lock.FocusLock,
|
|
619
622
|
{
|
|
620
623
|
autoFocus,
|
package/dist/modal-header.mjs
CHANGED
package/dist/modal-overlay.js
CHANGED
|
@@ -361,6 +361,7 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
361
361
|
closeOnEsc,
|
|
362
362
|
lockFocusAcrossFrames,
|
|
363
363
|
duration = { enter: 0.4, exit: 0.3 },
|
|
364
|
+
portalProps,
|
|
364
365
|
...rest
|
|
365
366
|
} = (0, import_core6.omitThemeProps)(mergedProps);
|
|
366
367
|
const validChildren = (0, import_utils6.getValidChildren)(children);
|
|
@@ -389,7 +390,8 @@ var Drawer = (0, import_core6.forwardRef)(
|
|
|
389
390
|
closeOnOverlay,
|
|
390
391
|
closeOnEsc,
|
|
391
392
|
lockFocusAcrossFrames,
|
|
392
|
-
duration
|
|
393
|
+
duration,
|
|
394
|
+
portalProps
|
|
393
395
|
},
|
|
394
396
|
children: [
|
|
395
397
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerOverlay, {}) : null,
|
|
@@ -546,6 +548,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
546
548
|
lockFocusAcrossFrames = true,
|
|
547
549
|
animation = "scale",
|
|
548
550
|
duration,
|
|
551
|
+
portalProps,
|
|
549
552
|
...rest
|
|
550
553
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
551
554
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -596,7 +599,7 @@ var Modal = (0, import_core7.forwardRef)(
|
|
|
596
599
|
duration,
|
|
597
600
|
styles
|
|
598
601
|
},
|
|
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)(
|
|
602
|
+
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
603
|
import_focus_lock.FocusLock,
|
|
601
604
|
{
|
|
602
605
|
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
|
@@ -401,6 +401,7 @@ var Drawer = (0, import_core7.forwardRef)(
|
|
|
401
401
|
closeOnEsc,
|
|
402
402
|
lockFocusAcrossFrames,
|
|
403
403
|
duration = { enter: 0.4, exit: 0.3 },
|
|
404
|
+
portalProps,
|
|
404
405
|
...rest
|
|
405
406
|
} = (0, import_core7.omitThemeProps)(mergedProps);
|
|
406
407
|
const validChildren = (0, import_utils7.getValidChildren)(children);
|
|
@@ -429,7 +430,8 @@ var Drawer = (0, import_core7.forwardRef)(
|
|
|
429
430
|
closeOnOverlay,
|
|
430
431
|
closeOnEsc,
|
|
431
432
|
lockFocusAcrossFrames,
|
|
432
|
-
duration
|
|
433
|
+
duration,
|
|
434
|
+
portalProps
|
|
433
435
|
},
|
|
434
436
|
children: [
|
|
435
437
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DrawerOverlay, {}) : null,
|
|
@@ -586,6 +588,7 @@ var Modal = (0, import_core8.forwardRef)(
|
|
|
586
588
|
lockFocusAcrossFrames = true,
|
|
587
589
|
animation = "scale",
|
|
588
590
|
duration,
|
|
591
|
+
portalProps,
|
|
589
592
|
...rest
|
|
590
593
|
} = (0, import_core8.omitThemeProps)(mergedProps);
|
|
591
594
|
const onKeyDown = (0, import_react.useCallback)(
|
|
@@ -636,7 +639,7 @@ var Modal = (0, import_core8.forwardRef)(
|
|
|
636
639
|
duration,
|
|
637
640
|
styles
|
|
638
641
|
},
|
|
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)(
|
|
642
|
+
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
643
|
import_focus_lock.FocusLock,
|
|
641
644
|
{
|
|
642
645
|
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.1",
|
|
4
4
|
"description": "Yamada UI modal component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@yamada-ui/utils": "0.3.3",
|
|
41
41
|
"@yamada-ui/motion": "0.4.16",
|
|
42
42
|
"@yamada-ui/portal": "0.3.6",
|
|
43
|
-
"@yamada-ui/button": "0.3.
|
|
43
|
+
"@yamada-ui/button": "0.3.18",
|
|
44
44
|
"@yamada-ui/focus-lock": "0.3.5",
|
|
45
45
|
"@yamada-ui/close-button": "0.3.16",
|
|
46
46
|
"@yamada-ui/transitions": "0.3.18",
|