@goliapkg/gds 1.6.0 → 1.7.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/README.md +2 -1
- package/dist/index.js +5 -5
- package/dist/l0-tokens/color-derive.d.ts +4 -0
- package/dist/l0-tokens/color-derive.d.ts.map +1 -1
- package/dist/l0-tokens/index.js +1 -1
- package/dist/l1-systems/index.d.ts +1 -0
- package/dist/l1-systems/index.d.ts.map +1 -1
- package/dist/l1-systems/index.js +20 -2
- package/dist/l1-systems/index.js.map +1 -0
- package/dist/l1-systems/use-fonts.d.ts +3 -0
- package/dist/l1-systems/use-fonts.d.ts.map +1 -0
- package/dist/l3-atoms/glow-dot.d.ts +4 -0
- package/dist/l3-atoms/glow-dot.d.ts.map +1 -1
- package/dist/l3-atoms/index.js +1 -1
- package/dist/{l3-atoms-LtIFAn9Y.js → l3-atoms-Cvu01YHO.js} +5 -5
- package/dist/l3-atoms-Cvu01YHO.js.map +1 -0
- package/dist/l4-molecules/card.d.ts +9 -6
- package/dist/l4-molecules/card.d.ts.map +1 -1
- package/dist/l4-molecules/index.js +1 -1
- package/dist/{l4-molecules-Bnt38HxY.js → l4-molecules-CSmApFmt.js} +19 -15
- package/dist/l4-molecules-CSmApFmt.js.map +1 -0
- package/dist/l5-organisms/data-table/data-table-toolbar.d.ts +4 -1
- package/dist/l5-organisms/data-table/data-table-toolbar.d.ts.map +1 -1
- package/dist/l5-organisms/data-table/data-table-types.d.ts +7 -1
- package/dist/l5-organisms/data-table/data-table-types.d.ts.map +1 -1
- package/dist/l5-organisms/data-table/data-table.d.ts.map +1 -1
- package/dist/l5-organisms/index.js +1 -1
- package/dist/{l5-organisms-C7LXv0jT.js → l5-organisms-Css3AvsZ.js} +192 -175
- package/dist/{l5-organisms-C7LXv0jT.js.map → l5-organisms-Css3AvsZ.js.map} +1 -1
- package/dist/{scales-C80FTPsL.js → scales-B23Guac-.js} +6 -1
- package/dist/scales-B23Guac-.js.map +1 -0
- package/dist/theme.css +1 -0
- package/dist/{use-theme-C0aWVw70.js → use-theme-CONuDdW3.js} +2 -2
- package/dist/{use-theme-C0aWVw70.js.map → use-theme-CONuDdW3.js.map} +1 -1
- package/package.json +1 -1
- package/dist/l3-atoms-LtIFAn9Y.js.map +0 -1
- package/dist/l4-molecules-Bnt38HxY.js.map +0 -1
- package/dist/scales-C80FTPsL.js.map +0 -1
|
@@ -90,7 +90,7 @@ var N = C(function({ className: e, items: n }, r) {
|
|
|
90
90
|
scale: "animate-scale-in",
|
|
91
91
|
"slide-left": "animate-slide-left",
|
|
92
92
|
"slide-up": "animate-slide-up"
|
|
93
|
-
},
|
|
93
|
+
}, L = C(function({ animation: e = "slide-up", children: n, className: r, stagger: i = 50, ...a }, o) {
|
|
94
94
|
let s = x.toArray(n);
|
|
95
95
|
return /* @__PURE__ */ j("div", {
|
|
96
96
|
className: t("flex flex-col", r),
|
|
@@ -106,10 +106,10 @@ var N = C(function({ className: e, items: n }, r) {
|
|
|
106
106
|
});
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region src/l5-organisms/audio-player.tsx
|
|
109
|
-
function
|
|
109
|
+
function R(e) {
|
|
110
110
|
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
111
111
|
}
|
|
112
|
-
var
|
|
112
|
+
var z = C(function({ src: e, title: r, glass: a, className: o }, s) {
|
|
113
113
|
let c = D(null), [l, u] = O(!1), [d, f] = O(0), [p, m] = O(0), h = w(() => {
|
|
114
114
|
let e = c.current;
|
|
115
115
|
e !== null && (e.paused ? (e.play().catch(() => {}), u(!0)) : (e.pause(), u(!1)));
|
|
@@ -196,14 +196,14 @@ var R = C(function({ src: e, title: r, glass: a, className: o }, s) {
|
|
|
196
196
|
className: "shrink-0 select-none text-xs tabular-nums text-fg-muted",
|
|
197
197
|
"data-testid": "time-display",
|
|
198
198
|
children: [
|
|
199
|
-
|
|
199
|
+
R(d),
|
|
200
200
|
" / ",
|
|
201
|
-
|
|
201
|
+
R(p)
|
|
202
202
|
]
|
|
203
203
|
})
|
|
204
204
|
]
|
|
205
205
|
});
|
|
206
|
-
}),
|
|
206
|
+
}), B = C(function({ className: e, entries: n, ...r }, i) {
|
|
207
207
|
return /* @__PURE__ */ j("div", {
|
|
208
208
|
className: t("flex flex-col", e),
|
|
209
209
|
"data-component": "audit-log",
|
|
@@ -220,7 +220,7 @@ var R = C(function({ src: e, title: r, glass: a, className: o }, s) {
|
|
|
220
220
|
})
|
|
221
221
|
}, e.id))
|
|
222
222
|
});
|
|
223
|
-
}),
|
|
223
|
+
}), V = C(function({ users: e, onSelect: r, compact: i = !1, glass: a, className: o, ...s }, c) {
|
|
224
224
|
return /* @__PURE__ */ j("div", {
|
|
225
225
|
className: t("gds-radius-popover overflow-hidden border border-border", n(a), o),
|
|
226
226
|
"data-component": "avatar-list",
|
|
@@ -253,7 +253,7 @@ var R = C(function({ src: e, title: r, glass: a, className: o }, s) {
|
|
|
253
253
|
}, e.name);
|
|
254
254
|
})
|
|
255
255
|
});
|
|
256
|
-
}),
|
|
256
|
+
}), H = [
|
|
257
257
|
"Su",
|
|
258
258
|
"Mo",
|
|
259
259
|
"Tu",
|
|
@@ -261,7 +261,7 @@ var R = C(function({ src: e, title: r, glass: a, className: o }, s) {
|
|
|
261
261
|
"Th",
|
|
262
262
|
"Fr",
|
|
263
263
|
"Sa"
|
|
264
|
-
],
|
|
264
|
+
], U = [
|
|
265
265
|
"January",
|
|
266
266
|
"February",
|
|
267
267
|
"March",
|
|
@@ -275,26 +275,26 @@ var R = C(function({ src: e, title: r, glass: a, className: o }, s) {
|
|
|
275
275
|
"November",
|
|
276
276
|
"December"
|
|
277
277
|
];
|
|
278
|
-
function
|
|
278
|
+
function W(e, t) {
|
|
279
279
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function te(e, t, n) {
|
|
282
282
|
return t !== void 0 && e < new Date(t.getFullYear(), t.getMonth(), t.getDate()) || n !== void 0 && e > new Date(n.getFullYear(), n.getMonth(), n.getDate());
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function ne(e, t) {
|
|
285
285
|
let n = [], r = new Date(e, t, 1);
|
|
286
286
|
for (; r.getMonth() === t;) n.push(new Date(r)), r.setDate(r.getDate() + 1);
|
|
287
287
|
return n;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
let n =
|
|
289
|
+
function G(e, t) {
|
|
290
|
+
let n = ne(e, t), r = n[0].getDay(), i = Array.from({ length: r }, () => null);
|
|
291
291
|
for (i.push(...n); i.length < 42;) i.push(null);
|
|
292
292
|
return i;
|
|
293
293
|
}
|
|
294
294
|
//#endregion
|
|
295
295
|
//#region src/l5-organisms/calendar.tsx
|
|
296
|
-
var
|
|
297
|
-
let c = /* @__PURE__ */ new Date(), l = e ?? c, [u, d] = O(l.getFullYear()), [f, p] = O(l.getMonth()), m =
|
|
296
|
+
var K = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
297
|
+
let c = /* @__PURE__ */ new Date(), l = e ?? c, [u, d] = O(l.getFullYear()), [f, p] = O(l.getMonth()), m = G(u, f), h = () => {
|
|
298
298
|
f === 0 ? (d((e) => e - 1), p(11)) : p((e) => e - 1);
|
|
299
299
|
}, g = () => {
|
|
300
300
|
f === 11 ? (d((e) => e + 1), p(0)) : p((e) => e + 1);
|
|
@@ -324,7 +324,7 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
324
324
|
/* @__PURE__ */ M("span", {
|
|
325
325
|
className: "text-sm font-medium text-fg",
|
|
326
326
|
children: [
|
|
327
|
-
|
|
327
|
+
U[f],
|
|
328
328
|
" ",
|
|
329
329
|
u
|
|
330
330
|
]
|
|
@@ -347,7 +347,7 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
347
347
|
}),
|
|
348
348
|
/* @__PURE__ */ j("div", {
|
|
349
349
|
className: "grid grid-cols-7 gds-gap-xs text-center gds-text-body text-fg-muted",
|
|
350
|
-
children:
|
|
350
|
+
children: H.map((e) => /* @__PURE__ */ j("div", {
|
|
351
351
|
className: "gds-pad-y-sm font-medium",
|
|
352
352
|
children: e
|
|
353
353
|
}, e))
|
|
@@ -356,7 +356,7 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
356
356
|
className: "grid grid-cols-7 gds-gap-xs text-center gds-text-body",
|
|
357
357
|
children: m.map((o, s) => {
|
|
358
358
|
if (o === null) return /* @__PURE__ */ j("div", { className: "gds-pad-y-sm" }, `e-${s}`);
|
|
359
|
-
let l =
|
|
359
|
+
let l = te(o, r, a), u = e !== void 0 && W(o, e), d = W(o, c);
|
|
360
360
|
return /* @__PURE__ */ j("button", {
|
|
361
361
|
type: "button",
|
|
362
362
|
disabled: l,
|
|
@@ -370,7 +370,7 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
370
370
|
})
|
|
371
371
|
]
|
|
372
372
|
});
|
|
373
|
-
}),
|
|
373
|
+
}), q = () => /* @__PURE__ */ j("svg", {
|
|
374
374
|
width: "16",
|
|
375
375
|
height: "16",
|
|
376
376
|
viewBox: "0 0 16 16",
|
|
@@ -380,7 +380,7 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
380
380
|
strokeLinecap: "round",
|
|
381
381
|
strokeLinejoin: "round",
|
|
382
382
|
children: /* @__PURE__ */ j("path", { d: "M10 3L5 8l5 5" })
|
|
383
|
-
}),
|
|
383
|
+
}), re = () => /* @__PURE__ */ j("svg", {
|
|
384
384
|
width: "16",
|
|
385
385
|
height: "16",
|
|
386
386
|
viewBox: "0 0 16 16",
|
|
@@ -390,7 +390,7 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
390
390
|
strokeLinecap: "round",
|
|
391
391
|
strokeLinejoin: "round",
|
|
392
392
|
children: /* @__PURE__ */ j("path", { d: "M6 3l5 5-5 5" })
|
|
393
|
-
}),
|
|
393
|
+
}), J = C(function({ children: e, autoPlay: r = !1, interval: i = 5e3, showDots: a = !0, showArrows: o = !0, glass: s = !1, className: c }, l) {
|
|
394
394
|
let u = x.toArray(e), d = u.length, [f, p] = O(0), m = D(!1), h = D(null), g = w((e) => {
|
|
395
395
|
p((e % d + d) % d);
|
|
396
396
|
}, [d]), _ = w(() => g(f - 1), [f, g]), v = w(() => g(f + 1), [f, g]);
|
|
@@ -439,13 +439,13 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
439
439
|
onClick: _,
|
|
440
440
|
className: t("absolute left-2 top-1/2 -translate-y-1/2 rounded-full border border-border bg-bg/80 p-1.5 text-fg transition-colors hover:bg-bg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
441
441
|
"aria-label": "Previous slide",
|
|
442
|
-
children: /* @__PURE__ */ j(
|
|
442
|
+
children: /* @__PURE__ */ j(q, {})
|
|
443
443
|
}), /* @__PURE__ */ j("button", {
|
|
444
444
|
type: "button",
|
|
445
445
|
onClick: v,
|
|
446
446
|
className: t("absolute right-2 top-1/2 -translate-y-1/2 rounded-full border border-border bg-bg/80 p-1.5 text-fg transition-colors hover:bg-bg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
447
447
|
"aria-label": "Next slide",
|
|
448
|
-
children: /* @__PURE__ */ j(
|
|
448
|
+
children: /* @__PURE__ */ j(re, {})
|
|
449
449
|
})] }),
|
|
450
450
|
a && d > 1 && /* @__PURE__ */ j("div", {
|
|
451
451
|
className: "absolute bottom-2 left-1/2 flex -translate-x-1/2 gap-1.5",
|
|
@@ -461,12 +461,12 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
461
461
|
})
|
|
462
462
|
]
|
|
463
463
|
});
|
|
464
|
-
}),
|
|
464
|
+
}), ie = {
|
|
465
465
|
added: "bg-success/15 text-success",
|
|
466
466
|
changed: "bg-accent/15 text-accent",
|
|
467
467
|
fixed: "bg-warning/15 text-warning",
|
|
468
468
|
removed: "bg-danger/15 text-danger"
|
|
469
|
-
},
|
|
469
|
+
}, ae = C(function({ entries: e, className: n, ...r }, i) {
|
|
470
470
|
return /* @__PURE__ */ j("div", {
|
|
471
471
|
ref: i,
|
|
472
472
|
className: t("flex flex-col gap-6", n),
|
|
@@ -488,7 +488,7 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
488
488
|
children: e.changes.map((e, n) => /* @__PURE__ */ M("li", {
|
|
489
489
|
className: "flex items-start gap-2 gds-text text-fg",
|
|
490
490
|
children: [/* @__PURE__ */ j("span", {
|
|
491
|
-
className: t("mt-0.5 shrink-0 rounded-full px-1.5 py-px text-[9px] font-bold uppercase leading-tight",
|
|
491
|
+
className: t("mt-0.5 shrink-0 rounded-full px-1.5 py-px text-[9px] font-bold uppercase leading-tight", ie[e.type]),
|
|
492
492
|
children: e.type
|
|
493
493
|
}), /* @__PURE__ */ j("span", { children: e.text })]
|
|
494
494
|
}, `${e.type}-${n}`))
|
|
@@ -498,7 +498,7 @@ var W = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
|
498
498
|
});
|
|
499
499
|
//#endregion
|
|
500
500
|
//#region src/l5-organisms/command-palette-list.tsx
|
|
501
|
-
function
|
|
501
|
+
function oe({ groups: e, activeIndex: n, filteredCount: r, onSelect: i }) {
|
|
502
502
|
let a = -1;
|
|
503
503
|
return r === 0 ? /* @__PURE__ */ j("div", {
|
|
504
504
|
className: "py-8 text-center text-sm text-fg-muted/40",
|
|
@@ -536,7 +536,7 @@ function ce({ groups: e, activeIndex: n, filteredCount: r, onSelect: i }) {
|
|
|
536
536
|
}
|
|
537
537
|
//#endregion
|
|
538
538
|
//#region src/l5-organisms/command-palette.tsx
|
|
539
|
-
function
|
|
539
|
+
function se({ open: e, onClose: n, items: r, onSelect: i, placeholder: a = "Search components, patterns, tokens...", className: o }) {
|
|
540
540
|
let [s, l] = O(""), [u, d] = O(0), m = D(null), h = D(null);
|
|
541
541
|
p(e), f(e, n), T(() => {
|
|
542
542
|
e && (l(""), d(0), requestAnimationFrame(() => m.current?.focus()));
|
|
@@ -613,7 +613,7 @@ function le({ open: e, onClose: n, items: r, onSelect: i, placeholder: a = "Sear
|
|
|
613
613
|
/* @__PURE__ */ j("div", {
|
|
614
614
|
ref: h,
|
|
615
615
|
className: "max-h-80 overflow-y-auto p-1.5",
|
|
616
|
-
children: /* @__PURE__ */ j(
|
|
616
|
+
children: /* @__PURE__ */ j(oe, {
|
|
617
617
|
groups: _,
|
|
618
618
|
activeIndex: u,
|
|
619
619
|
filteredCount: g.length,
|
|
@@ -637,7 +637,7 @@ function le({ open: e, onClose: n, items: r, onSelect: i, placeholder: a = "Sear
|
|
|
637
637
|
}
|
|
638
638
|
//#endregion
|
|
639
639
|
//#region src/l5-organisms/comment-thread.tsx
|
|
640
|
-
function
|
|
640
|
+
function ce({ comment: e, depth: n = 0 }) {
|
|
641
641
|
return /* @__PURE__ */ M("div", {
|
|
642
642
|
className: t(n > 0 && "ml-8 border-l border-border pl-4"),
|
|
643
643
|
children: [/* @__PURE__ */ M("div", {
|
|
@@ -663,14 +663,14 @@ function ue({ comment: e, depth: n = 0 }) {
|
|
|
663
663
|
})]
|
|
664
664
|
}), e.replies !== void 0 && e.replies.length > 0 && /* @__PURE__ */ j("div", {
|
|
665
665
|
className: "mt-3 flex flex-col gds-gap",
|
|
666
|
-
children: e.replies.map((e) => /* @__PURE__ */ j(
|
|
666
|
+
children: e.replies.map((e) => /* @__PURE__ */ j(ce, {
|
|
667
667
|
comment: e,
|
|
668
668
|
depth: n + 1
|
|
669
669
|
}, e.id))
|
|
670
670
|
})]
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
var
|
|
673
|
+
var le = C(function({ className: e, comments: n, ...r }, i) {
|
|
674
674
|
return /* @__PURE__ */ j("div", {
|
|
675
675
|
className: t("flex flex-col gds-gap", e),
|
|
676
676
|
"data-component": "comment-thread",
|
|
@@ -679,13 +679,13 @@ var de = C(function({ className: e, comments: n, ...r }, i) {
|
|
|
679
679
|
...r,
|
|
680
680
|
children: n.map((e) => /* @__PURE__ */ j("div", {
|
|
681
681
|
role: "listitem",
|
|
682
|
-
children: /* @__PURE__ */ j(
|
|
682
|
+
children: /* @__PURE__ */ j(ce, { comment: e })
|
|
683
683
|
}, e.id))
|
|
684
684
|
});
|
|
685
685
|
});
|
|
686
686
|
//#endregion
|
|
687
687
|
//#region src/l5-organisms/confetti-physics.ts
|
|
688
|
-
function
|
|
688
|
+
function ue(e, t) {
|
|
689
689
|
return {
|
|
690
690
|
x: Math.random() * e,
|
|
691
691
|
y: -10,
|
|
@@ -699,7 +699,7 @@ function fe(e, t) {
|
|
|
699
699
|
drag: .98
|
|
700
700
|
};
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function de(e) {
|
|
703
703
|
return {
|
|
704
704
|
...e,
|
|
705
705
|
x: e.x + e.vx,
|
|
@@ -709,12 +709,12 @@ function pe(e) {
|
|
|
709
709
|
rotation: e.rotation + e.rotationSpeed
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function fe(e, t) {
|
|
713
713
|
e.save(), e.translate(t.x, t.y), e.rotate(t.rotation * Math.PI / 180), e.fillStyle = t.color, e.fillRect(-t.size / 2, -t.size / 2, t.size, t.size * .6), e.restore();
|
|
714
714
|
}
|
|
715
715
|
//#endregion
|
|
716
716
|
//#region src/l5-organisms/confetti.tsx
|
|
717
|
-
var
|
|
717
|
+
var pe = [
|
|
718
718
|
"#6366f1",
|
|
719
719
|
"#ec4899",
|
|
720
720
|
"#14b8a6",
|
|
@@ -724,7 +724,7 @@ var he = [
|
|
|
724
724
|
"#22c55e",
|
|
725
725
|
"#3b82f6"
|
|
726
726
|
];
|
|
727
|
-
function
|
|
727
|
+
function me({ active: e, className: n, colors: r = pe, duration: i = 3e3, particleCount: a = 100 }) {
|
|
728
728
|
let o = D(null), s = D([]), l = D(0), u = D(0);
|
|
729
729
|
return T(() => {
|
|
730
730
|
if (!e) {
|
|
@@ -742,10 +742,10 @@ function ge({ active: e, className: n, colors: r = he, duration: i = 3e3, partic
|
|
|
742
742
|
let o = e - u.current;
|
|
743
743
|
if (n.clearRect(0, 0, t.width, t.height), o < i) {
|
|
744
744
|
let e = Math.min(a, Math.floor(o / i * a));
|
|
745
|
-
for (; c < e;) s.current = [...s.current,
|
|
745
|
+
for (; c < e;) s.current = [...s.current, ue(t.width, r)], c += 1;
|
|
746
746
|
}
|
|
747
|
-
s.current = s.current.map(
|
|
748
|
-
for (let e of s.current)
|
|
747
|
+
s.current = s.current.map(de).filter((e) => e.y < t.height + 20);
|
|
748
|
+
for (let e of s.current) fe(n, e);
|
|
749
749
|
(s.current.length > 0 || o < i) && (l.current = requestAnimationFrame(d));
|
|
750
750
|
}
|
|
751
751
|
return l.current = requestAnimationFrame(d), () => {
|
|
@@ -764,7 +764,7 @@ function ge({ active: e, className: n, colors: r = he, duration: i = 3e3, partic
|
|
|
764
764
|
}
|
|
765
765
|
//#endregion
|
|
766
766
|
//#region src/l5-organisms/contact-card.tsx
|
|
767
|
-
var
|
|
767
|
+
var he = C(function({ actions: e, avatar: n, className: r, email: i, name: a, phone: o, role: s, ...c }, l) {
|
|
768
768
|
let u = a.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase();
|
|
769
769
|
return /* @__PURE__ */ M("div", {
|
|
770
770
|
className: t("gds-ctx gds-radius-card border border-border bg-surface gds-pad text-center", r),
|
|
@@ -802,11 +802,11 @@ var _e = C(function({ actions: e, avatar: n, className: r, email: i, name: a, ph
|
|
|
802
802
|
})
|
|
803
803
|
]
|
|
804
804
|
});
|
|
805
|
-
}),
|
|
805
|
+
}), ge = {
|
|
806
806
|
running: "bg-success",
|
|
807
807
|
stopped: "bg-danger",
|
|
808
808
|
paused: "bg-warning"
|
|
809
|
-
},
|
|
809
|
+
}, _e = C(function({ className: e, containers: n, ...r }, i) {
|
|
810
810
|
return /* @__PURE__ */ j("div", {
|
|
811
811
|
className: t("gds-radius-popover overflow-hidden border border-border", e),
|
|
812
812
|
"data-component": "container-list",
|
|
@@ -849,7 +849,7 @@ var _e = C(function({ actions: e, avatar: n, className: r, email: i, name: a, ph
|
|
|
849
849
|
className: "px-3 py-1.5",
|
|
850
850
|
children: /* @__PURE__ */ M("span", {
|
|
851
851
|
className: "inline-flex items-center gap-1.5",
|
|
852
|
-
children: [/* @__PURE__ */ j("span", { className: t("h-2 w-2 rounded-full",
|
|
852
|
+
children: [/* @__PURE__ */ j("span", { className: t("h-2 w-2 rounded-full", ge[e.status]) }), /* @__PURE__ */ j("span", {
|
|
853
853
|
className: "text-fg-muted",
|
|
854
854
|
children: e.status
|
|
855
855
|
})]
|
|
@@ -863,7 +863,7 @@ var _e = C(function({ actions: e, avatar: n, className: r, email: i, name: a, ph
|
|
|
863
863
|
}, e.name)) })]
|
|
864
864
|
})
|
|
865
865
|
});
|
|
866
|
-
}),
|
|
866
|
+
}), ve = "We use cookies to improve your experience. By continuing to use this site, you agree to our use of cookies.", ye = C(function({ onAccept: e, onReject: n, message: i, className: a }, o) {
|
|
867
867
|
return /* @__PURE__ */ M("div", {
|
|
868
868
|
ref: o,
|
|
869
869
|
className: t("fixed inset-x-0 bottom-0 z-50 flex items-center justify-between gap-4 border-t border-border bg-surface/80 px-6 py-4 backdrop-blur-lg", a),
|
|
@@ -871,7 +871,7 @@ var _e = C(function({ actions: e, avatar: n, className: r, email: i, name: a, ph
|
|
|
871
871
|
role: "banner",
|
|
872
872
|
children: [/* @__PURE__ */ j("p", {
|
|
873
873
|
className: "text-sm text-fg-muted flex-1",
|
|
874
|
-
children: i ??
|
|
874
|
+
children: i ?? ve
|
|
875
875
|
}), /* @__PURE__ */ M("div", {
|
|
876
876
|
className: "flex shrink-0 gap-2",
|
|
877
877
|
children: [n !== void 0 && /* @__PURE__ */ j(r, {
|
|
@@ -887,12 +887,12 @@ var _e = C(function({ actions: e, avatar: n, className: r, email: i, name: a, ph
|
|
|
887
887
|
})]
|
|
888
888
|
})]
|
|
889
889
|
});
|
|
890
|
-
}),
|
|
891
|
-
return c(/* @__PURE__ */ j(
|
|
890
|
+
}), Y = C(function(e, t) {
|
|
891
|
+
return c(/* @__PURE__ */ j(ye, {
|
|
892
892
|
...e,
|
|
893
893
|
ref: t
|
|
894
894
|
}));
|
|
895
|
-
}),
|
|
895
|
+
}), X = [
|
|
896
896
|
"Sunday",
|
|
897
897
|
"Monday",
|
|
898
898
|
"Tuesday",
|
|
@@ -906,7 +906,7 @@ function be(e) {
|
|
|
906
906
|
if (t.length !== 5) return `Cron: ${e}`;
|
|
907
907
|
let [n, r, i, , a] = t, o = r !== "*" && n !== "*" ? `${r.padStart(2, "0")}:${n.padStart(2, "0")}` : null;
|
|
908
908
|
if (a !== "*" && a !== "?") {
|
|
909
|
-
let e = parseInt(a, 10), t = isNaN(e) ? a :
|
|
909
|
+
let e = parseInt(a, 10), t = isNaN(e) ? a : X[e % 7] ?? a;
|
|
910
910
|
return o === null ? `Every ${t}` : `Every ${t} at ${o}`;
|
|
911
911
|
}
|
|
912
912
|
return i !== "*" && i !== "?" ? o === null ? `Day ${i} of every month` : `Day ${i} of every month at ${o}` : r === "*" && n === "*" ? "Every minute" : r === "*" ? `Every hour at minute ${n}` : n === "0" && r === "0" ? "Every day at midnight" : o === null ? `Cron: ${e}` : `Every day at ${o}`;
|
|
@@ -926,11 +926,11 @@ var Z = C(function({ expression: e, className: n, ...r }, i) {
|
|
|
926
926
|
children: a
|
|
927
927
|
})]
|
|
928
928
|
});
|
|
929
|
-
}),
|
|
929
|
+
}), xe = {
|
|
930
930
|
center: "text-center",
|
|
931
931
|
left: "text-left",
|
|
932
932
|
right: "text-right"
|
|
933
|
-
},
|
|
933
|
+
}, Se = C(function({ columns: e, rows: r, compact: i = !1, striped: a = !1, glass: o, className: s }, c) {
|
|
934
934
|
let l = i ? "px-3 py-1" : "px-3 py-2";
|
|
935
935
|
return /* @__PURE__ */ j("div", {
|
|
936
936
|
className: t("w-full overflow-auto", o === !0 && n(o), s),
|
|
@@ -941,7 +941,7 @@ var Z = C(function({ expression: e, className: n, ...r }, i) {
|
|
|
941
941
|
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ j("tr", {
|
|
942
942
|
className: "border-b border-border/40",
|
|
943
943
|
children: e.map((e) => /* @__PURE__ */ j("th", {
|
|
944
|
-
className: t("font-medium text-fg-muted select-none", l,
|
|
944
|
+
className: t("font-medium text-fg-muted select-none", l, xe[e.align ?? "left"]),
|
|
945
945
|
style: e.width === void 0 ? void 0 : { width: e.width },
|
|
946
946
|
children: e.label
|
|
947
947
|
}, e.key))
|
|
@@ -952,7 +952,7 @@ var Z = C(function({ expression: e, className: n, ...r }, i) {
|
|
|
952
952
|
}) }), r.map((n, r) => /* @__PURE__ */ j("tr", {
|
|
953
953
|
className: t("border-b border-border/20", a && r % 2 == 1 && "bg-bg-secondary/30"),
|
|
954
954
|
children: e.map((e) => /* @__PURE__ */ j("td", {
|
|
955
|
-
className: t("text-fg", l,
|
|
955
|
+
className: t("text-fg", l, xe[e.align ?? "left"]),
|
|
956
956
|
children: n[e.key]
|
|
957
957
|
}, e.key))
|
|
958
958
|
}, `${String(n[e[0]?.key ?? ""] ?? "")}-${r}`))] })]
|
|
@@ -961,7 +961,7 @@ var Z = C(function({ expression: e, className: n, ...r }, i) {
|
|
|
961
961
|
});
|
|
962
962
|
//#endregion
|
|
963
963
|
//#region src/l5-organisms/data-list.tsx
|
|
964
|
-
function
|
|
964
|
+
function Ce({ items: e, layout: r = "vertical", striped: i = !1, glass: a, className: o }) {
|
|
965
965
|
let s = r === "horizontal";
|
|
966
966
|
return /* @__PURE__ */ j("div", {
|
|
967
967
|
className: t("gds-radius-popover border border-border overflow-hidden", a !== void 0 && a !== !1 ? t("border-white/10 bg-bg/60", n(a)) : "", o),
|
|
@@ -981,7 +981,7 @@ function Se({ items: e, layout: r = "vertical", striped: i = !1, glass: a, class
|
|
|
981
981
|
}
|
|
982
982
|
//#endregion
|
|
983
983
|
//#region src/l5-organisms/data-table/data-table-utils.ts
|
|
984
|
-
function
|
|
984
|
+
function Q(e) {
|
|
985
985
|
return e.label ?? e.header ?? e.key;
|
|
986
986
|
}
|
|
987
987
|
function we(e, t, n) {
|
|
@@ -1012,7 +1012,7 @@ function De(e, t, n) {
|
|
|
1012
1012
|
return r.length === 0 ? null : n === "count" ? r.length : n === "sum" ? r.reduce((e, t) => e + t, 0) : n === "avg" ? r.reduce((e, t) => e + t, 0) / r.length : n === "min" ? Math.min(...r) : n === "max" ? Math.max(...r) : null;
|
|
1013
1013
|
}
|
|
1014
1014
|
function Oe(e, t, n) {
|
|
1015
|
-
let r = e.filter((e) => e.hidden !== !0), i = r.map((e) =>
|
|
1015
|
+
let r = e.filter((e) => e.hidden !== !0), i = r.map((e) => Q(e)), a = t.map((e) => r.map((t) => {
|
|
1016
1016
|
let n = e[t.key], r = String(n ?? "");
|
|
1017
1017
|
return r.includes(",") || r.includes("\"") || r.includes("\n") ? `"${r.replace(/"/g, "\"\"")}"` : r;
|
|
1018
1018
|
})), o = [i.join(","), ...a.map((e) => e.join(","))].join("\n"), s = new Blob([o], { type: "text/csv;charset=utf-8;" }), c = URL.createObjectURL(s), l = document.createElement("a");
|
|
@@ -1206,7 +1206,7 @@ function Le({ columns: e, density: n, sortKey: r, sortDir: i, onSort: a, stickyH
|
|
|
1206
1206
|
onClick: () => {
|
|
1207
1207
|
e.sortable === !0 && a !== void 0 && a(e.key);
|
|
1208
1208
|
},
|
|
1209
|
-
children: [
|
|
1209
|
+
children: [Q(e), e.sortable === !0 && /* @__PURE__ */ j(Ie, { dir: r === e.key ? i : void 0 })]
|
|
1210
1210
|
}, e.key)),
|
|
1211
1211
|
f && /* @__PURE__ */ j("th", { className: t(_.th, v, "w-12") })
|
|
1212
1212
|
]
|
|
@@ -1318,16 +1318,30 @@ function ze({ children: e, disabled: n, onClick: r, label: a }) {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
//#endregion
|
|
1320
1320
|
//#region src/l5-organisms/data-table/data-table-toolbar.tsx
|
|
1321
|
-
function Be({ globalFilter: e, globalFilterValue: n, globalFilterPlaceholder: r = "Search...", onGlobalFilterChange: i, columnToggle: a, columns: o, hiddenColumns: s, onToggleColumn: c, exportCsv: l, onExport: u, batchActions: d, selectedKeys: f, caption: p }) {
|
|
1322
|
-
let [
|
|
1323
|
-
return e === !0 || a === !0 || l === !0 || p !== void 0 || g ? /* @__PURE__ */ M("div", {
|
|
1321
|
+
function Be({ globalFilter: e, globalFilterValue: n, globalFilterPlaceholder: r = "Search...", onGlobalFilterChange: i, columnToggle: a, columns: o, hiddenColumns: s, onToggleColumn: c, exportCsv: l, onExport: u, batchActions: d, selectedKeys: f, caption: p, title: m, subtitle: h, toolbarActions: g }) {
|
|
1322
|
+
let [_, v] = O(!1), y = f !== void 0 && f.size > 0;
|
|
1323
|
+
return e === !0 || a === !0 || l === !0 || p !== void 0 || m !== void 0 || g !== void 0 || y ? /* @__PURE__ */ M("div", {
|
|
1324
1324
|
className: "flex items-center gap-2 border-b border-border px-3 py-2",
|
|
1325
1325
|
children: [
|
|
1326
1326
|
p !== void 0 && /* @__PURE__ */ j("span", {
|
|
1327
1327
|
className: "text-xs font-semibold text-fg",
|
|
1328
1328
|
children: p
|
|
1329
1329
|
}),
|
|
1330
|
-
|
|
1330
|
+
p === void 0 && m !== void 0 && /* @__PURE__ */ M("div", {
|
|
1331
|
+
className: "flex items-baseline gap-2",
|
|
1332
|
+
children: [/* @__PURE__ */ j("span", {
|
|
1333
|
+
className: "text-xs font-semibold text-fg",
|
|
1334
|
+
children: m
|
|
1335
|
+
}), h !== void 0 && /* @__PURE__ */ j("span", {
|
|
1336
|
+
className: "text-[11px] text-fg-muted",
|
|
1337
|
+
children: h
|
|
1338
|
+
})]
|
|
1339
|
+
}),
|
|
1340
|
+
g !== void 0 && /* @__PURE__ */ j("div", {
|
|
1341
|
+
className: "flex items-center gap-1",
|
|
1342
|
+
children: g
|
|
1343
|
+
}),
|
|
1344
|
+
y && d !== void 0 && /* @__PURE__ */ M("div", {
|
|
1331
1345
|
className: "flex items-center gap-2",
|
|
1332
1346
|
children: [/* @__PURE__ */ M("span", {
|
|
1333
1347
|
className: "text-[11px] text-fg-muted",
|
|
@@ -1352,7 +1366,7 @@ function Be({ globalFilter: e, globalFilterValue: n, globalFilterPlaceholder: r
|
|
|
1352
1366
|
className: "relative",
|
|
1353
1367
|
children: [/* @__PURE__ */ j("button", {
|
|
1354
1368
|
className: t("rounded p-1 text-fg-muted transition-colors hover:bg-bg-tertiary hover:text-fg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
1355
|
-
onClick: () =>
|
|
1369
|
+
onClick: () => v((e) => !e),
|
|
1356
1370
|
title: "Toggle columns",
|
|
1357
1371
|
type: "button",
|
|
1358
1372
|
children: /* @__PURE__ */ j("svg", {
|
|
@@ -1366,7 +1380,7 @@ function Be({ globalFilter: e, globalFilterValue: n, globalFilterPlaceholder: r
|
|
|
1366
1380
|
strokeLinecap: "round"
|
|
1367
1381
|
})
|
|
1368
1382
|
})
|
|
1369
|
-
}),
|
|
1383
|
+
}), _ && /* @__PURE__ */ j("div", {
|
|
1370
1384
|
className: "absolute right-0 top-full z-50 mt-1 min-w-40 rounded border border-border bg-bg p-1 shadow-lg",
|
|
1371
1385
|
children: o.map((e) => /* @__PURE__ */ M("label", {
|
|
1372
1386
|
className: "flex items-center gap-2 rounded px-2 py-1 text-[11px] text-fg hover:bg-bg-tertiary",
|
|
@@ -1375,7 +1389,7 @@ function Be({ globalFilter: e, globalFilterValue: n, globalFilterPlaceholder: r
|
|
|
1375
1389
|
checked: s === void 0 || !s.has(e.key),
|
|
1376
1390
|
onChange: () => c?.(e.key),
|
|
1377
1391
|
className: "accent-accent"
|
|
1378
|
-
}),
|
|
1392
|
+
}), Q(e)]
|
|
1379
1393
|
}, e.key))
|
|
1380
1394
|
})]
|
|
1381
1395
|
}),
|
|
@@ -1405,116 +1419,119 @@ function Be({ globalFilter: e, globalFilterValue: n, globalFilterPlaceholder: r
|
|
|
1405
1419
|
//#endregion
|
|
1406
1420
|
//#region src/l5-organisms/data-table/data-table.tsx
|
|
1407
1421
|
function Ve(n, r) {
|
|
1408
|
-
let { columns: i, className: a, glass: o, rows: s, data: c, emptyMessage: l, emptyText: u, sortKey: d, sortDir: f, onSort: p, page: m, pageSize: h, pageSizeOptions: g, totalRows: _, onPageChange: v, onPageSizeChange: y, selectable: b, selectedKeys: x, onToggleSelect: S, onToggleSelectAll: C, globalFilter: w, globalFilterValue: T, globalFilterPlaceholder: D, onGlobalFilterChange: k, highlightMatches: A, columnFilters: N, onColumnFilterChange: P, expandedKeys: F, onToggleExpand: I, renderExpanded: ee, batchActions:
|
|
1409
|
-
function
|
|
1410
|
-
|
|
1422
|
+
let { columns: i, className: a, glass: o, rows: s, data: c, emptyMessage: l, emptyText: u, sortKey: d, sortDir: f, onSort: p, page: m, pageSize: h, pageSizeOptions: g, totalRows: _, onPageChange: v, onPageSizeChange: y, selectable: b, selectedKeys: x, onToggleSelect: S, onToggleSelectAll: C, globalFilter: w, globalFilterValue: T, globalFilterPlaceholder: D, onGlobalFilterChange: k, highlightMatches: A, columnFilters: N, onColumnFilterChange: P, expandedKeys: F, onToggleExpand: I, renderExpanded: ee, batchActions: L, columnToggle: R, exportCsv: z, exportFilename: B = "export", density: V, striped: H, bordered: U, stickyHeader: W, rowNumbers: te, highlightOnHover: ne, rowKey: G, getRowClassName: K, getRowHidden: q, onRowClick: re, loading: J, loadingRows: ie, error: ae, emptyIcon: oe, caption: se, title: ce, subtitle: le, toolbarActions: ue, footer: de, actions: fe } = n, pe = s ?? c, me = E(() => pe ?? [], [pe]), he = l ?? u ?? "No data", [ge, _e] = O(/* @__PURE__ */ new Set());
|
|
1423
|
+
function ve(e) {
|
|
1424
|
+
_e((t) => {
|
|
1411
1425
|
let n = new Set(t);
|
|
1412
1426
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1413
1427
|
});
|
|
1414
1428
|
}
|
|
1415
|
-
let
|
|
1416
|
-
if (!
|
|
1417
|
-
let e = (
|
|
1418
|
-
return
|
|
1429
|
+
let ye = E(() => i.filter((e) => e.hidden !== !0 && !ge.has(e.key)), [i, ge]), Y = E(() => q === void 0 ? me : me.filter((e) => !q(e)), [me, q]), X = h !== void 0 && v !== void 0, be = m ?? 1, Z = h ?? Y.length, xe = _ ?? Y.length, Se = Math.max(1, Math.ceil(xe / Z)), Ce = E(() => {
|
|
1430
|
+
if (!X || _ !== void 0) return Y;
|
|
1431
|
+
let e = (be - 1) * Z;
|
|
1432
|
+
return Y.slice(e, e + Z);
|
|
1419
1433
|
}, [
|
|
1420
|
-
q,
|
|
1421
|
-
J,
|
|
1422
1434
|
Y,
|
|
1423
1435
|
X,
|
|
1424
|
-
|
|
1425
|
-
]), Q = J && _ === void 0 ? (Y - 1) * X : 0, xe = b === !0 && S !== void 0, Se = E(() => Z.map((e, t) => we(e, U, Q + t)), [
|
|
1436
|
+
be,
|
|
1426
1437
|
Z,
|
|
1427
|
-
|
|
1438
|
+
_
|
|
1439
|
+
]), Q = X && _ === void 0 ? (be - 1) * Z : 0, Te = b === !0 && S !== void 0, Ee = E(() => Ce.map((e, t) => we(e, G, Q + t)), [
|
|
1440
|
+
Ce,
|
|
1441
|
+
G,
|
|
1428
1442
|
Q
|
|
1429
|
-
]),
|
|
1430
|
-
function
|
|
1431
|
-
C !== void 0 && C(
|
|
1443
|
+
]), De = Te && x !== void 0 && x.size > 0 && Ee.every((e) => x.has(e)), ke = Te && x !== void 0 && x.size > 0;
|
|
1444
|
+
function Ae() {
|
|
1445
|
+
C !== void 0 && C(De);
|
|
1432
1446
|
}
|
|
1433
|
-
let
|
|
1434
|
-
function
|
|
1435
|
-
Oe(
|
|
1447
|
+
let je = A !== !1 && w === !0 ? T : void 0;
|
|
1448
|
+
function Me() {
|
|
1449
|
+
Oe(ye, Y, B);
|
|
1436
1450
|
}
|
|
1437
1451
|
return /* @__PURE__ */ M("div", {
|
|
1438
1452
|
ref: r,
|
|
1439
1453
|
className: t("overflow-hidden gds-radius-popover border", o === !0 ? t(e(o), "bg-bg/60") : "border-border bg-surface", a),
|
|
1440
1454
|
"data-component": "data-table",
|
|
1441
|
-
"data-state":
|
|
1455
|
+
"data-state": J === !0 ? "loading" : void 0,
|
|
1442
1456
|
children: [
|
|
1443
1457
|
/* @__PURE__ */ j(Be, {
|
|
1444
1458
|
globalFilter: w,
|
|
1445
1459
|
globalFilterValue: T,
|
|
1446
1460
|
globalFilterPlaceholder: D,
|
|
1447
1461
|
onGlobalFilterChange: k,
|
|
1448
|
-
columnToggle:
|
|
1462
|
+
columnToggle: R,
|
|
1449
1463
|
columns: i,
|
|
1450
|
-
hiddenColumns:
|
|
1451
|
-
onToggleColumn:
|
|
1452
|
-
exportCsv:
|
|
1453
|
-
onExport:
|
|
1454
|
-
batchActions:
|
|
1464
|
+
hiddenColumns: ge,
|
|
1465
|
+
onToggleColumn: ve,
|
|
1466
|
+
exportCsv: z,
|
|
1467
|
+
onExport: Me,
|
|
1468
|
+
batchActions: L,
|
|
1455
1469
|
selectedKeys: x,
|
|
1456
|
-
caption:
|
|
1470
|
+
caption: se,
|
|
1471
|
+
title: ce,
|
|
1472
|
+
subtitle: le,
|
|
1473
|
+
toolbarActions: ue
|
|
1457
1474
|
}),
|
|
1458
1475
|
/* @__PURE__ */ j("div", {
|
|
1459
1476
|
className: "overflow-auto",
|
|
1460
1477
|
children: /* @__PURE__ */ M("table", {
|
|
1461
1478
|
className: "w-full border-collapse",
|
|
1462
1479
|
children: [/* @__PURE__ */ j(Le, {
|
|
1463
|
-
columns:
|
|
1464
|
-
density:
|
|
1480
|
+
columns: ye,
|
|
1481
|
+
density: V,
|
|
1465
1482
|
sortKey: d,
|
|
1466
1483
|
sortDir: f,
|
|
1467
1484
|
onSort: p,
|
|
1468
|
-
stickyHeader:
|
|
1469
|
-
rowNumbers:
|
|
1470
|
-
hasSelection:
|
|
1471
|
-
allSelected:
|
|
1472
|
-
someSelected:
|
|
1473
|
-
onToggleSelectAll:
|
|
1474
|
-
hasActions:
|
|
1485
|
+
stickyHeader: W,
|
|
1486
|
+
rowNumbers: te,
|
|
1487
|
+
hasSelection: Te,
|
|
1488
|
+
allSelected: De,
|
|
1489
|
+
someSelected: ke,
|
|
1490
|
+
onToggleSelectAll: Ae,
|
|
1491
|
+
hasActions: fe !== void 0,
|
|
1475
1492
|
hasExpand: ee !== void 0 && I !== void 0,
|
|
1476
|
-
bordered:
|
|
1493
|
+
bordered: U,
|
|
1477
1494
|
columnFilters: N,
|
|
1478
1495
|
onColumnFilterChange: P
|
|
1479
1496
|
}), /* @__PURE__ */ j(Pe, {
|
|
1480
|
-
columns:
|
|
1481
|
-
rows:
|
|
1482
|
-
density:
|
|
1483
|
-
loading:
|
|
1484
|
-
loadingRows:
|
|
1485
|
-
error:
|
|
1486
|
-
emptyMessage:
|
|
1487
|
-
emptyIcon:
|
|
1488
|
-
striped:
|
|
1489
|
-
bordered:
|
|
1490
|
-
highlightOnHover:
|
|
1491
|
-
rowNumbers:
|
|
1492
|
-
rowKey:
|
|
1493
|
-
getRowClassName:
|
|
1494
|
-
onRowClick:
|
|
1495
|
-
hasSelection:
|
|
1497
|
+
columns: ye,
|
|
1498
|
+
rows: Ce,
|
|
1499
|
+
density: V,
|
|
1500
|
+
loading: J,
|
|
1501
|
+
loadingRows: ie,
|
|
1502
|
+
error: ae,
|
|
1503
|
+
emptyMessage: he,
|
|
1504
|
+
emptyIcon: oe,
|
|
1505
|
+
striped: H,
|
|
1506
|
+
bordered: U,
|
|
1507
|
+
highlightOnHover: ne,
|
|
1508
|
+
rowNumbers: te,
|
|
1509
|
+
rowKey: G,
|
|
1510
|
+
getRowClassName: K,
|
|
1511
|
+
onRowClick: re,
|
|
1512
|
+
hasSelection: Te,
|
|
1496
1513
|
selectedKeys: x,
|
|
1497
1514
|
onToggleSelect: S,
|
|
1498
1515
|
expandedKeys: F,
|
|
1499
1516
|
onToggleExpand: I,
|
|
1500
1517
|
renderExpanded: ee,
|
|
1501
|
-
actions:
|
|
1502
|
-
highlightQuery:
|
|
1518
|
+
actions: fe,
|
|
1519
|
+
highlightQuery: je,
|
|
1503
1520
|
pageOffset: Q
|
|
1504
1521
|
})]
|
|
1505
1522
|
})
|
|
1506
1523
|
}),
|
|
1507
|
-
|
|
1524
|
+
de !== void 0 && /* @__PURE__ */ j("div", {
|
|
1508
1525
|
className: "border-t border-border px-3 py-2 text-xs text-fg-muted",
|
|
1509
|
-
children:
|
|
1526
|
+
children: de
|
|
1510
1527
|
}),
|
|
1511
|
-
|
|
1512
|
-
currentPage:
|
|
1513
|
-
totalPages:
|
|
1514
|
-
totalRows:
|
|
1515
|
-
pageSize:
|
|
1528
|
+
X && /* @__PURE__ */ j(Re, {
|
|
1529
|
+
currentPage: be,
|
|
1530
|
+
totalPages: Se,
|
|
1531
|
+
totalRows: xe,
|
|
1532
|
+
pageSize: Z,
|
|
1516
1533
|
pageSizeOptions: g,
|
|
1517
|
-
visibleRowCount:
|
|
1534
|
+
visibleRowCount: Ce.length,
|
|
1518
1535
|
onPageChange: v,
|
|
1519
1536
|
onPageSizeChange: y
|
|
1520
1537
|
})
|
|
@@ -1560,7 +1577,7 @@ var We = C(function({ value: e, onChange: r, placeholder: a = "Select date", min
|
|
|
1560
1577
|
}), e === void 0 ? a : Ue(e)]
|
|
1561
1578
|
}), d && /* @__PURE__ */ j("div", {
|
|
1562
1579
|
className: "absolute left-0 top-full z-50 mt-1 animate-popup",
|
|
1563
|
-
children: /* @__PURE__ */ j(
|
|
1580
|
+
children: /* @__PURE__ */ j(K, {
|
|
1564
1581
|
value: e,
|
|
1565
1582
|
onChange: _,
|
|
1566
1583
|
min: o,
|
|
@@ -2264,25 +2281,25 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2264
2281
|
h,
|
|
2265
2282
|
g,
|
|
2266
2283
|
o
|
|
2267
|
-
]),
|
|
2284
|
+
]), L = E(() => {
|
|
2268
2285
|
if (P.length === 0) return 0;
|
|
2269
2286
|
let e = P[P.length - 1];
|
|
2270
2287
|
if (g === "day") return e.getTime() + $;
|
|
2271
2288
|
if (g === "week") return e.getTime() + $ * 7;
|
|
2272
2289
|
let t = new Date(e);
|
|
2273
2290
|
return t.setMonth(t.getMonth() + 1), t.getTime();
|
|
2274
|
-
}, [P, g]),
|
|
2291
|
+
}, [P, g]), R = L - F, z = E(() => I <= 0 ? 0 : R / I, [R, I]), B = w((e) => R <= 0 ? 0 : (mt(e) - F) / R * I, [
|
|
2275
2292
|
F,
|
|
2276
|
-
|
|
2293
|
+
R,
|
|
2277
2294
|
I
|
|
2278
|
-
]),
|
|
2295
|
+
]), V = E(() => {
|
|
2279
2296
|
let e = /* @__PURE__ */ new Map(), t = 0;
|
|
2280
2297
|
return N.forEach((n) => {
|
|
2281
2298
|
if (n.kind === "group") {
|
|
2282
2299
|
t++;
|
|
2283
2300
|
return;
|
|
2284
2301
|
}
|
|
2285
|
-
let i = n.task, a =
|
|
2302
|
+
let i = n.task, a = B(i.start), o = i.milestone ? a : B(i.end), s = Math.max(o - a, 2), c = r + t * u + u / 2;
|
|
2286
2303
|
e.set(i.id, {
|
|
2287
2304
|
w: s,
|
|
2288
2305
|
x: a,
|
|
@@ -2291,22 +2308,22 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2291
2308
|
}), e;
|
|
2292
2309
|
}, [
|
|
2293
2310
|
N,
|
|
2294
|
-
|
|
2311
|
+
B,
|
|
2295
2312
|
r,
|
|
2296
2313
|
u
|
|
2297
|
-
]),
|
|
2314
|
+
]), H = E(() => {
|
|
2298
2315
|
if (!m) return null;
|
|
2299
2316
|
let e = /* @__PURE__ */ new Date();
|
|
2300
2317
|
e.setHours(12, 0, 0, 0);
|
|
2301
2318
|
let t = e.getTime();
|
|
2302
|
-
return t < F || t >
|
|
2319
|
+
return t < F || t > L ? null : (t - F) / R * I;
|
|
2303
2320
|
}, [
|
|
2304
2321
|
m,
|
|
2305
2322
|
F,
|
|
2306
|
-
te,
|
|
2307
2323
|
L,
|
|
2324
|
+
R,
|
|
2308
2325
|
I
|
|
2309
|
-
]),
|
|
2326
|
+
]), U = a ?? r + N.length * u + 8, W = Math.round(u * .56), te = Math.round((u - W) / 2), ne = w((e, t, r) => {
|
|
2310
2327
|
if (!n) return;
|
|
2311
2328
|
r.preventDefault(), r.stopPropagation();
|
|
2312
2329
|
let i = h.find((t) => t.id === e);
|
|
@@ -2317,13 +2334,13 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2317
2334
|
taskId: e,
|
|
2318
2335
|
type: t
|
|
2319
2336
|
}), b(null));
|
|
2320
|
-
}, [n, h]),
|
|
2337
|
+
}, [n, h]), G = D(0);
|
|
2321
2338
|
T(() => {
|
|
2322
2339
|
if (x === null) return;
|
|
2323
2340
|
let e = (e) => {
|
|
2324
|
-
|
|
2341
|
+
G.current = e.clientX - x.startX, S((e) => e === null ? null : { ...e });
|
|
2325
2342
|
}, t = (e) => {
|
|
2326
|
-
let t = Math.round((e.clientX - x.startX) *
|
|
2343
|
+
let t = Math.round((e.clientX - x.startX) * z);
|
|
2327
2344
|
if (x.type === "move") {
|
|
2328
2345
|
let e = new Date(x.origStart.getTime() + t), n = new Date(x.origEnd.getTime() + t);
|
|
2329
2346
|
c?.(x.taskId, e, n);
|
|
@@ -2331,20 +2348,20 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2331
2348
|
let e = Math.max(x.origStart.getTime() + $, x.origEnd.getTime() + t);
|
|
2332
2349
|
l?.(x.taskId, new Date(e));
|
|
2333
2350
|
}
|
|
2334
|
-
|
|
2351
|
+
G.current = 0, S(null);
|
|
2335
2352
|
};
|
|
2336
2353
|
return window.addEventListener("mousemove", e), window.addEventListener("mouseup", t), () => {
|
|
2337
2354
|
window.removeEventListener("mousemove", e), window.removeEventListener("mouseup", t);
|
|
2338
2355
|
};
|
|
2339
2356
|
}, [
|
|
2340
2357
|
x,
|
|
2341
|
-
|
|
2358
|
+
z,
|
|
2342
2359
|
c,
|
|
2343
2360
|
l
|
|
2344
2361
|
]);
|
|
2345
|
-
let
|
|
2362
|
+
let K = E(() => {
|
|
2346
2363
|
if (x === null) return null;
|
|
2347
|
-
let e = Math.round(
|
|
2364
|
+
let e = Math.round(G.current * z);
|
|
2348
2365
|
if (x.type === "move") return {
|
|
2349
2366
|
end: new Date(x.origEnd.getTime() + e),
|
|
2350
2367
|
start: new Date(x.origStart.getTime() + e),
|
|
@@ -2356,7 +2373,7 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2356
2373
|
start: x.origStart,
|
|
2357
2374
|
taskId: x.taskId
|
|
2358
2375
|
};
|
|
2359
|
-
}, [x,
|
|
2376
|
+
}, [x, z]), q = w((e, t) => {
|
|
2360
2377
|
if (x !== null) return;
|
|
2361
2378
|
let n = C.current?.getBoundingClientRect();
|
|
2362
2379
|
n !== void 0 && b({
|
|
@@ -2364,14 +2381,14 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2364
2381
|
x: t.clientX - n.left + 12,
|
|
2365
2382
|
y: t.clientY - n.top - 8
|
|
2366
2383
|
});
|
|
2367
|
-
}, [x]),
|
|
2384
|
+
}, [x]), re = w(() => {
|
|
2368
2385
|
b(null);
|
|
2369
|
-
}, []),
|
|
2386
|
+
}, []), J = bt(g);
|
|
2370
2387
|
return /* @__PURE__ */ M("div", {
|
|
2371
2388
|
className: t("relative overflow-hidden rounded border border-border bg-bg select-none", e),
|
|
2372
2389
|
"data-component": "gantt-chart",
|
|
2373
2390
|
ref: C,
|
|
2374
|
-
style: { height:
|
|
2391
|
+
style: { height: U },
|
|
2375
2392
|
children: [
|
|
2376
2393
|
/* @__PURE__ */ j("div", {
|
|
2377
2394
|
className: "sticky left-0 z-20 border-r border-b border-border bg-surface",
|
|
@@ -2388,10 +2405,10 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2388
2405
|
}),
|
|
2389
2406
|
/* @__PURE__ */ j("div", {
|
|
2390
2407
|
className: "overflow-x-auto",
|
|
2391
|
-
style: { height:
|
|
2408
|
+
style: { height: U },
|
|
2392
2409
|
children: /* @__PURE__ */ M("div", {
|
|
2393
2410
|
style: {
|
|
2394
|
-
minHeight:
|
|
2411
|
+
minHeight: U,
|
|
2395
2412
|
position: "relative",
|
|
2396
2413
|
width: ee
|
|
2397
2414
|
},
|
|
@@ -2412,7 +2429,7 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2412
2429
|
className: t("flex shrink-0 items-center justify-center border-r border-border text-[10px] text-fg-muted", n % 2 == 0 ? "bg-surface" : "bg-bg"),
|
|
2413
2430
|
style: {
|
|
2414
2431
|
height: r,
|
|
2415
|
-
width:
|
|
2432
|
+
width: J
|
|
2416
2433
|
},
|
|
2417
2434
|
children: xt(e, g)
|
|
2418
2435
|
}, e.getTime()))
|
|
@@ -2460,7 +2477,7 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2460
2477
|
backgroundColor: t % 2 == 0 ? "transparent" : "var(--gds-surface)",
|
|
2461
2478
|
height: u,
|
|
2462
2479
|
opacity: t % 2 == 0 ? 1 : .15,
|
|
2463
|
-
width:
|
|
2480
|
+
width: J
|
|
2464
2481
|
}
|
|
2465
2482
|
}, e.getTime()))
|
|
2466
2483
|
}, `row-bg-${n}`)), /* @__PURE__ */ M("svg", {
|
|
@@ -2473,9 +2490,9 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2473
2490
|
if (e.kind !== "task") return null;
|
|
2474
2491
|
let t = e.task;
|
|
2475
2492
|
if (t.dependencies === void 0 || t.dependencies.length === 0) return null;
|
|
2476
|
-
let n =
|
|
2493
|
+
let n = V.get(t.id);
|
|
2477
2494
|
return n === void 0 ? null : t.dependencies.map((e) => {
|
|
2478
|
-
let i =
|
|
2495
|
+
let i = V.get(e);
|
|
2479
2496
|
if (i === void 0) return null;
|
|
2480
2497
|
let a = i.x + i.w, o = i.y - r, s = n.x, c = n.y - r, l = a + (s - a) / 2;
|
|
2481
2498
|
return /* @__PURE__ */ M("g", {
|
|
@@ -2496,16 +2513,16 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2496
2513
|
}),
|
|
2497
2514
|
N.map((e, r) => {
|
|
2498
2515
|
if (e.kind !== "task") return null;
|
|
2499
|
-
let i = e.task, a =
|
|
2516
|
+
let i = e.task, a = K !== null && K.taskId === i.id, o = a ? K.start : i.start, c = a ? K.end : i.end, l = B(o), d = B(c), f = r * u + te, m = i.color ?? pt[e.index % pt.length], h = A.has(i.id);
|
|
2500
2517
|
if (i.milestone) {
|
|
2501
|
-
let e =
|
|
2518
|
+
let e = W * .5, t = f + W / 2;
|
|
2502
2519
|
return /* @__PURE__ */ M("g", {
|
|
2503
2520
|
className: "pointer-events-auto cursor-pointer",
|
|
2504
2521
|
"data-critical-path": h ? "true" : void 0,
|
|
2505
2522
|
"data-milestone": i.id,
|
|
2506
2523
|
onClick: () => s?.(i),
|
|
2507
|
-
onMouseEnter: (e) =>
|
|
2508
|
-
onMouseLeave:
|
|
2524
|
+
onMouseEnter: (e) => q(i, e),
|
|
2525
|
+
onMouseLeave: re,
|
|
2509
2526
|
children: [h && /* @__PURE__ */ j("rect", {
|
|
2510
2527
|
fill: "var(--gds-danger)",
|
|
2511
2528
|
fillOpacity: .25,
|
|
@@ -2533,14 +2550,14 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2533
2550
|
onClick: () => {
|
|
2534
2551
|
x === null && s?.(i);
|
|
2535
2552
|
},
|
|
2536
|
-
onMouseDown: (e) =>
|
|
2537
|
-
onMouseEnter: (e) =>
|
|
2538
|
-
onMouseLeave:
|
|
2553
|
+
onMouseDown: (e) => ne(i.id, "move", e),
|
|
2554
|
+
onMouseEnter: (e) => q(i, e),
|
|
2555
|
+
onMouseLeave: re,
|
|
2539
2556
|
children: [
|
|
2540
2557
|
h && /* @__PURE__ */ j("rect", {
|
|
2541
2558
|
"data-testid": `critical-border-${i.id}`,
|
|
2542
2559
|
fill: "var(--gds-danger)",
|
|
2543
|
-
height:
|
|
2560
|
+
height: W,
|
|
2544
2561
|
rx: 3,
|
|
2545
2562
|
width: 3,
|
|
2546
2563
|
x: l,
|
|
@@ -2549,7 +2566,7 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2549
2566
|
/* @__PURE__ */ j("rect", {
|
|
2550
2567
|
fill: m,
|
|
2551
2568
|
fillOpacity: v ? .5 : .3,
|
|
2552
|
-
height:
|
|
2569
|
+
height: W,
|
|
2553
2570
|
rx: 3,
|
|
2554
2571
|
width: g,
|
|
2555
2572
|
x: l,
|
|
@@ -2559,7 +2576,7 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2559
2576
|
"data-progress": i.progress,
|
|
2560
2577
|
fill: m,
|
|
2561
2578
|
fillOpacity: .85,
|
|
2562
|
-
height:
|
|
2579
|
+
height: W,
|
|
2563
2580
|
rx: 3,
|
|
2564
2581
|
width: Math.min(_, g),
|
|
2565
2582
|
x: l,
|
|
@@ -2569,9 +2586,9 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2569
2586
|
className: "cursor-ew-resize",
|
|
2570
2587
|
"data-resize-handle": i.id,
|
|
2571
2588
|
fill: "transparent",
|
|
2572
|
-
height:
|
|
2589
|
+
height: W,
|
|
2573
2590
|
onMouseDown: (e) => {
|
|
2574
|
-
e.stopPropagation(),
|
|
2591
|
+
e.stopPropagation(), ne(i.id, "resize", e);
|
|
2575
2592
|
},
|
|
2576
2593
|
width: 6,
|
|
2577
2594
|
x: l + g - 6,
|
|
@@ -2582,19 +2599,19 @@ function Ct({ className: e, editable: n = !1, headerHeight: r = 40, height: a, l
|
|
|
2582
2599
|
fill: "var(--gds-fg-muted)",
|
|
2583
2600
|
fontSize: 9,
|
|
2584
2601
|
x: l + g + 6,
|
|
2585
|
-
y: f +
|
|
2602
|
+
y: f + W / 2,
|
|
2586
2603
|
children: i.assignee
|
|
2587
2604
|
})
|
|
2588
2605
|
]
|
|
2589
2606
|
}, i.id);
|
|
2590
2607
|
}),
|
|
2591
|
-
|
|
2608
|
+
H !== null && /* @__PURE__ */ j("line", {
|
|
2592
2609
|
"data-testid": "today-line",
|
|
2593
2610
|
stroke: "var(--gds-danger)",
|
|
2594
2611
|
strokeDasharray: "4,3",
|
|
2595
2612
|
strokeWidth: 1.5,
|
|
2596
|
-
x1:
|
|
2597
|
-
x2:
|
|
2613
|
+
x1: H,
|
|
2614
|
+
x2: H,
|
|
2598
2615
|
y1: 0,
|
|
2599
2616
|
y2: N.length * u
|
|
2600
2617
|
})
|
|
@@ -4933,6 +4950,6 @@ var hr = C(mr), gr = C(function({ className: e, condition: n, icon: r, location:
|
|
|
4933
4950
|
});
|
|
4934
4951
|
});
|
|
4935
4952
|
//#endregion
|
|
4936
|
-
export { Et as $, gn as A,
|
|
4953
|
+
export { Et as $, gn as A, L as At, en as B, xn as C, se as Ct, mn as D, V as Dt, un as E, K as Et, fn as F, qt as G, Qt as H, cn as I, Wt as J, Kt as K, rn as L, pn as M, N as Mt, hn as N, vn as O, B as Ot, ln as P, Nt as Q, nn as R, Tn as S, le as St, bn as T, J as Tt, Zt as U, $t as V, Xt as W, Ft as X, zt as Y, It as Z, zn as _, Z as _t, nr as a, ct as at, On as b, he as bt, Zn as c, tt as ct, Jn as d, qe as dt, Tt as et, qn as f, Ke as ft, Bn as g, Se as gt, Un as h, Ce as ht, ar as i, lt as it, dn as j, I as jt, _n as k, z as kt, Qn as l, et as lt, Wn as m, He as mt, hr as n, Ct as nt, er as o, it as ot, Gn as p, We as pt, Gt as q, pr as r, ft as rt, $n as s, rt as st, gr as t, wt as tt, Yn as u, $e as ut, Ln as v, Y as vt, yn as w, ae as wt, Dn as x, me as xt, jn as y, _e as yt, tn as z };
|
|
4937
4954
|
|
|
4938
|
-
//# sourceMappingURL=l5-organisms-
|
|
4955
|
+
//# sourceMappingURL=l5-organisms-Css3AvsZ.js.map
|