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