@orioncactuscorp/ui 1.14.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.
Files changed (131) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/README.md +65 -36
  3. package/dist/components/BackgroundIconButton/BackgroundIconButton.css +1 -1
  4. package/dist/components/Button/Button.css +1 -1
  5. package/dist/components/CheckMark/CheckMark.js +19 -17
  6. package/dist/components/Checkbox/Checkbox.css +1 -1
  7. package/dist/components/Checkbox/Checkbox.js +38 -36
  8. package/dist/components/FloatingWindow/FloatingWindow.js +138 -137
  9. package/dist/components/Interaction/Interaction.css +1 -1
  10. package/dist/components/Menu/Menu.css +1 -1
  11. package/dist/components/Menu/Menu.js +95 -87
  12. package/dist/components/Modal/Modal.css +1 -1
  13. package/dist/components/Modal/Modal.js +504 -488
  14. package/dist/components/Modal/Modal.module.scss.js +69 -62
  15. package/dist/components/Modal/keyboardSession.js +104 -0
  16. package/dist/components/Modal/snapPoints.js +95 -82
  17. package/dist/components/Modal/useModalDrag.js +587 -637
  18. package/dist/components/Modal/useModalKeyboardAvoidance.js +159 -0
  19. package/dist/components/Modal/useModalViewportGeometry.js +36 -0
  20. package/dist/components/PositionSnap/PositionSnap.css +1 -0
  21. package/dist/components/PositionSnap/PositionSnap.js +330 -0
  22. package/dist/components/PositionSnap/PositionSnap.module.scss.js +9 -0
  23. package/dist/components/PositionSnap/contexts.js +12 -0
  24. package/dist/components/PositionSnap/geometry.js +75 -0
  25. package/dist/components/PositionSnap/gesture.js +7 -0
  26. package/dist/components/PositionSnap/policy.js +60 -0
  27. package/dist/components/PositionSnap.d.ts +6 -0
  28. package/dist/components/PositionSnap.js +7 -0
  29. package/dist/components/ProgressIndicator/ProgressIndicator.css +1 -0
  30. package/dist/components/ProgressIndicator/ProgressIndicator.js +45 -0
  31. package/dist/components/ProgressIndicator/ProgressIndicator.module.scss.js +13 -0
  32. package/dist/components/ProgressIndicator.d.ts +6 -0
  33. package/dist/components/ProgressIndicator.js +4 -0
  34. package/dist/components/Radio/Radio.css +1 -1
  35. package/dist/components/Radio/Radio.js +26 -24
  36. package/dist/components/Switch/Switch.css +1 -1
  37. package/dist/components/Switch/Switch.js +18 -16
  38. package/dist/components/Tabs/Tabs.css +1 -1
  39. package/dist/components/Tooltip/Tooltip.css +1 -1
  40. package/dist/components/Tooltip/Tooltip.js +59 -56
  41. package/dist/components/Tooltip/Tooltip.module.scss.js +6 -4
  42. package/dist/components/internal/ModalPresentation.js +126 -124
  43. package/dist/components/internal/OverlayPortalContext.js +20 -0
  44. package/dist/index.js +133 -126
  45. package/dist/styles.css +12 -10
  46. package/dist/ui/src/components/CheckMark/CheckMark.d.ts +1 -1
  47. package/dist/ui/src/components/CheckMark/CheckMark.d.ts.map +1 -1
  48. package/dist/ui/src/components/CheckMark/types.d.ts +2 -1
  49. package/dist/ui/src/components/CheckMark/types.d.ts.map +1 -1
  50. package/dist/ui/src/components/Checkbox/Checkbox.d.ts +1 -1
  51. package/dist/ui/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  52. package/dist/ui/src/components/Checkbox/types.d.ts +2 -1
  53. package/dist/ui/src/components/Checkbox/types.d.ts.map +1 -1
  54. package/dist/ui/src/components/FloatingWindow/FloatingWindow.d.ts.map +1 -1
  55. package/dist/ui/src/components/FloatingWindow/types.d.ts +1 -1
  56. package/dist/ui/src/components/FloatingWindow/types.d.ts.map +1 -1
  57. package/dist/ui/src/components/Interaction/index.d.ts +1 -1
  58. package/dist/ui/src/components/Interaction/index.d.ts.map +1 -1
  59. package/dist/ui/src/components/Interaction/types.d.ts +9 -1
  60. package/dist/ui/src/components/Interaction/types.d.ts.map +1 -1
  61. package/dist/ui/src/components/Menu/Menu.d.ts +2 -2
  62. package/dist/ui/src/components/Menu/Menu.d.ts.map +1 -1
  63. package/dist/ui/src/components/Menu/types.d.ts +9 -2
  64. package/dist/ui/src/components/Menu/types.d.ts.map +1 -1
  65. package/dist/ui/src/components/Modal/Modal.d.ts +1 -1
  66. package/dist/ui/src/components/Modal/Modal.d.ts.map +1 -1
  67. package/dist/ui/src/components/Modal/keyboardSession.d.ts +46 -0
  68. package/dist/ui/src/components/Modal/keyboardSession.d.ts.map +1 -0
  69. package/dist/ui/src/components/Modal/snapPoints.d.ts.map +1 -1
  70. package/dist/ui/src/components/Modal/types.d.ts +8 -1
  71. package/dist/ui/src/components/Modal/types.d.ts.map +1 -1
  72. package/dist/ui/src/components/Modal/useModalDrag.d.ts.map +1 -1
  73. package/dist/ui/src/components/Modal/useModalKeyboardAvoidance.d.ts +17 -0
  74. package/dist/ui/src/components/Modal/useModalKeyboardAvoidance.d.ts.map +1 -0
  75. package/dist/ui/src/components/Modal/useModalViewportGeometry.d.ts +9 -0
  76. package/dist/ui/src/components/Modal/useModalViewportGeometry.d.ts.map +1 -0
  77. package/dist/ui/src/components/PositionSnap/PositionSnap.d.ts +11 -0
  78. package/dist/ui/src/components/PositionSnap/PositionSnap.d.ts.map +1 -0
  79. package/dist/ui/src/components/PositionSnap/contexts.d.ts +17 -0
  80. package/dist/ui/src/components/PositionSnap/contexts.d.ts.map +1 -0
  81. package/dist/ui/src/components/PositionSnap/geometry.d.ts +31 -0
  82. package/dist/ui/src/components/PositionSnap/geometry.d.ts.map +1 -0
  83. package/dist/ui/src/components/PositionSnap/gesture.d.ts +2 -0
  84. package/dist/ui/src/components/PositionSnap/gesture.d.ts.map +1 -0
  85. package/dist/ui/src/components/PositionSnap/index.d.ts +3 -0
  86. package/dist/ui/src/components/PositionSnap/index.d.ts.map +1 -0
  87. package/dist/ui/src/components/PositionSnap/policy.d.ts +24 -0
  88. package/dist/ui/src/components/PositionSnap/policy.d.ts.map +1 -0
  89. package/dist/ui/src/components/PositionSnap/types.d.ts +31 -0
  90. package/dist/ui/src/components/PositionSnap/types.d.ts.map +1 -0
  91. package/dist/ui/src/components/ProgressIndicator/ProgressIndicator.d.ts +4 -0
  92. package/dist/ui/src/components/ProgressIndicator/ProgressIndicator.d.ts.map +1 -0
  93. package/dist/ui/src/components/ProgressIndicator/index.d.ts +3 -0
  94. package/dist/ui/src/components/ProgressIndicator/index.d.ts.map +1 -0
  95. package/dist/ui/src/components/ProgressIndicator/types.d.ts +17 -0
  96. package/dist/ui/src/components/ProgressIndicator/types.d.ts.map +1 -0
  97. package/dist/ui/src/components/Radio/Radio.d.ts +1 -1
  98. package/dist/ui/src/components/Radio/Radio.d.ts.map +1 -1
  99. package/dist/ui/src/components/Radio/types.d.ts +2 -1
  100. package/dist/ui/src/components/Radio/types.d.ts.map +1 -1
  101. package/dist/ui/src/components/Switch/Switch.d.ts +1 -1
  102. package/dist/ui/src/components/Switch/Switch.d.ts.map +1 -1
  103. package/dist/ui/src/components/Switch/types.d.ts +2 -1
  104. package/dist/ui/src/components/Switch/types.d.ts.map +1 -1
  105. package/dist/ui/src/components/Tooltip/Tooltip.d.ts +1 -1
  106. package/dist/ui/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  107. package/dist/ui/src/components/Tooltip/types.d.ts +6 -0
  108. package/dist/ui/src/components/Tooltip/types.d.ts.map +1 -1
  109. package/dist/ui/src/components/internal/ModalPresentation.d.ts +2 -1
  110. package/dist/ui/src/components/internal/ModalPresentation.d.ts.map +1 -1
  111. package/dist/ui/src/components/internal/OverlayPortalContext.d.ts +10 -0
  112. package/dist/ui/src/components/internal/OverlayPortalContext.d.ts.map +1 -0
  113. package/dist/ui/src/index.d.ts +5 -1
  114. package/dist/ui/src/index.d.ts.map +1 -1
  115. package/docs/api-conventions.md +4 -0
  116. package/docs/overlay-stacking.md +48 -0
  117. package/docs/responsive-foundation-profile.md +1 -1
  118. package/docs/scss-helpers.md +110 -5
  119. package/docs/selector-contract.md +77 -2
  120. package/docs/tokens.md +2 -0
  121. package/package.json +1 -1
  122. package/src/scss/foundations/atomic.scss +9 -8
  123. package/src/scss/index.scss +2 -0
  124. package/src/scss/mixins/_fluid.scss +57 -0
  125. package/src/scss/mixins/_fluid.test.ts +87 -0
  126. package/src/scss/mixins/_gradient.scss +99 -0
  127. package/src/scss/mixins/_gradient.test.ts +111 -0
  128. package/src/scss/mixins/_responsive.scss +2 -1
  129. package/src/scss/mixins/_typo.scss +2 -1
  130. package/src/scss/mixins/_units.scss +14 -0
  131. package/src/scss/mixins/_utils.scss +3 -22
