@yamada-ui/modal 1.3.12-next-20241005220055 → 1.3.12-next-20241008193728

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. package/dist/{chunk-KNCDANWW.mjs → chunk-37MTMX5B.mjs} +3 -3
  2. package/dist/{chunk-KNCDANWW.mjs.map → chunk-37MTMX5B.mjs.map} +1 -1
  3. package/dist/{chunk-SHVXETTC.mjs → chunk-6XAWCUQQ.mjs} +3 -3
  4. package/dist/{chunk-SHVXETTC.mjs.map → chunk-6XAWCUQQ.mjs.map} +1 -1
  5. package/dist/{chunk-3K5JY6KM.mjs → chunk-7EVREJIH.mjs} +19 -19
  6. package/dist/chunk-7EVREJIH.mjs.map +1 -0
  7. package/dist/{chunk-IIKFZB3M.mjs → chunk-7I5LX3VI.mjs} +43 -43
  8. package/dist/chunk-7I5LX3VI.mjs.map +1 -0
  9. package/dist/{chunk-3BTHYYAS.mjs → chunk-7THNENCM.mjs} +36 -32
  10. package/dist/chunk-7THNENCM.mjs.map +1 -0
  11. package/dist/{chunk-4J4ISPN7.mjs → chunk-A7WOQJCA.mjs} +1 -1
  12. package/dist/chunk-A7WOQJCA.mjs.map +1 -0
  13. package/dist/{chunk-2LLDUYTG.mjs → chunk-BNRFPNWF.mjs} +3 -3
  14. package/dist/{chunk-2LLDUYTG.mjs.map → chunk-BNRFPNWF.mjs.map} +1 -1
  15. package/dist/{chunk-HUI5FLPV.mjs → chunk-EDCPPJBS.mjs} +3 -3
  16. package/dist/{chunk-HUI5FLPV.mjs.map → chunk-EDCPPJBS.mjs.map} +1 -1
  17. package/dist/{chunk-XKKFTAXR.mjs → chunk-G7R3GU24.mjs} +3 -3
  18. package/dist/{chunk-XKKFTAXR.mjs.map → chunk-G7R3GU24.mjs.map} +1 -1
  19. package/dist/{chunk-LG73B7RP.mjs → chunk-L353QQ6S.mjs} +4 -4
  20. package/dist/{chunk-LG73B7RP.mjs.map → chunk-L353QQ6S.mjs.map} +1 -1
  21. package/dist/{chunk-BQAR3Q4F.mjs → chunk-LUSTM3GA.mjs} +3 -3
  22. package/dist/{chunk-SIKHBBVB.mjs → chunk-LYMMHCHF.mjs} +4 -4
  23. package/dist/{chunk-SIKHBBVB.mjs.map → chunk-LYMMHCHF.mjs.map} +1 -1
  24. package/dist/{chunk-K4MJNSAV.mjs → chunk-OAECULYV.mjs} +2 -2
  25. package/dist/{chunk-LK36SQZ5.mjs → chunk-P5SCGBP7.mjs} +19 -19
  26. package/dist/{chunk-LK36SQZ5.mjs.map → chunk-P5SCGBP7.mjs.map} +1 -1
  27. package/dist/{chunk-VSX32COP.mjs → chunk-PDW7A62B.mjs} +3 -3
  28. package/dist/{chunk-VSX32COP.mjs.map → chunk-PDW7A62B.mjs.map} +1 -1
  29. package/dist/{chunk-LD26U4D3.mjs → chunk-TXXRGDQR.mjs} +3 -3
  30. package/dist/{chunk-LD26U4D3.mjs.map → chunk-TXXRGDQR.mjs.map} +1 -1
  31. package/dist/{chunk-LTFXOP3I.mjs → chunk-VB44U6WY.mjs} +10 -10
  32. package/dist/{chunk-LTFXOP3I.mjs.map → chunk-VB44U6WY.mjs.map} +1 -1
  33. package/dist/{chunk-XFLVRTWU.mjs → chunk-VMTMWWII.mjs} +3 -3
  34. package/dist/{chunk-XFLVRTWU.mjs.map → chunk-VMTMWWII.mjs.map} +1 -1
  35. package/dist/{chunk-6NMJJILM.mjs → chunk-VNQHFTL2.mjs} +3 -3
  36. package/dist/{chunk-6NMJJILM.mjs.map → chunk-VNQHFTL2.mjs.map} +1 -1
  37. package/dist/{chunk-WK6DQSTW.mjs → chunk-W7WF42SC.mjs} +3 -3
  38. package/dist/{chunk-WK6DQSTW.mjs.map → chunk-W7WF42SC.mjs.map} +1 -1
  39. package/dist/{chunk-TLLVKBMP.mjs → chunk-ZDEVCYYC.mjs} +5 -5
  40. package/dist/{chunk-TLLVKBMP.mjs.map → chunk-ZDEVCYYC.mjs.map} +1 -1
  41. package/dist/{chunk-ZRQKYX2B.mjs → chunk-ZVXKXIPM.mjs} +40 -40
  42. package/dist/chunk-ZVXKXIPM.mjs.map +1 -0
  43. package/dist/dialog-body.js +2 -2
  44. package/dist/dialog-body.js.map +1 -1
  45. package/dist/dialog-body.mjs +3 -3
  46. package/dist/dialog-close-button.js +1 -1
  47. package/dist/dialog-close-button.js.map +1 -1
  48. package/dist/dialog-close-button.mjs +3 -3
  49. package/dist/dialog-footer.js +1 -1
  50. package/dist/dialog-footer.js.map +1 -1
  51. package/dist/dialog-footer.mjs +3 -3
  52. package/dist/dialog-header.js +1 -1
  53. package/dist/dialog-header.js.map +1 -1
  54. package/dist/dialog-header.mjs +3 -3
  55. package/dist/dialog-overlay.js +8 -8
  56. package/dist/dialog-overlay.js.map +1 -1
  57. package/dist/dialog-overlay.mjs +3 -3
  58. package/dist/dialog.d.mts +6 -6
  59. package/dist/dialog.d.ts +6 -6
  60. package/dist/dialog.js +97 -94
  61. package/dist/dialog.js.map +1 -1
  62. package/dist/dialog.mjs +18 -18
  63. package/dist/drawer-body.js +2 -2
  64. package/dist/drawer-body.js.map +1 -1
  65. package/dist/drawer-body.mjs +3 -3
  66. package/dist/drawer-close-button.js +1 -1
  67. package/dist/drawer-close-button.js.map +1 -1
  68. package/dist/drawer-close-button.mjs +3 -3
  69. package/dist/drawer-content.d.mts +1 -1
  70. package/dist/drawer-content.d.ts +1 -1
  71. package/dist/drawer-content.js +15 -15
  72. package/dist/drawer-content.js.map +1 -1
  73. package/dist/drawer-content.mjs +5 -5
  74. package/dist/drawer-drag-bar.js.map +1 -1
  75. package/dist/drawer-drag-bar.mjs +2 -2
  76. package/dist/drawer-footer.js +1 -1
  77. package/dist/drawer-footer.js.map +1 -1
  78. package/dist/drawer-footer.mjs +3 -3
  79. package/dist/drawer-header.js +1 -1
  80. package/dist/drawer-header.js.map +1 -1
  81. package/dist/drawer-header.mjs +3 -3
  82. package/dist/drawer-overlay.js +8 -8
  83. package/dist/drawer-overlay.js.map +1 -1
  84. package/dist/drawer-overlay.mjs +3 -3
  85. package/dist/drawer.d.mts +17 -17
  86. package/dist/drawer.d.ts +17 -17
  87. package/dist/drawer.js +104 -104
  88. package/dist/drawer.js.map +1 -1
  89. package/dist/drawer.mjs +12 -12
  90. package/dist/index.d.mts +16 -16
  91. package/dist/index.d.ts +16 -16
  92. package/dist/index.js +428 -419
  93. package/dist/index.js.map +1 -1
  94. package/dist/index.mjs +22 -22
  95. package/dist/modal-body.js +2 -2
  96. package/dist/modal-body.js.map +1 -1
  97. package/dist/modal-body.mjs +2 -2
  98. package/dist/modal-close-button.js +1 -1
  99. package/dist/modal-close-button.js.map +1 -1
  100. package/dist/modal-close-button.mjs +2 -2
  101. package/dist/modal-content.d.mts +1 -1
  102. package/dist/modal-content.d.ts +1 -1
  103. package/dist/modal-content.js +15 -15
  104. package/dist/modal-content.js.map +1 -1
  105. package/dist/modal-content.mjs +4 -4
  106. package/dist/modal-context.d.mts +3 -3
  107. package/dist/modal-context.d.ts +3 -3
  108. package/dist/modal-context.js.map +1 -1
  109. package/dist/modal-context.mjs +1 -1
  110. package/dist/modal-footer.js +1 -1
  111. package/dist/modal-footer.js.map +1 -1
  112. package/dist/modal-footer.mjs +2 -2
  113. package/dist/modal-header.js +1 -1
  114. package/dist/modal-header.js.map +1 -1
  115. package/dist/modal-header.mjs +2 -2
  116. package/dist/modal-overlay.js +8 -8
  117. package/dist/modal-overlay.js.map +1 -1
  118. package/dist/modal-overlay.mjs +2 -2
  119. package/dist/modal.d.mts +46 -46
  120. package/dist/modal.d.ts +46 -46
  121. package/dist/modal.js +71 -71
  122. package/dist/modal.js.map +1 -1
  123. package/dist/modal.mjs +11 -11
  124. package/package.json +10 -10
  125. package/dist/chunk-3BTHYYAS.mjs.map +0 -1
  126. package/dist/chunk-3K5JY6KM.mjs.map +0 -1
  127. package/dist/chunk-4J4ISPN7.mjs.map +0 -1
  128. package/dist/chunk-IIKFZB3M.mjs.map +0 -1
  129. package/dist/chunk-ZRQKYX2B.mjs.map +0 -1
  130. /package/dist/{chunk-BQAR3Q4F.mjs.map → chunk-LUSTM3GA.mjs.map} +0 -0
  131. /package/dist/{chunk-K4MJNSAV.mjs.map → chunk-OAECULYV.mjs.map} +0 -0
