@fluid-app/fluid-cli-theme-dev 0.1.534 → 0.1.536

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 (65) hide show
  1. package/dist/dist-cli-preview/.vite/manifest.json +276 -295
  2. package/dist/dist-cli-preview/account-screens.js +1 -1
  3. package/dist/dist-cli-preview/chunks/{Combobox-CJDvxjNn.js → Combobox-D4l7DbBy.js} +54 -53
  4. package/dist/dist-cli-preview/chunks/{ContactsScreen-DD3XWK3Q.js → ContactsScreen-CEtA3-1c.js} +903 -850
  5. package/dist/dist-cli-preview/chunks/MediaScreen-C2rOxuuv.js +8 -0
  6. package/dist/dist-cli-preview/chunks/{MemberManagementProviders-iVdfo0DH.js → MemberManagementProviders-B_YXVcDi.js} +13 -13
  7. package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-BulCAnNO.js → MemberShareablesScreen-UNjYr5R6.js} +4207 -3757
  8. package/dist/dist-cli-preview/chunks/{MessagingScreen-DlDsOy19.js → MessagingScreen-Btga_V0H.js} +24118 -21933
  9. package/dist/dist-cli-preview/chunks/MobileActionSheet-CrEH2vO7.js +1384 -0
  10. package/dist/dist-cli-preview/chunks/{MySiteScreen-BfPfyV4m.js → MySiteScreen-B1fGtPDj.js} +177 -163
  11. package/dist/dist-cli-preview/chunks/OrdersScreen-Bf9DtOCA.js +9 -0
  12. package/dist/dist-cli-preview/chunks/{OrdersScreen-C4yi3z2p.js → OrdersScreen-DyyL-P7j.js} +35 -34
  13. package/dist/dist-cli-preview/chunks/PlaylistsScreen-tws56I3H.js +8 -0
  14. package/dist/dist-cli-preview/chunks/{PortalTenantClientProvider-Clys_Bme.js → PortalTenantClientProvider-DUOOCXfW.js} +1 -1
  15. package/dist/dist-cli-preview/chunks/{ProfileScreen-e4QhExeS.js → ProfileScreen-wZO6QMrU.js} +259 -234
  16. package/dist/dist-cli-preview/chunks/ResponsiveDialog-DSDcOjhm.js +731 -0
  17. package/dist/dist-cli-preview/chunks/Select-DmRoXIkQ.js +2499 -0
  18. package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-DysTJ6w_.js → SubscriptionsScreen-BR2C0m7M.js} +3 -3
  19. package/dist/dist-cli-preview/chunks/Textarea-C59p5Cek.js +365 -0
  20. package/dist/dist-cli-preview/chunks/{account-screen-runtime-B3e0JV6I.js → account-screen-runtime-BqMndJcu.js} +1389 -1409
  21. package/dist/dist-cli-preview/chunks/{arrow-left-BOYuYcvT.js → arrow-left-CFy5J6Id.js} +1 -1
  22. package/dist/dist-cli-preview/chunks/{cli-preview-cY0EPyxC.js → cli-preview-DZOhxtLy.js} +10 -10
  23. package/dist/dist-cli-preview/chunks/{client.gen-jwIybX1j.js → client.gen-DTVKCFco.js} +12 -12
  24. package/dist/dist-cli-preview/chunks/{copy-Cm_EKxcg.js → copy-Da4VLOCZ.js} +1 -1
  25. package/dist/dist-cli-preview/chunks/{countries-api-adapter-BCS0247N.js → countries-api-adapter-Bh5QfCO1.js} +2 -2
  26. package/dist/dist-cli-preview/chunks/{create-card-entry-container-CZi7shLR.js → create-card-entry-container-ohrRYgww.js} +1939 -1929
  27. package/dist/dist-cli-preview/chunks/{hey-api-client-B6n5a7q-.js → hey-api-client-BIjWueui.js} +1 -1
  28. package/dist/dist-cli-preview/chunks/{index-CfLLmITa.js → index-BMWjXC9i.js} +405 -869
  29. package/dist/dist-cli-preview/chunks/{index-DFIsiT9r.js → index-BVehJyDQ.js} +2080 -2372
  30. package/dist/dist-cli-preview/chunks/index-_r1wSvno.js +427 -0
  31. package/dist/dist-cli-preview/chunks/{isAfter-D0zQuNEJ.js → isAfter-BR4uNpua.js} +145 -156
  32. package/dist/dist-cli-preview/chunks/{map-pin-Vt1smsNu.js → map-pin-C_cK_i_W.js} +1 -1
  33. package/dist/dist-cli-preview/chunks/messaging-B1UjYRdl.js +4 -0
  34. package/dist/dist-cli-preview/chunks/{mount-account-screen-BOVvR3Og.js → mount-account-screen-JJGALFRE.js} +8 -8
  35. package/dist/dist-cli-preview/chunks/{navigate-account-screen-D756rD78.js → navigate-account-screen-C0VoUNOi.js} +1 -1
  36. package/dist/dist-cli-preview/chunks/schemas-D0s3rDQw.js +4851 -0
  37. package/dist/dist-cli-preview/chunks/{screen-route-slug-utils-HNXiCpo6.js → screen-route-slug-utils-n2BiDZmp.js} +205 -260
  38. package/dist/dist-cli-preview/chunks/search-zEnxG69C.js +14 -0
  39. package/dist/dist-cli-preview/chunks/sheet-haptics-context-p5ZPxslK.js +133 -0
  40. package/dist/dist-cli-preview/chunks/{sidebar-BDgHluGp.js → sidebar-CjPHl33n.js} +8 -8
  41. package/dist/dist-cli-preview/chunks/{sortable.esm-Cw91KlVU.js → sortable.esm-CrxUZkb-.js} +373 -362
  42. package/dist/dist-cli-preview/chunks/{store-api-context-BCaEZBlj.js → store-api-context-0k_ECvSE.js} +1 -1
  43. package/dist/dist-cli-preview/chunks/translation-api-context-factory-CP0LBb-M.js +74 -0
  44. package/dist/dist-cli-preview/chunks/{use-mobile-BztyG-mE.js → use-mobile-DIhDH3dI.js} +1 -1
  45. package/dist/dist-cli-preview/chunks/{use-optional-store-Dl6PSQur.js → use-optional-store-t4xzc2Rl.js} +2 -2
  46. package/dist/dist-cli-preview/chunks/use-store-YC0Ovzht.js +76 -0
  47. package/dist/dist-cli-preview/chunks/{useInfiniteQuery-fL_VYHHr.js → useInfiniteQuery-Bnzu0kZa.js} +9 -20
  48. package/dist/dist-cli-preview/chunks/{users-B3YJ3D1U.js → users-CabXl4EL.js} +1 -1
  49. package/package.json +2 -2
  50. package/dist/dist-cli-preview/chunks/Breadcrumb-ixf0cTR_.js +0 -91
  51. package/dist/dist-cli-preview/chunks/MediaScreen-D8WSOaze.js +0 -8
  52. package/dist/dist-cli-preview/chunks/MobileActionSheet-aGr-nGxu.js +0 -3884
  53. package/dist/dist-cli-preview/chunks/OrdersScreen-hidM-JR_.js +0 -9
  54. package/dist/dist-cli-preview/chunks/PlaylistsScreen-BIqSXZ5B.js +0 -8
  55. package/dist/dist-cli-preview/chunks/ellipsis-C1sJRT_T.js +0 -15
  56. package/dist/dist-cli-preview/chunks/eye-BHBOtWLw.js +0 -20
  57. package/dist/dist-cli-preview/chunks/index-COIiY5Im.js +0 -135
  58. package/dist/dist-cli-preview/chunks/log-out-segl_UhK.js +0 -30
  59. package/dist/dist-cli-preview/chunks/messaging-C_IkzF0O.js +0 -4
  60. package/dist/dist-cli-preview/chunks/pause-YWP8mWBs.js +0 -41
  61. package/dist/dist-cli-preview/chunks/schemas-BiM-ImW1.js +0 -5565
  62. package/dist/dist-cli-preview/chunks/sheet-haptics-context-d9udqor0.js +0 -116
  63. package/dist/dist-cli-preview/chunks/trash-2-CZEbdFT_.js +0 -17
  64. package/dist/dist-cli-preview/chunks/use-store-aahN8SDp.js +0 -400
  65. package/dist/dist-cli-preview/chunks/user-B4pULYRZ.js +0 -14