@@ -7,12 +7,13 @@ import { mergeRefs as Ee } from "../../utils/mergeRefs.js";
7
7
  import _e from "../BackgroundIconButton/BackgroundIconButton.js";
8
8
  import H from "../Modal/Modal.module.scss.js";
9
9
  import { resolveModalInitialFocus as et } from "../Modal/initialFocus.js";
10
- import { useModalBodyScrollState as tt, ModalBodyFrame as ot, ModalSurfaceFrame as nt, resolveModalFooterBackground as rt, ModalFooterFrame as it, ModalHeaderFrame as at, ModalNavigationSectionFrame as dt, mergeModalClassName as st } from "../internal/ModalPresentation.js";
11
- import { useFloatingWindowContentContext as q, useFloatingWindowRootContext as Le, FloatingWindowContentContext as ct, useFloatingWindowManagerContext as lt, FloatingWindowRootContext as ut } from "./contexts.js";
12
- import { constrainFloatingWindowPosition as gt, getFloatingWindowBoundaryRect as Re, resolveCenteredFloatingWindowPosition as Ce, resolveAnchoredFloatingWindowPosition as ft, getFloatingWindowRect as wt } from "./geometry.js";
10
+ import { useModalBodyScrollState as tt, ModalBodyFrame as ot, ModalSurfaceFrame as nt, resolveModalFooterBackground as rt, ModalFooterFrame as it, ModalHeaderFrame as at, ModalNavigationSectionFrame as dt, mergeModalClassName as ct } from "../internal/ModalPresentation.js";
11
+ import { OverlayPortalProvider as st } from "../internal/OverlayPortalContext.js";
12
+ import { useFloatingWindowContentContext as q, useFloatingWindowRootContext as Le, FloatingWindowContentContext as lt, useFloatingWindowManagerContext as ut, FloatingWindowRootContext as gt } from "./contexts.js";
13
+ import { constrainFloatingWindowPosition as ft, getFloatingWindowBoundaryRect as Re, resolveCenteredFloatingWindowPosition as Ce, resolveAnchoredFloatingWindowPosition as mt, getFloatingWindowRect as wt } from "./geometry.js";
13
14
  import z from "./FloatingWindow.module.scss.js";
