@q1travel/design-system 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contracts/design.dark.md +3 -1
- package/contracts/design.md +3 -1
- package/dist-pkg/design-system.d.ts +17 -0
- package/dist-pkg/design-system.js +881 -848
- package/dist-pkg/style.css +64 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as w, jsx as n, Fragment as ge } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as It, createElement as Yt, useState as H, useRef as T, useEffect as te, useCallback as ce, useLayoutEffect as me, useMemo as Ne, useContext as Dt, createContext as Mt, useId as fe, useSyncExternalStore as on, isValidElement as Xt, Fragment as nt, cloneElement as jn, useReducer as Yn, useImperativeHandle as Xn } from "react";
|
|
3
3
|
import { createPortal as it, flushSync as Gn } from "react-dom";
|
|
4
|
-
const Br = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(),
|
|
4
|
+
const Br = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Zn = (...e) => e.filter((t, r, o) => !!t && t.trim() !== "" && o.indexOf(t) === r).join(" ").trim();
|
|
5
5
|
var Kr = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: 24,
|
|
@@ -32,7 +32,7 @@ const Wr = It(
|
|
|
32
32
|
height: t,
|
|
33
33
|
stroke: e,
|
|
34
34
|
strokeWidth: o ? Number(r) * 24 / Number(t) : r,
|
|
35
|
-
className:
|
|
35
|
+
className: Zn("lucide", i),
|
|
36
36
|
...l
|
|
37
37
|
},
|
|
38
38
|
[
|
|
@@ -46,7 +46,7 @@ const be = (e, t) => {
|
|
|
46
46
|
({ className: o, ...i }, s) => Yt(Wr, {
|
|
47
47
|
ref: s,
|
|
48
48
|
iconNode: t,
|
|
49
|
-
className:
|
|
49
|
+
className: Zn(`lucide-${Br(e)}`, o),
|
|
50
50
|
...i
|
|
51
51
|
})
|
|
52
52
|
);
|
|
@@ -67,7 +67,7 @@ const Vr = be("Calendar", [
|
|
|
67
67
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
68
68
|
]);
|
|
69
69
|
const De = be("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
|
|
70
|
-
const
|
|
70
|
+
const Re = be("ChevronDown", [
|
|
71
71
|
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
|
|
72
72
|
]);
|
|
73
73
|
const at = be("ChevronLeft", [
|
|
@@ -76,7 +76,7 @@ const at = be("ChevronLeft", [
|
|
|
76
76
|
const Ee = be("ChevronRight", [
|
|
77
77
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
78
78
|
]);
|
|
79
|
-
const
|
|
79
|
+
const Jn = be("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
80
80
|
const st = be("CircleAlert", [
|
|
81
81
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
82
82
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
@@ -156,7 +156,7 @@ const Gr = be("FolderOpen", [
|
|
|
156
156
|
}
|
|
157
157
|
]
|
|
158
158
|
]);
|
|
159
|
-
const
|
|
159
|
+
const Zr = be("Folder", [
|
|
160
160
|
[
|
|
161
161
|
"path",
|
|
162
162
|
{
|
|
@@ -171,7 +171,7 @@ const Qr = be("Frown", [
|
|
|
171
171
|
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
|
|
172
172
|
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
|
|
173
173
|
]);
|
|
174
|
-
const
|
|
174
|
+
const Jr = be("Heart", [
|
|
175
175
|
[
|
|
176
176
|
"path",
|
|
177
177
|
{
|
|
@@ -425,7 +425,7 @@ function ar(e, t = Oe()) {
|
|
|
425
425
|
function _t(e = Oe()) {
|
|
426
426
|
return e ? Pe(e).blockingCount : 0;
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function ss(e = Oe()) {
|
|
429
429
|
if (!e) return null;
|
|
430
430
|
const t = Pe(e);
|
|
431
431
|
return t.coordinator || (t.coordinator = {
|
|
@@ -457,13 +457,13 @@ function No() {
|
|
|
457
457
|
throw new Error("useToast 必须在 ToastProvider 内使用");
|
|
458
458
|
return e;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Zt(e) {
|
|
461
461
|
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return 0;
|
|
462
462
|
const t = getComputedStyle(document.documentElement).getPropertyValue(e).trim(), r = Number.parseFloat(t);
|
|
463
463
|
return Number.isNaN(r) ? 0 : t.endsWith("ms") ? r : r * 1e3;
|
|
464
464
|
}
|
|
465
465
|
function ko() {
|
|
466
|
-
return
|
|
466
|
+
return Zt("--q1-duration-fast");
|
|
467
467
|
}
|
|
468
468
|
function xo(e) {
|
|
469
469
|
const t = getComputedStyle(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom), o = Math.max(
|
|
@@ -472,7 +472,7 @@ function xo(e) {
|
|
|
472
472
|
);
|
|
473
473
|
return Math.round(o + r);
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function cs({ children: e }) {
|
|
476
476
|
const [t, r] = H([]), [o, i] = H(() => _t()), s = T(0), a = T(/* @__PURE__ */ new Map()), l = T(
|
|
477
477
|
new Set(typeof document < "u" && document.hidden ? ["hidden"] : [])
|
|
478
478
|
), u = T(null), p = T(null), d = T(0), f = T(null), [_, x] = H(!1);
|
|
@@ -487,7 +487,7 @@ function as({ children: e }) {
|
|
|
487
487
|
h && (window.clearTimeout(h.handle), a.current.delete(I));
|
|
488
488
|
const C = u.current, M = document.activeElement instanceof HTMLElement ? document.activeElement : null, L = C?.querySelector(`.q1-toast[data-toast-id="${I}"]`);
|
|
489
489
|
if (M && L?.contains(M)) {
|
|
490
|
-
const k = [...C?.querySelectorAll('.q1-toast[data-visible="true"]:not([data-removed="true"])') ?? []].reverse().find((
|
|
490
|
+
const k = [...C?.querySelectorAll('.q1-toast[data-visible="true"]:not([data-removed="true"])') ?? []].reverse().find((q) => q !== L && !q.inert)?.querySelector("button:not(:disabled), a[href]"), N = f.current;
|
|
491
491
|
k ? k.focus() : N?.isConnected && !N.closest("[inert]") && N.focus();
|
|
492
492
|
}
|
|
493
493
|
r((E) => E.map((k) => k.id === I ? { ...k, removed: !0 } : k)), window.setTimeout(() => {
|
|
@@ -536,16 +536,16 @@ function as({ children: e }) {
|
|
|
536
536
|
(N) => N.dataset.removed !== "true"
|
|
537
537
|
), C = h.filter((N) => Number(N.dataset.toastId ?? 0) > d.current);
|
|
538
538
|
if (C.length > 0 && p.current) {
|
|
539
|
-
const N = C.map((
|
|
540
|
-
const P =
|
|
539
|
+
const N = C.map((q) => {
|
|
540
|
+
const P = q.querySelector(".q1-toast__title")?.textContent?.trim() ?? "", z = q.querySelector(".q1-toast__description")?.textContent?.trim() ?? "", V = P && z && !/[。!?.!?]$/u.test(P) ? "。" : " ";
|
|
541
541
|
return `${P}${z ? `${V}${z}` : ""}`;
|
|
542
542
|
});
|
|
543
543
|
p.current.replaceChildren(document.createTextNode(N.join(";"))), d.current = Number(C.at(-1)?.dataset.toastId ?? d.current);
|
|
544
544
|
} else h.length === 0 && p.current?.replaceChildren();
|
|
545
545
|
let M = 0, L = 0;
|
|
546
546
|
for (let N = h.length - 1; N >= 0; N -= 1) {
|
|
547
|
-
const
|
|
548
|
-
P === 0 && (L = z),
|
|
547
|
+
const q = h[N], P = h.length - 1 - N, z = xo(q);
|
|
548
|
+
P === 0 && (L = z), q.style.setProperty("--depth", String(P)), q.style.setProperty("--h", `${z}px`), q.style.setProperty("--y", `${-M}px`), q.style.zIndex = String(100 + N), q.dataset.front = String(P === 0), q.dataset.visible = String(P < Ot), M += z + yn;
|
|
549
549
|
}
|
|
550
550
|
I.style.setProperty("--front-h", `${L}px`);
|
|
551
551
|
const E = L + Math.min(h.length - 1, Ot - 1) * wo, k = h.length === 0 ? 0 : _ ? Math.max(M - yn, 0) : E;
|
|
@@ -606,17 +606,17 @@ function as({ children: e }) {
|
|
|
606
606
|
}
|
|
607
607
|
function Po({ toast: e, interactionInert: t, controlsDisabled: r, onDismiss: o }) {
|
|
608
608
|
const i = T(null), [s, a] = H(!1), [l, u] = H(!0), [p, d] = H(!1), [f, _] = H(!1), [x, g] = H(null), c = T(null), b = T(null), m = T({ x: 0, y: 0 }), v = T(null), D = T(null);
|
|
609
|
-
te(() => (a(!0), v.current = window.setTimeout(() => u(!1),
|
|
609
|
+
te(() => (a(!0), v.current = window.setTimeout(() => u(!1), Zt("--q1-duration-base")), () => {
|
|
610
610
|
v.current !== null && window.clearTimeout(v.current), D.current !== null && window.clearTimeout(D.current);
|
|
611
611
|
}), []);
|
|
612
612
|
const I = e.tone === "default" ? null : yo[e.tone];
|
|
613
|
-
function h(N,
|
|
613
|
+
function h(N, q = !0) {
|
|
614
614
|
const P = b.current;
|
|
615
615
|
c.current = null, b.current = null, m.current = { x: 0, y: 0 };
|
|
616
616
|
const z = N?.currentTarget ?? i.current;
|
|
617
|
-
z && P !== null && z.hasPointerCapture(P) && z.releasePointerCapture(P), d(!1), _(
|
|
617
|
+
z && P !== null && z.hasPointerCapture(P) && z.releasePointerCapture(P), d(!1), _(q), D.current !== null && window.clearTimeout(D.current), q && !window.matchMedia("(prefers-reduced-motion: reduce)").matches ? D.current = window.setTimeout(
|
|
618
618
|
() => _(!1),
|
|
619
|
-
|
|
619
|
+
Zt("--q1-duration-fast")
|
|
620
620
|
) : _(!1);
|
|
621
621
|
const V = i.current;
|
|
622
622
|
V?.style.removeProperty("--swipe-x"), V?.style.removeProperty("--swipe-y"), V?.style.removeProperty("opacity");
|
|
@@ -635,17 +635,17 @@ function Po({ toast: e, interactionInert: t, controlsDisabled: r, onDismiss: o }
|
|
|
635
635
|
}
|
|
636
636
|
function M(N) {
|
|
637
637
|
if (!c.current || b.current !== N.pointerId) return;
|
|
638
|
-
const
|
|
639
|
-
m.current = { x:
|
|
638
|
+
const q = N.clientX - c.current.x, P = N.clientY - c.current.y, z = (Y) => Math.sign(Y) * Math.log1p(Math.abs(Y)) * 2;
|
|
639
|
+
m.current = { x: q > 0 ? q : z(q), y: P > 0 ? P : z(P) }, !p && (Math.abs(q) > 2 || Math.abs(P) > 2) && d(!0);
|
|
640
640
|
const V = i.current;
|
|
641
641
|
if (!V) return;
|
|
642
642
|
V.style.setProperty("--swipe-x", `${m.current.x}px`), V.style.setProperty("--swipe-y", `${m.current.y}px`);
|
|
643
|
-
const B = Math.max(0, Math.abs(
|
|
643
|
+
const B = Math.max(0, Math.abs(q) >= Math.abs(P) ? q : P), $ = 1 - 0.35 * Math.min(B / wn, 1);
|
|
644
644
|
V.style.opacity = String($);
|
|
645
645
|
}
|
|
646
646
|
function L(N) {
|
|
647
647
|
if (!c.current || b.current !== N.pointerId) return;
|
|
648
|
-
const { x:
|
|
648
|
+
const { x: q, y: P } = m.current, z = Math.max(1, Date.now() - c.current.time), V = Math.abs(q) >= Math.abs(P) ? "x" : "y", B = V === "x" ? q : P;
|
|
649
649
|
if (B > 0 && (B >= wn || B / z > vo)) {
|
|
650
650
|
h(N, !1), g(V === "x" ? "right" : "down"), o(e.id);
|
|
651
651
|
return;
|
|
@@ -936,7 +936,7 @@ function ot(e) {
|
|
|
936
936
|
ariaKeyshortcuts: E,
|
|
937
937
|
"aria-keyshortcuts": k,
|
|
938
938
|
"aria-describedby": N,
|
|
939
|
-
"aria-disabled":
|
|
939
|
+
"aria-disabled": q,
|
|
940
940
|
"aria-pressed": P,
|
|
941
941
|
tabIndex: z,
|
|
942
942
|
onFocus: V,
|
|
@@ -972,7 +972,7 @@ function ot(e) {
|
|
|
972
972
|
type: b,
|
|
973
973
|
className: O,
|
|
974
974
|
disabled: c || x || void 0,
|
|
975
|
-
"aria-disabled": A ? !0 :
|
|
975
|
+
"aria-disabled": A ? !0 : q,
|
|
976
976
|
"aria-busy": x || void 0,
|
|
977
977
|
"aria-pressed": d === void 0 ? P : d,
|
|
978
978
|
tabIndex: A ? 0 : z,
|
|
@@ -1024,7 +1024,7 @@ function Eo(e) {
|
|
|
1024
1024
|
ariaLabel: E,
|
|
1025
1025
|
ariaKeyshortcuts: k,
|
|
1026
1026
|
"aria-keyshortcuts": N,
|
|
1027
|
-
"aria-describedby":
|
|
1027
|
+
"aria-describedby": q,
|
|
1028
1028
|
"aria-disabled": P,
|
|
1029
1029
|
"aria-busy": z,
|
|
1030
1030
|
tabIndex: V,
|
|
@@ -1050,12 +1050,12 @@ function Eo(e) {
|
|
|
1050
1050
|
}),
|
|
1051
1051
|
"button-link",
|
|
1052
1052
|
t === "pointer" ? "button-link--busy-motion-pointer" : ""
|
|
1053
|
-
),
|
|
1053
|
+
), R = b || s || l, j = L ?? E, J = N ?? k;
|
|
1054
1054
|
Q && !j?.trim() && console.warn("ButtonLink: 缺少 aria-label,纯图标按钮必须提供可访问名称。"), te(() => {
|
|
1055
1055
|
y ? A && t === "pointer" ? o.current = !0 : !o.current && t === "pointer" && r(void 0) : (o.current = !1, t === "pointer" && r(void 0));
|
|
1056
1056
|
}, [t, A, y]);
|
|
1057
1057
|
const ne = (U) => {
|
|
1058
|
-
if (
|
|
1058
|
+
if (R) {
|
|
1059
1059
|
U.preventDefault();
|
|
1060
1060
|
return;
|
|
1061
1061
|
}
|
|
@@ -1070,13 +1070,13 @@ function Eo(e) {
|
|
|
1070
1070
|
...X,
|
|
1071
1071
|
ref: O,
|
|
1072
1072
|
className: S,
|
|
1073
|
-
href:
|
|
1074
|
-
"aria-disabled":
|
|
1073
|
+
href: R ? void 0 : i,
|
|
1074
|
+
"aria-disabled": R ? !0 : P,
|
|
1075
1075
|
"aria-busy": l ? !0 : z,
|
|
1076
1076
|
tabIndex: b || l ? -1 : s ? 0 : V,
|
|
1077
1077
|
"aria-label": j,
|
|
1078
|
-
"aria-keyshortcuts":
|
|
1079
|
-
"aria-describedby":
|
|
1078
|
+
"aria-keyshortcuts": J,
|
|
1079
|
+
"aria-describedby": q,
|
|
1080
1080
|
onClick: ne,
|
|
1081
1081
|
onFocus: B,
|
|
1082
1082
|
onBlur: $,
|
|
@@ -1097,7 +1097,7 @@ function So(e) {
|
|
|
1097
1097
|
)
|
|
1098
1098
|
);
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function ls({ href: e, tone: t = "default", external: r, className: o, children: i, ref: s, ...a }) {
|
|
1101
1101
|
const l = ie("q1-link", t !== "default" ? `q1-link--${t}` : "", o ?? "");
|
|
1102
1102
|
return e ? /* @__PURE__ */ w(
|
|
1103
1103
|
"a",
|
|
@@ -1114,7 +1114,7 @@ function ss({ href: e, tone: t = "default", external: r, className: o, children:
|
|
|
1114
1114
|
}
|
|
1115
1115
|
) : /* @__PURE__ */ n("span", { ...So(a), className: ie(l, "q1-link--static"), children: i });
|
|
1116
1116
|
}
|
|
1117
|
-
const
|
|
1117
|
+
const qo = [
|
|
1118
1118
|
"button",
|
|
1119
1119
|
"a[href]",
|
|
1120
1120
|
"input",
|
|
@@ -1128,11 +1128,11 @@ const Ro = [
|
|
|
1128
1128
|
'[role="combobox"]',
|
|
1129
1129
|
'[role="slider"]',
|
|
1130
1130
|
'[role="spinbutton"]'
|
|
1131
|
-
].join(", "),
|
|
1131
|
+
].join(", "), Ro = /* @__PURE__ */ new Set(["button", "checkbox", "image", "reset", "submit"]);
|
|
1132
1132
|
function $o(e) {
|
|
1133
|
-
return e.tagName === "INPUT" ? !
|
|
1133
|
+
return e.tagName === "INPUT" ? !Ro.has(e.type) : e.tagName === "SELECT" || e.tagName === "TEXTAREA" || e.isContentEditable ? !0 : ["combobox", "radio", "slider", "spinbutton"].includes(e.getAttribute("role") ?? "");
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function us({
|
|
1136
1136
|
"aria-label": e,
|
|
1137
1137
|
orientation: t = "horizontal",
|
|
1138
1138
|
children: r,
|
|
@@ -1141,7 +1141,7 @@ function cs({
|
|
|
1141
1141
|
const i = T(null), s = T(null), a = T(0), l = T(!1), u = ce(
|
|
1142
1142
|
() => {
|
|
1143
1143
|
const g = i.current;
|
|
1144
|
-
return g ? Array.from(g.querySelectorAll(
|
|
1144
|
+
return g ? Array.from(g.querySelectorAll(qo)).filter(
|
|
1145
1145
|
(c) => !c.matches(":disabled") && !(c.tagName === "INPUT" && c.type === "hidden") && c.closest('[role="toolbar"]') === g && !c.closest('[hidden], [inert], [aria-hidden="true"]')
|
|
1146
1146
|
) : [];
|
|
1147
1147
|
},
|
|
@@ -1285,7 +1285,7 @@ const pr = Mt(!1);
|
|
|
1285
1285
|
function Fe(e, t) {
|
|
1286
1286
|
return `${e}-${t ? "message" : "description"}`;
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function qt({
|
|
1289
1289
|
controlId: e,
|
|
1290
1290
|
label: t,
|
|
1291
1291
|
description: r,
|
|
@@ -1335,7 +1335,7 @@ function Ye(...e) {
|
|
|
1335
1335
|
};
|
|
1336
1336
|
};
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1338
|
+
function Rt(e, t, r) {
|
|
1339
1339
|
te(() => {
|
|
1340
1340
|
}, [t, e, r]);
|
|
1341
1341
|
}
|
|
@@ -1363,9 +1363,9 @@ function Ao({
|
|
|
1363
1363
|
disabled: I,
|
|
1364
1364
|
...h
|
|
1365
1365
|
}) {
|
|
1366
|
-
const C = fe(), M = e ?? C, L = t === void 0, E = T(null), k = T(null), N = Ne(() => Ye(E, a), [a]), [
|
|
1366
|
+
const C = fe(), M = e ?? C, L = t === void 0, E = T(null), k = T(null), N = Ne(() => Ye(E, a), [a]), [q, P] = H(!1), [z, V] = H(null), [B, $] = H(!1), Y = b ?? q, G = (R) => {
|
|
1367
1367
|
const j = !Y;
|
|
1368
|
-
V(
|
|
1368
|
+
V(R ? j : null), b === void 0 && P(j), m?.(j);
|
|
1369
1369
|
}, F = z === Y;
|
|
1370
1370
|
te(() => {
|
|
1371
1371
|
if (z === null) return;
|
|
@@ -1373,21 +1373,21 @@ function Ao({
|
|
|
1373
1373
|
V(null);
|
|
1374
1374
|
return;
|
|
1375
1375
|
}
|
|
1376
|
-
let
|
|
1376
|
+
let R = !1;
|
|
1377
1377
|
const j = window.requestAnimationFrame(() => {
|
|
1378
|
-
const
|
|
1378
|
+
const J = Array.from(
|
|
1379
1379
|
k.current?.querySelectorAll(".input-control__reveal-icon") ?? []
|
|
1380
1380
|
).flatMap((ne) => ne.getAnimations());
|
|
1381
|
-
if (
|
|
1381
|
+
if (J.length === 0) {
|
|
1382
1382
|
V((ne) => ne === z ? null : ne);
|
|
1383
1383
|
return;
|
|
1384
1384
|
}
|
|
1385
|
-
Promise.allSettled(
|
|
1386
|
-
|
|
1385
|
+
Promise.allSettled(J.map((ne) => ne.finished)).then(() => {
|
|
1386
|
+
R || V((ne) => ne === z ? null : ne);
|
|
1387
1387
|
});
|
|
1388
1388
|
});
|
|
1389
1389
|
return () => {
|
|
1390
|
-
|
|
1390
|
+
R = !0, window.cancelAnimationFrame(j);
|
|
1391
1391
|
};
|
|
1392
1392
|
}, [Y, z]);
|
|
1393
1393
|
const O = c ? /* @__PURE__ */ n(
|
|
@@ -1398,24 +1398,24 @@ function Ao({
|
|
|
1398
1398
|
size: x === "xs" ? "sm" : x,
|
|
1399
1399
|
"aria-label": Y ? D : v,
|
|
1400
1400
|
disabled: I,
|
|
1401
|
-
onPointerDown: (
|
|
1402
|
-
|
|
1401
|
+
onPointerDown: (R) => {
|
|
1402
|
+
R.button === 0 && $(!0);
|
|
1403
1403
|
},
|
|
1404
1404
|
onPointerUp: () => $(!1),
|
|
1405
1405
|
onPointerLeave: () => $(!1),
|
|
1406
1406
|
onPointerCancel: () => $(!1),
|
|
1407
1407
|
onBlur: () => $(!1),
|
|
1408
|
-
onKeyDown: (
|
|
1409
|
-
|
|
1408
|
+
onKeyDown: (R) => {
|
|
1409
|
+
R.key !== "Enter" && R.key !== " " || ($(!1), R.currentTarget.getAnimations().forEach((j) => j.cancel()));
|
|
1410
1410
|
},
|
|
1411
|
-
onClick: (
|
|
1411
|
+
onClick: (R) => G(R.detail > 0),
|
|
1412
1412
|
children: /* @__PURE__ */ w(
|
|
1413
1413
|
"span",
|
|
1414
1414
|
{
|
|
1415
1415
|
className: "input-control__reveal-icons",
|
|
1416
1416
|
"aria-hidden": "true",
|
|
1417
|
-
onTransitionEnd: (
|
|
1418
|
-
|
|
1417
|
+
onTransitionEnd: (R) => {
|
|
1418
|
+
R.propertyName === "opacity" && V(null);
|
|
1419
1419
|
},
|
|
1420
1420
|
children: [
|
|
1421
1421
|
/* @__PURE__ */ n(
|
|
@@ -1437,7 +1437,7 @@ function Ao({
|
|
|
1437
1437
|
)
|
|
1438
1438
|
}
|
|
1439
1439
|
) : null;
|
|
1440
|
-
|
|
1440
|
+
Rt("Input", L, E);
|
|
1441
1441
|
const X = r || o ? Fe(M, !!o) : void 0, Q = ie(
|
|
1442
1442
|
"form-control",
|
|
1443
1443
|
"form-control--input",
|
|
@@ -1459,8 +1459,8 @@ function Ao({
|
|
|
1459
1459
|
"span",
|
|
1460
1460
|
{
|
|
1461
1461
|
className: y,
|
|
1462
|
-
onPointerDown: (
|
|
1463
|
-
(
|
|
1462
|
+
onPointerDown: (R) => {
|
|
1463
|
+
(R.target instanceof Element ? R.target : null)?.closest(".form-control, .input-control__action") || E.current?.matches(":disabled") || (R.preventDefault(), E.current?.focus());
|
|
1464
1464
|
},
|
|
1465
1465
|
children: [
|
|
1466
1466
|
l ? /* @__PURE__ */ n(
|
|
@@ -1493,9 +1493,9 @@ function Ao({
|
|
|
1493
1493
|
]
|
|
1494
1494
|
}
|
|
1495
1495
|
) : A;
|
|
1496
|
-
return L ? S : /* @__PURE__ */ n(
|
|
1496
|
+
return L ? S : /* @__PURE__ */ n(qt, { controlId: M, label: t, description: r, error: o, wide: _, children: S });
|
|
1497
1497
|
}
|
|
1498
|
-
function
|
|
1498
|
+
function ds({
|
|
1499
1499
|
id: e,
|
|
1500
1500
|
name: t,
|
|
1501
1501
|
value: r,
|
|
@@ -1516,7 +1516,7 @@ function ls({
|
|
|
1516
1516
|
}) {
|
|
1517
1517
|
if (typeof r != "string" || !/^[0-9]{0,6}$/.test(r))
|
|
1518
1518
|
throw new Error("VerificationCodeInput value must be a string of up to six ASCII digits.");
|
|
1519
|
-
const m = fe(), v = e ?? m, D = T(null), I = Ne(() => Ye(D, d), [d]), [h, C] = H({ start: 0, end: 0, backward: !1 }), [M, L] = H(null), [E, k] = H(""), N = T(""),
|
|
1519
|
+
const m = fe(), v = e ?? m, D = T(null), I = Ne(() => Ye(D, d), [d]), [h, C] = H({ start: 0, end: 0, backward: !1 }), [M, L] = H(null), [E, k] = H(""), N = T(""), q = T(null), P = T(!1), z = T(null), V = T(null), B = M ?? r, $ = `${v}-format`, Y = E || x, G = f !== void 0 && (_ || Y) ? Fe(v, !!Y) : void 0, F = (y) => {
|
|
1520
1520
|
C({ start: y.selectionStart ?? 0, end: y.selectionEnd ?? 0, backward: y.selectionDirection === "backward" });
|
|
1521
1521
|
};
|
|
1522
1522
|
me(() => {
|
|
@@ -1531,8 +1531,8 @@ function ls({
|
|
|
1531
1531
|
}
|
|
1532
1532
|
k(""), V.current = { value: y, cursor: A }, y !== r ? o(y) : D.current && D.current.setSelectionRange(A, A), C({ start: A, end: A, backward: !1 });
|
|
1533
1533
|
}, X = (y, A) => {
|
|
1534
|
-
const S = y.parentElement?.querySelectorAll("[data-code-slot]"),
|
|
1535
|
-
return Math.min(
|
|
1534
|
+
const S = y.parentElement?.querySelectorAll("[data-code-slot]"), R = Array.from(S ?? []).findIndex((j) => A <= j.getBoundingClientRect().right);
|
|
1535
|
+
return Math.min(R < 0 ? 6 : R, r.length);
|
|
1536
1536
|
}, Q = /* @__PURE__ */ w(ge, { children: [
|
|
1537
1537
|
/* @__PURE__ */ w("div", { className: `q1-verification-code q1-verification-code--${p}`, children: [
|
|
1538
1538
|
/* @__PURE__ */ n("div", { className: "q1-verification-code__slots", "aria-hidden": "true", children: Array.from({ length: 7 }, (y, A) => {
|
|
@@ -1579,10 +1579,10 @@ function ls({
|
|
|
1579
1579
|
const A = y.currentTarget;
|
|
1580
1580
|
A.focus();
|
|
1581
1581
|
const S = X(A, y.clientX);
|
|
1582
|
-
|
|
1582
|
+
q.current = S, A.setPointerCapture(y.pointerId), A.setSelectionRange(S, Math.min(S + 1, r.length)), F(A);
|
|
1583
1583
|
},
|
|
1584
1584
|
onPointerMove: (y) => {
|
|
1585
|
-
const A =
|
|
1585
|
+
const A = q.current;
|
|
1586
1586
|
if (A === null) return;
|
|
1587
1587
|
const S = X(y.currentTarget, y.clientX);
|
|
1588
1588
|
y.currentTarget.setSelectionRange(Math.min(A, S), Math.min(Math.max(A, S) + 1, r.length), S < A ? "backward" : "forward"), F(y.currentTarget);
|
|
@@ -1597,10 +1597,10 @@ function ls({
|
|
|
1597
1597
|
P.current || (y.currentTarget.select(), F(y.currentTarget));
|
|
1598
1598
|
},
|
|
1599
1599
|
onPointerUp: () => {
|
|
1600
|
-
|
|
1600
|
+
q.current = null;
|
|
1601
1601
|
},
|
|
1602
1602
|
onPointerCancel: () => {
|
|
1603
|
-
|
|
1603
|
+
q.current = null;
|
|
1604
1604
|
},
|
|
1605
1605
|
onCompositionStart: (y) => {
|
|
1606
1606
|
P.current = !0, L(y.currentTarget.value);
|
|
@@ -1629,15 +1629,15 @@ function ls({
|
|
|
1629
1629
|
k("请粘贴 6 位数字验证码。");
|
|
1630
1630
|
return;
|
|
1631
1631
|
}
|
|
1632
|
-
const
|
|
1633
|
-
O(
|
|
1632
|
+
const R = y.currentTarget.selectionStart ?? r.length, j = y.currentTarget.selectionEnd ?? R, J = S.length === 6 ? S : r.slice(0, R) + S + r.slice(j);
|
|
1633
|
+
O(J, S.length === 6 ? 6 : R + S.length);
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
1636
|
)
|
|
1637
1637
|
] }),
|
|
1638
1638
|
f === void 0 && /* @__PURE__ */ n("span", { id: $, className: E ? "form-field__message" : "q1-sr-only", role: "status", "aria-atomic": "true", children: E })
|
|
1639
1639
|
] });
|
|
1640
|
-
return f === void 0 ? Q : /* @__PURE__ */ n(pr, { value: !0, children: /* @__PURE__ */ n(
|
|
1640
|
+
return f === void 0 ? Q : /* @__PURE__ */ n(pr, { value: !0, children: /* @__PURE__ */ n(qt, { controlId: v, label: f, description: _, error: Y, children: Q }) });
|
|
1641
1641
|
}
|
|
1642
1642
|
function mr({
|
|
1643
1643
|
value: e,
|
|
@@ -1659,7 +1659,7 @@ function mr({
|
|
|
1659
1659
|
_.key === "Escape" && u && (_.preventDefault(), d());
|
|
1660
1660
|
} };
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function fs({
|
|
1663
1663
|
id: e,
|
|
1664
1664
|
placeholder: t,
|
|
1665
1665
|
value: r,
|
|
@@ -1759,7 +1759,7 @@ function vn({
|
|
|
1759
1759
|
s
|
|
1760
1760
|
] });
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1762
|
+
function ps({
|
|
1763
1763
|
id: e,
|
|
1764
1764
|
ariaLabel: t,
|
|
1765
1765
|
value: r,
|
|
@@ -1783,7 +1783,7 @@ function ds({
|
|
|
1783
1783
|
onValueChange: i,
|
|
1784
1784
|
preventComposingEscapeDefault: !0
|
|
1785
1785
|
}), h = Ne(() => Ye(v, u), [u]);
|
|
1786
|
-
|
|
1786
|
+
Rt("SearchInput", !0, v);
|
|
1787
1787
|
const C = (L) => {
|
|
1788
1788
|
g?.(L), !L.defaultPrevented && !f && I(L);
|
|
1789
1789
|
}, M = a === !0 ? /* @__PURE__ */ w(ge, { children: [
|
|
@@ -1817,7 +1817,7 @@ function ds({
|
|
|
1817
1817
|
/* @__PURE__ */ n("span", { className: "q1-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: s ? "正在搜索…" : "" })
|
|
1818
1818
|
] });
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1820
|
+
function ms({
|
|
1821
1821
|
id: e,
|
|
1822
1822
|
label: t,
|
|
1823
1823
|
description: r,
|
|
@@ -1833,7 +1833,7 @@ function fs({
|
|
|
1833
1833
|
..._
|
|
1834
1834
|
}) {
|
|
1835
1835
|
const x = fe(), g = e ?? x, c = t === void 0, b = T(null), m = Ne(() => Ye(b, a), [a]);
|
|
1836
|
-
|
|
1836
|
+
Rt("Textarea", c, b);
|
|
1837
1837
|
const [v, D] = H(
|
|
1838
1838
|
() => typeof _.defaultValue == "string" ? _.defaultValue.length : 0
|
|
1839
1839
|
), I = typeof _.value == "string" ? _.value.length : v, h = d !== void 0, C = !c && (r || o) ? Fe(g, !!o) : void 0, M = ie(
|
|
@@ -1863,13 +1863,13 @@ function fs({
|
|
|
1863
1863
|
d
|
|
1864
1864
|
] })
|
|
1865
1865
|
] }) : L;
|
|
1866
|
-
return c ? E : /* @__PURE__ */ n(
|
|
1866
|
+
return c ? E : /* @__PURE__ */ n(qt, { controlId: g, label: t, description: r, error: o, wide: l, children: E });
|
|
1867
1867
|
}
|
|
1868
1868
|
function Ko(...e) {
|
|
1869
1869
|
const t = e.flatMap((o) => o?.trim().split(/\s+/).filter(Boolean) ?? []);
|
|
1870
1870
|
return [...new Set(t)].join(" ") || void 0;
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1872
|
+
function hs({
|
|
1873
1873
|
id: e,
|
|
1874
1874
|
label: t,
|
|
1875
1875
|
description: r,
|
|
@@ -1899,7 +1899,7 @@ function ps({
|
|
|
1899
1899
|
l ? "select-control--prefixed" : "",
|
|
1900
1900
|
u ? "select-control--suffixed" : ""
|
|
1901
1901
|
);
|
|
1902
|
-
return /* @__PURE__ */ n(
|
|
1902
|
+
return /* @__PURE__ */ n(qt, { controlId: e, label: t, description: r, error: o, wide: s, children: /* @__PURE__ */ w("span", { className: D, children: [
|
|
1903
1903
|
l ? /* @__PURE__ */ n("span", { className: "select-control__prefix", "aria-hidden": "true", children: l }) : null,
|
|
1904
1904
|
/* @__PURE__ */ n(
|
|
1905
1905
|
"select",
|
|
@@ -1916,7 +1916,7 @@ function ps({
|
|
|
1916
1916
|
}
|
|
1917
1917
|
),
|
|
1918
1918
|
u ? /* @__PURE__ */ n("span", { className: "select-control__suffix", "aria-hidden": "true", children: u }) : null,
|
|
1919
|
-
/* @__PURE__ */ n("span", { className: "select-control__chevron", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
1919
|
+
/* @__PURE__ */ n("span", { className: "select-control__chevron", "aria-hidden": "true", children: /* @__PURE__ */ n(Re, { size: a === "xs" ? 12 : 16, strokeWidth: 1.8 }) })
|
|
1920
1920
|
] }) });
|
|
1921
1921
|
}
|
|
1922
1922
|
function Wo(...e) {
|
|
@@ -1941,10 +1941,10 @@ function hr({
|
|
|
1941
1941
|
const x = fe(), g = e ?? x, c = t === void 0, b = a === "radio", m = c ? void 0 : `${g}-label`, v = !c && (r || o) ? Fe(g, !!o) : void 0, D = Wo(l, v), I = o ? !0 : u, h = b ? "control-option__visual control-option__visual--radio" : "control-option__visual", C = T(null), M = T(!!i);
|
|
1942
1942
|
M.current = !!i;
|
|
1943
1943
|
const [L, E] = H(!1), k = T(null), N = Ne(() => Ye(C, s), [s]);
|
|
1944
|
-
|
|
1944
|
+
Rt(b ? "Radio" : "Checkbox", c, C), te(() => {
|
|
1945
1945
|
C.current && (C.current.indeterminate = !b && !!i);
|
|
1946
1946
|
}, [i, b]);
|
|
1947
|
-
function
|
|
1947
|
+
function q(B) {
|
|
1948
1948
|
f?.(B);
|
|
1949
1949
|
const $ = C.current;
|
|
1950
1950
|
!b && $ && queueMicrotask(() => {
|
|
@@ -1967,7 +1967,7 @@ function hr({
|
|
|
1967
1967
|
"aria-invalid": I,
|
|
1968
1968
|
"aria-label": p,
|
|
1969
1969
|
"aria-labelledby": d ?? (p ? void 0 : m),
|
|
1970
|
-
onClick:
|
|
1970
|
+
onClick: q,
|
|
1971
1971
|
..._
|
|
1972
1972
|
}
|
|
1973
1973
|
);
|
|
@@ -2008,17 +2008,17 @@ function hr({
|
|
|
2008
2008
|
}
|
|
2009
2009
|
);
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2011
|
+
function bs({
|
|
2012
2012
|
...e
|
|
2013
2013
|
}) {
|
|
2014
2014
|
return /* @__PURE__ */ n(hr, { type: "checkbox", ...e });
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function gs({
|
|
2017
2017
|
...e
|
|
2018
2018
|
}) {
|
|
2019
2019
|
return /* @__PURE__ */ n(hr, { type: "radio", ...e });
|
|
2020
2020
|
}
|
|
2021
|
-
function
|
|
2021
|
+
function _s({ id: e, ...t }) {
|
|
2022
2022
|
return {
|
|
2023
2023
|
component: /* @__PURE__ */ n("input", { id: e, type: "radio", ...t })
|
|
2024
2024
|
};
|
|
@@ -2027,7 +2027,7 @@ function zo(...e) {
|
|
|
2027
2027
|
const t = Array.from(new Set(e.flatMap((r) => r?.trim().split(/\s+/).filter(Boolean) ?? [])));
|
|
2028
2028
|
return t.length > 0 ? t.join(" ") : void 0;
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2030
|
+
function ys({
|
|
2031
2031
|
type: e,
|
|
2032
2032
|
label: t,
|
|
2033
2033
|
description: r,
|
|
@@ -2201,8 +2201,8 @@ function Be({
|
|
|
2201
2201
|
return;
|
|
2202
2202
|
}
|
|
2203
2203
|
if (A.key !== "Escape" || !Ie(B, Y.id) || Y.getContainer()?.contains(B.activeElement)) return;
|
|
2204
|
-
const
|
|
2205
|
-
(
|
|
2204
|
+
const R = I.current;
|
|
2205
|
+
(R ? R.busy || C.current : !Y.escape) || (A.preventDefault(), k(B, Y));
|
|
2206
2206
|
}
|
|
2207
2207
|
function X(A) {
|
|
2208
2208
|
E.current || (E.current = { pointerId: A.pointerId, target: A.target });
|
|
@@ -2210,8 +2210,8 @@ function Be({
|
|
|
2210
2210
|
function Q(A) {
|
|
2211
2211
|
const S = E.current;
|
|
2212
2212
|
if (!S || S.pointerId !== A.pointerId || (E.current = null, !Ie(B, Y.id) || !Y.outsidePointer)) return;
|
|
2213
|
-
const
|
|
2214
|
-
j &&
|
|
2213
|
+
const R = Y.getContainer(), j = F(S.target, R), J = F(A.target, R);
|
|
2214
|
+
j && J && Ft(B, Y, "outside-pointer");
|
|
2215
2215
|
}
|
|
2216
2216
|
function y(A) {
|
|
2217
2217
|
E.current?.pointerId === A.pointerId && (E.current = null);
|
|
@@ -2219,10 +2219,10 @@ function Be({
|
|
|
2219
2219
|
return B.addEventListener("keydown", O), B.addEventListener("pointerdown", X, !0), B.addEventListener("pointerup", Q, !0), B.addEventListener("pointercancel", y, !0), () => {
|
|
2220
2220
|
const A = h.current && Ie(B, Y.id);
|
|
2221
2221
|
B.removeEventListener("keydown", O), B.removeEventListener("pointerdown", X, !0), B.removeEventListener("pointerup", Q, !0), B.removeEventListener("pointercancel", y, !0), E.current = null, G(), L.current = null;
|
|
2222
|
-
const S = M.current,
|
|
2223
|
-
if (h.current && S && (
|
|
2224
|
-
const
|
|
2225
|
-
|
|
2222
|
+
const S = M.current, R = Kt.get(B) ?? [];
|
|
2223
|
+
if (h.current && S && (R.push(S), Kt.set(B, R), queueMicrotask(() => Kt.delete(B))), A) {
|
|
2224
|
+
const J = [B.activeElement instanceof HTMLElement && B.activeElement !== B.body && !a.current?.contains(B.activeElement) ? B.activeElement : null, S, ...R, ..._?.() ?? []].find($t);
|
|
2225
|
+
J && J.focus(), (!J || B.activeElement !== J) && !_o(B) && Uo(B);
|
|
2226
2226
|
}
|
|
2227
2227
|
M.current = null;
|
|
2228
2228
|
};
|
|
@@ -2246,7 +2246,7 @@ function Be({
|
|
|
2246
2246
|
const B = window.setTimeout(() => Wt(a.current, l), 0);
|
|
2247
2247
|
return () => window.clearTimeout(B);
|
|
2248
2248
|
}, [a, d, l, u, e, m]);
|
|
2249
|
-
const
|
|
2249
|
+
const q = ce((B) => {
|
|
2250
2250
|
const $ = L.current;
|
|
2251
2251
|
if (!(!$ || typeof document > "u")) {
|
|
2252
2252
|
if (B.key === "Escape") {
|
|
@@ -2272,7 +2272,7 @@ function Be({
|
|
|
2272
2272
|
(B) => m ? it(B, m) : f ? null : B,
|
|
2273
2273
|
[f, m]
|
|
2274
2274
|
);
|
|
2275
|
-
return { focusInitialIfTopMost: z, onKeyDown:
|
|
2275
|
+
return { focusInitialIfTopMost: z, onKeyDown: q, portal: V, portalRoot: m, requestClose: P };
|
|
2276
2276
|
}
|
|
2277
2277
|
function Xe(e, t, r, o, i = {}) {
|
|
2278
2278
|
const {
|
|
@@ -2308,13 +2308,13 @@ function Xe(e, t, r, o, i = {}) {
|
|
|
2308
2308
|
_.current();
|
|
2309
2309
|
return;
|
|
2310
2310
|
}
|
|
2311
|
-
const
|
|
2311
|
+
const q = b.getBoundingClientRect(), P = Number.parseFloat(v.getComputedStyle(b).getPropertyValue(l)) || 0;
|
|
2312
2312
|
s === "content" ? (m.style.width = "max-content", m.style.maxWidth = `${Math.min(
|
|
2313
2313
|
Number.isFinite(I) ? I : 1 / 0,
|
|
2314
2314
|
v.innerWidth - 2 * P
|
|
2315
|
-
)}px`) : m.style.width = `${
|
|
2316
|
-
const z = m.getBoundingClientRect().width, V = a === "end" ?
|
|
2317
|
-
m.style.position = "fixed", m.style.left = `${Math.max(P, Math.min(F, v.innerWidth - z - P))}px`, m.style.right = "auto", m.style.top = A ? "auto" : `${
|
|
2315
|
+
)}px`) : m.style.width = `${q.width}px`;
|
|
2316
|
+
const z = m.getBoundingClientRect().width, V = a === "end" ? q.right - z : q.left, B = a === "end" ? q.left : q.right - z, $ = V >= P && V + z <= v.innerWidth - P, Y = (R) => Math.max(0, P - R) + Math.max(0, R + z + P - v.innerWidth), G = s === "content" && !$ && Y(B) < Y(V) ? a === "end" ? "start" : "end" : a, F = G === "end" ? q.right - z : q.left, O = s === "content" ? P : 0, X = v.innerHeight - q.bottom - P - O, Q = q.top - P - O, y = Math.min(m.scrollHeight, Number.isFinite(D) ? D : 1 / 0), A = X < y && Q > X, S = Math.max(0, A ? Q : X);
|
|
2317
|
+
m.style.position = "fixed", m.style.left = `${Math.max(P, Math.min(F, v.innerWidth - z - P))}px`, m.style.right = "auto", m.style.top = A ? "auto" : `${q.bottom + P}px`, m.style.bottom = A ? `${v.innerHeight - q.top + P}px` : "auto", m.style.maxHeight = `${Math.min(y, S)}px`, s === "content" && (m.style.overflowY = "auto"), m.style.visibility = "visible", f((R) => R.align === G && R.side === (A ? "top" : "bottom") ? R : { align: G, side: A ? "top" : "bottom" });
|
|
2318
2318
|
}
|
|
2319
2319
|
let C = 0, M = 0;
|
|
2320
2320
|
const L = v.performance.now() + 1e3;
|
|
@@ -2331,7 +2331,7 @@ function Xe(e, t, r, o, i = {}) {
|
|
|
2331
2331
|
};
|
|
2332
2332
|
}, [a, l, e, r, c, t, s]), { portalPopup: (b) => g(b), placement: d, onOverlayKeyDown: x };
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2334
|
+
function ws({
|
|
2335
2335
|
options: e,
|
|
2336
2336
|
value: t,
|
|
2337
2337
|
onChange: r,
|
|
@@ -2356,19 +2356,19 @@ function _s({
|
|
|
2356
2356
|
ref: h,
|
|
2357
2357
|
...C
|
|
2358
2358
|
}) {
|
|
2359
|
-
const [M, L] = H(""), [E, k] = H(!1), [N,
|
|
2359
|
+
const [M, L] = H(""), [E, k] = H(!1), [N, q] = H(0), P = T(null), z = T(null), V = T(null), B = fe(), $ = `${B}-list`, Y = `${B}-err`, G = t ?? "", F = G === "" ? void 0 : e.find((ee) => ee.value === G), O = !l && !u, X = E && O, { pressedIndex: Q, beginPress: y, cancelPress: A } = Vo({
|
|
2360
2360
|
interactive: O,
|
|
2361
2361
|
isExpanded: X,
|
|
2362
2362
|
isLoading: i
|
|
2363
|
-
}), { portalPopup: S } = Xe(X, P, V, () => k(!1)),
|
|
2364
|
-
for (const [ee,
|
|
2365
|
-
ee.startsWith("data-") && (U[ee] =
|
|
2363
|
+
}), { portalPopup: S } = Xe(X, P, V, () => k(!1)), R = o || M === "" ? e : e.filter((ee) => ee.label.toLowerCase().includes(M.toLowerCase())), j = X && !i && R[N] ? `${B}-opt-${N}` : void 0, J = !!f, ne = !!p || J, W = [d, J ? Y : null].filter(Boolean).join(" ") || void 0, U = {};
|
|
2364
|
+
for (const [ee, Z] of Object.entries(C))
|
|
2365
|
+
ee.startsWith("data-") && (U[ee] = Z);
|
|
2366
2366
|
const re = ce(
|
|
2367
2367
|
(ee) => {
|
|
2368
2368
|
z.current = ee;
|
|
2369
|
-
const
|
|
2369
|
+
const Z = typeof h == "function" ? h(ee) : void 0;
|
|
2370
2370
|
return h && typeof h != "function" && (h.current = ee), () => {
|
|
2371
|
-
z.current = null, typeof
|
|
2371
|
+
z.current = null, typeof Z == "function" ? Z() : typeof h == "function" ? h(null) : h && (h.current = null);
|
|
2372
2372
|
};
|
|
2373
2373
|
},
|
|
2374
2374
|
[h]
|
|
@@ -2376,38 +2376,38 @@ function _s({
|
|
|
2376
2376
|
te(() => {
|
|
2377
2377
|
}, [D, I]), te(() => {
|
|
2378
2378
|
if (!E) return;
|
|
2379
|
-
function ee(
|
|
2380
|
-
P.current && !P.current.contains(
|
|
2379
|
+
function ee(Z) {
|
|
2380
|
+
P.current && !P.current.contains(Z.target) && !V.current?.contains(Z.target) && k(!1);
|
|
2381
2381
|
}
|
|
2382
2382
|
return document.addEventListener("mousedown", ee), () => document.removeEventListener("mousedown", ee);
|
|
2383
2383
|
}, [E]), te(() => {
|
|
2384
2384
|
O || k(!1);
|
|
2385
2385
|
}, [O]), me(() => {
|
|
2386
2386
|
if (!j) return;
|
|
2387
|
-
const ee = V.current,
|
|
2388
|
-
if (!ee || !
|
|
2389
|
-
const oe = ee.getBoundingClientRect(), se =
|
|
2387
|
+
const ee = V.current, Z = document.getElementById(j);
|
|
2388
|
+
if (!ee || !Z) return;
|
|
2389
|
+
const oe = ee.getBoundingClientRect(), se = Z.getBoundingClientRect(), ve = oe.top + ee.clientTop, le = ve + ee.clientHeight;
|
|
2390
2390
|
se.top < ve ? ee.scrollTop += se.top - ve : se.bottom > le && (ee.scrollTop += se.bottom - le);
|
|
2391
2391
|
}, [j]);
|
|
2392
|
-
function ae(ee,
|
|
2392
|
+
function ae(ee, Z = 0) {
|
|
2393
2393
|
const oe = ee.findIndex((se) => !se.disabled);
|
|
2394
|
-
return oe === -1 ?
|
|
2394
|
+
return oe === -1 ? Z : oe;
|
|
2395
2395
|
}
|
|
2396
|
-
function de(ee,
|
|
2396
|
+
function de(ee, Z = 0) {
|
|
2397
2397
|
for (let oe = ee.length - 1; oe >= 0; oe--)
|
|
2398
2398
|
if (!ee[oe].disabled) return oe;
|
|
2399
|
-
return
|
|
2399
|
+
return Z;
|
|
2400
2400
|
}
|
|
2401
|
-
function K(ee,
|
|
2402
|
-
if (
|
|
2401
|
+
function K(ee, Z) {
|
|
2402
|
+
if (R.length === 0) return 0;
|
|
2403
2403
|
let oe = ee;
|
|
2404
|
-
for (let se = 0; se <
|
|
2405
|
-
if (oe = (oe +
|
|
2404
|
+
for (let se = 0; se < R.length; se++)
|
|
2405
|
+
if (oe = (oe + Z + R.length) % R.length, !R[oe].disabled) return oe;
|
|
2406
2406
|
return ee;
|
|
2407
2407
|
}
|
|
2408
2408
|
function ue() {
|
|
2409
|
-
const ee = G === "" ? -1 : e.findIndex((
|
|
2410
|
-
L(""),
|
|
2409
|
+
const ee = G === "" ? -1 : e.findIndex((Z) => Z.value === G);
|
|
2410
|
+
L(""), q(ee === -1 ? ae(e) : ee), k(!0);
|
|
2411
2411
|
}
|
|
2412
2412
|
function _e(ee) {
|
|
2413
2413
|
!O || ee.disabled || i || (r?.(ee.value, ee), k(!1), z.current?.focus());
|
|
@@ -2426,22 +2426,22 @@ function _s({
|
|
|
2426
2426
|
return;
|
|
2427
2427
|
}
|
|
2428
2428
|
if (ee.key === "ArrowDown")
|
|
2429
|
-
ee.preventDefault(),
|
|
2429
|
+
ee.preventDefault(), q((Z) => K(Z, 1));
|
|
2430
2430
|
else if (ee.key === "ArrowUp")
|
|
2431
|
-
ee.preventDefault(),
|
|
2431
|
+
ee.preventDefault(), q((Z) => K(Z, -1));
|
|
2432
2432
|
else if (ee.key === "Home")
|
|
2433
|
-
ee.preventDefault(),
|
|
2433
|
+
ee.preventDefault(), q((Z) => ae(R, Z));
|
|
2434
2434
|
else if (ee.key === "End")
|
|
2435
|
-
ee.preventDefault(),
|
|
2435
|
+
ee.preventDefault(), q((Z) => de(R, Z));
|
|
2436
2436
|
else if (ee.key === "Enter")
|
|
2437
|
-
ee.preventDefault(),
|
|
2437
|
+
ee.preventDefault(), R[N] && _e(R[N]);
|
|
2438
2438
|
else if (ee.key === "Escape")
|
|
2439
2439
|
ee.preventDefault(), ee.stopPropagation(), k(!1);
|
|
2440
2440
|
else if (ee.key === "Tab") {
|
|
2441
|
-
const
|
|
2441
|
+
const Z = V.current?.querySelector(
|
|
2442
2442
|
'.combobox__empty a[href], .combobox__empty button:not([disabled]), .combobox__empty input:not([disabled]), .combobox__empty select:not([disabled]), .combobox__empty textarea:not([disabled]), .combobox__empty [tabindex]:not([tabindex="-1"])'
|
|
2443
2443
|
);
|
|
2444
|
-
|
|
2444
|
+
Z && !ee.shiftKey ? (ee.preventDefault(), Z.focus()) : k(!1);
|
|
2445
2445
|
}
|
|
2446
2446
|
}
|
|
2447
2447
|
}
|
|
@@ -2493,8 +2493,8 @@ function _s({
|
|
|
2493
2493
|
"aria-describedby": W,
|
|
2494
2494
|
onChange: (ee) => {
|
|
2495
2495
|
if (!O) return;
|
|
2496
|
-
const
|
|
2497
|
-
o?.(
|
|
2496
|
+
const Z = ee.target.value, oe = o || Z === "" ? e : e.filter((se) => se.label.toLowerCase().includes(Z.toLowerCase()));
|
|
2497
|
+
o?.(Z), L(Z), q(ae(oe)), k(!0);
|
|
2498
2498
|
},
|
|
2499
2499
|
onFocus: () => O && !E && ue(),
|
|
2500
2500
|
onMouseDown: () => O && !E && ue(),
|
|
@@ -2523,30 +2523,30 @@ function _s({
|
|
|
2523
2523
|
role: "listbox",
|
|
2524
2524
|
"aria-label": s,
|
|
2525
2525
|
"aria-busy": i || void 0,
|
|
2526
|
-
children: i ? /* @__PURE__ */ n("li", { className: "combobox__loading", role: "status", "aria-live": "polite", children: "加载中…" }) :
|
|
2526
|
+
children: i ? /* @__PURE__ */ n("li", { className: "combobox__loading", role: "status", "aria-live": "polite", children: "加载中…" }) : R.map((ee, Z) => {
|
|
2527
2527
|
const oe = G !== "" && ee.value === G;
|
|
2528
2528
|
return /* @__PURE__ */ w(
|
|
2529
2529
|
"li",
|
|
2530
2530
|
{
|
|
2531
|
-
id: `${B}-opt-${
|
|
2531
|
+
id: `${B}-opt-${Z}`,
|
|
2532
2532
|
role: "option",
|
|
2533
2533
|
"aria-selected": oe,
|
|
2534
2534
|
"aria-disabled": ee.disabled || void 0,
|
|
2535
|
-
"data-pressed": Q ===
|
|
2535
|
+
"data-pressed": Q === Z || void 0,
|
|
2536
2536
|
className: ie(
|
|
2537
2537
|
"combobox__option",
|
|
2538
|
-
|
|
2538
|
+
Z === N && "combobox__option--active",
|
|
2539
2539
|
ee.disabled && "combobox__option--disabled"
|
|
2540
2540
|
),
|
|
2541
|
-
onMouseEnter: () => !ee.disabled &&
|
|
2541
|
+
onMouseEnter: () => !ee.disabled && q(Z),
|
|
2542
2542
|
onMouseDown: (se) => {
|
|
2543
2543
|
se.preventDefault();
|
|
2544
2544
|
},
|
|
2545
|
-
onPointerDown: (se) => y(se,
|
|
2546
|
-
onPointerUp: () => A(
|
|
2547
|
-
onPointerCancel: () => A(
|
|
2548
|
-
onPointerLeave: () => A(
|
|
2549
|
-
onLostPointerCapture: () => A(
|
|
2545
|
+
onPointerDown: (se) => y(se, Z, ee.disabled),
|
|
2546
|
+
onPointerUp: () => A(Z),
|
|
2547
|
+
onPointerCancel: () => A(Z),
|
|
2548
|
+
onPointerLeave: () => A(Z),
|
|
2549
|
+
onLostPointerCapture: () => A(Z),
|
|
2550
2550
|
onClick: () => _e(ee),
|
|
2551
2551
|
children: [
|
|
2552
2552
|
ee.prefix ? /* @__PURE__ */ n("span", { className: "combobox__option-prefix", "aria-hidden": "true", children: ee.prefix }) : null,
|
|
@@ -2560,12 +2560,12 @@ function _s({
|
|
|
2560
2560
|
})
|
|
2561
2561
|
}
|
|
2562
2562
|
),
|
|
2563
|
-
!i &&
|
|
2563
|
+
!i && R.length === 0 ? /* @__PURE__ */ n("div", { className: "combobox__empty", role: "status", "aria-live": "polite", children: _ }) : null
|
|
2564
2564
|
]
|
|
2565
2565
|
}
|
|
2566
2566
|
)
|
|
2567
2567
|
) : null,
|
|
2568
|
-
|
|
2568
|
+
J ? /* @__PURE__ */ n("p", { className: "combobox__error-text", id: Y, children: f }) : null
|
|
2569
2569
|
]
|
|
2570
2570
|
}
|
|
2571
2571
|
);
|
|
@@ -2621,7 +2621,7 @@ function Go(e, t) {
|
|
|
2621
2621
|
i(), o && St(e), r.openOwners = r.openOwners.filter((s) => s.id !== t.id), xt(e, r);
|
|
2622
2622
|
};
|
|
2623
2623
|
}
|
|
2624
|
-
function
|
|
2624
|
+
function Zo(e, t) {
|
|
2625
2625
|
const r = kt(e);
|
|
2626
2626
|
return r.pendingOwners.add(t), xt(e, r), () => {
|
|
2627
2627
|
r.pendingOwners.delete(t), xt(e, r);
|
|
@@ -2642,38 +2642,38 @@ function _r({
|
|
|
2642
2642
|
left: 0,
|
|
2643
2643
|
top: 0,
|
|
2644
2644
|
caret: 0
|
|
2645
|
-
}), x = T(null), g = T(null), c = T(null), b = T(null), m = T(!1), v = T(!1), D = T(!1), I = T(!1), h = T(!1), C = T(!1), M = T(!1), L = T(!1), [E, k] = H(!0), [N,
|
|
2645
|
+
}), x = T(null), g = T(null), c = T(null), b = T(null), m = T(!1), v = T(!1), D = T(!1), I = T(!1), h = T(!1), C = T(!1), M = T(!1), L = T(!1), [E, k] = H(!0), [N, q] = H(null), P = T(null), z = T(null), V = fe(), B = T({
|
|
2646
2646
|
id: `q1-tooltip-${V}`,
|
|
2647
2647
|
dismiss: () => !1,
|
|
2648
2648
|
cancelPending: () => {
|
|
2649
2649
|
},
|
|
2650
2650
|
getContainer: () => null,
|
|
2651
2651
|
getPortalRoot: () => null
|
|
2652
|
-
}), $ = N?.ownerDocument ?? null, Y = ce((
|
|
2653
|
-
if (P.current =
|
|
2654
|
-
const oe =
|
|
2655
|
-
|
|
2652
|
+
}), $ = N?.ownerDocument ?? null, Y = ce((Z) => {
|
|
2653
|
+
if (P.current = Z, !Z) return;
|
|
2654
|
+
const oe = Z.closest('[data-q1-portal="overlay"]') ?? Z.ownerDocument.body;
|
|
2655
|
+
q((se) => se === oe ? se : oe);
|
|
2656
2656
|
}, []), G = ce(() => {
|
|
2657
|
-
const
|
|
2658
|
-
if (!
|
|
2659
|
-
const se = 8, ve = 8, le =
|
|
2657
|
+
const Z = P.current, oe = z.current;
|
|
2658
|
+
if (!Z || !oe) return;
|
|
2659
|
+
const se = 8, ve = 8, le = Z.getBoundingClientRect(), ye = oe.offsetWidth, Te = oe.offsetHeight, pn = Z.ownerDocument, Lt = pn.documentElement.clientWidth, At = pn.documentElement.clientHeight, mn = le.left + le.width / 2, hn = le.top + le.height / 2;
|
|
2660
2660
|
let Ce = t;
|
|
2661
2661
|
t === "top" && le.top - ve - Te < se && le.bottom + ve + Te <= At - se ? Ce = "bottom" : t === "bottom" && le.bottom + ve + Te > At - se && le.top - ve - Te >= se ? Ce = "top" : t === "left" && le.left - ve - ye < se && le.right + ve + ye <= Lt - se ? Ce = "right" : t === "right" && le.right + ve + ye > Lt - se && le.left - ve - ye >= se && (Ce = "left");
|
|
2662
2662
|
let Ve, He;
|
|
2663
2663
|
Ce === "top" || Ce === "bottom" ? (Ve = s === "start" ? le.left : s === "end" ? le.right - ye : mn - ye / 2, He = Ce === "top" ? le.top - ve - Te : le.bottom + ve) : (He = s === "start" ? le.top : s === "end" ? le.bottom - Te : hn - Te / 2, Ve = Ce === "left" ? le.left - ve - ye : le.right + ve), Ve = Math.max(se, Math.min(Ve, Lt - se - ye)), He = Math.max(se, Math.min(He, At - se - Te));
|
|
2664
2664
|
const Or = Ce === "top" || Ce === "bottom" ? Math.max(12, Math.min(ye - 12, mn - Ve)) : Math.max(12, Math.min(Te - 12, hn - He));
|
|
2665
2665
|
_({ p: Ce, left: Ve, top: He, caret: Or });
|
|
2666
|
-
}, [t, s]), F = ce((
|
|
2667
|
-
z.current =
|
|
2666
|
+
}, [t, s]), F = ce((Z) => {
|
|
2667
|
+
z.current = Z, Z && L.current && G();
|
|
2668
2668
|
}, [G]);
|
|
2669
2669
|
me(() => {
|
|
2670
2670
|
if (!p) return;
|
|
2671
|
-
const
|
|
2672
|
-
if (!
|
|
2671
|
+
const Z = P.current?.ownerDocument.defaultView;
|
|
2672
|
+
if (!Z) return;
|
|
2673
2673
|
G();
|
|
2674
|
-
const oe = typeof
|
|
2675
|
-
return P.current && oe?.observe(P.current), z.current && oe?.observe(z.current),
|
|
2676
|
-
oe?.disconnect(),
|
|
2674
|
+
const oe = typeof Z.ResizeObserver == "function" ? new Z.ResizeObserver(G) : null;
|
|
2675
|
+
return P.current && oe?.observe(P.current), z.current && oe?.observe(z.current), Z.addEventListener("scroll", G, !0), Z.addEventListener("resize", G), () => {
|
|
2676
|
+
oe?.disconnect(), Z.removeEventListener("scroll", G, !0), Z.removeEventListener("resize", G);
|
|
2677
2677
|
};
|
|
2678
2678
|
}, [p, N, G]);
|
|
2679
2679
|
function O() {
|
|
@@ -2697,55 +2697,55 @@ function _r({
|
|
|
2697
2697
|
function y() {
|
|
2698
2698
|
return m.current || v.current || D.current || I.current;
|
|
2699
2699
|
}
|
|
2700
|
-
function A(
|
|
2701
|
-
O(), !h.current && (M.current = oe, L.current = !0, k(
|
|
2700
|
+
function A(Z, oe) {
|
|
2701
|
+
O(), !h.current && (M.current = oe, L.current = !0, k(Z), d(!0));
|
|
2702
2702
|
}
|
|
2703
|
-
function S({ clearWarm:
|
|
2703
|
+
function S({ clearWarm: Z = !1 } = {}) {
|
|
2704
2704
|
O();
|
|
2705
2705
|
const oe = P.current?.ownerDocument;
|
|
2706
2706
|
if (oe) {
|
|
2707
2707
|
const se = kt(oe);
|
|
2708
|
-
|
|
2708
|
+
Z ? se.warmUntil = 0 : L.current && M.current && (se.warmUntil = Date.now() + Xo);
|
|
2709
2709
|
}
|
|
2710
2710
|
L.current = !1, M.current = !1, d(!1);
|
|
2711
2711
|
}
|
|
2712
2712
|
me(() => {
|
|
2713
2713
|
u && (X(), S({ clearWarm: !0 }));
|
|
2714
2714
|
}, [u]);
|
|
2715
|
-
function
|
|
2715
|
+
function R() {
|
|
2716
2716
|
y() || (h.current = !1);
|
|
2717
2717
|
}
|
|
2718
2718
|
function j() {
|
|
2719
|
-
y() || (S(),
|
|
2719
|
+
y() || (S(), R());
|
|
2720
2720
|
}
|
|
2721
|
-
function
|
|
2721
|
+
function J() {
|
|
2722
2722
|
if (u) return;
|
|
2723
|
-
const
|
|
2724
|
-
if (!
|
|
2725
|
-
if (kt(
|
|
2723
|
+
const Z = P.current?.ownerDocument, oe = Z?.defaultView;
|
|
2724
|
+
if (!Z || !oe?.matchMedia("(hover: hover) and (pointer: fine)").matches || (O(), h.current || L.current)) return;
|
|
2725
|
+
if (kt(Z).warmUntil > Date.now()) {
|
|
2726
2726
|
A(!0, !0);
|
|
2727
2727
|
return;
|
|
2728
2728
|
}
|
|
2729
|
-
g.current =
|
|
2729
|
+
g.current = Zo(Z, B.current), x.current = setTimeout(() => {
|
|
2730
2730
|
O(), m.current && !h.current && A(!1, !0);
|
|
2731
2731
|
}, r);
|
|
2732
2732
|
}
|
|
2733
|
-
function ne(
|
|
2734
|
-
const oe =
|
|
2735
|
-
!oe || typeof oe.nodeType != "number" || !P.current?.contains(oe) || (y() || (h.current = !1), m.current = !0, X(),
|
|
2733
|
+
function ne(Z) {
|
|
2734
|
+
const oe = Z.target;
|
|
2735
|
+
!oe || typeof oe.nodeType != "number" || !P.current?.contains(oe) || (y() || (h.current = !1), m.current = !0, X(), J());
|
|
2736
2736
|
}
|
|
2737
|
-
function W(
|
|
2738
|
-
return oe >=
|
|
2737
|
+
function W(Z, oe, se) {
|
|
2738
|
+
return oe >= Z.left && oe <= Z.right && se >= Z.top && se <= Z.bottom;
|
|
2739
2739
|
}
|
|
2740
|
-
function U(
|
|
2740
|
+
function U(Z, oe) {
|
|
2741
2741
|
const se = P.current, ve = z.current;
|
|
2742
2742
|
if (!se || !ve) return !1;
|
|
2743
2743
|
const le = se.getBoundingClientRect(), ye = ve.getBoundingClientRect();
|
|
2744
|
-
return W(le,
|
|
2744
|
+
return W(le, Z, oe) || W(ye, Z, oe) ? !0 : ye.bottom <= le.top ? Z >= Math.min(le.left, ye.left) && Z <= Math.max(le.right, ye.right) && oe >= ye.bottom && oe <= le.top : ye.top >= le.bottom ? Z >= Math.min(le.left, ye.left) && Z <= Math.max(le.right, ye.right) && oe >= le.bottom && oe <= ye.top : ye.right <= le.left ? oe >= Math.min(le.top, ye.top) && oe <= Math.max(le.bottom, ye.bottom) && Z >= ye.right && Z <= le.left : ye.left >= le.right ? oe >= Math.min(le.top, ye.top) && oe <= Math.max(le.bottom, ye.bottom) && Z >= le.right && Z <= ye.left : !1;
|
|
2745
2745
|
}
|
|
2746
|
-
function re(
|
|
2746
|
+
function re(Z, oe) {
|
|
2747
2747
|
const se = P.current?.ownerDocument;
|
|
2748
|
-
if (!se || !L.current || !U(
|
|
2748
|
+
if (!se || !L.current || !U(Z, oe)) return !1;
|
|
2749
2749
|
X(), I.current = !0;
|
|
2750
2750
|
const ve = (le) => {
|
|
2751
2751
|
if (le.pointerType && le.pointerType !== "mouse") {
|
|
@@ -2761,9 +2761,9 @@ function _r({
|
|
|
2761
2761
|
};
|
|
2762
2762
|
return se.addEventListener("pointermove", ve, { passive: !0 }), b.current = () => se.removeEventListener("pointermove", ve), !0;
|
|
2763
2763
|
}
|
|
2764
|
-
function ae(
|
|
2765
|
-
const oe =
|
|
2766
|
-
!oe || typeof oe.nodeType != "number" || !P.current?.contains(oe) || (m.current = !1, re(
|
|
2764
|
+
function ae(Z) {
|
|
2765
|
+
const oe = Z.target;
|
|
2766
|
+
!oe || typeof oe.nodeType != "number" || !P.current?.contains(oe) || (m.current = !1, re(Z.clientX, Z.clientY) || j());
|
|
2767
2767
|
}
|
|
2768
2768
|
function de() {
|
|
2769
2769
|
u || (y() || (h.current = !1), v.current = !0, C.current || A(!0, !1));
|
|
@@ -2777,14 +2777,14 @@ function _r({
|
|
|
2777
2777
|
function _e() {
|
|
2778
2778
|
D.current = !1, j();
|
|
2779
2779
|
}
|
|
2780
|
-
function pe(
|
|
2780
|
+
function pe(Z) {
|
|
2781
2781
|
C.current = !0;
|
|
2782
2782
|
const oe = P.current?.ownerDocument.defaultView;
|
|
2783
2783
|
if (Q(), !oe) return;
|
|
2784
2784
|
const se = oe.setTimeout(() => {
|
|
2785
2785
|
C.current = !1, c.current = null;
|
|
2786
2786
|
}, 0);
|
|
2787
|
-
c.current = { view: oe, id: se },
|
|
2787
|
+
c.current = { view: oe, id: se }, Z.pointerType !== "mouse" && S({ clearWarm: !0 });
|
|
2788
2788
|
}
|
|
2789
2789
|
B.current.dismiss = () => L.current ? (h.current = !0, X(), S({ clearWarm: !0 }), !0) : !1, B.current.cancelPending = O, B.current.getContainer = () => z.current, B.current.getPortalRoot = () => N;
|
|
2790
2790
|
const we = {
|
|
@@ -2806,14 +2806,14 @@ function _r({
|
|
|
2806
2806
|
"aria-describedby": Array.from(
|
|
2807
2807
|
/* @__PURE__ */ new Set([...i.props["aria-describedby"]?.match(/\S+/g) ?? [], V])
|
|
2808
2808
|
).join(" "),
|
|
2809
|
-
onFocus: (
|
|
2810
|
-
i.props.onFocus?.(
|
|
2809
|
+
onFocus: (Z) => {
|
|
2810
|
+
i.props.onFocus?.(Z), de();
|
|
2811
2811
|
},
|
|
2812
|
-
onBlur: (
|
|
2813
|
-
i.props.onBlur?.(
|
|
2812
|
+
onBlur: (Z) => {
|
|
2813
|
+
i.props.onBlur?.(Z), K();
|
|
2814
2814
|
},
|
|
2815
|
-
onKeyDown: (
|
|
2816
|
-
i.props.onKeyDown?.(
|
|
2815
|
+
onKeyDown: (Z) => {
|
|
2816
|
+
i.props.onKeyDown?.(Z);
|
|
2817
2817
|
}
|
|
2818
2818
|
}) : /* @__PURE__ */ n(
|
|
2819
2819
|
"button",
|
|
@@ -2857,10 +2857,10 @@ function _r({
|
|
|
2857
2857
|
] });
|
|
2858
2858
|
}
|
|
2859
2859
|
const Qo = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"]);
|
|
2860
|
-
function
|
|
2860
|
+
function Jo(e, t) {
|
|
2861
2861
|
return e.find((r) => r.value === t)?.value ?? e.find((r) => !r.disabled)?.value ?? "";
|
|
2862
2862
|
}
|
|
2863
|
-
function
|
|
2863
|
+
function vs({
|
|
2864
2864
|
options: e,
|
|
2865
2865
|
ariaLabel: t,
|
|
2866
2866
|
name: r,
|
|
@@ -2871,7 +2871,7 @@ function ys({
|
|
|
2871
2871
|
fullWidth: l = !1,
|
|
2872
2872
|
iconOnly: u = !1
|
|
2873
2873
|
}) {
|
|
2874
|
-
const p = fe(), d = T([]), f = i !== void 0, [_, x] = H(() =>
|
|
2874
|
+
const p = fe(), d = T([]), f = i !== void 0, [_, x] = H(() => Jo(e, o)), g = f ? i : _, c = e.reduce((P, z, V) => (z.disabled || P.push(V), P), []), b = c[0] ?? -1, m = e.findIndex((P) => P.value === g && !P.disabled), [v, D] = H(m >= 0 ? m : b), [I, h] = H(null);
|
|
2875
2875
|
if (te(() => {
|
|
2876
2876
|
D((P) => m >= 0 ? m : P >= 0 && !e[P]?.disabled ? P : b);
|
|
2877
2877
|
}, [m, b, e]), e.length === 0) return null;
|
|
@@ -2899,8 +2899,8 @@ function ys({
|
|
|
2899
2899
|
function N(P) {
|
|
2900
2900
|
h((z) => z === P ? null : z);
|
|
2901
2901
|
}
|
|
2902
|
-
const
|
|
2903
|
-
return /* @__PURE__ */ n("div", { className:
|
|
2902
|
+
const q = ie("switch-control", `switch-control--${a}`, l ? "switch-control--full" : "");
|
|
2903
|
+
return /* @__PURE__ */ n("div", { className: q, role: "radiogroup", "aria-label": t, children: e.map((P, z) => {
|
|
2904
2904
|
const V = P.value === g, B = /* @__PURE__ */ n(
|
|
2905
2905
|
"button",
|
|
2906
2906
|
{
|
|
@@ -2936,7 +2936,7 @@ function ys({
|
|
|
2936
2936
|
return /* @__PURE__ */ n("span", { className: "switch-control__option-wrapper", role: "presentation", children: P.tooltip && !P.disabled ? /* @__PURE__ */ n(_r, { content: P.tooltip, children: B }) : B }, P.value);
|
|
2937
2937
|
}) });
|
|
2938
2938
|
}
|
|
2939
|
-
function
|
|
2939
|
+
function Ns({
|
|
2940
2940
|
checked: e,
|
|
2941
2941
|
defaultOn: t = !1,
|
|
2942
2942
|
onChange: r,
|
|
@@ -2989,10 +2989,10 @@ function yr({ tokens: e }) {
|
|
|
2989
2989
|
(t, r) => t.type ? /* @__PURE__ */ n("span", { className: `tok-${t.type}`, translate: "no", children: t.text }, r) : /* @__PURE__ */ n("span", { translate: "no", children: t.text }, r)
|
|
2990
2990
|
) });
|
|
2991
2991
|
}
|
|
2992
|
-
function
|
|
2992
|
+
function ks({ lines: e, ariaLabel: t }) {
|
|
2993
2993
|
return /* @__PURE__ */ n("pre", { className: "code-block", "aria-label": t, translate: "no", children: /* @__PURE__ */ n("code", { children: e.map((r, o) => /* @__PURE__ */ n("span", { className: "code-line", children: /* @__PURE__ */ n(yr, { tokens: r }) }, o)) }) });
|
|
2994
2994
|
}
|
|
2995
|
-
function
|
|
2995
|
+
function xs({ children: e }) {
|
|
2996
2996
|
return /* @__PURE__ */ n("code", { className: "code-inline", translate: "no", children: e });
|
|
2997
2997
|
}
|
|
2998
2998
|
const ei = {
|
|
@@ -3000,7 +3000,7 @@ const ei = {
|
|
|
3000
3000
|
added: { marker: "+", label: "新增行" },
|
|
3001
3001
|
removed: { marker: "−", label: "删除行" }
|
|
3002
3002
|
};
|
|
3003
|
-
function
|
|
3003
|
+
function Ps(e) {
|
|
3004
3004
|
const { lineNumbers: t = !0 } = e, [r, o] = H(0), i = e.tabs ? e.tabs[r] ?? e.tabs[0] : void 0, s = i ? i.lines : e.lines ?? [], a = i ? i.filename : e.filename, l = s.map((d) => d.tokens.map((f) => f.text).join("")).join(`
|
|
3005
3005
|
`), u = s.some((d) => d.state);
|
|
3006
3006
|
let p = 0;
|
|
@@ -3066,7 +3066,7 @@ function ks(e) {
|
|
|
3066
3066
|
}
|
|
3067
3067
|
);
|
|
3068
3068
|
}
|
|
3069
|
-
function
|
|
3069
|
+
function Cs({
|
|
3070
3070
|
tabs: e,
|
|
3071
3071
|
ariaLabel: t,
|
|
3072
3072
|
variant: r = "default"
|
|
@@ -3213,11 +3213,11 @@ function xs({
|
|
|
3213
3213
|
);
|
|
3214
3214
|
}
|
|
3215
3215
|
const wr = Mt(null);
|
|
3216
|
-
function
|
|
3216
|
+
function Is({ multiple: e, children: t }) {
|
|
3217
3217
|
const [r, o] = H(null), [i, s] = H();
|
|
3218
3218
|
return /* @__PURE__ */ n("div", { className: "collapse-group", children: /* @__PURE__ */ n(wr.Provider, { value: e ? null : { openId: r, setOpenId: o, inputModality: i, setInputModality: s }, children: t }) });
|
|
3219
3219
|
}
|
|
3220
|
-
function
|
|
3220
|
+
function Ds({
|
|
3221
3221
|
title: e,
|
|
3222
3222
|
defaultOpen: t,
|
|
3223
3223
|
small: r,
|
|
@@ -3285,7 +3285,7 @@ function xn(e, t, r) {
|
|
|
3285
3285
|
function ti() {
|
|
3286
3286
|
return /Mac|iPhone|iPad|iPod/.test(navigator.platform) ? "⌘K" : "Ctrl K";
|
|
3287
3287
|
}
|
|
3288
|
-
function
|
|
3288
|
+
function Ms({ sections: e, triggerLabel: t = "打开命令面板", hotkey: r }) {
|
|
3289
3289
|
const o = fe(), i = `${o}-dialog`, s = `${o}-listbox`, [a, l] = H(!1), [u, p] = H(""), [d, f] = H(0), [_, x] = H(!1), [g, c] = H(), [b, m] = H("Ctrl K"), v = T(null), D = T(null), I = T(null), h = T(null), C = Ne(() => {
|
|
3290
3290
|
const $ = u.trim().toLowerCase();
|
|
3291
3291
|
let Y = 0;
|
|
@@ -3298,7 +3298,7 @@ function Is({ sections: e, triggerLabel: t = "打开命令面板", hotkey: r })
|
|
|
3298
3298
|
})).filter((G) => G.items.length > 0);
|
|
3299
3299
|
}, [e, u]), M = C.reduce(($, Y) => $ + Y.items.length, 0), L = C.flatMap(($) => $.items.map((Y) => ({ ...Y, sectionIndex: $.sectionIndex }))).find(($) => $.flatIndex === d), E = ce(() => {
|
|
3300
3300
|
x(!1), c(void 0), l(!1);
|
|
3301
|
-
}, []), k = ce(() => [v.current], []), { onKeyDown: N, portal:
|
|
3301
|
+
}, []), k = ce(() => [v.current], []), { onKeyDown: N, portal: q, requestClose: P } = Be({
|
|
3302
3302
|
open: a,
|
|
3303
3303
|
blocking: !0,
|
|
3304
3304
|
dismissable: !0,
|
|
@@ -3366,7 +3366,7 @@ function Is({ sections: e, triggerLabel: t = "打开命令面板", hotkey: r })
|
|
|
3366
3366
|
]
|
|
3367
3367
|
}
|
|
3368
3368
|
),
|
|
3369
|
-
a ?
|
|
3369
|
+
a ? q(
|
|
3370
3370
|
/* @__PURE__ */ w("div", { className: "command-palette", children: [
|
|
3371
3371
|
/* @__PURE__ */ n("button", { type: "button", className: "command-palette__backdrop", "aria-label": "关闭命令面板", tabIndex: -1 }),
|
|
3372
3372
|
/* @__PURE__ */ w(
|
|
@@ -3493,7 +3493,7 @@ function Pn(e, t) {
|
|
|
3493
3493
|
function Cn(e, t, r) {
|
|
3494
3494
|
return `${e}-option-${t}-${r}`;
|
|
3495
3495
|
}
|
|
3496
|
-
function
|
|
3496
|
+
function Es({
|
|
3497
3497
|
open: e,
|
|
3498
3498
|
onOpenChange: t,
|
|
3499
3499
|
query: r,
|
|
@@ -3513,7 +3513,7 @@ function Ds({
|
|
|
3513
3513
|
)
|
|
3514
3514
|
),
|
|
3515
3515
|
[f, i]
|
|
3516
|
-
), [h, C] = H(), [M, L] = H(!1), [E, k] = H(), N = T(null),
|
|
3516
|
+
), [h, C] = H(), [M, L] = H(!1), [E, k] = H(), N = T(null), q = I.findIndex((F) => F.key === h), P = q === -1 ? void 0 : I[q], z = i.reduce((F, O) => F + O.items.length, 0), V = ce((F) => {
|
|
3517
3517
|
g.current?.classList.remove("search-dialog__trigger-control"), g.current = F, F?.classList.add("search-dialog__trigger-control");
|
|
3518
3518
|
}, []);
|
|
3519
3519
|
te(() => {
|
|
@@ -3551,7 +3551,7 @@ function Ds({
|
|
|
3551
3551
|
function $(F) {
|
|
3552
3552
|
if (I.length === 0) return;
|
|
3553
3553
|
L(!1), k(void 0);
|
|
3554
|
-
const O =
|
|
3554
|
+
const O = q === -1 ? F === 1 ? 0 : I.length - 1 : (q + F + I.length) % I.length;
|
|
3555
3555
|
C(I[O].key);
|
|
3556
3556
|
}
|
|
3557
3557
|
function Y(F) {
|
|
@@ -3671,19 +3671,19 @@ function Ds({
|
|
|
3671
3671
|
"data-search-dialog-pointer-pressed": E === A ? "true" : void 0,
|
|
3672
3672
|
tabIndex: -1,
|
|
3673
3673
|
disabled: Q.disabled,
|
|
3674
|
-
onPointerMove: (
|
|
3675
|
-
if (Q.disabled ||
|
|
3676
|
-
const j = N.current,
|
|
3677
|
-
N.current =
|
|
3674
|
+
onPointerMove: (R) => {
|
|
3675
|
+
if (Q.disabled || R.pointerType === "touch") return;
|
|
3676
|
+
const j = N.current, J = { x: R.clientX, y: R.clientY };
|
|
3677
|
+
N.current = J, !(j?.x === J.x && j.y === J.y) && (L(!0), C(A));
|
|
3678
3678
|
},
|
|
3679
|
-
onPointerDown: (
|
|
3680
|
-
!Q.disabled &&
|
|
3679
|
+
onPointerDown: (R) => {
|
|
3680
|
+
!Q.disabled && R.isPrimary && R.button === 0 && (L(R.pointerType !== "touch"), C(A), k(A));
|
|
3681
3681
|
},
|
|
3682
3682
|
onPointerUp: () => k(void 0),
|
|
3683
3683
|
onPointerCancel: () => k(void 0),
|
|
3684
3684
|
onPointerLeave: () => k(void 0),
|
|
3685
3685
|
onBlur: () => k(void 0),
|
|
3686
|
-
onMouseDown: (
|
|
3686
|
+
onMouseDown: (R) => R.preventDefault(),
|
|
3687
3687
|
onClick: () => !Q.disabled && s(Q),
|
|
3688
3688
|
children: [
|
|
3689
3689
|
/* @__PURE__ */ n("span", { className: "search-dialog__option-label", children: Q.label }),
|
|
@@ -3830,7 +3830,7 @@ function oi({
|
|
|
3830
3830
|
visualSnapshot: e ? t : a.current
|
|
3831
3831
|
};
|
|
3832
3832
|
}
|
|
3833
|
-
function
|
|
3833
|
+
function Ts({
|
|
3834
3834
|
open: e,
|
|
3835
3835
|
onClose: t,
|
|
3836
3836
|
title: r,
|
|
@@ -3851,7 +3851,7 @@ function Ms({
|
|
|
3851
3851
|
finishVisualClose: E,
|
|
3852
3852
|
rememberInput: k,
|
|
3853
3853
|
resolvedMotion: N,
|
|
3854
|
-
visualPresent:
|
|
3854
|
+
visualPresent: q,
|
|
3855
3855
|
visualSnapshot: P
|
|
3856
3856
|
} = oi({
|
|
3857
3857
|
open: e,
|
|
@@ -3867,7 +3867,7 @@ function Ms({
|
|
|
3867
3867
|
backdropRef: x
|
|
3868
3868
|
}), { onKeyDown: z, portal: V } = Be({
|
|
3869
3869
|
open: e,
|
|
3870
|
-
present:
|
|
3870
|
+
present: q,
|
|
3871
3871
|
blocking: !0,
|
|
3872
3872
|
dismissable: !M,
|
|
3873
3873
|
outsidePointer: !M,
|
|
@@ -3880,7 +3880,7 @@ function Ms({
|
|
|
3880
3880
|
}, [D, e]), me(() => {
|
|
3881
3881
|
const O = _.current, X = document.activeElement;
|
|
3882
3882
|
!e || !M || !O || X instanceof HTMLElement && O.contains(X) && !X.matches(":disabled") || O.focus();
|
|
3883
|
-
}, [M, e]), !
|
|
3883
|
+
}, [M, e]), !q) return null;
|
|
3884
3884
|
const B = P.title, $ = P.description, Y = P.verificationLabel, G = P.verificationPhrase;
|
|
3885
3885
|
function F() {
|
|
3886
3886
|
L && C();
|
|
@@ -4075,7 +4075,7 @@ function li(e) {
|
|
|
4075
4075
|
const t = getComputedStyle(e).transform;
|
|
4076
4076
|
return t === "none" ? 0 : new DOMMatrixReadOnly(t).m42;
|
|
4077
4077
|
}
|
|
4078
|
-
function
|
|
4078
|
+
function Ss({
|
|
4079
4079
|
open: e,
|
|
4080
4080
|
onClose: t,
|
|
4081
4081
|
title: r,
|
|
@@ -4211,7 +4211,7 @@ function Es({
|
|
|
4211
4211
|
)
|
|
4212
4212
|
);
|
|
4213
4213
|
}
|
|
4214
|
-
function
|
|
4214
|
+
function qs({
|
|
4215
4215
|
icon: e,
|
|
4216
4216
|
title: t,
|
|
4217
4217
|
description: r,
|
|
@@ -4226,7 +4226,7 @@ function Ts({
|
|
|
4226
4226
|
o ? /* @__PURE__ */ n("div", { className: "empty-state__actions", children: o }) : null
|
|
4227
4227
|
] });
|
|
4228
4228
|
}
|
|
4229
|
-
function
|
|
4229
|
+
function Rs({
|
|
4230
4230
|
leading: e,
|
|
4231
4231
|
title: t,
|
|
4232
4232
|
subtitle: r,
|
|
@@ -4243,7 +4243,7 @@ function Ss({
|
|
|
4243
4243
|
o ? /* @__PURE__ */ n("div", { className: "entity__trailing", children: o }) : null
|
|
4244
4244
|
] });
|
|
4245
4245
|
}
|
|
4246
|
-
function
|
|
4246
|
+
function $s({
|
|
4247
4247
|
label: e,
|
|
4248
4248
|
size: t = "md",
|
|
4249
4249
|
action: r,
|
|
@@ -4272,7 +4272,7 @@ function Rs({
|
|
|
4272
4272
|
}
|
|
4273
4273
|
);
|
|
4274
4274
|
}
|
|
4275
|
-
function
|
|
4275
|
+
function Ls({ title: e, message: t, action: r }) {
|
|
4276
4276
|
return /* @__PURE__ */ w("div", { className: "error-card", role: "alert", "aria-live": "assertive", children: [
|
|
4277
4277
|
/* @__PURE__ */ n(st, { className: "error-card__icon", size: 20, strokeWidth: 2, "aria-hidden": "true" }),
|
|
4278
4278
|
/* @__PURE__ */ w("p", { className: "error-card__title", children: [
|
|
@@ -4318,9 +4318,9 @@ const Ue = [
|
|
|
4318
4318
|
{ value: 1, label: "不满意", Icon: Qr },
|
|
4319
4319
|
{ value: 2, label: "一般", Icon: eo },
|
|
4320
4320
|
{ value: 3, label: "满意", Icon: so },
|
|
4321
|
-
{ value: 4, label: "非常满意", Icon:
|
|
4321
|
+
{ value: 4, label: "非常满意", Icon: Jr }
|
|
4322
4322
|
];
|
|
4323
|
-
function
|
|
4323
|
+
function As({
|
|
4324
4324
|
label: e = "反馈",
|
|
4325
4325
|
prompt: t = "这次体验怎么样?",
|
|
4326
4326
|
placeholder: r = "你的反馈…",
|
|
@@ -4329,7 +4329,7 @@ function $s({
|
|
|
4329
4329
|
onSubmit: s,
|
|
4330
4330
|
disabled: a = !1
|
|
4331
4331
|
}) {
|
|
4332
|
-
const [l, u] = H(o), [p, d] = H(o), [f, _] = H("keyboard"), [x, g] = H(null), [c, b] = Yn(pi, void 0, ui), m = T(null), v = T(null), D = T(null), I = T([]), h = T(!1), C = T(0), M = T(!1), L = T(!0), E = T("keyboard"), k = fe(), N = fe(),
|
|
4332
|
+
const [l, u] = H(o), [p, d] = H(o), [f, _] = H("keyboard"), [x, g] = H(null), [c, b] = Yn(pi, void 0, ui), m = T(null), v = T(null), D = T(null), I = T([]), h = T(!1), C = T(0), M = T(!1), L = T(!0), E = T("keyboard"), k = fe(), N = fe(), q = fe(), P = c.status === "pending", z = a || P;
|
|
4333
4333
|
te(() => (L.current = !0, () => {
|
|
4334
4334
|
L.current = !1, C.current += 1;
|
|
4335
4335
|
}), []), te(() => {
|
|
@@ -4338,59 +4338,59 @@ function $s({
|
|
|
4338
4338
|
function V() {
|
|
4339
4339
|
C.current += 1, M.current = !1, P && b({ type: "cancel-submission" });
|
|
4340
4340
|
}
|
|
4341
|
-
function B(
|
|
4342
|
-
j && V(), u(!1), _(
|
|
4341
|
+
function B(R, j = !0) {
|
|
4342
|
+
j && V(), u(!1), _(R), R === "keyboard" && d(!1), m.current?.focus();
|
|
4343
4343
|
}
|
|
4344
4344
|
te(() => {
|
|
4345
4345
|
if (o || !l) return;
|
|
4346
|
-
function
|
|
4346
|
+
function R(j) {
|
|
4347
4347
|
if (j.key !== "Escape") return;
|
|
4348
|
-
const
|
|
4349
|
-
|
|
4348
|
+
const J = document.activeElement;
|
|
4349
|
+
J !== m.current && !v.current?.contains(J) || (j.preventDefault(), B("keyboard"));
|
|
4350
4350
|
}
|
|
4351
|
-
return document.addEventListener("keydown",
|
|
4351
|
+
return document.addEventListener("keydown", R), () => document.removeEventListener("keydown", R);
|
|
4352
4352
|
}, [o, l]), te(() => {
|
|
4353
4353
|
if (!l || !p || !h.current) return;
|
|
4354
4354
|
h.current = !1;
|
|
4355
|
-
const
|
|
4356
|
-
I.current[
|
|
4355
|
+
const R = Ue.findIndex((j) => j.value === c.draft.rating);
|
|
4356
|
+
I.current[R === -1 ? 0 : R]?.focus();
|
|
4357
4357
|
}, [l, p, c.draft.rating]);
|
|
4358
|
-
function $(
|
|
4359
|
-
b({ type: "clear-result" }), _(
|
|
4358
|
+
function $(R) {
|
|
4359
|
+
b({ type: "clear-result" }), _(R), d(!0), u(!0), h.current = !0;
|
|
4360
4360
|
}
|
|
4361
|
-
function Y(
|
|
4362
|
-
C.current += 1, b({ type: "draft-change", draft:
|
|
4361
|
+
function Y(R) {
|
|
4362
|
+
C.current += 1, b({ type: "draft-change", draft: R });
|
|
4363
4363
|
}
|
|
4364
|
-
function G(
|
|
4365
|
-
z || Y({ rating:
|
|
4364
|
+
function G(R) {
|
|
4365
|
+
z || Y({ rating: R });
|
|
4366
4366
|
}
|
|
4367
|
-
function F(
|
|
4368
|
-
const
|
|
4369
|
-
if (!
|
|
4370
|
-
|
|
4371
|
-
const W = (j + (
|
|
4367
|
+
function F(R, j) {
|
|
4368
|
+
const J = R.key === "ArrowRight" || R.key === "ArrowDown", ne = R.key === "ArrowLeft" || R.key === "ArrowUp";
|
|
4369
|
+
if (!J && !ne) return;
|
|
4370
|
+
R.preventDefault();
|
|
4371
|
+
const W = (j + (J ? 1 : Ue.length - 1)) % Ue.length;
|
|
4372
4372
|
G(Ue[W].value), I.current[W]?.focus();
|
|
4373
4373
|
}
|
|
4374
|
-
async function O(
|
|
4375
|
-
if (
|
|
4374
|
+
async function O(R) {
|
|
4375
|
+
if (R.preventDefault(), !s || a || M.current) return;
|
|
4376
4376
|
const j = di(c.draft);
|
|
4377
4377
|
if (!fi(j)) {
|
|
4378
4378
|
b({ type: "validation-error" }), I.current[0]?.focus();
|
|
4379
4379
|
return;
|
|
4380
4380
|
}
|
|
4381
|
-
const
|
|
4382
|
-
C.current =
|
|
4381
|
+
const J = C.current + 1;
|
|
4382
|
+
C.current = J, M.current = !0;
|
|
4383
4383
|
const ne = E.current;
|
|
4384
|
-
E.current = "keyboard", D.current?.focus(), b({ type: "submit-start", submissionId:
|
|
4384
|
+
E.current = "keyboard", D.current?.focus(), b({ type: "submit-start", submissionId: J });
|
|
4385
4385
|
try {
|
|
4386
|
-
if (await s(j), !L.current || C.current !==
|
|
4387
|
-
M.current = !1, b({ type: "submit-success", submissionId:
|
|
4386
|
+
if (await s(j), !L.current || C.current !== J) return;
|
|
4387
|
+
M.current = !1, b({ type: "submit-success", submissionId: J }), o || B(ne, !1);
|
|
4388
4388
|
} catch {
|
|
4389
|
-
if (!L.current || C.current !==
|
|
4390
|
-
M.current = !1, b({ type: "submit-error", submissionId:
|
|
4389
|
+
if (!L.current || C.current !== J) return;
|
|
4390
|
+
M.current = !1, b({ type: "submit-error", submissionId: J });
|
|
4391
4391
|
}
|
|
4392
4392
|
}
|
|
4393
|
-
const X = Ue.findIndex((
|
|
4393
|
+
const X = Ue.findIndex((R) => R.value === c.draft.rating), Q = X === -1 ? 0 : X, y = s ? c.error === "validation" ? "请选择评分或填写反馈" : c.error === "submission" ? "发送失败,请重试" : c.status === "success" ? "已收到反馈" : "" : "暂不可发送", A = /* @__PURE__ */ w(
|
|
4394
4394
|
"form",
|
|
4395
4395
|
{
|
|
4396
4396
|
ref: v,
|
|
@@ -4399,19 +4399,19 @@ function $s({
|
|
|
4399
4399
|
"data-state": l ? "open" : "closed",
|
|
4400
4400
|
"data-motion": f,
|
|
4401
4401
|
"aria-busy": P || void 0,
|
|
4402
|
-
"aria-describedby": y && c.status !== "success" ?
|
|
4402
|
+
"aria-describedby": y && c.status !== "success" ? q : void 0,
|
|
4403
4403
|
inert: !o && !l,
|
|
4404
4404
|
onSubmit: O,
|
|
4405
|
-
onTransitionEnd: (
|
|
4406
|
-
!o && !l &&
|
|
4405
|
+
onTransitionEnd: (R) => {
|
|
4406
|
+
!o && !l && R.target === R.currentTarget && R.propertyName === "opacity" && d(!1);
|
|
4407
4407
|
},
|
|
4408
|
-
onKeyDown: (
|
|
4409
|
-
(
|
|
4408
|
+
onKeyDown: (R) => {
|
|
4409
|
+
(R.metaKey || R.ctrlKey) && R.key === "Enter" && R.target instanceof HTMLTextAreaElement && (R.preventDefault(), E.current = "keyboard", R.currentTarget.requestSubmit());
|
|
4410
4410
|
},
|
|
4411
4411
|
children: [
|
|
4412
4412
|
/* @__PURE__ */ w("div", { className: "feedback__head", children: [
|
|
4413
4413
|
/* @__PURE__ */ n("span", { className: "feedback__prompt", id: N, children: t }),
|
|
4414
|
-
/* @__PURE__ */ n("div", { className: "feedback__emotions", role: "radiogroup", "aria-labelledby": N, children: Ue.map(({ value:
|
|
4414
|
+
/* @__PURE__ */ n("div", { className: "feedback__emotions", role: "radiogroup", "aria-labelledby": N, children: Ue.map(({ value: R, label: j, Icon: J }, ne) => /* @__PURE__ */ n(
|
|
4415
4415
|
"button",
|
|
4416
4416
|
{
|
|
4417
4417
|
ref: (W) => {
|
|
@@ -4421,21 +4421,21 @@ function $s({
|
|
|
4421
4421
|
role: "radio",
|
|
4422
4422
|
className: "feedback__emotion",
|
|
4423
4423
|
"aria-label": j,
|
|
4424
|
-
"aria-checked": c.draft.rating ===
|
|
4425
|
-
"data-pointer-pressed": x ===
|
|
4424
|
+
"aria-checked": c.draft.rating === R,
|
|
4425
|
+
"data-pointer-pressed": x === R || void 0,
|
|
4426
4426
|
tabIndex: ne === Q ? 0 : -1,
|
|
4427
4427
|
disabled: z,
|
|
4428
4428
|
onPointerDown: () => {
|
|
4429
|
-
z || g(
|
|
4429
|
+
z || g(R);
|
|
4430
4430
|
},
|
|
4431
4431
|
onPointerUp: () => g(null),
|
|
4432
4432
|
onPointerCancel: () => g(null),
|
|
4433
4433
|
onPointerLeave: () => g(null),
|
|
4434
|
-
onClick: () => G(
|
|
4434
|
+
onClick: () => G(R),
|
|
4435
4435
|
onKeyDown: (W) => F(W, ne),
|
|
4436
|
-
children: /* @__PURE__ */ n(
|
|
4436
|
+
children: /* @__PURE__ */ n(J, { size: 16, strokeWidth: 1.8, "aria-hidden": "true" })
|
|
4437
4437
|
},
|
|
4438
|
-
|
|
4438
|
+
R
|
|
4439
4439
|
)) })
|
|
4440
4440
|
] }),
|
|
4441
4441
|
i ? /* @__PURE__ */ w("label", { className: "feedback__field", children: [
|
|
@@ -4447,10 +4447,10 @@ function $s({
|
|
|
4447
4447
|
value: c.draft.topic,
|
|
4448
4448
|
disabled: z,
|
|
4449
4449
|
autoComplete: "off",
|
|
4450
|
-
onChange: (
|
|
4450
|
+
onChange: (R) => Y({ topic: R.currentTarget.value }),
|
|
4451
4451
|
children: [
|
|
4452
4452
|
/* @__PURE__ */ n("option", { value: "", disabled: !0, children: "选择主题…" }),
|
|
4453
|
-
i.map((
|
|
4453
|
+
i.map((R) => /* @__PURE__ */ n("option", { value: R, children: R }, R))
|
|
4454
4454
|
]
|
|
4455
4455
|
}
|
|
4456
4456
|
)
|
|
@@ -4466,7 +4466,7 @@ function $s({
|
|
|
4466
4466
|
value: c.draft.comment,
|
|
4467
4467
|
disabled: z,
|
|
4468
4468
|
autoComplete: "off",
|
|
4469
|
-
onChange: (
|
|
4469
|
+
onChange: (R) => Y({ comment: R.currentTarget.value })
|
|
4470
4470
|
}
|
|
4471
4471
|
)
|
|
4472
4472
|
] }),
|
|
@@ -4475,7 +4475,7 @@ function $s({
|
|
|
4475
4475
|
"span",
|
|
4476
4476
|
{
|
|
4477
4477
|
className: `feedback__message${c.status === "error" ? " feedback__message--error" : ""}`,
|
|
4478
|
-
id:
|
|
4478
|
+
id: q,
|
|
4479
4479
|
role: c.status === "error" ? "alert" : void 0,
|
|
4480
4480
|
"aria-live": c.status === "error" ? "assertive" : void 0,
|
|
4481
4481
|
"aria-hidden": c.status === "success" || void 0,
|
|
@@ -4525,8 +4525,8 @@ function $s({
|
|
|
4525
4525
|
"aria-expanded": l,
|
|
4526
4526
|
"aria-controls": k,
|
|
4527
4527
|
disabled: a,
|
|
4528
|
-
onClick: (
|
|
4529
|
-
const j =
|
|
4528
|
+
onClick: (R) => {
|
|
4529
|
+
const j = R.detail > 0 ? "pointer" : "keyboard";
|
|
4530
4530
|
l ? B(j) : $(j);
|
|
4531
4531
|
},
|
|
4532
4532
|
children: e
|
|
@@ -4536,7 +4536,7 @@ function $s({
|
|
|
4536
4536
|
S
|
|
4537
4537
|
] });
|
|
4538
4538
|
}
|
|
4539
|
-
function
|
|
4539
|
+
function Fs({
|
|
4540
4540
|
title: e,
|
|
4541
4541
|
subtitle: t,
|
|
4542
4542
|
tone: r,
|
|
@@ -4574,7 +4574,7 @@ function kr(e, t, r, o, i) {
|
|
|
4574
4574
|
i.push({ path: u, name: a.name, type: a.type, level: t, parentPath: r, hasChildren: p, setsize: s, posinset: l + 1 }), a.type === "folder" && o.has(u) && a.children && kr(a.children, t + 1, u, o, i);
|
|
4575
4575
|
});
|
|
4576
4576
|
}
|
|
4577
|
-
function
|
|
4577
|
+
function Os({
|
|
4578
4578
|
nodes: e,
|
|
4579
4579
|
label: t = "项目目录",
|
|
4580
4580
|
defaultExpanded: r = []
|
|
@@ -4615,7 +4615,7 @@ function As({
|
|
|
4615
4615
|
c.currentTarget.contains(c.relatedTarget) || u("keyboard");
|
|
4616
4616
|
},
|
|
4617
4617
|
children: d.map((c) => {
|
|
4618
|
-
const b = o.has(c.path), m = b ? Gr :
|
|
4618
|
+
const b = o.has(c.path), m = b ? Gr : Zr;
|
|
4619
4619
|
return /* @__PURE__ */ n(
|
|
4620
4620
|
"li",
|
|
4621
4621
|
{
|
|
@@ -4647,7 +4647,7 @@ function As({
|
|
|
4647
4647
|
}
|
|
4648
4648
|
);
|
|
4649
4649
|
}
|
|
4650
|
-
function
|
|
4650
|
+
function mi({
|
|
4651
4651
|
orientation: e = "horizontal",
|
|
4652
4652
|
decorative: t = !0,
|
|
4653
4653
|
className: r
|
|
@@ -4655,7 +4655,38 @@ function Fs({
|
|
|
4655
4655
|
const o = ie("separator", `separator--${e}`, r ?? "");
|
|
4656
4656
|
return t ? /* @__PURE__ */ n("div", { className: o, "aria-hidden": "true" }) : /* @__PURE__ */ n("div", { className: o, role: "separator", "aria-orientation": e });
|
|
4657
4657
|
}
|
|
4658
|
-
function
|
|
4658
|
+
function hi(e) {
|
|
4659
|
+
return /* @__PURE__ */ n("svg", { viewBox: "83.3 10.3 259.7 405.7", fill: "none", "aria-hidden": "true", ...e, children: /* @__PURE__ */ w("g", { fill: "currentColor", children: [
|
|
4660
|
+
/* @__PURE__ */ n("path", { d: "M263.6,345.6h-11.6l19.3-76c34-38.5,71.7-90,71.7-129.4,0-70.1-58.3-129.9-129.9-129.9S83.3,68.6,83.3,140.3s37.8,91.8,71.8,130l19.2,75.4h-11.6c-5.1,0-9.2,4.1-9.2,9.2v1.1l15.4,52.4c.7,4.3,4.5,7.6,9,7.6h70.3c4.5,0,8.3-3.3,9-7.6l15.4-52.4v-1.1c0-5.1-4.1-9.2-9.2-9.2ZM213.2,81.7c33.4,0,60.6,27.2,60.6,60.6s-34,62.1-49,76.6l36.7,38.7c-3.5,3.9-6.9,7.8-10.3,11.4l-38-39.4-5.1-4.6c-5.7-5.1-55.5-49.3-55.5-82.7s27.2-60.6,60.6-60.6ZM176.8,293.5c16.9,17.3,29.7,28.8,31.3,30.3l5.1,4.6,5.1-4.6c1.6-1.4,14.4-13.1,31.3-30.6l-13.3,52.4h-46.2l-13.3-52.1Z" }),
|
|
4661
|
+
/* @__PURE__ */ n("path", { d: "M213.2,208.8c16.2-15.6,45.3-47.6,45.3-66.6s-20.3-45.3-45.3-45.3-45.3,20.3-45.3,45.3,29.1,50.9,45.3,66.6Z" })
|
|
4662
|
+
] }) });
|
|
4663
|
+
}
|
|
4664
|
+
function Bs({
|
|
4665
|
+
name: e,
|
|
4666
|
+
icon: t,
|
|
4667
|
+
endorsement: r = "by 奇异旅行",
|
|
4668
|
+
size: o = "md",
|
|
4669
|
+
className: i,
|
|
4670
|
+
"aria-label": s,
|
|
4671
|
+
...a
|
|
4672
|
+
}) {
|
|
4673
|
+
return /* @__PURE__ */ w(
|
|
4674
|
+
"span",
|
|
4675
|
+
{
|
|
4676
|
+
...a,
|
|
4677
|
+
role: "img",
|
|
4678
|
+
"aria-label": s ?? `${e} ${r}`,
|
|
4679
|
+
className: ie("q1-product-lockup", `q1-product-lockup--${o}`, i ?? ""),
|
|
4680
|
+
children: [
|
|
4681
|
+
/* @__PURE__ */ n("span", { className: "q1-product-lockup__icon", "aria-hidden": "true", children: t ?? /* @__PURE__ */ n(hi, {}) }),
|
|
4682
|
+
/* @__PURE__ */ n("span", { className: "q1-product-lockup__name", children: e }),
|
|
4683
|
+
/* @__PURE__ */ n(mi, { orientation: "vertical", className: "q1-product-lockup__divider" }),
|
|
4684
|
+
/* @__PURE__ */ n("span", { className: "q1-product-lockup__endorsement", children: r })
|
|
4685
|
+
]
|
|
4686
|
+
}
|
|
4687
|
+
);
|
|
4688
|
+
}
|
|
4689
|
+
function Ks({
|
|
4659
4690
|
htmlFor: e,
|
|
4660
4691
|
required: t,
|
|
4661
4692
|
children: r
|
|
@@ -4707,7 +4738,7 @@ function Ge({
|
|
|
4707
4738
|
return { activeIndex: i, itemRefs: a, focusItem: u, reset: p, onMenuKeyDown: d };
|
|
4708
4739
|
}
|
|
4709
4740
|
const Mn = 500, En = 10;
|
|
4710
|
-
function
|
|
4741
|
+
function bi({
|
|
4711
4742
|
disabled: e,
|
|
4712
4743
|
onLongPress: t
|
|
4713
4744
|
}) {
|
|
@@ -4758,7 +4789,7 @@ function mi({
|
|
|
4758
4789
|
consumeContextMenuAfterLongPress: x
|
|
4759
4790
|
};
|
|
4760
4791
|
}
|
|
4761
|
-
function
|
|
4792
|
+
function gi({
|
|
4762
4793
|
anchor: e,
|
|
4763
4794
|
menuRef: t
|
|
4764
4795
|
}) {
|
|
@@ -4785,13 +4816,13 @@ function hi({
|
|
|
4785
4816
|
};
|
|
4786
4817
|
}, [e, t]), e ? r : { x: 0, y: 0 };
|
|
4787
4818
|
}
|
|
4788
|
-
const
|
|
4789
|
-
function
|
|
4819
|
+
const _i = (e) => e.type === "item" && !e.disabled || e.type === "link";
|
|
4820
|
+
function Ws({
|
|
4790
4821
|
label: e,
|
|
4791
4822
|
entries: t,
|
|
4792
4823
|
children: r
|
|
4793
4824
|
}) {
|
|
4794
|
-
const [o, i] = H(null), s = T(null), a = T(null), l = fe(), u = o !== null, p = t.flatMap((h, C) =>
|
|
4825
|
+
const [o, i] = H(null), s = T(null), a = T(null), l = fe(), u = o !== null, p = t.flatMap((h, C) => _i(h) ? [C] : []), d = p.length === 0, { itemRefs: f, focusItem: _, reset: x, onMenuKeyDown: g } = Ge({
|
|
4795
4826
|
focusableIndices: p,
|
|
4796
4827
|
getText: (h) => {
|
|
4797
4828
|
const C = t[h];
|
|
@@ -4799,7 +4830,7 @@ function Bs({
|
|
|
4799
4830
|
},
|
|
4800
4831
|
onClose: () => v(),
|
|
4801
4832
|
onTabExit: () => window.setTimeout(() => v(!1), 0)
|
|
4802
|
-
}), c =
|
|
4833
|
+
}), c = gi({ anchor: o, menuRef: a }), b = bi({ disabled: d, onLongPress: m });
|
|
4803
4834
|
function m(h, C) {
|
|
4804
4835
|
d || (i({ x: h, y: C }), window.requestAnimationFrame(() => _(p[0])));
|
|
4805
4836
|
}
|
|
@@ -4921,7 +4952,7 @@ function un(e, t) {
|
|
|
4921
4952
|
)).filter((a) => !a.closest('[inert], [hidden], [aria-hidden="true"]') && a.getClientRects().length > 0 && a.tabIndex >= 0), i = o.indexOf(e);
|
|
4922
4953
|
o[i + 1]?.focus();
|
|
4923
4954
|
}
|
|
4924
|
-
function
|
|
4955
|
+
function zs({
|
|
4925
4956
|
entries: e,
|
|
4926
4957
|
size: t = "md",
|
|
4927
4958
|
disabled: r,
|
|
@@ -4941,9 +4972,9 @@ function Ks({
|
|
|
4941
4972
|
function h(k, N) {
|
|
4942
4973
|
if (b) return;
|
|
4943
4974
|
l(N), s(!0);
|
|
4944
|
-
const
|
|
4975
|
+
const q = k === "first" ? c[0] : c[c.length - 1];
|
|
4945
4976
|
window.cancelAnimationFrame(d.current), d.current = window.requestAnimationFrame(() => {
|
|
4946
|
-
d.current = 0, v(
|
|
4977
|
+
d.current = 0, v(q);
|
|
4947
4978
|
});
|
|
4948
4979
|
}
|
|
4949
4980
|
function C(k = !0) {
|
|
@@ -4992,8 +5023,8 @@ function Ks({
|
|
|
4992
5023
|
children: e.map((k, N) => /* @__PURE__ */ n(
|
|
4993
5024
|
"button",
|
|
4994
5025
|
{
|
|
4995
|
-
ref: (
|
|
4996
|
-
m.current[N] =
|
|
5026
|
+
ref: (q) => {
|
|
5027
|
+
m.current[N] = q;
|
|
4997
5028
|
},
|
|
4998
5029
|
type: "button",
|
|
4999
5030
|
role: "menuitem",
|
|
@@ -5011,7 +5042,7 @@ function Ks({
|
|
|
5011
5042
|
) : null
|
|
5012
5043
|
] });
|
|
5013
5044
|
}
|
|
5014
|
-
function
|
|
5045
|
+
function Vs({
|
|
5015
5046
|
tone: e,
|
|
5016
5047
|
label: t,
|
|
5017
5048
|
animated: r = !1,
|
|
@@ -5027,7 +5058,7 @@ function Ws({
|
|
|
5027
5058
|
const a = i ? `${i}:${t}` : t;
|
|
5028
5059
|
return /* @__PURE__ */ n("span", { className: s, role: "img", "aria-label": a, title: a });
|
|
5029
5060
|
}
|
|
5030
|
-
function
|
|
5061
|
+
function Hs({
|
|
5031
5062
|
tone: e = "neutral",
|
|
5032
5063
|
subtle: t = !1,
|
|
5033
5064
|
quiet: r = !1,
|
|
@@ -5055,7 +5086,7 @@ function zs({
|
|
|
5055
5086
|
)
|
|
5056
5087
|
] });
|
|
5057
5088
|
}
|
|
5058
|
-
function
|
|
5089
|
+
function Us({
|
|
5059
5090
|
href: e,
|
|
5060
5091
|
size: t = "md",
|
|
5061
5092
|
icon: r,
|
|
@@ -5093,7 +5124,7 @@ function Vs({
|
|
|
5093
5124
|
function N(P) {
|
|
5094
5125
|
a?.(P), h();
|
|
5095
5126
|
}
|
|
5096
|
-
function
|
|
5127
|
+
function q(P) {
|
|
5097
5128
|
l?.(P), m("keyboard"), h();
|
|
5098
5129
|
}
|
|
5099
5130
|
return /* @__PURE__ */ n(
|
|
@@ -5107,7 +5138,7 @@ function Vs({
|
|
|
5107
5138
|
"data-motion-input": b,
|
|
5108
5139
|
"data-pointer-pressed": g ? "true" : void 0,
|
|
5109
5140
|
onBlur: N,
|
|
5110
|
-
onKeyDown:
|
|
5141
|
+
onKeyDown: q,
|
|
5111
5142
|
onLostPointerCapture: k,
|
|
5112
5143
|
onPointerCancel: E,
|
|
5113
5144
|
onPointerDown: C,
|
|
@@ -5141,18 +5172,18 @@ function xr() {
|
|
|
5141
5172
|
onPointerUp: i
|
|
5142
5173
|
};
|
|
5143
5174
|
}
|
|
5144
|
-
function
|
|
5175
|
+
function yi({ announcement: e, action: t }) {
|
|
5145
5176
|
const r = xr();
|
|
5146
5177
|
return e ? /* @__PURE__ */ n("a", { className: "banner__cta", href: t.href, ...r, children: t.label }) : /* @__PURE__ */ w("a", { className: "banner__action", href: t.href, ...r, children: [
|
|
5147
5178
|
t.label,
|
|
5148
5179
|
/* @__PURE__ */ n(Ee, { "aria-hidden": "true", size: 16, strokeWidth: 2 })
|
|
5149
5180
|
] });
|
|
5150
5181
|
}
|
|
5151
|
-
function
|
|
5182
|
+
function wi({ title: e, onDismiss: t }) {
|
|
5152
5183
|
const r = xr();
|
|
5153
5184
|
return /* @__PURE__ */ n("button", { className: "banner__close", type: "button", "aria-label": `关闭「${e}」横幅`, onClick: t, ...r, children: /* @__PURE__ */ n(Me, { "aria-hidden": "true", size: 16, strokeWidth: 2 }) });
|
|
5154
5185
|
}
|
|
5155
|
-
function
|
|
5186
|
+
function js({ title: e, children: t, tone: r, icon: o, action: i, onDismiss: s, progress: a, className: l, ...u }) {
|
|
5156
5187
|
const p = r === void 0 && !a, d = ie(
|
|
5157
5188
|
"banner",
|
|
5158
5189
|
p ? "banner--announcement" : r === "neutral" ? "" : `banner--${r}`,
|
|
@@ -5165,7 +5196,7 @@ function Hs({ title: e, children: t, tone: r, icon: o, action: i, onDismiss: s,
|
|
|
5165
5196
|
" — ",
|
|
5166
5197
|
t
|
|
5167
5198
|
] }) : null
|
|
5168
|
-
] }), _ = i ? /* @__PURE__ */ n(
|
|
5199
|
+
] }), _ = i ? /* @__PURE__ */ n(yi, { announcement: p, action: i }) : null, x = !p && s ? /* @__PURE__ */ n(wi, { title: e, onDismiss: s }) : null;
|
|
5169
5200
|
if (a) {
|
|
5170
5201
|
const g = Number.isFinite(a.value) ? Math.min(100, Math.max(0, a.value)) : 0;
|
|
5171
5202
|
return /* @__PURE__ */ w("div", { className: d, ...u, children: [
|
|
@@ -5203,10 +5234,10 @@ function Hs({ title: e, children: t, tone: r, icon: o, action: i, onDismiss: s,
|
|
|
5203
5234
|
function je(e) {
|
|
5204
5235
|
e.removeAttribute("data-pointer-pressed");
|
|
5205
5236
|
}
|
|
5206
|
-
function
|
|
5237
|
+
function vi(e) {
|
|
5207
5238
|
je(e), e.removeAttribute("data-motion-input");
|
|
5208
5239
|
}
|
|
5209
|
-
function
|
|
5240
|
+
function Ni(e) {
|
|
5210
5241
|
return {
|
|
5211
5242
|
onPointerEnter(t) {
|
|
5212
5243
|
e.onPointerEnter?.(t), !t.defaultPrevented && t.isPrimary && t.currentTarget.removeAttribute("data-motion-input");
|
|
@@ -5227,7 +5258,7 @@ function wi(e) {
|
|
|
5227
5258
|
e.onLostPointerCapture?.(t), t.isPrimary && je(t.currentTarget);
|
|
5228
5259
|
},
|
|
5229
5260
|
onBlur(t) {
|
|
5230
|
-
e.onBlur?.(t),
|
|
5261
|
+
e.onBlur?.(t), vi(t.currentTarget);
|
|
5231
5262
|
},
|
|
5232
5263
|
onKeyDown(t) {
|
|
5233
5264
|
e.onKeyDown?.(t), je(t.currentTarget), t.currentTarget.dataset.motionInput = "keyboard";
|
|
@@ -5248,7 +5279,7 @@ function Tn({ secondary: e, divided: t, direction: r, shadow: o, bordered: i, cl
|
|
|
5248
5279
|
s
|
|
5249
5280
|
);
|
|
5250
5281
|
}
|
|
5251
|
-
function
|
|
5282
|
+
function ki(e) {
|
|
5252
5283
|
if (e.href !== void 0) {
|
|
5253
5284
|
const {
|
|
5254
5285
|
hover: f,
|
|
@@ -5268,7 +5299,7 @@ function vi(e) {
|
|
|
5268
5299
|
onPointerLeave: E,
|
|
5269
5300
|
onPointerUp: k,
|
|
5270
5301
|
...N
|
|
5271
|
-
} = e,
|
|
5302
|
+
} = e, q = Tn(e, e.hover === !0), P = e.hover ? Ni({
|
|
5272
5303
|
onBlur: D,
|
|
5273
5304
|
onKeyDown: I,
|
|
5274
5305
|
onLostPointerCapture: h,
|
|
@@ -5287,7 +5318,7 @@ function vi(e) {
|
|
|
5287
5318
|
onPointerLeave: E,
|
|
5288
5319
|
onPointerUp: k
|
|
5289
5320
|
};
|
|
5290
|
-
return /* @__PURE__ */ n("a", { className:
|
|
5321
|
+
return /* @__PURE__ */ n("a", { className: q, ...N, ...P, children: v });
|
|
5291
5322
|
}
|
|
5292
5323
|
const {
|
|
5293
5324
|
href: t,
|
|
@@ -5303,8 +5334,8 @@ function vi(e) {
|
|
|
5303
5334
|
} = e;
|
|
5304
5335
|
return /* @__PURE__ */ n("div", { className: Tn(e, !1), ...d, children: p });
|
|
5305
5336
|
}
|
|
5306
|
-
function
|
|
5307
|
-
return /* @__PURE__ */ w(
|
|
5337
|
+
function Ys({ title: e, description: t, action: r, className: o }) {
|
|
5338
|
+
return /* @__PURE__ */ w(ki, { bordered: !1, className: ["auth-card", o].filter(Boolean).join(" "), children: [
|
|
5308
5339
|
/* @__PURE__ */ w("div", { className: "auth-card__copy", children: [
|
|
5309
5340
|
/* @__PURE__ */ n("h1", { children: e }),
|
|
5310
5341
|
/* @__PURE__ */ n("p", { "aria-live": "polite", children: t })
|
|
@@ -5312,35 +5343,35 @@ function Us({ title: e, description: t, action: r, className: o }) {
|
|
|
5312
5343
|
r ? /* @__PURE__ */ n("div", { className: "auth-card__actions", children: r }) : null
|
|
5313
5344
|
] });
|
|
5314
5345
|
}
|
|
5315
|
-
function
|
|
5346
|
+
function xi({ className: e, variant: t = "panel", ...r }) {
|
|
5316
5347
|
return /* @__PURE__ */ n("aside", { className: ie("q1-sidebar", t === "plain" && "q1-sidebar--plain", e), ...r });
|
|
5317
5348
|
}
|
|
5318
|
-
function
|
|
5349
|
+
function Pi({ className: e, ...t }) {
|
|
5319
5350
|
return /* @__PURE__ */ n("div", { className: ie("q1-sidebar__header", e), ...t });
|
|
5320
5351
|
}
|
|
5321
|
-
function
|
|
5352
|
+
function Ci({ className: e, ...t }) {
|
|
5322
5353
|
return /* @__PURE__ */ n("div", { className: ie("q1-sidebar__content", e), ...t });
|
|
5323
5354
|
}
|
|
5324
|
-
function
|
|
5355
|
+
function Ii({ className: e, ...t }) {
|
|
5325
5356
|
return /* @__PURE__ */ n("div", { className: ie("q1-sidebar__footer", e), ...t });
|
|
5326
5357
|
}
|
|
5327
|
-
const dt = Object.assign(
|
|
5328
|
-
Header:
|
|
5329
|
-
Content:
|
|
5330
|
-
Footer:
|
|
5331
|
-
}),
|
|
5358
|
+
const dt = Object.assign(xi, {
|
|
5359
|
+
Header: Pi,
|
|
5360
|
+
Content: Ci,
|
|
5361
|
+
Footer: Ii
|
|
5362
|
+
}), Di = 768, Mi = {
|
|
5332
5363
|
compact: "calc(var(--q1-space-24) * 3 + var(--q1-space-8))",
|
|
5333
5364
|
default: "calc(var(--q1-space-24) * 3 + var(--q1-space-10) + var(--q1-space-4))",
|
|
5334
5365
|
wide: "calc(var(--q1-space-24) * 4 + var(--q1-space-4))"
|
|
5335
5366
|
};
|
|
5336
|
-
function
|
|
5367
|
+
function Ei(e) {
|
|
5337
5368
|
const [t, r] = H(!1);
|
|
5338
5369
|
return te(() => {
|
|
5339
5370
|
const o = window.matchMedia(`(max-width: ${e}px)`), i = () => r(o.matches);
|
|
5340
5371
|
return i(), o.addEventListener("change", i), () => o.removeEventListener("change", i);
|
|
5341
5372
|
}, [e]), t;
|
|
5342
5373
|
}
|
|
5343
|
-
function
|
|
5374
|
+
function Xs({
|
|
5344
5375
|
"aria-label": e,
|
|
5345
5376
|
open: t,
|
|
5346
5377
|
onOpenChange: r,
|
|
@@ -5348,14 +5379,14 @@ function js({
|
|
|
5348
5379
|
header: i,
|
|
5349
5380
|
footer: s,
|
|
5350
5381
|
children: a,
|
|
5351
|
-
collapseBelow: l =
|
|
5382
|
+
collapseBelow: l = Di,
|
|
5352
5383
|
drawerWidth: u = "default",
|
|
5353
5384
|
variant: p = "panel",
|
|
5354
5385
|
dismissOnBackdrop: d = !1
|
|
5355
5386
|
}) {
|
|
5356
5387
|
if (!Number.isFinite(l) || l <= 0)
|
|
5357
5388
|
throw new Error("SidebarDrawer collapseBelow must be a positive finite number");
|
|
5358
|
-
const f =
|
|
5389
|
+
const f = Ei(l), _ = fe(), x = fe(), g = T(null), c = T(null), b = T(null), m = T(!1), v = T(!1), [D, I] = H(!1), [h, C] = H("keyboard"), M = f && t, L = T(M), E = f && (M || D), k = ce(() => {
|
|
5359
5390
|
if (typeof document > "u") return [];
|
|
5360
5391
|
const $ = document.getElementById(x);
|
|
5361
5392
|
if (!($ instanceof HTMLElement)) return [];
|
|
@@ -5365,7 +5396,7 @@ function js({
|
|
|
5365
5396
|
return [Y, ...G, $];
|
|
5366
5397
|
}, [x]), N = ce(($, Y) => {
|
|
5367
5398
|
v.current = !$ && Y === "pointer", C(Y), $ && I(!0), r($);
|
|
5368
|
-
}, [r]),
|
|
5399
|
+
}, [r]), q = ce(() => {
|
|
5369
5400
|
v.current = !1, I(!1);
|
|
5370
5401
|
}, []), { onKeyDown: P, portal: z } = Be({
|
|
5371
5402
|
open: M,
|
|
@@ -5391,21 +5422,21 @@ function js({
|
|
|
5391
5422
|
}
|
|
5392
5423
|
if (!D) return;
|
|
5393
5424
|
if (!f) {
|
|
5394
|
-
|
|
5425
|
+
q();
|
|
5395
5426
|
return;
|
|
5396
5427
|
}
|
|
5397
5428
|
if (!v.current || !g.current) {
|
|
5398
|
-
|
|
5429
|
+
q();
|
|
5399
5430
|
return;
|
|
5400
5431
|
}
|
|
5401
5432
|
const $ = getComputedStyle(g.current).transitionDuration.split(",").map((F) => Number.parseFloat(F) * (F.trim().endsWith("ms") ? 1 : 1e3)), Y = Math.max(0, ...$);
|
|
5402
5433
|
if (Y === 0) {
|
|
5403
|
-
|
|
5434
|
+
q();
|
|
5404
5435
|
return;
|
|
5405
5436
|
}
|
|
5406
|
-
const G = window.setTimeout(
|
|
5437
|
+
const G = window.setTimeout(q, Y + 50);
|
|
5407
5438
|
return () => window.clearTimeout(G);
|
|
5408
|
-
}, [f, M,
|
|
5439
|
+
}, [f, M, q, D]), te(() => {
|
|
5409
5440
|
if (f || !t) {
|
|
5410
5441
|
m.current = !1;
|
|
5411
5442
|
return;
|
|
@@ -5418,7 +5449,7 @@ function js({
|
|
|
5418
5449
|
s ? /* @__PURE__ */ n(dt.Footer, { children: s }) : null
|
|
5419
5450
|
] });
|
|
5420
5451
|
const V = {
|
|
5421
|
-
"--q1-sidebar-drawer-width":
|
|
5452
|
+
"--q1-sidebar-drawer-width": Mi[u]
|
|
5422
5453
|
};
|
|
5423
5454
|
return /* @__PURE__ */ w(ge, { children: [
|
|
5424
5455
|
o({
|
|
@@ -5459,7 +5490,7 @@ function js({
|
|
|
5459
5490
|
"data-state": M ? "open" : "closed",
|
|
5460
5491
|
onKeyDown: P,
|
|
5461
5492
|
onTransitionEnd: ($) => {
|
|
5462
|
-
M || $.target !== $.currentTarget || !["opacity", "transform"].includes($.propertyName) ||
|
|
5493
|
+
M || $.target !== $.currentTarget || !["opacity", "transform"].includes($.propertyName) || q();
|
|
5463
5494
|
},
|
|
5464
5495
|
children: [
|
|
5465
5496
|
/* @__PURE__ */ w("div", { className: "q1-sidebar-drawer__header", children: [
|
|
@@ -5495,7 +5526,7 @@ function js({
|
|
|
5495
5526
|
) : null
|
|
5496
5527
|
] });
|
|
5497
5528
|
}
|
|
5498
|
-
function
|
|
5529
|
+
function Gs({ className: e, orientation: t = "vertical", ...r }) {
|
|
5499
5530
|
return /* @__PURE__ */ n(
|
|
5500
5531
|
"nav",
|
|
5501
5532
|
{
|
|
@@ -5508,7 +5539,7 @@ function Ys({ className: e, orientation: t = "vertical", ...r }) {
|
|
|
5508
5539
|
}
|
|
5509
5540
|
);
|
|
5510
5541
|
}
|
|
5511
|
-
function
|
|
5542
|
+
function Zs({ label: e, action: t, children: r, className: o, ...i }) {
|
|
5512
5543
|
const s = fe(), a = e !== void 0;
|
|
5513
5544
|
return /* @__PURE__ */ w(
|
|
5514
5545
|
"section",
|
|
@@ -5526,7 +5557,7 @@ function Xs({ label: e, action: t, children: r, className: o, ...i }) {
|
|
|
5526
5557
|
}
|
|
5527
5558
|
);
|
|
5528
5559
|
}
|
|
5529
|
-
function
|
|
5560
|
+
function Qs(e) {
|
|
5530
5561
|
const { active: t, disabled: r, icon: o, badge: i, description: s, action: a, children: l, className: u, href: p, ...d } = e, f = ie(
|
|
5531
5562
|
"q1-navigation__item",
|
|
5532
5563
|
t && "q1-navigation__item--active",
|
|
@@ -5607,7 +5638,7 @@ const Pr = {
|
|
|
5607
5638
|
function zt() {
|
|
5608
5639
|
return { ...Pr };
|
|
5609
5640
|
}
|
|
5610
|
-
function
|
|
5641
|
+
function Ti(e, t) {
|
|
5611
5642
|
switch (t.type) {
|
|
5612
5643
|
case "open":
|
|
5613
5644
|
case "close":
|
|
@@ -5664,7 +5695,7 @@ function Ae(e) {
|
|
|
5664
5695
|
}
|
|
5665
5696
|
};
|
|
5666
5697
|
}
|
|
5667
|
-
function
|
|
5698
|
+
function Si(e, t) {
|
|
5668
5699
|
if (t?.contains(e) || e.tabIndex < 0 || e.closest("[inert]") || "disabled" in e && e.disabled) return !1;
|
|
5669
5700
|
const r = window.getComputedStyle(e);
|
|
5670
5701
|
return !e.hidden && r.display !== "none" && r.visibility !== "hidden" && e.getClientRects().length > 0;
|
|
@@ -5673,32 +5704,32 @@ function Cr(e, t, r) {
|
|
|
5673
5704
|
if (!e) return null;
|
|
5674
5705
|
const i = Array.from(document.querySelectorAll(
|
|
5675
5706
|
'a[href], area[href], button, input, select, textarea, summary, iframe, [contenteditable="true"], [tabindex]'
|
|
5676
|
-
)).filter((a) =>
|
|
5707
|
+
)).filter((a) => Si(a, t)).map((a, l) => ({ element: a, order: l })).sort((a, l) => {
|
|
5677
5708
|
const u = a.element.tabIndex > 0 ? a.element.tabIndex : Number.MAX_SAFE_INTEGER, p = l.element.tabIndex > 0 ? l.element.tabIndex : Number.MAX_SAFE_INTEGER;
|
|
5678
5709
|
return u - p || a.order - l.order;
|
|
5679
5710
|
}).map(({ element: a }) => a), s = i.indexOf(e);
|
|
5680
5711
|
return s < 0 ? null : i[s + r] ?? null;
|
|
5681
5712
|
}
|
|
5682
|
-
function
|
|
5713
|
+
function qi(e, t) {
|
|
5683
5714
|
return e ? Array.from(
|
|
5684
5715
|
e.querySelectorAll("[data-context-action-id]")
|
|
5685
5716
|
).find((r) => r.dataset.contextActionId === t) ?? null : null;
|
|
5686
5717
|
}
|
|
5687
|
-
function
|
|
5718
|
+
function Ri(e) {
|
|
5688
5719
|
return e ? Array.from(e.querySelectorAll([
|
|
5689
5720
|
".q1-context-switcher__action:not(:disabled)",
|
|
5690
5721
|
'.q1-context-switcher__search input[type="search"]:not(:disabled)',
|
|
5691
5722
|
'.q1-context-switcher__item[data-context-roving-tab-stop]:not([aria-disabled="true"])'
|
|
5692
5723
|
].join(","))).filter((t) => t.getClientRects().length > 0) : [];
|
|
5693
5724
|
}
|
|
5694
|
-
const Vt = typeof document > "u" ? te : me,
|
|
5725
|
+
const Vt = typeof document > "u" ? te : me, $i = 500;
|
|
5695
5726
|
function yt(e) {
|
|
5696
5727
|
return e.trim().toLocaleLowerCase();
|
|
5697
5728
|
}
|
|
5698
|
-
function
|
|
5729
|
+
function Li(e, t) {
|
|
5699
5730
|
return t ? [e.textValue, ...e.keywords ?? []].some((r) => yt(r).includes(t)) : !0;
|
|
5700
5731
|
}
|
|
5701
|
-
function
|
|
5732
|
+
function Ai({
|
|
5702
5733
|
currentContextLabel: e,
|
|
5703
5734
|
currentContextTextValue: t,
|
|
5704
5735
|
primaryGroup: r,
|
|
@@ -5719,8 +5750,8 @@ function $i({
|
|
|
5719
5750
|
openingModality: m,
|
|
5720
5751
|
onClose: v
|
|
5721
5752
|
}) {
|
|
5722
|
-
const [D, I] = Yn(
|
|
5723
|
-
() => B.items.filter((K) =>
|
|
5753
|
+
const [D, I] = Yn(Ti, Pr), h = T(null), C = T({}), M = T(null), L = T(null), E = T(null), k = T(i), N = T(!1), q = T(D.view), P = T({ buffer: "", timer: 0 }), z = `${c}-title`, V = `${c}-${D.view}-listbox`, B = D.view === "primary" ? r : o, $ = yt(D.query), Y = Ne(
|
|
5754
|
+
() => B.items.filter((K) => Li(K, $)),
|
|
5724
5755
|
[B.items, $]
|
|
5725
5756
|
), G = Ne(
|
|
5726
5757
|
() => Y.filter((K) => !K.disabled && K.id !== i),
|
|
@@ -5746,7 +5777,7 @@ function $i({
|
|
|
5746
5777
|
const K = G.find((ue) => ue.id === F) ?? G[0];
|
|
5747
5778
|
K ? C.current[K.id]?.focus() : y ? M.current?.focus() : E.current?.focus();
|
|
5748
5779
|
}, [y, G, f, F]), Vt(() => {
|
|
5749
|
-
|
|
5780
|
+
q.current !== D.view && (q.current = D.view, D.view === "scope" ? L.current?.focus() : M.current?.focus());
|
|
5750
5781
|
}, [D.view]);
|
|
5751
5782
|
function A(K) {
|
|
5752
5783
|
K && (I({ type: "setActive", id: K }), C.current[K]?.focus());
|
|
@@ -5756,7 +5787,7 @@ function $i({
|
|
|
5756
5787
|
const _e = G.findIndex((we) => we.id === ue), pe = _e >= 0 ? _e : K === 1 ? -1 : 0;
|
|
5757
5788
|
A(G[(pe + K + G.length) % G.length]?.id ?? null);
|
|
5758
5789
|
}
|
|
5759
|
-
function
|
|
5790
|
+
function R(K, ue) {
|
|
5760
5791
|
if (K.key === "ArrowDown")
|
|
5761
5792
|
K.preventDefault(), S(1, ue.id);
|
|
5762
5793
|
else if (K.key === "ArrowUp")
|
|
@@ -5770,7 +5801,7 @@ function $i({
|
|
|
5770
5801
|
if (_e && K.key !== "/" && !pe && !K.defaultPrevented && !K.nativeEvent.isComposing && K.keyCode !== 229) {
|
|
5771
5802
|
K.preventDefault(), window.clearTimeout(P.current.timer), P.current.buffer += yt(K.key), P.current.timer = window.setTimeout(() => {
|
|
5772
5803
|
P.current.buffer = "";
|
|
5773
|
-
},
|
|
5804
|
+
}, $i);
|
|
5774
5805
|
const we = G.find(
|
|
5775
5806
|
(xe) => yt(xe.textValue).startsWith(P.current.buffer)
|
|
5776
5807
|
);
|
|
@@ -5787,7 +5818,7 @@ function $i({
|
|
|
5787
5818
|
A(ue?.id ?? null);
|
|
5788
5819
|
}
|
|
5789
5820
|
}
|
|
5790
|
-
function
|
|
5821
|
+
function J(K) {
|
|
5791
5822
|
if (K.nativeEvent.isComposing || K.keyCode === 229) return;
|
|
5792
5823
|
const _e = K.target.matches('input, textarea, select, [contenteditable="true"]'), pe = K.key === "/" || K.key.toLowerCase() === "k" && (K.metaKey || K.ctrlKey);
|
|
5793
5824
|
if (B.search && !_e && pe && !K.nativeEvent.isComposing && K.keyCode !== 229) {
|
|
@@ -5803,7 +5834,7 @@ function $i({
|
|
|
5803
5834
|
D.view === "primary" && y ? M.current : L.current,
|
|
5804
5835
|
h.current,
|
|
5805
5836
|
O ? C.current[O] : null,
|
|
5806
|
-
...D.view === "primary" ? (a ?? []).map((se) =>
|
|
5837
|
+
...D.view === "primary" ? (a ?? []).map((se) => qi(_.current, se.id)) : []
|
|
5807
5838
|
].filter(
|
|
5808
5839
|
(se) => se !== null && !se.disabled
|
|
5809
5840
|
), ee = xe.indexOf(K.target);
|
|
@@ -5845,7 +5876,7 @@ function $i({
|
|
|
5845
5876
|
"data-side": b.side,
|
|
5846
5877
|
"data-open-modality": m,
|
|
5847
5878
|
style: { left: b.left, top: b.top },
|
|
5848
|
-
onKeyDown:
|
|
5879
|
+
onKeyDown: J,
|
|
5849
5880
|
children: [
|
|
5850
5881
|
/* @__PURE__ */ n("h2", { ref: E, id: z, className: "q1-sr-only", tabIndex: -1, children: ae }),
|
|
5851
5882
|
/* @__PURE__ */ w("div", { className: "q1-context-switcher__groups", children: [
|
|
@@ -5920,7 +5951,7 @@ function $i({
|
|
|
5920
5951
|
"data-context-id": K.id,
|
|
5921
5952
|
...Ae(_e),
|
|
5922
5953
|
onClick: () => ne(K),
|
|
5923
|
-
onKeyDown: (pe) =>
|
|
5954
|
+
onKeyDown: (pe) => R(pe, K),
|
|
5924
5955
|
children: [
|
|
5925
5956
|
D.view === "scope" && K.avatar ? /* @__PURE__ */ n("span", { className: "q1-context-switcher__avatar", "aria-hidden": "true", children: K.avatar }) : null,
|
|
5926
5957
|
/* @__PURE__ */ w("span", { className: "q1-context-switcher__item-content", children: [
|
|
@@ -5964,8 +5995,8 @@ function $i({
|
|
|
5964
5995
|
}
|
|
5965
5996
|
);
|
|
5966
5997
|
}
|
|
5967
|
-
const
|
|
5968
|
-
function
|
|
5998
|
+
const Fi = typeof document > "u" ? te : me;
|
|
5999
|
+
function Oi({
|
|
5969
6000
|
currentContextTextValue: e,
|
|
5970
6001
|
groups: t,
|
|
5971
6002
|
pendingId: r,
|
|
@@ -5986,16 +6017,16 @@ function Ai({
|
|
|
5986
6017
|
onOverlayKeyDown: m
|
|
5987
6018
|
}) {
|
|
5988
6019
|
const v = Ne(() => [
|
|
5989
|
-
...t.flatMap((N) => N.items.map((
|
|
6020
|
+
...t.flatMap((N) => N.items.map((q) => ({ kind: "item", group: N, item: q }))),
|
|
5990
6021
|
...(o ?? []).map((N) => ({ kind: "action", action: N }))
|
|
5991
6022
|
], [o, t]), D = Ne(() => v.flatMap(
|
|
5992
|
-
(N,
|
|
6023
|
+
(N, q) => N.kind === "item" ? !N.item.disabled && N.item.id !== r ? [q] : [] : N.action.disabled ? [] : [q]
|
|
5993
6024
|
), [v, r]), I = (N) => v[N]?.kind === "item" ? v[N].item.textValue : v[N]?.action.textValue ?? "", h = Ne(() => {
|
|
5994
6025
|
for (const N of t) {
|
|
5995
|
-
const
|
|
6026
|
+
const q = v.findIndex(
|
|
5996
6027
|
(P) => P.kind === "item" && P.group.id === N.id && P.item.id === N.selectedId && !P.item.disabled && P.item.id !== r
|
|
5997
6028
|
);
|
|
5998
|
-
if (
|
|
6029
|
+
if (q >= 0) return q;
|
|
5999
6030
|
}
|
|
6000
6031
|
return D[0];
|
|
6001
6032
|
}, [v, D, t, r]), { itemRefs: C, focusItem: M, reset: L, onMenuKeyDown: E } = Ge({
|
|
@@ -6003,7 +6034,7 @@ function Ai({
|
|
|
6003
6034
|
getText: I,
|
|
6004
6035
|
onClose: () => b(!0)
|
|
6005
6036
|
});
|
|
6006
|
-
c.current = L,
|
|
6037
|
+
c.current = L, Fi(() => {
|
|
6007
6038
|
if (!l || !u || g.current) return;
|
|
6008
6039
|
if (g.current = !0, D.length === 0) {
|
|
6009
6040
|
p.current?.focus();
|
|
@@ -6048,10 +6079,10 @@ function Ai({
|
|
|
6048
6079
|
"aria-label": N.textValue,
|
|
6049
6080
|
children: [
|
|
6050
6081
|
/* @__PURE__ */ n("div", { className: "q1-context-switcher__group-label", "aria-hidden": "true", children: N.label }),
|
|
6051
|
-
N.items.map((
|
|
6082
|
+
N.items.map((q) => {
|
|
6052
6083
|
const P = v.findIndex(
|
|
6053
|
-
(B) => B.kind === "item" && B.group.id === N.id && B.item.id ===
|
|
6054
|
-
), z =
|
|
6084
|
+
(B) => B.kind === "item" && B.group.id === N.id && B.item.id === q.id
|
|
6085
|
+
), z = q.id === r, V = !!(q.disabled || z);
|
|
6055
6086
|
return /* @__PURE__ */ w(
|
|
6056
6087
|
"button",
|
|
6057
6088
|
{
|
|
@@ -6062,25 +6093,25 @@ function Ai({
|
|
|
6062
6093
|
role: "menuitemradio",
|
|
6063
6094
|
tabIndex: -1,
|
|
6064
6095
|
className: "q1-context-switcher__item",
|
|
6065
|
-
"aria-label":
|
|
6066
|
-
"aria-checked": N.selectedId ===
|
|
6096
|
+
"aria-label": q.textValue,
|
|
6097
|
+
"aria-checked": N.selectedId === q.id,
|
|
6067
6098
|
"aria-disabled": V || void 0,
|
|
6068
6099
|
"aria-busy": z || void 0,
|
|
6069
|
-
"data-context-id":
|
|
6100
|
+
"data-context-id": q.id,
|
|
6070
6101
|
...Ae(V),
|
|
6071
6102
|
onClick: () => {
|
|
6072
|
-
V || i(
|
|
6103
|
+
V || i(q, N);
|
|
6073
6104
|
},
|
|
6074
6105
|
children: [
|
|
6075
|
-
|
|
6106
|
+
q.avatar ? /* @__PURE__ */ n("span", { className: "q1-context-switcher__avatar", "aria-hidden": "true", children: q.avatar }) : null,
|
|
6076
6107
|
/* @__PURE__ */ w("span", { className: "q1-context-switcher__item-content", children: [
|
|
6077
|
-
/* @__PURE__ */ n("span", { className: "q1-context-switcher__item-label", children:
|
|
6078
|
-
|
|
6108
|
+
/* @__PURE__ */ n("span", { className: "q1-context-switcher__item-label", children: q.label }),
|
|
6109
|
+
q.description ? /* @__PURE__ */ n("span", { className: "q1-context-switcher__description", children: q.description }) : null
|
|
6079
6110
|
] }),
|
|
6080
|
-
z ? /* @__PURE__ */ n(ke, { className: "q1-context-switcher__pending", size: 16, strokeWidth: 2, "aria-hidden": "true" }) : N.selectedId ===
|
|
6111
|
+
z ? /* @__PURE__ */ n(ke, { className: "q1-context-switcher__pending", size: 16, strokeWidth: 2, "aria-hidden": "true" }) : N.selectedId === q.id ? /* @__PURE__ */ n(De, { className: "q1-context-switcher__check", size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null
|
|
6081
6112
|
]
|
|
6082
6113
|
},
|
|
6083
|
-
|
|
6114
|
+
q.id
|
|
6084
6115
|
);
|
|
6085
6116
|
})
|
|
6086
6117
|
]
|
|
@@ -6088,12 +6119,12 @@ function Ai({
|
|
|
6088
6119
|
N.id
|
|
6089
6120
|
)) }),
|
|
6090
6121
|
o?.length ? /* @__PURE__ */ n("div", { className: "q1-context-switcher__footer", children: o.map((N) => {
|
|
6091
|
-
const
|
|
6122
|
+
const q = v.findIndex((P) => P.kind === "action" && P.action.id === N.id);
|
|
6092
6123
|
return /* @__PURE__ */ w(
|
|
6093
6124
|
"button",
|
|
6094
6125
|
{
|
|
6095
6126
|
ref: (P) => {
|
|
6096
|
-
C.current[
|
|
6127
|
+
C.current[q] = P;
|
|
6097
6128
|
},
|
|
6098
6129
|
type: "button",
|
|
6099
6130
|
role: "menuitem",
|
|
@@ -6117,7 +6148,7 @@ function Ai({
|
|
|
6117
6148
|
}
|
|
6118
6149
|
);
|
|
6119
6150
|
}
|
|
6120
|
-
function
|
|
6151
|
+
function Bi(e, t) {
|
|
6121
6152
|
const r = new Set(t.map((s) => s.id)), o = /* @__PURE__ */ new Map();
|
|
6122
6153
|
let i;
|
|
6123
6154
|
for (const s of e) {
|
|
@@ -6133,10 +6164,10 @@ const Sn = typeof document > "u" ? te : me;
|
|
|
6133
6164
|
function Ir(e) {
|
|
6134
6165
|
return e.trim().toLocaleLowerCase();
|
|
6135
6166
|
}
|
|
6136
|
-
function
|
|
6167
|
+
function Ki(e, t) {
|
|
6137
6168
|
return t ? [e.textValue, ...e.keywords ?? []].some((r) => Ir(r).includes(t)) : !0;
|
|
6138
6169
|
}
|
|
6139
|
-
function
|
|
6170
|
+
function Wi({
|
|
6140
6171
|
header: e,
|
|
6141
6172
|
headerActions: t,
|
|
6142
6173
|
groups: r,
|
|
@@ -6160,12 +6191,12 @@ function Bi({
|
|
|
6160
6191
|
const D = `${_}-title`, I = (y) => `${_}-${encodeURIComponent(y)}-label`, [h, C] = H({}), M = T([]), L = ce(() => {
|
|
6161
6192
|
M.current.forEach((y) => y.cancel()), M.current = [];
|
|
6162
6193
|
}, []), E = Ne(() => r.map((y) => {
|
|
6163
|
-
const A = Ir(h[y.id] ?? ""), S = A ? y.items.filter((
|
|
6194
|
+
const A = Ir(h[y.id] ?? ""), S = A ? y.items.filter((R) => Ki(R, A)) : y.items;
|
|
6164
6195
|
return {
|
|
6165
6196
|
group: y,
|
|
6166
6197
|
query: A,
|
|
6167
6198
|
items: S,
|
|
6168
|
-
parents:
|
|
6199
|
+
parents: Bi(y.items, S)
|
|
6169
6200
|
};
|
|
6170
6201
|
}), [r, h]), k = Ne(() => new Set(E.flatMap(
|
|
6171
6202
|
({ items: y }) => y.map((A) => A.id)
|
|
@@ -6173,7 +6204,7 @@ function Bi({
|
|
|
6173
6204
|
...(t ?? []).map((y) => ({ kind: "header-action", action: y })),
|
|
6174
6205
|
...r.flatMap((y) => y.items.map((A) => ({ kind: "item", group: y, item: A }))),
|
|
6175
6206
|
...(i ?? []).map((y) => ({ kind: "footer-action", action: y }))
|
|
6176
|
-
], [i, r, t]),
|
|
6207
|
+
], [i, r, t]), q = Ne(() => N.flatMap(
|
|
6177
6208
|
(y, A) => y.kind === "item" ? !y.item.disabled && y.item.id !== o && k.has(y.item.id) ? [A] : [] : y.action.disabled ? [] : [A]
|
|
6178
6209
|
), [N, o, k]), P = (y) => {
|
|
6179
6210
|
const A = N[y];
|
|
@@ -6183,38 +6214,38 @@ function Bi({
|
|
|
6183
6214
|
const A = N.findIndex(
|
|
6184
6215
|
(S) => S.kind === "item" && (S.item.kind ?? "context") === "context" && S.group.id === y.id && S.item.id === y.selectedId && !S.item.disabled && S.item.id !== o
|
|
6185
6216
|
);
|
|
6186
|
-
if (A >= 0 &&
|
|
6217
|
+
if (A >= 0 && q.includes(A)) return A;
|
|
6187
6218
|
}
|
|
6188
|
-
return
|
|
6189
|
-
}, [N,
|
|
6190
|
-
focusableIndices:
|
|
6219
|
+
return q[0];
|
|
6220
|
+
}, [N, q, r, o]), { activeIndex: V, itemRefs: B, focusItem: $, reset: Y, onMenuKeyDown: G } = Ge({
|
|
6221
|
+
focusableIndices: q,
|
|
6191
6222
|
getText: P,
|
|
6192
6223
|
onClose: () => m(!0)
|
|
6193
|
-
}), F =
|
|
6224
|
+
}), F = q.includes(V) && N[V]?.kind === "item" ? V : q.find((y) => N[y]?.kind === "item");
|
|
6194
6225
|
b.current = Y, Sn(() => {
|
|
6195
6226
|
if (!l || !p || c.current) return;
|
|
6196
|
-
if (c.current = !0,
|
|
6227
|
+
if (c.current = !0, q.length === 0) {
|
|
6197
6228
|
const A = d.current?.querySelector('input[type="search"]');
|
|
6198
6229
|
A ? A.focus() : d.current?.focus();
|
|
6199
6230
|
return;
|
|
6200
6231
|
}
|
|
6201
|
-
const y = g.current === "last" ?
|
|
6232
|
+
const y = g.current === "last" ? q[q.length - 1] : z;
|
|
6202
6233
|
y !== void 0 && $(y);
|
|
6203
|
-
}, [$,
|
|
6234
|
+
}, [$, q, l, p, d, z]), Sn(() => {
|
|
6204
6235
|
const y = d.current, A = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
6205
6236
|
if (!l || !p || !y || u !== "pointer" || A.matches) return;
|
|
6206
|
-
const S = getComputedStyle(y),
|
|
6237
|
+
const S = getComputedStyle(y), R = (W) => {
|
|
6207
6238
|
const U = S.getPropertyValue(W).trim();
|
|
6208
6239
|
return parseFloat(U) * (U.endsWith("ms") ? 1 : 1e3);
|
|
6209
|
-
}, j =
|
|
6210
|
-
if (!Number.isFinite(
|
|
6211
|
-
const ne = (j -
|
|
6240
|
+
}, j = R("--q1-duration-fast"), J = Math.min(R("--q1-duration-press"), j);
|
|
6241
|
+
if (!Number.isFinite(J) || !Number.isFinite(j) || J <= 0) return;
|
|
6242
|
+
const ne = (j - J) / 2;
|
|
6212
6243
|
return M.current = [...y.querySelectorAll(".q1-context-switcher__item")].map(
|
|
6213
6244
|
(W, U) => W.animate([
|
|
6214
6245
|
{ opacity: 0, transform: "translateY(-2px)" },
|
|
6215
6246
|
{ opacity: 1, transform: "translateY(0)" }
|
|
6216
6247
|
], {
|
|
6217
|
-
duration:
|
|
6248
|
+
duration: J,
|
|
6218
6249
|
delay: Math.min(U, 2) * ne,
|
|
6219
6250
|
easing: S.getPropertyValue("--q1-ease-out").trim(),
|
|
6220
6251
|
fill: "backwards"
|
|
@@ -6226,7 +6257,7 @@ function Bi({
|
|
|
6226
6257
|
function O(y) {
|
|
6227
6258
|
if (L(), v(y), !(y.defaultPrevented || y.key === "Escape")) {
|
|
6228
6259
|
if (y.key === "Tab") {
|
|
6229
|
-
const A =
|
|
6260
|
+
const A = Ri(d.current), S = A.indexOf(y.target), R = S + (y.shiftKey ? -1 : 1), j = S >= 0 ? A[R] : null;
|
|
6230
6261
|
if (y.preventDefault(), j) {
|
|
6231
6262
|
y.stopPropagation(), j.focus();
|
|
6232
6263
|
return;
|
|
@@ -6235,7 +6266,7 @@ function Bi({
|
|
|
6235
6266
|
return;
|
|
6236
6267
|
}
|
|
6237
6268
|
if (!(y.target.matches('input[type="search"]') && y.key !== "Escape")) {
|
|
6238
|
-
if (
|
|
6269
|
+
if (q.length === 0 && (y.key === "ArrowDown" || y.key === "ArrowUp" || y.key === "Home" || y.key === "End" || y.key.length === 1 && /\S/.test(y.key))) {
|
|
6239
6270
|
y.preventDefault();
|
|
6240
6271
|
return;
|
|
6241
6272
|
}
|
|
@@ -6247,17 +6278,17 @@ function Bi({
|
|
|
6247
6278
|
if (y.nativeEvent.isComposing || y.keyCode === 229 || y.key !== "ArrowDown" && y.key !== "ArrowUp") return;
|
|
6248
6279
|
y.preventDefault(), y.stopPropagation();
|
|
6249
6280
|
const S = N.flatMap(
|
|
6250
|
-
(j,
|
|
6251
|
-
),
|
|
6252
|
-
|
|
6281
|
+
(j, J) => j.kind === "item" && j.group.id === A.id && q.includes(J) ? [J] : []
|
|
6282
|
+
), R = y.key === "ArrowDown" ? S[0] : S.at(-1);
|
|
6283
|
+
R !== void 0 && $(R);
|
|
6253
6284
|
}
|
|
6254
6285
|
function Q(y, A) {
|
|
6255
|
-
const S = N.findIndex((
|
|
6286
|
+
const S = N.findIndex((R) => R.kind === A && R.action.id === y.id);
|
|
6256
6287
|
return /* @__PURE__ */ w(
|
|
6257
6288
|
"button",
|
|
6258
6289
|
{
|
|
6259
|
-
ref: (
|
|
6260
|
-
B.current[S] =
|
|
6290
|
+
ref: (R) => {
|
|
6291
|
+
B.current[S] = R;
|
|
6261
6292
|
},
|
|
6262
6293
|
type: "button",
|
|
6263
6294
|
role: "menuitem",
|
|
@@ -6303,8 +6334,8 @@ function Bi({
|
|
|
6303
6334
|
] })
|
|
6304
6335
|
] }),
|
|
6305
6336
|
t?.length ? /* @__PURE__ */ n("div", { className: "q1-context-switcher__header-actions", role: "menu", "aria-labelledby": D, children: t.map((y) => Q(y, "header-action")) }) : null,
|
|
6306
|
-
/* @__PURE__ */ n("div", { className: "q1-context-switcher__groups", children: E.map(({ group: y, items: A, query: S, parents:
|
|
6307
|
-
const j = `${_}-${y.id}-results`,
|
|
6337
|
+
/* @__PURE__ */ n("div", { className: "q1-context-switcher__groups", children: E.map(({ group: y, items: A, query: S, parents: R }) => {
|
|
6338
|
+
const j = `${_}-${y.id}-results`, J = (S ? y.search?.noResults : y.emptyState ?? y.search?.noResults) ?? { title: "暂无可用选项" };
|
|
6308
6339
|
return /* @__PURE__ */ w(nt, { children: [
|
|
6309
6340
|
y.divider ? /* @__PURE__ */ n("div", { className: "q1-context-switcher__separator", role: "separator" }) : null,
|
|
6310
6341
|
/* @__PURE__ */ w("div", { className: "q1-context-switcher__group", "data-context-group-id": y.id, children: [
|
|
@@ -6337,7 +6368,7 @@ function Bi({
|
|
|
6337
6368
|
role: A.length ? "menu" : void 0,
|
|
6338
6369
|
"aria-label": A.length ? y.textValue : void 0,
|
|
6339
6370
|
children: A.map((ne) => {
|
|
6340
|
-
const W =
|
|
6371
|
+
const W = R.get(ne.id), U = N.findIndex(
|
|
6341
6372
|
(ue) => ue.kind === "item" && ue.group.id === y.id && ue.item.id === ne.id
|
|
6342
6373
|
), re = ne.id === o, ae = !!(ne.disabled || re), de = (ne.kind ?? "context") === "context", K = de && y.selectedId === ne.id;
|
|
6343
6374
|
return /* @__PURE__ */ w(
|
|
@@ -6376,8 +6407,8 @@ function Bi({
|
|
|
6376
6407
|
}
|
|
6377
6408
|
),
|
|
6378
6409
|
A.length ? null : /* @__PURE__ */ w("div", { role: "status", "aria-live": "polite", "data-context-empty": !0, children: [
|
|
6379
|
-
/* @__PURE__ */ n("div", { className: "q1-context-switcher__item-label", children:
|
|
6380
|
-
|
|
6410
|
+
/* @__PURE__ */ n("div", { className: "q1-context-switcher__item-label", children: J.title }),
|
|
6411
|
+
J.description ? /* @__PURE__ */ n("div", { className: "q1-context-switcher__empty-description", children: J.description }) : null
|
|
6381
6412
|
] })
|
|
6382
6413
|
] })
|
|
6383
6414
|
] }, y.id);
|
|
@@ -6387,9 +6418,9 @@ function Bi({
|
|
|
6387
6418
|
}
|
|
6388
6419
|
);
|
|
6389
6420
|
}
|
|
6390
|
-
const Se = 8,
|
|
6421
|
+
const Se = 8, qn = 4, Rn = typeof document > "u" ? te : me;
|
|
6391
6422
|
let $e = null, wt = 0, Qt = !1;
|
|
6392
|
-
function
|
|
6423
|
+
function zi() {
|
|
6393
6424
|
if (typeof document > "u") return null;
|
|
6394
6425
|
if (!$e || $e.parentElement !== document.body) {
|
|
6395
6426
|
const e = document.body.querySelector(':scope > [data-q1-portal="context-switcher"]');
|
|
@@ -6397,10 +6428,10 @@ function Ki() {
|
|
|
6397
6428
|
}
|
|
6398
6429
|
return wt += 1, $e;
|
|
6399
6430
|
}
|
|
6400
|
-
function
|
|
6431
|
+
function Vi() {
|
|
6401
6432
|
wt = Math.max(0, wt - 1), !(wt > 0) && (Qt && $e?.remove(), $e = null, Qt = !1);
|
|
6402
6433
|
}
|
|
6403
|
-
function
|
|
6434
|
+
function Hi({
|
|
6404
6435
|
controlled: e,
|
|
6405
6436
|
isOpen: t,
|
|
6406
6437
|
managePortal: r = !0,
|
|
@@ -6429,27 +6460,27 @@ function zi({
|
|
|
6429
6460
|
_(null);
|
|
6430
6461
|
return;
|
|
6431
6462
|
}
|
|
6432
|
-
const I =
|
|
6433
|
-
return _(I), () =>
|
|
6434
|
-
}, [r]),
|
|
6463
|
+
const I = zi();
|
|
6464
|
+
return _(I), () => Vi();
|
|
6465
|
+
}, [r]), Rn(() => {
|
|
6435
6466
|
const I = b.current;
|
|
6436
6467
|
if (b.current = t, !I && t) {
|
|
6437
6468
|
c.current = "trigger";
|
|
6438
6469
|
return;
|
|
6439
6470
|
}
|
|
6440
6471
|
!I || t || (e && v.current(), c.current === "trigger" && s.current?.focus());
|
|
6441
|
-
}, [e, t]),
|
|
6472
|
+
}, [e, t]), Rn(() => {
|
|
6442
6473
|
if (!t || !o || r && !f) return;
|
|
6443
6474
|
function I() {
|
|
6444
6475
|
const E = s.current, k = a.current;
|
|
6445
6476
|
if (!E || !k) return;
|
|
6446
|
-
const N = E.getBoundingClientRect(),
|
|
6477
|
+
const N = E.getBoundingClientRect(), q = l.current?.getBoundingClientRect(), P = k.getBoundingClientRect(), z = window.innerWidth, V = window.innerHeight, B = getComputedStyle(E).direction === "rtl" ? "rtl" : "ltr";
|
|
6447
6478
|
let $ = "start";
|
|
6448
6479
|
const Y = B === "rtl" ? N.right - P.width : N.left, G = B === "rtl" ? N.left : N.right - P.width;
|
|
6449
6480
|
let F = Y;
|
|
6450
6481
|
(F < Se || F + P.width > z - Se) && ($ = "end", F = G), F = Math.max(Se, Math.min(F, z - P.width - Se));
|
|
6451
|
-
let O = "bottom", X = (
|
|
6452
|
-
X + P.height > V - Se && (O = "top", X = N.top - P.height -
|
|
6482
|
+
let O = "bottom", X = (q?.bottom ?? N.bottom) + qn;
|
|
6483
|
+
X + P.height > V - Se && (O = "top", X = N.top - P.height - qn), X = Math.max(Se, Math.min(X, V - P.height - Se)), g(
|
|
6453
6484
|
(Q) => Q.align === $ && Q.side === O && Q.direction === B && Q.left === F && Q.top === X ? Q : { align: $, side: O, direction: B, left: F, top: X }
|
|
6454
6485
|
);
|
|
6455
6486
|
}
|
|
@@ -6477,7 +6508,7 @@ function zi({
|
|
|
6477
6508
|
return document.addEventListener("pointerdown", I), () => document.removeEventListener("pointerdown", I);
|
|
6478
6509
|
}, [t, i]), { triggerRef: s, popupRef: a, portalRoot: f, placement: x, closeWithFocus: D };
|
|
6479
6510
|
}
|
|
6480
|
-
function
|
|
6511
|
+
function Ui(e, t, r) {
|
|
6481
6512
|
const o = /* @__PURE__ */ new Set();
|
|
6482
6513
|
for (const i of e)
|
|
6483
6514
|
for (const s of i.items) {
|
|
@@ -6508,11 +6539,11 @@ function $n(e, t) {
|
|
|
6508
6539
|
}
|
|
6509
6540
|
return o === e ? r : null;
|
|
6510
6541
|
}
|
|
6511
|
-
function
|
|
6542
|
+
function ji(e, t) {
|
|
6512
6543
|
return e.length === t.length && e.every((r, o) => r === t[o]);
|
|
6513
6544
|
}
|
|
6514
|
-
const
|
|
6515
|
-
function
|
|
6545
|
+
const Yi = 1e3;
|
|
6546
|
+
function Xi(e, t, r) {
|
|
6516
6547
|
if (!e || typeof MutationObserver > "u") return null;
|
|
6517
6548
|
const o = e.closest(".q1-context-switcher"), i = document.body, s = o ? $n(i, o) : null;
|
|
6518
6549
|
if (!o || !s) return null;
|
|
@@ -6537,17 +6568,17 @@ function ji(e, t, r) {
|
|
|
6537
6568
|
const x = Array.from(a).find((g) => {
|
|
6538
6569
|
if (!g.isConnected) return !1;
|
|
6539
6570
|
const c = g.closest(".q1-context-switcher"), b = c ? $n(i, c) : null;
|
|
6540
|
-
return b !== null &&
|
|
6571
|
+
return b !== null && ji(b, s) && c?.dataset.q1ContextSwitcherFocusHandoffKey === t && c.dataset.q1ContextSwitcherPrimarySelectedId === r;
|
|
6541
6572
|
});
|
|
6542
6573
|
if (x) {
|
|
6543
6574
|
p(), x.focus();
|
|
6544
6575
|
return;
|
|
6545
6576
|
}
|
|
6546
|
-
l === null && (l = window.setTimeout(p,
|
|
6577
|
+
l === null && (l = window.setTimeout(p, Yi));
|
|
6547
6578
|
});
|
|
6548
6579
|
return f.observe(i, { childList: !0, subtree: !0 }), document.addEventListener("focusin", d, !0), { disconnect: p };
|
|
6549
6580
|
}
|
|
6550
|
-
function
|
|
6581
|
+
function ec({
|
|
6551
6582
|
currentContext: e,
|
|
6552
6583
|
groups: t,
|
|
6553
6584
|
open: r,
|
|
@@ -6563,17 +6594,17 @@ function Qs({
|
|
|
6563
6594
|
label: _,
|
|
6564
6595
|
presentation: x
|
|
6565
6596
|
}) {
|
|
6566
|
-
|
|
6597
|
+
Ui(t, x, p);
|
|
6567
6598
|
const [g, c] = H(o), b = r !== void 0, m = b ? r : g, v = T(null), D = T(null), I = T(null), h = T("selected"), C = T("pointer"), M = T(null), L = T(!1), E = T(() => {
|
|
6568
|
-
}), k = T(!1), N = fe(),
|
|
6569
|
-
primary: t.find((K) => K.id ===
|
|
6570
|
-
scope: t.find((K) => K.id ===
|
|
6599
|
+
}), k = T(!1), N = fe(), q = x?.type === "drilldown" ? x : null, P = q !== null, z = x?.type === "stacked", V = z ? p.textValue : e.textValue, B = _ ? `${_} ${V}` : V, $ = q ? {
|
|
6600
|
+
primary: t.find((K) => K.id === q.primaryGroupId),
|
|
6601
|
+
scope: t.find((K) => K.id === q.scopeGroupId)
|
|
6571
6602
|
} : null, Y = $?.primary?.items.find(
|
|
6572
6603
|
(K) => K.id === $.primary?.selectedId
|
|
6573
|
-
), G =
|
|
6604
|
+
), G = q && $?.scope ? JSON.stringify([
|
|
6574
6605
|
_ ?? "",
|
|
6575
|
-
|
|
6576
|
-
|
|
6606
|
+
q.primaryGroupId,
|
|
6607
|
+
q.scopeGroupId,
|
|
6577
6608
|
$.scope.selectedId ?? ""
|
|
6578
6609
|
]) : void 0, F = z ? p : P && Y ? Y : e;
|
|
6579
6610
|
m && (k.current = !1);
|
|
@@ -6603,7 +6634,7 @@ function Qs({
|
|
|
6603
6634
|
deferPortalUntilReady: !0,
|
|
6604
6635
|
onClose: Q,
|
|
6605
6636
|
restoreFocus: !1
|
|
6606
|
-
}), A =
|
|
6637
|
+
}), A = Hi({
|
|
6607
6638
|
controlled: b,
|
|
6608
6639
|
isOpen: m,
|
|
6609
6640
|
managePortal: P,
|
|
@@ -6614,25 +6645,25 @@ function Qs({
|
|
|
6614
6645
|
errorRef: v,
|
|
6615
6646
|
positioningKey: l,
|
|
6616
6647
|
onRequestClose: X,
|
|
6617
|
-
onCloseTransition:
|
|
6648
|
+
onCloseTransition: R
|
|
6618
6649
|
});
|
|
6619
6650
|
function S() {
|
|
6620
6651
|
M.current?.disconnect(), M.current = null, !k.current && (k.current = !0, E.current());
|
|
6621
6652
|
}
|
|
6622
|
-
function
|
|
6653
|
+
function R() {
|
|
6623
6654
|
S(), L.current = !1;
|
|
6624
6655
|
}
|
|
6625
6656
|
function j(K) {
|
|
6626
6657
|
A.closeWithFocus(K ? "trigger" : "preserve"), O(!1), S(), K && A.triggerRef.current?.focus();
|
|
6627
6658
|
}
|
|
6628
|
-
function
|
|
6659
|
+
function J(K, ue) {
|
|
6629
6660
|
h.current = K, C.current = ue, A.closeWithFocus("trigger"), L.current = !1, O(!0);
|
|
6630
6661
|
}
|
|
6631
6662
|
function ne(K) {
|
|
6632
|
-
K.key === "ArrowDown" || K.key === "Enter" || K.key === " " ? (K.preventDefault(), m ||
|
|
6663
|
+
K.key === "ArrowDown" || K.key === "Enter" || K.key === " " ? (K.preventDefault(), m || J("selected", "keyboard")) : K.key === "ArrowUp" ? (K.preventDefault(), m || J(P ? "selected" : "last", "keyboard")) : K.key === "Escape" && m && (K.preventDefault(), j(!0));
|
|
6633
6664
|
}
|
|
6634
6665
|
function W(K, ue) {
|
|
6635
|
-
P && ue.id === $?.primary?.id && (M.current?.disconnect(), M.current = G ?
|
|
6666
|
+
P && ue.id === $?.primary?.id && (M.current?.disconnect(), M.current = G ? Xi(A.triggerRef.current, G, K.id) : null), A.closeWithFocus("trigger"), s(K, ue), b || j(!0);
|
|
6636
6667
|
}
|
|
6637
6668
|
function U(K) {
|
|
6638
6669
|
A.closeWithFocus("trigger"), f?.(K), b || j(!0);
|
|
@@ -6641,7 +6672,7 @@ function Qs({
|
|
|
6641
6672
|
s(K, ue);
|
|
6642
6673
|
}
|
|
6643
6674
|
const ae = P && $ ? /* @__PURE__ */ n(
|
|
6644
|
-
|
|
6675
|
+
Ai,
|
|
6645
6676
|
{
|
|
6646
6677
|
currentContextLabel: e.label,
|
|
6647
6678
|
currentContextTextValue: e.textValue,
|
|
@@ -6664,7 +6695,7 @@ function Qs({
|
|
|
6664
6695
|
onClose: j
|
|
6665
6696
|
}
|
|
6666
6697
|
) : z ? /* @__PURE__ */ n(
|
|
6667
|
-
|
|
6698
|
+
Wi,
|
|
6668
6699
|
{
|
|
6669
6700
|
openingModality: C.current,
|
|
6670
6701
|
header: p,
|
|
@@ -6687,7 +6718,7 @@ function Qs({
|
|
|
6687
6718
|
onOverlayKeyDown: y.onKeyDown
|
|
6688
6719
|
}
|
|
6689
6720
|
) : /* @__PURE__ */ n(
|
|
6690
|
-
|
|
6721
|
+
Oi,
|
|
6691
6722
|
{
|
|
6692
6723
|
currentContextTextValue: e.textValue,
|
|
6693
6724
|
groups: t,
|
|
@@ -6726,7 +6757,7 @@ function Qs({
|
|
|
6726
6757
|
"aria-expanded": m,
|
|
6727
6758
|
"aria-controls": N,
|
|
6728
6759
|
"aria-label": B,
|
|
6729
|
-
onClick: (K) => m ? j(!0) :
|
|
6760
|
+
onClick: (K) => m ? j(!0) : J("selected", K.detail === 0 ? "keyboard" : "pointer"),
|
|
6730
6761
|
onKeyDown: ne,
|
|
6731
6762
|
children: [
|
|
6732
6763
|
F.avatar ? /* @__PURE__ */ n("span", { className: `q1-context-switcher__avatar${z ? " q1-context-switcher__avatar--stacked" : ""}`, "aria-hidden": "true", children: F.avatar }) : null,
|
|
@@ -6734,7 +6765,7 @@ function Qs({
|
|
|
6734
6765
|
/* @__PURE__ */ n("span", { className: "q1-context-switcher__current-label", children: F.label }),
|
|
6735
6766
|
!P && F.description ? /* @__PURE__ */ n("span", { className: "q1-context-switcher__description", children: F.description }) : null
|
|
6736
6767
|
] }),
|
|
6737
|
-
/* @__PURE__ */ n(
|
|
6768
|
+
/* @__PURE__ */ n(Re, { className: "q1-context-switcher__chevron", size: 16, strokeWidth: 1.8, "aria-hidden": "true" })
|
|
6738
6769
|
]
|
|
6739
6770
|
}
|
|
6740
6771
|
),
|
|
@@ -6745,7 +6776,7 @@ function Qs({
|
|
|
6745
6776
|
}
|
|
6746
6777
|
);
|
|
6747
6778
|
}
|
|
6748
|
-
function
|
|
6779
|
+
function Gi({ title: e, content: t }) {
|
|
6749
6780
|
const [r, o] = H(!1), [i, s] = H(!1), [a, l] = H(), u = T(null), p = T(null), d = fe(), f = fe();
|
|
6750
6781
|
te(() => {
|
|
6751
6782
|
if (r) {
|
|
@@ -6798,11 +6829,11 @@ function Yi({ title: e, content: t }) {
|
|
|
6798
6829
|
] })
|
|
6799
6830
|
] });
|
|
6800
6831
|
}
|
|
6801
|
-
function
|
|
6832
|
+
function Zi(e) {
|
|
6802
6833
|
return typeof e == "string" || typeof e == "number";
|
|
6803
6834
|
}
|
|
6804
|
-
function
|
|
6805
|
-
const o = T(null), i = T(null), [s, a] = H(!1), [l, u] = H(!1), p = fe(), d = !!(t &&
|
|
6835
|
+
function Qi({ title: e, ellipsis: t, children: r }) {
|
|
6836
|
+
const o = T(null), i = T(null), [s, a] = H(!1), [l, u] = H(!1), p = fe(), d = !!(t && Zi(r));
|
|
6806
6837
|
return me(() => {
|
|
6807
6838
|
if (!d) return;
|
|
6808
6839
|
const f = o.current, _ = i.current;
|
|
@@ -6839,7 +6870,7 @@ function Gi({ title: e, ellipsis: t, children: r }) {
|
|
|
6839
6870
|
) : null
|
|
6840
6871
|
] }) : /* @__PURE__ */ n("dd", { className: "description__value", children: r });
|
|
6841
6872
|
}
|
|
6842
|
-
function
|
|
6873
|
+
function tc({
|
|
6843
6874
|
title: e,
|
|
6844
6875
|
tooltip: t,
|
|
6845
6876
|
align: r,
|
|
@@ -6850,9 +6881,9 @@ function Zs({
|
|
|
6850
6881
|
return /* @__PURE__ */ w("dl", { className: s, children: [
|
|
6851
6882
|
/* @__PURE__ */ w("dt", { className: "description__title", children: [
|
|
6852
6883
|
e,
|
|
6853
|
-
t ? /* @__PURE__ */ n(
|
|
6884
|
+
t ? /* @__PURE__ */ n(Gi, { title: e, content: t }) : null
|
|
6854
6885
|
] }),
|
|
6855
|
-
/* @__PURE__ */ n(
|
|
6886
|
+
/* @__PURE__ */ n(Qi, { title: e, ellipsis: o, children: i })
|
|
6856
6887
|
] });
|
|
6857
6888
|
}
|
|
6858
6889
|
const Ji = {
|
|
@@ -6867,7 +6898,7 @@ function pt(e, t, r) {
|
|
|
6867
6898
|
function Ln(e, t, r, o, i, s, a) {
|
|
6868
6899
|
return e === "top" ? t.top - s - r.height >= a : e === "bottom" ? t.bottom + s + r.height <= i - a : e === "left" ? t.left - s - r.width >= a : t.right + s + r.width <= o - a;
|
|
6869
6900
|
}
|
|
6870
|
-
function
|
|
6901
|
+
function ea(e) {
|
|
6871
6902
|
const { trigger: t, card: r, viewportWidth: o, viewportHeight: i, align: s, gap: a, margin: l } = e, u = Ji[e.placement], p = !Ln(e.placement, t, r, o, i, a, l) && Ln(u, t, r, o, i, a, l) ? u : e.placement, d = t.left + t.width / 2, f = t.top + t.height / 2;
|
|
6872
6903
|
let _, x;
|
|
6873
6904
|
p === "top" || p === "bottom" ? (_ = s === "start" ? t.left : s === "end" ? t.right - r.width : d - r.width / 2, x = p === "top" ? t.top - a - r.height : t.bottom + a) : (_ = p === "left" ? t.left - a - r.width : t.right + a, x = s === "start" ? t.top : s === "end" ? t.bottom - r.height : f - r.height / 2), _ = pt(_, l, Math.max(l, o - l - r.width)), x = pt(x, l, Math.max(l, i - l - r.height));
|
|
@@ -6880,7 +6911,7 @@ function Qi(e) {
|
|
|
6880
6911
|
originY: p === "top" ? r.height : p === "bottom" ? 0 : pt(f - x, g, r.height - g)
|
|
6881
6912
|
};
|
|
6882
6913
|
}
|
|
6883
|
-
function
|
|
6914
|
+
function ta(e) {
|
|
6884
6915
|
return {
|
|
6885
6916
|
left: e.left,
|
|
6886
6917
|
top: e.top,
|
|
@@ -6888,7 +6919,7 @@ function Zi(e) {
|
|
|
6888
6919
|
"--context-card-origin-y": `${e.originY}px`
|
|
6889
6920
|
};
|
|
6890
6921
|
}
|
|
6891
|
-
const
|
|
6922
|
+
const na = 150, Jt = [
|
|
6892
6923
|
"button:not(:disabled)",
|
|
6893
6924
|
"a[href]",
|
|
6894
6925
|
"input:not(:disabled)",
|
|
@@ -6902,16 +6933,16 @@ function mt(e, t, r) {
|
|
|
6902
6933
|
return t >= e.left && t <= e.right && r >= e.top && r <= e.bottom;
|
|
6903
6934
|
}
|
|
6904
6935
|
function An(e, t) {
|
|
6905
|
-
return Array.from(e.querySelectorAll(
|
|
6936
|
+
return Array.from(e.querySelectorAll(Jt)).filter(
|
|
6906
6937
|
(r) => !t?.contains(r) && !r.matches("[inert], [inert] *") && r.getClientRects().length > 0
|
|
6907
6938
|
);
|
|
6908
6939
|
}
|
|
6909
|
-
function
|
|
6940
|
+
function ra({
|
|
6910
6941
|
id: e,
|
|
6911
6942
|
placement: t,
|
|
6912
6943
|
align: r
|
|
6913
6944
|
}) {
|
|
6914
|
-
const [o, i] = H(!1), [s, a] = H(!1), [l, u] = H(!1), [p, d] = H(t), [f, _] = H({ left: 0, top: 0, originX: 0, originY: 0 }), [x, g] = H(null), c = T(null), b = T(null), m = T(!1), v = T(null), D = T(null), I = T(!1), h = T(!1), C = T(!1), M = T(!1), L = T(!1), E = T(!1), k = T(!1), N = T(null),
|
|
6945
|
+
const [o, i] = H(!1), [s, a] = H(!1), [l, u] = H(!1), [p, d] = H(t), [f, _] = H({ left: 0, top: 0, originX: 0, originY: 0 }), [x, g] = H(null), c = T(null), b = T(null), m = T(!1), v = T(null), D = T(null), I = T(!1), h = T(!1), C = T(!1), M = T(!1), L = T(!1), E = T(!1), k = T(!1), N = T(null), q = ce(() => {
|
|
6915
6946
|
const W = c.current?.ownerDocument.defaultView;
|
|
6916
6947
|
v.current !== null && W?.clearTimeout(v.current), v.current = null;
|
|
6917
6948
|
}, []), P = ce(() => {
|
|
@@ -6919,17 +6950,17 @@ function ta({
|
|
|
6919
6950
|
}, []), z = ce(() => c.current?.querySelector(
|
|
6920
6951
|
'button, a[href], input, select, textarea, summary, [contenteditable="true"], [tabindex]:not([tabindex="-1"])'
|
|
6921
6952
|
)?.matches(':disabled, [aria-disabled="true"]') ?? !1, []), V = ce((W = !1) => {
|
|
6922
|
-
|
|
6923
|
-
}, [
|
|
6924
|
-
|
|
6925
|
-
}, [
|
|
6953
|
+
q(), P(), m.current = !1, a(!W), i(!1);
|
|
6954
|
+
}, [q, P]), B = ce((W) => {
|
|
6955
|
+
q(), !(L.current || z()) && (m.current = !0, a(W), i(!0));
|
|
6956
|
+
}, [q, z]), $ = ce(() => I.current || h.current || C.current || M.current || D.current !== null, []), Y = ce((W = !1) => {
|
|
6926
6957
|
$() || (V(W), E.current || (L.current = !1));
|
|
6927
6958
|
}, [$, V]), G = ce(() => {
|
|
6928
6959
|
const W = c.current, U = b.current;
|
|
6929
6960
|
if (!W || !U) return;
|
|
6930
6961
|
const re = W.ownerDocument.defaultView;
|
|
6931
6962
|
if (!re) return;
|
|
6932
|
-
const ae = Number.parseFloat(re.getComputedStyle(W).getPropertyValue("--q1-space-2")) || 8, de =
|
|
6963
|
+
const ae = Number.parseFloat(re.getComputedStyle(W).getPropertyValue("--q1-space-2")) || 8, de = ea({
|
|
6933
6964
|
trigger: W.getBoundingClientRect(),
|
|
6934
6965
|
card: { width: U.offsetWidth, height: U.offsetHeight },
|
|
6935
6966
|
viewportWidth: W.ownerDocument.documentElement.clientWidth,
|
|
@@ -6948,7 +6979,7 @@ function ta({
|
|
|
6948
6979
|
g(Tt(U));
|
|
6949
6980
|
const re = (K) => {
|
|
6950
6981
|
if (k.current = !1, K.key !== "Tab" || K.defaultPrevented || !E.current) return;
|
|
6951
|
-
const ue = W.querySelector(
|
|
6982
|
+
const ue = W.querySelector(Jt), _e = An(U, b.current), pe = _e.indexOf(U.activeElement);
|
|
6952
6983
|
if (!ue || pe < 0 || _e.length === 0) return;
|
|
6953
6984
|
const we = K.shiftKey ? (pe - 1 + _e.length) % _e.length : (pe + 1) % _e.length;
|
|
6954
6985
|
_e[we] === ue && (L.current = !1, E.current = !1);
|
|
@@ -6975,7 +7006,7 @@ function ta({
|
|
|
6975
7006
|
'button, a[href], input, select, textarea, summary, [contenteditable="true"], [tabindex]:not([tabindex="-1"])'
|
|
6976
7007
|
)?.focus();
|
|
6977
7008
|
}, []), O = ce(() => {
|
|
6978
|
-
const W = c.current?.querySelector(
|
|
7009
|
+
const W = c.current?.querySelector(Jt);
|
|
6979
7010
|
if (!W) return null;
|
|
6980
7011
|
const U = An(W.ownerDocument, b.current), re = U.indexOf(W), ae = re >= 0 ? U[re + 1] : void 0;
|
|
6981
7012
|
return ae?.focus(), ae ?? null;
|
|
@@ -7008,8 +7039,8 @@ function ta({
|
|
|
7008
7039
|
U.removeEventListener("keydown", ae, !0), U.removeEventListener("pointerdown", K, !0), U.removeEventListener("pointerup", ue, !0), U.removeEventListener("pointercancel", _e, !0), N.current = null, re();
|
|
7009
7040
|
};
|
|
7010
7041
|
}, [X, e, o]), te(() => () => {
|
|
7011
|
-
|
|
7012
|
-
}, [
|
|
7042
|
+
q(), P();
|
|
7043
|
+
}, [q, P]);
|
|
7013
7044
|
function Q(W, U, re, ae) {
|
|
7014
7045
|
return U.right <= W.left || U.left >= W.right ? ae >= Math.min(W.top, U.top) && ae <= Math.max(W.bottom, U.bottom) && re >= Math.min(W.right, U.right) && re <= Math.max(W.left, U.left) : re >= Math.min(W.left, U.left) && re <= Math.max(W.right, U.right) && ae >= Math.min(W.bottom, U.bottom) && ae <= Math.max(W.top, U.top);
|
|
7015
7046
|
}
|
|
@@ -7026,20 +7057,20 @@ function ta({
|
|
|
7026
7057
|
return de.addEventListener("pointermove", _e, { passive: !0 }), D.current = () => de.removeEventListener("pointermove", _e), !0;
|
|
7027
7058
|
}
|
|
7028
7059
|
function A(W) {
|
|
7029
|
-
W.pointerType !== "mouse" || z() || !W.currentTarget.ownerDocument.defaultView?.matchMedia("(hover: hover) and (pointer: fine)").matches || (I.current = !0, L.current = !1, E.current = !1, P(), !m.current && (
|
|
7060
|
+
W.pointerType !== "mouse" || z() || !W.currentTarget.ownerDocument.defaultView?.matchMedia("(hover: hover) and (pointer: fine)").matches || (I.current = !0, L.current = !1, E.current = !1, P(), !m.current && (q(), v.current = W.currentTarget.ownerDocument.defaultView.setTimeout(() => {
|
|
7030
7061
|
v.current = null, I.current && !L.current && B(!0);
|
|
7031
|
-
},
|
|
7062
|
+
}, na)));
|
|
7032
7063
|
}
|
|
7033
7064
|
function S(W) {
|
|
7034
|
-
W.pointerType === "mouse" && (I.current = !1,
|
|
7065
|
+
W.pointerType === "mouse" && (I.current = !1, q(), y(W.clientX, W.clientY) || Y());
|
|
7035
7066
|
}
|
|
7036
|
-
function
|
|
7067
|
+
function R(W) {
|
|
7037
7068
|
k.current = !0;
|
|
7038
7069
|
}
|
|
7039
7070
|
function j() {
|
|
7040
7071
|
z() || (C.current = !0, !L.current && (k.current || B(!1)));
|
|
7041
7072
|
}
|
|
7042
|
-
function
|
|
7073
|
+
function J(W) {
|
|
7043
7074
|
const U = W.relatedTarget;
|
|
7044
7075
|
k.current = !1, C.current = !1, !(U && b.current?.contains(U)) && Y(!0);
|
|
7045
7076
|
}
|
|
@@ -7058,9 +7089,9 @@ function ta({
|
|
|
7058
7089
|
dismiss: X,
|
|
7059
7090
|
onPointerEnter: A,
|
|
7060
7091
|
onPointerLeave: S,
|
|
7061
|
-
onPointerDown:
|
|
7092
|
+
onPointerDown: R,
|
|
7062
7093
|
onTriggerFocus: j,
|
|
7063
|
-
onTriggerBlur:
|
|
7094
|
+
onTriggerBlur: J,
|
|
7064
7095
|
onTriggerClick: ne,
|
|
7065
7096
|
onTriggerKeyDown(W) {
|
|
7066
7097
|
if ((W.key === "Enter" || W.key === " ") && (L.current = !1, E.current = !1), W.key !== "Tab" || W.shiftKey || !m.current) return;
|
|
@@ -7085,12 +7116,12 @@ function ta({
|
|
|
7085
7116
|
}
|
|
7086
7117
|
};
|
|
7087
7118
|
}
|
|
7088
|
-
function
|
|
7119
|
+
function oa(e) {
|
|
7089
7120
|
if (typeof e.type != "string") return !0;
|
|
7090
7121
|
const t = e.props;
|
|
7091
7122
|
return ["button", "input", "select", "textarea", "summary"].includes(e.type) || e.type === "a" && typeof t.href == "string" || typeof t.tabIndex == "number" && t.tabIndex >= 0 || t.contentEditable === !0 || t.contentEditable === "true";
|
|
7092
7123
|
}
|
|
7093
|
-
function
|
|
7124
|
+
function nc({
|
|
7094
7125
|
name: e,
|
|
7095
7126
|
identity: t,
|
|
7096
7127
|
rows: r,
|
|
@@ -7101,7 +7132,7 @@ function ec({
|
|
|
7101
7132
|
align: l = "start",
|
|
7102
7133
|
children: u
|
|
7103
7134
|
}) {
|
|
7104
|
-
const d = `context-card-${fe().replace(/:/g, "")}`, f =
|
|
7135
|
+
const d = `context-card-${fe().replace(/:/g, "")}`, f = ra({ id: d, placement: a, align: l }), _ = ie(
|
|
7105
7136
|
"context-card-wrap",
|
|
7106
7137
|
`context-card-wrap--${a}`,
|
|
7107
7138
|
l !== "start" ? `context-card-wrap--align-${l}` : "",
|
|
@@ -7116,7 +7147,7 @@ function ec({
|
|
|
7116
7147
|
onClick: f.onTriggerClick
|
|
7117
7148
|
};
|
|
7118
7149
|
let g;
|
|
7119
|
-
Xt(u) && u.type !== nt &&
|
|
7150
|
+
Xt(u) && u.type !== nt && oa(u) ? g = jn(u, {
|
|
7120
7151
|
...x,
|
|
7121
7152
|
className: ie("context-card__trigger", u.props.className),
|
|
7122
7153
|
onFocus: (m) => {
|
|
@@ -7166,7 +7197,7 @@ function ec({
|
|
|
7166
7197
|
"data-open": f.open ? "true" : "false",
|
|
7167
7198
|
"data-motion": f.pointerMotion ? "pointer" : "instant",
|
|
7168
7199
|
"data-side": f.resolvedPlacement,
|
|
7169
|
-
style:
|
|
7200
|
+
style: ta({ placement: f.resolvedPlacement, ...f.position }),
|
|
7170
7201
|
onMouseEnter: f.onCardMouseEnter,
|
|
7171
7202
|
onMouseLeave: f.onCardMouseLeave,
|
|
7172
7203
|
onFocusCapture: f.onCardFocus,
|
|
@@ -7217,7 +7248,7 @@ function Dr(e) {
|
|
|
7217
7248
|
function ht(e) {
|
|
7218
7249
|
Dr(e)?.removeAttribute("data-pointer-pressed");
|
|
7219
7250
|
}
|
|
7220
|
-
function
|
|
7251
|
+
function ia(e) {
|
|
7221
7252
|
const { onLostPointerCapture: t, onPointerCancel: r, onPointerDown: o, onPointerLeave: i, onPointerUp: s } = e;
|
|
7222
7253
|
return {
|
|
7223
7254
|
onPointerDown(a) {
|
|
@@ -7239,7 +7270,7 @@ function ra(e) {
|
|
|
7239
7270
|
}
|
|
7240
7271
|
};
|
|
7241
7272
|
}
|
|
7242
|
-
function
|
|
7273
|
+
function rc({
|
|
7243
7274
|
title: e,
|
|
7244
7275
|
variant: t = "stripe",
|
|
7245
7276
|
color: r,
|
|
@@ -7264,7 +7295,7 @@ function tc({
|
|
|
7264
7295
|
...o ? { "--book-band": o } : null,
|
|
7265
7296
|
...i ? { "--book-text": i } : null,
|
|
7266
7297
|
...v ? { "--book-width": v } : null
|
|
7267
|
-
}, I = s ? /* @__PURE__ */ n("span", { className: "book__icon", "aria-hidden": "true", inert: !0, children: s }) : null, h =
|
|
7298
|
+
}, I = s ? /* @__PURE__ */ n("span", { className: "book__icon", "aria-hidden": "true", inert: !0, children: s }) : null, h = ia({
|
|
7268
7299
|
onLostPointerCapture: f,
|
|
7269
7300
|
onPointerCancel: _,
|
|
7270
7301
|
onPointerDown: x,
|
|
@@ -7285,26 +7316,26 @@ function tc({
|
|
|
7285
7316
|
/* @__PURE__ */ n("span", { className: "book__pages", "aria-hidden": "true" })
|
|
7286
7317
|
] }) });
|
|
7287
7318
|
}
|
|
7288
|
-
function
|
|
7319
|
+
function aa({ className: e } = {}) {
|
|
7289
7320
|
return /* @__PURE__ */ w("span", { className: ie("browser__dots", e), "aria-hidden": "true", children: [
|
|
7290
7321
|
/* @__PURE__ */ n("span", { className: "browser__dot browser__dot--close" }),
|
|
7291
7322
|
/* @__PURE__ */ n("span", { className: "browser__dot browser__dot--minimize" }),
|
|
7292
7323
|
/* @__PURE__ */ n("span", { className: "browser__dot browser__dot--expand" })
|
|
7293
7324
|
] });
|
|
7294
7325
|
}
|
|
7295
|
-
function
|
|
7326
|
+
function sa({ className: e } = {}) {
|
|
7296
7327
|
return /* @__PURE__ */ w("span", { className: ie("browser__controls", e), "aria-hidden": "true", children: [
|
|
7297
7328
|
/* @__PURE__ */ n(zr, { size: 14, strokeWidth: 2 }),
|
|
7298
7329
|
/* @__PURE__ */ n(Qn, { size: 14, strokeWidth: 2 }),
|
|
7299
7330
|
/* @__PURE__ */ n(io, { size: 14, strokeWidth: 2 })
|
|
7300
7331
|
] });
|
|
7301
7332
|
}
|
|
7302
|
-
const
|
|
7303
|
-
function
|
|
7333
|
+
const ca = typeof document > "u" ? te : me;
|
|
7334
|
+
function la({ address: e, className: t }) {
|
|
7304
7335
|
const r = e.lastIndexOf("/"), o = r > 0 ? e.slice(0, r) : e, i = r > 0 ? e.slice(r) : "", [s, a] = H("idle"), [l, u] = H("instant"), [p, d] = H(!1), f = T(void 0), _ = T(0), x = T(void 0), g = T(!0), c = T(e), b = c.current !== e, m = b ? "idle" : s;
|
|
7305
7336
|
te(() => (g.current = !0, () => {
|
|
7306
7337
|
g.current = !1, _.current += 1, x.current = void 0, clearTimeout(f.current);
|
|
7307
|
-
}), []),
|
|
7338
|
+
}), []), ca(() => {
|
|
7308
7339
|
c.current !== e && (c.current = e, _.current += 1, x.current = void 0, clearTimeout(f.current), u("instant"), d(!1), a("idle"));
|
|
7309
7340
|
}, [e]);
|
|
7310
7341
|
const v = async (h) => {
|
|
@@ -7361,40 +7392,40 @@ function sa({ address: e, className: t }) {
|
|
|
7361
7392
|
/* @__PURE__ */ n("span", { className: "q1-sr-only browser__status", role: "status", "aria-live": "polite", children: I })
|
|
7362
7393
|
] });
|
|
7363
7394
|
}
|
|
7364
|
-
function
|
|
7395
|
+
function ua({ tabs: e, className: t }) {
|
|
7365
7396
|
return /* @__PURE__ */ n("div", { className: ie("browser__tabs", t), "aria-hidden": "true", children: e.map((r, o) => (
|
|
7366
7397
|
// key 带 index:label 是装饰文案不保证唯一,纯 label 做 key 在同名标签时会撞车。
|
|
7367
7398
|
/* @__PURE__ */ n("span", { className: `browser__tab${r.isActive ? " browser__tab--active" : ""}`, children: r.label }, `${r.label}-${o}`)
|
|
7368
7399
|
)) });
|
|
7369
7400
|
}
|
|
7370
|
-
function
|
|
7401
|
+
function oc({ address: e, variant: t = "dark", tabs: r, children: o, className: i, ...s }) {
|
|
7371
7402
|
return /* @__PURE__ */ w("div", { className: ie("browser", `browser--${t}`, i), ...s, children: [
|
|
7372
7403
|
/* @__PURE__ */ w("div", { className: "browser__chrome", children: [
|
|
7373
|
-
r && r.length > 0 ? /* @__PURE__ */ n(
|
|
7404
|
+
r && r.length > 0 ? /* @__PURE__ */ n(ua, { tabs: r }) : null,
|
|
7374
7405
|
/* @__PURE__ */ w("div", { className: "browser__bar", children: [
|
|
7375
7406
|
/* @__PURE__ */ w("div", { className: "browser__zone browser__zone--start", children: [
|
|
7376
|
-
/* @__PURE__ */ n(
|
|
7377
|
-
/* @__PURE__ */ n(
|
|
7407
|
+
/* @__PURE__ */ n(aa, {}),
|
|
7408
|
+
/* @__PURE__ */ n(sa, {})
|
|
7378
7409
|
] }),
|
|
7379
|
-
/* @__PURE__ */ n("div", { className: "browser__zone browser__zone--center", children: /* @__PURE__ */ n(
|
|
7410
|
+
/* @__PURE__ */ n("div", { className: "browser__zone browser__zone--center", children: /* @__PURE__ */ n(la, { address: e }) })
|
|
7380
7411
|
] })
|
|
7381
7412
|
] }),
|
|
7382
7413
|
/* @__PURE__ */ n("div", { className: "browser__body", children: o })
|
|
7383
7414
|
] });
|
|
7384
7415
|
}
|
|
7385
|
-
function
|
|
7416
|
+
function ic() {
|
|
7386
7417
|
return /* @__PURE__ */ w("div", { className: "browser__placeholder", "aria-hidden": "true", children: [
|
|
7387
7418
|
/* @__PURE__ */ n("span", { className: "browser__skeleton-line browser__skeleton-line--medium" }),
|
|
7388
7419
|
/* @__PURE__ */ n("span", { className: "browser__skeleton-line browser__skeleton-line--short" }),
|
|
7389
7420
|
/* @__PURE__ */ n("span", { className: "browser__skeleton-line" })
|
|
7390
7421
|
] });
|
|
7391
7422
|
}
|
|
7392
|
-
const Mr = (e) => e !== void 0 && Number.isFinite(e) && e > 0 ? e : void 0, Er = (e) => e === void 0 ? void 0 : { "--q1-avatar-size": `${e}px` },
|
|
7423
|
+
const Mr = (e) => e !== void 0 && Number.isFinite(e) && e > 0 ? e : void 0, Er = (e) => e === void 0 ? void 0 : { "--q1-avatar-size": `${e}px` }, da = (e) => {
|
|
7393
7424
|
const t = e.trim();
|
|
7394
7425
|
return t ? new RegExp("\\p{Script=Han}", "u").test(t[0]) ? t[0] : t.split(/\s+/).slice(0, 2).map((r) => r[0]).join("").toUpperCase() : "";
|
|
7395
7426
|
};
|
|
7396
|
-
function
|
|
7397
|
-
const [p, d] = H(null), f = Mr(l), _ = !!t && p !== t, x = e.trim() || "头像", g = r ? { variant: "avatar--letter", node: r } : o ? { variant: "avatar--glyph", node: o } : { variant: "avatar--letter", node:
|
|
7427
|
+
function fa({ title: e, src: t, letter: r, glyph: o, placeholder: i = !1, icon: s, iconColor: a, size: l, className: u }) {
|
|
7428
|
+
const [p, d] = H(null), f = Mr(l), _ = !!t && p !== t, x = e.trim() || "头像", g = r ? { variant: "avatar--letter", node: r } : o ? { variant: "avatar--glyph", node: o } : { variant: "avatar--letter", node: da(e) }, c = i ? "avatar--placeholder" : _ ? "avatar--image" : g.variant, b = i ? { "aria-hidden": !0 } : _ ? {} : { role: "img", "aria-label": x };
|
|
7398
7429
|
return /* @__PURE__ */ w("span", { className: ie("avatar", c, u), style: Er(f), ...b, children: [
|
|
7399
7430
|
_ ? /* @__PURE__ */ n(
|
|
7400
7431
|
"img",
|
|
@@ -7418,7 +7449,7 @@ function ua({ title: e, src: t, letter: r, glyph: o, placeholder: i = !1, icon:
|
|
|
7418
7449
|
) : null
|
|
7419
7450
|
] });
|
|
7420
7451
|
}
|
|
7421
|
-
function
|
|
7452
|
+
function ac({
|
|
7422
7453
|
members: e,
|
|
7423
7454
|
label: t,
|
|
7424
7455
|
size: r,
|
|
@@ -7431,7 +7462,7 @@ function oc({
|
|
|
7431
7462
|
return /* @__PURE__ */ w("span", { className: ie("avatar-group", a), style: g, ...b, children: [
|
|
7432
7463
|
d.map((m, v) => (
|
|
7433
7464
|
// 成员不再 aria-hidden——每个 Avatar 自带 aria-label(名字),读屏逐个念。
|
|
7434
|
-
/* @__PURE__ */ n("span", { className: "avatar-group__item", style: { zIndex: c(v) }, children: /* @__PURE__ */ n(
|
|
7465
|
+
/* @__PURE__ */ n("span", { className: "avatar-group__item", style: { zIndex: c(v) }, children: /* @__PURE__ */ n(fa, { ...m, size: l }) }, `${m.title}-${v}`)
|
|
7435
7466
|
)),
|
|
7436
7467
|
f > 0 ? (
|
|
7437
7468
|
// +N 独立可访问名「还有 N 位成员」,不再 aria-hidden。
|
|
@@ -7451,7 +7482,7 @@ function oc({
|
|
|
7451
7482
|
) : null
|
|
7452
7483
|
] });
|
|
7453
7484
|
}
|
|
7454
|
-
function
|
|
7485
|
+
function sc({
|
|
7455
7486
|
shape: e = "rounded",
|
|
7456
7487
|
animated: t = !0,
|
|
7457
7488
|
show: r = !1,
|
|
@@ -7479,9 +7510,9 @@ function ic({
|
|
|
7479
7510
|
}
|
|
7480
7511
|
) : /* @__PURE__ */ n(o, { ...a, className: p, "data-state": "loading", "aria-hidden": "true", inert: !0 });
|
|
7481
7512
|
}
|
|
7482
|
-
const
|
|
7483
|
-
function
|
|
7484
|
-
const r = typeof t == "number" ? t :
|
|
7513
|
+
const pa = { sm: 2, md: 3, lg: 4 };
|
|
7514
|
+
function cc({ label: e, size: t = "md" }) {
|
|
7515
|
+
const r = typeof t == "number" ? t : pa[t], o = { width: r, height: r };
|
|
7485
7516
|
return /* @__PURE__ */ w("span", { className: "loading-dots-wrap", "aria-live": e ? "polite" : void 0, children: [
|
|
7486
7517
|
e ? /* @__PURE__ */ n("span", { className: "loading-dots__label", children: e }) : null,
|
|
7487
7518
|
/* @__PURE__ */ w("span", { className: "loading-dots", "aria-hidden": "true", children: [
|
|
@@ -7491,9 +7522,9 @@ function ac({ label: e, size: t = "md" }) {
|
|
|
7491
7522
|
] })
|
|
7492
7523
|
] });
|
|
7493
7524
|
}
|
|
7494
|
-
const Fn = 8,
|
|
7495
|
-
function
|
|
7496
|
-
const o = Number.isFinite(t) ? Math.max(0, Math.floor(t)) : Fn, i = Array.from(
|
|
7525
|
+
const Fn = 8, ma = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
7526
|
+
function lc({ text: e, tailLength: t = Fn, mono: r = !1 }) {
|
|
7527
|
+
const o = Number.isFinite(t) ? Math.max(0, Math.floor(t)) : Fn, i = Array.from(ma.segment(e), ({ segment: u }) => u), s = Math.max(0, i.length - o), a = i.slice(0, s).join(""), l = i.slice(s).join("");
|
|
7497
7528
|
return /* @__PURE__ */ w("span", { className: `middle-truncate${r ? " middle-truncate--mono" : ""}`, title: e, "aria-label": e, children: [
|
|
7498
7529
|
/* @__PURE__ */ n("span", { className: "q1-sr-only", children: e }),
|
|
7499
7530
|
/* @__PURE__ */ w("span", { className: "middle-truncate__visual", "aria-hidden": "true", children: [
|
|
@@ -7502,7 +7533,7 @@ function sc({ text: e, tailLength: t = Fn, mono: r = !1 }) {
|
|
|
7502
7533
|
] })
|
|
7503
7534
|
] });
|
|
7504
7535
|
}
|
|
7505
|
-
function
|
|
7536
|
+
function uc({ children: e }) {
|
|
7506
7537
|
return /* @__PURE__ */ w("div", { className: "phone", children: [
|
|
7507
7538
|
/* @__PURE__ */ n("span", { className: "phone__island", "aria-hidden": "true" }),
|
|
7508
7539
|
/* @__PURE__ */ n("span", { className: "phone__btn phone__btn--mute", "aria-hidden": "true" }),
|
|
@@ -7515,7 +7546,7 @@ function cc({ children: e }) {
|
|
|
7515
7546
|
] })
|
|
7516
7547
|
] });
|
|
7517
7548
|
}
|
|
7518
|
-
function
|
|
7549
|
+
function ha({ action: e }) {
|
|
7519
7550
|
const [t, r] = H(!1), [o, i] = H();
|
|
7520
7551
|
function s(u) {
|
|
7521
7552
|
u.isPrimary && u.button === 0 && (i("pointer"), r(!0));
|
|
@@ -7538,21 +7569,21 @@ function pa({ action: e }) {
|
|
|
7538
7569
|
};
|
|
7539
7570
|
return e.type === "button" ? /* @__PURE__ */ n("button", { type: "button", className: "project-banner__cta", onClick: e.onClick, ...l, children: e.label }) : /* @__PURE__ */ n("a", { className: "project-banner__cta", href: e.href, ...l, children: e.label });
|
|
7540
7571
|
}
|
|
7541
|
-
const
|
|
7572
|
+
const ba = {
|
|
7542
7573
|
default: rt,
|
|
7543
7574
|
success: ao,
|
|
7544
7575
|
warning: ct,
|
|
7545
7576
|
error: st
|
|
7546
7577
|
};
|
|
7547
|
-
function
|
|
7548
|
-
const o =
|
|
7578
|
+
function dc({ variant: e = "default", message: t, action: r }) {
|
|
7579
|
+
const o = ba[e];
|
|
7549
7580
|
return /* @__PURE__ */ w("div", { className: `project-banner project-banner--${e}`, role: "status", children: [
|
|
7550
7581
|
/* @__PURE__ */ n(o, { className: "project-banner__icon", size: 15, strokeWidth: 2, "aria-hidden": "true" }),
|
|
7551
7582
|
/* @__PURE__ */ n("span", { className: "project-banner__message", children: t }),
|
|
7552
|
-
/* @__PURE__ */ n(
|
|
7583
|
+
/* @__PURE__ */ n(ha, { action: r })
|
|
7553
7584
|
] });
|
|
7554
7585
|
}
|
|
7555
|
-
function
|
|
7586
|
+
function fc({
|
|
7556
7587
|
text: e,
|
|
7557
7588
|
copyValue: t,
|
|
7558
7589
|
successMessage: r,
|
|
@@ -7592,12 +7623,12 @@ function uc({
|
|
|
7592
7623
|
)
|
|
7593
7624
|
] });
|
|
7594
7625
|
}
|
|
7595
|
-
const
|
|
7626
|
+
const ga = {
|
|
7596
7627
|
info: { Icon: rt, label: "提示" },
|
|
7597
7628
|
danger: { Icon: an, label: "错误" },
|
|
7598
7629
|
warning: { Icon: ct, label: "警告" }
|
|
7599
|
-
},
|
|
7600
|
-
function
|
|
7630
|
+
}, _a = typeof document > "u" ? te : me;
|
|
7631
|
+
function pc({
|
|
7601
7632
|
text: e,
|
|
7602
7633
|
prompt: t = !0,
|
|
7603
7634
|
inverted: r = !1,
|
|
@@ -7606,10 +7637,10 @@ function dc({
|
|
|
7606
7637
|
onCopy: s
|
|
7607
7638
|
}) {
|
|
7608
7639
|
const { copied: a, copy: l, reset: u } = cn(), p = Array.isArray(e) ? e : [e], d = i ?? p.join(`
|
|
7609
|
-
`), f = o ?
|
|
7640
|
+
`), f = o ? ga[o] : void 0, _ = ie("snippet", r ? "snippet--inverted" : "", o ? `snippet--${o}` : ""), x = T(d), g = x.current !== d, c = T(!1), b = T(!1), [m, v] = H(!1), [D, I] = H(!1), [h, C] = H("instant");
|
|
7610
7641
|
te(() => (b.current = !0, () => {
|
|
7611
7642
|
b.current = !1;
|
|
7612
|
-
}), []),
|
|
7643
|
+
}), []), _a(() => {
|
|
7613
7644
|
x.current !== d && (x.current = d, C("instant"), u());
|
|
7614
7645
|
}, [u, d]), te(() => {
|
|
7615
7646
|
if (!m) {
|
|
@@ -7677,26 +7708,26 @@ function dc({
|
|
|
7677
7708
|
)
|
|
7678
7709
|
] });
|
|
7679
7710
|
}
|
|
7680
|
-
function
|
|
7711
|
+
function ya(e, t) {
|
|
7681
7712
|
return e >= 95 ? "danger" : e >= 80 ? "warning" : "success";
|
|
7682
7713
|
}
|
|
7683
|
-
const
|
|
7714
|
+
const wa = {
|
|
7684
7715
|
xs: { boxPx: 20, radius: 42.5, strokeWidth: 15, valueFontSize: null },
|
|
7685
7716
|
sm: { boxPx: 32, radius: 45, strokeWidth: 10, valueFontSize: 11 },
|
|
7686
7717
|
md: { boxPx: 64, radius: 45, strokeWidth: 10, valueFontSize: 18 },
|
|
7687
7718
|
lg: { boxPx: 128, radius: 45, strokeWidth: 10, valueFontSize: 32 }
|
|
7688
|
-
},
|
|
7689
|
-
function
|
|
7690
|
-
const o = Math.min(
|
|
7719
|
+
}, va = 10, On = { success: 80, warning: 50 };
|
|
7720
|
+
function Na(e, t, r) {
|
|
7721
|
+
const o = Math.min(va, e, 100 - e);
|
|
7691
7722
|
if (o <= 0) return 0;
|
|
7692
7723
|
if (!(100 - e - o <= 0)) return o;
|
|
7693
7724
|
const s = t / r * 100;
|
|
7694
7725
|
return o < s ? 0 : o;
|
|
7695
7726
|
}
|
|
7696
|
-
function
|
|
7697
|
-
return r || (t === "health" ? e >= On.success ? "success" : e >= On.warning ? "warning" : "danger" :
|
|
7727
|
+
function ka(e, t, r) {
|
|
7728
|
+
return r || (t === "health" ? e >= On.success ? "success" : e >= On.warning ? "warning" : "danger" : ya(e));
|
|
7698
7729
|
}
|
|
7699
|
-
function
|
|
7730
|
+
function mc({
|
|
7700
7731
|
value: e,
|
|
7701
7732
|
size: t = "md",
|
|
7702
7733
|
showValue: r = !1,
|
|
@@ -7705,7 +7736,7 @@ function fc({
|
|
|
7705
7736
|
label: s,
|
|
7706
7737
|
indeterminate: a = !1
|
|
7707
7738
|
}) {
|
|
7708
|
-
const { boxPx: l, radius: u, strokeWidth: p, valueFontSize: d } =
|
|
7739
|
+
const { boxPx: l, radius: u, strokeWidth: p, valueFontSize: d } = wa[t], f = 2 * Math.PI * u, _ = typeof e == "number" && Number.isFinite(e) ? Math.min(100, Math.max(0, e)) : 0, x = 50, g = a ? 25 : _, c = a ? 0 : Na(_, p, f), b = a ? 0 : Math.max(0, 100 - _ - c), m = -90 + (g + c / 2) / 100 * 360, v = a ? "primary" : ka(_, i, o);
|
|
7709
7740
|
return /* @__PURE__ */ w(
|
|
7710
7741
|
"span",
|
|
7711
7742
|
{
|
|
@@ -7751,7 +7782,7 @@ function fc({
|
|
|
7751
7782
|
}
|
|
7752
7783
|
);
|
|
7753
7784
|
}
|
|
7754
|
-
function
|
|
7785
|
+
function hc({
|
|
7755
7786
|
value: e,
|
|
7756
7787
|
max: t = 100,
|
|
7757
7788
|
tone: r = "neutral",
|
|
@@ -7797,14 +7828,14 @@ function pc({
|
|
|
7797
7828
|
] }, `${d}-${_}`)) }) : null
|
|
7798
7829
|
] });
|
|
7799
7830
|
}
|
|
7800
|
-
const
|
|
7831
|
+
const xa = {
|
|
7801
7832
|
info: rt,
|
|
7802
7833
|
success: er,
|
|
7803
7834
|
warning: ct,
|
|
7804
7835
|
error: an,
|
|
7805
7836
|
secondary: rt
|
|
7806
7837
|
};
|
|
7807
|
-
function
|
|
7838
|
+
function Pa({ action: e, disabled: t }) {
|
|
7808
7839
|
const [r, o] = H(!1), [i, s] = H();
|
|
7809
7840
|
function a(d) {
|
|
7810
7841
|
!t && d.isPrimary && d.button === 0 && (s("pointer"), o(!0));
|
|
@@ -7844,7 +7875,7 @@ function ka({ action: e, disabled: t }) {
|
|
|
7844
7875
|
}
|
|
7845
7876
|
);
|
|
7846
7877
|
}
|
|
7847
|
-
function
|
|
7878
|
+
function bc({
|
|
7848
7879
|
tone: e = "info",
|
|
7849
7880
|
size: t = "default",
|
|
7850
7881
|
filled: r = !1,
|
|
@@ -7853,7 +7884,7 @@ function mc({
|
|
|
7853
7884
|
action: s,
|
|
7854
7885
|
children: a
|
|
7855
7886
|
}) {
|
|
7856
|
-
const l =
|
|
7887
|
+
const l = xa[e], u = ie(
|
|
7857
7888
|
"note",
|
|
7858
7889
|
`note--${e}`,
|
|
7859
7890
|
`note--${t}`,
|
|
@@ -7866,10 +7897,10 @@ function mc({
|
|
|
7866
7897
|
i ? /* @__PURE__ */ n("span", { className: "note__label", children: i }) : null,
|
|
7867
7898
|
/* @__PURE__ */ n("span", { className: "note__text", children: a })
|
|
7868
7899
|
] }),
|
|
7869
|
-
s ? /* @__PURE__ */ n(
|
|
7900
|
+
s ? /* @__PURE__ */ n(Pa, { action: s, disabled: o }) : null
|
|
7870
7901
|
] });
|
|
7871
7902
|
}
|
|
7872
|
-
function
|
|
7903
|
+
function gc({ previous: e, next: t }) {
|
|
7873
7904
|
return /* @__PURE__ */ w("nav", { className: "docs-pagination", "aria-label": "分页导航", children: [
|
|
7874
7905
|
e ? /* @__PURE__ */ w(
|
|
7875
7906
|
"a",
|
|
@@ -7903,13 +7934,13 @@ function hc({ previous: e, next: t }) {
|
|
|
7903
7934
|
) : /* @__PURE__ */ n("span", { className: "docs-pagination__slot" })
|
|
7904
7935
|
] });
|
|
7905
7936
|
}
|
|
7906
|
-
const
|
|
7907
|
-
function
|
|
7937
|
+
const Ca = { sm: 10, md: 12, lg: 15, xl: 15 };
|
|
7938
|
+
function Ia({
|
|
7908
7939
|
size: e = "md",
|
|
7909
7940
|
tone: t = "default",
|
|
7910
7941
|
label: r = "加载中…"
|
|
7911
7942
|
}) {
|
|
7912
|
-
const o = ie("spinner", `spinner--${e}`, t !== "default" ? `spinner--${t}` : ""), i =
|
|
7943
|
+
const o = ie("spinner", `spinner--${e}`, t !== "default" ? `spinner--${t}` : ""), i = Ca[e];
|
|
7913
7944
|
return /* @__PURE__ */ w("span", { className: o, role: "status", children: [
|
|
7914
7945
|
Array.from({ length: i }, (s, a) => /* @__PURE__ */ n(
|
|
7915
7946
|
"span",
|
|
@@ -7930,11 +7961,11 @@ function Bn(e) {
|
|
|
7930
7961
|
const t = Number(e);
|
|
7931
7962
|
return Number.isFinite(t) && t >= 1 ? Math.floor(t) : 1;
|
|
7932
7963
|
}
|
|
7933
|
-
function
|
|
7964
|
+
function Da(e) {
|
|
7934
7965
|
const t = Number(e);
|
|
7935
7966
|
return Number.isFinite(t) && t > 0 ? Math.floor(t) : 20;
|
|
7936
7967
|
}
|
|
7937
|
-
function
|
|
7968
|
+
function Ma({
|
|
7938
7969
|
totalPages: e,
|
|
7939
7970
|
total: t,
|
|
7940
7971
|
pageSize: r
|
|
@@ -7947,16 +7978,16 @@ function Ia({
|
|
|
7947
7978
|
if (Number.isFinite(t) && Number(t) > 0)
|
|
7948
7979
|
return Math.max(1, Math.ceil(Number(t) / (r ?? 20)));
|
|
7949
7980
|
}
|
|
7950
|
-
function
|
|
7981
|
+
function Ea(e, t, r) {
|
|
7951
7982
|
const o = Math.min(Math.max(1, e), t);
|
|
7952
7983
|
return t <= (r ? 5 : 7) ? Array.from({ length: t }, (s, a) => a + 1) : r ? o <= 3 ? [1, 2, 3, "…", t] : o >= t - 2 ? [1, "…", t - 2, t - 1, t] : [1, "…", o, "…", t] : o <= 4 ? [1, 2, 3, 4, 5, "…", t] : o >= t - 3 ? [1, "…", t - 4, t - 3, t - 2, t - 1, t] : [1, "…", o - 1, o, o + 1, "…", t];
|
|
7953
7984
|
}
|
|
7954
|
-
function
|
|
7985
|
+
function Ta(e, t, r) {
|
|
7955
7986
|
if (!Number.isFinite(r) || r <= 0) return { start: 0, end: 0 };
|
|
7956
7987
|
const o = Math.min(e * t, Math.floor(r));
|
|
7957
7988
|
return { start: Math.min((e - 1) * t + 1, o), end: o };
|
|
7958
7989
|
}
|
|
7959
|
-
function
|
|
7990
|
+
function _c({
|
|
7960
7991
|
page: e,
|
|
7961
7992
|
pageSize: t = 20,
|
|
7962
7993
|
total: r,
|
|
@@ -7972,11 +8003,11 @@ function bc({
|
|
|
7972
8003
|
compact: _ = !1,
|
|
7973
8004
|
className: x = ""
|
|
7974
8005
|
}) {
|
|
7975
|
-
const [g, c] = H(""), [b, m] = H(), v = T(a), D =
|
|
8006
|
+
const [g, c] = H(""), [b, m] = H(), v = T(a), D = Da(t), I = Number.isFinite(r) && Number(r) >= 0, h = Ma({
|
|
7976
8007
|
totalPages: o,
|
|
7977
8008
|
total: r,
|
|
7978
8009
|
pageSize: D
|
|
7979
|
-
}), C = h ? Math.min(Bn(e), h) : Bn(e), M = I && Number(r) <= 0 || o === 0, L = I ?
|
|
8010
|
+
}), C = h ? Math.min(Bn(e), h) : Bn(e), M = I && Number(r) <= 0 || o === 0, L = I ? Ta(C, D, Number(r)) : null, E = !I && o === void 0, k = !M && C > 1, N = !M && (E ? i === !0 : h !== void 0 && C < h), q = l && !E && h ? Ea(C, h, _) : [], P = ["pagination", _ ? "pagination--compact" : "", x].filter(Boolean).join(" "), z = String(h ?? 1).length, V = z <= 3 ? "pagination__page-buttons--short" : z <= 6 ? "pagination__page-buttons--medium" : z <= 10 ? "pagination__page-buttons--long" : "pagination__page-buttons--extra-long", B = {
|
|
7980
8011
|
"--pagination-page-digits": z
|
|
7981
8012
|
}, $ = () => m(void 0), Y = (F, O) => {
|
|
7982
8013
|
!O.isPrimary || O.button !== 0 || a || M || m(F);
|
|
@@ -7996,7 +8027,7 @@ function bc({
|
|
|
7996
8027
|
}) : u ?? (M ? "暂无数据" : I && L ? `${L.start}–${L.end} / 共 ${Number(r)} 条` : h !== void 0 ? `第 ${C} 页 / 共 ${h} 页` : `第 ${C} 页`) }),
|
|
7997
8028
|
/* @__PURE__ */ n("span", { className: "pagination__completion q1-sr-only", "aria-live": "polite", "aria-atomic": "true", children: g }),
|
|
7998
8029
|
/* @__PURE__ */ w("div", { className: "pagination__controls", children: [
|
|
7999
|
-
/* @__PURE__ */ n("span", { className: "pagination__spinner-slot", children: a ? /* @__PURE__ */ n(
|
|
8030
|
+
/* @__PURE__ */ n("span", { className: "pagination__spinner-slot", children: a ? /* @__PURE__ */ n(Ia, { size: "sm" }) : null }),
|
|
8000
8031
|
p ? /* @__PURE__ */ n("div", { className: "pagination__page-size", children: p }) : null,
|
|
8001
8032
|
/* @__PURE__ */ w("div", { className: `pagination__page-buttons ${V}`, style: B, children: [
|
|
8002
8033
|
/* @__PURE__ */ n(
|
|
@@ -8019,7 +8050,7 @@ function bc({
|
|
|
8019
8050
|
children: /* @__PURE__ */ n(at, { "aria-hidden": "true", focusable: "false", size: 16, strokeWidth: 2 })
|
|
8020
8051
|
}
|
|
8021
8052
|
),
|
|
8022
|
-
|
|
8053
|
+
q.map(
|
|
8023
8054
|
(F, O) => F === "…" ? /* @__PURE__ */ n("span", { className: "pagination__ellipsis", "data-pagination-item": "ellipsis", "aria-hidden": "true", children: "…" }, `ellipsis-${O}`) : /* @__PURE__ */ n(
|
|
8024
8055
|
"button",
|
|
8025
8056
|
{
|
|
@@ -8075,7 +8106,7 @@ const Kn = (e) => e && e !== "start" ? `table__cell--align-${e}` : void 0;
|
|
|
8075
8106
|
function Wn(e) {
|
|
8076
8107
|
return `${typeof e}:${String(e)}`;
|
|
8077
8108
|
}
|
|
8078
|
-
const
|
|
8109
|
+
const Sa = [
|
|
8079
8110
|
"a",
|
|
8080
8111
|
"button",
|
|
8081
8112
|
"input",
|
|
@@ -8099,10 +8130,10 @@ function zn(e, t) {
|
|
|
8099
8130
|
if (e === t || !e) return !1;
|
|
8100
8131
|
const r = e.closest;
|
|
8101
8132
|
if (typeof r != "function") return !1;
|
|
8102
|
-
const o = r.call(e,
|
|
8133
|
+
const o = r.call(e, Sa);
|
|
8103
8134
|
return !!(o && o !== t);
|
|
8104
8135
|
}
|
|
8105
|
-
function
|
|
8136
|
+
function yc({
|
|
8106
8137
|
data: e,
|
|
8107
8138
|
columns: t,
|
|
8108
8139
|
rowKey: r,
|
|
@@ -8126,12 +8157,12 @@ function gc({
|
|
|
8126
8157
|
style: I,
|
|
8127
8158
|
...h
|
|
8128
8159
|
}) {
|
|
8129
|
-
const C = e.map((S,
|
|
8160
|
+
const C = e.map((S, R) => ({
|
|
8130
8161
|
row: S,
|
|
8131
|
-
rowIndex:
|
|
8132
|
-
key: r(S,
|
|
8133
|
-
disabled: g?.getRowDisabled?.(S,
|
|
8134
|
-
})), M = new Set(g?.selectedKeys ?? []), L = g ? C.filter((S) => !S.disabled) : [], E = L.filter((S) => M.has(S.key)), k = L.length > 0 && E.length === L.length, N = E.length > 0 && !k,
|
|
8162
|
+
rowIndex: R,
|
|
8163
|
+
key: r(S, R),
|
|
8164
|
+
disabled: g?.getRowDisabled?.(S, R) ?? !1
|
|
8165
|
+
})), M = new Set(g?.selectedKeys ?? []), L = g ? C.filter((S) => !S.disabled) : [], E = L.filter((S) => M.has(S.key)), k = L.length > 0 && E.length === L.length, N = E.length > 0 && !k, q = ie(
|
|
8135
8166
|
"table",
|
|
8136
8167
|
i === "compact" && "table--compact",
|
|
8137
8168
|
s && "table--sticky-header",
|
|
@@ -8142,19 +8173,19 @@ function gc({
|
|
|
8142
8173
|
), V = a === void 0 ? void 0 : { maxHeight: a }, B = s || a !== void 0 || l !== void 0;
|
|
8143
8174
|
function $(S) {
|
|
8144
8175
|
if (!g) return;
|
|
8145
|
-
const
|
|
8146
|
-
S.currentTarget.checked ? L.forEach((j) =>
|
|
8176
|
+
const R = new Set(g.selectedKeys);
|
|
8177
|
+
S.currentTarget.checked ? L.forEach((j) => R.add(j.key)) : L.forEach((j) => R.delete(j.key)), g.onSelectionChange([...R]);
|
|
8147
8178
|
}
|
|
8148
|
-
function Y(S,
|
|
8179
|
+
function Y(S, R) {
|
|
8149
8180
|
if (!g || S.disabled) return;
|
|
8150
8181
|
const j = new Set(g.selectedKeys);
|
|
8151
|
-
|
|
8182
|
+
R.currentTarget.checked ? j.add(S.key) : j.delete(S.key), g.onSelectionChange([...j]);
|
|
8152
8183
|
}
|
|
8153
|
-
function G(S,
|
|
8154
|
-
!v || zn(
|
|
8184
|
+
function G(S, R) {
|
|
8185
|
+
!v || zn(R.target, R.currentTarget) || v.onActivate(S.row, S.rowIndex);
|
|
8155
8186
|
}
|
|
8156
|
-
function F(S,
|
|
8157
|
-
!v || zn(
|
|
8187
|
+
function F(S, R) {
|
|
8188
|
+
!v || zn(R.target, R.currentTarget) || R.key !== "Enter" && R.key !== " " || (R.preventDefault(), v.onActivate(S.row, S.rowIndex));
|
|
8158
8189
|
}
|
|
8159
8190
|
function O(S) {
|
|
8160
8191
|
return S.nextSortDirection ?? (f === S.key && _ === "asc" ? "desc" : "asc");
|
|
@@ -8166,7 +8197,7 @@ function gc({
|
|
|
8166
8197
|
if (S.sortable)
|
|
8167
8198
|
return f !== S.key ? "none" : _ === "asc" ? "ascending" : _ === "desc" ? "descending" : "none";
|
|
8168
8199
|
}
|
|
8169
|
-
const y = /* @__PURE__ */ w("table", { ...h, className:
|
|
8200
|
+
const y = /* @__PURE__ */ w("table", { ...h, className: q, style: P, children: [
|
|
8170
8201
|
o != null ? /* @__PURE__ */ n("caption", { children: o }) : null,
|
|
8171
8202
|
u,
|
|
8172
8203
|
/* @__PURE__ */ n("thead", { className: d ? void 0 : "table__head--hidden", children: /* @__PURE__ */ w("tr", { children: [
|
|
@@ -8185,12 +8216,12 @@ function gc({
|
|
|
8185
8216
|
}
|
|
8186
8217
|
) }) }) : null,
|
|
8187
8218
|
t.map((S) => {
|
|
8188
|
-
const
|
|
8219
|
+
const R = Q(S), j = S.sortable && f === S.key && _ ? _ === "asc" ? "升序" : "降序" : null, J = O(S) === "asc" ? "升序" : "降序", ne = j ? /* @__PURE__ */ n("span", { className: "table__sort-state", children: j }) : null, W = S.sortLabel ?? (typeof S.header == "string" ? S.header : S.key), U = S.sortable ? /* @__PURE__ */ w(
|
|
8189
8220
|
"button",
|
|
8190
8221
|
{
|
|
8191
8222
|
type: "button",
|
|
8192
8223
|
className: "table__sort",
|
|
8193
|
-
"aria-label": `点击后将按${W}${
|
|
8224
|
+
"aria-label": `点击后将按${W}${J}排序`,
|
|
8194
8225
|
disabled: !x,
|
|
8195
8226
|
onClick: x ? () => X(S) : void 0,
|
|
8196
8227
|
children: [
|
|
@@ -8202,17 +8233,17 @@ function gc({
|
|
|
8202
8233
|
S.header,
|
|
8203
8234
|
ne
|
|
8204
8235
|
] });
|
|
8205
|
-
return /* @__PURE__ */ n("th", { scope: "col", "aria-sort":
|
|
8236
|
+
return /* @__PURE__ */ n("th", { scope: "col", "aria-sort": R, className: Kn(S.align), children: U }, S.key);
|
|
8206
8237
|
}),
|
|
8207
8238
|
c ? /* @__PURE__ */ n("th", { scope: "col", className: "table__cell--actions", children: c.header }) : null
|
|
8208
8239
|
] }) }),
|
|
8209
8240
|
/* @__PURE__ */ n("tbody", { children: C.map((S) => {
|
|
8210
|
-
const
|
|
8241
|
+
const R = {
|
|
8211
8242
|
className: v ? "table__row--interactive" : void 0,
|
|
8212
8243
|
tabIndex: v ? 0 : void 0,
|
|
8213
8244
|
"aria-label": v ? v.getRowLabel(S.row, S.rowIndex) : void 0,
|
|
8214
|
-
onClick: v ? (
|
|
8215
|
-
onKeyDown: v ? (
|
|
8245
|
+
onClick: v ? (J) => G(S, J) : void 0,
|
|
8246
|
+
onKeyDown: v ? (J) => F(S, J) : void 0
|
|
8216
8247
|
}, j = /* @__PURE__ */ w(ge, { children: [
|
|
8217
8248
|
g ? /* @__PURE__ */ n("td", { children: /* @__PURE__ */ n("label", { className: "table__checkbox-control", children: /* @__PURE__ */ n(
|
|
8218
8249
|
"input",
|
|
@@ -8222,19 +8253,19 @@ function gc({
|
|
|
8222
8253
|
"aria-checked": M.has(S.key) ? "true" : "false",
|
|
8223
8254
|
checked: M.has(S.key),
|
|
8224
8255
|
disabled: S.disabled,
|
|
8225
|
-
onChange: (
|
|
8256
|
+
onChange: (J) => Y(S, J)
|
|
8226
8257
|
}
|
|
8227
8258
|
) }) }) : null,
|
|
8228
|
-
t.map((
|
|
8259
|
+
t.map((J) => /* @__PURE__ */ n("td", { className: Kn(J.align), children: J.render(S.row, S.rowIndex) }, J.key)),
|
|
8229
8260
|
c ? /* @__PURE__ */ n("td", { className: "table__cell--actions", children: c.render(S.row, S.rowIndex) }) : null
|
|
8230
8261
|
] });
|
|
8231
8262
|
return p ? /* @__PURE__ */ n(nt, { children: p(S.row, {
|
|
8232
8263
|
row: S.row,
|
|
8233
8264
|
rowIndex: S.rowIndex,
|
|
8234
8265
|
rowKey: S.key,
|
|
8235
|
-
rowProps:
|
|
8266
|
+
rowProps: R,
|
|
8236
8267
|
cells: j
|
|
8237
|
-
}) }, Wn(S.key)) : /* @__PURE__ */ n("tr", { ...
|
|
8268
|
+
}) }, Wn(S.key)) : /* @__PURE__ */ n("tr", { ...R, children: j }, Wn(S.key));
|
|
8238
8269
|
}) })
|
|
8239
8270
|
] }), A = B ? /* @__PURE__ */ n("div", { className: z, style: V, tabIndex: 0, children: y }) : y;
|
|
8240
8271
|
return /* @__PURE__ */ w(ge, { children: [
|
|
@@ -8242,7 +8273,7 @@ function gc({
|
|
|
8242
8273
|
A
|
|
8243
8274
|
] });
|
|
8244
8275
|
}
|
|
8245
|
-
function
|
|
8276
|
+
function wc({
|
|
8246
8277
|
items: e,
|
|
8247
8278
|
initial: t = 4,
|
|
8248
8279
|
noBorder: r,
|
|
@@ -8287,13 +8318,13 @@ function _c({
|
|
|
8287
8318
|
onPointerUp: g,
|
|
8288
8319
|
children: [
|
|
8289
8320
|
i ? "收起" : `显示更多 ${x} 项`,
|
|
8290
|
-
/* @__PURE__ */ n(
|
|
8321
|
+
/* @__PURE__ */ n(Re, { className: "show-more__chevron", size: 16, strokeWidth: 1.8, "aria-hidden": "true" })
|
|
8291
8322
|
]
|
|
8292
8323
|
}
|
|
8293
8324
|
) }) : null
|
|
8294
8325
|
] });
|
|
8295
8326
|
}
|
|
8296
|
-
function
|
|
8327
|
+
function vc({
|
|
8297
8328
|
loading: e,
|
|
8298
8329
|
loadingLabel: t = "正在加载更多内容…",
|
|
8299
8330
|
noGap: r,
|
|
@@ -8354,7 +8385,7 @@ function yc({
|
|
|
8354
8385
|
/* @__PURE__ */ n("span", { className: "q1-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: e ? t : "" })
|
|
8355
8386
|
] });
|
|
8356
8387
|
}
|
|
8357
|
-
function
|
|
8388
|
+
function qa(e) {
|
|
8358
8389
|
if (Number.isNaN(Date.parse(e))) return "时区未知";
|
|
8359
8390
|
if (/Z$/i.test(e)) return "UTC";
|
|
8360
8391
|
const t = e.match(/([+-])(\d{2}):?(\d{2})$/);
|
|
@@ -8365,65 +8396,65 @@ function Ta(e) {
|
|
|
8365
8396
|
function bt(e, t, r) {
|
|
8366
8397
|
return t >= e.left && t <= e.right && r >= e.top && r <= e.bottom;
|
|
8367
8398
|
}
|
|
8368
|
-
function
|
|
8399
|
+
function Nc({
|
|
8369
8400
|
relative: e,
|
|
8370
8401
|
relativeLong: t,
|
|
8371
8402
|
iso: r,
|
|
8372
8403
|
local: o,
|
|
8373
8404
|
utc: i
|
|
8374
8405
|
}) {
|
|
8375
|
-
const [s, a] = H(!1), [l, u] = H(!1), [p, d] = H(null), [f, _] = H({ side: "top", left: 0, top: 0 }), [x, g] = H(!1), c = T(null), b = T(null), m = T(null), v = T(null), D = T(!1), I = T(null), h = T(!1), C = T(!1), M = T(!1), L = T(!1), E = `relative-time-card-${fe().replace(/:/g, "")}`, k = `${E}-title`, N =
|
|
8406
|
+
const [s, a] = H(!1), [l, u] = H(!1), [p, d] = H(null), [f, _] = H({ side: "top", left: 0, top: 0 }), [x, g] = H(!1), c = T(null), b = T(null), m = T(null), v = T(null), D = T(!1), I = T(null), h = T(!1), C = T(!1), M = T(!1), L = T(!1), E = `relative-time-card-${fe().replace(/:/g, "")}`, k = `${E}-title`, N = qa(r), q = ce(() => {
|
|
8376
8407
|
const S = c.current?.ownerDocument.defaultView;
|
|
8377
8408
|
m.current !== null && S && S.clearTimeout(m.current), m.current = null;
|
|
8378
8409
|
}, []), P = ce(() => {
|
|
8379
8410
|
v.current?.(), v.current = null;
|
|
8380
8411
|
}, []), z = ce((S) => {
|
|
8381
|
-
|
|
8382
|
-
}, [
|
|
8383
|
-
|
|
8384
|
-
}, [
|
|
8412
|
+
q(), !M.current && (L.current = !0, u(S), a(!0));
|
|
8413
|
+
}, [q]), V = ce(() => {
|
|
8414
|
+
q(), P(), L.current = !1, a(!1);
|
|
8415
|
+
}, [q, P]), B = ce(() => {
|
|
8385
8416
|
L.current && (M.current = !0, V());
|
|
8386
8417
|
}, [V]), $ = ce(() => {
|
|
8387
8418
|
const S = c.current?.ownerDocument.activeElement === c.current;
|
|
8388
8419
|
!h.current && !C.current && !v.current && !S && V();
|
|
8389
8420
|
}, [V]), Y = ce(() => {
|
|
8390
|
-
const S = c.current,
|
|
8391
|
-
if (!S || !
|
|
8392
|
-
const j = 8,
|
|
8421
|
+
const S = c.current, R = b.current;
|
|
8422
|
+
if (!S || !R) return;
|
|
8423
|
+
const j = 8, J = 8, ne = S.getBoundingClientRect(), W = R.offsetWidth, U = R.offsetHeight, re = S.ownerDocument, ae = re.documentElement.clientWidth, de = re.documentElement.clientHeight, K = ne.top - J - U >= j, ue = ne.bottom + J + U <= de - j, _e = K || !ue && ne.top >= de - ne.bottom ? "top" : "bottom", pe = ne.left + ne.width / 2 - W / 2, we = Math.max(j, Math.min(pe, ae - j - W)), xe = _e === "top" ? ne.top - J - U : ne.bottom + J, ee = Math.max(j, Math.min(xe, de - j - U));
|
|
8393
8424
|
_({ side: _e, left: we, top: ee }), g(!0);
|
|
8394
8425
|
}, []);
|
|
8395
8426
|
te(() => {
|
|
8396
8427
|
const S = c.current;
|
|
8397
8428
|
if (!S) return;
|
|
8398
|
-
const
|
|
8399
|
-
return d(Tt(
|
|
8429
|
+
const R = S.ownerDocument;
|
|
8430
|
+
return d(Tt(R)), () => St(R);
|
|
8400
8431
|
}, []), me(() => {
|
|
8401
|
-
const S = c.current,
|
|
8402
|
-
if (!S || !
|
|
8432
|
+
const S = c.current, R = b.current, j = S?.ownerDocument.defaultView;
|
|
8433
|
+
if (!S || !R || !j) return;
|
|
8403
8434
|
Y();
|
|
8404
|
-
const
|
|
8405
|
-
return
|
|
8406
|
-
|
|
8435
|
+
const J = typeof j.ResizeObserver == "function" ? new j.ResizeObserver(Y) : null;
|
|
8436
|
+
return J?.observe(S), J?.observe(R), j.addEventListener("scroll", Y, !0), j.addEventListener("resize", Y), () => {
|
|
8437
|
+
J?.disconnect(), j.removeEventListener("scroll", Y, !0), j.removeEventListener("resize", Y);
|
|
8407
8438
|
};
|
|
8408
8439
|
}, [p, Y]), te(() => {
|
|
8409
8440
|
if (!s) return;
|
|
8410
8441
|
const S = c.current;
|
|
8411
8442
|
if (!S) return;
|
|
8412
|
-
const
|
|
8443
|
+
const R = S.ownerDocument, j = lt(R, {
|
|
8413
8444
|
id: E,
|
|
8414
8445
|
blocking: !1,
|
|
8415
8446
|
escape: !0,
|
|
8416
8447
|
outsidePointer: !1,
|
|
8417
8448
|
getContainer: () => b.current,
|
|
8418
8449
|
onClose: B
|
|
8419
|
-
}),
|
|
8450
|
+
}), J = (W) => {
|
|
8420
8451
|
const U = W.target;
|
|
8421
8452
|
U && typeof U.nodeType == "number" && !c.current?.contains(U) && !b.current?.contains(U) && V();
|
|
8422
8453
|
}, ne = (W) => {
|
|
8423
|
-
W.key !== "Escape" || W.defaultPrevented || !Ie(
|
|
8454
|
+
W.key !== "Escape" || W.defaultPrevented || !Ie(R, E) || (W.preventDefault(), W.stopPropagation(), u(!0), B());
|
|
8424
8455
|
};
|
|
8425
|
-
return
|
|
8426
|
-
|
|
8456
|
+
return R.addEventListener("pointerdown", J, !0), R.addEventListener("focusin", J), R.addEventListener("keydown", ne, !0), () => {
|
|
8457
|
+
R.removeEventListener("pointerdown", J, !0), R.removeEventListener("focusin", J), R.removeEventListener("keydown", ne, !0), j();
|
|
8427
8458
|
};
|
|
8428
8459
|
}, [E, B, V, s]), te(() => {
|
|
8429
8460
|
const S = c.current?.ownerDocument.defaultView;
|
|
@@ -8431,38 +8462,38 @@ function wc({
|
|
|
8431
8462
|
m.current !== null && S?.clearTimeout(m.current), I.current !== null && S?.clearTimeout(I.current), P();
|
|
8432
8463
|
};
|
|
8433
8464
|
}, [P]);
|
|
8434
|
-
function G(S,
|
|
8435
|
-
return j >= Math.min(S.left,
|
|
8436
|
-
}
|
|
8437
|
-
function F(S,
|
|
8438
|
-
const j = c.current,
|
|
8439
|
-
if (!j || !
|
|
8440
|
-
const W = j.getBoundingClientRect(), U =
|
|
8441
|
-
if (!G(W, U, S,
|
|
8465
|
+
function G(S, R, j, J) {
|
|
8466
|
+
return j >= Math.min(S.left, R.left) && j <= Math.max(S.right, R.right) && (R.bottom <= S.top && J >= R.bottom && J <= S.top || R.top >= S.bottom && J >= S.bottom && J <= R.top);
|
|
8467
|
+
}
|
|
8468
|
+
function F(S, R) {
|
|
8469
|
+
const j = c.current, J = b.current, ne = j?.ownerDocument;
|
|
8470
|
+
if (!j || !J || !ne || !L.current) return !1;
|
|
8471
|
+
const W = j.getBoundingClientRect(), U = J.getBoundingClientRect();
|
|
8472
|
+
if (!G(W, U, S, R) && !bt(W, S, R) && !bt(U, S, R)) return !1;
|
|
8442
8473
|
P();
|
|
8443
8474
|
const re = (ae) => {
|
|
8444
8475
|
if (ae.pointerType && ae.pointerType !== "mouse") {
|
|
8445
8476
|
P(), $();
|
|
8446
8477
|
return;
|
|
8447
8478
|
}
|
|
8448
|
-
const de = j.getBoundingClientRect(), K =
|
|
8479
|
+
const de = j.getBoundingClientRect(), K = J.getBoundingClientRect();
|
|
8449
8480
|
!bt(de, ae.clientX, ae.clientY) && !bt(K, ae.clientX, ae.clientY) && !G(de, K, ae.clientX, ae.clientY) && (P(), $());
|
|
8450
8481
|
};
|
|
8451
8482
|
return ne.addEventListener("pointermove", re, { passive: !0 }), v.current = () => ne.removeEventListener("pointermove", re), !0;
|
|
8452
8483
|
}
|
|
8453
8484
|
function O() {
|
|
8454
8485
|
const S = c.current?.ownerDocument.defaultView;
|
|
8455
|
-
S?.matchMedia("(hover: hover) and (pointer: fine)").matches && (M.current = !1, h.current = !0, P(), !L.current && (
|
|
8486
|
+
S?.matchMedia("(hover: hover) and (pointer: fine)").matches && (M.current = !1, h.current = !0, P(), !L.current && (q(), m.current = S.setTimeout(() => {
|
|
8456
8487
|
m.current = null, h.current && !M.current && z(!1);
|
|
8457
8488
|
}, 120)));
|
|
8458
8489
|
}
|
|
8459
8490
|
function X(S) {
|
|
8460
|
-
S.pointerType === "mouse" && (h.current = !1,
|
|
8491
|
+
S.pointerType === "mouse" && (h.current = !1, q(), F(S.clientX, S.clientY) || $());
|
|
8461
8492
|
}
|
|
8462
8493
|
function Q(S) {
|
|
8463
|
-
D.current = !0,
|
|
8464
|
-
const
|
|
8465
|
-
I.current !== null &&
|
|
8494
|
+
D.current = !0, q();
|
|
8495
|
+
const R = S.currentTarget.ownerDocument.defaultView;
|
|
8496
|
+
I.current !== null && R?.clearTimeout(I.current), R && (I.current = R.setTimeout(() => {
|
|
8466
8497
|
D.current = !1, I.current = null;
|
|
8467
8498
|
}, 0));
|
|
8468
8499
|
}
|
|
@@ -8532,28 +8563,28 @@ function wc({
|
|
|
8532
8563
|
}
|
|
8533
8564
|
);
|
|
8534
8565
|
}
|
|
8535
|
-
const
|
|
8536
|
-
function
|
|
8566
|
+
const Ra = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
|
|
8567
|
+
function Je(e) {
|
|
8537
8568
|
return typeof e == "string" ? JSON.stringify(e) : typeof e == "number" || typeof e == "bigint" || typeof e == "boolean" || e === null ? String(e) : `<${typeof e}>`;
|
|
8538
8569
|
}
|
|
8539
|
-
function
|
|
8570
|
+
function $a({ value: e }) {
|
|
8540
8571
|
return /* @__PURE__ */ w(ge, { children: [
|
|
8541
8572
|
/* @__PURE__ */ n("span", { className: "q1-json-view__key", children: JSON.stringify(e) }),
|
|
8542
8573
|
/* @__PURE__ */ n("span", { className: "q1-json-view__punct", children: ": " })
|
|
8543
8574
|
] });
|
|
8544
8575
|
}
|
|
8545
|
-
function
|
|
8546
|
-
return typeof e == "string" ? /* @__PURE__ */ n("span", { className: "q1-json-view__primitive tok-string", children:
|
|
8576
|
+
function La({ value: e }) {
|
|
8577
|
+
return typeof e == "string" ? /* @__PURE__ */ n("span", { className: "q1-json-view__primitive tok-string", children: Je(e) }) : typeof e == "number" || typeof e == "bigint" ? /* @__PURE__ */ n("span", { className: "q1-json-view__primitive tok-fn", children: Je(e) }) : typeof e == "boolean" || e === null ? /* @__PURE__ */ n("span", { className: "q1-json-view__primitive tok-keyword", children: Je(e) }) : /* @__PURE__ */ n("span", { className: "q1-json-view__primitive tok-comment", children: Je(e) });
|
|
8547
8578
|
}
|
|
8548
|
-
function
|
|
8579
|
+
function Aa(e, t) {
|
|
8549
8580
|
return e ? `${e}.${t}` : t;
|
|
8550
8581
|
}
|
|
8551
8582
|
function Tr({ value: e, depth: t, path: r, collapsedDepth: o, highlight: i, seen: s, entryKey: a, arrayItem: l = !1 }) {
|
|
8552
|
-
const u = Array.isArray(e), p =
|
|
8583
|
+
const u = Array.isArray(e), p = Ra(e), d = a === void 0 || l ? null : /* @__PURE__ */ n($a, { value: a });
|
|
8553
8584
|
if (!u && !p)
|
|
8554
8585
|
return /* @__PURE__ */ w(ge, { children: [
|
|
8555
8586
|
d,
|
|
8556
|
-
/* @__PURE__ */ n(
|
|
8587
|
+
/* @__PURE__ */ n(La, { value: e })
|
|
8557
8588
|
] });
|
|
8558
8589
|
if (s.has(e))
|
|
8559
8590
|
return /* @__PURE__ */ w(ge, { children: [
|
|
@@ -8613,11 +8644,11 @@ function Tr({ value: e, depth: t, path: r, collapsedDepth: o, highlight: i, seen
|
|
|
8613
8644
|
}
|
|
8614
8645
|
),
|
|
8615
8646
|
/* @__PURE__ */ n("ul", { className: "q1-json-view__list", children: _.map(([E, k]) => {
|
|
8616
|
-
const N =
|
|
8647
|
+
const N = Aa(r, E), q = i.has(N) || i.has(E);
|
|
8617
8648
|
return /* @__PURE__ */ n(
|
|
8618
8649
|
"li",
|
|
8619
8650
|
{
|
|
8620
|
-
className: ie("q1-json-view__row",
|
|
8651
|
+
className: ie("q1-json-view__row", q && "q1-json-view__row--highlight"),
|
|
8621
8652
|
children: /* @__PURE__ */ n(
|
|
8622
8653
|
Tr,
|
|
8623
8654
|
{
|
|
@@ -8639,12 +8670,12 @@ function Tr({ value: e, depth: t, path: r, collapsedDepth: o, highlight: i, seen
|
|
|
8639
8670
|
] });
|
|
8640
8671
|
}
|
|
8641
8672
|
function en(e, t) {
|
|
8642
|
-
if (e === null || typeof e != "object") return
|
|
8673
|
+
if (e === null || typeof e != "object") return Je(e);
|
|
8643
8674
|
if (t.has(e)) return "<循环引用>";
|
|
8644
8675
|
const r = new Set(t).add(e);
|
|
8645
8676
|
return Array.isArray(e) ? `[${e.map((i) => en(i, r)).join(", ")}]` : `{${Object.entries(e).map(([i, s]) => `${JSON.stringify(i)}: ${en(s, r)}`).join(", ")}}`;
|
|
8646
8677
|
}
|
|
8647
|
-
function
|
|
8678
|
+
function kc({
|
|
8648
8679
|
value: e,
|
|
8649
8680
|
singleLine: t = !1,
|
|
8650
8681
|
wrap: r = !1,
|
|
@@ -8674,19 +8705,19 @@ function vc({
|
|
|
8674
8705
|
) });
|
|
8675
8706
|
}
|
|
8676
8707
|
const Sr = "(prefers-reduced-motion: reduce)";
|
|
8677
|
-
function
|
|
8708
|
+
function qr() {
|
|
8678
8709
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(Sr).matches;
|
|
8679
8710
|
}
|
|
8680
|
-
function
|
|
8711
|
+
function Fa(e) {
|
|
8681
8712
|
if (typeof window > "u" || typeof window.matchMedia != "function") return () => {
|
|
8682
8713
|
};
|
|
8683
8714
|
const t = window.matchMedia(Sr);
|
|
8684
8715
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
8685
8716
|
}
|
|
8686
|
-
function
|
|
8687
|
-
return on(
|
|
8717
|
+
function Oa() {
|
|
8718
|
+
return on(Fa, qr, () => !0);
|
|
8688
8719
|
}
|
|
8689
|
-
function
|
|
8720
|
+
function xc({
|
|
8690
8721
|
src: e,
|
|
8691
8722
|
poster: t,
|
|
8692
8723
|
tracks: r,
|
|
@@ -8696,7 +8727,7 @@ function Nc({
|
|
|
8696
8727
|
loop: a = !1,
|
|
8697
8728
|
muted: l = !1
|
|
8698
8729
|
}) {
|
|
8699
|
-
const u = i === "decorative", p = o || "视频", d = T(null), f = T(null), _ =
|
|
8730
|
+
const u = i === "decorative", p = o || "视频", d = T(null), f = T(null), _ = Oa(), [x, g] = H(!u), [c, b] = H("idle"), [m, v] = H(!1);
|
|
8700
8731
|
te(() => {
|
|
8701
8732
|
b("idle");
|
|
8702
8733
|
}, [i, e]), te(() => {
|
|
@@ -8844,7 +8875,7 @@ function Nc({
|
|
|
8844
8875
|
);
|
|
8845
8876
|
}
|
|
8846
8877
|
const dn = "q1travel-design-system-theme", tn = "q1travel-theme-change";
|
|
8847
|
-
let
|
|
8878
|
+
let qe, Ht = 0, nn = !1;
|
|
8848
8879
|
function Pt(e) {
|
|
8849
8880
|
return e === "light" || e === "dark" || e === "system" ? e : void 0;
|
|
8850
8881
|
}
|
|
@@ -8856,7 +8887,7 @@ function fn() {
|
|
|
8856
8887
|
return;
|
|
8857
8888
|
}
|
|
8858
8889
|
}
|
|
8859
|
-
function
|
|
8890
|
+
function Rr() {
|
|
8860
8891
|
const e = fn();
|
|
8861
8892
|
if (!e) return null;
|
|
8862
8893
|
try {
|
|
@@ -8865,12 +8896,12 @@ function qr() {
|
|
|
8865
8896
|
return null;
|
|
8866
8897
|
}
|
|
8867
8898
|
}
|
|
8868
|
-
function
|
|
8899
|
+
function Ba() {
|
|
8869
8900
|
if (!(typeof document > "u"))
|
|
8870
8901
|
return Pt(document.documentElement.dataset.themeMode);
|
|
8871
8902
|
}
|
|
8872
8903
|
function $r() {
|
|
8873
|
-
return
|
|
8904
|
+
return qe ??= Ba() ?? Rr() ?? "system", qe;
|
|
8874
8905
|
}
|
|
8875
8906
|
function et(e) {
|
|
8876
8907
|
if (typeof window > "u" || typeof document > "u") return;
|
|
@@ -8879,23 +8910,23 @@ function et(e) {
|
|
|
8879
8910
|
const o = document.querySelector("#q1-theme-color"), i = r === "dark" ? o?.dataset.dark : o?.dataset.light;
|
|
8880
8911
|
o && i && o.setAttribute("content", i);
|
|
8881
8912
|
}
|
|
8882
|
-
function
|
|
8913
|
+
function Ka(e) {
|
|
8883
8914
|
if (typeof window > "u") return () => {
|
|
8884
8915
|
};
|
|
8885
|
-
Ht === 0 && !nn && (
|
|
8886
|
-
const t = window.matchMedia("(prefers-color-scheme: dark)"), r = () =>
|
|
8916
|
+
Ht === 0 && !nn && (qe = Rr() ?? qe), Ht += 1;
|
|
8917
|
+
const t = window.matchMedia("(prefers-color-scheme: dark)"), r = () => qe === "system" && et("system"), o = (s) => {
|
|
8887
8918
|
const a = s instanceof CustomEvent ? Pt(s.detail) : void 0;
|
|
8888
|
-
a && (
|
|
8919
|
+
a && (qe = a, et(a), e());
|
|
8889
8920
|
}, i = (s) => {
|
|
8890
8921
|
const a = fn();
|
|
8891
|
-
!a || s.storageArea !== a || s.key !== dn && s.key !== null || (nn = !1,
|
|
8922
|
+
!a || s.storageArea !== a || s.key !== dn && s.key !== null || (nn = !1, qe = Pt(s.newValue) ?? "system", et(qe), e());
|
|
8892
8923
|
};
|
|
8893
8924
|
return et($r()), t.addEventListener("change", r), window.addEventListener(tn, o), window.addEventListener("storage", i), () => {
|
|
8894
8925
|
Ht -= 1, t.removeEventListener("change", r), window.removeEventListener(tn, o), window.removeEventListener("storage", i);
|
|
8895
8926
|
};
|
|
8896
8927
|
}
|
|
8897
|
-
function
|
|
8898
|
-
if (
|
|
8928
|
+
function Wa(e) {
|
|
8929
|
+
if (qe = e, typeof window < "u") {
|
|
8899
8930
|
let t = !1;
|
|
8900
8931
|
try {
|
|
8901
8932
|
const r = fn();
|
|
@@ -8905,16 +8936,16 @@ function Ba(e) {
|
|
|
8905
8936
|
nn = !t, et(e), window.dispatchEvent(new CustomEvent(tn, { detail: e }));
|
|
8906
8937
|
}
|
|
8907
8938
|
}
|
|
8908
|
-
function
|
|
8909
|
-
return [on(
|
|
8939
|
+
function za() {
|
|
8940
|
+
return [on(Ka, $r, () => "system"), Wa];
|
|
8910
8941
|
}
|
|
8911
|
-
const
|
|
8942
|
+
const Va = [
|
|
8912
8943
|
{ mode: "system", label: "系统", Icon: to },
|
|
8913
8944
|
{ mode: "light", label: "浅色", Icon: co },
|
|
8914
8945
|
{ mode: "dark", label: "深色", Icon: no }
|
|
8915
8946
|
];
|
|
8916
|
-
function
|
|
8917
|
-
const r = fe(), [o, i] =
|
|
8947
|
+
function Pc({ small: e, disabled: t }) {
|
|
8948
|
+
const r = fe(), [o, i] = za();
|
|
8918
8949
|
return /* @__PURE__ */ w(
|
|
8919
8950
|
"fieldset",
|
|
8920
8951
|
{
|
|
@@ -8922,7 +8953,7 @@ function kc({ small: e, disabled: t }) {
|
|
|
8922
8953
|
disabled: t,
|
|
8923
8954
|
children: [
|
|
8924
8955
|
/* @__PURE__ */ n("legend", { className: "q1-sr-only", children: "选择显示主题" }),
|
|
8925
|
-
|
|
8956
|
+
Va.map(({ mode: s, label: a, Icon: l }) => /* @__PURE__ */ w("label", { className: "theme-switcher__option", children: [
|
|
8926
8957
|
/* @__PURE__ */ n(
|
|
8927
8958
|
"input",
|
|
8928
8959
|
{
|
|
@@ -8941,7 +8972,7 @@ function kc({ small: e, disabled: t }) {
|
|
|
8941
8972
|
}
|
|
8942
8973
|
);
|
|
8943
8974
|
}
|
|
8944
|
-
const
|
|
8975
|
+
const Ha = {
|
|
8945
8976
|
overflowX: !1,
|
|
8946
8977
|
overflowY: !1,
|
|
8947
8978
|
canScrollLeft: !1,
|
|
@@ -8949,13 +8980,13 @@ const za = {
|
|
|
8949
8980
|
canScrollTop: !1,
|
|
8950
8981
|
canScrollBottom: !1
|
|
8951
8982
|
};
|
|
8952
|
-
function
|
|
8983
|
+
function Ua(e, t) {
|
|
8953
8984
|
return Object.keys(e).every(
|
|
8954
8985
|
(r) => e[r] === t[r]
|
|
8955
8986
|
);
|
|
8956
8987
|
}
|
|
8957
8988
|
function Lr(e, t) {
|
|
8958
|
-
const r = T(null), [o, i] = H(
|
|
8989
|
+
const r = T(null), [o, i] = H(Ha), s = ce(() => {
|
|
8959
8990
|
const a = r.current;
|
|
8960
8991
|
if (!a) return;
|
|
8961
8992
|
const l = a.scrollWidth - a.clientWidth, u = a.scrollHeight - a.clientHeight, p = e !== "vertical" && l > 1, d = e !== "horizontal" && u > 1, f = {
|
|
@@ -8966,7 +8997,7 @@ function Lr(e, t) {
|
|
|
8966
8997
|
canScrollTop: d && a.scrollTop > 1,
|
|
8967
8998
|
canScrollBottom: d && a.scrollTop < u - 1
|
|
8968
8999
|
};
|
|
8969
|
-
i((_) =>
|
|
9000
|
+
i((_) => Ua(_, f) ? _ : f);
|
|
8970
9001
|
}, [e]);
|
|
8971
9002
|
return me(() => {
|
|
8972
9003
|
const a = r.current;
|
|
@@ -8995,7 +9026,7 @@ function Ar(e) {
|
|
|
8995
9026
|
"data-can-scroll-bottom": String(e.canScrollBottom)
|
|
8996
9027
|
};
|
|
8997
9028
|
}
|
|
8998
|
-
function
|
|
9029
|
+
function Cc({
|
|
8999
9030
|
axis: e,
|
|
9000
9031
|
label: t,
|
|
9001
9032
|
children: r
|
|
@@ -9015,7 +9046,7 @@ function xc({
|
|
|
9015
9046
|
}
|
|
9016
9047
|
) });
|
|
9017
9048
|
}
|
|
9018
|
-
function
|
|
9049
|
+
function Ic({
|
|
9019
9050
|
axis: e = "horizontal",
|
|
9020
9051
|
contentName: t,
|
|
9021
9052
|
label: r,
|
|
@@ -9029,7 +9060,7 @@ function Pc({
|
|
|
9029
9060
|
if (!M) return;
|
|
9030
9061
|
const L = c.detail > 0;
|
|
9031
9062
|
a(L ? "pointer" : "instant");
|
|
9032
|
-
const E = L && !
|
|
9063
|
+
const E = L && !qr() ? "smooth" : "auto", k = () => {
|
|
9033
9064
|
if (L || c.currentTarget.ownerDocument.activeElement !== c.currentTarget) return;
|
|
9034
9065
|
const P = i ? b.scrollLeft : b.scrollTop, z = i ? b.scrollWidth - b.clientWidth : b.scrollHeight - b.clientHeight;
|
|
9035
9066
|
(g === -1 && P <= 1 || g === 1 && P >= z - 1) && b.focus({ preventScroll: !0 });
|
|
@@ -9038,8 +9069,8 @@ function Pc({
|
|
|
9038
9069
|
M.scrollIntoView({ behavior: E, inline: "start", block: "nearest" }), k();
|
|
9039
9070
|
return;
|
|
9040
9071
|
}
|
|
9041
|
-
const N = parseFloat(getComputedStyle(b).paddingTop) || 0,
|
|
9042
|
-
b.scrollTo({ top: b.scrollTop +
|
|
9072
|
+
const N = parseFloat(getComputedStyle(b).paddingTop) || 0, q = M.getBoundingClientRect().top - b.getBoundingClientRect().top - N;
|
|
9073
|
+
b.scrollTo({ top: b.scrollTop + q, behavior: E }), k();
|
|
9043
9074
|
}
|
|
9044
9075
|
return /* @__PURE__ */ w(
|
|
9045
9076
|
"div",
|
|
@@ -9055,7 +9086,7 @@ function Pc({
|
|
|
9055
9086
|
"aria-label": `${i ? "向左滚动" : "向上滚动"}${t}`,
|
|
9056
9087
|
disabled: !f,
|
|
9057
9088
|
onClick: (g) => x(-1, g),
|
|
9058
|
-
children: i ? /* @__PURE__ */ n(at, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ n(
|
|
9089
|
+
children: i ? /* @__PURE__ */ n(at, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ n(Jn, { size: 16, strokeWidth: 2, "aria-hidden": "true" })
|
|
9059
9090
|
}
|
|
9060
9091
|
),
|
|
9061
9092
|
/* @__PURE__ */ n("div", { className: `scroller scroller--${e} scroller--flush`, children: /* @__PURE__ */ n(
|
|
@@ -9082,7 +9113,7 @@ function Pc({
|
|
|
9082
9113
|
"aria-label": `${i ? "向右滚动" : "向下滚动"}${t}`,
|
|
9083
9114
|
disabled: !_,
|
|
9084
9115
|
onClick: (g) => x(1, g),
|
|
9085
|
-
children: i ? /* @__PURE__ */ n(Ee, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ n(
|
|
9116
|
+
children: i ? /* @__PURE__ */ n(Ee, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : /* @__PURE__ */ n(Re, { size: 16, strokeWidth: 2, "aria-hidden": "true" })
|
|
9086
9117
|
}
|
|
9087
9118
|
)
|
|
9088
9119
|
]
|
|
@@ -9115,7 +9146,7 @@ function rn(e, { min: t, max: r }) {
|
|
|
9115
9146
|
function Ct(e, t) {
|
|
9116
9147
|
return t ? t === "%" ? `${e}%` : `${e} ${t}` : String(e);
|
|
9117
9148
|
}
|
|
9118
|
-
const
|
|
9149
|
+
const Dc = It(function({
|
|
9119
9150
|
label: t,
|
|
9120
9151
|
unit: r,
|
|
9121
9152
|
min: o = 0,
|
|
@@ -9174,7 +9205,7 @@ const Cc = It(function({
|
|
|
9174
9205
|
/* @__PURE__ */ n("span", { className: "slider-thumb-emphasis", "aria-hidden": "true" })
|
|
9175
9206
|
] })
|
|
9176
9207
|
] });
|
|
9177
|
-
}),
|
|
9208
|
+
}), Mc = It(function({
|
|
9178
9209
|
label: t = "数值区间",
|
|
9179
9210
|
unit: r = "",
|
|
9180
9211
|
min: o = 0,
|
|
@@ -9191,7 +9222,7 @@ const Cc = It(function({
|
|
|
9191
9222
|
}, g) {
|
|
9192
9223
|
const c = Fr(o, i, s), b = u !== void 0, [m, v] = H(
|
|
9193
9224
|
() => Hn([a ?? o, l ?? i], c)
|
|
9194
|
-
), [D, I] = Hn(b ? u : m, c), h = fe(), C = d ?? h, M = `${C}-low-number`, L = `${C}-high-number`, E = rn(D, c), k = rn(I, c), N = T(null),
|
|
9225
|
+
), [D, I] = Hn(b ? u : m, c), h = fe(), C = d ?? h, M = `${C}-low-number`, L = `${C}-high-number`, E = rn(D, c), k = rn(I, c), N = T(null), q = T(null), P = T(null), z = T(null), V = T(!1), B = T(!1), [$, Y] = H(String(D)), [G, F] = H(String(I)), [O, X] = H(null);
|
|
9195
9226
|
Xn(g, () => N.current), te(() => {
|
|
9196
9227
|
V.current || Y(String(D));
|
|
9197
9228
|
}, [D]), te(() => {
|
|
@@ -9223,8 +9254,8 @@ const Cc = It(function({
|
|
|
9223
9254
|
pointerValue: U,
|
|
9224
9255
|
activated: !ae,
|
|
9225
9256
|
verticalPan: !1
|
|
9226
|
-
}, W.currentTarget.setPointerCapture(W.pointerId), !ae && re && (X(re), (re === "low" ? N.current :
|
|
9227
|
-
},
|
|
9257
|
+
}, W.currentTarget.setPointerCapture(W.pointerId), !ae && re && (X(re), (re === "low" ? N.current : q.current)?.focus(), y(re, U));
|
|
9258
|
+
}, R = (W) => {
|
|
9228
9259
|
const U = z.current;
|
|
9229
9260
|
if (!U || U.pointerId !== W.pointerId) return;
|
|
9230
9261
|
const re = A(W.clientX);
|
|
@@ -9239,7 +9270,7 @@ const Cc = It(function({
|
|
|
9239
9270
|
}
|
|
9240
9271
|
if (!U.thumb) {
|
|
9241
9272
|
if (re === U.overlapValue) return;
|
|
9242
|
-
U.thumb = re < U.overlapValue ? "low" : "high", X(U.thumb), (U.thumb === "low" ? N.current :
|
|
9273
|
+
U.thumb = re < U.overlapValue ? "low" : "high", X(U.thumb), (U.thumb === "low" ? N.current : q.current)?.focus();
|
|
9243
9274
|
}
|
|
9244
9275
|
y(U.thumb, re);
|
|
9245
9276
|
}, j = (W, U = !1) => {
|
|
@@ -9247,11 +9278,11 @@ const Cc = It(function({
|
|
|
9247
9278
|
if (!(!re || re.pointerId !== W.pointerId)) {
|
|
9248
9279
|
if (U && re.pointerType === "touch" && !re.activated && !re.verticalPan) {
|
|
9249
9280
|
const ae = re.thumb ?? "low";
|
|
9250
|
-
(ae === "low" ? N.current :
|
|
9281
|
+
(ae === "low" ? N.current : q.current)?.focus(), y(ae, re.pointerValue);
|
|
9251
9282
|
}
|
|
9252
9283
|
z.current = null, X(null), W.currentTarget.hasPointerCapture(W.pointerId) && W.currentTarget.releasePointerCapture(W.pointerId);
|
|
9253
9284
|
}
|
|
9254
|
-
},
|
|
9285
|
+
}, J = (W) => {
|
|
9255
9286
|
const U = W === "low" ? $ : G, re = Number(U);
|
|
9256
9287
|
if (!U.trim() || !Number.isFinite(re)) {
|
|
9257
9288
|
W === "low" ? Y(String(D)) : F(String(I));
|
|
@@ -9293,7 +9324,7 @@ const Cc = It(function({
|
|
|
9293
9324
|
},
|
|
9294
9325
|
onChange: (W) => Y(W.currentTarget.value),
|
|
9295
9326
|
onBlur: () => {
|
|
9296
|
-
V.current = !1,
|
|
9327
|
+
V.current = !1, J("low");
|
|
9297
9328
|
},
|
|
9298
9329
|
onKeyDown: ne
|
|
9299
9330
|
}
|
|
@@ -9307,7 +9338,7 @@ const Cc = It(function({
|
|
|
9307
9338
|
className: "range-slider__track-area",
|
|
9308
9339
|
style: { "--low": `${E}%`, "--high": `${k}%` },
|
|
9309
9340
|
onPointerDown: S,
|
|
9310
|
-
onPointerMove:
|
|
9341
|
+
onPointerMove: R,
|
|
9311
9342
|
onPointerUp: (W) => j(W, !0),
|
|
9312
9343
|
onPointerCancel: j,
|
|
9313
9344
|
onLostPointerCapture: j,
|
|
@@ -9335,7 +9366,7 @@ const Cc = It(function({
|
|
|
9335
9366
|
/* @__PURE__ */ n(
|
|
9336
9367
|
"input",
|
|
9337
9368
|
{
|
|
9338
|
-
ref:
|
|
9369
|
+
ref: q,
|
|
9339
9370
|
name: f,
|
|
9340
9371
|
type: "range",
|
|
9341
9372
|
className: "slider-input range-slider__thumb range-slider__thumb--high",
|
|
@@ -9377,7 +9408,7 @@ const Cc = It(function({
|
|
|
9377
9408
|
},
|
|
9378
9409
|
onChange: (W) => F(W.currentTarget.value),
|
|
9379
9410
|
onBlur: () => {
|
|
9380
|
-
B.current = !1,
|
|
9411
|
+
B.current = !1, J("high");
|
|
9381
9412
|
},
|
|
9382
9413
|
onKeyDown: ne
|
|
9383
9414
|
}
|
|
@@ -9399,7 +9430,7 @@ function vt({ crumb: e }) {
|
|
|
9399
9430
|
function Nt() {
|
|
9400
9431
|
return /* @__PURE__ */ n(Ee, { className: "breadcrumb__separator", "aria-hidden": "true", size: 16, strokeWidth: 2 });
|
|
9401
9432
|
}
|
|
9402
|
-
function
|
|
9433
|
+
function ja({
|
|
9403
9434
|
items: e,
|
|
9404
9435
|
label: t,
|
|
9405
9436
|
type: r = "text"
|
|
@@ -9410,9 +9441,9 @@ function Ha({
|
|
|
9410
9441
|
!o && s < e.length - 1 ? /* @__PURE__ */ n(Nt, {}) : null
|
|
9411
9442
|
] }, `${i.href ?? "static"}-${i.label}-${s}`)) }) });
|
|
9412
9443
|
}
|
|
9413
|
-
function
|
|
9444
|
+
function Ec({ items: e, label: t }) {
|
|
9414
9445
|
const [r, o] = H(!1), [i, s] = H(), [a, l] = H(!1), u = T(null);
|
|
9415
|
-
if (e.length < 3) return /* @__PURE__ */ n(
|
|
9446
|
+
if (e.length < 3) return /* @__PURE__ */ n(ja, { items: e, label: t });
|
|
9416
9447
|
const p = e[0], d = e[e.length - 1], f = e.slice(1, -1), _ = () => {
|
|
9417
9448
|
u.current = null, l(!1);
|
|
9418
9449
|
}, x = (c) => {
|
|
@@ -9457,7 +9488,7 @@ function Dc({ items: e, label: t }) {
|
|
|
9457
9488
|
}
|
|
9458
9489
|
),
|
|
9459
9490
|
/* @__PURE__ */ n(
|
|
9460
|
-
|
|
9491
|
+
Jn,
|
|
9461
9492
|
{
|
|
9462
9493
|
className: ie("breadcrumb__toggle-icon", r ? "breadcrumb__toggle-icon--active" : ""),
|
|
9463
9494
|
size: 16,
|
|
@@ -9483,7 +9514,7 @@ function Dc({ items: e, label: t }) {
|
|
|
9483
9514
|
/* @__PURE__ */ n("li", { className: "breadcrumb__item breadcrumb__item--endpoint breadcrumb__item--last", children: /* @__PURE__ */ n(vt, { crumb: d }) })
|
|
9484
9515
|
] }) });
|
|
9485
9516
|
}
|
|
9486
|
-
function
|
|
9517
|
+
function Tc({ open: e, onClose: t, title: r, side: o = "right", size: i, dismissable: s = !0, children: a, footer: l }) {
|
|
9487
9518
|
const u = T(null), p = T(!1), d = T({ side: o, size: i, title: r, children: a, footer: l }), f = fe(), [_, x] = H(e), [g, c] = H("keyboard"), b = e || _, m = e ? { side: o, size: i, title: r, children: a, footer: l } : d.current, v = ce(() => {
|
|
9488
9519
|
p.current = !1, x(!1), c("keyboard");
|
|
9489
9520
|
}, []);
|
|
@@ -9499,9 +9530,9 @@ function Mc({ open: e, onClose: t, title: r, side: o = "right", size: i, dismiss
|
|
|
9499
9530
|
v();
|
|
9500
9531
|
return;
|
|
9501
9532
|
}
|
|
9502
|
-
const C = getComputedStyle(u.current), M = C.transitionDuration.split(",").map((
|
|
9533
|
+
const C = getComputedStyle(u.current), M = C.transitionDuration.split(",").map((q) => Number.parseFloat(q) * (q.trim().endsWith("ms") ? 1 : 1e3)), L = C.transitionDelay.split(",").map((q) => Number.parseFloat(q) * (q.trim().endsWith("ms") ? 1 : 1e3)), E = Math.max(M.length, L.length), k = Math.max(0, ...Array.from(
|
|
9503
9534
|
{ length: E },
|
|
9504
|
-
(
|
|
9535
|
+
(q, P) => M[P % M.length] + L[P % L.length]
|
|
9505
9536
|
));
|
|
9506
9537
|
if (k === 0) {
|
|
9507
9538
|
v();
|
|
@@ -9573,7 +9604,7 @@ function Mc({ open: e, onClose: t, title: r, side: o = "right", size: i, dismiss
|
|
|
9573
9604
|
] })
|
|
9574
9605
|
) : null;
|
|
9575
9606
|
}
|
|
9576
|
-
function
|
|
9607
|
+
function Sc({
|
|
9577
9608
|
label: e,
|
|
9578
9609
|
entries: t,
|
|
9579
9610
|
variant: r = "default",
|
|
@@ -9595,7 +9626,7 @@ function Ec({
|
|
|
9595
9626
|
function N(O = !0) {
|
|
9596
9627
|
f(!1), z(), v.current = -1, O && c.current?.focus();
|
|
9597
9628
|
}
|
|
9598
|
-
const { itemRefs:
|
|
9629
|
+
const { itemRefs: q, focusItem: P, reset: z, onMenuKeyDown: V } = Ge({
|
|
9599
9630
|
focusableIndices: M,
|
|
9600
9631
|
getText: (O) => O === 0 ? e : t[O]?.label ?? "",
|
|
9601
9632
|
onClose: () => N()
|
|
@@ -9616,7 +9647,7 @@ function Ec({
|
|
|
9616
9647
|
N(!1);
|
|
9617
9648
|
return;
|
|
9618
9649
|
}
|
|
9619
|
-
const O = document.activeElement, X =
|
|
9650
|
+
const O = document.activeElement, X = q.current.indexOf(O), Q = X >= 0 ? X : v.current, y = O === document.body;
|
|
9620
9651
|
if ((X >= 0 || y) && Q >= 0 && t[Q]?.disabled) {
|
|
9621
9652
|
const A = M.find((S) => S > Q) ?? M[0];
|
|
9622
9653
|
P(A);
|
|
@@ -9691,7 +9722,7 @@ function Ec({
|
|
|
9691
9722
|
},
|
|
9692
9723
|
onClick: Y,
|
|
9693
9724
|
onKeyDown: $,
|
|
9694
|
-
children: /* @__PURE__ */ n("span", { className: "split-button__toggle-content", children: /* @__PURE__ */ n(
|
|
9725
|
+
children: /* @__PURE__ */ n("span", { className: "split-button__toggle-content", children: /* @__PURE__ */ n(Re, { size: o === "sm" ? 14 : 16, strokeWidth: 2, "aria-hidden": "true" }) })
|
|
9695
9726
|
}
|
|
9696
9727
|
),
|
|
9697
9728
|
d ? I(
|
|
@@ -9711,7 +9742,7 @@ function Ec({
|
|
|
9711
9742
|
"button",
|
|
9712
9743
|
{
|
|
9713
9744
|
ref: (Q) => {
|
|
9714
|
-
|
|
9745
|
+
q.current[X] = Q;
|
|
9715
9746
|
},
|
|
9716
9747
|
type: "button",
|
|
9717
9748
|
role: "menuitem",
|
|
@@ -9735,13 +9766,13 @@ function Ec({
|
|
|
9735
9766
|
) : null
|
|
9736
9767
|
] });
|
|
9737
9768
|
}
|
|
9738
|
-
const
|
|
9739
|
-
function
|
|
9769
|
+
const Ya = (e) => e.type === "item" || e.type === "link";
|
|
9770
|
+
function qc({ label: e, entries: t, withChevron: r, align: o = "start", triggerContent: i }) {
|
|
9740
9771
|
const [s, a] = H(!1), [l, u] = H(!1), [p, d] = H("keyboard"), [f, _] = H(!1), x = T(null), g = T(null), c = T(!1), b = fe(), { portalPopup: m, placement: v, onOverlayKeyDown: D } = Xe(
|
|
9741
9772
|
s,
|
|
9742
9773
|
x,
|
|
9743
9774
|
g,
|
|
9744
|
-
(y) =>
|
|
9775
|
+
(y) => q(y !== "outside-pointer"),
|
|
9745
9776
|
{ width: "content", align: o, gapToken: "--q1-space-2", outsidePointer: !0, present: l }
|
|
9746
9777
|
);
|
|
9747
9778
|
function I() {
|
|
@@ -9751,13 +9782,13 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9751
9782
|
if (s || !l || !g.current) return;
|
|
9752
9783
|
getComputedStyle(g.current).transitionDuration.split(",").some((A) => Number.parseFloat(A) > 0) || I();
|
|
9753
9784
|
}, [s, l]);
|
|
9754
|
-
const h = t.flatMap((y, A) =>
|
|
9785
|
+
const h = t.flatMap((y, A) => Ya(y) ? [A] : []), C = h.length > 0, { itemRefs: M, focusItem: L, reset: E, onMenuKeyDown: k } = Ge({
|
|
9755
9786
|
focusableIndices: h,
|
|
9756
9787
|
getText: (y) => {
|
|
9757
9788
|
const A = t[y];
|
|
9758
9789
|
return A.type === "item" || A.type === "link" ? A.label : "";
|
|
9759
9790
|
},
|
|
9760
|
-
onClose: () =>
|
|
9791
|
+
onClose: () => q()
|
|
9761
9792
|
});
|
|
9762
9793
|
function N(y, A) {
|
|
9763
9794
|
if (!C) return;
|
|
@@ -9765,7 +9796,7 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9765
9796
|
const S = y === "first" ? h[0] : h[h.length - 1];
|
|
9766
9797
|
window.requestAnimationFrame(() => L(S));
|
|
9767
9798
|
}
|
|
9768
|
-
function
|
|
9799
|
+
function q(y = !0) {
|
|
9769
9800
|
a(!1), E(), y && x.current?.focus();
|
|
9770
9801
|
}
|
|
9771
9802
|
function P(y) {
|
|
@@ -9775,7 +9806,7 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9775
9806
|
});
|
|
9776
9807
|
}
|
|
9777
9808
|
function z(y) {
|
|
9778
|
-
y.disabled || y.locked || (
|
|
9809
|
+
y.disabled || y.locked || (q(), y.onSelect());
|
|
9779
9810
|
}
|
|
9780
9811
|
function V(y, A) {
|
|
9781
9812
|
if (A.disabled || A.locked) {
|
|
@@ -9783,7 +9814,7 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9783
9814
|
return;
|
|
9784
9815
|
}
|
|
9785
9816
|
const S = g.current;
|
|
9786
|
-
|
|
9817
|
+
q(!1), P(S);
|
|
9787
9818
|
}
|
|
9788
9819
|
function B(y) {
|
|
9789
9820
|
s || y.target !== y.currentTarget || !["opacity", "transform"].includes(y.propertyName) || I();
|
|
@@ -9805,7 +9836,7 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9805
9836
|
}
|
|
9806
9837
|
function X(y) {
|
|
9807
9838
|
if (s)
|
|
9808
|
-
|
|
9839
|
+
q();
|
|
9809
9840
|
else {
|
|
9810
9841
|
const A = c.current && y.detail > 0 ? "pointer" : "keyboard";
|
|
9811
9842
|
N("first", A);
|
|
@@ -9813,7 +9844,7 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9813
9844
|
G();
|
|
9814
9845
|
}
|
|
9815
9846
|
function Q(y) {
|
|
9816
|
-
(y.key === "Escape" || y.key === "Tab" || y.key === "Enter" || y.key === " ") && d("keyboard"), y.key === "Tab" ? (y.preventDefault(), un(x.current, y.shiftKey),
|
|
9847
|
+
(y.key === "Escape" || y.key === "Tab" || y.key === "Enter" || y.key === " ") && d("keyboard"), y.key === "Tab" ? (y.preventDefault(), un(x.current, y.shiftKey), q(!1)) : y.key === "Escape" ? D(y) : k(y);
|
|
9817
9848
|
}
|
|
9818
9849
|
return /* @__PURE__ */ w("div", { className: "menu", children: [
|
|
9819
9850
|
/* @__PURE__ */ w(
|
|
@@ -9837,7 +9868,7 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9837
9868
|
onKeyDown: $,
|
|
9838
9869
|
children: [
|
|
9839
9870
|
i ?? e,
|
|
9840
|
-
r ? /* @__PURE__ */ n(
|
|
9871
|
+
r ? /* @__PURE__ */ n(Re, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null
|
|
9841
9872
|
]
|
|
9842
9873
|
}
|
|
9843
9874
|
),
|
|
@@ -9862,7 +9893,7 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9862
9893
|
if (y.type === "section")
|
|
9863
9894
|
return /* @__PURE__ */ n("div", { className: "menu__section", role: "presentation", children: y.label }, `sec-${A}`);
|
|
9864
9895
|
if (y.type === "link") {
|
|
9865
|
-
const
|
|
9896
|
+
const J = !y.disabled && !y.locked, ne = y.icon ?? (y.locked ? /* @__PURE__ */ n(gn, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null), W = y.suffix ?? (y.locked ? y.lockedReason : null);
|
|
9866
9897
|
return /* @__PURE__ */ w(
|
|
9867
9898
|
"a",
|
|
9868
9899
|
{
|
|
@@ -9871,12 +9902,12 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9871
9902
|
},
|
|
9872
9903
|
role: "menuitem",
|
|
9873
9904
|
tabIndex: -1,
|
|
9874
|
-
href:
|
|
9875
|
-
"aria-disabled":
|
|
9905
|
+
href: J ? y.href : void 0,
|
|
9906
|
+
"aria-disabled": J ? void 0 : !0,
|
|
9876
9907
|
"aria-label": y.locked ? `${y.label},${y.lockedReason}` : void 0,
|
|
9877
9908
|
className: `menu__item${y.locked ? " menu__item--locked" : ""}`,
|
|
9878
9909
|
onKeyDown: (U) => {
|
|
9879
|
-
U.key === " " && (U.preventDefault(),
|
|
9910
|
+
U.key === " " && (U.preventDefault(), J && U.currentTarget.click());
|
|
9880
9911
|
},
|
|
9881
9912
|
onClick: (U) => V(U, y),
|
|
9882
9913
|
children: [
|
|
@@ -9888,12 +9919,12 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9888
9919
|
y.label
|
|
9889
9920
|
);
|
|
9890
9921
|
}
|
|
9891
|
-
const S = !y.disabled && !y.locked,
|
|
9922
|
+
const S = !y.disabled && !y.locked, R = y.icon ?? (y.locked ? /* @__PURE__ */ n(gn, { size: 16, strokeWidth: 2, "aria-hidden": "true" }) : null), j = y.suffix ?? (y.locked ? y.lockedReason : null);
|
|
9892
9923
|
return /* @__PURE__ */ w(
|
|
9893
9924
|
"button",
|
|
9894
9925
|
{
|
|
9895
|
-
ref: (
|
|
9896
|
-
M.current[A] =
|
|
9926
|
+
ref: (J) => {
|
|
9927
|
+
M.current[A] = J;
|
|
9897
9928
|
},
|
|
9898
9929
|
type: "button",
|
|
9899
9930
|
role: "menuitem",
|
|
@@ -9903,7 +9934,7 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9903
9934
|
className: `menu__item${y.danger ? " menu__item--danger" : ""}${y.locked ? " menu__item--locked" : ""}`,
|
|
9904
9935
|
onClick: () => z(y),
|
|
9905
9936
|
children: [
|
|
9906
|
-
|
|
9937
|
+
R ? /* @__PURE__ */ n("span", { className: "menu__item-icon", children: R }) : null,
|
|
9907
9938
|
/* @__PURE__ */ n("span", { className: "menu__item-label", children: y.label }),
|
|
9908
9939
|
j ? /* @__PURE__ */ n("span", { className: "menu__item-suffix", children: j }) : null
|
|
9909
9940
|
]
|
|
@@ -9916,7 +9947,7 @@ function Tc({ label: e, entries: t, withChevron: r, align: o = "start", triggerC
|
|
|
9916
9947
|
) : null
|
|
9917
9948
|
] });
|
|
9918
9949
|
}
|
|
9919
|
-
function
|
|
9950
|
+
function Rc({ options: e, defaultSelected: t = [], placeholder: r, onChange: o }) {
|
|
9920
9951
|
const i = fe(), s = `${i}-listbox`, a = `${i}-summary`, [l, u] = H(!1), [p, d] = H(t), [f, _] = H(-1), [x, g] = H(), c = T(null), b = T(null), m = T(null), { portalPopup: v } = Xe(l, b, m, () => u(!1)), D = T(null), I = T([]), h = T(void 0), C = T(!1);
|
|
9921
9952
|
function M(F) {
|
|
9922
9953
|
d(F), o?.(F);
|
|
@@ -9931,7 +9962,7 @@ function Sc({ options: e, defaultSelected: t = [], placeholder: r, onChange: o }
|
|
|
9931
9962
|
function N() {
|
|
9932
9963
|
g(void 0);
|
|
9933
9964
|
}
|
|
9934
|
-
function
|
|
9965
|
+
function q(F) {
|
|
9935
9966
|
g((O) => O === F ? void 0 : O);
|
|
9936
9967
|
}
|
|
9937
9968
|
function P(F) {
|
|
@@ -10010,8 +10041,8 @@ function Sc({ options: e, defaultSelected: t = [], placeholder: r, onChange: o }
|
|
|
10010
10041
|
else {
|
|
10011
10042
|
const A = b.current, S = Array.from(A?.ownerDocument.querySelectorAll(
|
|
10012
10043
|
'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
10013
|
-
) ?? []).filter((j) => !m.current?.contains(j) && !j.closest("[inert], [hidden]") && j.tabIndex >= 0 && j.getClientRects().length > 0),
|
|
10014
|
-
V(!1),
|
|
10044
|
+
) ?? []).filter((j) => !m.current?.contains(j) && !j.closest("[inert], [hidden]") && j.tabIndex >= 0 && j.getClientRects().length > 0), R = S[S.indexOf(A) + 1];
|
|
10045
|
+
V(!1), R?.focus();
|
|
10015
10046
|
}
|
|
10016
10047
|
return;
|
|
10017
10048
|
}
|
|
@@ -10039,7 +10070,7 @@ function Sc({ options: e, defaultSelected: t = [], placeholder: r, onChange: o }
|
|
|
10039
10070
|
onClick: () => l ? V() : z(),
|
|
10040
10071
|
children: [
|
|
10041
10072
|
/* @__PURE__ */ n("span", { className: p.length === 0 ? "multi-select__placeholder" : void 0, children: Y }),
|
|
10042
|
-
/* @__PURE__ */ n(
|
|
10073
|
+
/* @__PURE__ */ n(Re, { size: 16, strokeWidth: 2, "aria-hidden": "true" })
|
|
10043
10074
|
]
|
|
10044
10075
|
}
|
|
10045
10076
|
),
|
|
@@ -10096,11 +10127,11 @@ function Sc({ options: e, defaultSelected: t = [], placeholder: r, onChange: o }
|
|
|
10096
10127
|
onPointerDown: (Q) => {
|
|
10097
10128
|
Q.isPrimary && Q.button === 0 && g(O);
|
|
10098
10129
|
},
|
|
10099
|
-
onPointerUp: () =>
|
|
10100
|
-
onPointerCancel: () =>
|
|
10101
|
-
onPointerLeave: () =>
|
|
10102
|
-
onLostPointerCapture: () =>
|
|
10103
|
-
onBlur: () =>
|
|
10130
|
+
onPointerUp: () => q(O),
|
|
10131
|
+
onPointerCancel: () => q(O),
|
|
10132
|
+
onPointerLeave: () => q(O),
|
|
10133
|
+
onLostPointerCapture: () => q(O),
|
|
10134
|
+
onBlur: () => q(O),
|
|
10104
10135
|
onClick: () => E(F),
|
|
10105
10136
|
children: [
|
|
10106
10137
|
/* @__PURE__ */ n("span", { className: `multi-select__check${X ? " multi-select__check--on" : ""}`, "aria-hidden": "true", children: X ? /* @__PURE__ */ n(De, { size: 12, strokeWidth: 3 }) : null }),
|
|
@@ -10117,7 +10148,7 @@ function Sc({ options: e, defaultSelected: t = [], placeholder: r, onChange: o }
|
|
|
10117
10148
|
) : null
|
|
10118
10149
|
] });
|
|
10119
10150
|
}
|
|
10120
|
-
function
|
|
10151
|
+
function Xa(e) {
|
|
10121
10152
|
if (e.dismissal === void 0) {
|
|
10122
10153
|
if (typeof e.onClose != "function")
|
|
10123
10154
|
throw new TypeError("Modal: legacy dismissal requires an onClose function.");
|
|
@@ -10128,8 +10159,8 @@ function ja(e) {
|
|
|
10128
10159
|
if (e.dismissal.type !== "escape-action" || typeof e.dismissal.busy != "boolean" || typeof e.dismissal.runAction != "function")
|
|
10129
10160
|
throw new TypeError("Modal: invalid escape-action dismissal contract.");
|
|
10130
10161
|
}
|
|
10131
|
-
function
|
|
10132
|
-
|
|
10162
|
+
function $c(e) {
|
|
10163
|
+
Xa(e);
|
|
10133
10164
|
const { open: t, title: r, children: o, footer: i, initialFocusRef: s, sticky: a = !1 } = e, l = e.dismissal, u = l === void 0 ? e.dismissable ?? !0 : !1, p = T(null), d = fe(), { focusInitialIfTopMost: f, onKeyDown: _, portal: x } = Be({
|
|
10134
10165
|
open: t,
|
|
10135
10166
|
blocking: !0,
|
|
@@ -10176,11 +10207,11 @@ function Rc(e) {
|
|
|
10176
10207
|
] })
|
|
10177
10208
|
) : null;
|
|
10178
10209
|
}
|
|
10179
|
-
function
|
|
10210
|
+
function Lc({ children: e }) {
|
|
10180
10211
|
return /* @__PURE__ */ n("div", { className: "modal__inset", children: e });
|
|
10181
10212
|
}
|
|
10182
|
-
const gt = 100,
|
|
10183
|
-
function
|
|
10213
|
+
const gt = 100, Ze = 32;
|
|
10214
|
+
function Ac({ data: e, summary: t, axisLabels: r = "ends-and-middle", height: o = 64, className: i }) {
|
|
10184
10215
|
const s = typeof t == "string" && !!t.trim(), a = typeof o == "number" && Number.isFinite(o) && o > 0, l = Array.isArray(e) && e.every(
|
|
10185
10216
|
(k) => k !== null && typeof k == "object" && typeof k.label == "string" && Number.isFinite(k.value)
|
|
10186
10217
|
), u = !s || !a || !l, p = u ? [] : e.map((k) => k.value), d = p.length;
|
|
@@ -10188,12 +10219,12 @@ function $c({ data: e, summary: t, axisLabels: r = "ends-and-middle", height: o
|
|
|
10188
10219
|
for (const k of p)
|
|
10189
10220
|
f = Math.min(f, k), _ = Math.max(_, k), x = Math.max(x, Math.abs(k));
|
|
10190
10221
|
const g = x || 1, c = f / g, m = _ / g - c, v = (k) => {
|
|
10191
|
-
if (m === 0) return
|
|
10222
|
+
if (m === 0) return Ze;
|
|
10192
10223
|
const N = (k / g - c) / m;
|
|
10193
|
-
return
|
|
10224
|
+
return Ze - N * Ze;
|
|
10194
10225
|
}, D = p.map((k, N) => {
|
|
10195
|
-
const
|
|
10196
|
-
return `${
|
|
10226
|
+
const q = d === 1 ? gt / 2 : N / (d - 1) * gt, P = v(k);
|
|
10227
|
+
return `${q.toFixed(2)},${P.toFixed(2)}`;
|
|
10197
10228
|
}).join(" "), I = Math.floor(d / 2), h = d > 1 ? I / (d - 1) * 100 : 50, C = r === "ends-and-middle" && d >= 3, M = d === 0 ? [] : d === 1 ? [{ label: e[0].label, slot: "single", left: 50, maxWidth: 100 }] : [
|
|
10198
10229
|
{ label: e[0]?.label ?? "", slot: "start", left: 0, maxWidth: C ? h / 2 : 50 },
|
|
10199
10230
|
...C ? [{
|
|
@@ -10215,7 +10246,7 @@ function $c({ data: e, summary: t, axisLabels: r = "ends-and-middle", height: o
|
|
|
10215
10246
|
"svg",
|
|
10216
10247
|
{
|
|
10217
10248
|
className: "q1-chart__canvas",
|
|
10218
|
-
viewBox: `0 0 ${gt} ${
|
|
10249
|
+
viewBox: `0 0 ${gt} ${Ze}`,
|
|
10219
10250
|
preserveAspectRatio: "none",
|
|
10220
10251
|
"aria-hidden": "true",
|
|
10221
10252
|
children: [
|
|
@@ -10228,18 +10259,18 @@ function $c({ data: e, summary: t, axisLabels: r = "ends-and-middle", height: o
|
|
|
10228
10259
|
"span",
|
|
10229
10260
|
{
|
|
10230
10261
|
className: "q1-chart__point",
|
|
10231
|
-
style: { left: "50%", top: `${v(p[0]) /
|
|
10262
|
+
style: { left: "50%", top: `${v(p[0]) / Ze * 100}%` },
|
|
10232
10263
|
"aria-hidden": "true"
|
|
10233
10264
|
}
|
|
10234
10265
|
) : null
|
|
10235
10266
|
] }) }),
|
|
10236
10267
|
!u && r && d > 0 ? (
|
|
10237
10268
|
// 轴标签对读屏隐藏:摘要已经交代了范围与总量,再念一遍日期是重复噪音。
|
|
10238
|
-
/* @__PURE__ */ n("div", { className: "q1-chart__axis", "aria-hidden": "true", children: M.map(({ label: k, slot: N, left:
|
|
10269
|
+
/* @__PURE__ */ n("div", { className: "q1-chart__axis", "aria-hidden": "true", children: M.map(({ label: k, slot: N, left: q, maxWidth: P }) => /* @__PURE__ */ n(
|
|
10239
10270
|
"span",
|
|
10240
10271
|
{
|
|
10241
10272
|
className: `q1-chart__axis-label q1-chart__axis-label--${N}`,
|
|
10242
|
-
style: { left: `${
|
|
10273
|
+
style: { left: `${q.toFixed(2).replace(/\.00$/, "")}%`, maxWidth: `${P.toFixed(2).replace(/\.00$/, "")}%` },
|
|
10243
10274
|
title: k,
|
|
10244
10275
|
children: k
|
|
10245
10276
|
},
|
|
@@ -10250,7 +10281,7 @@ function $c({ data: e, summary: t, axisLabels: r = "ends-and-middle", height: o
|
|
|
10250
10281
|
}
|
|
10251
10282
|
);
|
|
10252
10283
|
}
|
|
10253
|
-
const
|
|
10284
|
+
const Ga = ["日", "一", "二", "三", "四", "五", "六"];
|
|
10254
10285
|
function he(e) {
|
|
10255
10286
|
const t = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0");
|
|
10256
10287
|
return `${e.getFullYear()}-${t}-${r}`;
|
|
@@ -10268,10 +10299,10 @@ function tt(e) {
|
|
|
10268
10299
|
function Ke(e, t) {
|
|
10269
10300
|
return !!(e && t && he(e) === he(t));
|
|
10270
10301
|
}
|
|
10271
|
-
function
|
|
10302
|
+
function Za(e, t) {
|
|
10272
10303
|
return Math.round((t.getTime() - e.getTime()) / 864e5) + 1;
|
|
10273
10304
|
}
|
|
10274
|
-
function
|
|
10305
|
+
function Qa(e) {
|
|
10275
10306
|
const t = tt(e), r = Le(t, -t.getDay());
|
|
10276
10307
|
return Array.from({ length: 42 }, (o, i) => {
|
|
10277
10308
|
const s = Le(r, i);
|
|
@@ -10289,9 +10320,9 @@ function Un(e, t, r) {
|
|
|
10289
10320
|
return (!t || he(i) >= he(t)) && (!r || he(o) <= he(r));
|
|
10290
10321
|
}
|
|
10291
10322
|
function Ja(e) {
|
|
10292
|
-
return `${e.getFullYear()}年${e.getMonth() + 1}月${e.getDate()}日星期${
|
|
10323
|
+
return `${e.getFullYear()}年${e.getMonth() + 1}月${e.getDate()}日星期${Ga[e.getDay()]}`;
|
|
10293
10324
|
}
|
|
10294
|
-
function
|
|
10325
|
+
function Fc({
|
|
10295
10326
|
presets: e,
|
|
10296
10327
|
activeLabel: t,
|
|
10297
10328
|
onPick: r
|
|
@@ -10359,7 +10390,7 @@ function Lc({
|
|
|
10359
10390
|
children: [
|
|
10360
10391
|
/* @__PURE__ */ n(Hr, { size: 15, strokeWidth: 2, "aria-hidden": "true" }),
|
|
10361
10392
|
/* @__PURE__ */ n("span", { className: "cal-period__label", children: t ?? "选择周期" }),
|
|
10362
|
-
/* @__PURE__ */ n(
|
|
10393
|
+
/* @__PURE__ */ n(Re, { size: 15, strokeWidth: 2, "aria-hidden": "true" })
|
|
10363
10394
|
]
|
|
10364
10395
|
}
|
|
10365
10396
|
),
|
|
@@ -10399,7 +10430,7 @@ function Lc({
|
|
|
10399
10430
|
}
|
|
10400
10431
|
);
|
|
10401
10432
|
}
|
|
10402
|
-
function
|
|
10433
|
+
function es({
|
|
10403
10434
|
open: e,
|
|
10404
10435
|
popoverRef: t,
|
|
10405
10436
|
triggerRef: r
|
|
@@ -10431,8 +10462,8 @@ function Qa({
|
|
|
10431
10462
|
};
|
|
10432
10463
|
}, [e, t, r]);
|
|
10433
10464
|
}
|
|
10434
|
-
const
|
|
10435
|
-
function
|
|
10465
|
+
const ts = ["日", "一", "二", "三", "四", "五", "六"];
|
|
10466
|
+
function ns({
|
|
10436
10467
|
value: e,
|
|
10437
10468
|
onChange: t,
|
|
10438
10469
|
size: r = "large",
|
|
@@ -10442,7 +10473,7 @@ function es({
|
|
|
10442
10473
|
}) {
|
|
10443
10474
|
const [a, l] = H(
|
|
10444
10475
|
() => tt(jt(e.start ?? s, o, i))
|
|
10445
|
-
), [u, p] = H(null), [d, f] = H(() => jt(e.start ?? s, o, i)), [_, x] = H(""), g = T(/* @__PURE__ */ new Map()), c = T(null), b =
|
|
10476
|
+
), [u, p] = H(null), [d, f] = H(() => jt(e.start ?? s, o, i)), [_, x] = H(""), g = T(/* @__PURE__ */ new Map()), c = T(null), b = Qa(a);
|
|
10446
10477
|
te(() => {
|
|
10447
10478
|
if (!c.current) return;
|
|
10448
10479
|
const k = g.current.get(c.current);
|
|
@@ -10454,8 +10485,8 @@ function es({
|
|
|
10454
10485
|
t({ start: k, end: null }), x(`开始日期 ${he(k)},请选择结束日期`);
|
|
10455
10486
|
return;
|
|
10456
10487
|
}
|
|
10457
|
-
const [N,
|
|
10458
|
-
t({ start: N, end:
|
|
10488
|
+
const [N, q] = he(k) < he(e.start) ? [k, e.start] : [e.start, k];
|
|
10489
|
+
t({ start: N, end: q }), x(`已选择 ${he(N)} 至 ${he(q)},共 ${Za(N, q)} 天`);
|
|
10459
10490
|
}
|
|
10460
10491
|
function D(k) {
|
|
10461
10492
|
Ut(k, o, i) || ((k.getMonth() !== a.getMonth() || k.getFullYear() !== a.getFullYear()) && l(tt(k)), f(k), c.current = he(k));
|
|
@@ -10538,9 +10569,9 @@ function es({
|
|
|
10538
10569
|
"aria-multiselectable": "true",
|
|
10539
10570
|
onKeyDown: I,
|
|
10540
10571
|
children: [
|
|
10541
|
-
/* @__PURE__ */ n("div", { className: "calendar__weekdays", role: "row", children:
|
|
10542
|
-
E.map((k, N) => /* @__PURE__ */ n("div", { className: "calendar__row", role: "row", children: k.map(({ date:
|
|
10543
|
-
const z = !P || Ut(
|
|
10572
|
+
/* @__PURE__ */ n("div", { className: "calendar__weekdays", role: "row", children: ts.map((k, N) => /* @__PURE__ */ n("span", { className: "calendar__weekday", role: "columnheader", "aria-label": `星期${k}`, children: k }, `${k}-${N}`)) }),
|
|
10573
|
+
E.map((k, N) => /* @__PURE__ */ n("div", { className: "calendar__row", role: "row", children: k.map(({ date: q, inMonth: P }) => {
|
|
10574
|
+
const z = !P || Ut(q, o, i), V = Ke(q, m.start), B = Ke(q, m.end), $ = !!m.start && !!m.end && !Ke(m.start, m.end), Y = $ && he(q) > he(m.start) && he(q) < he(m.end), G = !!(e.start && (e.end ? he(q) >= he(e.start) && he(q) <= he(e.end) : Ke(q, e.start))), F = ie(
|
|
10544
10575
|
"calendar__cell",
|
|
10545
10576
|
Y ? "calendar__cell--in-range" : "",
|
|
10546
10577
|
$ && V ? "calendar__cell--range-start" : "",
|
|
@@ -10550,7 +10581,7 @@ function es({
|
|
|
10550
10581
|
P ? "" : "calendar__day--outside",
|
|
10551
10582
|
V && m.start ? "calendar__day--start" : "",
|
|
10552
10583
|
B && $ ? "calendar__day--end" : "",
|
|
10553
|
-
P && !z && Ke(
|
|
10584
|
+
P && !z && Ke(q, s) ? "calendar__day--today" : ""
|
|
10554
10585
|
);
|
|
10555
10586
|
return /* @__PURE__ */ n(
|
|
10556
10587
|
"div",
|
|
@@ -10564,22 +10595,22 @@ function es({
|
|
|
10564
10595
|
{
|
|
10565
10596
|
type: "button",
|
|
10566
10597
|
ref: (X) => {
|
|
10567
|
-
X ? g.current.set(he(
|
|
10598
|
+
X ? g.current.set(he(q), X) : g.current.delete(he(q));
|
|
10568
10599
|
},
|
|
10569
10600
|
className: O,
|
|
10570
|
-
tabIndex: P && !z && Ke(
|
|
10601
|
+
tabIndex: P && !z && Ke(q, d) ? 0 : -1,
|
|
10571
10602
|
disabled: z,
|
|
10572
|
-
"aria-label": Ja(
|
|
10573
|
-
"aria-current": P && Ke(
|
|
10574
|
-
onClick: () => !z && v(
|
|
10575
|
-
onMouseEnter: () => p(
|
|
10603
|
+
"aria-label": Ja(q),
|
|
10604
|
+
"aria-current": P && Ke(q, s) ? "date" : void 0,
|
|
10605
|
+
onClick: () => !z && v(q),
|
|
10606
|
+
onMouseEnter: () => p(q),
|
|
10576
10607
|
onMouseLeave: () => p(null),
|
|
10577
|
-
onFocus: () => f(
|
|
10578
|
-
children:
|
|
10608
|
+
onFocus: () => f(q),
|
|
10609
|
+
children: q.getDate()
|
|
10579
10610
|
}
|
|
10580
10611
|
)
|
|
10581
10612
|
},
|
|
10582
|
-
he(
|
|
10613
|
+
he(q)
|
|
10583
10614
|
);
|
|
10584
10615
|
}) }, N))
|
|
10585
10616
|
]
|
|
@@ -10588,7 +10619,7 @@ function es({
|
|
|
10588
10619
|
/* @__PURE__ */ n("span", { className: "q1-sr-only", "aria-live": "polite", children: _ })
|
|
10589
10620
|
] });
|
|
10590
10621
|
}
|
|
10591
|
-
function
|
|
10622
|
+
function rs({
|
|
10592
10623
|
value: e,
|
|
10593
10624
|
onApply: t,
|
|
10594
10625
|
pinnedTimezone: r
|
|
@@ -10618,7 +10649,7 @@ function ts({
|
|
|
10618
10649
|
/* @__PURE__ */ n("span", { className: ie("cal-inputs__tz", r && "cal-inputs__tz--pinned"), children: r ? `${r}(只读)` : "本地时区(只读)" })
|
|
10619
10650
|
] });
|
|
10620
10651
|
}
|
|
10621
|
-
function
|
|
10652
|
+
function Oc({
|
|
10622
10653
|
layout: e = "vertical",
|
|
10623
10654
|
trigger: t = "default",
|
|
10624
10655
|
size: r = "large",
|
|
@@ -10632,7 +10663,7 @@ function Ac({
|
|
|
10632
10663
|
const [p, d] = H(!1), [f, _] = H(l), [x, g] = H("keyboard"), c = T(null), b = T(null), m = T(null), v = T(null), D = T(!1), I = fe();
|
|
10633
10664
|
te(() => {
|
|
10634
10665
|
p || _(l);
|
|
10635
|
-
}, [p, l]),
|
|
10666
|
+
}, [p, l]), es({
|
|
10636
10667
|
open: p,
|
|
10637
10668
|
popoverRef: v,
|
|
10638
10669
|
triggerRef: m.current ? m : b
|
|
@@ -10669,15 +10700,15 @@ function Ac({
|
|
|
10669
10700
|
}, [p]);
|
|
10670
10701
|
const h = !!l.start && !!l.end, C = h ? `${he(l.start)} ~ ${he(l.end)}` : "选择日期区间";
|
|
10671
10702
|
function M(k) {
|
|
10672
|
-
const N = k.currentTarget,
|
|
10703
|
+
const N = k.currentTarget, q = D.current && k.detail !== 0;
|
|
10673
10704
|
if (D.current = !1, p) {
|
|
10674
10705
|
d(!1);
|
|
10675
10706
|
return;
|
|
10676
10707
|
}
|
|
10677
|
-
m.current = N, _(l), g(
|
|
10708
|
+
m.current = N, _(l), g(q ? "pointer" : "keyboard"), d(!0);
|
|
10678
10709
|
}
|
|
10679
|
-
const L = /* @__PURE__ */ n(
|
|
10680
|
-
|
|
10710
|
+
const L = /* @__PURE__ */ n(ns, { value: f, onChange: _, size: r, minValue: o, maxValue: i, today: a }), E = /* @__PURE__ */ n(
|
|
10711
|
+
rs,
|
|
10681
10712
|
{
|
|
10682
10713
|
value: f,
|
|
10683
10714
|
withTime: e === "vertical",
|
|
@@ -10741,7 +10772,7 @@ function Ac({
|
|
|
10741
10772
|
D.current = !1;
|
|
10742
10773
|
},
|
|
10743
10774
|
onClick: M,
|
|
10744
|
-
children: /* @__PURE__ */ n(
|
|
10775
|
+
children: /* @__PURE__ */ n(Re, { size: 15, strokeWidth: 2, "aria-hidden": "true" })
|
|
10745
10776
|
}
|
|
10746
10777
|
) : h ? /* @__PURE__ */ n(
|
|
10747
10778
|
"button",
|
|
@@ -10781,116 +10812,118 @@ function Ac({
|
|
|
10781
10812
|
] });
|
|
10782
10813
|
}
|
|
10783
10814
|
export {
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10815
|
+
Ys as AuthCard,
|
|
10816
|
+
fa as Avatar,
|
|
10817
|
+
ac as AvatarGroup,
|
|
10818
|
+
Hs as Badge,
|
|
10819
|
+
js as Banner,
|
|
10820
|
+
rc as Book,
|
|
10821
|
+
ja as Breadcrumb,
|
|
10822
|
+
oc as Browser,
|
|
10823
|
+
la as BrowserAddress,
|
|
10824
|
+
sa as BrowserControls,
|
|
10825
|
+
aa as BrowserDots,
|
|
10826
|
+
ic as BrowserPlaceholder,
|
|
10827
|
+
ua as BrowserTabs,
|
|
10797
10828
|
ot as Button,
|
|
10798
10829
|
Eo as ButtonLink,
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10830
|
+
ns as CalendarGrid,
|
|
10831
|
+
ki as Card,
|
|
10832
|
+
Ac as Chart,
|
|
10833
|
+
bs as Checkbox,
|
|
10834
|
+
ys as Choicebox,
|
|
10804
10835
|
lr as ClearButton,
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10836
|
+
fs as ClearableInput,
|
|
10837
|
+
ks as Code,
|
|
10838
|
+
Ps as CodeBlock,
|
|
10839
|
+
xs as CodeInline,
|
|
10809
10840
|
yr as CodeTokens,
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10841
|
+
Ds as Collapse,
|
|
10842
|
+
Is as CollapseGroup,
|
|
10843
|
+
Ec as CollapsibleBreadcrumb,
|
|
10844
|
+
ws as Combobox,
|
|
10845
|
+
Ms as CommandMenu,
|
|
10846
|
+
nc as ContextCard,
|
|
10847
|
+
Ws as ContextMenu,
|
|
10848
|
+
ec as ContextSwitcher,
|
|
10818
10849
|
hr as ControlOption,
|
|
10819
10850
|
Do as CopyButton,
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10851
|
+
tc as Description,
|
|
10852
|
+
Ts as DestructiveActionModal,
|
|
10853
|
+
gc as DocsPagination,
|
|
10854
|
+
zs as DotsMenu,
|
|
10855
|
+
Ss as Drawer,
|
|
10856
|
+
qs as EmptyState,
|
|
10857
|
+
Rs as Entity,
|
|
10858
|
+
Ls as ErrorCard,
|
|
10859
|
+
$s as ErrorMessage,
|
|
10860
|
+
As as Feedback,
|
|
10861
|
+
Fs as Fieldset,
|
|
10862
|
+
Os as FileTree,
|
|
10863
|
+
qt as FormField,
|
|
10864
|
+
mc as Gauge,
|
|
10834
10865
|
Lo as IconButton,
|
|
10835
10866
|
Ao as Input,
|
|
10836
|
-
|
|
10867
|
+
kc as JsonView,
|
|
10837
10868
|
vn as Kbd,
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10869
|
+
Ks as Label,
|
|
10870
|
+
ls as Link,
|
|
10871
|
+
vc as LoadMoreButton,
|
|
10872
|
+
cc as LoadingDots,
|
|
10873
|
+
qc as Menu,
|
|
10874
|
+
lc as MiddleTruncate,
|
|
10875
|
+
$c as Modal,
|
|
10876
|
+
Lc as ModalInset,
|
|
10877
|
+
Rc as MultiSelect,
|
|
10878
|
+
Gs as Navigation,
|
|
10848
10879
|
Js as NavigationGroup,
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10880
|
+
Qs as NavigationItem,
|
|
10881
|
+
Zs as NavigationSection,
|
|
10882
|
+
bc as Note,
|
|
10883
|
+
_c as Pagination,
|
|
10884
|
+
Fc as PeriodCombobox,
|
|
10885
|
+
uc as Phone,
|
|
10886
|
+
Us as Pill,
|
|
10887
|
+
Bs as ProductLockup,
|
|
10888
|
+
hc as Progress,
|
|
10889
|
+
dc as ProjectBanner,
|
|
10890
|
+
hi as Q1travelSymbol,
|
|
10891
|
+
gs as Radio,
|
|
10892
|
+
Oc as RangeField,
|
|
10893
|
+
rs as RangeInputs,
|
|
10894
|
+
Mc as RangeSlider,
|
|
10895
|
+
Nc as RelativeTimeCard,
|
|
10896
|
+
Cc as Scroller,
|
|
10897
|
+
Ic as ScrollerWithButtons,
|
|
10898
|
+
Es as SearchDialog,
|
|
10899
|
+
ps as SearchInput,
|
|
10900
|
+
hs as Select,
|
|
10901
|
+
mi as Separator,
|
|
10902
|
+
Tc as Sheet,
|
|
10903
|
+
wc as ShowMore,
|
|
10871
10904
|
dt as Sidebar,
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10905
|
+
Xs as SidebarDrawer,
|
|
10906
|
+
sc as Skeleton,
|
|
10907
|
+
Dc as Slider,
|
|
10908
|
+
pc as Snippet,
|
|
10909
|
+
Ia as Spinner,
|
|
10910
|
+
Sc as SplitButton,
|
|
10911
|
+
Vs as StatusDot,
|
|
10912
|
+
vs as Switch,
|
|
10913
|
+
yc as Table,
|
|
10914
|
+
Cs as Tabs,
|
|
10915
|
+
fc as TextWithCopyButton,
|
|
10916
|
+
ms as Textarea,
|
|
10917
|
+
Pc as ThemeSwitcher,
|
|
10918
|
+
cs as ToastProvider,
|
|
10919
|
+
Ns as Toggle,
|
|
10920
|
+
us as Toolbar,
|
|
10888
10921
|
_r as Tooltip,
|
|
10889
|
-
|
|
10890
|
-
|
|
10922
|
+
ds as VerificationCodeInput,
|
|
10923
|
+
xc as Video,
|
|
10891
10924
|
Le as addDays,
|
|
10892
|
-
|
|
10925
|
+
ss as getOverlayCoordinator,
|
|
10893
10926
|
cn as useCopy,
|
|
10894
|
-
|
|
10927
|
+
_s as useRadio,
|
|
10895
10928
|
No as useToast
|
|
10896
10929
|
};
|