@@ -0,0 +1,731 @@
1
+ import { c as te, j as a, X as R, aV as Ae, W as De, aW as je, af as Ie, ba as he, a0 as Oe, bb as Le, bc as ke, aX as Fe, l, az as $e, aA as Ve, P as ge, aB as Xe, aT as ze } from "./account-screen-runtime-BqMndJcu.js";
2
+ import { u as Ge } from "./sheet-haptics-context-p5ZPxslK.js";
3
+ /**
4
+ * @license lucide-react v0.575.0 - ISC
5
+ *
6
+ * This source code is licensed under the ISC license.
7
+ * See the LICENSE file in the root directory of this source tree.
8
+ */
9
+ const Ye = [
10
+ [
11
+ "path",
12
+ {
13
+ d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
14
+ key: "1a8usu"
15
+ }
16
+ ],
17
+ ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
18
+ ], Ct = te("pencil", Ye);
19
+ /**
20
+ * @license lucide-react v0.575.0 - ISC
21
+ *
22
+ * This source code is licensed under the ISC license.
23
+ * See the LICENSE file in the root directory of this source tree.
24
+ */
25
+ const Be = [
26
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
27
+ ["path", { d: "M12 5v14", key: "s699le" }]
28
+ ], Nt = te("plus", Be);
29
+ /**
30
+ * @license lucide-react v0.575.0 - ISC
31
+ *
32
+ * This source code is licensed under the ISC license.
33
+ * See the LICENSE file in the root directory of this source tree.
34
+ */
35
+ const Ue = [
36
+ ["path", { d: "M10 11v6", key: "nco0om" }],
37
+ ["path", { d: "M14 11v6", key: "outv1u" }],
38
+ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
39
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
40
+ ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
41
+ ], At = te("trash-2", Ue);
42
+ function qe({
43
+ ...n
44
+ }) {
45
+ return /* @__PURE__ */ a.jsx(Ae, { "data-slot": "dialog", ...n });
46
+ }
47
+ function xe({
48
+ ...n
49
+ }) {
50
+ const o = De();
51
+ return /* @__PURE__ */ a.jsx(
52
+ je,
53
+ {
54
+ "data-slot": "dialog-portal",
55
+ container: o,
56
+ ...n
57
+ }
58
+ );
59
+ }
60
+ function Dt({
61
+ ...n
62
+ }) {
63
+ return /* @__PURE__ */ a.jsx(he, { "data-slot": "dialog-close", ...n });
64
+ }
65
+ function We({
66
+ className: n,
67
+ ...o
68
+ }) {
69
+ return /* @__PURE__ */ a.jsx(
70
+ Fe,
71
+ {
72
+ "data-slot": "dialog-overlay",
73
+ className: R(
74
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[#030712]/70 backdrop-blur-sm",
75
+ n
76
+ ),
77
+ ...o
78
+ }
79
+ );
80
+ }
81
+ function Je({
82
+ className: n,
83
+ children: o,
84
+ showCloseButton: f = !0,
85
+ overlayClassName: d,
86
+ ...p
87
+ }) {
88
+ return /* @__PURE__ */ a.jsxs(xe, { "data-slot": "dialog-portal", children: [
89
+ /* @__PURE__ */ a.jsx(We, { className: d }),
90
+ /* @__PURE__ */ a.jsxs(
91
+ Ie,
92
+ {
93
+ "data-slot": "dialog-content",
94
+ className: R(
95
+ "bg-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
96
+ n
97
+ ),
98
+ ...p,
99
+ children: [
100
+ o,
101
+ f && /* @__PURE__ */ a.jsxs(
102
+ he,
103
+ {
104
+ "data-slot": "dialog-close",
105
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
106
+ children: [
107
+ /* @__PURE__ */ a.jsx(Oe, {}),
108
+ /* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
109
+ ]
110
+ }
111
+ )
112
+ ]
113
+ }
114
+ )
115
+ ] });
116
+ }
117
+ function Ke({
118
+ className: n,
119
+ ...o
120
+ }) {
121
+ return /* @__PURE__ */ a.jsx(
122
+ "div",
123
+ {
124
+ "data-slot": "dialog-header",
125
+ className: R("flex flex-col gap-2 text-center sm:text-left", n),
126
+ ...o
127
+ }
128
+ );
129
+ }
130
+ function jt({
131
+ className: n,
132
+ ...o
133
+ }) {
134
+ return /* @__PURE__ */ a.jsx(
135
+ "div",
136
+ {
137
+ "data-slot": "dialog-footer",
138
+ className: R(
139
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
140
+ n
141
+ ),
142
+ ...o
143
+ }
144
+ );
145
+ }
146
+ function Qe({
147
+ className: n,
148
+ ...o
149
+ }) {
150
+ return /* @__PURE__ */ a.jsx(
151
+ Le,
152
+ {
153
+ "data-slot": "dialog-title",
154
+ className: R("text-lg leading-none font-semibold", n),
155
+ ...o
156
+ }
157
+ );
158
+ }
159
+ function Ze({
160
+ className: n,
161
+ ...o
162
+ }) {
163
+ return /* @__PURE__ */ a.jsx(
164
+ ke,
165
+ {
166
+ "data-slot": "dialog-description",
167
+ className: R("text-muted-foreground text-sm", n),
168
+ ...o
169
+ }
170
+ );
171
+ }
172
+ const et = 0.25, tt = 0.35, nt = 0.4, ot = 0.35, st = 20, rt = 100, at = 180, it = 8, ct = 2, lt = 180, ut = 420, dt = 360, _ = "cubic-bezier(0.32, 0.72, 0, 1)", ee = 0.08, mt = 0.95, ft = 0.56, pt = 0.72, ht = 320, gt = 12, xt = 8, fe = 28, bt = 18, vt = {
173
+ background: "bg-background",
174
+ sidebar: "bg-sidebar"
175
+ };
176
+ function W(n, o, f) {
177
+ return Math.min(Math.max(n, o), f);
178
+ }
179
+ function yt(n, o) {
180
+ const f = o.expandedHeight - o.compactHeight;
181
+ return f <= 0 ? n >= o.expandedHeight ? 1 : 0 : W((n - o.compactHeight) / f, 0, 1);
182
+ }
183
+ function q(n, o, f, d, p) {
184
+ const E = yt(o, d), H = xt * (1 - E), I = fe - (fe - bt) * E, P = Math.max(
185
+ d.layoutViewportHeight - d.viewportBottom,
186
+ 0
187
+ );
188
+ if (n.style.bottom = "auto", n.style.top = `${Math.max(d.viewportBottom - o, 0)}px`, n.style.height = `${o + P}px`, n.style.setProperty(
189
+ "--mobile-bottom-sheet-visible-height",
190
+ `${o}px`
191
+ ), n.style.left = `${H}px`, n.style.right = `${H}px`, n.style.borderTopLeftRadius = `${I}px`, n.style.borderTopRightRadius = `${I}px`, n.style.transform = `translate3d(0, ${f}px, 0)`, p) {
192
+ const v = Math.min(f / d.compactHeight, 1);
193
+ p.style.opacity = String(1 - v);
194
+ }
195
+ }
196
+ function Mt(n, o, f) {
197
+ const d = [];
198
+ let p = n instanceof HTMLElement ? n : null;
199
+ for (; p && p !== o; )
200
+ p.scrollHeight > p.clientHeight && d.push(p), p = p.parentElement;
201
+ return d.includes(f) || d.push(f), d;
202
+ }
203
+ function wt(n) {
204
+ const o = n.ownerDocument.activeElement;
205
+ if (!(o instanceof HTMLElement) || !n.contains(o)) return;
206
+ const f = n.getBoundingClientRect(), d = o.getBoundingClientRect(), p = 12, E = f.top + p, H = f.bottom - p;
207
+ d.bottom > H ? n.scrollTop += d.bottom - H : d.top < E && (n.scrollTop -= E - d.top);
208
+ }
209
+ function Tt(n, o) {
210
+ if (be() || n <= 1) return 0;
211
+ const f = Math.max(Math.abs(o), 0.5);
212
+ return W(
213
+ n / f,
214
+ lt,
215
+ ut
216
+ );
217
+ }
218
+ function be() {
219
+ return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
220
+ }
221
+ function pe(n) {
222
+ if (!(!n || typeof n.getAnimations != "function"))
223
+ for (const o of n.getAnimations()) o.cancel();
224
+ }
225
+ function Et({
226
+ open: n,
227
+ onOpenChange: o,
228
+ title: f,
229
+ description: d,
230
+ children: p,
231
+ role: E = "dialog",
232
+ surface: H = "background",
233
+ contentOverflow: I = "hidden"
234
+ }) {
235
+ const P = Ge(), v = l.useRef(null), y = l.useRef(null), ne = l.useRef(null), oe = l.useRef(null), J = l.useRef(null), se = l.useRef(null), O = l.useRef(null), L = l.useRef("compact"), z = l.useRef(null), k = l.useRef(null), F = l.useRef(null), G = l.useRef(null), C = l.useRef(null), N = l.useRef(!1), [ve, B] = l.useState(!1), [ye, Me] = l.useState("compact"), [re, we] = l.useState(
236
+ null
237
+ ), $ = l.useCallback(
238
+ (t) => {
239
+ L.current = t, Me(t);
240
+ },
241
+ []
242
+ ), Te = l.useCallback((t) => {
243
+ if (y.current = t, we(t), !t) return;
244
+ const e = t.previousElementSibling;
245
+ if (!(e instanceof HTMLElement)) return;
246
+ const s = be() ? "1ms" : `${dt}ms`;
247
+ e.style.animationDuration = s, e.style.animationTimingFunction = _;
248
+ }, []), S = l.useCallback(() => {
249
+ z.current && (clearTimeout(z.current), z.current = null);
250
+ }, []), A = l.useCallback(() => {
251
+ k.current !== null && (window.cancelAnimationFrame(k.current), k.current = null), G.current = null;
252
+ }, []), D = l.useCallback(() => {
253
+ F.current !== null && (window.cancelAnimationFrame(F.current), F.current = null);
254
+ }, []), Ee = l.useCallback(
255
+ (t, e, s) => {
256
+ if (C.current = { height: t, offset: e }, G.current = { height: t, offset: e, layout: s }, k.current === null) {
257
+ if (typeof window.requestAnimationFrame != "function") {
258
+ const r = y.current;
259
+ if (r) {
260
+ const c = r.previousElementSibling;
261
+ q(
262
+ r,
263
+ t,
264
+ e,
265
+ s,
266
+ c instanceof HTMLElement ? c : null
267
+ );
268
+ }
269
+ G.current = null;
270
+ return;
271
+ }
272
+ k.current = window.requestAnimationFrame(() => {
273
+ k.current = null;
274
+ const r = G.current;
275
+ G.current = null;
276
+ const c = y.current;
277
+ if (c && r) {
278
+ const m = c.previousElementSibling;
279
+ q(
280
+ c,
281
+ r.height,
282
+ r.offset,
283
+ r.layout,
284
+ m instanceof HTMLElement ? m : null
285
+ );
286
+ }
287
+ });
288
+ }
289
+ },
290
+ []
291
+ ), j = l.useCallback(() => {
292
+ const t = y.current?.previousElementSibling;
293
+ return t instanceof HTMLElement ? t : null;
294
+ }, []), V = l.useCallback(() => {
295
+ const t = y.current, e = j();
296
+ t && (t.style.removeProperty("transform"), t.style.removeProperty("transition"), t.style.removeProperty("will-change")), e && (e.style.removeProperty("opacity"), e.style.removeProperty("transition"), e.style.removeProperty("will-change"));
297
+ }, [j]);
298
+ l.useLayoutEffect(() => {
299
+ const t = y.current, e = ne.current, s = oe.current, r = J.current, c = se.current;
300
+ if (!n || !t || !e || !s || !r || !c)
301
+ return;
302
+ const m = () => {
303
+ if (v.current?.started) return;
304
+ const h = window.visualViewport, u = t.ownerDocument.documentElement.clientHeight || window.innerHeight, M = Math.min(
305
+ h?.height ?? u,
306
+ u
307
+ ), w = Math.min(
308
+ (h?.offsetTop ?? 0) + M,
309
+ u
310
+ ), X = window.getComputedStyle(t), Y = Number.parseFloat(X.maxHeight), U = Math.max(
311
+ M - gt,
312
+ 1
313
+ ), T = Number.isFinite(Y) && Y > 0 ? Math.min(U, Y) : U, Ne = window.getComputedStyle(e), ae = Number.parseFloat(
314
+ Ne.paddingBottom
315
+ ), ie = window.getComputedStyle(r), ce = Number.parseFloat(
316
+ ie.paddingTop
317
+ ), le = Number.parseFloat(
318
+ ie.paddingBottom
319
+ ), ue = Math.ceil(
320
+ s.scrollHeight + c.scrollHeight + (Number.isFinite(ce) ? ce : 0) + (Number.isFinite(le) ? le : 0) + (Number.isFinite(ae) ? ae : 0)
321
+ ), Q = ue <= T * pt ? Math.min(ue, T) : Math.min(
322
+ T,
323
+ Math.max(
324
+ T * ft,
325
+ ht
326
+ )
327
+ ), Z = T - Q > 1, de = {
328
+ compactHeight: Q,
329
+ expandedHeight: T,
330
+ expandable: Z,
331
+ layoutViewportHeight: u,
332
+ viewportBottom: w
333
+ };
334
+ O.current = de, !Z && L.current === "expanded" && $("compact");
335
+ const me = (Z ? L.current : "compact") === "expanded" ? T : Q;
336
+ C.current = { height: me, offset: 0 }, q(t, me, 0, de, j()), wt(r);
337
+ };
338
+ m();
339
+ let g = null;
340
+ const x = () => {
341
+ if (g === null) {
342
+ if (typeof window.requestAnimationFrame != "function") {
343
+ m();
344
+ return;
345
+ }
346
+ g = window.requestAnimationFrame(() => {
347
+ g = null, m();
348
+ });
349
+ }
350
+ }, b = () => {
351
+ S(), V(), x();
352
+ }, i = typeof ResizeObserver > "u" ? null : new ResizeObserver(x);
353
+ return i?.observe(s), i?.observe(c), window.addEventListener("resize", b), window.visualViewport?.addEventListener("resize", b), window.visualViewport?.addEventListener("scroll", b), () => {
354
+ g !== null && window.cancelAnimationFrame(g), i?.disconnect(), window.removeEventListener("resize", b), window.visualViewport?.removeEventListener(
355
+ "resize",
356
+ b
357
+ ), window.visualViewport?.removeEventListener(
358
+ "scroll",
359
+ b
360
+ );
361
+ };
362
+ }, [
363
+ V,
364
+ S,
365
+ n,
366
+ re,
367
+ j,
368
+ $
369
+ ]), l.useEffect(() => {
370
+ n || (v.current = null, O.current = null, C.current = null, N.current = !1, B(!1), $("compact"), S(), A(), D(), V());
371
+ }, [
372
+ A,
373
+ D,
374
+ V,
375
+ S,
376
+ n,
377
+ $
378
+ ]), l.useEffect(
379
+ () => () => {
380
+ S(), A(), D();
381
+ },
382
+ [A, D, S]
383
+ );
384
+ const K = l.useCallback(
385
+ (t, e = 0, s = !0) => {
386
+ const r = y.current, c = j(), m = O.current, g = C.current, x = t === "expanded" ? m?.expandedHeight : m?.compactHeight, b = g && x !== void 0 ? Math.abs(x - g.height) + g.offset : 0, i = Tt(b, e), h = i === 0 ? "none" : [
387
+ `transform ${i}ms ${_}`,
388
+ `top ${i}ms ${_}`,
389
+ `height ${i}ms ${_}`,
390
+ `left ${i}ms ${_}`,
391
+ `right ${i}ms ${_}`,
392
+ `border-radius ${i}ms ${_}`
393
+ ].join(", "), u = i === 0 ? "none" : `opacity ${i}ms ${_}`;
394
+ if (A(), v.current = null, B(!1), s && t !== L.current && P?.(t), $(t), r && m) {
395
+ r.style.transition = h;
396
+ const M = t === "expanded" ? m.expandedHeight : m.compactHeight;
397
+ C.current = { height: M, offset: 0 }, q(r, M, 0, m);
398
+ }
399
+ c && (c.style.transition = u, c.style.opacity = "1"), S(), z.current = setTimeout(V, i);
400
+ },
401
+ [
402
+ A,
403
+ V,
404
+ S,
405
+ j,
406
+ P,
407
+ $
408
+ ]
409
+ ), Se = (t, e) => {
410
+ const s = y.current, r = j();
411
+ s && (S(), D(), pe(s), pe(r), e.started = !0, N.current = !0, B(!0), s.style.transition = "none", s.style.willChange = "transform, top, height, left, right, border-radius", r && (r.style.transition = "none", r.style.willChange = "opacity"), typeof s.setPointerCapture == "function" && s.setPointerCapture(t.pointerId));
412
+ }, He = (t) => {
413
+ if (t.button !== 0) return;
414
+ const e = y.current, s = J.current, r = O.current;
415
+ if (!e || !s || !r) return;
416
+ const c = t.target instanceof Element && t.target.closest("[data-mobile-bottom-sheet-drag-handle]") !== null;
417
+ if (t.pointerType === "mouse" && !c) return;
418
+ D(), N.current = !1;
419
+ const m = performance.now(), g = C.current ?? {
420
+ height: L.current === "expanded" ? r.expandedHeight : r.compactHeight,
421
+ offset: 0
422
+ }, x = e.getBoundingClientRect(), b = Math.max(
423
+ r.layoutViewportHeight - r.viewportBottom,
424
+ 0
425
+ ), i = Math.max(
426
+ x.height - b,
427
+ 0
428
+ ), h = i > 0 ? {
429
+ height: W(
430
+ i,
431
+ r.compactHeight,
432
+ r.expandedHeight
433
+ ),
434
+ offset: Math.max(
435
+ x.top - (r.viewportBottom - i),
436
+ 0
437
+ )
438
+ } : g;
439
+ C.current = h;
440
+ const u = {
441
+ pointerId: t.pointerId,
442
+ pointerType: t.pointerType,
443
+ startX: t.clientX,
444
+ startY: t.clientY,
445
+ lastY: t.clientY,
446
+ lastTime: m,
447
+ velocityY: 0,
448
+ sheetHeight: h.height,
449
+ sheetOffset: h.offset,
450
+ startSnapPoint: L.current,
451
+ started: !1,
452
+ contentMoved: !1,
453
+ sheetMoved: !1,
454
+ scrollElements: Mt(
455
+ t.target,
456
+ t.currentTarget,
457
+ s
458
+ )
459
+ };
460
+ v.current = u, c && t.preventDefault();
461
+ }, _e = (t) => {
462
+ const e = v.current, s = O.current;
463
+ if (!e || !s || e.pointerId !== t.pointerId)
464
+ return;
465
+ const r = t.clientX - e.startX, c = t.clientY - e.startY;
466
+ if (!e.started) {
467
+ const u = e.pointerType === "touch" ? it : ct;
468
+ if (Math.max(Math.abs(r), Math.abs(c)) < u) return;
469
+ if (!(Math.abs(c) > Math.abs(r))) {
470
+ v.current = null;
471
+ return;
472
+ }
473
+ Se(t, e);
474
+ }
475
+ if (!y.current) return;
476
+ const g = performance.now(), x = g - e.lastTime, b = t.clientY - e.lastY;
477
+ if (x > 0) {
478
+ const u = b / x;
479
+ e.velocityY = e.velocityY * 0.25 + u * 0.75;
480
+ }
481
+ e.lastY = t.clientY, e.lastTime = g;
482
+ let i = b;
483
+ const h = e.scrollElements;
484
+ if (i > 0) {
485
+ for (const M of h) {
486
+ const w = Math.min(
487
+ Math.max(M.scrollTop, 0),
488
+ i
489
+ );
490
+ if (w > 0 && (M.scrollTop -= w, i -= w, e.contentMoved = !0), i <= 0) break;
491
+ }
492
+ const u = Math.min(
493
+ Math.max(e.sheetHeight - s.compactHeight, 0),
494
+ i
495
+ );
496
+ u > 0 && (e.sheetHeight -= u, i -= u, e.sheetMoved = !0), i > 0 && (e.sheetOffset += i, e.sheetMoved = !0);
497
+ } else if (i < 0) {
498
+ let u = -i;
499
+ const M = Math.min(e.sheetOffset, u);
500
+ M > 0 && (e.sheetOffset -= M, u -= M, e.sheetMoved = !0);
501
+ const w = Math.min(
502
+ Math.max(s.expandedHeight - e.sheetHeight, 0),
503
+ u
504
+ );
505
+ if (w > 0 && (e.sheetHeight += w, u -= w, e.sheetMoved = !0), u > 0)
506
+ for (const X of h) {
507
+ const Y = Math.max(
508
+ X.scrollHeight - X.clientHeight,
509
+ 0
510
+ ), U = Math.max(
511
+ Y - X.scrollTop,
512
+ 0
513
+ ), T = Math.min(
514
+ U,
515
+ u
516
+ );
517
+ if (T > 0 && (X.scrollTop += T, u -= T, e.contentMoved = !0), u <= 0) break;
518
+ }
519
+ }
520
+ Ee(
521
+ e.sheetHeight,
522
+ e.sheetOffset,
523
+ s
524
+ ), t.preventDefault();
525
+ }, Re = (t, e) => {
526
+ if (typeof window.requestAnimationFrame != "function" || Math.abs(e) < ee)
527
+ return;
528
+ D();
529
+ let s = -e, r = performance.now();
530
+ const c = (m) => {
531
+ const g = Math.min(Math.max(m - r, 0), 32);
532
+ r = m;
533
+ let x = Math.abs(s * g);
534
+ const b = s > 0;
535
+ let i = !1;
536
+ for (const h of t) {
537
+ const u = Math.max(
538
+ h.scrollHeight - h.clientHeight,
539
+ 0
540
+ ), M = Math.max(b ? u - h.scrollTop : h.scrollTop, 0), w = Math.min(M, x);
541
+ if (w > 0 && (h.scrollTop += b ? w : -w, x -= w, i = !0), x <= 0) break;
542
+ }
543
+ if (s *= Math.pow(
544
+ mt,
545
+ g / (1e3 / 60)
546
+ ), !i || Math.abs(s) < ee) {
547
+ F.current = null;
548
+ return;
549
+ }
550
+ F.current = window.requestAnimationFrame(c);
551
+ };
552
+ F.current = window.requestAnimationFrame(c);
553
+ }, Pe = (t) => {
554
+ const e = v.current, s = O.current;
555
+ if (!e || !s || e.pointerId !== t.pointerId)
556
+ return;
557
+ if (!e.started) {
558
+ v.current = null;
559
+ return;
560
+ }
561
+ window.setTimeout(() => {
562
+ N.current = !1;
563
+ }, 0);
564
+ const c = performance.now() - e.lastTime <= rt ? e.velocityY : 0, m = y.current;
565
+ m && typeof m.hasPointerCapture == "function" && m.hasPointerCapture(t.pointerId) && m.releasePointerCapture(t.pointerId);
566
+ const g = e.sheetOffset >= s.compactHeight * et || e.sheetOffset >= st && c >= nt;
567
+ if (e.sheetOffset > 0 && g) {
568
+ A(), v.current = null, B(!1), o(!1), S(), z.current = setTimeout(() => {
569
+ y.current?.dataset.state === "open" && K("compact", 0, !1);
570
+ }, 50);
571
+ return;
572
+ }
573
+ const x = s.expandedHeight - s.compactHeight, b = W(
574
+ e.sheetHeight - (e.sheetMoved && Math.abs(c) >= ot ? c * at : 0),
575
+ s.compactHeight,
576
+ s.expandedHeight
577
+ ), h = (x > 0 ? (b - s.compactHeight) / x : 0) >= tt ? "expanded" : "compact";
578
+ K(h, c), h === "expanded" && e.contentMoved && Math.abs(c) >= ee && Re(e.scrollElements, c);
579
+ }, Ce = (t) => {
580
+ const e = v.current;
581
+ !e || e.pointerId !== t.pointerId || (N.current = !1, e.started ? K(e.startSnapPoint) : v.current = null);
582
+ };
583
+ return /* @__PURE__ */ a.jsx($e, { open: n, onOpenChange: o, children: /* @__PURE__ */ a.jsx(
584
+ Ve,
585
+ {
586
+ ref: Te,
587
+ side: "bottom",
588
+ role: E,
589
+ ...d ? {} : { "aria-describedby": void 0 },
590
+ "data-mobile-bottom-sheet": "",
591
+ "data-mobile-bottom-sheet-snap-point": ye,
592
+ className: R(
593
+ vt[H],
594
+ "max-h-[calc(100dvh-env(safe-area-inset-top)-0.75rem)] touch-pan-x gap-0 overflow-hidden border-0 px-0 pt-0 pb-0 shadow-2xl duration-500 ease-[cubic-bezier(0.32,0.72,0,1)] outline-none [animation-duration:360ms] [animation-timing-function:cubic-bezier(0.32,0.72,0,1)] focus:outline-none focus-visible:ring-0 focus-visible:outline-none data-[state=closed]:[animation-duration:300ms] motion-reduce:transition-none motion-reduce:[animation-duration:1ms]",
595
+ ve ? "transition-none" : "transition-transform",
596
+ I === "visible" && "overflow-visible"
597
+ ),
598
+ onPointerDown: He,
599
+ onPointerMove: _e,
600
+ onPointerUp: Pe,
601
+ onPointerCancel: Ce,
602
+ onClickCapture: (t) => {
603
+ N.current && (N.current = !1, t.preventDefault(), t.stopPropagation());
604
+ },
605
+ onOpenAutoFocus: (t) => {
606
+ t.preventDefault(), y.current?.focus({ preventScroll: !0 });
607
+ },
608
+ children: /* @__PURE__ */ a.jsx(ge, { container: re, children: /* @__PURE__ */ a.jsxs(
609
+ "div",
610
+ {
611
+ ref: ne,
612
+ className: "flex h-[var(--mobile-bottom-sheet-visible-height)] min-h-0 flex-col overflow-hidden pb-[env(safe-area-inset-bottom)]",
613
+ children: [
614
+ /* @__PURE__ */ a.jsxs(
615
+ "div",
616
+ {
617
+ ref: oe,
618
+ "data-mobile-bottom-sheet-drag-handle": !0,
619
+ className: "shrink-0 cursor-grab touch-none select-none active:cursor-grabbing",
620
+ children: [
621
+ /* @__PURE__ */ a.jsx(
622
+ "div",
623
+ {
624
+ "aria-hidden": "true",
625
+ className: "flex h-9 items-center justify-center",
626
+ children: /* @__PURE__ */ a.jsx("div", { className: "bg-muted-foreground/40 h-[5px] w-9 rounded-full" })
627
+ }
628
+ ),
629
+ /* @__PURE__ */ a.jsxs("div", { className: "pt-0.5 pr-[max(3rem,calc(env(safe-area-inset-right)+3rem))] pb-3 pl-[max(1rem,env(safe-area-inset-left))]", children: [
630
+ /* @__PURE__ */ a.jsx(Xe, { className: "text-foreground text-base leading-6 font-semibold", children: f }),
631
+ d ? /* @__PURE__ */ a.jsx(ze, { className: "text-muted-foreground mt-1 text-sm", children: d }) : null
632
+ ] })
633
+ ]
634
+ }
635
+ ),
636
+ /* @__PURE__ */ a.jsx(
637
+ "div",
638
+ {
639
+ ref: J,
640
+ "data-mobile-bottom-sheet-scroll-area": !0,
641
+ className: "min-h-0 flex-1 overflow-y-auto overscroll-y-contain pr-[max(0.5rem,env(safe-area-inset-right))] pb-4 pl-[max(0.5rem,env(safe-area-inset-left))]",
642
+ children: /* @__PURE__ */ a.jsx(
643
+ "div",
644
+ {
645
+ ref: se,
646
+ "data-mobile-bottom-sheet-content": !0,
647
+ className: "min-w-0",
648
+ children: p
649
+ }
650
+ )
651
+ }
652
+ )
653
+ ]
654
+ }
655
+ ) })
656
+ }
657
+ ) });
658
+ }
659
+ const St = {
660
+ compact: "sm:max-w-sm",
661
+ medium: "sm:max-w-lg",
662
+ wide: "sm:max-w-xl"
663
+ };
664
+ function It({
665
+ open: n,
666
+ onOpenChange: o,
667
+ title: f,
668
+ description: d,
669
+ children: p,
670
+ role: E = "dialog",
671
+ presentation: H = "dialog",
672
+ size: I = "medium",
673
+ contentOverflow: P = "hidden"
674
+ }) {
675
+ const [v, y] = l.useState(
676
+ null
677
+ );
678
+ return H === "bottom-sheet" ? /* @__PURE__ */ a.jsx(
679
+ Et,
680
+ {
681
+ open: n,
682
+ onOpenChange: o,
683
+ title: f,
684
+ description: d,
685
+ role: E,
686
+ contentOverflow: P,
687
+ children: /* @__PURE__ */ a.jsx("div", { className: "space-y-6 px-2", children: p })
688
+ }
689
+ ) : /* @__PURE__ */ a.jsx(qe, { open: n, onOpenChange: o, children: /* @__PURE__ */ a.jsx(xe, { children: /* @__PURE__ */ a.jsx(
690
+ "div",
691
+ {
692
+ ref: y,
693
+ className: "pointer-events-none fixed inset-0 z-[1100]",
694
+ children: v && /* @__PURE__ */ a.jsx(ge, { container: v, children: /* @__PURE__ */ a.jsxs(
695
+ Je,
696
+ {
697
+ role: E,
698
+ ...d ? {} : { "aria-describedby": void 0 },
699
+ className: R(
700
+ "max-h-[90vh] gap-0 p-0",
701
+ P === "visible" ? "overflow-visible" : "overflow-hidden",
702
+ St[I]
703
+ ),
704
+ children: [
705
+ /* @__PURE__ */ a.jsxs(Ke, { className: "shrink-0 px-6 pt-6 pb-4", children: [
706
+ /* @__PURE__ */ a.jsx(Qe, { children: f }),
707
+ d ? /* @__PURE__ */ a.jsx(Ze, { children: d }) : null
708
+ ] }),
709
+ /* @__PURE__ */ a.jsx("div", { className: "min-h-0 space-y-6 overflow-y-auto px-6 pb-6", children: p })
710
+ ]
711
+ }
712
+ ) })
713
+ }
714
+ ) }) });
715
+ }
716
+ export {
717
+ qe as D,
718
+ Et as M,
719
+ Nt as P,
720
+ It as R,
721
+ At as T,
722
+ Je as a,
723
+ Qe as b,
724
+ Ze as c,
725
+ Dt as d,
726
+ jt as e,
727
+ Ct as f,
728
+ xe as g,
729
+ We as h,
730
+ Ke as i
731
+ };