14
- import { FloatingWindowManager as mt } from "./FloatingWindowManager.js";
15
- const pt = {
15
+ import { FloatingWindowManager as pt } from "./FloatingWindowManager.js";
16
+ const vt = {
16
17
  topLeft: { side: "top", alignment: "start" },
17
18
  top: { side: "top", alignment: "center" },
18
19
  topRight: { side: "top", alignment: "end" },
@@ -25,15 +26,15 @@ const pt = {
25
26
  leftTop: { side: "left", alignment: "start" },
26
27
  left: { side: "left", alignment: "center" },
27
28
  leftBottom: { side: "left", alignment: "end" }
28
- }, vt = {
29
+ }, ht = {
29
30
  small: H.small,
30
31
  medium: H.medium,
31
32
  large: H.large
32
- }, $ = st;
33
+ }, $ = ct;
33
34
  function Se(e, o) {
34
35
  return e?.x === o.x && e.y === o.y;
35
36
  }
36
- function ht(e) {
37
+ function Ft(e) {
37
38
  return e instanceof Element && !!e.closest(
38
39
  'button, a, input, select, textarea, [contenteditable="true"], [data-oc-window-no-drag]'
39
40
  );
@@ -44,32 +45,32 @@ function Me(e) {
44
45
  function Te(e, o) {
45
46
  return e ? typeof e == "function" ? e() : "current" in e ? e.current : e : o;
46
47
  }
47
- function Ft(e, o) {
48
+ function bt(e, o) {
48
49
  return e.x === o.x && e.y === o.y && e.width === o.width && e.height === o.height;
49
50
  }
50
- function bt(e, o) {
51
+ function yt(e, o) {
51
52
  if (typeof IntersectionObserver > "u") return;
52
- let c = null, n;
53
+ let s = null, n;
53
54
  const r = () => {
54
- n !== void 0 && window.clearTimeout(n), c?.disconnect(), c = null;
55
- }, a = (m = !1, h = 1) => {
55
+ n !== void 0 && window.clearTimeout(n), s?.disconnect(), s = null;
56
+ }, a = (w = !1, h = 1) => {
56
57
  r();
57
58
  const g = e.getBoundingClientRect(), u = e.ownerDocument.documentElement;
58
- if (m && o(), !g.width || !g.height) return;
59
+ if (w && o(), !g.width || !g.height) return;
59
60
  const p = Math.floor(g.top), F = Math.floor(
60
61
  u.clientWidth - (g.left + g.width)
61
- ), w = Math.floor(
62
+ ), m = Math.floor(
62
63
  u.clientHeight - (g.top + g.height)
63
64
  ), b = Math.floor(g.left);
64
65
  let C = !0;
65
- c = new IntersectionObserver(
66
+ s = new IntersectionObserver(
66
67
  (x) => {
67
- const E = x[0]?.intersectionRatio ?? 0, y = !Ft(
68
+ const E = x[0]?.intersectionRatio ?? 0, W = !bt(
68
69
  g,
69
70
  e.getBoundingClientRect()
70
71
  );
71
- if (y || E !== h) {
72
- if (!C || y) {
72
+ if (W || E !== h) {
73
+ if (!C || W) {
73
74
  a(!0);
74
75
  return;
75
76
  }
@@ -78,61 +79,61 @@ function bt(e, o) {
78
79
  C = !1;
79
80
  },
80
81
  {
81
- rootMargin: `${-p}px ${-F}px ${-w}px ${-b}px`,
82
+ rootMargin: `${-p}px ${-F}px ${-m}px ${-b}px`,
82
83
  threshold: Math.max(0, Math.min(1, h)) || 1
83
84
  }
84
- ), c.observe(e);
85
+ ), s.observe(e);
85
86
  };
86
87
  return a(), r;
87
88
  }
88
89
  function Ie({
89
90
  children: e,
90
91
  modal: o = !1,
91
- defaultBackdrop: c,
92
+ defaultBackdrop: s,
92
93
  presentation: n,
93
94
  disablePointerDismissal: r = o !== !0,
94
95
  windowId: a,
95
- onActivate: m,
96
+ onActivate: w,
96
97
  onOpenChange: h,
97
98
  ...g
98
99
  }) {
99
- const u = lt(), [p, F] = R(null);
100
+ const u = ut(), [p, F] = R(null);
100
101
  if (u && !a)
101
102
  throw new Error(
102
103
  "FloatingWindowRoot requires windowId inside FloatingWindowManager."
103
104
  );
104
- const w = u !== null && u.activeWindowId !== void 0 && u.activeWindowId !== a, b = w && o !== !1 ? !1 : o, C = w ? !0 : r, x = X(
105
+ const m = u !== null && u.activeWindowId !== void 0 && u.activeWindowId !== a, b = m && o !== !1 ? !1 : o, C = m ? !0 : r, x = X(
105
106
  () => ({
106
- defaultBackdrop: c,
107
+ defaultBackdrop: s,
107
108
  manager: u,
108
109
  modal: o,
109
- onActivate: m,
110
+ onActivate: w,
110
111
  presentation: n,
111
112
  setTriggerNode: F,
112
113
  triggerNode: p,
113
114
  windowId: a
114
115
  }),
115
116
  [
116
- c,
117
+ s,
117
118
  u,
118
119
  o,
119
- m,
120
+ w,
120
121
  n,
121
122
  p,
122
123
  a
123
124
  ]
124
125
  ), E = L(
125
- (y, v) => {
126
+ (W, v) => {
126
127
  const Y = v && typeof v == "object" && "reason" in v ? v.reason : void 0;
127
- if (!y && (Y === "escape-key" || Y === "outside-press") && u && a && u.activeWindowId !== a) {
128
+ if (!W && (Y === "escape-key" || Y === "outside-press") && u && a && u.activeWindowId !== a) {
128
129
  v && typeof v == "object" && "cancel" in v && typeof v.cancel == "function" && v.cancel();
129
130
  return;
130
131
  }
131
- h?.(y, v);
132
+ h?.(W, v);
132
133
  },
133
134
  [u, h, a]
134
135
  );
135
- return /* @__PURE__ */ l(ut.Provider, { value: x, children: /* @__PURE__ */ l(
136
+ return /* @__PURE__ */ l(gt.Provider, { value: x, children: /* @__PURE__ */ l(
136
137
  T.Root,
137
138
  {
138
139
  ...g,
@@ -153,7 +154,7 @@ function xe(e) {
153
154
  }
154
155
  );
155
156
  }
156
- function yt({
157
+ function Wt({
157
158
  modal: e = !0,
158
159
  ...o
159
160
  }) {
@@ -167,48 +168,48 @@ function yt({
167
168
  }
168
169
  );
169
170
  }
170
- function Wt({
171
+ function Nt({
171
172
  children: e,
172
173
  className: o = "",
173
- render: c,
174
+ render: s,
174
175
  nativeButton: n,
175
176
  ref: r
176
177
  }) {
177
- const a = Le("FloatingWindowTrigger"), m = X(
178
+ const a = Le("FloatingWindowTrigger"), w = X(
178
179
  () => Ee(a.setTriggerNode, r),
179
180
  [r, a.setTriggerNode]
180
181
  );
181
182
  return /* @__PURE__ */ l(
182
183
  T.Trigger,
183
184
  {
184
- ref: m,
185
- className: c ? void 0 : $(z.trigger, o),
186
- render: c,
185
+ ref: w,
186
+ className: s ? void 0 : $(z.trigger, o),
187
+ render: s,
187
188
  nativeButton: n,
188
189
  "data-oc-component": "floating-window-trigger",
189
190
  children: e
190
191
  }
191
192
  );
192
193
  }
193
- function Nt({
194
+ function Rt({
194
195
  children: e,
195
196
  className: o = "",
196
- style: c,
197
+ style: s,
197
198
  position: n,
198
199
  defaultPosition: r,
199
200
  placement: a,
200
- side: m = "bottom",
201
+ side: w = "bottom",
201
202
  alignment: h = "center",
202
203
  sideOffset: g = 12,
203
204
  alignOffset: u = 0,
204
205
  anchor: p,
205
206
  onPositionChange: F,
206
- onPositionCommit: w,
207
+ onPositionCommit: m,
207
208
  collisionBoundary: b = "viewport",
208
209
  collisionPadding: C = 16,
209
210
  collisionAvoidance: x,
210
211
  dragHandleVisibility: E = 48,
211
- draggable: y = !0,
212
+ draggable: W = !0,
212
213
  backdrop: v = "auto",
213
214
  size: Y = "medium",
214
215
  resize: ne = "content",
@@ -217,19 +218,19 @@ function Nt({
217
218
  stackLevel: Ae = 0,
218
219
  ...K
219
220
  }) {
220
- const s = Le("FloatingWindowContent"), I = A(null), re = A(null), ie = A(!1), [Q, ae] = R(null), [de, ze] = R(null), [Z, He] = R({
221
+ const c = Le("FloatingWindowContent"), I = A(null), re = A(null), ie = A(!1), [Q, ae] = R(null), [de, ze] = R(null), [Z, He] = R({
221
222
  canScroll: !1,
222
223
  scrolledFromTop: !1,
223
224
  scrolledToBottom: !0
224
- }), P = A(null), se = n !== void 0 || r !== void 0, _ = A(se), U = A(null), [W, $e] = R(
225
+ }), P = A(null), ce = n !== void 0 || r !== void 0, _ = A(ce), U = A(null), [y, $e] = R(
225
226
  null
226
- ), [ce, le] = R(r ?? null), [ee, ue] = R(se), [qe, G] = R(!1), [je, Oe] = R(m), [Ve, Xe] = R(h), Ye = s.windowId ? s.manager?.stackLevels.get(s.windowId) : void 0, te = s.manager?.registerWindow, ge = Ye ?? Ae, j = s.manager ? s.manager.activeWindowId === s.windowId : void 0, fe = a ? pt[a] : void 0, we = fe?.side ?? m, me = fe?.alignment ?? h, pe = X(
227
+ ), [se, le] = R(r ?? null), [ee, ue] = R(ce), [qe, G] = R(!1), [je, Oe] = R(w), [Ve, Xe] = R(h), Ye = c.windowId ? c.manager?.stackLevels.get(c.windowId) : void 0, te = c.manager?.registerWindow, ge = Ye ?? Ae, j = c.manager ? c.manager.activeWindowId === c.windowId : void 0, fe = a ? vt[a] : void 0, me = fe?.side ?? w, we = fe?.alignment ?? h, pe = X(
227
228
  () => ({
228
229
  side: x?.side ?? "flip",
229
230
  alignment: x?.alignment ?? "shift"
230
231
  }),
231
232
  [x?.alignment, x?.side]
232
- ), ve = v === "auto" ? s.defaultBackdrop : v, Ue = L(
233
+ ), ve = v === "auto" ? c.defaultBackdrop : v, Ue = L(
233
234
  (t) => {
234
235
  const d = I.current !== null;
235
236
  if (I.current = t, $e(t), !t) {
@@ -247,7 +248,7 @@ function Nt({
247
248
  const d = I.current;
248
249
  if (!d) return t;
249
250
  const i = d.getBoundingClientRect();
250
- return gt({
251
+ return ft({
251
252
  boundary: Re(b),
252
253
  dragHandleHeight: E,
253
254
  padding: C,
@@ -267,13 +268,13 @@ function Nt({
267
268
  const i = B(t);
268
269
  return k(i), n === void 0 && le(
269
270
  (f) => Se(f, i) ? f : i
270
- ), d && w?.(i), i;
271
+ ), d && m?.(i), i;
271
272
  },
272
- [B, k, w, n]
273
+ [B, k, m, n]
273
274
  ), J = L(() => {
274
- const t = W ?? I.current;
275
+ const t = y ?? I.current;
275
276
  if (!t) return;
276
- const d = t.getBoundingClientRect(), i = { width: d.width, height: d.height }, f = Re(b), S = n ?? ce;
277
+ const d = t.getBoundingClientRect(), i = { width: d.width, height: d.height }, f = Re(b), S = n ?? se;
277
278
  if (_.current || S) {
278
279
  O(
279
280
  S ?? P.current ?? Ce({
@@ -284,7 +285,7 @@ function Nt({
284
285
  ), G(!0);
285
286
  return;
286
287
  }
287
- const D = Te(p, s.triggerNode);
288
+ const D = Te(p, c.triggerNode);
288
289
  if (!D) {
289
290
  k(
290
291
  B(
@@ -296,15 +297,15 @@ function Nt({
296
297
  ), G(!0);
297
298
  return;
298
299
  }
299
- const M = ft({
300
+ const M = mt({
300
301
  alignOffset: u,
301
- alignment: me,
302
+ alignment: we,
302
303
  anchor: wt(D),
303
304
  boundary: f,
304
305
  collisionAvoidance: pe,
305
306
  direction: window.getComputedStyle(D).direction === "rtl" ? "rtl" : "ltr",
306
307
  padding: C,
307
- side: we,
308
+ side: me,
308
309
  sideOffset: g,
309
310
  size: i
310
311
  });
@@ -320,24 +321,24 @@ function Nt({
320
321
  C,
321
322
  O,
322
323
  B,
323
- ce,
324
+ se,
324
325
  k,
325
326
  n,
326
- me,
327
327
  we,
328
+ me,
328
329
  pe,
329
- s.triggerNode,
330
+ c.triggerNode,
330
331
  g,
331
- W
332
+ y
332
333
  ]);
333
334
  Ne(() => {
334
335
  J();
335
336
  }, [J]), oe(() => {
336
337
  const t = I.current;
337
338
  if (!t) return;
338
- const d = Te(p, s.triggerNode), i = () => J(), f = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(i);
339
+ const d = Te(p, c.triggerNode), i = () => J(), f = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(i);
339
340
  f?.observe(t), d && f?.observe(d), b !== "viewport" && f?.observe(b);
340
- const S = d && !ee && n === void 0 && r === void 0 ? bt(d, i) : void 0;
341
+ const S = d && !ee && n === void 0 && r === void 0 ? yt(d, i) : void 0;
341
342
  return window.addEventListener("resize", i), window.addEventListener("scroll", i, !0), window.visualViewport?.addEventListener("resize", i), window.visualViewport?.addEventListener("scroll", i), () => {
342
343
  S?.(), f?.disconnect(), window.removeEventListener("resize", i), window.removeEventListener("scroll", i, !0), window.visualViewport?.removeEventListener("resize", i), window.visualViewport?.removeEventListener("scroll", i);
343
344
  };
@@ -348,27 +349,27 @@ function Nt({
348
349
  ee,
349
350
  J,
350
351
  n,
351
- s.triggerNode
352
+ c.triggerNode
352
353
  ]), oe(
353
354
  () => () => {
354
355
  U.current?.();
355
356
  },
356
357
  []
357
358
  ), Ne(() => {
358
- if (!(!W || !te || !s.windowId))
359
- return te(s.windowId, s.modal);
360
- }, [te, s.modal, s.windowId, W]), oe(() => {
359
+ if (!(!y || !te || !c.windowId))
360
+ return te(c.windowId, c.modal);
361
+ }, [te, c.modal, c.windowId, y]), oe(() => {
361
362
  const t = j === !0 && !ie.current;
362
- if (ie.current = j === !0, !t || s.modal === !1 || !W) return;
363
+ if (ie.current = j === !0, !t || c.modal === !1 || !y) return;
363
364
  const d = window.requestAnimationFrame(() => {
364
- const i = re.current, f = i && W.contains(i) ? i : Q ?? W;
365
- W.contains(document.activeElement) || f.focus({ preventScroll: !0 });
365
+ const i = re.current, f = i && y.contains(i) ? i : Q ?? y;
366
+ y.contains(document.activeElement) || f.focus({ preventScroll: !0 });
366
367
  });
367
368
  return () => window.cancelAnimationFrame(d);
368
- }, [j, s.modal, Q, W]);
369
+ }, [j, c.modal, Q, y]);
369
370
  const Fe = L(
370
371
  (t) => {
371
- if (!y || !t.isPrimary || t.button !== 0 || ht(t.target))
372
+ if (!W || !t.isPrimary || t.button !== 0 || Ft(t.target))
372
373
  return;
373
374
  const d = I.current;
374
375
  if (!d) return;
@@ -394,32 +395,32 @@ function Nt({
394
395
  [
395
396
  O,
396
397
  B,
397
- y,
398
+ W,
398
399
  k
399
400
  ]
400
401
  ), Ge = X(
401
402
  () => ({
402
403
  bodyNode: de,
403
- draggable: y,
404
+ draggable: W,
404
405
  scrollState: Z,
405
406
  setBodyNode: ze,
406
407
  setScrollState: He,
407
408
  setTitleNode: ae,
408
409
  startDrag: Fe
409
410
  }),
410
- [de, y, Z, ae, Fe]
411
+ [de, W, Z, ae, Fe]
411
412
  ), Je = et({
412
- contentNode: W,
413
+ contentNode: y,
413
414
  initialFocus: De,
414
- modal: s.modal,
415
+ modal: c.modal,
415
416
  titleNode: Q
416
417
  }), be = {
417
418
  "--oc-floating-window-stack-offset": ge * 2
418
419
  }, Ke = {
419
- ...c,
420
+ ...s,
420
421
  "--oc-floating-window-stack-offset": ge * 2
421
422
  }, ye = () => {
422
- s.windowId && s.manager?.activateWindow(s.windowId), s.onActivate?.(s.windowId);
423
+ c.windowId && c.manager?.activateWindow(c.windowId), c.onActivate?.(c.windowId);
423
424
  };
424
425
  return /* @__PURE__ */ Qe(T.Portal, { container: Be, children: [
425
426
  ve === "visible" ? /* @__PURE__ */ l(
@@ -437,7 +438,7 @@ function Nt({
437
438
  className: z.positioner,
438
439
  "data-oc-component": "floating-window-positioner",
439
440
  style: be,
440
- children: /* @__PURE__ */ l(ct.Provider, { value: Ge, children: /* @__PURE__ */ l(
441
+ children: /* @__PURE__ */ l(lt.Provider, { value: Ge, children: /* @__PURE__ */ l(
441
442
  T.Popup,
442
443
  {
443
444
  ...K,
@@ -450,8 +451,8 @@ function Nt({
450
451
  "data-oc-part": "window",
451
452
  "data-oc-positioned": qe ? "true" : "false",
452
453
  "data-oc-window-positioning": ee || n !== void 0 || r !== void 0 ? "free" : "anchored",
453
- "data-oc-window-presentation": s.presentation,
454
- "data-oc-window-modality": s.modal === !0 ? "modal" : s.modal === "trap-focus" ? "trap-focus" : "modeless",
454
+ "data-oc-window-presentation": c.presentation,
455
+ "data-oc-window-modality": c.modal === !0 ? "modal" : c.modal === "trap-focus" ? "trap-focus" : "modeless",
455
456
  "data-oc-window-active": j === void 0 ? void 0 : j ? "true" : "false",
456
457
  onFocusCapture: (t) => {
457
458
  K.onFocusCapture?.(t);
@@ -462,13 +463,13 @@ function Nt({
462
463
  K.onPointerDownCapture?.(t), !t.defaultPrevented && Me(t.target) && ye();
463
464
  },
464
465
  style: Ke,
465
- children: /* @__PURE__ */ l(
466
+ children: /* @__PURE__ */ l(st, { container: y, children: /* @__PURE__ */ l(
466
467
  "div",
467
468
  {
468
469
  className: $(
469
470
  H.surfaceMotion,
470
471
  z.presentationMotion,
471
- vt[Y]
472
+ ht[Y]
472
473
  ),
473
474
  "data-oc-modal-backdrop": ve,
474
475
  "data-oc-modal-placement": "popup",
@@ -485,17 +486,17 @@ function Nt({
485
486
  }
486
487
  )
487
488
  }
488
- )
489
+ ) })
489
490
  }
490
491
  ) })
491
492
  }
492
493
  )
493
494
  ] });
494
495
  }
495
- function Rt({
496
+ function Ct({
496
497
  children: e,
497
498
  className: o = "",
498
- onPointerDown: c,
499
+ onPointerDown: s,
499
500
  ...n
500
501
  }) {
501
502
  const r = q("FloatingWindowDragHandle");
@@ -507,20 +508,20 @@ function Rt({
507
508
  "data-oc-part": "drag-handle",
508
509
  "data-oc-draggable": r.draggable ? "true" : "false",
509
510
  onPointerDown: (a) => {
510
- c?.(a), a.defaultPrevented || r.startDrag(a);
511
+ s?.(a), a.defaultPrevented || r.startDrag(a);
511
512
  },
512
513
  children: e
513
514
  }
514
515
  );
515
516
  }
516
- function Ct({
517
+ function St({
517
518
  title: e,
518
519
  leadingContent: o,
519
- trailingContent: c,
520
+ trailingContent: s,
520
521
  closeButton: n = !0,
521
522
  closeLabel: r = "닫기",
522
523
  draggable: a = !0,
523
- children: m,
524
+ children: w,
524
525
  className: h = "",
525
526
  onPointerDown: g,
526
527
  ref: u,
@@ -538,38 +539,38 @@ function Ct({
538
539
  leadingContent: o,
539
540
  sticky: F.scrollState.scrolledFromTop,
540
541
  titleContent: e ? /* @__PURE__ */ l(Pe, { children: e }) : void 0,
541
- trailingContent: c,
542
- onPointerDown: (w) => {
543
- g?.(w), !w.defaultPrevented && a && F.startDrag(w);
542
+ trailingContent: s,
543
+ onPointerDown: (m) => {
544
+ g?.(m), !m.defaultPrevented && a && F.startDrag(m);
544
545
  },
545
- children: m
546
+ children: w
546
547
  }
547
548
  );
548
549
  }
549
- function St({
550
+ function Mt({
550
551
  handle: e = !0,
551
552
  ...o
552
553
  }) {
553
- const c = q(
554
+ const s = q(
554
555
  "FloatingWindowNavigationSection"
555
556
  );
556
557
  return /* @__PURE__ */ l(
557
558
  dt,
558
559
  {
559
560
  ...o,
560
- canRenderHandle: e && c.draggable,
561
- handleProps: { onPointerDown: c.startDrag }
561
+ canRenderHandle: e && s.draggable,
562
+ handleProps: { onPointerDown: s.startDrag }
562
563
  }
563
564
  );
564
565
  }
565
- function Mt({
566
+ function Tt({
566
567
  children: e,
567
568
  className: o = "",
568
- layout: c = "content",
569
+ layout: s = "content",
569
570
  containerClassName: n = "",
570
571
  containerProps: r,
571
572
  ref: a,
572
- ...m
573
+ ...w
573
574
  }) {
574
575
  const { bodyNode: h, setBodyNode: g, setScrollState: u } = q("FloatingWindowBody"), { setBodyRef: p, updateScrollState: F } = tt({
575
576
  bodyNode: h,
@@ -582,27 +583,27 @@ function Mt({
582
583
  bodyContainerProps: {
583
584
  ...r,
584
585
  ref: p,
585
- onScroll: (w) => {
586
- r?.onScroll?.(w), F(w.currentTarget);
586
+ onScroll: (m) => {
587
+ r?.onScroll?.(m), F(m.currentTarget);
587
588
  }
588
589
  },
589
- bodyContentProps: { ...m, ref: a, className: n },
590
- layout: c,
590
+ bodyContentProps: { ...w, ref: a, className: n },
591
+ layout: s,
591
592
  scrollAreaProps: { className: o },
592
593
  children: e
593
594
  }
594
595
  );
595
596
  }
596
- function Tt({
597
+ function xt({
597
598
  children: e,
598
599
  className: o = "",
599
- background: c = "auto",
600
+ background: s = "auto",
600
601
  ...n
601
602
  }) {
602
603
  const { scrollState: r } = q(
603
604
  "FloatingWindowFooter"
604
605
  ), a = rt(
605
- c,
606
+ s,
606
607
  r
607
608
  );
608
609
  return /* @__PURE__ */ l(
@@ -618,7 +619,7 @@ function Tt({
618
619
  function Pe({
619
620
  className: e = "",
620
621
  ref: o,
621
- ...c
622
+ ...s
622
623
  }) {
623
624
  const n = q("FloatingWindowTitle"), r = X(
624
625
  () => Ee(n.setTitleNode, o),
@@ -627,20 +628,20 @@ function Pe({
627
628
  return /* @__PURE__ */ l(
628
629
  T.Title,
629
630
  {
630
- ...c,
631
+ ...s,
631
632
  ref: r,
632
633
  className: $(H.initialFocusTitle, e),
633
634
  tabIndex: -1
634
635
  }
635
636
  );
636
637
  }
637
- function xt(e) {
638
+ function Et(e) {
638
639
  return /* @__PURE__ */ l(T.Description, { ...e });
639
640
  }
640
641
  function ke(e) {
641
642
  if (e.render !== void 0)
642
643
  return /* @__PURE__ */ l(T.Close, { ...e });
643
- const { className: o = "", label: c = "닫기", size: n = 24, ...r } = e;
644
+ const { className: o = "", label: s = "닫기", size: n = 24, ...r } = e;
644
645
  return /* @__PURE__ */ l(
645
646
  T.Close,
646
647
  {
@@ -649,7 +650,7 @@ function ke(e) {
649
650
  {
650
651
  ...r,
651
652
  className: $(H.close, o),
652
- "aria-label": r["aria-label"] ?? c,
653
+ "aria-label": r["aria-label"] ?? s,
653
654
  "data-oc-component": "modal-close",
654
655
  "data-oc-part": "close",
655
656
  size: n,
@@ -659,34 +660,34 @@ function ke(e) {
659
660
  }
660
661
  );
661
662
  }
662
- const Ot = Object.assign(xe, {
663
- Manager: mt,
663
+ const Xt = Object.assign(xe, {
664
+ Manager: pt,
664
665
  Root: xe,
665
- ModalRoot: yt,
666
- Trigger: Wt,
667
- Content: Nt,
668
- DragHandle: Rt,
669
- Header: Ct,
670
- NavigationSection: St,
671
- Body: Mt,
672
- Footer: Tt,
666
+ ModalRoot: Wt,
667
+ Trigger: Nt,
668
+ Content: Rt,
669
+ DragHandle: Ct,
670
+ Header: St,
671
+ NavigationSection: Mt,
672
+ Body: Tt,
673
+ Footer: xt,
673
674
  Title: Pe,
674
- Description: xt,
675
+ Description: Et,
675
676
  Close: ke
676
677
  });
677
678
  export {
678
- Mt as FloatingWindowBody,
679
+ Tt as FloatingWindowBody,
679
680
  ke as FloatingWindowClose,
680
- Nt as FloatingWindowContent,
681
- xt as FloatingWindowDescription,
682
- Rt as FloatingWindowDragHandle,
683
- Tt as FloatingWindowFooter,
684
- Ct as FloatingWindowHeader,
685
- mt as FloatingWindowManager,
686
- St as FloatingWindowNavigationSection,
681
+ Rt as FloatingWindowContent,
682
+ Et as FloatingWindowDescription,
683
+ Ct as FloatingWindowDragHandle,
684
+ xt as FloatingWindowFooter,
685
+ St as FloatingWindowHeader,
686
+ pt as FloatingWindowManager,
687
+ Mt as FloatingWindowNavigationSection,
687
688
  xe as FloatingWindowRoot,
688
689
  Pe as FloatingWindowTitle,
689
- Wt as FloatingWindowTrigger,
690
- yt as ModalWindowRoot,
691
- Ot as default
690
+ Nt as FloatingWindowTrigger,
691
+ Wt as ModalWindowRoot,
692
+ Xt as default
692
693
  };