@orioncactuscorp/ui 1.9.2 → 1.11.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/README.md +119 -54
- package/dist/components/Accordion/Accordion.css +1 -1
- package/dist/components/Accordion/Accordion.js +169 -177
- package/dist/components/ActionArea/ActionAreaLayout.js +20 -24
- package/dist/components/Cell/Cell.css +1 -1
- package/dist/components/Cell/Cell.js +57 -58
- package/dist/components/CheckMark/CheckMark.css +1 -1
- package/dist/components/Checkbox/Checkbox.css +1 -1
- package/dist/components/Checkbox/Checkbox.js +50 -51
- package/dist/components/Menu/Menu.css +1 -1
- package/dist/components/Menu/Menu.module.scss.js +20 -22
- package/dist/components/Modal/Modal.css +1 -1
- package/dist/components/Modal/Modal.js +585 -575
- package/dist/components/Modal/bottomSheetGeometry.js +46 -33
- package/dist/components/Modal/modalScrollArbitration.js +71 -49
- package/dist/components/Modal/snapPoints.js +42 -38
- package/dist/components/Modal/useModalContentBlockTransition.js +49 -44
- package/dist/components/Modal/useModalDrag.js +937 -854
- package/dist/components/Radio/Radio.css +1 -1
- package/dist/components/ScrollArea/ScrollArea.js +197 -200
- package/dist/components/Select/Select.js +31 -34
- package/dist/components/Switch/Switch.css +1 -1
- package/dist/components/Tabs/Tabs.css +1 -0
- package/dist/components/Tabs/Tabs.js +208 -0
- package/dist/components/Tabs/Tabs.module.scss.js +27 -0
- package/dist/components/Tabs.d.ts +6 -0
- package/dist/components/Tabs.js +8 -0
- package/dist/components/TextArea/TextArea.js +57 -58
- package/dist/components/TextInput/TextInput.js +30 -33
- package/dist/components/Tooltip/Tooltip.css +1 -1
- package/dist/foundations/color.theme.dark.css +1 -1
- package/dist/foundations/color.theme.light.css +1 -1
- package/dist/foundations/focus.css +1 -0
- package/dist/foundations/reset.css +1 -1
- package/dist/foundations.css +4 -3
- package/dist/index.js +69 -64
- package/dist/react/motion.js +31 -35
- package/dist/reset.css +1 -1
- package/dist/styles.css +14 -12
- package/dist/ui/src/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/ui/src/components/ActionArea/ActionAreaLayout.d.ts.map +1 -1
- package/dist/ui/src/components/Cell/Cell.d.ts.map +1 -1
- package/dist/ui/src/components/CheckMark/types.d.ts +10 -0
- package/dist/ui/src/components/CheckMark/types.d.ts.map +1 -1
- package/dist/ui/src/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/ui/src/components/Checkbox/types.d.ts +16 -0
- package/dist/ui/src/components/Checkbox/types.d.ts.map +1 -1
- 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/bottomSheetGeometry.d.ts +13 -0
- package/dist/ui/src/components/Modal/bottomSheetGeometry.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/modalScrollArbitration.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/snapPoints.d.ts +3 -1
- package/dist/ui/src/components/Modal/snapPoints.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/types.d.ts +8 -0
- package/dist/ui/src/components/Modal/types.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/useModalContentBlockTransition.d.ts.map +1 -1
- package/dist/ui/src/components/Modal/useModalDrag.d.ts +27 -10
- package/dist/ui/src/components/Modal/useModalDrag.d.ts.map +1 -1
- package/dist/ui/src/components/Radio/types.d.ts +16 -0
- package/dist/ui/src/components/Radio/types.d.ts.map +1 -1
- package/dist/ui/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/ui/src/components/Select/Select.d.ts.map +1 -1
- package/dist/ui/src/components/Switch/types.d.ts +10 -0
- package/dist/ui/src/components/Switch/types.d.ts.map +1 -1
- package/dist/ui/src/components/Tabs/Tabs.d.ts +7 -0
- package/dist/ui/src/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/ui/src/components/Tabs/index.d.ts +3 -0
- package/dist/ui/src/components/Tabs/index.d.ts.map +1 -0
- package/dist/ui/src/components/Tabs/types.d.ts +26 -0
- package/dist/ui/src/components/Tabs/types.d.ts.map +1 -0
- package/dist/ui/src/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/ui/src/components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/ui/src/index.d.ts +2 -0
- package/dist/ui/src/index.d.ts.map +1 -1
- package/dist/ui/src/react/motion/index.d.ts.map +1 -1
- package/dist/ui/src/utils/mergeRefs.d.ts +13 -0
- package/dist/ui/src/utils/mergeRefs.d.ts.map +1 -0
- package/dist/utils/mergeRefs.js +24 -0
- package/dist/vscode/oc-ui-vars.css +13 -0
- package/docs/editor-setup.md +42 -0
- package/docs/motion.md +665 -0
- package/docs/responsive-foundation-profile.md +230 -0
- package/docs/scss-helpers.md +189 -0
- package/docs/selector-contract.md +260 -0
- package/docs/spring.md +382 -0
- package/docs/stability.md +62 -0
- package/docs/tokens.md +559 -0
- package/package.json +9 -4
- package/src/scss/foundations/color-theme.test.ts +14 -0
- package/src/scss/foundations/color.theme.dark.scss +1 -0
- package/src/scss/foundations/color.theme.light.scss +1 -0
- package/src/scss/foundations/focus.scss +4 -0
- package/src/scss/foundations/focus.test.ts +48 -0
- package/src/scss/foundations/reset.scss +9 -4
- package/src/scss/foundations/reset.test.ts +32 -0
- package/src/scss/index.scss +2 -0
- package/src/scss/mixins/_focus.scss +11 -0
- package/src/scss/mixins/_focus.test.ts +58 -0
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useCallback as k,
|
|
4
|
-
import { Dialog as
|
|
5
|
-
import
|
|
6
|
-
import { MotionExpand as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { ScrollArea as
|
|
11
|
-
import { DisclosureIndicator as
|
|
12
|
-
import { normalizeSlotIcon as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
|
|
2
|
+
import { jsx as d, jsxs as ae } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback as k, useMemo as pe, useEffect as ne, useRef as j, useState as v, useLayoutEffect as ye, useId as ht } from "react";
|
|
4
|
+
import { Dialog as $ } from "@base-ui-components/react/dialog";
|
|
5
|
+
import gt from "@orioncactuscorp/icons/orioncactus/CloseThick";
|
|
6
|
+
import { MotionExpand as vt } from "../../react/motion.js";
|
|
7
|
+
import bt from "../Background/Background.js";
|
|
8
|
+
import St from "../BackgroundIconButton/BackgroundIconButton.js";
|
|
9
|
+
import yt from "../Interaction/Interaction.js";
|
|
10
|
+
import { ScrollArea as Ue, ScrollAreaContainer as _e } from "../ScrollArea/ScrollArea.js";
|
|
11
|
+
import { DisclosureIndicator as kt } from "../internal/DisclosureIndicator.js";
|
|
12
|
+
import { normalizeSlotIcon as Nt } from "../internal/slot.js";
|
|
13
|
+
import { mergeRefs as Fe } from "../../utils/mergeRefs.js";
|
|
14
|
+
import { useModalContext as me, ModalProvider as Ct } from "./contexts.js";
|
|
15
|
+
import { useControllableState as Ge } from "./useControllableState.js";
|
|
16
|
+
import { useModalContentBlockTransition as wt } from "./useModalContentBlockTransition.js";
|
|
17
|
+
import { useMeasuredElement as Pe } from "./useElementSize.js";
|
|
18
|
+
import { useModalDrag as Ht } from "./useModalDrag.js";
|
|
19
|
+
import { useModalPlacement as Mt } from "./useModalPlacement.js";
|
|
20
|
+
import { useModalStackDepth as xt } from "./useModalStackDepth.js";
|
|
21
|
+
import { resolveContentSizedBottomSheetHeight as Tt } from "./bottomSheetGeometry.js";
|
|
22
|
+
import { getModalScrollState as Je } from "./modalScrollArbitration.js";
|
|
23
|
+
import { resolveModalSnapMetrics as Rt, resolveModalPopupSnapPositions as Bt } from "./snapPoints.js";
|
|
24
|
+
import c from "./Modal.module.scss.js";
|
|
25
|
+
function R(...e) {
|
|
25
26
|
return e.filter(Boolean).join(" ");
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function Qe(e) {
|
|
28
29
|
return e != null && e !== !1 && e !== "";
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
32
|
-
}
|
|
33
|
-
function kt(e) {
|
|
31
|
+
function Pt(e) {
|
|
34
32
|
if (!e) return;
|
|
35
33
|
const t = Object.entries(e).filter(
|
|
36
34
|
([n]) => n.startsWith("--")
|
|
@@ -38,38 +36,38 @@ function kt(e) {
|
|
|
38
36
|
if (t.length !== 0)
|
|
39
37
|
return Object.fromEntries(t);
|
|
40
38
|
}
|
|
41
|
-
function
|
|
39
|
+
function Oe() {
|
|
42
40
|
return typeof window > "u" ? 0 : window.visualViewport?.height ?? window.innerHeight;
|
|
43
41
|
}
|
|
44
|
-
function
|
|
42
|
+
function Ft(e) {
|
|
45
43
|
const t = e.trim();
|
|
46
44
|
if (!t.endsWith("px")) return;
|
|
47
45
|
const n = Number.parseFloat(t);
|
|
48
46
|
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
49
47
|
}
|
|
50
|
-
function
|
|
48
|
+
function Dt(e) {
|
|
51
49
|
if (!(!e || typeof window > "u"))
|
|
52
|
-
return
|
|
50
|
+
return Ft(window.getComputedStyle(e).maxHeight);
|
|
53
51
|
}
|
|
54
|
-
function
|
|
52
|
+
function Et({
|
|
55
53
|
contentTransition: e,
|
|
56
54
|
placement: t,
|
|
57
55
|
resize: n
|
|
58
56
|
}) {
|
|
59
57
|
return e !== "auto" || n !== "content" || t === "full" ? "none" : t === "bottom" ? "sheet" : "surface";
|
|
60
58
|
}
|
|
61
|
-
function
|
|
59
|
+
function qe(e, t) {
|
|
62
60
|
return e.resolvedBackdrop === t ? e : {
|
|
63
61
|
resolvedBackdrop: t,
|
|
64
62
|
exiting: t === "hidden" && e.resolvedBackdrop !== "hidden"
|
|
65
63
|
};
|
|
66
64
|
}
|
|
67
|
-
function
|
|
68
|
-
const [t, n] =
|
|
69
|
-
return
|
|
65
|
+
function At(e) {
|
|
66
|
+
const [t, n] = v(Oe);
|
|
67
|
+
return ye(() => {
|
|
70
68
|
if (!e || typeof window > "u") return;
|
|
71
69
|
const a = () => {
|
|
72
|
-
n(
|
|
70
|
+
n(Oe());
|
|
73
71
|
};
|
|
74
72
|
return a(), window.addEventListener("resize", a), window.visualViewport?.addEventListener("resize", a), () => {
|
|
75
73
|
window.removeEventListener("resize", a), window.visualViewport?.removeEventListener(
|
|
@@ -79,50 +77,50 @@ function Mt(e) {
|
|
|
79
77
|
};
|
|
80
78
|
}, [e]), t;
|
|
81
79
|
}
|
|
82
|
-
function
|
|
80
|
+
function It(e) {
|
|
83
81
|
const t = e.trim();
|
|
84
82
|
return t.endsWith("ms") ? Number.parseFloat(t) || 0 : t.endsWith("s") ? (Number.parseFloat(t) || 0) * 1e3 : 0;
|
|
85
83
|
}
|
|
86
|
-
function
|
|
87
|
-
return e.split(",").reduce((t, n) => Math.max(t,
|
|
84
|
+
function we(e) {
|
|
85
|
+
return e.split(",").reduce((t, n) => Math.max(t, It(n)), 0);
|
|
88
86
|
}
|
|
89
|
-
function
|
|
90
|
-
const t = window.getComputedStyle(e), n =
|
|
87
|
+
function Vt(e) {
|
|
88
|
+
const t = window.getComputedStyle(e), n = we(t.animationDuration), a = we(t.animationDelay);
|
|
91
89
|
return n + a + 250;
|
|
92
90
|
}
|
|
93
|
-
function
|
|
94
|
-
const t = window.getComputedStyle(e), n =
|
|
91
|
+
function Lt(e) {
|
|
92
|
+
const t = window.getComputedStyle(e), n = we(t.transitionDuration), a = we(t.transitionDelay);
|
|
95
93
|
return n + a + 250;
|
|
96
94
|
}
|
|
97
|
-
function
|
|
95
|
+
function zt({
|
|
98
96
|
defaultSnapPosition: e,
|
|
99
97
|
node: t,
|
|
100
98
|
snapPositions: n
|
|
101
99
|
}) {
|
|
102
100
|
if (!n?.length) return;
|
|
103
|
-
const a =
|
|
101
|
+
const a = Bt({
|
|
104
102
|
defaultSnapPosition: e,
|
|
105
103
|
snapPositions: n,
|
|
106
104
|
surfaceMotion: t
|
|
107
105
|
});
|
|
108
106
|
if (!a) return;
|
|
109
|
-
const
|
|
107
|
+
const l = a.defaultTarget;
|
|
110
108
|
t.style.setProperty(
|
|
111
109
|
"--oc-modal-translate-x",
|
|
112
|
-
|
|
110
|
+
l.settledTranslate?.x ?? `${l.x}px`
|
|
113
111
|
), t.style.setProperty(
|
|
114
112
|
"--oc-modal-translate-y",
|
|
115
|
-
|
|
113
|
+
l.settledTranslate?.y ?? `${l.y}px`
|
|
116
114
|
);
|
|
117
115
|
}
|
|
118
|
-
function
|
|
116
|
+
function jt(e) {
|
|
119
117
|
if (e && typeof e == "object" && "reason" in e && typeof e.reason == "string")
|
|
120
118
|
return e.reason;
|
|
121
119
|
}
|
|
122
|
-
function
|
|
120
|
+
function Ce(e) {
|
|
123
121
|
e && typeof e == "object" && "cancel" in e && typeof e.cancel == "function" && e.cancel();
|
|
124
122
|
}
|
|
125
|
-
function
|
|
123
|
+
function $t(e, t) {
|
|
126
124
|
switch (t) {
|
|
127
125
|
case "drag-dismiss":
|
|
128
126
|
return e?.drag ?? "auto";
|
|
@@ -140,13 +138,13 @@ function Bt(e, t) {
|
|
|
140
138
|
return e?.programmatic ?? "auto";
|
|
141
139
|
}
|
|
142
140
|
}
|
|
143
|
-
function
|
|
141
|
+
function Ot(e, t) {
|
|
144
142
|
return t > 0 && (e === "drag-dismiss" || e === "backdrop-press" || e === "outside-press");
|
|
145
143
|
}
|
|
146
|
-
function
|
|
144
|
+
function Ke(e, t) {
|
|
147
145
|
return t && (e === "backdrop-press" || e === "outside-press");
|
|
148
146
|
}
|
|
149
|
-
function
|
|
147
|
+
function qt({
|
|
150
148
|
backdrop: e,
|
|
151
149
|
canSnapPopup: t,
|
|
152
150
|
placement: n,
|
|
@@ -154,8 +152,8 @@ function Dt({
|
|
|
154
152
|
}) {
|
|
155
153
|
return e !== "auto" ? e : n === "bottom" && a === "peeked" || t ? "hidden" : "visible";
|
|
156
154
|
}
|
|
157
|
-
function
|
|
158
|
-
switch (
|
|
155
|
+
function Kt(e) {
|
|
156
|
+
switch (jt(e)) {
|
|
159
157
|
case "close-press":
|
|
160
158
|
return "close-button";
|
|
161
159
|
case "outside-press":
|
|
@@ -170,484 +168,502 @@ function Et(e) {
|
|
|
170
168
|
return "programmatic";
|
|
171
169
|
}
|
|
172
170
|
}
|
|
173
|
-
function
|
|
171
|
+
function Wt(e) {
|
|
174
172
|
return e >= 2 && e <= 6;
|
|
175
173
|
}
|
|
176
|
-
function
|
|
174
|
+
function We({
|
|
177
175
|
children: e,
|
|
178
176
|
open: t,
|
|
179
177
|
defaultOpen: n,
|
|
180
178
|
modal: a = !0,
|
|
181
|
-
onOpenChange:
|
|
182
|
-
canCloseAttempt:
|
|
183
|
-
onCloseAttempt:
|
|
184
|
-
presentationState:
|
|
185
|
-
defaultPresentationState:
|
|
186
|
-
onPresentationStateChange:
|
|
187
|
-
disablePointerDismissal:
|
|
188
|
-
navigationDepth:
|
|
189
|
-
dismissBehavior:
|
|
179
|
+
onOpenChange: l,
|
|
180
|
+
canCloseAttempt: N,
|
|
181
|
+
onCloseAttempt: m,
|
|
182
|
+
presentationState: C,
|
|
183
|
+
defaultPresentationState: f = "visible",
|
|
184
|
+
onPresentationStateChange: M,
|
|
185
|
+
disablePointerDismissal: h,
|
|
186
|
+
navigationDepth: S = 0,
|
|
187
|
+
dismissBehavior: x
|
|
190
188
|
}) {
|
|
191
|
-
const
|
|
189
|
+
const p = t !== void 0, [T, G] = v(
|
|
192
190
|
n ?? !1
|
|
193
|
-
),
|
|
191
|
+
), O = p ? t : T, [J, fe] = v("bottom"), [A, re] = v(!1), [o, q] = v(!1), [F, K] = v(!1), [r, Q] = v(!1), [X, Y] = v(0), [W, Z] = v(0), [ie, he] = v(null), [ee, te] = v({
|
|
194
192
|
canScroll: !1,
|
|
195
193
|
scrolledFromTop: !1,
|
|
196
194
|
scrolledToBottom: !0
|
|
197
|
-
}), [b,
|
|
198
|
-
value:
|
|
199
|
-
defaultValue:
|
|
200
|
-
onChange:
|
|
201
|
-
}),
|
|
202
|
-
(
|
|
203
|
-
|
|
195
|
+
}), [b, y] = Ge({
|
|
196
|
+
value: C,
|
|
197
|
+
defaultValue: f,
|
|
198
|
+
onChange: M
|
|
199
|
+
}), B = Pe(), U = Pe(), I = Math.max(0, S), D = k(
|
|
200
|
+
(s, g) => {
|
|
201
|
+
p || G(s), l?.(s, g);
|
|
204
202
|
},
|
|
205
|
-
[
|
|
206
|
-
),
|
|
207
|
-
(
|
|
208
|
-
[
|
|
209
|
-
),
|
|
210
|
-
(
|
|
211
|
-
|
|
203
|
+
[l, p]
|
|
204
|
+
), w = k(
|
|
205
|
+
(s = { reason: "programmatic" }) => N?.(s) !== !1,
|
|
206
|
+
[N]
|
|
207
|
+
), u = k(
|
|
208
|
+
(s = { reason: "programmatic" }) => {
|
|
209
|
+
Y((g) => g + 1);
|
|
212
210
|
},
|
|
213
211
|
[]
|
|
214
|
-
),
|
|
215
|
-
|
|
216
|
-
}, []),
|
|
217
|
-
(
|
|
218
|
-
if (
|
|
212
|
+
), V = k(() => {
|
|
213
|
+
Z((s) => s + 1);
|
|
214
|
+
}, []), L = k(
|
|
215
|
+
(s = { reason: "programmatic" }) => {
|
|
216
|
+
if (Ke(s.reason, F))
|
|
219
217
|
return !1;
|
|
220
|
-
const
|
|
221
|
-
return
|
|
218
|
+
const g = $t(x, s.reason);
|
|
219
|
+
return g === "allow" ? !0 : g === "block" ? !1 : !Ot(s.reason, I);
|
|
222
220
|
},
|
|
223
|
-
[
|
|
224
|
-
),
|
|
225
|
-
(
|
|
226
|
-
const { commit:
|
|
227
|
-
return !
|
|
221
|
+
[F, x, I]
|
|
222
|
+
), P = k(
|
|
223
|
+
(s = { reason: "programmatic" }, g = {}) => {
|
|
224
|
+
const { commit: ce = !0, skipAttempt: se = !1 } = g;
|
|
225
|
+
return !se && Ke(s.reason, F) ? (Ce(s.eventDetails), !1) : !se && !L(s) || !se && !w(s) || !se && m?.(s) === !1 ? (Ce(s.eventDetails), u(s), !1) : (ce && D(!1, s.eventDetails), !0);
|
|
228
226
|
},
|
|
229
227
|
[
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
228
|
+
w,
|
|
229
|
+
F,
|
|
230
|
+
L,
|
|
231
|
+
D,
|
|
232
|
+
u,
|
|
233
|
+
m
|
|
236
234
|
]
|
|
237
|
-
),
|
|
238
|
-
(
|
|
239
|
-
if (
|
|
240
|
-
|
|
241
|
-
reason:
|
|
242
|
-
eventDetails:
|
|
235
|
+
), oe = k(
|
|
236
|
+
(s, g) => {
|
|
237
|
+
if (s && b === "peeked" && y("visible"), !s) {
|
|
238
|
+
P({
|
|
239
|
+
reason: Kt(g),
|
|
240
|
+
eventDetails: g
|
|
243
241
|
});
|
|
244
242
|
return;
|
|
245
243
|
}
|
|
246
|
-
|
|
244
|
+
D(s, g);
|
|
247
245
|
},
|
|
248
|
-
[
|
|
249
|
-
),
|
|
246
|
+
[D, b, P, y]
|
|
247
|
+
), z = b === "visible" && !r ? a : !1, ge = h || J === "bottom" && (A || r), _ = pe(
|
|
250
248
|
() => ({
|
|
251
|
-
open:
|
|
252
|
-
placement:
|
|
253
|
-
setPlacement:
|
|
249
|
+
open: O,
|
|
250
|
+
placement: J,
|
|
251
|
+
setPlacement: fe,
|
|
254
252
|
presentationState: b,
|
|
255
|
-
setPresentationState:
|
|
256
|
-
requestClose:
|
|
257
|
-
canDismissByBehavior:
|
|
258
|
-
canCloseAttempt:
|
|
259
|
-
closeAttemptFeedbackKey:
|
|
260
|
-
notifyCloseAttemptRejected:
|
|
261
|
-
disablePointerDismissal:
|
|
262
|
-
setBackdropDismissalDisabled:
|
|
263
|
-
setBackgroundInteractive:
|
|
264
|
-
canPeek:
|
|
265
|
-
setCanPeek:
|
|
266
|
-
canRenderHandle:
|
|
267
|
-
setCanRenderHandle:
|
|
268
|
-
popupSnapLayoutVersion:
|
|
269
|
-
notifyPopupSnapLayoutChange:
|
|
270
|
-
headerHeight:
|
|
271
|
-
footerHeight:
|
|
272
|
-
setHeaderNode:
|
|
273
|
-
setFooterNode:
|
|
274
|
-
bodyNode:
|
|
275
|
-
setBodyNode:
|
|
276
|
-
scrollState:
|
|
277
|
-
setScrollState:
|
|
253
|
+
setPresentationState: y,
|
|
254
|
+
requestClose: P,
|
|
255
|
+
canDismissByBehavior: L,
|
|
256
|
+
canCloseAttempt: w,
|
|
257
|
+
closeAttemptFeedbackKey: X,
|
|
258
|
+
notifyCloseAttemptRejected: u,
|
|
259
|
+
disablePointerDismissal: h ?? !1,
|
|
260
|
+
setBackdropDismissalDisabled: K,
|
|
261
|
+
setBackgroundInteractive: Q,
|
|
262
|
+
canPeek: A,
|
|
263
|
+
setCanPeek: re,
|
|
264
|
+
canRenderHandle: o,
|
|
265
|
+
setCanRenderHandle: q,
|
|
266
|
+
popupSnapLayoutVersion: W,
|
|
267
|
+
notifyPopupSnapLayoutChange: V,
|
|
268
|
+
headerHeight: B.height,
|
|
269
|
+
footerHeight: U.height,
|
|
270
|
+
setHeaderNode: B.setNode,
|
|
271
|
+
setFooterNode: U.setNode,
|
|
272
|
+
bodyNode: ie,
|
|
273
|
+
setBodyNode: he,
|
|
274
|
+
scrollState: ee,
|
|
275
|
+
setScrollState: te
|
|
278
276
|
}),
|
|
279
277
|
[
|
|
280
|
-
|
|
281
|
-
Y,
|
|
282
|
-
L,
|
|
278
|
+
ie,
|
|
283
279
|
A,
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
280
|
+
o,
|
|
281
|
+
L,
|
|
282
|
+
w,
|
|
283
|
+
X,
|
|
284
|
+
U.height,
|
|
285
|
+
U.setNode,
|
|
286
|
+
B.height,
|
|
287
|
+
B.setNode,
|
|
288
|
+
u,
|
|
289
|
+
V,
|
|
290
|
+
W,
|
|
291
|
+
O,
|
|
292
|
+
J,
|
|
293
|
+
P,
|
|
294
|
+
ee,
|
|
295
|
+
h,
|
|
298
296
|
b,
|
|
299
|
-
|
|
297
|
+
y
|
|
300
298
|
]
|
|
301
299
|
);
|
|
302
|
-
return /* @__PURE__ */
|
|
303
|
-
|
|
300
|
+
return /* @__PURE__ */ d(Ct, { value: _, children: /* @__PURE__ */ d(
|
|
301
|
+
$.Root,
|
|
304
302
|
{
|
|
305
|
-
open:
|
|
306
|
-
modal:
|
|
307
|
-
onOpenChange:
|
|
308
|
-
disablePointerDismissal:
|
|
303
|
+
open: O,
|
|
304
|
+
modal: z,
|
|
305
|
+
onOpenChange: oe,
|
|
306
|
+
disablePointerDismissal: ge,
|
|
309
307
|
children: e
|
|
310
308
|
}
|
|
311
309
|
) });
|
|
312
310
|
}
|
|
313
|
-
function
|
|
311
|
+
function Ut({
|
|
314
312
|
className: e = "",
|
|
315
313
|
children: t,
|
|
316
314
|
render: n,
|
|
317
315
|
nativeButton: a
|
|
318
316
|
}) {
|
|
319
|
-
return n ? /* @__PURE__ */
|
|
320
|
-
|
|
317
|
+
return n ? /* @__PURE__ */ d(
|
|
318
|
+
$.Trigger,
|
|
321
319
|
{
|
|
322
320
|
render: n,
|
|
323
321
|
nativeButton: a,
|
|
324
322
|
"data-oc-component": "modal-trigger",
|
|
325
323
|
children: t
|
|
326
324
|
}
|
|
327
|
-
) : /* @__PURE__ */
|
|
328
|
-
|
|
325
|
+
) : /* @__PURE__ */ d(
|
|
326
|
+
$.Trigger,
|
|
329
327
|
{
|
|
330
|
-
className:
|
|
328
|
+
className: R(c.trigger, e),
|
|
331
329
|
nativeButton: a,
|
|
332
330
|
"data-oc-component": "modal-trigger",
|
|
333
331
|
children: t
|
|
334
332
|
}
|
|
335
333
|
);
|
|
336
334
|
}
|
|
337
|
-
function
|
|
335
|
+
function _t({
|
|
338
336
|
className: e = "",
|
|
339
337
|
children: t,
|
|
340
338
|
variant: n = "adaptive",
|
|
341
339
|
size: a = "medium",
|
|
342
|
-
resize:
|
|
343
|
-
contentTransition:
|
|
344
|
-
backdrop:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
340
|
+
resize: l = "content",
|
|
341
|
+
contentTransition: N = "auto",
|
|
342
|
+
backdrop: m = "auto",
|
|
343
|
+
backdropFrom: C,
|
|
344
|
+
drag: f = "content",
|
|
345
|
+
peekable: M = !1,
|
|
346
|
+
snapPoints: h,
|
|
347
|
+
defaultSnapPoint: S,
|
|
348
|
+
snapPositions: x,
|
|
349
|
+
defaultSnapPosition: p,
|
|
350
|
+
initialFocus: T,
|
|
351
|
+
peekHeight: G,
|
|
352
|
+
closeThreshold: O,
|
|
353
|
+
scrollLockTimeout: J,
|
|
354
|
+
container: fe,
|
|
355
|
+
style: A,
|
|
356
|
+
...re
|
|
358
357
|
}) {
|
|
359
|
-
const o =
|
|
358
|
+
const o = me("ModalContent"), { setCanPeek: q, setCanRenderHandle: F, setPlacement: K } = o, r = Mt(n), Q = j(null), X = j(null), Y = j(null), W = j(null), [Z, ie] = v(null), [he, ee] = v(
|
|
360
359
|
null
|
|
361
|
-
),
|
|
362
|
-
backdrop:
|
|
363
|
-
canSnapPopup:
|
|
364
|
-
placement:
|
|
360
|
+
), te = j(0), b = j(null), y = j(null), B = j(null), [U, I] = v(), D = f === "handle" || f === "content", w = r === "popup" && D && !!x?.length, u = qt({
|
|
361
|
+
backdrop: m,
|
|
362
|
+
canSnapPopup: w,
|
|
363
|
+
placement: r,
|
|
365
364
|
presentationState: o.presentationState
|
|
366
|
-
}), [
|
|
367
|
-
resolvedBackdrop:
|
|
365
|
+
}), [V, L] = v(() => ({
|
|
366
|
+
resolvedBackdrop: u,
|
|
368
367
|
exiting: !1
|
|
369
|
-
})),
|
|
370
|
-
() =>
|
|
371
|
-
[
|
|
372
|
-
),
|
|
373
|
-
!!
|
|
374
|
-
),
|
|
375
|
-
if (!(!
|
|
376
|
-
return
|
|
377
|
-
snapPoints:
|
|
378
|
-
defaultSnapPoint:
|
|
379
|
-
|
|
368
|
+
})), P = pe(
|
|
369
|
+
() => qe(V, u),
|
|
370
|
+
[V, u]
|
|
371
|
+
), oe = P.exiting, z = w && u === "hidden", ge = (r === "bottom" || w) && D, _ = r === "bottom" && ge && M, s = _ && G !== void 0 ? G : o.headerHeight > 0 ? o.headerHeight : void 0, g = r === "bottom" && l !== "fixed", ce = At(
|
|
372
|
+
!!h?.length || g
|
|
373
|
+
), se = pe(() => {
|
|
374
|
+
if (!(!h?.length || ce <= 0))
|
|
375
|
+
return Rt({
|
|
376
|
+
snapPoints: h,
|
|
377
|
+
defaultSnapPoint: S,
|
|
378
|
+
backdropFrom: C,
|
|
379
|
+
viewportHeight: ce
|
|
380
380
|
});
|
|
381
|
-
}, [
|
|
382
|
-
contentTransition:
|
|
383
|
-
placement:
|
|
384
|
-
resize:
|
|
385
|
-
}),
|
|
386
|
-
|
|
387
|
-
enabled: o.open &&
|
|
388
|
-
node:
|
|
389
|
-
}),
|
|
390
|
-
if (!
|
|
391
|
-
|
|
381
|
+
}, [C, S, h, ce]), E = r === "bottom" ? se : void 0, Ye = xt(o.open), [ke, Ze] = v(0), Ne = j(!1), et = E !== void 0 && g, He = g && ke > 0 ? ke : void 0, de = E ? et && He !== void 0 ? He : E.sheetHeight : He, tt = E && de !== void 0 ? Math.max(0, de - E.defaultHeight) : void 0, ot = de !== void 0, Me = Et({
|
|
382
|
+
contentTransition: N,
|
|
383
|
+
placement: r,
|
|
384
|
+
resize: l
|
|
385
|
+
}), nt = Me === "surface" ? "auto" : "none", at = Me === "sheet" ? "auto" : "none", De = o.bodyNode;
|
|
386
|
+
wt({
|
|
387
|
+
enabled: o.open && Me === "surface",
|
|
388
|
+
node: he
|
|
389
|
+
}), ye(() => {
|
|
390
|
+
if (!g) {
|
|
391
|
+
Ne.current = !1;
|
|
392
392
|
return;
|
|
393
393
|
}
|
|
394
|
-
const
|
|
395
|
-
if (!
|
|
396
|
-
|
|
394
|
+
const i = De?.firstElementChild;
|
|
395
|
+
if (!i) {
|
|
396
|
+
Ne.current = !1;
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
399
|
const H = () => {
|
|
400
|
-
const
|
|
401
|
-
contentHeight:
|
|
402
|
-
maxHeight:
|
|
403
|
-
snapHeight:
|
|
404
|
-
}),
|
|
405
|
-
|
|
400
|
+
const ue = i.getBoundingClientRect().height, Se = Tt({
|
|
401
|
+
contentHeight: ue,
|
|
402
|
+
maxHeight: Dt(Z),
|
|
403
|
+
snapHeight: E?.sheetHeight
|
|
404
|
+
}), $e = Math.abs(ke - Se) > 0.5;
|
|
405
|
+
Ne.current = $e, $e && Ze(Se);
|
|
406
406
|
};
|
|
407
407
|
if (H(), typeof ResizeObserver > "u") return;
|
|
408
|
-
const
|
|
409
|
-
return
|
|
408
|
+
const be = new ResizeObserver(H);
|
|
409
|
+
return be.observe(i), () => be.disconnect();
|
|
410
410
|
}, [
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
]),
|
|
418
|
-
|
|
419
|
-
}, [
|
|
420
|
-
o.open || (
|
|
421
|
-
}, [o.open]),
|
|
422
|
-
const
|
|
423
|
-
() =>
|
|
411
|
+
De,
|
|
412
|
+
g,
|
|
413
|
+
E?.sheetHeight,
|
|
414
|
+
ke,
|
|
415
|
+
ce,
|
|
416
|
+
Z
|
|
417
|
+
]), ne(() => {
|
|
418
|
+
K(r);
|
|
419
|
+
}, [r, K]), ne(() => {
|
|
420
|
+
o.open || (W.current = null);
|
|
421
|
+
}, [o.open]), ne(() => (q(_), () => q(!1)), [_, q]), ne(() => (F(ge), () => F(!1)), [ge, F]);
|
|
422
|
+
const rt = k(
|
|
423
|
+
() => Ne.current,
|
|
424
424
|
[]
|
|
425
|
-
),
|
|
426
|
-
|
|
427
|
-
|
|
425
|
+
), Ee = o.bodyNode, Ae = o.setScrollState, it = k(() => {
|
|
426
|
+
Ae(Je(Ee));
|
|
427
|
+
}, [Ee, Ae]), Ie = E?.backdropFromHeight, [Ve, Le] = v(!1), ct = k((i) => {
|
|
428
|
+
Le(!i);
|
|
429
|
+
}, []);
|
|
430
|
+
!o.open && Ve && Le(!1);
|
|
431
|
+
const xe = Ie !== void 0 && Ve, { collapseBottomSheetToUndimmedSnap: Te, handlers: st } = Ht({
|
|
432
|
+
enabled: f !== !1,
|
|
433
|
+
drag: f,
|
|
428
434
|
open: o.open,
|
|
429
|
-
placement:
|
|
430
|
-
surfaceMotionRef:
|
|
431
|
-
surfaceMotionNode:
|
|
432
|
-
backdropRef:
|
|
435
|
+
placement: r,
|
|
436
|
+
surfaceMotionRef: Q,
|
|
437
|
+
surfaceMotionNode: Z,
|
|
438
|
+
backdropRef: Y,
|
|
433
439
|
bodyNode: o.bodyNode,
|
|
434
|
-
snapHeights:
|
|
435
|
-
sheetHeight:
|
|
436
|
-
|
|
437
|
-
|
|
440
|
+
snapHeights: E?.snapHeights,
|
|
441
|
+
sheetHeight: de,
|
|
442
|
+
backdropFromHeight: Ie,
|
|
443
|
+
onBackdropDimRestChange: ct,
|
|
444
|
+
peekHeight: _ ? G : void 0,
|
|
445
|
+
peekFallback: _ ? "header" : void 0,
|
|
438
446
|
presentationState: o.presentationState,
|
|
439
447
|
setPresentationState: o.setPresentationState,
|
|
440
448
|
requestClose: o.requestClose,
|
|
441
449
|
canCloseAttempt: o.canCloseAttempt,
|
|
442
450
|
dismissible: !o.disablePointerDismissal && o.canDismissByBehavior({ reason: "drag-dismiss" }),
|
|
443
|
-
|
|
444
|
-
visibleTranslate:
|
|
445
|
-
shouldDeferBottomSettle:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
451
|
+
backdropHidden: u === "hidden",
|
|
452
|
+
visibleTranslate: tt,
|
|
453
|
+
shouldDeferBottomSettle: rt,
|
|
454
|
+
refreshScrollState: it,
|
|
455
|
+
snapPositions: w ? x : void 0,
|
|
456
|
+
defaultSnapPosition: p,
|
|
457
|
+
closeThreshold: O,
|
|
458
|
+
scrollLockTimeout: J,
|
|
450
459
|
popupSnapLayoutVersion: o.popupSnapLayoutVersion
|
|
451
|
-
}),
|
|
452
|
-
(
|
|
453
|
-
|
|
454
|
-
defaultSnapPosition:
|
|
455
|
-
node:
|
|
456
|
-
snapPositions:
|
|
457
|
-
}),
|
|
460
|
+
}), dt = k(
|
|
461
|
+
(i) => {
|
|
462
|
+
Q.current = i, ie(i), i && o.open && w && W.current !== i && (zt({
|
|
463
|
+
defaultSnapPosition: p,
|
|
464
|
+
node: i,
|
|
465
|
+
snapPositions: x
|
|
466
|
+
}), W.current = i);
|
|
458
467
|
},
|
|
459
|
-
[
|
|
460
|
-
),
|
|
461
|
-
|
|
468
|
+
[w, o.open, p, x]
|
|
469
|
+
), lt = k((i) => {
|
|
470
|
+
X.current = i, ee(i);
|
|
462
471
|
}, []);
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
if (
|
|
466
|
-
|
|
472
|
+
ne(() => {
|
|
473
|
+
const i = o.closeAttemptFeedbackKey;
|
|
474
|
+
if (i === 0 || r !== "popup" || te.current === i) {
|
|
475
|
+
te.current = i, I(void 0);
|
|
467
476
|
return;
|
|
468
477
|
}
|
|
469
|
-
const H =
|
|
478
|
+
const H = X.current;
|
|
470
479
|
if (!H) return;
|
|
471
|
-
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
},
|
|
475
|
-
|
|
480
|
+
te.current = i, b.current !== null && window.cancelAnimationFrame(b.current), y.current !== null && window.clearTimeout(y.current), I(void 0);
|
|
481
|
+
const be = () => {
|
|
482
|
+
I(void 0), y.current = null;
|
|
483
|
+
}, ue = (Se) => {
|
|
484
|
+
Se.target === H && Se.animationName === "oc-modal-reject-shake" && (H.removeEventListener("animationend", ue), y.current !== null && window.clearTimeout(y.current), be());
|
|
476
485
|
};
|
|
477
|
-
return H.addEventListener("animationend",
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
H.removeEventListener("animationend",
|
|
481
|
-
},
|
|
486
|
+
return H.addEventListener("animationend", ue), b.current = window.requestAnimationFrame(() => {
|
|
487
|
+
b.current = null, I("reject"), b.current = window.requestAnimationFrame(() => {
|
|
488
|
+
b.current = null, y.current = window.setTimeout(() => {
|
|
489
|
+
H.removeEventListener("animationend", ue), be();
|
|
490
|
+
}, Vt(H));
|
|
482
491
|
});
|
|
483
492
|
}), () => {
|
|
484
|
-
H.removeEventListener("animationend",
|
|
493
|
+
H.removeEventListener("animationend", ue), b.current !== null && (window.cancelAnimationFrame(b.current), b.current = null), y.current !== null && (window.clearTimeout(y.current), y.current = null);
|
|
485
494
|
};
|
|
486
|
-
}, [o.closeAttemptFeedbackKey,
|
|
487
|
-
const
|
|
488
|
-
...
|
|
495
|
+
}, [o.closeAttemptFeedbackKey, r]);
|
|
496
|
+
const ze = Pt(A), ut = {
|
|
497
|
+
...ze,
|
|
489
498
|
...o.headerHeight > 0 ? { "--oc-modal-header-height": `${o.headerHeight}px` } : {},
|
|
490
499
|
...o.footerHeight > 0 ? { "--oc-modal-footer-height": `${o.footerHeight}px` } : {},
|
|
491
|
-
...
|
|
492
|
-
...
|
|
500
|
+
...s !== void 0 ? { "--oc-modal-peek-height": `${s}px` } : {},
|
|
501
|
+
...de !== void 0 ? { "--oc-modal-sheet-height": `${de}px` } : {}
|
|
493
502
|
// `--oc-modal-translate-y` and the inline `height` are owned imperatively
|
|
494
503
|
// by the drag hook: content-size transitions pin the surface to a canvas
|
|
495
504
|
// height and compensate the translate in the same frame. Rendering the
|
|
496
505
|
// height here would commit the new size before that compensation runs and
|
|
497
506
|
// make the sheet jump a frame early. The managed sizing CSS rule renders
|
|
498
507
|
// the resting height from `--oc-modal-sheet-height`.
|
|
499
|
-
},
|
|
508
|
+
}, je = {
|
|
500
509
|
// Each modal reserves one backdrop slot and one viewport slot.
|
|
501
|
-
"--oc-modal-stack-offset":
|
|
502
|
-
},
|
|
503
|
-
...
|
|
510
|
+
"--oc-modal-stack-offset": Ye * 2
|
|
511
|
+
}, pt = o.headerHeight > 0 ? {
|
|
512
|
+
...A,
|
|
504
513
|
"--oc-modal-header-height": `${o.headerHeight}px`
|
|
505
|
-
} :
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
}, [
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
}, []),
|
|
512
|
-
|
|
513
|
-
const H =
|
|
514
|
-
|
|
515
|
-
|
|
514
|
+
} : A, mt = T === "content" ? Q : T, { setBackdropDismissalDisabled: Re, setBackgroundInteractive: Be } = o, ft = u !== "hidden" || oe;
|
|
515
|
+
ye(() => {
|
|
516
|
+
P !== V && L(P);
|
|
517
|
+
}, [V, P]);
|
|
518
|
+
const le = k(() => {
|
|
519
|
+
B.current !== null && (window.clearTimeout(B.current), B.current = null);
|
|
520
|
+
}, []), ve = k(() => {
|
|
521
|
+
u === "hidden" && (le(), L((i) => {
|
|
522
|
+
const H = qe(
|
|
523
|
+
i,
|
|
524
|
+
u
|
|
516
525
|
);
|
|
517
526
|
return H.resolvedBackdrop !== "hidden" || !H.exiting ? H : {
|
|
518
527
|
...H,
|
|
519
528
|
exiting: !1
|
|
520
529
|
};
|
|
521
530
|
}));
|
|
522
|
-
}, [
|
|
523
|
-
return
|
|
531
|
+
}, [le, u]);
|
|
532
|
+
return ne(
|
|
524
533
|
() => () => {
|
|
525
|
-
|
|
534
|
+
le();
|
|
526
535
|
},
|
|
527
|
-
[
|
|
528
|
-
),
|
|
529
|
-
if (!
|
|
530
|
-
const
|
|
531
|
-
if (!
|
|
532
|
-
|
|
536
|
+
[le]
|
|
537
|
+
), ye(() => {
|
|
538
|
+
if (!oe || u !== "hidden") return;
|
|
539
|
+
const i = Y.current;
|
|
540
|
+
if (!i) {
|
|
541
|
+
B.current = window.setTimeout(ve, 0);
|
|
533
542
|
return;
|
|
534
543
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
544
|
+
le(), B.current = window.setTimeout(
|
|
545
|
+
ve,
|
|
546
|
+
Lt(i)
|
|
538
547
|
);
|
|
539
548
|
}, [
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
]),
|
|
545
|
-
|
|
549
|
+
le,
|
|
550
|
+
ve,
|
|
551
|
+
oe,
|
|
552
|
+
u
|
|
553
|
+
]), ye(() => (Re(u === "hidden"), Be(z || xe), () => {
|
|
554
|
+
Re(!1), Be(!1);
|
|
546
555
|
}), [
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
556
|
+
xe,
|
|
557
|
+
z,
|
|
558
|
+
u,
|
|
559
|
+
Re,
|
|
560
|
+
Be
|
|
561
|
+
]), /* @__PURE__ */ ae($.Portal, { container: fe, children: [
|
|
562
|
+
ft ? /* @__PURE__ */ d(
|
|
563
|
+
$.Backdrop,
|
|
554
564
|
{
|
|
555
|
-
ref:
|
|
556
|
-
className:
|
|
565
|
+
ref: Y,
|
|
566
|
+
className: c.backdrop,
|
|
557
567
|
"data-oc-part": "backdrop",
|
|
558
568
|
"data-oc-component": "modal-backdrop",
|
|
559
|
-
"data-oc-modal-backdrop":
|
|
560
|
-
"data-oc-modal-
|
|
569
|
+
"data-oc-modal-backdrop": u,
|
|
570
|
+
"data-oc-modal-backdrop-passthrough": xe ? "true" : void 0,
|
|
571
|
+
"data-oc-modal-placement": r,
|
|
561
572
|
"data-oc-modal-presentation-state": o.presentationState,
|
|
562
|
-
style:
|
|
563
|
-
onTransitionCancel: (
|
|
564
|
-
|
|
573
|
+
style: je,
|
|
574
|
+
onTransitionCancel: (i) => {
|
|
575
|
+
i.currentTarget === i.target && i.propertyName === "opacity" && ve();
|
|
565
576
|
},
|
|
566
|
-
onTransitionEnd: (
|
|
567
|
-
|
|
577
|
+
onTransitionEnd: (i) => {
|
|
578
|
+
i.currentTarget === i.target && i.propertyName === "opacity" && ve();
|
|
568
579
|
},
|
|
569
580
|
onClick: () => {
|
|
570
581
|
if (o.disablePointerDismissal) {
|
|
582
|
+
if (Te()) return;
|
|
571
583
|
o.notifyCloseAttemptRejected({ reason: "backdrop-press" });
|
|
572
584
|
return;
|
|
573
585
|
}
|
|
574
586
|
if (!o.canDismissByBehavior({ reason: "backdrop-press" })) {
|
|
587
|
+
if (Te()) return;
|
|
575
588
|
o.notifyCloseAttemptRejected({ reason: "backdrop-press" });
|
|
576
589
|
return;
|
|
577
590
|
}
|
|
578
|
-
if (
|
|
579
|
-
o.presentationState === "visible"
|
|
591
|
+
if (r === "bottom" && _) {
|
|
592
|
+
if (o.presentationState === "visible") {
|
|
593
|
+
if (Te()) return;
|
|
594
|
+
o.setPresentationState("peeked");
|
|
595
|
+
}
|
|
580
596
|
return;
|
|
581
597
|
}
|
|
582
598
|
o.requestClose({ reason: "backdrop-press" });
|
|
583
599
|
}
|
|
584
600
|
}
|
|
585
601
|
) : null,
|
|
586
|
-
/* @__PURE__ */
|
|
587
|
-
|
|
602
|
+
/* @__PURE__ */ d(
|
|
603
|
+
$.Viewport,
|
|
588
604
|
{
|
|
589
|
-
className:
|
|
605
|
+
className: c.viewport,
|
|
590
606
|
"data-oc-part": "viewport",
|
|
591
607
|
"data-oc-component": "modal-viewport",
|
|
592
|
-
"data-oc-modal-placement":
|
|
593
|
-
style:
|
|
594
|
-
children: /* @__PURE__ */
|
|
595
|
-
|
|
608
|
+
"data-oc-modal-placement": r,
|
|
609
|
+
style: je,
|
|
610
|
+
children: /* @__PURE__ */ ae(
|
|
611
|
+
$.Popup,
|
|
596
612
|
{
|
|
597
|
-
...
|
|
598
|
-
...
|
|
599
|
-
ref:
|
|
600
|
-
initialFocus:
|
|
601
|
-
className:
|
|
602
|
-
|
|
603
|
-
|
|
613
|
+
...re,
|
|
614
|
+
...st,
|
|
615
|
+
ref: dt,
|
|
616
|
+
initialFocus: mt,
|
|
617
|
+
className: R(
|
|
618
|
+
c.surfaceMotion,
|
|
619
|
+
c[a],
|
|
604
620
|
e
|
|
605
621
|
),
|
|
606
622
|
"data-oc-part": "surface-motion",
|
|
607
623
|
"data-oc-component": "modal-content",
|
|
608
|
-
"data-oc-modal-backdrop":
|
|
624
|
+
"data-oc-modal-backdrop": u,
|
|
609
625
|
"data-oc-variant": n,
|
|
610
626
|
"data-oc-size": a,
|
|
611
|
-
"data-oc-resize":
|
|
612
|
-
"data-oc-modal-feedback":
|
|
613
|
-
"data-oc-modal-placement":
|
|
614
|
-
"data-oc-modal-snapping":
|
|
615
|
-
"data-oc-modal-sheet-sizing":
|
|
616
|
-
"data-oc-modal-sheet-transition":
|
|
617
|
-
style:
|
|
627
|
+
"data-oc-resize": l,
|
|
628
|
+
"data-oc-modal-feedback": r === "popup" ? U : void 0,
|
|
629
|
+
"data-oc-modal-placement": r,
|
|
630
|
+
"data-oc-modal-snapping": E || w ? "true" : void 0,
|
|
631
|
+
"data-oc-modal-sheet-sizing": ot ? "managed" : void 0,
|
|
632
|
+
"data-oc-modal-sheet-transition": at === "auto" ? "auto" : void 0,
|
|
633
|
+
style: ut,
|
|
618
634
|
children: [
|
|
619
|
-
|
|
635
|
+
r === "bottom" ? /* @__PURE__ */ d(
|
|
620
636
|
"div",
|
|
621
637
|
{
|
|
622
638
|
"aria-hidden": "true",
|
|
623
|
-
className:
|
|
624
|
-
|
|
625
|
-
|
|
639
|
+
className: R(
|
|
640
|
+
c.bottomFill,
|
|
641
|
+
c[a],
|
|
626
642
|
e
|
|
627
643
|
),
|
|
628
644
|
"data-oc-part": "bottom-fill",
|
|
629
645
|
"data-oc-component": "modal-bottom-fill",
|
|
630
646
|
"data-oc-size": a,
|
|
631
|
-
style:
|
|
647
|
+
style: ze
|
|
632
648
|
}
|
|
633
649
|
) : null,
|
|
634
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ d(
|
|
635
651
|
"div",
|
|
636
652
|
{
|
|
637
|
-
ref:
|
|
638
|
-
className:
|
|
639
|
-
|
|
640
|
-
|
|
653
|
+
ref: lt,
|
|
654
|
+
className: R(
|
|
655
|
+
c.surface,
|
|
656
|
+
c[l],
|
|
641
657
|
e
|
|
642
658
|
),
|
|
643
659
|
"data-oc-part": "surface",
|
|
644
660
|
"data-oc-variant": n,
|
|
645
661
|
"data-oc-size": a,
|
|
646
|
-
"data-oc-resize":
|
|
647
|
-
"data-oc-content-transition":
|
|
648
|
-
"data-oc-modal-placement":
|
|
662
|
+
"data-oc-resize": l,
|
|
663
|
+
"data-oc-content-transition": nt === "auto" ? "auto" : void 0,
|
|
664
|
+
"data-oc-modal-placement": r,
|
|
649
665
|
"data-oc-scrollable": o.scrollState.canScroll ? "true" : "false",
|
|
650
|
-
style:
|
|
666
|
+
style: pt,
|
|
651
667
|
children: t
|
|
652
668
|
}
|
|
653
669
|
)
|
|
@@ -658,59 +674,57 @@ function Vt({
|
|
|
658
674
|
)
|
|
659
675
|
] });
|
|
660
676
|
}
|
|
661
|
-
function
|
|
677
|
+
function Gt({
|
|
662
678
|
className: e = "",
|
|
663
679
|
title: t,
|
|
664
680
|
children: n,
|
|
665
681
|
leadingContent: a,
|
|
666
|
-
trailingContent:
|
|
667
|
-
closeLabel:
|
|
668
|
-
closeButton:
|
|
669
|
-
handle:
|
|
670
|
-
ref:
|
|
671
|
-
...
|
|
682
|
+
trailingContent: l,
|
|
683
|
+
closeLabel: N = "닫기",
|
|
684
|
+
closeButton: m = !0,
|
|
685
|
+
handle: C = !0,
|
|
686
|
+
ref: f,
|
|
687
|
+
...M
|
|
672
688
|
}) {
|
|
673
|
-
const
|
|
674
|
-
(
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
return /* @__PURE__ */ ne(
|
|
680
|
-
ct,
|
|
689
|
+
const h = me("ModalHeader"), { setHeaderNode: S, scrollState: x } = h, p = pe(
|
|
690
|
+
() => Fe(S, f),
|
|
691
|
+
[f, S]
|
|
692
|
+
), T = Qe(a);
|
|
693
|
+
return /* @__PURE__ */ ae(
|
|
694
|
+
bt,
|
|
681
695
|
{
|
|
682
|
-
...
|
|
696
|
+
...M,
|
|
683
697
|
as: "header",
|
|
684
|
-
ref:
|
|
698
|
+
ref: p,
|
|
685
699
|
backdrop: "compact",
|
|
686
|
-
className:
|
|
700
|
+
className: R(c.header, e),
|
|
687
701
|
backColor: "var(--oc-color-theme-background-elevated-normal)",
|
|
688
702
|
frontColor: "transparent",
|
|
689
703
|
"data-oc-part": "header",
|
|
690
704
|
"data-oc-component": "modal-header",
|
|
691
705
|
variant: "strong",
|
|
692
|
-
"data-oc-sticky":
|
|
706
|
+
"data-oc-sticky": x.scrolledFromTop ? "true" : "false",
|
|
693
707
|
children: [
|
|
694
|
-
|
|
708
|
+
C && h.canRenderHandle ? /* @__PURE__ */ d(
|
|
695
709
|
"div",
|
|
696
710
|
{
|
|
697
711
|
"aria-hidden": "true",
|
|
698
|
-
className:
|
|
712
|
+
className: c.handle,
|
|
699
713
|
"data-oc-part": "handle"
|
|
700
714
|
}
|
|
701
715
|
) : null,
|
|
702
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ ae(
|
|
703
717
|
"div",
|
|
704
718
|
{
|
|
705
|
-
className:
|
|
719
|
+
className: c.headerInner,
|
|
706
720
|
"data-oc-has-leading": T ? "true" : "false",
|
|
707
721
|
"data-oc-part": "header-inner",
|
|
708
722
|
children: [
|
|
709
|
-
T ? /* @__PURE__ */
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
-
|
|
713
|
-
|
|
723
|
+
T ? /* @__PURE__ */ d("div", { className: c.headerLeading, "data-oc-part": "header-leading", children: a }) : null,
|
|
724
|
+
/* @__PURE__ */ d("div", { className: c.headerTitle, "data-oc-part": "header-title", children: t ? /* @__PURE__ */ d($.Title, { children: t }) : n }),
|
|
725
|
+
/* @__PURE__ */ ae("div", { className: c.headerTrailing, "data-oc-part": "header-trailing", children: [
|
|
726
|
+
l,
|
|
727
|
+
m ? /* @__PURE__ */ d(Xe, { label: N }) : null
|
|
714
728
|
] })
|
|
715
729
|
]
|
|
716
730
|
}
|
|
@@ -719,155 +733,155 @@ function Lt({
|
|
|
719
733
|
}
|
|
720
734
|
);
|
|
721
735
|
}
|
|
722
|
-
function
|
|
736
|
+
function Jt({
|
|
723
737
|
className: e = "",
|
|
724
738
|
title: t,
|
|
725
739
|
children: n,
|
|
726
740
|
expanded: a,
|
|
727
|
-
defaultExpanded:
|
|
728
|
-
onExpandedChange:
|
|
729
|
-
disabled:
|
|
730
|
-
forceMount:
|
|
731
|
-
handle:
|
|
732
|
-
headingLevel:
|
|
733
|
-
indicator:
|
|
734
|
-
titleAsDialogTitle:
|
|
735
|
-
navigationProps:
|
|
736
|
-
panelProps:
|
|
741
|
+
defaultExpanded: l = !0,
|
|
742
|
+
onExpandedChange: N,
|
|
743
|
+
disabled: m = !1,
|
|
744
|
+
forceMount: C = !0,
|
|
745
|
+
handle: f = !0,
|
|
746
|
+
headingLevel: M = 2,
|
|
747
|
+
indicator: h,
|
|
748
|
+
titleAsDialogTitle: S = !0,
|
|
749
|
+
navigationProps: x,
|
|
750
|
+
panelProps: p,
|
|
737
751
|
panelContentProps: T,
|
|
738
|
-
ref:
|
|
739
|
-
style:
|
|
740
|
-
...
|
|
752
|
+
ref: G,
|
|
753
|
+
style: O,
|
|
754
|
+
...J
|
|
741
755
|
}) {
|
|
742
|
-
const
|
|
743
|
-
canRenderHandle:
|
|
744
|
-
notifyPopupSnapLayoutChange:
|
|
745
|
-
placement:
|
|
746
|
-
} =
|
|
756
|
+
const fe = me("ModalNavigationSection"), {
|
|
757
|
+
canRenderHandle: A,
|
|
758
|
+
notifyPopupSnapLayoutChange: re,
|
|
759
|
+
placement: o
|
|
760
|
+
} = fe, { height: q, setNode: F } = Pe(), K = ht(), [r, Q] = Ge({
|
|
747
761
|
value: a,
|
|
748
|
-
defaultValue:
|
|
749
|
-
onChange:
|
|
750
|
-
}), [
|
|
751
|
-
|
|
752
|
-
),
|
|
753
|
-
className:
|
|
754
|
-
id:
|
|
755
|
-
onClick:
|
|
756
|
-
...
|
|
757
|
-
} =
|
|
758
|
-
className:
|
|
762
|
+
defaultValue: l,
|
|
763
|
+
onChange: N
|
|
764
|
+
}), [X, Y] = v(
|
|
765
|
+
r ? "open" : "closed"
|
|
766
|
+
), W = `h${Wt(M) ? M : 2}`, {
|
|
767
|
+
className: Z = "",
|
|
768
|
+
id: ie,
|
|
769
|
+
onClick: he,
|
|
770
|
+
...ee
|
|
771
|
+
} = x ?? {}, {
|
|
772
|
+
className: te = "",
|
|
759
773
|
id: b,
|
|
760
|
-
role:
|
|
761
|
-
...
|
|
762
|
-
} =
|
|
763
|
-
...
|
|
764
|
-
"--oc-modal-navigation-block-size": `${
|
|
765
|
-
} :
|
|
766
|
-
(
|
|
767
|
-
|
|
774
|
+
role: y,
|
|
775
|
+
...B
|
|
776
|
+
} = p ?? {}, { className: U = "", ...I } = T ?? {}, D = ie ?? `${K}-navigation`, w = b ?? `${K}-panel`, u = `${K}-dialog-title`, V = Qe(t), L = f && A, P = q > 0 ? {
|
|
777
|
+
...O,
|
|
778
|
+
"--oc-modal-navigation-block-size": `${q}px`
|
|
779
|
+
} : O, oe = k(
|
|
780
|
+
(z) => {
|
|
781
|
+
Y(z), o === "popup" && re();
|
|
768
782
|
},
|
|
769
|
-
[
|
|
783
|
+
[re, o]
|
|
770
784
|
);
|
|
771
|
-
return /* @__PURE__ */
|
|
785
|
+
return /* @__PURE__ */ ae(
|
|
772
786
|
"section",
|
|
773
787
|
{
|
|
774
|
-
ref:
|
|
775
|
-
className:
|
|
776
|
-
style:
|
|
777
|
-
...
|
|
788
|
+
ref: G,
|
|
789
|
+
className: R(c.navigationSection, e),
|
|
790
|
+
style: P,
|
|
791
|
+
...J,
|
|
778
792
|
"data-oc-component": "modal-navigation-section",
|
|
779
|
-
"data-oc-motion-state":
|
|
780
|
-
"data-oc-state":
|
|
793
|
+
"data-oc-motion-state": X,
|
|
794
|
+
"data-oc-state": r ? "open" : "closed",
|
|
781
795
|
children: [
|
|
782
|
-
|
|
783
|
-
|
|
796
|
+
S && V ? /* @__PURE__ */ d(
|
|
797
|
+
$.Title,
|
|
784
798
|
{
|
|
785
|
-
className:
|
|
786
|
-
id:
|
|
799
|
+
className: c.navigationDialogTitle,
|
|
800
|
+
id: u,
|
|
787
801
|
children: t
|
|
788
802
|
}
|
|
789
803
|
) : null,
|
|
790
|
-
|
|
804
|
+
L ? /* @__PURE__ */ d(
|
|
791
805
|
"div",
|
|
792
806
|
{
|
|
793
807
|
"aria-hidden": "true",
|
|
794
|
-
className:
|
|
808
|
+
className: c.handle,
|
|
795
809
|
"data-oc-part": "handle"
|
|
796
810
|
}
|
|
797
811
|
) : null,
|
|
798
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ d(W, { className: c.navigationHeading, "data-oc-part": "heading", children: /* @__PURE__ */ ae(
|
|
799
813
|
"button",
|
|
800
814
|
{
|
|
801
|
-
...
|
|
802
|
-
ref:
|
|
803
|
-
id:
|
|
804
|
-
className:
|
|
815
|
+
...ee,
|
|
816
|
+
ref: F,
|
|
817
|
+
id: D,
|
|
818
|
+
className: R(c.navigation, Z),
|
|
805
819
|
type: "button",
|
|
806
|
-
disabled:
|
|
807
|
-
"aria-disabled":
|
|
808
|
-
"aria-expanded":
|
|
809
|
-
"aria-controls":
|
|
810
|
-
onClick: (
|
|
811
|
-
|
|
820
|
+
disabled: m,
|
|
821
|
+
"aria-disabled": m ? "true" : ee["aria-disabled"],
|
|
822
|
+
"aria-expanded": r,
|
|
823
|
+
"aria-controls": w,
|
|
824
|
+
onClick: (z) => {
|
|
825
|
+
he?.(z), !(z.defaultPrevented || m) && Q(!r);
|
|
812
826
|
},
|
|
813
827
|
"data-oc-component": "modal-navigation",
|
|
814
828
|
"data-oc-part": "navigation",
|
|
815
|
-
"data-oc-state":
|
|
829
|
+
"data-oc-state": r ? "open" : "closed",
|
|
816
830
|
children: [
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
|
|
819
|
-
|
|
831
|
+
/* @__PURE__ */ d("span", { className: c.navigationTitle, "data-oc-part": "title", children: t }),
|
|
832
|
+
h === void 0 ? /* @__PURE__ */ d(
|
|
833
|
+
kt,
|
|
820
834
|
{
|
|
821
|
-
className:
|
|
822
|
-
open:
|
|
835
|
+
className: c.navigationIndicator,
|
|
836
|
+
open: r
|
|
823
837
|
}
|
|
824
|
-
) :
|
|
838
|
+
) : h ? /* @__PURE__ */ d(
|
|
825
839
|
"span",
|
|
826
840
|
{
|
|
827
|
-
className:
|
|
841
|
+
className: c.navigationIndicator,
|
|
828
842
|
"data-oc-part": "indicator",
|
|
829
|
-
"data-oc-state":
|
|
830
|
-
children: /* @__PURE__ */
|
|
843
|
+
"data-oc-state": r ? "open" : "closed",
|
|
844
|
+
children: /* @__PURE__ */ d("span", { "data-oc-part": "indicator-frame", children: Nt(h) })
|
|
831
845
|
}
|
|
832
846
|
) : null,
|
|
833
|
-
|
|
847
|
+
m ? null : /* @__PURE__ */ d(yt, { variant: "light" })
|
|
834
848
|
]
|
|
835
849
|
}
|
|
836
850
|
) }),
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
|
|
851
|
+
/* @__PURE__ */ d(
|
|
852
|
+
vt,
|
|
839
853
|
{
|
|
840
|
-
className:
|
|
841
|
-
open:
|
|
842
|
-
forceMount:
|
|
854
|
+
className: R(c.navigationPanel, te),
|
|
855
|
+
open: r,
|
|
856
|
+
forceMount: C,
|
|
843
857
|
intent: "expand",
|
|
844
858
|
measureBlockSize: "rendered",
|
|
845
|
-
onMotionStateChange:
|
|
859
|
+
onMotionStateChange: oe,
|
|
846
860
|
contentProps: {
|
|
847
|
-
className:
|
|
861
|
+
className: c.navigationPanelFrame,
|
|
848
862
|
"data-oc-part": "panel-inner"
|
|
849
863
|
},
|
|
850
|
-
...
|
|
851
|
-
"aria-hidden":
|
|
852
|
-
"aria-labelledby":
|
|
853
|
-
id:
|
|
854
|
-
inert:
|
|
855
|
-
role:
|
|
864
|
+
...B,
|
|
865
|
+
"aria-hidden": r ? void 0 : !0,
|
|
866
|
+
"aria-labelledby": D,
|
|
867
|
+
id: w,
|
|
868
|
+
inert: r ? void 0 : !0,
|
|
869
|
+
role: y ?? "region",
|
|
856
870
|
"data-oc-component": "modal-navigation-panel",
|
|
857
|
-
"data-oc-state":
|
|
858
|
-
children: /* @__PURE__ */
|
|
859
|
-
|
|
871
|
+
"data-oc-state": r ? "open" : "closed",
|
|
872
|
+
children: /* @__PURE__ */ d(
|
|
873
|
+
Ue,
|
|
860
874
|
{
|
|
861
|
-
className:
|
|
875
|
+
className: c.navigationPanelScroll,
|
|
862
876
|
"data-oc-component": "modal-navigation-panel-scroll-area",
|
|
863
877
|
"data-oc-part": "panel-scroll-area",
|
|
864
|
-
children: /* @__PURE__ */
|
|
865
|
-
|
|
878
|
+
children: /* @__PURE__ */ d(
|
|
879
|
+
_e,
|
|
866
880
|
{
|
|
867
|
-
...
|
|
868
|
-
className:
|
|
869
|
-
|
|
870
|
-
|
|
881
|
+
...I,
|
|
882
|
+
className: R(
|
|
883
|
+
c.navigationPanelInner,
|
|
884
|
+
U
|
|
871
885
|
),
|
|
872
886
|
"data-oc-component": "modal-navigation-panel-content",
|
|
873
887
|
children: n
|
|
@@ -881,53 +895,51 @@ function zt({
|
|
|
881
895
|
}
|
|
882
896
|
);
|
|
883
897
|
}
|
|
884
|
-
function
|
|
898
|
+
function Qt({
|
|
885
899
|
className: e = "",
|
|
886
900
|
children: t,
|
|
887
901
|
layout: n = "content",
|
|
888
902
|
containerClassName: a = "",
|
|
889
|
-
containerProps:
|
|
890
|
-
ref:
|
|
891
|
-
...
|
|
903
|
+
containerProps: l,
|
|
904
|
+
ref: N,
|
|
905
|
+
...m
|
|
892
906
|
}) {
|
|
893
|
-
const
|
|
894
|
-
(
|
|
895
|
-
|
|
907
|
+
const C = me("ModalBody"), { bodyNode: f, setBodyNode: M, setScrollState: h } = C, S = k(
|
|
908
|
+
(p) => {
|
|
909
|
+
h(Je(p));
|
|
896
910
|
},
|
|
897
|
-
[
|
|
898
|
-
),
|
|
899
|
-
(
|
|
900
|
-
|
|
901
|
-
},
|
|
902
|
-
[w, C, m]
|
|
911
|
+
[h]
|
|
912
|
+
), x = pe(
|
|
913
|
+
() => Fe(M, N, S),
|
|
914
|
+
[N, M, S]
|
|
903
915
|
);
|
|
904
|
-
return
|
|
905
|
-
const
|
|
906
|
-
if (!
|
|
907
|
-
const T = new ResizeObserver(() =>
|
|
908
|
-
return T.observe(
|
|
909
|
-
}, [
|
|
910
|
-
|
|
916
|
+
return ne(() => {
|
|
917
|
+
const p = f;
|
|
918
|
+
if (!p || (S(p), typeof ResizeObserver > "u")) return;
|
|
919
|
+
const T = new ResizeObserver(() => S(p));
|
|
920
|
+
return T.observe(p), p.firstElementChild && T.observe(p.firstElementChild), () => T.disconnect();
|
|
921
|
+
}, [f, S]), /* @__PURE__ */ d(
|
|
922
|
+
Ue,
|
|
911
923
|
{
|
|
912
|
-
...
|
|
913
|
-
className:
|
|
924
|
+
...m,
|
|
925
|
+
className: R(c.body, e),
|
|
914
926
|
"data-oc-part": "body",
|
|
915
927
|
"data-oc-component": "modal-body",
|
|
916
|
-
children: /* @__PURE__ */
|
|
917
|
-
|
|
928
|
+
children: /* @__PURE__ */ d(
|
|
929
|
+
_e,
|
|
918
930
|
{
|
|
919
|
-
ref:
|
|
920
|
-
className:
|
|
931
|
+
ref: x,
|
|
932
|
+
className: c.bodyContainer,
|
|
921
933
|
"data-oc-part": "body-container",
|
|
922
934
|
"data-oc-component": "modal-body-container",
|
|
923
|
-
onScroll: (
|
|
924
|
-
|
|
935
|
+
onScroll: (p) => {
|
|
936
|
+
l?.onScroll?.(p), S(p.currentTarget);
|
|
925
937
|
},
|
|
926
|
-
children: /* @__PURE__ */
|
|
938
|
+
children: /* @__PURE__ */ d(
|
|
927
939
|
"section",
|
|
928
940
|
{
|
|
929
|
-
...
|
|
930
|
-
className:
|
|
941
|
+
...l,
|
|
942
|
+
className: R(c.bodyContent, a),
|
|
931
943
|
"data-oc-part": "body-content",
|
|
932
944
|
"data-oc-component": "modal-body-content",
|
|
933
945
|
"data-oc-layout": n,
|
|
@@ -939,77 +951,75 @@ function jt({
|
|
|
939
951
|
}
|
|
940
952
|
);
|
|
941
953
|
}
|
|
942
|
-
function
|
|
954
|
+
function Xt({
|
|
943
955
|
className: e = "",
|
|
944
956
|
children: t,
|
|
945
957
|
background: n = "auto",
|
|
946
958
|
ref: a,
|
|
947
|
-
...
|
|
959
|
+
...l
|
|
948
960
|
}) {
|
|
949
|
-
const
|
|
950
|
-
(
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
), C = n === !0 || n === "auto" && f.canScroll && !f.scrolledToBottom;
|
|
955
|
-
return /* @__PURE__ */ s(
|
|
961
|
+
const N = me("ModalFooter"), { scrollState: m, setFooterNode: C } = N, f = pe(
|
|
962
|
+
() => Fe(C, a),
|
|
963
|
+
[a, C]
|
|
964
|
+
), M = n === !0 || n === "auto" && m.canScroll && !m.scrolledToBottom;
|
|
965
|
+
return /* @__PURE__ */ d(
|
|
956
966
|
"footer",
|
|
957
967
|
{
|
|
958
|
-
...
|
|
959
|
-
ref:
|
|
960
|
-
className:
|
|
968
|
+
...l,
|
|
969
|
+
ref: f,
|
|
970
|
+
className: R(c.footer, e),
|
|
961
971
|
"data-oc-part": "footer",
|
|
962
972
|
"data-oc-component": "modal-footer",
|
|
963
|
-
"data-oc-background":
|
|
973
|
+
"data-oc-background": M ? "true" : "false",
|
|
964
974
|
children: t
|
|
965
975
|
}
|
|
966
976
|
);
|
|
967
977
|
}
|
|
968
|
-
function
|
|
978
|
+
function Xe({
|
|
969
979
|
className: e = "",
|
|
970
|
-
children: t = /* @__PURE__ */
|
|
980
|
+
children: t = /* @__PURE__ */ d(gt, {}),
|
|
971
981
|
label: n = "닫기",
|
|
972
982
|
size: a = 24,
|
|
973
|
-
disabled:
|
|
974
|
-
onClick:
|
|
975
|
-
...
|
|
983
|
+
disabled: l,
|
|
984
|
+
onClick: N,
|
|
985
|
+
...m
|
|
976
986
|
}) {
|
|
977
|
-
const
|
|
978
|
-
return /* @__PURE__ */
|
|
979
|
-
|
|
987
|
+
const C = me("ModalClose");
|
|
988
|
+
return /* @__PURE__ */ d(
|
|
989
|
+
St,
|
|
980
990
|
{
|
|
981
|
-
...
|
|
982
|
-
className:
|
|
983
|
-
"aria-label":
|
|
991
|
+
...m,
|
|
992
|
+
className: R(c.close, e),
|
|
993
|
+
"aria-label": m["aria-label"] ?? n,
|
|
984
994
|
"data-oc-part": "close",
|
|
985
995
|
"data-oc-component": "modal-close",
|
|
986
|
-
disabled:
|
|
987
|
-
onClick: (
|
|
988
|
-
|
|
996
|
+
disabled: l,
|
|
997
|
+
onClick: (f) => {
|
|
998
|
+
N?.(f), !f.defaultPrevented && !l && C.requestClose({ reason: "close-button" });
|
|
989
999
|
},
|
|
990
1000
|
size: a,
|
|
991
1001
|
children: t
|
|
992
1002
|
}
|
|
993
1003
|
);
|
|
994
1004
|
}
|
|
995
|
-
const
|
|
996
|
-
Root:
|
|
997
|
-
Trigger:
|
|
998
|
-
Content:
|
|
999
|
-
Header:
|
|
1000
|
-
NavigationSection:
|
|
1001
|
-
Body:
|
|
1002
|
-
Footer:
|
|
1003
|
-
Close:
|
|
1005
|
+
const No = Object.assign(We, {
|
|
1006
|
+
Root: We,
|
|
1007
|
+
Trigger: Ut,
|
|
1008
|
+
Content: _t,
|
|
1009
|
+
Header: Gt,
|
|
1010
|
+
NavigationSection: Jt,
|
|
1011
|
+
Body: Qt,
|
|
1012
|
+
Footer: Xt,
|
|
1013
|
+
Close: Xe
|
|
1004
1014
|
});
|
|
1005
1015
|
export {
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1016
|
+
Qt as ModalBody,
|
|
1017
|
+
Xe as ModalClose,
|
|
1018
|
+
_t as ModalContent,
|
|
1019
|
+
Xt as ModalFooter,
|
|
1020
|
+
Gt as ModalHeader,
|
|
1021
|
+
Jt as ModalNavigationSection,
|
|
1022
|
+
We as ModalRoot,
|
|
1023
|
+
Ut as ModalTrigger,
|
|
1024
|
+
No as default
|
|
1015
1025
|
};
|