@yamada-ui/modal 1.3.12-next-20241005220055 → 1.3.12-next-20241008193728
Sign up to get free protection for your applications and to get access to all the features.
- 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/index.js
CHANGED
@@ -42,20 +42,20 @@ __export(src_exports, {
|
|
42
42
|
});
|
43
43
|
module.exports = __toCommonJS(src_exports);
|
44
44
|
|
45
|
-
// src/
|
46
|
-
var
|
47
|
-
var
|
48
|
-
var
|
49
|
-
var
|
50
|
-
var import_use_value2 = require("@yamada-ui/use-value");
|
51
|
-
var import_utils11 = require("@yamada-ui/utils");
|
52
|
-
var import_react2 = require("react");
|
53
|
-
var import_react_remove_scroll = require("react-remove-scroll");
|
45
|
+
// src/dialog.tsx
|
46
|
+
var import_button = require("@yamada-ui/button");
|
47
|
+
var import_core13 = require("@yamada-ui/core");
|
48
|
+
var import_motion7 = require("@yamada-ui/motion");
|
49
|
+
var import_utils18 = require("@yamada-ui/utils");
|
54
50
|
|
55
|
-
// src/dialog-
|
56
|
-
var
|
51
|
+
// src/dialog-body.tsx
|
52
|
+
var import_core2 = require("@yamada-ui/core");
|
57
53
|
var import_utils3 = require("@yamada-ui/utils");
|
58
54
|
|
55
|
+
// src/modal-body.tsx
|
56
|
+
var import_core = require("@yamada-ui/core");
|
57
|
+
var import_utils2 = require("@yamada-ui/utils");
|
58
|
+
|
59
59
|
// src/modal-context.ts
|
60
60
|
var import_utils = require("@yamada-ui/utils");
|
61
61
|
var [ModalProvider, useModal] = (0, import_utils.createContext)({
|
@@ -71,88 +71,62 @@ var [DrawerProvider, useDrawer] = (0, import_utils.createContext)({
|
|
71
71
|
errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in "<Drawer />" `
|
72
72
|
});
|
73
73
|
|
74
|
-
// src/modal-
|
75
|
-
var import_motion = require("@yamada-ui/motion");
|
76
|
-
var import_transitions = require("@yamada-ui/transitions");
|
77
|
-
var import_utils2 = require("@yamada-ui/utils");
|
74
|
+
// src/modal-body.tsx
|
78
75
|
var import_jsx_runtime = require("react/jsx-runtime");
|
79
|
-
var
|
80
|
-
({ className, __css,
|
81
|
-
const {
|
82
|
-
styles,
|
83
|
-
closeOnOverlay,
|
84
|
-
onOverlayClick,
|
85
|
-
onClose,
|
86
|
-
animation,
|
87
|
-
duration
|
88
|
-
} = useModal();
|
76
|
+
var ModalBody = (0, import_core.forwardRef)(
|
77
|
+
({ className, __css, ...rest }, ref) => {
|
78
|
+
const { scrollBehavior, styles } = useModal();
|
89
79
|
const css = {
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
...__css ? __css : styles.overlay
|
80
|
+
alignItems: "flex-start",
|
81
|
+
display: "flex",
|
82
|
+
flexDirection: "column",
|
83
|
+
overflow: scrollBehavior === "inside" ? "auto" : void 0,
|
84
|
+
...__css ? __css : styles.body
|
96
85
|
};
|
97
|
-
const props = animation !== "none" ? import_transitions.fadeProps : {};
|
98
86
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
99
|
-
|
87
|
+
import_core.ui.div,
|
100
88
|
{
|
101
89
|
ref,
|
102
|
-
className: (0, import_utils2.cx)("ui-
|
103
|
-
custom: { duration },
|
90
|
+
className: (0, import_utils2.cx)("ui-modal__body", className),
|
104
91
|
__css: css,
|
105
|
-
onClick: (0, import_utils2.handlerAll)(onClick, onOverlayClick, (ev) => {
|
106
|
-
ev.stopPropagation();
|
107
|
-
if (closeOnOverlay) onClose == null ? void 0 : onClose();
|
108
|
-
}),
|
109
|
-
...props,
|
110
92
|
...rest
|
111
93
|
}
|
112
94
|
);
|
113
95
|
}
|
114
96
|
);
|
115
|
-
|
116
|
-
|
97
|
+
ModalBody.displayName = "ModalBody";
|
98
|
+
ModalBody.__ui__ = "ModalBody";
|
117
99
|
|
118
|
-
// src/dialog-
|
100
|
+
// src/dialog-body.tsx
|
119
101
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
120
|
-
var
|
102
|
+
var DialogBody = (0, import_core2.forwardRef)(
|
121
103
|
({ className, ...rest }, ref) => {
|
122
104
|
const styles = useDialog();
|
123
|
-
const css = { ...styles.
|
105
|
+
const css = { ...styles.body };
|
124
106
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
125
|
-
|
107
|
+
ModalBody,
|
126
108
|
{
|
127
109
|
ref,
|
128
|
-
className: (0, import_utils3.cx)("ui-
|
110
|
+
className: (0, import_utils3.cx)("ui-dialog__body", className),
|
129
111
|
__css: css,
|
130
112
|
...rest
|
131
113
|
}
|
132
114
|
);
|
133
115
|
}
|
134
116
|
);
|
135
|
-
|
136
|
-
|
117
|
+
DialogBody.displayName = "DialogBody";
|
118
|
+
DialogBody.__ui__ = "DialogBody";
|
137
119
|
|
138
|
-
// src/
|
120
|
+
// src/dialog-close-button.tsx
|
139
121
|
var import_core4 = require("@yamada-ui/core");
|
140
|
-
var import_motion3 = require("@yamada-ui/motion");
|
141
|
-
var import_transitions2 = require("@yamada-ui/transitions");
|
142
|
-
var import_use_value = require("@yamada-ui/use-value");
|
143
|
-
var import_utils7 = require("@yamada-ui/utils");
|
144
|
-
var import_react = require("react");
|
145
|
-
|
146
|
-
// src/drawer-close-button.tsx
|
147
|
-
var import_core2 = require("@yamada-ui/core");
|
148
122
|
var import_utils5 = require("@yamada-ui/utils");
|
149
123
|
|
150
124
|
// src/modal-close-button.tsx
|
151
125
|
var import_close_button = require("@yamada-ui/close-button");
|
152
|
-
var
|
126
|
+
var import_core3 = require("@yamada-ui/core");
|
153
127
|
var import_utils4 = require("@yamada-ui/utils");
|
154
128
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
155
|
-
var ModalCloseButton = (0,
|
129
|
+
var ModalCloseButton = (0, import_core3.forwardRef)(
|
156
130
|
({ onClick, __css, ...rest }, ref) => {
|
157
131
|
const { styles, onClose } = useModal();
|
158
132
|
const css = {
|
@@ -164,11 +138,11 @@ var ModalCloseButton = (0, import_core.forwardRef)(
|
|
164
138
|
{
|
165
139
|
ref,
|
166
140
|
className: (0, import_utils4.cx)("ui-modal__close-button"),
|
167
|
-
__css: css,
|
168
141
|
onClick: (0, import_utils4.handlerAll)(onClick, (ev) => {
|
169
142
|
ev.stopPropagation();
|
170
143
|
onClose == null ? void 0 : onClose();
|
171
144
|
}),
|
145
|
+
__css: css,
|
172
146
|
...rest
|
173
147
|
}
|
174
148
|
);
|
@@ -177,17 +151,227 @@ var ModalCloseButton = (0, import_core.forwardRef)(
|
|
177
151
|
ModalCloseButton.displayName = "ModalCloseButton";
|
178
152
|
ModalCloseButton.__ui__ = "ModalCloseButton";
|
179
153
|
|
180
|
-
// src/
|
154
|
+
// src/dialog-close-button.tsx
|
181
155
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
182
|
-
var
|
156
|
+
var DialogCloseButton = (0, import_core4.forwardRef)(
|
183
157
|
({ className, ...rest }, ref) => {
|
184
|
-
const styles =
|
158
|
+
const styles = useDialog();
|
185
159
|
const css = { ...styles.closeButton };
|
186
160
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
187
161
|
ModalCloseButton,
|
188
162
|
{
|
189
163
|
ref,
|
190
|
-
className: (0, import_utils5.cx)("ui-
|
164
|
+
className: (0, import_utils5.cx)("ui-dialog__close-button", className),
|
165
|
+
__css: css,
|
166
|
+
...rest
|
167
|
+
}
|
168
|
+
);
|
169
|
+
}
|
170
|
+
);
|
171
|
+
DialogCloseButton.displayName = "DialogCloseButton";
|
172
|
+
DialogCloseButton.__ui__ = "DialogCloseButton";
|
173
|
+
|
174
|
+
// src/dialog-footer.tsx
|
175
|
+
var import_core6 = require("@yamada-ui/core");
|
176
|
+
var import_utils7 = require("@yamada-ui/utils");
|
177
|
+
|
178
|
+
// src/modal-footer.tsx
|
179
|
+
var import_core5 = require("@yamada-ui/core");
|
180
|
+
var import_utils6 = require("@yamada-ui/utils");
|
181
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
182
|
+
var ModalFooter = (0, import_core5.forwardRef)(
|
183
|
+
({ className, __css, ...rest }, ref) => {
|
184
|
+
const { styles } = useModal();
|
185
|
+
const css = {
|
186
|
+
alignItems: "center",
|
187
|
+
display: "flex",
|
188
|
+
justifyContent: "flex-end",
|
189
|
+
...__css ? __css : styles.footer
|
190
|
+
};
|
191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
192
|
+
import_core5.ui.footer,
|
193
|
+
{
|
194
|
+
ref,
|
195
|
+
className: (0, import_utils6.cx)("ui-modal__footer", className),
|
196
|
+
__css: css,
|
197
|
+
...rest
|
198
|
+
}
|
199
|
+
);
|
200
|
+
}
|
201
|
+
);
|
202
|
+
ModalFooter.displayName = "ModalFooter";
|
203
|
+
ModalFooter.__ui__ = "ModalFooter";
|
204
|
+
|
205
|
+
// src/dialog-footer.tsx
|
206
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
207
|
+
var DialogFooter = (0, import_core6.forwardRef)(
|
208
|
+
({ className, ...rest }, ref) => {
|
209
|
+
const styles = useDialog();
|
210
|
+
const css = { ...styles.footer };
|
211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
212
|
+
ModalFooter,
|
213
|
+
{
|
214
|
+
ref,
|
215
|
+
className: (0, import_utils7.cx)("ui-dialog__footer", className),
|
216
|
+
__css: css,
|
217
|
+
...rest
|
218
|
+
}
|
219
|
+
);
|
220
|
+
}
|
221
|
+
);
|
222
|
+
DialogFooter.displayName = "DialogFooter";
|
223
|
+
DialogFooter.__ui__ = "DialogFooter";
|
224
|
+
|
225
|
+
// src/dialog-header.tsx
|
226
|
+
var import_core8 = require("@yamada-ui/core");
|
227
|
+
var import_utils9 = require("@yamada-ui/utils");
|
228
|
+
|
229
|
+
// src/modal-header.tsx
|
230
|
+
var import_core7 = require("@yamada-ui/core");
|
231
|
+
var import_utils8 = require("@yamada-ui/utils");
|
232
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
233
|
+
var ModalHeader = (0, import_core7.forwardRef)(
|
234
|
+
({ className, __css, ...rest }, ref) => {
|
235
|
+
const { styles } = useModal();
|
236
|
+
const css = {
|
237
|
+
alignItems: "center",
|
238
|
+
display: "flex",
|
239
|
+
justifyContent: "flex-start",
|
240
|
+
...__css ? __css : styles.header
|
241
|
+
};
|
242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
243
|
+
import_core7.ui.header,
|
244
|
+
{
|
245
|
+
ref,
|
246
|
+
className: (0, import_utils8.cx)("ui-modal__header", className),
|
247
|
+
__css: css,
|
248
|
+
...rest
|
249
|
+
}
|
250
|
+
);
|
251
|
+
}
|
252
|
+
);
|
253
|
+
ModalHeader.displayName = "ModalHeader";
|
254
|
+
ModalHeader.__ui__ = "ModalHeader";
|
255
|
+
|
256
|
+
// src/dialog-header.tsx
|
257
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
258
|
+
var DialogHeader = (0, import_core8.forwardRef)(
|
259
|
+
({ className, ...rest }, ref) => {
|
260
|
+
const styles = useDialog();
|
261
|
+
const css = { ...styles.header };
|
262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
263
|
+
ModalHeader,
|
264
|
+
{
|
265
|
+
ref,
|
266
|
+
className: (0, import_utils9.cx)("ui-dialog__header", className),
|
267
|
+
__css: css,
|
268
|
+
...rest
|
269
|
+
}
|
270
|
+
);
|
271
|
+
}
|
272
|
+
);
|
273
|
+
DialogHeader.displayName = "DialogHeader";
|
274
|
+
DialogHeader.__ui__ = "DialogHeader";
|
275
|
+
|
276
|
+
// src/dialog-overlay.tsx
|
277
|
+
var import_motion2 = require("@yamada-ui/motion");
|
278
|
+
var import_utils11 = require("@yamada-ui/utils");
|
279
|
+
|
280
|
+
// src/modal-overlay.tsx
|
281
|
+
var import_motion = require("@yamada-ui/motion");
|
282
|
+
var import_transitions = require("@yamada-ui/transitions");
|
283
|
+
var import_utils10 = require("@yamada-ui/utils");
|
284
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
285
|
+
var ModalOverlay = (0, import_motion.motionForwardRef)(
|
286
|
+
({ className, onClick, __css, ...rest }, ref) => {
|
287
|
+
const {
|
288
|
+
animation,
|
289
|
+
closeOnOverlay,
|
290
|
+
duration,
|
291
|
+
styles,
|
292
|
+
onClose,
|
293
|
+
onOverlayClick
|
294
|
+
} = useModal();
|
295
|
+
const css = {
|
296
|
+
h: "100dvh",
|
297
|
+
left: 0,
|
298
|
+
position: "fixed",
|
299
|
+
top: 0,
|
300
|
+
w: "100vw",
|
301
|
+
...__css ? __css : styles.overlay
|
302
|
+
};
|
303
|
+
const props = animation !== "none" ? import_transitions.fadeProps : {};
|
304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
305
|
+
import_motion.motion.div,
|
306
|
+
{
|
307
|
+
ref,
|
308
|
+
className: (0, import_utils10.cx)("ui-modal__overlay", className),
|
309
|
+
custom: { duration },
|
310
|
+
onClick: (0, import_utils10.handlerAll)(onClick, onOverlayClick, (ev) => {
|
311
|
+
ev.stopPropagation();
|
312
|
+
if (closeOnOverlay) onClose == null ? void 0 : onClose();
|
313
|
+
}),
|
314
|
+
__css: css,
|
315
|
+
...props,
|
316
|
+
...rest
|
317
|
+
}
|
318
|
+
);
|
319
|
+
}
|
320
|
+
);
|
321
|
+
ModalOverlay.displayName = "ModalOverlay";
|
322
|
+
ModalOverlay.__ui__ = "ModalOverlay";
|
323
|
+
|
324
|
+
// src/dialog-overlay.tsx
|
325
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
326
|
+
var DialogOverlay = (0, import_motion2.motionForwardRef)(
|
327
|
+
({ className, ...rest }, ref) => {
|
328
|
+
const styles = useDialog();
|
329
|
+
const css = { ...styles.overlay };
|
330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
331
|
+
ModalOverlay,
|
332
|
+
{
|
333
|
+
ref,
|
334
|
+
className: (0, import_utils11.cx)("ui-dialog__overlay", className),
|
335
|
+
__css: css,
|
336
|
+
...rest
|
337
|
+
}
|
338
|
+
);
|
339
|
+
}
|
340
|
+
);
|
341
|
+
DialogOverlay.displayName = "DialogOverlay";
|
342
|
+
DialogOverlay.__ui__ = "DialogOverlay";
|
343
|
+
|
344
|
+
// src/modal.tsx
|
345
|
+
var import_core12 = require("@yamada-ui/core");
|
346
|
+
var import_focus_lock = require("@yamada-ui/focus-lock");
|
347
|
+
var import_motion6 = require("@yamada-ui/motion");
|
348
|
+
var import_portal = require("@yamada-ui/portal");
|
349
|
+
var import_use_value2 = require("@yamada-ui/use-value");
|
350
|
+
var import_utils17 = require("@yamada-ui/utils");
|
351
|
+
var import_react2 = require("react");
|
352
|
+
var import_react_remove_scroll = require("react-remove-scroll");
|
353
|
+
|
354
|
+
// src/drawer-content.tsx
|
355
|
+
var import_core11 = require("@yamada-ui/core");
|
356
|
+
var import_motion3 = require("@yamada-ui/motion");
|
357
|
+
var import_transitions2 = require("@yamada-ui/transitions");
|
358
|
+
var import_use_value = require("@yamada-ui/use-value");
|
359
|
+
var import_utils14 = require("@yamada-ui/utils");
|
360
|
+
var import_react = require("react");
|
361
|
+
|
362
|
+
// src/drawer-close-button.tsx
|
363
|
+
var import_core9 = require("@yamada-ui/core");
|
364
|
+
var import_utils12 = require("@yamada-ui/utils");
|
365
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
366
|
+
var DrawerCloseButton = (0, import_core9.forwardRef)(
|
367
|
+
({ className, ...rest }, ref) => {
|
368
|
+
const styles = useDrawer();
|
369
|
+
const css = { ...styles.closeButton };
|
370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
371
|
+
ModalCloseButton,
|
372
|
+
{
|
373
|
+
ref,
|
374
|
+
className: (0, import_utils12.cx)("ui-drawer__close-button", className),
|
191
375
|
__css: css,
|
192
376
|
...rest
|
193
377
|
}
|
@@ -198,18 +382,18 @@ DrawerCloseButton.displayName = "DrawerCloseButton";
|
|
198
382
|
DrawerCloseButton.__ui__ = "DrawerCloseButton";
|
199
383
|
|
200
384
|
// src/drawer-drag-bar.tsx
|
201
|
-
var
|
202
|
-
var
|
203
|
-
var
|
204
|
-
var DrawerDragBar = (0,
|
385
|
+
var import_core10 = require("@yamada-ui/core");
|
386
|
+
var import_utils13 = require("@yamada-ui/utils");
|
387
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
388
|
+
var DrawerDragBar = (0, import_core10.forwardRef)(
|
205
389
|
({ className, __css, ...rest }, ref) => {
|
206
390
|
const styles = useDrawer();
|
207
391
|
const css = { ...styles.dragBar };
|
208
|
-
return /* @__PURE__ */ (0,
|
209
|
-
|
392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
393
|
+
import_core10.ui.div,
|
210
394
|
{
|
211
395
|
ref,
|
212
|
-
className: (0,
|
396
|
+
className: (0, import_utils13.cx)("ui-drawer__drag-bar", className),
|
213
397
|
__css: css,
|
214
398
|
...rest
|
215
399
|
}
|
@@ -220,27 +404,27 @@ DrawerDragBar.displayName = "DrawerDragBar";
|
|
220
404
|
DrawerDragBar.__ui__ = "DrawerDragBar";
|
221
405
|
|
222
406
|
// src/drawer-content.tsx
|
223
|
-
var
|
407
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
224
408
|
var DrawerContent = (0, import_motion3.motionForwardRef)(
|
225
409
|
({
|
226
410
|
className,
|
227
411
|
children,
|
228
|
-
placement: _placement,
|
229
|
-
withCloseButton,
|
230
|
-
withDragBar,
|
231
412
|
closeOnDrag,
|
232
413
|
dragConstraints,
|
233
414
|
dragElastic,
|
234
415
|
dragOffset,
|
235
416
|
dragVelocity,
|
417
|
+
placement: _placement,
|
418
|
+
withCloseButton,
|
419
|
+
withDragBar,
|
236
420
|
blankForDragProps,
|
237
421
|
...rest
|
238
422
|
}, ref) => {
|
239
|
-
const { isOpen, onClose
|
423
|
+
const { duration, isOpen, onClose } = useModal();
|
240
424
|
const styles = useDrawer();
|
241
425
|
const placement = (0, import_use_value.useValue)(_placement);
|
242
|
-
const validChildren = (0,
|
243
|
-
const [customDrawerCloseButton, ...cloneChildren] = (0,
|
426
|
+
const validChildren = (0, import_utils14.getValidChildren)(children);
|
427
|
+
const [customDrawerCloseButton, ...cloneChildren] = (0, import_utils14.findChildren)(
|
244
428
|
validChildren,
|
245
429
|
DrawerCloseButton
|
246
430
|
);
|
@@ -249,33 +433,33 @@ var DrawerContent = (0, import_motion3.motionForwardRef)(
|
|
249
433
|
const propBg = (_c = (_b = (_a = rest.backgroundColor) != null ? _a : rest.bgColor) != null ? _b : rest.background) != null ? _c : rest.bg;
|
250
434
|
const styleBg = (_j = (_h = (_f = (_d = styles.container) == null ? void 0 : _d.backgroundColor) != null ? _f : (_e = styles.container) == null ? void 0 : _e.bgColor) != null ? _h : (_g = styles.container) == null ? void 0 : _g.background) != null ? _j : (_i = styles.container) == null ? void 0 : _i.bg;
|
251
435
|
const computedBg = propBg != null ? propBg : styleBg;
|
252
|
-
return (0,
|
436
|
+
return (0, import_utils14.isArray)(computedBg) ? computedBg : [computedBg];
|
253
437
|
}, [rest, styles]);
|
254
438
|
const blankForDrag = (0, import_react.useMemo)(() => {
|
255
439
|
let position = {};
|
256
440
|
switch (placement) {
|
257
441
|
case "top":
|
258
|
-
position = { top: "calc(-100dvh + 1px)"
|
442
|
+
position = { left: 0, right: 0, top: "calc(-100dvh + 1px)" };
|
259
443
|
break;
|
260
444
|
case "bottom":
|
261
445
|
position = { bottom: "calc(-100dvh + 1px)", left: 0, right: 0 };
|
262
446
|
break;
|
263
447
|
case "left":
|
264
|
-
position = { left: "calc(-100% + 1px)", top: 0
|
448
|
+
position = { bottom: 0, left: "calc(-100% + 1px)", top: 0 };
|
265
449
|
break;
|
266
450
|
case "right":
|
267
|
-
position = { right: "calc(-100% + 1px)", top: 0
|
451
|
+
position = { bottom: 0, right: "calc(-100% + 1px)", top: 0 };
|
268
452
|
break;
|
269
453
|
}
|
270
454
|
const [lightBg, darkBg] = blankForDragBg;
|
271
455
|
return {
|
272
456
|
_after: {
|
457
|
+
bg: lightBg,
|
273
458
|
content: '""',
|
274
459
|
display: "block",
|
275
|
-
w: "100%",
|
276
460
|
h: "100dvh",
|
277
|
-
bg: lightBg,
|
278
461
|
position: "absolute",
|
462
|
+
w: "100%",
|
279
463
|
...position,
|
280
464
|
...blankForDragProps
|
281
465
|
},
|
@@ -336,30 +520,30 @@ var DrawerContent = (0, import_motion3.motionForwardRef)(
|
|
336
520
|
},
|
337
521
|
[placement, dragVelocity, dragOffset]
|
338
522
|
);
|
339
|
-
return /* @__PURE__ */ (0,
|
523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
340
524
|
import_transitions2.Slide,
|
341
525
|
{
|
342
526
|
ref,
|
343
|
-
className: (0,
|
344
|
-
isOpen,
|
345
|
-
placement,
|
346
|
-
duration,
|
527
|
+
className: (0, import_utils14.cx)("ui-drawer", className),
|
347
528
|
drag: closeOnDrag ? getDragDirection() : false,
|
348
529
|
dragConstraints: getDragDirectionRestriction(dragConstraints),
|
349
530
|
dragElastic: getDragDirectionRestriction(dragElastic),
|
350
|
-
dragSnapToOrigin: true,
|
351
531
|
dragMomentum: false,
|
532
|
+
dragSnapToOrigin: true,
|
533
|
+
duration,
|
534
|
+
isOpen,
|
535
|
+
placement,
|
536
|
+
tabIndex: -1,
|
352
537
|
onDragEnd: (_, info) => {
|
353
538
|
if (isCloseByDragInfo(info)) onClose == null ? void 0 : onClose();
|
354
539
|
},
|
355
|
-
tabIndex: -1,
|
356
540
|
__css: css,
|
357
541
|
...rest,
|
358
542
|
children: [
|
359
|
-
customDrawerCloseButton != null ? customDrawerCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0,
|
360
|
-
withDragBar && closeOnDrag && (placement === "bottom" || placement === "right") ? /* @__PURE__ */ (0,
|
361
|
-
/* @__PURE__ */ (0,
|
362
|
-
|
543
|
+
customDrawerCloseButton != null ? customDrawerCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DrawerCloseButton, {}) : null,
|
544
|
+
withDragBar && closeOnDrag && (placement === "bottom" || placement === "right") ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DrawerDragBar, {}) : null,
|
545
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
546
|
+
import_core11.ui.div,
|
363
547
|
{
|
364
548
|
className: "ui-drawer__inner",
|
365
549
|
__css: {
|
@@ -371,7 +555,7 @@ var DrawerContent = (0, import_motion3.motionForwardRef)(
|
|
371
555
|
children: cloneChildren
|
372
556
|
}
|
373
557
|
),
|
374
|
-
withDragBar && closeOnDrag && (placement === "top" || placement === "left") ? /* @__PURE__ */ (0,
|
558
|
+
withDragBar && closeOnDrag && (placement === "top" || placement === "left") ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DrawerDragBar, {}) : null
|
375
559
|
]
|
376
560
|
}
|
377
561
|
);
|
@@ -382,17 +566,17 @@ DrawerContent.__ui__ = "DrawerContent";
|
|
382
566
|
|
383
567
|
// src/drawer-overlay.tsx
|
384
568
|
var import_motion4 = require("@yamada-ui/motion");
|
385
|
-
var
|
386
|
-
var
|
569
|
+
var import_utils15 = require("@yamada-ui/utils");
|
570
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
387
571
|
var DrawerOverlay = (0, import_motion4.motionForwardRef)(
|
388
572
|
({ className, ...rest }, ref) => {
|
389
573
|
const styles = useDrawer();
|
390
574
|
const css = { ...styles.overlay };
|
391
|
-
return /* @__PURE__ */ (0,
|
575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
392
576
|
ModalOverlay,
|
393
577
|
{
|
394
578
|
ref,
|
395
|
-
className: (0,
|
579
|
+
className: (0, import_utils15.cx)("ui-drawer__overlay", className),
|
396
580
|
__css: css,
|
397
581
|
...rest
|
398
582
|
}
|
@@ -405,100 +589,76 @@ DrawerOverlay.__ui__ = "DrawerOverlay";
|
|
405
589
|
// src/modal-content.tsx
|
406
590
|
var import_motion5 = require("@yamada-ui/motion");
|
407
591
|
var import_transitions3 = require("@yamada-ui/transitions");
|
408
|
-
var
|
409
|
-
|
410
|
-
// src/dialog-close-button.tsx
|
411
|
-
var import_core5 = require("@yamada-ui/core");
|
412
|
-
var import_utils9 = require("@yamada-ui/utils");
|
413
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
414
|
-
var DialogCloseButton = (0, import_core5.forwardRef)(
|
415
|
-
({ className, ...rest }, ref) => {
|
416
|
-
const styles = useDialog();
|
417
|
-
const css = { ...styles.closeButton };
|
418
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
419
|
-
ModalCloseButton,
|
420
|
-
{
|
421
|
-
ref,
|
422
|
-
className: (0, import_utils9.cx)("ui-dialog__close-button", className),
|
423
|
-
__css: css,
|
424
|
-
...rest
|
425
|
-
}
|
426
|
-
);
|
427
|
-
}
|
428
|
-
);
|
429
|
-
DialogCloseButton.displayName = "DialogCloseButton";
|
430
|
-
DialogCloseButton.__ui__ = "DialogCloseButton";
|
431
|
-
|
432
|
-
// src/modal-content.tsx
|
433
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
592
|
+
var import_utils16 = require("@yamada-ui/utils");
|
593
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
434
594
|
var getModalContentProps = (animation = "scale", duration) => {
|
435
595
|
switch (animation) {
|
436
596
|
case "scale":
|
437
597
|
return {
|
438
598
|
...import_transitions3.scaleFadeProps,
|
439
|
-
custom: {
|
599
|
+
custom: { duration, reverse: true, scale: 0.95 }
|
440
600
|
};
|
441
601
|
case "top":
|
442
602
|
return {
|
443
603
|
...import_transitions3.slideFadeProps,
|
444
|
-
custom: { offsetY: -16, reverse: true
|
604
|
+
custom: { duration, offsetY: -16, reverse: true }
|
445
605
|
};
|
446
606
|
case "right":
|
447
607
|
return {
|
448
608
|
...import_transitions3.slideFadeProps,
|
449
|
-
custom: { offsetX: 16, reverse: true
|
609
|
+
custom: { duration, offsetX: 16, reverse: true }
|
450
610
|
};
|
451
611
|
case "left":
|
452
612
|
return {
|
453
613
|
...import_transitions3.slideFadeProps,
|
454
|
-
custom: { offsetX: -16, reverse: true
|
614
|
+
custom: { duration, offsetX: -16, reverse: true }
|
455
615
|
};
|
456
616
|
case "bottom":
|
457
617
|
return {
|
458
618
|
...import_transitions3.slideFadeProps,
|
459
|
-
custom: { offsetY: 16, reverse: true
|
619
|
+
custom: { duration, offsetY: 16, reverse: true }
|
460
620
|
};
|
461
621
|
}
|
462
622
|
};
|
463
623
|
var ModalContent = (0, import_motion5.motionForwardRef)(
|
464
624
|
({ className, children, __css, ...rest }, ref) => {
|
465
625
|
const {
|
466
|
-
|
626
|
+
animation,
|
627
|
+
duration,
|
467
628
|
scrollBehavior,
|
629
|
+
styles,
|
468
630
|
withCloseButton,
|
469
|
-
onClose
|
470
|
-
animation,
|
471
|
-
duration
|
631
|
+
onClose
|
472
632
|
} = useModal();
|
473
|
-
const validChildren = (0,
|
474
|
-
const [customModalCloseButton, ...cloneChildren] = (0,
|
633
|
+
const validChildren = (0, import_utils16.getValidChildren)(children);
|
634
|
+
const [customModalCloseButton, ...cloneChildren] = (0, import_utils16.findChildren)(
|
475
635
|
validChildren,
|
476
636
|
ModalCloseButton,
|
477
637
|
DialogCloseButton
|
478
638
|
);
|
479
639
|
const props = animation !== "none" ? getModalContentProps(animation, duration) : {};
|
480
640
|
const css = {
|
481
|
-
position: "relative",
|
482
|
-
maxH: "100%",
|
483
641
|
display: "flex",
|
484
642
|
flexDirection: "column",
|
485
|
-
|
643
|
+
maxH: "100%",
|
486
644
|
outline: 0,
|
645
|
+
overflow: scrollBehavior === "inside" ? "hidden" : "auto",
|
646
|
+
position: "relative",
|
487
647
|
...__css ? __css : styles.container
|
488
648
|
};
|
489
|
-
return /* @__PURE__ */ (0,
|
649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
490
650
|
import_motion5.motion.section,
|
491
651
|
{
|
492
|
-
role: "dialog",
|
493
|
-
"aria-modal": "true",
|
494
652
|
ref,
|
495
|
-
className: (0,
|
653
|
+
className: (0, import_utils16.cx)("ui-modal", className),
|
654
|
+
"aria-modal": "true",
|
655
|
+
role: "dialog",
|
496
656
|
tabIndex: -1,
|
497
657
|
__css: css,
|
498
658
|
...props,
|
499
659
|
...rest,
|
500
660
|
children: [
|
501
|
-
customModalCloseButton != null ? customModalCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0,
|
661
|
+
customModalCloseButton != null ? customModalCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ModalCloseButton, {}) : null,
|
502
662
|
cloneChildren
|
503
663
|
]
|
504
664
|
}
|
@@ -509,41 +669,41 @@ ModalContent.displayName = "ModalContent";
|
|
509
669
|
ModalContent.__ui__ = "ModalContent";
|
510
670
|
|
511
671
|
// src/modal.tsx
|
512
|
-
var
|
672
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
513
673
|
var Modal = (0, import_motion6.motionForwardRef)(
|
514
674
|
({ size, ...props }, ref) => {
|
515
|
-
const [styles, mergedProps] = (0,
|
675
|
+
const [styles, mergedProps] = (0, import_core12.useComponentMultiStyle)("Modal", {
|
516
676
|
size,
|
517
677
|
...props
|
518
678
|
});
|
519
679
|
const {
|
520
680
|
className,
|
521
|
-
children,
|
522
|
-
isOpen,
|
523
|
-
onClose,
|
524
|
-
onOverlayClick,
|
525
|
-
onEsc,
|
526
|
-
onCloseComplete,
|
527
|
-
placement: _placement = "center",
|
528
|
-
outside = "fallback(4, 1rem)",
|
529
|
-
withCloseButton = true,
|
530
|
-
withOverlay = true,
|
531
681
|
allowPinchZoom = false,
|
532
|
-
|
682
|
+
animation = "scale",
|
533
683
|
autoFocus,
|
534
|
-
restoreFocus,
|
535
|
-
initialFocusRef,
|
536
|
-
finalFocusRef,
|
537
684
|
blockScrollOnMount = true,
|
538
|
-
|
685
|
+
children,
|
539
686
|
closeOnEsc = true,
|
540
|
-
|
541
|
-
animation = "scale",
|
687
|
+
closeOnOverlay = true,
|
542
688
|
duration,
|
543
|
-
|
689
|
+
finalFocusRef,
|
690
|
+
initialFocusRef,
|
691
|
+
isOpen,
|
692
|
+
lockFocusAcrossFrames = true,
|
693
|
+
outside = "fallback(4, 1rem)",
|
694
|
+
placement: _placement = "center",
|
695
|
+
restoreFocus,
|
696
|
+
scrollBehavior = "inside",
|
697
|
+
withCloseButton = true,
|
698
|
+
withOverlay = true,
|
544
699
|
containerProps,
|
700
|
+
portalProps,
|
701
|
+
onClose,
|
702
|
+
onCloseComplete,
|
703
|
+
onEsc,
|
704
|
+
onOverlayClick,
|
545
705
|
...rest
|
546
|
-
} = (0,
|
706
|
+
} = (0, import_core12.omitThemeProps)(mergedProps);
|
547
707
|
const onKeyDown = (0, import_react2.useCallback)(
|
548
708
|
(ev) => {
|
549
709
|
if (ev.key !== "Escape") return;
|
@@ -553,60 +713,60 @@ var Modal = (0, import_motion6.motionForwardRef)(
|
|
553
713
|
},
|
554
714
|
[closeOnEsc, onClose, onEsc]
|
555
715
|
);
|
556
|
-
const validChildren = (0,
|
557
|
-
const [customModalOverlay, ...cloneChildren] = (0,
|
716
|
+
const validChildren = (0, import_utils17.getValidChildren)(children);
|
717
|
+
const [customModalOverlay, ...cloneChildren] = (0, import_utils17.findChildren)(
|
558
718
|
validChildren,
|
559
719
|
ModalOverlay,
|
560
720
|
DialogOverlay,
|
561
721
|
DrawerOverlay
|
562
722
|
);
|
563
|
-
let drawerContent = (0,
|
723
|
+
let drawerContent = (0, import_utils17.findChild)(validChildren, DrawerContent);
|
564
724
|
if (drawerContent)
|
565
725
|
drawerContent = (0, import_react2.cloneElement)(drawerContent, { onKeyDown });
|
566
726
|
const placement = (0, import_use_value2.useValue)(_placement);
|
567
727
|
const css = {
|
728
|
+
alignItems: placement.includes("top") ? "flex-start" : placement.includes("bottom") ? "flex-end" : "center",
|
729
|
+
display: "flex",
|
730
|
+
h: "100dvh",
|
731
|
+
justifyContent: placement.includes("left") ? "flex-start" : placement.includes("right") ? "flex-end" : "center",
|
732
|
+
left: 0,
|
733
|
+
p: size !== "full" ? outside : void 0,
|
568
734
|
position: "fixed",
|
569
735
|
top: 0,
|
570
|
-
left: 0,
|
571
|
-
zIndex: "fallback(jeice, 110)",
|
572
736
|
w: "100vw",
|
573
|
-
|
574
|
-
p: size !== "full" ? outside : void 0,
|
575
|
-
display: "flex",
|
576
|
-
justifyContent: placement.includes("left") ? "flex-start" : placement.includes("right") ? "flex-end" : "center",
|
577
|
-
alignItems: placement.includes("top") ? "flex-start" : placement.includes("bottom") ? "flex-end" : "center"
|
737
|
+
zIndex: "fallback(jeice, 110)"
|
578
738
|
};
|
579
|
-
return /* @__PURE__ */ (0,
|
739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
580
740
|
ModalProvider,
|
581
741
|
{
|
582
742
|
value: {
|
583
|
-
isOpen,
|
584
|
-
onClose,
|
585
|
-
onOverlayClick,
|
586
|
-
withCloseButton,
|
587
|
-
scrollBehavior,
|
588
|
-
closeOnOverlay,
|
589
743
|
animation,
|
744
|
+
closeOnOverlay,
|
590
745
|
duration,
|
591
|
-
|
746
|
+
isOpen,
|
747
|
+
scrollBehavior,
|
748
|
+
styles,
|
749
|
+
withCloseButton,
|
750
|
+
onClose,
|
751
|
+
onOverlayClick
|
592
752
|
},
|
593
|
-
children: /* @__PURE__ */ (0,
|
753
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_motion6.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
594
754
|
import_focus_lock.FocusLock,
|
595
755
|
{
|
596
756
|
autoFocus,
|
597
|
-
initialFocusRef,
|
598
757
|
finalFocusRef,
|
599
|
-
|
758
|
+
initialFocusRef,
|
600
759
|
lockFocusAcrossFrames,
|
601
|
-
|
760
|
+
restoreFocus,
|
761
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
602
762
|
import_react_remove_scroll.RemoveScroll,
|
603
763
|
{
|
604
764
|
allowPinchZoom,
|
605
765
|
enabled: blockScrollOnMount,
|
606
766
|
forwardProps: true,
|
607
|
-
children: /* @__PURE__ */ (0,
|
608
|
-
customModalOverlay != null ? customModalOverlay : withOverlay && size !== "full" ? /* @__PURE__ */ (0,
|
609
|
-
drawerContent != null ? drawerContent : /* @__PURE__ */ (0,
|
767
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_core12.ui.div, { __css: css, ...containerProps, children: [
|
768
|
+
customModalOverlay != null ? customModalOverlay : withOverlay && size !== "full" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModalOverlay, {}) : null,
|
769
|
+
drawerContent != null ? drawerContent : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
610
770
|
ModalContent,
|
611
771
|
{
|
612
772
|
ref,
|
@@ -626,160 +786,6 @@ var Modal = (0, import_motion6.motionForwardRef)(
|
|
626
786
|
}
|
627
787
|
);
|
628
788
|
|
629
|
-
// src/modal-header.tsx
|
630
|
-
var import_core7 = require("@yamada-ui/core");
|
631
|
-
var import_utils12 = require("@yamada-ui/utils");
|
632
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
633
|
-
var ModalHeader = (0, import_core7.forwardRef)(
|
634
|
-
({ className, __css, ...rest }, ref) => {
|
635
|
-
const { styles } = useModal();
|
636
|
-
const css = {
|
637
|
-
display: "flex",
|
638
|
-
alignItems: "center",
|
639
|
-
justifyContent: "flex-start",
|
640
|
-
...__css ? __css : styles.header
|
641
|
-
};
|
642
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
643
|
-
import_core7.ui.header,
|
644
|
-
{
|
645
|
-
ref,
|
646
|
-
className: (0, import_utils12.cx)("ui-modal__header", className),
|
647
|
-
__css: css,
|
648
|
-
...rest
|
649
|
-
}
|
650
|
-
);
|
651
|
-
}
|
652
|
-
);
|
653
|
-
ModalHeader.displayName = "ModalHeader";
|
654
|
-
ModalHeader.__ui__ = "ModalHeader";
|
655
|
-
|
656
|
-
// src/modal-body.tsx
|
657
|
-
var import_core8 = require("@yamada-ui/core");
|
658
|
-
var import_utils13 = require("@yamada-ui/utils");
|
659
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
660
|
-
var ModalBody = (0, import_core8.forwardRef)(
|
661
|
-
({ className, __css, ...rest }, ref) => {
|
662
|
-
const { styles, scrollBehavior } = useModal();
|
663
|
-
const css = {
|
664
|
-
display: "flex",
|
665
|
-
flexDirection: "column",
|
666
|
-
alignItems: "flex-start",
|
667
|
-
overflow: scrollBehavior === "inside" ? "auto" : void 0,
|
668
|
-
...__css ? __css : styles.body
|
669
|
-
};
|
670
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
671
|
-
import_core8.ui.div,
|
672
|
-
{
|
673
|
-
ref,
|
674
|
-
className: (0, import_utils13.cx)("ui-modal__body", className),
|
675
|
-
__css: css,
|
676
|
-
...rest
|
677
|
-
}
|
678
|
-
);
|
679
|
-
}
|
680
|
-
);
|
681
|
-
ModalBody.displayName = "ModalBody";
|
682
|
-
ModalBody.__ui__ = "ModalBody";
|
683
|
-
|
684
|
-
// src/modal-footer.tsx
|
685
|
-
var import_core9 = require("@yamada-ui/core");
|
686
|
-
var import_utils14 = require("@yamada-ui/utils");
|
687
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
688
|
-
var ModalFooter = (0, import_core9.forwardRef)(
|
689
|
-
({ className, __css, ...rest }, ref) => {
|
690
|
-
const { styles } = useModal();
|
691
|
-
const css = {
|
692
|
-
display: "flex",
|
693
|
-
alignItems: "center",
|
694
|
-
justifyContent: "flex-end",
|
695
|
-
...__css ? __css : styles.footer
|
696
|
-
};
|
697
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
698
|
-
import_core9.ui.footer,
|
699
|
-
{
|
700
|
-
ref,
|
701
|
-
className: (0, import_utils14.cx)("ui-modal__footer", className),
|
702
|
-
__css: css,
|
703
|
-
...rest
|
704
|
-
}
|
705
|
-
);
|
706
|
-
}
|
707
|
-
);
|
708
|
-
ModalFooter.displayName = "ModalFooter";
|
709
|
-
ModalFooter.__ui__ = "ModalFooter";
|
710
|
-
|
711
|
-
// src/dialog.tsx
|
712
|
-
var import_button = require("@yamada-ui/button");
|
713
|
-
var import_core13 = require("@yamada-ui/core");
|
714
|
-
var import_motion7 = require("@yamada-ui/motion");
|
715
|
-
var import_utils18 = require("@yamada-ui/utils");
|
716
|
-
|
717
|
-
// src/dialog-body.tsx
|
718
|
-
var import_core10 = require("@yamada-ui/core");
|
719
|
-
var import_utils15 = require("@yamada-ui/utils");
|
720
|
-
var import_jsx_runtime14 = require("react/jsx-runtime");
|
721
|
-
var DialogBody = (0, import_core10.forwardRef)(
|
722
|
-
({ className, ...rest }, ref) => {
|
723
|
-
const styles = useDialog();
|
724
|
-
const css = { ...styles.body };
|
725
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
726
|
-
ModalBody,
|
727
|
-
{
|
728
|
-
ref,
|
729
|
-
className: (0, import_utils15.cx)("ui-dialog__body", className),
|
730
|
-
__css: css,
|
731
|
-
...rest
|
732
|
-
}
|
733
|
-
);
|
734
|
-
}
|
735
|
-
);
|
736
|
-
DialogBody.displayName = "DialogBody";
|
737
|
-
DialogBody.__ui__ = "DialogBody";
|
738
|
-
|
739
|
-
// src/dialog-footer.tsx
|
740
|
-
var import_core11 = require("@yamada-ui/core");
|
741
|
-
var import_utils16 = require("@yamada-ui/utils");
|
742
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
743
|
-
var DialogFooter = (0, import_core11.forwardRef)(
|
744
|
-
({ className, ...rest }, ref) => {
|
745
|
-
const styles = useDialog();
|
746
|
-
const css = { ...styles.footer };
|
747
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
748
|
-
ModalFooter,
|
749
|
-
{
|
750
|
-
ref,
|
751
|
-
className: (0, import_utils16.cx)("ui-dialog__footer", className),
|
752
|
-
__css: css,
|
753
|
-
...rest
|
754
|
-
}
|
755
|
-
);
|
756
|
-
}
|
757
|
-
);
|
758
|
-
DialogFooter.displayName = "DialogFooter";
|
759
|
-
DialogFooter.__ui__ = "DialogFooter";
|
760
|
-
|
761
|
-
// src/dialog-header.tsx
|
762
|
-
var import_core12 = require("@yamada-ui/core");
|
763
|
-
var import_utils17 = require("@yamada-ui/utils");
|
764
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
765
|
-
var DialogHeader = (0, import_core12.forwardRef)(
|
766
|
-
({ className, ...rest }, ref) => {
|
767
|
-
const styles = useDialog();
|
768
|
-
const css = { ...styles.header };
|
769
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
770
|
-
ModalHeader,
|
771
|
-
{
|
772
|
-
ref,
|
773
|
-
className: (0, import_utils17.cx)("ui-dialog__header", className),
|
774
|
-
__css: css,
|
775
|
-
...rest
|
776
|
-
}
|
777
|
-
);
|
778
|
-
}
|
779
|
-
);
|
780
|
-
DialogHeader.displayName = "DialogHeader";
|
781
|
-
DialogHeader.__ui__ = "DialogHeader";
|
782
|
-
|
783
789
|
// src/dialog.tsx
|
784
790
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
785
791
|
var Dialog = (0, import_motion7.motionForwardRef)(
|
@@ -790,19 +796,19 @@ var Dialog = (0, import_motion7.motionForwardRef)(
|
|
790
796
|
});
|
791
797
|
const {
|
792
798
|
className,
|
799
|
+
cancel,
|
793
800
|
children,
|
794
|
-
withOverlay = true,
|
795
|
-
withCloseButton = true,
|
796
|
-
header,
|
797
801
|
footer,
|
798
|
-
|
802
|
+
header,
|
799
803
|
other,
|
800
804
|
success,
|
801
|
-
|
805
|
+
withCloseButton = true,
|
806
|
+
withOverlay = true,
|
807
|
+
containerProps,
|
802
808
|
onCancel,
|
809
|
+
onClose,
|
803
810
|
onOther,
|
804
811
|
onSuccess,
|
805
|
-
containerProps,
|
806
812
|
...rest
|
807
813
|
} = (0, import_core13.omitThemeProps)(mergedProps);
|
808
814
|
const validChildren = (0, import_utils18.getValidChildren)(children);
|
@@ -820,15 +826,18 @@ var Dialog = (0, import_motion7.motionForwardRef)(
|
|
820
826
|
DialogFooter
|
821
827
|
) : children;
|
822
828
|
const css = { ...styles.container };
|
823
|
-
const cancelButtonProps = (0, import_utils18.isValidElement)(cancel) ? { children: cancel } : cancel;
|
824
|
-
const otherButtonProps = (0, import_utils18.isValidElement)(other) ? { children: other } : other;
|
825
|
-
const successButtonProps = (0, import_utils18.isValidElement)(success) ? { children: success } : success;
|
826
|
-
if (cancelButtonProps
|
827
|
-
|
828
|
-
if (otherButtonProps && !otherButtonProps.colorScheme)
|
829
|
+
const cancelButtonProps = (0, import_utils18.isValidElement)(cancel) || (0, import_utils18.isUndefined)(cancel) ? { children: cancel } : cancel;
|
830
|
+
const otherButtonProps = (0, import_utils18.isValidElement)(other) || (0, import_utils18.isUndefined)(other) ? { children: other } : other;
|
831
|
+
const successButtonProps = (0, import_utils18.isValidElement)(success) || (0, import_utils18.isUndefined)(success) ? { children: success } : success;
|
832
|
+
if (!cancelButtonProps.variant) cancelButtonProps.variant = "ghost";
|
833
|
+
if (!otherButtonProps.colorScheme)
|
829
834
|
otherButtonProps.colorScheme = "secondary";
|
830
|
-
if (
|
835
|
+
if (!successButtonProps.colorScheme)
|
831
836
|
successButtonProps.colorScheme = "primary";
|
837
|
+
const hasCancelButton = !!cancelButtonProps.children;
|
838
|
+
const hasOtherButton = !!otherButtonProps.children;
|
839
|
+
const hasSuccessButton = !!successButtonProps.children;
|
840
|
+
const hasFooter = hasCancelButton || hasOtherButton || hasSuccessButton;
|
832
841
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
833
842
|
Modal,
|
834
843
|
{
|
@@ -836,10 +845,10 @@ var Dialog = (0, import_motion7.motionForwardRef)(
|
|
836
845
|
className: (0, import_utils18.cx)("ui-dialog", className),
|
837
846
|
__css: css,
|
838
847
|
...{
|
839
|
-
onClose,
|
840
|
-
withOverlay: false,
|
841
848
|
withCloseButton: false,
|
849
|
+
withOverlay: false,
|
842
850
|
containerProps,
|
851
|
+
onClose,
|
843
852
|
...rest,
|
844
853
|
size
|
845
854
|
},
|
@@ -848,22 +857,22 @@ var Dialog = (0, import_motion7.motionForwardRef)(
|
|
848
857
|
customDialogCloseButton != null ? customDialogCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogCloseButton, {}) : null,
|
849
858
|
customDialogHeader != null ? customDialogHeader : header ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogHeader, { children: header }) : null,
|
850
859
|
customDialogBody != null ? customDialogBody : cloneChildren ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogBody, { children: cloneChildren }) : null,
|
851
|
-
customDialogFooter != null ? customDialogFooter : footer ||
|
852
|
-
|
860
|
+
customDialogFooter != null ? customDialogFooter : footer || hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogFooter, { children: footer != null ? footer : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
861
|
+
hasCancelButton ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
853
862
|
import_button.Button,
|
854
863
|
{
|
855
864
|
onClick: () => onCancel == null ? void 0 : onCancel(onClose),
|
856
865
|
...cancelButtonProps
|
857
866
|
}
|
858
867
|
) : null,
|
859
|
-
|
868
|
+
hasOtherButton ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
860
869
|
import_button.Button,
|
861
870
|
{
|
862
871
|
onClick: () => onOther == null ? void 0 : onOther(onClose),
|
863
872
|
...otherButtonProps
|
864
873
|
}
|
865
874
|
) : null,
|
866
|
-
|
875
|
+
hasSuccessButton ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
867
876
|
import_button.Button,
|
868
877
|
{
|
869
878
|
onClick: () => onSuccess == null ? void 0 : onSuccess(onClose),
|
@@ -885,40 +894,40 @@ var import_motion8 = require("@yamada-ui/motion");
|
|
885
894
|
var import_utils19 = require("@yamada-ui/utils");
|
886
895
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
887
896
|
var Drawer = (0, import_motion8.motionForwardRef)(
|
888
|
-
({ size,
|
897
|
+
({ size, closeOnDrag = false, placement = "right", ...props }, ref) => {
|
889
898
|
const [styles, mergedProps] = (0, import_core14.useComponentMultiStyle)("Drawer", {
|
890
899
|
size,
|
891
|
-
placement,
|
892
900
|
closeOnDrag,
|
901
|
+
placement,
|
893
902
|
...props
|
894
903
|
});
|
895
904
|
const {
|
896
|
-
children,
|
897
|
-
isOpen,
|
898
|
-
onClose,
|
899
|
-
onOverlayClick,
|
900
|
-
onEsc,
|
901
|
-
onCloseComplete,
|
902
|
-
withCloseButton = !closeOnDrag,
|
903
|
-
withOverlay = true,
|
904
|
-
withDragBar = true,
|
905
905
|
allowPinchZoom,
|
906
906
|
autoFocus,
|
907
|
-
restoreFocus,
|
908
|
-
initialFocusRef,
|
909
|
-
finalFocusRef,
|
910
907
|
blockScrollOnMount,
|
911
|
-
|
908
|
+
children,
|
912
909
|
closeOnEsc,
|
913
|
-
|
914
|
-
duration = { enter: 0.4, exit: 0.3 },
|
910
|
+
closeOnOverlay,
|
915
911
|
dragConstraints = 0,
|
916
912
|
dragElastic = 0.1,
|
917
913
|
dragOffset = 80,
|
918
914
|
dragVelocity = 100,
|
915
|
+
duration = { enter: 0.4, exit: 0.3 },
|
916
|
+
finalFocusRef,
|
917
|
+
initialFocusRef,
|
918
|
+
isOpen,
|
919
|
+
lockFocusAcrossFrames,
|
920
|
+
restoreFocus,
|
921
|
+
withCloseButton = !closeOnDrag,
|
922
|
+
withDragBar = true,
|
923
|
+
withOverlay = true,
|
919
924
|
blankForDragProps,
|
920
|
-
portalProps,
|
921
925
|
containerProps,
|
926
|
+
portalProps,
|
927
|
+
onClose,
|
928
|
+
onCloseComplete,
|
929
|
+
onEsc,
|
930
|
+
onOverlayClick,
|
922
931
|
...rest
|
923
932
|
} = (0, import_core14.omitThemeProps)(mergedProps, ["isFullHeight"]);
|
924
933
|
const validChildren = (0, import_utils19.getValidChildren)(children);
|
@@ -931,25 +940,25 @@ var Drawer = (0, import_motion8.motionForwardRef)(
|
|
931
940
|
{
|
932
941
|
ref,
|
933
942
|
...{
|
934
|
-
isOpen,
|
935
|
-
onClose,
|
936
|
-
onOverlayClick,
|
937
|
-
onEsc,
|
938
|
-
onCloseComplete,
|
939
|
-
withCloseButton: false,
|
940
|
-
withOverlay: false,
|
941
943
|
allowPinchZoom,
|
942
944
|
autoFocus,
|
943
|
-
restoreFocus,
|
944
|
-
initialFocusRef,
|
945
|
-
finalFocusRef,
|
946
945
|
blockScrollOnMount,
|
947
|
-
closeOnOverlay,
|
948
946
|
closeOnEsc,
|
949
|
-
|
947
|
+
closeOnOverlay,
|
950
948
|
duration,
|
949
|
+
finalFocusRef,
|
950
|
+
initialFocusRef,
|
951
|
+
isOpen,
|
952
|
+
lockFocusAcrossFrames,
|
953
|
+
restoreFocus,
|
954
|
+
withCloseButton: false,
|
955
|
+
withOverlay: false,
|
956
|
+
containerProps,
|
951
957
|
portalProps,
|
952
|
-
|
958
|
+
onClose,
|
959
|
+
onCloseComplete,
|
960
|
+
onEsc,
|
961
|
+
onOverlayClick
|
953
962
|
},
|
954
963
|
children: [
|
955
964
|
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DrawerOverlay, {}) : null,
|
@@ -965,8 +974,8 @@ var Drawer = (0, import_motion8.motionForwardRef)(
|
|
965
974
|
withDragBar,
|
966
975
|
blankForDragProps,
|
967
976
|
...rest,
|
968
|
-
|
969
|
-
|
977
|
+
closeOnDrag,
|
978
|
+
placement
|
970
979
|
},
|
971
980
|
children: cloneChildren
|
972
981
|
}
|
@@ -979,71 +988,71 @@ var Drawer = (0, import_motion8.motionForwardRef)(
|
|
979
988
|
Drawer.displayName = "Drawer";
|
980
989
|
Drawer.__ui__ = "Drawer";
|
981
990
|
|
982
|
-
// src/drawer-
|
991
|
+
// src/drawer-body.tsx
|
983
992
|
var import_core15 = require("@yamada-ui/core");
|
984
993
|
var import_utils20 = require("@yamada-ui/utils");
|
985
994
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
986
|
-
var
|
995
|
+
var DrawerBody = (0, import_core15.forwardRef)(
|
987
996
|
({ className, ...rest }, ref) => {
|
988
997
|
const styles = useDrawer();
|
989
|
-
const css = { ...styles.
|
998
|
+
const css = { ...styles.body };
|
990
999
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
991
|
-
|
1000
|
+
ModalBody,
|
992
1001
|
{
|
993
1002
|
ref,
|
994
|
-
className: (0, import_utils20.cx)("ui-
|
1003
|
+
className: (0, import_utils20.cx)("ui-drawer__body", className),
|
995
1004
|
__css: css,
|
996
1005
|
...rest
|
997
1006
|
}
|
998
1007
|
);
|
999
1008
|
}
|
1000
1009
|
);
|
1001
|
-
|
1002
|
-
|
1010
|
+
DrawerBody.displayName = "DrawerBody";
|
1011
|
+
DrawerBody.__ui__ = "DrawerBody";
|
1003
1012
|
|
1004
|
-
// src/drawer-
|
1013
|
+
// src/drawer-footer.tsx
|
1005
1014
|
var import_core16 = require("@yamada-ui/core");
|
1006
1015
|
var import_utils21 = require("@yamada-ui/utils");
|
1007
1016
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
1008
|
-
var
|
1017
|
+
var DrawerFooter = (0, import_core16.forwardRef)(
|
1009
1018
|
({ className, ...rest }, ref) => {
|
1010
1019
|
const styles = useDrawer();
|
1011
|
-
const css = { ...styles.
|
1020
|
+
const css = { ...styles.footer };
|
1012
1021
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
1013
|
-
|
1022
|
+
ModalFooter,
|
1014
1023
|
{
|
1015
1024
|
ref,
|
1016
|
-
className: (0, import_utils21.cx)("ui-
|
1025
|
+
className: (0, import_utils21.cx)("ui-drawer__footer", className),
|
1017
1026
|
__css: css,
|
1018
1027
|
...rest
|
1019
1028
|
}
|
1020
1029
|
);
|
1021
1030
|
}
|
1022
1031
|
);
|
1023
|
-
|
1024
|
-
|
1032
|
+
DrawerFooter.displayName = "DrawerFooter";
|
1033
|
+
DrawerFooter.__ui__ = "DrawerFooter";
|
1025
1034
|
|
1026
|
-
// src/drawer-
|
1035
|
+
// src/drawer-header.tsx
|
1027
1036
|
var import_core17 = require("@yamada-ui/core");
|
1028
1037
|
var import_utils22 = require("@yamada-ui/utils");
|
1029
1038
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
1030
|
-
var
|
1039
|
+
var DrawerHeader = (0, import_core17.forwardRef)(
|
1031
1040
|
({ className, ...rest }, ref) => {
|
1032
1041
|
const styles = useDrawer();
|
1033
|
-
const css = { ...styles.
|
1042
|
+
const css = { ...styles.header };
|
1034
1043
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
1035
|
-
|
1044
|
+
ModalHeader,
|
1036
1045
|
{
|
1037
1046
|
ref,
|
1038
|
-
className: (0, import_utils22.cx)("ui-
|
1047
|
+
className: (0, import_utils22.cx)("ui-drawer__header", className),
|
1039
1048
|
__css: css,
|
1040
1049
|
...rest
|
1041
1050
|
}
|
1042
1051
|
);
|
1043
1052
|
}
|
1044
1053
|
);
|
1045
|
-
|
1046
|
-
|
1054
|
+
DrawerHeader.displayName = "DrawerHeader";
|
1055
|
+
DrawerHeader.__ui__ = "DrawerHeader";
|
1047
1056
|
// Annotate the CommonJS export names for ESM import in node:
|
1048
1057
|
0 && (module.exports = {
|
1049
1058
|
Dialog,
|