@yamada-ui/modal 1.3.9 → 1.3.10-dev-20240917033401
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2EF6C34T.mjs +35 -0
- package/dist/chunk-2EF6C34T.mjs.map +1 -0
- package/dist/chunk-2GGZOTUT.mjs +32 -0
- package/dist/chunk-2GGZOTUT.mjs.map +1 -0
- package/dist/chunk-2UHL64SV.mjs +150 -0
- package/dist/chunk-2UHL64SV.mjs.map +1 -0
- package/dist/chunk-2XQPQIQG.mjs +32 -0
- package/dist/chunk-2XQPQIQG.mjs.map +1 -0
- package/dist/chunk-3CPIBNSS.mjs +32 -0
- package/dist/chunk-3CPIBNSS.mjs.map +1 -0
- package/dist/chunk-3S4JQQU3.mjs +32 -0
- package/dist/chunk-3S4JQQU3.mjs.map +1 -0
- package/dist/chunk-4G6PCQ4G.mjs +51 -0
- package/dist/chunk-4G6PCQ4G.mjs.map +1 -0
- package/dist/chunk-4J4ISPN7.mjs +26 -0
- package/dist/chunk-4J4ISPN7.mjs.map +1 -0
- package/dist/chunk-5OKOSAXO.mjs +37 -0
- package/dist/chunk-5OKOSAXO.mjs.map +1 -0
- package/dist/chunk-B2LUOR6L.mjs +32 -0
- package/dist/chunk-B2LUOR6L.mjs.map +1 -0
- package/dist/chunk-B436JYPR.mjs +34 -0
- package/dist/chunk-B436JYPR.mjs.map +1 -0
- package/dist/chunk-CW5ZZAAV.mjs +34 -0
- package/dist/chunk-CW5ZZAAV.mjs.map +1 -0
- package/dist/chunk-DV6BTDBZ.mjs +32 -0
- package/dist/chunk-DV6BTDBZ.mjs.map +1 -0
- package/dist/chunk-G646NVHY.mjs +176 -0
- package/dist/chunk-G646NVHY.mjs.map +1 -0
- package/dist/chunk-HM447TIY.mjs +32 -0
- package/dist/chunk-HM447TIY.mjs.map +1 -0
- package/dist/chunk-I6LPF3F6.mjs +95 -0
- package/dist/chunk-I6LPF3F6.mjs.map +1 -0
- package/dist/chunk-OFDDT2JT.mjs +32 -0
- package/dist/chunk-OFDDT2JT.mjs.map +1 -0
- package/dist/chunk-RSAJUBWR.mjs +32 -0
- package/dist/chunk-RSAJUBWR.mjs.map +1 -0
- package/dist/chunk-WEDZHILB.mjs +29 -0
- package/dist/chunk-WEDZHILB.mjs.map +1 -0
- package/dist/chunk-Y2QXIJZA.mjs +138 -0
- package/dist/chunk-Y2QXIJZA.mjs.map +1 -0
- package/dist/chunk-Y5NCRCDU.mjs +32 -0
- package/dist/chunk-Y5NCRCDU.mjs.map +1 -0
- package/dist/chunk-ZR2AEIGZ.mjs +116 -0
- package/dist/chunk-ZR2AEIGZ.mjs.map +1 -0
- package/dist/dialog-body.d.mts +8 -0
- package/dist/dialog-body.d.ts +8 -0
- package/dist/dialog-body.js +94 -0
- package/dist/dialog-body.js.map +1 -0
- package/dist/dialog-body.mjs +10 -0
- package/dist/dialog-body.mjs.map +1 -0
- package/dist/dialog-close-button.d.mts +8 -0
- package/dist/dialog-close-button.d.ts +8 -0
- package/dist/dialog-close-button.js +96 -0
- package/dist/dialog-close-button.js.map +1 -0
- package/dist/dialog-close-button.mjs +10 -0
- package/dist/dialog-close-button.mjs.map +1 -0
- package/dist/dialog-footer.d.mts +8 -0
- package/dist/dialog-footer.d.ts +8 -0
- package/dist/dialog-footer.js +91 -0
- package/dist/dialog-footer.js.map +1 -0
- package/dist/dialog-footer.mjs +10 -0
- package/dist/dialog-footer.mjs.map +1 -0
- package/dist/dialog-header.d.mts +8 -0
- package/dist/dialog-header.d.ts +8 -0
- package/dist/dialog-header.js +91 -0
- package/dist/dialog-header.js.map +1 -0
- package/dist/dialog-header.mjs +10 -0
- package/dist/dialog-header.mjs.map +1 -0
- package/dist/dialog-overlay.d.mts +8 -0
- package/dist/dialog-overlay.d.ts +8 -0
- package/dist/dialog-overlay.js +108 -0
- package/dist/dialog-overlay.js.map +1 -0
- package/dist/dialog-overlay.mjs +10 -0
- package/dist/dialog-overlay.mjs.map +1 -0
- package/dist/dialog.d.mts +7 -21
- package/dist/dialog.d.ts +7 -21
- package/dist/dialog.js +593 -678
- package/dist/dialog.js.map +1 -1
- package/dist/dialog.mjs +20 -13
- package/dist/drawer-body.d.mts +8 -0
- package/dist/drawer-body.d.ts +8 -0
- package/dist/drawer-body.js +94 -0
- package/dist/drawer-body.js.map +1 -0
- package/dist/drawer-body.mjs +10 -0
- package/dist/drawer-body.mjs.map +1 -0
- package/dist/drawer-close-button.d.mts +9 -0
- package/dist/drawer-close-button.d.ts +9 -0
- package/dist/drawer-close-button.js +96 -0
- package/dist/drawer-close-button.js.map +1 -0
- package/dist/drawer-close-button.mjs +10 -0
- package/dist/drawer-close-button.mjs.map +1 -0
- package/dist/drawer-content.d.mts +16 -0
- package/dist/drawer-content.d.ts +16 -0
- package/dist/drawer-content.js +278 -0
- package/dist/drawer-content.js.map +1 -0
- package/dist/drawer-content.mjs +12 -0
- package/dist/drawer-content.mjs.map +1 -0
- package/dist/drawer-drag-bar.d.mts +8 -0
- package/dist/drawer-drag-bar.d.ts +8 -0
- package/dist/drawer-drag-bar.js +66 -0
- package/dist/drawer-drag-bar.js.map +1 -0
- package/dist/drawer-drag-bar.mjs +9 -0
- package/dist/drawer-drag-bar.mjs.map +1 -0
- package/dist/drawer-footer.d.mts +8 -0
- package/dist/drawer-footer.d.ts +8 -0
- package/dist/drawer-footer.js +91 -0
- package/dist/drawer-footer.js.map +1 -0
- package/dist/drawer-footer.mjs +10 -0
- package/dist/drawer-footer.mjs.map +1 -0
- package/dist/drawer-header.d.mts +8 -0
- package/dist/drawer-header.d.ts +8 -0
- package/dist/drawer-header.js +91 -0
- package/dist/drawer-header.js.map +1 -0
- package/dist/drawer-header.mjs +10 -0
- package/dist/drawer-header.mjs.map +1 -0
- package/dist/drawer-overlay.d.mts +8 -0
- package/dist/drawer-overlay.d.ts +8 -0
- package/dist/drawer-overlay.js +108 -0
- package/dist/drawer-overlay.js.map +1 -0
- package/dist/drawer-overlay.mjs +10 -0
- package/dist/drawer-overlay.mjs.map +1 -0
- package/dist/drawer.d.mts +8 -27
- package/dist/drawer.d.ts +8 -27
- package/dist/drawer.js +405 -640
- package/dist/drawer.js.map +1 -1
- package/dist/drawer.mjs +14 -17
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +492 -413
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -18
- package/dist/modal-body.d.mts +3 -2
- package/dist/modal-body.d.ts +3 -2
- package/dist/modal-body.js +13 -856
- package/dist/modal-body.js.map +1 -1
- package/dist/modal-body.mjs +2 -1
- package/dist/modal-close-button.d.mts +3 -2
- package/dist/modal-close-button.d.ts +3 -2
- package/dist/modal-close-button.js +13 -854
- package/dist/modal-close-button.js.map +1 -1
- package/dist/modal-close-button.mjs +2 -1
- package/dist/modal-content.d.mts +9 -0
- package/dist/modal-content.d.ts +9 -0
- package/dist/modal-content.js +178 -0
- package/dist/modal-content.js.map +1 -0
- package/dist/modal-content.mjs +11 -0
- package/dist/modal-content.mjs.map +1 -0
- package/dist/modal-context.d.mts +27 -0
- package/dist/modal-context.d.ts +27 -0
- package/dist/modal-context.js +54 -0
- package/dist/modal-context.js.map +1 -0
- package/dist/modal-context.mjs +18 -0
- package/dist/modal-context.mjs.map +1 -0
- package/dist/modal-footer.d.mts +2 -1
- package/dist/modal-footer.d.ts +2 -1
- package/dist/modal-footer.js +13 -857
- package/dist/modal-footer.js.map +1 -1
- package/dist/modal-footer.mjs +2 -1
- package/dist/modal-header.d.mts +2 -1
- package/dist/modal-header.d.ts +2 -1
- package/dist/modal-header.js +13 -857
- package/dist/modal-header.js.map +1 -1
- package/dist/modal-header.mjs +2 -1
- package/dist/modal-overlay.d.mts +2 -1
- package/dist/modal-overlay.d.ts +2 -1
- package/dist/modal-overlay.js +16 -843
- package/dist/modal-overlay.js.map +1 -1
- package/dist/modal-overlay.mjs +2 -1
- package/dist/modal.d.mts +10 -14
- package/dist/modal.d.ts +10 -14
- package/dist/modal.js +183 -508
- package/dist/modal.js.map +1 -1
- package/dist/modal.mjs +13 -5
- package/package.json +10 -10
- package/dist/chunk-7PS3HWMF.mjs +0 -938
- package/dist/chunk-7PS3HWMF.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -43,121 +43,175 @@ __export(src_exports, {
|
|
|
43
43
|
module.exports = __toCommonJS(src_exports);
|
|
44
44
|
|
|
45
45
|
// src/modal.tsx
|
|
46
|
-
var
|
|
46
|
+
var import_core6 = require("@yamada-ui/core");
|
|
47
47
|
var import_focus_lock = require("@yamada-ui/focus-lock");
|
|
48
|
-
var
|
|
48
|
+
var import_motion6 = require("@yamada-ui/motion");
|
|
49
49
|
var import_portal = require("@yamada-ui/portal");
|
|
50
|
-
var import_transitions2 = require("@yamada-ui/transitions");
|
|
51
50
|
var import_use_value2 = require("@yamada-ui/use-value");
|
|
52
|
-
var
|
|
51
|
+
var import_utils11 = require("@yamada-ui/utils");
|
|
53
52
|
var import_react2 = require("react");
|
|
54
53
|
var import_react_remove_scroll = require("react-remove-scroll");
|
|
55
54
|
|
|
56
|
-
// src/
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
// src/dialog-overlay.tsx
|
|
56
|
+
var import_motion2 = require("@yamada-ui/motion");
|
|
57
|
+
var import_utils3 = require("@yamada-ui/utils");
|
|
58
|
+
|
|
59
|
+
// src/modal-context.ts
|
|
61
60
|
var import_utils = require("@yamada-ui/utils");
|
|
62
|
-
var
|
|
63
|
-
|
|
61
|
+
var [ModalProvider, useModal] = (0, import_utils.createContext)({
|
|
62
|
+
name: `ModalContext`,
|
|
63
|
+
errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `
|
|
64
|
+
});
|
|
65
|
+
var [DialogProvider, useDialog] = (0, import_utils.createContext)({
|
|
66
|
+
name: `DialogContext`,
|
|
67
|
+
errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in "<Dialog />" `
|
|
68
|
+
});
|
|
64
69
|
var [DrawerProvider, useDrawer] = (0, import_utils.createContext)({
|
|
65
70
|
name: `DrawerContext`,
|
|
66
71
|
errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in "<Drawer />" `
|
|
67
72
|
});
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
|
|
74
|
+
// src/modal-overlay.tsx
|
|
75
|
+
var import_motion = require("@yamada-ui/motion");
|
|
76
|
+
var import_transitions = require("@yamada-ui/transitions");
|
|
77
|
+
var import_utils2 = require("@yamada-ui/utils");
|
|
78
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
79
|
+
var ModalOverlay = (0, import_motion.motionForwardRef)(
|
|
80
|
+
({ className, __css, onClick, ...rest }, ref) => {
|
|
76
81
|
const {
|
|
77
|
-
|
|
78
|
-
isOpen,
|
|
79
|
-
onClose,
|
|
80
|
-
onOverlayClick,
|
|
81
|
-
onEsc,
|
|
82
|
-
onCloseComplete,
|
|
83
|
-
withCloseButton = !closeOnDrag,
|
|
84
|
-
withOverlay = true,
|
|
85
|
-
withDragBar = true,
|
|
86
|
-
allowPinchZoom,
|
|
87
|
-
autoFocus,
|
|
88
|
-
restoreFocus,
|
|
89
|
-
initialFocusRef,
|
|
90
|
-
finalFocusRef,
|
|
91
|
-
blockScrollOnMount,
|
|
82
|
+
styles,
|
|
92
83
|
closeOnOverlay,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
84
|
+
onOverlayClick,
|
|
85
|
+
onClose,
|
|
86
|
+
animation,
|
|
87
|
+
duration
|
|
88
|
+
} = useModal();
|
|
89
|
+
const css = {
|
|
90
|
+
position: "fixed",
|
|
91
|
+
top: 0,
|
|
92
|
+
left: 0,
|
|
93
|
+
w: "100vw",
|
|
94
|
+
h: "100vh",
|
|
95
|
+
...__css ? __css : styles.overlay
|
|
96
|
+
};
|
|
97
|
+
const props = animation !== "none" ? import_transitions.fadeProps : {};
|
|
98
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
|
+
import_motion.motion.div,
|
|
100
|
+
{
|
|
101
|
+
ref,
|
|
102
|
+
className: (0, import_utils2.cx)("ui-modal__overlay", className),
|
|
103
|
+
custom: { duration },
|
|
104
|
+
__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
|
+
...rest
|
|
111
|
+
}
|
|
109
112
|
);
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
// src/dialog-overlay.tsx
|
|
117
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
118
|
+
var DialogOverlay = (0, import_motion2.motionForwardRef)(
|
|
119
|
+
({ className, ...rest }, ref) => {
|
|
120
|
+
const styles = useDialog();
|
|
121
|
+
const css = { ...styles.overlay };
|
|
122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
123
|
+
ModalOverlay,
|
|
112
124
|
{
|
|
113
125
|
ref,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
onOverlayClick,
|
|
118
|
-
onEsc,
|
|
119
|
-
onCloseComplete,
|
|
120
|
-
withCloseButton: false,
|
|
121
|
-
withOverlay: false,
|
|
122
|
-
allowPinchZoom,
|
|
123
|
-
autoFocus,
|
|
124
|
-
restoreFocus,
|
|
125
|
-
initialFocusRef,
|
|
126
|
-
finalFocusRef,
|
|
127
|
-
blockScrollOnMount,
|
|
128
|
-
closeOnOverlay,
|
|
129
|
-
closeOnEsc,
|
|
130
|
-
lockFocusAcrossFrames,
|
|
131
|
-
duration,
|
|
132
|
-
portalProps,
|
|
133
|
-
containerProps
|
|
134
|
-
},
|
|
135
|
-
children: [
|
|
136
|
-
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerOverlay, {}) : null,
|
|
137
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
138
|
-
DrawerContent,
|
|
139
|
-
{
|
|
140
|
-
...{
|
|
141
|
-
dragConstraints,
|
|
142
|
-
dragElastic,
|
|
143
|
-
dragOffset,
|
|
144
|
-
dragVelocity,
|
|
145
|
-
withCloseButton,
|
|
146
|
-
withDragBar,
|
|
147
|
-
blankForDragProps,
|
|
148
|
-
...rest,
|
|
149
|
-
placement,
|
|
150
|
-
closeOnDrag
|
|
151
|
-
},
|
|
152
|
-
children: cloneChildren
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
]
|
|
126
|
+
className: (0, import_utils3.cx)("ui-dialog__overlay", className),
|
|
127
|
+
__css: css,
|
|
128
|
+
...rest
|
|
156
129
|
}
|
|
157
|
-
)
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
// src/drawer-content.tsx
|
|
135
|
+
var import_core4 = require("@yamada-ui/core");
|
|
136
|
+
var import_motion3 = require("@yamada-ui/motion");
|
|
137
|
+
var import_transitions2 = require("@yamada-ui/transitions");
|
|
138
|
+
var import_use_value = require("@yamada-ui/use-value");
|
|
139
|
+
var import_utils7 = require("@yamada-ui/utils");
|
|
140
|
+
var import_react = require("react");
|
|
141
|
+
|
|
142
|
+
// src/drawer-close-button.tsx
|
|
143
|
+
var import_core2 = require("@yamada-ui/core");
|
|
144
|
+
var import_utils5 = require("@yamada-ui/utils");
|
|
145
|
+
|
|
146
|
+
// src/modal-close-button.tsx
|
|
147
|
+
var import_close_button = require("@yamada-ui/close-button");
|
|
148
|
+
var import_core = require("@yamada-ui/core");
|
|
149
|
+
var import_utils4 = require("@yamada-ui/utils");
|
|
150
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
151
|
+
var ModalCloseButton = (0, import_core.forwardRef)(
|
|
152
|
+
({ onClick, __css, ...rest }, ref) => {
|
|
153
|
+
const { styles, onClose } = useModal();
|
|
154
|
+
const css = {
|
|
155
|
+
position: "absolute",
|
|
156
|
+
...__css ? __css : styles.closeButton
|
|
157
|
+
};
|
|
158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
159
|
+
import_close_button.CloseButton,
|
|
160
|
+
{
|
|
161
|
+
ref,
|
|
162
|
+
className: (0, import_utils4.cx)("ui-modal__close-button"),
|
|
163
|
+
__css: css,
|
|
164
|
+
onClick: (0, import_utils4.handlerAll)(onClick, (ev) => {
|
|
165
|
+
ev.stopPropagation();
|
|
166
|
+
onClose == null ? void 0 : onClose();
|
|
167
|
+
}),
|
|
168
|
+
...rest
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
// src/drawer-close-button.tsx
|
|
175
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
176
|
+
var DrawerCloseButton = (0, import_core2.forwardRef)(
|
|
177
|
+
({ className, ...rest }, ref) => {
|
|
178
|
+
const styles = useDrawer();
|
|
179
|
+
const css = { ...styles.closeButton };
|
|
180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
181
|
+
ModalCloseButton,
|
|
182
|
+
{
|
|
183
|
+
ref,
|
|
184
|
+
className: (0, import_utils5.cx)("ui-drawer__close-button", className),
|
|
185
|
+
__css: css,
|
|
186
|
+
...rest
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
// src/drawer-drag-bar.tsx
|
|
193
|
+
var import_core3 = require("@yamada-ui/core");
|
|
194
|
+
var import_utils6 = require("@yamada-ui/utils");
|
|
195
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
196
|
+
var DrawerDragBar = (0, import_core3.forwardRef)(
|
|
197
|
+
({ className, __css, ...rest }, ref) => {
|
|
198
|
+
const styles = useDrawer();
|
|
199
|
+
const css = { ...styles.dragBar };
|
|
200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
201
|
+
import_core3.ui.div,
|
|
202
|
+
{
|
|
203
|
+
ref,
|
|
204
|
+
className: (0, import_utils6.cx)("ui-drawer__drag-bar", className),
|
|
205
|
+
__css: css,
|
|
206
|
+
...rest
|
|
207
|
+
}
|
|
208
|
+
);
|
|
158
209
|
}
|
|
159
210
|
);
|
|
160
|
-
|
|
211
|
+
|
|
212
|
+
// src/drawer-content.tsx
|
|
213
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
214
|
+
var DrawerContent = (0, import_motion3.motionForwardRef)(
|
|
161
215
|
({
|
|
162
216
|
className,
|
|
163
217
|
children,
|
|
@@ -175,8 +229,8 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
|
|
|
175
229
|
const { isOpen, onClose, duration } = useModal();
|
|
176
230
|
const styles = useDrawer();
|
|
177
231
|
const placement = (0, import_use_value.useValue)(_placement);
|
|
178
|
-
const validChildren = (0,
|
|
179
|
-
const [customDrawerCloseButton, ...cloneChildren] = (0,
|
|
232
|
+
const validChildren = (0, import_utils7.getValidChildren)(children);
|
|
233
|
+
const [customDrawerCloseButton, ...cloneChildren] = (0, import_utils7.findChildren)(
|
|
180
234
|
validChildren,
|
|
181
235
|
DrawerCloseButton
|
|
182
236
|
);
|
|
@@ -185,7 +239,7 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
|
|
|
185
239
|
const propBg = (_c = (_b = (_a = rest.backgroundColor) != null ? _a : rest.bgColor) != null ? _b : rest.background) != null ? _c : rest.bg;
|
|
186
240
|
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;
|
|
187
241
|
const computedBg = propBg != null ? propBg : styleBg;
|
|
188
|
-
return (0,
|
|
242
|
+
return (0, import_utils7.isArray)(computedBg) ? computedBg : [computedBg];
|
|
189
243
|
}, [rest, styles]);
|
|
190
244
|
const blankForDrag = (0, import_react.useMemo)(() => {
|
|
191
245
|
let position = {};
|
|
@@ -272,11 +326,11 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
|
|
|
272
326
|
},
|
|
273
327
|
[placement, dragVelocity, dragOffset]
|
|
274
328
|
);
|
|
275
|
-
return /* @__PURE__ */ (0,
|
|
276
|
-
|
|
329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
330
|
+
import_transitions2.Slide,
|
|
277
331
|
{
|
|
278
332
|
ref,
|
|
279
|
-
className: (0,
|
|
333
|
+
className: (0, import_utils7.cx)("ui-drawer", className),
|
|
280
334
|
isOpen,
|
|
281
335
|
placement,
|
|
282
336
|
duration,
|
|
@@ -292,122 +346,150 @@ var DrawerContent = (0, import_motion.motionForwardRef)(
|
|
|
292
346
|
__css: css,
|
|
293
347
|
...rest,
|
|
294
348
|
children: [
|
|
295
|
-
customDrawerCloseButton != null ? customDrawerCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0,
|
|
296
|
-
withDragBar && closeOnDrag && (placement === "bottom" || placement === "right") ? /* @__PURE__ */ (0,
|
|
297
|
-
/* @__PURE__ */ (0,
|
|
298
|
-
|
|
349
|
+
customDrawerCloseButton != null ? customDrawerCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerCloseButton, {}) : null,
|
|
350
|
+
withDragBar && closeOnDrag && (placement === "bottom" || placement === "right") ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerDragBar, {}) : null,
|
|
351
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
352
|
+
import_core4.ui.div,
|
|
299
353
|
{
|
|
300
354
|
className: "ui-drawer__inner",
|
|
301
355
|
__css: { display: "flex", flexDirection: "column", ...styles.inner },
|
|
302
356
|
children: cloneChildren
|
|
303
357
|
}
|
|
304
358
|
),
|
|
305
|
-
withDragBar && closeOnDrag && (placement === "top" || placement === "left") ? /* @__PURE__ */ (0,
|
|
359
|
+
withDragBar && closeOnDrag && (placement === "top" || placement === "left") ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerDragBar, {}) : null
|
|
306
360
|
]
|
|
307
361
|
}
|
|
308
362
|
);
|
|
309
363
|
}
|
|
310
364
|
);
|
|
311
|
-
|
|
365
|
+
|
|
366
|
+
// src/drawer-overlay.tsx
|
|
367
|
+
var import_motion4 = require("@yamada-ui/motion");
|
|
368
|
+
var import_utils8 = require("@yamada-ui/utils");
|
|
369
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
370
|
+
var DrawerOverlay = (0, import_motion4.motionForwardRef)(
|
|
312
371
|
({ className, ...rest }, ref) => {
|
|
313
372
|
const styles = useDrawer();
|
|
314
373
|
const css = { ...styles.overlay };
|
|
315
|
-
return /* @__PURE__ */ (0,
|
|
374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
316
375
|
ModalOverlay,
|
|
317
376
|
{
|
|
318
377
|
ref,
|
|
319
|
-
className: (0,
|
|
378
|
+
className: (0, import_utils8.cx)("ui-drawer__overlay", className),
|
|
320
379
|
__css: css,
|
|
321
380
|
...rest
|
|
322
381
|
}
|
|
323
382
|
);
|
|
324
383
|
}
|
|
325
384
|
);
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
...rest
|
|
338
|
-
}
|
|
339
|
-
);
|
|
340
|
-
};
|
|
341
|
-
var DrawerCloseButton = (0, import_core.forwardRef)(
|
|
385
|
+
|
|
386
|
+
// src/modal-content.tsx
|
|
387
|
+
var import_motion5 = require("@yamada-ui/motion");
|
|
388
|
+
var import_transitions3 = require("@yamada-ui/transitions");
|
|
389
|
+
var import_utils10 = require("@yamada-ui/utils");
|
|
390
|
+
|
|
391
|
+
// src/dialog-close-button.tsx
|
|
392
|
+
var import_core5 = require("@yamada-ui/core");
|
|
393
|
+
var import_utils9 = require("@yamada-ui/utils");
|
|
394
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
395
|
+
var DialogCloseButton = (0, import_core5.forwardRef)(
|
|
342
396
|
({ className, ...rest }, ref) => {
|
|
343
|
-
const styles =
|
|
397
|
+
const styles = useDialog();
|
|
344
398
|
const css = { ...styles.closeButton };
|
|
345
|
-
return /* @__PURE__ */ (0,
|
|
399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
346
400
|
ModalCloseButton,
|
|
347
401
|
{
|
|
348
402
|
ref,
|
|
349
|
-
className: (0,
|
|
350
|
-
__css: css,
|
|
351
|
-
...rest
|
|
352
|
-
}
|
|
353
|
-
);
|
|
354
|
-
}
|
|
355
|
-
);
|
|
356
|
-
var DrawerHeader = (0, import_core.forwardRef)(
|
|
357
|
-
({ className, ...rest }, ref) => {
|
|
358
|
-
const styles = useDrawer();
|
|
359
|
-
const css = { ...styles.header };
|
|
360
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
361
|
-
ModalHeader,
|
|
362
|
-
{
|
|
363
|
-
ref,
|
|
364
|
-
className: (0, import_utils.cx)("ui-drawer__header", className),
|
|
403
|
+
className: (0, import_utils9.cx)("ui-dialog__close-button", className),
|
|
365
404
|
__css: css,
|
|
366
405
|
...rest
|
|
367
406
|
}
|
|
368
407
|
);
|
|
369
408
|
}
|
|
370
409
|
);
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
{
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
410
|
+
|
|
411
|
+
// src/modal-content.tsx
|
|
412
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
413
|
+
var getModalContentProps = (animation = "scale", duration) => {
|
|
414
|
+
switch (animation) {
|
|
415
|
+
case "scale":
|
|
416
|
+
return {
|
|
417
|
+
...import_transitions3.scaleFadeProps,
|
|
418
|
+
custom: { scale: 0.95, reverse: true, duration }
|
|
419
|
+
};
|
|
420
|
+
case "top":
|
|
421
|
+
return {
|
|
422
|
+
...import_transitions3.slideFadeProps,
|
|
423
|
+
custom: { offsetY: -16, reverse: true, duration }
|
|
424
|
+
};
|
|
425
|
+
case "right":
|
|
426
|
+
return {
|
|
427
|
+
...import_transitions3.slideFadeProps,
|
|
428
|
+
custom: { offsetX: 16, reverse: true, duration }
|
|
429
|
+
};
|
|
430
|
+
case "left":
|
|
431
|
+
return {
|
|
432
|
+
...import_transitions3.slideFadeProps,
|
|
433
|
+
custom: { offsetX: -16, reverse: true, duration }
|
|
434
|
+
};
|
|
435
|
+
case "bottom":
|
|
436
|
+
return {
|
|
437
|
+
...import_transitions3.slideFadeProps,
|
|
438
|
+
custom: { offsetY: 16, reverse: true, duration }
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
var ModalContent = (0, import_motion5.motionForwardRef)(
|
|
443
|
+
({ className, children, __css, ...rest }, ref) => {
|
|
444
|
+
const {
|
|
445
|
+
styles,
|
|
446
|
+
scrollBehavior,
|
|
447
|
+
withCloseButton,
|
|
448
|
+
onClose,
|
|
449
|
+
animation,
|
|
450
|
+
duration
|
|
451
|
+
} = useModal();
|
|
452
|
+
const validChildren = (0, import_utils10.getValidChildren)(children);
|
|
453
|
+
const [customModalCloseButton, ...cloneChildren] = (0, import_utils10.findChildren)(
|
|
454
|
+
validChildren,
|
|
455
|
+
ModalCloseButton,
|
|
456
|
+
DialogCloseButton
|
|
457
|
+
);
|
|
458
|
+
const props = animation !== "none" ? getModalContentProps(animation, duration) : {};
|
|
459
|
+
const css = {
|
|
460
|
+
position: "relative",
|
|
461
|
+
maxH: "100%",
|
|
462
|
+
display: "flex",
|
|
463
|
+
flexDirection: "column",
|
|
464
|
+
overflow: scrollBehavior === "inside" ? "hidden" : "auto",
|
|
465
|
+
outline: 0,
|
|
466
|
+
...__css ? __css : styles.container
|
|
467
|
+
};
|
|
468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
469
|
+
import_motion5.motion.section,
|
|
392
470
|
{
|
|
471
|
+
role: "dialog",
|
|
472
|
+
"aria-modal": "true",
|
|
393
473
|
ref,
|
|
394
|
-
className: (0,
|
|
474
|
+
className: (0, import_utils10.cx)("ui-modal", className),
|
|
475
|
+
tabIndex: -1,
|
|
395
476
|
__css: css,
|
|
396
|
-
...
|
|
477
|
+
...props,
|
|
478
|
+
...rest,
|
|
479
|
+
children: [
|
|
480
|
+
customModalCloseButton != null ? customModalCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ModalCloseButton, {}) : null,
|
|
481
|
+
cloneChildren
|
|
482
|
+
]
|
|
397
483
|
}
|
|
398
484
|
);
|
|
399
485
|
}
|
|
400
486
|
);
|
|
401
487
|
|
|
402
488
|
// src/modal.tsx
|
|
403
|
-
var
|
|
404
|
-
var
|
|
405
|
-
name: `ModalContext`,
|
|
406
|
-
errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `
|
|
407
|
-
});
|
|
408
|
-
var Modal = (0, import_motion2.motionForwardRef)(
|
|
489
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
490
|
+
var Modal = (0, import_motion6.motionForwardRef)(
|
|
409
491
|
({ size, ...props }, ref) => {
|
|
410
|
-
const [styles, mergedProps] = (0,
|
|
492
|
+
const [styles, mergedProps] = (0, import_core6.useComponentMultiStyle)("Modal", {
|
|
411
493
|
size,
|
|
412
494
|
...props
|
|
413
495
|
});
|
|
@@ -438,7 +520,7 @@ var Modal = (0, import_motion2.motionForwardRef)(
|
|
|
438
520
|
portalProps,
|
|
439
521
|
containerProps,
|
|
440
522
|
...rest
|
|
441
|
-
} = (0,
|
|
523
|
+
} = (0, import_core6.omitThemeProps)(mergedProps);
|
|
442
524
|
const onKeyDown = (0, import_react2.useCallback)(
|
|
443
525
|
(ev) => {
|
|
444
526
|
if (ev.key !== "Escape") return;
|
|
@@ -448,14 +530,14 @@ var Modal = (0, import_motion2.motionForwardRef)(
|
|
|
448
530
|
},
|
|
449
531
|
[closeOnEsc, onClose, onEsc]
|
|
450
532
|
);
|
|
451
|
-
const validChildren = (0,
|
|
452
|
-
const [customModalOverlay, ...cloneChildren] = (0,
|
|
533
|
+
const validChildren = (0, import_utils11.getValidChildren)(children);
|
|
534
|
+
const [customModalOverlay, ...cloneChildren] = (0, import_utils11.findChildren)(
|
|
453
535
|
validChildren,
|
|
454
536
|
ModalOverlay,
|
|
455
537
|
DialogOverlay,
|
|
456
538
|
DrawerOverlay
|
|
457
539
|
);
|
|
458
|
-
let [drawerContent] = (0,
|
|
540
|
+
let [drawerContent] = (0, import_utils11.findChildren)(validChildren, DrawerContent);
|
|
459
541
|
if (drawerContent)
|
|
460
542
|
drawerContent = (0, import_react2.cloneElement)(drawerContent, { onKeyDown });
|
|
461
543
|
const placement = (0, import_use_value2.useValue)(_placement);
|
|
@@ -471,7 +553,7 @@ var Modal = (0, import_motion2.motionForwardRef)(
|
|
|
471
553
|
justifyContent: placement.includes("left") ? "flex-start" : placement.includes("right") ? "flex-end" : "center",
|
|
472
554
|
alignItems: placement.includes("top") ? "flex-start" : placement.includes("bottom") ? "flex-end" : "center"
|
|
473
555
|
};
|
|
474
|
-
return /* @__PURE__ */ (0,
|
|
556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
475
557
|
ModalProvider,
|
|
476
558
|
{
|
|
477
559
|
value: {
|
|
@@ -485,7 +567,7 @@ var Modal = (0, import_motion2.motionForwardRef)(
|
|
|
485
567
|
duration,
|
|
486
568
|
styles
|
|
487
569
|
},
|
|
488
|
-
children: /* @__PURE__ */ (0,
|
|
570
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_motion6.AnimatePresence, { onExitComplete: onCloseComplete, children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_portal.Portal, { ...portalProps, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
489
571
|
import_focus_lock.FocusLock,
|
|
490
572
|
{
|
|
491
573
|
autoFocus,
|
|
@@ -493,15 +575,15 @@ var Modal = (0, import_motion2.motionForwardRef)(
|
|
|
493
575
|
finalFocusRef,
|
|
494
576
|
restoreFocus,
|
|
495
577
|
lockFocusAcrossFrames,
|
|
496
|
-
children: /* @__PURE__ */ (0,
|
|
578
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
497
579
|
import_react_remove_scroll.RemoveScroll,
|
|
498
580
|
{
|
|
499
581
|
allowPinchZoom,
|
|
500
582
|
enabled: blockScrollOnMount,
|
|
501
583
|
forwardProps: true,
|
|
502
|
-
children: /* @__PURE__ */ (0,
|
|
503
|
-
customModalOverlay != null ? customModalOverlay : withOverlay && size !== "full" ? /* @__PURE__ */ (0,
|
|
504
|
-
drawerContent != null ? drawerContent : /* @__PURE__ */ (0,
|
|
584
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core6.ui.div, { __css: css, ...containerProps, children: [
|
|
585
|
+
customModalOverlay != null ? customModalOverlay : withOverlay && size !== "full" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ModalOverlay, {}) : null,
|
|
586
|
+
drawerContent != null ? drawerContent : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
505
587
|
ModalContent,
|
|
506
588
|
{
|
|
507
589
|
ref,
|
|
@@ -520,169 +602,102 @@ var Modal = (0, import_motion2.motionForwardRef)(
|
|
|
520
602
|
);
|
|
521
603
|
}
|
|
522
604
|
);
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
return {
|
|
532
|
-
...import_transitions2.slideFadeProps,
|
|
533
|
-
custom: { offsetY: -16, reverse: true, duration }
|
|
534
|
-
};
|
|
535
|
-
case "right":
|
|
536
|
-
return {
|
|
537
|
-
...import_transitions2.slideFadeProps,
|
|
538
|
-
custom: { offsetX: 16, reverse: true, duration }
|
|
539
|
-
};
|
|
540
|
-
case "left":
|
|
541
|
-
return {
|
|
542
|
-
...import_transitions2.slideFadeProps,
|
|
543
|
-
custom: { offsetX: -16, reverse: true, duration }
|
|
544
|
-
};
|
|
545
|
-
case "bottom":
|
|
546
|
-
return {
|
|
547
|
-
...import_transitions2.slideFadeProps,
|
|
548
|
-
custom: { offsetY: 16, reverse: true, duration }
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
var ModalContent = (0, import_motion2.motionForwardRef)(
|
|
553
|
-
({ className, children, __css, ...rest }, ref) => {
|
|
554
|
-
const {
|
|
555
|
-
styles,
|
|
556
|
-
scrollBehavior,
|
|
557
|
-
withCloseButton,
|
|
558
|
-
onClose,
|
|
559
|
-
animation,
|
|
560
|
-
duration
|
|
561
|
-
} = useModal();
|
|
562
|
-
const validChildren = (0, import_utils2.getValidChildren)(children);
|
|
563
|
-
const [customModalCloseButton, ...cloneChildren] = (0, import_utils2.findChildren)(
|
|
564
|
-
validChildren,
|
|
565
|
-
ModalCloseButton,
|
|
566
|
-
DialogCloseButton
|
|
567
|
-
);
|
|
568
|
-
const props = animation !== "none" ? getModalContentProps(animation, duration) : {};
|
|
605
|
+
|
|
606
|
+
// src/modal-header.tsx
|
|
607
|
+
var import_core7 = require("@yamada-ui/core");
|
|
608
|
+
var import_utils12 = require("@yamada-ui/utils");
|
|
609
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
610
|
+
var ModalHeader = (0, import_core7.forwardRef)(
|
|
611
|
+
({ className, __css, ...rest }, ref) => {
|
|
612
|
+
const { styles } = useModal();
|
|
569
613
|
const css = {
|
|
570
|
-
position: "relative",
|
|
571
|
-
maxH: "100%",
|
|
572
614
|
display: "flex",
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
...__css ? __css : styles.container
|
|
615
|
+
alignItems: "center",
|
|
616
|
+
justifyContent: "flex-start",
|
|
617
|
+
...__css ? __css : styles.header
|
|
577
618
|
};
|
|
578
|
-
return /* @__PURE__ */ (0,
|
|
579
|
-
|
|
619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
620
|
+
import_core7.ui.header,
|
|
580
621
|
{
|
|
581
|
-
role: "dialog",
|
|
582
|
-
"aria-modal": "true",
|
|
583
622
|
ref,
|
|
584
|
-
className: (0,
|
|
585
|
-
tabIndex: -1,
|
|
623
|
+
className: (0, import_utils12.cx)("ui-modal__header", className),
|
|
586
624
|
__css: css,
|
|
587
|
-
...
|
|
588
|
-
...rest,
|
|
589
|
-
children: [
|
|
590
|
-
customModalCloseButton != null ? customModalCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ModalCloseButton, {}) : null,
|
|
591
|
-
cloneChildren
|
|
592
|
-
]
|
|
625
|
+
...rest
|
|
593
626
|
}
|
|
594
627
|
);
|
|
595
628
|
}
|
|
596
629
|
);
|
|
597
630
|
|
|
598
|
-
// src/modal-
|
|
599
|
-
var
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
const {
|
|
606
|
-
styles,
|
|
607
|
-
closeOnOverlay,
|
|
608
|
-
onOverlayClick,
|
|
609
|
-
onClose,
|
|
610
|
-
animation,
|
|
611
|
-
duration
|
|
612
|
-
} = useModal();
|
|
631
|
+
// src/modal-body.tsx
|
|
632
|
+
var import_core8 = require("@yamada-ui/core");
|
|
633
|
+
var import_utils13 = require("@yamada-ui/utils");
|
|
634
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
635
|
+
var ModalBody = (0, import_core8.forwardRef)(
|
|
636
|
+
({ className, __css, ...rest }, ref) => {
|
|
637
|
+
const { styles, scrollBehavior } = useModal();
|
|
613
638
|
const css = {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
...__css ? __css : styles.overlay
|
|
639
|
+
display: "flex",
|
|
640
|
+
flexDirection: "column",
|
|
641
|
+
alignItems: "flex-start",
|
|
642
|
+
overflow: scrollBehavior === "inside" ? "auto" : void 0,
|
|
643
|
+
...__css ? __css : styles.body
|
|
620
644
|
};
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
import_motion3.motion.div,
|
|
645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
646
|
+
import_core8.ui.div,
|
|
624
647
|
{
|
|
625
648
|
ref,
|
|
626
|
-
className: (0,
|
|
627
|
-
custom: { duration },
|
|
649
|
+
className: (0, import_utils13.cx)("ui-modal__body", className),
|
|
628
650
|
__css: css,
|
|
629
|
-
onClick: (0, import_utils3.handlerAll)(onClick, onOverlayClick, (ev) => {
|
|
630
|
-
ev.stopPropagation();
|
|
631
|
-
if (closeOnOverlay) onClose == null ? void 0 : onClose();
|
|
632
|
-
}),
|
|
633
|
-
...props,
|
|
634
651
|
...rest
|
|
635
652
|
}
|
|
636
653
|
);
|
|
637
654
|
}
|
|
638
655
|
);
|
|
639
656
|
|
|
640
|
-
// src/modal-
|
|
641
|
-
var
|
|
642
|
-
var
|
|
643
|
-
var
|
|
644
|
-
var
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
const { styles, onClose } = useModal();
|
|
657
|
+
// src/modal-footer.tsx
|
|
658
|
+
var import_core9 = require("@yamada-ui/core");
|
|
659
|
+
var import_utils14 = require("@yamada-ui/utils");
|
|
660
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
661
|
+
var ModalFooter = (0, import_core9.forwardRef)(
|
|
662
|
+
({ className, __css, ...rest }, ref) => {
|
|
663
|
+
const { styles } = useModal();
|
|
648
664
|
const css = {
|
|
649
|
-
|
|
650
|
-
|
|
665
|
+
display: "flex",
|
|
666
|
+
alignItems: "center",
|
|
667
|
+
justifyContent: "flex-end",
|
|
668
|
+
...__css ? __css : styles.footer
|
|
651
669
|
};
|
|
652
|
-
return /* @__PURE__ */ (0,
|
|
653
|
-
|
|
670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
671
|
+
import_core9.ui.footer,
|
|
654
672
|
{
|
|
655
673
|
ref,
|
|
656
|
-
className: (0,
|
|
674
|
+
className: (0, import_utils14.cx)("ui-modal__footer", className),
|
|
657
675
|
__css: css,
|
|
658
|
-
onClick: (0, import_utils4.handlerAll)(onClick, (ev) => {
|
|
659
|
-
ev.stopPropagation();
|
|
660
|
-
onClose == null ? void 0 : onClose();
|
|
661
|
-
}),
|
|
662
676
|
...rest
|
|
663
677
|
}
|
|
664
678
|
);
|
|
665
679
|
}
|
|
666
680
|
);
|
|
667
681
|
|
|
668
|
-
// src/
|
|
669
|
-
var
|
|
670
|
-
var
|
|
671
|
-
var
|
|
672
|
-
var
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
682
|
+
// src/dialog.tsx
|
|
683
|
+
var import_button = require("@yamada-ui/button");
|
|
684
|
+
var import_core13 = require("@yamada-ui/core");
|
|
685
|
+
var import_motion7 = require("@yamada-ui/motion");
|
|
686
|
+
var import_utils18 = require("@yamada-ui/utils");
|
|
687
|
+
|
|
688
|
+
// src/dialog-body.tsx
|
|
689
|
+
var import_core10 = require("@yamada-ui/core");
|
|
690
|
+
var import_utils15 = require("@yamada-ui/utils");
|
|
691
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
692
|
+
var DialogBody = (0, import_core10.forwardRef)(
|
|
693
|
+
({ className, ...rest }, ref) => {
|
|
694
|
+
const styles = useDialog();
|
|
695
|
+
const css = { ...styles.body };
|
|
696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
697
|
+
ModalBody,
|
|
683
698
|
{
|
|
684
699
|
ref,
|
|
685
|
-
className: (0,
|
|
700
|
+
className: (0, import_utils15.cx)("ui-dialog__body", className),
|
|
686
701
|
__css: css,
|
|
687
702
|
...rest
|
|
688
703
|
}
|
|
@@ -690,25 +705,19 @@ var ModalHeader = (0, import_core4.forwardRef)(
|
|
|
690
705
|
}
|
|
691
706
|
);
|
|
692
707
|
|
|
693
|
-
// src/
|
|
694
|
-
var
|
|
695
|
-
var
|
|
696
|
-
var
|
|
697
|
-
var
|
|
698
|
-
({ className,
|
|
699
|
-
const
|
|
700
|
-
const css = {
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
alignItems: "flex-start",
|
|
704
|
-
overflow: scrollBehavior === "inside" ? "auto" : void 0,
|
|
705
|
-
...__css ? __css : styles.body
|
|
706
|
-
};
|
|
707
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
708
|
-
import_core5.ui.div,
|
|
708
|
+
// src/dialog-footer.tsx
|
|
709
|
+
var import_core11 = require("@yamada-ui/core");
|
|
710
|
+
var import_utils16 = require("@yamada-ui/utils");
|
|
711
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
712
|
+
var DialogFooter = (0, import_core11.forwardRef)(
|
|
713
|
+
({ className, ...rest }, ref) => {
|
|
714
|
+
const styles = useDialog();
|
|
715
|
+
const css = { ...styles.footer };
|
|
716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
717
|
+
ModalFooter,
|
|
709
718
|
{
|
|
710
719
|
ref,
|
|
711
|
-
className: (0,
|
|
720
|
+
className: (0, import_utils16.cx)("ui-dialog__footer", className),
|
|
712
721
|
__css: css,
|
|
713
722
|
...rest
|
|
714
723
|
}
|
|
@@ -716,24 +725,19 @@ var ModalBody = (0, import_core5.forwardRef)(
|
|
|
716
725
|
}
|
|
717
726
|
);
|
|
718
727
|
|
|
719
|
-
// src/
|
|
720
|
-
var
|
|
721
|
-
var
|
|
722
|
-
var
|
|
723
|
-
var
|
|
724
|
-
({ className,
|
|
725
|
-
const
|
|
726
|
-
const css = {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
justifyContent: "flex-end",
|
|
730
|
-
...__css ? __css : styles.footer
|
|
731
|
-
};
|
|
732
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
733
|
-
import_core6.ui.footer,
|
|
728
|
+
// src/dialog-header.tsx
|
|
729
|
+
var import_core12 = require("@yamada-ui/core");
|
|
730
|
+
var import_utils17 = require("@yamada-ui/utils");
|
|
731
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
732
|
+
var DialogHeader = (0, import_core12.forwardRef)(
|
|
733
|
+
({ className, ...rest }, ref) => {
|
|
734
|
+
const styles = useDialog();
|
|
735
|
+
const css = { ...styles.header };
|
|
736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
737
|
+
ModalHeader,
|
|
734
738
|
{
|
|
735
739
|
ref,
|
|
736
|
-
className: (0,
|
|
740
|
+
className: (0, import_utils17.cx)("ui-dialog__header", className),
|
|
737
741
|
__css: css,
|
|
738
742
|
...rest
|
|
739
743
|
}
|
|
@@ -742,18 +746,10 @@ var ModalFooter = (0, import_core6.forwardRef)(
|
|
|
742
746
|
);
|
|
743
747
|
|
|
744
748
|
// src/dialog.tsx
|
|
745
|
-
var
|
|
746
|
-
var
|
|
747
|
-
var import_motion4 = require("@yamada-ui/motion");
|
|
748
|
-
var import_utils8 = require("@yamada-ui/utils");
|
|
749
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
750
|
-
var [DialogProvider, useDialog] = (0, import_utils8.createContext)({
|
|
751
|
-
name: `DialogContext`,
|
|
752
|
-
errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in "<Dialog />" `
|
|
753
|
-
});
|
|
754
|
-
var Dialog = (0, import_motion4.motionForwardRef)(
|
|
749
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
750
|
+
var Dialog = (0, import_motion7.motionForwardRef)(
|
|
755
751
|
({ size, ...props }, ref) => {
|
|
756
|
-
const [styles, mergedProps] = (0,
|
|
752
|
+
const [styles, mergedProps] = (0, import_core13.useComponentMultiStyle)("Dialog", {
|
|
757
753
|
size,
|
|
758
754
|
...props
|
|
759
755
|
});
|
|
@@ -773,17 +769,17 @@ var Dialog = (0, import_motion4.motionForwardRef)(
|
|
|
773
769
|
onSuccess,
|
|
774
770
|
containerProps,
|
|
775
771
|
...rest
|
|
776
|
-
} = (0,
|
|
777
|
-
const validChildren = (0,
|
|
778
|
-
const [customDialogOverlay] = (0,
|
|
779
|
-
const [customDialogCloseButton] = (0,
|
|
772
|
+
} = (0, import_core13.omitThemeProps)(mergedProps);
|
|
773
|
+
const validChildren = (0, import_utils18.getValidChildren)(children);
|
|
774
|
+
const [customDialogOverlay] = (0, import_utils18.findChildren)(validChildren, DialogOverlay);
|
|
775
|
+
const [customDialogCloseButton] = (0, import_utils18.findChildren)(
|
|
780
776
|
validChildren,
|
|
781
777
|
DialogCloseButton
|
|
782
778
|
);
|
|
783
|
-
const [customDialogHeader] = (0,
|
|
784
|
-
const [customDialogBody] = (0,
|
|
785
|
-
const [customDialogFooter] = (0,
|
|
786
|
-
const cloneChildren = !(0,
|
|
779
|
+
const [customDialogHeader] = (0, import_utils18.findChildren)(validChildren, DialogHeader);
|
|
780
|
+
const [customDialogBody] = (0, import_utils18.findChildren)(validChildren, DialogBody);
|
|
781
|
+
const [customDialogFooter] = (0, import_utils18.findChildren)(validChildren, DialogFooter);
|
|
782
|
+
const cloneChildren = !(0, import_utils18.isEmpty)(validChildren) ? (0, import_utils18.omitChildren)(
|
|
787
783
|
validChildren,
|
|
788
784
|
DialogOverlay,
|
|
789
785
|
DialogCloseButton,
|
|
@@ -792,20 +788,20 @@ var Dialog = (0, import_motion4.motionForwardRef)(
|
|
|
792
788
|
DialogFooter
|
|
793
789
|
) : children;
|
|
794
790
|
const css = { ...styles.container };
|
|
795
|
-
const cancelButtonProps = (0,
|
|
796
|
-
const otherButtonProps = (0,
|
|
797
|
-
const successButtonProps = (0,
|
|
791
|
+
const cancelButtonProps = (0, import_utils18.isValidElement)(cancel) ? { children: cancel } : cancel;
|
|
792
|
+
const otherButtonProps = (0, import_utils18.isValidElement)(other) ? { children: other } : other;
|
|
793
|
+
const successButtonProps = (0, import_utils18.isValidElement)(success) ? { children: success } : success;
|
|
798
794
|
if (cancelButtonProps && !cancelButtonProps.variant)
|
|
799
795
|
cancelButtonProps.variant = "ghost";
|
|
800
796
|
if (otherButtonProps && !otherButtonProps.colorScheme)
|
|
801
797
|
otherButtonProps.colorScheme = "secondary";
|
|
802
798
|
if (successButtonProps && !successButtonProps.colorScheme)
|
|
803
799
|
successButtonProps.colorScheme = "primary";
|
|
804
|
-
return /* @__PURE__ */ (0,
|
|
800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
805
801
|
Modal,
|
|
806
802
|
{
|
|
807
803
|
ref,
|
|
808
|
-
className: (0,
|
|
804
|
+
className: (0, import_utils18.cx)("ui-dialog", className),
|
|
809
805
|
__css: css,
|
|
810
806
|
...{
|
|
811
807
|
onClose,
|
|
@@ -816,26 +812,26 @@ var Dialog = (0, import_motion4.motionForwardRef)(
|
|
|
816
812
|
size
|
|
817
813
|
},
|
|
818
814
|
children: [
|
|
819
|
-
customDialogOverlay != null ? customDialogOverlay : withOverlay && size !== "full" ? /* @__PURE__ */ (0,
|
|
820
|
-
customDialogCloseButton != null ? customDialogCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0,
|
|
821
|
-
customDialogHeader != null ? customDialogHeader : header ? /* @__PURE__ */ (0,
|
|
822
|
-
customDialogBody != null ? customDialogBody : cloneChildren ? /* @__PURE__ */ (0,
|
|
823
|
-
customDialogFooter != null ? customDialogFooter : footer || cancelButtonProps || otherButtonProps || successButtonProps ? /* @__PURE__ */ (0,
|
|
824
|
-
cancelButtonProps ? /* @__PURE__ */ (0,
|
|
815
|
+
customDialogOverlay != null ? customDialogOverlay : withOverlay && size !== "full" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogOverlay, {}) : null,
|
|
816
|
+
customDialogCloseButton != null ? customDialogCloseButton : withCloseButton && onClose ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogCloseButton, {}) : null,
|
|
817
|
+
customDialogHeader != null ? customDialogHeader : header ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogHeader, { children: header }) : null,
|
|
818
|
+
customDialogBody != null ? customDialogBody : cloneChildren ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogBody, { children: cloneChildren }) : null,
|
|
819
|
+
customDialogFooter != null ? customDialogFooter : footer || cancelButtonProps || otherButtonProps || successButtonProps ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DialogFooter, { children: footer != null ? footer : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
820
|
+
cancelButtonProps ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
825
821
|
import_button.Button,
|
|
826
822
|
{
|
|
827
823
|
onClick: () => onCancel == null ? void 0 : onCancel(onClose),
|
|
828
824
|
...cancelButtonProps
|
|
829
825
|
}
|
|
830
826
|
) : null,
|
|
831
|
-
otherButtonProps ? /* @__PURE__ */ (0,
|
|
827
|
+
otherButtonProps ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
832
828
|
import_button.Button,
|
|
833
829
|
{
|
|
834
830
|
onClick: () => onOther == null ? void 0 : onOther(onClose),
|
|
835
831
|
...otherButtonProps
|
|
836
832
|
}
|
|
837
833
|
) : null,
|
|
838
|
-
successButtonProps ? /* @__PURE__ */ (0,
|
|
834
|
+
successButtonProps ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
839
835
|
import_button.Button,
|
|
840
836
|
{
|
|
841
837
|
onClick: () => onSuccess == null ? void 0 : onSuccess(onClose),
|
|
@@ -848,75 +844,158 @@ var Dialog = (0, import_motion4.motionForwardRef)(
|
|
|
848
844
|
) });
|
|
849
845
|
}
|
|
850
846
|
);
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
847
|
+
|
|
848
|
+
// src/drawer.tsx
|
|
849
|
+
var import_core14 = require("@yamada-ui/core");
|
|
850
|
+
var import_motion8 = require("@yamada-ui/motion");
|
|
851
|
+
var import_utils19 = require("@yamada-ui/utils");
|
|
852
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
853
|
+
var Drawer = (0, import_motion8.motionForwardRef)(
|
|
854
|
+
({ size, placement = "right", closeOnDrag = false, ...props }, ref) => {
|
|
855
|
+
const [styles, mergedProps] = (0, import_core14.useComponentMultiStyle)("Drawer", {
|
|
856
|
+
size,
|
|
857
|
+
placement,
|
|
858
|
+
closeOnDrag,
|
|
859
|
+
...props
|
|
860
|
+
});
|
|
861
|
+
const {
|
|
862
|
+
children,
|
|
863
|
+
isOpen,
|
|
864
|
+
onClose,
|
|
865
|
+
onOverlayClick,
|
|
866
|
+
onEsc,
|
|
867
|
+
onCloseComplete,
|
|
868
|
+
withCloseButton = !closeOnDrag,
|
|
869
|
+
withOverlay = true,
|
|
870
|
+
withDragBar = true,
|
|
871
|
+
allowPinchZoom,
|
|
872
|
+
autoFocus,
|
|
873
|
+
restoreFocus,
|
|
874
|
+
initialFocusRef,
|
|
875
|
+
finalFocusRef,
|
|
876
|
+
blockScrollOnMount,
|
|
877
|
+
closeOnOverlay,
|
|
878
|
+
closeOnEsc,
|
|
879
|
+
lockFocusAcrossFrames,
|
|
880
|
+
duration = { enter: 0.4, exit: 0.3 },
|
|
881
|
+
dragConstraints = 0,
|
|
882
|
+
dragElastic = 0.1,
|
|
883
|
+
dragOffset = 80,
|
|
884
|
+
dragVelocity = 100,
|
|
885
|
+
blankForDragProps,
|
|
886
|
+
portalProps,
|
|
887
|
+
containerProps,
|
|
888
|
+
...rest
|
|
889
|
+
} = (0, import_core14.omitThemeProps)(mergedProps, ["isFullHeight"]);
|
|
890
|
+
const validChildren = (0, import_utils19.getValidChildren)(children);
|
|
891
|
+
const [customDrawerOverlay, ...cloneChildren] = (0, import_utils19.findChildren)(
|
|
892
|
+
validChildren,
|
|
893
|
+
DrawerOverlay
|
|
863
894
|
);
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
var DialogCloseButton = (0, import_core7.forwardRef)(
|
|
867
|
-
({ className, ...rest }, ref) => {
|
|
868
|
-
const styles = useDialog();
|
|
869
|
-
const css = { ...styles.closeButton };
|
|
870
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
871
|
-
ModalCloseButton,
|
|
895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DrawerProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
896
|
+
Modal,
|
|
872
897
|
{
|
|
873
898
|
ref,
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
899
|
+
...{
|
|
900
|
+
isOpen,
|
|
901
|
+
onClose,
|
|
902
|
+
onOverlayClick,
|
|
903
|
+
onEsc,
|
|
904
|
+
onCloseComplete,
|
|
905
|
+
withCloseButton: false,
|
|
906
|
+
withOverlay: false,
|
|
907
|
+
allowPinchZoom,
|
|
908
|
+
autoFocus,
|
|
909
|
+
restoreFocus,
|
|
910
|
+
initialFocusRef,
|
|
911
|
+
finalFocusRef,
|
|
912
|
+
blockScrollOnMount,
|
|
913
|
+
closeOnOverlay,
|
|
914
|
+
closeOnEsc,
|
|
915
|
+
lockFocusAcrossFrames,
|
|
916
|
+
duration,
|
|
917
|
+
portalProps,
|
|
918
|
+
containerProps
|
|
919
|
+
},
|
|
920
|
+
children: [
|
|
921
|
+
customDrawerOverlay != null ? customDrawerOverlay : withOverlay ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DrawerOverlay, {}) : null,
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
923
|
+
DrawerContent,
|
|
924
|
+
{
|
|
925
|
+
...{
|
|
926
|
+
dragConstraints,
|
|
927
|
+
dragElastic,
|
|
928
|
+
dragOffset,
|
|
929
|
+
dragVelocity,
|
|
930
|
+
withCloseButton,
|
|
931
|
+
withDragBar,
|
|
932
|
+
blankForDragProps,
|
|
933
|
+
...rest,
|
|
934
|
+
placement,
|
|
935
|
+
closeOnDrag
|
|
936
|
+
},
|
|
937
|
+
children: cloneChildren
|
|
938
|
+
}
|
|
939
|
+
)
|
|
940
|
+
]
|
|
877
941
|
}
|
|
878
|
-
);
|
|
942
|
+
) });
|
|
879
943
|
}
|
|
880
944
|
);
|
|
881
|
-
|
|
945
|
+
|
|
946
|
+
// src/drawer-header.tsx
|
|
947
|
+
var import_core15 = require("@yamada-ui/core");
|
|
948
|
+
var import_utils20 = require("@yamada-ui/utils");
|
|
949
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
950
|
+
var DrawerHeader = (0, import_core15.forwardRef)(
|
|
882
951
|
({ className, ...rest }, ref) => {
|
|
883
|
-
const styles =
|
|
952
|
+
const styles = useDrawer();
|
|
884
953
|
const css = { ...styles.header };
|
|
885
|
-
return /* @__PURE__ */ (0,
|
|
954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
886
955
|
ModalHeader,
|
|
887
956
|
{
|
|
888
957
|
ref,
|
|
889
|
-
className: (0,
|
|
958
|
+
className: (0, import_utils20.cx)("ui-drawer__header", className),
|
|
890
959
|
__css: css,
|
|
891
960
|
...rest
|
|
892
961
|
}
|
|
893
962
|
);
|
|
894
963
|
}
|
|
895
964
|
);
|
|
896
|
-
|
|
965
|
+
|
|
966
|
+
// src/drawer-body.tsx
|
|
967
|
+
var import_core16 = require("@yamada-ui/core");
|
|
968
|
+
var import_utils21 = require("@yamada-ui/utils");
|
|
969
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
970
|
+
var DrawerBody = (0, import_core16.forwardRef)(
|
|
897
971
|
({ className, ...rest }, ref) => {
|
|
898
|
-
const styles =
|
|
972
|
+
const styles = useDrawer();
|
|
899
973
|
const css = { ...styles.body };
|
|
900
|
-
return /* @__PURE__ */ (0,
|
|
974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
901
975
|
ModalBody,
|
|
902
976
|
{
|
|
903
977
|
ref,
|
|
904
|
-
className: (0,
|
|
978
|
+
className: (0, import_utils21.cx)("ui-drawer__body", className),
|
|
905
979
|
__css: css,
|
|
906
980
|
...rest
|
|
907
981
|
}
|
|
908
982
|
);
|
|
909
983
|
}
|
|
910
984
|
);
|
|
911
|
-
|
|
985
|
+
|
|
986
|
+
// src/drawer-footer.tsx
|
|
987
|
+
var import_core17 = require("@yamada-ui/core");
|
|
988
|
+
var import_utils22 = require("@yamada-ui/utils");
|
|
989
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
990
|
+
var DrawerFooter = (0, import_core17.forwardRef)(
|
|
912
991
|
({ className, ...rest }, ref) => {
|
|
913
|
-
const styles =
|
|
992
|
+
const styles = useDrawer();
|
|
914
993
|
const css = { ...styles.footer };
|
|
915
|
-
return /* @__PURE__ */ (0,
|
|
994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
916
995
|
ModalFooter,
|
|
917
996
|
{
|
|
918
997
|
ref,
|
|
919
|
-
className: (0,
|
|
998
|
+
className: (0, import_utils22.cx)("ui-drawer__footer", className),
|
|
920
999
|
__css: css,
|
|
921
1000
|
...rest
|
|
922
1001
|
}
|