@fluid-app/fluid-cli-theme-dev 0.1.433 → 0.1.435

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 (132) hide show
  1. package/dist/dist-cli-preview/.vite/manifest.json +311 -314
  2. package/dist/dist-cli-preview/account-screens.js +1 -1
  3. package/dist/dist-cli-preview/chunks/{Breadcrumb-D_SqXp7d.js → Breadcrumb-BKdVGms9.js} +1 -1
  4. package/dist/dist-cli-preview/chunks/{Combobox-Km3Vrphp.js → Combobox-CyU4gagO.js} +27 -27
  5. package/dist/dist-cli-preview/chunks/{ContactsScreen-kuRxflCD.js → ContactsScreen-nqNyMwxa.js} +370 -370
  6. package/dist/dist-cli-preview/chunks/MediaScreen-BGWqRFE4.js +8 -0
  7. package/dist/dist-cli-preview/chunks/{MemberManagementProviders-BS6VVAvZ.js → MemberManagementProviders-D8tSqPWo.js} +6 -6
  8. package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-DMuIxGxX.js → MemberShareablesScreen-nYcxHAnv.js} +1313 -1329
  9. package/dist/dist-cli-preview/chunks/MessagingScreen-DaCvmrAU.js +50551 -0
  10. package/dist/dist-cli-preview/chunks/MobileActionSheet-DaIBkwQD.js +3884 -0
  11. package/dist/dist-cli-preview/chunks/{MySiteScreen-Ch1cOkKp.js → MySiteScreen-BYY4CFhu.js} +15 -15
  12. package/dist/dist-cli-preview/chunks/OrdersScreen-DDdLpJ-7.js +9 -0
  13. package/dist/dist-cli-preview/chunks/{OrdersScreen-DFqHUrkC.js → OrdersScreen-DkZKc0Z_.js} +7 -7
  14. package/dist/dist-cli-preview/chunks/PlaylistsScreen-F04j44L-.js +8 -0
  15. package/dist/dist-cli-preview/chunks/{PortalTenantClientProvider-DWOzWTBJ.js → PortalTenantClientProvider-D6a79po2.js} +1 -1
  16. package/dist/dist-cli-preview/chunks/{ProfileScreen-C_gqCV47.js → ProfileScreen-BPw0o_kl.js} +222 -237
  17. package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-DiXGHeoZ.js → SubscriptionsScreen-DuiI_9iF.js} +3 -3
  18. package/dist/dist-cli-preview/chunks/{account-screen-runtime-BjzMc3GU.js → account-screen-runtime-BYj9PrHT.js} +2326 -2358
  19. package/dist/dist-cli-preview/chunks/ar-1KIG4DjU.js +1032 -0
  20. package/dist/dist-cli-preview/chunks/{arrow-left-D62DJteK.js → arrow-left-DnjGVTam.js} +1 -1
  21. package/dist/dist-cli-preview/chunks/bg-yBy5d6ww.js +1032 -0
  22. package/dist/dist-cli-preview/chunks/bn-BDIXtBiu.js +1032 -0
  23. package/dist/dist-cli-preview/chunks/{cli-preview-c45YGC1E.js → cli-preview-C-nTMZQi.js} +10 -10
  24. package/dist/dist-cli-preview/chunks/{client.gen-DfWiOTes.js → client.gen-DO8I8bB0.js} +9 -9
  25. package/dist/dist-cli-preview/chunks/{copy-zqKnEIeM.js → copy-COLmacny.js} +1 -1
  26. package/dist/dist-cli-preview/chunks/{countries-api-adapter-DRty_8ei.js → countries-api-adapter-B2ub-v6x.js} +2 -2
  27. package/dist/dist-cli-preview/chunks/{create-card-entry-container-4VLe3B5O.js → create-card-entry-container-C7h1cYNe.js} +7380 -7374
  28. package/dist/dist-cli-preview/chunks/cs-eyeSjS66.js +1032 -0
  29. package/dist/dist-cli-preview/chunks/da-BMwLUsWZ.js +1032 -0
  30. package/dist/dist-cli-preview/chunks/de-CWgvDnNQ.js +1032 -0
  31. package/dist/dist-cli-preview/chunks/el-BhX-RBtB.js +1032 -0
  32. package/dist/dist-cli-preview/chunks/ellipsis-wdxlMcjt.js +15 -0
  33. package/dist/dist-cli-preview/chunks/es-fIpwOat4.js +1032 -0
  34. package/dist/dist-cli-preview/chunks/{eye-Ce93vUsx.js → eye-Cs-LW2s_.js} +1 -1
  35. package/dist/dist-cli-preview/chunks/fi-BI9n529u.js +1032 -0
  36. package/dist/dist-cli-preview/chunks/fr-DMDmmtDd.js +1032 -0
  37. package/dist/dist-cli-preview/chunks/he-BQxAPia2.js +1032 -0
  38. package/dist/dist-cli-preview/chunks/{hey-api-client-GUem9W6L.js → hey-api-client-C0XYGcOp.js} +1 -1
  39. package/dist/dist-cli-preview/chunks/hi--CH25zD0.js +1032 -0
  40. package/dist/dist-cli-preview/chunks/hr-vHPscpGv.js +1032 -0
  41. package/dist/dist-cli-preview/chunks/hu-BQTLt458.js +1032 -0
  42. package/dist/dist-cli-preview/chunks/id-R9lUJSOz.js +1032 -0
  43. package/dist/dist-cli-preview/chunks/{index-B_xDY7q5.js → index-C3BTHcpz.js} +249 -232
  44. package/dist/dist-cli-preview/chunks/{index-DotYg_8P.js → index-DSTWchdg.js} +2294 -2088
  45. package/dist/dist-cli-preview/chunks/index-qwhiPvOP.js +135 -0
  46. package/dist/dist-cli-preview/chunks/isAfter-CcghMy5x.js +1324 -0
  47. package/dist/dist-cli-preview/chunks/it-iN8sGAC0.js +1032 -0
  48. package/dist/dist-cli-preview/chunks/ja-BGIZaAW0.js +1032 -0
  49. package/dist/dist-cli-preview/chunks/ko-Cr6Wl_2I.js +1032 -0
  50. package/dist/dist-cli-preview/chunks/log-out-BIykSy7b.js +30 -0
  51. package/dist/dist-cli-preview/chunks/{map-pin-C_2_P4BZ.js → map-pin-Be34_dU6.js} +1 -1
  52. package/dist/dist-cli-preview/chunks/messaging-D7ENrup9.js +4 -0
  53. package/dist/dist-cli-preview/chunks/{mount-account-screen-DLu4WsoN.js → mount-account-screen-BfLjUsgR.js} +8 -8
  54. package/dist/dist-cli-preview/chunks/ms-CVPERbjz.js +1032 -0
  55. package/dist/dist-cli-preview/chunks/{navigate-account-screen-Zm16FA01.js → navigate-account-screen-CiKHtySl.js} +1 -1
  56. package/dist/dist-cli-preview/chunks/nl-38XjLPxf.js +1032 -0
  57. package/dist/dist-cli-preview/chunks/no-C9CyNben.js +1032 -0
  58. package/dist/dist-cli-preview/chunks/pause-BBpqu34U.js +41 -0
  59. package/dist/dist-cli-preview/chunks/pl-DmR9h5su.js +1032 -0
  60. package/dist/dist-cli-preview/chunks/pt-t-mbd11H.js +1032 -0
  61. package/dist/dist-cli-preview/chunks/ro-T2DyDJMM.js +1032 -0
  62. package/dist/dist-cli-preview/chunks/ru-DEgbQN8m.js +1032 -0
  63. package/dist/dist-cli-preview/chunks/{schemas-CcDaDYH8.js → schemas-EHBiwcQ2.js} +1748 -1618
  64. package/dist/dist-cli-preview/chunks/{screen-route-slug-utils-CKharc6_.js → screen-route-slug-utils-Bq-L-ohr.js} +1 -1
  65. package/dist/dist-cli-preview/chunks/{sheet-haptics-context-DTfySPrq.js → sheet-haptics-context-DT2_eUzd.js} +1 -1
  66. package/dist/dist-cli-preview/chunks/{sidebar-CkC-f9zG.js → sidebar-C09syHYk.js} +10 -10
  67. package/dist/dist-cli-preview/chunks/sk-CFYGY_a5.js +1032 -0
  68. package/dist/dist-cli-preview/chunks/{sortable.esm-e9hcrOle.js → sortable.esm-ClljxXn3.js} +2 -2
  69. package/dist/dist-cli-preview/chunks/{store-api-context-CDtl_X71.js → store-api-context-DzwRm7gt.js} +1 -1
  70. package/dist/dist-cli-preview/chunks/sv-i61vcDan.js +1032 -0
  71. package/dist/dist-cli-preview/chunks/th-DfFRan1t.js +1032 -0
  72. package/dist/dist-cli-preview/chunks/tl-olBNOPcn.js +1032 -0
  73. package/dist/dist-cli-preview/chunks/tr-LZKZ4tKb.js +1032 -0
  74. package/dist/dist-cli-preview/chunks/trash-2-CZhp1ODr.js +17 -0
  75. package/dist/dist-cli-preview/chunks/uk-BtXttbkl.js +1032 -0
  76. package/dist/dist-cli-preview/chunks/{use-mobile-DF76-293.js → use-mobile-B7ojcHh2.js} +3 -3
  77. package/dist/dist-cli-preview/chunks/{use-optional-store-DT9WAQPd.js → use-optional-store-DJYDCvhI.js} +2 -2
  78. package/dist/dist-cli-preview/chunks/use-store-DeK8QAFv.js +400 -0
  79. package/dist/dist-cli-preview/chunks/{useInfiniteQuery-CDXQnWw0.js → useInfiniteQuery-FHeNizQM.js} +1 -1
  80. package/dist/dist-cli-preview/chunks/{user-B-jZvwGL.js → user-ozIT6Hhj.js} +1 -1
  81. package/dist/dist-cli-preview/chunks/{users-TuK7MiQN.js → users-JoDv7hjw.js} +1 -1
  82. package/dist/dist-cli-preview/chunks/vi-BHWnhETf.js +1032 -0
  83. package/dist/dist-cli-preview/chunks/zh_CN-CTgClYOF.js +1032 -0
  84. package/dist/dist-cli-preview/chunks/zh_TW-aQ6cE6PF.js +1032 -0
  85. package/package.json +2 -2
  86. package/dist/dist-cli-preview/chunks/MediaScreen-BvJdBMeQ.js +0 -8
  87. package/dist/dist-cli-preview/chunks/MessagingScreen-BKHqT1Ej.js +0 -35760
  88. package/dist/dist-cli-preview/chunks/MobileActionSheet-CBoGiv4j.js +0 -2950
  89. package/dist/dist-cli-preview/chunks/OrdersScreen-BGgj4BZS.js +0 -9
  90. package/dist/dist-cli-preview/chunks/PlaylistsScreen-Bx1XIkZA.js +0 -8
  91. package/dist/dist-cli-preview/chunks/Select-sVTiAmsy.js +0 -952
  92. package/dist/dist-cli-preview/chunks/Textarea-D-fkMEdH.js +0 -349
  93. package/dist/dist-cli-preview/chunks/ar-2rvzIrIR.js +0 -626
  94. package/dist/dist-cli-preview/chunks/bg-BYPRLePV.js +0 -626
  95. package/dist/dist-cli-preview/chunks/bn-C0wttE43.js +0 -626
  96. package/dist/dist-cli-preview/chunks/cs-C7Irs0-j.js +0 -626
  97. package/dist/dist-cli-preview/chunks/da-80sKijLl.js +0 -626
  98. package/dist/dist-cli-preview/chunks/de-tvILU4R6.js +0 -626
  99. package/dist/dist-cli-preview/chunks/el-B3kxyML7.js +0 -626
  100. package/dist/dist-cli-preview/chunks/es-BTQqBZ3c.js +0 -626
  101. package/dist/dist-cli-preview/chunks/fi-B3aiDLBd.js +0 -626
  102. package/dist/dist-cli-preview/chunks/fr-C6aLQLnC.js +0 -626
  103. package/dist/dist-cli-preview/chunks/he-yMMGeZ3u.js +0 -626
  104. package/dist/dist-cli-preview/chunks/hi-Cnovv3v0.js +0 -626
  105. package/dist/dist-cli-preview/chunks/hr-B9M6sJu9.js +0 -626
  106. package/dist/dist-cli-preview/chunks/hu-D__s9KvX.js +0 -626
  107. package/dist/dist-cli-preview/chunks/id-CrrK_-vk.js +0 -626
  108. package/dist/dist-cli-preview/chunks/index-BF-Yok75.js +0 -341
  109. package/dist/dist-cli-preview/chunks/it-C_g-lMfy.js +0 -626
  110. package/dist/dist-cli-preview/chunks/ja-Dmdbg-it.js +0 -626
  111. package/dist/dist-cli-preview/chunks/ko-C-jyYnAw.js +0 -626
  112. package/dist/dist-cli-preview/chunks/lock-B3ps7XBv.js +0 -14
  113. package/dist/dist-cli-preview/chunks/log-out-CDzQuZ5N.js +0 -15
  114. package/dist/dist-cli-preview/chunks/messaging-BETZIbiu.js +0 -4
  115. package/dist/dist-cli-preview/chunks/ms-Bk6rBm7W.js +0 -626
  116. package/dist/dist-cli-preview/chunks/nl-Bh5tyFlK.js +0 -626
  117. package/dist/dist-cli-preview/chunks/no-BqMQtHFU.js +0 -626
  118. package/dist/dist-cli-preview/chunks/pl-B4xTBpA_.js +0 -626
  119. package/dist/dist-cli-preview/chunks/pt-Biz6F-Fo.js +0 -626
  120. package/dist/dist-cli-preview/chunks/ro-BKd4fPGi.js +0 -626
  121. package/dist/dist-cli-preview/chunks/ru-CD8HG55y.js +0 -626
  122. package/dist/dist-cli-preview/chunks/sk-5vqOdyEq.js +0 -626
  123. package/dist/dist-cli-preview/chunks/sv-D-_y-QCE.js +0 -626
  124. package/dist/dist-cli-preview/chunks/th-BHVHNGsc.js +0 -626
  125. package/dist/dist-cli-preview/chunks/tl-DdaRIJXv.js +0 -626
  126. package/dist/dist-cli-preview/chunks/tr-CP55XLFp.js +0 -626
  127. package/dist/dist-cli-preview/chunks/trash-2-C5c1weGY.js +0 -137
  128. package/dist/dist-cli-preview/chunks/uk-C5cwrSwu.js +0 -626
  129. package/dist/dist-cli-preview/chunks/use-store-DUukxuYV.js +0 -92
  130. package/dist/dist-cli-preview/chunks/vi-7y-mSoow.js +0 -626
  131. package/dist/dist-cli-preview/chunks/zh_CN-cvRqvqNw.js +0 -626
  132. package/dist/dist-cli-preview/chunks/zh_TW-_Qzm5B74.js +0 -626
