@npm-questionpro/wick-ui-lib 2.4.0 ā 2.5.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/dist/components/appHeader/components/productSwitcher/ui/_productItem.d.ts +0 -1
- package/dist/components/appHeader/components/productSwitcher/ui/_productList.d.ts +0 -1
- package/dist/style.css +1 -1
- package/dist/translate/WuTranslateContext.d.ts +2 -0
- package/dist/translate/wtCache.d.ts +15 -0
- package/dist/wick-ui-lib/es/index.js +837 -775
- package/package.json +3 -3
|
@@ -319,7 +319,7 @@ var Je = {
|
|
|
319
319
|
})]
|
|
320
320
|
}) })
|
|
321
321
|
}) });
|
|
322
|
-
}, Xe = { wuButton: "
|
|
322
|
+
}, Xe = { wuButton: "_wuButton_d6dvg_1" }, Ze = n.forwardRef((e, t) => Qe(e, t)), Qe = (e, t) => {
|
|
323
323
|
let { size: n = "md", color: r = "#1B87E6", variant: i = "dots", ...a } = e, o = K("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container"), s = "7px";
|
|
324
324
|
n === "sm" ? s = "7px" : n === "md" ? s = "12px" : n === "lg" ? s = "18px" : typeof n == "string" && (s = n);
|
|
325
325
|
let c = {
|
|
@@ -844,15 +844,15 @@ var gt = ({ buttonRef: e, handleDropdownToggle: t, handleKeyDown: n, isDropdownO
|
|
|
844
844
|
e382: "wp-suite-cx",
|
|
845
845
|
e308: "wp-surveys",
|
|
846
846
|
e315: "wp-workforce"
|
|
847
|
-
}, yt = ({ product: e,
|
|
848
|
-
let
|
|
847
|
+
}, yt = ({ product: e, activeProductName: t, dir: n, focusItem: r, setFocusItem: i }) => {
|
|
848
|
+
let a = e.name === t, [o, s] = m(a), c = !e.active, l = K("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center", a && "wu-text-blue-q wu-font-normal", !e.active && "wu-text-gray-subtle", o && "wu-font-normal", e.active && o && "wu-text-blue-q"), u = K("wu-text-blue-p wu-text-base", a && "wu-text-blue-q", !e.active && "wu-text-gray-subtle", e.active && o && "wu-text-blue-q"), d = o || r === e.name || a ? "#1b3380" : "#c5cce0";
|
|
849
849
|
return /* @__PURE__ */ b("li", {
|
|
850
|
-
className: K(Y.productListItem, "focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item", (
|
|
850
|
+
className: K(Y.productListItem, "focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item", (a || o) && Y.activeProduct, e.name.length > 15 && window.innerWidth > 768 && "wu-w-[130px] wu-min-w-[130px]", r === e.name && Y.activeProduct, "wu-product-item"),
|
|
851
851
|
onMouseOver: () => s(!0),
|
|
852
852
|
onMouseOut: () => s(!1),
|
|
853
853
|
"aria-label": e.name,
|
|
854
|
-
"aria-disabled":
|
|
855
|
-
dir:
|
|
854
|
+
"aria-disabled": c,
|
|
855
|
+
dir: n,
|
|
856
856
|
onKeyDown: (e) => {
|
|
857
857
|
if (e.key === "Enter") {
|
|
858
858
|
e.preventDefault();
|
|
@@ -861,44 +861,43 @@ var gt = ({ buttonRef: e, handleDropdownToggle: t, handleKeyDown: n, isDropdownO
|
|
|
861
861
|
}
|
|
862
862
|
},
|
|
863
863
|
onFocus: () => {
|
|
864
|
-
|
|
864
|
+
i(e.name);
|
|
865
865
|
},
|
|
866
|
-
onBlur: () =>
|
|
866
|
+
onBlur: () => i(""),
|
|
867
867
|
children: [/* @__PURE__ */ y("div", {
|
|
868
|
-
className: K(Y.topBorder,
|
|
869
|
-
style: { backgroundColor:
|
|
868
|
+
className: K(Y.topBorder, n === "rtl" && Y.topBorderRtl),
|
|
869
|
+
style: { backgroundColor: c ? "#ffcf70" : d }
|
|
870
870
|
}), /* @__PURE__ */ b("a", {
|
|
871
871
|
className: K(Y.productLink, "focus:wu-outline-none focus-visible:wu-outline-none"),
|
|
872
872
|
href: e.link || "#",
|
|
873
873
|
tabIndex: 0,
|
|
874
874
|
children: [/* @__PURE__ */ y("span", {
|
|
875
|
-
className: K(
|
|
875
|
+
className: K(u, vt[e.icon || ""]),
|
|
876
876
|
"aria-hidden": !0
|
|
877
877
|
}), /* @__PURE__ */ y("span", {
|
|
878
|
-
className: K(
|
|
878
|
+
className: K(l),
|
|
879
879
|
children: e.name
|
|
880
880
|
})]
|
|
881
881
|
})]
|
|
882
882
|
}, e.name);
|
|
883
|
-
}, bt = ({ category: e,
|
|
884
|
-
let { products:
|
|
883
|
+
}, bt = ({ category: e, activeProductName: t, dir: n = "ltr", focusItem: r, setFocusItem: i, borderColorLocked: a = "#f5a300" }) => {
|
|
884
|
+
let { products: o = [], active: s } = e, c = f(() => o.filter((e) => e.active).sort((e, t) => (e.order || 100) - (t.order || 100)), [o]), l = f(() => o.filter((e) => !e.active), [o]), [u, d] = m(a), p = (e) => e.map((e, a) => /* @__PURE__ */ y(yt, {
|
|
885
885
|
product: e,
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
u.length > 0 && /* @__PURE__ */ b("li", {
|
|
886
|
+
activeProductName: t,
|
|
887
|
+
dir: n,
|
|
888
|
+
focusItem: r,
|
|
889
|
+
setFocusItem: i
|
|
890
|
+
}, a));
|
|
891
|
+
return s ? /* @__PURE__ */ b(v, { children: [
|
|
892
|
+
p(c),
|
|
893
|
+
l.length > 0 && /* @__PURE__ */ b("li", {
|
|
895
894
|
className: K(Y.productListItem, "focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),
|
|
896
|
-
onMouseOver: () =>
|
|
897
|
-
onMouseOut: () =>
|
|
895
|
+
onMouseOver: () => d("#f5a300"),
|
|
896
|
+
onMouseOut: () => d(a),
|
|
898
897
|
"aria-label": "Upgrade to unlock",
|
|
899
898
|
children: [/* @__PURE__ */ y("div", {
|
|
900
|
-
className: K(Y.topBorder,
|
|
901
|
-
style: { backgroundColor:
|
|
899
|
+
className: K(Y.topBorder, n === "rtl" && Y.topBorderRtl),
|
|
900
|
+
style: { backgroundColor: u },
|
|
902
901
|
"aria-label": "top-border"
|
|
903
902
|
}), /* @__PURE__ */ b("a", {
|
|
904
903
|
href: "https://www.questionpro.com/a/showUpgradeUser.do",
|
|
@@ -913,16 +912,16 @@ var gt = ({ buttonRef: e, handleDropdownToggle: t, handleKeyDown: n, isDropdownO
|
|
|
913
912
|
})]
|
|
914
913
|
})]
|
|
915
914
|
}),
|
|
916
|
-
|
|
915
|
+
p(l)
|
|
917
916
|
] }) : /* @__PURE__ */ b("li", {
|
|
918
|
-
className: K(Y.productListItem, Y.learnMore, "focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",
|
|
917
|
+
className: K(Y.productListItem, Y.learnMore, "focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]", r === "learn" && "activeProduct"),
|
|
919
918
|
tabIndex: 0,
|
|
920
|
-
onFocus: () =>
|
|
921
|
-
onBlur: () =>
|
|
919
|
+
onFocus: () => i("learn"),
|
|
920
|
+
onBlur: () => i(""),
|
|
922
921
|
"aria-label": "Learn More",
|
|
923
922
|
children: [/* @__PURE__ */ y("div", {
|
|
924
|
-
className: K(Y.topBorder,
|
|
925
|
-
style: { backgroundColor:
|
|
923
|
+
className: K(Y.topBorder, n === "rtl" && Y.topBorderRtl),
|
|
924
|
+
style: { backgroundColor: a }
|
|
926
925
|
}), /* @__PURE__ */ y("a", {
|
|
927
926
|
className: Y.productLink,
|
|
928
927
|
href: "https://www.questionpro.com/a/showUpgradeUser.do",
|
|
@@ -969,7 +968,6 @@ var gt = ({ buttonRef: e, handleDropdownToggle: t, handleKeyDown: n, isDropdownO
|
|
|
969
968
|
category: e,
|
|
970
969
|
dir: t,
|
|
971
970
|
activeProductName: c,
|
|
972
|
-
currentProduct: e.name,
|
|
973
971
|
focusItem: l,
|
|
974
972
|
setFocusItem: d,
|
|
975
973
|
borderColorLocked: "#ffcf70"
|
|
@@ -2285,62 +2283,84 @@ var Wn = n.memo(n.forwardRef(({ className: e, Label: t, labelPosition: r = "top"
|
|
|
2285
2283
|
Wn.displayName = "WuInput";
|
|
2286
2284
|
//#endregion
|
|
2287
2285
|
//#region src/components/combobox/ui/_tags.tsx
|
|
2288
|
-
var Gn = ({ tags: e, triggerRef: t }) => {
|
|
2289
|
-
let [n, r] = m([]), [i, a] = m([]), o =
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
}), [i]), s = (e) => {
|
|
2296
|
-
let t = document.createElement("div");
|
|
2297
|
-
Object.assign(t.style, {
|
|
2298
|
-
display: "inline-block",
|
|
2299
|
-
visibility: "hidden",
|
|
2286
|
+
var Gn = 8, Kn = 20, qn = 36, Jn = 40, Yn = ({ tags: e, triggerRef: t }) => {
|
|
2287
|
+
let [n, r] = m([]), [i, a] = m([]), o = "wu-inline-block wu-flex-none wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-truncate wu-combobox-tag";
|
|
2288
|
+
u(() => {
|
|
2289
|
+
let n = t.current;
|
|
2290
|
+
if (!n) return;
|
|
2291
|
+
let i = document.createElement("span");
|
|
2292
|
+
i.className = o.replace("wu-truncate", ""), Object.assign(i.style, {
|
|
2300
2293
|
position: "absolute",
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
let
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2294
|
+
top: "0",
|
|
2295
|
+
left: "0",
|
|
2296
|
+
visibility: "hidden",
|
|
2297
|
+
whiteSpace: "nowrap",
|
|
2298
|
+
pointerEvents: "none"
|
|
2299
|
+
}), document.body.appendChild(i);
|
|
2300
|
+
let s = e.map((e) => (i.textContent = e, i.offsetWidth));
|
|
2301
|
+
document.body.removeChild(i);
|
|
2302
|
+
let c = () => {
|
|
2303
|
+
let t = n.offsetWidth - Kn - qn;
|
|
2304
|
+
if (t <= 0) {
|
|
2305
|
+
r([]), a(e);
|
|
2306
|
+
return;
|
|
2314
2307
|
}
|
|
2308
|
+
let i = /* @__PURE__ */ new Map(), o = [], c = 0;
|
|
2309
|
+
for (let n = 0; n < e.length; n++) {
|
|
2310
|
+
let e = i.size ? Gn : 0;
|
|
2311
|
+
c + e + s[n] <= t ? (i.set(n, void 0), c += e + s[n]) : o.push(n);
|
|
2312
|
+
}
|
|
2313
|
+
if (o.length > 0) {
|
|
2314
|
+
let e = o.length > 1 ? 52 : 0, n = i.size ? Gn : 0, r = t - c - n - e;
|
|
2315
|
+
for (r >= Jn && (i.set(o.shift(), r), c += n + r); o.length > 0 && i.size > 0 && c + 52 > t;) {
|
|
2316
|
+
let e = Math.max(...i.keys()), n = i.get(e) ?? s[e], r = c + 52 - t;
|
|
2317
|
+
n - r >= Jn ? (i.set(e, n - r), c -= r) : (i.delete(e), o.push(e), c -= n + (i.size ? Gn : 0));
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
let l = [], u = [];
|
|
2321
|
+
for (let t = 0; t < e.length; t++) i.has(t) ? l.push({
|
|
2322
|
+
tag: e[t],
|
|
2323
|
+
maxWidth: i.get(t)
|
|
2324
|
+
}) : u.push(e[t]);
|
|
2325
|
+
r(l), a(u);
|
|
2315
2326
|
};
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
}, [e, t])
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2327
|
+
c();
|
|
2328
|
+
let l = new ResizeObserver(c);
|
|
2329
|
+
return l.observe(n), () => l.disconnect();
|
|
2330
|
+
}, [e, t]);
|
|
2331
|
+
let s = f(() => /* @__PURE__ */ y("ul", {
|
|
2332
|
+
className: "wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",
|
|
2333
|
+
children: i.map((e, t) => /* @__PURE__ */ y("li", {
|
|
2334
|
+
className: "wu-py-1 wu-text-xs wu-text-left",
|
|
2323
2335
|
children: e
|
|
2324
|
-
}, e))
|
|
2325
|
-
|
|
2336
|
+
}, `${t}-${e}`))
|
|
2337
|
+
}), [i]);
|
|
2338
|
+
return /* @__PURE__ */ b("div", {
|
|
2339
|
+
className: "wu-flex wu-min-w-0 wu-flex-1 wu-items-center wu-gap-2 wu-overflow-hidden wu-text-xs",
|
|
2340
|
+
children: [n.map((e, t) => /* @__PURE__ */ y("span", {
|
|
2341
|
+
style: e.maxWidth ? { maxWidth: e.maxWidth } : void 0,
|
|
2342
|
+
className: o,
|
|
2343
|
+
children: e.tag
|
|
2344
|
+
}, `${t}-${e.tag}`)), i.length > 0 && /* @__PURE__ */ y(jt, {
|
|
2345
|
+
content: s,
|
|
2326
2346
|
className: "wu-z-[51] wu-text-left",
|
|
2327
2347
|
children: /* @__PURE__ */ b("span", {
|
|
2328
|
-
className:
|
|
2348
|
+
className: o,
|
|
2329
2349
|
children: ["+", i.length]
|
|
2330
2350
|
})
|
|
2331
2351
|
})]
|
|
2332
2352
|
});
|
|
2333
|
-
},
|
|
2353
|
+
}, Xn = ae.Root, Zn = ae.Trigger, Qn = t.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, ...r }, i) => /* @__PURE__ */ y(ae.Portal, { children: /* @__PURE__ */ y(ae.Content, {
|
|
2334
2354
|
ref: i,
|
|
2335
2355
|
align: t,
|
|
2336
2356
|
sideOffset: n,
|
|
2337
2357
|
className: K("wu-z-50 wu-w-72 wu-border wu-bg-popover wu-p-4 wu-text-popover-foreground wu-shadow-md wu-outline-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2", e),
|
|
2338
2358
|
...r
|
|
2339
2359
|
}) }));
|
|
2340
|
-
|
|
2360
|
+
Qn.displayName = ae.Content.displayName;
|
|
2341
2361
|
//#endregion
|
|
2342
2362
|
//#region src/components/combobox/ui/_trigger.tsx
|
|
2343
|
-
var
|
|
2363
|
+
var $n = ({ placeholder: e = "Select...", isEllipse: t = !1, selectedOptions: n, variant: r = "flat", dir: i = "ltr", accessorKey: a, multiple: o, id: s, disabled: c, selectAll: l, isCheckedAll: d, className: f, ...h }) => {
|
|
2344
2364
|
let [g, _] = m([]), v = p(null);
|
|
2345
2365
|
u(() => {
|
|
2346
2366
|
if (!n || Array.isArray(n) && n.length === 0) {
|
|
@@ -2359,14 +2379,14 @@ var Yn = ({ placeholder: e = "Select...", isEllipse: t = !1, selectedOptions: n,
|
|
|
2359
2379
|
className: "wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",
|
|
2360
2380
|
style: { width: `${(v.current?.offsetWidth || 0) - 32}px` },
|
|
2361
2381
|
children: g.join(", ")
|
|
2362
|
-
}) : /* @__PURE__ */ y(
|
|
2382
|
+
}) : /* @__PURE__ */ y(Yn, {
|
|
2363
2383
|
tags: g,
|
|
2364
2384
|
triggerRef: v
|
|
2365
2385
|
}) : /* @__PURE__ */ y("p", {
|
|
2366
2386
|
className: "wu-text-xs wu-opacity-70",
|
|
2367
2387
|
children: e
|
|
2368
2388
|
});
|
|
2369
|
-
return /* @__PURE__ */ y(
|
|
2389
|
+
return /* @__PURE__ */ y(Zn, {
|
|
2370
2390
|
dir: i,
|
|
2371
2391
|
asChild: !0,
|
|
2372
2392
|
id: s,
|
|
@@ -2379,13 +2399,13 @@ var Yn = ({ placeholder: e = "Select...", isEllipse: t = !1, selectedOptions: n,
|
|
|
2379
2399
|
children: [x(), /* @__PURE__ */ y("span", { className: "wm-arrow-drop-down group-data-[state=open]/wuCombobox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base" })]
|
|
2380
2400
|
})
|
|
2381
2401
|
});
|
|
2382
|
-
},
|
|
2402
|
+
}, er = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(U, {
|
|
2383
2403
|
ref: n,
|
|
2384
2404
|
className: K("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md", e),
|
|
2385
2405
|
...t
|
|
2386
2406
|
}));
|
|
2387
|
-
|
|
2388
|
-
var
|
|
2407
|
+
er.displayName = U.displayName;
|
|
2408
|
+
var tr = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", {
|
|
2389
2409
|
className: "wu-flex wu-items-center wu-border-b wu-px-3",
|
|
2390
2410
|
children: /* @__PURE__ */ y(U.Input, {
|
|
2391
2411
|
ref: n,
|
|
@@ -2393,45 +2413,45 @@ var Zn = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", {
|
|
|
2393
2413
|
...t
|
|
2394
2414
|
})
|
|
2395
2415
|
}));
|
|
2396
|
-
|
|
2397
|
-
var
|
|
2416
|
+
tr.displayName = U.Input.displayName;
|
|
2417
|
+
var nr = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(U.List, {
|
|
2398
2418
|
ref: n,
|
|
2399
2419
|
className: K("", e),
|
|
2400
2420
|
...t
|
|
2401
2421
|
}));
|
|
2402
|
-
|
|
2403
|
-
var
|
|
2422
|
+
nr.displayName = U.List.displayName;
|
|
2423
|
+
var rr = t.forwardRef((e, t) => /* @__PURE__ */ y(U.Empty, {
|
|
2404
2424
|
ref: t,
|
|
2405
2425
|
className: "wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",
|
|
2406
2426
|
...e
|
|
2407
2427
|
}));
|
|
2408
|
-
|
|
2409
|
-
var
|
|
2428
|
+
rr.displayName = U.Empty.displayName;
|
|
2429
|
+
var ir = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(U.Group, {
|
|
2410
2430
|
ref: n,
|
|
2411
2431
|
className: K("", e),
|
|
2412
2432
|
...t
|
|
2413
2433
|
}));
|
|
2414
|
-
|
|
2415
|
-
var
|
|
2434
|
+
ir.displayName = U.Group.displayName;
|
|
2435
|
+
var ar = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(U.Separator, {
|
|
2416
2436
|
ref: n,
|
|
2417
2437
|
className: K("wu-mx-2 wu-my-1 wu-h-px wu-bg-gray-40", e),
|
|
2418
2438
|
...t
|
|
2419
2439
|
}));
|
|
2420
|
-
|
|
2421
|
-
var
|
|
2440
|
+
ar.displayName = U.Separator.displayName;
|
|
2441
|
+
var or = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(U.Item, {
|
|
2422
2442
|
ref: n,
|
|
2423
2443
|
className: K("wu-relative wu-flex wu-cursor-default wu-gap-2 wu-select-none wu-items-center wu-rounded-sm wu-px-2 wu-py-3 wu-text-sm wu-outline-none data-[disabled=true]:wu-pointer-events-none data-[disabled=true]:wu-opacity-50 [&_svg]:wu-pointer-events-none [&_svg]:wu-size-4 [&_svg]:wu-shrink-0", e),
|
|
2424
2444
|
...t
|
|
2425
2445
|
}));
|
|
2426
|
-
|
|
2427
|
-
var
|
|
2446
|
+
or.displayName = U.Item.displayName;
|
|
2447
|
+
var sr = ({ className: e, ...t }) => /* @__PURE__ */ y("span", {
|
|
2428
2448
|
className: K("wu-ml-auto wu-text-xs wu-tracking-widest", e),
|
|
2429
2449
|
...t
|
|
2430
2450
|
});
|
|
2431
|
-
|
|
2451
|
+
sr.displayName = "CommandShortcut";
|
|
2432
2452
|
//#endregion
|
|
2433
2453
|
//#region src/components/combobox/ui/_item.tsx
|
|
2434
|
-
var
|
|
2454
|
+
var cr = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i, dir: a }) => {
|
|
2435
2455
|
let [o, s] = m(n ? [] : "");
|
|
2436
2456
|
u(() => {
|
|
2437
2457
|
t && s(n ? t.map((e) => JSON.stringify(e[i.value])) : JSON.stringify(t[i.value]));
|
|
@@ -2441,19 +2461,19 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2441
2461
|
n
|
|
2442
2462
|
]);
|
|
2443
2463
|
let c = n ? o.includes(JSON.stringify(e[i.value])) : o === JSON.stringify(e[i.value]);
|
|
2444
|
-
return /* @__PURE__ */ b(
|
|
2464
|
+
return /* @__PURE__ */ b(or, {
|
|
2445
2465
|
onSelect: () => {
|
|
2446
2466
|
e.disabled || r(e);
|
|
2447
2467
|
},
|
|
2448
2468
|
disabled: e.disabled,
|
|
2449
2469
|
className: K("wu-cursor-pointer wu-text-xs wu-items-start wu-leading-4 wu-py-2 wu-combobox-item hover:wu-bg-gray-100", c && "wu-bg-gray-10"),
|
|
2450
2470
|
dir: a,
|
|
2451
|
-
children: [n && /* @__PURE__ */ y(Q, { checked: c }), /* @__PURE__ */ y(
|
|
2471
|
+
children: [n && /* @__PURE__ */ y(Q, { checked: c }), /* @__PURE__ */ y(lr, {
|
|
2452
2472
|
option: e,
|
|
2453
2473
|
accessorKey: i
|
|
2454
2474
|
})]
|
|
2455
2475
|
});
|
|
2456
|
-
},
|
|
2476
|
+
}, lr = ({ option: e, accessorKey: t }) => {
|
|
2457
2477
|
let n = e[t.label];
|
|
2458
2478
|
return /* @__PURE__ */ b("div", {
|
|
2459
2479
|
className: "wu-flex wu-items-center wu-w-full wu-gap-1",
|
|
@@ -2463,10 +2483,10 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2463
2483
|
e.isAdmin && /* @__PURE__ */ y("span", { className: "wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep" })
|
|
2464
2484
|
]
|
|
2465
2485
|
});
|
|
2466
|
-
},
|
|
2486
|
+
}, ur = (e) => {
|
|
2467
2487
|
let { option: t, selectAll: n, handleSelectAll: r, isCheckedAll: a, isPartialSelected: o, ...s } = e;
|
|
2468
2488
|
switch ("type" in t ? t.type : "option") {
|
|
2469
|
-
case "all": return /* @__PURE__ */ b(
|
|
2489
|
+
case "all": return /* @__PURE__ */ b(or, {
|
|
2470
2490
|
onSelect: r,
|
|
2471
2491
|
className: K("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),
|
|
2472
2492
|
dir: s.dir,
|
|
@@ -2480,21 +2500,21 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2480
2500
|
children: n?.label || "Select All"
|
|
2481
2501
|
})]
|
|
2482
2502
|
});
|
|
2483
|
-
case "group": return /* @__PURE__ */ b(
|
|
2503
|
+
case "group": return /* @__PURE__ */ b(ir, { children: [/* @__PURE__ */ y(fn, { children: t.label }), t.options.map((e, t) => {
|
|
2484
2504
|
let n = e[s.accessorKey.value], r = n == null ? `group-item-${t}` : String(n);
|
|
2485
|
-
return /* @__PURE__ */ i(
|
|
2505
|
+
return /* @__PURE__ */ i(cr, {
|
|
2486
2506
|
...s,
|
|
2487
2507
|
option: e,
|
|
2488
2508
|
key: r
|
|
2489
2509
|
});
|
|
2490
2510
|
})] });
|
|
2491
|
-
case "divider": return /* @__PURE__ */ y(
|
|
2492
|
-
default: return /* @__PURE__ */ y(
|
|
2511
|
+
case "divider": return /* @__PURE__ */ y(ar, { className: "wu-mx-4" });
|
|
2512
|
+
default: return /* @__PURE__ */ y(cr, {
|
|
2493
2513
|
...s,
|
|
2494
2514
|
option: t
|
|
2495
2515
|
});
|
|
2496
2516
|
}
|
|
2497
|
-
},
|
|
2517
|
+
}, dr = (e) => {
|
|
2498
2518
|
let t = [], n = [], r = [], i = [];
|
|
2499
2519
|
return e.forEach((e) => {
|
|
2500
2520
|
e.type === "group" ? (t.push(e), r.push(...e.options), i.push(...e.options.filter((e) => !e.disabled))) : e.type === "divider" ? n.push(e) : r.push(e), e?.disabled || i.push(e);
|
|
@@ -2504,8 +2524,8 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2504
2524
|
allOptions: r,
|
|
2505
2525
|
enabledOptions: i
|
|
2506
2526
|
};
|
|
2507
|
-
},
|
|
2508
|
-
let [N, ee] = m(""), [P, F] = m(), [I, L] = m(!1), [R, te] = m(!1), [z, B] = m(!1), ne = p(null), { allOptions: re, enabledOptions: V } = f(() => x || S && !S.includeDisabled ?
|
|
2527
|
+
}, fr = o(Wn), pr = ({ data: e, accessorKey: t, value: n, defaultValue: r, Header: i, virtualizedThreshold: a = 100, isEllipse: o, placeholder: c, variant: l, dir: d, onSelect: h, Label: g, maxHeight: _ = 420, multiple: v = !1, hasGroup: x = !1, selectAll: S, id: C, disabled: w, labelPosition: T = "top", className: E, onScroll: D, maxContentWidth: O, enableSearch: k = !0, noDataContent: A, selectedToTop: j = !1, ...M }) => {
|
|
2528
|
+
let [N, ee] = m(""), [P, F] = m(), [I, L] = m(!1), [R, te] = m(!1), [z, B] = m(!1), ne = p(null), { allOptions: re, enabledOptions: V } = f(() => x || S && !S.includeDisabled ? dr(e) : {
|
|
2509
2529
|
allOptions: e,
|
|
2510
2530
|
groups: [],
|
|
2511
2531
|
dividers: [],
|
|
@@ -2558,13 +2578,13 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2558
2578
|
return /* @__PURE__ */ b("div", {
|
|
2559
2579
|
className: K(Pe(T), "wu-flex wu-combobox-container"),
|
|
2560
2580
|
ref: ne,
|
|
2561
|
-
children: [/* @__PURE__ */ b(
|
|
2581
|
+
children: [/* @__PURE__ */ b(Xn, {
|
|
2562
2582
|
onOpenChange: (e) => {
|
|
2563
2583
|
e && U(), L(e);
|
|
2564
2584
|
},
|
|
2565
2585
|
open: I,
|
|
2566
2586
|
modal: !0,
|
|
2567
|
-
children: [/* @__PURE__ */ y(
|
|
2587
|
+
children: [/* @__PURE__ */ y($n, {
|
|
2568
2588
|
selectedOptions: P,
|
|
2569
2589
|
accessorKey: t,
|
|
2570
2590
|
isEllipse: o,
|
|
@@ -2578,17 +2598,17 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2578
2598
|
className: E,
|
|
2579
2599
|
id: C,
|
|
2580
2600
|
...M
|
|
2581
|
-
}), /* @__PURE__ */ y(
|
|
2601
|
+
}), /* @__PURE__ */ y(Qn, {
|
|
2582
2602
|
className: "wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-p-0 wu-bg-white wu-border wu-border-blue-p wu-combobox-content",
|
|
2583
2603
|
align: "start",
|
|
2584
2604
|
sideOffset: -1,
|
|
2585
2605
|
style: { maxWidth: O },
|
|
2586
|
-
children: /* @__PURE__ */ b(
|
|
2606
|
+
children: /* @__PURE__ */ b(er, {
|
|
2587
2607
|
id: C,
|
|
2588
2608
|
children: [
|
|
2589
2609
|
k && /* @__PURE__ */ y("div", {
|
|
2590
2610
|
className: "wu-m-2",
|
|
2591
|
-
children: /* @__PURE__ */ y(
|
|
2611
|
+
children: /* @__PURE__ */ y(fr, {
|
|
2592
2612
|
placeholder: "Search...",
|
|
2593
2613
|
Icon: /* @__PURE__ */ y("span", { className: "wm-search" }),
|
|
2594
2614
|
className: "wu-text-xs wu-combobox-search",
|
|
@@ -2600,13 +2620,13 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2600
2620
|
})
|
|
2601
2621
|
}),
|
|
2602
2622
|
i,
|
|
2603
|
-
/* @__PURE__ */ b(
|
|
2623
|
+
/* @__PURE__ */ b(nr, { children: [/* @__PURE__ */ y(rr, { children: A || "No results found." }), H.length >= a ? /* @__PURE__ */ y(Qt, {
|
|
2604
2624
|
className: "wu-combobox-list",
|
|
2605
2625
|
containerHeight: _,
|
|
2606
2626
|
list: H,
|
|
2607
2627
|
callback: (e, n) => {
|
|
2608
2628
|
let r = n, i = r[t.value], a = i == null ? `__${"type" in r ? r.type : "item"}__${e}` : String(i);
|
|
2609
|
-
return /* @__PURE__ */ y(
|
|
2629
|
+
return /* @__PURE__ */ y(ur, {
|
|
2610
2630
|
option: n,
|
|
2611
2631
|
value: P,
|
|
2612
2632
|
onSelect: ae,
|
|
@@ -2629,7 +2649,7 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2629
2649
|
onScroll: D,
|
|
2630
2650
|
children: H.map((e, n) => {
|
|
2631
2651
|
let r = e, i = r[t.value], a = i == null ? `__${"type" in r ? r.type : "item"}__${n}` : String(i);
|
|
2632
|
-
return /* @__PURE__ */ y(
|
|
2652
|
+
return /* @__PURE__ */ y(ur, {
|
|
2633
2653
|
option: r,
|
|
2634
2654
|
value: P,
|
|
2635
2655
|
onSelect: ae,
|
|
@@ -2652,7 +2672,7 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2652
2672
|
children: g
|
|
2653
2673
|
})]
|
|
2654
2674
|
});
|
|
2655
|
-
},
|
|
2675
|
+
}, mr = (e) => {
|
|
2656
2676
|
let { textToCopy: t, notificationText: r, ...i } = e, [a, o] = n.useState(!1), s = async () => {
|
|
2657
2677
|
if (t) try {
|
|
2658
2678
|
await navigator.clipboard.writeText(t), o(!0), setTimeout(() => o(!1), 2e3);
|
|
@@ -2674,7 +2694,7 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2674
2694
|
className: "wu-text-lg"
|
|
2675
2695
|
})]
|
|
2676
2696
|
});
|
|
2677
|
-
},
|
|
2697
|
+
}, hr = z([
|
|
2678
2698
|
"wu-inline-flex wu-items-center wu-justify-center wu-rounded",
|
|
2679
2699
|
"wu-whitespace-nowrap wu-text-sm wu-leading-normal wu-font-normal",
|
|
2680
2700
|
"wu-transition-colors wu-duration-300",
|
|
@@ -2738,8 +2758,8 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2738
2758
|
color: "primary"
|
|
2739
2759
|
},
|
|
2740
2760
|
compoundVariants: []
|
|
2741
|
-
}),
|
|
2742
|
-
className: K(
|
|
2761
|
+
}), gr = t.forwardRef(({ className: e, variant: t, size: n, color: r, asChild: i = !1, ...a }, o) => /* @__PURE__ */ y(i ? ce : "button", {
|
|
2762
|
+
className: K(hr({
|
|
2743
2763
|
size: n,
|
|
2744
2764
|
color: r,
|
|
2745
2765
|
variant: t,
|
|
@@ -2748,16 +2768,16 @@ var ir = ({ option: e, value: t, multiple: n = !1, onSelect: r, accessorKey: i,
|
|
|
2748
2768
|
ref: o,
|
|
2749
2769
|
...a
|
|
2750
2770
|
}));
|
|
2751
|
-
|
|
2771
|
+
gr.displayName = "Button";
|
|
2752
2772
|
//#endregion
|
|
2753
2773
|
//#region src/base/ui/sheet.tsx
|
|
2754
|
-
var
|
|
2774
|
+
var _r = W.Root, vr = W.Trigger, yr = W.Close, br = W.Portal, xr = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(W.Overlay, {
|
|
2755
2775
|
className: K("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30 data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0", "wu-drawer-overlay", e),
|
|
2756
2776
|
...t,
|
|
2757
2777
|
ref: n
|
|
2758
2778
|
}));
|
|
2759
|
-
|
|
2760
|
-
var
|
|
2779
|
+
xr.displayName = W.Overlay.displayName;
|
|
2780
|
+
var Sr = z("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500", {
|
|
2761
2781
|
variants: { side: {
|
|
2762
2782
|
top: "wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top",
|
|
2763
2783
|
bottom: "wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom",
|
|
@@ -2765,14 +2785,14 @@ var vr = z("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-
|
|
|
2765
2785
|
right: "wu-inset-y-0 wu-right-0 wu-h-full wu-w-3/4 wu-border-l data-[state=closed]:wu-slide-out-to-right data-[state=open]:wu-slide-in-from-right sm:wu-max-w-sm"
|
|
2766
2786
|
} },
|
|
2767
2787
|
defaultVariants: { side: "right" }
|
|
2768
|
-
}),
|
|
2788
|
+
}), Cr = t.forwardRef(({ side: e = "right", className: t, children: n, hideCloseButton: r, overlayClassName: i, closeButtonClassName: a, ...o }, s) => /* @__PURE__ */ b(br, { children: [/* @__PURE__ */ y(xr, { className: i }), /* @__PURE__ */ b(W.Content, {
|
|
2769
2789
|
ref: s,
|
|
2770
|
-
className: K(
|
|
2790
|
+
className: K(Sr({ side: e }), t),
|
|
2771
2791
|
...o,
|
|
2772
2792
|
children: [n, !r && /* @__PURE__ */ y(W.Close, {
|
|
2773
2793
|
"aria-label": "close",
|
|
2774
2794
|
asChild: !0,
|
|
2775
|
-
children: /* @__PURE__ */ b(
|
|
2795
|
+
children: /* @__PURE__ */ b(gr, {
|
|
2776
2796
|
variant: "iconOnly",
|
|
2777
2797
|
className: K("wu-absolute wu-right-4 wu-top-4", a),
|
|
2778
2798
|
children: [/* @__PURE__ */ y("span", { className: "wm-close" }), /* @__PURE__ */ y("span", {
|
|
@@ -2782,43 +2802,43 @@ var vr = z("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-
|
|
|
2782
2802
|
})
|
|
2783
2803
|
})]
|
|
2784
2804
|
})] }));
|
|
2785
|
-
|
|
2786
|
-
var
|
|
2805
|
+
Cr.displayName = W.Content.displayName;
|
|
2806
|
+
var wr = ({ className: e, ...t }) => /* @__PURE__ */ y("div", {
|
|
2787
2807
|
className: K("", e),
|
|
2788
2808
|
...t
|
|
2789
2809
|
});
|
|
2790
|
-
|
|
2791
|
-
var
|
|
2810
|
+
wr.displayName = "SheetHeader";
|
|
2811
|
+
var Tr = ({ className: e, ...t }) => /* @__PURE__ */ y("div", {
|
|
2792
2812
|
className: K("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2", e),
|
|
2793
2813
|
...t
|
|
2794
2814
|
});
|
|
2795
|
-
|
|
2796
|
-
var
|
|
2815
|
+
Tr.displayName = "SheetFooter";
|
|
2816
|
+
var Er = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(W.Title, {
|
|
2797
2817
|
ref: n,
|
|
2798
2818
|
className: K("wu-text-lg wu-font-semibold", e),
|
|
2799
2819
|
...t
|
|
2800
2820
|
}));
|
|
2801
|
-
|
|
2802
|
-
var
|
|
2821
|
+
Er.displayName = W.Title.displayName;
|
|
2822
|
+
var Dr = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(W.Description, {
|
|
2803
2823
|
ref: n,
|
|
2804
2824
|
className: K("wu-text-sm", e),
|
|
2805
2825
|
...t
|
|
2806
2826
|
}));
|
|
2807
|
-
|
|
2827
|
+
Dr.displayName = W.Description.displayName;
|
|
2808
2828
|
//#endregion
|
|
2809
2829
|
//#region src/components/drawer/WuDrawer.tsx
|
|
2810
|
-
var
|
|
2830
|
+
var Or = (e) => (t) => {
|
|
2811
2831
|
e && t.preventDefault();
|
|
2812
|
-
},
|
|
2832
|
+
}, kr = (e) => {
|
|
2813
2833
|
let { Trigger: t, children: n, hideCloseButton: r, className: i, side: a = "left", open: o, onOpenChange: s, preventClickOutside: c, overlayClassName: l, closeButtonClassName: u, ...d } = e;
|
|
2814
|
-
return /* @__PURE__ */ b(
|
|
2834
|
+
return /* @__PURE__ */ b(_r, {
|
|
2815
2835
|
open: o,
|
|
2816
2836
|
onOpenChange: s,
|
|
2817
|
-
children: [/* @__PURE__ */ y(
|
|
2837
|
+
children: [/* @__PURE__ */ y(vr, {
|
|
2818
2838
|
asChild: !0,
|
|
2819
2839
|
children: t
|
|
2820
|
-
}), /* @__PURE__ */ b(
|
|
2821
|
-
onInteractOutside:
|
|
2840
|
+
}), /* @__PURE__ */ b(Cr, {
|
|
2841
|
+
onInteractOutside: Or(c),
|
|
2822
2842
|
side: a,
|
|
2823
2843
|
className: K("wu-bg-white wu-text-gray-lead wu-px-0", i),
|
|
2824
2844
|
hideCloseButton: r,
|
|
@@ -2827,14 +2847,14 @@ var wr = (e) => (t) => {
|
|
|
2827
2847
|
...d,
|
|
2828
2848
|
children: [/* @__PURE__ */ y("div", {
|
|
2829
2849
|
className: "wu-hidden",
|
|
2830
|
-
children: /* @__PURE__ */ y(
|
|
2850
|
+
children: /* @__PURE__ */ y(Er, {})
|
|
2831
2851
|
}), n]
|
|
2832
2852
|
})]
|
|
2833
2853
|
});
|
|
2834
|
-
},
|
|
2854
|
+
}, Ar = ({ children: e, ...t }) => /* @__PURE__ */ y(yr, {
|
|
2835
2855
|
...t,
|
|
2836
2856
|
children: e
|
|
2837
|
-
}),
|
|
2857
|
+
}), jr = (e) => {
|
|
2838
2858
|
let { checked: t, onSelect: n, children: r, disabled: i, preventCloseOnSelect: a } = e;
|
|
2839
2859
|
return /* @__PURE__ */ y(un, {
|
|
2840
2860
|
disabled: i,
|
|
@@ -2843,7 +2863,7 @@ var wr = (e) => (t) => {
|
|
|
2843
2863
|
onSelect: (e) => a && e.preventDefault(),
|
|
2844
2864
|
children: r
|
|
2845
2865
|
});
|
|
2846
|
-
},
|
|
2866
|
+
}, Mr = (e) => {
|
|
2847
2867
|
let { children: t, className: n, Icon: r, iconPosition: i = "left", disabled: a, onSelect: o, preventCloseOnSelect: s } = e;
|
|
2848
2868
|
return /* @__PURE__ */ b(ln, {
|
|
2849
2869
|
onSelect: (e) => {
|
|
@@ -2856,10 +2876,10 @@ var wr = (e) => (t) => {
|
|
|
2856
2876
|
children: r
|
|
2857
2877
|
}), t]
|
|
2858
2878
|
});
|
|
2859
|
-
},
|
|
2879
|
+
}, Nr = ({ children: e, Label: t, ...n }) => /* @__PURE__ */ b(tn, {
|
|
2860
2880
|
...n,
|
|
2861
2881
|
children: [/* @__PURE__ */ y(fn, { children: t }), e]
|
|
2862
|
-
}),
|
|
2882
|
+
}), Pr = (e) => {
|
|
2863
2883
|
let { options: t, value: n, onSelect: r } = e;
|
|
2864
2884
|
return /* @__PURE__ */ y(an, {
|
|
2865
2885
|
value: n,
|
|
@@ -2870,13 +2890,13 @@ var wr = (e) => (t) => {
|
|
|
2870
2890
|
children: e.Label
|
|
2871
2891
|
}, e.value))
|
|
2872
2892
|
});
|
|
2873
|
-
},
|
|
2893
|
+
}, Fr = (e) => {
|
|
2874
2894
|
let { className: t, ...n } = e, r = K("wu-w-11/12 wu-mx-auto wu-border-gray-40", t);
|
|
2875
2895
|
return /* @__PURE__ */ y(pn, {
|
|
2876
2896
|
...n,
|
|
2877
2897
|
className: r
|
|
2878
2898
|
});
|
|
2879
|
-
},
|
|
2899
|
+
}, Ir = t.forwardRef(({ className: e, children: t, thumbColor: n, railColor: r, ...i }, a) => /* @__PURE__ */ b(pe.Root, {
|
|
2880
2900
|
ref: a,
|
|
2881
2901
|
className: K("wu-relative wu-overflow-hidden", e),
|
|
2882
2902
|
children: [
|
|
@@ -2885,15 +2905,15 @@ var wr = (e) => (t) => {
|
|
|
2885
2905
|
...i,
|
|
2886
2906
|
children: t
|
|
2887
2907
|
}),
|
|
2888
|
-
/* @__PURE__ */ y(
|
|
2908
|
+
/* @__PURE__ */ y(Lr, {
|
|
2889
2909
|
thumbColor: n,
|
|
2890
2910
|
railColor: r
|
|
2891
2911
|
}),
|
|
2892
2912
|
/* @__PURE__ */ y(pe.Corner, {})
|
|
2893
2913
|
]
|
|
2894
2914
|
}));
|
|
2895
|
-
|
|
2896
|
-
var
|
|
2915
|
+
Ir.displayName = pe.Root.displayName;
|
|
2916
|
+
var Lr = t.forwardRef(({ className: e, orientation: t = "vertical", thumbColor: n = "#d4d4d4", railColor: r = "#eeeeee", ...i }, a) => /* @__PURE__ */ y(pe.ScrollAreaScrollbar, {
|
|
2897
2917
|
ref: a,
|
|
2898
2918
|
orientation: t,
|
|
2899
2919
|
className: K("wu-flex wu-touch-none wu-select-none wu-transition-colors", t === "vertical" && "wu-h-full wu-w-2 wu-border-l wu-border-l-transparent wu-p-[1px]", t === "horizontal" && "wu-h-2 wu-flex-col wu-border-t wu-border-t-transparent wu-p-[1px]", e),
|
|
@@ -2904,10 +2924,10 @@ var Nr = t.forwardRef(({ className: e, orientation: t = "vertical", thumbColor:
|
|
|
2904
2924
|
style: { background: n }
|
|
2905
2925
|
})
|
|
2906
2926
|
}));
|
|
2907
|
-
|
|
2927
|
+
Lr.displayName = pe.ScrollAreaScrollbar.displayName;
|
|
2908
2928
|
//#endregion
|
|
2909
2929
|
//#region src/components/menu/ui/WuSubMenu.tsx
|
|
2910
|
-
var
|
|
2930
|
+
var Rr = (e) => {
|
|
2911
2931
|
let { children: t, Label: n, open: r, onOpenChange: i, height: a, dir: o, ...s } = e;
|
|
2912
2932
|
return /* @__PURE__ */ b(rn, {
|
|
2913
2933
|
...s,
|
|
@@ -2918,7 +2938,7 @@ var Pr = (e) => {
|
|
|
2918
2938
|
children: n
|
|
2919
2939
|
}), /* @__PURE__ */ y(nn, { children: /* @__PURE__ */ y(sn, {
|
|
2920
2940
|
onInteractOutside: (e) => e.preventDefault(),
|
|
2921
|
-
children: /* @__PURE__ */ y(
|
|
2941
|
+
children: /* @__PURE__ */ y(Ir, {
|
|
2922
2942
|
className: "wu-h-fit",
|
|
2923
2943
|
style: { height: a },
|
|
2924
2944
|
dir: o,
|
|
@@ -2926,7 +2946,7 @@ var Pr = (e) => {
|
|
|
2926
2946
|
})
|
|
2927
2947
|
}) })]
|
|
2928
2948
|
});
|
|
2929
|
-
},
|
|
2949
|
+
}, zr = "wu-p-1.5 wu-cursor-pointer hover:wu-bg-gray-20 wu-border-gray-40 wu-transition wu-duration-300 focus:wu-outline-2 focus:wu-outline-offset focus:wu-outline-blue-p/80 focus:wu-bg-gray-20 hover:wu-bg-gray-20 wu-rounded-t-sm", Br = (e) => {
|
|
2930
2950
|
let { children: t, MenuTitle: n, variant: r = "flat", name: i, open: a, onOpenChange: o, height: s, preventCloseOnClickOutside: c, dir: l, Trigger: u, align: d = "start", sideOffset: f = 0, side: p = "bottom", alignOffset: m, className: h, disabled: g, ..._ } = e;
|
|
2931
2951
|
return /* @__PURE__ */ b($t, {
|
|
2932
2952
|
..._,
|
|
@@ -2938,7 +2958,7 @@ var Pr = (e) => {
|
|
|
2938
2958
|
dir: l,
|
|
2939
2959
|
disabled: g,
|
|
2940
2960
|
className: K("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),
|
|
2941
|
-
children: u ??
|
|
2961
|
+
children: u ?? Vr(r, i, g)
|
|
2942
2962
|
}), /* @__PURE__ */ y(cn, {
|
|
2943
2963
|
className: K("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40", h, "wu-menu-content"),
|
|
2944
2964
|
align: d,
|
|
@@ -2946,7 +2966,7 @@ var Pr = (e) => {
|
|
|
2946
2966
|
side: p,
|
|
2947
2967
|
alignOffset: m,
|
|
2948
2968
|
onInteractOutside: (e) => c && e.preventDefault(),
|
|
2949
|
-
children: /* @__PURE__ */ b(
|
|
2969
|
+
children: /* @__PURE__ */ b(Ir, {
|
|
2950
2970
|
className: "h-fit",
|
|
2951
2971
|
style: { height: s },
|
|
2952
2972
|
dir: l,
|
|
@@ -2961,13 +2981,13 @@ var Pr = (e) => {
|
|
|
2961
2981
|
})
|
|
2962
2982
|
})]
|
|
2963
2983
|
});
|
|
2964
|
-
},
|
|
2965
|
-
className: K(
|
|
2984
|
+
}, Vr = (e, t, n) => /* @__PURE__ */ b("button", {
|
|
2985
|
+
className: K(zr, "wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group/wuMenu", e === "outlined" ? "wu-border" : "wu-border-b", "wu-trigger-btn"),
|
|
2966
2986
|
"aria-label": "menu-trigger",
|
|
2967
2987
|
children: [/* @__PURE__ */ y("span", { children: t ?? "Menu" }), /* @__PURE__ */ y("span", { className: K("wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]/wuMenu:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q", n && "wu-text-zinc-300 group-hover:wu-text-zinc-300") })]
|
|
2968
|
-
}),
|
|
2988
|
+
}), Hr = ({ titles: e, dir: t = "ltr", handleTitleClick: r }) => {
|
|
2969
2989
|
let [i, a] = n.useState(!1);
|
|
2970
|
-
return /* @__PURE__ */ y(
|
|
2990
|
+
return /* @__PURE__ */ y(Br, {
|
|
2971
2991
|
className: "wu-rounded-sm",
|
|
2972
2992
|
open: i,
|
|
2973
2993
|
onOpenChange: a,
|
|
@@ -2978,12 +2998,12 @@ var Pr = (e) => {
|
|
|
2978
2998
|
className: K("wu-w-6 wu-h-6 wu-shrink-0 wu-rounded-sm"),
|
|
2979
2999
|
Icon: /* @__PURE__ */ y("span", { className: K("wm-keyboard-arrow-down wu-text-[16px] wu-origin-center wu-transition-transform wu-duration-300", i && (t === "rtl" ? "-wu-rotate-180" : "wu-rotate-180")) })
|
|
2980
3000
|
}),
|
|
2981
|
-
children: e.map((e) => /* @__PURE__ */ y(
|
|
3001
|
+
children: e.map((e) => /* @__PURE__ */ y(Mr, {
|
|
2982
3002
|
onSelect: (t) => r(t, e.id),
|
|
2983
3003
|
children: e.title
|
|
2984
3004
|
}, e.id))
|
|
2985
3005
|
});
|
|
2986
|
-
},
|
|
3006
|
+
}, Ur = ({ titles: e, currentLevel: t, initial: n, handleTitleClick: r, headerClasses: i, offsetHeight: a, dir: o = "ltr" }) => {
|
|
2987
3007
|
let s = f(() => o === "rtl" ? {
|
|
2988
3008
|
initial: {
|
|
2989
3009
|
x: 8,
|
|
@@ -3021,7 +3041,7 @@ var Pr = (e) => {
|
|
|
3021
3041
|
className: K("wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-2 wu-px-4 wu-items-center wu-origin-left wu-w-full wu-transition wu-duration-200", t === n ? o === "rtl" ? "wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0" : "-wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0" : "wu-translate-x-0 wu-opacity-100 wu-z-50 wu-delay-200", i),
|
|
3022
3042
|
style: { height: t === n ? "-40px" : `${a}px` },
|
|
3023
3043
|
dir: o,
|
|
3024
|
-
children: [/* @__PURE__ */ y(
|
|
3044
|
+
children: [/* @__PURE__ */ y(Hr, {
|
|
3025
3045
|
titles: e,
|
|
3026
3046
|
handleTitleClick: r,
|
|
3027
3047
|
dir: o
|
|
@@ -3032,7 +3052,7 @@ var Pr = (e) => {
|
|
|
3032
3052
|
children: /* @__PURE__ */ b(le, {
|
|
3033
3053
|
initial: !1,
|
|
3034
3054
|
mode: "popLayout",
|
|
3035
|
-
children: [
|
|
3055
|
+
children: [Wr(e).map((e, t) => /* @__PURE__ */ y(fe.div, {
|
|
3036
3056
|
initial: s.initial,
|
|
3037
3057
|
animate: s.animate,
|
|
3038
3058
|
exit: s.exit,
|
|
@@ -3054,7 +3074,7 @@ var Pr = (e) => {
|
|
|
3054
3074
|
})
|
|
3055
3075
|
})]
|
|
3056
3076
|
});
|
|
3057
|
-
},
|
|
3077
|
+
}, Wr = (e) => {
|
|
3058
3078
|
let t = e.length;
|
|
3059
3079
|
return t > 2 ? [
|
|
3060
3080
|
e[0],
|
|
@@ -3064,7 +3084,7 @@ var Pr = (e) => {
|
|
|
3064
3084
|
},
|
|
3065
3085
|
e[t - 1]
|
|
3066
3086
|
] : e;
|
|
3067
|
-
},
|
|
3087
|
+
}, Gr = ({ items: e, initial: t, baseTitle: n, mode: r = "popLayout", headerClasses: i = "", offsetHeight: a = 40, variant: o = "default", dir: s = "ltr" }) => {
|
|
3068
3088
|
let [c, l] = m(n ? [n] : []), [[u, d], f] = m([t, 1]), p = (e, t) => {
|
|
3069
3089
|
t && l([...c, t]), f([e, 1]);
|
|
3070
3090
|
}, h = (e) => {
|
|
@@ -3074,7 +3094,7 @@ var Pr = (e) => {
|
|
|
3074
3094
|
return /* @__PURE__ */ b("div", {
|
|
3075
3095
|
dir: s,
|
|
3076
3096
|
className: "wu-w-full wu-h-full wu-relative wu-overflow-hidden wu-flex wu-flex-col",
|
|
3077
|
-
children: [/* @__PURE__ */ y(
|
|
3097
|
+
children: [/* @__PURE__ */ y(Ur, {
|
|
3078
3098
|
titles: c,
|
|
3079
3099
|
currentLevel: u,
|
|
3080
3100
|
initial: t,
|
|
@@ -3110,7 +3130,7 @@ var Pr = (e) => {
|
|
|
3110
3130
|
return /* @__PURE__ */ y(fe.div, {
|
|
3111
3131
|
dir: s,
|
|
3112
3132
|
custom: d,
|
|
3113
|
-
variants:
|
|
3133
|
+
variants: Kr(o),
|
|
3114
3134
|
initial: "enter",
|
|
3115
3135
|
animate: "center",
|
|
3116
3136
|
exit: "exit",
|
|
@@ -3132,14 +3152,14 @@ var Pr = (e) => {
|
|
|
3132
3152
|
})
|
|
3133
3153
|
})]
|
|
3134
3154
|
});
|
|
3135
|
-
},
|
|
3155
|
+
}, Kr = (e) => {
|
|
3136
3156
|
switch (e) {
|
|
3137
|
-
case "slideRight": return
|
|
3138
|
-
case "slideLeft": return
|
|
3139
|
-
case "fadeZoom": return
|
|
3140
|
-
default: return
|
|
3157
|
+
case "slideRight": return Jr;
|
|
3158
|
+
case "slideLeft": return Yr;
|
|
3159
|
+
case "fadeZoom": return Xr;
|
|
3160
|
+
default: return qr;
|
|
3141
3161
|
}
|
|
3142
|
-
},
|
|
3162
|
+
}, qr = {
|
|
3143
3163
|
enter: (e) => ({
|
|
3144
3164
|
scale: e > 0 ? .825 : 1.1,
|
|
3145
3165
|
opacity: 0,
|
|
@@ -3155,7 +3175,7 @@ var Pr = (e) => {
|
|
|
3155
3175
|
opacity: 0,
|
|
3156
3176
|
zIndex: 0
|
|
3157
3177
|
})
|
|
3158
|
-
},
|
|
3178
|
+
}, Jr = {
|
|
3159
3179
|
enter: (e) => ({
|
|
3160
3180
|
x: e > 0 ? -15 : 15,
|
|
3161
3181
|
opacity: 0,
|
|
@@ -3171,7 +3191,7 @@ var Pr = (e) => {
|
|
|
3171
3191
|
opacity: 0,
|
|
3172
3192
|
zIndex: 0
|
|
3173
3193
|
})
|
|
3174
|
-
},
|
|
3194
|
+
}, Yr = {
|
|
3175
3195
|
enter: (e) => ({
|
|
3176
3196
|
x: e > 0 ? 15 : -15,
|
|
3177
3197
|
opacity: 0,
|
|
@@ -3187,7 +3207,7 @@ var Pr = (e) => {
|
|
|
3187
3207
|
opacity: 0,
|
|
3188
3208
|
zIndex: 0
|
|
3189
3209
|
})
|
|
3190
|
-
},
|
|
3210
|
+
}, Xr = {
|
|
3191
3211
|
enter: (e) => ({
|
|
3192
3212
|
opacity: 0,
|
|
3193
3213
|
zIndex: 0,
|
|
@@ -3203,7 +3223,7 @@ var Pr = (e) => {
|
|
|
3203
3223
|
zIndex: 0,
|
|
3204
3224
|
scale: 1
|
|
3205
3225
|
}
|
|
3206
|
-
},
|
|
3226
|
+
}, Zr = ({ className: e, isLoading: t, loadingText: n, children: r, ...i }) => /* @__PURE__ */ b("footer", {
|
|
3207
3227
|
className: K("wu-flex wu-items-center wu-justify-between wu-gap-2 wu-border-t wu-border-gray-10 wu-py-3 wu-px-4 wu-bg-white/80 wu-backdrop-blur-sm wu-text-xs wu-font-normal wu-text-gray-footer wu-sticky wu-bottom-0", e),
|
|
3208
3228
|
...i,
|
|
3209
3229
|
children: [/* @__PURE__ */ y("div", {
|
|
@@ -3216,10 +3236,10 @@ var Pr = (e) => {
|
|
|
3216
3236
|
message: n
|
|
3217
3237
|
})]
|
|
3218
3238
|
});
|
|
3219
|
-
|
|
3239
|
+
Zr.displayName = "WuFooter";
|
|
3220
3240
|
//#endregion
|
|
3221
3241
|
//#region src/components/helpButton/WuHelpButton.tsx
|
|
3222
|
-
var
|
|
3242
|
+
var Qr = n.forwardRef((e, t) => {
|
|
3223
3243
|
let { size: n = "sm", idOrSlugOrUrl: r, variant: i = "primary", ...a } = e, o = n === "sm" ? 16 : 18, s = r.includes("http") ? r : `/help/${r}.html`, c = i === "primary" ? "wu-text-blue-p" : "wu-text-gray-lead";
|
|
3224
3244
|
return /* @__PURE__ */ y("button", {
|
|
3225
3245
|
...a,
|
|
@@ -3228,19 +3248,19 @@ var Jr = n.forwardRef((e, t) => {
|
|
|
3228
3248
|
children: /* @__PURE__ */ y("span", { className: K("wm-help wu-text-gray-subtle", `wu-text-[${o}px]`, c, a.disabled && "wu-text-neutral-300", "wu-help-button-icon") })
|
|
3229
3249
|
});
|
|
3230
3250
|
});
|
|
3231
|
-
|
|
3251
|
+
Qr.displayName = "WuHelpButton";
|
|
3232
3252
|
//#endregion
|
|
3233
3253
|
//#region src/components/listbox/utils/useGenClass.ts
|
|
3234
|
-
var
|
|
3254
|
+
var $r = (e, t) => `wu-${t ? "combobox" : "listbox"}-${e}`;
|
|
3235
3255
|
//#endregion
|
|
3236
3256
|
//#region src/components/listbox/ui/_item.tsx
|
|
3237
|
-
function
|
|
3238
|
-
let { option: t, accessorKey: n, onSelect: r, multiple: a, dir: o, GroupLabel: s, Item: c, isSelected: l, ...u } = e, d = n.group && Array.isArray(t[n.group]), f = ({ item: e, className: s }) => /* @__PURE__ */ i(
|
|
3257
|
+
function ei(e) {
|
|
3258
|
+
let { option: t, accessorKey: n, onSelect: r, multiple: a, dir: o, GroupLabel: s, Item: c, isSelected: l, ...u } = e, d = n.group && Array.isArray(t[n.group]), f = ({ item: e, className: s }) => /* @__PURE__ */ i(or, {
|
|
3239
3259
|
...u,
|
|
3240
3260
|
key: JSON.stringify(e),
|
|
3241
3261
|
onSelect: () => r?.(e),
|
|
3242
3262
|
value: t[n.value],
|
|
3243
|
-
className: K("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-10", !!l?.(e) && !a && "wu-bg-blue-p/10", o === "rtl" && "wu-justify-end", s,
|
|
3263
|
+
className: K("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-10", !!l?.(e) && !a && "wu-bg-blue-p/10", o === "rtl" && "wu-justify-end", s, $r("item")),
|
|
3244
3264
|
disabled: e.disabled
|
|
3245
3265
|
}, a && /* @__PURE__ */ y(Q, { checked: l?.(e) }), c ? c({
|
|
3246
3266
|
value: e,
|
|
@@ -3248,7 +3268,7 @@ function Xr(e) {
|
|
|
3248
3268
|
}) : /* @__PURE__ */ y(v, { children: e[n.label] }));
|
|
3249
3269
|
if (d) {
|
|
3250
3270
|
let e = t[n.group];
|
|
3251
|
-
return /* @__PURE__ */ y(
|
|
3271
|
+
return /* @__PURE__ */ y(ir, {
|
|
3252
3272
|
heading: typeof s == "string" ? t[s] : s?.(t),
|
|
3253
3273
|
children: e?.map((e) => /* @__PURE__ */ y(f, {
|
|
3254
3274
|
item: e,
|
|
@@ -3258,24 +3278,24 @@ function Xr(e) {
|
|
|
3258
3278
|
}
|
|
3259
3279
|
return /* @__PURE__ */ y(f, { item: t });
|
|
3260
3280
|
}
|
|
3261
|
-
var
|
|
3281
|
+
var ti = n.memo(ei), ni = (e) => {
|
|
3262
3282
|
let { className: t, ...n } = e;
|
|
3263
3283
|
return /* @__PURE__ */ b("div", {
|
|
3264
3284
|
className: "wu-relative",
|
|
3265
3285
|
children: [/* @__PURE__ */ y(J, {
|
|
3266
3286
|
icon: "wm-search",
|
|
3267
3287
|
className: "wu-absolute wu-top-[14px] wu-left-5"
|
|
3268
|
-
}), /* @__PURE__ */ y(
|
|
3288
|
+
}), /* @__PURE__ */ y(tr, {
|
|
3269
3289
|
...n,
|
|
3270
3290
|
"aria-label": "Search",
|
|
3271
|
-
className: K("wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8", "focus:wu-border-blue-p focus-visible:wu-outline-none;",
|
|
3291
|
+
className: K("wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8", "focus:wu-border-blue-p focus-visible:wu-outline-none;", $r("input"), t)
|
|
3272
3292
|
})]
|
|
3273
3293
|
});
|
|
3274
|
-
},
|
|
3294
|
+
}, ri = (e) => {
|
|
3275
3295
|
let { label: t, onSelectAll: r, data: i, value: a } = e, [o, s] = n.useState(!1), [c, l] = n.useState(!1);
|
|
3276
3296
|
return n.useEffect(() => {
|
|
3277
3297
|
!a || !i || (s(a.length > 0), l(a.length > 0 && a.length < i.length));
|
|
3278
|
-
}, [i, a]), /* @__PURE__ */ b(
|
|
3298
|
+
}, [i, a]), /* @__PURE__ */ b(or, {
|
|
3279
3299
|
className: "data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",
|
|
3280
3300
|
onSelect: () => r?.(!o),
|
|
3281
3301
|
children: [/* @__PURE__ */ y(Q, {
|
|
@@ -3283,7 +3303,7 @@ var Zr = n.memo(Xr), Qr = (e) => {
|
|
|
3283
3303
|
partial: c
|
|
3284
3304
|
}), t || "Select All"]
|
|
3285
3305
|
});
|
|
3286
|
-
},
|
|
3306
|
+
}, ii = (e) => {
|
|
3287
3307
|
let { CustomTrigger: t, disabled: r, value: i, placeholder: a, accessorKey: o, Chip: s, handleUnselect: c, variant: l, dir: u, className: d, ...f } = e, [p, m] = n.useState(), h = n.useRef(null);
|
|
3288
3308
|
return n.useEffect(() => {
|
|
3289
3309
|
if (!i) {
|
|
@@ -3303,43 +3323,43 @@ var Zr = n.memo(Xr), Qr = (e) => {
|
|
|
3303
3323
|
s,
|
|
3304
3324
|
o.label,
|
|
3305
3325
|
m
|
|
3306
|
-
]), /* @__PURE__ */ y(
|
|
3326
|
+
]), /* @__PURE__ */ y(Zn, {
|
|
3307
3327
|
asChild: !0,
|
|
3308
3328
|
id: e.id,
|
|
3309
3329
|
disabled: r,
|
|
3310
3330
|
ref: h,
|
|
3311
3331
|
children: t?.(i) || /* @__PURE__ */ b("button", {
|
|
3312
3332
|
...f,
|
|
3313
|
-
className: K("wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5", "hover:wu-border-blue-p", "disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle", "rtl:wu-text-right", l === "outlined" && "wu-border wu-border-gray-subtle wu-bg-white", d,
|
|
3333
|
+
className: K("wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5", "hover:wu-border-blue-p", "disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle", "rtl:wu-text-right", l === "outlined" && "wu-border wu-border-gray-subtle wu-bg-white", d, $r("trigger")),
|
|
3314
3334
|
children: [/* @__PURE__ */ y("div", {
|
|
3315
3335
|
className: K("wu-truncate", s && "wu-flex wu-items-center wu-gap-1 wu-flex-wrap", !p && "wu-font-light"),
|
|
3316
3336
|
children: p || a
|
|
3317
3337
|
}), /* @__PURE__ */ y(J, {
|
|
3318
3338
|
icon: "wm-arrow-drop-down",
|
|
3319
|
-
className: K("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base", u === "rtl" ? "wu-left-1" : "wu-right-1",
|
|
3339
|
+
className: K("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base", u === "rtl" ? "wu-left-1" : "wu-right-1", $r("drop-icon"))
|
|
3320
3340
|
})]
|
|
3321
3341
|
})
|
|
3322
3342
|
});
|
|
3323
|
-
},
|
|
3343
|
+
}, ai = (e, t, n) => {
|
|
3324
3344
|
let r = String(e[n.label] ?? "").toLowerCase(), i = String(e[n.value] ?? "").toLowerCase();
|
|
3325
3345
|
return r.includes(t) || i.includes(t);
|
|
3326
|
-
},
|
|
3346
|
+
}, oi = (e, t, n) => {
|
|
3327
3347
|
let r = t.trim();
|
|
3328
3348
|
if (r === "") return e;
|
|
3329
3349
|
let i = r.toLowerCase(), a = [];
|
|
3330
3350
|
for (let t of e) {
|
|
3331
3351
|
let e = n.group, r = e ? t[e] : void 0;
|
|
3332
3352
|
if (Array.isArray(r)) {
|
|
3333
|
-
let o = r.filter((e) =>
|
|
3353
|
+
let o = r.filter((e) => ai(e, i, n));
|
|
3334
3354
|
o.length > 0 && a.push({
|
|
3335
3355
|
...t,
|
|
3336
3356
|
[e]: o
|
|
3337
3357
|
});
|
|
3338
|
-
} else
|
|
3358
|
+
} else ai(t, i, n) && a.push(t);
|
|
3339
3359
|
}
|
|
3340
3360
|
return a;
|
|
3341
|
-
},
|
|
3342
|
-
let { data: t, accessorKey: r, value: i, Item: a, Label: o, GroupLabel: s, CustomHeader: c, CustomTrigger: l, NoDataContent: u, Chip: d, onSelect: f, onScroll: p, disabled: m, multiple: h, searchable: g, selectAll: _, virtualizedThreshold: v = 100, showGroupSeparator: x, id: S, dir: C, className: w, listClass: T, placeholder: E = "Select items...", variant: D, labelPosition: O = "top", maxContentWidth: k, maxContentHeight: A, modal: j, ...M } = e, [N, ee] = n.useState(!1), [P, F] = n.useState(""), [I, L] = n.useState(i), R = n.useMemo(() => r, [r]), te = n.useMemo(() => !g || !P ? t :
|
|
3361
|
+
}, si = (e) => {
|
|
3362
|
+
let { data: t, accessorKey: r, value: i, Item: a, Label: o, GroupLabel: s, CustomHeader: c, CustomTrigger: l, NoDataContent: u, Chip: d, onSelect: f, onScroll: p, disabled: m, multiple: h, searchable: g, selectAll: _, virtualizedThreshold: v = 100, showGroupSeparator: x, id: S, dir: C, className: w, listClass: T, placeholder: E = "Select items...", variant: D, labelPosition: O = "top", maxContentWidth: k, maxContentHeight: A, modal: j, ...M } = e, [N, ee] = n.useState(!1), [P, F] = n.useState(""), [I, L] = n.useState(i), R = n.useMemo(() => r, [r]), te = n.useMemo(() => !g || !P ? t : oi(t, P.toLowerCase().trim(), r), [
|
|
3343
3363
|
t,
|
|
3344
3364
|
P,
|
|
3345
3365
|
r.label,
|
|
@@ -3363,7 +3383,7 @@ var Zr = n.memo(Xr), Qr = (e) => {
|
|
|
3363
3383
|
let re = (e) => {
|
|
3364
3384
|
let t = (t, i) => {
|
|
3365
3385
|
let o = r.group && Array.isArray(t[r.group]), c = x && o && i > 0 && e.length > 1;
|
|
3366
|
-
return /* @__PURE__ */ b(n.Fragment, { children: [c && /* @__PURE__ */ y(
|
|
3386
|
+
return /* @__PURE__ */ b(n.Fragment, { children: [c && /* @__PURE__ */ y(ar, {}), /* @__PURE__ */ y(ti, {
|
|
3367
3387
|
option: t,
|
|
3368
3388
|
accessorKey: R,
|
|
3369
3389
|
multiple: h,
|
|
@@ -3380,13 +3400,13 @@ var Zr = n.memo(Xr), Qr = (e) => {
|
|
|
3380
3400
|
}) : e.map((e, n) => t(e, n));
|
|
3381
3401
|
};
|
|
3382
3402
|
return /* @__PURE__ */ b("div", {
|
|
3383
|
-
className: K("wu-flex wu-text-sm wu-gap-2", O === "top" && "wu-flex-col wu-gap-1", O === "left" && "wu-flex-row", O === "right" && "wu-flex-row-reverse",
|
|
3403
|
+
className: K("wu-flex wu-text-sm wu-gap-2", O === "top" && "wu-flex-col wu-gap-1", O === "left" && "wu-flex-row", O === "right" && "wu-flex-row-reverse", $r("container")),
|
|
3384
3404
|
dir: C,
|
|
3385
3405
|
children: [o && /* @__PURE__ */ y(Z, {
|
|
3386
3406
|
htmlFor: S,
|
|
3387
|
-
className:
|
|
3407
|
+
className: $r("label"),
|
|
3388
3408
|
children: o
|
|
3389
|
-
}), /* @__PURE__ */ b(
|
|
3409
|
+
}), /* @__PURE__ */ b(Xn, {
|
|
3390
3410
|
open: N,
|
|
3391
3411
|
onOpenChange: (e) => {
|
|
3392
3412
|
ee(e), e || setTimeout(() => {
|
|
@@ -3394,7 +3414,7 @@ var Zr = n.memo(Xr), Qr = (e) => {
|
|
|
3394
3414
|
}, 100);
|
|
3395
3415
|
},
|
|
3396
3416
|
modal: j,
|
|
3397
|
-
children: [/* @__PURE__ */ y(
|
|
3417
|
+
children: [/* @__PURE__ */ y(ii, {
|
|
3398
3418
|
CustomTrigger: l,
|
|
3399
3419
|
disabled: m,
|
|
3400
3420
|
value: I,
|
|
@@ -3407,33 +3427,33 @@ var Zr = n.memo(Xr), Qr = (e) => {
|
|
|
3407
3427
|
id: S,
|
|
3408
3428
|
dir: C,
|
|
3409
3429
|
...M
|
|
3410
|
-
}), /* @__PURE__ */ y(
|
|
3411
|
-
className: K("wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p",
|
|
3430
|
+
}), /* @__PURE__ */ y(Qn, {
|
|
3431
|
+
className: K("wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p", $r("content")),
|
|
3412
3432
|
align: "start",
|
|
3413
3433
|
sideOffset: -1,
|
|
3414
3434
|
style: { maxWidth: k },
|
|
3415
|
-
children: /* @__PURE__ */ b(
|
|
3435
|
+
children: /* @__PURE__ */ b(er, {
|
|
3416
3436
|
id: e.id,
|
|
3417
3437
|
shouldFilter: !1,
|
|
3418
3438
|
children: [
|
|
3419
|
-
g && /* @__PURE__ */ y(
|
|
3439
|
+
g && /* @__PURE__ */ y(ni, {
|
|
3420
3440
|
value: P,
|
|
3421
3441
|
onValueChange: F
|
|
3422
3442
|
}),
|
|
3423
3443
|
c,
|
|
3424
|
-
/* @__PURE__ */ b(
|
|
3425
|
-
className: K("wu-overflow-y-auto",
|
|
3444
|
+
/* @__PURE__ */ b(nr, {
|
|
3445
|
+
className: K("wu-overflow-y-auto", $r("list"), T),
|
|
3426
3446
|
onScroll: p,
|
|
3427
3447
|
style: { maxHeight: A || "420px" },
|
|
3428
3448
|
children: [
|
|
3429
|
-
/* @__PURE__ */ y(
|
|
3430
|
-
/* @__PURE__ */ y(
|
|
3449
|
+
/* @__PURE__ */ y(rr, { children: u || "No results found." }),
|
|
3450
|
+
/* @__PURE__ */ y(ir, { children: h && _?.enabled && !P && /* @__PURE__ */ y(ri, {
|
|
3431
3451
|
data: t,
|
|
3432
3452
|
value: I,
|
|
3433
3453
|
onSelectAll: B,
|
|
3434
3454
|
label: _.label
|
|
3435
3455
|
}) }),
|
|
3436
|
-
/* @__PURE__ */ y(
|
|
3456
|
+
/* @__PURE__ */ y(ir, { children: re(te) })
|
|
3437
3457
|
]
|
|
3438
3458
|
})
|
|
3439
3459
|
]
|
|
@@ -3441,7 +3461,7 @@ var Zr = n.memo(Xr), Qr = (e) => {
|
|
|
3441
3461
|
})]
|
|
3442
3462
|
})]
|
|
3443
3463
|
});
|
|
3444
|
-
},
|
|
3464
|
+
}, ci = n.forwardRef(({ showMenu: e = !1, className: t, color: n = "#1B3380", ...r }, i) => {
|
|
3445
3465
|
let a = K("wu-w-full wu-border wu-transition-all wu-duration-300");
|
|
3446
3466
|
return /* @__PURE__ */ b("div", {
|
|
3447
3467
|
...r,
|
|
@@ -3464,8 +3484,8 @@ var Zr = n.memo(Xr), Qr = (e) => {
|
|
|
3464
3484
|
]
|
|
3465
3485
|
});
|
|
3466
3486
|
});
|
|
3467
|
-
|
|
3468
|
-
var
|
|
3487
|
+
ci.displayName = "WuMenuIcon";
|
|
3488
|
+
var li = { gradientBackground: "_gradientBackground_1uc4j_1" }, ui = (e) => {
|
|
3469
3489
|
let { colors: t, size: n = .55, children: r, className: i, strokeWidth: a, centerOffset: o = {
|
|
3470
3490
|
x: 0,
|
|
3471
3491
|
y: 0
|
|
@@ -3496,35 +3516,35 @@ var ai = { gradientBackground: "_gradientBackground_1uc4j_1" }, oi = (e) => {
|
|
|
3496
3516
|
o
|
|
3497
3517
|
]), /* @__PURE__ */ y("div", {
|
|
3498
3518
|
ref: c,
|
|
3499
|
-
className: K(
|
|
3519
|
+
className: K(li.gradientBackground, "wu-transform-gpu", i),
|
|
3500
3520
|
...s,
|
|
3501
3521
|
children: r
|
|
3502
3522
|
});
|
|
3503
|
-
},
|
|
3523
|
+
}, di = {
|
|
3504
3524
|
wuModalBodyWrapper: "_wuModalBodyWrapper_ogig8_1",
|
|
3505
3525
|
"wu-modal-footer": "_wu-modal-footer_ogig8_5",
|
|
3506
3526
|
"wu-modal-content": "_wu-modal-content_ogig8_5",
|
|
3507
3527
|
"wu-modal-header": "_wu-modal-header_ogig8_9"
|
|
3508
|
-
},
|
|
3528
|
+
}, fi = {
|
|
3509
3529
|
overlay: "data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0",
|
|
3510
3530
|
content: "data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[state=closed]:wu-slide-out-to-left-1/2 data-[state=closed]:wu-slide-out-to-top-[48%] data-[state=open]:wu-slide-in-from-left-1/2 data-[state=open]:wu-slide-in-from-top-[48%]"
|
|
3511
|
-
},
|
|
3531
|
+
}, pi = W.Root, mi = W.Trigger, hi = W.Portal, gi = W.Close, _i = a(({ className: e, ...t }, n) => /* @__PURE__ */ y(W.Overlay, {
|
|
3512
3532
|
ref: n,
|
|
3513
|
-
className: K("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",
|
|
3533
|
+
className: K("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30", fi.overlay, e),
|
|
3514
3534
|
...t
|
|
3515
3535
|
}));
|
|
3516
|
-
|
|
3517
|
-
var
|
|
3536
|
+
_i.displayName = W.Overlay.displayName;
|
|
3537
|
+
var vi = a(({ className: e, children: t, hideCloseButton: n, isStackedCard: r, ...i }, a) => /* @__PURE__ */ b(hi, { children: [/* @__PURE__ */ y(_i, {
|
|
3518
3538
|
className: r ? "wu-bg-transparent" : "",
|
|
3519
3539
|
"data-wu-overlay": !0
|
|
3520
3540
|
}), /* @__PURE__ */ b(W.Content, {
|
|
3521
3541
|
ref: a,
|
|
3522
|
-
className: K("wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200",
|
|
3542
|
+
className: K("wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200", fi.content, e),
|
|
3523
3543
|
...i,
|
|
3524
3544
|
children: [t, !n && /* @__PURE__ */ y(W.Close, {
|
|
3525
3545
|
"aria-label": "close",
|
|
3526
3546
|
asChild: !0,
|
|
3527
|
-
children: /* @__PURE__ */ b(
|
|
3547
|
+
children: /* @__PURE__ */ b(gr, {
|
|
3528
3548
|
variant: "iconOnly",
|
|
3529
3549
|
className: K("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black/[0.08] wu-w-8 wu-h-8 wu-p-0", "wu-top-3 wu-right-4", "group-data-[variant=action]:wu-text-blue-q", "group-data-[variant=upgrade]:wu-text-yellow-deep", "group-data-[variant=critical]:wu-text-red-deep"),
|
|
3530
3550
|
children: [/* @__PURE__ */ y("span", { className: "wm-close wu-leading-5" }), /* @__PURE__ */ y("span", {
|
|
@@ -3534,36 +3554,36 @@ var mi = a(({ className: e, children: t, hideCloseButton: n, isStackedCard: r, .
|
|
|
3534
3554
|
})
|
|
3535
3555
|
})]
|
|
3536
3556
|
})] }));
|
|
3537
|
-
|
|
3538
|
-
var
|
|
3557
|
+
vi.displayName = W.Content.displayName;
|
|
3558
|
+
var yi = ({ className: e, ...t }) => /* @__PURE__ */ y("div", {
|
|
3539
3559
|
className: K("wu-text-center wu-bg-gray-20 wu-w-full", e),
|
|
3540
3560
|
...t
|
|
3541
3561
|
});
|
|
3542
|
-
|
|
3543
|
-
var
|
|
3562
|
+
yi.displayName = "DialogHeader";
|
|
3563
|
+
var bi = ({ className: e, ...t }) => /* @__PURE__ */ y("div", {
|
|
3544
3564
|
className: K("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4", e),
|
|
3545
3565
|
...t
|
|
3546
3566
|
});
|
|
3547
|
-
|
|
3548
|
-
var
|
|
3567
|
+
bi.displayName = "DialogFooter";
|
|
3568
|
+
var xi = a(({ className: e, ...t }, n) => /* @__PURE__ */ y(W.Title, {
|
|
3549
3569
|
ref: n,
|
|
3550
3570
|
className: K("wu-text-lg wu-font-medium wu-flex wu-items-center wu-justify-center wu-gap-1 wu-h-10 wu-leading-none wu-tracking-tight", e),
|
|
3551
3571
|
...t
|
|
3552
3572
|
}));
|
|
3553
|
-
|
|
3554
|
-
var
|
|
3573
|
+
xi.displayName = W.Title.displayName;
|
|
3574
|
+
var Si = a(({ className: e, ...t }, n) => /* @__PURE__ */ y(W.Description, {
|
|
3555
3575
|
ref: n,
|
|
3556
3576
|
className: K("wu-text-sm wu-text-muted-foreground", e),
|
|
3557
3577
|
...t
|
|
3558
3578
|
}));
|
|
3559
|
-
|
|
3579
|
+
Si.displayName = W.Description.displayName;
|
|
3560
3580
|
//#endregion
|
|
3561
3581
|
//#region src/components/modal/WuModal.tsx
|
|
3562
|
-
var
|
|
3582
|
+
var Ci = "calc(100vh - 64px)", wi = {
|
|
3563
3583
|
sm: "400px",
|
|
3564
3584
|
md: "600px",
|
|
3565
3585
|
lg: "1200px"
|
|
3566
|
-
},
|
|
3586
|
+
}, Ti = ({ Trigger: e, children: t, size: n = "md", hideCloseButton: r, preventClickOutside: i, onOpenChange: a, open: o, dir: s, maxWidth: c, maxHeight: l, className: d, style: f, variant: m = "action", allowExternalPortals: h, onOpenAutoFocus: g, onCloseAutoFocus: _, ...v }) => {
|
|
3567
3587
|
let x = {
|
|
3568
3588
|
action: ["#EEF3FBcc 32%", "#1D50F4cc"],
|
|
3569
3589
|
upgrade: ["#FDEDCCcc 32%", "#FF9F00cc"],
|
|
@@ -3571,19 +3591,19 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3571
3591
|
}, S = p(null), C = p(null);
|
|
3572
3592
|
return u(() => () => {
|
|
3573
3593
|
S.current &&= (document.removeEventListener("focusin", S.current.focusin, !0), document.removeEventListener("focusout", S.current.focusout, !0), document.body.style.pointerEvents = "", null);
|
|
3574
|
-
}, []), /* @__PURE__ */ b(
|
|
3594
|
+
}, []), /* @__PURE__ */ b(pi, {
|
|
3575
3595
|
modal: !0,
|
|
3576
3596
|
onOpenChange: a,
|
|
3577
3597
|
open: o,
|
|
3578
|
-
children: [e && /* @__PURE__ */ y(
|
|
3598
|
+
children: [e && /* @__PURE__ */ y(mi, {
|
|
3579
3599
|
asChild: !0,
|
|
3580
3600
|
children: e
|
|
3581
|
-
}), /* @__PURE__ */ y(
|
|
3601
|
+
}), /* @__PURE__ */ y(vi, {
|
|
3582
3602
|
ref: C,
|
|
3583
3603
|
style: {
|
|
3584
3604
|
width: "calc(100% - 64px)",
|
|
3585
|
-
maxWidth: c ||
|
|
3586
|
-
maxHeight: l ||
|
|
3605
|
+
maxWidth: c || wi[n],
|
|
3606
|
+
maxHeight: l || Ci,
|
|
3587
3607
|
...f
|
|
3588
3608
|
},
|
|
3589
3609
|
hideCloseButton: r,
|
|
@@ -3616,34 +3636,34 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3616
3636
|
dir: s,
|
|
3617
3637
|
"aria-describedby": void 0,
|
|
3618
3638
|
"data-variant": m,
|
|
3619
|
-
className: K("wu-group wu-rounded-[.88rem]",
|
|
3639
|
+
className: K("wu-group wu-rounded-[.88rem]", di.wuModalBodyWrapper, d),
|
|
3620
3640
|
...v,
|
|
3621
|
-
children: /* @__PURE__ */ y(
|
|
3641
|
+
children: /* @__PURE__ */ y(ui, {
|
|
3622
3642
|
colors: x[m],
|
|
3623
3643
|
strokeWidth: 4,
|
|
3624
3644
|
className: K("wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col", d),
|
|
3625
|
-
style: { maxHeight: l ||
|
|
3645
|
+
style: { maxHeight: l || Ci },
|
|
3626
3646
|
children: t
|
|
3627
3647
|
})
|
|
3628
3648
|
})]
|
|
3629
3649
|
});
|
|
3630
|
-
},
|
|
3631
|
-
className: K("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white", "wu-p-8 wu-text-gray-lead",
|
|
3650
|
+
}, Ei = ({ children: e, className: t, ...n }) => /* @__PURE__ */ y("div", {
|
|
3651
|
+
className: K("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white", "wu-p-8 wu-text-gray-lead", di["wu-modal-content"], t),
|
|
3632
3652
|
...n,
|
|
3633
3653
|
children: e
|
|
3634
|
-
}),
|
|
3654
|
+
}), Di = ({ children: e, className: t, ...n }) => /* @__PURE__ */ y(yi, {
|
|
3635
3655
|
...n,
|
|
3636
3656
|
"data-variant": "action",
|
|
3637
|
-
className: K("wu-text-lg wu-text-gray-lead wu-font-medium", "wu-rounded-t-[.88rem] wu-px-4", "group-data-[variant=action]:wu-bg-blue-sidebar group-data-[variant=action]:wu-text-blue-q", "group-data-[variant=critical]:wu-bg-[#F9E0E0] group-data-[variant=critical]:wu-text-red-deep", "group-data-[variant=upgrade]:wu-bg-[#FEF1D9] group-data-[variant=upgrade]:wu-text-yellow-deep",
|
|
3638
|
-
children: /* @__PURE__ */ y(
|
|
3657
|
+
className: K("wu-text-lg wu-text-gray-lead wu-font-medium", "wu-rounded-t-[.88rem] wu-px-4", "group-data-[variant=action]:wu-bg-blue-sidebar group-data-[variant=action]:wu-text-blue-q", "group-data-[variant=critical]:wu-bg-[#F9E0E0] group-data-[variant=critical]:wu-text-red-deep", "group-data-[variant=upgrade]:wu-bg-[#FEF1D9] group-data-[variant=upgrade]:wu-text-yellow-deep", di["wu-modal-header"], t),
|
|
3658
|
+
children: /* @__PURE__ */ y(xi, {
|
|
3639
3659
|
className: "wu-font-normal wu-justify-start wu-text-2xl wu-h-14",
|
|
3640
3660
|
children: e
|
|
3641
3661
|
})
|
|
3642
|
-
}),
|
|
3662
|
+
}), Oi = ({ children: e, className: t, ...n }) => /* @__PURE__ */ y(bi, {
|
|
3643
3663
|
...n,
|
|
3644
|
-
className: K("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0", "wu-mx-0 wu-rounded-b-[.88rem] wu-min-h-16 wu-p-4", "group-data-[variant=upgrade]:wu-border-[#EED6A8]", "group-data-[variant=action]:wu-border-[#BAC9F8]", "group-data-[variant=critical]:wu-border-[#F0B3B3]",
|
|
3664
|
+
className: K("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0", "wu-mx-0 wu-rounded-b-[.88rem] wu-min-h-16 wu-p-4", "group-data-[variant=upgrade]:wu-border-[#EED6A8]", "group-data-[variant=action]:wu-border-[#BAC9F8]", "group-data-[variant=critical]:wu-border-[#F0B3B3]", di["wu-modal-footer"], t),
|
|
3645
3665
|
children: e
|
|
3646
|
-
}),
|
|
3666
|
+
}), ki = ({ children: e, className: t, ...r }) => /* @__PURE__ */ y(gi, {
|
|
3647
3667
|
asChild: !0,
|
|
3648
3668
|
children: /* @__PURE__ */ y($e, {
|
|
3649
3669
|
className: t,
|
|
@@ -3651,7 +3671,7 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3651
3671
|
...r,
|
|
3652
3672
|
children: e
|
|
3653
3673
|
})
|
|
3654
|
-
}),
|
|
3674
|
+
}), Ai = [
|
|
3655
3675
|
"Jan",
|
|
3656
3676
|
"Feb",
|
|
3657
3677
|
"Mar",
|
|
@@ -3664,7 +3684,7 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3664
3684
|
"Oct",
|
|
3665
3685
|
"Nov",
|
|
3666
3686
|
"Dec"
|
|
3667
|
-
],
|
|
3687
|
+
], ji = ({ value: e, onChange: t, min: n = I(/* @__PURE__ */ new Date(), { years: 5 }), max: r = k(/* @__PURE__ */ new Date(), { years: 1 }), placeholder: i = "Select a month", Label: a, labelPosition: o = "top", disabled: s, id: c, readonly: l, disabledMonths: d = [], ...h }) => {
|
|
3668
3688
|
let g = f(() => {
|
|
3669
3689
|
if (!e) return null;
|
|
3670
3690
|
let t = new Date(e);
|
|
@@ -3672,7 +3692,7 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3672
3692
|
}, [e]), [_, v] = m(g ? {
|
|
3673
3693
|
year: g.getFullYear(),
|
|
3674
3694
|
month: g.getMonth()
|
|
3675
|
-
} : null), [x, S] = m(g ? `${
|
|
3695
|
+
} : null), [x, S] = m(g ? `${Ai[g.getMonth()]} ${g.getFullYear()}` : void 0), [C, w] = m(() => {
|
|
3676
3696
|
let e = g?.getFullYear() ?? Math.min((/* @__PURE__ */ new Date()).getFullYear(), new Date(r).getFullYear());
|
|
3677
3697
|
return {
|
|
3678
3698
|
value: e,
|
|
@@ -3691,7 +3711,7 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3691
3711
|
v({
|
|
3692
3712
|
year: e,
|
|
3693
3713
|
month: t
|
|
3694
|
-
}), S(`${
|
|
3714
|
+
}), S(`${Ai[t]} ${e}`), w({
|
|
3695
3715
|
value: e,
|
|
3696
3716
|
label: e
|
|
3697
3717
|
});
|
|
@@ -3706,7 +3726,7 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3706
3726
|
label: g.getFullYear()
|
|
3707
3727
|
})), D.current = !1, E(e);
|
|
3708
3728
|
}, j = () => {
|
|
3709
|
-
_ && (D.current = !0, t?.(new Date(_.year, _.month, 15)), S(`${
|
|
3729
|
+
_ && (D.current = !0, t?.(new Date(_.year, _.month, 15)), S(`${Ai[_.month]} ${_.year}`));
|
|
3710
3730
|
}, M = () => {
|
|
3711
3731
|
v(null), S(void 0);
|
|
3712
3732
|
};
|
|
@@ -3735,7 +3755,7 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3735
3755
|
multiple: !1,
|
|
3736
3756
|
maxHeight: 224
|
|
3737
3757
|
})
|
|
3738
|
-
}), /* @__PURE__ */ y(
|
|
3758
|
+
}), /* @__PURE__ */ y(Mi, {
|
|
3739
3759
|
year: C?.value,
|
|
3740
3760
|
selectedMonth: _?.month,
|
|
3741
3761
|
selectedYear: _?.year,
|
|
@@ -3750,7 +3770,7 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3750
3770
|
children: a
|
|
3751
3771
|
})]
|
|
3752
3772
|
});
|
|
3753
|
-
},
|
|
3773
|
+
}, Mi = ({ year: e, selectedMonth: t, selectedYear: r, onClick: i, disabledMonths: a = [] }) => {
|
|
3754
3774
|
let o = /* @__PURE__ */ new Date(), s = o.getFullYear(), c = o.getMonth(), l = n.useMemo(() => {
|
|
3755
3775
|
let e = /* @__PURE__ */ new Set();
|
|
3756
3776
|
return a.forEach((t) => {
|
|
@@ -3760,23 +3780,23 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3760
3780
|
}, [a]);
|
|
3761
3781
|
return /* @__PURE__ */ y("div", {
|
|
3762
3782
|
className: "wu-grid wu-grid-cols-3 wu-grid-rows-4 wu-w-fit wu-gap-[1px] wu-bg-[#d9d9d9] wu-border wu-border-[#d9d9d9] wu-month-picker-grid",
|
|
3763
|
-
children:
|
|
3783
|
+
children: Ai.map((n, a) => {
|
|
3764
3784
|
let o = e === s && a === c, u = t === a && r === e;
|
|
3765
3785
|
return /* @__PURE__ */ y("button", {
|
|
3766
3786
|
disabled: l.has(`${e}-${a}`),
|
|
3767
3787
|
onClick: () => i(a, e),
|
|
3768
3788
|
className: K("wu-bg-white wu-flex wu-items-center wu-justify-center wu-w-[83px] wu-h-[53px] wu-text-xs wu-transition-colors", "hover:wu-bg-gray-25 hover:wu-text-blue-q hover:wu-font-medium", "focus:wu-outline-none focus-visible:wu-border focus-visible:wu-border-blue-p/50", o && "wu-border wu-border-blue-p", u && "wu-bg-blue-p wu-text-white hover:wu-bg-blue-p/80 hover:wu-text-white wu-font-medium", "disabled:wu-bg-gray-20 disabled:wu-text-gray-subtle disabled:hover:wu-bg-gray-20 disabled:hover:wu-text-gray-subtle disabled:hover:wu-font-normal", "wu-month-picker-month"),
|
|
3769
|
-
"data-value": `${
|
|
3789
|
+
"data-value": `${Ai[a]} ${e}`,
|
|
3770
3790
|
"data-month": a,
|
|
3771
3791
|
"data-year": e,
|
|
3772
3792
|
children: n
|
|
3773
3793
|
}, n);
|
|
3774
3794
|
})
|
|
3775
3795
|
});
|
|
3776
|
-
},
|
|
3796
|
+
}, Ni = {
|
|
3777
3797
|
wuPrimaryLink: "_wuPrimaryLink_124of_1",
|
|
3778
3798
|
wuPrimaryPopoverContent: "_wuPrimaryPopoverContent_124of_8"
|
|
3779
|
-
},
|
|
3799
|
+
}, Pi = (e, t, r, i = 96) => {
|
|
3780
3800
|
let a = e.length === 0 || i <= 0, [o, s] = n.useState([]), [c, l] = n.useState([]);
|
|
3781
3801
|
return n.useEffect(() => {
|
|
3782
3802
|
if (a) {
|
|
@@ -3795,11 +3815,11 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3795
3815
|
i,
|
|
3796
3816
|
a
|
|
3797
3817
|
]), a ? [[], []] : [o, c];
|
|
3798
|
-
},
|
|
3818
|
+
}, Fi = (e) => {
|
|
3799
3819
|
let { Links: t, children: r, className: i, ...a } = e, o = n.useMemo(() => t.map((e, t) => n.cloneElement(e, {
|
|
3800
|
-
className: K(
|
|
3820
|
+
className: K(Ni.wuPrimaryLink, e.props.className, "wu-primary-nav-link"),
|
|
3801
3821
|
key: t
|
|
3802
|
-
})), [t]), s = n.useRef(null), c = n.useRef(null), [l, u] =
|
|
3822
|
+
})), [t]), s = n.useRef(null), c = n.useRef(null), [l, u] = Pi(o, s, c);
|
|
3803
3823
|
return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ b("header", {
|
|
3804
3824
|
className: K("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b", i),
|
|
3805
3825
|
...a,
|
|
@@ -3809,12 +3829,12 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3809
3829
|
children: [/* @__PURE__ */ y("nav", {
|
|
3810
3830
|
className: "wu-flex wu-items-center wu-justify-start wu-gap-4 wu-primary-nav-left",
|
|
3811
3831
|
children: l
|
|
3812
|
-
}), u.length > 0 && /* @__PURE__ */ b(
|
|
3832
|
+
}), u.length > 0 && /* @__PURE__ */ b(Xn, { children: [/* @__PURE__ */ y(Zn, {
|
|
3813
3833
|
className: "wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25",
|
|
3814
3834
|
"aria-label": "more",
|
|
3815
3835
|
children: /* @__PURE__ */ y("span", { className: "wm-more-vert" })
|
|
3816
|
-
}), /* @__PURE__ */ y(
|
|
3817
|
-
className: K(
|
|
3836
|
+
}), /* @__PURE__ */ y(Qn, {
|
|
3837
|
+
className: K(Ni.wuPrimaryPopoverContent, "wu-primary-nav-popover-left"),
|
|
3818
3838
|
align: "start",
|
|
3819
3839
|
sideOffset: 12,
|
|
3820
3840
|
children: u
|
|
@@ -3823,29 +3843,29 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3823
3843
|
className: "wu-items-center wu-justify-end wu-hidden wu-gap-4 sm:wu-flex wu-primary-nav-right",
|
|
3824
3844
|
ref: c,
|
|
3825
3845
|
children: r
|
|
3826
|
-
}), /* @__PURE__ */ b(
|
|
3846
|
+
}), /* @__PURE__ */ b(Xn, { children: [/* @__PURE__ */ y(Zn, {
|
|
3827
3847
|
className: "sm:wu-hidden",
|
|
3828
3848
|
children: /* @__PURE__ */ y("span", { className: "wu-text-lg wm-menu" })
|
|
3829
|
-
}), /* @__PURE__ */ y(
|
|
3849
|
+
}), /* @__PURE__ */ y(Qn, {
|
|
3830
3850
|
className: "wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",
|
|
3831
3851
|
align: "end",
|
|
3832
3852
|
sideOffset: 4,
|
|
3833
3853
|
children: r
|
|
3834
3854
|
})] })] })]
|
|
3835
3855
|
}) });
|
|
3836
|
-
},
|
|
3856
|
+
}, Ii = {
|
|
3837
3857
|
wuSecondaryLink: "_wuSecondaryLink_1edl1_1",
|
|
3838
3858
|
wuSecondaryNav: "_wuSecondaryNav_1edl1_6",
|
|
3839
3859
|
wuSecondaryPopoverContent: "_wuSecondaryPopoverContent_1edl1_11"
|
|
3840
|
-
},
|
|
3860
|
+
}, Li = (e) => {
|
|
3841
3861
|
let { Links: t, children: r, className: i, ...a } = e, o = f(() => t.map((e, t) => n.cloneElement(e.link, {
|
|
3842
3862
|
key: t,
|
|
3843
|
-
className: K(
|
|
3863
|
+
className: K(Ii.wuSecondaryLink, e.link.props.className, "wu-secondary-nav-link-container"),
|
|
3844
3864
|
children: /* @__PURE__ */ b(v, { children: [n.cloneElement(e.imgOrIcon, { className: K("wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5", e.imgOrIcon.props.className) }), /* @__PURE__ */ y("div", {
|
|
3845
3865
|
className: "wu-secondary-nav-link",
|
|
3846
3866
|
children: e.link.props.children
|
|
3847
3867
|
})] })
|
|
3848
|
-
})), [t]), s = n.useRef(null), c = n.useRef(null), l = n.useRef(null), [u, d] =
|
|
3868
|
+
})), [t]), s = n.useRef(null), c = n.useRef(null), l = n.useRef(null), [u, d] = Pi(o, s, l);
|
|
3849
3869
|
return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ b("header", {
|
|
3850
3870
|
className: K("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]", i),
|
|
3851
3871
|
...a,
|
|
@@ -3853,15 +3873,15 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3853
3873
|
children: [/* @__PURE__ */ b("div", {
|
|
3854
3874
|
className: "wu-flex wu-items-center wu-justify-start wu-gap-2",
|
|
3855
3875
|
children: [/* @__PURE__ */ y("nav", {
|
|
3856
|
-
className: K(
|
|
3876
|
+
className: K(Ii.wuSecondaryNav, "wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left"),
|
|
3857
3877
|
ref: c,
|
|
3858
3878
|
children: u
|
|
3859
|
-
}), d.length > 0 && /* @__PURE__ */ b(
|
|
3879
|
+
}), d.length > 0 && /* @__PURE__ */ b(Xn, { children: [/* @__PURE__ */ y(Zn, {
|
|
3860
3880
|
className: "wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25",
|
|
3861
3881
|
"aria-label": "more",
|
|
3862
3882
|
children: /* @__PURE__ */ y("span", { className: "wm-more-vert" })
|
|
3863
|
-
}), /* @__PURE__ */ y(
|
|
3864
|
-
className: K(
|
|
3883
|
+
}), /* @__PURE__ */ y(Qn, {
|
|
3884
|
+
className: K(Ii.wuSecondaryNavPopover, "wu-secondary-nav-popover-left"),
|
|
3865
3885
|
align: "start",
|
|
3866
3886
|
sideOffset: 12,
|
|
3867
3887
|
children: d
|
|
@@ -3870,17 +3890,17 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3870
3890
|
className: "wu-items-center wu-justify-end wu-hidden sm:wu-flex",
|
|
3871
3891
|
ref: l,
|
|
3872
3892
|
children: r
|
|
3873
|
-
}), /* @__PURE__ */ b(
|
|
3893
|
+
}), /* @__PURE__ */ b(Xn, { children: [/* @__PURE__ */ y(Zn, {
|
|
3874
3894
|
className: "sm:wu-hidden",
|
|
3875
3895
|
children: /* @__PURE__ */ y("span", { className: "wu-text-lg wm-menu" })
|
|
3876
|
-
}), /* @__PURE__ */ y(
|
|
3896
|
+
}), /* @__PURE__ */ y(Qn, {
|
|
3877
3897
|
className: "wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",
|
|
3878
3898
|
align: "end",
|
|
3879
3899
|
sideOffset: 12,
|
|
3880
3900
|
children: r
|
|
3881
3901
|
})] })] })]
|
|
3882
3902
|
}) });
|
|
3883
|
-
},
|
|
3903
|
+
}, Ri = n.forwardRef(({ totalRows: e, initialPage: t = 0, initialPageSize: n = 100, onPageChange: r, className: i, disabled: a = !1, ...o }, c) => {
|
|
3884
3904
|
let [l, d] = m(t), [f, p] = m(n);
|
|
3885
3905
|
u(() => {
|
|
3886
3906
|
d(t), p(n);
|
|
@@ -3893,26 +3913,26 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3893
3913
|
...o,
|
|
3894
3914
|
role: "navigation",
|
|
3895
3915
|
children: [
|
|
3896
|
-
/* @__PURE__ */ y(
|
|
3916
|
+
/* @__PURE__ */ y(zi, {
|
|
3897
3917
|
label: "Previous page",
|
|
3898
3918
|
onClick: () => x(l - 1),
|
|
3899
3919
|
disabled: l === 0 || a,
|
|
3900
3920
|
icon: "wm-arrow-back-ios-new",
|
|
3901
3921
|
className: "hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-prev-btn"
|
|
3902
3922
|
}),
|
|
3903
|
-
/* @__PURE__ */ y(
|
|
3923
|
+
/* @__PURE__ */ y(Br, {
|
|
3904
3924
|
name: `${g} - ${_}`,
|
|
3905
3925
|
className: "wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",
|
|
3906
3926
|
align: "end",
|
|
3907
3927
|
disabled: a,
|
|
3908
|
-
children: /* @__PURE__ */ y(
|
|
3928
|
+
children: /* @__PURE__ */ y(Ir, {
|
|
3909
3929
|
style: { maxHeight: "224px" },
|
|
3910
3930
|
dir: o.dir,
|
|
3911
3931
|
children: v.length > 100 ? /* @__PURE__ */ y(Qt, {
|
|
3912
3932
|
className: "wu-pagination-list",
|
|
3913
3933
|
containerHeight: 224,
|
|
3914
3934
|
list: v,
|
|
3915
|
-
callback: (t, n) => /* @__PURE__ */ b(
|
|
3935
|
+
callback: (t, n) => /* @__PURE__ */ b(Mr, {
|
|
3916
3936
|
onSelect: () => x(n),
|
|
3917
3937
|
className: K("wu-py-2", n === l && "wu-bg-gray-20", "wu-pagination-item"),
|
|
3918
3938
|
children: [
|
|
@@ -3921,7 +3941,7 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3921
3941
|
Math.min((n + 1) * f, e)
|
|
3922
3942
|
]
|
|
3923
3943
|
}, t)
|
|
3924
|
-
}) : v.map((t) => /* @__PURE__ */ b(
|
|
3944
|
+
}) : v.map((t) => /* @__PURE__ */ b(Mr, {
|
|
3925
3945
|
onSelect: () => x(t),
|
|
3926
3946
|
className: K(t === l && "wu-bg-gray-20", "wu-py-2 hover:wu-bg-gray-20", "wu-pagination-item"),
|
|
3927
3947
|
children: [
|
|
@@ -3932,7 +3952,7 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3932
3952
|
}, t))
|
|
3933
3953
|
})
|
|
3934
3954
|
}),
|
|
3935
|
-
/* @__PURE__ */ y(
|
|
3955
|
+
/* @__PURE__ */ y(zi, {
|
|
3936
3956
|
label: "Next page",
|
|
3937
3957
|
onClick: () => x(l + 1),
|
|
3938
3958
|
disabled: l === h - 1 || a,
|
|
@@ -3942,39 +3962,39 @@ var yi = "calc(100vh - 64px)", bi = {
|
|
|
3942
3962
|
]
|
|
3943
3963
|
});
|
|
3944
3964
|
});
|
|
3945
|
-
|
|
3946
|
-
var
|
|
3965
|
+
Ri.displayName = "WuPagination";
|
|
3966
|
+
var zi = ({ label: e, onClick: t, disabled: n, icon: r, className: i }) => /* @__PURE__ */ y($e, {
|
|
3947
3967
|
variant: "iconOnly",
|
|
3948
3968
|
onClick: t,
|
|
3949
3969
|
disabled: n,
|
|
3950
3970
|
className: K("wu-w-8 wu-h-8 wu-rounded-xs wu-group disabled:wu-text-zinc-300 disabled:wu-bg-white wu-text-gray-lead focus:wu-bg-color-none", i),
|
|
3951
3971
|
"aria-label": e,
|
|
3952
3972
|
children: /* @__PURE__ */ y("span", { className: K("wu-text-sm", r) })
|
|
3953
|
-
}),
|
|
3973
|
+
}), Bi = ({ Trigger: e, children: t, className: n, dir: r, open: i, onOpenChange: a, modal: o, ...s }) => /* @__PURE__ */ b(Xn, {
|
|
3954
3974
|
open: i,
|
|
3955
3975
|
onOpenChange: a,
|
|
3956
3976
|
modal: o,
|
|
3957
|
-
children: [/* @__PURE__ */ y(
|
|
3977
|
+
children: [/* @__PURE__ */ y(Zn, {
|
|
3958
3978
|
asChild: !0,
|
|
3959
3979
|
dir: r,
|
|
3960
3980
|
children: e
|
|
3961
|
-
}), /* @__PURE__ */ y(
|
|
3981
|
+
}), /* @__PURE__ */ y(Qn, {
|
|
3962
3982
|
className: K("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher", n),
|
|
3963
3983
|
dir: r,
|
|
3964
3984
|
...s,
|
|
3965
3985
|
children: t
|
|
3966
3986
|
})]
|
|
3967
|
-
}),
|
|
3987
|
+
}), Vi = (e) => /* @__PURE__ */ y(oe, {
|
|
3968
3988
|
asChild: !0,
|
|
3969
3989
|
children: /* @__PURE__ */ y($e, { ...e })
|
|
3970
|
-
}),
|
|
3990
|
+
}), Hi = t.forwardRef(({ className: e, orientation: t, ...n }, r) => /* @__PURE__ */ y(me.Root, {
|
|
3971
3991
|
orientation: t,
|
|
3972
3992
|
className: K(t === "horizontal" ? "wu-flex wu-flex-row wu-items-center wu-gap-4" : "wu-grid wu-gap-2", e),
|
|
3973
3993
|
...n,
|
|
3974
3994
|
ref: r
|
|
3975
3995
|
}));
|
|
3976
|
-
|
|
3977
|
-
var
|
|
3996
|
+
Hi.displayName = me.Root.displayName;
|
|
3997
|
+
var Ui = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(me.Item, {
|
|
3978
3998
|
ref: n,
|
|
3979
3999
|
className: K("wu-group wu-aspect-square wu-h-4 wu-w-4 wu-rounded-full wu-border wu-border-gray-subtle wu-text-blue-p wu-ring-offset-white disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-border-blue-p hover:wu-bg-gray-20 data-[state=checked]:wu-border-blue-p hover:data-[state=checked]:wu-border-blue-q hover:data-[state=checked]:wu-bg-inherit focus:wu-outline-2 focus:wu-outline-offset-4 focus:wu-outline-blue-soft disabled:hover:wu-border-gray-subtle disabled:wu-hover:bg-gray-20 disabled:wu-bg-gray-20", e),
|
|
3980
4000
|
...t,
|
|
@@ -3983,10 +4003,10 @@ var zi = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(me.Item,
|
|
|
3983
4003
|
children: /* @__PURE__ */ y("div", { className: "wu-w-2 wu-h-2 wu-rounded-full wu-bg-blue-p group-hover:group-data-[state=checked]:wu-bg-blue-q" })
|
|
3984
4004
|
})
|
|
3985
4005
|
}));
|
|
3986
|
-
|
|
4006
|
+
Ui.displayName = me.Item.displayName;
|
|
3987
4007
|
//#endregion
|
|
3988
4008
|
//#region src/components/radio/WuRadioGroup.tsx
|
|
3989
|
-
var
|
|
4009
|
+
var Wi = n.forwardRef((e, t) => {
|
|
3990
4010
|
let { options: n, defaultValue: r, onChange: i, label: a, dir: o, orientation: s = "vertical", ...c } = e;
|
|
3991
4011
|
return /* @__PURE__ */ b("div", {
|
|
3992
4012
|
"data-slot": "wu-radio-group",
|
|
@@ -3995,7 +4015,7 @@ var Bi = n.forwardRef((e, t) => {
|
|
|
3995
4015
|
children: [/* @__PURE__ */ y(Z, {
|
|
3996
4016
|
htmlFor: c.id,
|
|
3997
4017
|
children: a
|
|
3998
|
-
}), /* @__PURE__ */ y(
|
|
4018
|
+
}), /* @__PURE__ */ y(Hi, {
|
|
3999
4019
|
defaultValue: r,
|
|
4000
4020
|
required: c.required,
|
|
4001
4021
|
disabled: c.disabled,
|
|
@@ -4007,7 +4027,7 @@ var Bi = n.forwardRef((e, t) => {
|
|
|
4007
4027
|
ref: t,
|
|
4008
4028
|
children: n.map((e) => /* @__PURE__ */ b("div", {
|
|
4009
4029
|
className: "wu-flex wu-items-center wu-gap-2 wu-radio-item-container",
|
|
4010
|
-
children: [/* @__PURE__ */ y(
|
|
4030
|
+
children: [/* @__PURE__ */ y(Ui, {
|
|
4011
4031
|
value: e.value,
|
|
4012
4032
|
id: e.value,
|
|
4013
4033
|
disabled: e.disabled,
|
|
@@ -4023,28 +4043,28 @@ var Bi = n.forwardRef((e, t) => {
|
|
|
4023
4043
|
})]
|
|
4024
4044
|
});
|
|
4025
4045
|
});
|
|
4026
|
-
|
|
4046
|
+
Wi.displayName = "WuRadioGroup";
|
|
4027
4047
|
//#endregion
|
|
4028
4048
|
//#region src/components/scrollArea/WuScrollArea.tsx
|
|
4029
|
-
var
|
|
4049
|
+
var Gi = (e) => {
|
|
4030
4050
|
let { children: t, ...n } = e;
|
|
4031
|
-
return /* @__PURE__ */ b(
|
|
4051
|
+
return /* @__PURE__ */ b(Ir, {
|
|
4032
4052
|
...n,
|
|
4033
4053
|
role: "complementary",
|
|
4034
4054
|
"aria-label": "ScrollArea",
|
|
4035
|
-
children: [t, /* @__PURE__ */ y(
|
|
4055
|
+
children: [t, /* @__PURE__ */ y(Lr, { orientation: "horizontal" })]
|
|
4036
4056
|
});
|
|
4037
4057
|
};
|
|
4038
4058
|
//#endregion
|
|
4039
4059
|
//#region src/components/segmentedSelector/hooks/useSegmentedIndicator.ts
|
|
4040
|
-
function
|
|
4060
|
+
function Ki(e) {
|
|
4041
4061
|
let t = e.querySelector("button[data-pressed]:not(:disabled)");
|
|
4042
4062
|
t ? (e.style.setProperty("--wu-seg-x", `${t.offsetLeft}px`), e.style.setProperty("--wu-seg-w", `${t.offsetWidth}px`), e.style.setProperty("--wu-seg-o", "1")) : e.style.setProperty("--wu-seg-o", "0");
|
|
4043
4063
|
}
|
|
4044
|
-
function
|
|
4064
|
+
function qi(e, t) {
|
|
4045
4065
|
d(() => {
|
|
4046
4066
|
let t = e.current;
|
|
4047
|
-
if (!t || (
|
|
4067
|
+
if (!t || (Ki(t), t.dataset.ready)) return;
|
|
4048
4068
|
let n = requestAnimationFrame(() => {
|
|
4049
4069
|
e.current && (e.current.dataset.ready = "true");
|
|
4050
4070
|
});
|
|
@@ -4052,16 +4072,16 @@ function Ui(e, t) {
|
|
|
4052
4072
|
}, [t]), d(() => {
|
|
4053
4073
|
let t = e.current;
|
|
4054
4074
|
if (!t) return;
|
|
4055
|
-
let n = new ResizeObserver(() =>
|
|
4075
|
+
let n = new ResizeObserver(() => Ki(t));
|
|
4056
4076
|
return n.observe(t), () => n.disconnect();
|
|
4057
4077
|
}, []);
|
|
4058
4078
|
}
|
|
4059
|
-
var
|
|
4079
|
+
var Ji = {
|
|
4060
4080
|
wuSegmentedSelector: "_wuSegmentedSelector_19z31_1",
|
|
4061
4081
|
wuSegmentedSelectorItem: "_wuSegmentedSelectorItem_19z31_35"
|
|
4062
|
-
},
|
|
4082
|
+
}, Yi = ({ value: e, defaultValue: t, onChange: n, size: r = "md", iconOnly: i, disabled: a, className: o, children: s, ...c }) => {
|
|
4063
4083
|
let [l, u] = m(t), d = p(null);
|
|
4064
|
-
return
|
|
4084
|
+
return qi(d, e ?? l), /* @__PURE__ */ y(he, {
|
|
4065
4085
|
ref: d,
|
|
4066
4086
|
value: e === void 0 ? void 0 : [e],
|
|
4067
4087
|
defaultValue: t === void 0 ? void 0 : [t],
|
|
@@ -4072,46 +4092,46 @@ var Wi = {
|
|
|
4072
4092
|
disabled: a,
|
|
4073
4093
|
"data-size": r,
|
|
4074
4094
|
"data-icon-only": i || void 0,
|
|
4075
|
-
className: K(
|
|
4095
|
+
className: K(Ji.wuSegmentedSelector, o),
|
|
4076
4096
|
...c,
|
|
4077
4097
|
"data-slot": "wu-segmented-selector",
|
|
4078
4098
|
children: s
|
|
4079
4099
|
});
|
|
4080
4100
|
};
|
|
4081
|
-
|
|
4101
|
+
Yi.displayName = "WuSegmentedSelector";
|
|
4082
4102
|
//#endregion
|
|
4083
4103
|
//#region src/components/segmentedSelector/subComponents/WuSegmentedSelectorItem.tsx
|
|
4084
|
-
var
|
|
4104
|
+
var Xi = a(({ value: e, className: t, children: n, ...r }, i) => /* @__PURE__ */ y(ge, {
|
|
4085
4105
|
ref: i,
|
|
4086
4106
|
value: e,
|
|
4087
|
-
className: K(
|
|
4107
|
+
className: K(Ji.wuSegmentedSelectorItem, t),
|
|
4088
4108
|
...r,
|
|
4089
4109
|
"data-slot": "wu-segmented-selector-item",
|
|
4090
4110
|
children: n
|
|
4091
4111
|
}));
|
|
4092
|
-
|
|
4112
|
+
Xi.displayName = "WuSegmentedSelectorItem";
|
|
4093
4113
|
//#endregion
|
|
4094
4114
|
//#region src/base/ui/input.tsx
|
|
4095
|
-
var
|
|
4115
|
+
var Zi = t.forwardRef(({ className: e, type: t, ...n }, r) => /* @__PURE__ */ y("input", {
|
|
4096
4116
|
type: t,
|
|
4097
4117
|
className: K("wu-flex wu-h-8 wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead", "file:wu-border-0 file:wu-bg-gray-40 file:wu-text-gray-notification file:wu-text-sm file:wu-font-normal file:wu-relative file:wu-bottom-[3px]", "wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light", "disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle", "read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle", "focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40", e),
|
|
4098
4118
|
ref: r,
|
|
4099
4119
|
...n
|
|
4100
4120
|
}));
|
|
4101
|
-
|
|
4121
|
+
Zi.displayName = "Input";
|
|
4102
4122
|
//#endregion
|
|
4103
4123
|
//#region src/base/ui/separator.tsx
|
|
4104
|
-
var
|
|
4124
|
+
var Qi = t.forwardRef(({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }, i) => /* @__PURE__ */ y(_e.Root, {
|
|
4105
4125
|
ref: i,
|
|
4106
4126
|
decorative: n,
|
|
4107
4127
|
orientation: t,
|
|
4108
4128
|
className: K("wu-shrink-0 wu-bg-gray-40", t === "horizontal" ? "wu-h-[1px] wu-w-full" : "wu-h-full wu-w-[1px]", e),
|
|
4109
4129
|
...r
|
|
4110
4130
|
}));
|
|
4111
|
-
|
|
4131
|
+
Qi.displayName = _e.Root.displayName;
|
|
4112
4132
|
//#endregion
|
|
4113
4133
|
//#region src/base/ui/skeleton.tsx
|
|
4114
|
-
function
|
|
4134
|
+
function $i({ className: e, ...t }) {
|
|
4115
4135
|
return /* @__PURE__ */ y("div", {
|
|
4116
4136
|
className: K("animate-pulse rounded-md bg-muted", e),
|
|
4117
4137
|
...t
|
|
@@ -4119,28 +4139,28 @@ function Yi({ className: e, ...t }) {
|
|
|
4119
4139
|
}
|
|
4120
4140
|
//#endregion
|
|
4121
4141
|
//#region src/hooks/useMobile.tsx
|
|
4122
|
-
var
|
|
4123
|
-
function
|
|
4142
|
+
var ea = 768;
|
|
4143
|
+
function ta() {
|
|
4124
4144
|
let [e, n] = t.useState(void 0);
|
|
4125
4145
|
return t.useEffect(() => {
|
|
4126
|
-
let e = window.matchMedia(`(max-width: ${
|
|
4127
|
-
n(window.innerWidth <
|
|
4146
|
+
let e = window.matchMedia(`(max-width: ${ea - 1}px)`), t = () => {
|
|
4147
|
+
n(window.innerWidth < ea);
|
|
4128
4148
|
};
|
|
4129
|
-
return e.addEventListener("change", t), n(window.innerWidth <
|
|
4149
|
+
return e.addEventListener("change", t), n(window.innerWidth < ea), () => e.removeEventListener("change", t);
|
|
4130
4150
|
}, []), !!e;
|
|
4131
4151
|
}
|
|
4132
4152
|
//#endregion
|
|
4133
4153
|
//#region src/components/sidebar/shadcn/sidebar.tsx
|
|
4134
|
-
var
|
|
4135
|
-
function
|
|
4136
|
-
let e = t.useContext(
|
|
4154
|
+
var na = "sidebar_state", ra = 3600 * 24 * 7, ia = "256px", aa = "256px", oa = "3rem", sa = "b", ca = t.createContext(null);
|
|
4155
|
+
function la() {
|
|
4156
|
+
let e = t.useContext(ca);
|
|
4137
4157
|
if (!e) throw Error("useSidebar must be used within a SidebarProvider.");
|
|
4138
4158
|
return e;
|
|
4139
4159
|
}
|
|
4140
|
-
var
|
|
4141
|
-
let l =
|
|
4160
|
+
var ua = t.forwardRef(({ defaultOpen: e = !0, open: n, onOpenChange: r, className: i, style: a, children: o, ...s }, c) => {
|
|
4161
|
+
let l = ta(), [u, d] = t.useState(!1), [f, p] = t.useState(l ? !0 : e), m = n ?? f, h = t.useCallback((e) => {
|
|
4142
4162
|
let t = typeof e == "function" ? e(m) : e;
|
|
4143
|
-
r ? r(t) : p(t), document.cookie = `${
|
|
4163
|
+
r ? r(t) : p(t), document.cookie = `${na}=${t}; path=/; max-age=${ra}`;
|
|
4144
4164
|
}, [r, m]), g = t.useCallback(() => l ? d((e) => !e) : h((e) => !e), [
|
|
4145
4165
|
l,
|
|
4146
4166
|
h,
|
|
@@ -4148,7 +4168,7 @@ var oa = t.forwardRef(({ defaultOpen: e = !0, open: n, onOpenChange: r, classNam
|
|
|
4148
4168
|
]);
|
|
4149
4169
|
t.useEffect(() => {
|
|
4150
4170
|
let e = (e) => {
|
|
4151
|
-
e.key ===
|
|
4171
|
+
e.key === sa && (e.metaKey || e.ctrlKey) && (e.preventDefault(), g());
|
|
4152
4172
|
};
|
|
4153
4173
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
4154
4174
|
}, [g]);
|
|
@@ -4169,14 +4189,14 @@ var oa = t.forwardRef(({ defaultOpen: e = !0, open: n, onOpenChange: r, classNam
|
|
|
4169
4189
|
d,
|
|
4170
4190
|
g
|
|
4171
4191
|
]);
|
|
4172
|
-
return /* @__PURE__ */ y(
|
|
4192
|
+
return /* @__PURE__ */ y(ca.Provider, {
|
|
4173
4193
|
value: v,
|
|
4174
4194
|
children: /* @__PURE__ */ y(Dt, {
|
|
4175
4195
|
delayDuration: 0,
|
|
4176
4196
|
children: /* @__PURE__ */ y("div", {
|
|
4177
4197
|
style: {
|
|
4178
|
-
"--sidebar-width":
|
|
4179
|
-
"--sidebar-width-icon":
|
|
4198
|
+
"--sidebar-width": ia,
|
|
4199
|
+
"--sidebar-width-icon": oa,
|
|
4180
4200
|
...a
|
|
4181
4201
|
},
|
|
4182
4202
|
className: K("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full", i),
|
|
@@ -4187,23 +4207,23 @@ var oa = t.forwardRef(({ defaultOpen: e = !0, open: n, onOpenChange: r, classNam
|
|
|
4187
4207
|
})
|
|
4188
4208
|
});
|
|
4189
4209
|
});
|
|
4190
|
-
|
|
4191
|
-
var
|
|
4192
|
-
let { isMobile: s, state: c, openMobile: l, setOpenMobile: u } =
|
|
4210
|
+
ua.displayName = "SidebarProvider";
|
|
4211
|
+
var da = t.forwardRef(({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcanvas", className: r, children: i, ...a }, o) => {
|
|
4212
|
+
let { isMobile: s, state: c, openMobile: l, setOpenMobile: u } = la();
|
|
4193
4213
|
return n === "none" ? /* @__PURE__ */ y("div", {
|
|
4194
4214
|
className: K("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col", r),
|
|
4195
4215
|
ref: o,
|
|
4196
4216
|
...a,
|
|
4197
4217
|
children: i
|
|
4198
|
-
}) : s ? /* @__PURE__ */ y(
|
|
4218
|
+
}) : s ? /* @__PURE__ */ y(_r, {
|
|
4199
4219
|
open: l,
|
|
4200
4220
|
onOpenChange: u,
|
|
4201
4221
|
...a,
|
|
4202
|
-
children: /* @__PURE__ */ y(
|
|
4222
|
+
children: /* @__PURE__ */ y(Cr, {
|
|
4203
4223
|
"data-sidebar": "sidebar",
|
|
4204
4224
|
"data-mobile": "true",
|
|
4205
4225
|
className: "wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",
|
|
4206
|
-
style: { "--sidebar-width":
|
|
4226
|
+
style: { "--sidebar-width": aa },
|
|
4207
4227
|
side: e,
|
|
4208
4228
|
children: /* @__PURE__ */ y("div", {
|
|
4209
4229
|
className: "wu-flex wu-flex-col wu-w-full wu-h-full",
|
|
@@ -4228,10 +4248,10 @@ var sa = t.forwardRef(({ side: e = "left", variant: t = "sidebar", collapsible:
|
|
|
4228
4248
|
})]
|
|
4229
4249
|
});
|
|
4230
4250
|
});
|
|
4231
|
-
|
|
4232
|
-
var
|
|
4233
|
-
let { toggleSidebar: a } =
|
|
4234
|
-
return /* @__PURE__ */ b(
|
|
4251
|
+
da.displayName = "Sidebar";
|
|
4252
|
+
var fa = t.forwardRef(({ className: e, onClick: t, children: n, ...r }, i) => {
|
|
4253
|
+
let { toggleSidebar: a } = la();
|
|
4254
|
+
return /* @__PURE__ */ b(gr, {
|
|
4235
4255
|
ref: i,
|
|
4236
4256
|
"data-sidebar": "trigger",
|
|
4237
4257
|
variant: "secondary",
|
|
@@ -4246,9 +4266,9 @@ var ca = t.forwardRef(({ className: e, onClick: t, children: n, ...r }, i) => {
|
|
|
4246
4266
|
})]
|
|
4247
4267
|
});
|
|
4248
4268
|
});
|
|
4249
|
-
|
|
4250
|
-
var
|
|
4251
|
-
let { toggleSidebar: r } =
|
|
4269
|
+
fa.displayName = "SidebarTrigger";
|
|
4270
|
+
var pa = t.forwardRef(({ className: e, ...t }, n) => {
|
|
4271
|
+
let { toggleSidebar: r } = la();
|
|
4252
4272
|
return /* @__PURE__ */ y("button", {
|
|
4253
4273
|
ref: n,
|
|
4254
4274
|
"data-sidebar": "rail",
|
|
@@ -4260,91 +4280,91 @@ var la = t.forwardRef(({ className: e, ...t }, n) => {
|
|
|
4260
4280
|
...t
|
|
4261
4281
|
});
|
|
4262
4282
|
});
|
|
4263
|
-
|
|
4264
|
-
var
|
|
4283
|
+
pa.displayName = "SidebarRail";
|
|
4284
|
+
var ma = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("main", {
|
|
4265
4285
|
ref: n,
|
|
4266
4286
|
className: K("wu-relative wu-flex wu-w-full wu-flex-1 wu-flex-col", "md:peer-data-[variant=inset]:wu-m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:wu-ml-2 md:peer-data-[variant=inset]:wu-ml-0 md:peer-data-[variant=inset]:wu-rounded-xl md:peer-data-[variant=inset]:wu-shadow", e),
|
|
4267
4287
|
...t
|
|
4268
4288
|
}));
|
|
4269
|
-
|
|
4270
|
-
var
|
|
4289
|
+
ma.displayName = "SidebarInset";
|
|
4290
|
+
var ha = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(Zi, {
|
|
4271
4291
|
ref: n,
|
|
4272
4292
|
"data-sidebar": "input",
|
|
4273
4293
|
className: K("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2", e),
|
|
4274
4294
|
...t
|
|
4275
4295
|
}));
|
|
4276
|
-
|
|
4277
|
-
var
|
|
4296
|
+
ha.displayName = "SidebarInput";
|
|
4297
|
+
var ga = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", {
|
|
4278
4298
|
ref: n,
|
|
4279
4299
|
"data-sidebar": "header",
|
|
4280
4300
|
className: K("wu-flex wu-flex-col wu-gap-2 wu-p-2", e),
|
|
4281
4301
|
...t
|
|
4282
4302
|
}));
|
|
4283
|
-
|
|
4284
|
-
var
|
|
4303
|
+
ga.displayName = "SidebarHeader";
|
|
4304
|
+
var _a = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", {
|
|
4285
4305
|
ref: n,
|
|
4286
4306
|
"data-sidebar": "footer",
|
|
4287
4307
|
className: K("wu-flex wu-flex-col wu-gap-2 wu-pb-2", e),
|
|
4288
4308
|
...t
|
|
4289
4309
|
}));
|
|
4290
|
-
|
|
4291
|
-
var
|
|
4310
|
+
_a.displayName = "SidebarFooter";
|
|
4311
|
+
var va = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(Qi, {
|
|
4292
4312
|
ref: n,
|
|
4293
4313
|
"data-sidebar": "separator",
|
|
4294
4314
|
className: K("wu-mx-2 wu-w-auto", e),
|
|
4295
4315
|
...t
|
|
4296
4316
|
}));
|
|
4297
|
-
|
|
4298
|
-
var
|
|
4317
|
+
va.displayName = "SidebarSeparator";
|
|
4318
|
+
var ya = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", {
|
|
4299
4319
|
ref: n,
|
|
4300
4320
|
"data-sidebar": "content",
|
|
4301
4321
|
className: K("wu-flex wu-min-h-0 wu-flex-1 wu-flex-col wu-gap-2 wu-overflow-auto group-data-[collapsible=icon]:wu-overflow-hidden", e),
|
|
4302
4322
|
...t
|
|
4303
4323
|
}));
|
|
4304
|
-
|
|
4305
|
-
var
|
|
4324
|
+
ya.displayName = "SidebarContent";
|
|
4325
|
+
var ba = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", {
|
|
4306
4326
|
ref: n,
|
|
4307
4327
|
"data-sidebar": "group",
|
|
4308
4328
|
className: K("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2", e),
|
|
4309
4329
|
...t
|
|
4310
4330
|
}));
|
|
4311
|
-
|
|
4312
|
-
var
|
|
4331
|
+
ba.displayName = "SidebarGroup";
|
|
4332
|
+
var xa = t.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ y(t ? ce : "div", {
|
|
4313
4333
|
ref: r,
|
|
4314
4334
|
"data-sidebar": "group-label",
|
|
4315
4335
|
className: K("wu-flex wu-h-8 wu-shrink-0 wu-items-center wu-rounded-md wu-px-2 wu-text-xs wu-font-medium wu-outline-none wu-transition-[margin,opacity] wu-duration-150 wu-ease-linear focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", "group-data-[collapsible=icon]:wu-opacity-0", e),
|
|
4316
4336
|
...n
|
|
4317
4337
|
}));
|
|
4318
|
-
|
|
4319
|
-
var
|
|
4338
|
+
xa.displayName = "SidebarGroupLabel";
|
|
4339
|
+
var Sa = t.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ y(t ? ce : "button", {
|
|
4320
4340
|
ref: r,
|
|
4321
4341
|
"data-sidebar": "group-action",
|
|
4322
4342
|
className: K("wu-absolute wu-right-3 wu-top-3.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", "after:wu-absolute after:wu-inset-2 after:md:wu-hidden", "group-data-[collapsible=icon]:wu-hidden", e),
|
|
4323
4343
|
...n
|
|
4324
4344
|
}));
|
|
4325
|
-
|
|
4326
|
-
var
|
|
4345
|
+
Sa.displayName = "SidebarGroupAction";
|
|
4346
|
+
var Ca = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", {
|
|
4327
4347
|
ref: n,
|
|
4328
4348
|
"data-sidebar": "group-content",
|
|
4329
4349
|
className: K("wu-w-full wu-text-sm", e),
|
|
4330
4350
|
...t
|
|
4331
4351
|
}));
|
|
4332
|
-
|
|
4333
|
-
var
|
|
4352
|
+
Ca.displayName = "SidebarGroupContent";
|
|
4353
|
+
var wa = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("ul", {
|
|
4334
4354
|
ref: n,
|
|
4335
4355
|
"data-sidebar": "menu",
|
|
4336
4356
|
className: K("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1", e),
|
|
4337
4357
|
...t
|
|
4338
4358
|
}));
|
|
4339
|
-
|
|
4340
|
-
var
|
|
4359
|
+
wa.displayName = "SidebarMenu";
|
|
4360
|
+
var Ta = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("li", {
|
|
4341
4361
|
ref: n,
|
|
4342
4362
|
"data-sidebar": "menu-item",
|
|
4343
4363
|
className: K("wu-group/menu-item wu-relative", e),
|
|
4344
4364
|
...t
|
|
4345
4365
|
}));
|
|
4346
|
-
|
|
4347
|
-
var
|
|
4366
|
+
Ta.displayName = "SidebarMenuItem";
|
|
4367
|
+
var Ea = z("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", {
|
|
4348
4368
|
variants: {
|
|
4349
4369
|
variant: {
|
|
4350
4370
|
default: "",
|
|
@@ -4360,13 +4380,13 @@ var Sa = z("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-ov
|
|
|
4360
4380
|
variant: "default",
|
|
4361
4381
|
size: "default"
|
|
4362
4382
|
}
|
|
4363
|
-
}),
|
|
4364
|
-
let c = e ? ce : "button", { isMobile: l, state: u } =
|
|
4383
|
+
}), Da = t.forwardRef(({ asChild: e = !1, isActive: t = !1, variant: n = "default", size: r = "default", tooltip: i, className: a, ...o }, s) => {
|
|
4384
|
+
let c = e ? ce : "button", { isMobile: l, state: u } = la(), d = /* @__PURE__ */ y(c, {
|
|
4365
4385
|
ref: s,
|
|
4366
4386
|
"data-sidebar": "menu-button",
|
|
4367
4387
|
"data-size": r,
|
|
4368
4388
|
"data-active": t,
|
|
4369
|
-
className: K(
|
|
4389
|
+
className: K(Ea({
|
|
4370
4390
|
variant: n,
|
|
4371
4391
|
size: r
|
|
4372
4392
|
}), a),
|
|
@@ -4382,52 +4402,52 @@ var Sa = z("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-ov
|
|
|
4382
4402
|
...i
|
|
4383
4403
|
})] })) : d;
|
|
4384
4404
|
});
|
|
4385
|
-
|
|
4386
|
-
var
|
|
4405
|
+
Da.displayName = "SidebarMenuButton";
|
|
4406
|
+
var Oa = t.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }, i) => /* @__PURE__ */ y(t ? ce : "button", {
|
|
4387
4407
|
ref: i,
|
|
4388
4408
|
"data-sidebar": "menu-action",
|
|
4389
4409
|
className: K("wu-absolute wu-right-1 wu-top-1.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", "after:wu-absolute after:wu-inset-2 after:md:wu-hidden", "peer-data-[size=sm]/menu-button:wu-top-1", "peer-data-[size=default]/menu-button:wu-top-1.5", "peer-data-[size=lg]/menu-button:wu-top-2.5", "group-data-[collapsible=icon]:wu-hidden", n && "group-focus-within/menu-item:wu-opacity-100 group-hover/menu-item:wu-opacity-100 data-[state=open]:wu-opacity-100 md:wu-opacity-0", e),
|
|
4390
4410
|
...r
|
|
4391
4411
|
}));
|
|
4392
|
-
|
|
4393
|
-
var
|
|
4412
|
+
Oa.displayName = "SidebarMenuAction";
|
|
4413
|
+
var ka = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", {
|
|
4394
4414
|
ref: n,
|
|
4395
4415
|
"data-sidebar": "menu-badge",
|
|
4396
4416
|
className: K("wu-pointer-events-none wu-absolute wu-right-1 wu-flex wu-h-5 wu-min-w-5 wu-select-none wu-items-center wu-justify-center wu-rounded-md wu-px-1 wu-text-xs wu-font-medium wu-tabular-nums", "", "peer-data-[size=sm]/menu-button:wu-top-1", "peer-data-[size=default]/menu-button:wu-top-1.5", "peer-data-[size=lg]/menu-button:wu-top-2.5", "group-data-[collapsible=icon]:wu-hidden", e),
|
|
4397
4417
|
...t
|
|
4398
4418
|
}));
|
|
4399
|
-
|
|
4400
|
-
var
|
|
4419
|
+
ka.displayName = "SidebarMenuBadge";
|
|
4420
|
+
var Aa = t.forwardRef(({ className: e, showIcon: n = !1, ...r }, i) => {
|
|
4401
4421
|
let a = t.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
4402
4422
|
return /* @__PURE__ */ b("div", {
|
|
4403
4423
|
ref: i,
|
|
4404
4424
|
"data-sidebar": "menu-skeleton",
|
|
4405
4425
|
className: K("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2", e),
|
|
4406
4426
|
...r,
|
|
4407
|
-
children: [n && /* @__PURE__ */ y(
|
|
4427
|
+
children: [n && /* @__PURE__ */ y($i, {
|
|
4408
4428
|
className: "wu-rounded-md wu-size-4",
|
|
4409
4429
|
"data-sidebar": "menu-skeleton-icon"
|
|
4410
|
-
}), /* @__PURE__ */ y(
|
|
4430
|
+
}), /* @__PURE__ */ y($i, {
|
|
4411
4431
|
className: "wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1",
|
|
4412
4432
|
"data-sidebar": "menu-skeleton-text",
|
|
4413
4433
|
style: { "--skeleton-width": a }
|
|
4414
4434
|
})]
|
|
4415
4435
|
});
|
|
4416
4436
|
});
|
|
4417
|
-
|
|
4418
|
-
var
|
|
4437
|
+
Aa.displayName = "SidebarMenuSkeleton";
|
|
4438
|
+
var ja = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("ul", {
|
|
4419
4439
|
ref: n,
|
|
4420
4440
|
"data-sidebar": "menu-sub",
|
|
4421
4441
|
className: K("wu-mx-3.5 wu-flex wu-min-w-0 wu-translate-x-px wu-flex-col wu-gap-1 wu-border-l wu-px-2.5 wu-py-0.5", "group-data-[collapsible=icon]:wu-hidden", e),
|
|
4422
4442
|
...t
|
|
4423
4443
|
}));
|
|
4424
|
-
|
|
4425
|
-
var
|
|
4444
|
+
ja.displayName = "SidebarMenuSub";
|
|
4445
|
+
var Ma = t.forwardRef(({ ...e }, t) => /* @__PURE__ */ y("li", {
|
|
4426
4446
|
ref: t,
|
|
4427
4447
|
...e
|
|
4428
4448
|
}));
|
|
4429
|
-
|
|
4430
|
-
var
|
|
4449
|
+
Ma.displayName = "SidebarMenuSubItem";
|
|
4450
|
+
var Na = t.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...i }, a) => /* @__PURE__ */ y(e ? ce : "a", {
|
|
4431
4451
|
ref: a,
|
|
4432
4452
|
"data-sidebar": "menu-sub-button",
|
|
4433
4453
|
"data-size": t,
|
|
@@ -4435,39 +4455,39 @@ var ka = t.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className
|
|
|
4435
4455
|
className: K("wu-flex wu-h-7 wu-min-w-0 wu-translate-x-px wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-px-2 wu-outline-none focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", "data-[active=true]:wu-bg-sidebar-accent data-[active=true]:wu-text-sidebar-accent-foreground", t === "sm" && "wu-text-xs", t === "md" && "wu-text-sm", "group-data-[collapsible=icon]:wu-hidden", r),
|
|
4436
4456
|
...i
|
|
4437
4457
|
}));
|
|
4438
|
-
|
|
4458
|
+
Na.displayName = "SidebarMenuSubButton";
|
|
4439
4459
|
//#endregion
|
|
4440
4460
|
//#region src/components/sidebar/WuSidebar.tsx
|
|
4441
|
-
var
|
|
4461
|
+
var Pa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i, onOpenChange: a, style: o }) => /* @__PURE__ */ b(ua, {
|
|
4442
4462
|
defaultOpen: r,
|
|
4443
4463
|
open: i,
|
|
4444
4464
|
onOpenChange: a,
|
|
4445
|
-
children: [/* @__PURE__ */ b(
|
|
4465
|
+
children: [/* @__PURE__ */ b(da, {
|
|
4446
4466
|
variant: "sidebar",
|
|
4447
4467
|
collapsible: "icon",
|
|
4448
4468
|
className: K("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none", n),
|
|
4449
4469
|
style: o,
|
|
4450
4470
|
role: "complementary",
|
|
4451
|
-
children: [/* @__PURE__ */ y(
|
|
4471
|
+
children: [/* @__PURE__ */ y(ga, {
|
|
4452
4472
|
className: "wu-py-2",
|
|
4453
|
-
children: /* @__PURE__ */ y(
|
|
4473
|
+
children: /* @__PURE__ */ y(Fa, {})
|
|
4454
4474
|
}), t]
|
|
4455
|
-
}), /* @__PURE__ */ y(
|
|
4475
|
+
}), /* @__PURE__ */ y(ma, {
|
|
4456
4476
|
className: "wu-contain-inline-size",
|
|
4457
4477
|
children: e
|
|
4458
4478
|
})]
|
|
4459
|
-
}),
|
|
4460
|
-
let { state: t, isMobile: n, openMobile: r } =
|
|
4461
|
-
return /* @__PURE__ */ y(
|
|
4479
|
+
}), Fa = (e) => {
|
|
4480
|
+
let { state: t, isMobile: n, openMobile: r } = la();
|
|
4481
|
+
return /* @__PURE__ */ y(fa, {
|
|
4462
4482
|
...e,
|
|
4463
|
-
children: /* @__PURE__ */ y(
|
|
4483
|
+
children: /* @__PURE__ */ y(ci, { showMenu: n ? r : t === "expanded" })
|
|
4464
4484
|
});
|
|
4465
|
-
},
|
|
4485
|
+
}, Ia = ({ className: e, children: t, ...n }) => {
|
|
4466
4486
|
let r = p(null), i = p(null), a = ({ currentTarget: e }) => {
|
|
4467
4487
|
let { scrollTop: t, clientHeight: n, scrollHeight: a } = e;
|
|
4468
4488
|
r.current && r.current.classList.toggle("wu-border-[#1b338014]", t !== 0), i.current && i.current.classList.toggle("wu-border-[#1b338014]", t + n !== a);
|
|
4469
4489
|
}, o = "wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";
|
|
4470
|
-
return /* @__PURE__ */ b(
|
|
4490
|
+
return /* @__PURE__ */ b(ya, {
|
|
4471
4491
|
...n,
|
|
4472
4492
|
className: K("wu-overflow-hidden wu-gap-0", e),
|
|
4473
4493
|
children: [
|
|
@@ -4475,7 +4495,7 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4475
4495
|
className: o,
|
|
4476
4496
|
ref: r
|
|
4477
4497
|
}),
|
|
4478
|
-
/* @__PURE__ */ y(
|
|
4498
|
+
/* @__PURE__ */ y(Ir, {
|
|
4479
4499
|
onScroll: a,
|
|
4480
4500
|
className: "wu-gap-2",
|
|
4481
4501
|
thumbColor: "#b9c3dc",
|
|
@@ -4489,21 +4509,21 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4489
4509
|
})
|
|
4490
4510
|
]
|
|
4491
4511
|
});
|
|
4492
|
-
},
|
|
4512
|
+
}, La = (e) => /* @__PURE__ */ y(_a, {
|
|
4493
4513
|
...e,
|
|
4494
4514
|
children: e.children
|
|
4495
|
-
}),
|
|
4515
|
+
}), Ra = ({ label: e, children: t, ...n }) => /* @__PURE__ */ b(ba, {
|
|
4496
4516
|
...n,
|
|
4497
4517
|
className: "wu-p-0",
|
|
4498
4518
|
children: [/* @__PURE__ */ y("div", {
|
|
4499
4519
|
className: "wu-h-8",
|
|
4500
|
-
children: /* @__PURE__ */ y(
|
|
4520
|
+
children: /* @__PURE__ */ y(xa, {
|
|
4501
4521
|
className: "wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",
|
|
4502
4522
|
children: e
|
|
4503
4523
|
})
|
|
4504
|
-
}), /* @__PURE__ */ y(
|
|
4505
|
-
}),
|
|
4506
|
-
let { state: o } =
|
|
4524
|
+
}), /* @__PURE__ */ y(Ca, { children: /* @__PURE__ */ y(wa, { children: t }) })]
|
|
4525
|
+
}), za = (e) => /* @__PURE__ */ y(wa, { ...e }), Ba = ({ Icon: e, children: t, className: r, isActive: i, ...a }) => {
|
|
4526
|
+
let { state: o } = la(), [s, c] = n.useState(), l = ta(), u = n.isValidElement(t) ? n.cloneElement(t, { children: /* @__PURE__ */ b("div", {
|
|
4507
4527
|
className: "wu-flex wu-items-center wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",
|
|
4508
4528
|
children: [/* @__PURE__ */ y("div", {
|
|
4509
4529
|
className: "wu-relative wu-right-1",
|
|
@@ -4524,10 +4544,10 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4524
4544
|
}), d = p(null);
|
|
4525
4545
|
return n.useEffect(() => {
|
|
4526
4546
|
c(d.current?.textContent || "");
|
|
4527
|
-
}, []), /* @__PURE__ */ y(
|
|
4547
|
+
}, []), /* @__PURE__ */ y(Ta, {
|
|
4528
4548
|
...a,
|
|
4529
4549
|
className: "wu-flex wu-items-center wu-gap-2 wu-px-2",
|
|
4530
|
-
children: /* @__PURE__ */ y(
|
|
4550
|
+
children: /* @__PURE__ */ y(Da, {
|
|
4531
4551
|
className: K("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm", r, i && "wu-bg-white wu-shadow-[4px_4px_16px_0_#1B338014] wu-font-medium wu-text-blue-p hover:wu-bg-white wu-cursor-default"),
|
|
4532
4552
|
isActive: i,
|
|
4533
4553
|
tooltip: s,
|
|
@@ -4536,11 +4556,11 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4536
4556
|
children: u
|
|
4537
4557
|
})
|
|
4538
4558
|
});
|
|
4539
|
-
},
|
|
4540
|
-
let { state: a } =
|
|
4559
|
+
}, Va = ({ Title: e, Icon: t, children: n, className: r, ...i }) => {
|
|
4560
|
+
let { state: a } = la(), o = ta();
|
|
4541
4561
|
return /* @__PURE__ */ b(ve.Root, { children: [/* @__PURE__ */ y(ve.Trigger, { render: (n) => {
|
|
4542
4562
|
let r = "data-panel-open" in n;
|
|
4543
|
-
return /* @__PURE__ */ b(
|
|
4563
|
+
return /* @__PURE__ */ b(Ba, {
|
|
4544
4564
|
Icon: t,
|
|
4545
4565
|
...n,
|
|
4546
4566
|
children: [e, (a === "expanded" || o) && /* @__PURE__ */ y(J, {
|
|
@@ -4553,7 +4573,7 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4553
4573
|
...i,
|
|
4554
4574
|
children: n
|
|
4555
4575
|
})] });
|
|
4556
|
-
},
|
|
4576
|
+
}, Ha = new Map([
|
|
4557
4577
|
[-3, {
|
|
4558
4578
|
top: -20,
|
|
4559
4579
|
left: -4,
|
|
@@ -4607,14 +4627,14 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4607
4627
|
transition: "all 0.3s ease-in-out, z-index 0.3s 0.10s",
|
|
4608
4628
|
position: "absolute"
|
|
4609
4629
|
}]
|
|
4610
|
-
]),
|
|
4630
|
+
]), Ua = (e, t, n = 1) => {
|
|
4611
4631
|
let r = e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);
|
|
4612
4632
|
if (!r) throw Error("Invalid HSL color format");
|
|
4613
4633
|
return `hsl(${parseFloat(r[1])} ${parseFloat(r[2])}% ${Math.max(0, parseFloat(r[3]) + t)}% / ${n})`;
|
|
4614
|
-
},
|
|
4634
|
+
}, Wa = ({ index: e, viewIndex: t, length: n, itemHeight: r }) => {
|
|
4615
4635
|
let i = (e - t + n) % n, a;
|
|
4616
4636
|
a = i === 0 ? 0 : i === n - 1 && n >= 2 ? -1 : i === n - 2 && n >= 3 ? -2 : i === 1 ? 1 : i === 2 ? 2 : i === n - 3 && n >= 4 ? -3 : 3;
|
|
4617
|
-
let o =
|
|
4637
|
+
let o = Ha.get(a) || {}, s = a > 0 ? r + 28 + (a - 1) * 20 : o.top;
|
|
4618
4638
|
return {
|
|
4619
4639
|
position: a,
|
|
4620
4640
|
styles: {
|
|
@@ -4623,7 +4643,7 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4623
4643
|
height: a > 0 ? "32px" : r
|
|
4624
4644
|
}
|
|
4625
4645
|
};
|
|
4626
|
-
},
|
|
4646
|
+
}, Ga = {
|
|
4627
4647
|
LIGHTNESS_STEP: 8,
|
|
4628
4648
|
BORDER_LIGHTNESS: 10,
|
|
4629
4649
|
CONTENT_LIGHTNESS: 45,
|
|
@@ -4631,21 +4651,21 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4631
4651
|
FONT_SIZE_ACTIVE: "14px",
|
|
4632
4652
|
FONT_SIZE_INACTIVE: "12px",
|
|
4633
4653
|
HEADER_HEIGHT: "2rem"
|
|
4634
|
-
},
|
|
4654
|
+
}, Ka = ({ children: e, className: t, header: n, baseColor: r, position: i = 0, style: a, ...o }) => {
|
|
4635
4655
|
let s = i <= 0, c = i === 0, l = {
|
|
4636
|
-
border: c ? `4px solid ${
|
|
4656
|
+
border: c ? `4px solid ${Ua(r, Ga.BORDER_LIGHTNESS)}` : "",
|
|
4637
4657
|
...a
|
|
4638
4658
|
}, u = {
|
|
4639
|
-
backgroundColor:
|
|
4640
|
-
fontSize: c ?
|
|
4659
|
+
backgroundColor: Ua(r, i * Ga.LIGHTNESS_STEP),
|
|
4660
|
+
fontSize: c ? Ga.FONT_SIZE_ACTIVE : Ga.FONT_SIZE_INACTIVE,
|
|
4641
4661
|
transition: "all 0.3s ease",
|
|
4642
4662
|
position: "relative",
|
|
4643
4663
|
bottom: i < 0 ? "4px" : "0px",
|
|
4644
4664
|
height: "32px",
|
|
4645
4665
|
padding: "4px 8px"
|
|
4646
4666
|
}, d = {
|
|
4647
|
-
backgroundColor:
|
|
4648
|
-
height:
|
|
4667
|
+
backgroundColor: Ua(r, 45 + i * 6),
|
|
4668
|
+
height: Ga.CONTENT_HEIGHT,
|
|
4649
4669
|
position: "relative",
|
|
4650
4670
|
bottom: i < 0 ? "4px" : "0px"
|
|
4651
4671
|
};
|
|
@@ -4663,28 +4683,28 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4663
4683
|
children: e
|
|
4664
4684
|
})]
|
|
4665
4685
|
});
|
|
4666
|
-
},
|
|
4686
|
+
}, qa = ({ children: e, Trigger: t, Header: n, styles: r = {}, classNames: i = {}, open: a, onOpenChange: o, itemHeight: s }) => {
|
|
4667
4687
|
let c = {
|
|
4668
4688
|
height: s,
|
|
4669
4689
|
...r.Trigger
|
|
4670
4690
|
};
|
|
4671
|
-
return /* @__PURE__ */ b(
|
|
4691
|
+
return /* @__PURE__ */ b(pi, {
|
|
4672
4692
|
open: a,
|
|
4673
4693
|
onOpenChange: o,
|
|
4674
|
-
children: [/* @__PURE__ */ y(
|
|
4694
|
+
children: [/* @__PURE__ */ y(mi, {
|
|
4675
4695
|
className: K("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative", i.Trigger),
|
|
4676
4696
|
style: c,
|
|
4677
4697
|
children: /* @__PURE__ */ y("span", {
|
|
4678
4698
|
className: "wu-absolute wu-text-xs wu-font-medium wu-bg-gray-25 -wu-top-6 wu-left-0 wu-p-1 wu-rounded-t-lg",
|
|
4679
4699
|
children: t
|
|
4680
4700
|
})
|
|
4681
|
-
}), /* @__PURE__ */ b(
|
|
4701
|
+
}), /* @__PURE__ */ b(vi, {
|
|
4682
4702
|
className: K("wu-top-[50%] wu-left-[50%] wu-bg-black/75 wu-backdrop-blur-[4px] wu-min-h-full wu-overflow-auto wu-shadow-none wu-max-w-none wu-border-none wu-text-white", i.Content),
|
|
4683
4703
|
hideCloseButton: !0,
|
|
4684
4704
|
isStackedCard: !0,
|
|
4685
4705
|
style: r.Content,
|
|
4686
4706
|
children: [
|
|
4687
|
-
/* @__PURE__ */ y(
|
|
4707
|
+
/* @__PURE__ */ y(xi, {}),
|
|
4688
4708
|
/* @__PURE__ */ y(se, {
|
|
4689
4709
|
className: K("wu-absolute wu-right-2 wu-top-2 wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-z-10", i.CloseButton),
|
|
4690
4710
|
style: r.CloseButton,
|
|
@@ -4694,7 +4714,7 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4694
4714
|
className: "wu-text-lg wu-m-4 wu-cursor-pointer"
|
|
4695
4715
|
})
|
|
4696
4716
|
}),
|
|
4697
|
-
n && /* @__PURE__ */ y(
|
|
4717
|
+
n && /* @__PURE__ */ y(yi, {
|
|
4698
4718
|
className: K("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]", i.Header),
|
|
4699
4719
|
style: r.Header,
|
|
4700
4720
|
children: n
|
|
@@ -4703,7 +4723,7 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4703
4723
|
]
|
|
4704
4724
|
})]
|
|
4705
4725
|
});
|
|
4706
|
-
},
|
|
4726
|
+
}, Ja = { wuStepper: "_wuStepper_ejzqx_1" }, Ya = ({ onChange: e, Label: n, defaultValue: r = 0, readonly: i, dir: a, step: o = 1, min: s, max: c, value: l, className: u, labelPosition: d = "left", disabled: f, resetInvalidValueOnBlur: p = !0, ...m }) => {
|
|
4707
4727
|
let h = t.useId(), [g, _] = t.useState(l === void 0 ? r || 0 : Number(l));
|
|
4708
4728
|
t.useEffect(() => {
|
|
4709
4729
|
l !== void 0 && _(Number(l));
|
|
@@ -4732,7 +4752,7 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4732
4752
|
readOnly: i,
|
|
4733
4753
|
onValueChange: (e) => typeof e == "number" && v(e),
|
|
4734
4754
|
dir: a,
|
|
4735
|
-
className: K("wu-flex wu-stepper", a === "rtl" && d !== "top" && "wu-gap-2",
|
|
4755
|
+
className: K("wu-flex wu-stepper", a === "rtl" && d !== "top" && "wu-gap-2", Ja.wuStepper, Xa({ labelPosition: d }), u),
|
|
4736
4756
|
children: [n && /* @__PURE__ */ y(Z, {
|
|
4737
4757
|
htmlFor: h,
|
|
4738
4758
|
className: "wu-input-label",
|
|
@@ -4772,7 +4792,7 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4772
4792
|
]
|
|
4773
4793
|
})]
|
|
4774
4794
|
});
|
|
4775
|
-
},
|
|
4795
|
+
}, Xa = z("wu-flex wu-w-fit", { variants: { labelPosition: {
|
|
4776
4796
|
left: "wu-flex-row wu-text-right wu-gap-2 wu-items-center",
|
|
4777
4797
|
top: "wu-flex-col"
|
|
4778
4798
|
} } }), $ = {
|
|
@@ -4788,7 +4808,7 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4788
4808
|
icon: "_icon_1mgpg_50",
|
|
4789
4809
|
sharedWrapper: "_sharedWrapper_1mgpg_54",
|
|
4790
4810
|
emptyState: "_emptyState_1mgpg_63"
|
|
4791
|
-
},
|
|
4811
|
+
}, Za = n.memo(({ className: e, label: t = "Shared surveys", ...n }) => /* @__PURE__ */ b("button", {
|
|
4792
4812
|
className: K($.sharedWrapper, e),
|
|
4793
4813
|
"data-slot": "survey-select-shared",
|
|
4794
4814
|
"aria-label": t,
|
|
@@ -4798,10 +4818,10 @@ var Aa = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
|
|
|
4798
4818
|
"aria-hidden": "true"
|
|
4799
4819
|
}), /* @__PURE__ */ y("span", { children: t })]
|
|
4800
4820
|
}));
|
|
4801
|
-
|
|
4821
|
+
Za.displayName = "WuSharedSurvey";
|
|
4802
4822
|
//#endregion
|
|
4803
4823
|
//#region src/components/surveySelect/subComponents/WuSurveyItem.tsx
|
|
4804
|
-
var
|
|
4824
|
+
var Qa = (e, t = !1) => {
|
|
4805
4825
|
if (e) return /* @__PURE__ */ y("span", {
|
|
4806
4826
|
className: $.icon,
|
|
4807
4827
|
"aria-hidden": "true",
|
|
@@ -4812,34 +4832,34 @@ var Ja = (e, t = !1) => {
|
|
|
4812
4832
|
className: K($.icon, n),
|
|
4813
4833
|
"aria-hidden": "true"
|
|
4814
4834
|
});
|
|
4815
|
-
},
|
|
4835
|
+
}, $a = n.memo(({ children: e, icon: t, isActive: n, isShared: r, className: i, ...a }) => /* @__PURE__ */ b("button", {
|
|
4816
4836
|
className: K($.listItem, n && $.listItemActive, i),
|
|
4817
4837
|
"aria-selected": n,
|
|
4818
4838
|
"data-slot": "survey-select-item",
|
|
4819
4839
|
type: "button",
|
|
4820
4840
|
...a,
|
|
4821
|
-
children: [
|
|
4841
|
+
children: [Qa(t, r), /* @__PURE__ */ y("span", {
|
|
4822
4842
|
className: $.label,
|
|
4823
4843
|
children: e
|
|
4824
4844
|
})]
|
|
4825
4845
|
}));
|
|
4826
|
-
|
|
4846
|
+
$a.displayName = "WuSurveyItem";
|
|
4827
4847
|
//#endregion
|
|
4828
4848
|
//#region src/components/surveySelect/subComponents/WuSurveyList.tsx
|
|
4829
|
-
var
|
|
4849
|
+
var eo = n.memo(({ children: e, className: t, ...n }) => /* @__PURE__ */ y("div", {
|
|
4830
4850
|
className: K($.list, t),
|
|
4831
4851
|
...n,
|
|
4832
4852
|
children: e
|
|
4833
4853
|
}));
|
|
4834
|
-
|
|
4854
|
+
eo.displayName = "WuSurveyList";
|
|
4835
4855
|
//#endregion
|
|
4836
4856
|
//#region src/components/surveySelect/subComponents/WuSurveySource.tsx
|
|
4837
|
-
var
|
|
4857
|
+
var to = (e) => {
|
|
4838
4858
|
let { className: t, variant: n = "outlined", ...r } = e;
|
|
4839
4859
|
return /* @__PURE__ */ y("div", {
|
|
4840
4860
|
className: $.sourceWrapper,
|
|
4841
4861
|
"data-slot": "survey-select-source",
|
|
4842
|
-
children: /* @__PURE__ */ y(
|
|
4862
|
+
children: /* @__PURE__ */ y(si, {
|
|
4843
4863
|
variant: n,
|
|
4844
4864
|
showGroupSeparator: !0,
|
|
4845
4865
|
className: K($.source, t),
|
|
@@ -4847,8 +4867,8 @@ var Za = (e) => {
|
|
|
4847
4867
|
})
|
|
4848
4868
|
});
|
|
4849
4869
|
};
|
|
4850
|
-
|
|
4851
|
-
var
|
|
4870
|
+
to.displayName = "WuSurveySource";
|
|
4871
|
+
var no = n.memo(to), ro = n.memo(({ Sidebar: e, children: t, className: n, ...r }) => /* @__PURE__ */ b("div", {
|
|
4852
4872
|
className: K($.container, n),
|
|
4853
4873
|
role: "region",
|
|
4854
4874
|
"aria-label": "Survey selection interface",
|
|
@@ -4867,10 +4887,10 @@ var Qa = n.memo(Za), $a = n.memo(({ Sidebar: e, children: t, className: n, ...r
|
|
|
4867
4887
|
children: t
|
|
4868
4888
|
})]
|
|
4869
4889
|
}));
|
|
4870
|
-
|
|
4890
|
+
ro.displayName = "WuSurveySelect";
|
|
4871
4891
|
//#endregion
|
|
4872
4892
|
//#region src/base/ui/toggle.tsx
|
|
4873
|
-
var
|
|
4893
|
+
var io = z("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80", {
|
|
4874
4894
|
variants: {
|
|
4875
4895
|
variant: {
|
|
4876
4896
|
default: "wu-bg-transparent",
|
|
@@ -4886,26 +4906,26 @@ var eo = z("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-
|
|
|
4886
4906
|
variant: "default",
|
|
4887
4907
|
size: "default"
|
|
4888
4908
|
}
|
|
4889
|
-
}),
|
|
4909
|
+
}), ao = t.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */ y(xe.Root, {
|
|
4890
4910
|
ref: i,
|
|
4891
|
-
className: K(
|
|
4911
|
+
className: K(io({
|
|
4892
4912
|
variant: t,
|
|
4893
4913
|
size: n,
|
|
4894
4914
|
className: e
|
|
4895
4915
|
})),
|
|
4896
4916
|
...r
|
|
4897
4917
|
}));
|
|
4898
|
-
|
|
4918
|
+
ao.displayName = xe.Root.displayName;
|
|
4899
4919
|
//#endregion
|
|
4900
4920
|
//#region src/base/ui/toggleGroup.tsx
|
|
4901
|
-
var
|
|
4921
|
+
var oo = t.createContext({
|
|
4902
4922
|
size: "default",
|
|
4903
4923
|
variant: "default"
|
|
4904
|
-
}),
|
|
4924
|
+
}), so = t.forwardRef(({ className: e, variant: t, size: n, children: r, ...i }, a) => /* @__PURE__ */ y(be.Root, {
|
|
4905
4925
|
ref: a,
|
|
4906
4926
|
className: K("wu-flex wu-items-center wu-justify-center wu-gap-1", e),
|
|
4907
4927
|
...i,
|
|
4908
|
-
children: /* @__PURE__ */ y(
|
|
4928
|
+
children: /* @__PURE__ */ y(oo.Provider, {
|
|
4909
4929
|
value: {
|
|
4910
4930
|
variant: t,
|
|
4911
4931
|
size: n
|
|
@@ -4913,12 +4933,12 @@ var no = t.createContext({
|
|
|
4913
4933
|
children: r
|
|
4914
4934
|
})
|
|
4915
4935
|
}));
|
|
4916
|
-
|
|
4917
|
-
var
|
|
4918
|
-
let s = t.useContext(
|
|
4936
|
+
so.displayName = be.Root.displayName;
|
|
4937
|
+
var co = t.forwardRef(({ className: e, children: n, variant: r, size: i, ...a }, o) => {
|
|
4938
|
+
let s = t.useContext(oo);
|
|
4919
4939
|
return /* @__PURE__ */ y(be.Item, {
|
|
4920
4940
|
ref: o,
|
|
4921
|
-
className: K(
|
|
4941
|
+
className: K(io({
|
|
4922
4942
|
variant: s.variant || r,
|
|
4923
4943
|
size: s.size || i
|
|
4924
4944
|
}), e),
|
|
@@ -4926,12 +4946,12 @@ var io = t.forwardRef(({ className: e, children: n, variant: r, size: i, ...a },
|
|
|
4926
4946
|
children: n
|
|
4927
4947
|
});
|
|
4928
4948
|
});
|
|
4929
|
-
|
|
4949
|
+
co.displayName = be.Item.displayName;
|
|
4930
4950
|
//#endregion
|
|
4931
4951
|
//#region src/components/switcher/ui/_iconTab.tsx
|
|
4932
|
-
var
|
|
4952
|
+
var lo = n.forwardRef((e, t) => {
|
|
4933
4953
|
let { options: n, value: r, disabled: i, dir: a, onChange: o } = e, s = (e) => K("wu-w-8 wu-h-8 wu-text-xl wu-leading-5 wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-p-0 wu-flex wu-items-center wu-justify-center", i && "wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead", e === r && "wu-text-white", i && r === e && "wu-text-gray-lead", "wu-switcher-icon-tab-item");
|
|
4934
|
-
return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ b(
|
|
4954
|
+
return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ b(so, {
|
|
4935
4955
|
ref: t,
|
|
4936
4956
|
type: "single",
|
|
4937
4957
|
value: r,
|
|
@@ -4944,12 +4964,12 @@ var ao = n.forwardRef((e, t) => {
|
|
|
4944
4964
|
role: "slider",
|
|
4945
4965
|
className: K("wu-absolute wu-z-0 wu-w-8 wu-h-8 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out", r === "opt1" && "", r === "opt2" && a !== "rtl" && "wu-translate-x-full", r === "opt2" && a === "rtl" && "-wu-translate-x-full", i && "wu-bg-gray-40", "wu-switcher-icon-tab-slider")
|
|
4946
4966
|
}),
|
|
4947
|
-
/* @__PURE__ */ y(
|
|
4967
|
+
/* @__PURE__ */ y(co, {
|
|
4948
4968
|
value: "opt1",
|
|
4949
4969
|
className: s("opt1"),
|
|
4950
4970
|
children: n[0].label
|
|
4951
4971
|
}),
|
|
4952
|
-
/* @__PURE__ */ y(
|
|
4972
|
+
/* @__PURE__ */ y(co, {
|
|
4953
4973
|
value: "opt2",
|
|
4954
4974
|
className: s("opt2"),
|
|
4955
4975
|
children: n[1].label
|
|
@@ -4957,12 +4977,12 @@ var ao = n.forwardRef((e, t) => {
|
|
|
4957
4977
|
]
|
|
4958
4978
|
}) });
|
|
4959
4979
|
});
|
|
4960
|
-
|
|
4980
|
+
lo.displayName = "_IconTab";
|
|
4961
4981
|
//#endregion
|
|
4962
4982
|
//#region src/components/switcher/ui/_tab.tsx
|
|
4963
|
-
var
|
|
4983
|
+
var uo = n.forwardRef((e, t) => {
|
|
4964
4984
|
let { options: n, value: r, disabled: i, dir: a, size: o = "md", onChange: s } = e, c = (e) => K("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal", i && "wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead", o === "sm" && "wu-h-6 wu-min-w-20", o === "md" && "wu-h-8 wu-min-w-28", o === "lg" && "wu-h-10 wu-min-w-36", e === r && "wu-text-white wu-font-medium", i && r === e && "wu-text-gray-lead", "wu-switcher-tab-item");
|
|
4965
|
-
return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ b(
|
|
4985
|
+
return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ b(so, {
|
|
4966
4986
|
ref: t,
|
|
4967
4987
|
type: "single",
|
|
4968
4988
|
value: r,
|
|
@@ -4975,7 +4995,7 @@ var oo = n.forwardRef((e, t) => {
|
|
|
4975
4995
|
role: "slider",
|
|
4976
4996
|
className: K("wu-absolute wu-z-0 wu-w-1/2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out ", o === "sm" && "wu-h-6 wu-min-w-20", o === "md" && "wu-h-8 wu-min-w-28", o === "lg" && "wu-h-10 wu-min-w-36", r === "opt1" && "", r === "opt2" && a !== "rtl" && "wu-translate-x-full", r === "opt2" && a === "rtl" && "-wu-translate-x-full", i && "wu-bg-gray-40", "wu-switcher-tab-slider")
|
|
4977
4997
|
}),
|
|
4978
|
-
/* @__PURE__ */ y(
|
|
4998
|
+
/* @__PURE__ */ y(co, {
|
|
4979
4999
|
value: "opt1",
|
|
4980
5000
|
className: c("opt1"),
|
|
4981
5001
|
children: /* @__PURE__ */ y("div", {
|
|
@@ -4983,7 +5003,7 @@ var oo = n.forwardRef((e, t) => {
|
|
|
4983
5003
|
children: n[0].label
|
|
4984
5004
|
})
|
|
4985
5005
|
}),
|
|
4986
|
-
/* @__PURE__ */ y(
|
|
5006
|
+
/* @__PURE__ */ y(co, {
|
|
4987
5007
|
value: "opt2",
|
|
4988
5008
|
className: c("opt2"),
|
|
4989
5009
|
children: /* @__PURE__ */ y("div", {
|
|
@@ -4994,12 +5014,12 @@ var oo = n.forwardRef((e, t) => {
|
|
|
4994
5014
|
]
|
|
4995
5015
|
}) });
|
|
4996
5016
|
});
|
|
4997
|
-
|
|
5017
|
+
uo.displayName = "_Tab";
|
|
4998
5018
|
//#endregion
|
|
4999
5019
|
//#region src/components/switcher/ui/_toggle.tsx
|
|
5000
|
-
var
|
|
5020
|
+
var fo = n.forwardRef((e, t) => {
|
|
5001
5021
|
let { options: n, value: r, disabled: i, dir: a, onChange: o } = e, s = (e) => K("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal", i && "wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle", e === r && "wu-text-primary wu-font-medium", i && r === e && "wu-text-gray-lead", "wu-switcher-toggle-item"), c = K("wu-w-fit wu-gap-2", i && "wu-cursor-not-allowed", "wu-switcher-toggle-group"), l = K("wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-3 wu-p-0 wu-border wu-rounded-full wu-cursor-pointer wu-border-blue-p focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2", i && "wu-border-gray-subtle wu-cursor-not-allowed", "wu-switcher-toggle-button"), u = K("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out", r === "opt1" && a !== "rtl" && "-wu-translate-x-[10px]", r === "opt1" && a === "rtl" && "wu-translate-x-[10px]", r === "opt2" && a !== "rtl" && "wu-translate-x-[10px]", r === "opt2" && a === "rtl" && "-wu-translate-x-[10px]", i && "wu-hidden", "wu-switcher-toggle-knob");
|
|
5002
|
-
return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ b(
|
|
5022
|
+
return /* @__PURE__ */ y(v, { children: /* @__PURE__ */ b(so, {
|
|
5003
5023
|
ref: t,
|
|
5004
5024
|
type: "single",
|
|
5005
5025
|
value: r,
|
|
@@ -5008,7 +5028,7 @@ var so = n.forwardRef((e, t) => {
|
|
|
5008
5028
|
className: c,
|
|
5009
5029
|
onValueChange: o,
|
|
5010
5030
|
children: [
|
|
5011
|
-
/* @__PURE__ */ y(
|
|
5031
|
+
/* @__PURE__ */ y(co, {
|
|
5012
5032
|
value: "opt1",
|
|
5013
5033
|
className: s("opt1"),
|
|
5014
5034
|
children: /* @__PURE__ */ y("div", {
|
|
@@ -5028,7 +5048,7 @@ var so = n.forwardRef((e, t) => {
|
|
|
5028
5048
|
dir: a
|
|
5029
5049
|
})
|
|
5030
5050
|
}),
|
|
5031
|
-
/* @__PURE__ */ y(
|
|
5051
|
+
/* @__PURE__ */ y(co, {
|
|
5032
5052
|
value: "opt2",
|
|
5033
5053
|
className: s("opt2"),
|
|
5034
5054
|
children: /* @__PURE__ */ y("div", {
|
|
@@ -5039,10 +5059,10 @@ var so = n.forwardRef((e, t) => {
|
|
|
5039
5059
|
]
|
|
5040
5060
|
}) });
|
|
5041
5061
|
});
|
|
5042
|
-
|
|
5062
|
+
fo.displayName = "_Toggle";
|
|
5043
5063
|
//#endregion
|
|
5044
5064
|
//#region src/components/switcher/WuSwitcher.tsx
|
|
5045
|
-
var
|
|
5065
|
+
var po = n.forwardRef((e, t) => {
|
|
5046
5066
|
let { type: r, options: i, value: a, disabled: o, dir: s, size: c, onChange: l, toggle: u = !0, ...d } = e, [f, p] = n.useState(), m = (e) => {
|
|
5047
5067
|
let t = f;
|
|
5048
5068
|
e === "" ? u && (t = f === "opt1" ? "opt2" : "opt1") : t = e;
|
|
@@ -5054,7 +5074,7 @@ var co = n.forwardRef((e, t) => {
|
|
|
5054
5074
|
p(a === i[0].value ? "opt1" : "opt2");
|
|
5055
5075
|
}, [i, a]), !Array.isArray(i) || i.length < 2) return /* @__PURE__ */ y(v, {});
|
|
5056
5076
|
switch (r) {
|
|
5057
|
-
case "toggle": return /* @__PURE__ */ y(
|
|
5077
|
+
case "toggle": return /* @__PURE__ */ y(fo, {
|
|
5058
5078
|
...d,
|
|
5059
5079
|
ref: t,
|
|
5060
5080
|
options: i,
|
|
@@ -5063,7 +5083,7 @@ var co = n.forwardRef((e, t) => {
|
|
|
5063
5083
|
disabled: o,
|
|
5064
5084
|
dir: s
|
|
5065
5085
|
});
|
|
5066
|
-
case "iconTab": return /* @__PURE__ */ y(
|
|
5086
|
+
case "iconTab": return /* @__PURE__ */ y(lo, {
|
|
5067
5087
|
ref: t,
|
|
5068
5088
|
options: i,
|
|
5069
5089
|
value: f || "opt1",
|
|
@@ -5071,7 +5091,7 @@ var co = n.forwardRef((e, t) => {
|
|
|
5071
5091
|
disabled: o,
|
|
5072
5092
|
dir: s
|
|
5073
5093
|
});
|
|
5074
|
-
default: return /* @__PURE__ */ y(
|
|
5094
|
+
default: return /* @__PURE__ */ y(uo, {
|
|
5075
5095
|
ref: t,
|
|
5076
5096
|
options: i,
|
|
5077
5097
|
value: f || "opt1",
|
|
@@ -5082,39 +5102,39 @@ var co = n.forwardRef((e, t) => {
|
|
|
5082
5102
|
});
|
|
5083
5103
|
}
|
|
5084
5104
|
});
|
|
5085
|
-
|
|
5105
|
+
po.displayName = "WuSwitcher";
|
|
5086
5106
|
//#endregion
|
|
5087
5107
|
//#region src/components/tab/shadcn/tabs.tsx
|
|
5088
|
-
var
|
|
5108
|
+
var mo = Se.Root, ho = t.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ y(Se.List, {
|
|
5089
5109
|
className: K("wu-relative wu-flex", e),
|
|
5090
5110
|
...n,
|
|
5091
5111
|
ref: r,
|
|
5092
5112
|
children: t
|
|
5093
5113
|
}));
|
|
5094
|
-
|
|
5095
|
-
var
|
|
5114
|
+
ho.displayName = Se.List.displayName;
|
|
5115
|
+
var go = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(Se.Trigger, {
|
|
5096
5116
|
ref: n,
|
|
5097
5117
|
className: K("wu-relative wu-inline-flex wu-items-center wu-whitespace-nowrap wu-text-xs wu-px-4 wu-py-2 wu-text-gray-600 wu-transition-colors wu-duration-200 data-[state=active]:wu-text-blue-p", "data-[orientation=horizontal]:wu-justify-center", e),
|
|
5098
5118
|
...t
|
|
5099
5119
|
}));
|
|
5100
|
-
|
|
5101
|
-
var
|
|
5120
|
+
go.displayName = Se.Trigger.displayName;
|
|
5121
|
+
var _o = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(Se.Content, {
|
|
5102
5122
|
ref: n,
|
|
5103
5123
|
className: e,
|
|
5104
5124
|
...t
|
|
5105
5125
|
}));
|
|
5106
|
-
|
|
5126
|
+
_o.displayName = Se.Content.displayName;
|
|
5107
5127
|
//#endregion
|
|
5108
5128
|
//#region src/components/tab/components/BaseTabContent.tsx
|
|
5109
|
-
var
|
|
5129
|
+
var vo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
5110
5130
|
className: K("wu-w-full wu-h-full wu-flex-1 wu-overflow-auto", t && "wu-relative wu-overflow-hidden", "wu-tab-content-container"),
|
|
5111
|
-
children: e.map((e) => /* @__PURE__ */ y(
|
|
5131
|
+
children: e.map((e) => /* @__PURE__ */ y(_o, {
|
|
5112
5132
|
value: e.value,
|
|
5113
5133
|
forceMount: t || void 0,
|
|
5114
5134
|
className: K("wu-w-full wu-h-full wu-overflow-y-auto", t && "wu-duration-700 wu-ease-in-out wu-transition-all data-[state=inactive]:wu-absolute data-[state=inactive]:wu-inset-0 data-[state=inactive]:wu-opacity-0 data-[state=inactive]:wu-z-0 data-[state=active]:wu-relative data-[state=active]:wu-opacity-100 data-[state=active]:wu-z-10", "wu-tab-content"),
|
|
5115
5135
|
children: e.Content
|
|
5116
5136
|
}, e.value))
|
|
5117
|
-
}),
|
|
5137
|
+
}), yo = (e) => {
|
|
5118
5138
|
let [t, n] = m(!1), [r, i] = m(!1), a = () => {
|
|
5119
5139
|
let t = e.current;
|
|
5120
5140
|
t && (n(t.scrollLeft > 0), i(t.scrollLeft + t.clientWidth < t.scrollWidth));
|
|
@@ -5138,7 +5158,7 @@ var mo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
|
5138
5158
|
}
|
|
5139
5159
|
}
|
|
5140
5160
|
};
|
|
5141
|
-
},
|
|
5161
|
+
}, bo = (e, t) => {
|
|
5142
5162
|
let [n, r] = m({
|
|
5143
5163
|
width: 0,
|
|
5144
5164
|
left: 0,
|
|
@@ -5165,8 +5185,8 @@ var mo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
|
5165
5185
|
};
|
|
5166
5186
|
}
|
|
5167
5187
|
}, [e, i]), n;
|
|
5168
|
-
},
|
|
5169
|
-
let l = n.useRef(null), u =
|
|
5188
|
+
}, xo = ({ items: e, value: t, defaultValue: r, onValueChange: i, enableAnimation: a = !1, className: o, dir: s = "ltr", position: c = "top" }) => {
|
|
5189
|
+
let l = n.useRef(null), u = bo(l, "horizontal"), { showLeftArrow: d, showRightArrow: f, scrollByTab: p } = yo(l), [m, h] = n.useState(!1), g = () => p("left"), _ = () => p("right"), v = (e) => /* @__PURE__ */ y("div", {
|
|
5170
5190
|
"data-testid": `gradient-overlay-${e}`,
|
|
5171
5191
|
className: K("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none", e === "left" ? "wu-left-0 wu-bg-gradient-to-r wu-from-white wu-to-transparent" : "wu-right-0 wu-bg-gradient-to-l wu-from-white wu-to-transparent")
|
|
5172
5192
|
}), x = (e, t, n) => {
|
|
@@ -5178,7 +5198,7 @@ var mo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
|
5178
5198
|
children: /* @__PURE__ */ y("span", { className: K("wu-text-blue-p wu-text-lg", r ? "wm-keyboard-arrow-left" : "wm-keyboard-arrow-right") })
|
|
5179
5199
|
});
|
|
5180
5200
|
};
|
|
5181
|
-
return /* @__PURE__ */ b(
|
|
5201
|
+
return /* @__PURE__ */ b(mo, {
|
|
5182
5202
|
defaultValue: r || e[0]?.value,
|
|
5183
5203
|
value: t,
|
|
5184
5204
|
onValueChange: i,
|
|
@@ -5194,10 +5214,10 @@ var mo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
|
5194
5214
|
children: [
|
|
5195
5215
|
d && m && v("left"),
|
|
5196
5216
|
x(g, "left", d && m),
|
|
5197
|
-
/* @__PURE__ */ b(
|
|
5217
|
+
/* @__PURE__ */ b(ho, {
|
|
5198
5218
|
ref: l,
|
|
5199
5219
|
className: K("wu-relative wu-flex wu-w-full wu-overflow-x-auto wu-flex-row", "[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]", "wu-tablist"),
|
|
5200
|
-
children: [e.map((e) => /* @__PURE__ */ y(
|
|
5220
|
+
children: [e.map((e) => /* @__PURE__ */ y(go, {
|
|
5201
5221
|
value: e.value,
|
|
5202
5222
|
children: e.Trigger
|
|
5203
5223
|
}, e.value)), /* @__PURE__ */ y("span", {
|
|
@@ -5214,12 +5234,12 @@ var mo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
|
5214
5234
|
f && m && v("right"),
|
|
5215
5235
|
x(_, "right", f && m)
|
|
5216
5236
|
]
|
|
5217
|
-
}), /* @__PURE__ */ y(
|
|
5237
|
+
}), /* @__PURE__ */ y(vo, {
|
|
5218
5238
|
items: e,
|
|
5219
5239
|
enableAnimation: a
|
|
5220
5240
|
})]
|
|
5221
5241
|
});
|
|
5222
|
-
},
|
|
5242
|
+
}, So = (e) => {
|
|
5223
5243
|
let [t, n] = m(!1), [r, i] = m(!1), a = () => {
|
|
5224
5244
|
let t = e.current;
|
|
5225
5245
|
t && (n(t.scrollTop > 0), i(t.scrollTop + t.clientHeight < t.scrollHeight));
|
|
@@ -5243,8 +5263,8 @@ var mo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
|
5243
5263
|
}
|
|
5244
5264
|
}
|
|
5245
5265
|
};
|
|
5246
|
-
},
|
|
5247
|
-
let l = n.useRef(null), u =
|
|
5266
|
+
}, Co = ({ items: e, value: t, defaultValue: r, onValueChange: i, enableAnimation: a = !1, className: o, dir: s = "ltr", position: c = "left" }) => {
|
|
5267
|
+
let l = n.useRef(null), u = bo(l, "vertical"), { showTopArrow: d, showBottomArrow: f, scrollByTab: p } = So(l), [m, h] = n.useState(!1), g = () => p("up"), _ = () => p("down"), v = (e) => /* @__PURE__ */ y("div", { className: K("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none", e === "top" ? "wu-top-0 wu-bg-gradient-to-b wu-from-white wu-to-transparent" : "wu-bottom-0 wu-bg-gradient-to-t wu-from-white wu-to-transparent") }), x = (e, t, n) => {
|
|
5248
5268
|
let r = t === "up";
|
|
5249
5269
|
return /* @__PURE__ */ y("button", {
|
|
5250
5270
|
onClick: e,
|
|
@@ -5253,7 +5273,7 @@ var mo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
|
5253
5273
|
children: /* @__PURE__ */ y("span", { className: K("wu-text-blue-p wu-text-lg", r ? "wm-keyboard-arrow-up" : "wm-keyboard-arrow-down") })
|
|
5254
5274
|
});
|
|
5255
5275
|
};
|
|
5256
|
-
return /* @__PURE__ */ b(
|
|
5276
|
+
return /* @__PURE__ */ b(mo, {
|
|
5257
5277
|
defaultValue: r || e[0]?.value,
|
|
5258
5278
|
value: t,
|
|
5259
5279
|
onValueChange: i,
|
|
@@ -5269,10 +5289,10 @@ var mo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
|
5269
5289
|
children: [
|
|
5270
5290
|
d && m && v("top"),
|
|
5271
5291
|
x(g, "up", d && m),
|
|
5272
|
-
/* @__PURE__ */ b(
|
|
5292
|
+
/* @__PURE__ */ b(ho, {
|
|
5273
5293
|
ref: l,
|
|
5274
5294
|
className: K("wu-relative wu-flex wu-h-full wu-overflow-y-auto wu-flex-col", "[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]", "wu-tablist"),
|
|
5275
|
-
children: [e.map((e) => /* @__PURE__ */ y(
|
|
5295
|
+
children: [e.map((e) => /* @__PURE__ */ y(go, {
|
|
5276
5296
|
value: e.value,
|
|
5277
5297
|
children: e.Trigger
|
|
5278
5298
|
}, e.value)), /* @__PURE__ */ y("span", {
|
|
@@ -5289,16 +5309,16 @@ var mo = ({ items: e, enableAnimation: t }) => /* @__PURE__ */ y("div", {
|
|
|
5289
5309
|
f && m && v("bottom"),
|
|
5290
5310
|
x(_, "down", f && m)
|
|
5291
5311
|
]
|
|
5292
|
-
}), /* @__PURE__ */ y(
|
|
5312
|
+
}), /* @__PURE__ */ y(vo, {
|
|
5293
5313
|
items: e,
|
|
5294
5314
|
enableAnimation: a
|
|
5295
5315
|
})]
|
|
5296
5316
|
});
|
|
5297
|
-
},
|
|
5298
|
-
function
|
|
5317
|
+
}, wo = ({ ...e }) => e.orientation === "vertical" ? /* @__PURE__ */ y(Co, { ...e }) : /* @__PURE__ */ y(xo, { ...e }), To = "expander";
|
|
5318
|
+
function Eo(e, t) {
|
|
5299
5319
|
return e ? [{
|
|
5300
|
-
id:
|
|
5301
|
-
accessorKey:
|
|
5320
|
+
id: To,
|
|
5321
|
+
accessorKey: To,
|
|
5302
5322
|
header: "",
|
|
5303
5323
|
cell: ({ row: e }) => {
|
|
5304
5324
|
let t = e.getIsExpanded();
|
|
@@ -5317,10 +5337,10 @@ function So(e, t) {
|
|
|
5317
5337
|
size: 48
|
|
5318
5338
|
}, ...t] : t;
|
|
5319
5339
|
}
|
|
5320
|
-
function
|
|
5340
|
+
function Do(e, t) {
|
|
5321
5341
|
return t.map((e) => e.columnDef?.expandableRowContent).find((e) => e)?.call(null, e);
|
|
5322
5342
|
}
|
|
5323
|
-
function
|
|
5343
|
+
function Oo(e) {
|
|
5324
5344
|
let t = /* @__PURE__ */ new Map(), n = 0;
|
|
5325
5345
|
for (let r = 0; r < e.length; r++) {
|
|
5326
5346
|
let i = e[r];
|
|
@@ -5345,7 +5365,7 @@ function wo(e) {
|
|
|
5345
5365
|
}
|
|
5346
5366
|
return t;
|
|
5347
5367
|
}
|
|
5348
|
-
function
|
|
5368
|
+
function ko(e, t, n, r) {
|
|
5349
5369
|
return t ? e === "left" && n ? /* @__PURE__ */ y("div", { style: {
|
|
5350
5370
|
position: "absolute",
|
|
5351
5371
|
top: 0,
|
|
@@ -5364,10 +5384,10 @@ function To(e, t, n, r) {
|
|
|
5364
5384
|
pointerEvents: "none"
|
|
5365
5385
|
} }) : null : null;
|
|
5366
5386
|
}
|
|
5367
|
-
function
|
|
5387
|
+
function Ao(e, t, n) {
|
|
5368
5388
|
return e === !0 && (!t || n > t);
|
|
5369
5389
|
}
|
|
5370
|
-
function
|
|
5390
|
+
function jo(e, t) {
|
|
5371
5391
|
let n = Ce(t.cell, e.getContext());
|
|
5372
5392
|
return e.column.id === "actions" ? /* @__PURE__ */ y("div", {
|
|
5373
5393
|
className: "wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100",
|
|
@@ -5376,7 +5396,7 @@ function Do(e, t) {
|
|
|
5376
5396
|
}
|
|
5377
5397
|
//#endregion
|
|
5378
5398
|
//#region src/components/table/hooks/useRowSelection.tsx
|
|
5379
|
-
var
|
|
5399
|
+
var Mo = ({ columns: e, rowSelection: t }) => {
|
|
5380
5400
|
let n = t?.isEnabled ?? !1, r = t?.size ?? 48, { onRowSelect: i, rowUniqueKey: a, isRowDisabled: o, hideSelectAll: c } = t || {}, l = s((e) => (t) => {
|
|
5381
5401
|
i?.(t ? e : []);
|
|
5382
5402
|
}, [i]);
|
|
@@ -5418,8 +5438,8 @@ var Oo = ({ columns: e, rowSelection: t }) => {
|
|
|
5418
5438
|
};
|
|
5419
5439
|
//#endregion
|
|
5420
5440
|
//#region src/components/table/hooks/useTableCore.ts
|
|
5421
|
-
function
|
|
5422
|
-
let [i, a] = m({}), { finalColumns: o } =
|
|
5441
|
+
function No({ data: e, columns: t, rowSelection: n, isRowExpandable: r }) {
|
|
5442
|
+
let [i, a] = m({}), { finalColumns: o } = Mo({
|
|
5423
5443
|
columns: t,
|
|
5424
5444
|
rowSelection: n
|
|
5425
5445
|
}), s = f(() => {
|
|
@@ -5436,7 +5456,7 @@ function ko({ data: e, columns: t, rowSelection: n, isRowExpandable: r }) {
|
|
|
5436
5456
|
rowSelectionState: s,
|
|
5437
5457
|
sortableColumns: f(() => o.filter((e) => e.enableSorting).map((e) => e.accessorKey), [o]),
|
|
5438
5458
|
selectedRowCount: n?.selectedRows?.length ?? 0,
|
|
5439
|
-
columnsWithExpand: f(() =>
|
|
5459
|
+
columnsWithExpand: f(() => Eo(r, o), [o, r]),
|
|
5440
5460
|
expanded: i,
|
|
5441
5461
|
setExpanded: a,
|
|
5442
5462
|
handleRowSelectionChange: (t) => {
|
|
@@ -5452,7 +5472,7 @@ function ko({ data: e, columns: t, rowSelection: n, isRowExpandable: r }) {
|
|
|
5452
5472
|
}
|
|
5453
5473
|
//#endregion
|
|
5454
5474
|
//#region src/components/table/hooks/useTableScroll.ts
|
|
5455
|
-
function
|
|
5475
|
+
function Po() {
|
|
5456
5476
|
let e = p(null), [t, n] = m(!1), [r, i] = m(!1), a = s(() => {
|
|
5457
5477
|
let t = e.current;
|
|
5458
5478
|
t && (n(t.scrollLeft > 12), i(t.scrollLeft < t.scrollWidth - t.clientWidth - 1));
|
|
@@ -5468,101 +5488,101 @@ function Ao() {
|
|
|
5468
5488
|
}
|
|
5469
5489
|
//#endregion
|
|
5470
5490
|
//#region src/components/table/utils/tableStyles.ts
|
|
5471
|
-
var
|
|
5491
|
+
var Fo = (e) => K("wu-group wu-border-b wu-border-black/[12%] [--wu-row-overlay:transparent]", "data-[state=selected]:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.08)]", !e && ["hover:[--wu-row-overlay:rgba(0,0,0,0.02)]", "data-[state=selected]:hover:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.16)]"]), Io = (e = "default", t) => K("wu-py-0 wu-font-light wu-text-xs wu-bg-white", "[background-image:linear-gradient(var(--wu-row-overlay),var(--wu-row-overlay))]", e === "compact" ? "wu-h-8" : "wu-h-10", t === "right" && "wu-text-right", t === "center" && "wu-text-center", t === "left" && "wu-text-left"), Lo = (e = "default") => e === "compact" ? "wu-h-8" : "wu-h-10", Ro = (e) => K({
|
|
5472
5492
|
"wu-text-right": e === "right",
|
|
5473
5493
|
"wu-text-center": e === "center",
|
|
5474
5494
|
"wu-text-left": e === "left"
|
|
5475
|
-
}),
|
|
5495
|
+
}), zo = (e) => K({
|
|
5476
5496
|
"wu-justify-end": e === "right",
|
|
5477
5497
|
"wu-justify-center": e === "center"
|
|
5478
|
-
}),
|
|
5498
|
+
}), Bo = (e, t) => K("wu-absolute -wu-bottom-[13px] wu-left-0 wm-arrow-drop-up wu-text-xl", e && "wu-hidden", !t && "-wu-bottom-[10px]"), Vo = (e, t) => K("wu-absolute -wu-top-[15px] wu-left-0 wm-arrow-drop-down wu-text-xl", e && "wu-hidden", !t && "-wu-top-[11px]"), Ho = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("table", {
|
|
5479
5499
|
ref: n,
|
|
5480
5500
|
className: K("wu-w-full wu-caption-bottom wu-text-sm", e),
|
|
5481
5501
|
...t
|
|
5482
5502
|
}));
|
|
5483
|
-
|
|
5484
|
-
var
|
|
5503
|
+
Ho.displayName = "Table";
|
|
5504
|
+
var Uo = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("thead", {
|
|
5485
5505
|
ref: n,
|
|
5486
5506
|
className: K("[&_tr]:wu-border-b", e),
|
|
5487
5507
|
...t
|
|
5488
5508
|
}));
|
|
5489
|
-
|
|
5490
|
-
var
|
|
5509
|
+
Uo.displayName = "TableHeader";
|
|
5510
|
+
var Wo = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("tbody", {
|
|
5491
5511
|
ref: n,
|
|
5492
5512
|
className: K("", e),
|
|
5493
5513
|
...t
|
|
5494
5514
|
}));
|
|
5495
|
-
|
|
5496
|
-
var
|
|
5515
|
+
Wo.displayName = "TableBody";
|
|
5516
|
+
var Go = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("tfoot", {
|
|
5497
5517
|
ref: n,
|
|
5498
5518
|
className: K("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0", e),
|
|
5499
5519
|
...t
|
|
5500
5520
|
}));
|
|
5501
|
-
|
|
5502
|
-
var
|
|
5521
|
+
Go.displayName = "TableFooter";
|
|
5522
|
+
var Ko = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("tr", {
|
|
5503
5523
|
ref: n,
|
|
5504
5524
|
className: K("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted", e),
|
|
5505
5525
|
...t
|
|
5506
5526
|
}));
|
|
5507
|
-
|
|
5508
|
-
var
|
|
5527
|
+
Ko.displayName = "TableRow";
|
|
5528
|
+
var qo = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("th", {
|
|
5509
5529
|
ref: n,
|
|
5510
5530
|
className: K("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0", e),
|
|
5511
5531
|
...t
|
|
5512
5532
|
}));
|
|
5513
|
-
|
|
5514
|
-
var
|
|
5533
|
+
qo.displayName = "TableHead";
|
|
5534
|
+
var Jo = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("td", {
|
|
5515
5535
|
ref: n,
|
|
5516
5536
|
className: K("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0", e),
|
|
5517
5537
|
...t
|
|
5518
5538
|
}));
|
|
5519
|
-
|
|
5520
|
-
var
|
|
5539
|
+
Jo.displayName = "TableCell";
|
|
5540
|
+
var Yo = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("caption", {
|
|
5521
5541
|
ref: n,
|
|
5522
5542
|
className: K("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal", e),
|
|
5523
5543
|
...t
|
|
5524
5544
|
}));
|
|
5525
|
-
|
|
5545
|
+
Yo.displayName = "TableCaption";
|
|
5526
5546
|
//#endregion
|
|
5527
5547
|
//#region src/components/table/ui/_body.tsx
|
|
5528
|
-
var
|
|
5529
|
-
let l = e.getVisibleLeafColumns(), u = l.length, d = e.getRowModel().rows, f =
|
|
5530
|
-
return r ? /* @__PURE__ */ y(
|
|
5548
|
+
var Xo = ({ table: e, size: t, NoDataContent: n, isLoading: r, CustomLoader: i, isRowDisabled: a, isRowExpandable: o, isScrolledLeft: s, isScrolledRight: c }) => {
|
|
5549
|
+
let l = e.getVisibleLeafColumns(), u = l.length, d = e.getRowModel().rows, f = Oo(l);
|
|
5550
|
+
return r ? /* @__PURE__ */ y(Wo, { children: /* @__PURE__ */ y(Ko, { children: /* @__PURE__ */ y(Jo, {
|
|
5531
5551
|
colSpan: u,
|
|
5532
5552
|
className: "wu-text-center wu-h-[35vh] wu-loader-container",
|
|
5533
5553
|
children: i ?? /* @__PURE__ */ y(Ze, { className: "wu-w-full" })
|
|
5534
|
-
}) }) }) : d.length ? /* @__PURE__ */ y(
|
|
5535
|
-
let i = a?.(n.original) ?? !1, l = n.getIsSelected(), d = n.getIsExpanded(), p = /* @__PURE__ */ y(
|
|
5554
|
+
}) }) }) : d.length ? /* @__PURE__ */ y(Wo, { children: d.flatMap((n, r) => {
|
|
5555
|
+
let i = a?.(n.original) ?? !1, l = n.getIsSelected(), d = n.getIsExpanded(), p = /* @__PURE__ */ y(Ko, {
|
|
5536
5556
|
"data-disabled": i,
|
|
5537
5557
|
"data-state": l && "selected",
|
|
5538
|
-
className:
|
|
5558
|
+
className: Fo(i),
|
|
5539
5559
|
"data-expanded": d,
|
|
5540
5560
|
children: n.getVisibleCells().map((e, n) => {
|
|
5541
5561
|
let r = e.column.columnDef, i = f.get(e.column.id);
|
|
5542
|
-
return /* @__PURE__ */ b(
|
|
5543
|
-
className: K(
|
|
5562
|
+
return /* @__PURE__ */ b(Jo, {
|
|
5563
|
+
className: K(Io(t, r.cellAlign), i && "wu-sticky wu-z-[1]"),
|
|
5544
5564
|
style: {
|
|
5545
5565
|
width: `${e.column.getSize()}px`,
|
|
5546
5566
|
...i && { [i.sticky]: i.offset }
|
|
5547
5567
|
},
|
|
5548
|
-
children: [
|
|
5568
|
+
children: [jo(e, r), ko(i?.sticky, i?.isStickyEdge ?? !1, s, c)]
|
|
5549
5569
|
}, `${e.id}-${n}`);
|
|
5550
5570
|
})
|
|
5551
|
-
}, `${n.id}-${r}`), m = o && d ?
|
|
5552
|
-
return m ? [p, /* @__PURE__ */ y(
|
|
5571
|
+
}, `${n.id}-${r}`), m = o && d ? Do(n, e.getVisibleLeafColumns()) : null;
|
|
5572
|
+
return m ? [p, /* @__PURE__ */ y(Ko, {
|
|
5553
5573
|
"data-expanded": "true",
|
|
5554
5574
|
"data-state": l && "selected",
|
|
5555
|
-
children: /* @__PURE__ */ y(
|
|
5575
|
+
children: /* @__PURE__ */ y(Jo, {
|
|
5556
5576
|
colSpan: u,
|
|
5557
5577
|
children: m
|
|
5558
5578
|
})
|
|
5559
5579
|
}, `${n.id}-expanded-${r}`)] : [p];
|
|
5560
|
-
}) }) : /* @__PURE__ */ y(
|
|
5580
|
+
}) }) : /* @__PURE__ */ y(Wo, { children: /* @__PURE__ */ y(Ko, { children: /* @__PURE__ */ y(Jo, {
|
|
5561
5581
|
colSpan: u,
|
|
5562
5582
|
children: n
|
|
5563
5583
|
}) }) });
|
|
5564
|
-
},
|
|
5565
|
-
let f = i === "compact" ? "wu-h-8" : "wu-h-10", p = e.getVisibleLeafColumns(), m =
|
|
5584
|
+
}, Zo = ({ table: e, sortableColumns: t, manual: n = !1, onSort: r, size: i, isRowSelected: a, HeaderAction: o, isStickyHeader: s, asVirtualContent: c = !1, isRowExpandable: l, isScrolledLeft: u, isScrolledRight: d }) => {
|
|
5585
|
+
let f = i === "compact" ? "wu-h-8" : "wu-h-10", p = e.getVisibleLeafColumns(), m = Oo(p), h = (e) => {
|
|
5566
5586
|
let { id: i, columnDef: a, getIsSorted: o, toggleSorting: s } = e.column, c = a.headerAlign, l = Ce(a.header, e.getContext());
|
|
5567
5587
|
if (!t.includes(i)) return l;
|
|
5568
5588
|
let u = o(), d = u === "asc", f = u === "desc";
|
|
@@ -5574,32 +5594,32 @@ var Ko = ({ table: e, size: t, NoDataContent: n, isLoading: r, CustomLoader: i,
|
|
|
5574
5594
|
}) : s(e.column.getIsSorted() === "asc");
|
|
5575
5595
|
},
|
|
5576
5596
|
"aria-label": `Sort by ${typeof a.header == "string" ? a.header : i}`,
|
|
5577
|
-
className: K("wu-flex wu-items-center wu-gap-1 wu-w-full",
|
|
5597
|
+
className: K("wu-flex wu-items-center wu-gap-1 wu-w-full", zo(c)),
|
|
5578
5598
|
children: [l, /* @__PURE__ */ b("div", {
|
|
5579
5599
|
className: "wu-relative wu-flex-shrink-0 wu-w-4",
|
|
5580
|
-
children: [/* @__PURE__ */ y("span", { className:
|
|
5600
|
+
children: [/* @__PURE__ */ y("span", { className: Vo(d, !!u) }), /* @__PURE__ */ y("span", { className: Bo(f, !!u) })]
|
|
5581
5601
|
})]
|
|
5582
5602
|
});
|
|
5583
5603
|
}, g = (e) => {
|
|
5584
5604
|
let t = e.column.id === "actions", n = m.get(e.column.id), r = n ? { [n.sticky]: n.offset } : {};
|
|
5585
|
-
return t ? /* @__PURE__ */ y(
|
|
5605
|
+
return t ? /* @__PURE__ */ y(qo, {
|
|
5586
5606
|
colSpan: e.colSpan,
|
|
5587
5607
|
className: K("wu-text-xs wu-font-medium", n && "wu-sticky wu-z-[2] wu-bg-[#EEEEEE]"),
|
|
5588
5608
|
style: {
|
|
5589
5609
|
width: `${e.getSize()}px`,
|
|
5590
5610
|
...r
|
|
5591
5611
|
},
|
|
5592
|
-
children:
|
|
5593
|
-
}, e.id) : /* @__PURE__ */ b(
|
|
5612
|
+
children: ko(n?.sticky, n?.isStickyEdge ?? !1, u, d)
|
|
5613
|
+
}, e.id) : /* @__PURE__ */ b(qo, {
|
|
5594
5614
|
colSpan: e.colSpan,
|
|
5595
|
-
className: K("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]", n ? "wu-sticky wu-z-[2]" : "wu-relative wu-z-0",
|
|
5615
|
+
className: K("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]", n ? "wu-sticky wu-z-[2]" : "wu-relative wu-z-0", Ro(e.column.columnDef.headerAlign)),
|
|
5596
5616
|
style: {
|
|
5597
5617
|
width: `${e.getSize()}px`,
|
|
5598
5618
|
...r
|
|
5599
5619
|
},
|
|
5600
|
-
children: [h(e),
|
|
5620
|
+
children: [h(e), ko(n?.sticky, n?.isStickyEdge ?? !1, u, d)]
|
|
5601
5621
|
}, e.id);
|
|
5602
|
-
}, _ = () => e.getHeaderGroups().map((e) => /* @__PURE__ */ y(
|
|
5622
|
+
}, _ = () => e.getHeaderGroups().map((e) => /* @__PURE__ */ y(Ko, {
|
|
5603
5623
|
className: "wu-relative",
|
|
5604
5624
|
children: e.headers.map(g)
|
|
5605
5625
|
}, e.id)), v = () => /* @__PURE__ */ b("div", {
|
|
@@ -5622,27 +5642,27 @@ var Ko = ({ table: e, size: t, NoDataContent: n, isLoading: r, CustomLoader: i,
|
|
|
5622
5642
|
children: o
|
|
5623
5643
|
})]
|
|
5624
5644
|
}), x = a && o;
|
|
5625
|
-
return c ? /* @__PURE__ */ b(
|
|
5645
|
+
return c ? /* @__PURE__ */ b(Ko, {
|
|
5626
5646
|
className: "wu-relative",
|
|
5627
|
-
children: [(e.getHeaderGroups()[0]?.headers ?? []).map(g), x && /* @__PURE__ */ y(
|
|
5647
|
+
children: [(e.getHeaderGroups()[0]?.headers ?? []).map(g), x && /* @__PURE__ */ y(qo, {
|
|
5628
5648
|
colSpan: p.length,
|
|
5629
5649
|
className: "wu-p-0 wu-absolute wu-top-0 wu-left-0 wu-right-0 wu-z-10",
|
|
5630
5650
|
children: v()
|
|
5631
5651
|
})]
|
|
5632
|
-
}) : /* @__PURE__ */ b(
|
|
5652
|
+
}) : /* @__PURE__ */ b(Uo, {
|
|
5633
5653
|
className: K("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative", s && "wu-sticky wu-top-[-.5px] wu-z-10", f),
|
|
5634
5654
|
children: [_(), x && /* @__PURE__ */ y("div", {
|
|
5635
5655
|
className: K("wu-absolute wu-top-[-1px] wu-left-0 wu-right-0 wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20 wu-z-10", f),
|
|
5636
5656
|
children: v()
|
|
5637
5657
|
})]
|
|
5638
5658
|
});
|
|
5639
|
-
},
|
|
5659
|
+
}, Qo = n.forwardRef((e, t) => /* @__PURE__ */ y(Wo, {
|
|
5640
5660
|
...e,
|
|
5641
5661
|
ref: t
|
|
5642
5662
|
}));
|
|
5643
|
-
|
|
5644
|
-
var
|
|
5645
|
-
let m = e.getRowModel().rows, h = e.getVisibleLeafColumns(), g =
|
|
5663
|
+
Qo.displayName = "TableBodyComponent";
|
|
5664
|
+
var $o = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sortableColumns: i, HeaderAction: a, isRowSelected: o, manual: s = !1, onSort: c, tableLayout: l = "auto", isScrolledLeft: u, isScrolledRight: d, isRowExpandable: f, hideHeader: p = !1 }) => {
|
|
5665
|
+
let m = e.getRowModel().rows, h = e.getVisibleLeafColumns(), g = Oo(h), _ = [];
|
|
5646
5666
|
for (let e of m) _.push({
|
|
5647
5667
|
type: "row",
|
|
5648
5668
|
row: e
|
|
@@ -5655,7 +5675,7 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5655
5675
|
children: /* @__PURE__ */ y(ne, {
|
|
5656
5676
|
style: { height: r },
|
|
5657
5677
|
totalCount: _.length,
|
|
5658
|
-
fixedHeaderContent: p ? void 0 : () => /* @__PURE__ */ y(
|
|
5678
|
+
fixedHeaderContent: p ? void 0 : () => /* @__PURE__ */ y(Zo, {
|
|
5659
5679
|
table: e,
|
|
5660
5680
|
sortableColumns: i,
|
|
5661
5681
|
manual: s,
|
|
@@ -5671,8 +5691,8 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5671
5691
|
let r = _[n];
|
|
5672
5692
|
if (!r) return null;
|
|
5673
5693
|
if (r.type === "expanded") {
|
|
5674
|
-
let t =
|
|
5675
|
-
return /* @__PURE__ */ y(
|
|
5694
|
+
let t = Do(r.row, e.getVisibleLeafColumns());
|
|
5695
|
+
return /* @__PURE__ */ y(Jo, {
|
|
5676
5696
|
colSpan: h.length,
|
|
5677
5697
|
children: t
|
|
5678
5698
|
});
|
|
@@ -5680,10 +5700,10 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5680
5700
|
let i = r.row;
|
|
5681
5701
|
return /* @__PURE__ */ y(v, { children: i.getVisibleCells().map((e, n) => {
|
|
5682
5702
|
let r = e.column.columnDef, i = g.get(e.column.id);
|
|
5683
|
-
return /* @__PURE__ */ b(
|
|
5684
|
-
className: K(
|
|
5703
|
+
return /* @__PURE__ */ b(Jo, {
|
|
5704
|
+
className: K(Io(t, r.cellAlign), i && "wu-sticky wu-z-[1]"),
|
|
5685
5705
|
style: i ? { [i.sticky]: i.offset } : void 0,
|
|
5686
|
-
children: [
|
|
5706
|
+
children: [jo(e, r), ko(i?.sticky, i?.isStickyEdge ?? !1, u, d)]
|
|
5687
5707
|
}, `${e.id}-${n}`);
|
|
5688
5708
|
}) });
|
|
5689
5709
|
},
|
|
@@ -5698,30 +5718,30 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5698
5718
|
},
|
|
5699
5719
|
children: [/* @__PURE__ */ y("colgroup", { children: h.map((e) => /* @__PURE__ */ y("col", { style: { width: `${e.getSize()}px` } }, e.id)) }), t.children]
|
|
5700
5720
|
}),
|
|
5701
|
-
TableBody:
|
|
5702
|
-
TableHead: (e) => /* @__PURE__ */ y(
|
|
5721
|
+
TableBody: Qo,
|
|
5722
|
+
TableHead: (e) => /* @__PURE__ */ y(Uo, {
|
|
5703
5723
|
...e,
|
|
5704
|
-
className: K("wu-border-t wu-border-black/[12%] wu-bg-gray-20",
|
|
5724
|
+
className: K("wu-border-t wu-border-black/[12%] wu-bg-gray-20", Lo(t), e.className)
|
|
5705
5725
|
}),
|
|
5706
5726
|
TableRow: ({ ...e }) => {
|
|
5707
5727
|
let t = _[e["data-index"]], r = t?.row, i = r ? n?.(r.original) ?? !1 : !1, a = r?.getIsSelected() ?? !1;
|
|
5708
|
-
return /* @__PURE__ */ y(
|
|
5728
|
+
return /* @__PURE__ */ y(Ko, {
|
|
5709
5729
|
...e,
|
|
5710
5730
|
"data-disabled": i,
|
|
5711
5731
|
"data-state": a && "selected",
|
|
5712
5732
|
"data-expanded": t?.type === "expanded" ? "true" : void 0,
|
|
5713
|
-
className:
|
|
5733
|
+
className: Fo(i)
|
|
5714
5734
|
});
|
|
5715
5735
|
}
|
|
5716
5736
|
}
|
|
5717
5737
|
})
|
|
5718
5738
|
});
|
|
5719
|
-
},
|
|
5739
|
+
}, es = z("", { variants: { variant: {
|
|
5720
5740
|
striped: "[&_tr:nth-child(even):not([data-expanded])_td]:wu-bg-zinc-50 [&_tr:nth-child(odd)[data-expanded]:not([data-state=\"selected\"])_td]:wu-bg-zinc-50",
|
|
5721
5741
|
unstyled: "",
|
|
5722
5742
|
bordered: "wu-border-collapse wu-border wu-border-black/[12%] [&_th]:wu-border [&_td]:wu-border"
|
|
5723
|
-
} } }),
|
|
5724
|
-
let [C, w] = n.useState(() => a?.defaultSort ?? null), { scrollContainerRef: T, isScrolledLeft: E, isScrolledRight: D, handleScroll: O } =
|
|
5743
|
+
} } }), ts = ({ data: e, columns: t, isLoading: r = !1, variant: i = "unstyled", sort: a, size: o, rowSelection: s, HeaderAction: c, NoDataContent: l, stickyHeader: u = !1, maxHeight: d, CustomLoader: f, caption: p, virtualization: m, isRowExpandable: h, hideHeader: g = !1, tableLayout: _ = "fixed", style: v, className: x, ...S }) => {
|
|
5744
|
+
let [C, w] = n.useState(() => a?.defaultSort ?? null), { scrollContainerRef: T, isScrolledLeft: E, isScrolledRight: D, handleScroll: O } = Po(), { rowSelectionState: k, sortableColumns: A, selectedRowCount: j, columnsWithExpand: M, expanded: N, setExpanded: ee, handleRowSelectionChange: P } = No({
|
|
5725
5745
|
data: e,
|
|
5726
5746
|
columns: t,
|
|
5727
5747
|
rowSelection: s,
|
|
@@ -5747,20 +5767,20 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5747
5767
|
},
|
|
5748
5768
|
onRowSelectionChange: P,
|
|
5749
5769
|
...h ? { onExpandedChange: ee } : {}
|
|
5750
|
-
}), I =
|
|
5770
|
+
}), I = Ao(m?.enabled, m?.threshold, e.length), L = m?.maxHeight ?? 600, R = typeof d == "number" ? `${d}px` : d;
|
|
5751
5771
|
return /* @__PURE__ */ y("div", {
|
|
5752
5772
|
className: K("wu-text-gray-lead wu-table-container wu-relative", !I && u && !R && "wu-h-full"),
|
|
5753
5773
|
children: I ? /* @__PURE__ */ b("div", {
|
|
5754
5774
|
ref: T,
|
|
5755
5775
|
onScroll: O,
|
|
5756
|
-
className: K("wu-overflow-x-auto wu-w-full",
|
|
5757
|
-
children: [p && /* @__PURE__ */ y(
|
|
5776
|
+
className: K("wu-overflow-x-auto wu-w-full", es({ variant: i })),
|
|
5777
|
+
children: [p && /* @__PURE__ */ y(Yo, {
|
|
5758
5778
|
className: "wu-font-light",
|
|
5759
5779
|
children: p
|
|
5760
5780
|
}), r ? /* @__PURE__ */ y("div", {
|
|
5761
5781
|
className: "wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center",
|
|
5762
5782
|
children: f ?? /* @__PURE__ */ y(Ze, { className: "wu-w-full" })
|
|
5763
|
-
}) : F.getRowModel().rows?.length ? /* @__PURE__ */ y(
|
|
5783
|
+
}) : F.getRowModel().rows?.length ? /* @__PURE__ */ y($o, {
|
|
5764
5784
|
table: F,
|
|
5765
5785
|
size: o,
|
|
5766
5786
|
isRowDisabled: s?.isRowDisabled,
|
|
@@ -5785,19 +5805,19 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5785
5805
|
onScroll: O,
|
|
5786
5806
|
className: K("wu-overflow-x-auto wu-w-full", u && "wu-overflow-y-auto", u && !R && "wu-h-full"),
|
|
5787
5807
|
style: u && R ? { maxHeight: R } : void 0,
|
|
5788
|
-
children: /* @__PURE__ */ b(
|
|
5808
|
+
children: /* @__PURE__ */ b(Ho, {
|
|
5789
5809
|
...S,
|
|
5790
|
-
className: K("wu-w-full",
|
|
5810
|
+
className: K("wu-w-full", es({ variant: i }), x),
|
|
5791
5811
|
style: {
|
|
5792
5812
|
tableLayout: _,
|
|
5793
5813
|
...v
|
|
5794
5814
|
},
|
|
5795
5815
|
children: [
|
|
5796
|
-
p && /* @__PURE__ */ y(
|
|
5816
|
+
p && /* @__PURE__ */ y(Yo, {
|
|
5797
5817
|
className: "wu-font-light",
|
|
5798
5818
|
children: p
|
|
5799
5819
|
}),
|
|
5800
|
-
!g && /* @__PURE__ */ y(
|
|
5820
|
+
!g && /* @__PURE__ */ y(Zo, {
|
|
5801
5821
|
table: F,
|
|
5802
5822
|
sortableColumns: A,
|
|
5803
5823
|
manual: !0,
|
|
@@ -5812,7 +5832,7 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5812
5832
|
isScrolledLeft: E,
|
|
5813
5833
|
isScrolledRight: D
|
|
5814
5834
|
}),
|
|
5815
|
-
/* @__PURE__ */ y(
|
|
5835
|
+
/* @__PURE__ */ y(Xo, {
|
|
5816
5836
|
table: F,
|
|
5817
5837
|
size: o,
|
|
5818
5838
|
NoDataContent: l,
|
|
@@ -5827,11 +5847,11 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5827
5847
|
})
|
|
5828
5848
|
})
|
|
5829
5849
|
});
|
|
5830
|
-
},
|
|
5850
|
+
}, ns = ({ data: e, columns: t, variant: r = "unstyled", size: i = "default", sort: a, filterText: o, pagination: s, stickyHeader: c, maxHeight: l, HeaderAction: d, CustomLoader: p, NoDataContent: h, isLoading: g, caption: _, rowSelection: v, isRowExpandable: x, hideHeader: S = !1, virtualization: C, tableLayout: w = "fixed", style: T, className: E, ...D }) => {
|
|
5831
5851
|
let [O, k] = n.useState(() => a?.defaultSort ? [{
|
|
5832
5852
|
id: a.defaultSort.id,
|
|
5833
5853
|
desc: a.defaultSort.desc
|
|
5834
|
-
}] : []), [A, j] = m([]), [M, N] = m(s?.pageIndex ?? 0), { scrollContainerRef: ee, isScrolledLeft: P, isScrolledRight: F, handleScroll: I } =
|
|
5854
|
+
}] : []), [A, j] = m([]), [M, N] = m(s?.pageIndex ?? 0), { scrollContainerRef: ee, isScrolledLeft: P, isScrolledRight: F, handleScroll: I } = Po(), { finalColumns: L, rowSelectionState: R, sortableColumns: te, selectedRowCount: z, columnsWithExpand: B, expanded: ne, setExpanded: re, handleRowSelectionChange: V } = No({
|
|
5835
5855
|
data: e,
|
|
5836
5856
|
columns: t,
|
|
5837
5857
|
rowSelection: v,
|
|
@@ -5869,17 +5889,17 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5869
5889
|
]), u(() => {
|
|
5870
5890
|
s && s?.pageIndex !== M && (v?.onRowSelect([]), H.resetRowSelection(), N(s.pageIndex));
|
|
5871
5891
|
}, [s?.pageIndex]);
|
|
5872
|
-
let ae =
|
|
5892
|
+
let ae = Ao(C?.enabled, C?.threshold, e.length), oe = C?.maxHeight ?? 600, U = typeof l == "number" ? `${l}px` : l;
|
|
5873
5893
|
return /* @__PURE__ */ y("div", {
|
|
5874
5894
|
className: K("wu-text-gray-lead wu-table-container wu-relative", !ae && c && !U && "wu-h-full"),
|
|
5875
5895
|
children: ae ? /* @__PURE__ */ b("div", {
|
|
5876
5896
|
ref: ee,
|
|
5877
5897
|
onScroll: I,
|
|
5878
|
-
className: K("wu-overflow-x-auto wu-w-full",
|
|
5879
|
-
children: [_ && /* @__PURE__ */ y(
|
|
5898
|
+
className: K("wu-overflow-x-auto wu-w-full", es({ variant: r })),
|
|
5899
|
+
children: [_ && /* @__PURE__ */ y(Yo, { children: _ }), g ? /* @__PURE__ */ y("div", {
|
|
5880
5900
|
className: "wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center",
|
|
5881
5901
|
children: p ?? /* @__PURE__ */ y(Ze, { className: "wu-w-full" })
|
|
5882
|
-
}) : H.getRowModel().rows?.length ? /* @__PURE__ */ y(
|
|
5902
|
+
}) : H.getRowModel().rows?.length ? /* @__PURE__ */ y($o, {
|
|
5883
5903
|
table: H,
|
|
5884
5904
|
size: i,
|
|
5885
5905
|
isRowDisabled: v?.isRowDisabled,
|
|
@@ -5901,16 +5921,16 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5901
5921
|
onScroll: I,
|
|
5902
5922
|
className: K("wu-overflow-x-auto wu-w-full", c && "wu-overflow-y-auto", c && !U && "wu-h-full"),
|
|
5903
5923
|
style: c && U ? { maxHeight: U } : void 0,
|
|
5904
|
-
children: /* @__PURE__ */ b(
|
|
5924
|
+
children: /* @__PURE__ */ b(Ho, {
|
|
5905
5925
|
...D,
|
|
5906
|
-
className: K(`wu-table-${w}`, "wu-w-full",
|
|
5926
|
+
className: K(`wu-table-${w}`, "wu-w-full", es({ variant: r }), E),
|
|
5907
5927
|
style: {
|
|
5908
5928
|
tableLayout: w,
|
|
5909
5929
|
...T
|
|
5910
5930
|
},
|
|
5911
5931
|
children: [
|
|
5912
|
-
_ && /* @__PURE__ */ y(
|
|
5913
|
-
!S && /* @__PURE__ */ y(
|
|
5932
|
+
_ && /* @__PURE__ */ y(Yo, { children: _ }),
|
|
5933
|
+
!S && /* @__PURE__ */ y(Zo, {
|
|
5914
5934
|
table: H,
|
|
5915
5935
|
sortableColumns: te,
|
|
5916
5936
|
size: i,
|
|
@@ -5921,7 +5941,7 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5921
5941
|
isScrolledLeft: P,
|
|
5922
5942
|
isScrolledRight: F
|
|
5923
5943
|
}),
|
|
5924
|
-
/* @__PURE__ */ y(
|
|
5944
|
+
/* @__PURE__ */ y(Xo, {
|
|
5925
5945
|
table: H,
|
|
5926
5946
|
size: i,
|
|
5927
5947
|
NoDataContent: h,
|
|
@@ -5936,22 +5956,22 @@ var Yo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
|
|
|
5936
5956
|
})
|
|
5937
5957
|
})
|
|
5938
5958
|
});
|
|
5939
|
-
},
|
|
5959
|
+
}, rs = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("textarea", {
|
|
5940
5960
|
className: K("wu-flex wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-text-gray-lead wu-p-2 wu-text-sm wu-font-normal wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light focus-visible:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle focus:wu-border-blue-p wu-transition-colors hover:wu-border-gray-40 ", e),
|
|
5941
5961
|
ref: n,
|
|
5942
5962
|
...t
|
|
5943
5963
|
}));
|
|
5944
|
-
|
|
5964
|
+
rs.displayName = "Textarea";
|
|
5945
5965
|
//#endregion
|
|
5946
5966
|
//#region src/components/textarea/WuTextarea.tsx
|
|
5947
|
-
var
|
|
5967
|
+
var is = n.forwardRef((e, t) => {
|
|
5948
5968
|
let { Label: n, id: r = Ne(), variant: i = "flat", readonly: a, maxLength: o, labelPosition: s = "top", ...c } = e, l = (e) => {
|
|
5949
5969
|
c.onChange && c.onChange(e);
|
|
5950
5970
|
};
|
|
5951
5971
|
return /* @__PURE__ */ b("div", {
|
|
5952
5972
|
className: K(Pe(s), "wu-flex wu-textarea-container"),
|
|
5953
5973
|
dir: c.dir,
|
|
5954
|
-
children: [/* @__PURE__ */ y(
|
|
5974
|
+
children: [/* @__PURE__ */ y(rs, {
|
|
5955
5975
|
...c,
|
|
5956
5976
|
ref: t,
|
|
5957
5977
|
id: r,
|
|
@@ -5966,25 +5986,25 @@ var es = n.forwardRef((e, t) => {
|
|
|
5966
5986
|
})]
|
|
5967
5987
|
});
|
|
5968
5988
|
});
|
|
5969
|
-
|
|
5989
|
+
is.displayName = "WuTextarea";
|
|
5970
5990
|
//#endregion
|
|
5971
5991
|
//#region src/components/timePicker/utils/timePickerUtils.ts
|
|
5972
|
-
function
|
|
5992
|
+
function as(e) {
|
|
5973
5993
|
return typeof e == "string" && e.includes("T") ? j(ee(e), "HH:mm") : typeof e == "string" && /^\d{2}:\d{2}:\d{2}$/.test(e) ? j(N(e, "HH:mm:ss", /* @__PURE__ */ new Date()), "HH:mm") : typeof e == "string" && /^\d{2}:\d{2}$/.test(e) ? e : "00:00";
|
|
5974
5994
|
}
|
|
5975
|
-
var
|
|
5976
|
-
function
|
|
5995
|
+
var os = ["12", ...Array.from({ length: 11 }, (e, t) => String(t + 1).padStart(2, "0"))], ss = Array.from({ length: 60 }, (e, t) => String(t).padStart(2, "0")), cs = ["am", "pm"];
|
|
5996
|
+
function ls(e) {
|
|
5977
5997
|
return Array(50).fill(e).flat();
|
|
5978
5998
|
}
|
|
5979
|
-
function
|
|
5999
|
+
function us(e, t) {
|
|
5980
6000
|
let n = e.indexOf(t);
|
|
5981
6001
|
return [...e.slice(n), ...e.slice(0, n)];
|
|
5982
6002
|
}
|
|
5983
|
-
function
|
|
6003
|
+
function ds(e, t) {
|
|
5984
6004
|
let n = Number(e);
|
|
5985
6005
|
return t === "pm" && n < 12 && (n += 12), t === "am" && n === 12 && (n = 0), String(n).padStart(2, "0");
|
|
5986
6006
|
}
|
|
5987
|
-
function
|
|
6007
|
+
function fs(e) {
|
|
5988
6008
|
let t = Number(e), n = t >= 12 ? "pm" : "am", r = t % 12 == 0 ? 12 : t % 12;
|
|
5989
6009
|
return {
|
|
5990
6010
|
hour: String(r),
|
|
@@ -5993,15 +6013,15 @@ function cs(e) {
|
|
|
5993
6013
|
}
|
|
5994
6014
|
//#endregion
|
|
5995
6015
|
//#region src/components/timePicker/components/timeColumn.tsx
|
|
5996
|
-
var
|
|
6016
|
+
var ps = ({ value: e, isSelected: t, onClick: n }) => /* @__PURE__ */ y("div", {
|
|
5997
6017
|
onClick: n,
|
|
5998
6018
|
className: K("wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-text-center wu-snap-start wu-rounded-[2px] wu-cursor-pointer hover:wu-bg-blue-p hover:wu-text-white", t && "wu-bg-blue-p/15 wu-text-blue-p"),
|
|
5999
6019
|
children: e
|
|
6000
|
-
}),
|
|
6020
|
+
}), ms = ({ values: e, selectedValue: t, scrollRef: n, onSelect: r, repeatItems: i = !0, className: a }) => /* @__PURE__ */ y("div", {
|
|
6001
6021
|
ref: n,
|
|
6002
6022
|
className: K("wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", a),
|
|
6003
6023
|
role: "presentation",
|
|
6004
|
-
children: (i ?
|
|
6024
|
+
children: (i ? ls(e) : e).map((e, n) => /* @__PURE__ */ y(ps, {
|
|
6005
6025
|
value: e,
|
|
6006
6026
|
isSelected: e === t,
|
|
6007
6027
|
onClick: () => r(e)
|
|
@@ -6009,16 +6029,16 @@ var ls = ({ value: e, isSelected: t, onClick: n }) => /* @__PURE__ */ y("div", {
|
|
|
6009
6029
|
});
|
|
6010
6030
|
//#endregion
|
|
6011
6031
|
//#region src/components/timePicker/hooks/useRotatedArrays.ts
|
|
6012
|
-
function
|
|
6032
|
+
function hs(e, t, n, r) {
|
|
6013
6033
|
return {
|
|
6014
|
-
rotatedHours: f(() => e ? os
|
|
6015
|
-
rotatedMinutes: f(() => e ?
|
|
6016
|
-
rotatedMeridiem: f(() => e ?
|
|
6034
|
+
rotatedHours: f(() => e ? us(os, t.padStart(2, "0")) : os, [e]),
|
|
6035
|
+
rotatedMinutes: f(() => e ? us(ss, n.padStart(2, "0")) : ss, [e]),
|
|
6036
|
+
rotatedMeridiem: f(() => e ? us(cs, r) : cs, [e])
|
|
6017
6037
|
};
|
|
6018
6038
|
}
|
|
6019
6039
|
//#endregion
|
|
6020
6040
|
//#region src/components/timePicker/hooks/useTimePickerScroll.ts
|
|
6021
|
-
function
|
|
6041
|
+
function gs(e, t, n) {
|
|
6022
6042
|
u(() => {
|
|
6023
6043
|
function r(e) {
|
|
6024
6044
|
if (e) {
|
|
@@ -6046,16 +6066,16 @@ function fs(e, t, n) {
|
|
|
6046
6066
|
}
|
|
6047
6067
|
//#endregion
|
|
6048
6068
|
//#region src/components/timePicker/WuTimePicker.tsx
|
|
6049
|
-
var
|
|
6069
|
+
var _s = ({ className: e, time: t, Label: r, labelPosition: i, dir: a, ...o }) => {
|
|
6050
6070
|
let [c, l] = m(!1), [u, d] = m(""), f = p(null), h = p(null), g = p(null), _ = p(null), [v, x] = m("12"), [S, C] = m("00"), [w, T] = m("am");
|
|
6051
6071
|
n.useEffect(() => {
|
|
6052
6072
|
if (!t) {
|
|
6053
6073
|
d(""), x("12"), C("00"), T("am"), f.current && (f.current.value = "");
|
|
6054
6074
|
return;
|
|
6055
6075
|
}
|
|
6056
|
-
let e =
|
|
6076
|
+
let e = as(t);
|
|
6057
6077
|
d(e);
|
|
6058
|
-
let [n, r] = e.split(":"), { hour: i, meridiem: a } =
|
|
6078
|
+
let [n, r] = e.split(":"), { hour: i, meridiem: a } = fs(n);
|
|
6059
6079
|
x(i), C(r), T(a), f.current && (f.current.value = e);
|
|
6060
6080
|
}, [t]), n.useEffect(() => {
|
|
6061
6081
|
let e = (e) => {
|
|
@@ -6064,10 +6084,10 @@ var ps = ({ className: e, time: t, Label: r, labelPosition: i, dir: a, ...o }) =
|
|
|
6064
6084
|
return document.addEventListener("mousedown", e), () => {
|
|
6065
6085
|
document.removeEventListener("mousedown", e);
|
|
6066
6086
|
};
|
|
6067
|
-
}, []),
|
|
6068
|
-
let { rotatedHours: E, rotatedMinutes: D, rotatedMeridiem: O } =
|
|
6087
|
+
}, []), gs(c, g, _);
|
|
6088
|
+
let { rotatedHours: E, rotatedMinutes: D, rotatedMeridiem: O } = hs(c, v, S, w), k = s((e, t, n) => {
|
|
6069
6089
|
let r = e ?? v, i = t ?? S, a = n ?? w;
|
|
6070
|
-
x(r), C(i), T(a), d(`${
|
|
6090
|
+
x(r), C(i), T(a), d(`${ds(r, a)}:${i}`);
|
|
6071
6091
|
}, [
|
|
6072
6092
|
v,
|
|
6073
6093
|
S,
|
|
@@ -6093,7 +6113,7 @@ var ps = ({ className: e, time: t, Label: r, labelPosition: i, dir: a, ...o }) =
|
|
|
6093
6113
|
role: "textbox",
|
|
6094
6114
|
onChange: (e) => {
|
|
6095
6115
|
d(e.target.value);
|
|
6096
|
-
let [t, n] = e.target.value.split(":"), { hour: r, meridiem: i } =
|
|
6116
|
+
let [t, n] = e.target.value.split(":"), { hour: r, meridiem: i } = fs(t);
|
|
6097
6117
|
x(r), C(n), T(i);
|
|
6098
6118
|
},
|
|
6099
6119
|
className: "wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input",
|
|
@@ -6115,21 +6135,21 @@ var ps = ({ className: e, time: t, Label: r, labelPosition: i, dir: a, ...o }) =
|
|
|
6115
6135
|
c && /* @__PURE__ */ b("div", {
|
|
6116
6136
|
className: K("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead", e),
|
|
6117
6137
|
children: [
|
|
6118
|
-
/* @__PURE__ */ y(
|
|
6138
|
+
/* @__PURE__ */ y(ms, {
|
|
6119
6139
|
values: E,
|
|
6120
6140
|
selectedValue: v.padStart(2, "0"),
|
|
6121
6141
|
scrollRef: g,
|
|
6122
6142
|
onSelect: (e) => k(e, S),
|
|
6123
6143
|
className: "wu-time-hour-picker"
|
|
6124
6144
|
}),
|
|
6125
|
-
/* @__PURE__ */ y(
|
|
6145
|
+
/* @__PURE__ */ y(ms, {
|
|
6126
6146
|
values: D,
|
|
6127
6147
|
selectedValue: S.padStart(2, "0"),
|
|
6128
6148
|
scrollRef: _,
|
|
6129
6149
|
onSelect: (e) => k(v, e),
|
|
6130
6150
|
className: "wu-time-minute-picker"
|
|
6131
6151
|
}),
|
|
6132
|
-
/* @__PURE__ */ y(
|
|
6152
|
+
/* @__PURE__ */ y(ms, {
|
|
6133
6153
|
values: O,
|
|
6134
6154
|
selectedValue: w,
|
|
6135
6155
|
onSelect: (e) => k(void 0, void 0, e),
|
|
@@ -6142,27 +6162,27 @@ var ps = ({ className: e, time: t, Label: r, labelPosition: i, dir: a, ...o }) =
|
|
|
6142
6162
|
})]
|
|
6143
6163
|
});
|
|
6144
6164
|
};
|
|
6145
|
-
|
|
6165
|
+
_s.displayName = "WuTimePicker";
|
|
6146
6166
|
//#endregion
|
|
6147
6167
|
//#region src/base/ui/useToast.ts
|
|
6148
|
-
var
|
|
6149
|
-
function
|
|
6150
|
-
return
|
|
6168
|
+
var vs = 1, ys = 1e6, bs = 0;
|
|
6169
|
+
function xs() {
|
|
6170
|
+
return bs = (bs + 1) % (2 ** 53 - 1), bs.toString();
|
|
6151
6171
|
}
|
|
6152
|
-
var
|
|
6153
|
-
if (
|
|
6172
|
+
var Ss = /* @__PURE__ */ new Map(), Cs = (e) => {
|
|
6173
|
+
if (Ss.has(e)) return;
|
|
6154
6174
|
let t = setTimeout(() => {
|
|
6155
|
-
|
|
6175
|
+
Ss.delete(e), Ds({
|
|
6156
6176
|
type: "REMOVE_TOAST",
|
|
6157
6177
|
toastId: e
|
|
6158
6178
|
});
|
|
6159
|
-
},
|
|
6160
|
-
|
|
6161
|
-
},
|
|
6179
|
+
}, ys);
|
|
6180
|
+
Ss.set(e, t);
|
|
6181
|
+
}, ws = (e, t) => {
|
|
6162
6182
|
switch (t.type) {
|
|
6163
6183
|
case "ADD_TOAST": return {
|
|
6164
6184
|
...e,
|
|
6165
|
-
toasts: [t.toast, ...e.toasts].slice(0,
|
|
6185
|
+
toasts: [t.toast, ...e.toasts].slice(0, vs)
|
|
6166
6186
|
};
|
|
6167
6187
|
case "UPDATE_TOAST": return {
|
|
6168
6188
|
...e,
|
|
@@ -6173,8 +6193,8 @@ var vs = /* @__PURE__ */ new Map(), ys = (e) => {
|
|
|
6173
6193
|
};
|
|
6174
6194
|
case "DISMISS_TOAST": {
|
|
6175
6195
|
let { toastId: n } = t;
|
|
6176
|
-
return n ?
|
|
6177
|
-
|
|
6196
|
+
return n ? Cs(n) : e.toasts.forEach((e) => {
|
|
6197
|
+
Cs(e.id);
|
|
6178
6198
|
}), {
|
|
6179
6199
|
...e,
|
|
6180
6200
|
toasts: e.toasts.map((e) => e.id === n || n === void 0 ? {
|
|
@@ -6191,24 +6211,24 @@ var vs = /* @__PURE__ */ new Map(), ys = (e) => {
|
|
|
6191
6211
|
toasts: e.toasts.filter((e) => e.id !== t.toastId)
|
|
6192
6212
|
};
|
|
6193
6213
|
}
|
|
6194
|
-
},
|
|
6195
|
-
function
|
|
6196
|
-
|
|
6197
|
-
e(
|
|
6214
|
+
}, Ts = [], Es = { toasts: [] };
|
|
6215
|
+
function Ds(e) {
|
|
6216
|
+
Es = ws(Es, e), Ts.forEach((e) => {
|
|
6217
|
+
e(Es);
|
|
6198
6218
|
});
|
|
6199
6219
|
}
|
|
6200
|
-
function
|
|
6201
|
-
let t =
|
|
6220
|
+
function Os({ ...e }) {
|
|
6221
|
+
let t = xs(), n = (e) => Ds({
|
|
6202
6222
|
type: "UPDATE_TOAST",
|
|
6203
6223
|
toast: {
|
|
6204
6224
|
...e,
|
|
6205
6225
|
id: t
|
|
6206
6226
|
}
|
|
6207
|
-
}), r = () =>
|
|
6227
|
+
}), r = () => Ds({
|
|
6208
6228
|
type: "DISMISS_TOAST",
|
|
6209
6229
|
toastId: t
|
|
6210
6230
|
});
|
|
6211
|
-
return
|
|
6231
|
+
return Ds({
|
|
6212
6232
|
type: "ADD_TOAST",
|
|
6213
6233
|
toast: {
|
|
6214
6234
|
...e,
|
|
@@ -6224,15 +6244,15 @@ function ws({ ...e }) {
|
|
|
6224
6244
|
update: n
|
|
6225
6245
|
};
|
|
6226
6246
|
}
|
|
6227
|
-
function
|
|
6228
|
-
let [e, t] = m(
|
|
6229
|
-
return u(() => (
|
|
6230
|
-
let e =
|
|
6231
|
-
e > -1 &&
|
|
6247
|
+
function ks() {
|
|
6248
|
+
let [e, t] = m(Es);
|
|
6249
|
+
return u(() => (Ts.push(t), () => {
|
|
6250
|
+
let e = Ts.indexOf(t);
|
|
6251
|
+
e > -1 && Ts.splice(e, 1);
|
|
6232
6252
|
}), [e]), {
|
|
6233
6253
|
...e,
|
|
6234
|
-
toast:
|
|
6235
|
-
dismiss: (e) =>
|
|
6254
|
+
toast: Os,
|
|
6255
|
+
dismiss: (e) => Ds({
|
|
6236
6256
|
type: "DISMISS_TOAST",
|
|
6237
6257
|
toastId: e
|
|
6238
6258
|
})
|
|
@@ -6240,12 +6260,12 @@ function Ts() {
|
|
|
6240
6260
|
}
|
|
6241
6261
|
//#endregion
|
|
6242
6262
|
//#region src/components/toast/hooks/useWuShowToast.ts
|
|
6243
|
-
var
|
|
6263
|
+
var As = () => ({ showToast: ({ message: e, variant: t, duration: n, position: r }) => Os({
|
|
6244
6264
|
description: e,
|
|
6245
6265
|
variant: t,
|
|
6246
6266
|
duration: n,
|
|
6247
6267
|
position: r
|
|
6248
|
-
}) }),
|
|
6268
|
+
}) }), js = G.Provider, Ms = z("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container", {
|
|
6249
6269
|
variants: { position: {
|
|
6250
6270
|
topRight: "wu-right-0 wu-top-0",
|
|
6251
6271
|
top: "wu-top-0 wu-left-1/2 wu--translate-x-1/2",
|
|
@@ -6255,13 +6275,13 @@ var Es = () => ({ showToast: ({ message: e, variant: t, duration: n, position: r
|
|
|
6255
6275
|
bottomLeft: "wu-left-0 wu-bottom-0"
|
|
6256
6276
|
} },
|
|
6257
6277
|
defaultVariants: { position: "top" }
|
|
6258
|
-
}),
|
|
6278
|
+
}), Ns = t.forwardRef(({ className: e, position: t, ...n }, r) => /* @__PURE__ */ y(G.Viewport, {
|
|
6259
6279
|
ref: r,
|
|
6260
|
-
className: K(
|
|
6280
|
+
className: K(Ms({ position: t }), e),
|
|
6261
6281
|
...n
|
|
6262
6282
|
}));
|
|
6263
|
-
|
|
6264
|
-
var
|
|
6283
|
+
Ns.displayName = G.Viewport.displayName;
|
|
6284
|
+
var Ps = z("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80", {
|
|
6265
6285
|
variants: {
|
|
6266
6286
|
variant: {
|
|
6267
6287
|
default: "wu-border wu-bg-white wu-text-text",
|
|
@@ -6283,22 +6303,22 @@ var As = z("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative w
|
|
|
6283
6303
|
variant: "success",
|
|
6284
6304
|
position: "top"
|
|
6285
6305
|
}
|
|
6286
|
-
}),
|
|
6306
|
+
}), Fs = t.forwardRef(({ className: e, variant: t, position: n, ...r }, i) => /* @__PURE__ */ y(G.Root, {
|
|
6287
6307
|
ref: i,
|
|
6288
|
-
className: K(
|
|
6308
|
+
className: K(Ps({
|
|
6289
6309
|
variant: t,
|
|
6290
6310
|
position: n
|
|
6291
6311
|
}), e),
|
|
6292
6312
|
...r
|
|
6293
6313
|
}));
|
|
6294
|
-
|
|
6295
|
-
var
|
|
6314
|
+
Fs.displayName = G.Root.displayName;
|
|
6315
|
+
var Is = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(G.Action, {
|
|
6296
6316
|
ref: n,
|
|
6297
6317
|
className: K("wu-inline-flex wu-h-8 wu-shrink-0 wu-items-center wu-justify-center wu-border wu-bg-transparent wu-px-3 wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-secondary focus:wu-outline-none focus:wu-ring-2 focus:wu-ring-ring focus:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-50 group-[.destructive]:wu-border-muted/40 group-[.destructive]:hover:wu-border-destructive/30 group-[.destructive]:hover:wu-bg-destructive group-[.destructive]:hover:wu-text-destructive-foreground group-[.destructive]:focus:wu-ring-destructive", e),
|
|
6298
6318
|
...t
|
|
6299
6319
|
}));
|
|
6300
|
-
|
|
6301
|
-
var
|
|
6320
|
+
Is.displayName = G.Action.displayName;
|
|
6321
|
+
var Ls = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(G.Close, {
|
|
6302
6322
|
ref: n,
|
|
6303
6323
|
className: K("wu-relative wu-right-4 wu-bottom-2 wu-rounded-sm wu-w-4 wu-h-4 wu-p-1 wu-text-foreground/50 wu-opacity-100 wu-transition-opacity hover:wu-text-foreground focus:wu-opacity-100 focus:wu-outline-none group-hover:wu-opacity-100 group-[.destructive]:wu-text-red-300 group-[.destructive]:hover:wu-text-red-50 group-[.destructive]:focus:wu-ring-red-400 group-[.destructive]:focus:wu-ring-offset-red-600", e),
|
|
6304
6324
|
"toast-close": "",
|
|
@@ -6306,27 +6326,27 @@ var Ns = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(G.Close,
|
|
|
6306
6326
|
...t,
|
|
6307
6327
|
children: /* @__PURE__ */ y("span", { className: "wm-close wu-text-base" })
|
|
6308
6328
|
}));
|
|
6309
|
-
|
|
6310
|
-
var
|
|
6329
|
+
Ls.displayName = G.Close.displayName;
|
|
6330
|
+
var Rs = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(G.Title, {
|
|
6311
6331
|
ref: n,
|
|
6312
6332
|
className: K("wu-text-sm wu-font-semibold", e),
|
|
6313
6333
|
...t
|
|
6314
6334
|
}));
|
|
6315
|
-
|
|
6316
|
-
var
|
|
6335
|
+
Rs.displayName = G.Title.displayName;
|
|
6336
|
+
var zs = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(G.Description, {
|
|
6317
6337
|
ref: n,
|
|
6318
6338
|
className: K("wu-text-sm wu-opacity-90", e),
|
|
6319
6339
|
...t
|
|
6320
6340
|
}));
|
|
6321
|
-
|
|
6341
|
+
zs.displayName = G.Description.displayName;
|
|
6322
6342
|
//#endregion
|
|
6323
6343
|
//#region src/base/ui/toaster.tsx
|
|
6324
|
-
function
|
|
6325
|
-
let { toasts: e } =
|
|
6344
|
+
function Bs() {
|
|
6345
|
+
let { toasts: e } = ks(), t = e.reduce((e, t) => {
|
|
6326
6346
|
let n = t.position || "top";
|
|
6327
6347
|
return e[n] || (e[n] = []), e[n].push(t), e;
|
|
6328
6348
|
}, {});
|
|
6329
|
-
return /* @__PURE__ */ y(
|
|
6349
|
+
return /* @__PURE__ */ y(js, { children: Object.entries(t).map(([e, t]) => /* @__PURE__ */ y(Ns, {
|
|
6330
6350
|
position: e,
|
|
6331
6351
|
children: t.map(function({ id: e, title: t, description: n, action: r, variant: i, position: a, ...o }) {
|
|
6332
6352
|
let s = {
|
|
@@ -6335,14 +6355,14 @@ function Is() {
|
|
|
6335
6355
|
warning: "wm-error",
|
|
6336
6356
|
error: "wm-cancel"
|
|
6337
6357
|
};
|
|
6338
|
-
return /* @__PURE__ */ b(
|
|
6358
|
+
return /* @__PURE__ */ b(Fs, {
|
|
6339
6359
|
variant: i || "success",
|
|
6340
6360
|
position: a,
|
|
6341
6361
|
...o,
|
|
6342
6362
|
children: [
|
|
6343
6363
|
/* @__PURE__ */ b("div", {
|
|
6344
6364
|
className: "wu-grid wu-gap-1",
|
|
6345
|
-
children: [t && /* @__PURE__ */ y(
|
|
6365
|
+
children: [t && /* @__PURE__ */ y(Rs, { children: t }), n && /* @__PURE__ */ b(zs, {
|
|
6346
6366
|
className: "wu-flex wu-items-center wu-gap-3 wu-pr-6",
|
|
6347
6367
|
children: [/* @__PURE__ */ y(J, {
|
|
6348
6368
|
icon: s[i || "success"],
|
|
@@ -6351,7 +6371,7 @@ function Is() {
|
|
|
6351
6371
|
})]
|
|
6352
6372
|
}),
|
|
6353
6373
|
r,
|
|
6354
|
-
/* @__PURE__ */ y(
|
|
6374
|
+
/* @__PURE__ */ y(Ls, {})
|
|
6355
6375
|
]
|
|
6356
6376
|
}, e);
|
|
6357
6377
|
})
|
|
@@ -6359,24 +6379,24 @@ function Is() {
|
|
|
6359
6379
|
}
|
|
6360
6380
|
//#endregion
|
|
6361
6381
|
//#region src/components/toast/WuToast.tsx
|
|
6362
|
-
var
|
|
6382
|
+
var Vs = () => /* @__PURE__ */ y(Bs, {}), Hs = t.forwardRef(({ className: e, dir: t, ...n }, r) => /* @__PURE__ */ y(Ae.Root, {
|
|
6363
6383
|
className: K("wu-bg-gray-40 wu-inline-flex wu-h-2 wu-w-8 wu-shrink-0 wu-cursor-pointer wu-items-center wu-rounded-full wu-transition-colors focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[5px] focus-visible:wu-ring-offset-background disabled:wu-cursor-not-allowed disabled:wu-opacity-50 data-[state=unchecked]:wu-bg-gray-25 wu-group", "hover:wu-bg-gray-subtle hover:data-[state=unchecked]:wu-bg-gray-subtle", e),
|
|
6364
6384
|
...n,
|
|
6365
6385
|
ref: r,
|
|
6366
6386
|
children: /* @__PURE__ */ y(Ae.Thumb, { className: K("wu-block wu-h-4 wu-w-4 wu-rounded-full wu-bg-gray-subtle wu-shadow-lg wu-ring-0 wu-transition-all data-[state=checked]:wu-bg-blue-p", "group-hover:data-[state=unchecked]:wu-bg-gray-lead", t === "rtl" && "-wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0", t !== "rtl" && "wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0", "wu-toggle-thumb") })
|
|
6367
6387
|
}));
|
|
6368
|
-
|
|
6388
|
+
Hs.displayName = Ae.Root.displayName;
|
|
6369
6389
|
//#endregion
|
|
6370
6390
|
//#region src/components/toggle/WuToggle.tsx
|
|
6371
|
-
var
|
|
6391
|
+
var Us = n.forwardRef((e, t) => {
|
|
6372
6392
|
let { Label: r, labelPosition: i = "right", onChange: a, className: o, dir: s, disabled: c, id: l = Ne(), ...u } = e;
|
|
6373
6393
|
return n.useEffect(() => {
|
|
6374
6394
|
let { checked: e, defaultChecked: t } = u;
|
|
6375
6395
|
e !== void 0 && t !== void 0 && console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.");
|
|
6376
6396
|
}, [u.checked, u.defaultChecked]), /* @__PURE__ */ b("div", {
|
|
6377
|
-
className: K(
|
|
6397
|
+
className: K(Ws({ labelPosition: i }), "wu-toggle-container"),
|
|
6378
6398
|
dir: s,
|
|
6379
|
-
children: [/* @__PURE__ */ y(
|
|
6399
|
+
children: [/* @__PURE__ */ y(Hs, {
|
|
6380
6400
|
...u,
|
|
6381
6401
|
id: l,
|
|
6382
6402
|
disabled: c,
|
|
@@ -6391,20 +6411,20 @@ var zs = n.forwardRef((e, t) => {
|
|
|
6391
6411
|
})]
|
|
6392
6412
|
});
|
|
6393
6413
|
});
|
|
6394
|
-
|
|
6395
|
-
var
|
|
6414
|
+
Us.displayName = "WuToggle";
|
|
6415
|
+
var Ws = z("wu-flex wu-items-center wu-gap-3 wu-w-fit", { variants: { labelPosition: {
|
|
6396
6416
|
right: "wu-flex-row",
|
|
6397
6417
|
left: "wu-flex-row-reverse",
|
|
6398
6418
|
top: "wu-flex-col-reverse wu-items-baseline"
|
|
6399
|
-
} } }),
|
|
6400
|
-
let e = l(
|
|
6419
|
+
} } }), Gs = r(null), Ks = () => {
|
|
6420
|
+
let e = l(Gs);
|
|
6401
6421
|
if (!e) throw Error("useTranslation must be used within a WuTranslationProvider");
|
|
6402
6422
|
return e.useTranslation();
|
|
6403
|
-
},
|
|
6404
|
-
let e = l(
|
|
6423
|
+
}, qs = () => {
|
|
6424
|
+
let e = l(Gs);
|
|
6405
6425
|
if (!e) throw Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");
|
|
6406
6426
|
return e;
|
|
6407
|
-
},
|
|
6427
|
+
}, Js = ({ children: e }) => {
|
|
6408
6428
|
let [t, n] = m({}), [r, i] = m({}), a = {
|
|
6409
6429
|
loadTranslations: s(async (e, t) => {
|
|
6410
6430
|
try {
|
|
@@ -6419,15 +6439,50 @@ var Bs = z("wu-flex wu-items-center wu-gap-3 wu-w-fit", { variants: { labelPosit
|
|
|
6419
6439
|
}, []),
|
|
6420
6440
|
useTranslation: s(() => ({ t: (e, n) => t[e] ? t[e] : r[e] ? r[e] : n || e }), [t, r])
|
|
6421
6441
|
};
|
|
6422
|
-
return /* @__PURE__ */ y(
|
|
6442
|
+
return /* @__PURE__ */ y(Gs.Provider, {
|
|
6423
6443
|
value: a,
|
|
6424
6444
|
children: e
|
|
6425
6445
|
});
|
|
6426
|
-
},
|
|
6427
|
-
|
|
6428
|
-
},
|
|
6429
|
-
|
|
6430
|
-
},
|
|
6446
|
+
}, Ys = {}, Xs = !1, Zs = "", Qs = (e) => {
|
|
6447
|
+
Ys = e;
|
|
6448
|
+
}, $s = (e, t) => {
|
|
6449
|
+
Xs = e, Zs = t;
|
|
6450
|
+
}, ec = (e) => Ys[e] ?? e, tc = () => Xs, nc = () => Zs, rc = "wick-ui-i18n-cache::", ic = 3600 * 1e3, ac = (e, t) => `${rc}${e}::${t}`;
|
|
6451
|
+
function oc(e, t, n = ic) {
|
|
6452
|
+
try {
|
|
6453
|
+
let r = localStorage.getItem(ac(e, t));
|
|
6454
|
+
if (!r) return null;
|
|
6455
|
+
let i = JSON.parse(r);
|
|
6456
|
+
return Date.now() - i.ts > n ? (localStorage.removeItem(ac(e, t)), null) : i;
|
|
6457
|
+
} catch {
|
|
6458
|
+
return null;
|
|
6459
|
+
}
|
|
6460
|
+
}
|
|
6461
|
+
function sc(e, t, n, r, i) {
|
|
6462
|
+
try {
|
|
6463
|
+
let a = {
|
|
6464
|
+
data: n,
|
|
6465
|
+
isRtl: r,
|
|
6466
|
+
characterSet: i,
|
|
6467
|
+
ts: Date.now()
|
|
6468
|
+
};
|
|
6469
|
+
localStorage.setItem(ac(e, t), JSON.stringify(a));
|
|
6470
|
+
} catch {}
|
|
6471
|
+
}
|
|
6472
|
+
function cc(e, t, n) {
|
|
6473
|
+
try {
|
|
6474
|
+
let r = localStorage.getItem(ac(e, t));
|
|
6475
|
+
if (!r) return;
|
|
6476
|
+
let i = JSON.parse(r);
|
|
6477
|
+
i.data = {
|
|
6478
|
+
...i.data,
|
|
6479
|
+
...n
|
|
6480
|
+
}, localStorage.setItem(ac(e, t), JSON.stringify(i));
|
|
6481
|
+
} catch {}
|
|
6482
|
+
}
|
|
6483
|
+
//#endregion
|
|
6484
|
+
//#region src/translate/WuTranslateContext.tsx
|
|
6485
|
+
var lc = r({
|
|
6431
6486
|
dictionary: {},
|
|
6432
6487
|
locale: "en",
|
|
6433
6488
|
setLocale: () => {},
|
|
@@ -6436,95 +6491,101 @@ var Bs = z("wu-flex wu-items-center wu-gap-3 wu-w-fit", { variants: { labelPosit
|
|
|
6436
6491
|
isRtl: !1,
|
|
6437
6492
|
characterSet: "",
|
|
6438
6493
|
addExtraKeys: () => {}
|
|
6439
|
-
}),
|
|
6440
|
-
let { dictionary: e } =
|
|
6494
|
+
}), uc = () => l(lc), dc = () => {
|
|
6495
|
+
let { dictionary: e } = uc();
|
|
6441
6496
|
return s((t) => e[t] ?? t, [e]);
|
|
6442
|
-
},
|
|
6443
|
-
function
|
|
6497
|
+
}, fc = (e) => e.name === "AbortError";
|
|
6498
|
+
function pc(e) {
|
|
6444
6499
|
let t = document.createElement("textarea");
|
|
6445
6500
|
return t.innerHTML = e, t.value;
|
|
6446
6501
|
}
|
|
6447
|
-
function
|
|
6448
|
-
return Object.fromEntries(Object.entries(e).map(([e, t]) => [e,
|
|
6502
|
+
function mc(e) {
|
|
6503
|
+
return Object.fromEntries(Object.entries(e).map(([e, t]) => [e, pc(t)]));
|
|
6449
6504
|
}
|
|
6450
|
-
var
|
|
6451
|
-
let [
|
|
6452
|
-
|
|
6505
|
+
var hc = ({ children: e, defaultLocale: t = "en", baseApi: n = "https://admin2.questionpro.com/cs/api/gad/translate", keys: r = "/wick-ui-i18n.json", cacheTtlMs: i = ic }) => {
|
|
6506
|
+
let [a, o] = m(t), [c, l] = m({}), [d, h] = m(/* @__PURE__ */ new Set()), [g, _] = m(!0), [v, b] = m(!1), [x, S] = m(!1), [C, w] = m(""), T = p(!1), E = p(null), D = p(/* @__PURE__ */ new Set()), O = p({}), k = s((e) => {
|
|
6507
|
+
T.current = !0, o(e);
|
|
6453
6508
|
}, []);
|
|
6454
6509
|
u(() => {
|
|
6455
|
-
|
|
6510
|
+
T.current || o(t);
|
|
6456
6511
|
}, [t]), u(() => {
|
|
6457
|
-
|
|
6458
|
-
}, [
|
|
6512
|
+
D.current = d;
|
|
6513
|
+
}, [d]), u(() => {
|
|
6459
6514
|
let e = new AbortController(), t = (e, t, n) => {
|
|
6460
|
-
let r =
|
|
6461
|
-
|
|
6515
|
+
let r = mc(e);
|
|
6516
|
+
O.current = r, Qs(r), $s(t, n), l(r), S(t), w(n);
|
|
6462
6517
|
};
|
|
6463
6518
|
return (async () => {
|
|
6464
|
-
|
|
6519
|
+
_(!0);
|
|
6520
|
+
let o = oc(r, a, i);
|
|
6521
|
+
if (o) {
|
|
6522
|
+
t(o.data, o.isRtl, o.characterSet), _(!1);
|
|
6523
|
+
return;
|
|
6524
|
+
}
|
|
6465
6525
|
try {
|
|
6466
|
-
if (!
|
|
6526
|
+
if (!E.current || E.current.url !== r) {
|
|
6467
6527
|
let t = await fetch(r, { signal: e.signal });
|
|
6468
6528
|
if (!t.ok) throw Error("Failed to fetch translation keys");
|
|
6469
|
-
|
|
6529
|
+
E.current = {
|
|
6470
6530
|
url: r,
|
|
6471
6531
|
data: await t.json()
|
|
6472
6532
|
};
|
|
6473
6533
|
}
|
|
6474
|
-
let
|
|
6475
|
-
...
|
|
6476
|
-
...
|
|
6534
|
+
let i = Object.fromEntries([...D.current].map((e) => [e, e])), o = {
|
|
6535
|
+
...E.current.data,
|
|
6536
|
+
...i
|
|
6477
6537
|
};
|
|
6478
|
-
if (
|
|
6479
|
-
t(o, !1, "");
|
|
6538
|
+
if (a === "en") {
|
|
6539
|
+
t(o, !1, ""), sc(r, a, o, !1, "");
|
|
6480
6540
|
return;
|
|
6481
6541
|
}
|
|
6482
6542
|
try {
|
|
6483
|
-
let
|
|
6543
|
+
let i = await fetch(n, {
|
|
6484
6544
|
method: "POST",
|
|
6485
6545
|
headers: { "Content-Type": "application/json" },
|
|
6486
6546
|
body: JSON.stringify({
|
|
6487
6547
|
keys: o,
|
|
6488
|
-
code:
|
|
6548
|
+
code: a
|
|
6489
6549
|
}),
|
|
6490
6550
|
signal: e.signal
|
|
6491
6551
|
});
|
|
6492
|
-
if (!
|
|
6493
|
-
let { data:
|
|
6494
|
-
t(
|
|
6552
|
+
if (!i.ok) throw Error("Failed to fetch translations");
|
|
6553
|
+
let { data: s } = await i.json();
|
|
6554
|
+
t(s.data, s.isRtl ?? !1, s.characterSet ?? ""), sc(r, a, s.data, s.isRtl ?? !1, s.characterSet ?? "");
|
|
6495
6555
|
} catch (e) {
|
|
6496
|
-
if (
|
|
6556
|
+
if (fc(e)) return;
|
|
6497
6557
|
console.error("[WuTranslateProvider] Translation fetch failed:", e), t(o, !1, "");
|
|
6498
6558
|
}
|
|
6499
6559
|
} catch (e) {
|
|
6500
|
-
if (
|
|
6560
|
+
if (fc(e)) return;
|
|
6501
6561
|
console.error("[WuTranslateProvider] Keys fetch failed:", e), t({}, !1, "");
|
|
6502
6562
|
} finally {
|
|
6503
|
-
e.signal.aborted ||
|
|
6563
|
+
e.signal.aborted || _(!1);
|
|
6504
6564
|
}
|
|
6505
6565
|
})(), () => {
|
|
6506
6566
|
e.abort();
|
|
6507
6567
|
};
|
|
6508
6568
|
}, [
|
|
6509
|
-
|
|
6569
|
+
a,
|
|
6510
6570
|
n,
|
|
6511
|
-
r
|
|
6571
|
+
r,
|
|
6572
|
+
i
|
|
6512
6573
|
]), u(() => {
|
|
6513
|
-
let e = [...
|
|
6574
|
+
let e = [...d].filter((e) => !(e in O.current));
|
|
6514
6575
|
if (e.length === 0) return;
|
|
6515
|
-
let t = Object.fromEntries(e.map((e) => [e, e])),
|
|
6516
|
-
let t =
|
|
6517
|
-
...
|
|
6576
|
+
let t = Object.fromEntries(e.map((e) => [e, e])), i = (e) => {
|
|
6577
|
+
let t = mc(e), n = {
|
|
6578
|
+
...O.current,
|
|
6518
6579
|
...t
|
|
6519
6580
|
};
|
|
6520
|
-
|
|
6581
|
+
O.current = n, Qs(n), l(n);
|
|
6521
6582
|
};
|
|
6522
|
-
if (
|
|
6523
|
-
|
|
6583
|
+
if (a === "en") {
|
|
6584
|
+
i(t), cc(r, a, t);
|
|
6524
6585
|
return;
|
|
6525
6586
|
}
|
|
6526
|
-
|
|
6527
|
-
let
|
|
6587
|
+
b(!0);
|
|
6588
|
+
let o = new AbortController();
|
|
6528
6589
|
return (async () => {
|
|
6529
6590
|
try {
|
|
6530
6591
|
let e = await fetch(n, {
|
|
@@ -6532,57 +6593,58 @@ var ac = ({ children: e, defaultLocale: t = "en", baseApi: n = "https://admin2.q
|
|
|
6532
6593
|
headers: { "Content-Type": "application/json" },
|
|
6533
6594
|
body: JSON.stringify({
|
|
6534
6595
|
keys: t,
|
|
6535
|
-
code:
|
|
6596
|
+
code: a
|
|
6536
6597
|
}),
|
|
6537
|
-
signal:
|
|
6598
|
+
signal: o.signal
|
|
6538
6599
|
});
|
|
6539
6600
|
if (!e.ok) throw Error("Failed to fetch dynamic translations");
|
|
6540
|
-
let { data:
|
|
6541
|
-
|
|
6601
|
+
let { data: s } = await e.json();
|
|
6602
|
+
i(s.data), cc(r, a, s.data);
|
|
6542
6603
|
} catch (e) {
|
|
6543
|
-
|
|
6604
|
+
fc(e) || (console.error("[WuTranslateProvider] Dynamic translation fetch failed:", e), i(t));
|
|
6544
6605
|
} finally {
|
|
6545
|
-
|
|
6606
|
+
o.signal.aborted || b(!1);
|
|
6546
6607
|
}
|
|
6547
6608
|
})(), () => {
|
|
6548
|
-
|
|
6609
|
+
o.abort();
|
|
6549
6610
|
};
|
|
6550
6611
|
}, [
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
n
|
|
6612
|
+
d,
|
|
6613
|
+
a,
|
|
6614
|
+
n,
|
|
6615
|
+
r
|
|
6554
6616
|
]);
|
|
6555
|
-
let
|
|
6556
|
-
|
|
6557
|
-
}, []),
|
|
6558
|
-
dictionary:
|
|
6559
|
-
locale:
|
|
6560
|
-
setLocale:
|
|
6561
|
-
isLoading:
|
|
6562
|
-
deltaLoading:
|
|
6563
|
-
isRtl:
|
|
6564
|
-
characterSet:
|
|
6565
|
-
addExtraKeys:
|
|
6617
|
+
let A = s((e) => {
|
|
6618
|
+
h((t) => e.every((e) => t.has(e)) ? t : new Set([...t, ...e]));
|
|
6619
|
+
}, []), j = f(() => ({
|
|
6620
|
+
dictionary: c,
|
|
6621
|
+
locale: a,
|
|
6622
|
+
setLocale: k,
|
|
6623
|
+
isLoading: g,
|
|
6624
|
+
deltaLoading: v,
|
|
6625
|
+
isRtl: x,
|
|
6626
|
+
characterSet: C,
|
|
6627
|
+
addExtraKeys: A
|
|
6566
6628
|
}), [
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6629
|
+
c,
|
|
6630
|
+
a,
|
|
6631
|
+
g,
|
|
6632
|
+
v,
|
|
6633
|
+
k,
|
|
6634
|
+
x,
|
|
6635
|
+
C,
|
|
6636
|
+
A
|
|
6575
6637
|
]);
|
|
6576
|
-
return /* @__PURE__ */ y(
|
|
6577
|
-
value:
|
|
6638
|
+
return /* @__PURE__ */ y(lc.Provider, {
|
|
6639
|
+
value: j,
|
|
6578
6640
|
children: e
|
|
6579
6641
|
});
|
|
6580
|
-
},
|
|
6581
|
-
let { dictionary: t } =
|
|
6642
|
+
}, gc = n.memo(({ __i18nKey: e }) => {
|
|
6643
|
+
let { dictionary: t } = uc();
|
|
6582
6644
|
return /* @__PURE__ */ y(v, { children: t[e] ?? e });
|
|
6583
6645
|
});
|
|
6584
6646
|
//#endregion
|
|
6585
6647
|
//#region src/index.ts
|
|
6586
|
-
|
|
6648
|
+
gc.displayName = "WuTranslate", typeof window < "u" && (window.wickUiVersion = "2.0.1", console.log("%c\n $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$\n$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n", "color:#1B87E6"), console.log("%cšØ STOP!%c\nThis is a browser feature for developers only.\nIf someone told you to paste something here ā %cit's a scam.%c\nThey could steal your account, your data, and more.\n\nš Never paste code you don't understand here.", "color:#e53935;font-size:32px;font-weight:900", "color:#212121;font-size:14px", "color:#e53935;font-size:14px;font-weight:700", "color:#212121;font-size:14px"));
|
|
6587
6649
|
//#endregion
|
|
6588
|
-
export { Be as WuAccordion, Ke as WuActivityLog, Nt as WuAppHeader, it as WuAppHeaderAccount, Tt as WuAppHeaderBar, at as WuAppHeaderHelp, wt as WuAppHeaderMenu, Et as WuAppHeaderSearch, $e as WuButton, Ht as WuCalendar, Ln as WuCard, zn as WuCardFooter, Rn as WuCardHeader, Q as WuCheckbox, Vn as WuChip,
|
|
6650
|
+
export { Be as WuAccordion, Ke as WuActivityLog, Nt as WuAppHeader, it as WuAppHeaderAccount, Tt as WuAppHeaderBar, at as WuAppHeaderHelp, wt as WuAppHeaderMenu, Et as WuAppHeaderSearch, $e as WuButton, Ht as WuCalendar, Ln as WuCard, zn as WuCardFooter, Rn as WuCardHeader, Q as WuCheckbox, Vn as WuChip, pr as WuCombobox, mr as WuCopyToClipboard, ts as WuDataTable, Zt as WuDatePicker, In as WuDateRangePicker, ft as WuDisplay, kr as WuDrawer, Ar as WuDrawerClose, Gr as WuDrilldown, Zr as WuFooter, qt as WuFormGroup, ut as WuHeading, Qr as WuHelpButton, J as WuIcon, Wn as WuInput, Ut as WuInputError, Wt as WuInputHint, Z as WuLabel, si as WuListbox, Ze as WuLoader, Br as WuMenu, jr as WuMenuCheckboxItem, ci as WuMenuIcon, Mr as WuMenuItem, Nr as WuMenuItemGroup, Pr as WuMenuRadioItem, Fr as WuMenuSeparatorItem, Ti as WuModal, ki as WuModalClose, Ei as WuModalContent, Oi as WuModalFooter, Di as WuModalHeader, ji as WuMonthPicker, ht as WuNumber, Ri as WuPagination, Bi as WuPopover, Vi as WuPopoverClose, Fi as WuPrimaryNavbar, Wi as WuRadioGroup, Gi as WuScrollArea, Li as WuSecondaryNavbar, Yi as WuSegmentedSelector, Xi as WuSegmentedSelectorItem, Tn as WuSelect, Za as WuSharedSurvey, Pa as WuSidebar, Va as WuSidebarCollapsibleMenu, Ia as WuSidebarContent, La as WuSidebarFooter, Ra as WuSidebarGroup, Ba as WuSidebarItem, za as WuSidebarMenu, Fa as WuSidebarTrigger, ui as WuSpotlight, Ka as WuStackedCard, qa as WuStackedCardOverlay, Ya as WuStepper, Rr as WuSubMenu, dt as WuSubtext, $a as WuSurveyItem, eo as WuSurveyList, ro as WuSurveySelect, no as WuSurveySource, po as WuSwitcher, wo as WuTab, ns as WuTable, lt as WuText, is as WuTextarea, _s as WuTimePicker, Vs as WuToast, Us as WuToggle, jt as WuTooltip, gc as WuTranslate, hc as WuTranslateProvider, Gs as WuTranslationContext, Js as WuTranslationProvider, Mt as WuTruncatedLabel, Qt as WuVirtualScroll, Wa as calculatePosition, c as useContext, Ks as useTranslation, qs as useTranslationsContext, uc as useWickuiTranslate, dc as useWt, As as useWuShowToast, la as useWuSidebar, ec as wt, nc as wtCharacterSet, tc as wtIsRtl };
|