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