@base-framework/ui 1.1.11 → 1.1.12
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.
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Atom as
|
|
3
|
-
import { B as P, I as
|
|
4
|
-
import { Icons as
|
|
5
|
-
import { TableBody as
|
|
6
|
-
import { C as
|
|
7
|
-
import { A as
|
|
1
|
+
import { Button as k, Div as o, On as C, Span as I, Th as N, UseParent as Q, I as G, Thead as V, Tr as X, Table as B, P as v, Li as w, Time as q, Nav as m, Ul as f, Input as K, Section as L, Canvas as _ } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as c, Component as p, Data as T, DateTime as J, router as y, NavLink as M, DataTracker as U, Jot as Z, base as $, Dom as O } from "@base-framework/base";
|
|
3
|
+
import { B as P, I as j } from "./buttons-Dr-bViom.js";
|
|
4
|
+
import { Icons as D } from "./icons.es.js";
|
|
5
|
+
import { TableBody as ee, DataTableBody as te, ScrollableTableBody as se, List as ae, IntervalTimer as ie } from "@base-framework/organisms";
|
|
6
|
+
import { C as ne, I as oe, H as le } from "./inputs-CcimrM1k.js";
|
|
7
|
+
import { A as re, P as ce } from "./range-calendar-BZW1R_D_.js";
|
|
8
8
|
import { V as g } from "./image-BB__4s0g.js";
|
|
9
|
-
|
|
9
|
+
c((t, e) => ({
|
|
10
10
|
class: "flex items-center px-4 py-2",
|
|
11
11
|
...t,
|
|
12
12
|
children: e
|
|
13
13
|
}));
|
|
14
|
-
|
|
14
|
+
c(({ value: t, label: e }) => k({
|
|
15
15
|
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",
|
|
16
16
|
onState: ["performance", { active: t }],
|
|
17
17
|
dataSet: ["performance", ["state", t, "active"]],
|
|
18
18
|
click: (s, { state: a }) => a.performance = t
|
|
19
19
|
}, e));
|
|
20
|
-
class
|
|
20
|
+
class pt extends p {
|
|
21
21
|
/**
|
|
22
22
|
* This will declare the props for the compiler.
|
|
23
23
|
*
|
|
@@ -35,55 +35,55 @@ class mt extends p {
|
|
|
35
35
|
return o({ class: this.class || "" }, this.children);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const de = (t) => {
|
|
39
39
|
const e = new Date(t, 11, 31), s = new Date(t, 0, 1);
|
|
40
40
|
return e.getDay() === 4 || // December 31 is a Thursday
|
|
41
41
|
s.getDay() === 4;
|
|
42
|
-
},
|
|
42
|
+
}, he = (t) => {
|
|
43
43
|
const e = new Date(t.valueOf()), s = (e.getDay() + 6) % 7;
|
|
44
44
|
e.setDate(e.getDate() - s + 3);
|
|
45
45
|
const a = e.getFullYear(), i = new Date(a, 0, 4);
|
|
46
46
|
i.setDate(i.getDate() - (i.getDay() + 6) % 7);
|
|
47
47
|
const n = Math.ceil((e - i) / 6048e5) + 1;
|
|
48
|
-
return n > 52 && !
|
|
48
|
+
return n > 52 && !de(a) ? {
|
|
49
49
|
weekNumber: 1,
|
|
50
50
|
year: a + 1
|
|
51
51
|
} : {
|
|
52
52
|
weekNumber: n,
|
|
53
53
|
year: a
|
|
54
54
|
};
|
|
55
|
-
},
|
|
55
|
+
}, ue = (t, e, s) => {
|
|
56
56
|
if (s === 0) return [];
|
|
57
57
|
const a = new Date(t, e, 0).getDate();
|
|
58
58
|
return Array.from(
|
|
59
59
|
{ length: s },
|
|
60
60
|
(i, n) => new Date(t, e - 1, a - s + n + 1)
|
|
61
61
|
);
|
|
62
|
-
},
|
|
62
|
+
}, fe = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), W = (t, e) => {
|
|
63
63
|
const s = new Date(e, 0, 4), a = (s.getDay() + 6) % 7, i = new Date(s);
|
|
64
64
|
i.setDate(s.getDate() - a);
|
|
65
65
|
const n = new Date(i);
|
|
66
66
|
return n.setDate(i.getDate() + (t - 1) * 7), n;
|
|
67
|
-
},
|
|
67
|
+
}, bt = (t, e) => {
|
|
68
68
|
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = [];
|
|
69
69
|
let n = [];
|
|
70
70
|
for (let l = 1 - s; l <= a; l++) {
|
|
71
|
-
const
|
|
72
|
-
n.push(l > 0 ?
|
|
71
|
+
const d = new Date(t, e, l);
|
|
72
|
+
n.push(l > 0 ? d : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
|
|
73
73
|
}
|
|
74
74
|
return i;
|
|
75
|
-
},
|
|
75
|
+
}, xt = (t, e) => {
|
|
76
76
|
const s = new Date(t, e + 1, 0).getDate(), a = [];
|
|
77
77
|
let i = [];
|
|
78
78
|
for (let n = 1; n <= s; n++)
|
|
79
79
|
i.push(new Date(t, e, n)), i.length === 7 && (a.push(i), i = []);
|
|
80
80
|
return i.length > 0 && a.push(i), a;
|
|
81
|
-
},
|
|
81
|
+
}, ge = (t, e, s) => {
|
|
82
82
|
const a = /* @__PURE__ */ new Date();
|
|
83
83
|
return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
|
|
84
|
-
},
|
|
85
|
-
const n =
|
|
86
|
-
return
|
|
84
|
+
}, me = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
|
|
85
|
+
const n = ge(t, e, s);
|
|
86
|
+
return k({
|
|
87
87
|
text: t || "",
|
|
88
88
|
disabled: !t,
|
|
89
89
|
class: `
|
|
@@ -93,19 +93,19 @@ const ce = (t) => {
|
|
|
93
93
|
`,
|
|
94
94
|
click: () => i(a, s)
|
|
95
95
|
});
|
|
96
|
-
},
|
|
97
|
-
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i =
|
|
96
|
+
}, pe = (t, e) => {
|
|
97
|
+
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = ue(t, e, s), n = Array.from({ length: a }, (h, x) => new Date(t, e, x + 1)), l = (i.length + n.length) % 7, d = l === 0 ? 0 : 7 - l, r = fe(t, e, d), u = [...i, ...n, ...r], b = [];
|
|
98
98
|
for (let h = 0; h < u.length; h += 7) {
|
|
99
|
-
const x = u.slice(h, h + 7),
|
|
99
|
+
const x = u.slice(h, h + 7), S = x.find((E) => E) || new Date(t, e, 1), { weekNumber: F, year: Y } = he(S);
|
|
100
100
|
b.push({
|
|
101
|
-
weekNumber:
|
|
102
|
-
year:
|
|
101
|
+
weekNumber: F,
|
|
102
|
+
year: Y,
|
|
103
103
|
days: x
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
return b;
|
|
107
|
-
},
|
|
108
|
-
const { year: i, month: n, currentDate: l } = a,
|
|
107
|
+
}, be = ({ selectWeek: t }) => C("month", (e, s, { data: a }) => {
|
|
108
|
+
const { year: i, month: n, currentDate: l } = a, d = pe(i, n);
|
|
109
109
|
return o(
|
|
110
110
|
{ class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
|
|
111
111
|
[
|
|
@@ -116,11 +116,11 @@ const ce = (t) => {
|
|
|
116
116
|
class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
|
|
117
117
|
},
|
|
118
118
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
119
|
-
(r) =>
|
|
119
|
+
(r) => I({ class: "px-1 py-1", text: r })
|
|
120
120
|
)
|
|
121
121
|
),
|
|
122
122
|
// Render each "week" row
|
|
123
|
-
...
|
|
123
|
+
...d.map(
|
|
124
124
|
({ weekNumber: r, days: u, year: b }) => o({
|
|
125
125
|
class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
|
|
126
126
|
onSet: ["currentWeek", {
|
|
@@ -142,7 +142,7 @@ const ce = (t) => {
|
|
|
142
142
|
o(
|
|
143
143
|
{ class: "grid grid-cols-7 col-span-7 text-center" },
|
|
144
144
|
u.map(
|
|
145
|
-
(h) =>
|
|
145
|
+
(h) => me({
|
|
146
146
|
year: h?.getFullYear() || null,
|
|
147
147
|
month: h?.getMonth() || null,
|
|
148
148
|
day: h?.getDate() || null,
|
|
@@ -166,10 +166,10 @@ const ce = (t) => {
|
|
|
166
166
|
click: e,
|
|
167
167
|
"aria-label": `${t} month`,
|
|
168
168
|
variant: "icon",
|
|
169
|
-
icon: t === "Previous" ?
|
|
169
|
+
icon: t === "Previous" ? D.chevron.single.left : D.chevron.single.right
|
|
170
170
|
}
|
|
171
|
-
),
|
|
172
|
-
|
|
171
|
+
), xe = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
|
|
172
|
+
I("[[monthName]] [[year]]"),
|
|
173
173
|
z({
|
|
174
174
|
label: "Previous",
|
|
175
175
|
click: e
|
|
@@ -179,7 +179,7 @@ const ce = (t) => {
|
|
|
179
179
|
click: t
|
|
180
180
|
})
|
|
181
181
|
]);
|
|
182
|
-
class
|
|
182
|
+
class yt extends p {
|
|
183
183
|
/**
|
|
184
184
|
* This will declare the props for the compiler.
|
|
185
185
|
*
|
|
@@ -194,7 +194,7 @@ class xt extends p {
|
|
|
194
194
|
* @returns {Data}
|
|
195
195
|
*/
|
|
196
196
|
setData() {
|
|
197
|
-
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a =
|
|
197
|
+
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = W(s, e.getFullYear());
|
|
198
198
|
return new T({
|
|
199
199
|
monthName: this.getMonthName(a.getMonth()),
|
|
200
200
|
year: a.getFullYear(),
|
|
@@ -232,7 +232,7 @@ class xt extends p {
|
|
|
232
232
|
* @returns {string}
|
|
233
233
|
*/
|
|
234
234
|
getMonthName(e) {
|
|
235
|
-
return
|
|
235
|
+
return J.monthNames[e];
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
238
|
* Updates the calendar to show the previous month.
|
|
@@ -277,7 +277,7 @@ class xt extends p {
|
|
|
277
277
|
*/
|
|
278
278
|
selectWeek(e, s) {
|
|
279
279
|
this.data.currentWeek = e;
|
|
280
|
-
const a =
|
|
280
|
+
const a = W(e, s);
|
|
281
281
|
this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
|
|
282
282
|
}
|
|
283
283
|
/**
|
|
@@ -287,38 +287,38 @@ class xt extends p {
|
|
|
287
287
|
*/
|
|
288
288
|
render() {
|
|
289
289
|
return o({ class: "week-calendar-container border rounded-md p-3" }, [
|
|
290
|
-
|
|
290
|
+
xe({
|
|
291
291
|
next: () => this.goToNextMonth(),
|
|
292
292
|
previous: () => this.goToPreviousMonth()
|
|
293
293
|
}),
|
|
294
|
-
|
|
294
|
+
be({
|
|
295
295
|
selectWeek: (e, s) => this.selectWeek(e, s)
|
|
296
296
|
})
|
|
297
297
|
]);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
const
|
|
300
|
+
const ye = (t, e) => {
|
|
301
301
|
const s = t.toggleAllSelectedRows();
|
|
302
302
|
e.state.checked = !s;
|
|
303
303
|
}, ke = (t) => N({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
|
|
304
|
-
|
|
305
|
-
]),
|
|
304
|
+
Q((e) => new ne({ class: "mr-2", onChange: (s, a) => ye(e, a) }))
|
|
305
|
+
]), we = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
|
|
306
306
|
const l = t || "justify-start";
|
|
307
307
|
return N({
|
|
308
308
|
class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
|
|
309
309
|
click: e && (() => i(s))
|
|
310
310
|
}, [
|
|
311
311
|
o({ class: `flex flex-auto w-full items-center ${l}` }, [
|
|
312
|
-
|
|
313
|
-
e &&
|
|
312
|
+
I(a),
|
|
313
|
+
e && G({ class: "ml-2", html: D.arrows.upDown })
|
|
314
314
|
])
|
|
315
315
|
]);
|
|
316
316
|
}, R = (t) => V([
|
|
317
|
-
|
|
317
|
+
X({
|
|
318
318
|
class: "text-muted-foreground border-b",
|
|
319
319
|
map: [
|
|
320
320
|
t.headers,
|
|
321
|
-
(e) => e.label === "checkbox" ? ke({ toggle: t.toggle }) :
|
|
321
|
+
(e) => e.label === "checkbox" ? ke({ toggle: t.toggle }) : we({
|
|
322
322
|
align: e.align,
|
|
323
323
|
sortable: e.sortable,
|
|
324
324
|
key: e.key,
|
|
@@ -327,17 +327,17 @@ const xe = (t, e) => {
|
|
|
327
327
|
})
|
|
328
328
|
]
|
|
329
329
|
})
|
|
330
|
-
]),
|
|
330
|
+
]), ve = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i, skeleton: n, columnCount: l }) => new ee({
|
|
331
331
|
cache: "list",
|
|
332
332
|
key: t,
|
|
333
333
|
items: e,
|
|
334
|
-
rowItem: (
|
|
334
|
+
rowItem: (d) => a(d, s),
|
|
335
335
|
class: "divide-y divide-border",
|
|
336
336
|
emptyState: i,
|
|
337
337
|
skeleton: n,
|
|
338
338
|
columnCount: l
|
|
339
339
|
});
|
|
340
|
-
class
|
|
340
|
+
class A extends p {
|
|
341
341
|
/**
|
|
342
342
|
* Initializes component data.
|
|
343
343
|
*
|
|
@@ -423,7 +423,7 @@ class j extends p {
|
|
|
423
423
|
this.headers && R({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
424
424
|
// @ts-ignore
|
|
425
425
|
this.customHeader ?? null,
|
|
426
|
-
|
|
426
|
+
ve({
|
|
427
427
|
// @ts-ignore
|
|
428
428
|
key: this.key,
|
|
429
429
|
// @ts-ignore
|
|
@@ -502,7 +502,7 @@ class j extends p {
|
|
|
502
502
|
this.data.selectedRows = [];
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
505
|
+
const De = (t) => new te({
|
|
506
506
|
cache: "list",
|
|
507
507
|
loadMoreItems: t.loadMoreItems,
|
|
508
508
|
offset: t.offset,
|
|
@@ -515,7 +515,7 @@ const ve = (t) => new ee({
|
|
|
515
515
|
skeleton: t.skeleton,
|
|
516
516
|
columnCount: t.columnCount
|
|
517
517
|
});
|
|
518
|
-
class
|
|
518
|
+
class Se extends A {
|
|
519
519
|
/**
|
|
520
520
|
* Renders the DataTable component.
|
|
521
521
|
*
|
|
@@ -531,7 +531,7 @@ class De extends j {
|
|
|
531
531
|
this.headers && R({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
532
532
|
// @ts-ignore
|
|
533
533
|
this.customHeader ?? null,
|
|
534
|
-
|
|
534
|
+
De({
|
|
535
535
|
// @ts-ignore
|
|
536
536
|
loadMoreItems: this.loadMoreItems,
|
|
537
537
|
// @ts-ignore
|
|
@@ -567,7 +567,7 @@ class De extends j {
|
|
|
567
567
|
this.list.refresh();
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
const kt =
|
|
570
|
+
const kt = c((t) => new Se(
|
|
571
571
|
{
|
|
572
572
|
cache: t.cache ?? "list",
|
|
573
573
|
tableData: t.data,
|
|
@@ -584,7 +584,7 @@ const kt = d((t) => new De(
|
|
|
584
584
|
emptyState: t.emptyState,
|
|
585
585
|
skeleton: t.skeleton
|
|
586
586
|
}
|
|
587
|
-
)),
|
|
587
|
+
)), Ce = (t) => new se({
|
|
588
588
|
cache: "list",
|
|
589
589
|
scrollContainer: t.scrollContainer,
|
|
590
590
|
loadMoreItems: t.loadMoreItems,
|
|
@@ -598,7 +598,7 @@ const kt = d((t) => new De(
|
|
|
598
598
|
skeleton: t.skeleton,
|
|
599
599
|
columnCount: t.columnCount
|
|
600
600
|
});
|
|
601
|
-
class
|
|
601
|
+
class Ie extends A {
|
|
602
602
|
/**
|
|
603
603
|
* Renders the DataTable component.
|
|
604
604
|
*
|
|
@@ -614,7 +614,7 @@ class Ce extends j {
|
|
|
614
614
|
this.headers && R({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
615
615
|
// @ts-ignore
|
|
616
616
|
this.customHeader ?? null,
|
|
617
|
-
|
|
617
|
+
Ce({
|
|
618
618
|
// @ts-ignore
|
|
619
619
|
scrollContainer: this.scrollContainer,
|
|
620
620
|
// @ts-ignore
|
|
@@ -652,7 +652,7 @@ class Ce extends j {
|
|
|
652
652
|
this.list.refresh();
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
|
-
const
|
|
655
|
+
const wt = c((t) => new Ie(
|
|
656
656
|
{
|
|
657
657
|
cache: t.cache ?? "list",
|
|
658
658
|
tableData: t.data,
|
|
@@ -670,45 +670,45 @@ const yt = d((t) => new Ce(
|
|
|
670
670
|
emptyState: t.emptyState,
|
|
671
671
|
skeleton: t.skeleton
|
|
672
672
|
}
|
|
673
|
-
)), Le =
|
|
673
|
+
)), Le = c(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
|
|
674
674
|
v({ class: "text-base font-semibold leading-6 m-0" }, t),
|
|
675
675
|
v({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
|
|
676
|
-
])),
|
|
676
|
+
])), Be = () => o({ class: "flex items-center gap-x-1.5" }, [
|
|
677
677
|
o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
678
678
|
o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
679
679
|
]),
|
|
680
680
|
v({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
681
|
-
]),
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
]),
|
|
681
|
+
]), Te = (t) => v({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
682
|
+
I("Last seen "),
|
|
683
|
+
q({ datetime: t }, "3h ago")
|
|
684
|
+
]), Me = (t, e) => t === "online" ? Be() : Te(e), Pe = c(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
685
685
|
v({ class: "text-sm leading-6 m-0" }, t),
|
|
686
|
-
|
|
687
|
-
])),
|
|
686
|
+
Me(s, e)
|
|
687
|
+
])), Re = (t) => t.split(" ").map((s) => s[0]).join(""), $e = c((t) => w({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
688
688
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
689
|
-
|
|
689
|
+
re({ src: t.image, alt: t.name, fallbackText: Re(t.name) }),
|
|
690
690
|
Le({ name: t.name, email: t.email })
|
|
691
691
|
]),
|
|
692
|
-
|
|
692
|
+
Pe({
|
|
693
693
|
role: t.role,
|
|
694
694
|
lastSeen: t.lastSeen,
|
|
695
695
|
status: t.status
|
|
696
696
|
})
|
|
697
|
-
])),
|
|
697
|
+
])), vt = c((t) => new ae({
|
|
698
698
|
cache: "list",
|
|
699
699
|
key: "name",
|
|
700
700
|
items: t.users,
|
|
701
701
|
role: "list",
|
|
702
702
|
class: "divide-y divide-border",
|
|
703
|
-
rowItem:
|
|
704
|
-
})), Oe = (t, e) => e.includes(t), We = (t, e, s) => t.exact ? s === e : Oe(e, s),
|
|
703
|
+
rowItem: $e
|
|
704
|
+
})), Oe = (t, e) => e.includes(t), We = (t, e, s) => t.exact ? s === e : Oe(e, s), ze = ({ text: t, href: e, exact: s, hidden: a }) => new M({
|
|
705
705
|
text: t,
|
|
706
706
|
href: e,
|
|
707
707
|
exact: s,
|
|
708
708
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
709
709
|
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`
|
|
710
710
|
});
|
|
711
|
-
class
|
|
711
|
+
class Dt extends p {
|
|
712
712
|
/**
|
|
713
713
|
* This will declare the props for the compiler.
|
|
714
714
|
*
|
|
@@ -736,7 +736,7 @@ class vt extends p {
|
|
|
736
736
|
class: "flex gap-x-4",
|
|
737
737
|
map: [this.options, (e) => this.addLink(e)],
|
|
738
738
|
watch: {
|
|
739
|
-
value: ["[[path]]",
|
|
739
|
+
value: ["[[path]]", y.data],
|
|
740
740
|
callBack: this.updateLinks.bind(this)
|
|
741
741
|
}
|
|
742
742
|
})
|
|
@@ -749,7 +749,7 @@ class vt extends p {
|
|
|
749
749
|
* @returns {void}
|
|
750
750
|
*/
|
|
751
751
|
afterSetup() {
|
|
752
|
-
const e =
|
|
752
|
+
const e = y.data.path;
|
|
753
753
|
this.updateLinks(e);
|
|
754
754
|
}
|
|
755
755
|
/**
|
|
@@ -794,7 +794,7 @@ class vt extends p {
|
|
|
794
794
|
* @returns {object}
|
|
795
795
|
*/
|
|
796
796
|
addLink({ label: e, href: s, exact: a, hidden: i }) {
|
|
797
|
-
const n =
|
|
797
|
+
const n = ze({ text: e, href: s, exact: a, hidden: i });
|
|
798
798
|
return this.links.push(n), n;
|
|
799
799
|
}
|
|
800
800
|
/**
|
|
@@ -806,13 +806,13 @@ class vt extends p {
|
|
|
806
806
|
this.links = [];
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
const
|
|
809
|
+
const St = c((t) => {
|
|
810
810
|
const e = t.margin || "m-4 ml-0";
|
|
811
811
|
return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
|
|
812
812
|
P({ variant: "back", class: "ghost", ...t })
|
|
813
813
|
]);
|
|
814
814
|
});
|
|
815
|
-
class
|
|
815
|
+
class H extends p {
|
|
816
816
|
/**
|
|
817
817
|
* This will declare the props for the compiler.
|
|
818
818
|
*
|
|
@@ -909,7 +909,7 @@ U.addType("dockableOverlay", (t) => {
|
|
|
909
909
|
const e = t.component;
|
|
910
910
|
e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
|
|
911
911
|
});
|
|
912
|
-
class
|
|
912
|
+
class Ct extends H {
|
|
913
913
|
/**
|
|
914
914
|
* This will stop presistence.
|
|
915
915
|
*
|
|
@@ -1010,7 +1010,7 @@ class St extends A {
|
|
|
1010
1010
|
this.state.docked = this.canDock();
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
|
-
class
|
|
1013
|
+
class It extends H {
|
|
1014
1014
|
/**
|
|
1015
1015
|
* This will get the overlay type.
|
|
1016
1016
|
*
|
|
@@ -1029,7 +1029,7 @@ class Ct extends A {
|
|
|
1029
1029
|
this.container = e, this.initialize();
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
const
|
|
1032
|
+
const Ne = c(({ index: t, click: e, state: s }, a) => w({
|
|
1033
1033
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
1034
1034
|
onState: [
|
|
1035
1035
|
[s, "selectedIndex", {
|
|
@@ -1038,11 +1038,11 @@ const ze = d(({ index: t, click: e, state: s }, a) => w({
|
|
|
1038
1038
|
}]
|
|
1039
1039
|
],
|
|
1040
1040
|
click: () => e(t)
|
|
1041
|
-
}, a)),
|
|
1041
|
+
}, a)), Ue = c(({ selectOption: t, state: e }) => f({
|
|
1042
1042
|
class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
|
|
1043
|
-
for: ["filteredOptions", (s, a) =>
|
|
1044
|
-
})),
|
|
1045
|
-
|
|
1043
|
+
for: ["filteredOptions", (s, a) => Ne({ index: a, click: t, state: e }, s.label)]
|
|
1044
|
+
})), je = c((t) => o({ class: "relative flex flex-auto items-center" }, [
|
|
1045
|
+
oe({
|
|
1046
1046
|
cache: "input",
|
|
1047
1047
|
class: t.class ?? "",
|
|
1048
1048
|
placeholder: t.placeholder ?? "Search...",
|
|
@@ -1058,22 +1058,22 @@ const ze = d(({ index: t, click: e, state: s }, a) => w({
|
|
|
1058
1058
|
]
|
|
1059
1059
|
}),
|
|
1060
1060
|
t.icon && o({ class: "absolute flex right-0 mr-2" }, [
|
|
1061
|
-
|
|
1061
|
+
j(t.icon)
|
|
1062
1062
|
])
|
|
1063
|
-
])),
|
|
1063
|
+
])), Ae = (t) => o({
|
|
1064
1064
|
class: "relative flex fle-auto flex-col",
|
|
1065
1065
|
onState: ["open", (e, s, a) => {
|
|
1066
1066
|
if (e)
|
|
1067
|
-
return new
|
|
1067
|
+
return new ce({
|
|
1068
1068
|
cache: "dropdown",
|
|
1069
1069
|
parent: a,
|
|
1070
1070
|
button: a.input,
|
|
1071
1071
|
size: "xl"
|
|
1072
1072
|
}, [
|
|
1073
|
-
|
|
1073
|
+
Ue(t)
|
|
1074
1074
|
]);
|
|
1075
1075
|
}]
|
|
1076
|
-
}), Lt =
|
|
1076
|
+
}), Lt = Z(
|
|
1077
1077
|
{
|
|
1078
1078
|
/**
|
|
1079
1079
|
* This will set up the data object.
|
|
@@ -1170,7 +1170,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => w({
|
|
|
1170
1170
|
*/
|
|
1171
1171
|
render() {
|
|
1172
1172
|
return o({ class: "relative w-full max-w-md" }, [
|
|
1173
|
-
|
|
1173
|
+
je({
|
|
1174
1174
|
// @ts-ignore
|
|
1175
1175
|
state: this.state,
|
|
1176
1176
|
// @ts-ignore
|
|
@@ -1182,7 +1182,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => w({
|
|
|
1182
1182
|
// @ts-ignore
|
|
1183
1183
|
handleKeyDown: this.handleKeyDown.bind(this)
|
|
1184
1184
|
}),
|
|
1185
|
-
|
|
1185
|
+
Ae({
|
|
1186
1186
|
// @ts-ignore
|
|
1187
1187
|
state: this.state,
|
|
1188
1188
|
// @ts-ignore
|
|
@@ -1193,22 +1193,45 @@ const ze = d(({ index: t, click: e, state: s }, a) => w({
|
|
|
1193
1193
|
]);
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
|
-
),
|
|
1196
|
+
), Bt = c((t) => {
|
|
1197
|
+
const e = t.icon ?? D.magnifyingGlass.default;
|
|
1198
|
+
return o({
|
|
1199
|
+
class: `relative flex items-center w-full rounded-full bg-muted/50 border border-border focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent transition-all ${t.containerClass || ""}`
|
|
1200
|
+
}, [
|
|
1201
|
+
o({ class: "absolute left-3 flex items-center pointer-events-none text-muted-foreground" }, [
|
|
1202
|
+
j({ size: "md" }, e)
|
|
1203
|
+
]),
|
|
1204
|
+
K({
|
|
1205
|
+
type: "text",
|
|
1206
|
+
cache: t.cache ?? "input",
|
|
1207
|
+
class: `w-full bg-transparent border-none outline-none pl-10 pr-4 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-0 ${t.class || ""}`,
|
|
1208
|
+
placeholder: t.placeholder ?? "Search...",
|
|
1209
|
+
bind: t.bind,
|
|
1210
|
+
value: t.value,
|
|
1211
|
+
keyup: t.keyup,
|
|
1212
|
+
keydown: t.keydown,
|
|
1213
|
+
input: t.input,
|
|
1214
|
+
change: t.change,
|
|
1215
|
+
focus: t.focus,
|
|
1216
|
+
blur: t.blur
|
|
1217
|
+
})
|
|
1218
|
+
]);
|
|
1219
|
+
}), He = (t) => w(
|
|
1197
1220
|
{
|
|
1198
1221
|
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",
|
|
1199
1222
|
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1200
1223
|
},
|
|
1201
1224
|
[
|
|
1202
|
-
|
|
1225
|
+
k({
|
|
1203
1226
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
|
|
1204
1227
|
onState: ["selected", { selected: t.value }],
|
|
1205
1228
|
click: (e) => t.callBack(t.value)
|
|
1206
1229
|
}, t.label)
|
|
1207
1230
|
]
|
|
1208
|
-
),
|
|
1209
|
-
f({ class: "flex flex-auto flex-row", map: [t.options, (e) =>
|
|
1231
|
+
), Fe = (t, e) => (t.callBack = e, He(t)), Ye = (t) => m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1232
|
+
f({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
|
|
1210
1233
|
]);
|
|
1211
|
-
class
|
|
1234
|
+
class Tt extends g {
|
|
1212
1235
|
/**
|
|
1213
1236
|
* This will declare the props for the compiler.
|
|
1214
1237
|
*
|
|
@@ -1225,12 +1248,12 @@ class It extends g {
|
|
|
1225
1248
|
render() {
|
|
1226
1249
|
const e = this.select.bind(this);
|
|
1227
1250
|
return o({ class: "" }, [
|
|
1228
|
-
|
|
1251
|
+
Ye({
|
|
1229
1252
|
class: this.class,
|
|
1230
1253
|
options: this.options,
|
|
1231
1254
|
callBack: e
|
|
1232
1255
|
}),
|
|
1233
|
-
|
|
1256
|
+
L({
|
|
1234
1257
|
class: "tab-content",
|
|
1235
1258
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1236
1259
|
})
|
|
@@ -1297,23 +1320,23 @@ class It extends g {
|
|
|
1297
1320
|
};
|
|
1298
1321
|
}
|
|
1299
1322
|
}
|
|
1300
|
-
const
|
|
1323
|
+
const Ee = (t) => w(
|
|
1301
1324
|
{
|
|
1302
1325
|
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",
|
|
1303
1326
|
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1304
1327
|
},
|
|
1305
1328
|
[
|
|
1306
|
-
|
|
1329
|
+
k({
|
|
1307
1330
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1308
1331
|
onState: ["selected", { selected: t.value }],
|
|
1309
1332
|
click: (e) => t.callBack(t.value),
|
|
1310
1333
|
disabled: t.disabled
|
|
1311
1334
|
}, t.label)
|
|
1312
1335
|
]
|
|
1313
|
-
),
|
|
1314
|
-
f({ class: "flex flex-auto flex-row", map: [t.options, (e) =>
|
|
1336
|
+
), Qe = (t, e) => (t.callBack = e, Ee(t)), Ge = (t) => m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1337
|
+
f({ class: "flex flex-auto flex-row", map: [t.options, (e) => Qe(e, t.callBack)] })
|
|
1315
1338
|
]);
|
|
1316
|
-
class
|
|
1339
|
+
class Mt extends g {
|
|
1317
1340
|
/**
|
|
1318
1341
|
* This will declare the props for the compiler.
|
|
1319
1342
|
*
|
|
@@ -1329,7 +1352,7 @@ class Bt extends g {
|
|
|
1329
1352
|
*/
|
|
1330
1353
|
render() {
|
|
1331
1354
|
const e = this.select.bind(this);
|
|
1332
|
-
return
|
|
1355
|
+
return Ge({
|
|
1333
1356
|
class: this.class,
|
|
1334
1357
|
options: this.options,
|
|
1335
1358
|
callBack: e
|
|
@@ -1355,17 +1378,17 @@ class Bt extends g {
|
|
|
1355
1378
|
};
|
|
1356
1379
|
}
|
|
1357
1380
|
}
|
|
1358
|
-
const Ve = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e),
|
|
1381
|
+
const Ve = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Xe = (t, e) => {
|
|
1359
1382
|
const s = t.getLinkPath();
|
|
1360
1383
|
return t.exact ? e === s : Ve(s, e);
|
|
1361
|
-
},
|
|
1384
|
+
}, qe = ({ text: t, href: e, exact: s }) => new M({
|
|
1362
1385
|
text: t,
|
|
1363
1386
|
href: e,
|
|
1364
1387
|
exact: s,
|
|
1365
1388
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
1366
1389
|
class: "inline-flex flex-auto items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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"
|
|
1367
1390
|
});
|
|
1368
|
-
class
|
|
1391
|
+
class Ke extends g {
|
|
1369
1392
|
/**
|
|
1370
1393
|
* This will declare the props for the compiler.
|
|
1371
1394
|
*
|
|
@@ -1391,7 +1414,7 @@ class qe extends g {
|
|
|
1391
1414
|
class: "flex flex-auto flex-row",
|
|
1392
1415
|
map: [this.options, (e) => this.addLink(e)],
|
|
1393
1416
|
watch: {
|
|
1394
|
-
value: ["[[path]]",
|
|
1417
|
+
value: ["[[path]]", y.data],
|
|
1395
1418
|
callBack: this.updateLinks.bind(this)
|
|
1396
1419
|
}
|
|
1397
1420
|
})
|
|
@@ -1403,7 +1426,7 @@ class qe extends g {
|
|
|
1403
1426
|
* @returns {void}
|
|
1404
1427
|
*/
|
|
1405
1428
|
afterSetup() {
|
|
1406
|
-
const e =
|
|
1429
|
+
const e = y.data.path;
|
|
1407
1430
|
this.updateLinks(e);
|
|
1408
1431
|
}
|
|
1409
1432
|
/**
|
|
@@ -1416,7 +1439,7 @@ class qe extends g {
|
|
|
1416
1439
|
let s = !1, a = this.links[0];
|
|
1417
1440
|
this.deactivateAllLinks();
|
|
1418
1441
|
for (const i of this.links)
|
|
1419
|
-
if (i.rendered !== !1 && (s =
|
|
1442
|
+
if (i.rendered !== !1 && (s = Xe(i, e), s === !0)) {
|
|
1420
1443
|
this.updateLink(i, !0);
|
|
1421
1444
|
break;
|
|
1422
1445
|
}
|
|
@@ -1448,7 +1471,7 @@ class qe extends g {
|
|
|
1448
1471
|
* @returns {object}
|
|
1449
1472
|
*/
|
|
1450
1473
|
addLink({ label: e, href: s, exact: a }) {
|
|
1451
|
-
const i =
|
|
1474
|
+
const i = qe({ text: e, href: s, exact: a });
|
|
1452
1475
|
return this.links.push(i), i;
|
|
1453
1476
|
}
|
|
1454
1477
|
/**
|
|
@@ -1460,7 +1483,7 @@ class qe extends g {
|
|
|
1460
1483
|
this.links = [];
|
|
1461
1484
|
}
|
|
1462
1485
|
}
|
|
1463
|
-
class
|
|
1486
|
+
class Pt extends g {
|
|
1464
1487
|
/**
|
|
1465
1488
|
* This will declare the props for the compiler.
|
|
1466
1489
|
*
|
|
@@ -1476,11 +1499,11 @@ class Tt extends g {
|
|
|
1476
1499
|
*/
|
|
1477
1500
|
render() {
|
|
1478
1501
|
return o({ class: "tab-panel" }, [
|
|
1479
|
-
new
|
|
1502
|
+
new Ke({
|
|
1480
1503
|
class: this.class,
|
|
1481
1504
|
options: this.options
|
|
1482
1505
|
}),
|
|
1483
|
-
|
|
1506
|
+
L({
|
|
1484
1507
|
class: "tab-content",
|
|
1485
1508
|
switch: this.addGroup()
|
|
1486
1509
|
})
|
|
@@ -1506,22 +1529,22 @@ class Tt extends g {
|
|
|
1506
1529
|
return s;
|
|
1507
1530
|
}
|
|
1508
1531
|
}
|
|
1509
|
-
const
|
|
1532
|
+
const _e = (t) => w(
|
|
1510
1533
|
{
|
|
1511
1534
|
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",
|
|
1512
1535
|
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1513
1536
|
},
|
|
1514
1537
|
[
|
|
1515
|
-
|
|
1538
|
+
k({
|
|
1516
1539
|
class: "flex flex-auto justify-center items-center px-4 py-3 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1517
1540
|
onState: ["selected", { selected: t.value }],
|
|
1518
1541
|
click: (e) => t.callBack(t.value)
|
|
1519
1542
|
}, t.label)
|
|
1520
1543
|
]
|
|
1521
|
-
),
|
|
1522
|
-
f({ class: "flex flex-row items-center", map: [t.options, (e) =>
|
|
1544
|
+
), Je = (t, e) => (t.callBack = e, _e(t)), Ze = (t) => m({ class: `border-b border-border ${t.class}` }, [
|
|
1545
|
+
f({ class: "flex flex-row items-center", map: [t.options, (e) => Je(e, t.callBack)] })
|
|
1523
1546
|
]);
|
|
1524
|
-
class
|
|
1547
|
+
class Rt extends g {
|
|
1525
1548
|
/**
|
|
1526
1549
|
* This will declare the props for the compiler.
|
|
1527
1550
|
*
|
|
@@ -1538,12 +1561,12 @@ class Mt extends g {
|
|
|
1538
1561
|
render() {
|
|
1539
1562
|
const e = this.select.bind(this);
|
|
1540
1563
|
return o({ class: "underlined-button-tab-panel flex flex-auto flex-col" }, [
|
|
1541
|
-
|
|
1564
|
+
Ze({
|
|
1542
1565
|
class: this.class,
|
|
1543
1566
|
options: this.options,
|
|
1544
1567
|
callBack: e
|
|
1545
1568
|
}),
|
|
1546
|
-
|
|
1569
|
+
L({
|
|
1547
1570
|
class: "tab-content pt-6 flex flex-auto flex-col",
|
|
1548
1571
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1549
1572
|
})
|
|
@@ -1601,23 +1624,23 @@ class Mt extends g {
|
|
|
1601
1624
|
};
|
|
1602
1625
|
}
|
|
1603
1626
|
}
|
|
1604
|
-
const
|
|
1627
|
+
const et = (t) => w(
|
|
1605
1628
|
{
|
|
1606
1629
|
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",
|
|
1607
1630
|
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1608
1631
|
},
|
|
1609
1632
|
[
|
|
1610
|
-
|
|
1633
|
+
k({
|
|
1611
1634
|
class: "flex flex-auto justify-center items-center px-4 py-3 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",
|
|
1612
1635
|
onState: ["selected", { selected: t.value }],
|
|
1613
1636
|
click: (e) => t.callBack(t.value),
|
|
1614
1637
|
disabled: t.disabled
|
|
1615
1638
|
}, t.label)
|
|
1616
1639
|
]
|
|
1617
|
-
),
|
|
1618
|
-
f({ class: "flex flex-row items-center", map: [t.options, (e) =>
|
|
1640
|
+
), tt = (t, e) => (t.callBack = e, et(t)), st = (t) => m({ class: `border-b border-border ${t.class}` }, [
|
|
1641
|
+
f({ class: "flex flex-row items-center", map: [t.options, (e) => tt(e, t.callBack)] })
|
|
1619
1642
|
]);
|
|
1620
|
-
class
|
|
1643
|
+
class $t extends g {
|
|
1621
1644
|
/**
|
|
1622
1645
|
* This will declare the props for the compiler.
|
|
1623
1646
|
*
|
|
@@ -1633,7 +1656,7 @@ class Pt extends g {
|
|
|
1633
1656
|
*/
|
|
1634
1657
|
render() {
|
|
1635
1658
|
const e = this.select.bind(this);
|
|
1636
|
-
return
|
|
1659
|
+
return st({
|
|
1637
1660
|
class: this.class,
|
|
1638
1661
|
options: this.options,
|
|
1639
1662
|
callBack: e
|
|
@@ -1659,17 +1682,17 @@ class Pt extends g {
|
|
|
1659
1682
|
};
|
|
1660
1683
|
}
|
|
1661
1684
|
}
|
|
1662
|
-
const
|
|
1685
|
+
const at = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), it = (t, e) => {
|
|
1663
1686
|
const s = t.getLinkPath();
|
|
1664
|
-
return t.exact ? e === s :
|
|
1665
|
-
},
|
|
1687
|
+
return t.exact ? e === s : at(s, e);
|
|
1688
|
+
}, nt = ({ text: t, href: e, exact: s }) => new M({
|
|
1666
1689
|
text: t,
|
|
1667
1690
|
href: e,
|
|
1668
1691
|
exact: s,
|
|
1669
1692
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
1670
1693
|
class: "relative inline-flex items-center justify-center whitespace-nowrap px-4 py-3 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"
|
|
1671
1694
|
});
|
|
1672
|
-
class
|
|
1695
|
+
class ot extends g {
|
|
1673
1696
|
/**
|
|
1674
1697
|
* This will declare the props for the compiler.
|
|
1675
1698
|
*
|
|
@@ -1695,7 +1718,7 @@ class nt extends g {
|
|
|
1695
1718
|
class: "flex flex-row items-center",
|
|
1696
1719
|
map: [this.options, (e) => this.addLink(e)],
|
|
1697
1720
|
watch: {
|
|
1698
|
-
value: ["[[path]]",
|
|
1721
|
+
value: ["[[path]]", y.data],
|
|
1699
1722
|
callBack: this.updateLinks.bind(this)
|
|
1700
1723
|
}
|
|
1701
1724
|
})
|
|
@@ -1707,7 +1730,7 @@ class nt extends g {
|
|
|
1707
1730
|
* @returns {void}
|
|
1708
1731
|
*/
|
|
1709
1732
|
afterSetup() {
|
|
1710
|
-
const e =
|
|
1733
|
+
const e = y.data.path;
|
|
1711
1734
|
this.updateLinks(e);
|
|
1712
1735
|
}
|
|
1713
1736
|
/**
|
|
@@ -1720,7 +1743,7 @@ class nt extends g {
|
|
|
1720
1743
|
let s = !1, a = this.links[0];
|
|
1721
1744
|
this.deactivateAllLinks();
|
|
1722
1745
|
for (const i of this.links)
|
|
1723
|
-
if (i.rendered !== !1 && (s =
|
|
1746
|
+
if (i.rendered !== !1 && (s = it(i, e), s === !0)) {
|
|
1724
1747
|
this.updateLink(i, !0);
|
|
1725
1748
|
break;
|
|
1726
1749
|
}
|
|
@@ -1752,7 +1775,7 @@ class nt extends g {
|
|
|
1752
1775
|
* @returns {object}
|
|
1753
1776
|
*/
|
|
1754
1777
|
addLink({ label: e, href: s, exact: a }) {
|
|
1755
|
-
const i =
|
|
1778
|
+
const i = nt({ text: e, href: s, exact: a });
|
|
1756
1779
|
return this.links.push(i), i;
|
|
1757
1780
|
}
|
|
1758
1781
|
/**
|
|
@@ -1764,7 +1787,7 @@ class nt extends g {
|
|
|
1764
1787
|
this.links = [];
|
|
1765
1788
|
}
|
|
1766
1789
|
}
|
|
1767
|
-
class
|
|
1790
|
+
class Ot extends g {
|
|
1768
1791
|
/**
|
|
1769
1792
|
* This will declare the props for the compiler.
|
|
1770
1793
|
*
|
|
@@ -1780,11 +1803,11 @@ class Rt extends g {
|
|
|
1780
1803
|
*/
|
|
1781
1804
|
render() {
|
|
1782
1805
|
return o({ class: "underlined-tab-panel flex flex-auto flex-col" }, [
|
|
1783
|
-
new
|
|
1806
|
+
new ot({
|
|
1784
1807
|
class: this.class,
|
|
1785
1808
|
options: this.options
|
|
1786
1809
|
}),
|
|
1787
|
-
|
|
1810
|
+
L({
|
|
1788
1811
|
class: "tab-content pt-6 flex flex-auto flex-col",
|
|
1789
1812
|
switch: this.addGroup()
|
|
1790
1813
|
})
|
|
@@ -1810,7 +1833,7 @@ class Rt extends g {
|
|
|
1810
1833
|
return s;
|
|
1811
1834
|
}
|
|
1812
1835
|
}
|
|
1813
|
-
class
|
|
1836
|
+
class lt extends p {
|
|
1814
1837
|
/**
|
|
1815
1838
|
* Runs before rendering, sets up defaults, a timer for drawing,
|
|
1816
1839
|
* and basic canvas properties.
|
|
@@ -1820,7 +1843,7 @@ class ot extends p {
|
|
|
1820
1843
|
onCreated() {
|
|
1821
1844
|
this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
|
|
1822
1845
|
const e = 1e3 / 60;
|
|
1823
|
-
this.timer = new
|
|
1846
|
+
this.timer = new ie(e, this.draw.bind(this)), this.width = 0, this.height = 0, this.signed = !1, this.mouse = { x: 0, y: 0, status: "up" }, this.margin = this.margin || { x: 40, y: 60 }, this.targetSize = this.targetSize || { width: 740, height: 345 }, this.baseLineWidth = this.baseLineWidth || 2, this.baseStrokeColor = this.baseStrokeColor || "#000000";
|
|
1824
1847
|
}
|
|
1825
1848
|
/**
|
|
1826
1849
|
* Renders a <canvas> element.
|
|
@@ -1828,7 +1851,7 @@ class ot extends p {
|
|
|
1828
1851
|
* @returns {object} Layout definition for the canvas.
|
|
1829
1852
|
*/
|
|
1830
1853
|
render() {
|
|
1831
|
-
return
|
|
1854
|
+
return _({
|
|
1832
1855
|
style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
|
|
1833
1856
|
});
|
|
1834
1857
|
}
|
|
@@ -1881,8 +1904,8 @@ class ot extends p {
|
|
|
1881
1904
|
s = u.clientX, a = u.clientY;
|
|
1882
1905
|
} else
|
|
1883
1906
|
s = e.x || e.clientX, a = e.y || e.clientY;
|
|
1884
|
-
const
|
|
1885
|
-
this.mouse.x =
|
|
1907
|
+
const d = parseInt((s - l.left) * n), r = parseInt((a - l.top) * n);
|
|
1908
|
+
this.mouse.x = d, this.mouse.y = r;
|
|
1886
1909
|
}
|
|
1887
1910
|
/**
|
|
1888
1911
|
* Called when the pointer goes down on the canvas.
|
|
@@ -1925,8 +1948,8 @@ class ot extends p {
|
|
|
1925
1948
|
const { canvas: e, ctx: s } = this, a = e.toDataURL();
|
|
1926
1949
|
if (this.scale(), this.setupBackground(s), a !== "data:,") {
|
|
1927
1950
|
const i = new globalThis.Image();
|
|
1928
|
-
|
|
1929
|
-
s.drawImage(i, 0, 0),
|
|
1951
|
+
$.on("load", i, function n() {
|
|
1952
|
+
s.drawImage(i, 0, 0), $.off("load", i, n);
|
|
1930
1953
|
}), i.src = a;
|
|
1931
1954
|
}
|
|
1932
1955
|
this.draw();
|
|
@@ -1946,7 +1969,7 @@ class ot extends p {
|
|
|
1946
1969
|
* @returns {void}
|
|
1947
1970
|
*/
|
|
1948
1971
|
noScaleResize() {
|
|
1949
|
-
const e =
|
|
1972
|
+
const e = O.getSize(container);
|
|
1950
1973
|
this.width = canvas.width = e.width, this.height = canvas.height = e.height;
|
|
1951
1974
|
}
|
|
1952
1975
|
/**
|
|
@@ -1956,13 +1979,13 @@ class ot extends p {
|
|
|
1956
1979
|
* @returns {void}
|
|
1957
1980
|
*/
|
|
1958
1981
|
scale() {
|
|
1959
|
-
const e = this.canvas, s = this.container, a =
|
|
1960
|
-
let
|
|
1982
|
+
const e = this.canvas, s = this.container, a = O.getSize(s), i = this.targetSize, n = i.width, l = i.height;
|
|
1983
|
+
let d = n + "px", r = l + "px";
|
|
1961
1984
|
if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
|
|
1962
|
-
const u = a.width, b = a.height, h = u / n, x = b / l,
|
|
1963
|
-
|
|
1985
|
+
const u = a.width, b = a.height, h = u / n, x = b / l, S = Math.min(h, x);
|
|
1986
|
+
d = n * S + "px", r = l * S + "px";
|
|
1964
1987
|
}
|
|
1965
|
-
e.style.width =
|
|
1988
|
+
e.style.width = d, e.style.height = r;
|
|
1966
1989
|
}
|
|
1967
1990
|
/**
|
|
1968
1991
|
* Main drawing loop. If the mouse is down, adds a line
|
|
@@ -2036,7 +2059,7 @@ class ot extends p {
|
|
|
2036
2059
|
this.timer.stop(), this.status = "stopped";
|
|
2037
2060
|
}
|
|
2038
2061
|
}
|
|
2039
|
-
class
|
|
2062
|
+
class Wt extends p {
|
|
2040
2063
|
/**
|
|
2041
2064
|
* Sets up default properties for the signature panel.
|
|
2042
2065
|
*
|
|
@@ -2053,7 +2076,7 @@ class Ot extends p {
|
|
|
2053
2076
|
*/
|
|
2054
2077
|
render() {
|
|
2055
2078
|
return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
|
|
2056
|
-
|
|
2079
|
+
le({
|
|
2057
2080
|
cache: "hiddenInput",
|
|
2058
2081
|
required: !0,
|
|
2059
2082
|
bind: this.path + ".data"
|
|
@@ -2061,11 +2084,11 @@ class Ot extends p {
|
|
|
2061
2084
|
o({ class: "absolute top-2 right-2" }, [
|
|
2062
2085
|
P({
|
|
2063
2086
|
variant: "icon",
|
|
2064
|
-
icon:
|
|
2087
|
+
icon: D.circleX,
|
|
2065
2088
|
click: this.reset.bind(this)
|
|
2066
2089
|
})
|
|
2067
2090
|
]),
|
|
2068
|
-
new
|
|
2091
|
+
new lt({
|
|
2069
2092
|
cache: "canvasLayer",
|
|
2070
2093
|
margin: this.margin,
|
|
2071
2094
|
targetSize: this.targetSize,
|
|
@@ -2123,40 +2146,41 @@ class Ot extends p {
|
|
|
2123
2146
|
}
|
|
2124
2147
|
}
|
|
2125
2148
|
export {
|
|
2126
|
-
|
|
2149
|
+
St as B,
|
|
2127
2150
|
ke as C,
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2151
|
+
A as D,
|
|
2152
|
+
we as H,
|
|
2153
|
+
It as I,
|
|
2154
|
+
Dt as N,
|
|
2155
|
+
H as O,
|
|
2156
|
+
pt as P,
|
|
2157
|
+
wt as S,
|
|
2158
|
+
Pt as T,
|
|
2159
|
+
Rt as U,
|
|
2160
|
+
yt as W,
|
|
2161
|
+
Tt as a,
|
|
2162
|
+
ve as b,
|
|
2163
|
+
Ct as c,
|
|
2141
2164
|
kt as d,
|
|
2142
2165
|
Lt as e,
|
|
2143
|
-
|
|
2144
|
-
|
|
2166
|
+
je as f,
|
|
2167
|
+
Wt as g,
|
|
2145
2168
|
Bt as h,
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2169
|
+
Mt as i,
|
|
2170
|
+
Ke as j,
|
|
2171
|
+
R as k,
|
|
2172
|
+
Ot as l,
|
|
2173
|
+
$t as m,
|
|
2174
|
+
ot as n,
|
|
2175
|
+
vt as o,
|
|
2176
|
+
$e as p,
|
|
2177
|
+
me as q,
|
|
2155
2178
|
be as r,
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2179
|
+
xe as s,
|
|
2180
|
+
he as t,
|
|
2181
|
+
bt as u,
|
|
2182
|
+
W as v,
|
|
2183
|
+
xt as w,
|
|
2184
|
+
fe as x,
|
|
2185
|
+
ue as y
|
|
2162
2186
|
};
|