@marimo-team/islands 0.25.3-dev48 → 0.25.3-dev51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-COS3f8io.js → ConnectedDataExplorerComponent-Da5OoEUL.js} +9 -9
- package/dist/{ErrorBoundary-DHfwqB0K.js → ErrorBoundary-CbxCC2kk.js} +8 -8
- package/dist/{abnfDiagram-VCTEODGH-DQ4bKxYa.js → abnfDiagram-VCTEODGH-Bz3mrprX.js} +2 -2
- package/dist/{any-language-editor-DQItQSua.js → any-language-editor-k2B8YI3Y.js} +2 -2
- package/dist/{architectureDiagram-5GKGNRK7-BA7-SI7Q.js → architectureDiagram-5GKGNRK7-Cs5ujb9K.js} +1 -1
- package/dist/{chat-ui-DlUp75HS.js → chat-ui-C1Gjgokv.js} +44 -44
- package/dist/{check-C209OH-W.js → check-P35dc2dH.js} +1 -1
- package/dist/{chunk-IMKFNOWR-DPY3kqOV.js → chunk-IMKFNOWR-CcTSaxZt.js} +1 -1
- package/dist/{chunk-SHT3W25Y-C14Ikodf.js → chunk-SHT3W25Y-DcJcjOaO.js} +1 -1
- package/dist/{chunk-SVP7TREG-BKu0HO4I.js → chunk-SVP7TREG-BVtDTjaF.js} +1 -1
- package/dist/{chunk-TICWLB2K-iJDDWGtE.js → chunk-TICWLB2K-BkDFkh8q.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-HuJXQI0F.js → classDiagram-ZZMXUADV-CfAt7HT5.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-CpmmpTbC.js → classDiagram-v2-VYDZK3BY-CGEjNYa2.js} +2 -2
- package/dist/{code-visibility-5llx6KCK.js → code-visibility-DoZ9lxzx.js} +5 -5
- package/dist/{common-DBC1NAar.js → common-D1PacyXO.js} +75 -75
- package/dist/{copy-icon-L-mFk59e.js → copy-icon-CPoxUG7G.js} +2 -2
- package/dist/{cynefinDiagram-5FMLGOSQ-uh0puAW2.js → cynefinDiagram-5FMLGOSQ-BW6NmfJi.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-4LBeAAMz.js → dagre-GXQ25YYZ-CWg3CTuF.js} +1 -1
- package/dist/{data-grid-overlay-editor-D01HzlXg.js → data-grid-overlay-editor-B50UpkXd.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-BXPmZ2sX.js → diagram-S7CK7UJ4-BPxtoS-z.js} +1 -1
- package/dist/{diagram-UQ7AKVKN--Xz9UNpC.js → diagram-UQ7AKVKN-DA-vJdFL.js} +1 -1
- package/dist/{diagram-VX7I27RA-rt8VIRNT.js → diagram-VX7I27RA-D6bkR84S.js} +1 -1
- package/dist/{diagram-Z3DM3KII-Cs1GqfDD.js → diagram-Z3DM3KII-m60g4cAT.js} +1 -1
- package/dist/{dialog-CDbPtWUD.js → dialog-C1PcpCqX.js} +24 -24
- package/dist/{dropdown-menu-ugNoZmKx.js → dropdown-menu-MG5hiCIa.js} +793 -793
- package/dist/{ebnfDiagram-PWID7BFC-CgTsgbmZ.js → ebnfDiagram-PWID7BFC-CK99sho2.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-CFoADGzT.js → erDiagram-RLTQ6QDP-Bryq0tdE.js} +1 -1
- package/dist/{error-banner-DMIrHA-R.js → error-banner-Sl2FlSJ4.js} +16 -16
- package/dist/{error-entries-D3ouOLDe.js → error-entries-CMNtA8NK.js} +25 -25
- package/dist/{feedback-button-gTC25Y-p.js → feedback-button-DqPqwryB.js} +8 -8
- package/dist/{flowDiagram-HODETNUW-BM2lvKuH.js → flowDiagram-HODETNUW-D-3aRpfS.js} +2 -2
- package/dist/{formats-C24TvExI.js → formats-6pLWWrY2.js} +1 -1
- package/dist/{glide-data-editor-BXXphavz.js → glide-data-editor-BxMhUd3K.js} +10 -10
- package/dist/{glide-utils-Q2ZsuA3h.js → glide-utils-Bt8_pBa2.js} +2 -2
- package/dist/{globals-BcxqBRmX.js → globals-DTJa_doJ.js} +3 -3
- package/dist/{html-to-image-VZvb968z.js → html-to-image-By72ALyI.js} +44 -44
- package/dist/{infoDiagram-27XIBGKW-Crwjiywp.js → infoDiagram-27XIBGKW-s1C1kgfU.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-D4US2ShV.js → ishikawaDiagram-5VMMS53U-CCsRgolY.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-Bk097CUX.js → kanban-definition-UXKFOSKX-BrmxDlcc.js} +1 -1
- package/dist/{label-CuEjBqYP.js → label-BRnUC0NX.js} +1 -1
- package/dist/main.js +614 -614
- package/dist/{mermaid-6EkeBlhr.js → mermaid-DKI0869I.js} +35 -35
- package/dist/{mindmap-definition-YA3MSWOX-DmORzfXQ.js → mindmap-definition-YA3MSWOX-641xJysF.js} +1 -1
- package/dist/{number-overlay-editor-CaspWg5p.js → number-overlay-editor-Z_H6x5b-.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-DT5TL02S.js → pegDiagram-XKGWAZYB-keVUAUeS.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-B1NwGcuH.js → pieDiagram-E7YTZNPT-DHktXPO_.js} +1 -1
- package/dist/{process-output-CCPgTShO.js → process-output-D-OMW5sV.js} +4 -4
- package/dist/{railroadDiagram-O6MQD6OU-BxoycdEu.js → railroadDiagram-O6MQD6OU-BVEF4OV_.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-DHq_eRrm.js → requirementDiagram-BXWQKSXE-CWo-UAKV.js} +1 -1
- package/dist/{reveal-component-CWk_paD2.js → reveal-component-tAB5K3QE.js} +9 -9
- package/dist/{select-D2iqeJYk.js → select-B0LRDH0g.js} +199 -199
- package/dist/{sequenceDiagram-WJ2MYXX4-Ba11BAOu.js → sequenceDiagram-WJ2MYXX4-CHQvLnq4.js} +1 -1
- package/dist/{spec-BCCcvWPS.js → spec-C-LRKGtT.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-OHQbvkbP.js → stateDiagram-D77RDMKH-BOJZgbUJ.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-BlIquvFJ.js → stateDiagram-v2-MP3YSRHH-C53XXdYH.js} +2 -2
- package/dist/{swimlanes-42K2YHIH-DSlitS4s.js → swimlanes-42K2YHIH-D2o1gOtw.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-ClwuzFNO.js → swimlanesDiagram-VR7AAH4N-BHFzN1Wk.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-hAzc5VkT.js → timeline-definition-24CTP7MA-rv7QUa46.js} +1 -1
- package/dist/toDate-CjPuEPou.js +705 -0
- package/dist/{toast-DxVfYlCp.js → toast-CFWpihJU.js} +221 -221
- package/dist/{tooltip-BCntm-jf.js → tooltip-CKO1pHJo.js} +51 -51
- package/dist/{use-restore-focus-BhXhsNLV.js → use-restore-focus-DBCITLeF.js} +1 -1
- package/dist/{useAsyncData-BbuzBAUp.js → useAsyncData-ChgNtdmE.js} +1 -1
- package/dist/{useDateFormatter-6AHbIR-J.js → useDateFormatter-c_yJtkAe.js} +2 -2
- package/dist/{useDeepCompareMemoize-da5A3c-Y.js → useDeepCompareMemoize-Bet7kSsI.js} +1 -1
- package/dist/{useLifecycle-C3nT1kwI.js → useLifecycle-VVmz_24o.js} +2 -2
- package/dist/{useTheme-BC8Lof0B.js → useTheme-DympCsQg.js} +83 -83
- package/dist/{vega-component-CF9IzE2r.js → vega-component-DnfQeoyt.js} +7 -7
- package/dist/{vennDiagram-4TSXK5OY-CINKaJgr.js → vennDiagram-4TSXK5OY-D36Zk7t-.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-KG2tlXg_.js → wardleyDiagram-VM6X3IG4-BLBolvyQ.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-XIH5cwgI.js → xychartDiagram-S5SC5T6Z-CfH57l0v.js} +1 -1
- package/package.json +1 -1
- package/src/__tests__/mount.test.ts +0 -20
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +2 -2
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +2 -2
- package/src/core/host/__tests__/notebook-client.test.ts +66 -3
- package/src/core/host/events.ts +1 -10
- package/src/core/host/notebook-client.ts +11 -18
- package/src/core/runtime/__tests__/runtime.test.ts +2 -53
- package/src/core/runtime/runtime.ts +1 -14
- package/src/core/runtime/types.ts +0 -2
- package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +2 -23
- package/src/core/websocket/__tests__/useNotebookSession.hook.test.tsx +17 -25
- package/src/core/websocket/transports/__tests__/sse.test.ts +17 -0
- package/src/core/websocket/transports/sse.ts +14 -2
- package/src/core/websocket/useNotebookClient.ts +1 -11
- package/src/core/websocket/useNotebookSession.tsx +1 -6
- package/src/mount.tsx +0 -4
- package/dist/toDate-C0jaysq2.js +0 -1184
|
@@ -2,11 +2,11 @@ import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
|
2
2
|
import { g as t, h as n, m as r, p as i, r as a, u as o } from "./button-BxB3RDjN.js";
|
|
3
3
|
import { t as s } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as c } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
-
import { c as l, h as u, l as d, p as f, s as p, u as m } from "./tooltip-
|
|
6
|
-
import { t as h } from "./check-
|
|
5
|
+
import { c as l, h as u, l as d, p as f, s as p, u as m } from "./tooltip-CKO1pHJo.js";
|
|
6
|
+
import { t as h } from "./check-P35dc2dH.js";
|
|
7
7
|
import { t as g } from "./react-dom-DUmH0GXv.js";
|
|
8
8
|
import { t as _ } from "./jsx-runtime-3BD1kT0s.js";
|
|
9
|
-
import {
|
|
9
|
+
import { Ct as v, Q as y, St as b, X as x, Y as S, _t as C, bt as ee, ct as te, dt as w, ft as T, ht as E, lt as D, pt as O, vt as k, wt as A, xt as j, yt as ne } from "./use-restore-focus-DBCITLeF.js";
|
|
10
10
|
import { t as M } from "./invariant-DLmrl-hA.js";
|
|
11
11
|
var N = u("chevron-down", [["path", {
|
|
12
12
|
d: "m6 9 6 6 6-6",
|
|
@@ -26,7 +26,7 @@ var N = u("chevron-down", [["path", {
|
|
|
26
26
|
});
|
|
27
27
|
// @__NO_SIDE_EFFECTS__
|
|
28
28
|
function V(e) {
|
|
29
|
-
let t = e + "CollectionProvider", [n, r] =
|
|
29
|
+
let t = e + "CollectionProvider", [n, r] = v(t), [a, s] = n(t, {
|
|
30
30
|
collectionRef: { current: null },
|
|
31
31
|
itemMap: /* @__PURE__ */ new Map()
|
|
32
32
|
}), c = /* @__PURE__ */ B((e) => {
|
|
@@ -79,7 +79,7 @@ function V(e) {
|
|
|
79
79
|
];
|
|
80
80
|
}
|
|
81
81
|
B(V, "createCollection");
|
|
82
|
-
var re = /* @__PURE__ */ new WeakMap(),
|
|
82
|
+
var re = /* @__PURE__ */ new WeakMap(), H = class e extends Map {
|
|
83
83
|
static {
|
|
84
84
|
B(this, "OrderedDict");
|
|
85
85
|
}
|
|
@@ -91,7 +91,7 @@ var re = /* @__PURE__ */ new WeakMap(), ie = class e extends Map {
|
|
|
91
91
|
return re.get(this) && (this.has(e) ? this.#e[this.#e.indexOf(e)] = e : this.#e.push(e)), super.set(e, t), this;
|
|
92
92
|
}
|
|
93
93
|
insert(e, t, n) {
|
|
94
|
-
let r = this.has(t), i = this.#e.length, a =
|
|
94
|
+
let r = this.has(t), i = this.#e.length, a = W(e), o = a >= 0 ? a : i + a, s = o < 0 || o >= i ? -1 : o;
|
|
95
95
|
if (s === this.size || r && s === this.size - 1 || s === -1) return this.set(t, n), this;
|
|
96
96
|
let c = this.size + +!r;
|
|
97
97
|
a < 0 && o++;
|
|
@@ -144,18 +144,18 @@ var re = /* @__PURE__ */ new WeakMap(), ie = class e extends Map {
|
|
|
144
144
|
return t !== void 0 && this.delete(t);
|
|
145
145
|
}
|
|
146
146
|
at(e) {
|
|
147
|
-
let t =
|
|
147
|
+
let t = U(this.#e, e);
|
|
148
148
|
if (t !== void 0) return this.get(t);
|
|
149
149
|
}
|
|
150
150
|
entryAt(e) {
|
|
151
|
-
let t =
|
|
151
|
+
let t = U(this.#e, e);
|
|
152
152
|
if (t !== void 0) return [t, this.get(t)];
|
|
153
153
|
}
|
|
154
154
|
indexOf(e) {
|
|
155
155
|
return this.#e.indexOf(e);
|
|
156
156
|
}
|
|
157
157
|
keyAt(e) {
|
|
158
|
-
return
|
|
158
|
+
return U(this.#e, e);
|
|
159
159
|
}
|
|
160
160
|
from(e, t) {
|
|
161
161
|
let n = this.indexOf(e);
|
|
@@ -284,28 +284,28 @@ var re = /* @__PURE__ */ new WeakMap(), ie = class e extends Map {
|
|
|
284
284
|
return !1;
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
|
-
function
|
|
287
|
+
function U(e, t) {
|
|
288
288
|
if ("at" in Array.prototype) return Array.prototype.at.call(e, t);
|
|
289
|
-
let n =
|
|
289
|
+
let n = ie(e, t);
|
|
290
290
|
return n === -1 ? void 0 : e[n];
|
|
291
291
|
}
|
|
292
|
-
B(
|
|
293
|
-
function
|
|
294
|
-
let n = e.length, r =
|
|
292
|
+
B(U, "at");
|
|
293
|
+
function ie(e, t) {
|
|
294
|
+
let n = e.length, r = W(t), i = r >= 0 ? r : n + r;
|
|
295
295
|
return i < 0 || i >= n ? -1 : i;
|
|
296
296
|
}
|
|
297
|
-
B(
|
|
298
|
-
function
|
|
297
|
+
B(ie, "toSafeIndex");
|
|
298
|
+
function W(e) {
|
|
299
299
|
return e !== e || e === 0 ? 0 : Math.trunc(e);
|
|
300
300
|
}
|
|
301
|
-
B(
|
|
301
|
+
B(W, "toSafeInteger");
|
|
302
302
|
// @__NO_SIDE_EFFECTS__
|
|
303
|
-
function
|
|
304
|
-
let t = e + "CollectionProvider", [n, r] =
|
|
303
|
+
function ae(e) {
|
|
304
|
+
let t = e + "CollectionProvider", [n, r] = v(t), [a, s] = n(t, {
|
|
305
305
|
collectionElement: null,
|
|
306
306
|
collectionRef: { current: null },
|
|
307
307
|
collectionRefObject: { current: null },
|
|
308
|
-
itemMap: new
|
|
308
|
+
itemMap: new H(),
|
|
309
309
|
setItemMap: /* @__PURE__ */ B(() => void 0, "setItemMap")
|
|
310
310
|
}), c = /* @__PURE__ */ B(({ state: e, ...t }) => e ? /* @__PURE__ */ (0, R.jsx)(u, {
|
|
311
311
|
...t,
|
|
@@ -324,7 +324,7 @@ function se(e) {
|
|
|
324
324
|
let { scope: t, children: n, state: r } = e, o = L.useRef(null), [s, c] = L.useState(null), l = i(o, c), [u, d] = r;
|
|
325
325
|
return L.useEffect(() => {
|
|
326
326
|
if (!s) return;
|
|
327
|
-
let e =
|
|
327
|
+
let e = le(() => {});
|
|
328
328
|
return e.observe(s, {
|
|
329
329
|
childList: !0,
|
|
330
330
|
subtree: !0
|
|
@@ -352,18 +352,18 @@ function se(e) {
|
|
|
352
352
|
p.displayName = d;
|
|
353
353
|
let m = e + "CollectionItemSlot", h = o(m), g = L.forwardRef((e, t) => {
|
|
354
354
|
let { scope: n, children: r, ...a } = e, o = L.useRef(null), [c, l] = L.useState(null), u = i(t, o, l), { setItemMap: d } = s(m, n), f = L.useRef(a);
|
|
355
|
-
|
|
355
|
+
oe(f.current, a) || (f.current = a);
|
|
356
356
|
let p = f.current;
|
|
357
357
|
return L.useEffect(() => {
|
|
358
358
|
let e = p;
|
|
359
359
|
return d((t) => c ? t.has(c) ? t.set(c, {
|
|
360
360
|
...e,
|
|
361
361
|
element: c
|
|
362
|
-
}).toSorted(
|
|
362
|
+
}).toSorted(ce) : (t.set(c, {
|
|
363
363
|
...e,
|
|
364
364
|
element: c
|
|
365
|
-
}), t.toSorted(
|
|
366
|
-
d((e) => !c || !e.has(c) ? e : (e.delete(c), new
|
|
365
|
+
}), t.toSorted(ce)) : t), () => {
|
|
366
|
+
d((e) => !c || !e.has(c) ? e : (e.delete(c), new H(e)));
|
|
367
367
|
};
|
|
368
368
|
}, [
|
|
369
369
|
c,
|
|
@@ -377,25 +377,25 @@ function se(e) {
|
|
|
377
377
|
});
|
|
378
378
|
g.displayName = m;
|
|
379
379
|
function _() {
|
|
380
|
-
return L.useState(new
|
|
380
|
+
return L.useState(new H());
|
|
381
381
|
}
|
|
382
382
|
B(_, "useInitCollection");
|
|
383
|
-
function
|
|
383
|
+
function y(t) {
|
|
384
384
|
let { itemMap: n } = s(e + "CollectionConsumer", t);
|
|
385
385
|
return n;
|
|
386
386
|
}
|
|
387
|
-
return B(
|
|
387
|
+
return B(y, "useCollection"), [{
|
|
388
388
|
Provider: c,
|
|
389
389
|
Slot: p,
|
|
390
390
|
ItemSlot: g
|
|
391
391
|
}, {
|
|
392
392
|
createCollectionScope: r,
|
|
393
|
-
useCollection:
|
|
393
|
+
useCollection: y,
|
|
394
394
|
useInitCollection: _
|
|
395
395
|
}];
|
|
396
396
|
}
|
|
397
|
-
B(
|
|
398
|
-
function
|
|
397
|
+
B(ae, "createCollection");
|
|
398
|
+
function oe(e, t) {
|
|
399
399
|
if (e === t) return !0;
|
|
400
400
|
if (typeof e != "object" || typeof t != "object" || e == null || t == null) return !1;
|
|
401
401
|
let n = Object.keys(e), r = Object.keys(t);
|
|
@@ -403,16 +403,16 @@ function ce(e, t) {
|
|
|
403
403
|
for (let r of n) if (!Object.prototype.hasOwnProperty.call(t, r) || e[r] !== t[r]) return !1;
|
|
404
404
|
return !0;
|
|
405
405
|
}
|
|
406
|
-
B(
|
|
407
|
-
function
|
|
406
|
+
B(oe, "shallowEqual");
|
|
407
|
+
function se(e, t) {
|
|
408
408
|
return !!(t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_PRECEDING);
|
|
409
409
|
}
|
|
410
|
-
B(
|
|
411
|
-
function
|
|
412
|
-
return !e[1].element || !t[1].element ? 0 :
|
|
410
|
+
B(se, "isElementPreceding");
|
|
411
|
+
function ce(e, t) {
|
|
412
|
+
return !e[1].element || !t[1].element ? 0 : se(e[1].element, t[1].element) ? -1 : 1;
|
|
413
413
|
}
|
|
414
|
-
B(
|
|
415
|
-
function
|
|
414
|
+
B(ce, "sortByDocumentPosition");
|
|
415
|
+
function le(e) {
|
|
416
416
|
return new MutationObserver((t) => {
|
|
417
417
|
for (let n of t) if (n.type === "childList") {
|
|
418
418
|
e();
|
|
@@ -420,77 +420,77 @@ function de(e) {
|
|
|
420
420
|
}
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
B(
|
|
423
|
+
B(le, "getChildListObserver");
|
|
424
424
|
//#endregion
|
|
425
425
|
//#region ../node_modules/.pnpm/@radix-ui+react-direction@1.1.4_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
426
|
-
var
|
|
426
|
+
var ue = Object.defineProperty, de = (e, t) => ue(e, "name", {
|
|
427
427
|
value: t,
|
|
428
428
|
configurable: !0
|
|
429
|
-
}),
|
|
430
|
-
function
|
|
431
|
-
let t = L.useContext(
|
|
429
|
+
}), fe = L.createContext(void 0);
|
|
430
|
+
function pe(e) {
|
|
431
|
+
let t = L.useContext(fe);
|
|
432
432
|
return e || t || "ltr";
|
|
433
433
|
}
|
|
434
|
-
pe
|
|
434
|
+
de(pe, "useDirection");
|
|
435
435
|
//#endregion
|
|
436
436
|
//#region ../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.4_@types+react@19.3.0_react@19.3.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
437
|
-
var
|
|
437
|
+
var me = Object.defineProperty, he = (e, t) => me(e, "name", {
|
|
438
438
|
value: t,
|
|
439
439
|
configurable: !0
|
|
440
440
|
});
|
|
441
|
-
function
|
|
441
|
+
function ge(e) {
|
|
442
442
|
let t = L.useRef({
|
|
443
443
|
value: e,
|
|
444
444
|
previous: e
|
|
445
445
|
});
|
|
446
446
|
return L.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
447
447
|
}
|
|
448
|
-
|
|
448
|
+
he(ge, "usePrevious");
|
|
449
449
|
//#endregion
|
|
450
450
|
//#region ../node_modules/.pnpm/@radix-ui+number@1.1.3/node_modules/@radix-ui/number/dist/index.mjs
|
|
451
|
-
var
|
|
451
|
+
var _e = Object.defineProperty, ve = (e, t) => _e(e, "name", {
|
|
452
452
|
value: t,
|
|
453
453
|
configurable: !0
|
|
454
454
|
});
|
|
455
|
-
function
|
|
455
|
+
function ye(e, [t, n]) {
|
|
456
456
|
return Math.min(n, Math.max(t, e));
|
|
457
457
|
}
|
|
458
|
-
|
|
458
|
+
ve(ye, "clamp");
|
|
459
459
|
//#endregion
|
|
460
460
|
//#region ../node_modules/.pnpm/@radix-ui+react-select@2.3.7_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@_c077d25a874f27141804d1923df5095a/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
461
|
-
var
|
|
461
|
+
var be = Object.defineProperty, G = (e, t) => be(e, "name", {
|
|
462
462
|
value: t,
|
|
463
463
|
configurable: !0
|
|
464
|
-
}),
|
|
464
|
+
}), xe = [
|
|
465
465
|
" ",
|
|
466
466
|
"Enter",
|
|
467
467
|
"ArrowUp",
|
|
468
468
|
"ArrowDown"
|
|
469
|
-
],
|
|
469
|
+
], Se = [" ", "Enter"], K = "Select", [Ce, we, Te] = /* @__PURE__ */ V(K), [q, Ee] = v(K, [Te, m]), De = m(), [Oe, J] = q(K), [ke, Ae] = q(K);
|
|
470
470
|
function je(e) {
|
|
471
|
-
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: l, name: u, autoComplete: f, disabled: p, required: m, form: h, internal_do_not_use_render: g } = e, _ = De(t), [v,
|
|
471
|
+
let { __scopeSelect: t, children: n, open: r, defaultOpen: i, onOpenChange: a, value: o, defaultValue: s, onValueChange: c, dir: l, name: u, autoComplete: f, disabled: p, required: m, form: h, internal_do_not_use_render: g } = e, _ = De(t), [v, y] = L.useState(null), [b, x] = L.useState(null), [S, C] = L.useState(!1), te = pe(l), [w, T] = ee({
|
|
472
472
|
prop: r,
|
|
473
473
|
defaultProp: i ?? !1,
|
|
474
474
|
onChange: a,
|
|
475
|
-
caller:
|
|
476
|
-
}), [
|
|
475
|
+
caller: K
|
|
476
|
+
}), [E, D] = ee({
|
|
477
477
|
prop: o,
|
|
478
478
|
defaultProp: s,
|
|
479
479
|
onChange: c,
|
|
480
|
-
caller:
|
|
481
|
-
}),
|
|
480
|
+
caller: K
|
|
481
|
+
}), O = L.useRef(null), A = L.useRef(E);
|
|
482
482
|
L.useEffect(() => {
|
|
483
483
|
let e = h ? v?.ownerDocument.getElementById(h) : v?.form;
|
|
484
484
|
if (e instanceof HTMLFormElement) {
|
|
485
|
-
let t = /* @__PURE__ */
|
|
485
|
+
let t = /* @__PURE__ */ G(() => D(A.current), "reset");
|
|
486
486
|
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
487
487
|
}
|
|
488
488
|
}, [
|
|
489
489
|
h,
|
|
490
490
|
v,
|
|
491
|
-
|
|
491
|
+
D
|
|
492
492
|
]);
|
|
493
|
-
let
|
|
493
|
+
let j = !v || !!h || !!v.closest("form"), [ne, M] = L.useState(/* @__PURE__ */ new Set()), N = k(), P = Array.from(ne).map((e) => e.props.value).join(";"), F = L.useCallback((e) => {
|
|
494
494
|
M((t) => new Set(t).add(e));
|
|
495
495
|
}, []), I = L.useCallback((e) => {
|
|
496
496
|
M((t) => {
|
|
@@ -500,32 +500,32 @@ function je(e) {
|
|
|
500
500
|
}, []), z = {
|
|
501
501
|
required: m,
|
|
502
502
|
trigger: v,
|
|
503
|
-
onTriggerChange:
|
|
504
|
-
valueNode:
|
|
505
|
-
onValueNodeChange:
|
|
506
|
-
valueNodeHasChildren:
|
|
507
|
-
onValueNodeHasChildrenChange:
|
|
503
|
+
onTriggerChange: y,
|
|
504
|
+
valueNode: b,
|
|
505
|
+
onValueNodeChange: x,
|
|
506
|
+
valueNodeHasChildren: S,
|
|
507
|
+
onValueNodeHasChildrenChange: C,
|
|
508
508
|
contentId: N,
|
|
509
|
-
value:
|
|
510
|
-
onValueChange:
|
|
511
|
-
open:
|
|
512
|
-
onOpenChange:
|
|
513
|
-
dir:
|
|
514
|
-
triggerPointerDownPosRef:
|
|
509
|
+
value: E,
|
|
510
|
+
onValueChange: D,
|
|
511
|
+
open: w,
|
|
512
|
+
onOpenChange: T,
|
|
513
|
+
dir: te,
|
|
514
|
+
triggerPointerDownPosRef: O,
|
|
515
515
|
disabled: p,
|
|
516
516
|
name: u,
|
|
517
517
|
autoComplete: f,
|
|
518
518
|
form: h,
|
|
519
|
-
nativeOptions:
|
|
519
|
+
nativeOptions: ne,
|
|
520
520
|
nativeSelectKey: P,
|
|
521
|
-
isFormControl:
|
|
521
|
+
isFormControl: j
|
|
522
522
|
};
|
|
523
523
|
return /* @__PURE__ */ (0, R.jsx)(d, {
|
|
524
524
|
..._,
|
|
525
525
|
children: /* @__PURE__ */ (0, R.jsx)(Oe, {
|
|
526
526
|
scope: t,
|
|
527
527
|
...z,
|
|
528
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
528
|
+
children: /* @__PURE__ */ (0, R.jsx)(Ce.Provider, {
|
|
529
529
|
scope: t,
|
|
530
530
|
children: /* @__PURE__ */ (0, R.jsx)(ke, {
|
|
531
531
|
scope: t,
|
|
@@ -537,19 +537,19 @@ function je(e) {
|
|
|
537
537
|
})
|
|
538
538
|
});
|
|
539
539
|
}
|
|
540
|
-
|
|
541
|
-
var Me = /* @__PURE__ */
|
|
540
|
+
G(je, "SelectProvider");
|
|
541
|
+
var Me = /* @__PURE__ */ G((e) => {
|
|
542
542
|
let { __scopeSelect: t, children: n, ...r } = e;
|
|
543
543
|
return /* @__PURE__ */ (0, R.jsx)(je, {
|
|
544
544
|
__scopeSelect: t,
|
|
545
545
|
...r,
|
|
546
546
|
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [n, e ? /* @__PURE__ */ (0, R.jsx)(vt, { __scopeSelect: t }) : null] })
|
|
547
547
|
});
|
|
548
|
-
}, "Select"), Ne = "SelectTrigger", Pe = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
549
|
-
let { __scopeSelect: n, disabled: r = !1, ...a } = e, o = De(n), s = J(Ne, n), c = s.disabled || r, l = i(t, s.onTriggerChange), u =
|
|
548
|
+
}, "Select"), Ne = "SelectTrigger", Pe = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
549
|
+
let { __scopeSelect: n, disabled: r = !1, ...a } = e, o = De(n), s = J(Ne, n), c = s.disabled || r, l = i(t, s.onTriggerChange), u = we(n), d = L.useRef("touch"), [f, m, h] = bt((e) => {
|
|
550
550
|
let t = u().filter((e) => !e.disabled), n = xt(t, e, t.find((e) => e.value === s.value));
|
|
551
551
|
n !== void 0 && s.onValueChange(n.value);
|
|
552
|
-
}), g = /* @__PURE__ */
|
|
552
|
+
}), g = /* @__PURE__ */ G((e) => {
|
|
553
553
|
c || (s.onOpenChange(!0), h()), e && (s.triggerPointerDownPosRef.current = {
|
|
554
554
|
x: Math.round(e.pageX),
|
|
555
555
|
y: Math.round(e.pageY)
|
|
@@ -558,7 +558,7 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
558
558
|
return /* @__PURE__ */ (0, R.jsx)(p, {
|
|
559
559
|
asChild: !0,
|
|
560
560
|
...o,
|
|
561
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
561
|
+
children: /* @__PURE__ */ (0, R.jsx)(A.button, {
|
|
562
562
|
type: "button",
|
|
563
563
|
role: "combobox",
|
|
564
564
|
"aria-controls": s.open ? s.contentId : void 0,
|
|
@@ -572,56 +572,56 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
572
572
|
"data-placeholder": Q(s.value) ? "" : void 0,
|
|
573
573
|
...a,
|
|
574
574
|
ref: l,
|
|
575
|
-
onClick:
|
|
575
|
+
onClick: b(a.onClick, (e) => {
|
|
576
576
|
e.currentTarget.focus(), d.current !== "mouse" && g(e);
|
|
577
577
|
}),
|
|
578
|
-
onPointerDown:
|
|
578
|
+
onPointerDown: b(a.onPointerDown, (e) => {
|
|
579
579
|
d.current = e.pointerType;
|
|
580
580
|
let t = e.target;
|
|
581
581
|
t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), e.button === 0 && e.ctrlKey === !1 && e.pointerType === "mouse" && (g(e), e.preventDefault());
|
|
582
582
|
}),
|
|
583
|
-
onKeyDown:
|
|
583
|
+
onKeyDown: b(a.onKeyDown, (e) => {
|
|
584
584
|
let t = f.current !== "";
|
|
585
|
-
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && m(e.key), !(t && e.key === " ") &&
|
|
585
|
+
!(e.ctrlKey || e.altKey || e.metaKey) && e.key.length === 1 && m(e.key), !(t && e.key === " ") && xe.includes(e.key) && (g(), e.preventDefault());
|
|
586
586
|
})
|
|
587
587
|
})
|
|
588
588
|
});
|
|
589
|
-
}, "SelectTrigger")), Fe = "SelectValue", Ie = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
589
|
+
}, "SelectTrigger")), Fe = "SelectValue", Ie = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
590
590
|
let { __scopeSelect: n, className: r, style: a, children: o, placeholder: s = "", ...c } = e, l = J(Fe, n), { onValueNodeHasChildrenChange: u } = l, d = o !== void 0, f = i(t, l.onValueNodeChange);
|
|
591
591
|
j(() => {
|
|
592
592
|
u(d);
|
|
593
593
|
}, [u, d]);
|
|
594
594
|
let p = Q(l.value);
|
|
595
|
-
return /* @__PURE__ */ (0, R.jsx)(
|
|
595
|
+
return /* @__PURE__ */ (0, R.jsx)(A.span, {
|
|
596
596
|
...c,
|
|
597
597
|
asChild: !p && c.asChild,
|
|
598
598
|
ref: f,
|
|
599
599
|
style: { pointerEvents: "none" },
|
|
600
600
|
children: /* @__PURE__ */ (0, R.jsx)(L.Fragment, { children: p ? s : o }, p ? "placeholder" : "value")
|
|
601
601
|
});
|
|
602
|
-
}, "SelectValue")), Le = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
602
|
+
}, "SelectValue")), Le = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
603
603
|
let { __scopeSelect: n, children: r, ...i } = e;
|
|
604
|
-
return /* @__PURE__ */ (0, R.jsx)(
|
|
604
|
+
return /* @__PURE__ */ (0, R.jsx)(A.span, {
|
|
605
605
|
"aria-hidden": !0,
|
|
606
606
|
...i,
|
|
607
607
|
ref: t,
|
|
608
608
|
children: r || "▼"
|
|
609
609
|
});
|
|
610
|
-
}, "SelectIcon")), [Re, ze] = q("SelectPortal", { forceMount: void 0 }), Be = /* @__PURE__ */
|
|
610
|
+
}, "SelectIcon")), [Re, ze] = q("SelectPortal", { forceMount: void 0 }), Be = /* @__PURE__ */ G((e) => {
|
|
611
611
|
let { __scopeSelect: t, forceMount: n, ...r } = e;
|
|
612
612
|
return /* @__PURE__ */ (0, R.jsx)(Re, {
|
|
613
613
|
scope: e.__scopeSelect,
|
|
614
614
|
forceMount: n,
|
|
615
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
615
|
+
children: /* @__PURE__ */ (0, R.jsx)(T, {
|
|
616
616
|
asChild: !0,
|
|
617
617
|
...r
|
|
618
618
|
})
|
|
619
619
|
});
|
|
620
|
-
}, "SelectPortal"), Y = "SelectContent", Ve = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
620
|
+
}, "SelectPortal"), Y = "SelectContent", Ve = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
621
621
|
let n = ze(Y, e.__scopeSelect), { forceMount: r = n.forceMount, ...i } = e, a = J(Y, e.__scopeSelect), [o, s] = L.useState();
|
|
622
622
|
return j(() => {
|
|
623
623
|
s(new DocumentFragment());
|
|
624
|
-
}, []), /* @__PURE__ */ (0, R.jsx)(
|
|
624
|
+
}, []), /* @__PURE__ */ (0, R.jsx)(ne, {
|
|
625
625
|
present: r || a.open,
|
|
626
626
|
children: ({ present: e }) => e ? /* @__PURE__ */ (0, R.jsx)(Ge, {
|
|
627
627
|
...i,
|
|
@@ -631,11 +631,11 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
631
631
|
fragment: o
|
|
632
632
|
})
|
|
633
633
|
});
|
|
634
|
-
}, "SelectContent")), He = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
634
|
+
}, "SelectContent")), He = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
635
635
|
let { __scopeSelect: n, children: r, fragment: i } = e;
|
|
636
636
|
return i ? I.createPortal(/* @__PURE__ */ (0, R.jsx)(Ue, {
|
|
637
637
|
scope: n,
|
|
638
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
638
|
+
children: /* @__PURE__ */ (0, R.jsx)(Ce.Slot, {
|
|
639
639
|
scope: n,
|
|
640
640
|
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
641
641
|
ref: t,
|
|
@@ -643,35 +643,35 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
643
643
|
})
|
|
644
644
|
})
|
|
645
645
|
}), i) : null;
|
|
646
|
-
}, "SelectContentFragment")), X = 10, [Ue, Z] = q(Y), We = o("SelectContent.RemoveScroll"), Ge = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
647
|
-
let { __scopeSelect: n } = e, { position: r = "item-aligned", onCloseAutoFocus: a, onEscapeKeyDown: o, onPointerDownOutside: s, side: c, sideOffset: l, align: u, alignOffset: d, arrowPadding: f, collisionBoundary: p, collisionPadding: m, sticky: h, hideWhenDetached: g, avoidCollisions: _, ...v } = e, y = J(Y, n), [
|
|
646
|
+
}, "SelectContentFragment")), X = 10, [Ue, Z] = q(Y), We = o("SelectContent.RemoveScroll"), Ge = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
647
|
+
let { __scopeSelect: n } = e, { position: r = "item-aligned", onCloseAutoFocus: a, onEscapeKeyDown: o, onPointerDownOutside: s, side: c, sideOffset: l, align: u, alignOffset: d, arrowPadding: f, collisionBoundary: p, collisionPadding: m, sticky: h, hideWhenDetached: g, avoidCollisions: _, ...v } = e, y = J(Y, n), [x, S] = L.useState(null), [C, ee] = L.useState(null), T = i(t, S), [k, A] = L.useState(null), [j, ne] = L.useState(null), M = we(n), [N, P] = L.useState(!1), F = L.useRef(!1);
|
|
648
648
|
L.useEffect(() => {
|
|
649
|
-
if (
|
|
650
|
-
}, [
|
|
649
|
+
if (x) return te(x);
|
|
650
|
+
}, [x]), w();
|
|
651
651
|
let I = L.useCallback((e) => {
|
|
652
652
|
let [t, ...n] = M().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
|
|
653
|
-
for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t &&
|
|
654
|
-
}, [M,
|
|
653
|
+
for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && C && (C.scrollTop = 0), n === r && C && (C.scrollTop = C.scrollHeight), n?.focus(), document.activeElement !== i)) return;
|
|
654
|
+
}, [M, C]), z = L.useCallback(() => I([k, x]), [
|
|
655
655
|
I,
|
|
656
|
-
|
|
657
|
-
|
|
656
|
+
k,
|
|
657
|
+
x
|
|
658
658
|
]);
|
|
659
659
|
L.useEffect(() => {
|
|
660
660
|
N && z();
|
|
661
661
|
}, [N, z]);
|
|
662
662
|
let { onOpenChange: B, triggerPointerDownPosRef: V } = y;
|
|
663
663
|
L.useEffect(() => {
|
|
664
|
-
if (
|
|
664
|
+
if (x) {
|
|
665
665
|
let e = {
|
|
666
666
|
x: 0,
|
|
667
667
|
y: 0
|
|
668
|
-
}, t = /* @__PURE__ */
|
|
668
|
+
}, t = /* @__PURE__ */ G((t) => {
|
|
669
669
|
e = {
|
|
670
670
|
x: Math.abs(Math.round(t.pageX) - (V.current?.x ?? 0)),
|
|
671
671
|
y: Math.abs(Math.round(t.pageY) - (V.current?.y ?? 0))
|
|
672
672
|
};
|
|
673
|
-
}, "handlePointerMove"), n = /* @__PURE__ */
|
|
674
|
-
e.x <= 10 && e.y <= 10 ? n.preventDefault() : n.composedPath().includes(
|
|
673
|
+
}, "handlePointerMove"), n = /* @__PURE__ */ G((n) => {
|
|
674
|
+
e.x <= 10 && e.y <= 10 ? n.preventDefault() : n.composedPath().includes(x) || B(!1), document.removeEventListener("pointermove", t), V.current = null;
|
|
675
675
|
}, "handlePointerUp");
|
|
676
676
|
return V.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
|
|
677
677
|
capture: !0,
|
|
@@ -681,25 +681,25 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
681
681
|
};
|
|
682
682
|
}
|
|
683
683
|
}, [
|
|
684
|
-
|
|
684
|
+
x,
|
|
685
685
|
B,
|
|
686
686
|
V
|
|
687
687
|
]), L.useEffect(() => {
|
|
688
|
-
let e = /* @__PURE__ */
|
|
688
|
+
let e = /* @__PURE__ */ G(() => B(!1), "close");
|
|
689
689
|
return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
|
|
690
690
|
window.removeEventListener("blur", e), window.removeEventListener("resize", e);
|
|
691
691
|
};
|
|
692
692
|
}, [B]);
|
|
693
|
-
let [re,
|
|
693
|
+
let [re, H] = bt((e) => {
|
|
694
694
|
let t = M().filter((e) => !e.disabled), n = xt(t, e, t.find((e) => e.ref.current === document.activeElement));
|
|
695
695
|
n && setTimeout(() => n.ref.current?.focus());
|
|
696
|
-
}),
|
|
696
|
+
}), U = L.useCallback((e, t, n) => {
|
|
697
697
|
let r = !F.current && !n;
|
|
698
698
|
(y.value !== void 0 && y.value === t || r) && (A(e), r && (F.current = !0));
|
|
699
|
-
}, [y.value]),
|
|
699
|
+
}, [y.value]), ie = L.useCallback(() => x?.focus(), [x]), W = L.useCallback((e, t, n) => {
|
|
700
700
|
let r = !F.current && !n;
|
|
701
701
|
(y.value !== void 0 && y.value === t || r) && ne(e);
|
|
702
|
-
}, [y.value]),
|
|
702
|
+
}, [y.value]), ae = r === "popper" ? qe : Ke, oe = ae === qe ? {
|
|
703
703
|
side: c,
|
|
704
704
|
sideOffset: l,
|
|
705
705
|
align: u,
|
|
@@ -713,45 +713,45 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
713
713
|
} : {};
|
|
714
714
|
return /* @__PURE__ */ (0, R.jsx)(Ue, {
|
|
715
715
|
scope: n,
|
|
716
|
-
content:
|
|
717
|
-
viewport:
|
|
718
|
-
onViewportChange:
|
|
719
|
-
itemRefCallback:
|
|
720
|
-
selectedItem:
|
|
721
|
-
onItemLeave:
|
|
722
|
-
itemTextRefCallback:
|
|
716
|
+
content: x,
|
|
717
|
+
viewport: C,
|
|
718
|
+
onViewportChange: ee,
|
|
719
|
+
itemRefCallback: U,
|
|
720
|
+
selectedItem: k,
|
|
721
|
+
onItemLeave: ie,
|
|
722
|
+
itemTextRefCallback: W,
|
|
723
723
|
focusSelectedItem: z,
|
|
724
724
|
selectedItemText: j,
|
|
725
725
|
position: r,
|
|
726
726
|
isPositioned: N,
|
|
727
727
|
searchRef: re,
|
|
728
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
728
|
+
children: /* @__PURE__ */ (0, R.jsx)(D, {
|
|
729
729
|
as: We,
|
|
730
730
|
allowPinchZoom: !0,
|
|
731
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
731
|
+
children: /* @__PURE__ */ (0, R.jsx)(O, {
|
|
732
732
|
asChild: !0,
|
|
733
733
|
trapped: y.open,
|
|
734
734
|
onMountAutoFocus: (e) => {
|
|
735
735
|
e.preventDefault();
|
|
736
736
|
},
|
|
737
|
-
onUnmountAutoFocus:
|
|
737
|
+
onUnmountAutoFocus: b(a, (e) => {
|
|
738
738
|
y.trigger?.focus({ preventScroll: !0 }), e.preventDefault();
|
|
739
739
|
}),
|
|
740
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
740
|
+
children: /* @__PURE__ */ (0, R.jsx)(E, {
|
|
741
741
|
asChild: !0,
|
|
742
742
|
disableOutsidePointerEvents: !0,
|
|
743
743
|
onEscapeKeyDown: o,
|
|
744
744
|
onPointerDownOutside: s,
|
|
745
745
|
onFocusOutside: (e) => e.preventDefault(),
|
|
746
746
|
onDismiss: () => y.onOpenChange(!1),
|
|
747
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
747
|
+
children: /* @__PURE__ */ (0, R.jsx)(ae, {
|
|
748
748
|
role: "listbox",
|
|
749
749
|
id: y.contentId,
|
|
750
750
|
"data-state": y.open ? "open" : "closed",
|
|
751
751
|
dir: y.dir,
|
|
752
752
|
onContextMenu: (e) => e.preventDefault(),
|
|
753
753
|
...v,
|
|
754
|
-
...
|
|
754
|
+
...oe,
|
|
755
755
|
onPlaced: () => P(!0),
|
|
756
756
|
ref: T,
|
|
757
757
|
style: {
|
|
@@ -760,9 +760,9 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
760
760
|
outline: "none",
|
|
761
761
|
...v.style
|
|
762
762
|
},
|
|
763
|
-
onKeyDown:
|
|
763
|
+
onKeyDown: b(v.onKeyDown, (e) => {
|
|
764
764
|
let t = e.ctrlKey || e.altKey || e.metaKey;
|
|
765
|
-
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 &&
|
|
765
|
+
if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && H(e.key), [
|
|
766
766
|
"ArrowUp",
|
|
767
767
|
"ArrowDown",
|
|
768
768
|
"Home",
|
|
@@ -781,28 +781,28 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
781
781
|
})
|
|
782
782
|
})
|
|
783
783
|
});
|
|
784
|
-
}, "SelectContentImpl")), Ke = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
785
|
-
let { __scopeSelect: n, onPlaced: r, ...a } = e, o = J(Y, n), s = Z(Y, n), [c, l] = L.useState(null), [u, d] = L.useState(null), f = i(t, d), p =
|
|
784
|
+
}, "SelectContentImpl")), Ke = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
785
|
+
let { __scopeSelect: n, onPlaced: r, ...a } = e, o = J(Y, n), s = Z(Y, n), [c, l] = L.useState(null), [u, d] = L.useState(null), f = i(t, d), p = we(n), m = L.useRef(!1), h = L.useRef(!0), { viewport: g, selectedItem: _, selectedItemText: v, focusSelectedItem: y } = s, b = L.useCallback(() => {
|
|
786
786
|
if (o.trigger && o.valueNode && c && u && g && _ && v) {
|
|
787
787
|
let e = o.trigger.getBoundingClientRect(), t = u.getBoundingClientRect(), n = o.valueNode.getBoundingClientRect(), i = v.getBoundingClientRect();
|
|
788
788
|
if (o.dir !== "rtl") {
|
|
789
|
-
let r = i.left - t.left, a = n.left - r, o = e.left - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d =
|
|
789
|
+
let r = i.left - t.left, a = n.left - r, o = e.left - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d = ye(a, [X, Math.max(X, u - l)]);
|
|
790
790
|
c.style.minWidth = s + "px", c.style.left = d + "px";
|
|
791
791
|
} else {
|
|
792
|
-
let r = t.right - i.right, a = window.innerWidth - n.right - r, o = window.innerWidth - e.right - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d =
|
|
792
|
+
let r = t.right - i.right, a = window.innerWidth - n.right - r, o = window.innerWidth - e.right - a, s = e.width + o, l = Math.max(s, t.width), u = window.innerWidth - X, d = ye(a, [X, Math.max(X, u - l)]);
|
|
793
793
|
c.style.minWidth = s + "px", c.style.right = d + "px";
|
|
794
794
|
}
|
|
795
|
-
let a = p(), s = window.innerHeight - X * 2, l = g.scrollHeight, d = window.getComputedStyle(u), f = parseInt(d.borderTopWidth, 10), h = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = f + h + l + b + y, S = Math.min(_.offsetHeight * 5, x), C = window.getComputedStyle(g),
|
|
796
|
-
if (
|
|
795
|
+
let a = p(), s = window.innerHeight - X * 2, l = g.scrollHeight, d = window.getComputedStyle(u), f = parseInt(d.borderTopWidth, 10), h = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = f + h + l + b + y, S = Math.min(_.offsetHeight * 5, x), C = window.getComputedStyle(g), ee = parseInt(C.paddingTop, 10), te = parseInt(C.paddingBottom, 10), w = e.top + e.height / 2 - X, T = s - w, E = _.offsetHeight / 2, D = _.offsetTop + E, O = f + h + D, k = x - O;
|
|
796
|
+
if (O <= w) {
|
|
797
797
|
let e = a.length > 0 && _ === a[a.length - 1].ref.current;
|
|
798
798
|
c.style.bottom = "0px";
|
|
799
|
-
let t = u.clientHeight - g.offsetTop - g.offsetHeight, n =
|
|
799
|
+
let t = u.clientHeight - g.offsetTop - g.offsetHeight, n = O + Math.max(T, E + (e ? te : 0) + t + y);
|
|
800
800
|
c.style.height = n + "px";
|
|
801
801
|
} else {
|
|
802
802
|
let e = a.length > 0 && _ === a[0].ref.current;
|
|
803
803
|
c.style.top = "0px";
|
|
804
|
-
let t = Math.max(
|
|
805
|
-
c.style.height = t + "px", g.scrollTop =
|
|
804
|
+
let t = Math.max(w, f + g.offsetTop + (e ? ee : 0) + E) + k;
|
|
805
|
+
c.style.height = t + "px", g.scrollTop = O - w + g.offsetTop;
|
|
806
806
|
}
|
|
807
807
|
c.style.margin = `${X}px 0`, c.style.minHeight = S + "px", c.style.maxHeight = s + "px", r?.(), requestAnimationFrame(() => m.current = !0);
|
|
808
808
|
}
|
|
@@ -818,28 +818,28 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
818
818
|
o.dir,
|
|
819
819
|
r
|
|
820
820
|
]);
|
|
821
|
-
j(() =>
|
|
822
|
-
let [
|
|
821
|
+
j(() => b(), [b]);
|
|
822
|
+
let [x, S] = L.useState();
|
|
823
823
|
j(() => {
|
|
824
|
-
u &&
|
|
824
|
+
u && S(window.getComputedStyle(u).zIndex);
|
|
825
825
|
}, [u]);
|
|
826
|
-
let
|
|
827
|
-
e && h.current === !0 && (
|
|
828
|
-
}, [
|
|
826
|
+
let C = L.useCallback((e) => {
|
|
827
|
+
e && h.current === !0 && (b(), y?.(), h.current = !1);
|
|
828
|
+
}, [b, y]);
|
|
829
829
|
return /* @__PURE__ */ (0, R.jsx)(Je, {
|
|
830
830
|
scope: n,
|
|
831
831
|
contentWrapper: c,
|
|
832
832
|
shouldExpandOnScrollRef: m,
|
|
833
|
-
onScrollButtonChange:
|
|
833
|
+
onScrollButtonChange: C,
|
|
834
834
|
children: /* @__PURE__ */ (0, R.jsx)("div", {
|
|
835
835
|
ref: l,
|
|
836
836
|
style: {
|
|
837
837
|
display: "flex",
|
|
838
838
|
flexDirection: "column",
|
|
839
839
|
position: "fixed",
|
|
840
|
-
zIndex:
|
|
840
|
+
zIndex: x
|
|
841
841
|
},
|
|
842
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
842
|
+
children: /* @__PURE__ */ (0, R.jsx)(A.div, {
|
|
843
843
|
...a,
|
|
844
844
|
ref: f,
|
|
845
845
|
style: {
|
|
@@ -850,7 +850,7 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
850
850
|
})
|
|
851
851
|
})
|
|
852
852
|
});
|
|
853
|
-
}, "SelectItemAlignedPosition")), qe = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
853
|
+
}, "SelectItemAlignedPosition")), qe = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
854
854
|
let { __scopeSelect: n, align: r = "start", collisionPadding: i = X, ...a } = e, o = De(n);
|
|
855
855
|
return /* @__PURE__ */ (0, R.jsx)(l, {
|
|
856
856
|
...o,
|
|
@@ -868,14 +868,14 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
868
868
|
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
869
869
|
}
|
|
870
870
|
});
|
|
871
|
-
}, "SelectPopperPosition")), [Je, Ye] = q(Y, {}), Xe = "SelectViewport", Ze = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
871
|
+
}, "SelectPopperPosition")), [Je, Ye] = q(Y, {}), Xe = "SelectViewport", Ze = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
872
872
|
let { __scopeSelect: n, nonce: r, ...a } = e, o = Z(Xe, n), s = Ye(Xe, n), c = i(t, o.onViewportChange), l = L.useRef(0);
|
|
873
873
|
return /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)("style", {
|
|
874
874
|
dangerouslySetInnerHTML: { __html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}" },
|
|
875
875
|
nonce: r
|
|
876
|
-
}), /* @__PURE__ */ (0, R.jsx)(
|
|
876
|
+
}), /* @__PURE__ */ (0, R.jsx)(Ce.Slot, {
|
|
877
877
|
scope: n,
|
|
878
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
878
|
+
children: /* @__PURE__ */ (0, R.jsx)(A.div, {
|
|
879
879
|
"data-radix-select-viewport": "",
|
|
880
880
|
role: "presentation",
|
|
881
881
|
...a,
|
|
@@ -886,7 +886,7 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
886
886
|
overflow: "hidden auto",
|
|
887
887
|
...a.style
|
|
888
888
|
},
|
|
889
|
-
onScroll:
|
|
889
|
+
onScroll: b(a.onScroll, (e) => {
|
|
890
890
|
let t = e.currentTarget, { contentWrapper: n, shouldExpandOnScrollRef: r } = s;
|
|
891
891
|
if (r?.current && n) {
|
|
892
892
|
let e = Math.abs(l.current - t.scrollTop);
|
|
@@ -902,27 +902,27 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
902
902
|
})
|
|
903
903
|
})
|
|
904
904
|
})] });
|
|
905
|
-
}, "SelectViewport")), [Qe, $e] = q("SelectGroup"), et = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
906
|
-
let { __scopeSelect: n, ...r } = e, i =
|
|
905
|
+
}, "SelectViewport")), [Qe, $e] = q("SelectGroup"), et = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
906
|
+
let { __scopeSelect: n, ...r } = e, i = k();
|
|
907
907
|
return /* @__PURE__ */ (0, R.jsx)(Qe, {
|
|
908
908
|
scope: n,
|
|
909
909
|
id: i,
|
|
910
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
910
|
+
children: /* @__PURE__ */ (0, R.jsx)(A.div, {
|
|
911
911
|
role: "group",
|
|
912
912
|
"aria-labelledby": i,
|
|
913
913
|
...r,
|
|
914
914
|
ref: t
|
|
915
915
|
})
|
|
916
916
|
});
|
|
917
|
-
}, "SelectGroup")), tt = "SelectLabel", nt = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
917
|
+
}, "SelectGroup")), tt = "SelectLabel", nt = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
918
918
|
let { __scopeSelect: n, ...r } = e, i = $e(tt, n);
|
|
919
|
-
return /* @__PURE__ */ (0, R.jsx)(
|
|
919
|
+
return /* @__PURE__ */ (0, R.jsx)(A.div, {
|
|
920
920
|
id: i.id,
|
|
921
921
|
...r,
|
|
922
922
|
ref: t
|
|
923
923
|
});
|
|
924
|
-
}, "SelectLabel")), rt = "SelectItem", [it, at] = q(rt), ot = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
925
|
-
let { __scopeSelect: n, value: r, disabled: a = !1, textValue: o, ...s } = e, c = J(rt, n), l = Z(rt, n), u = c.value === r, [d, f] = L.useState(o ?? ""), [p, m] = L.useState(!1), h =
|
|
924
|
+
}, "SelectLabel")), rt = "SelectItem", [it, at] = q(rt), ot = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
925
|
+
let { __scopeSelect: n, value: r, disabled: a = !1, textValue: o, ...s } = e, c = J(rt, n), l = Z(rt, n), u = c.value === r, [d, f] = L.useState(o ?? ""), [p, m] = L.useState(!1), h = C((e) => l.itemRefCallback?.(e, r, a)), g = i(t, h), _ = k(), v = L.useRef("touch"), y = /* @__PURE__ */ G(() => {
|
|
926
926
|
a || (c.onValueChange(r), c.onOpenChange(!1));
|
|
927
927
|
}, "handleSelect");
|
|
928
928
|
return /* @__PURE__ */ (0, R.jsx)(it, {
|
|
@@ -934,12 +934,12 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
934
934
|
onItemTextChange: L.useCallback((e) => {
|
|
935
935
|
f((t) => t || (e?.textContent ?? "").trim());
|
|
936
936
|
}, []),
|
|
937
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
937
|
+
children: /* @__PURE__ */ (0, R.jsx)(Ce.ItemSlot, {
|
|
938
938
|
scope: n,
|
|
939
939
|
value: r,
|
|
940
940
|
disabled: a,
|
|
941
941
|
textValue: d,
|
|
942
|
-
children: /* @__PURE__ */ (0, R.jsx)(
|
|
942
|
+
children: /* @__PURE__ */ (0, R.jsx)(A.div, {
|
|
943
943
|
role: "option",
|
|
944
944
|
"aria-labelledby": _,
|
|
945
945
|
"data-highlighted": p ? "" : void 0,
|
|
@@ -950,31 +950,31 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
950
950
|
tabIndex: a ? void 0 : -1,
|
|
951
951
|
...s,
|
|
952
952
|
ref: g,
|
|
953
|
-
onFocus:
|
|
954
|
-
onBlur:
|
|
955
|
-
onClick:
|
|
953
|
+
onFocus: b(s.onFocus, () => m(!0)),
|
|
954
|
+
onBlur: b(s.onBlur, () => m(!1)),
|
|
955
|
+
onClick: b(s.onClick, () => {
|
|
956
956
|
v.current !== "mouse" && y();
|
|
957
957
|
}),
|
|
958
|
-
onPointerUp:
|
|
958
|
+
onPointerUp: b(s.onPointerUp, () => {
|
|
959
959
|
v.current === "mouse" && y();
|
|
960
960
|
}),
|
|
961
|
-
onPointerDown:
|
|
961
|
+
onPointerDown: b(s.onPointerDown, (e) => {
|
|
962
962
|
v.current = e.pointerType;
|
|
963
963
|
}),
|
|
964
|
-
onPointerMove:
|
|
964
|
+
onPointerMove: b(s.onPointerMove, (e) => {
|
|
965
965
|
v.current = e.pointerType, a ? l.onItemLeave?.() : v.current === "mouse" && e.currentTarget.focus({ preventScroll: !0 });
|
|
966
966
|
}),
|
|
967
|
-
onPointerLeave:
|
|
967
|
+
onPointerLeave: b(s.onPointerLeave, (e) => {
|
|
968
968
|
e.currentTarget === document.activeElement && l.onItemLeave?.();
|
|
969
969
|
}),
|
|
970
|
-
onKeyDown:
|
|
971
|
-
a || e.target !== e.currentTarget || (l.searchRef?.current === "" || e.key !== " ") && (
|
|
970
|
+
onKeyDown: b(s.onKeyDown, (e) => {
|
|
971
|
+
a || e.target !== e.currentTarget || (l.searchRef?.current === "" || e.key !== " ") && (Se.includes(e.key) && y(), e.key === " " && e.preventDefault());
|
|
972
972
|
})
|
|
973
973
|
})
|
|
974
974
|
})
|
|
975
975
|
});
|
|
976
|
-
}, "SelectItem")), st = "SelectItemText", ct = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
977
|
-
let { __scopeSelect: n, className: r, style: a, ...o } = e, s = J(st, n), c = Z(st, n), l = at(st, n), u = Ae(st, n), [d, f] = L.useState(null), p =
|
|
976
|
+
}, "SelectItem")), st = "SelectItemText", ct = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
977
|
+
let { __scopeSelect: n, className: r, style: a, ...o } = e, s = J(st, n), c = Z(st, n), l = at(st, n), u = Ae(st, n), [d, f] = L.useState(null), p = C((e) => c.itemTextRefCallback?.(e, l.value, l.disabled)), m = i(t, f, l.onItemTextChange, p), h = d?.textContent, g = L.useMemo(() => /* @__PURE__ */ (0, R.jsx)("option", {
|
|
978
978
|
value: l.value,
|
|
979
979
|
disabled: l.disabled,
|
|
980
980
|
children: h
|
|
@@ -987,19 +987,19 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
987
987
|
_,
|
|
988
988
|
v,
|
|
989
989
|
g
|
|
990
|
-
]), /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)(
|
|
990
|
+
]), /* @__PURE__ */ (0, R.jsxs)(R.Fragment, { children: [/* @__PURE__ */ (0, R.jsx)(A.span, {
|
|
991
991
|
id: l.textId,
|
|
992
992
|
...o,
|
|
993
993
|
ref: m
|
|
994
994
|
}), l.isSelected && s.valueNode && !s.valueNodeHasChildren && !Q(s.value) ? I.createPortal(o.children, s.valueNode) : null] });
|
|
995
|
-
}, "SelectItemText")), lt = "SelectItemIndicator", ut = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
995
|
+
}, "SelectItemText")), lt = "SelectItemIndicator", ut = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
996
996
|
let { __scopeSelect: n, ...r } = e;
|
|
997
|
-
return at(lt, n).isSelected ? /* @__PURE__ */ (0, R.jsx)(
|
|
997
|
+
return at(lt, n).isSelected ? /* @__PURE__ */ (0, R.jsx)(A.span, {
|
|
998
998
|
"aria-hidden": !0,
|
|
999
999
|
...r,
|
|
1000
1000
|
ref: t
|
|
1001
1001
|
}) : null;
|
|
1002
|
-
}, "SelectItemIndicator")), dt = "SelectScrollUpButton", ft = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
1002
|
+
}, "SelectItemIndicator")), dt = "SelectScrollUpButton", ft = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1003
1003
|
let n = Z(dt, e.__scopeSelect), r = Ye(dt, e.__scopeSelect), [a, o] = L.useState(!1), s = i(t, r.onScrollButtonChange);
|
|
1004
1004
|
return j(() => {
|
|
1005
1005
|
if (n.viewport && n.isPositioned) {
|
|
@@ -1007,7 +1007,7 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
1007
1007
|
let e = t.scrollTop > 0;
|
|
1008
1008
|
o(e);
|
|
1009
1009
|
};
|
|
1010
|
-
|
|
1010
|
+
G(e, "handleScroll");
|
|
1011
1011
|
let t = n.viewport;
|
|
1012
1012
|
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
1013
1013
|
}
|
|
@@ -1019,7 +1019,7 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
1019
1019
|
e && t && (e.scrollTop -= t.offsetHeight);
|
|
1020
1020
|
}
|
|
1021
1021
|
}) : null;
|
|
1022
|
-
}, "SelectScrollUpButton")), pt = "SelectScrollDownButton", mt = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
1022
|
+
}, "SelectScrollUpButton")), pt = "SelectScrollDownButton", mt = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1023
1023
|
let n = Z(pt, e.__scopeSelect), r = Ye(pt, e.__scopeSelect), [a, o] = L.useState(!1), s = i(t, r.onScrollButtonChange);
|
|
1024
1024
|
return j(() => {
|
|
1025
1025
|
if (n.viewport && n.isPositioned) {
|
|
@@ -1027,7 +1027,7 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
1027
1027
|
let e = t.scrollHeight - t.clientHeight, n = Math.ceil(t.scrollTop) < e;
|
|
1028
1028
|
o(n);
|
|
1029
1029
|
};
|
|
1030
|
-
|
|
1030
|
+
G(e, "handleScroll");
|
|
1031
1031
|
let t = n.viewport;
|
|
1032
1032
|
return e(), t.addEventListener("scroll", e), () => t.removeEventListener("scroll", e);
|
|
1033
1033
|
}
|
|
@@ -1039,13 +1039,13 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
1039
1039
|
e && t && (e.scrollTop += t.offsetHeight);
|
|
1040
1040
|
}
|
|
1041
1041
|
}) : null;
|
|
1042
|
-
}, "SelectScrollDownButton")), ht = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
1043
|
-
let { __scopeSelect: n, onAutoScroll: r, ...i } = e, a = Z("SelectScrollButton", n), o = L.useRef(null), s =
|
|
1042
|
+
}, "SelectScrollDownButton")), ht = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1043
|
+
let { __scopeSelect: n, onAutoScroll: r, ...i } = e, a = Z("SelectScrollButton", n), o = L.useRef(null), s = we(n), c = L.useCallback(() => {
|
|
1044
1044
|
o.current !== null && (window.clearInterval(o.current), o.current = null);
|
|
1045
1045
|
}, []);
|
|
1046
1046
|
return L.useEffect(() => () => c(), [c]), j(() => {
|
|
1047
1047
|
s().find((e) => e.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
1048
|
-
}, [s]), /* @__PURE__ */ (0, R.jsx)(
|
|
1048
|
+
}, [s]), /* @__PURE__ */ (0, R.jsx)(A.div, {
|
|
1049
1049
|
"aria-hidden": !0,
|
|
1050
1050
|
...i,
|
|
1051
1051
|
ref: t,
|
|
@@ -1053,25 +1053,25 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
1053
1053
|
flexShrink: 0,
|
|
1054
1054
|
...i.style
|
|
1055
1055
|
},
|
|
1056
|
-
onPointerDown:
|
|
1056
|
+
onPointerDown: b(i.onPointerDown, () => {
|
|
1057
1057
|
o.current === null && (o.current = window.setInterval(r, 50));
|
|
1058
1058
|
}),
|
|
1059
|
-
onPointerMove:
|
|
1059
|
+
onPointerMove: b(i.onPointerMove, () => {
|
|
1060
1060
|
a.onItemLeave?.(), o.current === null && (o.current = window.setInterval(r, 50));
|
|
1061
1061
|
}),
|
|
1062
|
-
onPointerLeave:
|
|
1062
|
+
onPointerLeave: b(i.onPointerLeave, () => {
|
|
1063
1063
|
c();
|
|
1064
1064
|
})
|
|
1065
1065
|
});
|
|
1066
|
-
}, "SelectScrollButtonImpl")), gt = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
1066
|
+
}, "SelectScrollButtonImpl")), gt = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function(e, t) {
|
|
1067
1067
|
let { __scopeSelect: n, ...r } = e;
|
|
1068
|
-
return /* @__PURE__ */ (0, R.jsx)(
|
|
1068
|
+
return /* @__PURE__ */ (0, R.jsx)(A.div, {
|
|
1069
1069
|
"aria-hidden": !0,
|
|
1070
1070
|
...r,
|
|
1071
1071
|
ref: t
|
|
1072
1072
|
});
|
|
1073
|
-
}, "SelectSeparator")), _t = "SelectBubbleInput", vt = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */
|
|
1074
|
-
let r = J(_t, e), { value: a, onValueChange: o, required: s, disabled: c, name: l, autoComplete: u, form: d } = r, { nativeOptions: p, nativeSelectKey: m } = r, h = L.useRef(null), g = i(n, h), _ = a ?? "", v =
|
|
1073
|
+
}, "SelectSeparator")), _t = "SelectBubbleInput", vt = /* @__PURE__ */ L.forwardRef(/* @__PURE__ */ G(function({ __scopeSelect: e, ...t }, n) {
|
|
1074
|
+
let r = J(_t, e), { value: a, onValueChange: o, required: s, disabled: c, name: l, autoComplete: u, form: d } = r, { nativeOptions: p, nativeSelectKey: m } = r, h = L.useRef(null), g = i(n, h), _ = a ?? "", v = ge(_), y = Array.from(p).some((e) => (e.props.value ?? "") === "");
|
|
1075
1075
|
return L.useEffect(() => {
|
|
1076
1076
|
let e = h.current;
|
|
1077
1077
|
if (!e) return;
|
|
@@ -1080,7 +1080,7 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
1080
1080
|
let t = new Event("change", { bubbles: !0 });
|
|
1081
1081
|
n.call(e, _), e.dispatchEvent(t);
|
|
1082
1082
|
}
|
|
1083
|
-
}, [v, _]), /* @__PURE__ */ (0, R.jsxs)(
|
|
1083
|
+
}, [v, _]), /* @__PURE__ */ (0, R.jsxs)(A.select, {
|
|
1084
1084
|
"aria-hidden": !0,
|
|
1085
1085
|
required: s,
|
|
1086
1086
|
tabIndex: -1,
|
|
@@ -1102,15 +1102,15 @@ var Me = /* @__PURE__ */ W((e) => {
|
|
|
1102
1102
|
function yt(e) {
|
|
1103
1103
|
return typeof e == "function";
|
|
1104
1104
|
}
|
|
1105
|
-
|
|
1105
|
+
G(yt, "isFunction");
|
|
1106
1106
|
function Q(e) {
|
|
1107
1107
|
return e === "" || e === void 0;
|
|
1108
1108
|
}
|
|
1109
|
-
|
|
1109
|
+
G(Q, "shouldShowPlaceholder");
|
|
1110
1110
|
function bt(e) {
|
|
1111
|
-
let t =
|
|
1111
|
+
let t = C(e), n = L.useRef(""), r = L.useRef(0), i = L.useCallback((e) => {
|
|
1112
1112
|
let i = n.current + e;
|
|
1113
|
-
t(i), (/* @__PURE__ */
|
|
1113
|
+
t(i), (/* @__PURE__ */ G((function e(t) {
|
|
1114
1114
|
n.current = t, window.clearTimeout(r.current), t !== "" && (r.current = window.setTimeout(() => e(""), 1e3));
|
|
1115
1115
|
}), "updateSearch"))(i);
|
|
1116
1116
|
}, [t]), a = L.useCallback(() => {
|
|
@@ -1122,18 +1122,18 @@ function bt(e) {
|
|
|
1122
1122
|
a
|
|
1123
1123
|
];
|
|
1124
1124
|
}
|
|
1125
|
-
|
|
1125
|
+
G(bt, "useTypeaheadSearch");
|
|
1126
1126
|
function xt(e, t, n) {
|
|
1127
1127
|
let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = St(e, Math.max(i, 0));
|
|
1128
1128
|
r.length === 1 && (a = a.filter((e) => e !== n));
|
|
1129
1129
|
let o = a.find((e) => e.textValue.toLowerCase().startsWith(r.toLowerCase()));
|
|
1130
1130
|
return o === n ? void 0 : o;
|
|
1131
1131
|
}
|
|
1132
|
-
|
|
1132
|
+
G(xt, "findNextItem");
|
|
1133
1133
|
function St(e, t) {
|
|
1134
1134
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1135
1135
|
}
|
|
1136
|
-
|
|
1136
|
+
G(St, "wrapArray");
|
|
1137
1137
|
//#endregion
|
|
1138
1138
|
//#region src/utils/assertNever.ts
|
|
1139
1139
|
function Ct(e) {
|
|
@@ -1249,7 +1249,7 @@ var zt = Me, Bt = et, Vt = S(Be), Ht = Ie, Ut = L.forwardRef((e, t) => {
|
|
|
1249
1249
|
}), r[15] = i, r[16] = s, r[17] = t, r[18] = d, r[19] = p, r[20] = m) : m = r[20], m;
|
|
1250
1250
|
});
|
|
1251
1251
|
Ut.displayName = Pe.displayName;
|
|
1252
|
-
var Wt =
|
|
1252
|
+
var Wt = x(Ve), Gt = L.forwardRef((e, t) => {
|
|
1253
1253
|
let r = (0, $.c)(21), i, a, o, s;
|
|
1254
1254
|
r[0] === e ? (i = r[1], a = r[2], o = r[3], s = r[4]) : ({className: a, children: i, position: s, ...o} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o, r[4] = s);
|
|
1255
1255
|
let c = s === void 0 ? "popper" : s, l = c === "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", u;
|
|
@@ -1272,7 +1272,7 @@ var Wt = v(Ve), Gt = L.forwardRef((e, t) => {
|
|
|
1272
1272
|
children: /* @__PURE__ */ (0, R.jsx)(N, { className: "h-4 w-4 opacity-50" })
|
|
1273
1273
|
}), r[14] = h) : h = r[14];
|
|
1274
1274
|
let g;
|
|
1275
|
-
return r[15] !== c || r[16] !== o || r[17] !== t || r[18] !== u || r[19] !== m ? (g = /* @__PURE__ */ (0, R.jsx)(Vt, { children: /* @__PURE__ */ (0, R.jsx)(
|
|
1275
|
+
return r[15] !== c || r[16] !== o || r[17] !== t || r[18] !== u || r[19] !== m ? (g = /* @__PURE__ */ (0, R.jsx)(Vt, { children: /* @__PURE__ */ (0, R.jsx)(y, { children: /* @__PURE__ */ (0, R.jsxs)(Wt, {
|
|
1276
1276
|
ref: t,
|
|
1277
1277
|
className: u,
|
|
1278
1278
|
position: c,
|
|
@@ -1341,4 +1341,4 @@ var Jt = L.forwardRef((e, t) => {
|
|
|
1341
1341
|
});
|
|
1342
1342
|
Jt.displayName = gt.displayName;
|
|
1343
1343
|
//#endregion
|
|
1344
|
-
export { F as A, wt as C,
|
|
1344
|
+
export { F as A, wt as C, ge as D, ye as E, N as M, pe as O, Ct as S, Pe as T, Nt as _, Kt as a, Dt as b, Ht as c, At as d, It as f, Pt as g, jt as h, qt as i, P as j, V as k, Rt as l, Mt as m, Gt as n, Jt as o, Ot as p, Bt as r, Ut as s, zt as t, Lt as u, Ft as v, Le as w, Tt as x, kt as y };
|