@base-framework/ui 1.0.188 → 1.0.189
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/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { V as A, a as w } from "./veil-D4dRxILB.js";
|
|
|
5
5
|
import { Icons as R } from "./icons.es.js";
|
|
6
6
|
import { A as O, B as G, C as V, t as j, E as q, v as z, w as J, x as _, D as K, j as Q, k as X, H as Y, G as Z, s as $, c as aa, a as sa, b as ea, I as ta, i as oa, g as ra, e as na, h as ia, F as la, d as pa, f as ua, u as ma, M as da, l as ga, N as Ta, P as ca, p as Ca, q as Da, S as ba, n as Ia, o as Sa, T as Ba, y as Pa, z as Fa, m as Ma, r as ka } from "./empty-state-DYNdBFtp.js";
|
|
7
7
|
import { A as va, b as fa, C as xa, D as ya, a as ha, F as Wa, M as Ha, P as La, c as Aa, g as wa, p as Ua } from "./calendar-DQXME-2u.js";
|
|
8
|
-
import { B as Ea, p as Oa, C as Ga, j as Va, D as ja, m as qa, k as za, H as Ja, I as _a, N as Ka, O as Qa, P as Xa, S as Ya, n as Za, o as $a, t as as, s as ss, q as es, r as ts, T as os, l as rs, U as ns, W as is, f as ls, h as ps, i as us, c as ms, d as ds, b as gs, e as Ts, a as cs, g as Cs } from "./signature-panel-
|
|
8
|
+
import { B as Ea, p as Oa, C as Ga, j as Va, D as ja, m as qa, k as za, H as Ja, I as _a, N as Ka, O as Qa, P as Xa, S as Ya, n as Za, o as $a, t as as, s as ss, q as es, r as ts, T as os, l as rs, U as ns, W as is, f as ls, h as ps, i as us, c as ms, d as ds, b as gs, e as Ts, a as cs, g as Cs } from "./signature-panel-QCv3BDfZ.js";
|
|
9
9
|
import { B as bs, I as Is, M as Ss, d as Bs, e as Ps, g as Fs, N as Ms, b as ks, a as Ns, f as vs, P as fs, c as xs, S as ys, T as hs } from "./mobile-nav-wrapper-Dj67Pb8l.js";
|
|
10
10
|
import { B as Hs, a as Ls, C as As, F as ws, b as Us, c as Rs, M as Es, P as Os, S as Gs } from "./sidebar-menu-page-BVryQj2Z.js";
|
|
11
11
|
import { A as js, F as qs, M as zs, a as Js, T as _s } from "./aside-template-McEj_Gxc.js";
|
package/dist/organisms.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as p, O as u, P as v, S as D, n as g, o as N, t as k, s as c, q as C, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } from "./signature-panel-
|
|
1
|
+
import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as p, O as u, P as v, S as D, n as g, o as N, t as k, s as c, q as C, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } from "./signature-panel-QCv3BDfZ.js";
|
|
2
2
|
import { b as F, C as U, D as G, a as j, F as q, M as w, c as z, p as A } from "./calendar-DQXME-2u.js";
|
|
3
3
|
import { B as J, I as K, M as Q, d as R, e as V, g as X, N as Y, b as Z, a as _, f as $, P as aa, c as ea, S as sa, T as ta } from "./mobile-nav-wrapper-Dj67Pb8l.js";
|
|
4
4
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Button as x, Div as o, On as
|
|
2
|
-
import { Atom as d, Component as h, Data as
|
|
3
|
-
import { B as
|
|
1
|
+
import { Button as x, Div as o, On as v, Span as D, Th as O, UseParent as F, I as E, Thead as Q, Tr as X, Table as L, P as p, Li as S, Time as q, Nav as I, Ul as w, Section as z, Canvas as K } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as d, Component as h, Data as C, DateTime as G, router as y, NavLink as $, DataTracker as N, Jot as V, base as M, Dom as R } from "@base-framework/base";
|
|
3
|
+
import { B as T, I as _ } from "./buttons-Cm9etaEG.js";
|
|
4
4
|
import { Icons as k } from "./icons.es.js";
|
|
5
5
|
import { TableBody as J, DataTableBody as Z, ScrollableTableBody as ee, List as te, IntervalTimer as se } from "@base-framework/organisms";
|
|
6
6
|
import { C as ae, I as ie, H as ne } from "./inputs-CMjx5-IX.js";
|
|
@@ -58,7 +58,7 @@ const re = (t) => {
|
|
|
58
58
|
{ length: s },
|
|
59
59
|
(i, n) => new Date(t, e - 1, a - s + n + 1)
|
|
60
60
|
);
|
|
61
|
-
}, he = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)),
|
|
61
|
+
}, he = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), W = (t, e) => {
|
|
62
62
|
const s = new Date(e, 0, 4), a = (s.getDay() + 6) % 7, i = new Date(s);
|
|
63
63
|
i.setDate(s.getDate() - a);
|
|
64
64
|
const n = new Date(i);
|
|
@@ -95,15 +95,15 @@ const re = (t) => {
|
|
|
95
95
|
}, ge = (t, e) => {
|
|
96
96
|
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = de(t, e, s), n = Array.from({ length: a }, (r, m) => new Date(t, e, m + 1)), l = (i.length + n.length) % 7, u = l === 0 ? 0 : 7 - l, c = he(t, e, u), f = [...i, ...n, ...c], g = [];
|
|
97
97
|
for (let r = 0; r < f.length; r += 7) {
|
|
98
|
-
const m = f.slice(r, r + 7), b = m.find((
|
|
98
|
+
const m = f.slice(r, r + 7), b = m.find((H) => H) || new Date(t, e, 1), { weekNumber: U, year: Y } = ce(b);
|
|
99
99
|
g.push({
|
|
100
|
-
weekNumber:
|
|
101
|
-
year:
|
|
100
|
+
weekNumber: U,
|
|
101
|
+
year: Y,
|
|
102
102
|
days: m
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
return g;
|
|
106
|
-
}, me = ({ selectWeek: t }) =>
|
|
106
|
+
}, me = ({ selectWeek: t }) => v("month", (e, s, { data: a }) => {
|
|
107
107
|
const { year: i, month: n, currentDate: l } = a, u = ge(i, n);
|
|
108
108
|
return o(
|
|
109
109
|
{ class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
|
|
@@ -115,7 +115,7 @@ const re = (t) => {
|
|
|
115
115
|
class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
|
|
116
116
|
},
|
|
117
117
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
118
|
-
(c) =>
|
|
118
|
+
(c) => D({ class: "px-1 py-1", text: c })
|
|
119
119
|
)
|
|
120
120
|
),
|
|
121
121
|
// Render each "week" row
|
|
@@ -154,7 +154,7 @@ const re = (t) => {
|
|
|
154
154
|
)
|
|
155
155
|
]
|
|
156
156
|
);
|
|
157
|
-
}),
|
|
157
|
+
}), P = ({ label: t, click: e }) => T(
|
|
158
158
|
{
|
|
159
159
|
class: `
|
|
160
160
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -168,12 +168,12 @@ const re = (t) => {
|
|
|
168
168
|
icon: t === "Previous" ? k.chevron.single.left : k.chevron.single.right
|
|
169
169
|
}
|
|
170
170
|
), pe = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
D("[[monthName]] [[year]]"),
|
|
172
|
+
P({
|
|
173
173
|
label: "Previous",
|
|
174
174
|
click: e
|
|
175
175
|
}),
|
|
176
|
-
|
|
176
|
+
P({
|
|
177
177
|
label: "Next",
|
|
178
178
|
click: t
|
|
179
179
|
})
|
|
@@ -193,8 +193,8 @@ class ot extends h {
|
|
|
193
193
|
* @returns {Data}
|
|
194
194
|
*/
|
|
195
195
|
setData() {
|
|
196
|
-
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a =
|
|
197
|
-
return new
|
|
196
|
+
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = W(s, e.getFullYear());
|
|
197
|
+
return new C({
|
|
198
198
|
monthName: this.getMonthName(a.getMonth()),
|
|
199
199
|
year: a.getFullYear(),
|
|
200
200
|
month: a.getMonth(),
|
|
@@ -276,7 +276,7 @@ class ot extends h {
|
|
|
276
276
|
*/
|
|
277
277
|
selectWeek(e, s) {
|
|
278
278
|
this.data.currentWeek = e;
|
|
279
|
-
const a =
|
|
279
|
+
const a = W(e, s);
|
|
280
280
|
this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
@@ -299,20 +299,20 @@ class ot extends h {
|
|
|
299
299
|
const we = (t, e) => {
|
|
300
300
|
const s = t.toggleAllSelectedRows();
|
|
301
301
|
e.state.checked = !s;
|
|
302
|
-
}, be = (t) =>
|
|
302
|
+
}, be = (t) => O({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
|
|
303
303
|
F((e) => new ae({ class: "mr-2", onChange: (s, a) => we(e, a) }))
|
|
304
304
|
]), ye = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
|
|
305
305
|
const l = t || "justify-start";
|
|
306
|
-
return
|
|
306
|
+
return O({
|
|
307
307
|
class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
|
|
308
308
|
click: e && (() => i(s))
|
|
309
309
|
}, [
|
|
310
310
|
o({ class: `flex flex-auto w-full items-center ${l}` }, [
|
|
311
|
-
|
|
311
|
+
D(a),
|
|
312
312
|
e && E({ class: "ml-2", html: k.arrows.upDown })
|
|
313
313
|
])
|
|
314
314
|
]);
|
|
315
|
-
},
|
|
315
|
+
}, B = (t) => Q([
|
|
316
316
|
X({
|
|
317
317
|
class: "text-muted-foreground border-b",
|
|
318
318
|
map: [
|
|
@@ -334,15 +334,16 @@ const we = (t, e) => {
|
|
|
334
334
|
class: "divide-y divide-border",
|
|
335
335
|
emptyState: i
|
|
336
336
|
});
|
|
337
|
-
class
|
|
337
|
+
class j extends h {
|
|
338
338
|
/**
|
|
339
339
|
* Initializes component data.
|
|
340
340
|
*
|
|
341
341
|
* @returns {Data}
|
|
342
342
|
*/
|
|
343
343
|
setData() {
|
|
344
|
-
return new
|
|
344
|
+
return new C({
|
|
345
345
|
selectedRows: [],
|
|
346
|
+
hasItems: null,
|
|
346
347
|
selected: !1
|
|
347
348
|
});
|
|
348
349
|
}
|
|
@@ -402,10 +403,11 @@ class N extends h {
|
|
|
402
403
|
render() {
|
|
403
404
|
const e = this.rows, s = this.border !== !1 ? "border" : "";
|
|
404
405
|
return o({ class: "w-full" }, [
|
|
405
|
-
|
|
406
|
-
|
|
406
|
+
v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
407
|
+
o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
408
|
+
L({ class: "w-full" }, [
|
|
407
409
|
// @ts-ignore
|
|
408
|
-
this.headers &&
|
|
410
|
+
this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
409
411
|
// @ts-ignore
|
|
410
412
|
this.customHeader ?? null,
|
|
411
413
|
ke({
|
|
@@ -494,7 +496,7 @@ const xe = (t) => new Z({
|
|
|
494
496
|
rowItem: (e) => t.rowItem(e, t.selectRow),
|
|
495
497
|
class: "divide-y divide-border"
|
|
496
498
|
});
|
|
497
|
-
class ve extends
|
|
499
|
+
class ve extends j {
|
|
498
500
|
/**
|
|
499
501
|
* Renders the DataTable component.
|
|
500
502
|
*
|
|
@@ -503,10 +505,11 @@ class ve extends N {
|
|
|
503
505
|
render() {
|
|
504
506
|
const e = this.rows, s = this.border !== !1 ? "border" : "";
|
|
505
507
|
return o({ class: "w-full" }, [
|
|
506
|
-
|
|
507
|
-
|
|
508
|
+
v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
509
|
+
o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
510
|
+
L({ class: "w-full" }, [
|
|
508
511
|
// @ts-ignore
|
|
509
|
-
this.headers &&
|
|
512
|
+
this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
510
513
|
// @ts-ignore
|
|
511
514
|
this.customHeader ?? null,
|
|
512
515
|
xe({
|
|
@@ -567,10 +570,9 @@ const lt = d((t) => new ve(
|
|
|
567
570
|
tableData: t.tableData,
|
|
568
571
|
items: t.items,
|
|
569
572
|
rowItem: (e) => t.rowItem(e, t.selectRow),
|
|
570
|
-
class: "divide-y divide-border"
|
|
571
|
-
emptyState: t.emptyState
|
|
573
|
+
class: "divide-y divide-border"
|
|
572
574
|
});
|
|
573
|
-
class Se extends
|
|
575
|
+
class Se extends j {
|
|
574
576
|
/**
|
|
575
577
|
* Renders the DataTable component.
|
|
576
578
|
*
|
|
@@ -579,10 +581,11 @@ class Se extends N {
|
|
|
579
581
|
render() {
|
|
580
582
|
const e = this.rows, s = this.border !== !1 ? "border" : "";
|
|
581
583
|
return o({ class: "w-full" }, [
|
|
582
|
-
|
|
583
|
-
|
|
584
|
+
v("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
585
|
+
o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
586
|
+
L({ class: "w-full" }, [
|
|
584
587
|
// @ts-ignore
|
|
585
|
-
this.headers &&
|
|
588
|
+
this.headers && B({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
586
589
|
// @ts-ignore
|
|
587
590
|
this.customHeader ?? null,
|
|
588
591
|
De({
|
|
@@ -604,9 +607,7 @@ class Se extends N {
|
|
|
604
607
|
// @ts-ignore
|
|
605
608
|
selectRow: this.selectRow.bind(this),
|
|
606
609
|
// @ts-ignore
|
|
607
|
-
rowItem: this.rowItem
|
|
608
|
-
// @ts-ignore
|
|
609
|
-
emptyState: this.emptyState
|
|
610
|
+
rowItem: this.rowItem
|
|
610
611
|
})
|
|
611
612
|
])
|
|
612
613
|
])
|
|
@@ -647,12 +648,12 @@ const rt = d((t) => new Se(
|
|
|
647
648
|
]),
|
|
648
649
|
p({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
649
650
|
]), Ce = (t) => p({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
650
|
-
|
|
651
|
+
D("Last seen "),
|
|
651
652
|
q({ datetime: t }, "3h ago")
|
|
652
653
|
]), Te = (t, e) => t === "online" ? Le() : Ce(e), Be = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
653
654
|
p({ class: "text-sm leading-6 m-0" }, t),
|
|
654
655
|
Te(s, e)
|
|
655
|
-
])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Re = d((t) =>
|
|
656
|
+
])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Re = d((t) => S({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
656
657
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
657
658
|
oe({ src: t.image, alt: t.name, fallbackText: Me(t.name) }),
|
|
658
659
|
Ie({ name: t.name, email: t.email })
|
|
@@ -669,7 +670,7 @@ const rt = d((t) => new Se(
|
|
|
669
670
|
role: "list",
|
|
670
671
|
class: "divide-y divide-border",
|
|
671
672
|
rowItem: Re
|
|
672
|
-
})), We = (t, e) => e.includes(t), Pe = (t, e, s) => t.exact ? s === e : We(e, s), Oe = ({ text: t, href: e, exact: s, hidden: a }) => new
|
|
673
|
+
})), We = (t, e) => e.includes(t), Pe = (t, e, s) => t.exact ? s === e : We(e, s), Oe = ({ text: t, href: e, exact: s, hidden: a }) => new $({
|
|
673
674
|
text: t,
|
|
674
675
|
href: e,
|
|
675
676
|
exact: s,
|
|
@@ -697,7 +698,7 @@ class dt extends h {
|
|
|
697
698
|
* @returns {object}
|
|
698
699
|
*/
|
|
699
700
|
render() {
|
|
700
|
-
return
|
|
701
|
+
return I(
|
|
701
702
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
702
703
|
[
|
|
703
704
|
w({
|
|
@@ -777,10 +778,10 @@ class dt extends h {
|
|
|
777
778
|
const ht = d((t) => {
|
|
778
779
|
const e = t.margin || "m-4 ml-0";
|
|
779
780
|
return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
|
|
780
|
-
|
|
781
|
+
T({ variant: "back", class: "ghost", ...t })
|
|
781
782
|
]);
|
|
782
783
|
});
|
|
783
|
-
class
|
|
784
|
+
class A extends h {
|
|
784
785
|
/**
|
|
785
786
|
* This will declare the props for the compiler.
|
|
786
787
|
*
|
|
@@ -867,13 +868,13 @@ class j extends h {
|
|
|
867
868
|
return this.children;
|
|
868
869
|
}
|
|
869
870
|
}
|
|
870
|
-
|
|
871
|
+
N.addType("dockableOverlay", (t) => {
|
|
871
872
|
if (!t)
|
|
872
873
|
return;
|
|
873
874
|
const e = t.component;
|
|
874
875
|
e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
|
|
875
876
|
});
|
|
876
|
-
class ut extends
|
|
877
|
+
class ut extends A {
|
|
877
878
|
/**
|
|
878
879
|
* This will stop presistence.
|
|
879
880
|
*
|
|
@@ -939,7 +940,7 @@ class ut extends j {
|
|
|
939
940
|
* @returns {void}
|
|
940
941
|
*/
|
|
941
942
|
afterSetup() {
|
|
942
|
-
|
|
943
|
+
N.add(
|
|
943
944
|
this.container,
|
|
944
945
|
"dockableOverlay",
|
|
945
946
|
{
|
|
@@ -982,7 +983,7 @@ class ut extends j {
|
|
|
982
983
|
document.documentElement.style.overflowY = "auto";
|
|
983
984
|
}
|
|
984
985
|
}
|
|
985
|
-
class ft extends
|
|
986
|
+
class ft extends A {
|
|
986
987
|
/**
|
|
987
988
|
* This will get the overlay type.
|
|
988
989
|
*
|
|
@@ -1001,7 +1002,7 @@ class ft extends j {
|
|
|
1001
1002
|
this.container = e, this.initialize();
|
|
1002
1003
|
}
|
|
1003
1004
|
}
|
|
1004
|
-
const ze = d(({ index: t, click: e, state: s }, a) =>
|
|
1005
|
+
const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
1005
1006
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
1006
1007
|
onState: [
|
|
1007
1008
|
[s, "selectedIndex", {
|
|
@@ -1054,7 +1055,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => D({
|
|
|
1054
1055
|
*/
|
|
1055
1056
|
setData() {
|
|
1056
1057
|
const t = this.options || [];
|
|
1057
|
-
return new
|
|
1058
|
+
return new C({
|
|
1058
1059
|
options: t,
|
|
1059
1060
|
filteredOptions: t
|
|
1060
1061
|
});
|
|
@@ -1165,7 +1166,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => D({
|
|
|
1165
1166
|
]);
|
|
1166
1167
|
}
|
|
1167
1168
|
}
|
|
1168
|
-
), Ae = (t) =>
|
|
1169
|
+
), Ae = (t) => S(
|
|
1169
1170
|
{
|
|
1170
1171
|
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
|
|
1171
1172
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
@@ -1177,7 +1178,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => D({
|
|
|
1177
1178
|
click: (e) => t.callBack(t.value)
|
|
1178
1179
|
}, t.label)
|
|
1179
1180
|
]
|
|
1180
|
-
), Ue = (t, e) => (t.callBack = e, Ae(t)), Ye = (t) =>
|
|
1181
|
+
), Ue = (t, e) => (t.callBack = e, Ae(t)), Ye = (t) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1181
1182
|
w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ue(e, t.callBack)] })
|
|
1182
1183
|
]);
|
|
1183
1184
|
class mt extends h {
|
|
@@ -1202,7 +1203,7 @@ class mt extends h {
|
|
|
1202
1203
|
options: this.options,
|
|
1203
1204
|
callBack: e
|
|
1204
1205
|
}),
|
|
1205
|
-
|
|
1206
|
+
z({
|
|
1206
1207
|
class: "tab-content",
|
|
1207
1208
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1208
1209
|
})
|
|
@@ -1268,7 +1269,7 @@ class mt extends h {
|
|
|
1268
1269
|
};
|
|
1269
1270
|
}
|
|
1270
1271
|
}
|
|
1271
|
-
const He = (t) =>
|
|
1272
|
+
const He = (t) => S(
|
|
1272
1273
|
{
|
|
1273
1274
|
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm",
|
|
1274
1275
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
@@ -1281,7 +1282,7 @@ const He = (t) => D(
|
|
|
1281
1282
|
disabled: t.disabled
|
|
1282
1283
|
}, t.label)
|
|
1283
1284
|
]
|
|
1284
|
-
), Fe = (t, e) => (t.callBack = e, He(t)), Ee = (t) =>
|
|
1285
|
+
), Fe = (t, e) => (t.callBack = e, He(t)), Ee = (t) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1285
1286
|
w({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
|
|
1286
1287
|
]);
|
|
1287
1288
|
class pt extends h {
|
|
@@ -1330,7 +1331,7 @@ class pt extends h {
|
|
|
1330
1331
|
const Qe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Xe = (t, e) => {
|
|
1331
1332
|
const s = t.getLinkPath();
|
|
1332
1333
|
return t.exact ? e === s : Qe(s, e);
|
|
1333
|
-
}, qe = ({ text: t, href: e, exact: s }) => new
|
|
1334
|
+
}, qe = ({ text: t, href: e, exact: s }) => new $({
|
|
1334
1335
|
text: t,
|
|
1335
1336
|
href: e,
|
|
1336
1337
|
exact: s,
|
|
@@ -1358,7 +1359,7 @@ class Ke extends h {
|
|
|
1358
1359
|
* @returns {object}
|
|
1359
1360
|
*/
|
|
1360
1361
|
render() {
|
|
1361
|
-
return
|
|
1362
|
+
return I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
|
|
1362
1363
|
w({
|
|
1363
1364
|
class: "flex flex-auto flex-row",
|
|
1364
1365
|
map: [this.options, (e) => this.addLink(e)],
|
|
@@ -1452,7 +1453,7 @@ class wt extends h {
|
|
|
1452
1453
|
class: this.class,
|
|
1453
1454
|
options: this.options
|
|
1454
1455
|
}),
|
|
1455
|
-
|
|
1456
|
+
z({
|
|
1456
1457
|
class: "tab-content",
|
|
1457
1458
|
switch: this.addGroup()
|
|
1458
1459
|
})
|
|
@@ -1593,8 +1594,8 @@ class Ge extends h {
|
|
|
1593
1594
|
const { canvas: e, ctx: s } = this, a = e.toDataURL();
|
|
1594
1595
|
if (this.scale(), this.setupBackground(s), a !== "data:,") {
|
|
1595
1596
|
const i = new globalThis.Image();
|
|
1596
|
-
|
|
1597
|
-
s.drawImage(i, 0, 0),
|
|
1597
|
+
M.on("load", i, function n() {
|
|
1598
|
+
s.drawImage(i, 0, 0), M.off("load", i, n);
|
|
1598
1599
|
}), i.src = a;
|
|
1599
1600
|
}
|
|
1600
1601
|
this.draw();
|
|
@@ -1614,7 +1615,7 @@ class Ge extends h {
|
|
|
1614
1615
|
* @returns {void}
|
|
1615
1616
|
*/
|
|
1616
1617
|
noScaleResize() {
|
|
1617
|
-
const e =
|
|
1618
|
+
const e = R.getSize(container);
|
|
1618
1619
|
this.width = canvas.width = e.width, this.height = canvas.height = e.height;
|
|
1619
1620
|
}
|
|
1620
1621
|
/**
|
|
@@ -1624,7 +1625,7 @@ class Ge extends h {
|
|
|
1624
1625
|
* @returns {void}
|
|
1625
1626
|
*/
|
|
1626
1627
|
scale() {
|
|
1627
|
-
const e = this.canvas, s = this.container, a =
|
|
1628
|
+
const e = this.canvas, s = this.container, a = R.getSize(s), i = this.targetSize, n = i.width, l = i.height;
|
|
1628
1629
|
let u = n + "px", c = l + "px";
|
|
1629
1630
|
if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
|
|
1630
1631
|
const f = a.width, g = a.height, r = f / n, m = g / l, b = Math.min(r, m);
|
|
@@ -1727,7 +1728,7 @@ class bt extends h {
|
|
|
1727
1728
|
bind: this.path + ".data"
|
|
1728
1729
|
}),
|
|
1729
1730
|
o({ class: "absolute top-2 right-2" }, [
|
|
1730
|
-
|
|
1731
|
+
T({
|
|
1731
1732
|
variant: "icon",
|
|
1732
1733
|
icon: k.circleX,
|
|
1733
1734
|
click: this.reset.bind(this)
|
|
@@ -1789,14 +1790,14 @@ export {
|
|
|
1789
1790
|
ye as H,
|
|
1790
1791
|
ft as I,
|
|
1791
1792
|
dt as N,
|
|
1792
|
-
|
|
1793
|
+
A as O,
|
|
1793
1794
|
at as P,
|
|
1794
1795
|
rt as S,
|
|
1795
|
-
T,
|
|
1796
|
+
B as T,
|
|
1796
1797
|
Re as U,
|
|
1797
1798
|
ot as W,
|
|
1798
1799
|
he as a,
|
|
1799
|
-
|
|
1800
|
+
W as b,
|
|
1800
1801
|
ce as c,
|
|
1801
1802
|
it as d,
|
|
1802
1803
|
nt as e,
|
|
@@ -1804,7 +1805,7 @@ export {
|
|
|
1804
1805
|
de as g,
|
|
1805
1806
|
me as h,
|
|
1806
1807
|
pe as i,
|
|
1807
|
-
|
|
1808
|
+
j,
|
|
1808
1809
|
lt as k,
|
|
1809
1810
|
ct as l,
|
|
1810
1811
|
ut as m,
|
|
@@ -14,6 +14,7 @@ export function DynamicTableBody(props: object): object;
|
|
|
14
14
|
* @property {array} [props.rows] - The initial rows.
|
|
15
15
|
* @property {function} [props.rowItem] - The row item.
|
|
16
16
|
* @property {string} [props.containerClass] - The class to add to the scroll container.
|
|
17
|
+
* @property {object|null} [props.emptyState] - The empty state to show when there are no items.
|
|
17
18
|
* @returns {object}
|
|
18
19
|
*/
|
|
19
20
|
export class DynamicTable extends DataTable {
|
package/package.json
CHANGED