vxui-react 1.3.1 → 1.3.3
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/README.en.md +30 -1
- package/README.md +30 -1
- package/dist/index.cjs +11 -11
- package/dist/index.js +241 -237
- package/dist/src/components/Dialog.d.ts +3 -1
- package/dist/vxui-react.css +1 -1
- package/llms.txt +303 -0
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as a, Fragment as J, jsxs as N } from "react/jsx-runtime";
|
|
2
2
|
import * as y from "react";
|
|
3
|
-
import pe, { useState as
|
|
3
|
+
import pe, { useState as I, useEffect as U, useContext as _e, createContext as we, forwardRef as de, createElement as mt, useRef as B, useMemo as Se, useId as gn, useLayoutEffect as xe, useCallback as Y } from "react";
|
|
4
4
|
import * as bn from "react-dom";
|
|
5
5
|
import jr, { createPortal as Te } from "react-dom";
|
|
6
6
|
const Kr = 767, Vr = 1023;
|
|
7
|
-
function
|
|
7
|
+
function Ht() {
|
|
8
8
|
if (typeof window > "u") return "desktop";
|
|
9
9
|
const e = window.innerWidth;
|
|
10
10
|
return e <= Kr ? "phone" : e <= Vr ? "tablet" : "desktop";
|
|
@@ -16,16 +16,16 @@ const xn = we({
|
|
|
16
16
|
isTabletPortrait: !1,
|
|
17
17
|
isDesktop: !0
|
|
18
18
|
});
|
|
19
|
-
function
|
|
19
|
+
function Wt() {
|
|
20
20
|
return typeof window > "u" ? !1 : window.innerHeight > window.innerWidth;
|
|
21
21
|
}
|
|
22
22
|
function ji({ children: e }) {
|
|
23
|
-
const [t, n] =
|
|
23
|
+
const [t, n] = I(Ht), [r, o] = I(Wt);
|
|
24
24
|
U(() => {
|
|
25
25
|
const i = () => {
|
|
26
|
-
const d =
|
|
26
|
+
const d = Ht();
|
|
27
27
|
n((u) => u === d ? u : d);
|
|
28
|
-
const c =
|
|
28
|
+
const c = Wt();
|
|
29
29
|
o((u) => u === c ? u : c);
|
|
30
30
|
};
|
|
31
31
|
return window.addEventListener("resize", i, { passive: !0 }), () => window.removeEventListener("resize", i);
|
|
@@ -451,7 +451,7 @@ function Sa({ title: e, children: t }) {
|
|
|
451
451
|
] });
|
|
452
452
|
}
|
|
453
453
|
function Ea({ label: e, icon: t, badge: n, trailing: r, active: o, onSelect: s, children: l, defaultOpen: i = !1 }) {
|
|
454
|
-
const [d, c] =
|
|
454
|
+
const [d, c] = I(i), [u, v] = I(!1), [x, k] = I({ top: 0, left: 0 }), S = B(null), g = B(void 0), h = _e(ht), _ = !!l;
|
|
455
455
|
U(() => () => {
|
|
456
456
|
g.current !== void 0 && clearTimeout(g.current);
|
|
457
457
|
}, []);
|
|
@@ -602,13 +602,13 @@ function Vi({
|
|
|
602
602
|
}) {
|
|
603
603
|
const E = d ?? (i ? [{ items: i }] : []);
|
|
604
604
|
function A(C) {
|
|
605
|
-
const { key: R, onSelect: P, children: L, defaultOpen: z, ...
|
|
605
|
+
const { key: R, onSelect: P, children: L, defaultOpen: z, ...F } = C, j = (L == null ? void 0 : L.some((K) => K.active)) ?? !1;
|
|
606
606
|
return /* @__PURE__ */ a(
|
|
607
607
|
Ea,
|
|
608
608
|
{
|
|
609
609
|
onSelect: P,
|
|
610
610
|
defaultOpen: z ?? (L ? j : void 0),
|
|
611
|
-
...
|
|
611
|
+
...F,
|
|
612
612
|
children: L == null ? void 0 : L.map(A)
|
|
613
613
|
},
|
|
614
614
|
R
|
|
@@ -775,14 +775,14 @@ function Da(...e) {
|
|
|
775
775
|
}
|
|
776
776
|
var ve = globalThis != null && globalThis.document ? y.useLayoutEffect : () => {
|
|
777
777
|
}, La = y[" useId ".trim().toString()] || (() => {
|
|
778
|
-
}),
|
|
778
|
+
}), Ia = 0;
|
|
779
779
|
function Ee(e) {
|
|
780
780
|
const [t, n] = y.useState(La());
|
|
781
781
|
return ve(() => {
|
|
782
|
-
n((r) => r ?? String(
|
|
782
|
+
n((r) => r ?? String(Ia++));
|
|
783
783
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
784
784
|
}
|
|
785
|
-
var
|
|
785
|
+
var Fa = y[" useInsertionEffect ".trim().toString()] || ve;
|
|
786
786
|
function Re({
|
|
787
787
|
prop: e,
|
|
788
788
|
defaultProp: t,
|
|
@@ -821,7 +821,7 @@ function Ma({
|
|
|
821
821
|
onChange: t
|
|
822
822
|
}) {
|
|
823
823
|
const [n, r] = y.useState(e), o = y.useRef(n), s = y.useRef(t);
|
|
824
|
-
return
|
|
824
|
+
return Fa(() => {
|
|
825
825
|
s.current = t;
|
|
826
826
|
}, [t]), y.useEffect(() => {
|
|
827
827
|
var l;
|
|
@@ -848,7 +848,7 @@ function $a(e) {
|
|
|
848
848
|
const t = y.forwardRef((n, r) => {
|
|
849
849
|
const { children: o, ...s } = n;
|
|
850
850
|
if (y.isValidElement(o)) {
|
|
851
|
-
const l =
|
|
851
|
+
const l = Ha(o), i = Ua(s, o.props);
|
|
852
852
|
return o.type !== y.Fragment && (i.ref = r ? Sn(r, l) : l), y.cloneElement(o, i);
|
|
853
853
|
}
|
|
854
854
|
return y.Children.count(o) > 1 ? y.Children.only(null) : null;
|
|
@@ -870,12 +870,12 @@ function Ua(e, t) {
|
|
|
870
870
|
}
|
|
871
871
|
return { ...e, ...n };
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Ha(e) {
|
|
874
874
|
var r, o;
|
|
875
875
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
876
876
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
877
877
|
}
|
|
878
|
-
var
|
|
878
|
+
var Wa = [
|
|
879
879
|
"a",
|
|
880
880
|
"button",
|
|
881
881
|
"div",
|
|
@@ -893,7 +893,7 @@ var Ha = [
|
|
|
893
893
|
"span",
|
|
894
894
|
"svg",
|
|
895
895
|
"ul"
|
|
896
|
-
], q =
|
|
896
|
+
], q = Wa.reduce((e, t) => {
|
|
897
897
|
const n = /* @__PURE__ */ je(`Primitive.${t}`), r = y.forwardRef((o, s) => {
|
|
898
898
|
const { asChild: l, ...i } = o, d = l ? n : t;
|
|
899
899
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ a(d, { ...i, ref: s });
|
|
@@ -1197,19 +1197,19 @@ function lo(e) {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
});
|
|
1199
1199
|
return y.useEffect(() => {
|
|
1200
|
-
const c =
|
|
1200
|
+
const c = Fe(r.current);
|
|
1201
1201
|
s.current = i === "mounted" ? c : "none";
|
|
1202
1202
|
}, [i]), ve(() => {
|
|
1203
1203
|
const c = r.current, u = o.current;
|
|
1204
1204
|
if (u !== e) {
|
|
1205
|
-
const x = s.current, k =
|
|
1205
|
+
const x = s.current, k = Fe(c);
|
|
1206
1206
|
e ? d("MOUNT") : k === "none" || (c == null ? void 0 : c.display) === "none" ? d("UNMOUNT") : d(u && x !== k ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
1207
1207
|
}
|
|
1208
1208
|
}, [e, d]), ve(() => {
|
|
1209
1209
|
if (t) {
|
|
1210
1210
|
let c;
|
|
1211
1211
|
const u = t.ownerDocument.defaultView ?? window, v = (k) => {
|
|
1212
|
-
const g =
|
|
1212
|
+
const g = Fe(r.current).includes(CSS.escape(k.animationName));
|
|
1213
1213
|
if (k.target === t && g && (d("ANIMATION_END"), !o.current)) {
|
|
1214
1214
|
const h = t.style.animationFillMode;
|
|
1215
1215
|
t.style.animationFillMode = "forwards", c = u.setTimeout(() => {
|
|
@@ -1217,7 +1217,7 @@ function lo(e) {
|
|
|
1217
1217
|
});
|
|
1218
1218
|
}
|
|
1219
1219
|
}, x = (k) => {
|
|
1220
|
-
k.target === t && (s.current =
|
|
1220
|
+
k.target === t && (s.current = Fe(r.current));
|
|
1221
1221
|
};
|
|
1222
1222
|
return t.addEventListener("animationstart", x), t.addEventListener("animationcancel", v), t.addEventListener("animationend", v), () => {
|
|
1223
1223
|
u.clearTimeout(c), t.removeEventListener("animationstart", x), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
|
|
@@ -1231,7 +1231,7 @@ function lo(e) {
|
|
|
1231
1231
|
}, [])
|
|
1232
1232
|
};
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function Fe(e) {
|
|
1235
1235
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
1236
1236
|
}
|
|
1237
1237
|
function co(e) {
|
|
@@ -1274,12 +1274,12 @@ function po(e, t, n) {
|
|
|
1274
1274
|
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
|
|
1275
1275
|
return e.concat(s || Array.prototype.slice.call(t));
|
|
1276
1276
|
}
|
|
1277
|
-
var
|
|
1277
|
+
var We = "right-scroll-bar-position", Ge = "width-before-scroll-bar", vo = "with-scroll-bars-hidden", fo = "--removed-body-scroll-bar-size";
|
|
1278
1278
|
function st(e, t) {
|
|
1279
1279
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
1280
1280
|
}
|
|
1281
1281
|
function mo(e, t) {
|
|
1282
|
-
var n =
|
|
1282
|
+
var n = I(function() {
|
|
1283
1283
|
return {
|
|
1284
1284
|
// value
|
|
1285
1285
|
value: e,
|
|
@@ -1395,7 +1395,7 @@ Ln.isSideCarExport = !0;
|
|
|
1395
1395
|
function _o(e, t) {
|
|
1396
1396
|
return e.useMedium(t), Ln;
|
|
1397
1397
|
}
|
|
1398
|
-
var
|
|
1398
|
+
var In = yo(), it = function() {
|
|
1399
1399
|
}, Ye = y.forwardRef(function(e, t) {
|
|
1400
1400
|
var n = y.useRef(null), r = y.useState({
|
|
1401
1401
|
onScrollCapture: it,
|
|
@@ -1405,7 +1405,7 @@ var Fn = yo(), it = function() {
|
|
|
1405
1405
|
return y.createElement(
|
|
1406
1406
|
y.Fragment,
|
|
1407
1407
|
null,
|
|
1408
|
-
u && y.createElement(b, { sideCar:
|
|
1408
|
+
u && y.createElement(b, { sideCar: In, removeScrollBar: c, shards: v, noRelative: k, noIsolation: S, inert: g, setCallbacks: s, allowPinchZoom: !!h, lockRef: n, gapMode: m }),
|
|
1409
1409
|
l ? y.cloneElement(y.Children.only(i), ae(ae({}, E), { ref: w })) : y.createElement(p, ae({}, E, { className: d, ref: w }), i)
|
|
1410
1410
|
);
|
|
1411
1411
|
});
|
|
@@ -1416,7 +1416,7 @@ Ye.defaultProps = {
|
|
|
1416
1416
|
};
|
|
1417
1417
|
Ye.classNames = {
|
|
1418
1418
|
fullWidth: Ge,
|
|
1419
|
-
zeroRight:
|
|
1419
|
+
zeroRight: We
|
|
1420
1420
|
};
|
|
1421
1421
|
var wo = function() {
|
|
1422
1422
|
if (typeof __webpack_nonce__ < "u")
|
|
@@ -1456,7 +1456,7 @@ var Eo = function() {
|
|
|
1456
1456
|
};
|
|
1457
1457
|
}, [t && n]);
|
|
1458
1458
|
};
|
|
1459
|
-
},
|
|
1459
|
+
}, Fn = function() {
|
|
1460
1460
|
var e = Co(), t = function(n) {
|
|
1461
1461
|
var r = n.styles, o = n.dynamic;
|
|
1462
1462
|
return e(r, o), null;
|
|
@@ -1482,7 +1482,7 @@ var Eo = function() {
|
|
|
1482
1482
|
right: t[2],
|
|
1483
1483
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1484
1484
|
};
|
|
1485
|
-
}, Ro =
|
|
1485
|
+
}, Ro = Fn(), be = "data-scroll-locked", Do = function(e, t, n, r) {
|
|
1486
1486
|
var o = e.left, s = e.top, l = e.right, i = e.gap;
|
|
1487
1487
|
return n === void 0 && (n = "margin"), `
|
|
1488
1488
|
.`.concat(vo, ` {
|
|
@@ -1506,7 +1506,7 @@ var Eo = function() {
|
|
|
1506
1506
|
].filter(Boolean).join(""), `
|
|
1507
1507
|
}
|
|
1508
1508
|
|
|
1509
|
-
.`).concat(
|
|
1509
|
+
.`).concat(We, ` {
|
|
1510
1510
|
right: `).concat(i, "px ").concat(r, `;
|
|
1511
1511
|
}
|
|
1512
1512
|
|
|
@@ -1514,7 +1514,7 @@ var Eo = function() {
|
|
|
1514
1514
|
margin-right: `).concat(i, "px ").concat(r, `;
|
|
1515
1515
|
}
|
|
1516
1516
|
|
|
1517
|
-
.`).concat(
|
|
1517
|
+
.`).concat(We, " .").concat(We, ` {
|
|
1518
1518
|
right: 0 `).concat(r, `;
|
|
1519
1519
|
}
|
|
1520
1520
|
|
|
@@ -1536,7 +1536,7 @@ var Eo = function() {
|
|
|
1536
1536
|
e <= 0 ? document.body.removeAttribute(be) : document.body.setAttribute(be, e.toString());
|
|
1537
1537
|
};
|
|
1538
1538
|
}, []);
|
|
1539
|
-
},
|
|
1539
|
+
}, Io = function(e) {
|
|
1540
1540
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
1541
1541
|
Lo();
|
|
1542
1542
|
var s = y.useMemo(function() {
|
|
@@ -1555,7 +1555,7 @@ if (typeof window < "u")
|
|
|
1555
1555
|
} catch {
|
|
1556
1556
|
bt = !1;
|
|
1557
1557
|
}
|
|
1558
|
-
var me = bt ? { passive: !1 } : !1,
|
|
1558
|
+
var me = bt ? { passive: !1 } : !1, Fo = function(e) {
|
|
1559
1559
|
return e.tagName === "TEXTAREA";
|
|
1560
1560
|
}, Mn = function(e, t) {
|
|
1561
1561
|
if (!(e instanceof Element))
|
|
@@ -1564,7 +1564,7 @@ var me = bt ? { passive: !1 } : !1, Io = function(e) {
|
|
|
1564
1564
|
return (
|
|
1565
1565
|
// not-not-scrollable
|
|
1566
1566
|
n[t] !== "hidden" && // contains scroll inside self
|
|
1567
|
-
!(n.overflowY === n.overflowX && !
|
|
1567
|
+
!(n.overflowY === n.overflowX && !Fo(e) && n[t] === "visible")
|
|
1568
1568
|
);
|
|
1569
1569
|
}, Mo = function(e) {
|
|
1570
1570
|
return Mn(e, "overflowY");
|
|
@@ -1624,16 +1624,16 @@ var me = bt ? { passive: !1 } : !1, Io = function(e) {
|
|
|
1624
1624
|
return [e.deltaX, e.deltaY];
|
|
1625
1625
|
}, rn = function(e) {
|
|
1626
1626
|
return e && "current" in e ? e.current : e;
|
|
1627
|
-
},
|
|
1627
|
+
}, Ho = function(e, t) {
|
|
1628
1628
|
return e[0] === t[0] && e[1] === t[1];
|
|
1629
|
-
},
|
|
1629
|
+
}, Wo = function(e) {
|
|
1630
1630
|
return `
|
|
1631
1631
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1632
1632
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1633
1633
|
`);
|
|
1634
1634
|
}, Go = 0, he = [];
|
|
1635
1635
|
function jo(e) {
|
|
1636
|
-
var t = y.useRef([]), n = y.useRef([0, 0]), r = y.useRef(), o = y.useState(Go++)[0], s = y.useState(
|
|
1636
|
+
var t = y.useRef([]), n = y.useRef([0, 0]), r = y.useRef(), o = y.useState(Go++)[0], s = y.useState(Fn)[0], l = y.useRef(e);
|
|
1637
1637
|
y.useEffect(function() {
|
|
1638
1638
|
l.current = e;
|
|
1639
1639
|
}, [e]), y.useEffect(function() {
|
|
@@ -1671,7 +1671,7 @@ function jo(e) {
|
|
|
1671
1671
|
var h = g;
|
|
1672
1672
|
if (!(!he.length || he[he.length - 1] !== s)) {
|
|
1673
1673
|
var _ = "deltaY" in h ? nn(h) : Oe(h), p = t.current.filter(function(b) {
|
|
1674
|
-
return b.name === h.type && (b.target === h.target || h.target === b.shadowParent) &&
|
|
1674
|
+
return b.name === h.type && (b.target === h.target || h.target === b.shadowParent) && Ho(b.delta, _);
|
|
1675
1675
|
})[0];
|
|
1676
1676
|
if (p && p.should) {
|
|
1677
1677
|
h.cancelable && h.preventDefault();
|
|
@@ -1713,8 +1713,8 @@ function jo(e) {
|
|
|
1713
1713
|
return y.createElement(
|
|
1714
1714
|
y.Fragment,
|
|
1715
1715
|
null,
|
|
1716
|
-
S ? y.createElement(s, { styles:
|
|
1717
|
-
k ? y.createElement(
|
|
1716
|
+
S ? y.createElement(s, { styles: Wo(o) }) : null,
|
|
1717
|
+
k ? y.createElement(Io, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
1718
1718
|
);
|
|
1719
1719
|
}
|
|
1720
1720
|
function Ko(e) {
|
|
@@ -1722,7 +1722,7 @@ function Ko(e) {
|
|
|
1722
1722
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1723
1723
|
return t;
|
|
1724
1724
|
}
|
|
1725
|
-
const Vo = _o(
|
|
1725
|
+
const Vo = _o(In, jo);
|
|
1726
1726
|
var Bn = y.forwardRef(function(e, t) {
|
|
1727
1727
|
return y.createElement(Ye, ae({}, e, { ref: t, sideCar: Vo }));
|
|
1728
1728
|
});
|
|
@@ -1775,7 +1775,7 @@ var qo = function(e) {
|
|
|
1775
1775
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Xo(r, o, n, "aria-hidden")) : function() {
|
|
1776
1776
|
return null;
|
|
1777
1777
|
};
|
|
1778
|
-
}, Xe = "Dialog", [Un] = ke(Xe), [Qo, re] = Un(Xe),
|
|
1778
|
+
}, Xe = "Dialog", [Un] = ke(Xe), [Qo, re] = Un(Xe), Hn = (e) => {
|
|
1779
1779
|
const {
|
|
1780
1780
|
__scopeDialog: t,
|
|
1781
1781
|
children: n,
|
|
@@ -1806,10 +1806,10 @@ var qo = function(e) {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
);
|
|
1808
1808
|
};
|
|
1809
|
-
|
|
1810
|
-
var
|
|
1809
|
+
Hn.displayName = Xe;
|
|
1810
|
+
var Wn = "DialogTrigger", Gn = y.forwardRef(
|
|
1811
1811
|
(e, t) => {
|
|
1812
|
-
const { __scopeDialog: n, ...r } = e, o = re(
|
|
1812
|
+
const { __scopeDialog: n, ...r } = e, o = re(Wn, n), s = ee(t, o.triggerRef);
|
|
1813
1813
|
return /* @__PURE__ */ a(
|
|
1814
1814
|
q.button,
|
|
1815
1815
|
{
|
|
@@ -1825,7 +1825,7 @@ var Hn = "DialogTrigger", Gn = y.forwardRef(
|
|
|
1825
1825
|
);
|
|
1826
1826
|
}
|
|
1827
1827
|
);
|
|
1828
|
-
Gn.displayName =
|
|
1828
|
+
Gn.displayName = Wn;
|
|
1829
1829
|
var Et = "DialogPortal", [Jo, jn] = Un(Et, {
|
|
1830
1830
|
forceMount: void 0
|
|
1831
1831
|
}), Kn = (e) => {
|
|
@@ -2000,7 +2000,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2000
2000
|
const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
|
|
2001
2001
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
2002
2002
|
}, [r, e, t]), null;
|
|
2003
|
-
}, At =
|
|
2003
|
+
}, At = Hn, Pt = Gn, Rt = Kn, Dt = Vn, Lt = qn, It = Xn, Ft = Qn, Ce = er;
|
|
2004
2004
|
function is({ children: e, scrollable: t }) {
|
|
2005
2005
|
const n = B(null), r = B(null);
|
|
2006
2006
|
return kt(n, r, t), /* @__PURE__ */ N(
|
|
@@ -2029,42 +2029,44 @@ function tl({
|
|
|
2029
2029
|
placement: d = "center",
|
|
2030
2030
|
scrollable: c = !0,
|
|
2031
2031
|
closable: u = !0,
|
|
2032
|
-
|
|
2032
|
+
fullscreen: v = !1,
|
|
2033
|
+
...x
|
|
2033
2034
|
}) {
|
|
2034
|
-
const
|
|
2035
|
-
return /* @__PURE__ */ N(At, { ...
|
|
2035
|
+
const k = B(null);
|
|
2036
|
+
return /* @__PURE__ */ N(At, { ...x, children: [
|
|
2036
2037
|
/* @__PURE__ */ a(Pt, { asChild: !0, children: e }),
|
|
2037
2038
|
/* @__PURE__ */ N(Rt, { children: [
|
|
2038
2039
|
/* @__PURE__ */ a(Dt, { className: "vx-dialog__overlay" }),
|
|
2039
2040
|
/* @__PURE__ */ N(
|
|
2040
2041
|
Lt,
|
|
2041
2042
|
{
|
|
2042
|
-
ref:
|
|
2043
|
+
ref: k,
|
|
2043
2044
|
className: T(
|
|
2044
2045
|
"vx-dialog__content",
|
|
2046
|
+
v && "vx-dialog__content--fullscreen",
|
|
2045
2047
|
l !== "md" && `vx-dialog__content--${l}`,
|
|
2046
2048
|
d !== "center" && `vx-dialog__content--${d}`,
|
|
2047
2049
|
i && `vx-dialog__content--pad-${i}`,
|
|
2048
2050
|
c && "vx-dialog__content--scrollable",
|
|
2049
2051
|
s
|
|
2050
2052
|
),
|
|
2051
|
-
onEscapeKeyDown: (
|
|
2052
|
-
const
|
|
2053
|
-
if (!
|
|
2054
|
-
const
|
|
2053
|
+
onEscapeKeyDown: (S) => {
|
|
2054
|
+
const g = k.current;
|
|
2055
|
+
if (!g) return;
|
|
2056
|
+
const h = !!g.querySelector(
|
|
2055
2057
|
".vx-select__dropdown, .vx-multiselect__dropdown, .vx-datepicker__popover, .vx-timepicker__popover, .vx-colorpicker__panel"
|
|
2056
|
-
),
|
|
2057
|
-
(
|
|
2058
|
+
), _ = g.dataset.hasOpenPortal === "1";
|
|
2059
|
+
(h || _) && S.preventDefault();
|
|
2058
2060
|
},
|
|
2059
|
-
onPointerDownOutside: (
|
|
2060
|
-
const
|
|
2061
|
-
(
|
|
2061
|
+
onPointerDownOutside: (S) => {
|
|
2062
|
+
const g = k.current;
|
|
2063
|
+
(g == null ? void 0 : g.dataset.hasOpenPortal) === "1" && S.preventDefault();
|
|
2062
2064
|
},
|
|
2063
2065
|
children: [
|
|
2064
2066
|
/* @__PURE__ */ N("div", { className: "vx-dialog__header", children: [
|
|
2065
2067
|
/* @__PURE__ */ N("div", { children: [
|
|
2066
|
-
/* @__PURE__ */ a(
|
|
2067
|
-
n ? /* @__PURE__ */ a(
|
|
2068
|
+
/* @__PURE__ */ a(It, { className: "vx-dialog__title", children: t }),
|
|
2069
|
+
n ? /* @__PURE__ */ a(Ft, { className: "vx-dialog__description", children: n }) : null
|
|
2068
2070
|
] }),
|
|
2069
2071
|
u ? /* @__PURE__ */ a(Ce, { className: "vx-dialog__close", "aria-label": "Close dialog", children: /* @__PURE__ */ a(le, { size: 16 }) }) : null
|
|
2070
2072
|
] }),
|
|
@@ -2610,13 +2612,13 @@ function Nr(e, t) {
|
|
|
2610
2612
|
function Sr(e, t) {
|
|
2611
2613
|
return `${e}-content-${t}`;
|
|
2612
2614
|
}
|
|
2613
|
-
var Rs = gr, Ds = xr, Ls = _r,
|
|
2615
|
+
var Rs = gr, Ds = xr, Ls = _r, Is = kr;
|
|
2614
2616
|
const ol = Rs, sl = de(function({ className: t, ...n }, r) {
|
|
2615
2617
|
return /* @__PURE__ */ a(Ds, { ref: r, className: T("vx-tabs__list", t), ...n });
|
|
2616
2618
|
}), il = de(function({ className: t, ...n }, r) {
|
|
2617
2619
|
return /* @__PURE__ */ a(Ls, { ref: r, className: T("vx-tabs__trigger", t), ...n });
|
|
2618
2620
|
}), ll = de(function({ className: t, ...n }, r) {
|
|
2619
|
-
return /* @__PURE__ */ a(
|
|
2621
|
+
return /* @__PURE__ */ a(Is, { ref: r, className: T("vx-tabs__content", t), ...n });
|
|
2620
2622
|
}), Er = {
|
|
2621
2623
|
light: {
|
|
2622
2624
|
label: "Light",
|
|
@@ -2943,7 +2945,7 @@ const cl = {
|
|
|
2943
2945
|
}
|
|
2944
2946
|
})
|
|
2945
2947
|
};
|
|
2946
|
-
function
|
|
2948
|
+
function Fs(e) {
|
|
2947
2949
|
return {
|
|
2948
2950
|
...Er,
|
|
2949
2951
|
...e
|
|
@@ -2975,7 +2977,7 @@ function dl({
|
|
|
2975
2977
|
storageKey: n = "vxui-react-theme",
|
|
2976
2978
|
themes: r
|
|
2977
2979
|
}) {
|
|
2978
|
-
const o = Se(() =>
|
|
2980
|
+
const o = Se(() => Fs(r), [r]), s = Se(() => Ms(t, o), [t, o]), l = B([]), [i, d] = I(() => typeof window > "u" ? s : Os(n, o) ?? s), c = o[i] ? i : s, u = o[c];
|
|
2979
2981
|
U(() => {
|
|
2980
2982
|
i !== c && d(c);
|
|
2981
2983
|
}, [c, i]), U(() => {
|
|
@@ -3038,7 +3040,7 @@ var Bs = Object.freeze({
|
|
|
3038
3040
|
)
|
|
3039
3041
|
);
|
|
3040
3042
|
Ot.displayName = zs;
|
|
3041
|
-
var $t = "ToastProvider", [Bt, Us,
|
|
3043
|
+
var $t = "ToastProvider", [Bt, Us, Hs] = lr("Toast"), [Tr] = ke("Toast", [Hs]), [Ws, Je] = Tr($t), Ar = (e) => {
|
|
3042
3044
|
const {
|
|
3043
3045
|
__scopeToast: t,
|
|
3044
3046
|
label: n = "Notification",
|
|
@@ -3050,7 +3052,7 @@ var $t = "ToastProvider", [Bt, Us, Ws] = lr("Toast"), [Tr] = ke("Toast", [Ws]),
|
|
|
3050
3052
|
return n.trim() || console.error(
|
|
3051
3053
|
`Invalid prop \`label\` supplied to \`${$t}\`. Expected non-empty \`string\`.`
|
|
3052
3054
|
), /* @__PURE__ */ a(Bt.Provider, { scope: t, children: /* @__PURE__ */ a(
|
|
3053
|
-
|
|
3055
|
+
Ws,
|
|
3054
3056
|
{
|
|
3055
3057
|
scope: t,
|
|
3056
3058
|
label: n,
|
|
@@ -3128,7 +3130,7 @@ var Pr = "ToastViewport", Gs = ["F8"], yt = "toast.viewportPause", _t = "toast.v
|
|
|
3128
3130
|
(b = c.current) == null || b.focus();
|
|
3129
3131
|
return;
|
|
3130
3132
|
}
|
|
3131
|
-
const L = g({ tabbingDirection: C ? "backwards" : "forwards" }), z = L.findIndex((
|
|
3133
|
+
const L = g({ tabbingDirection: C ? "backwards" : "forwards" }), z = L.findIndex((F) => F === A);
|
|
3132
3134
|
ut(L.slice(z + 1)) ? p.preventDefault() : C ? (w = c.current) == null || w.focus() : (E = u.current) == null || E.focus();
|
|
3133
3135
|
}
|
|
3134
3136
|
};
|
|
@@ -3249,26 +3251,26 @@ var [Ys, Xs] = Tr(Le, {
|
|
|
3249
3251
|
onSwipeCancel: x,
|
|
3250
3252
|
onSwipeEnd: k,
|
|
3251
3253
|
...S
|
|
3252
|
-
} = e, g = Je(Le, n), [h, _] = y.useState(null), p = ee(t, (
|
|
3254
|
+
} = e, g = Je(Le, n), [h, _] = y.useState(null), p = ee(t, (F) => _(F)), m = y.useRef(null), f = y.useRef(null), b = o || g.duration, w = y.useRef(0), E = y.useRef(b), A = y.useRef(0), { onToastAdd: C, onToastRemove: R } = g, P = oe(() => {
|
|
3253
3255
|
var j;
|
|
3254
3256
|
(h == null ? void 0 : h.contains(document.activeElement)) && ((j = g.viewport) == null || j.focus()), l();
|
|
3255
3257
|
}), L = y.useCallback(
|
|
3256
|
-
(
|
|
3257
|
-
!
|
|
3258
|
+
(F) => {
|
|
3259
|
+
!F || F === 1 / 0 || (window.clearTimeout(A.current), w.current = (/* @__PURE__ */ new Date()).getTime(), A.current = window.setTimeout(P, F));
|
|
3258
3260
|
},
|
|
3259
3261
|
[P]
|
|
3260
3262
|
);
|
|
3261
3263
|
y.useEffect(() => {
|
|
3262
|
-
const
|
|
3263
|
-
if (
|
|
3264
|
+
const F = g.viewport;
|
|
3265
|
+
if (F) {
|
|
3264
3266
|
const j = () => {
|
|
3265
3267
|
L(E.current), c == null || c();
|
|
3266
3268
|
}, K = () => {
|
|
3267
3269
|
const Z = (/* @__PURE__ */ new Date()).getTime() - w.current;
|
|
3268
3270
|
E.current = E.current - Z, window.clearTimeout(A.current), d == null || d();
|
|
3269
3271
|
};
|
|
3270
|
-
return
|
|
3271
|
-
|
|
3272
|
+
return F.addEventListener(yt, K), F.addEventListener(_t, j), () => {
|
|
3273
|
+
F.removeEventListener(yt, K), F.removeEventListener(_t, j);
|
|
3272
3274
|
};
|
|
3273
3275
|
}
|
|
3274
3276
|
}, [g.viewport, b, d, c, L]), y.useEffect(() => {
|
|
@@ -3302,25 +3304,25 @@ var [Ys, Xs] = Tr(Le, {
|
|
|
3302
3304
|
...S,
|
|
3303
3305
|
ref: p,
|
|
3304
3306
|
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
3305
|
-
onKeyDown: V(e.onKeyDown, (
|
|
3306
|
-
|
|
3307
|
+
onKeyDown: V(e.onKeyDown, (F) => {
|
|
3308
|
+
F.key === "Escape" && (i == null || i(F.nativeEvent), F.nativeEvent.defaultPrevented || (g.isFocusedToastEscapeKeyDownRef.current = !0, P()));
|
|
3307
3309
|
}),
|
|
3308
|
-
onPointerDown: V(e.onPointerDown, (
|
|
3309
|
-
|
|
3310
|
+
onPointerDown: V(e.onPointerDown, (F) => {
|
|
3311
|
+
F.button === 0 && (m.current = { x: F.clientX, y: F.clientY });
|
|
3310
3312
|
}),
|
|
3311
|
-
onPointerMove: V(e.onPointerMove, (
|
|
3313
|
+
onPointerMove: V(e.onPointerMove, (F) => {
|
|
3312
3314
|
if (!m.current) return;
|
|
3313
|
-
const j =
|
|
3314
|
-
Z ? (f.current =
|
|
3315
|
+
const j = F.clientX - m.current.x, K = F.clientY - m.current.y, Z = !!f.current, M = ["left", "right"].includes(g.swipeDirection), O = ["left", "up"].includes(g.swipeDirection) ? Math.min : Math.max, H = M ? O(0, j) : 0, D = M ? 0 : O(0, K), $ = F.pointerType === "touch" ? 10 : 2, W = { x: H, y: D }, G = { originalEvent: F, delta: W };
|
|
3316
|
+
Z ? (f.current = W, ze(Ks, v, G, {
|
|
3315
3317
|
discrete: !1
|
|
3316
|
-
})) : an(
|
|
3318
|
+
})) : an(W, g.swipeDirection, $) ? (f.current = W, ze(js, u, G, {
|
|
3317
3319
|
discrete: !1
|
|
3318
|
-
}),
|
|
3320
|
+
}), F.target.setPointerCapture(F.pointerId)) : (Math.abs(j) > $ || Math.abs(K) > $) && (m.current = null);
|
|
3319
3321
|
}),
|
|
3320
|
-
onPointerUp: V(e.onPointerUp, (
|
|
3321
|
-
const j = f.current, K =
|
|
3322
|
-
if (K.hasPointerCapture(
|
|
3323
|
-
const Z =
|
|
3322
|
+
onPointerUp: V(e.onPointerUp, (F) => {
|
|
3323
|
+
const j = f.current, K = F.target;
|
|
3324
|
+
if (K.hasPointerCapture(F.pointerId) && K.releasePointerCapture(F.pointerId), f.current = null, m.current = null, j) {
|
|
3325
|
+
const Z = F.currentTarget, M = { originalEvent: F, delta: j };
|
|
3324
3326
|
an(j, g.swipeDirection, g.swipeThreshold) ? ze(qs, k, M, {
|
|
3325
3327
|
discrete: !0
|
|
3326
3328
|
}) : ze(
|
|
@@ -3353,20 +3355,20 @@ var [Ys, Xs] = Tr(Le, {
|
|
|
3353
3355
|
" ",
|
|
3354
3356
|
n
|
|
3355
3357
|
] }) }) });
|
|
3356
|
-
}, Js = "ToastTitle",
|
|
3358
|
+
}, Js = "ToastTitle", Ir = y.forwardRef(
|
|
3357
3359
|
(e, t) => {
|
|
3358
3360
|
const { __scopeToast: n, ...r } = e;
|
|
3359
3361
|
return /* @__PURE__ */ a(q.div, { ...r, ref: t });
|
|
3360
3362
|
}
|
|
3361
3363
|
);
|
|
3362
|
-
|
|
3363
|
-
var ei = "ToastDescription",
|
|
3364
|
+
Ir.displayName = Js;
|
|
3365
|
+
var ei = "ToastDescription", Fr = y.forwardRef(
|
|
3364
3366
|
(e, t) => {
|
|
3365
3367
|
const { __scopeToast: n, ...r } = e;
|
|
3366
3368
|
return /* @__PURE__ */ a(q.div, { ...r, ref: t });
|
|
3367
3369
|
}
|
|
3368
3370
|
);
|
|
3369
|
-
|
|
3371
|
+
Fr.displayName = ei;
|
|
3370
3372
|
var Mr = "ToastAction", ti = y.forwardRef(
|
|
3371
3373
|
(e, t) => {
|
|
3372
3374
|
const { altText: n, ...r } = e;
|
|
@@ -3452,7 +3454,7 @@ function ut(e) {
|
|
|
3452
3454
|
const t = document.activeElement;
|
|
3453
3455
|
return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
|
|
3454
3456
|
}
|
|
3455
|
-
var oi = Ar, si = Rr, ii = Lr, li =
|
|
3457
|
+
var oi = Ar, si = Rr, ii = Lr, li = Ir, ci = Fr, di = zt;
|
|
3456
3458
|
const zr = we(null);
|
|
3457
3459
|
let ui = 1;
|
|
3458
3460
|
const pi = {
|
|
@@ -3462,7 +3464,7 @@ const pi = {
|
|
|
3462
3464
|
danger: /* @__PURE__ */ a(aa, { size: 15 })
|
|
3463
3465
|
};
|
|
3464
3466
|
function pl({ children: e }) {
|
|
3465
|
-
const [t, n] =
|
|
3467
|
+
const [t, n] = I([]), r = Se(
|
|
3466
3468
|
() => ({
|
|
3467
3469
|
push: (o) => {
|
|
3468
3470
|
n((s) => [...s, { id: ui += 1, tone: "info", ...o }]);
|
|
@@ -3576,7 +3578,7 @@ function hl({
|
|
|
3576
3578
|
searchable: x = !0,
|
|
3577
3579
|
className: k
|
|
3578
3580
|
}) {
|
|
3579
|
-
const S = t !== void 0, [g, h] =
|
|
3581
|
+
const S = t !== void 0, [g, h] = I(n), _ = S ? t : g, [p, m] = I(!1), [f, b] = I(""), w = B(null), E = B(null), A = B(null), C = B(null), R = gn(), [P, L] = I(null), z = B(null), F = e.find((O) => O.value === _), j = e.filter(
|
|
3580
3582
|
(O) => O.label.toLowerCase().includes(f.toLowerCase())
|
|
3581
3583
|
), K = typeof x == "number" ? e.length > x : x;
|
|
3582
3584
|
U(() => {
|
|
@@ -3586,8 +3588,8 @@ function hl({
|
|
|
3586
3588
|
}
|
|
3587
3589
|
if (K) {
|
|
3588
3590
|
const O = setTimeout(() => {
|
|
3589
|
-
var
|
|
3590
|
-
return (
|
|
3591
|
+
var H;
|
|
3592
|
+
return (H = C.current) == null ? void 0 : H.focus();
|
|
3591
3593
|
}, 0);
|
|
3592
3594
|
return () => clearTimeout(O);
|
|
3593
3595
|
}
|
|
@@ -3595,13 +3597,13 @@ function hl({
|
|
|
3595
3597
|
if (!p) return;
|
|
3596
3598
|
const O = (D) => {
|
|
3597
3599
|
var G, X;
|
|
3598
|
-
const $ = (G = w.current) == null ? void 0 : G.contains(D.target),
|
|
3599
|
-
!$ && !
|
|
3600
|
-
},
|
|
3600
|
+
const $ = (G = w.current) == null ? void 0 : G.contains(D.target), W = (X = A.current) == null ? void 0 : X.contains(D.target);
|
|
3601
|
+
!$ && !W && m(!1);
|
|
3602
|
+
}, H = (D) => {
|
|
3601
3603
|
D.key === "Escape" && (D.preventDefault(), m(!1));
|
|
3602
3604
|
};
|
|
3603
|
-
return document.addEventListener("mousedown", O), document.addEventListener("touchstart", O, { passive: !0 }), document.addEventListener("keydown",
|
|
3604
|
-
document.removeEventListener("mousedown", O), document.removeEventListener("touchstart", O), document.removeEventListener("keydown",
|
|
3605
|
+
return document.addEventListener("mousedown", O), document.addEventListener("touchstart", O, { passive: !0 }), document.addEventListener("keydown", H), () => {
|
|
3606
|
+
document.removeEventListener("mousedown", O), document.removeEventListener("touchstart", O), document.removeEventListener("keydown", H);
|
|
3605
3607
|
};
|
|
3606
3608
|
}, [p]), U(() => {
|
|
3607
3609
|
const { shouldInline: O } = ce(w.current);
|
|
@@ -3617,21 +3619,21 @@ function hl({
|
|
|
3617
3619
|
delete O.dataset.hasOpenPortal;
|
|
3618
3620
|
};
|
|
3619
3621
|
}, [p, P]), xe(() => {
|
|
3620
|
-
const { dialogContent: O, shouldInline:
|
|
3621
|
-
if (!p || !E.current ||
|
|
3622
|
+
const { dialogContent: O, shouldInline: H } = ce(w.current);
|
|
3623
|
+
if (!p || !E.current || H) {
|
|
3622
3624
|
L(null), z.current = null;
|
|
3623
3625
|
return;
|
|
3624
3626
|
}
|
|
3625
3627
|
z.current = O;
|
|
3626
|
-
const D = E.current.getBoundingClientRect(), $ = window.innerHeight - D.bottom,
|
|
3628
|
+
const D = E.current.getBoundingClientRect(), $ = window.innerHeight - D.bottom, W = D.top, G = $ < 280 && W > $ ? "up" : "down";
|
|
3627
3629
|
L(
|
|
3628
3630
|
G === "down" ? { top: D.bottom + 4, left: D.left, width: D.width, direction: G } : { bottom: window.innerHeight - D.top + 4, left: D.left, width: D.width, direction: G }
|
|
3629
3631
|
);
|
|
3630
3632
|
}, [p]), U(() => {
|
|
3631
3633
|
if (!p || !P) return;
|
|
3632
|
-
const O = (
|
|
3634
|
+
const O = (H) => {
|
|
3633
3635
|
var D;
|
|
3634
|
-
(D = A.current) != null && D.contains(
|
|
3636
|
+
(D = A.current) != null && D.contains(H.target) || m(!1);
|
|
3635
3637
|
};
|
|
3636
3638
|
return window.addEventListener("scroll", O, { capture: !0, passive: !0 }), window.addEventListener("resize", O), () => {
|
|
3637
3639
|
window.removeEventListener("scroll", O, { capture: !0 }), window.removeEventListener("resize", O);
|
|
@@ -3660,9 +3662,9 @@ function hl({
|
|
|
3660
3662
|
"aria-expanded": p,
|
|
3661
3663
|
"aria-controls": R,
|
|
3662
3664
|
children: [
|
|
3663
|
-
/* @__PURE__ */ a("span", { className: T("vx-select__value", !
|
|
3665
|
+
/* @__PURE__ */ a("span", { className: T("vx-select__value", !F && "vx-select__value--placeholder"), children: (F == null ? void 0 : F.label) ?? o }),
|
|
3664
3666
|
/* @__PURE__ */ N("span", { className: "vx-select__icons", children: [
|
|
3665
|
-
u &&
|
|
3667
|
+
u && F && /* @__PURE__ */ a(
|
|
3666
3668
|
"span",
|
|
3667
3669
|
{
|
|
3668
3670
|
className: "vx-select__clear",
|
|
@@ -3686,7 +3688,7 @@ function hl({
|
|
|
3686
3688
|
d ? /* @__PURE__ */ a("span", { className: "vx-field-group__error", children: d }) : null,
|
|
3687
3689
|
!d && i ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: i }) : null,
|
|
3688
3690
|
p && (() => {
|
|
3689
|
-
const O = !!P,
|
|
3691
|
+
const O = !!P, H = P ? { top: P.top, bottom: P.bottom, left: P.left, width: P.width, pointerEvents: "auto" } : void 0, D = /* @__PURE__ */ N(
|
|
3690
3692
|
"div",
|
|
3691
3693
|
{
|
|
3692
3694
|
ref: A,
|
|
@@ -3695,7 +3697,7 @@ function hl({
|
|
|
3695
3697
|
(P == null ? void 0 : P.direction) === "up" && "vx-select__dropdown--up",
|
|
3696
3698
|
!!z.current && "vx-select__dropdown--in-dialog"
|
|
3697
3699
|
),
|
|
3698
|
-
style:
|
|
3700
|
+
style: H,
|
|
3699
3701
|
children: [
|
|
3700
3702
|
K && /* @__PURE__ */ a("div", { className: "vx-select__search-wrap", children: /* @__PURE__ */ a(
|
|
3701
3703
|
"input",
|
|
@@ -3767,7 +3769,7 @@ function bl({
|
|
|
3767
3769
|
size: l = "md"
|
|
3768
3770
|
}) {
|
|
3769
3771
|
var h;
|
|
3770
|
-
const [i, d] =
|
|
3772
|
+
const [i, d] = I(n ?? ((h = e[0]) == null ? void 0 : h.value)), c = t !== void 0, u = c ? t : i, [v, x] = I({ left: 0, width: 0, opacity: 0 }), k = B(null), S = B({});
|
|
3771
3773
|
U(() => {
|
|
3772
3774
|
requestAnimationFrame(() => {
|
|
3773
3775
|
const _ = S.current[u];
|
|
@@ -4038,7 +4040,7 @@ function El({
|
|
|
4038
4040
|
);
|
|
4039
4041
|
}
|
|
4040
4042
|
function Cl({ content: e, placement: t = "top", delay: n = 600, children: r, className: o }) {
|
|
4041
|
-
const [s, l] =
|
|
4043
|
+
const [s, l] = I(!1), i = B(null), d = Y(() => {
|
|
4042
4044
|
i.current = setTimeout(() => l(!0), n);
|
|
4043
4045
|
}, [n]), c = Y(() => {
|
|
4044
4046
|
i.current && clearTimeout(i.current), l(!1);
|
|
@@ -4059,7 +4061,7 @@ function Tl({
|
|
|
4059
4061
|
open: s,
|
|
4060
4062
|
onOpenChange: l
|
|
4061
4063
|
}) {
|
|
4062
|
-
const [i, d] =
|
|
4064
|
+
const [i, d] = I(!1), c = s !== void 0, u = c ? s : i, v = B(null), x = Y((g) => {
|
|
4063
4065
|
c || d(g), l == null || l(g);
|
|
4064
4066
|
}, [c, l]), k = Y(() => x(!u), [u, x]);
|
|
4065
4067
|
U(() => {
|
|
@@ -4088,7 +4090,7 @@ function Al({
|
|
|
4088
4090
|
open: s,
|
|
4089
4091
|
onOpenChange: l
|
|
4090
4092
|
}) {
|
|
4091
|
-
const [i, d] =
|
|
4093
|
+
const [i, d] = I(!1), c = s !== void 0, u = c ? s : i, v = B(null), x = B(null), [k, S] = I(r);
|
|
4092
4094
|
xe(() => {
|
|
4093
4095
|
u && S(r);
|
|
4094
4096
|
}, [u, r]), xe(() => {
|
|
@@ -4212,7 +4214,7 @@ function Rl({ page: e, total: t, pageSize: n = 10, siblingCount: r = 1, onChange
|
|
|
4212
4214
|
] });
|
|
4213
4215
|
}
|
|
4214
4216
|
function Dl({ items: e, multiple: t = !1, defaultOpen: n = [], className: r }) {
|
|
4215
|
-
const [o, s] =
|
|
4217
|
+
const [o, s] = I(new Set(n));
|
|
4216
4218
|
function l(i) {
|
|
4217
4219
|
s((d) => {
|
|
4218
4220
|
const c = new Set(t ? d : []);
|
|
@@ -4261,8 +4263,8 @@ function xi(e) {
|
|
|
4261
4263
|
for (let n = 0; n < e.length; n++) t += e.charCodeAt(n);
|
|
4262
4264
|
return on[t % on.length];
|
|
4263
4265
|
}
|
|
4264
|
-
function
|
|
4265
|
-
const [d, c] =
|
|
4266
|
+
function Il({ src: e, name: t, size: n = "md", shape: r = "circle", fallback: o, className: s, alt: l, ...i }) {
|
|
4267
|
+
const [d, c] = I(!1), u = e && !d, v = t ?? l ?? "", x = v ? xi(v) : 200;
|
|
4266
4268
|
return /* @__PURE__ */ a(
|
|
4267
4269
|
"span",
|
|
4268
4270
|
{
|
|
@@ -4285,7 +4287,7 @@ function Fl({ src: e, name: t, size: n = "md", shape: r = "circle", fallback: o,
|
|
|
4285
4287
|
}
|
|
4286
4288
|
);
|
|
4287
4289
|
}
|
|
4288
|
-
function
|
|
4290
|
+
function Fl({
|
|
4289
4291
|
columns: e,
|
|
4290
4292
|
data: t,
|
|
4291
4293
|
size: n = "md",
|
|
@@ -4306,7 +4308,7 @@ function Il({
|
|
|
4306
4308
|
className: _,
|
|
4307
4309
|
...p
|
|
4308
4310
|
}) {
|
|
4309
|
-
const m = l ? "sm" : n, [f, b] =
|
|
4311
|
+
const m = l ? "sm" : n, [f, b] = I(null), [w, E] = I(null), A = S !== void 0, C = A ? S : f, R = A ? g ?? null : w, P = Y((L) => {
|
|
4310
4312
|
let z;
|
|
4311
4313
|
C !== L ? z = "asc" : R === "asc" ? z = "desc" : R === "desc" ? z = null : z = "asc", A || (b(z === null ? null : L), E(z)), h == null || h(L, z);
|
|
4312
4314
|
}, [C, R, A, h]);
|
|
@@ -4348,13 +4350,13 @@ function Il({
|
|
|
4348
4350
|
},
|
|
4349
4351
|
L.key
|
|
4350
4352
|
)) }) }),
|
|
4351
|
-
/* @__PURE__ */ a("tbody", { className: T(v && "vx-table__body--loading"), children: t.length === 0 ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: e.length, className: "vx-table__empty", children: k }) }) : t.map((L, z) => /* @__PURE__ */ a("tr", { className: "vx-table__row", children: e.map((
|
|
4353
|
+
/* @__PURE__ */ a("tbody", { className: T(v && "vx-table__body--loading"), children: t.length === 0 ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: e.length, className: "vx-table__empty", children: k }) }) : t.map((L, z) => /* @__PURE__ */ a("tr", { className: "vx-table__row", children: e.map((F) => /* @__PURE__ */ a(
|
|
4352
4354
|
"td",
|
|
4353
4355
|
{
|
|
4354
|
-
className: T("vx-table__td",
|
|
4355
|
-
children:
|
|
4356
|
+
className: T("vx-table__td", F.align && `vx-table__td--${F.align}`, F.className),
|
|
4357
|
+
children: F.accessor(L)
|
|
4356
4358
|
},
|
|
4357
|
-
|
|
4359
|
+
F.key
|
|
4358
4360
|
)) }, z)) })
|
|
4359
4361
|
]
|
|
4360
4362
|
}
|
|
@@ -4378,7 +4380,7 @@ function $l({ label: e, className: t, children: n, ...r }) {
|
|
|
4378
4380
|
return /* @__PURE__ */ a("button", { type: "button", className: T("vxm-icon-btn", t), "aria-label": e, ...r, children: n });
|
|
4379
4381
|
}
|
|
4380
4382
|
function Bl({ items: e, className: t }) {
|
|
4381
|
-
const [n, r] =
|
|
4383
|
+
const [n, r] = I(null), o = n ? e.find((l) => l.key === n) : null, s = (l) => {
|
|
4382
4384
|
var i, d;
|
|
4383
4385
|
(i = l.submenu) != null && i.length ? r((c) => c === l.key ? null : l.key) : (r(null), (d = l.onSelect) == null || d.call(l));
|
|
4384
4386
|
};
|
|
@@ -4446,7 +4448,7 @@ function zl({
|
|
|
4446
4448
|
children: o,
|
|
4447
4449
|
className: s
|
|
4448
4450
|
}) {
|
|
4449
|
-
const l = B(null), i = B(0), [d, c] =
|
|
4451
|
+
const l = B(null), i = B(0), [d, c] = I(!1), [u, v] = I(0), x = B(0);
|
|
4450
4452
|
U(() => {
|
|
4451
4453
|
e || (v(0), x.current = 0);
|
|
4452
4454
|
}, [e]), U(() => {
|
|
@@ -4520,10 +4522,10 @@ function Ul({ icon: e, destructive: t, className: n, children: r, ...o }) {
|
|
|
4520
4522
|
}
|
|
4521
4523
|
);
|
|
4522
4524
|
}
|
|
4523
|
-
function
|
|
4525
|
+
function Hl({ className: e, ...t }) {
|
|
4524
4526
|
return /* @__PURE__ */ a("ul", { className: T("vxm-list", e), role: "list", ...t });
|
|
4525
4527
|
}
|
|
4526
|
-
function
|
|
4528
|
+
function Wl({ title: e, className: t, children: n, ...r }) {
|
|
4527
4529
|
return /* @__PURE__ */ N("div", { className: T("vxm-list-section", t), ...r, children: [
|
|
4528
4530
|
e && /* @__PURE__ */ a("div", { className: "vxm-list-section__title", children: e }),
|
|
4529
4531
|
n
|
|
@@ -4582,7 +4584,7 @@ function jl({
|
|
|
4582
4584
|
children: s,
|
|
4583
4585
|
className: l
|
|
4584
4586
|
}) {
|
|
4585
|
-
const i = B(null), d = B(0), c = B(0), [u, v] =
|
|
4587
|
+
const i = B(null), d = B(0), c = B(0), [u, v] = I(!1), [x, k] = I(0);
|
|
4586
4588
|
U(() => {
|
|
4587
4589
|
e || (k(0), c.current = 0);
|
|
4588
4590
|
}, [e]), U(() => {
|
|
@@ -4655,7 +4657,7 @@ function Kl({ icon: e, label: t, badge: n, active: r, onClick: o }) {
|
|
|
4655
4657
|
);
|
|
4656
4658
|
}
|
|
4657
4659
|
function Vl({ title: e, collapsible: t = !1, defaultOpen: n = !0, children: r }) {
|
|
4658
|
-
const [o, s] =
|
|
4660
|
+
const [o, s] = I(n);
|
|
4659
4661
|
return /* @__PURE__ */ N("div", { className: T("vxm-drawer-section", t && "vxm-drawer-section--collapsible"), children: [
|
|
4660
4662
|
e && (t ? /* @__PURE__ */ N(
|
|
4661
4663
|
"button",
|
|
@@ -4730,8 +4732,8 @@ function ec({
|
|
|
4730
4732
|
role: "alertdialog",
|
|
4731
4733
|
"aria-modal": "true",
|
|
4732
4734
|
children: [
|
|
4733
|
-
/* @__PURE__ */ a(
|
|
4734
|
-
n ? /* @__PURE__ */ a(
|
|
4735
|
+
/* @__PURE__ */ a(It, { className: "vx-alert-dialog__title", children: t }),
|
|
4736
|
+
n ? /* @__PURE__ */ a(Ft, { className: "vx-alert-dialog__description", children: n }) : null,
|
|
4735
4737
|
/* @__PURE__ */ N("div", { className: "vx-alert-dialog__footer", children: [
|
|
4736
4738
|
/* @__PURE__ */ a(Ce, { asChild: !0, children: /* @__PURE__ */ a(ye, { variant: "secondary", onClick: l, children: o }) }),
|
|
4737
4739
|
/* @__PURE__ */ a(Ce, { asChild: !0, children: /* @__PURE__ */ a(ye, { variant: i === "danger" ? "danger" : "solid", onClick: s, children: r }) })
|
|
@@ -4853,7 +4855,7 @@ function ki({
|
|
|
4853
4855
|
className: s,
|
|
4854
4856
|
weekStartsOnMonday: l = !1
|
|
4855
4857
|
}) {
|
|
4856
|
-
const i = /* @__PURE__ */ new Date(), d = e !== void 0, [c, u] =
|
|
4858
|
+
const i = /* @__PURE__ */ new Date(), d = e !== void 0, [c, u] = I(t), v = d ? e : c, [x, k] = I((v ?? i).getFullYear()), [S, g] = I((v ?? i).getMonth()), h = _i(x, S), _ = wi(x, S), p = l ? _ === 0 ? 6 : _ - 1 : _, m = l ? ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"] : ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], f = () => {
|
|
4857
4859
|
S === 0 ? (k((R) => R - 1), g(11)) : g((R) => R - 1);
|
|
4858
4860
|
}, b = () => {
|
|
4859
4861
|
S === 11 ? (k((R) => R + 1), g(0)) : g((R) => R + 1);
|
|
@@ -4913,7 +4915,7 @@ function ki({
|
|
|
4913
4915
|
C.map((R, P) => {
|
|
4914
4916
|
if (R === null)
|
|
4915
4917
|
return /* @__PURE__ */ a("div", { className: "vx-calendar__cell vx-calendar__cell--empty" }, `e-${P}`);
|
|
4916
|
-
const L = new Date(x, S, R), z = sn(L, i),
|
|
4918
|
+
const L = new Date(x, S, R), z = sn(L, i), F = v ? sn(L, v) : !1, j = w(R);
|
|
4917
4919
|
return /* @__PURE__ */ a(
|
|
4918
4920
|
"button",
|
|
4919
4921
|
{
|
|
@@ -4922,13 +4924,13 @@ function ki({
|
|
|
4922
4924
|
className: T(
|
|
4923
4925
|
"vx-calendar__cell",
|
|
4924
4926
|
z && "vx-calendar__cell--today",
|
|
4925
|
-
|
|
4927
|
+
F && "vx-calendar__cell--selected",
|
|
4926
4928
|
j && "vx-calendar__cell--disabled"
|
|
4927
4929
|
),
|
|
4928
4930
|
onClick: () => E(R),
|
|
4929
4931
|
disabled: j,
|
|
4930
4932
|
"aria-label": L.toLocaleDateString(),
|
|
4931
|
-
"aria-selected":
|
|
4933
|
+
"aria-selected": F,
|
|
4932
4934
|
children: R
|
|
4933
4935
|
},
|
|
4934
4936
|
R
|
|
@@ -4961,12 +4963,12 @@ function nc({
|
|
|
4961
4963
|
weekStartsOnMonday: u,
|
|
4962
4964
|
className: v
|
|
4963
4965
|
}) {
|
|
4964
|
-
const x = e !== void 0, [k, S] =
|
|
4966
|
+
const x = e !== void 0, [k, S] = I(t), g = x ? e : k, [h, _] = I(!1), p = B(null), m = B(null), f = B(null), b = B(null), [w, E] = I(null);
|
|
4965
4967
|
U(() => {
|
|
4966
4968
|
if (!h) return;
|
|
4967
4969
|
const C = (P) => {
|
|
4968
|
-
var
|
|
4969
|
-
const L = (
|
|
4970
|
+
var F, j;
|
|
4971
|
+
const L = (F = p.current) == null ? void 0 : F.contains(P.target), z = (j = f.current) == null ? void 0 : j.contains(P.target);
|
|
4970
4972
|
!L && !z && _(!1);
|
|
4971
4973
|
}, R = (P) => {
|
|
4972
4974
|
P.key === "Escape" && (P.preventDefault(), _(!1));
|
|
@@ -4994,9 +4996,9 @@ function nc({
|
|
|
4994
4996
|
return;
|
|
4995
4997
|
}
|
|
4996
4998
|
b.current = C;
|
|
4997
|
-
const P = m.current.getBoundingClientRect(), L = window.innerHeight - P.bottom, z = P.top,
|
|
4999
|
+
const P = m.current.getBoundingClientRect(), L = window.innerHeight - P.bottom, z = P.top, F = L < 320 && z > L ? "up" : "down";
|
|
4998
5000
|
E(
|
|
4999
|
-
|
|
5001
|
+
F === "down" ? { top: P.bottom + 6, left: P.left, direction: F } : { bottom: window.innerHeight - P.top + 6, left: P.left, direction: F }
|
|
5000
5002
|
);
|
|
5001
5003
|
}, [h]), U(() => {
|
|
5002
5004
|
if (!h || !w) return;
|
|
@@ -5080,7 +5082,7 @@ function rc({
|
|
|
5080
5082
|
maxDisplay: x,
|
|
5081
5083
|
className: k
|
|
5082
5084
|
}) {
|
|
5083
|
-
const S = t !== void 0, [g, h] =
|
|
5085
|
+
const S = t !== void 0, [g, h] = I(n), _ = S ? t : g, [p, m] = I(!1), [f, b] = I(""), w = B(null), E = B(null), A = B(null), C = B(null), R = gn(), [P, L] = I(null), z = B(null), F = e.filter(
|
|
5084
5086
|
(D) => D.label.toLowerCase().includes(f.toLowerCase())
|
|
5085
5087
|
);
|
|
5086
5088
|
U(() => {
|
|
@@ -5095,12 +5097,12 @@ function rc({
|
|
|
5095
5097
|
return () => clearTimeout(D);
|
|
5096
5098
|
}, [p]), U(() => {
|
|
5097
5099
|
if (!p) return;
|
|
5098
|
-
const D = (
|
|
5100
|
+
const D = (W) => {
|
|
5099
5101
|
var te, ue;
|
|
5100
|
-
const G = (te = w.current) == null ? void 0 : te.contains(
|
|
5102
|
+
const G = (te = w.current) == null ? void 0 : te.contains(W.target), X = (ue = A.current) == null ? void 0 : ue.contains(W.target);
|
|
5101
5103
|
!G && !X && m(!1);
|
|
5102
|
-
}, $ = (
|
|
5103
|
-
|
|
5104
|
+
}, $ = (W) => {
|
|
5105
|
+
W.key === "Escape" && (W.preventDefault(), m(!1));
|
|
5104
5106
|
};
|
|
5105
5107
|
return document.addEventListener("mousedown", D), document.addEventListener("touchstart", D, { passive: !0 }), document.addEventListener("keydown", $), () => {
|
|
5106
5108
|
document.removeEventListener("mousedown", D), document.removeEventListener("touchstart", D), document.removeEventListener("keydown", $);
|
|
@@ -5125,15 +5127,15 @@ function rc({
|
|
|
5125
5127
|
return;
|
|
5126
5128
|
}
|
|
5127
5129
|
z.current = D;
|
|
5128
|
-
const
|
|
5130
|
+
const W = E.current.getBoundingClientRect(), G = window.innerHeight - W.bottom, X = W.top, te = G < 300 && X > G ? "up" : "down";
|
|
5129
5131
|
L(
|
|
5130
|
-
te === "down" ? { top:
|
|
5132
|
+
te === "down" ? { top: W.bottom + 4, left: W.left, width: W.width, direction: te } : { bottom: window.innerHeight - W.top + 4, left: W.left, width: W.width, direction: te }
|
|
5131
5133
|
);
|
|
5132
5134
|
}, [p]), U(() => {
|
|
5133
5135
|
if (!p || !P) return;
|
|
5134
5136
|
const D = ($) => {
|
|
5135
|
-
var
|
|
5136
|
-
(
|
|
5137
|
+
var W;
|
|
5138
|
+
(W = A.current) != null && W.contains($.target) || m(!1);
|
|
5137
5139
|
};
|
|
5138
5140
|
return window.addEventListener("scroll", D, { capture: !0, passive: !0 }), window.addEventListener("resize", D), () => {
|
|
5139
5141
|
window.removeEventListener("scroll", D, { capture: !0 }), window.removeEventListener("resize", D);
|
|
@@ -5141,15 +5143,15 @@ function rc({
|
|
|
5141
5143
|
}, [p, P]);
|
|
5142
5144
|
const j = (D) => {
|
|
5143
5145
|
if (D.disabled) return;
|
|
5144
|
-
const $ = _.includes(D.value) ? _.filter((
|
|
5146
|
+
const $ = _.includes(D.value) ? _.filter((W) => W !== D.value) : [..._, D.value];
|
|
5145
5147
|
S || h($), r == null || r($);
|
|
5146
5148
|
}, K = (D, $) => {
|
|
5147
5149
|
D.stopPropagation();
|
|
5148
|
-
const
|
|
5149
|
-
S || h(
|
|
5150
|
+
const W = _.filter((G) => G !== $);
|
|
5151
|
+
S || h(W), r == null || r(W);
|
|
5150
5152
|
}, Z = (D) => {
|
|
5151
5153
|
D.stopPropagation(), S || h([]), r == null || r([]);
|
|
5152
|
-
}, M = x ? _.slice(0, x) : _, O = x ? Math.max(0, _.length - x) : 0,
|
|
5154
|
+
}, M = x ? _.slice(0, x) : _, O = x ? Math.max(0, _.length - x) : 0, H = e.reduce((D, $) => (D[$.value] = $.label, D), {});
|
|
5153
5155
|
return /* @__PURE__ */ N("div", { ref: w, className: T("vx-multiselect", p && "vx-multiselect--open", k), children: [
|
|
5154
5156
|
l ? /* @__PURE__ */ a("span", { className: "vx-field-group__label", children: l }) : null,
|
|
5155
5157
|
/* @__PURE__ */ N(
|
|
@@ -5170,13 +5172,13 @@ function rc({
|
|
|
5170
5172
|
children: [
|
|
5171
5173
|
/* @__PURE__ */ a("span", { className: "vx-multiselect__tags", children: _.length === 0 ? /* @__PURE__ */ a("span", { className: "vx-multiselect__placeholder", children: o }) : /* @__PURE__ */ N(J, { children: [
|
|
5172
5174
|
M.map((D) => /* @__PURE__ */ N("span", { className: "vx-multiselect__tag", children: [
|
|
5173
|
-
|
|
5175
|
+
H[D] ?? D,
|
|
5174
5176
|
!c && /* @__PURE__ */ a(
|
|
5175
5177
|
"span",
|
|
5176
5178
|
{
|
|
5177
5179
|
className: "vx-multiselect__tag-remove",
|
|
5178
5180
|
role: "button",
|
|
5179
|
-
"aria-label": `Remove ${
|
|
5181
|
+
"aria-label": `Remove ${H[D] ?? D}`,
|
|
5180
5182
|
onClick: ($) => K($, D),
|
|
5181
5183
|
children: /* @__PURE__ */ a(le, { size: 11 })
|
|
5182
5184
|
}
|
|
@@ -5212,7 +5214,7 @@ function rc({
|
|
|
5212
5214
|
d ? /* @__PURE__ */ a("span", { className: "vx-field-group__error", children: d }) : null,
|
|
5213
5215
|
!d && i ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: i }) : null,
|
|
5214
5216
|
p && (() => {
|
|
5215
|
-
const D = !!P, $ = D ? { top: P.top, bottom: P.bottom, left: P.left, width: P.width, pointerEvents: "auto" } : void 0,
|
|
5217
|
+
const D = !!P, $ = D ? { top: P.top, bottom: P.bottom, left: P.left, width: P.width, pointerEvents: "auto" } : void 0, W = /* @__PURE__ */ N(
|
|
5216
5218
|
"div",
|
|
5217
5219
|
{
|
|
5218
5220
|
ref: A,
|
|
@@ -5235,7 +5237,7 @@ function rc({
|
|
|
5235
5237
|
"aria-label": s
|
|
5236
5238
|
}
|
|
5237
5239
|
) }),
|
|
5238
|
-
/* @__PURE__ */ a("ul", { id: R, className: "vx-multiselect__list", role: "listbox", "aria-multiselectable": "true", "aria-label": l ?? "Options", children:
|
|
5240
|
+
/* @__PURE__ */ a("ul", { id: R, className: "vx-multiselect__list", role: "listbox", "aria-multiselectable": "true", "aria-label": l ?? "Options", children: F.length === 0 ? /* @__PURE__ */ a("li", { className: "vx-multiselect__empty", children: v }) : F.map((G) => {
|
|
5239
5241
|
const X = _.includes(G.value);
|
|
5240
5242
|
return /* @__PURE__ */ N(
|
|
5241
5243
|
"li",
|
|
@@ -5260,7 +5262,7 @@ function rc({
|
|
|
5260
5262
|
]
|
|
5261
5263
|
}
|
|
5262
5264
|
);
|
|
5263
|
-
return D ? Te(
|
|
5265
|
+
return D ? Te(W, document.body) : W;
|
|
5264
5266
|
})()
|
|
5265
5267
|
] });
|
|
5266
5268
|
}
|
|
@@ -5349,7 +5351,7 @@ function ac({
|
|
|
5349
5351
|
seconds: d = !1,
|
|
5350
5352
|
className: c
|
|
5351
5353
|
}) {
|
|
5352
|
-
const u = e !== void 0, [v, x] =
|
|
5354
|
+
const u = e !== void 0, [v, x] = I(t), k = u ? e : v, S = k ? ln(k) : { h: 12, m: 0, s: 0 }, [g, h] = I(S.h), [_, p] = I(S.m), [m, f] = I(S.s), [b, w] = I(!1), E = B(null), A = B(null), C = B(null), R = B(null), [P, L] = I(null);
|
|
5353
5355
|
U(() => {
|
|
5354
5356
|
if (e) {
|
|
5355
5357
|
const M = ln(e);
|
|
@@ -5357,12 +5359,12 @@ function ac({
|
|
|
5357
5359
|
}
|
|
5358
5360
|
}, [e]), U(() => {
|
|
5359
5361
|
if (!b) return;
|
|
5360
|
-
const M = (
|
|
5361
|
-
var
|
|
5362
|
-
const D = (
|
|
5362
|
+
const M = (H) => {
|
|
5363
|
+
var W, G;
|
|
5364
|
+
const D = (W = E.current) == null ? void 0 : W.contains(H.target), $ = (G = C.current) == null ? void 0 : G.contains(H.target);
|
|
5363
5365
|
!D && !$ && w(!1);
|
|
5364
|
-
}, O = (
|
|
5365
|
-
|
|
5366
|
+
}, O = (H) => {
|
|
5367
|
+
H.key === "Escape" && (H.preventDefault(), w(!1));
|
|
5366
5368
|
};
|
|
5367
5369
|
return document.addEventListener("mousedown", M), document.addEventListener("touchstart", M, { passive: !0 }), document.addEventListener("keydown", O), () => {
|
|
5368
5370
|
document.removeEventListener("mousedown", M), document.removeEventListener("touchstart", M), document.removeEventListener("keydown", O);
|
|
@@ -5387,27 +5389,27 @@ function ac({
|
|
|
5387
5389
|
return;
|
|
5388
5390
|
}
|
|
5389
5391
|
R.current = M;
|
|
5390
|
-
const
|
|
5392
|
+
const H = A.current.getBoundingClientRect(), D = window.innerHeight - H.bottom, $ = H.top, W = D < 220 && $ > D ? "up" : "down";
|
|
5391
5393
|
L(
|
|
5392
|
-
|
|
5394
|
+
W === "down" ? { top: H.bottom + 4, left: H.left, direction: W } : { bottom: window.innerHeight - H.top + 4, left: H.left, direction: W }
|
|
5393
5395
|
);
|
|
5394
5396
|
}, [b]), U(() => {
|
|
5395
5397
|
if (!b || !P) return;
|
|
5396
5398
|
const M = (O) => {
|
|
5397
|
-
var
|
|
5398
|
-
(
|
|
5399
|
+
var H;
|
|
5400
|
+
(H = C.current) != null && H.contains(O.target) || w(!1);
|
|
5399
5401
|
};
|
|
5400
5402
|
return window.addEventListener("scroll", M, { capture: !0, passive: !0 }), window.addEventListener("resize", M), () => {
|
|
5401
5403
|
window.removeEventListener("scroll", M, { capture: !0 }), window.removeEventListener("resize", M);
|
|
5402
5404
|
};
|
|
5403
5405
|
}, [b, P]);
|
|
5404
5406
|
const z = Y(
|
|
5405
|
-
(M, O,
|
|
5406
|
-
const D = cn(M, O,
|
|
5407
|
+
(M, O, H) => {
|
|
5408
|
+
const D = cn(M, O, H, d);
|
|
5407
5409
|
u || x(D), n == null || n(D);
|
|
5408
5410
|
},
|
|
5409
5411
|
[u, d, n]
|
|
5410
|
-
),
|
|
5412
|
+
), F = (M) => {
|
|
5411
5413
|
h(M), z(M, _, m);
|
|
5412
5414
|
}, j = (M) => {
|
|
5413
5415
|
p(M), z(g, M, m);
|
|
@@ -5439,7 +5441,7 @@ function ac({
|
|
|
5439
5441
|
l ? /* @__PURE__ */ a("span", { className: "vx-field-group__error", children: l }) : null,
|
|
5440
5442
|
!l && s ? /* @__PURE__ */ a("span", { className: "vx-field-group__hint", children: s }) : null,
|
|
5441
5443
|
b && (() => {
|
|
5442
|
-
const M = !!P, O = P ? { position: "fixed", top: P.top, bottom: P.bottom, left: P.left, pointerEvents: "auto" } : void 0,
|
|
5444
|
+
const M = !!P, O = P ? { position: "fixed", top: P.top, bottom: P.bottom, left: P.left, pointerEvents: "auto" } : void 0, H = /* @__PURE__ */ N(
|
|
5443
5445
|
"div",
|
|
5444
5446
|
{
|
|
5445
5447
|
ref: C,
|
|
@@ -5453,7 +5455,7 @@ function ac({
|
|
|
5453
5455
|
style: O,
|
|
5454
5456
|
children: [
|
|
5455
5457
|
/* @__PURE__ */ N("div", { className: "vx-timepicker__columns", children: [
|
|
5456
|
-
/* @__PURE__ */ a(pt, { value: g, min: 0, max: 23, onChange:
|
|
5458
|
+
/* @__PURE__ */ a(pt, { value: g, min: 0, max: 23, onChange: F, label: "Hours" }),
|
|
5457
5459
|
/* @__PURE__ */ a("span", { className: "vx-timepicker__sep", children: ":" }),
|
|
5458
5460
|
/* @__PURE__ */ a(pt, { value: _, min: 0, max: 59, onChange: j, label: "Minutes" }),
|
|
5459
5461
|
d && /* @__PURE__ */ N(J, { children: [
|
|
@@ -5475,7 +5477,7 @@ function ac({
|
|
|
5475
5477
|
]
|
|
5476
5478
|
}
|
|
5477
5479
|
);
|
|
5478
|
-
return M ? Te(
|
|
5480
|
+
return M ? Te(H, document.body) : H;
|
|
5479
5481
|
})()
|
|
5480
5482
|
] });
|
|
5481
5483
|
}
|
|
@@ -5490,7 +5492,7 @@ function oc({
|
|
|
5490
5492
|
onFiles: i,
|
|
5491
5493
|
className: d
|
|
5492
5494
|
}) {
|
|
5493
|
-
const [c, u] =
|
|
5495
|
+
const [c, u] = I(!1), [v, x] = I([]), [k, S] = I(), g = B(null), h = Y(
|
|
5494
5496
|
(b) => {
|
|
5495
5497
|
if (!b) return;
|
|
5496
5498
|
const w = Array.from(b);
|
|
@@ -5601,8 +5603,8 @@ function sc({
|
|
|
5601
5603
|
/* @__PURE__ */ N(Lt, { className: T("vx-sheet", `vx-sheet--${r}`, l), children: [
|
|
5602
5604
|
/* @__PURE__ */ N("div", { className: "vx-sheet__header", children: [
|
|
5603
5605
|
/* @__PURE__ */ N("div", { children: [
|
|
5604
|
-
t ? /* @__PURE__ */ a(
|
|
5605
|
-
n ? /* @__PURE__ */ a(
|
|
5606
|
+
t ? /* @__PURE__ */ a(It, { className: "vx-sheet__title", children: t }) : null,
|
|
5607
|
+
n ? /* @__PURE__ */ a(Ft, { className: "vx-sheet__description", children: n }) : null
|
|
5606
5608
|
] }),
|
|
5607
5609
|
/* @__PURE__ */ a(Ce, { className: "vx-dialog__close", "aria-label": "Close", children: /* @__PURE__ */ a(le, { size: 16 }) })
|
|
5608
5610
|
] }),
|
|
@@ -5644,7 +5646,7 @@ function lc({
|
|
|
5644
5646
|
onClick: l,
|
|
5645
5647
|
...i
|
|
5646
5648
|
}) {
|
|
5647
|
-
const [d, c] =
|
|
5649
|
+
const [d, c] = I(t), u = e !== void 0, v = u ? e : d, x = (k) => {
|
|
5648
5650
|
u || c((S) => !S), n == null || n(!v), l == null || l(k);
|
|
5649
5651
|
};
|
|
5650
5652
|
return /* @__PURE__ */ a(
|
|
@@ -5668,7 +5670,7 @@ function cc({
|
|
|
5668
5670
|
size: s = "md",
|
|
5669
5671
|
className: l
|
|
5670
5672
|
}) {
|
|
5671
|
-
const [i, d] =
|
|
5673
|
+
const [i, d] = I(
|
|
5672
5674
|
n ?? (o === "multiple" ? [] : "")
|
|
5673
5675
|
), c = t !== void 0, u = c ? t : i, v = (k) => Array.isArray(u) ? u.includes(k) : u === k, x = (k) => {
|
|
5674
5676
|
let S;
|
|
@@ -5698,7 +5700,7 @@ function cc({
|
|
|
5698
5700
|
)) });
|
|
5699
5701
|
}
|
|
5700
5702
|
function dc({ groups: e, items: t, children: n, className: r }) {
|
|
5701
|
-
const [o, s] =
|
|
5703
|
+
const [o, s] = I(null), l = B(null), i = e ?? (t ? [{ items: t }] : []);
|
|
5702
5704
|
U(() => {
|
|
5703
5705
|
if (!o) return;
|
|
5704
5706
|
const c = (v) => {
|
|
@@ -5760,7 +5762,7 @@ function uc({
|
|
|
5760
5762
|
children: r,
|
|
5761
5763
|
className: o
|
|
5762
5764
|
}) {
|
|
5763
|
-
const [s, l] =
|
|
5765
|
+
const [s, l] = I(!1), i = B(null), d = Y(() => {
|
|
5764
5766
|
i.current = setTimeout(() => l(!0), n);
|
|
5765
5767
|
}, [n]), c = Y(() => {
|
|
5766
5768
|
i.current && clearTimeout(i.current), l(!1);
|
|
@@ -5781,7 +5783,7 @@ function uc({
|
|
|
5781
5783
|
);
|
|
5782
5784
|
}
|
|
5783
5785
|
function pc({ menus: e, className: t }) {
|
|
5784
|
-
const [n, r] =
|
|
5786
|
+
const [n, r] = I(null), o = B(null);
|
|
5785
5787
|
return U(() => {
|
|
5786
5788
|
if (n === null) return;
|
|
5787
5789
|
const s = (i) => {
|
|
@@ -5842,7 +5844,7 @@ function pc({ menus: e, className: t }) {
|
|
|
5842
5844
|
}) });
|
|
5843
5845
|
}
|
|
5844
5846
|
function vc({ items: e, className: t }) {
|
|
5845
|
-
const [n, r] =
|
|
5847
|
+
const [n, r] = I(null), o = B(null);
|
|
5846
5848
|
return U(() => {
|
|
5847
5849
|
if (n === null) return;
|
|
5848
5850
|
const s = (i) => {
|
|
@@ -5983,7 +5985,7 @@ function gc({
|
|
|
5983
5985
|
showArrows: d = !0,
|
|
5984
5986
|
className: c
|
|
5985
5987
|
}) {
|
|
5986
|
-
const u = n !== void 0, [v, x] =
|
|
5988
|
+
const u = n !== void 0, [v, x] = I(t), k = u ? n : v, S = e.length, g = B(null), h = Y(
|
|
5987
5989
|
(m) => {
|
|
5988
5990
|
let f = m;
|
|
5989
5991
|
l ? f = (m % S + S) % S : f = Math.max(0, Math.min(m, S - 1)), u || x(f), r == null || r(f);
|
|
@@ -6103,7 +6105,7 @@ function bc({
|
|
|
6103
6105
|
className: d,
|
|
6104
6106
|
size: c = "md"
|
|
6105
6107
|
}) {
|
|
6106
|
-
const u = e !== void 0, [v, x] =
|
|
6108
|
+
const u = e !== void 0, [v, x] = I(t), k = u ? e : v, [S, g] = I(null), h = S ?? k, _ = (f, b) => {
|
|
6107
6109
|
if (!o) return f;
|
|
6108
6110
|
const w = b.currentTarget.getBoundingClientRect();
|
|
6109
6111
|
return b.clientX - w.left < w.width / 2 ? f - 0.5 : f;
|
|
@@ -6145,7 +6147,7 @@ function bc({
|
|
|
6145
6147
|
}
|
|
6146
6148
|
);
|
|
6147
6149
|
}
|
|
6148
|
-
function
|
|
6150
|
+
function Hr({ node: e, depth: t, selected: n, expanded: r, onSelect: o, onToggle: s }) {
|
|
6149
6151
|
const l = e.children && e.children.length > 0, i = r.has(e.id), d = n === e.id, c = (u) => {
|
|
6150
6152
|
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), e.disabled || o(e.id, e)), u.key === "ArrowRight" && l && !i && (u.preventDefault(), s(e.id)), u.key === "ArrowLeft" && i && (u.preventDefault(), s(e.id));
|
|
6151
6153
|
};
|
|
@@ -6180,7 +6182,7 @@ function Wr({ node: e, depth: t, selected: n, expanded: r, onSelect: o, onToggle
|
|
|
6180
6182
|
}
|
|
6181
6183
|
),
|
|
6182
6184
|
l && i && /* @__PURE__ */ a("ul", { role: "group", className: "vx-tree__children", children: e.children.map((u) => /* @__PURE__ */ a(
|
|
6183
|
-
|
|
6185
|
+
Hr,
|
|
6184
6186
|
{
|
|
6185
6187
|
node: u,
|
|
6186
6188
|
depth: t + 1,
|
|
@@ -6203,7 +6205,7 @@ function xc({
|
|
|
6203
6205
|
onExpandedChange: l,
|
|
6204
6206
|
className: i
|
|
6205
6207
|
}) {
|
|
6206
|
-
const d = t !== void 0, [c, u] =
|
|
6208
|
+
const d = t !== void 0, [c, u] = I(n), v = d ? t : c, x = s !== void 0, [k, S] = I(
|
|
6207
6209
|
new Set(o)
|
|
6208
6210
|
), g = x ? new Set(s) : k, h = Y(
|
|
6209
6211
|
(p, m) => {
|
|
@@ -6224,7 +6226,7 @@ function xc({
|
|
|
6224
6226
|
role: "tree",
|
|
6225
6227
|
"aria-multiselectable": "false",
|
|
6226
6228
|
children: e.map((p) => /* @__PURE__ */ a(
|
|
6227
|
-
|
|
6229
|
+
Hr,
|
|
6228
6230
|
{
|
|
6229
6231
|
node: p,
|
|
6230
6232
|
depth: 0,
|
|
@@ -6253,7 +6255,7 @@ function yc({
|
|
|
6253
6255
|
className: v,
|
|
6254
6256
|
...x
|
|
6255
6257
|
}) {
|
|
6256
|
-
const k = e !== void 0, [S, g] =
|
|
6258
|
+
const k = e !== void 0, [S, g] = I(t), h = k ? e : S, [_, p] = I(""), [m, f] = I(), b = B(null), w = (P) => {
|
|
6257
6259
|
k || g(P), n == null || n(P);
|
|
6258
6260
|
}, E = (P) => {
|
|
6259
6261
|
const L = P.trim();
|
|
@@ -6403,7 +6405,7 @@ function _c({
|
|
|
6403
6405
|
showPresets: d = !0,
|
|
6404
6406
|
className: c
|
|
6405
6407
|
}) {
|
|
6406
|
-
const u = e !== void 0, [v, x] =
|
|
6408
|
+
const u = e !== void 0, [v, x] = I(t), k = u ? e : v, [S, g] = I(k), [h, _] = I(!1), p = B(null);
|
|
6407
6409
|
U(() => {
|
|
6408
6410
|
if (!h) return;
|
|
6409
6411
|
const A = (R) => {
|
|
@@ -6571,7 +6573,7 @@ function Nc({
|
|
|
6571
6573
|
className: e,
|
|
6572
6574
|
direction: t = "horizontal"
|
|
6573
6575
|
}) {
|
|
6574
|
-
const n = B(!1), [r, o] =
|
|
6576
|
+
const n = B(!1), [r, o] = I(!1), s = Y(
|
|
6575
6577
|
(l) => {
|
|
6576
6578
|
const i = l.currentTarget, d = i.previousElementSibling, c = i.nextElementSibling;
|
|
6577
6579
|
if (!d || !c) return;
|
|
@@ -6630,7 +6632,7 @@ function Sc({
|
|
|
6630
6632
|
labelGo: d = "Go",
|
|
6631
6633
|
labelClose: c = "Close"
|
|
6632
6634
|
}) {
|
|
6633
|
-
const [u, v] =
|
|
6635
|
+
const [u, v] = I(""), [x, k] = I(0), S = B(null), g = B(null), h = u.trim() ? e.map((f) => ({ entry: f, s: Di(f, u.trim()) })).filter((f) => f.s > 0).sort((f, b) => b.s - f.s).map((f) => f.entry) : e;
|
|
6634
6636
|
U(() => {
|
|
6635
6637
|
t && (v(""), k(0), setTimeout(() => {
|
|
6636
6638
|
var f;
|
|
@@ -6740,7 +6742,7 @@ function Li(e) {
|
|
|
6740
6742
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6741
6743
|
}
|
|
6742
6744
|
var ft = { exports: {} }, vn;
|
|
6743
|
-
function
|
|
6745
|
+
function Ii() {
|
|
6744
6746
|
return vn || (vn = 1, (function(e) {
|
|
6745
6747
|
var t = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
|
|
6746
6748
|
/**
|
|
@@ -7364,36 +7366,36 @@ function Fi() {
|
|
|
7364
7366
|
for (var R = 0; R < C.length; ++R) {
|
|
7365
7367
|
if (E && E.cause == A + "," + R)
|
|
7366
7368
|
return;
|
|
7367
|
-
var P = C[R], L = P.inside, z = !!P.lookbehind,
|
|
7368
|
-
if (
|
|
7369
|
+
var P = C[R], L = P.inside, z = !!P.lookbehind, F = !!P.greedy, j = P.alias;
|
|
7370
|
+
if (F && !P.pattern.global) {
|
|
7369
7371
|
var K = P.pattern.toString().match(/[imsuy]*$/)[0];
|
|
7370
7372
|
P.pattern = RegExp(P.pattern.source, K + "g");
|
|
7371
7373
|
}
|
|
7372
7374
|
for (var Z = P.pattern || P, M = b.next, O = w; M !== m.tail && !(E && O >= E.reach); O += M.value.length, M = M.next) {
|
|
7373
|
-
var
|
|
7375
|
+
var H = M.value;
|
|
7374
7376
|
if (m.length > p.length)
|
|
7375
7377
|
return;
|
|
7376
|
-
if (!(
|
|
7378
|
+
if (!(H instanceof d)) {
|
|
7377
7379
|
var D = 1, $;
|
|
7378
|
-
if (
|
|
7380
|
+
if (F) {
|
|
7379
7381
|
if ($ = c(Z, O, p, z), !$ || $.index >= p.length)
|
|
7380
7382
|
break;
|
|
7381
|
-
var te = $.index,
|
|
7383
|
+
var te = $.index, W = $.index + $[0].length, G = O;
|
|
7382
7384
|
for (G += M.value.length; te >= G; )
|
|
7383
7385
|
M = M.next, G += M.value.length;
|
|
7384
7386
|
if (G -= M.value.length, O = G, M.value instanceof d)
|
|
7385
7387
|
continue;
|
|
7386
|
-
for (var X = M; X !== m.tail && (G <
|
|
7388
|
+
for (var X = M; X !== m.tail && (G < W || typeof X.value == "string"); X = X.next)
|
|
7387
7389
|
D++, G += X.value.length;
|
|
7388
|
-
D--,
|
|
7389
|
-
} else if ($ = c(Z, 0,
|
|
7390
|
+
D--, H = p.slice(O, G), $.index -= O;
|
|
7391
|
+
} else if ($ = c(Z, 0, H, z), !$)
|
|
7390
7392
|
continue;
|
|
7391
|
-
var te = $.index, ue = $[0], et =
|
|
7393
|
+
var te = $.index, ue = $[0], et = H.slice(0, te), Ut = H.slice(te + ue.length), tt = O + H.length;
|
|
7392
7394
|
E && tt > E.reach && (E.reach = tt);
|
|
7393
|
-
var
|
|
7394
|
-
et && (
|
|
7395
|
+
var Ie = M.prev;
|
|
7396
|
+
et && (Ie = x(m, Ie, et), O += et.length), k(m, Ie, D);
|
|
7395
7397
|
var Gr = new d(A, L ? i.tokenize(ue, L) : ue, j, ue);
|
|
7396
|
-
if (M = x(m,
|
|
7398
|
+
if (M = x(m, Ie, Gr), Ut && x(m, M, Ut), D > 1) {
|
|
7397
7399
|
var nt = {
|
|
7398
7400
|
cause: A + "," + R,
|
|
7399
7401
|
reach: tt
|
|
@@ -7898,8 +7900,8 @@ function Fi() {
|
|
|
7898
7900
|
})();
|
|
7899
7901
|
})(ft)), ft.exports;
|
|
7900
7902
|
}
|
|
7901
|
-
var
|
|
7902
|
-
const
|
|
7903
|
+
var Fi = Ii();
|
|
7904
|
+
const He = /* @__PURE__ */ Li(Fi);
|
|
7903
7905
|
Prism.languages.markup = {
|
|
7904
7906
|
comment: {
|
|
7905
7907
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
@@ -8598,9 +8600,9 @@ function Ec({
|
|
|
8598
8600
|
copiedLabel: r,
|
|
8599
8601
|
onCopy: o
|
|
8600
8602
|
}) {
|
|
8601
|
-
const [s, l] =
|
|
8602
|
-
const u =
|
|
8603
|
-
return u ?
|
|
8603
|
+
const [s, l] = I(!1), i = B(null), d = Se(() => {
|
|
8604
|
+
const u = He.languages[t] ?? He.languages.tsx ?? He.languages.typescript;
|
|
8605
|
+
return u ? He.highlight(e, u, t) : e;
|
|
8604
8606
|
}, [e, t]);
|
|
8605
8607
|
U(() => () => {
|
|
8606
8608
|
i.current && clearTimeout(i.current);
|
|
@@ -8634,9 +8636,9 @@ function Ec({
|
|
|
8634
8636
|
) })
|
|
8635
8637
|
] });
|
|
8636
8638
|
}
|
|
8637
|
-
const Oi = "1.3.
|
|
8639
|
+
const Oi = "1.3.3", $i = {
|
|
8638
8640
|
version: Oi
|
|
8639
|
-
}, Ve = `v${$i.version}`,
|
|
8641
|
+
}, Ve = `v${$i.version}`, Wr = {
|
|
8640
8642
|
locale: "en",
|
|
8641
8643
|
label: "English",
|
|
8642
8644
|
searchPlaceholder: "Search components, pages, keywords…",
|
|
@@ -8909,7 +8911,7 @@ const Oi = "1.3.1", $i = {
|
|
|
8909
8911
|
elements: {
|
|
8910
8912
|
section: "Components",
|
|
8911
8913
|
title: "Elements",
|
|
8912
|
-
description: "
|
|
8914
|
+
description: "Button, Badge, Text, Heading, CodeBlock, and LanguageSwitcher form the atomic foundation of the UI.",
|
|
8913
8915
|
guidance: [
|
|
8914
8916
|
"One primary action per area is usually enough.",
|
|
8915
8917
|
"Use badges for compact status or category metadata, not decoration.",
|
|
@@ -8971,7 +8973,7 @@ const Oi = "1.3.1", $i = {
|
|
|
8971
8973
|
feedback: {
|
|
8972
8974
|
section: "Components",
|
|
8973
8975
|
title: "Feedback Components",
|
|
8974
|
-
description: "
|
|
8976
|
+
description: "Alert, Progress, Skeleton, Spinner, Stepper, and Toast indicate application state without blocking layouts.",
|
|
8975
8977
|
guidance: [
|
|
8976
8978
|
"Use Spinner for short indeterminate waits; Progress for deterministic operations.",
|
|
8977
8979
|
"Prefer Alert over toast for persistent or page-level status messages.",
|
|
@@ -8981,7 +8983,7 @@ const Oi = "1.3.1", $i = {
|
|
|
8981
8983
|
overlays: {
|
|
8982
8984
|
section: "Components",
|
|
8983
8985
|
title: "Overlays",
|
|
8984
|
-
description: "Tooltip, Popover, and DropdownMenu layer transient content above the page
|
|
8986
|
+
description: "Dialog, AlertDialog, ContextMenu, HoverCard, Tooltip, Popover, and DropdownMenu layer transient content and actions above the page.",
|
|
8985
8987
|
guidance: [
|
|
8986
8988
|
"Tooltips are for supplementary text only — never interactive content.",
|
|
8987
8989
|
"Popovers can contain forms and rich content; they require explicit close triggers.",
|
|
@@ -8991,7 +8993,7 @@ const Oi = "1.3.1", $i = {
|
|
|
8991
8993
|
"nav-layout": {
|
|
8992
8994
|
section: "Components",
|
|
8993
8995
|
title: "Navigation & Layout",
|
|
8994
|
-
description: "Breadcrumb,
|
|
8996
|
+
description: "Tabs, Accordion, Breadcrumb, Menubar, NavigationMenu, ScrollArea, Separator, Resizable, and Sheet structure content hierarchically.",
|
|
8995
8997
|
guidance: [
|
|
8996
8998
|
"Breadcrumb mirrors route depth — omit it on single-level pages.",
|
|
8997
8999
|
"Pagination should show page count so users understand the data set size.",
|
|
@@ -9001,7 +9003,7 @@ const Oi = "1.3.1", $i = {
|
|
|
9001
9003
|
"data-display": {
|
|
9002
9004
|
section: "Components",
|
|
9003
9005
|
title: "Data Display",
|
|
9004
|
-
description: "Avatar
|
|
9006
|
+
description: "Avatar, Card, Badge, Table, Carousel, Timeline, TreeView, and EmptyState present rich data compactly.",
|
|
9005
9007
|
guidance: [
|
|
9006
9008
|
"Avatar should always have an accessible label, even when showing an image.",
|
|
9007
9009
|
"Table supports sortable columns — delegate sort state up when the data is server-side.",
|
|
@@ -9011,11 +9013,12 @@ const Oi = "1.3.1", $i = {
|
|
|
9011
9013
|
"form-inputs": {
|
|
9012
9014
|
section: "Components",
|
|
9013
9015
|
title: "Form Inputs",
|
|
9014
|
-
description: "Select, Checkbox,
|
|
9016
|
+
description: "Select, Checkbox, Radio, Textarea, Switch, Slider, Input, Label, NumberInput, TagInput, ColorPicker, DatePicker, FileUpload, Rating, Toggle, SegmentedControl, and Calendar extend the form vocabulary beyond text inputs.",
|
|
9015
9017
|
guidance: [
|
|
9016
9018
|
"Group radio buttons with RadioGroup to share name and semantics.",
|
|
9017
9019
|
"Slider is ideal for numeric ranges; pair it with showValue for immediate feedback.",
|
|
9018
|
-
"Textarea defaults to vertical resize — disable resize only in fixed-height containers."
|
|
9020
|
+
"Textarea defaults to vertical resize — disable resize only in fixed-height containers.",
|
|
9021
|
+
"Use Switch for immediate state toggles (like settings), and Checkbox for form submissions or multi-selections."
|
|
9019
9022
|
]
|
|
9020
9023
|
},
|
|
9021
9024
|
mobile: {
|
|
@@ -9392,7 +9395,7 @@ const Oi = "1.3.1", $i = {
|
|
|
9392
9395
|
elements: {
|
|
9393
9396
|
section: "组件",
|
|
9394
9397
|
title: "基础元素",
|
|
9395
|
-
description: "
|
|
9398
|
+
description: "Button、Badge、Text、Heading、CodeBlock 和 LanguageSwitcher 构成 UI 的原子基础。",
|
|
9396
9399
|
guidance: [
|
|
9397
9400
|
"每个区域通常一个主操作就足够了。",
|
|
9398
9401
|
"徽章用于紧凑的状态或分类元数据,而非纯装饰。",
|
|
@@ -9454,7 +9457,7 @@ const Oi = "1.3.1", $i = {
|
|
|
9454
9457
|
feedback: {
|
|
9455
9458
|
section: "组件",
|
|
9456
9459
|
title: "反馈组件",
|
|
9457
|
-
description: "
|
|
9460
|
+
description: "Alert、Progress、Skeleton、Spinner、Stepper 和 Toast 在不阻塞布局的情况下指示应用状态。",
|
|
9458
9461
|
guidance: [
|
|
9459
9462
|
"对短暂的不确定等待使用 Spinner;对确定性操作使用 Progress。",
|
|
9460
9463
|
"对持久性或页面级状态消息,优先使用 Alert 而非 Toast。",
|
|
@@ -9464,7 +9467,7 @@ const Oi = "1.3.1", $i = {
|
|
|
9464
9467
|
overlays: {
|
|
9465
9468
|
section: "组件",
|
|
9466
9469
|
title: "浮层",
|
|
9467
|
-
description: "Tooltip、Popover 和 DropdownMenu
|
|
9470
|
+
description: "Dialog、AlertDialog、ContextMenu、HoverCard、Tooltip、Popover 和 DropdownMenu 在页面上方将临时内容和操作置于上方。",
|
|
9468
9471
|
guidance: [
|
|
9469
9472
|
"Tooltip 仅用于补充文本,绝不放置可交互内容。",
|
|
9470
9473
|
"Popover 可包含表单和富内容;需要明确的关闭触发器。",
|
|
@@ -9474,7 +9477,7 @@ const Oi = "1.3.1", $i = {
|
|
|
9474
9477
|
"nav-layout": {
|
|
9475
9478
|
section: "组件",
|
|
9476
9479
|
title: "导航与布局",
|
|
9477
|
-
description: "Breadcrumb、
|
|
9480
|
+
description: "Tabs、Accordion、Breadcrumb、Menubar、NavigationMenu、ScrollArea、Separator、Resizable 和 Sheet 以层级方式构筑内容。",
|
|
9478
9481
|
guidance: [
|
|
9479
9482
|
"Breadcrumb 反映路由深度——单层页面可省略。",
|
|
9480
9483
|
"Pagination 应显示总页数,让用户了解数据集大小。",
|
|
@@ -9484,7 +9487,7 @@ const Oi = "1.3.1", $i = {
|
|
|
9484
9487
|
"data-display": {
|
|
9485
9488
|
section: "组件",
|
|
9486
9489
|
title: "数据展示",
|
|
9487
|
-
description: "Avatar 和
|
|
9490
|
+
description: "Avatar、Card、Badge、Table、Carousel、Timeline、TreeView 和 EmptyState 紧凑地呈现丰富数据。",
|
|
9488
9491
|
guidance: [
|
|
9489
9492
|
"Avatar 即使在显示图片时也应始终具有无障碍标签。",
|
|
9490
9493
|
"Table 支持可排序列——数据来自服务端时应将排序状态提升。",
|
|
@@ -9494,11 +9497,12 @@ const Oi = "1.3.1", $i = {
|
|
|
9494
9497
|
"form-inputs": {
|
|
9495
9498
|
section: "组件",
|
|
9496
9499
|
title: "表单输入",
|
|
9497
|
-
description: "Select、Checkbox、
|
|
9500
|
+
description: "Select、Checkbox、Radio、Textarea、Switch、Slider、Input、Label、NumberInput、TagInput、ColorPicker、DatePicker、FileUpload、Rating、Toggle、SegmentedControl 和 Calendar 将表单词汇扩展到文本输入之外。",
|
|
9498
9501
|
guidance: [
|
|
9499
9502
|
"使用 RadioGroup 包裹单选按钮,共享 name 和语义。",
|
|
9500
9503
|
"Slider 适合数值范围;配合 showValue 可获得即时反馈。",
|
|
9501
|
-
"Textarea 默认纵向可拖拽——仅在固定高度容器中禁用 resize。"
|
|
9504
|
+
"Textarea 默认纵向可拖拽——仅在固定高度容器中禁用 resize。",
|
|
9505
|
+
"使用 Switch 并在交互后立即生效(例如设置开启或关闭),使用 Checkbox 用于表单提交或多项选择。"
|
|
9502
9506
|
]
|
|
9503
9507
|
},
|
|
9504
9508
|
mobile: {
|
|
@@ -9602,8 +9606,8 @@ const Oi = "1.3.1", $i = {
|
|
|
9602
9606
|
]
|
|
9603
9607
|
}
|
|
9604
9608
|
}
|
|
9605
|
-
}, hn = { en:
|
|
9606
|
-
t:
|
|
9609
|
+
}, hn = { en: Wr, zh: Bi }, zi = we({
|
|
9610
|
+
t: Wr,
|
|
9607
9611
|
locale: "en",
|
|
9608
9612
|
setLocale: () => {
|
|
9609
9613
|
}
|
|
@@ -9612,7 +9616,7 @@ function Ui() {
|
|
|
9612
9616
|
return _e(zi);
|
|
9613
9617
|
}
|
|
9614
9618
|
function Cc({ variant: e = "inline", className: t }) {
|
|
9615
|
-
const { locale: n, setLocale: r } = Ui(), o = Object.entries(hn), s = hn[n], [l, i] =
|
|
9619
|
+
const { locale: n, setLocale: r } = Ui(), o = Object.entries(hn), s = hn[n], [l, i] = I(!1), d = B(null);
|
|
9616
9620
|
return U(() => {
|
|
9617
9621
|
if (!l) return;
|
|
9618
9622
|
const u = (v) => {
|
|
@@ -9679,7 +9683,7 @@ export {
|
|
|
9679
9683
|
Sl as Alert,
|
|
9680
9684
|
ec as AlertDialog,
|
|
9681
9685
|
Vi as AppShell,
|
|
9682
|
-
|
|
9686
|
+
Il as Avatar,
|
|
9683
9687
|
qi as Badge,
|
|
9684
9688
|
Bl as BottomNav,
|
|
9685
9689
|
Pl as Breadcrumb,
|
|
@@ -9717,9 +9721,9 @@ export {
|
|
|
9717
9721
|
pc as Menubar,
|
|
9718
9722
|
jl as MobileDrawer,
|
|
9719
9723
|
$l as MobileIconButton,
|
|
9720
|
-
|
|
9724
|
+
Hl as MobileList,
|
|
9721
9725
|
Gl as MobileListItem,
|
|
9722
|
-
|
|
9726
|
+
Wl as MobileListSection,
|
|
9723
9727
|
Ml as MobileShell,
|
|
9724
9728
|
Ol as MobileTopBar,
|
|
9725
9729
|
rc as MultiSelect,
|
|
@@ -9754,7 +9758,7 @@ export {
|
|
|
9754
9758
|
kl as Spinner,
|
|
9755
9759
|
fc as Stepper,
|
|
9756
9760
|
al as Switch,
|
|
9757
|
-
|
|
9761
|
+
Fl as Table,
|
|
9758
9762
|
ol as Tabs,
|
|
9759
9763
|
ll as TabsContent,
|
|
9760
9764
|
sl as TabsList,
|