@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
@@ -1,18 +1,18 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
useModal
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-A7WOQJCA.mjs";
|
5
5
|
|
6
6
|
// src/modal-footer.tsx
|
7
|
-
import {
|
7
|
+
import { forwardRef, ui } from "@yamada-ui/core";
|
8
8
|
import { cx } from "@yamada-ui/utils";
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
10
10
|
var ModalFooter = forwardRef(
|
11
11
|
({ className, __css, ...rest }, ref) => {
|
12
12
|
const { styles } = useModal();
|
13
13
|
const css = {
|
14
|
-
display: "flex",
|
15
14
|
alignItems: "center",
|
15
|
+
display: "flex",
|
16
16
|
justifyContent: "flex-end",
|
17
17
|
...__css ? __css : styles.footer
|
18
18
|
};
|
@@ -33,4 +33,4 @@ ModalFooter.__ui__ = "ModalFooter";
|
|
33
33
|
export {
|
34
34
|
ModalFooter
|
35
35
|
};
|
36
|
-
//# sourceMappingURL=chunk-
|
36
|
+
//# sourceMappingURL=chunk-L353QQ6S.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/modal-footer.tsx"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"sources":["../src/modal-footer.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalFooterProps extends HTMLUIProps<\"footer\"> {}\n\nexport const ModalFooter = forwardRef<ModalFooterProps, \"footer\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles } = useModal()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"flex-end\",\n ...(__css ? __css : styles.footer),\n }\n\n return (\n <ui.footer\n ref={ref}\n className={cx(\"ui-modal__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalFooter.displayName = \"ModalFooter\"\nModalFooter.__ui__ = \"ModalFooter\"\n"],"mappings":";;;;;;AACA,SAAS,YAAY,UAAU;AAC/B,SAAS,UAAU;AAiBb;AAZC,IAAM,cAAc;AAAA,EACzB,CAAC,EAAE,WAAW,OAAO,GAAG,KAAK,GAAG,QAAQ;AACtC,UAAM,EAAE,OAAO,IAAI,SAAS;AAE5B,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,GAAI,QAAQ,QAAQ,OAAO;AAAA,IAC7B;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,WAAW,GAAG,oBAAoB,SAAS;AAAA,QAC3C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
ModalCloseButton
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-PDW7A62B.mjs";
|
5
5
|
import {
|
6
6
|
useDialog
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-A7WOQJCA.mjs";
|
8
8
|
|
9
9
|
// src/dialog-close-button.tsx
|
10
10
|
import { forwardRef } from "@yamada-ui/core";
|
@@ -31,4 +31,4 @@ DialogCloseButton.__ui__ = "DialogCloseButton";
|
|
31
31
|
export {
|
32
32
|
DialogCloseButton
|
33
33
|
};
|
34
|
-
//# sourceMappingURL=chunk-
|
34
|
+
//# sourceMappingURL=chunk-LUSTM3GA.mjs.map
|
@@ -1,18 +1,18 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
useModal
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-A7WOQJCA.mjs";
|
5
5
|
|
6
6
|
// src/modal-header.tsx
|
7
|
-
import {
|
7
|
+
import { forwardRef, ui } from "@yamada-ui/core";
|
8
8
|
import { cx } from "@yamada-ui/utils";
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
10
10
|
var ModalHeader = forwardRef(
|
11
11
|
({ className, __css, ...rest }, ref) => {
|
12
12
|
const { styles } = useModal();
|
13
13
|
const css = {
|
14
|
-
display: "flex",
|
15
14
|
alignItems: "center",
|
15
|
+
display: "flex",
|
16
16
|
justifyContent: "flex-start",
|
17
17
|
...__css ? __css : styles.header
|
18
18
|
};
|
@@ -33,4 +33,4 @@ ModalHeader.__ui__ = "ModalHeader";
|
|
33
33
|
export {
|
34
34
|
ModalHeader
|
35
35
|
};
|
36
|
-
//# sourceMappingURL=chunk-
|
36
|
+
//# sourceMappingURL=chunk-LYMMHCHF.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/modal-header.tsx"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"sources":["../src/modal-header.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalHeaderProps extends HTMLUIProps<\"header\"> {}\n\nexport const ModalHeader = forwardRef<ModalHeaderProps, \"header\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles } = useModal()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n ...(__css ? __css : styles.header),\n }\n\n return (\n <ui.header\n ref={ref}\n className={cx(\"ui-modal__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalHeader.displayName = \"ModalHeader\"\nModalHeader.__ui__ = \"ModalHeader\"\n"],"mappings":";;;;;;AACA,SAAS,YAAY,UAAU;AAC/B,SAAS,UAAU;AAiBb;AAZC,IAAM,cAAc;AAAA,EACzB,CAAC,EAAE,WAAW,OAAO,GAAG,KAAK,GAAG,QAAQ;AACtC,UAAM,EAAE,OAAO,IAAI,SAAS;AAE5B,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,GAAI,QAAQ,QAAQ,OAAO;AAAA,IAC7B;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,WAAW,GAAG,oBAAoB,SAAS;AAAA,QAC3C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
useDrawer
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-A7WOQJCA.mjs";
|
5
5
|
|
6
6
|
// src/drawer-drag-bar.tsx
|
7
7
|
import { forwardRef, ui } from "@yamada-ui/core";
|
@@ -28,4 +28,4 @@ DrawerDragBar.__ui__ = "DrawerDragBar";
|
|
28
28
|
export {
|
29
29
|
DrawerDragBar
|
30
30
|
};
|
31
|
-
//# sourceMappingURL=chunk-
|
31
|
+
//# sourceMappingURL=chunk-OAECULYV.mjs.map
|
@@ -1,39 +1,39 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
DrawerDragBar
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-OAECULYV.mjs";
|
5
5
|
import {
|
6
6
|
DrawerCloseButton
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-VNQHFTL2.mjs";
|
8
8
|
import {
|
9
9
|
useDrawer,
|
10
10
|
useModal
|
11
|
-
} from "./chunk-
|
11
|
+
} from "./chunk-A7WOQJCA.mjs";
|
12
12
|
|
13
13
|
// src/drawer-content.tsx
|
14
14
|
import { ui } from "@yamada-ui/core";
|
15
15
|
import { motionForwardRef } from "@yamada-ui/motion";
|
16
16
|
import { Slide } from "@yamada-ui/transitions";
|
17
17
|
import { useValue } from "@yamada-ui/use-value";
|
18
|
-
import {
|
18
|
+
import { cx, findChildren, getValidChildren, isArray } from "@yamada-ui/utils";
|
19
19
|
import { useCallback, useMemo } from "react";
|
20
20
|
import { jsx, jsxs } from "react/jsx-runtime";
|
21
21
|
var DrawerContent = motionForwardRef(
|
22
22
|
({
|
23
23
|
className,
|
24
24
|
children,
|
25
|
-
placement: _placement,
|
26
|
-
withCloseButton,
|
27
|
-
withDragBar,
|
28
25
|
closeOnDrag,
|
29
26
|
dragConstraints,
|
30
27
|
dragElastic,
|
31
28
|
dragOffset,
|
32
29
|
dragVelocity,
|
30
|
+
placement: _placement,
|
31
|
+
withCloseButton,
|
32
|
+
withDragBar,
|
33
33
|
blankForDragProps,
|
34
34
|
...rest
|
35
35
|
}, ref) => {
|
36
|
-
const { isOpen, onClose
|
36
|
+
const { duration, isOpen, onClose } = useModal();
|
37
37
|
const styles = useDrawer();
|
38
38
|
const placement = useValue(_placement);
|
39
39
|
const validChildren = getValidChildren(children);
|
@@ -52,27 +52,27 @@ var DrawerContent = motionForwardRef(
|
|
52
52
|
let position = {};
|
53
53
|
switch (placement) {
|
54
54
|
case "top":
|
55
|
-
position = { top: "calc(-100dvh + 1px)"
|
55
|
+
position = { left: 0, right: 0, top: "calc(-100dvh + 1px)" };
|
56
56
|
break;
|
57
57
|
case "bottom":
|
58
58
|
position = { bottom: "calc(-100dvh + 1px)", left: 0, right: 0 };
|
59
59
|
break;
|
60
60
|
case "left":
|
61
|
-
position = { left: "calc(-100% + 1px)", top: 0
|
61
|
+
position = { bottom: 0, left: "calc(-100% + 1px)", top: 0 };
|
62
62
|
break;
|
63
63
|
case "right":
|
64
|
-
position = { right: "calc(-100% + 1px)", top: 0
|
64
|
+
position = { bottom: 0, right: "calc(-100% + 1px)", top: 0 };
|
65
65
|
break;
|
66
66
|
}
|
67
67
|
const [lightBg, darkBg] = blankForDragBg;
|
68
68
|
return {
|
69
69
|
_after: {
|
70
|
+
bg: lightBg,
|
70
71
|
content: '""',
|
71
72
|
display: "block",
|
72
|
-
w: "100%",
|
73
73
|
h: "100dvh",
|
74
|
-
bg: lightBg,
|
75
74
|
position: "absolute",
|
75
|
+
w: "100%",
|
76
76
|
...position,
|
77
77
|
...blankForDragProps
|
78
78
|
},
|
@@ -138,18 +138,18 @@ var DrawerContent = motionForwardRef(
|
|
138
138
|
{
|
139
139
|
ref,
|
140
140
|
className: cx("ui-drawer", className),
|
141
|
-
isOpen,
|
142
|
-
placement,
|
143
|
-
duration,
|
144
141
|
drag: closeOnDrag ? getDragDirection() : false,
|
145
142
|
dragConstraints: getDragDirectionRestriction(dragConstraints),
|
146
143
|
dragElastic: getDragDirectionRestriction(dragElastic),
|
147
|
-
dragSnapToOrigin: true,
|
148
144
|
dragMomentum: false,
|
145
|
+
dragSnapToOrigin: true,
|
146
|
+
duration,
|
147
|
+
isOpen,
|
148
|
+
placement,
|
149
|
+
tabIndex: -1,
|
149
150
|
onDragEnd: (_, info) => {
|
150
151
|
if (isCloseByDragInfo(info)) onClose == null ? void 0 : onClose();
|
151
152
|
},
|
152
|
-
tabIndex: -1,
|
153
153
|
__css: css,
|
154
154
|
...rest,
|
155
155
|
children: [
|
@@ -180,4 +180,4 @@ DrawerContent.__ui__ = "DrawerContent";
|
|
180
180
|
export {
|
181
181
|
DrawerContent
|
182
182
|
};
|
183
|
-
//# sourceMappingURL=chunk-
|
183
|
+
//# sourceMappingURL=chunk-P5SCGBP7.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/drawer-content.tsx"],"sourcesContent":["import type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/drawer-content.tsx"],"sourcesContent":["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"],"mappings":"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","names":[]}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
useModal
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-A7WOQJCA.mjs";
|
5
5
|
|
6
6
|
// src/modal-close-button.tsx
|
7
7
|
import { CloseButton } from "@yamada-ui/close-button";
|
@@ -20,11 +20,11 @@ var ModalCloseButton = forwardRef(
|
|
20
20
|
{
|
21
21
|
ref,
|
22
22
|
className: cx("ui-modal__close-button"),
|
23
|
-
__css: css,
|
24
23
|
onClick: handlerAll(onClick, (ev) => {
|
25
24
|
ev.stopPropagation();
|
26
25
|
onClose == null ? void 0 : onClose();
|
27
26
|
}),
|
27
|
+
__css: css,
|
28
28
|
...rest
|
29
29
|
}
|
30
30
|
);
|
@@ -36,4 +36,4 @@ ModalCloseButton.__ui__ = "ModalCloseButton";
|
|
36
36
|
export {
|
37
37
|
ModalCloseButton
|
38
38
|
};
|
39
|
-
//# sourceMappingURL=chunk-
|
39
|
+
//# sourceMappingURL=chunk-PDW7A62B.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/modal-close-button.tsx"],"sourcesContent":["import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/modal-close-button.tsx"],"sourcesContent":["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"],"mappings":";;;;;;AAEA,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,IAAI,kBAAkB;AAezB;AAVC,IAAM,mBAAmB;AAAA,EAC9B,CAAC,EAAE,SAAS,OAAO,GAAG,KAAK,GAAG,QAAQ;AACpC,UAAM,EAAE,QAAQ,QAAQ,IAAI,SAAS;AAErC,UAAM,MAAmB;AAAA,MACvB,UAAU;AAAA,MACV,GAAI,QAAQ,QAAQ,OAAO;AAAA,IAC7B;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,wBAAwB;AAAA,QACtC,SAAS,WAAW,SAAS,CAAC,OAAO;AACnC,aAAG,gBAAgB;AACnB;AAAA,QACF,CAAC;AAAA,QACD,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,iBAAiB,cAAc;AAC/B,iBAAiB,SAAS;","names":[]}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
ModalFooter
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-L353QQ6S.mjs";
|
5
5
|
import {
|
6
6
|
useDrawer
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-A7WOQJCA.mjs";
|
8
8
|
|
9
9
|
// src/drawer-footer.tsx
|
10
10
|
import { forwardRef } from "@yamada-ui/core";
|
@@ -31,4 +31,4 @@ DrawerFooter.__ui__ = "DrawerFooter";
|
|
31
31
|
export {
|
32
32
|
DrawerFooter
|
33
33
|
};
|
34
|
-
//# sourceMappingURL=chunk-
|
34
|
+
//# sourceMappingURL=chunk-TXXRGDQR.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/drawer-footer.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/drawer-footer.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalFooterProps } from \"./modal-footer\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDrawer } from \"./modal-context\"\nimport { ModalFooter } from \"./modal-footer\"\n\nexport interface DrawerFooterProps extends ModalFooterProps {}\n\nexport const DrawerFooter = forwardRef<DrawerFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.footer }\n\n return (\n <ModalFooter\n ref={ref}\n className={cx(\"ui-drawer__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDrawerFooter.displayName = \"DrawerFooter\"\nDrawerFooter.__ui__ = \"DrawerFooter\"\n"],"mappings":";;;;;;;;;AAEA,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AAab;AAPC,IAAM,eAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;AAC3B,aAAa,SAAS;","names":[]}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
useModal
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-A7WOQJCA.mjs";
|
5
5
|
|
6
6
|
// src/modal-overlay.tsx
|
7
7
|
import { motion, motionForwardRef } from "@yamada-ui/motion";
|
@@ -9,21 +9,21 @@ import { fadeProps } from "@yamada-ui/transitions";
|
|
9
9
|
import { cx, handlerAll } from "@yamada-ui/utils";
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
11
11
|
var ModalOverlay = motionForwardRef(
|
12
|
-
({ className,
|
12
|
+
({ className, onClick, __css, ...rest }, ref) => {
|
13
13
|
const {
|
14
|
-
|
14
|
+
animation,
|
15
15
|
closeOnOverlay,
|
16
|
-
|
16
|
+
duration,
|
17
|
+
styles,
|
17
18
|
onClose,
|
18
|
-
|
19
|
-
duration
|
19
|
+
onOverlayClick
|
20
20
|
} = useModal();
|
21
21
|
const css = {
|
22
|
+
h: "100dvh",
|
23
|
+
left: 0,
|
22
24
|
position: "fixed",
|
23
25
|
top: 0,
|
24
|
-
left: 0,
|
25
26
|
w: "100vw",
|
26
|
-
h: "100dvh",
|
27
27
|
...__css ? __css : styles.overlay
|
28
28
|
};
|
29
29
|
const props = animation !== "none" ? fadeProps : {};
|
@@ -33,11 +33,11 @@ var ModalOverlay = motionForwardRef(
|
|
33
33
|
ref,
|
34
34
|
className: cx("ui-modal__overlay", className),
|
35
35
|
custom: { duration },
|
36
|
-
__css: css,
|
37
36
|
onClick: handlerAll(onClick, onOverlayClick, (ev) => {
|
38
37
|
ev.stopPropagation();
|
39
38
|
if (closeOnOverlay) onClose == null ? void 0 : onClose();
|
40
39
|
}),
|
40
|
+
__css: css,
|
41
41
|
...props,
|
42
42
|
...rest
|
43
43
|
}
|
@@ -50,4 +50,4 @@ ModalOverlay.__ui__ = "ModalOverlay";
|
|
50
50
|
export {
|
51
51
|
ModalOverlay
|
52
52
|
};
|
53
|
-
//# sourceMappingURL=chunk-
|
53
|
+
//# sourceMappingURL=chunk-VB44U6WY.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/modal-overlay.tsx"],"sourcesContent":["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,
|
1
|
+
{"version":3,"sources":["../src/modal-overlay.tsx"],"sourcesContent":["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"],"mappings":";;;;;;AAEA,SAAS,QAAQ,wBAAwB;AACzC,SAAS,iBAAiB;AAC1B,SAAS,IAAI,kBAAkB;AA4BzB;AAvBC,IAAM,eAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,SAAS,OAAO,GAAG,KAAK,GAAG,QAAQ;AAC/C,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI,SAAS;AAEb,UAAM,MAAmB;AAAA,MACvB,GAAG;AAAA,MACH,MAAM;AAAA,MACN,UAAU;AAAA,MACV,KAAK;AAAA,MACL,GAAG;AAAA,MACH,GAAI,QAAQ,QAAQ,OAAO;AAAA,IAC7B;AAEA,UAAM,QAAQ,cAAc,SAAS,YAAY,CAAC;AAElD,WACE;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC;AAAA,QACA,WAAW,GAAG,qBAAqB,SAAS;AAAA,QAC5C,QAAQ,EAAE,SAAS;AAAA,QACnB,SAAS,WAAW,SAAS,gBAAgB,CAAC,OAAO;AACnD,aAAG,gBAAgB;AACnB,cAAI,eAAgB;AAAA,QACtB,CAAC;AAAA,QACD,OAAO;AAAA,QACN,GAAG;AAAA,QACH,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;AAC3B,aAAa,SAAS;","names":[]}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
ModalBody
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-ZDEVCYYC.mjs";
|
5
5
|
import {
|
6
6
|
useDialog
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-A7WOQJCA.mjs";
|
8
8
|
|
9
9
|
// src/dialog-body.tsx
|
10
10
|
import { forwardRef } from "@yamada-ui/core";
|
@@ -31,4 +31,4 @@ DialogBody.__ui__ = "DialogBody";
|
|
31
31
|
export {
|
32
32
|
DialogBody
|
33
33
|
};
|
34
|
-
//# sourceMappingURL=chunk-
|
34
|
+
//# sourceMappingURL=chunk-VMTMWWII.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/dialog-body.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/dialog-body.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalBodyProps } from \"./modal-body\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { ModalBody } from \"./modal-body\"\nimport { useDialog } from \"./modal-context\"\n\nexport interface DialogBodyProps extends ModalBodyProps {}\n\nexport const DialogBody = forwardRef<DialogBodyProps, \"main\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.body }\n\n return (\n <ModalBody\n ref={ref}\n className={cx(\"ui-dialog__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogBody.displayName = \"DialogBody\"\nDialogBody.__ui__ = \"DialogBody\"\n"],"mappings":";;;;;;;;;AAEA,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AAab;AAPC,IAAM,aAAa;AAAA,EACxB,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,KAAK;AAE1C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,mBAAmB,SAAS;AAAA,QAC1C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;AACzB,WAAW,SAAS;","names":[]}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
ModalCloseButton
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-PDW7A62B.mjs";
|
5
5
|
import {
|
6
6
|
useDrawer
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-A7WOQJCA.mjs";
|
8
8
|
|
9
9
|
// src/drawer-close-button.tsx
|
10
10
|
import { forwardRef } from "@yamada-ui/core";
|
@@ -31,4 +31,4 @@ DrawerCloseButton.__ui__ = "DrawerCloseButton";
|
|
31
31
|
export {
|
32
32
|
DrawerCloseButton
|
33
33
|
};
|
34
|
-
//# sourceMappingURL=chunk-
|
34
|
+
//# sourceMappingURL=chunk-VNQHFTL2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/drawer-close-button.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/drawer-close-button.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;;;AAEA,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AAab;AAPC,IAAM,oBAAoB;AAAA,EAC/B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,YAAY;AAEjD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,2BAA2B,SAAS;AAAA,QAClD,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;AAChC,kBAAkB,SAAS;","names":[]}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
ModalFooter
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-L353QQ6S.mjs";
|
5
5
|
import {
|
6
6
|
useDialog
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-A7WOQJCA.mjs";
|
8
8
|
|
9
9
|
// src/dialog-footer.tsx
|
10
10
|
import { forwardRef } from "@yamada-ui/core";
|
@@ -31,4 +31,4 @@ DialogFooter.__ui__ = "DialogFooter";
|
|
31
31
|
export {
|
32
32
|
DialogFooter
|
33
33
|
};
|
34
|
-
//# sourceMappingURL=chunk-
|
34
|
+
//# sourceMappingURL=chunk-W7WF42SC.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/dialog-footer.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/dialog-footer.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalFooterProps } from \"./modal-footer\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDialog } from \"./modal-context\"\nimport { ModalFooter } from \"./modal-footer\"\n\nexport interface DialogFooterProps extends ModalFooterProps {}\n\nexport const DialogFooter = forwardRef<DialogFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.footer }\n\n return (\n <ModalFooter\n ref={ref}\n className={cx(\"ui-dialog__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogFooter.displayName = \"DialogFooter\"\nDialogFooter.__ui__ = \"DialogFooter\"\n"],"mappings":";;;;;;;;;AAEA,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AAab;AAPC,IAAM,eAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;AAC3B,aAAa,SAAS;","names":[]}
|
@@ -1,19 +1,19 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
useModal
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-A7WOQJCA.mjs";
|
5
5
|
|
6
6
|
// src/modal-body.tsx
|
7
|
-
import {
|
7
|
+
import { forwardRef, ui } from "@yamada-ui/core";
|
8
8
|
import { cx } from "@yamada-ui/utils";
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
10
10
|
var ModalBody = forwardRef(
|
11
11
|
({ className, __css, ...rest }, ref) => {
|
12
|
-
const {
|
12
|
+
const { scrollBehavior, styles } = useModal();
|
13
13
|
const css = {
|
14
|
+
alignItems: "flex-start",
|
14
15
|
display: "flex",
|
15
16
|
flexDirection: "column",
|
16
|
-
alignItems: "flex-start",
|
17
17
|
overflow: scrollBehavior === "inside" ? "auto" : void 0,
|
18
18
|
...__css ? __css : styles.body
|
19
19
|
};
|
@@ -34,4 +34,4 @@ ModalBody.__ui__ = "ModalBody";
|
|
34
34
|
export {
|
35
35
|
ModalBody
|
36
36
|
};
|
37
|
-
//# sourceMappingURL=chunk-
|
37
|
+
//# sourceMappingURL=chunk-ZDEVCYYC.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/modal-body.tsx"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"sources":["../src/modal-body.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps } from \"@yamada-ui/core\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalBodyProps extends HTMLUIProps {}\n\nexport const ModalBody = forwardRef<ModalBodyProps, \"div\">(\n ({ className, __css, ...rest }, ref) => {\n const { scrollBehavior, styles } = useModal()\n\n const css: CSSUIObject = {\n alignItems: \"flex-start\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: scrollBehavior === \"inside\" ? \"auto\" : undefined,\n ...(__css ? __css : styles.body),\n }\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-modal__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nModalBody.displayName = \"ModalBody\"\nModalBody.__ui__ = \"ModalBody\"\n"],"mappings":";;;;;;AACA,SAAS,YAAY,UAAU;AAC/B,SAAS,UAAU;AAkBb;AAbC,IAAM,YAAY;AAAA,EACvB,CAAC,EAAE,WAAW,OAAO,GAAG,KAAK,GAAG,QAAQ;AACtC,UAAM,EAAE,gBAAgB,OAAO,IAAI,SAAS;AAE5C,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,eAAe;AAAA,MACf,UAAU,mBAAmB,WAAW,SAAS;AAAA,MACjD,GAAI,QAAQ,QAAQ,OAAO;AAAA,IAC7B;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,WAAW,GAAG,kBAAkB,SAAS;AAAA,QACzC,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,UAAU,cAAc;AACxB,UAAU,SAAS;","names":[]}
|