@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,57 +1,57 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
Modal
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-7I5LX3VI.mjs";
|
5
5
|
import {
|
6
6
|
DrawerContent
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-P5SCGBP7.mjs";
|
8
8
|
import {
|
9
9
|
DrawerOverlay
|
10
|
-
} from "./chunk-
|
10
|
+
} from "./chunk-G7R3GU24.mjs";
|
11
11
|
import {
|
12
12
|
DrawerProvider
|
13
|
-
} from "./chunk-
|
13
|
+
} from "./chunk-A7WOQJCA.mjs";
|
14
14
|
|
15
15
|
// src/drawer.tsx
|
16
|
-
import {
|
16
|
+
import { omitThemeProps, useComponentMultiStyle } from "@yamada-ui/core";
|
17
17
|
import { motionForwardRef } from "@yamada-ui/motion";
|
18
|
-
import {
|
18
|
+
import { findChildren, getValidChildren } from "@yamada-ui/utils";
|
19
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
20
20
|
var Drawer = motionForwardRef(
|
21
|
-
({ size,
|
21
|
+
({ size, closeOnDrag = false, placement = "right", ...props }, ref) => {
|
22
22
|
const [styles, mergedProps] = useComponentMultiStyle("Drawer", {
|
23
23
|
size,
|
24
|
-
placement,
|
25
24
|
closeOnDrag,
|
25
|
+
placement,
|
26
26
|
...props
|
27
27
|
});
|
28
28
|
const {
|
29
|
-
children,
|
30
|
-
isOpen,
|
31
|
-
onClose,
|
32
|
-
onOverlayClick,
|
33
|
-
onEsc,
|
34
|
-
onCloseComplete,
|
35
|
-
withCloseButton = !closeOnDrag,
|
36
|
-
withOverlay = true,
|
37
|
-
withDragBar = true,
|
38
29
|
allowPinchZoom,
|
39
30
|
autoFocus,
|
40
|
-
restoreFocus,
|
41
|
-
initialFocusRef,
|
42
|
-
finalFocusRef,
|
43
31
|
blockScrollOnMount,
|
44
|
-
|
32
|
+
children,
|
45
33
|
closeOnEsc,
|
46
|
-
|
47
|
-
duration = { enter: 0.4, exit: 0.3 },
|
34
|
+
closeOnOverlay,
|
48
35
|
dragConstraints = 0,
|
49
36
|
dragElastic = 0.1,
|
50
37
|
dragOffset = 80,
|
51
38
|
dragVelocity = 100,
|
39
|
+
duration = { enter: 0.4, exit: 0.3 },
|
40
|
+
finalFocusRef,
|
41
|
+
initialFocusRef,
|
42
|
+
isOpen,
|
43
|
+
lockFocusAcrossFrames,
|
44
|
+
restoreFocus,
|
45
|
+
withCloseButton = !closeOnDrag,
|
46
|
+
withDragBar = true,
|
47
|
+
withOverlay = true,
|
52
48
|
blankForDragProps,
|
53
|
-
portalProps,
|
54
49
|
containerProps,
|
50
|
+
portalProps,
|
51
|
+
onClose,
|
52
|
+
onCloseComplete,
|
53
|
+
onEsc,
|
54
|
+
onOverlayClick,
|
55
55
|
...rest
|
56
56
|
} = omitThemeProps(mergedProps, ["isFullHeight"]);
|
57
57
|
const validChildren = getValidChildren(children);
|
@@ -64,25 +64,25 @@ var Drawer = motionForwardRef(
|
|
64
64
|
{
|
65
65
|
ref,
|
66
66
|
...{
|
67
|
-
isOpen,
|
68
|
-
onClose,
|
69
|
-
onOverlayClick,
|
70
|
-
onEsc,
|
71
|
-
onCloseComplete,
|
72
|
-
withCloseButton: false,
|
73
|
-
withOverlay: false,
|
74
67
|
allowPinchZoom,
|
75
68
|
autoFocus,
|
76
|
-
restoreFocus,
|
77
|
-
initialFocusRef,
|
78
|
-
finalFocusRef,
|
79
69
|
blockScrollOnMount,
|
80
|
-
closeOnOverlay,
|
81
70
|
closeOnEsc,
|
82
|
-
|
71
|
+
closeOnOverlay,
|
83
72
|
duration,
|
73
|
+
finalFocusRef,
|
74
|
+
initialFocusRef,
|
75
|
+
isOpen,
|
76
|
+
lockFocusAcrossFrames,
|
77
|
+
restoreFocus,
|
78
|
+
withCloseButton: false,
|
79
|
+
withOverlay: false,
|
80
|
+
containerProps,
|
84
81
|
portalProps,
|
85
|
-
|
82
|
+
onClose,
|
83
|
+
onCloseComplete,
|
84
|
+
onEsc,
|
85
|
+
onOverlayClick
|
86
86
|
},
|
87
87
|
children: [
|
88
88
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ jsx(DrawerOverlay, {}) : null,
|
@@ -98,8 +98,8 @@ var Drawer = motionForwardRef(
|
|
98
98
|
withDragBar,
|
99
99
|
blankForDragProps,
|
100
100
|
...rest,
|
101
|
-
|
102
|
-
|
101
|
+
closeOnDrag,
|
102
|
+
placement
|
103
103
|
},
|
104
104
|
children: cloneChildren
|
105
105
|
}
|
@@ -115,4 +115,4 @@ Drawer.__ui__ = "Drawer";
|
|
115
115
|
export {
|
116
116
|
Drawer
|
117
117
|
};
|
118
|
-
//# sourceMappingURL=chunk-
|
118
|
+
//# sourceMappingURL=chunk-ZVXKXIPM.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/drawer.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"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAS,gBAAgB,8BAA8B;AACvD,SAAS,wBAAwB;AACjC,SAAS,cAAc,wBAAwB;AA6HvC,SAwByC,KAxBzC;AA/CD,IAAM,SAAS;AAAA,EACpB,CAAC,EAAE,MAAM,cAAc,OAAO,YAAY,SAAS,GAAG,MAAM,GAAG,QAAQ;AACrE,UAAM,CAAC,QAAQ,WAAW,IAAI,uBAAuB,UAAU;AAAA,MAC7D;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AACD,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,kBAAkB;AAAA,MAClB,cAAc;AAAA,MACd,aAAa;AAAA,MACb,eAAe;AAAA,MACf,WAAW,EAAE,OAAO,KAAK,MAAM,IAAI;AAAA,MACnC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,kBAAkB,CAAC;AAAA,MACnB,cAAc;AAAA,MACd,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI,eAAe,aAAa,CAAC,cAAc,CAAC;AAEhD,UAAM,gBAAgB,iBAAiB,QAAQ;AAE/C,UAAM,CAAC,qBAAqB,GAAG,aAAa,IAAI;AAAA,MAC9C;AAAA,MACA;AAAA,IACF;AAEA,WACE,oBAAC,kBAAe,OAAO,QACrB;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACC,GAAG;AAAA,UACF;AAAA,UACA;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,oBAAC,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":[]}
|
package/dist/dialog-body.js
CHANGED
@@ -50,11 +50,11 @@ var [DrawerProvider, useDrawer] = (0, import_utils.createContext)({
|
|
50
50
|
var import_jsx_runtime = require("react/jsx-runtime");
|
51
51
|
var ModalBody = (0, import_core.forwardRef)(
|
52
52
|
({ className, __css, ...rest }, ref) => {
|
53
|
-
const {
|
53
|
+
const { scrollBehavior, styles } = useModal();
|
54
54
|
const css = {
|
55
|
+
alignItems: "flex-start",
|
55
56
|
display: "flex",
|
56
57
|
flexDirection: "column",
|
57
|
-
alignItems: "flex-start",
|
58
58
|
overflow: scrollBehavior === "inside" ? "auto" : void 0,
|
59
59
|
...__css ? __css : styles.body
|
60
60
|
};
|
package/dist/dialog-body.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/dialog-body.tsx","../src/modal-body.tsx","../src/modal-context.ts"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/dialog-body.tsx","../src/modal-body.tsx","../src/modal-context.ts"],"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","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","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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACFnB,kBAA+B;AAC/B,IAAAC,gBAAmB;;;ACAnB,mBAA8B;AAMvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;ADTK;AAbC,IAAM,gBAAY;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,eAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,kBAAkB,SAAS;AAAA,QACzC,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,UAAU,cAAc;AACxB,UAAU,SAAS;;;ADfb,IAAAC,sBAAA;AAPC,IAAM,iBAAa;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,eAAW,kBAAG,mBAAmB,SAAS;AAAA,QAC1C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;AACzB,WAAW,SAAS;","names":["import_core","import_utils","import_utils","import_jsx_runtime"]}
|
package/dist/dialog-body.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
DialogBody
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
6
|
-
import "./chunk-
|
4
|
+
} from "./chunk-VMTMWWII.mjs";
|
5
|
+
import "./chunk-ZDEVCYYC.mjs";
|
6
|
+
import "./chunk-A7WOQJCA.mjs";
|
7
7
|
export {
|
8
8
|
DialogBody
|
9
9
|
};
|
@@ -61,11 +61,11 @@ var ModalCloseButton = (0, import_core.forwardRef)(
|
|
61
61
|
{
|
62
62
|
ref,
|
63
63
|
className: (0, import_utils2.cx)("ui-modal__close-button"),
|
64
|
-
__css: css,
|
65
64
|
onClick: (0, import_utils2.handlerAll)(onClick, (ev) => {
|
66
65
|
ev.stopPropagation();
|
67
66
|
onClose == null ? void 0 : onClose();
|
68
67
|
}),
|
68
|
+
__css: css,
|
69
69
|
...rest
|
70
70
|
}
|
71
71
|
);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/dialog-close-button.tsx","../src/modal-close-button.tsx","../src/modal-context.ts"],"sourcesContent":["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","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/dialog-close-button.tsx","../src/modal-close-button.tsx","../src/modal-context.ts"],"sourcesContent":["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","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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACDnB,0BAA4B;AAC5B,kBAA2B;AAC3B,IAAAC,gBAA+B;;;ACF/B,mBAA8B;AAMvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,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,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,eAAW,kBAAG,wBAAwB;AAAA,QACtC,aAAS,0BAAW,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;;;ADlBpB,IAAAC,sBAAA;AAPC,IAAM,wBAAoB;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,eAAW,kBAAG,2BAA2B,SAAS;AAAA,QAClD,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;AAChC,kBAAkB,SAAS;","names":["import_core","import_utils","import_utils","import_jsx_runtime"]}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
DialogCloseButton
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
6
|
-
import "./chunk-
|
4
|
+
} from "./chunk-LUSTM3GA.mjs";
|
5
|
+
import "./chunk-PDW7A62B.mjs";
|
6
|
+
import "./chunk-A7WOQJCA.mjs";
|
7
7
|
export {
|
8
8
|
DialogCloseButton
|
9
9
|
};
|
package/dist/dialog-footer.js
CHANGED
@@ -50,8 +50,8 @@ var ModalFooter = (0, import_core.forwardRef)(
|
|
50
50
|
({ className, __css, ...rest }, ref) => {
|
51
51
|
const { styles } = useModal();
|
52
52
|
const css = {
|
53
|
-
display: "flex",
|
54
53
|
alignItems: "center",
|
54
|
+
display: "flex",
|
55
55
|
justifyContent: "flex-end",
|
56
56
|
...__css ? __css : styles.footer
|
57
57
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/dialog-footer.tsx","../src/modal-context.ts","../src/modal-footer.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/dialog-footer.tsx","../src/modal-context.ts","../src/modal-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","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 { 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":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACDnB,mBAA8B;AAMvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;AC5BD,kBAA+B;AAC/B,IAAAC,gBAAmB;AAiBb;AAZC,IAAM,kBAAc;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,eAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,oBAAoB,SAAS;AAAA,QAC3C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;;;AFdf,IAAAC,sBAAA;AAPC,IAAM,mBAAe;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,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;AAC3B,aAAa,SAAS;","names":["import_core","import_utils","import_utils","import_jsx_runtime"]}
|
package/dist/dialog-footer.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
DialogFooter
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
6
|
-
import "./chunk-
|
4
|
+
} from "./chunk-W7WF42SC.mjs";
|
5
|
+
import "./chunk-L353QQ6S.mjs";
|
6
|
+
import "./chunk-A7WOQJCA.mjs";
|
7
7
|
export {
|
8
8
|
DialogFooter
|
9
9
|
};
|
package/dist/dialog-header.js
CHANGED
@@ -50,8 +50,8 @@ var ModalHeader = (0, import_core.forwardRef)(
|
|
50
50
|
({ className, __css, ...rest }, ref) => {
|
51
51
|
const { styles } = useModal();
|
52
52
|
const css = {
|
53
|
-
display: "flex",
|
54
53
|
alignItems: "center",
|
54
|
+
display: "flex",
|
55
55
|
justifyContent: "flex-start",
|
56
56
|
...__css ? __css : styles.header
|
57
57
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/dialog-header.tsx","../src/modal-context.ts","../src/modal-header.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/dialog-header.tsx","../src/modal-context.ts","../src/modal-header.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalHeaderProps } from \"./modal-header\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDialog } from \"./modal-context\"\nimport { ModalHeader } from \"./modal-header\"\n\nexport interface DialogHeaderProps extends ModalHeaderProps {}\n\nexport const DialogHeader = forwardRef<DialogHeaderProps, \"header\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.header }\n\n return (\n <ModalHeader\n ref={ref}\n className={cx(\"ui-dialog__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogHeader.displayName = \"DialogHeader\"\nDialogHeader.__ui__ = \"DialogHeader\"\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 { 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":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,eAA2B;AAC3B,IAAAC,gBAAmB;;;ACDnB,mBAA8B;AAMvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;AC5BD,kBAA+B;AAC/B,IAAAC,gBAAmB;AAiBb;AAZC,IAAM,kBAAc;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,eAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,oBAAoB,SAAS;AAAA,QAC3C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;;;AFdf,IAAAC,sBAAA;AAPC,IAAM,mBAAe;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,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;AAC3B,aAAa,SAAS;","names":["import_core","import_utils","import_utils","import_jsx_runtime"]}
|
package/dist/dialog-header.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
DialogHeader
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
6
|
-
import "./chunk-
|
4
|
+
} from "./chunk-37MTMX5B.mjs";
|
5
|
+
import "./chunk-LYMMHCHF.mjs";
|
6
|
+
import "./chunk-A7WOQJCA.mjs";
|
7
7
|
export {
|
8
8
|
DialogHeader
|
9
9
|
};
|
package/dist/dialog-overlay.js
CHANGED
@@ -48,21 +48,21 @@ var import_transitions = require("@yamada-ui/transitions");
|
|
48
48
|
var import_utils2 = require("@yamada-ui/utils");
|
49
49
|
var import_jsx_runtime = require("react/jsx-runtime");
|
50
50
|
var ModalOverlay = (0, import_motion.motionForwardRef)(
|
51
|
-
({ className,
|
51
|
+
({ className, onClick, __css, ...rest }, ref) => {
|
52
52
|
const {
|
53
|
-
|
53
|
+
animation,
|
54
54
|
closeOnOverlay,
|
55
|
-
|
55
|
+
duration,
|
56
|
+
styles,
|
56
57
|
onClose,
|
57
|
-
|
58
|
-
duration
|
58
|
+
onOverlayClick
|
59
59
|
} = useModal();
|
60
60
|
const css = {
|
61
|
+
h: "100dvh",
|
62
|
+
left: 0,
|
61
63
|
position: "fixed",
|
62
64
|
top: 0,
|
63
|
-
left: 0,
|
64
65
|
w: "100vw",
|
65
|
-
h: "100dvh",
|
66
66
|
...__css ? __css : styles.overlay
|
67
67
|
};
|
68
68
|
const props = animation !== "none" ? import_transitions.fadeProps : {};
|
@@ -72,11 +72,11 @@ var ModalOverlay = (0, import_motion.motionForwardRef)(
|
|
72
72
|
ref,
|
73
73
|
className: (0, import_utils2.cx)("ui-modal__overlay", className),
|
74
74
|
custom: { duration },
|
75
|
-
__css: css,
|
76
75
|
onClick: (0, import_utils2.handlerAll)(onClick, onOverlayClick, (ev) => {
|
77
76
|
ev.stopPropagation();
|
78
77
|
if (closeOnOverlay) onClose == null ? void 0 : onClose();
|
79
78
|
}),
|
79
|
+
__css: css,
|
80
80
|
...props,
|
81
81
|
...rest
|
82
82
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/dialog-overlay.tsx","../src/modal-context.ts","../src/modal-overlay.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport {
|
1
|
+
{"version":3,"sources":["../src/dialog-overlay.tsx","../src/modal-context.ts","../src/modal-overlay.tsx"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOverlayProps } from \"./modal-overlay\"\nimport { motionForwardRef } from \"@yamada-ui/motion\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useDialog } from \"./modal-context\"\nimport { ModalOverlay } from \"./modal-overlay\"\n\nexport interface DialogOverlayProps extends ModalOverlayProps {}\n\nexport const DialogOverlay = motionForwardRef<DialogOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-dialog__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nDialogOverlay.displayName = \"DialogOverlay\"\nDialogOverlay.__ui__ = \"DialogOverlay\"\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { ModalOptions } from \"./modal\"\nimport { createContext } from \"@yamada-ui/utils\"\n\ninterface ModalContext extends ModalOptions {\n styles: { [key: string]: CSSUIObject | undefined }\n}\n\nexport const [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\ninterface DialogContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\ninterface DrawerContext {\n [key: string]: CSSUIObject | undefined\n}\n\nexport const [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n","import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { MotionProps } from \"@yamada-ui/motion\"\nimport { motion, motionForwardRef } from \"@yamada-ui/motion\"\nimport { fadeProps } from \"@yamada-ui/transitions\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal-context\"\n\nexport interface ModalOverlayProps extends MotionProps {}\n\nexport const ModalOverlay = motionForwardRef<ModalOverlayProps, \"div\">(\n ({ className, onClick, __css, ...rest }, ref) => {\n const {\n animation,\n closeOnOverlay,\n duration,\n styles,\n onClose,\n onOverlayClick,\n } = useModal()\n\n const css: CSSUIObject = {\n h: \"100dvh\",\n left: 0,\n position: \"fixed\",\n top: 0,\n w: \"100vw\",\n ...(__css ? __css : styles.overlay),\n }\n\n const props = animation !== \"none\" ? fadeProps : {}\n\n return (\n <motion.div\n ref={ref}\n className={cx(\"ui-modal__overlay\", className)}\n custom={{ duration }}\n onClick={handlerAll(onClick, onOverlayClick, (ev) => {\n ev.stopPropagation()\n if (closeOnOverlay) onClose?.()\n })}\n __css={css}\n {...props}\n {...rest}\n />\n )\n },\n)\n\nModalOverlay.displayName = \"ModalOverlay\"\nModalOverlay.__ui__ = \"ModalOverlay\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,iBAAiC;AACjC,IAAAC,gBAAmB;;;ACDnB,mBAA8B;AAMvB,IAAM,CAAC,eAAe,QAAQ,QAAI,4BAA4B;AAAA,EACnE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;AAMM,IAAM,CAAC,gBAAgB,SAAS,QAAI,4BAA6B;AAAA,EACtE,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;;;AC3BD,oBAAyC;AACzC,yBAA0B;AAC1B,IAAAC,gBAA+B;AA4BzB;AAvBC,IAAM,mBAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,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,+BAAY,CAAC;AAElD,WACE;AAAA,MAAC,qBAAO;AAAA,MAAP;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,QAAQ,EAAE,SAAS;AAAA,QACnB,aAAS,0BAAW,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;;;AFjChB,IAAAC,sBAAA;AAPC,IAAM,oBAAgB;AAAA,EAC3B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,QAAQ;AAE7C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,sBAAsB,SAAS;AAAA,QAC7C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;AAC5B,cAAc,SAAS;","names":["import_motion","import_utils","import_utils","import_jsx_runtime"]}
|
package/dist/dialog-overlay.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
DialogOverlay
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
6
|
-
import "./chunk-
|
4
|
+
} from "./chunk-EDCPPJBS.mjs";
|
5
|
+
import "./chunk-VB44U6WY.mjs";
|
6
|
+
import "./chunk-A7WOQJCA.mjs";
|
7
7
|
export {
|
8
8
|
DialogOverlay
|
9
9
|
};
|
package/dist/dialog.d.mts
CHANGED
@@ -9,25 +9,25 @@ import './modal-content.mjs';
|
|
9
9
|
|
10
10
|
interface DialogOptions {
|
11
11
|
/**
|
12
|
-
* The dialog
|
12
|
+
* The dialog cancel to use.
|
13
13
|
*/
|
14
|
-
|
14
|
+
cancel?: ButtonProps | ReactNode;
|
15
15
|
/**
|
16
16
|
* The dialog footer to use.
|
17
17
|
*/
|
18
18
|
footer?: ReactNode;
|
19
19
|
/**
|
20
|
-
* The dialog
|
20
|
+
* The dialog header to use.
|
21
21
|
*/
|
22
|
-
|
22
|
+
header?: ReactNode;
|
23
23
|
/**
|
24
24
|
* The dialog other to use.
|
25
25
|
*/
|
26
|
-
other?:
|
26
|
+
other?: ButtonProps | ReactNode;
|
27
27
|
/**
|
28
28
|
* The dialog success to use.
|
29
29
|
*/
|
30
|
-
success?:
|
30
|
+
success?: ButtonProps | ReactNode;
|
31
31
|
/**
|
32
32
|
* The callback invoked when cancel button clicked.
|
33
33
|
*/
|
package/dist/dialog.d.ts
CHANGED
@@ -9,25 +9,25 @@ import './modal-content.js';
|
|
9
9
|
|
10
10
|
interface DialogOptions {
|
11
11
|
/**
|
12
|
-
* The dialog
|
12
|
+
* The dialog cancel to use.
|
13
13
|
*/
|
14
|
-
|
14
|
+
cancel?: ButtonProps | ReactNode;
|
15
15
|
/**
|
16
16
|
* The dialog footer to use.
|
17
17
|
*/
|
18
18
|
footer?: ReactNode;
|
19
19
|
/**
|
20
|
-
* The dialog
|
20
|
+
* The dialog header to use.
|
21
21
|
*/
|
22
|
-
|
22
|
+
header?: ReactNode;
|
23
23
|
/**
|
24
24
|
* The dialog other to use.
|
25
25
|
*/
|
26
|
-
other?:
|
26
|
+
other?: ButtonProps | ReactNode;
|
27
27
|
/**
|
28
28
|
* The dialog success to use.
|
29
29
|
*/
|
30
|
-
success?:
|
30
|
+
success?: ButtonProps | ReactNode;
|
31
31
|
/**
|
32
32
|
* The callback invoked when cancel button clicked.
|
33
33
|
*/
|