@base-framework/ui 1.0.306 → 1.0.307
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 +1 -1
- package/dist/organisms.es.js +1 -1
- package/dist/{signature-panel-fsF3hz3L.js → signature-panel-DWBWqY8V.js} +112 -151
- package/dist/types/components/organisms/tabs/underlined-button-tab.d.ts +9 -10
- package/dist/types/components/organisms/tabs/underlined-tab-group.d.ts +3 -11
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { C as F, d as B, D as P, c as k, E as M, F as v, H as x, I as N, M as f,
|
|
|
5
5
|
import { Icons as G } from "./icons.es.js";
|
|
6
6
|
import { A as E, B as V, C as j, w as q, J, y as z, z as K, E as Q, G as _, D as X, m as Y, n as Z, O as $, K as aa, v as ea, c as sa, a as oa, b as ta, Q as ra, l as na, g as ia, i as la, h as pa, j as da, e as ua, k as ma, F as ga, d as Ca, f as ca, L as Ta, x as ba, M as Da, o as Ia, N as Sa, P as Fa, s as Ba, t as Pa, S as ka, q as Ma, r as va, T as xa, H as Na, I as fa, p as ya, u as ha } from "./empty-state-vu_Mhyk4.js";
|
|
7
7
|
import { A as Ua, b as Wa, C as Ha, D as wa, a as Aa, F as Ra, M as Ga, P as Oa, R as Ea, c as Va, g as ja, p as qa } from "./range-calendar-CnBylqhu.js";
|
|
8
|
-
import { B as za, p as Ka, C as Qa, j as _a, D as Xa, m as Ya, k as Za, H as $a, I as ae, N as ee, O as se, P as oe, S as te, n as re, o as ne, x as ie, s as le, q as pe, r as de, T as ue, t as me, w as ge, u as Ce, v as ce, l as Te, U as be, W as De, f as Ie, h as Se, i as Fe, c as Be, d as Pe, b as ke, e as Me, a as ve, g as xe } from "./signature-panel-
|
|
8
|
+
import { B as za, p as Ka, C as Qa, j as _a, D as Xa, m as Ya, k as Za, H as $a, I as ae, N as ee, O as se, P as oe, S as te, n as re, o as ne, x as ie, s as le, q as pe, r as de, T as ue, t as me, w as ge, u as Ce, v as ce, l as Te, U as be, W as De, f as Ie, h as Se, i as Fe, c as Be, d as Pe, b as ke, e as Me, a as ve, g as xe } from "./signature-panel-DWBWqY8V.js";
|
|
9
9
|
import { B as fe, I as ye, M as he, d as Le, e as Ue, g as We, N as He, b as we, a as Ae, f as Re, P as Ge, c as Oe, S as Ee, T as Ve } from "./mobile-nav-wrapper-CWqhZ0qz.js";
|
|
10
10
|
import { B as qe, a as Je, C as ze, F as Ke, b as Qe, c as _e, M as Xe, P as Ye, S as Ze } from "./sidebar-menu-page-UmKsAvjb.js";
|
|
11
11
|
import { A as as, F as es, M as ss, a as os, T as ts } from "./aside-template-sUm-F2f0.js";
|
package/dist/organisms.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, p as n, C as t, j as o, D as r, m as l, k as i, H as d, I as b, N as u, O as v, P as g, S as p, n as T, o as D, x as N, s as k, q as C, r as c, T as B, t as M, w as m, u as y, v as W, l as h, U as S, W as H, f as P, h as U, i as x, c as I, d as f, b as L, e as O, a as F, g as G } from "./signature-panel-
|
|
1
|
+
import { B as s, p as n, C as t, j as o, D as r, m as l, k as i, H as d, I as b, N as u, O as v, P as g, S as p, n as T, o as D, x as N, s as k, q as C, r as c, T as B, t as M, w as m, u as y, v as W, l as h, U as S, W as H, f as P, h as U, i as x, c as I, d as f, b as L, e as O, a as F, g as G } from "./signature-panel-DWBWqY8V.js";
|
|
2
2
|
import { b as R, C as j, D as q, a as z, F as A, M as E, R as J, c as K, p as Q } from "./range-calendar-CnBylqhu.js";
|
|
3
3
|
import { B as X, I as Y, M as Z, d as _, e as $, g as aa, N as ea, b as sa, a as na, f as ta, P as oa, c as ra, S as la, T as ia } from "./mobile-nav-wrapper-CWqhZ0qz.js";
|
|
4
4
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Atom as h, Component as c, Data as B, DateTime as K, router as
|
|
1
|
+
import { Button as w, Div as o, On as S, Span as C, Th as z, UseParent as F, I as E, Thead as Q, Tr as G, Table as I, P as x, Li as y, Time as X, Nav as m, Ul as g, Section as L, Canvas as q } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as h, Component as c, Data as B, DateTime as K, router as k, NavLink as T, DataTracker as N, Jot as V, base as R, Dom as O } from "@base-framework/base";
|
|
3
3
|
import { B as M, I as _ } from "./buttons-CHEs54Wl.js";
|
|
4
4
|
import { Icons as D } 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";
|
|
@@ -10,7 +10,7 @@ h((t, e) => ({
|
|
|
10
10
|
...t,
|
|
11
11
|
children: e
|
|
12
12
|
}));
|
|
13
|
-
h(({ value: t, label: e }) =>
|
|
13
|
+
h(({ value: t, label: e }) => w({
|
|
14
14
|
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-md px-8 py-1 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-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
15
15
|
onState: ["performance", { active: t }],
|
|
16
16
|
dataSet: ["performance", ["state", t, "active"]],
|
|
@@ -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);
|
|
@@ -82,7 +82,7 @@ const re = (t) => {
|
|
|
82
82
|
return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
|
|
83
83
|
}, fe = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
|
|
84
84
|
const n = ue(t, e, s);
|
|
85
|
-
return
|
|
85
|
+
return w({
|
|
86
86
|
text: t || "",
|
|
87
87
|
disabled: !t,
|
|
88
88
|
class: `
|
|
@@ -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
|
-
(r) =>
|
|
118
|
+
(r) => C({ class: "px-1 py-1", text: r })
|
|
119
119
|
)
|
|
120
120
|
),
|
|
121
121
|
// Render each "week" row
|
|
@@ -168,7 +168,7 @@ const re = (t) => {
|
|
|
168
168
|
icon: t === "Previous" ? D.chevron.single.left : D.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
|
-
|
|
171
|
+
C("[[monthName]] [[year]]"),
|
|
172
172
|
$({
|
|
173
173
|
label: "Previous",
|
|
174
174
|
click: e
|
|
@@ -193,7 +193,7 @@ class pt extends c {
|
|
|
193
193
|
* @returns {Data}
|
|
194
194
|
*/
|
|
195
195
|
setData() {
|
|
196
|
-
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a =
|
|
196
|
+
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = W(s, e.getFullYear());
|
|
197
197
|
return new B({
|
|
198
198
|
monthName: this.getMonthName(a.getMonth()),
|
|
199
199
|
year: a.getFullYear(),
|
|
@@ -276,7 +276,7 @@ class pt extends c {
|
|
|
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,25 +299,25 @@ class pt extends c {
|
|
|
299
299
|
const be = (t, e) => {
|
|
300
300
|
const s = t.toggleAllSelectedRows();
|
|
301
301
|
e.state.checked = !s;
|
|
302
|
-
},
|
|
302
|
+
}, ke = (t) => z({ 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) => be(e, a) }))
|
|
304
|
-
]),
|
|
304
|
+
]), we = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
|
|
305
305
|
const l = t || "justify-start";
|
|
306
306
|
return z({
|
|
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
|
+
C(a),
|
|
312
312
|
e && E({ class: "ml-2", html: D.arrows.upDown })
|
|
313
313
|
])
|
|
314
314
|
]);
|
|
315
|
-
}, P = (t) =>
|
|
316
|
-
|
|
315
|
+
}, P = (t) => Q([
|
|
316
|
+
G({
|
|
317
317
|
class: "text-muted-foreground border-b",
|
|
318
318
|
map: [
|
|
319
319
|
t.headers,
|
|
320
|
-
(e) => e.label === "checkbox" ?
|
|
320
|
+
(e) => e.label === "checkbox" ? ke({ toggle: t.toggle }) : we({
|
|
321
321
|
align: e.align,
|
|
322
322
|
sortable: e.sortable,
|
|
323
323
|
key: e.key,
|
|
@@ -326,7 +326,7 @@ const be = (t, e) => {
|
|
|
326
326
|
})
|
|
327
327
|
]
|
|
328
328
|
})
|
|
329
|
-
]),
|
|
329
|
+
]), ye = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i, skeleton: n, columnCount: l }) => new J({
|
|
330
330
|
cache: "list",
|
|
331
331
|
key: t,
|
|
332
332
|
items: e,
|
|
@@ -417,12 +417,12 @@ class U extends c {
|
|
|
417
417
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
418
418
|
S("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
419
419
|
o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
420
|
-
|
|
420
|
+
I({ class: "w-full" }, [
|
|
421
421
|
// @ts-ignore
|
|
422
422
|
this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
423
423
|
// @ts-ignore
|
|
424
424
|
this.customHeader ?? null,
|
|
425
|
-
|
|
425
|
+
ye({
|
|
426
426
|
// @ts-ignore
|
|
427
427
|
key: this.key,
|
|
428
428
|
// @ts-ignore
|
|
@@ -501,7 +501,7 @@ class U extends c {
|
|
|
501
501
|
this.data.selectedRows = [];
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const xe = (t) => new Z({
|
|
505
505
|
cache: "list",
|
|
506
506
|
loadMoreItems: t.loadMoreItems,
|
|
507
507
|
offset: t.offset,
|
|
@@ -525,12 +525,12 @@ class ve extends U {
|
|
|
525
525
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
526
526
|
S("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
527
527
|
o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
528
|
-
|
|
528
|
+
I({ class: "w-full" }, [
|
|
529
529
|
// @ts-ignore
|
|
530
530
|
this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
531
531
|
// @ts-ignore
|
|
532
532
|
this.customHeader ?? null,
|
|
533
|
-
|
|
533
|
+
xe({
|
|
534
534
|
// @ts-ignore
|
|
535
535
|
loadMoreItems: this.loadMoreItems,
|
|
536
536
|
// @ts-ignore
|
|
@@ -608,7 +608,7 @@ class Se extends U {
|
|
|
608
608
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
609
609
|
S("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
610
610
|
o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
611
|
-
|
|
611
|
+
I({ class: "w-full" }, [
|
|
612
612
|
// @ts-ignore
|
|
613
613
|
this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
614
614
|
// @ts-ignore
|
|
@@ -651,7 +651,7 @@ class Se extends U {
|
|
|
651
651
|
this.list.refresh();
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
const
|
|
654
|
+
const kt = h((t) => new Se(
|
|
655
655
|
{
|
|
656
656
|
cache: t.cache ?? "list",
|
|
657
657
|
tableData: t.data,
|
|
@@ -669,45 +669,45 @@ const xt = h((t) => new Se(
|
|
|
669
669
|
emptyState: t.emptyState,
|
|
670
670
|
skeleton: t.skeleton
|
|
671
671
|
}
|
|
672
|
-
)),
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
])),
|
|
672
|
+
)), Ce = h(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
|
|
673
|
+
x({ class: "text-base font-semibold leading-6 m-0" }, t),
|
|
674
|
+
x({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
|
|
675
|
+
])), Le = () => o({ class: "flex items-center gap-x-1.5" }, [
|
|
676
676
|
o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
677
677
|
o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
678
678
|
]),
|
|
679
|
-
|
|
680
|
-
]),
|
|
681
|
-
|
|
679
|
+
x({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
680
|
+
]), Ie = (t) => x({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
681
|
+
C("Last seen "),
|
|
682
682
|
X({ datetime: t }, "3h ago")
|
|
683
|
-
]), Be = (t, e) => t === "online" ?
|
|
684
|
-
|
|
683
|
+
]), Be = (t, e) => t === "online" ? Le() : Ie(e), Te = h(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
684
|
+
x({ class: "text-sm leading-6 m-0" }, t),
|
|
685
685
|
Be(s, e)
|
|
686
|
-
])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Pe = h((t) =>
|
|
686
|
+
])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Pe = h((t) => y({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
687
687
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
688
688
|
oe({ src: t.image, alt: t.name, fallbackText: Me(t.name) }),
|
|
689
|
-
|
|
689
|
+
Ce({ name: t.name, email: t.email })
|
|
690
690
|
]),
|
|
691
691
|
Te({
|
|
692
692
|
role: t.role,
|
|
693
693
|
lastSeen: t.lastSeen,
|
|
694
694
|
status: t.status
|
|
695
695
|
})
|
|
696
|
-
])),
|
|
696
|
+
])), wt = h((t) => new te({
|
|
697
697
|
cache: "list",
|
|
698
698
|
key: "name",
|
|
699
699
|
items: t.users,
|
|
700
700
|
role: "list",
|
|
701
701
|
class: "divide-y divide-border",
|
|
702
702
|
rowItem: Pe
|
|
703
|
-
})), Re = (t, e) => e.includes(t),
|
|
703
|
+
})), Re = (t, e) => e.includes(t), Oe = (t, e, s) => t.exact ? s === e : Re(e, s), We = ({ text: t, href: e, exact: s, hidden: a }) => new T({
|
|
704
704
|
text: t,
|
|
705
705
|
href: e,
|
|
706
706
|
exact: s,
|
|
707
707
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
708
708
|
class: `${a ? "hidden" : "inline-flex"} items-center justify-center whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring focus-visible:ring-offset-background hover:bg-primary hover:text-primary-foreground disabled:opacity-50 disabled:pointer-events-none data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm`
|
|
709
709
|
});
|
|
710
|
-
class
|
|
710
|
+
class yt extends c {
|
|
711
711
|
/**
|
|
712
712
|
* This will declare the props for the compiler.
|
|
713
713
|
*
|
|
@@ -735,7 +735,7 @@ class wt extends c {
|
|
|
735
735
|
class: "flex gap-x-4",
|
|
736
736
|
map: [this.options, (e) => this.addLink(e)],
|
|
737
737
|
watch: {
|
|
738
|
-
value: ["[[path]]",
|
|
738
|
+
value: ["[[path]]", k.data],
|
|
739
739
|
callBack: this.updateLinks.bind(this)
|
|
740
740
|
}
|
|
741
741
|
})
|
|
@@ -748,7 +748,7 @@ class wt extends c {
|
|
|
748
748
|
* @returns {void}
|
|
749
749
|
*/
|
|
750
750
|
afterSetup() {
|
|
751
|
-
const e =
|
|
751
|
+
const e = k.data.path;
|
|
752
752
|
this.updateLinks(e);
|
|
753
753
|
}
|
|
754
754
|
/**
|
|
@@ -763,7 +763,7 @@ class wt extends c {
|
|
|
763
763
|
for (const a of this.links) {
|
|
764
764
|
if (!a.rendered)
|
|
765
765
|
continue;
|
|
766
|
-
|
|
766
|
+
Oe(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
|
|
767
767
|
}
|
|
768
768
|
!s && this.links[0] && this.updateLink(this.links[0], !0);
|
|
769
769
|
}
|
|
@@ -793,7 +793,7 @@ class wt extends c {
|
|
|
793
793
|
* @returns {object}
|
|
794
794
|
*/
|
|
795
795
|
addLink({ label: e, href: s, exact: a, hidden: i }) {
|
|
796
|
-
const n =
|
|
796
|
+
const n = We({ text: e, href: s, exact: a, hidden: i });
|
|
797
797
|
return this.links.push(n), n;
|
|
798
798
|
}
|
|
799
799
|
/**
|
|
@@ -805,7 +805,7 @@ class wt extends c {
|
|
|
805
805
|
this.links = [];
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const xt = h((t) => {
|
|
809
809
|
const e = t.margin || "m-4 ml-0";
|
|
810
810
|
return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
|
|
811
811
|
M({ variant: "back", class: "ghost", ...t })
|
|
@@ -1032,7 +1032,7 @@ class Dt extends j {
|
|
|
1032
1032
|
this.container = e, this.initialize();
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
const $e = h(({ index: t, click: e, state: s }, a) =>
|
|
1035
|
+
const $e = h(({ index: t, click: e, state: s }, a) => y({
|
|
1036
1036
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
1037
1037
|
onState: [
|
|
1038
1038
|
[s, "selectedIndex", {
|
|
@@ -1196,13 +1196,13 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1196
1196
|
]);
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
|
-
), je = (t) =>
|
|
1199
|
+
), je = (t) => y(
|
|
1200
1200
|
{
|
|
1201
1201
|
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",
|
|
1202
1202
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1203
1203
|
},
|
|
1204
1204
|
[
|
|
1205
|
-
|
|
1205
|
+
w({
|
|
1206
1206
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
|
|
1207
1207
|
onSet: ["selected", { selected: t.value }],
|
|
1208
1208
|
click: (e) => t.callBack(t.value)
|
|
@@ -1211,7 +1211,7 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1211
1211
|
), Ae = (t, e) => (t.callBack = e, je(t)), He = (t) => m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1212
1212
|
g({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ae(e, t.callBack)] })
|
|
1213
1213
|
]);
|
|
1214
|
-
class
|
|
1214
|
+
class Ct extends c {
|
|
1215
1215
|
/**
|
|
1216
1216
|
* This will declare the props for the compiler.
|
|
1217
1217
|
*
|
|
@@ -1233,7 +1233,7 @@ class It extends c {
|
|
|
1233
1233
|
options: this.options,
|
|
1234
1234
|
callBack: e
|
|
1235
1235
|
}),
|
|
1236
|
-
|
|
1236
|
+
L({
|
|
1237
1237
|
class: "tab-content",
|
|
1238
1238
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1239
1239
|
})
|
|
@@ -1298,13 +1298,13 @@ class It extends c {
|
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
|
-
const Ye = (t) =>
|
|
1301
|
+
const Ye = (t) => y(
|
|
1302
1302
|
{
|
|
1303
1303
|
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",
|
|
1304
1304
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1305
1305
|
},
|
|
1306
1306
|
[
|
|
1307
|
-
|
|
1307
|
+
w({
|
|
1308
1308
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1309
1309
|
onSet: ["selected", { selected: t.value }],
|
|
1310
1310
|
click: (e) => t.callBack(t.value),
|
|
@@ -1314,7 +1314,7 @@ const Ye = (t) => w(
|
|
|
1314
1314
|
), Fe = (t, e) => (t.callBack = e, Ye(t)), Ee = (t) => m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1315
1315
|
g({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
|
|
1316
1316
|
]);
|
|
1317
|
-
class
|
|
1317
|
+
class Lt extends c {
|
|
1318
1318
|
/**
|
|
1319
1319
|
* This will declare the props for the compiler.
|
|
1320
1320
|
*
|
|
@@ -1356,9 +1356,9 @@ class Ct extends c {
|
|
|
1356
1356
|
};
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
|
-
const
|
|
1359
|
+
const Qe = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Ge = (t, e) => {
|
|
1360
1360
|
const s = t.getLinkPath();
|
|
1361
|
-
return t.exact ? e === s :
|
|
1361
|
+
return t.exact ? e === s : Qe(s, e);
|
|
1362
1362
|
}, Xe = ({ text: t, href: e, exact: s }) => new T({
|
|
1363
1363
|
text: t,
|
|
1364
1364
|
href: e,
|
|
@@ -1392,7 +1392,7 @@ class qe extends c {
|
|
|
1392
1392
|
class: "flex flex-auto flex-row",
|
|
1393
1393
|
map: [this.options, (e) => this.addLink(e)],
|
|
1394
1394
|
watch: {
|
|
1395
|
-
value: ["[[path]]",
|
|
1395
|
+
value: ["[[path]]", k.data],
|
|
1396
1396
|
callBack: this.updateLinks.bind(this)
|
|
1397
1397
|
}
|
|
1398
1398
|
})
|
|
@@ -1404,7 +1404,7 @@ class qe extends c {
|
|
|
1404
1404
|
* @returns {void}
|
|
1405
1405
|
*/
|
|
1406
1406
|
afterSetup() {
|
|
1407
|
-
const e =
|
|
1407
|
+
const e = k.data.path;
|
|
1408
1408
|
this.updateLinks(e);
|
|
1409
1409
|
}
|
|
1410
1410
|
/**
|
|
@@ -1417,7 +1417,7 @@ class qe extends c {
|
|
|
1417
1417
|
let s = !1, a = this.links[0];
|
|
1418
1418
|
this.deactivateAllLinks();
|
|
1419
1419
|
for (const i of this.links)
|
|
1420
|
-
if (i.rendered !== !1 && (s =
|
|
1420
|
+
if (i.rendered !== !1 && (s = Ge(i, e), s === !0)) {
|
|
1421
1421
|
this.updateLink(i, !0);
|
|
1422
1422
|
break;
|
|
1423
1423
|
}
|
|
@@ -1461,7 +1461,7 @@ class qe extends c {
|
|
|
1461
1461
|
this.links = [];
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
|
-
class
|
|
1464
|
+
class It extends c {
|
|
1465
1465
|
/**
|
|
1466
1466
|
* This will declare the props for the compiler.
|
|
1467
1467
|
*
|
|
@@ -1481,7 +1481,7 @@ class Lt extends c {
|
|
|
1481
1481
|
class: this.class,
|
|
1482
1482
|
options: this.options
|
|
1483
1483
|
}),
|
|
1484
|
-
|
|
1484
|
+
L({
|
|
1485
1485
|
class: "tab-content",
|
|
1486
1486
|
switch: this.addGroup()
|
|
1487
1487
|
})
|
|
@@ -1507,13 +1507,13 @@ class Lt extends c {
|
|
|
1507
1507
|
return s;
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
const Ke = (t) =>
|
|
1510
|
+
const Ke = (t) => y(
|
|
1511
1511
|
{
|
|
1512
1512
|
class: "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium text-muted-foreground transition-colors hover:text-foreground 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]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100",
|
|
1513
1513
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1514
1514
|
},
|
|
1515
1515
|
[
|
|
1516
|
-
|
|
1516
|
+
w({
|
|
1517
1517
|
class: "flex flex-auto justify-center items-center px-4 py-3",
|
|
1518
1518
|
onSet: ["selected", { selected: t.value }],
|
|
1519
1519
|
click: (e) => t.callBack(t.value)
|
|
@@ -1544,32 +1544,19 @@ class Bt extends c {
|
|
|
1544
1544
|
options: this.options,
|
|
1545
1545
|
callBack: e
|
|
1546
1546
|
}),
|
|
1547
|
-
|
|
1547
|
+
L({
|
|
1548
1548
|
class: "tab-content pt-6",
|
|
1549
|
-
|
|
1549
|
+
onState: ["selected", this.updateContent.bind(this)]
|
|
1550
1550
|
})
|
|
1551
1551
|
]);
|
|
1552
1552
|
}
|
|
1553
1553
|
/**
|
|
1554
|
-
* This will
|
|
1555
|
-
*
|
|
1556
|
-
* @returns {void}
|
|
1557
|
-
*/
|
|
1558
|
-
beforeSetup() {
|
|
1559
|
-
this.selectedIndex = 0, this.setSelectedIndex();
|
|
1560
|
-
}
|
|
1561
|
-
/**
|
|
1562
|
-
* This will set the selected index.
|
|
1554
|
+
* This will get the first value.
|
|
1563
1555
|
*
|
|
1564
|
-
* @returns {
|
|
1556
|
+
* @returns {*}
|
|
1565
1557
|
*/
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
for (let s = 0, a = e.length; s < a; s++)
|
|
1569
|
-
if (e[s].selected === !0) {
|
|
1570
|
-
this.selectedIndex = s;
|
|
1571
|
-
break;
|
|
1572
|
-
}
|
|
1558
|
+
getFirstValue() {
|
|
1559
|
+
return this.options[0]?.value;
|
|
1573
1560
|
}
|
|
1574
1561
|
/**
|
|
1575
1562
|
* This will select an option.
|
|
@@ -1578,49 +1565,48 @@ class Bt extends c {
|
|
|
1578
1565
|
* @returns {void}
|
|
1579
1566
|
*/
|
|
1580
1567
|
select(e) {
|
|
1581
|
-
this.
|
|
1568
|
+
this.state.selected = e;
|
|
1582
1569
|
}
|
|
1583
1570
|
/**
|
|
1584
|
-
* This will
|
|
1571
|
+
* This will update the content.
|
|
1585
1572
|
*
|
|
1586
1573
|
* @param {*} value
|
|
1587
|
-
* @returns {
|
|
1574
|
+
* @returns {object}
|
|
1588
1575
|
*/
|
|
1589
|
-
|
|
1576
|
+
updateContent(e) {
|
|
1590
1577
|
const s = this.options;
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1578
|
+
if (!s || s.length < 1)
|
|
1579
|
+
return;
|
|
1580
|
+
const a = s[0];
|
|
1581
|
+
for (const i of s)
|
|
1582
|
+
if (i.value === e)
|
|
1583
|
+
return i.component;
|
|
1584
|
+
return a.component;
|
|
1596
1585
|
}
|
|
1597
1586
|
/**
|
|
1598
|
-
* This will
|
|
1587
|
+
* This will setup the states.
|
|
1599
1588
|
*
|
|
1600
|
-
* @returns {
|
|
1589
|
+
* @returns {object}
|
|
1601
1590
|
*/
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
{
|
|
1608
|
-
|
|
1609
|
-
component: e.component,
|
|
1610
|
-
title: e.title || null,
|
|
1611
|
-
persist: !0
|
|
1591
|
+
setupStates() {
|
|
1592
|
+
const e = this.onSelect, s = typeof e;
|
|
1593
|
+
return {
|
|
1594
|
+
selected: {
|
|
1595
|
+
state: this.getFirstValue(),
|
|
1596
|
+
callBack(a) {
|
|
1597
|
+
s === "function" && e(a);
|
|
1612
1598
|
}
|
|
1613
|
-
|
|
1614
|
-
|
|
1599
|
+
}
|
|
1600
|
+
};
|
|
1615
1601
|
}
|
|
1616
1602
|
}
|
|
1617
|
-
const Je = (t) =>
|
|
1603
|
+
const Je = (t) => y(
|
|
1618
1604
|
{
|
|
1619
1605
|
class: "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium text-muted-foreground transition-colors hover:text-foreground 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]:text-foreground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-primary after:transition-all after:duration-200 after:scale-x-0 data-[state=active]:after:scale-x-100",
|
|
1620
1606
|
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1621
1607
|
},
|
|
1622
1608
|
[
|
|
1623
|
-
|
|
1609
|
+
w({
|
|
1624
1610
|
class: "flex flex-auto justify-center items-center px-4 py-3 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1625
1611
|
onSet: ["selected", { selected: t.value }],
|
|
1626
1612
|
click: (e) => t.callBack(t.value),
|
|
@@ -1652,27 +1638,6 @@ class Tt extends c {
|
|
|
1652
1638
|
callBack: e
|
|
1653
1639
|
});
|
|
1654
1640
|
}
|
|
1655
|
-
/**
|
|
1656
|
-
* This will set up the component.
|
|
1657
|
-
*
|
|
1658
|
-
* @returns {void}
|
|
1659
|
-
*/
|
|
1660
|
-
beforeSetup() {
|
|
1661
|
-
this.selectedIndex = 0, this.setSelectedIndex();
|
|
1662
|
-
}
|
|
1663
|
-
/**
|
|
1664
|
-
* This will set the selected index.
|
|
1665
|
-
*
|
|
1666
|
-
* @returns {void}
|
|
1667
|
-
*/
|
|
1668
|
-
setSelectedIndex() {
|
|
1669
|
-
const e = this.options;
|
|
1670
|
-
for (let s = 0, a = e.length; s < a; s++)
|
|
1671
|
-
if (e[s].selected === !0) {
|
|
1672
|
-
this.selectedIndex = s;
|
|
1673
|
-
break;
|
|
1674
|
-
}
|
|
1675
|
-
}
|
|
1676
1641
|
/**
|
|
1677
1642
|
* This will select an option.
|
|
1678
1643
|
*
|
|
@@ -1680,21 +1645,17 @@ class Tt extends c {
|
|
|
1680
1645
|
* @returns {void}
|
|
1681
1646
|
*/
|
|
1682
1647
|
select(e) {
|
|
1683
|
-
this.
|
|
1648
|
+
this.state.selected = e, typeof this.onSelect == "function" && this.onSelect(e, this.parent);
|
|
1684
1649
|
}
|
|
1685
1650
|
/**
|
|
1686
|
-
* This will
|
|
1651
|
+
* This will setup the states.
|
|
1687
1652
|
*
|
|
1688
|
-
* @
|
|
1689
|
-
* @returns {void}
|
|
1653
|
+
* @returns {object}
|
|
1690
1654
|
*/
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
this.selectedIndex = a;
|
|
1696
|
-
break;
|
|
1697
|
-
}
|
|
1655
|
+
setupStates() {
|
|
1656
|
+
return {
|
|
1657
|
+
selected: this.options[0]?.value || null
|
|
1658
|
+
};
|
|
1698
1659
|
}
|
|
1699
1660
|
}
|
|
1700
1661
|
const tt = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), st = (t, e) => {
|
|
@@ -1733,7 +1694,7 @@ class it extends c {
|
|
|
1733
1694
|
class: "flex flex-row items-center",
|
|
1734
1695
|
map: [this.options, (e) => this.addLink(e)],
|
|
1735
1696
|
watch: {
|
|
1736
|
-
value: ["[[path]]",
|
|
1697
|
+
value: ["[[path]]", k.data],
|
|
1737
1698
|
callBack: this.updateLinks.bind(this)
|
|
1738
1699
|
}
|
|
1739
1700
|
})
|
|
@@ -1745,7 +1706,7 @@ class it extends c {
|
|
|
1745
1706
|
* @returns {void}
|
|
1746
1707
|
*/
|
|
1747
1708
|
afterSetup() {
|
|
1748
|
-
const e =
|
|
1709
|
+
const e = k.data.path;
|
|
1749
1710
|
this.updateLinks(e);
|
|
1750
1711
|
}
|
|
1751
1712
|
/**
|
|
@@ -1822,7 +1783,7 @@ class Mt extends c {
|
|
|
1822
1783
|
class: this.class,
|
|
1823
1784
|
options: this.options
|
|
1824
1785
|
}),
|
|
1825
|
-
|
|
1786
|
+
L({
|
|
1826
1787
|
class: "tab-content pt-6",
|
|
1827
1788
|
switch: this.addGroup()
|
|
1828
1789
|
})
|
|
@@ -1984,7 +1945,7 @@ class nt extends c {
|
|
|
1984
1945
|
* @returns {void}
|
|
1985
1946
|
*/
|
|
1986
1947
|
noScaleResize() {
|
|
1987
|
-
const e =
|
|
1948
|
+
const e = O.getSize(container);
|
|
1988
1949
|
this.width = canvas.width = e.width, this.height = canvas.height = e.height;
|
|
1989
1950
|
}
|
|
1990
1951
|
/**
|
|
@@ -1994,7 +1955,7 @@ class nt extends c {
|
|
|
1994
1955
|
* @returns {void}
|
|
1995
1956
|
*/
|
|
1996
1957
|
scale() {
|
|
1997
|
-
const e = this.canvas, s = this.container, a =
|
|
1958
|
+
const e = this.canvas, s = this.container, a = O.getSize(s), i = this.targetSize, n = i.width, l = i.height;
|
|
1998
1959
|
let d = n + "px", r = l + "px";
|
|
1999
1960
|
if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
|
|
2000
1961
|
const f = a.width, p = a.height, u = f / n, b = p / l, v = Math.min(u, b);
|
|
@@ -2153,20 +2114,20 @@ class Pt extends c {
|
|
|
2153
2114
|
}
|
|
2154
2115
|
}
|
|
2155
2116
|
export {
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2117
|
+
xt as B,
|
|
2118
|
+
ke as C,
|
|
2119
|
+
ye as D,
|
|
2120
|
+
we as H,
|
|
2160
2121
|
Dt as I,
|
|
2161
|
-
|
|
2122
|
+
yt as N,
|
|
2162
2123
|
j as O,
|
|
2163
2124
|
ft as P,
|
|
2164
|
-
|
|
2125
|
+
kt as S,
|
|
2165
2126
|
P as T,
|
|
2166
2127
|
Pe as U,
|
|
2167
2128
|
pt as W,
|
|
2168
2129
|
he as a,
|
|
2169
|
-
|
|
2130
|
+
W as b,
|
|
2170
2131
|
ce as c,
|
|
2171
2132
|
gt as d,
|
|
2172
2133
|
mt as e,
|
|
@@ -2176,14 +2137,14 @@ export {
|
|
|
2176
2137
|
pe as i,
|
|
2177
2138
|
U as j,
|
|
2178
2139
|
bt as k,
|
|
2179
|
-
|
|
2140
|
+
wt as l,
|
|
2180
2141
|
vt as m,
|
|
2181
2142
|
St as n,
|
|
2182
2143
|
Ne as o,
|
|
2183
|
-
|
|
2184
|
-
|
|
2144
|
+
Ct as p,
|
|
2145
|
+
Lt as q,
|
|
2185
2146
|
qe as r,
|
|
2186
|
-
|
|
2147
|
+
It as s,
|
|
2187
2148
|
Bt as t,
|
|
2188
2149
|
Tt as u,
|
|
2189
2150
|
it as v,
|
|
@@ -29,13 +29,12 @@ export class UnderlinedButtonTab extends Component {
|
|
|
29
29
|
* @returns {object}
|
|
30
30
|
*/
|
|
31
31
|
render(): object;
|
|
32
|
-
selectedIndex: number;
|
|
33
32
|
/**
|
|
34
|
-
* This will
|
|
33
|
+
* This will get the first value.
|
|
35
34
|
*
|
|
36
|
-
* @returns {
|
|
35
|
+
* @returns {*}
|
|
37
36
|
*/
|
|
38
|
-
|
|
37
|
+
getFirstValue(): any;
|
|
39
38
|
/**
|
|
40
39
|
* This will select an option.
|
|
41
40
|
*
|
|
@@ -44,18 +43,18 @@ export class UnderlinedButtonTab extends Component {
|
|
|
44
43
|
*/
|
|
45
44
|
select(value: any): void;
|
|
46
45
|
/**
|
|
47
|
-
* This will
|
|
46
|
+
* This will update the content.
|
|
48
47
|
*
|
|
49
48
|
* @param {*} value
|
|
50
|
-
* @returns {
|
|
49
|
+
* @returns {object}
|
|
51
50
|
*/
|
|
52
|
-
|
|
51
|
+
updateContent(value: any): object;
|
|
53
52
|
/**
|
|
54
|
-
* This will
|
|
53
|
+
* This will setup the states.
|
|
55
54
|
*
|
|
56
|
-
* @returns {
|
|
55
|
+
* @returns {object}
|
|
57
56
|
*/
|
|
58
|
-
|
|
57
|
+
setupStates(): object;
|
|
59
58
|
}
|
|
60
59
|
export default UnderlinedButtonTab;
|
|
61
60
|
import { Component } from "@base-framework/base";
|
|
@@ -30,13 +30,6 @@ export class UnderlinedTabGroup extends Component {
|
|
|
30
30
|
* @returns {object}
|
|
31
31
|
*/
|
|
32
32
|
render(): object;
|
|
33
|
-
selectedIndex: number;
|
|
34
|
-
/**
|
|
35
|
-
* This will set the selected index.
|
|
36
|
-
*
|
|
37
|
-
* @returns {void}
|
|
38
|
-
*/
|
|
39
|
-
setSelectedIndex(): void;
|
|
40
33
|
/**
|
|
41
34
|
* This will select an option.
|
|
42
35
|
*
|
|
@@ -45,12 +38,11 @@ export class UnderlinedTabGroup extends Component {
|
|
|
45
38
|
*/
|
|
46
39
|
select(value: any): void;
|
|
47
40
|
/**
|
|
48
|
-
* This will
|
|
41
|
+
* This will setup the states.
|
|
49
42
|
*
|
|
50
|
-
* @
|
|
51
|
-
* @returns {void}
|
|
43
|
+
* @returns {object}
|
|
52
44
|
*/
|
|
53
|
-
|
|
45
|
+
setupStates(): object;
|
|
54
46
|
}
|
|
55
47
|
export default UnderlinedTabGroup;
|
|
56
48
|
import { Component } from '@base-framework/base';
|
package/package.json
CHANGED