@orioncactuscorp/ui 1.7.0 → 1.8.0
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/components/Accordion/Accordion.css +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Modal/Modal.css +1 -1
- package/dist/components/Modal/Modal.js +310 -308
- package/dist/components/internal/DisclosureIndicator.js +23 -23
- package/dist/styles.css +2 -2
- package/dist/ui/src/components/Modal/Modal.d.ts +1 -1
- package/dist/ui/src/components/Modal/Modal.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/index.d.ts +1 -1
- package/dist/ui/src/components/Modal/index.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/types.d.ts +3 -1
- package/dist/ui/src/components/Modal/types.d.ts.map +1 -1
- package/dist/ui/src/index.d.ts +1 -1
- package/dist/ui/src/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { Dialog as
|
|
2
|
+
import { jsx as c, jsxs as Z } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback as P, useEffect as ne, useRef as Y, useState as T, useMemo as be, useLayoutEffect as Ce, useId as Me } from "react";
|
|
4
|
+
import { Dialog as $ } from "@base-ui-components/react/dialog";
|
|
5
5
|
import Pe from "@orioncactuscorp/icons/orioncactus/CloseThick";
|
|
6
6
|
import { MotionExpand as Re } from "../../react/motion.js";
|
|
7
7
|
import He from "../Background/Background.js";
|
|
@@ -19,7 +19,7 @@ import { useModalStackDepth as Ie } from "./useModalStackDepth.js";
|
|
|
19
19
|
import { getModalScrollState as Ee } from "./modalScrollArbitration.js";
|
|
20
20
|
import { resolveModalSnapMetrics as je, resolveModalPopupSnapPositions as Le } from "./snapPoints.js";
|
|
21
21
|
import n from "./Modal.module.scss.js";
|
|
22
|
-
function
|
|
22
|
+
function R(...e) {
|
|
23
23
|
return e.filter(Boolean).join(" ");
|
|
24
24
|
}
|
|
25
25
|
function Se(e) {
|
|
@@ -44,8 +44,8 @@ function fe(e) {
|
|
|
44
44
|
return e.split(",").reduce((t, r) => Math.max(t, Ve(r)), 0);
|
|
45
45
|
}
|
|
46
46
|
function Oe(e) {
|
|
47
|
-
const t = window.getComputedStyle(e), r = fe(t.animationDuration),
|
|
48
|
-
return r +
|
|
47
|
+
const t = window.getComputedStyle(e), r = fe(t.animationDuration), s = fe(t.animationDelay);
|
|
48
|
+
return r + s + 250;
|
|
49
49
|
}
|
|
50
50
|
function qe({
|
|
51
51
|
defaultSnapPosition: e,
|
|
@@ -53,13 +53,13 @@ function qe({
|
|
|
53
53
|
snapPositions: r
|
|
54
54
|
}) {
|
|
55
55
|
if (!r?.length) return;
|
|
56
|
-
const
|
|
56
|
+
const s = Le({
|
|
57
57
|
defaultSnapPosition: e,
|
|
58
58
|
snapPositions: r,
|
|
59
59
|
surfaceMotion: t
|
|
60
60
|
});
|
|
61
|
-
if (!
|
|
62
|
-
const l =
|
|
61
|
+
if (!s) return;
|
|
62
|
+
const l = s.defaultTarget;
|
|
63
63
|
t.style.setProperty(
|
|
64
64
|
"--oc-modal-translate-x",
|
|
65
65
|
l.settledTranslate?.x ?? `${l.x}px`
|
|
@@ -103,9 +103,9 @@ function Ue({
|
|
|
103
103
|
backdrop: e,
|
|
104
104
|
canSnapPopup: t,
|
|
105
105
|
placement: r,
|
|
106
|
-
presentationState:
|
|
106
|
+
presentationState: s
|
|
107
107
|
}) {
|
|
108
|
-
return e !== "auto" ? e : r === "bottom" &&
|
|
108
|
+
return e !== "auto" ? e : r === "bottom" && s === "peeked" || t ? "hidden" : "visible";
|
|
109
109
|
}
|
|
110
110
|
function _e(e) {
|
|
111
111
|
switch (Ke(e)) {
|
|
@@ -130,130 +130,130 @@ function he({
|
|
|
130
130
|
children: e,
|
|
131
131
|
open: t,
|
|
132
132
|
defaultOpen: r,
|
|
133
|
-
modal:
|
|
133
|
+
modal: s = !0,
|
|
134
134
|
onOpenChange: l,
|
|
135
|
-
canCloseAttempt:
|
|
136
|
-
onCloseAttempt:
|
|
137
|
-
presentationState:
|
|
138
|
-
defaultPresentationState:
|
|
139
|
-
onPresentationStateChange:
|
|
140
|
-
disablePointerDismissal:
|
|
141
|
-
navigationDepth:
|
|
142
|
-
dismissBehavior:
|
|
135
|
+
canCloseAttempt: b,
|
|
136
|
+
onCloseAttempt: u,
|
|
137
|
+
presentationState: y,
|
|
138
|
+
defaultPresentationState: g = "visible",
|
|
139
|
+
onPresentationStateChange: k,
|
|
140
|
+
disablePointerDismissal: f,
|
|
141
|
+
navigationDepth: p = 0,
|
|
142
|
+
dismissBehavior: w
|
|
143
143
|
}) {
|
|
144
|
-
const
|
|
144
|
+
const i = t !== void 0, [H, V] = T(
|
|
145
145
|
r ?? !1
|
|
146
|
-
), O =
|
|
146
|
+
), O = i ? t : H, [q, ce] = T("bottom"), [a, K] = T(!1), [B, J] = T(!1), [d, D] = T(!1), [h, ee] = T(!1), [z, Q] = T(0), [S, C] = T(0), [te, W] = T(null), [U, F] = T({
|
|
147
147
|
canScroll: !1,
|
|
148
148
|
scrolledFromTop: !1,
|
|
149
149
|
scrolledToBottom: !0
|
|
150
|
-
}), [
|
|
151
|
-
value:
|
|
152
|
-
defaultValue:
|
|
153
|
-
onChange:
|
|
154
|
-
}),
|
|
150
|
+
}), [N, I] = ke({
|
|
151
|
+
value: y,
|
|
152
|
+
defaultValue: g,
|
|
153
|
+
onChange: k
|
|
154
|
+
}), x = ue(), M = ue(), X = Math.max(0, p), v = P(
|
|
155
155
|
(o, m) => {
|
|
156
|
-
|
|
156
|
+
i || V(o), l?.(o, m);
|
|
157
157
|
},
|
|
158
|
-
[l,
|
|
159
|
-
),
|
|
160
|
-
(o = { reason: "programmatic" }) =>
|
|
161
|
-
[
|
|
162
|
-
),
|
|
158
|
+
[l, i]
|
|
159
|
+
), E = P(
|
|
160
|
+
(o = { reason: "programmatic" }) => b?.(o) !== !1,
|
|
161
|
+
[b]
|
|
162
|
+
), A = P(
|
|
163
163
|
(o = { reason: "programmatic" }) => {
|
|
164
164
|
Q((m) => m + 1);
|
|
165
165
|
},
|
|
166
166
|
[]
|
|
167
|
-
), oe =
|
|
168
|
-
|
|
169
|
-
}, []),
|
|
167
|
+
), oe = P(() => {
|
|
168
|
+
C((o) => o + 1);
|
|
169
|
+
}, []), j = P(
|
|
170
170
|
(o = { reason: "programmatic" }) => {
|
|
171
|
-
if (ge(o.reason,
|
|
171
|
+
if (ge(o.reason, d))
|
|
172
172
|
return !1;
|
|
173
|
-
const m = ze(
|
|
173
|
+
const m = ze(w, o.reason);
|
|
174
174
|
return m === "allow" ? !0 : m === "block" ? !1 : !We(o.reason, X);
|
|
175
175
|
},
|
|
176
|
-
[
|
|
177
|
-
), _ =
|
|
176
|
+
[d, w, X]
|
|
177
|
+
), _ = P(
|
|
178
178
|
(o = { reason: "programmatic" }, m = {}) => {
|
|
179
|
-
const { commit: le = !0, skipAttempt:
|
|
180
|
-
return !
|
|
179
|
+
const { commit: le = !0, skipAttempt: L = !1 } = m;
|
|
180
|
+
return !L && ge(o.reason, d) ? (de(o.eventDetails), !1) : !L && !j(o) || !L && !E(o) || !L && u?.(o) === !1 ? (de(o.eventDetails), A(o), !1) : (le && v(!1, o.eventDetails), !0);
|
|
181
181
|
},
|
|
182
182
|
[
|
|
183
|
-
I,
|
|
184
|
-
u,
|
|
185
183
|
E,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
d,
|
|
185
|
+
j,
|
|
186
|
+
v,
|
|
187
|
+
A,
|
|
188
|
+
u
|
|
189
189
|
]
|
|
190
|
-
), ae =
|
|
190
|
+
), ae = P(
|
|
191
191
|
(o, m) => {
|
|
192
|
-
if (o &&
|
|
192
|
+
if (o && N === "peeked" && I("visible"), !o) {
|
|
193
193
|
_({
|
|
194
194
|
reason: _e(m),
|
|
195
195
|
eventDetails: m
|
|
196
196
|
});
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
v(o, m);
|
|
200
200
|
},
|
|
201
|
-
[
|
|
202
|
-
), G =
|
|
201
|
+
[v, N, _, I]
|
|
202
|
+
), G = N === "visible" && !h ? s : !1, se = f || q === "bottom" && a, ie = be(
|
|
203
203
|
() => ({
|
|
204
204
|
open: O,
|
|
205
205
|
placement: q,
|
|
206
206
|
setPlacement: ce,
|
|
207
|
-
presentationState:
|
|
208
|
-
setPresentationState:
|
|
207
|
+
presentationState: N,
|
|
208
|
+
setPresentationState: I,
|
|
209
209
|
requestClose: _,
|
|
210
|
-
canDismissByBehavior:
|
|
211
|
-
canCloseAttempt:
|
|
210
|
+
canDismissByBehavior: j,
|
|
211
|
+
canCloseAttempt: E,
|
|
212
212
|
closeAttemptFeedbackKey: z,
|
|
213
|
-
notifyCloseAttemptRejected:
|
|
214
|
-
disablePointerDismissal:
|
|
215
|
-
setBackdropDismissalDisabled:
|
|
213
|
+
notifyCloseAttemptRejected: A,
|
|
214
|
+
disablePointerDismissal: f ?? !1,
|
|
215
|
+
setBackdropDismissalDisabled: D,
|
|
216
216
|
setBackgroundInteractive: ee,
|
|
217
217
|
canPeek: a,
|
|
218
218
|
setCanPeek: K,
|
|
219
|
-
canRenderHandle:
|
|
219
|
+
canRenderHandle: B,
|
|
220
220
|
setCanRenderHandle: J,
|
|
221
|
-
popupSnapLayoutVersion:
|
|
221
|
+
popupSnapLayoutVersion: S,
|
|
222
222
|
notifyPopupSnapLayoutChange: oe,
|
|
223
|
-
headerHeight:
|
|
224
|
-
footerHeight:
|
|
225
|
-
setHeaderNode:
|
|
226
|
-
setFooterNode:
|
|
223
|
+
headerHeight: x.height,
|
|
224
|
+
footerHeight: M.height,
|
|
225
|
+
setHeaderNode: x.setNode,
|
|
226
|
+
setFooterNode: M.setNode,
|
|
227
227
|
bodyNode: te,
|
|
228
228
|
setBodyNode: W,
|
|
229
229
|
scrollState: U,
|
|
230
|
-
setScrollState:
|
|
230
|
+
setScrollState: F
|
|
231
231
|
}),
|
|
232
232
|
[
|
|
233
233
|
te,
|
|
234
234
|
a,
|
|
235
|
-
|
|
235
|
+
B,
|
|
236
|
+
j,
|
|
236
237
|
E,
|
|
237
|
-
I,
|
|
238
238
|
z,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
239
|
+
M.height,
|
|
240
|
+
M.setNode,
|
|
241
|
+
x.height,
|
|
242
|
+
x.setNode,
|
|
243
|
+
A,
|
|
244
244
|
oe,
|
|
245
|
-
|
|
245
|
+
S,
|
|
246
246
|
O,
|
|
247
247
|
q,
|
|
248
248
|
_,
|
|
249
249
|
U,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
f,
|
|
251
|
+
N,
|
|
252
|
+
I
|
|
253
253
|
]
|
|
254
254
|
);
|
|
255
|
-
return /* @__PURE__ */
|
|
256
|
-
|
|
255
|
+
return /* @__PURE__ */ c(Ae, { value: ie, children: /* @__PURE__ */ c(
|
|
256
|
+
$.Root,
|
|
257
257
|
{
|
|
258
258
|
open: O,
|
|
259
259
|
modal: G,
|
|
@@ -267,21 +267,21 @@ function Je({
|
|
|
267
267
|
className: e = "",
|
|
268
268
|
children: t,
|
|
269
269
|
render: r,
|
|
270
|
-
nativeButton:
|
|
270
|
+
nativeButton: s
|
|
271
271
|
}) {
|
|
272
|
-
return r ? /* @__PURE__ */
|
|
273
|
-
|
|
272
|
+
return r ? /* @__PURE__ */ c(
|
|
273
|
+
$.Trigger,
|
|
274
274
|
{
|
|
275
275
|
render: r,
|
|
276
|
-
nativeButton:
|
|
276
|
+
nativeButton: s,
|
|
277
277
|
"data-oc-component": "modal-trigger",
|
|
278
278
|
children: t
|
|
279
279
|
}
|
|
280
|
-
) : /* @__PURE__ */
|
|
281
|
-
|
|
280
|
+
) : /* @__PURE__ */ c(
|
|
281
|
+
$.Trigger,
|
|
282
282
|
{
|
|
283
|
-
className:
|
|
284
|
-
nativeButton:
|
|
283
|
+
className: R(n.trigger, e),
|
|
284
|
+
nativeButton: s,
|
|
285
285
|
"data-oc-component": "modal-trigger",
|
|
286
286
|
children: t
|
|
287
287
|
}
|
|
@@ -291,131 +291,131 @@ function Qe({
|
|
|
291
291
|
className: e = "",
|
|
292
292
|
children: t,
|
|
293
293
|
variant: r = "adaptive",
|
|
294
|
-
size:
|
|
295
|
-
resize: l = "
|
|
296
|
-
backdrop:
|
|
297
|
-
drag:
|
|
298
|
-
peekable:
|
|
299
|
-
snapPoints:
|
|
300
|
-
defaultSnapPoint:
|
|
301
|
-
snapPositions:
|
|
302
|
-
defaultSnapPosition:
|
|
303
|
-
initialFocus:
|
|
304
|
-
peekHeight:
|
|
305
|
-
closeThreshold:
|
|
294
|
+
size: s = "medium",
|
|
295
|
+
resize: l = "content",
|
|
296
|
+
backdrop: b = "auto",
|
|
297
|
+
drag: u = "content",
|
|
298
|
+
peekable: y = !1,
|
|
299
|
+
snapPoints: g,
|
|
300
|
+
defaultSnapPoint: k,
|
|
301
|
+
snapPositions: f,
|
|
302
|
+
defaultSnapPosition: p,
|
|
303
|
+
initialFocus: w,
|
|
304
|
+
peekHeight: i,
|
|
305
|
+
closeThreshold: H,
|
|
306
306
|
scrollLockTimeout: V,
|
|
307
307
|
container: O,
|
|
308
308
|
style: q,
|
|
309
309
|
...ce
|
|
310
310
|
}) {
|
|
311
|
-
const a = re("ModalContent"), { setCanPeek: K, setCanRenderHandle:
|
|
312
|
-
backdrop:
|
|
313
|
-
canSnapPopup:
|
|
314
|
-
placement:
|
|
311
|
+
const a = re("ModalContent"), { setCanPeek: K, setCanRenderHandle: B, setPlacement: J } = a, d = De(r), D = Y(null), h = Y(null), ee = Y(null), z = Y(null), Q = Y(0), S = Y(null), C = Y(null), [te, W] = T(), U = u === "handle" || u === "content", F = d === "popup" && U && !!f?.length, N = Ue({
|
|
312
|
+
backdrop: b,
|
|
313
|
+
canSnapPopup: F,
|
|
314
|
+
placement: d,
|
|
315
315
|
presentationState: a.presentationState
|
|
316
|
-
}),
|
|
317
|
-
if (!(!
|
|
316
|
+
}), I = F && N === "hidden", x = (d === "bottom" || F) && U, M = d === "bottom" && x && y, X = M && i !== void 0 ? i : a.headerHeight > 0 ? a.headerHeight : void 0, v = be(() => {
|
|
317
|
+
if (!(!g?.length || typeof window > "u"))
|
|
318
318
|
return je({
|
|
319
|
-
snapPoints:
|
|
320
|
-
defaultSnapPoint:
|
|
319
|
+
snapPoints: g,
|
|
320
|
+
defaultSnapPoint: k,
|
|
321
321
|
viewportHeight: window.innerHeight
|
|
322
322
|
});
|
|
323
|
-
}, [
|
|
323
|
+
}, [k, g]), E = Ie(a.open);
|
|
324
324
|
ne(() => {
|
|
325
|
-
J(
|
|
326
|
-
}, [
|
|
325
|
+
J(d);
|
|
326
|
+
}, [d, J]), ne(() => {
|
|
327
327
|
a.open || (z.current = null);
|
|
328
|
-
}, [a.open]), ne(() => (K(
|
|
329
|
-
const
|
|
330
|
-
enabled:
|
|
331
|
-
drag:
|
|
328
|
+
}, [a.open]), ne(() => (K(M), () => K(!1)), [M, K]), ne(() => (B(x), () => B(!1)), [x, B]);
|
|
329
|
+
const A = Be({
|
|
330
|
+
enabled: u !== !1,
|
|
331
|
+
drag: u,
|
|
332
332
|
open: a.open,
|
|
333
|
-
placement:
|
|
334
|
-
surfaceMotionRef:
|
|
333
|
+
placement: d,
|
|
334
|
+
surfaceMotionRef: D,
|
|
335
335
|
backdropRef: ee,
|
|
336
336
|
bodyNode: a.bodyNode,
|
|
337
|
-
snapHeights:
|
|
338
|
-
peekHeight:
|
|
339
|
-
peekFallback:
|
|
337
|
+
snapHeights: v?.snapHeights,
|
|
338
|
+
peekHeight: M ? i : void 0,
|
|
339
|
+
peekFallback: M ? "header" : void 0,
|
|
340
340
|
presentationState: a.presentationState,
|
|
341
341
|
setPresentationState: a.setPresentationState,
|
|
342
342
|
requestClose: a.requestClose,
|
|
343
343
|
canCloseAttempt: a.canCloseAttempt,
|
|
344
344
|
dismissible: !a.disablePointerDismissal && a.canDismissByBehavior({ reason: "drag-dismiss" }),
|
|
345
|
-
visibleTranslate:
|
|
346
|
-
snapPositions:
|
|
347
|
-
defaultSnapPosition:
|
|
348
|
-
closeThreshold:
|
|
345
|
+
visibleTranslate: v?.visibleTranslate,
|
|
346
|
+
snapPositions: F ? f : void 0,
|
|
347
|
+
defaultSnapPosition: p,
|
|
348
|
+
closeThreshold: H,
|
|
349
349
|
scrollLockTimeout: V,
|
|
350
350
|
popupSnapLayoutVersion: a.popupSnapLayoutVersion
|
|
351
|
-
}), oe =
|
|
351
|
+
}), oe = P(
|
|
352
352
|
(o) => {
|
|
353
|
-
|
|
354
|
-
defaultSnapPosition:
|
|
353
|
+
D.current = o, o && a.open && F && z.current !== o && (qe({
|
|
354
|
+
defaultSnapPosition: p,
|
|
355
355
|
node: o,
|
|
356
|
-
snapPositions:
|
|
356
|
+
snapPositions: f
|
|
357
357
|
}), z.current = o);
|
|
358
358
|
},
|
|
359
|
-
[
|
|
359
|
+
[F, a.open, p, f]
|
|
360
360
|
);
|
|
361
361
|
ne(() => {
|
|
362
362
|
const o = a.closeAttemptFeedbackKey;
|
|
363
|
-
if (o === 0 ||
|
|
363
|
+
if (o === 0 || d !== "popup" || Q.current === o) {
|
|
364
364
|
Q.current = o, W(void 0);
|
|
365
365
|
return;
|
|
366
366
|
}
|
|
367
|
-
const m =
|
|
367
|
+
const m = h.current;
|
|
368
368
|
if (!m) return;
|
|
369
|
-
Q.current = o,
|
|
369
|
+
Q.current = o, S.current !== null && window.cancelAnimationFrame(S.current), C.current !== null && window.clearTimeout(C.current), W(void 0);
|
|
370
370
|
const le = () => {
|
|
371
|
-
W(void 0),
|
|
372
|
-
},
|
|
373
|
-
me.target === m && me.animationName === "oc-modal-reject-shake" && (m.removeEventListener("animationend",
|
|
371
|
+
W(void 0), C.current = null;
|
|
372
|
+
}, L = (me) => {
|
|
373
|
+
me.target === m && me.animationName === "oc-modal-reject-shake" && (m.removeEventListener("animationend", L), C.current !== null && window.clearTimeout(C.current), le());
|
|
374
374
|
};
|
|
375
|
-
return m.addEventListener("animationend",
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
m.removeEventListener("animationend",
|
|
375
|
+
return m.addEventListener("animationend", L), S.current = window.requestAnimationFrame(() => {
|
|
376
|
+
S.current = null, W("reject"), S.current = window.requestAnimationFrame(() => {
|
|
377
|
+
S.current = null, C.current = window.setTimeout(() => {
|
|
378
|
+
m.removeEventListener("animationend", L), le();
|
|
379
379
|
}, Oe(m));
|
|
380
380
|
});
|
|
381
381
|
}), () => {
|
|
382
|
-
m.removeEventListener("animationend",
|
|
382
|
+
m.removeEventListener("animationend", L), S.current !== null && (window.cancelAnimationFrame(S.current), S.current = null), C.current !== null && (window.clearTimeout(C.current), C.current = null);
|
|
383
383
|
};
|
|
384
|
-
}, [a.closeAttemptFeedbackKey,
|
|
385
|
-
const
|
|
386
|
-
...
|
|
384
|
+
}, [a.closeAttemptFeedbackKey, d]);
|
|
385
|
+
const j = $e(q), _ = {
|
|
386
|
+
...j,
|
|
387
387
|
...a.headerHeight > 0 ? { "--oc-modal-header-height": `${a.headerHeight}px` } : {},
|
|
388
388
|
...a.footerHeight > 0 ? { "--oc-modal-footer-height": `${a.footerHeight}px` } : {},
|
|
389
389
|
...X !== void 0 ? { "--oc-modal-peek-height": `${X}px` } : {},
|
|
390
|
-
...
|
|
391
|
-
...
|
|
392
|
-
"--oc-modal-translate-y": `${
|
|
390
|
+
...v?.sheetHeight !== void 0 ? { "--oc-modal-sheet-height": `${v.sheetHeight}px` } : {},
|
|
391
|
+
...v?.visibleTranslate !== void 0 ? {
|
|
392
|
+
"--oc-modal-translate-y": `${v.visibleTranslate}px`
|
|
393
393
|
} : {}
|
|
394
394
|
}, ae = {
|
|
395
395
|
// Each modal reserves one backdrop slot and one viewport slot.
|
|
396
|
-
"--oc-modal-stack-offset":
|
|
397
|
-
}, G =
|
|
398
|
-
return Ce(() => (se(
|
|
396
|
+
"--oc-modal-stack-offset": E * 2
|
|
397
|
+
}, G = w === "content" ? D : w, { setBackdropDismissalDisabled: se, setBackgroundInteractive: ie } = a;
|
|
398
|
+
return Ce(() => (se(N === "hidden"), ie(I), () => {
|
|
399
399
|
se(!1), ie(!1);
|
|
400
400
|
}), [
|
|
401
|
-
|
|
402
|
-
|
|
401
|
+
I,
|
|
402
|
+
N,
|
|
403
403
|
se,
|
|
404
404
|
ie
|
|
405
|
-
]), /* @__PURE__ */ Z(
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
|
|
405
|
+
]), /* @__PURE__ */ Z($.Portal, { container: O, children: [
|
|
406
|
+
/* @__PURE__ */ c(
|
|
407
|
+
$.Backdrop,
|
|
408
408
|
{
|
|
409
409
|
ref: ee,
|
|
410
410
|
className: n.backdrop,
|
|
411
411
|
"data-oc-part": "backdrop",
|
|
412
412
|
"data-oc-component": "modal-backdrop",
|
|
413
|
-
"data-oc-modal-backdrop":
|
|
414
|
-
"data-oc-modal-placement":
|
|
413
|
+
"data-oc-modal-backdrop": N,
|
|
414
|
+
"data-oc-modal-placement": d,
|
|
415
415
|
"data-oc-modal-presentation-state": a.presentationState,
|
|
416
416
|
style: ae,
|
|
417
417
|
onClick: (o) => {
|
|
418
|
-
if (
|
|
418
|
+
if (N === "hidden") {
|
|
419
419
|
o.stopPropagation();
|
|
420
420
|
return;
|
|
421
421
|
}
|
|
@@ -427,7 +427,7 @@ function Qe({
|
|
|
427
427
|
a.notifyCloseAttemptRejected({ reason: "backdrop-press" });
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
|
-
if (
|
|
430
|
+
if (d === "bottom" && M) {
|
|
431
431
|
a.presentationState === "visible" && a.setPresentationState("peeked");
|
|
432
432
|
return;
|
|
433
433
|
}
|
|
@@ -435,66 +435,66 @@ function Qe({
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
),
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
|
|
438
|
+
/* @__PURE__ */ c(
|
|
439
|
+
$.Viewport,
|
|
440
440
|
{
|
|
441
441
|
className: n.viewport,
|
|
442
442
|
"data-oc-part": "viewport",
|
|
443
443
|
"data-oc-component": "modal-viewport",
|
|
444
|
-
"data-oc-modal-placement":
|
|
444
|
+
"data-oc-modal-placement": d,
|
|
445
445
|
style: ae,
|
|
446
446
|
children: /* @__PURE__ */ Z(
|
|
447
|
-
|
|
447
|
+
$.Popup,
|
|
448
448
|
{
|
|
449
449
|
...ce,
|
|
450
|
-
...
|
|
450
|
+
...A,
|
|
451
451
|
ref: oe,
|
|
452
452
|
initialFocus: G,
|
|
453
|
-
className:
|
|
453
|
+
className: R(
|
|
454
454
|
n.surfaceMotion,
|
|
455
|
-
n[
|
|
455
|
+
n[s],
|
|
456
456
|
e
|
|
457
457
|
),
|
|
458
458
|
"data-oc-part": "surface-motion",
|
|
459
459
|
"data-oc-component": "modal-content",
|
|
460
|
-
"data-oc-modal-backdrop":
|
|
460
|
+
"data-oc-modal-backdrop": N,
|
|
461
461
|
"data-oc-variant": r,
|
|
462
|
-
"data-oc-size":
|
|
462
|
+
"data-oc-size": s,
|
|
463
463
|
"data-oc-resize": l,
|
|
464
|
-
"data-oc-modal-feedback":
|
|
465
|
-
"data-oc-modal-placement":
|
|
466
|
-
"data-oc-modal-snapping":
|
|
464
|
+
"data-oc-modal-feedback": d === "popup" ? te : void 0,
|
|
465
|
+
"data-oc-modal-placement": d,
|
|
466
|
+
"data-oc-modal-snapping": v || F ? "true" : void 0,
|
|
467
467
|
style: _,
|
|
468
468
|
children: [
|
|
469
|
-
|
|
469
|
+
d === "bottom" ? /* @__PURE__ */ c(
|
|
470
470
|
"div",
|
|
471
471
|
{
|
|
472
472
|
"aria-hidden": "true",
|
|
473
|
-
className:
|
|
473
|
+
className: R(
|
|
474
474
|
n.bottomFill,
|
|
475
|
-
n[
|
|
475
|
+
n[s],
|
|
476
476
|
e
|
|
477
477
|
),
|
|
478
478
|
"data-oc-part": "bottom-fill",
|
|
479
479
|
"data-oc-component": "modal-bottom-fill",
|
|
480
|
-
"data-oc-size":
|
|
481
|
-
style:
|
|
480
|
+
"data-oc-size": s,
|
|
481
|
+
style: j
|
|
482
482
|
}
|
|
483
483
|
) : null,
|
|
484
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ c(
|
|
485
485
|
"div",
|
|
486
486
|
{
|
|
487
|
-
ref:
|
|
488
|
-
className:
|
|
487
|
+
ref: h,
|
|
488
|
+
className: R(
|
|
489
489
|
n.surface,
|
|
490
490
|
n[l],
|
|
491
491
|
e
|
|
492
492
|
),
|
|
493
493
|
"data-oc-part": "surface",
|
|
494
494
|
"data-oc-variant": r,
|
|
495
|
-
"data-oc-size":
|
|
495
|
+
"data-oc-size": s,
|
|
496
496
|
"data-oc-resize": l,
|
|
497
|
-
"data-oc-modal-placement":
|
|
497
|
+
"data-oc-modal-placement": d,
|
|
498
498
|
"data-oc-scrollable": a.scrollState.canScroll ? "true" : "false",
|
|
499
499
|
style: q,
|
|
500
500
|
children: t
|
|
@@ -511,36 +511,36 @@ function Xe({
|
|
|
511
511
|
className: e = "",
|
|
512
512
|
title: t,
|
|
513
513
|
children: r,
|
|
514
|
-
leadingContent:
|
|
514
|
+
leadingContent: s,
|
|
515
515
|
trailingContent: l,
|
|
516
|
-
closeLabel:
|
|
517
|
-
closeButton:
|
|
518
|
-
handle:
|
|
519
|
-
ref:
|
|
520
|
-
...
|
|
516
|
+
closeLabel: b = "닫기",
|
|
517
|
+
closeButton: u = !0,
|
|
518
|
+
handle: y = !0,
|
|
519
|
+
ref: g,
|
|
520
|
+
...k
|
|
521
521
|
}) {
|
|
522
|
-
const
|
|
522
|
+
const f = re("ModalHeader"), { setHeaderNode: p, scrollState: w } = f, i = P(
|
|
523
523
|
(V) => {
|
|
524
|
-
|
|
524
|
+
p(V), pe(g, V);
|
|
525
525
|
},
|
|
526
|
-
[
|
|
527
|
-
),
|
|
526
|
+
[g, p]
|
|
527
|
+
), H = Se(s);
|
|
528
528
|
return /* @__PURE__ */ Z(
|
|
529
529
|
He,
|
|
530
530
|
{
|
|
531
|
-
...
|
|
531
|
+
...k,
|
|
532
532
|
as: "header",
|
|
533
|
-
ref:
|
|
533
|
+
ref: i,
|
|
534
534
|
backdrop: "compact",
|
|
535
|
-
className:
|
|
535
|
+
className: R(n.header, e),
|
|
536
536
|
backColor: "var(--oc-color-theme-background-elevated-normal)",
|
|
537
537
|
frontColor: "transparent",
|
|
538
538
|
"data-oc-part": "header",
|
|
539
539
|
"data-oc-component": "modal-header",
|
|
540
540
|
variant: "strong",
|
|
541
|
-
"data-oc-sticky":
|
|
541
|
+
"data-oc-sticky": w.scrolledFromTop ? "true" : "false",
|
|
542
542
|
children: [
|
|
543
|
-
|
|
543
|
+
y && f.canRenderHandle ? /* @__PURE__ */ c(
|
|
544
544
|
"div",
|
|
545
545
|
{
|
|
546
546
|
"aria-hidden": "true",
|
|
@@ -552,14 +552,14 @@ function Xe({
|
|
|
552
552
|
"div",
|
|
553
553
|
{
|
|
554
554
|
className: n.headerInner,
|
|
555
|
-
"data-oc-has-leading":
|
|
555
|
+
"data-oc-has-leading": H ? "true" : "false",
|
|
556
556
|
"data-oc-part": "header-inner",
|
|
557
557
|
children: [
|
|
558
|
-
|
|
559
|
-
/* @__PURE__ */
|
|
558
|
+
H ? /* @__PURE__ */ c("div", { className: n.headerLeading, "data-oc-part": "header-leading", children: s }) : null,
|
|
559
|
+
/* @__PURE__ */ c("div", { className: n.headerTitle, "data-oc-part": "header-title", children: t ? /* @__PURE__ */ c($.Title, { children: t }) : r }),
|
|
560
560
|
/* @__PURE__ */ Z("div", { className: n.headerTrailing, "data-oc-part": "header-trailing", children: [
|
|
561
561
|
l,
|
|
562
|
-
|
|
562
|
+
u ? /* @__PURE__ */ c(Ne, { label: b }) : null
|
|
563
563
|
] })
|
|
564
564
|
]
|
|
565
565
|
}
|
|
@@ -572,18 +572,18 @@ function Ye({
|
|
|
572
572
|
className: e = "",
|
|
573
573
|
title: t,
|
|
574
574
|
children: r,
|
|
575
|
-
expanded:
|
|
575
|
+
expanded: s,
|
|
576
576
|
defaultExpanded: l = !0,
|
|
577
|
-
onExpandedChange:
|
|
578
|
-
disabled:
|
|
579
|
-
forceMount:
|
|
580
|
-
handle:
|
|
581
|
-
headingLevel:
|
|
582
|
-
indicator:
|
|
583
|
-
titleAsDialogTitle:
|
|
584
|
-
navigationProps:
|
|
585
|
-
panelProps:
|
|
586
|
-
panelContentProps:
|
|
577
|
+
onExpandedChange: b,
|
|
578
|
+
disabled: u = !1,
|
|
579
|
+
forceMount: y = !0,
|
|
580
|
+
handle: g = !0,
|
|
581
|
+
headingLevel: k = 2,
|
|
582
|
+
indicator: f,
|
|
583
|
+
titleAsDialogTitle: p = !0,
|
|
584
|
+
navigationProps: w,
|
|
585
|
+
panelProps: i,
|
|
586
|
+
panelContentProps: H,
|
|
587
587
|
ref: V,
|
|
588
588
|
style: O,
|
|
589
589
|
...q
|
|
@@ -591,52 +591,52 @@ function Ye({
|
|
|
591
591
|
const ce = re("ModalNavigationSection"), {
|
|
592
592
|
canRenderHandle: a,
|
|
593
593
|
notifyPopupSnapLayoutChange: K,
|
|
594
|
-
placement:
|
|
595
|
-
} = ce, { height: J, setNode:
|
|
596
|
-
value:
|
|
594
|
+
placement: B
|
|
595
|
+
} = ce, { height: J, setNode: d } = ue(), D = Me(), [h, ee] = ke({
|
|
596
|
+
value: s,
|
|
597
597
|
defaultValue: l,
|
|
598
|
-
onChange:
|
|
598
|
+
onChange: b
|
|
599
599
|
}), [z, Q] = T(
|
|
600
|
-
|
|
601
|
-
),
|
|
602
|
-
className:
|
|
600
|
+
h ? "open" : "closed"
|
|
601
|
+
), S = `h${Ge(k) ? k : 2}`, {
|
|
602
|
+
className: C = "",
|
|
603
603
|
id: te,
|
|
604
604
|
onClick: W,
|
|
605
605
|
...U
|
|
606
|
-
} =
|
|
607
|
-
className:
|
|
608
|
-
id:
|
|
609
|
-
role:
|
|
610
|
-
...
|
|
611
|
-
} =
|
|
606
|
+
} = w ?? {}, {
|
|
607
|
+
className: F = "",
|
|
608
|
+
id: N,
|
|
609
|
+
role: I,
|
|
610
|
+
...x
|
|
611
|
+
} = i ?? {}, { className: M = "", ...X } = H ?? {}, v = te ?? `${D}-navigation`, E = N ?? `${D}-panel`, A = `${D}-dialog-title`, oe = Se(t), j = g && a, _ = J > 0 ? {
|
|
612
612
|
...O,
|
|
613
613
|
"--oc-modal-navigation-block-size": `${J}px`
|
|
614
|
-
} : O, ae =
|
|
614
|
+
} : O, ae = P(
|
|
615
615
|
(G) => {
|
|
616
|
-
Q(G),
|
|
616
|
+
Q(G), B === "popup" && K();
|
|
617
617
|
},
|
|
618
|
-
[K,
|
|
618
|
+
[K, B]
|
|
619
619
|
);
|
|
620
620
|
return /* @__PURE__ */ Z(
|
|
621
621
|
"section",
|
|
622
622
|
{
|
|
623
623
|
ref: V,
|
|
624
|
-
className:
|
|
624
|
+
className: R(n.navigationSection, e),
|
|
625
625
|
style: _,
|
|
626
626
|
...q,
|
|
627
627
|
"data-oc-component": "modal-navigation-section",
|
|
628
628
|
"data-oc-motion-state": z,
|
|
629
|
-
"data-oc-state":
|
|
629
|
+
"data-oc-state": h ? "open" : "closed",
|
|
630
630
|
children: [
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
p && oe ? /* @__PURE__ */ c(
|
|
632
|
+
$.Title,
|
|
633
633
|
{
|
|
634
634
|
className: n.navigationDialogTitle,
|
|
635
|
-
id:
|
|
635
|
+
id: A,
|
|
636
636
|
children: t
|
|
637
637
|
}
|
|
638
638
|
) : null,
|
|
639
|
-
|
|
639
|
+
j ? /* @__PURE__ */ c(
|
|
640
640
|
"div",
|
|
641
641
|
{
|
|
642
642
|
"aria-hidden": "true",
|
|
@@ -644,51 +644,51 @@ function Ye({
|
|
|
644
644
|
"data-oc-part": "handle"
|
|
645
645
|
}
|
|
646
646
|
) : null,
|
|
647
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ c(S, { className: n.navigationHeading, "data-oc-part": "heading", children: /* @__PURE__ */ Z(
|
|
648
648
|
"button",
|
|
649
649
|
{
|
|
650
650
|
...U,
|
|
651
|
-
ref:
|
|
652
|
-
id:
|
|
653
|
-
className:
|
|
651
|
+
ref: d,
|
|
652
|
+
id: v,
|
|
653
|
+
className: R(n.navigation, C),
|
|
654
654
|
type: "button",
|
|
655
|
-
disabled:
|
|
656
|
-
"aria-disabled":
|
|
657
|
-
"aria-expanded":
|
|
658
|
-
"aria-controls":
|
|
655
|
+
disabled: u,
|
|
656
|
+
"aria-disabled": u ? "true" : U["aria-disabled"],
|
|
657
|
+
"aria-expanded": h,
|
|
658
|
+
"aria-controls": E,
|
|
659
659
|
onClick: (G) => {
|
|
660
|
-
W?.(G), !(G.defaultPrevented ||
|
|
660
|
+
W?.(G), !(G.defaultPrevented || u) && ee(!h);
|
|
661
661
|
},
|
|
662
662
|
"data-oc-component": "modal-navigation",
|
|
663
663
|
"data-oc-part": "navigation",
|
|
664
|
-
"data-oc-state":
|
|
664
|
+
"data-oc-state": h ? "open" : "closed",
|
|
665
665
|
children: [
|
|
666
|
-
/* @__PURE__ */
|
|
667
|
-
|
|
666
|
+
/* @__PURE__ */ c("span", { className: n.navigationTitle, "data-oc-part": "title", children: t }),
|
|
667
|
+
f === void 0 ? /* @__PURE__ */ c(
|
|
668
668
|
Fe,
|
|
669
669
|
{
|
|
670
670
|
className: n.navigationIndicator,
|
|
671
|
-
open:
|
|
671
|
+
open: h
|
|
672
672
|
}
|
|
673
|
-
) :
|
|
673
|
+
) : f ? /* @__PURE__ */ c(
|
|
674
674
|
"span",
|
|
675
675
|
{
|
|
676
676
|
className: n.navigationIndicator,
|
|
677
677
|
"data-oc-part": "indicator",
|
|
678
|
-
"data-oc-state":
|
|
679
|
-
children: xe(
|
|
678
|
+
"data-oc-state": h ? "open" : "closed",
|
|
679
|
+
children: /* @__PURE__ */ c("span", { "data-oc-part": "indicator-frame", children: xe(f) })
|
|
680
680
|
}
|
|
681
681
|
) : null,
|
|
682
|
-
|
|
682
|
+
u ? null : /* @__PURE__ */ c(we, { variant: "light" })
|
|
683
683
|
]
|
|
684
684
|
}
|
|
685
685
|
) }),
|
|
686
|
-
/* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ c(
|
|
687
687
|
Re,
|
|
688
688
|
{
|
|
689
|
-
className:
|
|
690
|
-
open:
|
|
691
|
-
forceMount:
|
|
689
|
+
className: R(n.navigationPanel, F),
|
|
690
|
+
open: h,
|
|
691
|
+
forceMount: y,
|
|
692
692
|
intent: "expand",
|
|
693
693
|
measureBlockSize: "rendered",
|
|
694
694
|
onMotionStateChange: ae,
|
|
@@ -696,27 +696,27 @@ function Ye({
|
|
|
696
696
|
className: n.navigationPanelFrame,
|
|
697
697
|
"data-oc-part": "panel-inner"
|
|
698
698
|
},
|
|
699
|
-
...
|
|
700
|
-
"aria-hidden":
|
|
701
|
-
"aria-labelledby":
|
|
702
|
-
id:
|
|
703
|
-
inert:
|
|
704
|
-
role:
|
|
699
|
+
...x,
|
|
700
|
+
"aria-hidden": h ? void 0 : !0,
|
|
701
|
+
"aria-labelledby": v,
|
|
702
|
+
id: E,
|
|
703
|
+
inert: h ? void 0 : !0,
|
|
704
|
+
role: I ?? "region",
|
|
705
705
|
"data-oc-component": "modal-navigation-panel",
|
|
706
|
-
"data-oc-state":
|
|
707
|
-
children: /* @__PURE__ */
|
|
706
|
+
"data-oc-state": h ? "open" : "closed",
|
|
707
|
+
children: /* @__PURE__ */ c(
|
|
708
708
|
ve,
|
|
709
709
|
{
|
|
710
710
|
className: n.navigationPanelScroll,
|
|
711
711
|
"data-oc-component": "modal-navigation-panel-scroll-area",
|
|
712
712
|
"data-oc-part": "panel-scroll-area",
|
|
713
|
-
children: /* @__PURE__ */
|
|
713
|
+
children: /* @__PURE__ */ c(
|
|
714
714
|
ye,
|
|
715
715
|
{
|
|
716
716
|
...X,
|
|
717
|
-
className:
|
|
717
|
+
className: R(
|
|
718
718
|
n.navigationPanelInner,
|
|
719
|
-
|
|
719
|
+
M
|
|
720
720
|
),
|
|
721
721
|
"data-oc-component": "modal-navigation-panel-content",
|
|
722
722
|
children: r
|
|
@@ -733,51 +733,53 @@ function Ye({
|
|
|
733
733
|
function Ze({
|
|
734
734
|
className: e = "",
|
|
735
735
|
children: t,
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
736
|
+
layout: r = "content",
|
|
737
|
+
containerClassName: s = "",
|
|
738
|
+
containerProps: l,
|
|
739
|
+
ref: b,
|
|
740
|
+
...u
|
|
740
741
|
}) {
|
|
741
|
-
const
|
|
742
|
+
const y = re("ModalBody"), { bodyNode: g, setBodyNode: k, setScrollState: f } = y, p = P(
|
|
742
743
|
(i) => {
|
|
743
|
-
|
|
744
|
+
f(Ee(i));
|
|
744
745
|
},
|
|
745
|
-
[
|
|
746
|
-
),
|
|
746
|
+
[f]
|
|
747
|
+
), w = P(
|
|
747
748
|
(i) => {
|
|
748
|
-
|
|
749
|
+
k(i), pe(b, i), p(i);
|
|
749
750
|
},
|
|
750
|
-
[
|
|
751
|
+
[b, k, p]
|
|
751
752
|
);
|
|
752
753
|
return ne(() => {
|
|
753
|
-
const i =
|
|
754
|
-
if (!i || (
|
|
755
|
-
const
|
|
756
|
-
return
|
|
757
|
-
}, [
|
|
754
|
+
const i = g;
|
|
755
|
+
if (!i || (p(i), typeof ResizeObserver > "u")) return;
|
|
756
|
+
const H = new ResizeObserver(() => p(i));
|
|
757
|
+
return H.observe(i), i.firstElementChild && H.observe(i.firstElementChild), () => H.disconnect();
|
|
758
|
+
}, [g, p]), /* @__PURE__ */ c(
|
|
758
759
|
ve,
|
|
759
760
|
{
|
|
760
|
-
...
|
|
761
|
-
className:
|
|
761
|
+
...u,
|
|
762
|
+
className: R(n.body, e),
|
|
762
763
|
"data-oc-part": "body",
|
|
763
764
|
"data-oc-component": "modal-body",
|
|
764
|
-
children: /* @__PURE__ */
|
|
765
|
+
children: /* @__PURE__ */ c(
|
|
765
766
|
ye,
|
|
766
767
|
{
|
|
767
|
-
ref:
|
|
768
|
+
ref: w,
|
|
768
769
|
className: n.bodyContainer,
|
|
769
770
|
"data-oc-part": "body-container",
|
|
770
771
|
"data-oc-component": "modal-body-container",
|
|
771
772
|
onScroll: (i) => {
|
|
772
|
-
|
|
773
|
+
l?.onScroll?.(i), p(i.currentTarget);
|
|
773
774
|
},
|
|
774
|
-
children: /* @__PURE__ */
|
|
775
|
+
children: /* @__PURE__ */ c(
|
|
775
776
|
"section",
|
|
776
777
|
{
|
|
777
|
-
...
|
|
778
|
-
className:
|
|
778
|
+
...l,
|
|
779
|
+
className: R(n.bodyContent, s),
|
|
779
780
|
"data-oc-part": "body-content",
|
|
780
781
|
"data-oc-component": "modal-body-content",
|
|
782
|
+
"data-oc-layout": r,
|
|
781
783
|
children: t
|
|
782
784
|
}
|
|
783
785
|
)
|
|
@@ -790,51 +792,51 @@ function et({
|
|
|
790
792
|
className: e = "",
|
|
791
793
|
children: t,
|
|
792
794
|
background: r = "auto",
|
|
793
|
-
ref:
|
|
795
|
+
ref: s,
|
|
794
796
|
...l
|
|
795
797
|
}) {
|
|
796
|
-
const
|
|
797
|
-
(
|
|
798
|
-
|
|
798
|
+
const b = re("ModalFooter"), { scrollState: u, setFooterNode: y } = b, g = P(
|
|
799
|
+
(p) => {
|
|
800
|
+
y(p), pe(s, p);
|
|
799
801
|
},
|
|
800
|
-
[
|
|
801
|
-
),
|
|
802
|
-
return /* @__PURE__ */
|
|
802
|
+
[s, y]
|
|
803
|
+
), k = r === !0 || r === "auto" && u.canScroll && !u.scrolledToBottom;
|
|
804
|
+
return /* @__PURE__ */ c(
|
|
803
805
|
"footer",
|
|
804
806
|
{
|
|
805
807
|
...l,
|
|
806
|
-
ref:
|
|
807
|
-
className:
|
|
808
|
+
ref: g,
|
|
809
|
+
className: R(n.footer, e),
|
|
808
810
|
"data-oc-part": "footer",
|
|
809
811
|
"data-oc-component": "modal-footer",
|
|
810
|
-
"data-oc-background":
|
|
812
|
+
"data-oc-background": k ? "true" : "false",
|
|
811
813
|
children: t
|
|
812
814
|
}
|
|
813
815
|
);
|
|
814
816
|
}
|
|
815
817
|
function Ne({
|
|
816
818
|
className: e = "",
|
|
817
|
-
children: t = /* @__PURE__ */
|
|
819
|
+
children: t = /* @__PURE__ */ c(Pe, {}),
|
|
818
820
|
label: r = "닫기",
|
|
819
|
-
size:
|
|
821
|
+
size: s = 24,
|
|
820
822
|
disabled: l,
|
|
821
|
-
onClick:
|
|
822
|
-
...
|
|
823
|
+
onClick: b,
|
|
824
|
+
...u
|
|
823
825
|
}) {
|
|
824
|
-
const
|
|
825
|
-
return /* @__PURE__ */
|
|
826
|
+
const y = re("ModalClose");
|
|
827
|
+
return /* @__PURE__ */ c(
|
|
826
828
|
Te,
|
|
827
829
|
{
|
|
828
|
-
...
|
|
829
|
-
className:
|
|
830
|
-
"aria-label":
|
|
830
|
+
...u,
|
|
831
|
+
className: R(n.close, e),
|
|
832
|
+
"aria-label": u["aria-label"] ?? r,
|
|
831
833
|
"data-oc-part": "close",
|
|
832
834
|
"data-oc-component": "modal-close",
|
|
833
835
|
disabled: l,
|
|
834
|
-
onClick: (
|
|
835
|
-
|
|
836
|
+
onClick: (g) => {
|
|
837
|
+
b?.(g), !g.defaultPrevented && !l && y.requestClose({ reason: "close-button" });
|
|
836
838
|
},
|
|
837
|
-
size:
|
|
839
|
+
size: s,
|
|
838
840
|
children: t
|
|
839
841
|
}
|
|
840
842
|
);
|