@jinaan/uikit 0.1.14 → 0.1.16
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/dialog.d.ts.map +1 -1
- package/dist/index.js +79 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data-table.tsx +1 -1
- package/src/dialog.tsx +4 -1
- package/src/table-surface.tsx +1 -1
- package/styles.css +1 -1
package/dist/dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../src/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAQL,KAAK,wBAAwB,EAE7B,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAuEpD,qEAAqE;AACrE,wBAAgB,MAAM,CAAC,EACrB,IAAI,EAAE,cAAc,EACpB,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,+
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../src/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAQL,KAAK,wBAAwB,EAE7B,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAuEpD,qEAAqE;AACrE,wBAAgB,MAAM,CAAC,EACrB,IAAI,EAAE,cAAc,EACpB,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,+BA6EvD;AAED,eAAO,MAAM,aAAa,kMAYxB,CAAC;AAGH,eAAO,MAAM,WAAW,gIAAwB,CAAC;AAEjD,2EAA2E;AAC3E,eAAO,MAAM,YAAY,2GAQxB,CAAC;AAyDF,eAAO,MAAM,aAAa,4LAsExB,CAAC;AAGH;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,+BAWhC;AAED,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,+BAQhC;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,+BAWhC;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,+BAWhC;AAED,eAAO,MAAM,WAAW,kMAStB,CAAC;AAGH,eAAO,MAAM,iBAAiB,4MAS5B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as ye } from "react/jsx-runtime";
|
|
2
2
|
import { CircleNotch as wt, Robot as Ct, Terminal as St, Check as X, Copy as Fe, XCircle as zt, Warning as kt, CheckCircle as Dt, Info as Tt, Minus as Mt, X as le, CaretRight as Pt, CaretDown as ee, MagnifyingGlass as It, Columns as Et, Lock as _t, FunnelSimple as Ee, WarningCircle as jt, CaretUp as Lt, CaretUpDown as Rt } from "@phosphor-icons/react";
|
|
3
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as p, useState as T, Children as $e, isValidElement as qe, useRef as te, useEffect as V, useContext as ie, useCallback as At, createContext as se, useId as de, useMemo as _e } from "react";
|
|
4
4
|
import { Slot as Bt } from "@radix-ui/react-slot";
|
|
5
5
|
import { cva as we } from "class-variance-authority";
|
|
6
6
|
import { clsx as Ft } from "clsx";
|
|
@@ -59,7 +59,7 @@ const Vt = we(
|
|
|
59
59
|
lg: "[&_svg]:size-[var(--control-icon-lg)]",
|
|
60
60
|
xl: "[&_svg]:size-[var(--control-icon-xl)]",
|
|
61
61
|
icon: "[&_svg]:size-[var(--control-icon-md)]"
|
|
62
|
-
}, z =
|
|
62
|
+
}, z = p(
|
|
63
63
|
({
|
|
64
64
|
className: t,
|
|
65
65
|
variant: a,
|
|
@@ -71,7 +71,7 @@ const Vt = we(
|
|
|
71
71
|
loading: u = !1,
|
|
72
72
|
fullWidth: h = !1,
|
|
73
73
|
disabled: g,
|
|
74
|
-
children:
|
|
74
|
+
children: b,
|
|
75
75
|
...N
|
|
76
76
|
}, k) => {
|
|
77
77
|
const S = l ? Bt : "button", w = Ut[r ?? "md"];
|
|
@@ -88,9 +88,9 @@ const Vt = we(
|
|
|
88
88
|
t
|
|
89
89
|
),
|
|
90
90
|
...N,
|
|
91
|
-
children: l ?
|
|
91
|
+
children: l ? b : /* @__PURE__ */ s(ye, { children: [
|
|
92
92
|
u ? /* @__PURE__ */ e(Ht, { className: o("text-current", w), "aria-hidden": !0 }) : i ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", w), "aria-hidden": !0, children: i }) : null,
|
|
93
|
-
|
|
93
|
+
b,
|
|
94
94
|
!u && d ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", w), "aria-hidden": !0, children: d }) : null
|
|
95
95
|
] })
|
|
96
96
|
}
|
|
@@ -133,7 +133,7 @@ function qa({
|
|
|
133
133
|
] })
|
|
134
134
|
] });
|
|
135
135
|
}
|
|
136
|
-
const Ge =
|
|
136
|
+
const Ge = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
137
137
|
Ce.Root,
|
|
138
138
|
{
|
|
139
139
|
ref: r,
|
|
@@ -145,7 +145,7 @@ const Ge = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
145
145
|
}
|
|
146
146
|
));
|
|
147
147
|
Ge.displayName = "Avatar";
|
|
148
|
-
const He =
|
|
148
|
+
const He = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
149
149
|
Ce.Image,
|
|
150
150
|
{
|
|
151
151
|
ref: r,
|
|
@@ -154,7 +154,7 @@ const He = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
154
154
|
}
|
|
155
155
|
));
|
|
156
156
|
He.displayName = "AvatarImage";
|
|
157
|
-
const Ve =
|
|
157
|
+
const Ve = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
158
158
|
Ce.Fallback,
|
|
159
159
|
{
|
|
160
160
|
ref: r,
|
|
@@ -357,7 +357,7 @@ function ce({
|
|
|
357
357
|
panelClassName: h,
|
|
358
358
|
minHeight: g
|
|
359
359
|
}) {
|
|
360
|
-
const
|
|
360
|
+
const b = !!(t || a), N = aa(i) ? /* @__PURE__ */ e(
|
|
361
361
|
z,
|
|
362
362
|
{
|
|
363
363
|
variant: i.variant ?? "primary",
|
|
@@ -374,10 +374,10 @@ function ce({
|
|
|
374
374
|
) : i;
|
|
375
375
|
return /* @__PURE__ */ s(Yt, { className: o("relative", ea[d], c), children: [
|
|
376
376
|
/* @__PURE__ */ s("div", { className: "overflow-x-auto", children: [
|
|
377
|
-
r ||
|
|
377
|
+
r || b ? (
|
|
378
378
|
// Header rows must not inherit the body row hover surface.
|
|
379
|
-
/* @__PURE__ */ s("div", { className: o("[--table-row-hover:transparent]", u), children: [
|
|
380
|
-
|
|
379
|
+
/* @__PURE__ */ s("div", { className: o("[--table-row-hover:transparent] text-table-header", u), children: [
|
|
380
|
+
b ? /* @__PURE__ */ s(
|
|
381
381
|
"div",
|
|
382
382
|
{
|
|
383
383
|
className: o(
|
|
@@ -414,14 +414,14 @@ function ra(t) {
|
|
|
414
414
|
body: a.filter((l) => !r.includes(l))
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
const na =
|
|
417
|
+
const na = p(
|
|
418
418
|
({ className: t, children: a, ...r }, l) => {
|
|
419
419
|
const { header: i, body: d } = ra(a);
|
|
420
420
|
return /* @__PURE__ */ e("div", { ref: l, ...r, children: /* @__PURE__ */ e(ce, { className: o("shadow-xs", t), header: i, children: d }) });
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
423
|
na.displayName = "Card";
|
|
424
|
-
const Ue =
|
|
424
|
+
const Ue = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
425
425
|
"div",
|
|
426
426
|
{
|
|
427
427
|
ref: r,
|
|
@@ -433,7 +433,7 @@ const Ue = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
433
433
|
}
|
|
434
434
|
));
|
|
435
435
|
Ue.displayName = "CardHeader";
|
|
436
|
-
const la =
|
|
436
|
+
const la = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
437
437
|
"h2",
|
|
438
438
|
{
|
|
439
439
|
ref: r,
|
|
@@ -442,7 +442,7 @@ const la = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
442
442
|
}
|
|
443
443
|
));
|
|
444
444
|
la.displayName = "CardTitle";
|
|
445
|
-
const ia =
|
|
445
|
+
const ia = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
446
446
|
"p",
|
|
447
447
|
{
|
|
448
448
|
ref: r,
|
|
@@ -455,9 +455,9 @@ const ia = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
455
455
|
}
|
|
456
456
|
));
|
|
457
457
|
ia.displayName = "CardDescription";
|
|
458
|
-
const oa =
|
|
458
|
+
const oa = p(({ className: t, ...a }, r) => /* @__PURE__ */ e("div", { ref: r, className: o("px-5 py-4", t), ...a }));
|
|
459
459
|
oa.displayName = "CardContent";
|
|
460
|
-
const sa =
|
|
460
|
+
const sa = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
461
461
|
"div",
|
|
462
462
|
{
|
|
463
463
|
ref: r,
|
|
@@ -469,7 +469,7 @@ const sa = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
469
469
|
}
|
|
470
470
|
));
|
|
471
471
|
sa.displayName = "CardFooter";
|
|
472
|
-
const xe =
|
|
472
|
+
const xe = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
473
473
|
je.Root,
|
|
474
474
|
{
|
|
475
475
|
ref: r,
|
|
@@ -542,7 +542,7 @@ function ua(t) {
|
|
|
542
542
|
}
|
|
543
543
|
const ma = 250, Xe = se(!1), Je = se(() => {
|
|
544
544
|
});
|
|
545
|
-
function
|
|
545
|
+
function ba({
|
|
546
546
|
open: t,
|
|
547
547
|
defaultOpen: a,
|
|
548
548
|
onOpenChange: r,
|
|
@@ -551,20 +551,20 @@ function pa({
|
|
|
551
551
|
}) {
|
|
552
552
|
const [d, c] = T(
|
|
553
553
|
a ?? !1
|
|
554
|
-
), [u, h] = T(!1), g = te(!1),
|
|
554
|
+
), [u, h] = T(!1), g = te(!1), b = te(null), N = t ?? d, k = te(N);
|
|
555
555
|
k.current = N;
|
|
556
556
|
const S = t !== void 0;
|
|
557
557
|
V(() => ca(), []), V(() => {
|
|
558
|
-
t && h(!1);
|
|
558
|
+
t && (b.current && clearTimeout(b.current), g.current = !1, h(!1));
|
|
559
559
|
}, [t]), V(
|
|
560
560
|
() => () => {
|
|
561
|
-
|
|
561
|
+
b.current && clearTimeout(b.current);
|
|
562
562
|
},
|
|
563
563
|
[]
|
|
564
564
|
);
|
|
565
565
|
const w = (I) => {
|
|
566
566
|
if (I) {
|
|
567
|
-
|
|
567
|
+
b.current && clearTimeout(b.current), g.current = !1, h(!1), S || c(!0), r == null || r(!0);
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
570
570
|
if (!N || g.current) return;
|
|
@@ -572,7 +572,7 @@ function pa({
|
|
|
572
572
|
S || c(!1), r == null || r(!1);
|
|
573
573
|
return;
|
|
574
574
|
}
|
|
575
|
-
g.current = !0, h(!0),
|
|
575
|
+
g.current = !0, h(!0), b.current = setTimeout(() => {
|
|
576
576
|
S || c(!1), r == null || r(!1), requestAnimationFrame(() => {
|
|
577
577
|
k.current && (g.current = !1, h(!1));
|
|
578
578
|
});
|
|
@@ -588,7 +588,7 @@ function pa({
|
|
|
588
588
|
}
|
|
589
589
|
) }) });
|
|
590
590
|
}
|
|
591
|
-
const Qe =
|
|
591
|
+
const Qe = p(({ onClick: t, ...a }, r) => /* @__PURE__ */ e(
|
|
592
592
|
M.Trigger,
|
|
593
593
|
{
|
|
594
594
|
ref: r,
|
|
@@ -599,7 +599,7 @@ const Qe = b(({ onClick: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
599
599
|
}
|
|
600
600
|
));
|
|
601
601
|
Qe.displayName = "DialogTrigger";
|
|
602
|
-
const Wa = M.Close, Ye =
|
|
602
|
+
const Wa = M.Close, Ye = p(
|
|
603
603
|
({ variant: t = "secondary", children: a = "Cancel", ...r }, l) => /* @__PURE__ */ e(M.Close, { asChild: !0, children: /* @__PURE__ */ e(z, { ref: l, type: "button", variant: t, ...r, children: a }) })
|
|
604
604
|
);
|
|
605
605
|
Ye.displayName = "DialogCancel";
|
|
@@ -621,14 +621,14 @@ function Ze(t, a = !0) {
|
|
|
621
621
|
};
|
|
622
622
|
t.addEventListener("animationend", c);
|
|
623
623
|
}
|
|
624
|
-
const Oe =
|
|
624
|
+
const Oe = p(({ className: t, children: a, onEscapeKeyDown: r, onPointerDownOutside: l, ...i }, d) => {
|
|
625
625
|
const c = ie(Xe), u = ie(Je), h = te(null), g = At(
|
|
626
|
-
(
|
|
627
|
-
if (h.current =
|
|
628
|
-
d(
|
|
626
|
+
(b) => {
|
|
627
|
+
if (h.current = b, b && Ze(b), typeof d == "function") {
|
|
628
|
+
d(b);
|
|
629
629
|
return;
|
|
630
630
|
}
|
|
631
|
-
d && (d.current =
|
|
631
|
+
d && (d.current = b);
|
|
632
632
|
},
|
|
633
633
|
[d]
|
|
634
634
|
);
|
|
@@ -661,11 +661,11 @@ const Oe = b(({ className: t, children: a, onEscapeKeyDown: r, onPointerDownOuts
|
|
|
661
661
|
"focus:outline-none",
|
|
662
662
|
t
|
|
663
663
|
),
|
|
664
|
-
onEscapeKeyDown: (
|
|
665
|
-
r == null || r(
|
|
664
|
+
onEscapeKeyDown: (b) => {
|
|
665
|
+
r == null || r(b), !b.defaultPrevented && (b.preventDefault(), u());
|
|
666
666
|
},
|
|
667
|
-
onPointerDownOutside: (
|
|
668
|
-
l == null || l(
|
|
667
|
+
onPointerDownOutside: (b) => {
|
|
668
|
+
l == null || l(b), !b.defaultPrevented && (b.preventDefault(), u());
|
|
669
669
|
},
|
|
670
670
|
...i,
|
|
671
671
|
children: [
|
|
@@ -680,7 +680,7 @@ const Oe = b(({ className: t, children: a, onEscapeKeyDown: r, onPointerDownOuts
|
|
|
680
680
|
] });
|
|
681
681
|
});
|
|
682
682
|
Oe.displayName = "DialogContent";
|
|
683
|
-
function
|
|
683
|
+
function pa({
|
|
684
684
|
className: t,
|
|
685
685
|
...a
|
|
686
686
|
}) {
|
|
@@ -741,7 +741,7 @@ function ga({
|
|
|
741
741
|
}
|
|
742
742
|
);
|
|
743
743
|
}
|
|
744
|
-
const Ke =
|
|
744
|
+
const Ke = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
745
745
|
M.Title,
|
|
746
746
|
{
|
|
747
747
|
ref: r,
|
|
@@ -750,7 +750,7 @@ const Ke = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
750
750
|
}
|
|
751
751
|
));
|
|
752
752
|
Ke.displayName = "DialogTitle";
|
|
753
|
-
const xa =
|
|
753
|
+
const xa = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
754
754
|
M.Description,
|
|
755
755
|
{
|
|
756
756
|
ref: r,
|
|
@@ -806,8 +806,8 @@ function Na({
|
|
|
806
806
|
checked: g,
|
|
807
807
|
disabled: h,
|
|
808
808
|
onChange: () => {
|
|
809
|
-
var
|
|
810
|
-
return (
|
|
809
|
+
var b;
|
|
810
|
+
return (b = c.onChange) == null ? void 0 : b.call(c, t);
|
|
811
811
|
},
|
|
812
812
|
"aria-describedby": r ? u : void 0,
|
|
813
813
|
className: "peer sr-only"
|
|
@@ -846,11 +846,11 @@ function Xa({
|
|
|
846
846
|
onValueChange: u,
|
|
847
847
|
cancelLabel: h = "Cancel",
|
|
848
848
|
confirmLabel: g = "Continue",
|
|
849
|
-
onConfirm:
|
|
849
|
+
onConfirm: b
|
|
850
850
|
}) {
|
|
851
851
|
var I;
|
|
852
852
|
const [N, k] = T(d ?? ((I = i[0]) == null ? void 0 : I.value) ?? ""), S = c ?? N;
|
|
853
|
-
return /* @__PURE__ */ s(
|
|
853
|
+
return /* @__PURE__ */ s(ba, { open: t, onOpenChange: a, children: [
|
|
854
854
|
r ? /* @__PURE__ */ e(Qe, { asChild: !0, children: r }) : null,
|
|
855
855
|
/* @__PURE__ */ s(
|
|
856
856
|
Oe,
|
|
@@ -858,7 +858,7 @@ function Xa({
|
|
|
858
858
|
"aria-describedby": void 0,
|
|
859
859
|
className: "max-w-[29.4rem] [&>button]:hidden",
|
|
860
860
|
children: [
|
|
861
|
-
/* @__PURE__ */ s(
|
|
861
|
+
/* @__PURE__ */ s(pa, { children: [
|
|
862
862
|
/* @__PURE__ */ e(ha, { children: /* @__PURE__ */ e(Ke, { className: "text-xl", children: l }) }),
|
|
863
863
|
/* @__PURE__ */ e(fa, { children: /* @__PURE__ */ e(va, { label: l, value: S, onChange: (y) => {
|
|
864
864
|
c === void 0 && k(y), u == null || u(y);
|
|
@@ -875,7 +875,7 @@ function Xa({
|
|
|
875
875
|
] }),
|
|
876
876
|
/* @__PURE__ */ s(ga, { className: "gap-3 pt-2.5", children: [
|
|
877
877
|
/* @__PURE__ */ e(Ye, { className: "flex-1", children: h }),
|
|
878
|
-
/* @__PURE__ */ e(z, { className: "flex-1", onClick: () =>
|
|
878
|
+
/* @__PURE__ */ e(z, { className: "flex-1", onClick: () => b == null ? void 0 : b(S), children: g })
|
|
879
879
|
] })
|
|
880
880
|
]
|
|
881
881
|
}
|
|
@@ -930,7 +930,7 @@ const ya = {
|
|
|
930
930
|
md: "size-[var(--control-icon-md)]",
|
|
931
931
|
lg: "size-[var(--control-icon-lg)]",
|
|
932
932
|
xl: "size-[var(--control-icon-xl)]"
|
|
933
|
-
}, tt =
|
|
933
|
+
}, tt = p(
|
|
934
934
|
({
|
|
935
935
|
className: t,
|
|
936
936
|
containerClassName: a,
|
|
@@ -942,14 +942,14 @@ const ya = {
|
|
|
942
942
|
value: u,
|
|
943
943
|
defaultValue: h,
|
|
944
944
|
error: g = !1,
|
|
945
|
-
helperText:
|
|
945
|
+
helperText: b,
|
|
946
946
|
id: N,
|
|
947
947
|
"aria-describedby": k,
|
|
948
948
|
disabled: S,
|
|
949
949
|
readOnly: w,
|
|
950
950
|
...I
|
|
951
951
|
}, y) => {
|
|
952
|
-
const B = de(), J = N ?? B, F = !!
|
|
952
|
+
const B = de(), J = N ?? B, F = !!b, j = !!(c && (u !== void 0 ? String(u).length > 0 : h !== void 0 && String(h).length > 0)), Q = F ? `${J}-description` : void 0, ue = [k, Q].filter(Boolean).join(" ") || void 0, Y = /* @__PURE__ */ e(
|
|
953
953
|
"input",
|
|
954
954
|
{
|
|
955
955
|
ref: y,
|
|
@@ -1025,7 +1025,7 @@ const ya = {
|
|
|
1025
1025
|
{
|
|
1026
1026
|
id: Q,
|
|
1027
1027
|
className: o("mt-1.5 text-xs", g ? "text-error" : "text-muted"),
|
|
1028
|
-
children:
|
|
1028
|
+
children: b
|
|
1029
1029
|
}
|
|
1030
1030
|
) : null
|
|
1031
1031
|
] });
|
|
@@ -1056,7 +1056,7 @@ function ge({
|
|
|
1056
1056
|
]) === 0;
|
|
1057
1057
|
return /* @__PURE__ */ e(at.Provider, { value: r, children: /* @__PURE__ */ e(C.Root, { ...a, children: t }) });
|
|
1058
1058
|
}
|
|
1059
|
-
const ae =
|
|
1059
|
+
const ae = p(({ disabled: t, ...a }, r) => {
|
|
1060
1060
|
const l = ie(at);
|
|
1061
1061
|
return /* @__PURE__ */ e(
|
|
1062
1062
|
C.Trigger,
|
|
@@ -1068,7 +1068,7 @@ const ae = b(({ disabled: t, ...a }, r) => {
|
|
|
1068
1068
|
);
|
|
1069
1069
|
});
|
|
1070
1070
|
ae.displayName = "DropdownMenuTrigger";
|
|
1071
|
-
const Qa = C.Group, Ya = C.Portal, re =
|
|
1071
|
+
const Qa = C.Group, Ya = C.Portal, re = p(({ className: t, sideOffset: a = 8, ...r }, l) => /* @__PURE__ */ e(C.Portal, { children: /* @__PURE__ */ e(
|
|
1072
1072
|
C.Content,
|
|
1073
1073
|
{
|
|
1074
1074
|
ref: l,
|
|
@@ -1087,7 +1087,7 @@ const Qa = C.Group, Ya = C.Portal, re = b(({ className: t, sideOffset: a = 8, ..
|
|
|
1087
1087
|
}
|
|
1088
1088
|
) }));
|
|
1089
1089
|
re.displayName = "DropdownMenuContent";
|
|
1090
|
-
const oe =
|
|
1090
|
+
const oe = p(({ className: t, inset: a, ...r }, l) => /* @__PURE__ */ e(
|
|
1091
1091
|
C.Item,
|
|
1092
1092
|
{
|
|
1093
1093
|
ref: l,
|
|
@@ -1102,7 +1102,7 @@ const oe = b(({ className: t, inset: a, ...r }, l) => /* @__PURE__ */ e(
|
|
|
1102
1102
|
}
|
|
1103
1103
|
));
|
|
1104
1104
|
oe.displayName = "DropdownMenuItem";
|
|
1105
|
-
const U =
|
|
1105
|
+
const U = p(({ className: t, children: a, checked: r, ...l }, i) => /* @__PURE__ */ s(
|
|
1106
1106
|
C.CheckboxItem,
|
|
1107
1107
|
{
|
|
1108
1108
|
ref: i,
|
|
@@ -1119,7 +1119,7 @@ const U = b(({ className: t, children: a, checked: r, ...l }, i) => /* @__PURE__
|
|
|
1119
1119
|
}
|
|
1120
1120
|
));
|
|
1121
1121
|
U.displayName = "DropdownMenuCheckboxItem";
|
|
1122
|
-
const ne =
|
|
1122
|
+
const ne = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1123
1123
|
C.Label,
|
|
1124
1124
|
{
|
|
1125
1125
|
ref: r,
|
|
@@ -1128,7 +1128,7 @@ const ne = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
1128
1128
|
}
|
|
1129
1129
|
));
|
|
1130
1130
|
ne.displayName = "DropdownMenuLabel";
|
|
1131
|
-
const Za = C.Sub, rt =
|
|
1131
|
+
const Za = C.Sub, rt = p(({ className: t, inset: a, children: r, ...l }, i) => /* @__PURE__ */ s(
|
|
1132
1132
|
C.SubTrigger,
|
|
1133
1133
|
{
|
|
1134
1134
|
ref: i,
|
|
@@ -1147,7 +1147,7 @@ const Za = C.Sub, rt = b(({ className: t, inset: a, children: r, ...l }, i) => /
|
|
|
1147
1147
|
}
|
|
1148
1148
|
));
|
|
1149
1149
|
rt.displayName = "DropdownMenuSubTrigger";
|
|
1150
|
-
const Sa =
|
|
1150
|
+
const Sa = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1151
1151
|
C.SubContent,
|
|
1152
1152
|
{
|
|
1153
1153
|
ref: r,
|
|
@@ -1166,7 +1166,7 @@ const Sa = b(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
|
1166
1166
|
}
|
|
1167
1167
|
));
|
|
1168
1168
|
Sa.displayName = "DropdownMenuSubContent";
|
|
1169
|
-
const Ne =
|
|
1169
|
+
const Ne = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1170
1170
|
C.Separator,
|
|
1171
1171
|
{
|
|
1172
1172
|
ref: r,
|
|
@@ -1184,7 +1184,7 @@ function ka({
|
|
|
1184
1184
|
const l = ze(t, [ke]) === 0;
|
|
1185
1185
|
return /* @__PURE__ */ e(D.Root, { disabled: a || l, ...r, children: t });
|
|
1186
1186
|
}
|
|
1187
|
-
const nt =
|
|
1187
|
+
const nt = p(({ className: t, children: a, variant: r = "field", ...l }, i) => /* @__PURE__ */ s(
|
|
1188
1188
|
D.Trigger,
|
|
1189
1189
|
{
|
|
1190
1190
|
ref: i,
|
|
@@ -1205,7 +1205,7 @@ const nt = b(({ className: t, children: a, variant: r = "field", ...l }, i) => /
|
|
|
1205
1205
|
}
|
|
1206
1206
|
));
|
|
1207
1207
|
nt.displayName = "SelectTrigger";
|
|
1208
|
-
const lt =
|
|
1208
|
+
const lt = p(
|
|
1209
1209
|
({ className: t, children: a, position: r = "popper", sideOffset: l = 8, ...i }, d) => /* @__PURE__ */ e(D.Portal, { children: /* @__PURE__ */ e(
|
|
1210
1210
|
D.Content,
|
|
1211
1211
|
{
|
|
@@ -1228,7 +1228,7 @@ const lt = b(
|
|
|
1228
1228
|
) })
|
|
1229
1229
|
);
|
|
1230
1230
|
lt.displayName = "SelectContent";
|
|
1231
|
-
const ke =
|
|
1231
|
+
const ke = p(({ className: t, children: a, ...r }, l) => /* @__PURE__ */ s(
|
|
1232
1232
|
D.Item,
|
|
1233
1233
|
{
|
|
1234
1234
|
ref: l,
|
|
@@ -1244,7 +1244,7 @@ const ke = b(({ className: t, children: a, ...r }, l) => /* @__PURE__ */ s(
|
|
|
1244
1244
|
}
|
|
1245
1245
|
));
|
|
1246
1246
|
ke.displayName = "SelectItem";
|
|
1247
|
-
const Da =
|
|
1247
|
+
const Da = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1248
1248
|
D.Label,
|
|
1249
1249
|
{
|
|
1250
1250
|
ref: r,
|
|
@@ -1278,7 +1278,7 @@ function Ta({
|
|
|
1278
1278
|
}
|
|
1279
1279
|
);
|
|
1280
1280
|
}
|
|
1281
|
-
const Ma = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium";
|
|
1281
|
+
const Ma = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium text-table-header";
|
|
1282
1282
|
function Pa(t) {
|
|
1283
1283
|
return t.split(/\s+/).slice(0, 2).map((a) => {
|
|
1284
1284
|
var r;
|
|
@@ -1312,7 +1312,7 @@ function er({
|
|
|
1312
1312
|
filters: u,
|
|
1313
1313
|
toolbarStart: h,
|
|
1314
1314
|
toolbarEnd: g,
|
|
1315
|
-
tabs:
|
|
1315
|
+
tabs: b,
|
|
1316
1316
|
activeTab: N,
|
|
1317
1317
|
onTabChange: k,
|
|
1318
1318
|
infoBanner: S,
|
|
@@ -1335,7 +1335,7 @@ function er({
|
|
|
1335
1335
|
)
|
|
1336
1336
|
), [x, st] = T(
|
|
1337
1337
|
J ?? null
|
|
1338
|
-
), [$, Z] = T(0), [L, dt] = T(F), [R, me] = T(/* @__PURE__ */ new Set()), [ct,
|
|
1338
|
+
), [$, Z] = T(0), [L, dt] = T(F), [R, me] = T(/* @__PURE__ */ new Set()), [ct, be] = T([]), E = a.filter((n) => !De[n.id]), Me = a.filter((n) => De[n.id] && !n.required), pe = (u ?? []).filter((n) => ct.includes(n.id)), ut = (u ?? []).map((n) => `${n.id}:${n.value.join(",")}`).join("|"), O = _e(() => {
|
|
1339
1339
|
let n = t;
|
|
1340
1340
|
for (const f of u ?? [])
|
|
1341
1341
|
f.value.length > 0 && (n = n.filter((v) => f.match(v, f.value)));
|
|
@@ -1361,7 +1361,7 @@ function er({
|
|
|
1361
1361
|
n.sortable && st(
|
|
1362
1362
|
(m) => (m == null ? void 0 : m.id) === n.id ? m.dir === "asc" ? { id: n.id, dir: "desc" } : null : { id: n.id, dir: "asc" }
|
|
1363
1363
|
);
|
|
1364
|
-
}, Pe = _.length > 0 && _.every((n) => R.has(r(n))),
|
|
1364
|
+
}, Pe = _.length > 0 && _.every((n) => R.has(r(n))), bt = _.some((n) => R.has(r(n))), pt = t.filter((n) => R.has(r(n))), ft = () => {
|
|
1365
1365
|
me((n) => {
|
|
1366
1366
|
const m = new Set(n);
|
|
1367
1367
|
return Pe ? _.forEach((f) => m.delete(r(f))) : _.forEach((f) => m.add(r(f))), m;
|
|
@@ -1377,7 +1377,7 @@ function er({
|
|
|
1377
1377
|
...y ? ["11rem"] : []
|
|
1378
1378
|
], yt = (n) => (x == null ? void 0 : x.id) === n.id ? x.dir === "asc" ? "ascending" : "descending" : void 0;
|
|
1379
1379
|
return /* @__PURE__ */ s("div", { className: o("space-y-4", ot), children: [
|
|
1380
|
-
|
|
1380
|
+
b && b.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: b.map((n) => {
|
|
1381
1381
|
const m = n.id === N;
|
|
1382
1382
|
return /* @__PURE__ */ e(
|
|
1383
1383
|
"button",
|
|
@@ -1469,7 +1469,7 @@ function er({
|
|
|
1469
1469
|
/* @__PURE__ */ e(re, { align: "start", className: "w-54", children: u.map((n) => /* @__PURE__ */ e(
|
|
1470
1470
|
oe,
|
|
1471
1471
|
{
|
|
1472
|
-
onSelect: () =>
|
|
1472
|
+
onSelect: () => be(
|
|
1473
1473
|
(m) => m.includes(n.id) ? m : [...m, n.id]
|
|
1474
1474
|
),
|
|
1475
1475
|
children: n.label
|
|
@@ -1479,10 +1479,10 @@ function er({
|
|
|
1479
1479
|
] }) : null,
|
|
1480
1480
|
g ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: g }) : null
|
|
1481
1481
|
] }),
|
|
1482
|
-
|
|
1483
|
-
|
|
1482
|
+
pe.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1483
|
+
pe.map((n) => {
|
|
1484
1484
|
const m = () => {
|
|
1485
|
-
n.onChange([]),
|
|
1485
|
+
n.onChange([]), be((f) => f.filter((v) => v !== n.id));
|
|
1486
1486
|
};
|
|
1487
1487
|
return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
|
|
1488
1488
|
/* @__PURE__ */ e(
|
|
@@ -1536,8 +1536,8 @@ function er({
|
|
|
1536
1536
|
{
|
|
1537
1537
|
type: "button",
|
|
1538
1538
|
onClick: () => {
|
|
1539
|
-
for (const n of
|
|
1540
|
-
|
|
1539
|
+
for (const n of pe) n.onChange([]);
|
|
1540
|
+
be([]);
|
|
1541
1541
|
},
|
|
1542
1542
|
className: "text-sm text-muted transition-colors hover:text-fg",
|
|
1543
1543
|
children: "Clear filters"
|
|
@@ -1556,7 +1556,7 @@ function er({
|
|
|
1556
1556
|
size: "md",
|
|
1557
1557
|
variant: n.variant ?? "outline",
|
|
1558
1558
|
disabled: n.disabled,
|
|
1559
|
-
onClick: () => void n.onRun(
|
|
1559
|
+
onClick: () => void n.onRun(pt),
|
|
1560
1560
|
children: [
|
|
1561
1561
|
n.icon,
|
|
1562
1562
|
n.label
|
|
@@ -1594,7 +1594,7 @@ function er({
|
|
|
1594
1594
|
xe,
|
|
1595
1595
|
{
|
|
1596
1596
|
"aria-label": "Select all rows",
|
|
1597
|
-
checked: Pe ? !0 :
|
|
1597
|
+
checked: Pe ? !0 : bt ? "indeterminate" : !1,
|
|
1598
1598
|
onCheckedChange: ft
|
|
1599
1599
|
}
|
|
1600
1600
|
) }),
|
|
@@ -1748,7 +1748,7 @@ function ar({ className: t, ...a }) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
);
|
|
1750
1750
|
}
|
|
1751
|
-
const Ia =
|
|
1751
|
+
const Ia = p(({ className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
1752
1752
|
qt.Root,
|
|
1753
1753
|
{
|
|
1754
1754
|
ref: r,
|
|
@@ -1812,7 +1812,7 @@ function rr({
|
|
|
1812
1812
|
}
|
|
1813
1813
|
);
|
|
1814
1814
|
}
|
|
1815
|
-
const Ea =
|
|
1815
|
+
const Ea = p(({ className: t, orientation: a = "horizontal", decorative: r = !0, ...l }, i) => /* @__PURE__ */ e(
|
|
1816
1816
|
Gt.Root,
|
|
1817
1817
|
{
|
|
1818
1818
|
ref: i,
|
|
@@ -1836,7 +1836,7 @@ function nr({ className: t, ...a }) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
);
|
|
1838
1838
|
}
|
|
1839
|
-
const lr = W.Provider, ir = W.Root, or = W.Trigger, _a =
|
|
1839
|
+
const lr = W.Provider, ir = W.Root, or = W.Trigger, _a = p(({ className: t, sideOffset: a = 6, ...r }, l) => /* @__PURE__ */ e(W.Portal, { children: /* @__PURE__ */ e(
|
|
1840
1840
|
W.Content,
|
|
1841
1841
|
{
|
|
1842
1842
|
ref: l,
|
|
@@ -1874,7 +1874,7 @@ export {
|
|
|
1874
1874
|
Ja as CodeBlock,
|
|
1875
1875
|
er as DataTable,
|
|
1876
1876
|
Ka as DataTableIdentity,
|
|
1877
|
-
|
|
1877
|
+
ba as Dialog,
|
|
1878
1878
|
fa as DialogBody,
|
|
1879
1879
|
Ye as DialogCancel,
|
|
1880
1880
|
Wa as DialogClose,
|
|
@@ -1882,7 +1882,7 @@ export {
|
|
|
1882
1882
|
xa as DialogDescription,
|
|
1883
1883
|
ga as DialogFooter,
|
|
1884
1884
|
ha as DialogHeader,
|
|
1885
|
-
|
|
1885
|
+
pa as DialogPanel,
|
|
1886
1886
|
Ke as DialogTitle,
|
|
1887
1887
|
Qe as DialogTrigger,
|
|
1888
1888
|
ge as DropdownMenu,
|