@@ -1,952 +0,0 @@
1
- import { c as _e, l as o, ak as nt, aW as Te, j as n, aa as rt, ba as be, bq as st, aj as k, ab as j, am as P, ad as $, bb as at, a7 as Ne, aX as lt, ac as ct, br as it, bs as dt, bt as ut, bu as pt, bv as ft, bc as mt, an as Pe, M as te, be as ht } from "./account-screen-runtime-BjzMc3GU.js";
2
- import { k as Ee, R as vt, A as gt, V as xt, l as St, n as wt, C as Re } from "./MobileActionSheet-CBoGiv4j.js";
3
- import { C as Ct } from "./schemas-CcDaDYH8.js";
4
- /**
5
- * @license lucide-react v0.575.0 - ISC
6
- *
7
- * This source code is licensed under the ISC license.
8
- * See the LICENSE file in the root directory of this source tree.
9
- */
10
- const yt = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], bt = _e("chevron-up", yt);
11
- /**
12
- * @license lucide-react v0.575.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */
17
- const It = [
18
- ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
19
- ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
20
- ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
21
- ], po = _e("ellipsis", It);
22
- var Tt = [" ", "Enter", "ArrowUp", "ArrowDown"], Pt = [" ", "Enter"], J = "Select", [ie, de, _t] = st(J), [oe] = rt(J, [
23
- _t,
24
- Ee
25
- ]), ue = Ee(), [Nt, G] = oe(J), [Et, Rt] = oe(J), je = (t) => {
26
- const {
27
- __scopeSelect: r,
28
- children: e,
29
- open: c,
30
- defaultOpen: a,
31
- onOpenChange: u,
32
- value: s,
33
- defaultValue: l,
34
- onValueChange: i,
35
- dir: f,
36
- name: g,
37
- autoComplete: w,
38
- disabled: _,
39
- required: I,
40
- form: y
41
- } = t, d = ue(r), [h, x] = o.useState(null), [m, v] = o.useState(null), [F, M] = o.useState(!1), ne = nt(f), [N, O] = Te({
42
- prop: c,
43
- defaultProp: a ?? !1,
44
- onChange: u,
45
- caller: J
46
- }), [W, q] = Te({
47
- prop: s,
48
- defaultProp: l,
49
- onChange: i,
50
- caller: J
51
- }), L = o.useRef(null), B = h ? y || !!h.closest("form") : !0, [z, V] = o.useState(/* @__PURE__ */ new Set()), H = Array.from(z).map((E) => E.props.value).join(";");
52
- return /* @__PURE__ */ n.jsx(vt, { ...d, children: /* @__PURE__ */ n.jsxs(
53
- Nt,
54
- {
55
- required: I,
56
- scope: r,
57
- trigger: h,
58
- onTriggerChange: x,
59
- valueNode: m,
60
- onValueNodeChange: v,
61
- valueNodeHasChildren: F,
62
- onValueNodeHasChildrenChange: M,
63
- contentId: be(),
64
- value: W,
65
- onValueChange: q,
66
- open: N,
67
- onOpenChange: O,
68
- dir: ne,
69
- triggerPointerDownPosRef: L,
70
- disabled: _,
71
- children: [
72
- /* @__PURE__ */ n.jsx(ie.Provider, { scope: r, children: /* @__PURE__ */ n.jsx(
73
- Et,
74
- {
75
- scope: t.__scopeSelect,
76
- onNativeOptionAdd: o.useCallback((E) => {
77
- V((D) => new Set(D).add(E));
78
- }, []),
79
- onNativeOptionRemove: o.useCallback((E) => {
80
- V((D) => {
81
- const U = new Set(D);
82
- return U.delete(E), U;
83
- });
84
- }, []),
85
- children: e
86
- }
87
- ) }),
88
- B ? /* @__PURE__ */ n.jsxs(
89
- Qe,
90
- {
91
- "aria-hidden": !0,
92
- required: I,
93
- tabIndex: -1,
94
- name: g,
95
- autoComplete: w,
96
- value: W,
97
- onChange: (E) => q(E.target.value),
98
- disabled: _,
99
- form: y,
100
- children: [
101
- W === void 0 ? /* @__PURE__ */ n.jsx("option", { value: "" }) : null,
102
- Array.from(z)
103
- ]
104
- },
105
- H
106
- ) : null
107
- ]
108
- }
109
- ) });
110
- };
111
- je.displayName = J;
112
- var Me = "SelectTrigger", Ae = o.forwardRef(
113
- (t, r) => {
114
- const { __scopeSelect: e, disabled: c = !1, ...a } = t, u = ue(e), s = G(Me, e), l = s.disabled || c, i = k(r, s.onTriggerChange), f = de(e), g = o.useRef("touch"), [w, _, I] = tt((d) => {
115
- const h = f().filter((v) => !v.disabled), x = h.find((v) => v.value === s.value), m = ot(h, d, x);
116
- m !== void 0 && s.onValueChange(m.value);
117
- }), y = (d) => {
118
- l || (s.onOpenChange(!0), I()), d && (s.triggerPointerDownPosRef.current = {
119
- x: Math.round(d.pageX),
120
- y: Math.round(d.pageY)
121
- });
122
- };
123
- return /* @__PURE__ */ n.jsx(gt, { asChild: !0, ...u, children: /* @__PURE__ */ n.jsx(
124
- j.button,
125
- {
126
- type: "button",
127
- role: "combobox",
128
- "aria-controls": s.contentId,
129
- "aria-expanded": s.open,
130
- "aria-required": s.required,
131
- "aria-autocomplete": "none",
132
- dir: s.dir,
133
- "data-state": s.open ? "open" : "closed",
134
- disabled: l,
135
- "data-disabled": l ? "" : void 0,
136
- "data-placeholder": et(s.value) ? "" : void 0,
137
- ...a,
138
- ref: i,
139
- onClick: P(a.onClick, (d) => {
140
- d.currentTarget.focus(), g.current !== "mouse" && y(d);
141
- }),
142
- onPointerDown: P(a.onPointerDown, (d) => {
143
- g.current = d.pointerType;
144
- const h = d.target;
145
- h.hasPointerCapture(d.pointerId) && h.releasePointerCapture(d.pointerId), d.button === 0 && d.ctrlKey === !1 && d.pointerType === "mouse" && (y(d), d.preventDefault());
146
- }),
147
- onKeyDown: P(a.onKeyDown, (d) => {
148
- const h = w.current !== "";
149
- !(d.ctrlKey || d.altKey || d.metaKey) && d.key.length === 1 && _(d.key), !(h && d.key === " ") && Tt.includes(d.key) && (y(), d.preventDefault());
150
- })
151
- }
152
- ) });
153
- }
154
- );
155
- Ae.displayName = Me;
156
- var Oe = "SelectValue", De = o.forwardRef(
157
- (t, r) => {
158
- const { __scopeSelect: e, className: c, style: a, children: u, placeholder: s = "", ...l } = t, i = G(Oe, e), { onValueNodeHasChildrenChange: f } = i, g = u !== void 0, w = k(r, i.onValueNodeChange);
159
- return $(() => {
160
- f(g);
161
- }, [f, g]), /* @__PURE__ */ n.jsx(
162
- j.span,
163
- {
164
- ...l,
165
- ref: w,
166
- style: { pointerEvents: "none" },
167
- children: et(i.value) ? /* @__PURE__ */ n.jsx(n.Fragment, { children: s }) : u
168
- }
169
- );
170
- }
171
- );
172
- De.displayName = Oe;
173
- var jt = "SelectIcon", ke = o.forwardRef(
174
- (t, r) => {
175
- const { __scopeSelect: e, children: c, ...a } = t;
176
- return /* @__PURE__ */ n.jsx(j.span, { "aria-hidden": !0, ...a, ref: r, children: c || "▼" });
177
- }
178
- );
179
- ke.displayName = jt;
180
- var Mt = "SelectPortal", Le = (t) => /* @__PURE__ */ n.jsx(at, { asChild: !0, ...t });
181
- Le.displayName = Mt;
182
- var Q = "SelectContent", Be = o.forwardRef(
183
- (t, r) => {
184
- const e = G(Q, t.__scopeSelect), [c, a] = o.useState();
185
- if ($(() => {
186
- a(new DocumentFragment());
187
- }, []), !e.open) {
188
- const u = c;
189
- return u ? Ne.createPortal(
190
- /* @__PURE__ */ n.jsx(Ve, { scope: t.__scopeSelect, children: /* @__PURE__ */ n.jsx(ie.Slot, { scope: t.__scopeSelect, children: /* @__PURE__ */ n.jsx("div", { children: t.children }) }) }),
191
- u
192
- ) : null;
193
- }
194
- return /* @__PURE__ */ n.jsx(He, { ...t, ref: r });
195
- }
196
- );
197
- Be.displayName = Q;
198
- var A = 10, [Ve, Y] = oe(Q), At = "SelectContentImpl", Ot = pt("SelectContent.RemoveScroll"), He = o.forwardRef(
199
- (t, r) => {
200
- const {
201
- __scopeSelect: e,
202
- position: c = "item-aligned",
203
- onCloseAutoFocus: a,
204
- onEscapeKeyDown: u,
205
- onPointerDownOutside: s,
206
- //
207
- // PopperContent props
208
- side: l,
209
- sideOffset: i,
210
- align: f,
211
- alignOffset: g,
212
- arrowPadding: w,
213
- collisionBoundary: _,
214
- collisionPadding: I,
215
- sticky: y,
216
- hideWhenDetached: d,
217
- avoidCollisions: h,
218
- //
219
- ...x
220
- } = t, m = G(Q, e), [v, F] = o.useState(null), [M, ne] = o.useState(null), N = k(r, (p) => F(p)), [O, W] = o.useState(null), [q, L] = o.useState(
221
- null
222
- ), B = de(e), [z, V] = o.useState(!1), H = o.useRef(!1);
223
- o.useEffect(() => {
224
- if (v) return it(v);
225
- }, [v]), dt();
226
- const E = o.useCallback(
227
- (p) => {
228
- const [b, ...R] = B().map((T) => T.ref.current), [S] = R.slice(-1), C = document.activeElement;
229
- for (const T of p)
230
- if (T === C || (T?.scrollIntoView({ block: "nearest" }), T === b && M && (M.scrollTop = 0), T === S && M && (M.scrollTop = M.scrollHeight), T?.focus(), document.activeElement !== C)) return;
231
- },
232
- [B, M]
233
- ), D = o.useCallback(
234
- () => E([O, v]),
235
- [E, O, v]
236
- );
237
- o.useEffect(() => {
238
- z && D();
239
- }, [z, D]);
240
- const { onOpenChange: U, triggerPointerDownPosRef: K } = m;
241
- o.useEffect(() => {
242
- if (v) {
243
- let p = { x: 0, y: 0 };
244
- const b = (S) => {
245
- p = {
246
- x: Math.abs(Math.round(S.pageX) - (K.current?.x ?? 0)),
247
- y: Math.abs(Math.round(S.pageY) - (K.current?.y ?? 0))
248
- };
249
- }, R = (S) => {
250
- p.x <= 10 && p.y <= 10 ? S.preventDefault() : v.contains(S.target) || U(!1), document.removeEventListener("pointermove", b), K.current = null;
251
- };
252
- return K.current !== null && (document.addEventListener("pointermove", b), document.addEventListener("pointerup", R, { capture: !0, once: !0 })), () => {
253
- document.removeEventListener("pointermove", b), document.removeEventListener("pointerup", R, { capture: !0 });
254
- };
255
- }
256
- }, [v, U, K]), o.useEffect(() => {
257
- const p = () => U(!1);
258
- return window.addEventListener("blur", p), window.addEventListener("resize", p), () => {
259
- window.removeEventListener("blur", p), window.removeEventListener("resize", p);
260
- };
261
- }, [U]);
262
- const [pe, ae] = tt((p) => {
263
- const b = B().filter((C) => !C.disabled), R = b.find((C) => C.ref.current === document.activeElement), S = ot(b, p, R);
264
- S && setTimeout(() => S.ref.current.focus());
265
- }), fe = o.useCallback(
266
- (p, b, R) => {
267
- const S = !H.current && !R;
268
- (m.value !== void 0 && m.value === b || S) && (W(p), S && (H.current = !0));
269
- },
270
- [m.value]
271
- ), me = o.useCallback(() => v?.focus(), [v]), ee = o.useCallback(
272
- (p, b, R) => {
273
- const S = !H.current && !R;
274
- (m.value !== void 0 && m.value === b || S) && L(p);
275
- },
276
- [m.value]
277
- ), le = c === "popper" ? xe : Ue, re = le === xe ? {
278
- side: l,
279
- sideOffset: i,
280
- align: f,
281
- alignOffset: g,
282
- arrowPadding: w,
283
- collisionBoundary: _,
284
- collisionPadding: I,
285
- sticky: y,
286
- hideWhenDetached: d,
287
- avoidCollisions: h
288
- } : {};
289
- return /* @__PURE__ */ n.jsx(
290
- Ve,
291
- {
292
- scope: e,
293
- content: v,
294
- viewport: M,
295
- onViewportChange: ne,
296
- itemRefCallback: fe,
297
- selectedItem: O,
298
- onItemLeave: me,
299
- itemTextRefCallback: ee,
300
- focusSelectedItem: D,
301
- selectedItemText: q,
302
- position: c,
303
- isPositioned: z,
304
- searchRef: pe,
305
- children: /* @__PURE__ */ n.jsx(ut, { as: Ot, allowPinchZoom: !0, children: /* @__PURE__ */ n.jsx(
306
- ft,
307
- {
308
- asChild: !0,
309
- trapped: m.open,
310
- onMountAutoFocus: (p) => {
311
- p.preventDefault();
312
- },
313
- onUnmountAutoFocus: P(a, (p) => {
314
- m.trigger?.focus({ preventScroll: !0 }), p.preventDefault();
315
- }),
316
- children: /* @__PURE__ */ n.jsx(
317
- mt,
318
- {
319
- asChild: !0,
320
- disableOutsidePointerEvents: !0,
321
- onEscapeKeyDown: u,
322
- onPointerDownOutside: s,
323
- onFocusOutside: (p) => p.preventDefault(),
324
- onDismiss: () => m.onOpenChange(!1),
325
- children: /* @__PURE__ */ n.jsx(
326
- le,
327
- {
328
- role: "listbox",
329
- id: m.contentId,
330
- "data-state": m.open ? "open" : "closed",
331
- dir: m.dir,
332
- onContextMenu: (p) => p.preventDefault(),
333
- ...x,
334
- ...re,
335
- onPlaced: () => V(!0),
336
- ref: N,
337
- style: {
338
- // flex layout so we can place the scroll buttons properly
339
- display: "flex",
340
- flexDirection: "column",
341
- // reset the outline by default as the content MAY get focused
342
- outline: "none",
343
- ...x.style
344
- },
345
- onKeyDown: P(x.onKeyDown, (p) => {
346
- const b = p.ctrlKey || p.altKey || p.metaKey;
347
- if (p.key === "Tab" && p.preventDefault(), !b && p.key.length === 1 && ae(p.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(p.key)) {
348
- let S = B().filter((C) => !C.disabled).map((C) => C.ref.current);
349
- if (["ArrowUp", "End"].includes(p.key) && (S = S.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(p.key)) {
350
- const C = p.target, T = S.indexOf(C);
351
- S = S.slice(T + 1);
352
- }
353
- setTimeout(() => E(S)), p.preventDefault();
354
- }
355
- })
356
- }
357
- )
358
- }
359
- )
360
- }
361
- ) })
362
- }
363
- );
364
- }
365
- );
366
- He.displayName = At;
367
- var Dt = "SelectItemAlignedPosition", Ue = o.forwardRef((t, r) => {
368
- const { __scopeSelect: e, onPlaced: c, ...a } = t, u = G(Q, e), s = Y(Q, e), [l, i] = o.useState(null), [f, g] = o.useState(null), w = k(r, (N) => g(N)), _ = de(e), I = o.useRef(!1), y = o.useRef(!0), { viewport: d, selectedItem: h, selectedItemText: x, focusSelectedItem: m } = s, v = o.useCallback(() => {
369
- if (u.trigger && u.valueNode && l && f && d && h && x) {
370
- const N = u.trigger.getBoundingClientRect(), O = f.getBoundingClientRect(), W = u.valueNode.getBoundingClientRect(), q = x.getBoundingClientRect();
371
- if (u.dir !== "rtl") {
372
- const C = q.left - O.left, T = W.left - C, X = N.left - T, Z = N.width + X, he = Math.max(Z, O.width), ve = window.innerWidth - A, ge = Pe(T, [
373
- A,
374
- // Prevents the content from going off the starting edge of the
375
- // viewport. It may still go off the ending edge, but this can be
376
- // controlled by the user since they may want to manage overflow in a
377
- // specific way.
378
- // https://github.com/radix-ui/primitives/issues/2049
379
- Math.max(A, ve - he)
380
- ]);
381
- l.style.minWidth = Z + "px", l.style.left = ge + "px";
382
- } else {
383
- const C = O.right - q.right, T = window.innerWidth - W.right - C, X = window.innerWidth - N.right - T, Z = N.width + X, he = Math.max(Z, O.width), ve = window.innerWidth - A, ge = Pe(T, [
384
- A,
385
- Math.max(A, ve - he)
386
- ]);
387
- l.style.minWidth = Z + "px", l.style.right = ge + "px";
388
- }
389
- const L = _(), B = window.innerHeight - A * 2, z = d.scrollHeight, V = window.getComputedStyle(f), H = parseInt(V.borderTopWidth, 10), E = parseInt(V.paddingTop, 10), D = parseInt(V.borderBottomWidth, 10), U = parseInt(V.paddingBottom, 10), K = H + E + z + U + D, pe = Math.min(h.offsetHeight * 5, K), ae = window.getComputedStyle(d), fe = parseInt(ae.paddingTop, 10), me = parseInt(ae.paddingBottom, 10), ee = N.top + N.height / 2 - A, le = B - ee, re = h.offsetHeight / 2, p = h.offsetTop + re, b = H + E + p, R = K - b;
390
- if (b <= ee) {
391
- const C = L.length > 0 && h === L[L.length - 1].ref.current;
392
- l.style.bottom = "0px";
393
- const T = f.clientHeight - d.offsetTop - d.offsetHeight, X = Math.max(
394
- le,
395
- re + // viewport might have padding bottom, include it to avoid a scrollable viewport
396
- (C ? me : 0) + T + D
397
- ), Z = b + X;
398
- l.style.height = Z + "px";
399
- } else {
400
- const C = L.length > 0 && h === L[0].ref.current;
401
- l.style.top = "0px";
402
- const X = Math.max(
403
- ee,
404
- H + d.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
405
- (C ? fe : 0) + re
406
- ) + R;
407
- l.style.height = X + "px", d.scrollTop = b - ee + d.offsetTop;
408
- }
409
- l.style.margin = `${A}px 0`, l.style.minHeight = pe + "px", l.style.maxHeight = B + "px", c?.(), requestAnimationFrame(() => I.current = !0);
410
- }
411
- }, [
412
- _,
413
- u.trigger,
414
- u.valueNode,
415
- l,
416
- f,
417
- d,
418
- h,
419
- x,
420
- u.dir,
421
- c
422
- ]);
423
- $(() => v(), [v]);
424
- const [F, M] = o.useState();
425
- $(() => {
426
- f && M(window.getComputedStyle(f).zIndex);
427
- }, [f]);
428
- const ne = o.useCallback(
429
- (N) => {
430
- N && y.current === !0 && (v(), m?.(), y.current = !1);
431
- },
432
- [v, m]
433
- );
434
- return /* @__PURE__ */ n.jsx(
435
- Lt,
436
- {
437
- scope: e,
438
- contentWrapper: l,
439
- shouldExpandOnScrollRef: I,
440
- onScrollButtonChange: ne,
441
- children: /* @__PURE__ */ n.jsx(
442
- "div",
443
- {
444
- ref: i,
445
- style: {
446
- display: "flex",
447
- flexDirection: "column",
448
- position: "fixed",
449
- zIndex: F
450
- },
451
- children: /* @__PURE__ */ n.jsx(
452
- j.div,
453
- {
454
- ...a,
455
- ref: w,
456
- style: {
457
- // When we get the height of the content, it includes borders. If we were to set
458
- // the height without having `boxSizing: 'border-box'` it would be too big.
459
- boxSizing: "border-box",
460
- // We need to ensure the content doesn't get taller than the wrapper
461
- maxHeight: "100%",
462
- ...a.style
463
- }
464
- }
465
- )
466
- }
467
- )
468
- }
469
- );
470
- });
471
- Ue.displayName = Dt;
472
- var kt = "SelectPopperPosition", xe = o.forwardRef((t, r) => {
473
- const {
474
- __scopeSelect: e,
475
- align: c = "start",
476
- collisionPadding: a = A,
477
- ...u
478
- } = t, s = ue(e);
479
- return /* @__PURE__ */ n.jsx(
480
- St,
481
- {
482
- ...s,
483
- ...u,
484
- ref: r,
485
- align: c,
486
- collisionPadding: a,
487
- style: {
488
- // Ensure border-box for floating-ui calculations
489
- boxSizing: "border-box",
490
- ...u.style,
491
- "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
492
- "--radix-select-content-available-width": "var(--radix-popper-available-width)",
493
- "--radix-select-content-available-height": "var(--radix-popper-available-height)",
494
- "--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
495
- "--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
496
- }
497
- }
498
- );
499
- });
500
- xe.displayName = kt;
501
- var [Lt, Ie] = oe(Q, {}), Se = "SelectViewport", Fe = o.forwardRef(
502
- (t, r) => {
503
- const { __scopeSelect: e, nonce: c, ...a } = t, u = Y(Se, e), s = Ie(Se, e), l = k(r, u.onViewportChange), i = o.useRef(0);
504
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
505
- /* @__PURE__ */ n.jsx(
506
- "style",
507
- {
508
- dangerouslySetInnerHTML: {
509
- __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
510
- },
511
- nonce: c
512
- }
513
- ),
514
- /* @__PURE__ */ n.jsx(ie.Slot, { scope: e, children: /* @__PURE__ */ n.jsx(
515
- j.div,
516
- {
517
- "data-radix-select-viewport": "",
518
- role: "presentation",
519
- ...a,
520
- ref: l,
521
- style: {
522
- // we use position: 'relative' here on the `viewport` so that when we call
523
- // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
524
- // (independent of the scrollUpButton).
525
- position: "relative",
526
- flex: 1,
527
- // Viewport should only be scrollable in the vertical direction.
528
- // This won't work in vertical writing modes, so we'll need to
529
- // revisit this if/when that is supported
530
- // https://developer.chrome.com/blog/vertical-form-controls
531
- overflow: "hidden auto",
532
- ...a.style
533
- },
534
- onScroll: P(a.onScroll, (f) => {
535
- const g = f.currentTarget, { contentWrapper: w, shouldExpandOnScrollRef: _ } = s;
536
- if (_?.current && w) {
537
- const I = Math.abs(i.current - g.scrollTop);
538
- if (I > 0) {
539
- const y = window.innerHeight - A * 2, d = parseFloat(w.style.minHeight), h = parseFloat(w.style.height), x = Math.max(d, h);
540
- if (x < y) {
541
- const m = x + I, v = Math.min(y, m), F = m - v;
542
- w.style.height = v + "px", w.style.bottom === "0px" && (g.scrollTop = F > 0 ? F : 0, w.style.justifyContent = "flex-end");
543
- }
544
- }
545
- }
546
- i.current = g.scrollTop;
547
- })
548
- }
549
- ) })
550
- ] });
551
- }
552
- );
553
- Fe.displayName = Se;
554
- var We = "SelectGroup", [Bt, Vt] = oe(We), Ht = o.forwardRef(
555
- (t, r) => {
556
- const { __scopeSelect: e, ...c } = t, a = be();
557
- return /* @__PURE__ */ n.jsx(Bt, { scope: e, id: a, children: /* @__PURE__ */ n.jsx(j.div, { role: "group", "aria-labelledby": a, ...c, ref: r }) });
558
- }
559
- );
560
- Ht.displayName = We;
561
- var ze = "SelectLabel", Ut = o.forwardRef(
562
- (t, r) => {
563
- const { __scopeSelect: e, ...c } = t, a = Vt(ze, e);
564
- return /* @__PURE__ */ n.jsx(j.div, { id: a.id, ...c, ref: r });
565
- }
566
- );
567
- Ut.displayName = ze;
568
- var ce = "SelectItem", [Ft, Ke] = oe(ce), $e = o.forwardRef(
569
- (t, r) => {
570
- const {
571
- __scopeSelect: e,
572
- value: c,
573
- disabled: a = !1,
574
- textValue: u,
575
- ...s
576
- } = t, l = G(ce, e), i = Y(ce, e), f = l.value === c, [g, w] = o.useState(u ?? ""), [_, I] = o.useState(!1), y = k(
577
- r,
578
- (m) => i.itemRefCallback?.(m, c, a)
579
- ), d = be(), h = o.useRef("touch"), x = () => {
580
- a || (l.onValueChange(c), l.onOpenChange(!1));
581
- };
582
- if (c === "")
583
- throw new Error(
584
- "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
585
- );
586
- return /* @__PURE__ */ n.jsx(
587
- Ft,
588
- {
589
- scope: e,
590
- value: c,
591
- disabled: a,
592
- textId: d,
593
- isSelected: f,
594
- onItemTextChange: o.useCallback((m) => {
595
- w((v) => v || (m?.textContent ?? "").trim());
596
- }, []),
597
- children: /* @__PURE__ */ n.jsx(
598
- ie.ItemSlot,
599
- {
600
- scope: e,
601
- value: c,
602
- disabled: a,
603
- textValue: g,
604
- children: /* @__PURE__ */ n.jsx(
605
- j.div,
606
- {
607
- role: "option",
608
- "aria-labelledby": d,
609
- "data-highlighted": _ ? "" : void 0,
610
- "aria-selected": f && _,
611
- "data-state": f ? "checked" : "unchecked",
612
- "aria-disabled": a || void 0,
613
- "data-disabled": a ? "" : void 0,
614
- tabIndex: a ? void 0 : -1,
615
- ...s,
616
- ref: y,
617
- onFocus: P(s.onFocus, () => I(!0)),
618
- onBlur: P(s.onBlur, () => I(!1)),
619
- onClick: P(s.onClick, () => {
620
- h.current !== "mouse" && x();
621
- }),
622
- onPointerUp: P(s.onPointerUp, () => {
623
- h.current === "mouse" && x();
624
- }),
625
- onPointerDown: P(s.onPointerDown, (m) => {
626
- h.current = m.pointerType;
627
- }),
628
- onPointerMove: P(s.onPointerMove, (m) => {
629
- h.current = m.pointerType, a ? i.onItemLeave?.() : h.current === "mouse" && m.currentTarget.focus({ preventScroll: !0 });
630
- }),
631
- onPointerLeave: P(s.onPointerLeave, (m) => {
632
- m.currentTarget === document.activeElement && i.onItemLeave?.();
633
- }),
634
- onKeyDown: P(s.onKeyDown, (m) => {
635
- i.searchRef?.current !== "" && m.key === " " || (Pt.includes(m.key) && x(), m.key === " " && m.preventDefault());
636
- })
637
- }
638
- )
639
- }
640
- )
641
- }
642
- );
643
- }
644
- );
645
- $e.displayName = ce;
646
- var se = "SelectItemText", Ge = o.forwardRef(
647
- (t, r) => {
648
- const { __scopeSelect: e, className: c, style: a, ...u } = t, s = G(se, e), l = Y(se, e), i = Ke(se, e), f = Rt(se, e), [g, w] = o.useState(null), _ = k(
649
- r,
650
- (x) => w(x),
651
- i.onItemTextChange,
652
- (x) => l.itemTextRefCallback?.(x, i.value, i.disabled)
653
- ), I = g?.textContent, y = o.useMemo(
654
- () => /* @__PURE__ */ n.jsx("option", { value: i.value, disabled: i.disabled, children: I }, i.value),
655
- [i.disabled, i.value, I]
656
- ), { onNativeOptionAdd: d, onNativeOptionRemove: h } = f;
657
- return $(() => (d(y), () => h(y)), [d, h, y]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
658
- /* @__PURE__ */ n.jsx(j.span, { id: i.textId, ...u, ref: _ }),
659
- i.isSelected && s.valueNode && !s.valueNodeHasChildren ? Ne.createPortal(u.children, s.valueNode) : null
660
- ] });
661
- }
662
- );
663
- Ge.displayName = se;
664
- var Ye = "SelectItemIndicator", qe = o.forwardRef(
665
- (t, r) => {
666
- const { __scopeSelect: e, ...c } = t;
667
- return Ke(Ye, e).isSelected ? /* @__PURE__ */ n.jsx(j.span, { "aria-hidden": !0, ...c, ref: r }) : null;
668
- }
669
- );
670
- qe.displayName = Ye;
671
- var we = "SelectScrollUpButton", Xe = o.forwardRef((t, r) => {
672
- const e = Y(we, t.__scopeSelect), c = Ie(we, t.__scopeSelect), [a, u] = o.useState(!1), s = k(r, c.onScrollButtonChange);
673
- return $(() => {
674
- if (e.viewport && e.isPositioned) {
675
- let l = function() {
676
- const f = i.scrollTop > 0;
677
- u(f);
678
- };
679
- const i = e.viewport;
680
- return l(), i.addEventListener("scroll", l), () => i.removeEventListener("scroll", l);
681
- }
682
- }, [e.viewport, e.isPositioned]), a ? /* @__PURE__ */ n.jsx(
683
- Je,
684
- {
685
- ...t,
686
- ref: s,
687
- onAutoScroll: () => {
688
- const { viewport: l, selectedItem: i } = e;
689
- l && i && (l.scrollTop = l.scrollTop - i.offsetHeight);
690
- }
691
- }
692
- ) : null;
693
- });
694
- Xe.displayName = we;
695
- var Ce = "SelectScrollDownButton", Ze = o.forwardRef((t, r) => {
696
- const e = Y(Ce, t.__scopeSelect), c = Ie(Ce, t.__scopeSelect), [a, u] = o.useState(!1), s = k(r, c.onScrollButtonChange);
697
- return $(() => {
698
- if (e.viewport && e.isPositioned) {
699
- let l = function() {
700
- const f = i.scrollHeight - i.clientHeight, g = Math.ceil(i.scrollTop) < f;
701
- u(g);
702
- };
703
- const i = e.viewport;
704
- return l(), i.addEventListener("scroll", l), () => i.removeEventListener("scroll", l);
705
- }
706
- }, [e.viewport, e.isPositioned]), a ? /* @__PURE__ */ n.jsx(
707
- Je,
708
- {
709
- ...t,
710
- ref: s,
711
- onAutoScroll: () => {
712
- const { viewport: l, selectedItem: i } = e;
713
- l && i && (l.scrollTop = l.scrollTop + i.offsetHeight);
714
- }
715
- }
716
- ) : null;
717
- });
718
- Ze.displayName = Ce;
719
- var Je = o.forwardRef((t, r) => {
720
- const { __scopeSelect: e, onAutoScroll: c, ...a } = t, u = Y("SelectScrollButton", e), s = o.useRef(null), l = de(e), i = o.useCallback(() => {
721
- s.current !== null && (window.clearInterval(s.current), s.current = null);
722
- }, []);
723
- return o.useEffect(() => () => i(), [i]), $(() => {
724
- l().find((g) => g.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
725
- }, [l]), /* @__PURE__ */ n.jsx(
726
- j.div,
727
- {
728
- "aria-hidden": !0,
729
- ...a,
730
- ref: r,
731
- style: { flexShrink: 0, ...a.style },
732
- onPointerDown: P(a.onPointerDown, () => {
733
- s.current === null && (s.current = window.setInterval(c, 50));
734
- }),
735
- onPointerMove: P(a.onPointerMove, () => {
736
- u.onItemLeave?.(), s.current === null && (s.current = window.setInterval(c, 50));
737
- }),
738
- onPointerLeave: P(a.onPointerLeave, () => {
739
- i();
740
- })
741
- }
742
- );
743
- }), Wt = "SelectSeparator", zt = o.forwardRef(
744
- (t, r) => {
745
- const { __scopeSelect: e, ...c } = t;
746
- return /* @__PURE__ */ n.jsx(j.div, { "aria-hidden": !0, ...c, ref: r });
747
- }
748
- );
749
- zt.displayName = Wt;
750
- var ye = "SelectArrow", Kt = o.forwardRef(
751
- (t, r) => {
752
- const { __scopeSelect: e, ...c } = t, a = ue(e), u = G(ye, e), s = Y(ye, e);
753
- return u.open && s.position === "popper" ? /* @__PURE__ */ n.jsx(wt, { ...a, ...c, ref: r }) : null;
754
- }
755
- );
756
- Kt.displayName = ye;
757
- var $t = "SelectBubbleInput", Qe = o.forwardRef(
758
- ({ __scopeSelect: t, value: r, ...e }, c) => {
759
- const a = o.useRef(null), u = k(c, a), s = lt(r);
760
- return o.useEffect(() => {
761
- const l = a.current;
762
- if (!l) return;
763
- const i = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(
764
- i,
765
- "value"
766
- ).set;
767
- if (s !== r && g) {
768
- const w = new Event("change", { bubbles: !0 });
769
- g.call(l, r), l.dispatchEvent(w);
770
- }
771
- }, [s, r]), /* @__PURE__ */ n.jsx(
772
- j.select,
773
- {
774
- ...e,
775
- style: { ...xt, ...e.style },
776
- ref: u,
777
- defaultValue: r
778
- }
779
- );
780
- }
781
- );
782
- Qe.displayName = $t;
783
- function et(t) {
784
- return t === "" || t === void 0;
785
- }
786
- function tt(t) {
787
- const r = ct(t), e = o.useRef(""), c = o.useRef(0), a = o.useCallback(
788
- (s) => {
789
- const l = e.current + s;
790
- r(l), (function i(f) {
791
- e.current = f, window.clearTimeout(c.current), f !== "" && (c.current = window.setTimeout(() => i(""), 1e3));
792
- })(l);
793
- },
794
- [r]
795
- ), u = o.useCallback(() => {
796
- e.current = "", window.clearTimeout(c.current);
797
- }, []);
798
- return o.useEffect(() => () => window.clearTimeout(c.current), []), [e, a, u];
799
- }
800
- function ot(t, r, e) {
801
- const a = r.length > 1 && Array.from(r).every((f) => f === r[0]) ? r[0] : r, u = e ? t.indexOf(e) : -1;
802
- let s = Gt(t, Math.max(u, 0));
803
- a.length === 1 && (s = s.filter((f) => f !== e));
804
- const i = s.find(
805
- (f) => f.textValue.toLowerCase().startsWith(a.toLowerCase())
806
- );
807
- return i !== e ? i : void 0;
808
- }
809
- function Gt(t, r) {
810
- return t.map((e, c) => t[(r + c) % t.length]);
811
- }
812
- var Yt = je, qt = Ae, Xt = De, Zt = ke, Jt = Le, Qt = Be, eo = Fe, to = $e, oo = Ge, no = qe, ro = Xe, so = Ze;
813
- function fo({
814
- ...t
815
- }) {
816
- return /* @__PURE__ */ n.jsx(Yt, { "data-slot": "select", ...t });
817
- }
818
- function mo({
819
- ...t
820
- }) {
821
- return /* @__PURE__ */ n.jsx(Xt, { "data-slot": "select-value", ...t });
822
- }
823
- function ho({
824
- className: t,
825
- size: r = "default",
826
- children: e,
827
- ...c
828
- }) {
829
- return /* @__PURE__ */ n.jsxs(
830
- qt,
831
- {
832
- "data-slot": "select-trigger",
833
- "data-size": r,
834
- className: te(
835
- "border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
836
- t
837
- ),
838
- ...c,
839
- children: [
840
- e,
841
- /* @__PURE__ */ n.jsx(Zt, { asChild: !0, children: /* @__PURE__ */ n.jsx(Re, { className: "size-4 opacity-50" }) })
842
- ]
843
- }
844
- );
845
- }
846
- function vo({
847
- className: t,
848
- children: r,
849
- position: e = "item-aligned",
850
- align: c = "center",
851
- ...a
852
- }) {
853
- const u = ht();
854
- return /* @__PURE__ */ n.jsx(Jt, { container: u, children: /* @__PURE__ */ n.jsxs(
855
- Qt,
856
- {
857
- "data-slot": "select-content",
858
- className: te(
859
- "bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
860
- e === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
861
- t
862
- ),
863
- position: e,
864
- align: c,
865
- ...a,
866
- children: [
867
- /* @__PURE__ */ n.jsx(ao, {}),
868
- /* @__PURE__ */ n.jsx(
869
- eo,
870
- {
871
- className: te(
872
- "p-1",
873
- e === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
874
- ),
875
- children: r
876
- }
877
- ),
878
- /* @__PURE__ */ n.jsx(lo, {})
879
- ]
880
- }
881
- ) });
882
- }
883
- function go({
884
- className: t,
885
- children: r,
886
- ...e
887
- }) {
888
- return /* @__PURE__ */ n.jsxs(
889
- to,
890
- {
891
- "data-slot": "select-item",
892
- className: te(
893
- "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
894
- t
895
- ),
896
- ...e,
897
- children: [
898
- /* @__PURE__ */ n.jsx(
899
- "span",
900
- {
901
- "data-slot": "select-item-indicator",
902
- className: "absolute right-2 flex size-3.5 items-center justify-center",
903
- children: /* @__PURE__ */ n.jsx(no, { children: /* @__PURE__ */ n.jsx(Ct, { className: "size-4" }) })
904
- }
905
- ),
906
- /* @__PURE__ */ n.jsx(oo, { children: r })
907
- ]
908
- }
909
- );
910
- }
911
- function ao({
912
- className: t,
913
- ...r
914
- }) {
915
- return /* @__PURE__ */ n.jsx(
916
- ro,
917
- {
918
- "data-slot": "select-scroll-up-button",
919
- className: te(
920
- "flex cursor-default items-center justify-center py-1",
921
- t
922
- ),
923
- ...r,
924
- children: /* @__PURE__ */ n.jsx(bt, { className: "size-4" })
925
- }
926
- );
927
- }
928
- function lo({
929
- className: t,
930
- ...r
931
- }) {
932
- return /* @__PURE__ */ n.jsx(
933
- so,
934
- {
935
- "data-slot": "select-scroll-down-button",
936
- className: te(
937
- "flex cursor-default items-center justify-center py-1",
938
- t
939
- ),
940
- ...r,
941
- children: /* @__PURE__ */ n.jsx(Re, { className: "size-4" })
942
- }
943
- );
944
- }
945
- export {
946
- po as E,
947
- fo as S,
948
- ho as a,
949
- mo as b,
950
- vo as c,
951
- go as d
952
- };