@yamada-ui/modal 0.4.19 → 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.
@@ -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
@@ -10,6 +10,7 @@ import { ModalBodyProps } from './modal-body.mjs';
10
10
  import { ModalFooterProps } from './modal-footer.mjs';
11
11
  import '@yamada-ui/focus-lock';
12
12
  import '@yamada-ui/motion';
13
+ import '@yamada-ui/portal';
13
14
 
14
15
  type DialogOptions = {
15
16
  /**
package/dist/dialog.d.ts CHANGED
@@ -10,6 +10,7 @@ import { ModalBodyProps } from './modal-body.js';
10
10
  import { ModalFooterProps } from './modal-footer.js';
11
11
  import '@yamada-ui/focus-lock';
12
12
  import '@yamada-ui/motion';
13
+ import '@yamada-ui/portal';
13
14
 
14
15
  type DialogOptions = {
15
16
  /**
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
@@ -6,7 +6,7 @@ import {
6
6
  DialogFooter,
7
7
  DialogHeader,
8
8
  DialogOverlay
9
- } from "./chunk-F3SQ4LXC.mjs";
9
+ } from "./chunk-RNM6GCUR.mjs";
10
10
  export {
11
11
  Dialog,
12
12
  DialogBody,
package/dist/drawer.d.mts CHANGED
@@ -10,6 +10,7 @@ import { ModalBodyProps } from './modal-body.mjs';
10
10
  import { ModalFooterProps } from './modal-footer.mjs';
11
11
  import '@yamada-ui/focus-lock';
12
12
  import '@yamada-ui/motion';
13
+ import '@yamada-ui/portal';
13
14
 
14
15
  type DrawerOptions = {
15
16
  /**
package/dist/drawer.d.ts CHANGED
@@ -10,6 +10,7 @@ import { ModalBodyProps } from './modal-body.js';
10
10
  import { ModalFooterProps } from './modal-footer.js';
11
11
  import '@yamada-ui/focus-lock';
12
12
  import '@yamada-ui/motion';
13
+ import '@yamada-ui/portal';
13
14
 
14
15
  type DrawerOptions = {
15
16
  /**
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
@@ -7,7 +7,7 @@ import {
7
7
  DrawerFooter,
8
8
  DrawerHeader,
9
9
  DrawerOverlay
10
- } from "./chunk-F3SQ4LXC.mjs";
10
+ } from "./chunk-RNM6GCUR.mjs";
11
11
  export {
12
12
  Drawer,
13
13
  DrawerBody,
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
@@ -18,7 +18,7 @@ import {
18
18
  ModalFooter,
19
19
  ModalHeader,
20
20
  ModalOverlay
21
- } from "./chunk-F3SQ4LXC.mjs";
21
+ } from "./chunk-RNM6GCUR.mjs";
22
22
  export {
23
23
  Dialog,
24
24
  DialogBody,
@@ -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,
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  ModalBody
4
- } from "./chunk-F3SQ4LXC.mjs";
4
+ } from "./chunk-RNM6GCUR.mjs";
5
5
  export {
6
6
  ModalBody
7
7
  };
@@ -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,
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  ModalCloseButton
4
- } from "./chunk-F3SQ4LXC.mjs";
4
+ } from "./chunk-RNM6GCUR.mjs";
5
5
  export {
6
6
  ModalCloseButton
7
7
  };
@@ -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,
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  ModalFooter
4
- } from "./chunk-F3SQ4LXC.mjs";
4
+ } from "./chunk-RNM6GCUR.mjs";
5
5
  export {
6
6
  ModalFooter
7
7
  };
@@ -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,
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  ModalHeader
4
- } from "./chunk-F3SQ4LXC.mjs";
4
+ } from "./chunk-RNM6GCUR.mjs";
5
5
  export {
6
6
  ModalHeader
7
7
  };
@@ -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,
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  ModalOverlay
4
- } from "./chunk-F3SQ4LXC.mjs";
4
+ } from "./chunk-RNM6GCUR.mjs";
5
5
  export {
6
6
  ModalOverlay
7
7
  };
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
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Modal,
4
4
  useModal
5
- } from "./chunk-F3SQ4LXC.mjs";
5
+ } from "./chunk-RNM6GCUR.mjs";
6
6
  export {
7
7
  Modal,
8
8
  useModal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/modal",
3
- "version": "0.4.19",
3
+ "version": "0.5.0",
4
4
  "description": "Yamada UI modal component",
5
5
  "keywords": [
6
6
  "yamada",
@@ -36,9 +36,9 @@
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",