@yamada-ui/modal 1.3.12-next-20241005220055 → 1.3.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{chunk-KNCDANWW.mjs → chunk-37MTMX5B.mjs} +3 -3
- package/dist/{chunk-KNCDANWW.mjs.map → chunk-37MTMX5B.mjs.map} +1 -1
- package/dist/{chunk-SHVXETTC.mjs → chunk-6XAWCUQQ.mjs} +3 -3
- package/dist/{chunk-SHVXETTC.mjs.map → chunk-6XAWCUQQ.mjs.map} +1 -1
- package/dist/{chunk-3K5JY6KM.mjs → chunk-7EVREJIH.mjs} +19 -19
- package/dist/chunk-7EVREJIH.mjs.map +1 -0
- package/dist/{chunk-IIKFZB3M.mjs → chunk-7I5LX3VI.mjs} +43 -43
- package/dist/chunk-7I5LX3VI.mjs.map +1 -0
- package/dist/{chunk-3BTHYYAS.mjs → chunk-7THNENCM.mjs} +36 -32
- package/dist/chunk-7THNENCM.mjs.map +1 -0
- package/dist/{chunk-4J4ISPN7.mjs → chunk-A7WOQJCA.mjs} +1 -1
- package/dist/chunk-A7WOQJCA.mjs.map +1 -0
- package/dist/{chunk-2LLDUYTG.mjs → chunk-BNRFPNWF.mjs} +3 -3
- package/dist/{chunk-2LLDUYTG.mjs.map → chunk-BNRFPNWF.mjs.map} +1 -1
- package/dist/{chunk-HUI5FLPV.mjs → chunk-EDCPPJBS.mjs} +3 -3
- package/dist/{chunk-HUI5FLPV.mjs.map → chunk-EDCPPJBS.mjs.map} +1 -1
- package/dist/{chunk-XKKFTAXR.mjs → chunk-G7R3GU24.mjs} +3 -3
- package/dist/{chunk-XKKFTAXR.mjs.map → chunk-G7R3GU24.mjs.map} +1 -1
- package/dist/{chunk-LG73B7RP.mjs → chunk-L353QQ6S.mjs} +4 -4
- package/dist/{chunk-LG73B7RP.mjs.map → chunk-L353QQ6S.mjs.map} +1 -1
- package/dist/{chunk-BQAR3Q4F.mjs → chunk-LUSTM3GA.mjs} +3 -3
- package/dist/{chunk-SIKHBBVB.mjs → chunk-LYMMHCHF.mjs} +4 -4
- package/dist/{chunk-SIKHBBVB.mjs.map → chunk-LYMMHCHF.mjs.map} +1 -1
- package/dist/{chunk-K4MJNSAV.mjs → chunk-OAECULYV.mjs} +2 -2
- package/dist/{chunk-LK36SQZ5.mjs → chunk-P5SCGBP7.mjs} +19 -19
- package/dist/{chunk-LK36SQZ5.mjs.map → chunk-P5SCGBP7.mjs.map} +1 -1
- package/dist/{chunk-VSX32COP.mjs → chunk-PDW7A62B.mjs} +3 -3
- package/dist/{chunk-VSX32COP.mjs.map → chunk-PDW7A62B.mjs.map} +1 -1
- package/dist/{chunk-LD26U4D3.mjs → chunk-TXXRGDQR.mjs} +3 -3
- package/dist/{chunk-LD26U4D3.mjs.map → chunk-TXXRGDQR.mjs.map} +1 -1
- package/dist/{chunk-LTFXOP3I.mjs → chunk-VB44U6WY.mjs} +10 -10
- package/dist/{chunk-LTFXOP3I.mjs.map → chunk-VB44U6WY.mjs.map} +1 -1
- package/dist/{chunk-XFLVRTWU.mjs → chunk-VMTMWWII.mjs} +3 -3
- package/dist/{chunk-XFLVRTWU.mjs.map → chunk-VMTMWWII.mjs.map} +1 -1
- package/dist/{chunk-6NMJJILM.mjs → chunk-VNQHFTL2.mjs} +3 -3
- package/dist/{chunk-6NMJJILM.mjs.map → chunk-VNQHFTL2.mjs.map} +1 -1
- package/dist/{chunk-WK6DQSTW.mjs → chunk-W7WF42SC.mjs} +3 -3
- package/dist/{chunk-WK6DQSTW.mjs.map → chunk-W7WF42SC.mjs.map} +1 -1
- package/dist/{chunk-TLLVKBMP.mjs → chunk-ZDEVCYYC.mjs} +5 -5
- package/dist/{chunk-TLLVKBMP.mjs.map → chunk-ZDEVCYYC.mjs.map} +1 -1
- package/dist/{chunk-ZRQKYX2B.mjs → chunk-ZVXKXIPM.mjs} +40 -40
- package/dist/chunk-ZVXKXIPM.mjs.map +1 -0
- package/dist/dialog-body.js +2 -2
- package/dist/dialog-body.js.map +1 -1
- package/dist/dialog-body.mjs +3 -3
- package/dist/dialog-close-button.js +1 -1
- package/dist/dialog-close-button.js.map +1 -1
- package/dist/dialog-close-button.mjs +3 -3
- package/dist/dialog-footer.js +1 -1
- package/dist/dialog-footer.js.map +1 -1
- package/dist/dialog-footer.mjs +3 -3
- package/dist/dialog-header.js +1 -1
- package/dist/dialog-header.js.map +1 -1
- package/dist/dialog-header.mjs +3 -3
- package/dist/dialog-overlay.js +8 -8
- package/dist/dialog-overlay.js.map +1 -1
- package/dist/dialog-overlay.mjs +3 -3
- package/dist/dialog.d.mts +6 -6
- package/dist/dialog.d.ts +6 -6
- package/dist/dialog.js +97 -94
- package/dist/dialog.js.map +1 -1
- package/dist/dialog.mjs +18 -18
- package/dist/drawer-body.js +2 -2
- package/dist/drawer-body.js.map +1 -1
- package/dist/drawer-body.mjs +3 -3
- package/dist/drawer-close-button.js +1 -1
- package/dist/drawer-close-button.js.map +1 -1
- package/dist/drawer-close-button.mjs +3 -3
- package/dist/drawer-content.d.mts +1 -1
- package/dist/drawer-content.d.ts +1 -1
- package/dist/drawer-content.js +15 -15
- package/dist/drawer-content.js.map +1 -1
- package/dist/drawer-content.mjs +5 -5
- package/dist/drawer-drag-bar.js.map +1 -1
- package/dist/drawer-drag-bar.mjs +2 -2
- package/dist/drawer-footer.js +1 -1
- package/dist/drawer-footer.js.map +1 -1
- package/dist/drawer-footer.mjs +3 -3
- package/dist/drawer-header.js +1 -1
- package/dist/drawer-header.js.map +1 -1
- package/dist/drawer-header.mjs +3 -3
- package/dist/drawer-overlay.js +8 -8
- package/dist/drawer-overlay.js.map +1 -1
- package/dist/drawer-overlay.mjs +3 -3
- package/dist/drawer.d.mts +17 -17
- package/dist/drawer.d.ts +17 -17
- package/dist/drawer.js +104 -104
- package/dist/drawer.js.map +1 -1
- package/dist/drawer.mjs +12 -12
- package/dist/index.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +428 -419
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -22
- package/dist/modal-body.js +2 -2
- package/dist/modal-body.js.map +1 -1
- package/dist/modal-body.mjs +2 -2
- package/dist/modal-close-button.js +1 -1
- package/dist/modal-close-button.js.map +1 -1
- package/dist/modal-close-button.mjs +2 -2
- package/dist/modal-content.d.mts +1 -1
- package/dist/modal-content.d.ts +1 -1
- package/dist/modal-content.js +15 -15
- package/dist/modal-content.js.map +1 -1
- package/dist/modal-content.mjs +4 -4
- package/dist/modal-context.d.mts +3 -3
- package/dist/modal-context.d.ts +3 -3
- package/dist/modal-context.js.map +1 -1
- package/dist/modal-context.mjs +1 -1
- package/dist/modal-footer.js +1 -1
- package/dist/modal-footer.js.map +1 -1
- package/dist/modal-footer.mjs +2 -2
- package/dist/modal-header.js +1 -1
- package/dist/modal-header.js.map +1 -1
- package/dist/modal-header.mjs +2 -2
- package/dist/modal-overlay.js +8 -8
- package/dist/modal-overlay.js.map +1 -1
- package/dist/modal-overlay.mjs +2 -2
- package/dist/modal.d.mts +46 -46
- package/dist/modal.d.ts +46 -46
- package/dist/modal.js +71 -71
- package/dist/modal.js.map +1 -1
- package/dist/modal.mjs +11 -11
- package/package.json +10 -10
- package/dist/chunk-3BTHYYAS.mjs.map +0 -1
- package/dist/chunk-3K5JY6KM.mjs.map +0 -1
- package/dist/chunk-4J4ISPN7.mjs.map +0 -1
- package/dist/chunk-IIKFZB3M.mjs.map +0 -1
- package/dist/chunk-ZRQKYX2B.mjs.map +0 -1
- /package/dist/{chunk-BQAR3Q4F.mjs.map → chunk-LUSTM3GA.mjs.map} +0 -0
- /package/dist/{chunk-K4MJNSAV.mjs.map → chunk-OAECULYV.mjs.map} +0 -0
package/dist/drawer.js
CHANGED
@@ -74,11 +74,11 @@ var ModalCloseButton = (0, import_core.forwardRef)(
|
|
74
74
|
{
|
75
75
|
ref,
|
76
76
|
className: (0, import_utils2.cx)("ui-modal__close-button"),
|
77
|
-
__css: css,
|
78
77
|
onClick: (0, import_utils2.handlerAll)(onClick, (ev) => {
|
79
78
|
ev.stopPropagation();
|
80
79
|
onClose == null ? void 0 : onClose();
|
81
80
|
}),
|
81
|
+
__css: css,
|
82
82
|
...rest
|
83
83
|
}
|
84
84
|
);
|
@@ -135,18 +135,18 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
|
|
135
135
|
({
|
136
136
|
className,
|
137
137
|
children,
|
138
|
-
placement: _placement,
|
139
|
-
withCloseButton,
|
140
|
-
withDragBar,
|
141
138
|
closeOnDrag,
|
142
139
|
dragConstraints,
|
143
140
|
dragElastic,
|
144
141
|
dragOffset,
|
145
142
|
dragVelocity,
|
143
|
+
placement: _placement,
|
144
|
+
withCloseButton,
|
145
|
+
withDragBar,
|
146
146
|
blankForDragProps,
|
147
147
|
...rest
|
148
148
|
}, ref) => {
|
149
|
-
const { isOpen, onClose
|
149
|
+
const { duration, isOpen, onClose } = useModal();
|
150
150
|
const styles = useDrawer();
|
151
151
|
const placement = (0, import_use_value.useValue)(_placement);
|
152
152
|
const validChildren = (0, import_utils5.getValidChildren)(children);
|
@@ -165,27 +165,27 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
|
|
165
165
|
let position = {};
|
166
166
|
switch (placement) {
|
167
167
|
case "top":
|
168
|
-
position = { top: "calc(-100dvh + 1px)"
|
168
|
+
position = { left: 0, right: 0, top: "calc(-100dvh + 1px)" };
|
169
169
|
break;
|
170
170
|
case "bottom":
|
171
171
|
position = { bottom: "calc(-100dvh + 1px)", left: 0, right: 0 };
|
172
172
|
break;
|
173
173
|
case "left":
|
174
|
-
position = { left: "calc(-100% + 1px)", top: 0
|
174
|
+
position = { bottom: 0, left: "calc(-100% + 1px)", top: 0 };
|
175
175
|
break;
|
176
176
|
case "right":
|
177
|
-
position = { right: "calc(-100% + 1px)", top: 0
|
177
|
+
position = { bottom: 0, right: "calc(-100% + 1px)", top: 0 };
|
178
178
|
break;
|
179
179
|
}
|
180
180
|
const [lightBg, darkBg] = blankForDragBg;
|
181
181
|
return {
|
182
182
|
_after: {
|
183
|
+
bg: lightBg,
|
183
184
|
content: '""',
|
184
185
|
display: "block",
|
185
|
-
w: "100%",
|
186
186
|
h: "100dvh",
|
187
|
-
bg: lightBg,
|
188
187
|
position: "absolute",
|
188
|
+
w: "100%",
|
189
189
|
...position,
|
190
190
|
...blankForDragProps
|
191
191
|
},
|
@@ -251,18 +251,18 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
|
|
251
251
|
{
|
252
252
|
ref,
|
253
253
|
className: (0, import_utils5.cx)("ui-drawer", className),
|
254
|
-
isOpen,
|
255
|
-
placement,
|
256
|
-
duration,
|
257
254
|
drag: closeOnDrag ? getDragDirection() : false,
|
258
255
|
dragConstraints: getDragDirectionRestriction(dragConstraints),
|
259
256
|
dragElastic: getDragDirectionRestriction(dragElastic),
|
260
|
-
dragSnapToOrigin: true,
|
261
257
|
dragMomentum: false,
|
258
|
+
dragSnapToOrigin: true,
|
259
|
+
duration,
|
260
|
+
isOpen,
|
261
|
+
placement,
|
262
|
+
tabIndex: -1,
|
262
263
|
onDragEnd: (_, info) => {
|
263
264
|
if (isCloseByDragInfo(info)) onClose == null ? void 0 : onClose();
|
264
265
|
},
|
265
|
-
tabIndex: -1,
|
266
266
|
__css: css,
|
267
267
|
...rest,
|
268
268
|
children: [
|
@@ -300,21 +300,21 @@ var import_transitions2 = require("@yamada-ui/transitions");
|
|
300
300
|
var import_utils6 = require("@yamada-ui/utils");
|
301
301
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
302
302
|
var ModalOverlay = (0, import_motion2.motionForwardRef)(
|
303
|
-
({ className,
|
303
|
+
({ className, onClick, __css, ...rest }, ref) => {
|
304
304
|
const {
|
305
|
-
|
305
|
+
animation,
|
306
306
|
closeOnOverlay,
|
307
|
-
|
307
|
+
duration,
|
308
|
+
styles,
|
308
309
|
onClose,
|
309
|
-
|
310
|
-
duration
|
310
|
+
onOverlayClick
|
311
311
|
} = useModal();
|
312
312
|
const css = {
|
313
|
+
h: "100dvh",
|
314
|
+
left: 0,
|
313
315
|
position: "fixed",
|
314
316
|
top: 0,
|
315
|
-
left: 0,
|
316
317
|
w: "100vw",
|
317
|
-
h: "100dvh",
|
318
318
|
...__css ? __css : styles.overlay
|
319
319
|
};
|
320
320
|
const props = animation !== "none" ? import_transitions2.fadeProps : {};
|
@@ -324,11 +324,11 @@ var ModalOverlay = (0, import_motion2.motionForwardRef)(
|
|
324
324
|
ref,
|
325
325
|
className: (0, import_utils6.cx)("ui-modal__overlay", className),
|
326
326
|
custom: { duration },
|
327
|
-
__css: css,
|
328
327
|
onClick: (0, import_utils6.handlerAll)(onClick, onOverlayClick, (ev) => {
|
329
328
|
ev.stopPropagation();
|
330
329
|
if (closeOnOverlay) onClose == null ? void 0 : onClose();
|
331
330
|
}),
|
331
|
+
__css: css,
|
332
332
|
...props,
|
333
333
|
...rest
|
334
334
|
}
|
@@ -424,39 +424,39 @@ var getModalContentProps = (animation = "scale", duration) => {
|
|
424
424
|
case "scale":
|
425
425
|
return {
|
426
426
|
...import_transitions3.scaleFadeProps,
|
427
|
-
custom: {
|
427
|
+
custom: { duration, reverse: true, scale: 0.95 }
|
428
428
|
};
|
429
429
|
case "top":
|
430
430
|
return {
|
431
431
|
...import_transitions3.slideFadeProps,
|
432
|
-
custom: { offsetY: -16, reverse: true
|
432
|
+
custom: { duration, offsetY: -16, reverse: true }
|
433
433
|
};
|
434
434
|
case "right":
|
435
435
|
return {
|
436
436
|
...import_transitions3.slideFadeProps,
|
437
|
-
custom: { offsetX: 16, reverse: true
|
437
|
+
custom: { duration, offsetX: 16, reverse: true }
|
438
438
|
};
|
439
439
|
case "left":
|
440
440
|
return {
|
441
441
|
...import_transitions3.slideFadeProps,
|
442
|
-
custom: { offsetX: -16, reverse: true
|
442
|
+
custom: { duration, offsetX: -16, reverse: true }
|
443
443
|
};
|
444
444
|
case "bottom":
|
445
445
|
return {
|
446
446
|
...import_transitions3.slideFadeProps,
|
447
|
-
custom: { offsetY: 16, reverse: true
|
447
|
+
custom: { duration, offsetY: 16, reverse: true }
|
448
448
|
};
|
449
449
|
}
|
450
450
|
};
|
451
451
|
var ModalContent = (0, import_motion5.motionForwardRef)(
|
452
452
|
({ className, children, __css, ...rest }, ref) => {
|
453
453
|
const {
|
454
|
-
|
454
|
+
animation,
|
455
|
+
duration,
|
455
456
|
scrollBehavior,
|
457
|
+
styles,
|
456
458
|
withCloseButton,
|
457
|
-
onClose
|
458
|
-
animation,
|
459
|
-
duration
|
459
|
+
onClose
|
460
460
|
} = useModal();
|
461
461
|
const validChildren = (0, import_utils10.getValidChildren)(children);
|
462
462
|
const [customModalCloseButton, ...cloneChildren] = (0, import_utils10.findChildren)(
|
@@ -466,21 +466,21 @@ var ModalContent = (0, import_motion5.motionForwardRef)(
|
|
466
466
|
);
|
467
467
|
const props = animation !== "none" ? getModalContentProps(animation, duration) : {};
|
468
468
|
const css = {
|
469
|
-
position: "relative",
|
470
|
-
maxH: "100%",
|
471
469
|
display: "flex",
|
472
470
|
flexDirection: "column",
|
473
|
-
|
471
|
+
maxH: "100%",
|
474
472
|
outline: 0,
|
473
|
+
overflow: scrollBehavior === "inside" ? "hidden" : "auto",
|
474
|
+
position: "relative",
|
475
475
|
...__css ? __css : styles.container
|
476
476
|
};
|
477
477
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
478
478
|
import_motion5.motion.section,
|
479
479
|
{
|
480
|
-
role: "dialog",
|
481
|
-
"aria-modal": "true",
|
482
480
|
ref,
|
483
481
|
className: (0, import_utils10.cx)("ui-modal", className),
|
482
|
+
"aria-modal": "true",
|
483
|
+
role: "dialog",
|
484
484
|
tabIndex: -1,
|
485
485
|
__css: css,
|
486
486
|
...props,
|
@@ -506,30 +506,30 @@ var Modal = (0, import_motion6.motionForwardRef)(
|
|
506
506
|
});
|
507
507
|
const {
|
508
508
|
className,
|
509
|
-
children,
|
510
|
-
isOpen,
|
511
|
-
onClose,
|
512
|
-
onOverlayClick,
|
513
|
-
onEsc,
|
514
|
-
onCloseComplete,
|
515
|
-
placement: _placement = "center",
|
516
|
-
outside = "fallback(4, 1rem)",
|
517
|
-
withCloseButton = true,
|
518
|
-
withOverlay = true,
|
519
509
|
allowPinchZoom = false,
|
520
|
-
|
510
|
+
animation = "scale",
|
521
511
|
autoFocus,
|
522
|
-
restoreFocus,
|
523
|
-
initialFocusRef,
|
524
|
-
finalFocusRef,
|
525
512
|
blockScrollOnMount = true,
|
526
|
-
|
513
|
+
children,
|
527
514
|
closeOnEsc = true,
|
528
|
-
|
529
|
-
animation = "scale",
|
515
|
+
closeOnOverlay = true,
|
530
516
|
duration,
|
531
|
-
|
517
|
+
finalFocusRef,
|
518
|
+
initialFocusRef,
|
519
|
+
isOpen,
|
520
|
+
lockFocusAcrossFrames = true,
|
521
|
+
outside = "fallback(4, 1rem)",
|
522
|
+
placement: _placement = "center",
|
523
|
+
restoreFocus,
|
524
|
+
scrollBehavior = "inside",
|
525
|
+
withCloseButton = true,
|
526
|
+
withOverlay = true,
|
532
527
|
containerProps,
|
528
|
+
portalProps,
|
529
|
+
onClose,
|
530
|
+
onCloseComplete,
|
531
|
+
onEsc,
|
532
|
+
onOverlayClick,
|
533
533
|
...rest
|
534
534
|
} = (0, import_core6.omitThemeProps)(mergedProps);
|
535
535
|
const onKeyDown = (0, import_react2.useCallback)(
|
@@ -553,39 +553,39 @@ var Modal = (0, import_motion6.motionForwardRef)(
|
|
553
553
|
drawerContent = (0, import_react2.cloneElement)(drawerContent, { onKeyDown });
|
554
554
|
const placement = (0, import_use_value2.useValue)(_placement);
|
555
555
|
const css = {
|
556
|
+
alignItems: placement.includes("top") ? "flex-start" : placement.includes("bottom") ? "flex-end" : "center",
|
557
|
+
display: "flex",
|
558
|
+
h: "100dvh",
|
559
|
+
justifyContent: placement.includes("left") ? "flex-start" : placement.includes("right") ? "flex-end" : "center",
|
560
|
+
left: 0,
|
561
|
+
p: size !== "full" ? outside : void 0,
|
556
562
|
position: "fixed",
|
557
563
|
top: 0,
|
558
|
-
left: 0,
|
559
|
-
zIndex: "fallback(jeice, 110)",
|
560
564
|
w: "100vw",
|
561
|
-
|
562
|
-
p: size !== "full" ? outside : void 0,
|
563
|
-
display: "flex",
|
564
|
-
justifyContent: placement.includes("left") ? "flex-start" : placement.includes("right") ? "flex-end" : "center",
|
565
|
-
alignItems: placement.includes("top") ? "flex-start" : placement.includes("bottom") ? "flex-end" : "center"
|
565
|
+
zIndex: "fallback(jeice, 110)"
|
566
566
|
};
|
567
567
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
568
568
|
ModalProvider,
|
569
569
|
{
|
570
570
|
value: {
|
571
|
-
isOpen,
|
572
|
-
onClose,
|
573
|
-
onOverlayClick,
|
574
|
-
withCloseButton,
|
575
|
-
scrollBehavior,
|
576
|
-
closeOnOverlay,
|
577
571
|
animation,
|
572
|
+
closeOnOverlay,
|
578
573
|
duration,
|
579
|
-
|
574
|
+
isOpen,
|
575
|
+
scrollBehavior,
|
576
|
+
styles,
|
577
|
+
withCloseButton,
|
578
|
+
onClose,
|
579
|
+
onOverlayClick
|
580
580
|
},
|
581
581
|
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)(
|
582
582
|
import_focus_lock.FocusLock,
|
583
583
|
{
|
584
584
|
autoFocus,
|
585
|
-
initialFocusRef,
|
586
585
|
finalFocusRef,
|
587
|
-
|
586
|
+
initialFocusRef,
|
588
587
|
lockFocusAcrossFrames,
|
588
|
+
restoreFocus,
|
589
589
|
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
590
590
|
import_react_remove_scroll.RemoveScroll,
|
591
591
|
{
|
@@ -617,40 +617,40 @@ var Modal = (0, import_motion6.motionForwardRef)(
|
|
617
617
|
// src/drawer.tsx
|
618
618
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
619
619
|
var Drawer = (0, import_motion7.motionForwardRef)(
|
620
|
-
({ size,
|
620
|
+
({ size, closeOnDrag = false, placement = "right", ...props }, ref) => {
|
621
621
|
const [styles, mergedProps] = (0, import_core7.useComponentMultiStyle)("Drawer", {
|
622
622
|
size,
|
623
|
-
placement,
|
624
623
|
closeOnDrag,
|
624
|
+
placement,
|
625
625
|
...props
|
626
626
|
});
|
627
627
|
const {
|
628
|
-
children,
|
629
|
-
isOpen,
|
630
|
-
onClose,
|
631
|
-
onOverlayClick,
|
632
|
-
onEsc,
|
633
|
-
onCloseComplete,
|
634
|
-
withCloseButton = !closeOnDrag,
|
635
|
-
withOverlay = true,
|
636
|
-
withDragBar = true,
|
637
628
|
allowPinchZoom,
|
638
629
|
autoFocus,
|
639
|
-
restoreFocus,
|
640
|
-
initialFocusRef,
|
641
|
-
finalFocusRef,
|
642
630
|
blockScrollOnMount,
|
643
|
-
|
631
|
+
children,
|
644
632
|
closeOnEsc,
|
645
|
-
|
646
|
-
duration = { enter: 0.4, exit: 0.3 },
|
633
|
+
closeOnOverlay,
|
647
634
|
dragConstraints = 0,
|
648
635
|
dragElastic = 0.1,
|
649
636
|
dragOffset = 80,
|
650
637
|
dragVelocity = 100,
|
638
|
+
duration = { enter: 0.4, exit: 0.3 },
|
639
|
+
finalFocusRef,
|
640
|
+
initialFocusRef,
|
641
|
+
isOpen,
|
642
|
+
lockFocusAcrossFrames,
|
643
|
+
restoreFocus,
|
644
|
+
withCloseButton = !closeOnDrag,
|
645
|
+
withDragBar = true,
|
646
|
+
withOverlay = true,
|
651
647
|
blankForDragProps,
|
652
|
-
portalProps,
|
653
648
|
containerProps,
|
649
|
+
portalProps,
|
650
|
+
onClose,
|
651
|
+
onCloseComplete,
|
652
|
+
onEsc,
|
653
|
+
onOverlayClick,
|
654
654
|
...rest
|
655
655
|
} = (0, import_core7.omitThemeProps)(mergedProps, ["isFullHeight"]);
|
656
656
|
const validChildren = (0, import_utils12.getValidChildren)(children);
|
@@ -663,25 +663,25 @@ var Drawer = (0, import_motion7.motionForwardRef)(
|
|
663
663
|
{
|
664
664
|
ref,
|
665
665
|
...{
|
666
|
-
isOpen,
|
667
|
-
onClose,
|
668
|
-
onOverlayClick,
|
669
|
-
onEsc,
|
670
|
-
onCloseComplete,
|
671
|
-
withCloseButton: false,
|
672
|
-
withOverlay: false,
|
673
666
|
allowPinchZoom,
|
674
667
|
autoFocus,
|
675
|
-
restoreFocus,
|
676
|
-
initialFocusRef,
|
677
|
-
finalFocusRef,
|
678
668
|
blockScrollOnMount,
|
679
|
-
closeOnOverlay,
|
680
669
|
closeOnEsc,
|
681
|
-
|
670
|
+
closeOnOverlay,
|
682
671
|
duration,
|
672
|
+
finalFocusRef,
|
673
|
+
initialFocusRef,
|
674
|
+
isOpen,
|
675
|
+
lockFocusAcrossFrames,
|
676
|
+
restoreFocus,
|
677
|
+
withCloseButton: false,
|
678
|
+
withOverlay: false,
|
679
|
+
containerProps,
|
683
680
|
portalProps,
|
684
|
-
|
681
|
+
onClose,
|
682
|
+
onCloseComplete,
|
683
|
+
onEsc,
|
684
|
+
onOverlayClick
|
685
685
|
},
|
686
686
|
children: [
|
687
687
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DrawerOverlay, {}) : null,
|
@@ -697,8 +697,8 @@ var Drawer = (0, import_motion7.motionForwardRef)(
|
|
697
697
|
withDragBar,
|
698
698
|
blankForDragProps,
|
699
699
|
...rest,
|
700
|
-
|
701
|
-
|
700
|
+
closeOnDrag,
|
701
|
+
placement
|
702
702
|
},
|
703
703
|
children: cloneChildren
|
704
704
|
}
|
package/dist/drawer.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/drawer.tsx","../src/drawer-content.tsx","../src/drawer-close-button.tsx","../src/modal-close-button.tsx","../src/modal-context.ts","../src/drawer-drag-bar.tsx","../src/drawer-overlay.tsx","../src/modal-overlay.tsx","../src/modal.tsx","../src/dialog-overlay.tsx","../src/modal-content.tsx","../src/dialog-close-button.tsx"],"sourcesContent":["import type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport { useComponentMultiStyle, omitThemeProps } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport type { SlideProps } from \"@yamada-ui/transitions\"\nimport { getValidChildren, findChildren } from \"@yamada-ui/utils\"\nimport { DrawerContent } from \"./drawer-content\"\nimport { DrawerOverlay } from \"./drawer-overlay\"\nimport { Modal } from \"./modal\"\nimport type { ModalProps } from \"./modal\"\nimport { DrawerProvider } from \"./modal-context\"\n\ninterface DrawerOptions {\n /**\n * The placement of the drawer.\n *\n * @default 'right'\n */\n placement?: SlideProps[\"placement\"]\n /**\n * If `true` and drawer's placement is `top` or `bottom`, the drawer will occupy the viewport height (100dvh).\n */\n isFullHeight?: boolean\n /**\n * If `true`, then the drawer will close on drag.\n *\n * @default false\n */\n closeOnDrag?: boolean\n /**\n * If `true`, display the drag bar when `closeOnDrag` is `true`.\n *\n * @default true\n */\n withDragBar?: boolean\n /**\n * Applies constraints on the permitted draggable area.\n *\n * @default 0\n */\n dragConstraints?: number\n /**\n * The degree of movement allowed outside constraints. 0 = no movement, 1 = full movement.\n *\n * @default 0.1\n */\n dragElastic?: number\n /**\n * Offset from being dragged to closing.\n *\n * @default 80\n */\n dragOffset?: number\n /**\n * Velocity of the drag that triggers close.\n *\n * @default 100\n */\n dragVelocity?: number\n /**\n * Props for the blank area when `closeOnDrag` is `true`.\n */\n blankForDragProps?: CSSUIObject\n}\n\nexport interface DrawerProps\n extends Omit<\n ModalProps,\n | \"scrollBehavior\"\n | \"animation\"\n | \"outside\"\n | \"placement\"\n | \"dragConstraints\"\n | \"dragElastic\"\n | keyof ThemeProps\n >,\n ThemeProps<\"Drawer\">,\n DrawerOptions {}\n\n/**\n * `Drawer` is a component for a panel that appears from the edge of the screen.\n *\n * @see Docs https://yamada-ui.com/components/overlay/drawer\n */\nexport const Drawer = motionForwardRef<DrawerProps, \"div\">(\n ({ size, placement = \"right\", closeOnDrag = false, ...props }, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Drawer\", {\n size,\n placement,\n closeOnDrag,\n ...props,\n })\n const {\n children,\n isOpen,\n onClose,\n onOverlayClick,\n onEsc,\n onCloseComplete,\n withCloseButton = !closeOnDrag,\n withOverlay = true,\n withDragBar = true,\n allowPinchZoom,\n autoFocus,\n restoreFocus,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount,\n closeOnOverlay,\n closeOnEsc,\n lockFocusAcrossFrames,\n duration = { enter: 0.4, exit: 0.3 },\n dragConstraints = 0,\n dragElastic = 0.1,\n dragOffset = 80,\n dragVelocity = 100,\n blankForDragProps,\n portalProps,\n containerProps,\n ...rest\n } = omitThemeProps(mergedProps, [\"isFullHeight\"])\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerOverlay, ...cloneChildren] = findChildren(\n validChildren,\n DrawerOverlay,\n )\n\n return (\n <DrawerProvider value={styles}>\n <Modal\n ref={ref}\n {...{\n isOpen,\n onClose,\n onOverlayClick,\n onEsc,\n onCloseComplete,\n withCloseButton: false,\n withOverlay: false,\n allowPinchZoom,\n autoFocus,\n restoreFocus,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount,\n closeOnOverlay,\n closeOnEsc,\n lockFocusAcrossFrames,\n duration,\n portalProps,\n containerProps,\n }}\n >\n {customDrawerOverlay ?? (withOverlay ? <DrawerOverlay /> : null)}\n\n <DrawerContent\n {...{\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n withCloseButton,\n withDragBar,\n blankForDragProps,\n ...rest,\n placement,\n closeOnDrag,\n }}\n >\n {cloneChildren}\n </DrawerContent>\n </Modal>\n </DrawerProvider>\n )\n },\n)\n\nDrawer.displayName = \"Drawer\"\nDrawer.__ui__ = \"Drawer\"\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 } 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, 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 } 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 {\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 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;AACA,IAAAA,eAAuD;AACvD,IAAAC,iBAAiC;AAEjC,IAAAC,iBAA+C;;;ACH/C,IAAAC,eAAmB;AACnB,oBAAiC;AAEjC,yBAAsB;AACtB,uBAAyB;AAEzB,IAAAC,gBAA4D;AAC5D,mBAAqC;;;ACPrC,IAAAC,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACDnB,0BAA4B;AAE5B,kBAA2B;AAC3B,IAAAC,gBAA+B;;;ACH/B,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;;;ADVK;AAVC,IAAM,uBAAmB;AAAA,EAC9B,CAAC,EAAE,SAAS,OAAO,GAAG,KAAK,GAAG,QA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cAAc;AACrB,OAAO,SAAS;","names":["import_core","import_motion","import_utils","import_core","import_utils","import_core","import_utils","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_motion","import_utils","import_motion","import_transitions","import_utils","import_jsx_runtime","import_jsx_runtime","import_core","import_motion","import_use_value","import_utils","import_react","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","import_jsx_runtime"]}
|
1
|
+
{"version":3,"sources":["../src/drawer.tsx","../src/drawer-content.tsx","../src/drawer-close-button.tsx","../src/modal-close-button.tsx","../src/modal-context.ts","../src/drawer-drag-bar.tsx","../src/drawer-overlay.tsx","../src/modal-overlay.tsx","../src/modal.tsx","../src/dialog-overlay.tsx","../src/modal-content.tsx","../src/dialog-close-button.tsx"],"sourcesContent":["import type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport type { SlideProps } from \"@yamada-ui/transitions\"\nimport type { ModalProps } from \"./modal\"\nimport { omitThemeProps, useComponentMultiStyle } from \"@yamada-ui/core\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { findChildren, getValidChildren } from \"@yamada-ui/utils\"\nimport { DrawerContent } from \"./drawer-content\"\nimport { DrawerOverlay } from \"./drawer-overlay\"\nimport { Modal } from \"./modal\"\nimport { DrawerProvider } from \"./modal-context\"\n\ninterface DrawerOptions {\n /**\n * If `true`, then the drawer will close on drag.\n *\n * @default false\n */\n closeOnDrag?: boolean\n /**\n * Applies constraints on the permitted draggable area.\n *\n * @default 0\n */\n dragConstraints?: number\n /**\n * The degree of movement allowed outside constraints. 0 = no movement, 1 = full movement.\n *\n * @default 0.1\n */\n dragElastic?: number\n /**\n * Offset from being dragged to closing.\n *\n * @default 80\n */\n dragOffset?: number\n /**\n * Velocity of the drag that triggers close.\n *\n * @default 100\n */\n dragVelocity?: number\n /**\n * If `true` and drawer's placement is `top` or `bottom`, the drawer will occupy the viewport height (100dvh).\n */\n isFullHeight?: boolean\n /**\n * The placement of the drawer.\n *\n * @default 'right'\n */\n placement?: SlideProps[\"placement\"]\n /**\n * If `true`, display the drag bar when `closeOnDrag` is `true`.\n *\n * @default true\n */\n withDragBar?: boolean\n /**\n * Props for the blank area when `closeOnDrag` is `true`.\n */\n blankForDragProps?: CSSUIObject\n}\n\nexport interface DrawerProps\n extends Omit<\n ModalProps,\n | \"animation\"\n | \"dragConstraints\"\n | \"dragElastic\"\n | \"outside\"\n | \"placement\"\n | \"scrollBehavior\"\n | keyof ThemeProps\n >,\n ThemeProps<\"Drawer\">,\n DrawerOptions {}\n\n/**\n * `Drawer` is a component for a panel that appears from the edge of the screen.\n *\n * @see Docs https://yamada-ui.com/components/overlay/drawer\n */\nexport const Drawer = motionForwardRef<DrawerProps, \"div\">(\n ({ size, closeOnDrag = false, placement = \"right\", ...props }, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Drawer\", {\n size,\n closeOnDrag,\n placement,\n ...props,\n })\n const {\n allowPinchZoom,\n autoFocus,\n blockScrollOnMount,\n children,\n closeOnEsc,\n closeOnOverlay,\n dragConstraints = 0,\n dragElastic = 0.1,\n dragOffset = 80,\n dragVelocity = 100,\n duration = { enter: 0.4, exit: 0.3 },\n finalFocusRef,\n initialFocusRef,\n isOpen,\n lockFocusAcrossFrames,\n restoreFocus,\n withCloseButton = !closeOnDrag,\n withDragBar = true,\n withOverlay = true,\n blankForDragProps,\n containerProps,\n portalProps,\n onClose,\n onCloseComplete,\n onEsc,\n onOverlayClick,\n ...rest\n } = omitThemeProps(mergedProps, [\"isFullHeight\"])\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerOverlay, ...cloneChildren] = findChildren(\n validChildren,\n DrawerOverlay,\n )\n\n return (\n <DrawerProvider value={styles}>\n <Modal\n ref={ref}\n {...{\n allowPinchZoom,\n autoFocus,\n blockScrollOnMount,\n closeOnEsc,\n closeOnOverlay,\n duration,\n finalFocusRef,\n initialFocusRef,\n isOpen,\n lockFocusAcrossFrames,\n restoreFocus,\n withCloseButton: false,\n withOverlay: false,\n containerProps,\n portalProps,\n onClose,\n onCloseComplete,\n onEsc,\n onOverlayClick,\n }}\n >\n {customDrawerOverlay ?? (withOverlay ? <DrawerOverlay /> : null)}\n\n <DrawerContent\n {...{\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n withCloseButton,\n withDragBar,\n blankForDragProps,\n ...rest,\n closeOnDrag,\n placement,\n }}\n >\n {cloneChildren}\n </DrawerContent>\n </Modal>\n </DrawerProvider>\n )\n },\n)\n\nDrawer.displayName = \"Drawer\"\nDrawer.__ui__ = \"Drawer\"\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 } 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, 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 } 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 {\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 { 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;AAGA,IAAAA,eAAuD;AACvD,IAAAC,iBAAiC;AACjC,IAAAC,iBAA+C;;;ACD/C,IAAAC,eAAmB;AACnB,oBAAiC;AACjC,yBAAsB;AAC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A;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,iBAAiB;AAAA,UACjB,aAAa;AAAA,UACb;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QAEC;AAAA,8DAAwB,cAAc,8CAAC,iBAAc,IAAK;AAAA,UAE3D;AAAA,YAAC;AAAA;AAAA,cACE,GAAG;AAAA,gBACF;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA,GAAG;AAAA,gBACH;AAAA,gBACA;AAAA,cACF;AAAA,cAEC;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IACF,GACF;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;AACrB,OAAO,SAAS;","names":["import_core","import_motion","import_utils","import_core","import_utils","import_core","import_utils","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_motion","import_utils","import_motion","import_transitions","import_utils","import_jsx_runtime","import_jsx_runtime","import_core","import_motion","import_use_value","import_utils","import_react","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","import_jsx_runtime"]}
|