package/dist/modal.d.ts CHANGED
@@ -1,60 +1,60 @@
1
1
  import * as _yamada_ui_motion from '@yamada-ui/motion';
2
2
  import { MotionTransitionProps } from '@yamada-ui/motion';
3
- import { Token, CSSUIProps, HTMLUIProps, ThemeProps } from '@yamada-ui/core';
3
+ import { CSSUIProps, Token, HTMLUIProps, ThemeProps } from '@yamada-ui/core';
4
4
  import { FocusLockProps } from '@yamada-ui/focus-lock';
5
5
  import { PortalProps } from '@yamada-ui/portal';
6
6
  import { ModalContentProps } from './modal-content.js';
7
7
  import 'react';
8
8
 
9
- interface ModalOptions extends Pick<FocusLockProps, "autoFocus" | "initialFocusRef" | "finalFocusRef" | "restoreFocus" | "lockFocusAcrossFrames"> {
9
+ interface ModalOptions extends Pick<FocusLockProps, "autoFocus" | "finalFocusRef" | "initialFocusRef" | "lockFocusAcrossFrames" | "restoreFocus"> {
10
10
  /**
11
11
  * If `true`, the open will be opened.
12
12
  */
13
13
  isOpen: boolean;
14
14
  /**
15
- * Callback invoked to close the modal.
16
- */
17
- onClose?: () => void;
18
- /**
19
- * Callback fired when the overlay is clicked.
20
- */
21
- onOverlayClick?: () => void;
22
- /**
23
- * Callback fired when the escape key is pressed and focus is within modal.
24
- */
25
- onEsc?(): void;
26
- /**
27
- * Callback function to run side effects after the modal has closed.
15
+ * Handle zoom or pinch gestures on iOS devices when scroll locking is enabled.
16
+ *
17
+ * @default false.
28
18
  */
29
- onCloseComplete?: () => void;
19
+ allowPinchZoom?: boolean;
30
20
  /**
31
- * The placement of the modal.
21
+ * The animation of the tooltip.
32
22
  *
33
- * @default 'center'
23
+ * @default 'scale'
34
24
  */
35
- placement?: Token<"center" | "top" | "right" | "bottom" | "left" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
25
+ animation?: "bottom" | "left" | "none" | "right" | "scale" | "top";
36
26
  /**
37
- * The CSS `padding` property.
27
+ * If `true`, scrolling will be disabled on the `body` when the modal opens.
28
+ *
29
+ * @default true
38
30
  */
39
- outside?: CSSUIProps["p"];
31
+ blockScrollOnMount?: boolean;
40
32
  /**
41
- * If `true`, display the modal close button.
33
+ * If `true`, the modal will close when the `Esc` key is pressed.
42
34
  *
43
35
  * @default true
44
36
  */
45
- withCloseButton?: boolean;
37
+ closeOnEsc?: boolean;
46
38
  /**
47
- * If `true`, display the modal overlay.
39
+ * If `true`, the modal will close when the overlay is clicked.
48
40
  *
49
41
  * @default true
50
42
  */
51
- withOverlay?: boolean;
43
+ closeOnOverlay?: boolean;
52
44
  /**
53
- * Handle zoom or pinch gestures on iOS devices when scroll locking is enabled.
45
+ * The animation duration.
46
+ */
47
+ duration?: MotionTransitionProps["duration"];
48
+ /**
49
+ * The CSS `padding` property.
50
+ */
51
+ outside?: CSSUIProps["p"];
52
+ /**
53
+ * The placement of the modal.
54
54
  *
55
- * @default false.
55
+ * @default 'center'
56
56
  */
57
- allowPinchZoom?: boolean;
57
+ placement?: Token<"bottom" | "bottom-left" | "bottom-right" | "center" | "left" | "right" | "top" | "top-left" | "top-right">;
58
58
  /**
59
59
  * Where scroll behavior should originate.
60
60
  *
@@ -65,41 +65,41 @@ interface ModalOptions extends Pick<FocusLockProps, "autoFocus" | "initialFocusR
65
65
  */
66
66
  scrollBehavior?: "inside" | "outside";
67
67
  /**
68
- * If `true`, scrolling will be disabled on the `body` when the modal opens.
68
+ * If `true`, display the modal close button.
69
69
  *
70
70
  * @default true
71
71
  */
72
- blockScrollOnMount?: boolean;
72
+ withCloseButton?: boolean;
73
73
  /**
74
- * If `true`, the modal will close when the overlay is clicked.
74
+ * If `true`, display the modal overlay.
75
75
  *
76
76
  * @default true
77
77
  */
78
- closeOnOverlay?: boolean;
78
+ withOverlay?: boolean;
79
79
  /**
80
- * If `true`, the modal will close when the `Esc` key is pressed.
81
- *
82
- * @default true
80
+ * Props for modal container element.
83
81
  */
84
- closeOnEsc?: boolean;
82
+ containerProps?: HTMLUIProps;
85
83
  /**
86
- * The animation of the tooltip.
87
- *
88
- * @default 'scale'
84
+ * Props to be forwarded to the portal component.
89
85
  */
90
- animation?: "scale" | "top" | "right" | "left" | "bottom" | "none";
86
+ portalProps?: Omit<PortalProps, "children">;
91
87
  /**
92
- * The animation duration.
88
+ * Callback invoked to close the modal.
93
89
  */
94
- duration?: MotionTransitionProps["duration"];
90
+ onClose?: () => void;
95
91
  /**
96
- * Props to be forwarded to the portal component.
92
+ * Callback function to run side effects after the modal has closed.
97
93
  */
98
- portalProps?: Omit<PortalProps, "children">;
94
+ onCloseComplete?: () => void;
99
95
  /**
100
- * Props for modal container element.
96
+ * Callback fired when the escape key is pressed and focus is within modal.
101
97
  */
102
- containerProps?: HTMLUIProps;
98
+ onEsc?(): void;
99
+ /**
100
+ * Callback fired when the overlay is clicked.
101
+ */
102
+ onOverlayClick?: () => void;
103
103
  }
104
104
  interface ModalProps extends ModalContentProps, ThemeProps<"Modal">, ModalOptions {
105
105
  }
package/dist/modal.js CHANGED
@@ -58,21 +58,21 @@ var import_transitions = require("@yamada-ui/transitions");
58
58
  var import_utils2 = require("@yamada-ui/utils");
59
59
  var import_jsx_runtime = require("react/jsx-runtime");
60
60
  var ModalOverlay = (0, import_motion.motionForwardRef)(
61
- ({ className, __css, onClick, ...rest }, ref) => {
61
+ ({ className, onClick, __css, ...rest }, ref) => {
62
62
  const {
63
- styles,
63
+ animation,
64
64
  closeOnOverlay,
65
- onOverlayClick,
65
+ duration,
66
+ styles,
66
67
  onClose,
67
- animation,
68
- duration
68
+ onOverlayClick
69
69
  } = useModal();
70
70
  const css = {
71
+ h: "100dvh",
72
+ left: 0,
71
73
  position: "fixed",
72
74
  top: 0,
73
- left: 0,
74
75
  w: "100vw",
75
- h: "100dvh",
76
76
  ...__css ? __css : styles.overlay
77
77
  };
78
78
  const props = animation !== "none" ? import_transitions.fadeProps : {};
@@ -82,11 +82,11 @@ var ModalOverlay = (0, import_motion.motionForwardRef)(
82
82
  ref,
83
83
  className: (0, import_utils2.cx)("ui-modal__overlay", className),
84
84
  custom: { duration },
85
- __css: css,
86
85
  onClick: (0, import_utils2.handlerAll)(onClick, onOverlayClick, (ev) => {
87
86
  ev.stopPropagation();
88
87
  if (closeOnOverlay) onClose == null ? void 0 : onClose();
89
88
  }),
89
+ __css: css,
90
90
  ...props,
91
91
  ...rest
92
92
  }
@@ -145,11 +145,11 @@ var ModalCloseButton = (0, import_core.forwardRef)(
145
145
  {
146
146
  ref,
147
147
  className: (0, import_utils4.cx)("ui-modal__close-button"),
148
- __css: css,
149
148
  onClick: (0, import_utils4.handlerAll)(onClick, (ev) => {
150
149
  ev.stopPropagation();
151
150
  onClose == null ? void 0 : onClose();
152
151
  }),
152
+ __css: css,
153
153
  ...rest
154
154
  }
155
155
  );
@@ -206,18 +206,18 @@ var DrawerContent = (0, import_motion3.motionForwardRef)(
206
206
  ({
207
207
  className,
208
208
  children,
209
- placement: _placement,
210
- withCloseButton,
211
- withDragBar,
212
209
  closeOnDrag,
213
210
  dragConstraints,
214
211
  dragElastic,
215
212
  dragOffset,
216
213
  dragVelocity,
214
+ placement: _placement,
215
+ withCloseButton,
216
+ withDragBar,
217
217
  blankForDragProps,
218
218
  ...rest
219
219
  }, ref) => {
220
- const { isOpen, onClose, duration } = useModal();
220
+ const { duration, isOpen, onClose } = useModal();
221
221
  const styles = useDrawer();
222
222
  const placement = (0, import_use_value.useValue)(_placement);
223
223
  const validChildren = (0, import_utils7.getValidChildren)(children);
@@ -236,27 +236,27 @@ var DrawerContent = (0, import_motion3.motionForwardRef)(
236
236
  let position = {};
237
237
  switch (placement) {
238
238
  case "top":
239
- position = { top: "calc(-100dvh + 1px)", left: 0, right: 0 };
239
+ position = { left: 0, right: 0, top: "calc(-100dvh + 1px)" };
240
240
  break;
241
241
  case "bottom":
242
242
  position = { bottom: "calc(-100dvh + 1px)", left: 0, right: 0 };
243
243
  break;
244
244
  case "left":
245
- position = { left: "calc(-100% + 1px)", top: 0, bottom: 0 };
245
+ position = { bottom: 0, left: "calc(-100% + 1px)", top: 0 };
246
246
  break;
247
247
  case "right":
248
- position = { right: "calc(-100% + 1px)", top: 0, bottom: 0 };
248
+ position = { bottom: 0, right: "calc(-100% + 1px)", top: 0 };
249
249
  break;
250
250
  }
251
251
  const [lightBg, darkBg] = blankForDragBg;
252
252
  return {
253
253
  _after: {
254
+ bg: lightBg,
254
255
  content: '""',
255
256
  display: "block",
256
- w: "100%",
257
257
  h: "100dvh",
258
- bg: lightBg,
259
258
  position: "absolute",
259
+ w: "100%",
260
260
  ...position,
261
261
  ...blankForDragProps
262
262
  },
@@ -322,18 +322,18 @@ var DrawerContent = (0, import_motion3.motionForwardRef)(
322
322
  {
323
323
  ref,
324
324
  className: (0, import_utils7.cx)("ui-drawer", className),
325
- isOpen,
326
- placement,
327
- duration,
328
325
  drag: closeOnDrag ? getDragDirection() : false,
329
326
  dragConstraints: getDragDirectionRestriction(dragConstraints),
330
327
  dragElastic: getDragDirectionRestriction(dragElastic),
331
- dragSnapToOrigin: true,
332
328
  dragMomentum: false,
329
+ dragSnapToOrigin: true,
330
+ duration,
331
+ isOpen,
332
+ placement,
333
+ tabIndex: -1,
333
334
  onDragEnd: (_, info) => {
334
335
  if (isCloseByDragInfo(info)) onClose == null ? void 0 : onClose();
335
336
  },
336
- tabIndex: -1,
337
337
  __css: css,
338
338
  ...rest,
339
339
  children: [
@@ -417,39 +417,39 @@ var getModalContentProps = (animation = "scale", duration) => {
417
417
  case "scale":
418
418
  return {
419
419
  ...import_transitions3.scaleFadeProps,
420
- custom: { scale: 0.95, reverse: true, duration }
420
+ custom: { duration, reverse: true, scale: 0.95 }
421
421
  };
422
422
  case "top":
423
423
  return {
424
424
  ...import_transitions3.slideFadeProps,
425
- custom: { offsetY: -16, reverse: true, duration }
425
+ custom: { duration, offsetY: -16, reverse: true }
426
426
  };
427
427
  case "right":
428
428
  return {
429
429
  ...import_transitions3.slideFadeProps,
430
- custom: { offsetX: 16, reverse: true, duration }
430
+ custom: { duration, offsetX: 16, reverse: true }
431
431
  };
432
432
  case "left":
433
433
  return {
434
434
  ...import_transitions3.slideFadeProps,
435
- custom: { offsetX: -16, reverse: true, duration }
435
+ custom: { duration, offsetX: -16, reverse: true }
436
436
  };
437
437
  case "bottom":
438
438
  return {
439
439
  ...import_transitions3.slideFadeProps,
440
- custom: { offsetY: 16, reverse: true, duration }
440
+ custom: { duration, offsetY: 16, reverse: true }
441
441
  };
442
442
  }
443
443
  };
444
444
  var ModalContent = (0, import_motion5.motionForwardRef)(
445
445
  ({ className, children, __css, ...rest }, ref) => {
446
446
  const {
447
- styles,
447
+ animation,
448
+ duration,
448
449
  scrollBehavior,
450
+ styles,
449
451
  withCloseButton,
450
- onClose,
451
- animation,
452
- duration
452
+ onClose
453
453
  } = useModal();
454
454
  const validChildren = (0, import_utils10.getValidChildren)(children);
455
455
  const [customModalCloseButton, ...cloneChildren] = (0, import_utils10.findChildren)(
@@ -459,21 +459,21 @@ var ModalContent = (0, import_motion5.motionForwardRef)(
459
459
  );
460
460
  const props = animation !== "none" ? getModalContentProps(animation, duration) : {};
461
461
  const css = {
462
- position: "relative",
463
- maxH: "100%",
464
462
  display: "flex",
465
463
  flexDirection: "column",
466
- overflow: scrollBehavior === "inside" ? "hidden" : "auto",
464
+ maxH: "100%",
467
465
  outline: 0,
466
+ overflow: scrollBehavior === "inside" ? "hidden" : "auto",
467
+ position: "relative",
468
468
  ...__css ? __css : styles.container
469
469
  };
470
470
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
471
471
  import_motion5.motion.section,
472
472
  {
473
- role: "dialog",
474
- "aria-modal": "true",
475
473
  ref,
476
474
  className: (0, import_utils10.cx)("ui-modal", className),
475
+ "aria-modal": "true",
476
+ role: "dialog",
477
477
  tabIndex: -1,
478
478
  __css: css,
479
479
  ...props,
@@ -499,30 +499,30 @@ var Modal = (0, import_motion6.motionForwardRef)(
499
499
  });
500
500
  const {
501
501
  className,
502
- children,
503
- isOpen,
504
- onClose,
505
- onOverlayClick,
506
- onEsc,
507
- onCloseComplete,
508
- placement: _placement = "center",
509
- outside = "fallback(4, 1rem)",
510
- withCloseButton = true,
511
- withOverlay = true,
512
502
  allowPinchZoom = false,
513
- scrollBehavior = "inside",
503
+ animation = "scale",
514
504
  autoFocus,
515
- restoreFocus,
516
- initialFocusRef,
517
- finalFocusRef,
518
505
  blockScrollOnMount = true,
519
- closeOnOverlay = true,
506
+ children,
520
507
  closeOnEsc = true,
521
- lockFocusAcrossFrames = true,
522
- animation = "scale",
508
+ closeOnOverlay = true,
523
509
  duration,
524
- portalProps,
510
+ finalFocusRef,
511
+ initialFocusRef,
512
+ isOpen,
513
+ lockFocusAcrossFrames = true,
514
+ outside = "fallback(4, 1rem)",
515
+ placement: _placement = "center",
516
+ restoreFocus,
517
+ scrollBehavior = "inside",
518
+ withCloseButton = true,
519
+ withOverlay = true,
525
520
  containerProps,
521
+ portalProps,
522
+ onClose,
523
+ onCloseComplete,
524
+ onEsc,
525
+ onOverlayClick,
526
526
  ...rest
527
527
  } = (0, import_core6.omitThemeProps)(mergedProps);
528
528
  const onKeyDown = (0, import_react2.useCallback)(
@@ -546,39 +546,39 @@ var Modal = (0, import_motion6.motionForwardRef)(
546
546
  drawerContent = (0, import_react2.cloneElement)(drawerContent, { onKeyDown });
547
547
  const placement = (0, import_use_value2.useValue)(_placement);
548
548
  const css = {
549
+ alignItems: placement.includes("top") ? "flex-start" : placement.includes("bottom") ? "flex-end" : "center",
550
+ display: "flex",
551
+ h: "100dvh",
552
+ justifyContent: placement.includes("left") ? "flex-start" : placement.includes("right") ? "flex-end" : "center",
553
+ left: 0,
554
+ p: size !== "full" ? outside : void 0,
549
555
  position: "fixed",
550
556
  top: 0,
551
- left: 0,
552
- zIndex: "fallback(jeice, 110)",
553
557
  w: "100vw",
554
- h: "100dvh",
555
- p: size !== "full" ? outside : void 0,
556
- display: "flex",
557
- justifyContent: placement.includes("left") ? "flex-start" : placement.includes("right") ? "flex-end" : "center",
558
- alignItems: placement.includes("top") ? "flex-start" : placement.includes("bottom") ? "flex-end" : "center"
558
+ zIndex: "fallback(jeice, 110)"
559
559
  };
560
560
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
561
561
  ModalProvider,
562
562
  {
563
563
  value: {
564
- isOpen,
565
- onClose,
566
- onOverlayClick,
567
- withCloseButton,
568
- scrollBehavior,
569
- closeOnOverlay,
570
564
  animation,
565
+ closeOnOverlay,
571
566
  duration,
572
- styles
567
+ isOpen,
568
+ scrollBehavior,
569
+ styles,
570
+ withCloseButton,
571
+ onClose,
572
+ onOverlayClick
573
573
  },
574
574
  children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_motion6.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
575
575
  import_focus_lock.FocusLock,
576
576
  {
577
577
  autoFocus,
578
- initialFocusRef,
579
578
  finalFocusRef,
580
- restoreFocus,
579
+ initialFocusRef,
581
580
  lockFocusAcrossFrames,
581
+ restoreFocus,
582
582
  children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
583
583
  import_react_remove_scroll.RemoveScroll,
584
584
  {
package/dist/modal.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/modal.tsx","../src/dialog-overlay.tsx","../src/modal-context.ts","../src/modal-overlay.tsx","../src/drawer-content.tsx","../src/drawer-close-button.tsx","../src/modal-close-button.tsx","../src/drawer-drag-bar.tsx","../src/drawer-overlay.tsx","../src/modal-content.tsx","../src/dialog-close-button.tsx"],"sourcesContent":["import type {\n ThemeProps,\n CSSUIObject,\n CSSUIProps,\n Token,\n HTMLUIProps,\n} from \"@yamada-ui/core\"\nimport { ui, omitThemeProps, useComponentMultiStyle } from \"@yamada-ui/core\"\nimport type { FocusLockProps } from \"@yamada-ui/focus-lock\"\nimport { FocusLock } from \"@yamada-ui/focus-lock\"\nimport type { MotionTransitionProps } from \"@yamada-ui/motion\"\nimport { AnimatePresence, motionForwardRef } from \"@yamada-ui/motion\"\nimport type { PortalProps } from \"@yamada-ui/portal\"\nimport { Portal } from \"@yamada-ui/portal\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport { getValidChildren, findChildren, findChild } from \"@yamada-ui/utils\"\nimport type { KeyboardEvent } from \"react\"\nimport { cloneElement, useCallback } from \"react\"\nimport { RemoveScroll } from \"react-remove-scroll\"\nimport { DialogOverlay } from \"./dialog-overlay\"\nimport { DrawerContent } from \"./drawer-content\"\nimport { DrawerOverlay } from \"./drawer-overlay\"\nimport type { ModalContentProps } from \"./modal-content\"\nimport { ModalContent } from \"./modal-content\"\nimport { ModalProvider } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface ModalOptions\n extends Pick<\n FocusLockProps,\n | \"autoFocus\"\n | \"initialFocusRef\"\n | \"finalFocusRef\"\n | \"restoreFocus\"\n | \"lockFocusAcrossFrames\"\n > {\n /**\n * If `true`, the open will be opened.\n */\n isOpen: boolean\n /**\n * Callback invoked to close the modal.\n */\n onClose?: () => void\n /**\n * Callback fired when the overlay is clicked.\n */\n onOverlayClick?: () => void\n /**\n * Callback fired when the escape key is pressed and focus is within modal.\n */\n onEsc?(): void\n /**\n * Callback function to run side effects after the modal has closed.\n */\n onCloseComplete?: () => void\n /**\n * The placement of the modal.\n *\n * @default 'center'\n */\n placement?: Token<\n | \"center\"\n | \"top\"\n | \"right\"\n | \"bottom\"\n | \"left\"\n | \"top-left\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-right\"\n >\n /**\n * The CSS `padding` property.\n */\n outside?: CSSUIProps[\"p\"]\n /**\n * If `true`, display the modal close button.\n *\n * @default true\n */\n withCloseButton?: boolean\n /**\n * If `true`, display the modal overlay.\n *\n * @default true\n */\n withOverlay?: boolean\n /**\n * Handle zoom or pinch gestures on iOS devices when scroll locking is enabled.\n *\n * @default false.\n */\n allowPinchZoom?: boolean\n /**\n * Where scroll behavior should originate.\n *\n * - `inside`: scroll only occurs within the `ModalBody`.\n * - `outside`: the entire `ModalContent` will scroll within the viewport.\n *\n * @default 'inside'\n */\n scrollBehavior?: \"inside\" | \"outside\"\n /**\n * If `true`, scrolling will be disabled on the `body` when the modal opens.\n *\n * @default true\n */\n blockScrollOnMount?: boolean\n /**\n * If `true`, the modal will close when the overlay is clicked.\n *\n * @default true\n */\n closeOnOverlay?: boolean\n /**\n * If `true`, the modal will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * The animation of the tooltip.\n *\n * @default 'scale'\n */\n animation?: \"scale\" | \"top\" | \"right\" | \"left\" | \"bottom\" | \"none\"\n /**\n * The animation duration.\n */\n duration?: MotionTransitionProps[\"duration\"]\n /**\n * Props to be forwarded to the portal component.\n */\n portalProps?: Omit<PortalProps, \"children\">\n /**\n * Props for modal container element.\n */\n containerProps?: HTMLUIProps\n}\n\nexport interface ModalProps\n extends ModalContentProps,\n ThemeProps<\"Modal\">,\n ModalOptions {}\n\n/**\n * `Modal` is a component that is displayed over the main content to focus the user's attention solely on the information.\n *\n * @see Docs https://yamada-ui.com/components/overlay/modal\n */\nexport const Modal = motionForwardRef<ModalProps, \"section\">(\n ({ size, ...props }, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Modal\", {\n size,\n ...props,\n })\n const {\n className,\n children,\n isOpen,\n onClose,\n onOverlayClick,\n onEsc,\n onCloseComplete,\n placement: _placement = \"center\",\n outside = \"fallback(4, 1rem)\",\n withCloseButton = true,\n withOverlay = true,\n allowPinchZoom = false,\n scrollBehavior = \"inside\",\n autoFocus,\n restoreFocus,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount = true,\n closeOnOverlay = true,\n closeOnEsc = true,\n lockFocusAcrossFrames = true,\n animation = \"scale\",\n duration,\n portalProps,\n containerProps,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (ev.key !== \"Escape\") return\n\n ev.stopPropagation()\n\n if (closeOnEsc) onClose?.()\n\n onEsc?.()\n },\n [closeOnEsc, onClose, onEsc],\n )\n\n const validChildren = getValidChildren(children)\n\n const [customModalOverlay, ...cloneChildren] = findChildren(\n validChildren,\n ModalOverlay,\n DialogOverlay,\n DrawerOverlay,\n )\n\n let drawerContent = findChild(validChildren, DrawerContent)\n\n if (drawerContent)\n drawerContent = cloneElement(drawerContent, { onKeyDown })\n\n const placement = useValue(_placement)\n\n const css: CSSUIObject = {\n position: \"fixed\",\n top: 0,\n left: 0,\n zIndex: \"fallback(jeice, 110)\",\n w: \"100vw\",\n h: \"100dvh\",\n p: size !== \"full\" ? outside : undefined,\n display: \"flex\",\n justifyContent: placement.includes(\"left\")\n ? \"flex-start\"\n : placement.includes(\"right\")\n ? \"flex-end\"\n : \"center\",\n alignItems: placement.includes(\"top\")\n ? \"flex-start\"\n : placement.includes(\"bottom\")\n ? \"flex-end\"\n : \"center\",\n }\n\n return (\n <ModalProvider\n value={{\n isOpen,\n onClose,\n onOverlayClick,\n withCloseButton,\n scrollBehavior,\n closeOnOverlay,\n animation,\n duration,\n styles,\n }}\n >\n <AnimatePresence onExitComplete={onCloseComplete}>\n {isOpen ? (\n <Portal {...portalProps}>\n <FocusLock\n autoFocus={autoFocus}\n initialFocusRef={initialFocusRef}\n finalFocusRef={finalFocusRef}\n restoreFocus={restoreFocus}\n lockFocusAcrossFrames={lockFocusAcrossFrames}\n >\n <RemoveScroll\n allowPinchZoom={allowPinchZoom}\n enabled={blockScrollOnMount}\n forwardProps\n >\n <ui.div __css={css} {...containerProps}>\n {customModalOverlay ??\n (withOverlay && size !== \"full\" ? (\n <ModalOverlay />\n ) : null)}\n\n {drawerContent ?? (\n <ModalContent\n ref={ref}\n className={className}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {cloneChildren}\n </ModalContent>\n )}\n </ui.div>\n </RemoveScroll>\n </FocusLock>\n </Portal>\n ) : null}\n </AnimatePresence>\n </ModalProvider>\n )\n },\n)\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDialog } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\n\nexport interface DialogOverlayProps extends ModalOverlayProps {}\n\nexport const DialogOverlay = motionForwardRef<DialogOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-dialog__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogOverlay.displayName = \"DialogOverlay\"\nDialogOverlay.__ui__ = \"DialogOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport { createContext } from \"@yamada-ui/utils\"\nimport type { ModalOptions } from \"./modal\"\n\ninterface ModalContext extends ModalOptions {\n styles: { [key: string]: CSSUIObject }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps } from \"@yamada-ui/motion\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { fadeProps } from \"@yamada-ui/transitions\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalOverlayProps extends MotionProps {}\n\nexport const ModalOverlay = motionForwardRef<ModalOverlayProps, \"div\">(\n ({ className, __css, onClick, ...rest }, ref) => {\n const {\n styles,\n closeOnOverlay,\n onOverlayClick,\n onClose,\n animation,\n duration,\n } = useModal()\n\n const css: CSSUIObject = {\n position: \"fixed\",\n top: 0,\n left: 0,\n w: \"100vw\",\n h: \"100dvh\",\n ...(__css ? __css : styles.overlay),\n }\n\n const props = animation !== \"none\" ? fadeProps : {}\n\n return (\n <motion.div\n ref={ref}\n className={cx(\"ui-modal__overlay\", className)}\n custom={{ duration }}\n __css={css}\n onClick={handlerAll(onClick, onOverlayClick, (ev) => {\n ev.stopPropagation()\n if (closeOnOverlay) onClose?.()\n })}\n {...props}\n {...rest}\n />\n )\n },\n)\n\nModalOverlay.displayName = \"ModalOverlay\"\nModalOverlay.__ui__ = \"ModalOverlay\"\n","import type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport { ui } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport type { MotionPanInfo } from \"@yamada-ui/motion\"\nimport { Slide } from \"@yamada-ui/transitions\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport type { Merge } from \"@yamada-ui/utils\"\nimport { getValidChildren, findChildren, cx, isArray } from \"@yamada-ui/utils\"\nimport { useCallback, useMemo } from \"react\"\nimport type { DrawerProps } from \"./drawer\"\nimport { DrawerCloseButton } from \"./drawer-close-button\"\nimport { DrawerDragBar } from \"./drawer-drag-bar\"\nimport { useDrawer, useModal } from \"./modal-context\"\n\nexport interface DrawerContentProps\n extends Merge<\n Omit<DrawerProps, \"isOpen\" | \"placement\" | keyof ThemeProps>,\n Required<\n Pick<\n DrawerProps,\n | \"placement\"\n | \"dragConstraints\"\n | \"dragElastic\"\n | \"dragOffset\"\n | \"dragVelocity\"\n | \"placement\"\n >\n >\n > {}\n\nexport const DrawerContent = motionForwardRef<DrawerContentProps, \"div\">(\n (\n {\n className,\n children,\n placement: _placement,\n withCloseButton,\n withDragBar,\n closeOnDrag,\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n blankForDragProps,\n ...rest\n },\n ref,\n ) => {\n const { isOpen, onClose, duration } = useModal()\n const styles = useDrawer()\n const placement = useValue(_placement)\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n DrawerCloseButton,\n )\n\n const blankForDragBg = useMemo(() => {\n const propBg =\n rest.backgroundColor ?? rest.bgColor ?? rest.background ?? rest.bg\n const styleBg =\n styles.container?.backgroundColor ??\n styles.container?.bgColor ??\n styles.container?.background ??\n styles.container?.bg\n const computedBg = propBg ?? styleBg\n\n return isArray(computedBg) ? computedBg : [computedBg]\n }, [rest, styles])\n\n const blankForDrag = useMemo<CSSUIObject>(() => {\n let position: CSSUIObject = {}\n\n switch (placement) {\n case \"top\":\n position = { top: \"calc(-100dvh + 1px)\", left: 0, right: 0 }\n break\n\n case \"bottom\":\n position = { bottom: \"calc(-100dvh + 1px)\", left: 0, right: 0 }\n break\n\n case \"left\":\n position = { left: \"calc(-100% + 1px)\", top: 0, bottom: 0 }\n break\n\n case \"right\":\n position = { right: \"calc(-100% + 1px)\", top: 0, bottom: 0 }\n break\n }\n\n const [lightBg, darkBg] = blankForDragBg\n\n return {\n _after: {\n content: '\"\"',\n display: \"block\",\n w: \"100%\",\n h: \"100dvh\",\n bg: lightBg,\n position: \"absolute\",\n ...position,\n ...blankForDragProps,\n },\n _dark: {\n _after: {\n bg: darkBg,\n },\n },\n }\n }, [placement, blankForDragBg, blankForDragProps])\n\n const css = useMemo<CSSUIObject>(\n () => ({\n display: \"flex\",\n flexDirection:\n placement === \"top\" || placement === \"bottom\" ? \"column\" : \"row\",\n outline: 0,\n ...(closeOnDrag ? blankForDrag : {}),\n ...styles.container,\n }),\n [blankForDrag, closeOnDrag, placement, styles],\n )\n\n const getDragDirectionRestriction = useCallback(\n (value: number) => {\n switch (placement) {\n case \"top\":\n return { bottom: value }\n case \"bottom\":\n return { top: value }\n case \"left\":\n return { right: value }\n case \"right\":\n return { left: value }\n }\n },\n [placement],\n )\n\n const getDragDirection = useCallback(() => {\n switch (placement) {\n case \"top\":\n case \"bottom\":\n return \"y\"\n case \"left\":\n case \"right\":\n return \"x\"\n }\n }, [placement])\n\n const isCloseByDragInfo = useCallback(\n (info: MotionPanInfo) => {\n switch (placement) {\n case \"top\":\n return (\n info.velocity.y <= dragVelocity * -1 ||\n info.offset.y <= dragOffset * -1\n )\n case \"bottom\":\n return (\n info.velocity.y >= dragVelocity || info.offset.y >= dragOffset\n )\n case \"left\":\n return (\n info.velocity.x <= dragVelocity * -1 ||\n info.offset.x <= dragOffset * -1\n )\n case \"right\":\n return (\n info.velocity.x >= dragVelocity || info.offset.x >= dragOffset\n )\n }\n },\n [placement, dragVelocity, dragOffset],\n )\n\n return (\n <Slide\n ref={ref}\n className={cx(\"ui-drawer\", className)}\n isOpen={isOpen}\n placement={placement}\n duration={duration}\n drag={closeOnDrag ? getDragDirection() : false}\n dragConstraints={getDragDirectionRestriction(dragConstraints)}\n dragElastic={getDragDirectionRestriction(dragElastic)}\n dragSnapToOrigin\n dragMomentum={false}\n onDragEnd={(_, info) => {\n if (isCloseByDragInfo(info)) onClose?.()\n }}\n tabIndex={-1}\n __css={css}\n {...rest}\n >\n {customDrawerCloseButton ??\n (withCloseButton && onClose ? <DrawerCloseButton /> : null)}\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"bottom\" || placement === \"right\") ? (\n <DrawerDragBar />\n ) : null}\n\n <ui.div\n className=\"ui-drawer__inner\"\n __css={{\n display: \"flex\",\n flexDirection: \"column\",\n w: \"100%\",\n ...styles.inner,\n }}\n >\n {cloneChildren}\n </ui.div>\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"top\" || placement === \"left\") ? (\n <DrawerDragBar />\n ) : null}\n </Slide>\n )\n },\n)\n\nDrawerContent.displayName = \"DrawerContent\"\nDrawerContent.__ui__ = \"DrawerContent\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { ModalCloseButtonProps } from \"./modal-close-button\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useDrawer } from \"./modal-context\"\n\nexport interface DrawerCloseButtonProps extends ModalCloseButtonProps {}\n\nexport const DrawerCloseButton = forwardRef<DrawerCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-drawer__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerCloseButton.displayName = \"DrawerCloseButton\"\nDrawerCloseButton.__ui__ = \"DrawerCloseButton\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport { CloseButton } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalCloseButtonProps extends CloseButtonProps {}\n\nexport const ModalCloseButton = forwardRef<ModalCloseButtonProps, \"button\">(\n ({ onClick, __css, ...rest }, ref) => {\n const { styles, onClose } = useModal()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n ...(__css ? __css : styles.closeButton),\n }\n\n return (\n <CloseButton\n ref={ref}\n className={cx(\"ui-modal__close-button\")}\n __css={css}\n onClick={handlerAll(onClick, (ev) => {\n ev.stopPropagation()\n onClose?.()\n })}\n {...rest}\n />\n )\n },\n)\n\nModalCloseButton.displayName = \"ModalCloseButton\"\nModalCloseButton.__ui__ = \"ModalCloseButton\"\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\n\nexport interface DrawerDragBarProps extends HTMLUIProps {}\n\nexport const DrawerDragBar = forwardRef<DrawerDragBarProps, \"div\">(\n ({ className, __css, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.dragBar }\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-drawer__drag-bar\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerDragBar.displayName = \"DrawerDragBar\"\nDrawerDragBar.__ui__ = \"DrawerDragBar\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DrawerOverlayProps extends ModalOverlayProps {}\n\nexport const DrawerOverlay = motionForwardRef<DrawerOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-drawer__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerOverlay.displayName = \"DrawerOverlay\"\nDrawerOverlay.__ui__ = \"DrawerOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps, MotionTransitionProps } from \"@yamada-ui/motion\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { scaleFadeProps, slideFadeProps } from \"@yamada-ui/transitions\"\nimport { cx, getValidChildren, findChildren } from \"@yamada-ui/utils\"\nimport type { PropsWithChildren } from \"react\"\nimport { DialogCloseButton } from \"./dialog-close-button\"\nimport type { ModalProps } from \"./modal\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useModal } from \"./modal-context\"\n\nconst getModalContentProps = (\n animation: ModalProps[\"animation\"] = \"scale\",\n duration?: MotionTransitionProps[\"duration\"],\n) => {\n switch (animation) {\n case \"scale\":\n return {\n ...scaleFadeProps,\n custom: { scale: 0.95, reverse: true, duration },\n }\n case \"top\":\n return {\n ...slideFadeProps,\n custom: { offsetY: -16, reverse: true, duration },\n }\n case \"right\":\n return {\n ...slideFadeProps,\n custom: { offsetX: 16, reverse: true, duration },\n }\n case \"left\":\n return {\n ...slideFadeProps,\n custom: { offsetX: -16, reverse: true, duration },\n }\n case \"bottom\":\n return {\n ...slideFadeProps,\n custom: { offsetY: 16, reverse: true, duration },\n }\n }\n}\n\nexport interface ModalContentProps\n extends Omit<\n MotionProps<\"section\">,\n \"transition\" | \"scrollBehavior\" | \"animation\" | \"children\"\n >,\n PropsWithChildren {}\n\nexport const ModalContent = motionForwardRef<ModalContentProps, \"section\">(\n ({ className, children, __css, ...rest }, ref) => {\n const {\n styles,\n scrollBehavior,\n withCloseButton,\n onClose,\n animation,\n duration,\n } = useModal()\n\n const validChildren = getValidChildren(children)\n\n const [customModalCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n ModalCloseButton,\n DialogCloseButton,\n )\n\n const props =\n animation !== \"none\" ? getModalContentProps(animation, duration) : {}\n\n const css: CSSUIObject = {\n position: \"relative\",\n maxH: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: scrollBehavior === \"inside\" ? \"hidden\" : \"auto\",\n outline: 0,\n ...(__css ? __css : styles.container),\n }\n\n return (\n <motion.section\n role=\"dialog\"\n aria-modal=\"true\"\n ref={ref}\n className={cx(\"ui-modal\", className)}\n tabIndex={-1}\n __css={css}\n {...props}\n {...rest}\n >\n {customModalCloseButton ??\n (withCloseButton && onClose ? <ModalCloseButton /> : null)}\n\n {cloneChildren}\n </motion.section>\n )\n },\n)\n\nModalContent.displayName = \"ModalContent\"\nModalContent.__ui__ = \"ModalContent\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useDialog } from \"./modal-context\"\n\nexport interface DialogCloseButtonProps extends CloseButtonProps {}\n\nexport const DialogCloseButton = forwardRef<DialogCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-dialog__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogCloseButton.displayName = \"DialogCloseButton\"\nDialogCloseButton.__ui__ = \"DialogCloseButton\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,IAAAA,eAA2D;AAE3D,wBAA0B;AAE1B,IAAAC,iBAAkD;AAElD,oBAAuB;AACvB,IAAAC,oBAAyB;AACzB,IAAAC,iBAA0D;AAE1D,IAAAC,gBAA0C;AAC1C,iCAA6B;;;ACjB7B,IAAAC,iBAAiC;AACjC,IAAAC,gBAAmB;;;ACDnB,mBAA8B;AAOvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;AC3BD,oBAAyC;AACzC,yBAA0B;AAC1B,IAAAC,gBAA+B;AA4BzB;AAvBC,IAAM,mBAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,OAAO,SAAS,GAAG,KAAK,GAAG,QAAQ;AAC/C,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,M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A,MACT,gBAAgB,UAAU,SAAS,MAAM,IACrC,eACA,UAAU,SAAS,OAAO,IACxB,aACA;AAAA,MACN,YAAY,UAAU,SAAS,KAAK,IAChC,eACA,UAAU,SAAS,QAAQ,IACzB,aACA;AAAA,IACR;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QAEA,wDAAC,kCAAgB,gBAAgB,iBAC9B,mBACC,8CAAC,wBAAQ,GAAG,aACV;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,SAAS;AAAA,gBACT,cAAY;AAAA,gBAEZ,yDAAC,gBAAG,KAAH,EAAO,OAAO,KAAM,GAAG,gBACrB;AAAA,oEACE,eAAe,SAAS,SACvB,8CAAC,gBAAa,IACZ;AAAA,kBAEL,wCACC;AAAA,oBAAC;AAAA;AAAA,sBACC;AAAA,sBACA;AAAA,sBACA;AAAA,sBACC,GAAG;AAAA,sBAEH;AAAA;AAAA,kBACH;AAAA,mBAEJ;AAAA;AAAA,YACF;AAAA;AAAA,QACF,GACF,IACE,MACN;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;","names":["import_core","import_motion","import_use_value","import_utils","import_react","import_motion","import_utils","import_utils","import_jsx_runtime","import_core","import_motion","import_transitions","import_utils","import_core","import_utils","import_utils","import_jsx_runtime","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_motion","import_utils","import_jsx_runtime","import_motion","import_transitions","import_utils","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/modal.tsx","../src/dialog-overlay.tsx","../src/modal-context.ts","../src/modal-overlay.tsx","../src/drawer-content.tsx","../src/drawer-close-button.tsx","../src/modal-close-button.tsx","../src/drawer-drag-bar.tsx","../src/drawer-overlay.tsx","../src/modal-content.tsx","../src/dialog-close-button.tsx"],"sourcesContent":["import type {\n CSSUIObject,\n CSSUIProps,\n HTMLUIProps,\n ThemeProps,\n Token,\n} from \"@yamada-ui/core\"\nimport type { FocusLockProps } from \"@yamada-ui/focus-lock\"\nimport type { MotionTransitionProps } from \"@yamada-ui/motion\"\nimport type { PortalProps } from \"@yamada-ui/portal\"\nimport type { KeyboardEvent } from \"react\"\nimport type { ModalContentProps } from \"./modal-content\"\nimport { omitThemeProps, ui, useComponentMultiStyle } from \"@yamada-ui/core\"\nimport { FocusLock } from \"@yamada-ui/focus-lock\"\nimport { AnimatePresence, motionForwardRef } from \"@yamada-ui/motion\"\nimport { Portal } from \"@yamada-ui/portal\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport { findChild, findChildren, getValidChildren } from \"@yamada-ui/utils\"\nimport { cloneElement, useCallback } from \"react\"\nimport { RemoveScroll } from \"react-remove-scroll\"\nimport { DialogOverlay } from \"./dialog-overlay\"\nimport { DrawerContent } from \"./drawer-content\"\nimport { DrawerOverlay } from \"./drawer-overlay\"\nimport { ModalContent } from \"./modal-content\"\nimport { ModalProvider } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface ModalOptions\n extends Pick<\n FocusLockProps,\n | \"autoFocus\"\n | \"finalFocusRef\"\n | \"initialFocusRef\"\n | \"lockFocusAcrossFrames\"\n | \"restoreFocus\"\n > {\n /**\n * If `true`, the open will be opened.\n */\n isOpen: boolean\n /**\n * Handle zoom or pinch gestures on iOS devices when scroll locking is enabled.\n *\n * @default false.\n */\n allowPinchZoom?: boolean\n /**\n * The animation of the tooltip.\n *\n * @default 'scale'\n */\n animation?: \"bottom\" | \"left\" | \"none\" | \"right\" | \"scale\" | \"top\"\n /**\n * If `true`, scrolling will be disabled on the `body` when the modal opens.\n *\n * @default true\n */\n blockScrollOnMount?: boolean\n /**\n * If `true`, the modal will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * If `true`, the modal will close when the overlay is clicked.\n *\n * @default true\n */\n closeOnOverlay?: boolean\n /**\n * The animation duration.\n */\n duration?: MotionTransitionProps[\"duration\"]\n /**\n * The CSS `padding` property.\n */\n outside?: CSSUIProps[\"p\"]\n /**\n * The placement of the modal.\n *\n * @default 'center'\n */\n placement?: Token<\n | \"bottom\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"center\"\n | \"left\"\n | \"right\"\n | \"top\"\n | \"top-left\"\n | \"top-right\"\n >\n /**\n * Where scroll behavior should originate.\n *\n * - `inside`: scroll only occurs within the `ModalBody`.\n * - `outside`: the entire `ModalContent` will scroll within the viewport.\n *\n * @default 'inside'\n */\n scrollBehavior?: \"inside\" | \"outside\"\n /**\n * If `true`, display the modal close button.\n *\n * @default true\n */\n withCloseButton?: boolean\n /**\n * If `true`, display the modal overlay.\n *\n * @default true\n */\n withOverlay?: boolean\n /**\n * Props for modal container element.\n */\n containerProps?: HTMLUIProps\n /**\n * Props to be forwarded to the portal component.\n */\n portalProps?: Omit<PortalProps, \"children\">\n /**\n * Callback invoked to close the modal.\n */\n onClose?: () => void\n /**\n * Callback function to run side effects after the modal has closed.\n */\n onCloseComplete?: () => void\n /**\n * Callback fired when the escape key is pressed and focus is within modal.\n */\n onEsc?(): void\n /**\n * Callback fired when the overlay is clicked.\n */\n onOverlayClick?: () => void\n}\n\nexport interface ModalProps\n extends ModalContentProps,\n ThemeProps<\"Modal\">,\n ModalOptions {}\n\n/**\n * `Modal` is a component that is displayed over the main content to focus the user's attention solely on the information.\n *\n * @see Docs https://yamada-ui.com/components/overlay/modal\n */\nexport const Modal = motionForwardRef<ModalProps, \"section\">(\n ({ size, ...props }, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Modal\", {\n size,\n ...props,\n })\n const {\n className,\n allowPinchZoom = false,\n animation = \"scale\",\n autoFocus,\n blockScrollOnMount = true,\n children,\n closeOnEsc = true,\n closeOnOverlay = true,\n duration,\n finalFocusRef,\n initialFocusRef,\n isOpen,\n lockFocusAcrossFrames = true,\n outside = \"fallback(4, 1rem)\",\n placement: _placement = \"center\",\n restoreFocus,\n scrollBehavior = \"inside\",\n withCloseButton = true,\n withOverlay = true,\n containerProps,\n portalProps,\n onClose,\n onCloseComplete,\n onEsc,\n onOverlayClick,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (ev.key !== \"Escape\") return\n\n ev.stopPropagation()\n\n if (closeOnEsc) onClose?.()\n\n onEsc?.()\n },\n [closeOnEsc, onClose, onEsc],\n )\n\n const validChildren = getValidChildren(children)\n\n const [customModalOverlay, ...cloneChildren] = findChildren(\n validChildren,\n ModalOverlay,\n DialogOverlay,\n DrawerOverlay,\n )\n\n let drawerContent = findChild(validChildren, DrawerContent)\n\n if (drawerContent)\n drawerContent = cloneElement(drawerContent, { onKeyDown })\n\n const placement = useValue(_placement)\n\n const css: CSSUIObject = {\n alignItems: placement.includes(\"top\")\n ? \"flex-start\"\n : placement.includes(\"bottom\")\n ? \"flex-end\"\n : \"center\",\n display: \"flex\",\n h: \"100dvh\",\n justifyContent: placement.includes(\"left\")\n ? \"flex-start\"\n : placement.includes(\"right\")\n ? \"flex-end\"\n : \"center\",\n left: 0,\n p: size !== \"full\" ? outside : undefined,\n position: \"fixed\",\n top: 0,\n w: \"100vw\",\n zIndex: \"fallback(jeice, 110)\",\n }\n\n return (\n <ModalProvider\n value={{\n animation,\n closeOnOverlay,\n duration,\n isOpen,\n scrollBehavior,\n styles,\n withCloseButton,\n onClose,\n onOverlayClick,\n }}\n >\n <AnimatePresence onExitComplete={onCloseComplete}>\n {isOpen ? (\n <Portal {...portalProps}>\n <FocusLock\n autoFocus={autoFocus}\n finalFocusRef={finalFocusRef}\n initialFocusRef={initialFocusRef}\n lockFocusAcrossFrames={lockFocusAcrossFrames}\n restoreFocus={restoreFocus}\n >\n <RemoveScroll\n allowPinchZoom={allowPinchZoom}\n enabled={blockScrollOnMount}\n forwardProps\n >\n <ui.div __css={css} {...containerProps}>\n {customModalOverlay ??\n (withOverlay && size !== \"full\" ? (\n <ModalOverlay />\n ) : null)}\n\n {drawerContent ?? (\n <ModalContent\n ref={ref}\n className={className}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {cloneChildren}\n </ModalContent>\n )}\n </ui.div>\n </RemoveScroll>\n </FocusLock>\n </Portal>\n ) : null}\n </AnimatePresence>\n </ModalProvider>\n )\n },\n)\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDialog } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DialogOverlayProps extends ModalOverlayProps {}\n\nexport const DialogOverlay = motionForwardRef<DialogOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-dialog__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogOverlay.displayName = \"DialogOverlay\"\nDialogOverlay.__ui__ = \"DialogOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps } from \"@yamada-ui/motion\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { fadeProps } from \"@yamada-ui/transitions\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalOverlayProps extends MotionProps {}\n\nexport const ModalOverlay = motionForwardRef<ModalOverlayProps, \"div\">(\n ({ className, onClick, __css, ...rest }, ref) => {\n const {\n animation,\n closeOnOverlay,\n duration,\n styles,\n onClose,\n onOverlayClick,\n } = useModal()\n\n const css: CSSUIObject = {\n h: \"100dvh\",\n left: 0,\n position: \"fixed\",\n top: 0,\n w: \"100vw\",\n ...(__css ? __css : styles.overlay),\n }\n\n const props = animation !== \"none\" ? fadeProps : {}\n\n return (\n <motion.div\n ref={ref}\n className={cx(\"ui-modal__overlay\", className)}\n custom={{ duration }}\n onClick={handlerAll(onClick, onOverlayClick, (ev) => {\n ev.stopPropagation()\n if (closeOnOverlay) onClose?.()\n })}\n __css={css}\n {...props}\n {...rest}\n />\n )\n },\n)\n\nModalOverlay.displayName = \"ModalOverlay\"\nModalOverlay.__ui__ = \"ModalOverlay\"\n","import type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport type { MotionPanInfo } from \"@yamada-ui/motion\"\nimport type { Merge } from \"@yamada-ui/utils\"\nimport type { DrawerProps } from \"./drawer\"\nimport { ui } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { Slide } from \"@yamada-ui/transitions\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport { cx, findChildren, getValidChildren, isArray } from \"@yamada-ui/utils\"\nimport { useCallback, useMemo } from \"react\"\nimport { DrawerCloseButton } from \"./drawer-close-button\"\nimport { DrawerDragBar } from \"./drawer-drag-bar\"\nimport { useDrawer, useModal } from \"./modal-context\"\n\nexport interface DrawerContentProps\n extends Merge<\n Omit<DrawerProps, \"isOpen\" | \"placement\" | keyof ThemeProps>,\n Required<\n Pick<\n DrawerProps,\n | \"dragConstraints\"\n | \"dragElastic\"\n | \"dragOffset\"\n | \"dragVelocity\"\n | \"placement\"\n | \"placement\"\n >\n >\n > {}\n\nexport const DrawerContent = motionForwardRef<DrawerContentProps, \"div\">(\n (\n {\n className,\n children,\n closeOnDrag,\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n placement: _placement,\n withCloseButton,\n withDragBar,\n blankForDragProps,\n ...rest\n },\n ref,\n ) => {\n const { duration, isOpen, onClose } = useModal()\n const styles = useDrawer()\n const placement = useValue(_placement)\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n DrawerCloseButton,\n )\n\n const blankForDragBg = useMemo(() => {\n const propBg =\n rest.backgroundColor ?? rest.bgColor ?? rest.background ?? rest.bg\n const styleBg =\n styles.container?.backgroundColor ??\n styles.container?.bgColor ??\n styles.container?.background ??\n styles.container?.bg\n const computedBg = propBg ?? styleBg\n\n return isArray(computedBg) ? computedBg : [computedBg]\n }, [rest, styles])\n\n const blankForDrag = useMemo<CSSUIObject>(() => {\n let position: CSSUIObject = {}\n\n switch (placement) {\n case \"top\":\n position = { left: 0, right: 0, top: \"calc(-100dvh + 1px)\" }\n break\n\n case \"bottom\":\n position = { bottom: \"calc(-100dvh + 1px)\", left: 0, right: 0 }\n break\n\n case \"left\":\n position = { bottom: 0, left: \"calc(-100% + 1px)\", top: 0 }\n break\n\n case \"right\":\n position = { bottom: 0, right: \"calc(-100% + 1px)\", top: 0 }\n break\n }\n\n const [lightBg, darkBg] = blankForDragBg\n\n return {\n _after: {\n bg: lightBg,\n content: '\"\"',\n display: \"block\",\n h: \"100dvh\",\n position: \"absolute\",\n w: \"100%\",\n ...position,\n ...blankForDragProps,\n },\n _dark: {\n _after: {\n bg: darkBg,\n },\n },\n }\n }, [placement, blankForDragBg, blankForDragProps])\n\n const css = useMemo<CSSUIObject>(\n () => ({\n display: \"flex\",\n flexDirection:\n placement === \"top\" || placement === \"bottom\" ? \"column\" : \"row\",\n outline: 0,\n ...(closeOnDrag ? blankForDrag : {}),\n ...styles.container,\n }),\n [blankForDrag, closeOnDrag, placement, styles],\n )\n\n const getDragDirectionRestriction = useCallback(\n (value: number) => {\n switch (placement) {\n case \"top\":\n return { bottom: value }\n case \"bottom\":\n return { top: value }\n case \"left\":\n return { right: value }\n case \"right\":\n return { left: value }\n }\n },\n [placement],\n )\n\n const getDragDirection = useCallback(() => {\n switch (placement) {\n case \"top\":\n case \"bottom\":\n return \"y\"\n case \"left\":\n case \"right\":\n return \"x\"\n }\n }, [placement])\n\n const isCloseByDragInfo = useCallback(\n (info: MotionPanInfo) => {\n switch (placement) {\n case \"top\":\n return (\n info.velocity.y <= dragVelocity * -1 ||\n info.offset.y <= dragOffset * -1\n )\n case \"bottom\":\n return (\n info.velocity.y >= dragVelocity || info.offset.y >= dragOffset\n )\n case \"left\":\n return (\n info.velocity.x <= dragVelocity * -1 ||\n info.offset.x <= dragOffset * -1\n )\n case \"right\":\n return (\n info.velocity.x >= dragVelocity || info.offset.x >= dragOffset\n )\n }\n },\n [placement, dragVelocity, dragOffset],\n )\n\n return (\n <Slide\n ref={ref}\n className={cx(\"ui-drawer\", className)}\n drag={closeOnDrag ? getDragDirection() : false}\n dragConstraints={getDragDirectionRestriction(dragConstraints)}\n dragElastic={getDragDirectionRestriction(dragElastic)}\n dragMomentum={false}\n dragSnapToOrigin\n duration={duration}\n isOpen={isOpen}\n placement={placement}\n tabIndex={-1}\n onDragEnd={(_, info) => {\n if (isCloseByDragInfo(info)) onClose?.()\n }}\n __css={css}\n {...rest}\n >\n {customDrawerCloseButton ??\n (withCloseButton && onClose ? <DrawerCloseButton /> : null)}\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"bottom\" || placement === \"right\") ? (\n <DrawerDragBar />\n ) : null}\n\n <ui.div\n className=\"ui-drawer__inner\"\n __css={{\n display: \"flex\",\n flexDirection: \"column\",\n w: \"100%\",\n ...styles.inner,\n }}\n >\n {cloneChildren}\n </ui.div>\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"top\" || placement === \"left\") ? (\n <DrawerDragBar />\n ) : null}\n </Slide>\n )\n },\n)\n\nDrawerContent.displayName = \"DrawerContent\"\nDrawerContent.__ui__ = \"DrawerContent\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalCloseButtonProps } from \"./modal-close-button\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useDrawer } from \"./modal-context\"\n\nexport interface DrawerCloseButtonProps extends ModalCloseButtonProps {}\n\nexport const DrawerCloseButton = forwardRef<DrawerCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-drawer__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerCloseButton.displayName = \"DrawerCloseButton\"\nDrawerCloseButton.__ui__ = \"DrawerCloseButton\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { CloseButton } from \"@yamada-ui/close-button\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalCloseButtonProps extends CloseButtonProps {}\n\nexport const ModalCloseButton = forwardRef<ModalCloseButtonProps, \"button\">(\n ({ onClick, __css, ...rest }, ref) => {\n const { styles, onClose } = useModal()\n\n const css: CSSUIObject = {\n position: \"absolute\",\n ...(__css ? __css : styles.closeButton),\n }\n\n return (\n <CloseButton\n ref={ref}\n className={cx(\"ui-modal__close-button\")}\n onClick={handlerAll(onClick, (ev) => {\n ev.stopPropagation()\n onClose?.()\n })}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalCloseButton.displayName = \"ModalCloseButton\"\nModalCloseButton.__ui__ = \"ModalCloseButton\"\n","import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\n\nexport interface DrawerDragBarProps extends HTMLUIProps {}\n\nexport const DrawerDragBar = forwardRef<DrawerDragBarProps, \"div\">(\n ({ className, __css, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.dragBar }\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-drawer__drag-bar\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerDragBar.displayName = \"DrawerDragBar\"\nDrawerDragBar.__ui__ = \"DrawerDragBar\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DrawerOverlayProps extends ModalOverlayProps {}\n\nexport const DrawerOverlay = motionForwardRef<DrawerOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-drawer__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerOverlay.displayName = \"DrawerOverlay\"\nDrawerOverlay.__ui__ = \"DrawerOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps, MotionTransitionProps } from \"@yamada-ui/motion\"\nimport type { PropsWithChildren } from \"react\"\nimport type { ModalProps } from \"./modal\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { scaleFadeProps, slideFadeProps } from \"@yamada-ui/transitions\"\nimport { cx, findChildren, getValidChildren } from \"@yamada-ui/utils\"\nimport { DialogCloseButton } from \"./dialog-close-button\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useModal } from \"./modal-context\"\n\nconst getModalContentProps = (\n animation: ModalProps[\"animation\"] = \"scale\",\n duration?: MotionTransitionProps[\"duration\"],\n) => {\n switch (animation) {\n case \"scale\":\n return {\n ...scaleFadeProps,\n custom: { duration, reverse: true, scale: 0.95 },\n }\n case \"top\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetY: -16, reverse: true },\n }\n case \"right\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetX: 16, reverse: true },\n }\n case \"left\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetX: -16, reverse: true },\n }\n case \"bottom\":\n return {\n ...slideFadeProps,\n custom: { duration, offsetY: 16, reverse: true },\n }\n }\n}\n\nexport interface ModalContentProps\n extends Omit<\n MotionProps<\"section\">,\n \"animation\" | \"children\" | \"scrollBehavior\" | \"transition\"\n >,\n PropsWithChildren {}\n\nexport const ModalContent = motionForwardRef<ModalContentProps, \"section\">(\n ({ className, children, __css, ...rest }, ref) => {\n const {\n animation,\n duration,\n scrollBehavior,\n styles,\n withCloseButton,\n onClose,\n } = useModal()\n\n const validChildren = getValidChildren(children)\n\n const [customModalCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n ModalCloseButton,\n DialogCloseButton,\n )\n\n const props =\n animation !== \"none\" ? getModalContentProps(animation, duration) : {}\n\n const css: CSSUIObject = {\n display: \"flex\",\n flexDirection: \"column\",\n maxH: \"100%\",\n outline: 0,\n overflow: scrollBehavior === \"inside\" ? \"hidden\" : \"auto\",\n position: \"relative\",\n ...(__css ? __css : styles.container),\n }\n\n return (\n <motion.section\n ref={ref}\n className={cx(\"ui-modal\", className)}\n aria-modal=\"true\"\n role=\"dialog\"\n tabIndex={-1}\n __css={css}\n {...props}\n {...rest}\n >\n {customModalCloseButton ??\n (withCloseButton && onClose ? <ModalCloseButton /> : null)}\n\n {cloneChildren}\n </motion.section>\n )\n },\n)\n\nModalContent.displayName = \"ModalContent\"\nModalContent.__ui__ = \"ModalContent\"\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { ModalCloseButton } from \"./modal-close-button\"\nimport { useDialog } from \"./modal-context\"\n\nexport interface DialogCloseButtonProps extends CloseButtonProps {}\n\nexport const DialogCloseButton = forwardRef<DialogCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-dialog__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogCloseButton.displayName = \"DialogCloseButton\"\nDialogCloseButton.__ui__ = \"DialogCloseButton\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,IAAAA,eAA2D;AAC3D,wBAA0B;AAC1B,IAAAC,iBAAkD;AAClD,oBAAuB;AACvB,IAAAC,oBAAyB;AACzB,IAAAC,iBAA0D;AAC1D,IAAAC,gBAA0C;AAC1C,iCAA6B;;;ACjB7B,IAAAC,iBAAiC;AACjC,IAAAC,gBAAmB;;;ACDnB,mBAA8B;AAMvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CA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;AAEA,QAAI,oBAAgB,0BAAU,eAAe,aAAa;AAE1D,QAAI;AACF,0BAAgB,4BAAa,eAAe,EAAE,UAAU,CAAC;AAE3D,UAAM,gBAAY,4BAAS,UAAU;AAErC,UAAM,MAAmB;AAAA,MACvB,YAAY,UAAU,SAAS,KAAK,IAChC,eACA,UAAU,SAAS,QAAQ,IACzB,aACA;AAAA,MACN,SAAS;AAAA,MACT,GAAG;AAAA,MACH,gBAAgB,UAAU,SAAS,MAAM,IACrC,eACA,UAAU,SAAS,OAAO,IACxB,aACA;AAAA,MACN,MAAM;AAAA,MACN,GAAG,SAAS,SAAS,UAAU;AAAA,MAC/B,UAAU;AAAA,MACV,KAAK;AAAA,MACL,GAAG;AAAA,MACH,QAAQ;AAAA,IACV;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QAEA,wDAAC,kCAAgB,gBAAgB,iBAC9B,mBACC,8CAAC,wBAAQ,GAAG,aACV;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,SAAS;AAAA,gBACT,cAAY;AAAA,gBAEZ,yDAAC,gBAAG,KAAH,EAAO,OAAO,KAAM,GAAG,gBACrB;AAAA,oEACE,eAAe,SAAS,SACvB,8CAAC,gBAAa,IACZ;AAAA,kBAEL,wCACC;AAAA,oBAAC;AAAA;AAAA,sBACC;AAAA,sBACA;AAAA,sBACA;AAAA,sBACC,GAAG;AAAA,sBAEH;AAAA;AAAA,kBACH;AAAA,mBAEJ;AAAA;AAAA,YACF;AAAA;AAAA,QACF,GACF,IACE,MACN;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;","names":["import_core","import_motion","import_use_value","import_utils","import_react","import_motion","import_utils","import_utils","import_jsx_runtime","import_core","import_motion","import_transitions","import_utils","import_core","import_utils","import_utils","import_jsx_runtime","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_motion","import_utils","import_jsx_runtime","import_motion","import_transitions","import_utils","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}