@base-framework/ui 1.0.304 → 1.0.306
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/atoms.es.js +2 -2
- package/dist/{empty-state-bqIz_PgT.js → empty-state-vu_Mhyk4.js} +1 -1
- package/dist/index.es.js +97 -93
- package/dist/molecules.es.js +1 -1
- package/dist/organisms.es.js +59 -55
- package/dist/{signature-panel-CEqzd6Sa.js → signature-panel-fsF3hz3L.js} +520 -175
- package/dist/{tooltip-EO3J6QFR.js → tooltip-B5hKQNZQ.js} +1 -1
- package/dist/types/components/organisms/organisms.d.ts +4 -0
- package/dist/types/components/organisms/tabs/underlined-button-tab.d.ts +61 -0
- package/dist/types/components/organisms/tabs/underlined-tab-examples.d.ts +2 -0
- package/dist/types/components/organisms/tabs/underlined-tab-group.d.ts +56 -0
- package/dist/types/components/organisms/tabs/underlined-tab-navigation.d.ts +63 -0
- package/dist/types/components/organisms/tabs/underlined-tab.d.ts +36 -0
- package/dist/{veil-fLMV40Wv.js → veil-CVCuKSvj.js} +1 -1
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Atom as
|
|
3
|
-
import { B as
|
|
4
|
-
import { Icons as
|
|
1
|
+
import { Button as k, Div as o, On as S, Span as I, Th as z, UseParent as F, I as E, Thead as G, Tr as Q, Table as L, P as y, Li as w, Time as X, Nav as m, Ul as g, Section as C, Canvas as q } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as h, Component as c, Data as B, DateTime as K, router as x, NavLink as T, DataTracker as N, Jot as V, base as R, Dom as W } from "@base-framework/base";
|
|
3
|
+
import { B as M, I as _ } from "./buttons-CHEs54Wl.js";
|
|
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";
|
|
6
6
|
import { C as ae, I as ie, H as ne } from "./inputs-9udyzkHR.js";
|
|
7
7
|
import { A as oe, P as le } from "./range-calendar-CnBylqhu.js";
|
|
8
|
-
|
|
8
|
+
h((t, e) => ({
|
|
9
9
|
class: "flex items-center px-4 py-2",
|
|
10
10
|
...t,
|
|
11
11
|
children: e
|
|
12
12
|
}));
|
|
13
|
-
|
|
13
|
+
h(({ value: t, label: e }) => k({
|
|
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"]],
|
|
17
17
|
click: (s, { state: a }) => a.performance = t
|
|
18
18
|
}, e));
|
|
19
|
-
class
|
|
19
|
+
class ft extends c {
|
|
20
20
|
/**
|
|
21
21
|
* This will declare the props for the compiler.
|
|
22
22
|
*
|
|
@@ -58,20 +58,20 @@ 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)), O = (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);
|
|
65
65
|
return n.setDate(i.getDate() + (t - 1) * 7), n;
|
|
66
|
-
},
|
|
66
|
+
}, gt = (t, e) => {
|
|
67
67
|
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = [];
|
|
68
68
|
let n = [];
|
|
69
69
|
for (let l = 1 - s; l <= a; l++) {
|
|
70
|
-
const
|
|
71
|
-
n.push(l > 0 ?
|
|
70
|
+
const d = new Date(t, e, l);
|
|
71
|
+
n.push(l > 0 ? d : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
|
|
72
72
|
}
|
|
73
73
|
return i;
|
|
74
|
-
},
|
|
74
|
+
}, mt = (t, e) => {
|
|
75
75
|
const s = new Date(t, e + 1, 0).getDate(), a = [];
|
|
76
76
|
let i = [];
|
|
77
77
|
for (let n = 1; n <= s; n++)
|
|
@@ -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 k({
|
|
86
86
|
text: t || "",
|
|
87
87
|
disabled: !t,
|
|
88
88
|
class: `
|
|
@@ -92,19 +92,19 @@ const re = (t) => {
|
|
|
92
92
|
`,
|
|
93
93
|
click: () => i(a, s)
|
|
94
94
|
});
|
|
95
|
-
},
|
|
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 }, (
|
|
97
|
-
for (let
|
|
98
|
-
const
|
|
99
|
-
|
|
95
|
+
}, ge = (t, e) => {
|
|
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 }, (u, b) => new Date(t, e, b + 1)), l = (i.length + n.length) % 7, d = l === 0 ? 0 : 7 - l, r = he(t, e, d), f = [...i, ...n, ...r], p = [];
|
|
97
|
+
for (let u = 0; u < f.length; u += 7) {
|
|
98
|
+
const b = f.slice(u, u + 7), v = b.find((Y) => Y) || new Date(t, e, 1), { weekNumber: A, year: H } = ce(v);
|
|
99
|
+
p.push({
|
|
100
100
|
weekNumber: A,
|
|
101
|
-
year:
|
|
102
|
-
days:
|
|
101
|
+
year: H,
|
|
102
|
+
days: b
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
return
|
|
106
|
-
},
|
|
107
|
-
const { year: i, month: n, currentDate: l } = a,
|
|
105
|
+
return p;
|
|
106
|
+
}, me = ({ selectWeek: t }) => S("month", (e, s, { data: a }) => {
|
|
107
|
+
const { year: i, month: n, currentDate: l } = a, d = ge(i, n);
|
|
108
108
|
return o(
|
|
109
109
|
{ class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
|
|
110
110
|
[
|
|
@@ -115,12 +115,12 @@ 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) => I({ class: "px-1 py-1", text: r })
|
|
119
119
|
)
|
|
120
120
|
),
|
|
121
121
|
// Render each "week" row
|
|
122
|
-
...
|
|
123
|
-
({ weekNumber: r, days: f, year:
|
|
122
|
+
...d.map(
|
|
123
|
+
({ weekNumber: r, days: f, year: p }) => o({
|
|
124
124
|
class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
|
|
125
125
|
onSet: ["currentWeek", {
|
|
126
126
|
ring: r
|
|
@@ -129,7 +129,7 @@ const re = (t) => {
|
|
|
129
129
|
// Left column: ISO week number
|
|
130
130
|
o({
|
|
131
131
|
class: "font-medium text-center col-span-1 rounded-sm cursor-pointer",
|
|
132
|
-
click: () => t(r,
|
|
132
|
+
click: () => t(r, p),
|
|
133
133
|
// If you have a 'currentWeek' state, you can highlight it with 'onSet'
|
|
134
134
|
onSet: ["currentWeek", {
|
|
135
135
|
"text-primary-foreground": r,
|
|
@@ -141,10 +141,10 @@ const re = (t) => {
|
|
|
141
141
|
o(
|
|
142
142
|
{ class: "grid grid-cols-7 col-span-7 text-center" },
|
|
143
143
|
f.map(
|
|
144
|
-
(
|
|
145
|
-
year:
|
|
146
|
-
month:
|
|
147
|
-
day:
|
|
144
|
+
(u) => fe({
|
|
145
|
+
year: u?.getFullYear() || null,
|
|
146
|
+
month: u?.getMonth() || null,
|
|
147
|
+
day: u?.getDate() || null,
|
|
148
148
|
weekNumber: r,
|
|
149
149
|
selectWeek: t
|
|
150
150
|
})
|
|
@@ -154,7 +154,7 @@ const re = (t) => {
|
|
|
154
154
|
)
|
|
155
155
|
]
|
|
156
156
|
);
|
|
157
|
-
}),
|
|
157
|
+
}), $ = ({ label: t, click: e }) => M(
|
|
158
158
|
{
|
|
159
159
|
class: `
|
|
160
160
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -165,20 +165,20 @@ const re = (t) => {
|
|
|
165
165
|
click: e,
|
|
166
166
|
"aria-label": `${t} month`,
|
|
167
167
|
variant: "icon",
|
|
168
|
-
icon: t === "Previous" ?
|
|
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
|
-
|
|
172
|
-
|
|
171
|
+
I("[[monthName]] [[year]]"),
|
|
172
|
+
$({
|
|
173
173
|
label: "Previous",
|
|
174
174
|
click: e
|
|
175
175
|
}),
|
|
176
|
-
|
|
176
|
+
$({
|
|
177
177
|
label: "Next",
|
|
178
178
|
click: t
|
|
179
179
|
})
|
|
180
180
|
]);
|
|
181
|
-
class
|
|
181
|
+
class pt extends c {
|
|
182
182
|
/**
|
|
183
183
|
* This will declare the props for the compiler.
|
|
184
184
|
*
|
|
@@ -193,8 +193,8 @@ class ot extends u {
|
|
|
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 = O(s, e.getFullYear());
|
|
197
|
+
return new B({
|
|
198
198
|
monthName: this.getMonthName(a.getMonth()),
|
|
199
199
|
year: a.getFullYear(),
|
|
200
200
|
month: a.getMonth(),
|
|
@@ -231,7 +231,7 @@ class ot extends u {
|
|
|
231
231
|
* @returns {string}
|
|
232
232
|
*/
|
|
233
233
|
getMonthName(e) {
|
|
234
|
-
return
|
|
234
|
+
return K.monthNames[e];
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
237
|
* Updates the calendar to show the previous month.
|
|
@@ -276,7 +276,7 @@ class ot extends u {
|
|
|
276
276
|
*/
|
|
277
277
|
selectWeek(e, s) {
|
|
278
278
|
this.data.currentWeek = e;
|
|
279
|
-
const a =
|
|
279
|
+
const a = O(e, s);
|
|
280
280
|
this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
@@ -290,34 +290,34 @@ class ot extends u {
|
|
|
290
290
|
next: () => this.goToNextMonth(),
|
|
291
291
|
previous: () => this.goToPreviousMonth()
|
|
292
292
|
}),
|
|
293
|
-
|
|
293
|
+
me({
|
|
294
294
|
selectWeek: (e, s) => this.selectWeek(e, s)
|
|
295
295
|
})
|
|
296
296
|
]);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
const
|
|
299
|
+
const be = (t, e) => {
|
|
300
300
|
const s = t.toggleAllSelectedRows();
|
|
301
301
|
e.state.checked = !s;
|
|
302
|
-
},
|
|
303
|
-
F((e) => new ae({ class: "mr-2", onChange: (s, a) =>
|
|
304
|
-
]),
|
|
302
|
+
}, xe = (t) => z({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
|
|
303
|
+
F((e) => new ae({ class: "mr-2", onChange: (s, a) => be(e, a) }))
|
|
304
|
+
]), ke = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
|
|
305
305
|
const l = t || "justify-start";
|
|
306
|
-
return
|
|
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
|
-
|
|
312
|
-
e && E({ class: "ml-2", html:
|
|
311
|
+
I(a),
|
|
312
|
+
e && E({ class: "ml-2", html: D.arrows.upDown })
|
|
313
313
|
])
|
|
314
314
|
]);
|
|
315
|
-
},
|
|
316
|
-
|
|
315
|
+
}, P = (t) => G([
|
|
316
|
+
Q({
|
|
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" ? xe({ toggle: t.toggle }) : ke({
|
|
321
321
|
align: e.align,
|
|
322
322
|
sortable: e.sortable,
|
|
323
323
|
key: e.key,
|
|
@@ -326,17 +326,17 @@ const we = (t, e) => {
|
|
|
326
326
|
})
|
|
327
327
|
]
|
|
328
328
|
})
|
|
329
|
-
]),
|
|
329
|
+
]), we = ({ 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,
|
|
333
|
-
rowItem: (
|
|
333
|
+
rowItem: (d) => a(d, s),
|
|
334
334
|
class: "divide-y divide-border",
|
|
335
335
|
emptyState: i,
|
|
336
336
|
skeleton: n,
|
|
337
337
|
columnCount: l
|
|
338
338
|
});
|
|
339
|
-
class
|
|
339
|
+
class U extends c {
|
|
340
340
|
/**
|
|
341
341
|
* Initializes component data.
|
|
342
342
|
*
|
|
@@ -344,7 +344,7 @@ class H extends u {
|
|
|
344
344
|
*/
|
|
345
345
|
setData() {
|
|
346
346
|
let e = this.rows && this.rows.length > 0;
|
|
347
|
-
return (this.loadMoreItems || this.tableData) && !e && (e = null), new
|
|
347
|
+
return (this.loadMoreItems || this.tableData) && !e && (e = null), new B({
|
|
348
348
|
selectedRows: [],
|
|
349
349
|
// @ts-ignore
|
|
350
350
|
hasItems: e,
|
|
@@ -415,14 +415,14 @@ class H extends u {
|
|
|
415
415
|
render() {
|
|
416
416
|
const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
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
|
+
L({ class: "w-full" }, [
|
|
421
421
|
// @ts-ignore
|
|
422
|
-
this.headers &&
|
|
422
|
+
this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
423
423
|
// @ts-ignore
|
|
424
424
|
this.customHeader ?? null,
|
|
425
|
-
|
|
425
|
+
we({
|
|
426
426
|
// @ts-ignore
|
|
427
427
|
key: this.key,
|
|
428
428
|
// @ts-ignore
|
|
@@ -501,7 +501,7 @@ class H extends u {
|
|
|
501
501
|
this.data.selectedRows = [];
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const ye = (t) => new Z({
|
|
505
505
|
cache: "list",
|
|
506
506
|
loadMoreItems: t.loadMoreItems,
|
|
507
507
|
offset: t.offset,
|
|
@@ -514,7 +514,7 @@ const xe = (t) => new Z({
|
|
|
514
514
|
skeleton: t.skeleton,
|
|
515
515
|
columnCount: t.columnCount
|
|
516
516
|
});
|
|
517
|
-
class ve extends
|
|
517
|
+
class ve extends U {
|
|
518
518
|
/**
|
|
519
519
|
* Renders the DataTable component.
|
|
520
520
|
*
|
|
@@ -523,14 +523,14 @@ class ve extends H {
|
|
|
523
523
|
render() {
|
|
524
524
|
const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
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
|
+
L({ class: "w-full" }, [
|
|
529
529
|
// @ts-ignore
|
|
530
|
-
this.headers &&
|
|
530
|
+
this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
531
531
|
// @ts-ignore
|
|
532
532
|
this.customHeader ?? null,
|
|
533
|
-
|
|
533
|
+
ye({
|
|
534
534
|
// @ts-ignore
|
|
535
535
|
loadMoreItems: this.loadMoreItems,
|
|
536
536
|
// @ts-ignore
|
|
@@ -566,7 +566,7 @@ class ve extends H {
|
|
|
566
566
|
this.list.refresh();
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
const
|
|
569
|
+
const bt = h((t) => new ve(
|
|
570
570
|
{
|
|
571
571
|
cache: t.cache ?? "list",
|
|
572
572
|
tableData: t.data,
|
|
@@ -597,7 +597,7 @@ const lt = d((t) => new ve(
|
|
|
597
597
|
skeleton: t.skeleton,
|
|
598
598
|
columnCount: t.columnCount
|
|
599
599
|
});
|
|
600
|
-
class Se extends
|
|
600
|
+
class Se extends U {
|
|
601
601
|
/**
|
|
602
602
|
* Renders the DataTable component.
|
|
603
603
|
*
|
|
@@ -606,11 +606,11 @@ class Se extends H {
|
|
|
606
606
|
render() {
|
|
607
607
|
const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
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
|
+
L({ class: "w-full" }, [
|
|
612
612
|
// @ts-ignore
|
|
613
|
-
this.headers &&
|
|
613
|
+
this.headers && P({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
614
614
|
// @ts-ignore
|
|
615
615
|
this.customHeader ?? null,
|
|
616
616
|
De({
|
|
@@ -651,7 +651,7 @@ class Se extends H {
|
|
|
651
651
|
this.list.refresh();
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
const
|
|
654
|
+
const xt = h((t) => new Se(
|
|
655
655
|
{
|
|
656
656
|
cache: t.cache ?? "list",
|
|
657
657
|
tableData: t.data,
|
|
@@ -669,45 +669,45 @@ const rt = d((t) => new Se(
|
|
|
669
669
|
emptyState: t.emptyState,
|
|
670
670
|
skeleton: t.skeleton
|
|
671
671
|
}
|
|
672
|
-
)),
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
])),
|
|
672
|
+
)), Ie = h(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
|
|
673
|
+
y({ class: "text-base font-semibold leading-6 m-0" }, t),
|
|
674
|
+
y({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
|
|
675
|
+
])), Ce = () => 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
|
-
]), Le = (t) =>
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
]),
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
])), Me = (t) => t.split(" ").map((s) => s[0]).join(""),
|
|
679
|
+
y({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
680
|
+
]), Le = (t) => y({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
681
|
+
I("Last seen "),
|
|
682
|
+
X({ datetime: t }, "3h ago")
|
|
683
|
+
]), Be = (t, e) => t === "online" ? Ce() : Le(e), Te = h(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
684
|
+
y({ class: "text-sm leading-6 m-0" }, t),
|
|
685
|
+
Be(s, e)
|
|
686
|
+
])), Me = (t) => t.split(" ").map((s) => s[0]).join(""), Pe = h((t) => w({ 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
|
+
Ie({ 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
|
+
])), kt = 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
|
-
rowItem:
|
|
703
|
-
})),
|
|
702
|
+
rowItem: Pe
|
|
703
|
+
})), Re = (t, e) => e.includes(t), We = (t, e, s) => t.exact ? s === e : Re(e, s), Oe = ({ 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 wt extends c {
|
|
711
711
|
/**
|
|
712
712
|
* This will declare the props for the compiler.
|
|
713
713
|
*
|
|
@@ -728,14 +728,14 @@ class dt extends u {
|
|
|
728
728
|
* @returns {object}
|
|
729
729
|
*/
|
|
730
730
|
render() {
|
|
731
|
-
return
|
|
731
|
+
return m(
|
|
732
732
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
733
733
|
[
|
|
734
|
-
|
|
734
|
+
g({
|
|
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]]", x.data],
|
|
739
739
|
callBack: this.updateLinks.bind(this)
|
|
740
740
|
}
|
|
741
741
|
})
|
|
@@ -748,7 +748,7 @@ class dt extends u {
|
|
|
748
748
|
* @returns {void}
|
|
749
749
|
*/
|
|
750
750
|
afterSetup() {
|
|
751
|
-
const e =
|
|
751
|
+
const e = x.data.path;
|
|
752
752
|
this.updateLinks(e);
|
|
753
753
|
}
|
|
754
754
|
/**
|
|
@@ -763,7 +763,7 @@ class dt extends u {
|
|
|
763
763
|
for (const a of this.links) {
|
|
764
764
|
if (!a.rendered)
|
|
765
765
|
continue;
|
|
766
|
-
|
|
766
|
+
We(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
|
}
|
|
@@ -805,13 +805,13 @@ class dt extends u {
|
|
|
805
805
|
this.links = [];
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const yt = 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 })
|
|
812
812
|
]);
|
|
813
813
|
});
|
|
814
|
-
class j extends
|
|
814
|
+
class j extends c {
|
|
815
815
|
/**
|
|
816
816
|
* This will declare the props for the compiler.
|
|
817
817
|
*
|
|
@@ -904,7 +904,7 @@ N.addType("dockableOverlay", (t) => {
|
|
|
904
904
|
const e = t.component;
|
|
905
905
|
e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
|
|
906
906
|
});
|
|
907
|
-
class
|
|
907
|
+
class vt extends j {
|
|
908
908
|
/**
|
|
909
909
|
* This will stop presistence.
|
|
910
910
|
*
|
|
@@ -1013,7 +1013,7 @@ class ut extends j {
|
|
|
1013
1013
|
document.documentElement.style.overflowY = "auto";
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
|
-
class
|
|
1016
|
+
class Dt extends j {
|
|
1017
1017
|
/**
|
|
1018
1018
|
* This will get the overlay type.
|
|
1019
1019
|
*
|
|
@@ -1032,7 +1032,7 @@ class ft extends j {
|
|
|
1032
1032
|
this.container = e, this.initialize();
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1035
|
+
const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
1036
1036
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
1037
1037
|
onState: [
|
|
1038
1038
|
[s, "selectedIndex", {
|
|
@@ -1041,10 +1041,10 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1041
1041
|
}]
|
|
1042
1042
|
],
|
|
1043
1043
|
click: () => e(t)
|
|
1044
|
-
}, a)),
|
|
1044
|
+
}, a)), ze = h(({ selectOption: t, state: e }) => g({
|
|
1045
1045
|
class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
|
|
1046
|
-
for: ["filteredOptions", (s, a) =>
|
|
1047
|
-
})), Ne =
|
|
1046
|
+
for: ["filteredOptions", (s, a) => $e({ index: a, click: t, state: e }, s.label)]
|
|
1047
|
+
})), Ne = h((t) => o({ class: "relative flex items-center" }, [
|
|
1048
1048
|
ie({
|
|
1049
1049
|
cache: "input",
|
|
1050
1050
|
class: t.class ?? "",
|
|
@@ -1063,7 +1063,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1063
1063
|
t.icon && o({ class: "absolute flex right-0 mr-2" }, [
|
|
1064
1064
|
_(t.icon)
|
|
1065
1065
|
])
|
|
1066
|
-
])),
|
|
1066
|
+
])), Ue = (t) => o({
|
|
1067
1067
|
class: "relative flex fle-auto flex-col",
|
|
1068
1068
|
onState: ["open", (e, s, a) => {
|
|
1069
1069
|
if (e)
|
|
@@ -1073,10 +1073,10 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1073
1073
|
button: a.input,
|
|
1074
1074
|
size: "xl"
|
|
1075
1075
|
}, [
|
|
1076
|
-
|
|
1076
|
+
ze(t)
|
|
1077
1077
|
]);
|
|
1078
1078
|
}]
|
|
1079
|
-
}),
|
|
1079
|
+
}), St = V(
|
|
1080
1080
|
{
|
|
1081
1081
|
/**
|
|
1082
1082
|
* This will set up the data object.
|
|
@@ -1085,7 +1085,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1085
1085
|
*/
|
|
1086
1086
|
setData() {
|
|
1087
1087
|
const t = this.options || [];
|
|
1088
|
-
return new
|
|
1088
|
+
return new B({
|
|
1089
1089
|
options: t,
|
|
1090
1090
|
filteredOptions: t
|
|
1091
1091
|
});
|
|
@@ -1185,7 +1185,7 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1185
1185
|
// @ts-ignore
|
|
1186
1186
|
handleKeyDown: this.handleKeyDown.bind(this)
|
|
1187
1187
|
}),
|
|
1188
|
-
|
|
1188
|
+
Ue({
|
|
1189
1189
|
// @ts-ignore
|
|
1190
1190
|
state: this.state,
|
|
1191
1191
|
// @ts-ignore
|
|
@@ -1196,22 +1196,22 @@ const ze = d(({ index: t, click: e, state: s }, a) => S({
|
|
|
1196
1196
|
]);
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
|
-
), je = (t) =>
|
|
1199
|
+
), je = (t) => w(
|
|
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
|
+
k({
|
|
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)
|
|
1209
1209
|
}, t.label)
|
|
1210
1210
|
]
|
|
1211
|
-
), Ae = (t, e) => (t.callBack = e, je(t)),
|
|
1212
|
-
|
|
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
|
+
g({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ae(e, t.callBack)] })
|
|
1213
1213
|
]);
|
|
1214
|
-
class
|
|
1214
|
+
class It extends c {
|
|
1215
1215
|
/**
|
|
1216
1216
|
* This will declare the props for the compiler.
|
|
1217
1217
|
*
|
|
@@ -1228,12 +1228,12 @@ class gt extends u {
|
|
|
1228
1228
|
render() {
|
|
1229
1229
|
const e = this.select.bind(this);
|
|
1230
1230
|
return o({ class: "" }, [
|
|
1231
|
-
|
|
1231
|
+
He({
|
|
1232
1232
|
class: this.class,
|
|
1233
1233
|
options: this.options,
|
|
1234
1234
|
callBack: e
|
|
1235
1235
|
}),
|
|
1236
|
-
|
|
1236
|
+
C({
|
|
1237
1237
|
class: "tab-content",
|
|
1238
1238
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1239
1239
|
})
|
|
@@ -1298,23 +1298,23 @@ class gt extends u {
|
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
|
-
const Ye = (t) =>
|
|
1301
|
+
const Ye = (t) => w(
|
|
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
|
+
k({
|
|
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),
|
|
1311
1311
|
disabled: t.disabled
|
|
1312
1312
|
}, t.label)
|
|
1313
1313
|
]
|
|
1314
|
-
), Fe = (t, e) => (t.callBack = e, Ye(t)), Ee = (t) =>
|
|
1315
|
-
|
|
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
|
+
g({ class: "flex flex-auto flex-row", map: [t.options, (e) => Fe(e, t.callBack)] })
|
|
1316
1316
|
]);
|
|
1317
|
-
class
|
|
1317
|
+
class Ct extends c {
|
|
1318
1318
|
/**
|
|
1319
1319
|
* This will declare the props for the compiler.
|
|
1320
1320
|
*
|
|
@@ -1356,17 +1356,17 @@ class pt extends u {
|
|
|
1356
1356
|
};
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
|
-
const
|
|
1359
|
+
const Ge = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Qe = (t, e) => {
|
|
1360
1360
|
const s = t.getLinkPath();
|
|
1361
|
-
return t.exact ? e === s :
|
|
1362
|
-
},
|
|
1361
|
+
return t.exact ? e === s : Ge(s, e);
|
|
1362
|
+
}, Xe = ({ text: t, href: e, exact: s }) => new T({
|
|
1363
1363
|
text: t,
|
|
1364
1364
|
href: e,
|
|
1365
1365
|
exact: s,
|
|
1366
1366
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
1367
1367
|
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"
|
|
1368
1368
|
});
|
|
1369
|
-
class
|
|
1369
|
+
class qe extends c {
|
|
1370
1370
|
/**
|
|
1371
1371
|
* This will declare the props for the compiler.
|
|
1372
1372
|
*
|
|
@@ -1387,12 +1387,12 @@ class Ke extends u {
|
|
|
1387
1387
|
* @returns {object}
|
|
1388
1388
|
*/
|
|
1389
1389
|
render() {
|
|
1390
|
-
return
|
|
1391
|
-
|
|
1390
|
+
return m({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
|
|
1391
|
+
g({
|
|
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]]", x.data],
|
|
1396
1396
|
callBack: this.updateLinks.bind(this)
|
|
1397
1397
|
}
|
|
1398
1398
|
})
|
|
@@ -1404,7 +1404,7 @@ class Ke extends u {
|
|
|
1404
1404
|
* @returns {void}
|
|
1405
1405
|
*/
|
|
1406
1406
|
afterSetup() {
|
|
1407
|
-
const e =
|
|
1407
|
+
const e = x.data.path;
|
|
1408
1408
|
this.updateLinks(e);
|
|
1409
1409
|
}
|
|
1410
1410
|
/**
|
|
@@ -1417,7 +1417,7 @@ class Ke extends u {
|
|
|
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 = Qe(i, e), s === !0)) {
|
|
1421
1421
|
this.updateLink(i, !0);
|
|
1422
1422
|
break;
|
|
1423
1423
|
}
|
|
@@ -1449,7 +1449,7 @@ class Ke extends u {
|
|
|
1449
1449
|
* @returns {object}
|
|
1450
1450
|
*/
|
|
1451
1451
|
addLink({ label: e, href: s, exact: a }) {
|
|
1452
|
-
const i =
|
|
1452
|
+
const i = Xe({ text: e, href: s, exact: a });
|
|
1453
1453
|
return this.links.push(i), i;
|
|
1454
1454
|
}
|
|
1455
1455
|
/**
|
|
@@ -1461,7 +1461,7 @@ class Ke extends u {
|
|
|
1461
1461
|
this.links = [];
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
|
-
class
|
|
1464
|
+
class Lt extends c {
|
|
1465
1465
|
/**
|
|
1466
1466
|
* This will declare the props for the compiler.
|
|
1467
1467
|
*
|
|
@@ -1477,11 +1477,11 @@ class wt extends u {
|
|
|
1477
1477
|
*/
|
|
1478
1478
|
render() {
|
|
1479
1479
|
return o({ class: "tab-panel" }, [
|
|
1480
|
-
new
|
|
1480
|
+
new qe({
|
|
1481
1481
|
class: this.class,
|
|
1482
1482
|
options: this.options
|
|
1483
1483
|
}),
|
|
1484
|
-
|
|
1484
|
+
C({
|
|
1485
1485
|
class: "tab-content",
|
|
1486
1486
|
switch: this.addGroup()
|
|
1487
1487
|
})
|
|
@@ -1507,7 +1507,348 @@ class wt extends u {
|
|
|
1507
1507
|
return s;
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
|
|
1510
|
+
const Ke = (t) => w(
|
|
1511
|
+
{
|
|
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
|
+
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1514
|
+
},
|
|
1515
|
+
[
|
|
1516
|
+
k({
|
|
1517
|
+
class: "flex flex-auto justify-center items-center px-4 py-3",
|
|
1518
|
+
onSet: ["selected", { selected: t.value }],
|
|
1519
|
+
click: (e) => t.callBack(t.value)
|
|
1520
|
+
}, t.label)
|
|
1521
|
+
]
|
|
1522
|
+
), Ve = (t, e) => (t.callBack = e, Ke(t)), _e = (t) => m({ class: `border-b border-border ${t.class}` }, [
|
|
1523
|
+
g({ class: "flex flex-row items-center", map: [t.options, (e) => Ve(e, t.callBack)] })
|
|
1524
|
+
]);
|
|
1525
|
+
class Bt extends c {
|
|
1526
|
+
/**
|
|
1527
|
+
* This will declare the props for the compiler.
|
|
1528
|
+
*
|
|
1529
|
+
* @returns {void}
|
|
1530
|
+
*/
|
|
1531
|
+
declareProps() {
|
|
1532
|
+
this.options = [], this.class = "", this.onSelect = null;
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* This will render the component.
|
|
1536
|
+
*
|
|
1537
|
+
* @returns {object}
|
|
1538
|
+
*/
|
|
1539
|
+
render() {
|
|
1540
|
+
const e = this.select.bind(this);
|
|
1541
|
+
return o({ class: "underlined-button-tab-panel" }, [
|
|
1542
|
+
_e({
|
|
1543
|
+
class: this.class,
|
|
1544
|
+
options: this.options,
|
|
1545
|
+
callBack: e
|
|
1546
|
+
}),
|
|
1547
|
+
C({
|
|
1548
|
+
class: "tab-content pt-6",
|
|
1549
|
+
switch: this.addGroup()
|
|
1550
|
+
})
|
|
1551
|
+
]);
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* This will set up the component.
|
|
1555
|
+
*
|
|
1556
|
+
* @returns {void}
|
|
1557
|
+
*/
|
|
1558
|
+
beforeSetup() {
|
|
1559
|
+
this.selectedIndex = 0, this.setSelectedIndex();
|
|
1560
|
+
}
|
|
1561
|
+
/**
|
|
1562
|
+
* This will set the selected index.
|
|
1563
|
+
*
|
|
1564
|
+
* @returns {void}
|
|
1565
|
+
*/
|
|
1566
|
+
setSelectedIndex() {
|
|
1567
|
+
const e = this.options;
|
|
1568
|
+
for (let s = 0, a = e.length; s < a; s++)
|
|
1569
|
+
if (e[s].selected === !0) {
|
|
1570
|
+
this.selectedIndex = s;
|
|
1571
|
+
break;
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
/**
|
|
1575
|
+
* This will select an option.
|
|
1576
|
+
*
|
|
1577
|
+
* @param {*} value
|
|
1578
|
+
* @returns {void}
|
|
1579
|
+
*/
|
|
1580
|
+
select(e) {
|
|
1581
|
+
this.setSelected(e), this.onSelect && this.onSelect(e, this.selectedIndex);
|
|
1582
|
+
}
|
|
1583
|
+
/**
|
|
1584
|
+
* This will set the selected option.
|
|
1585
|
+
*
|
|
1586
|
+
* @param {*} value
|
|
1587
|
+
* @returns {void}
|
|
1588
|
+
*/
|
|
1589
|
+
setSelected(e) {
|
|
1590
|
+
const s = this.options;
|
|
1591
|
+
for (let a = 0, i = s.length; a < i; a++)
|
|
1592
|
+
if (s[a].value === e) {
|
|
1593
|
+
this.selectedIndex = a;
|
|
1594
|
+
break;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* This will add the group.
|
|
1599
|
+
*
|
|
1600
|
+
* @returns {array}
|
|
1601
|
+
*/
|
|
1602
|
+
addGroup() {
|
|
1603
|
+
let e;
|
|
1604
|
+
const s = [], a = this.options;
|
|
1605
|
+
for (let i = 0, n = a.length; i < n; i++)
|
|
1606
|
+
e = a[i], s.push(
|
|
1607
|
+
{
|
|
1608
|
+
uri: e.value,
|
|
1609
|
+
component: e.component,
|
|
1610
|
+
title: e.title || null,
|
|
1611
|
+
persist: !0
|
|
1612
|
+
}
|
|
1613
|
+
);
|
|
1614
|
+
return s;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
const Je = (t) => w(
|
|
1618
|
+
{
|
|
1619
|
+
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
|
+
dataSet: ["selected", ["state", t.value, "active"]]
|
|
1621
|
+
},
|
|
1622
|
+
[
|
|
1623
|
+
k({
|
|
1624
|
+
class: "flex flex-auto justify-center items-center px-4 py-3 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1625
|
+
onSet: ["selected", { selected: t.value }],
|
|
1626
|
+
click: (e) => t.callBack(t.value),
|
|
1627
|
+
disabled: t.disabled
|
|
1628
|
+
}, t.label)
|
|
1629
|
+
]
|
|
1630
|
+
), Ze = (t, e) => (t.callBack = e, Je(t)), et = (t) => m({ class: `border-b border-border ${t.class}` }, [
|
|
1631
|
+
g({ class: "flex flex-row items-center", map: [t.options, (e) => Ze(e, t.callBack)] })
|
|
1632
|
+
]);
|
|
1633
|
+
class Tt extends c {
|
|
1634
|
+
/**
|
|
1635
|
+
* This will declare the props for the compiler.
|
|
1636
|
+
*
|
|
1637
|
+
* @returns {void}
|
|
1638
|
+
*/
|
|
1639
|
+
declareProps() {
|
|
1640
|
+
this.options = [], this.class = "", this.onSelect = null;
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* This will render the component.
|
|
1644
|
+
*
|
|
1645
|
+
* @returns {object}
|
|
1646
|
+
*/
|
|
1647
|
+
render() {
|
|
1648
|
+
const e = this.select.bind(this);
|
|
1649
|
+
return et({
|
|
1650
|
+
class: this.class,
|
|
1651
|
+
options: this.options,
|
|
1652
|
+
callBack: e
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
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
|
+
/**
|
|
1677
|
+
* This will select an option.
|
|
1678
|
+
*
|
|
1679
|
+
* @param {*} value
|
|
1680
|
+
* @returns {void}
|
|
1681
|
+
*/
|
|
1682
|
+
select(e) {
|
|
1683
|
+
this.setSelected(e), this.onSelect && this.onSelect(e, this.selectedIndex);
|
|
1684
|
+
}
|
|
1685
|
+
/**
|
|
1686
|
+
* This will set the selected option.
|
|
1687
|
+
*
|
|
1688
|
+
* @param {*} value
|
|
1689
|
+
* @returns {void}
|
|
1690
|
+
*/
|
|
1691
|
+
setSelected(e) {
|
|
1692
|
+
const s = this.options;
|
|
1693
|
+
for (let a = 0, i = s.length; a < i; a++)
|
|
1694
|
+
if (s[a].value === e) {
|
|
1695
|
+
this.selectedIndex = a;
|
|
1696
|
+
break;
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
const tt = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), st = (t, e) => {
|
|
1701
|
+
const s = t.getLinkPath();
|
|
1702
|
+
return t.exact ? e === s : tt(s, e);
|
|
1703
|
+
}, at = ({ text: t, href: e, exact: s }) => new T({
|
|
1704
|
+
text: t,
|
|
1705
|
+
href: e,
|
|
1706
|
+
exact: s,
|
|
1707
|
+
dataSet: ["selected", ["state", !0, "active"]],
|
|
1708
|
+
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"
|
|
1709
|
+
});
|
|
1710
|
+
class it extends c {
|
|
1711
|
+
/**
|
|
1712
|
+
* This will declare the props for the compiler.
|
|
1713
|
+
*
|
|
1714
|
+
* @returns {void}
|
|
1715
|
+
*/
|
|
1716
|
+
declareProps() {
|
|
1717
|
+
this.options = [], this.class = "", this.onSelect = null;
|
|
1718
|
+
}
|
|
1719
|
+
/**
|
|
1720
|
+
* This will configure the links.
|
|
1721
|
+
*/
|
|
1722
|
+
beforeSetup() {
|
|
1723
|
+
this.links = [];
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* This will render the component.
|
|
1727
|
+
*
|
|
1728
|
+
* @returns {object}
|
|
1729
|
+
*/
|
|
1730
|
+
render() {
|
|
1731
|
+
return m({ class: `border-b border-border ${this.class}` }, [
|
|
1732
|
+
g({
|
|
1733
|
+
class: "flex flex-row items-center",
|
|
1734
|
+
map: [this.options, (e) => this.addLink(e)],
|
|
1735
|
+
watch: {
|
|
1736
|
+
value: ["[[path]]", x.data],
|
|
1737
|
+
callBack: this.updateLinks.bind(this)
|
|
1738
|
+
}
|
|
1739
|
+
})
|
|
1740
|
+
]);
|
|
1741
|
+
}
|
|
1742
|
+
/**
|
|
1743
|
+
* This will update the links.
|
|
1744
|
+
*
|
|
1745
|
+
* @returns {void}
|
|
1746
|
+
*/
|
|
1747
|
+
afterSetup() {
|
|
1748
|
+
const e = x.data.path;
|
|
1749
|
+
this.updateLinks(e);
|
|
1750
|
+
}
|
|
1751
|
+
/**
|
|
1752
|
+
* This will update the links.
|
|
1753
|
+
*
|
|
1754
|
+
* @param {string} value
|
|
1755
|
+
* @returns {void}
|
|
1756
|
+
*/
|
|
1757
|
+
updateLinks(e) {
|
|
1758
|
+
let s = !1, a = this.links[0];
|
|
1759
|
+
this.deactivateAllLinks();
|
|
1760
|
+
for (const i of this.links)
|
|
1761
|
+
if (i.rendered !== !1 && (s = st(i, e), s === !0)) {
|
|
1762
|
+
this.updateLink(i, !0);
|
|
1763
|
+
break;
|
|
1764
|
+
}
|
|
1765
|
+
s !== !0 && a && this.updateLink(a, !0);
|
|
1766
|
+
}
|
|
1767
|
+
/**
|
|
1768
|
+
* This will deactivate all links.
|
|
1769
|
+
*
|
|
1770
|
+
* @returns {void}
|
|
1771
|
+
*/
|
|
1772
|
+
deactivateAllLinks() {
|
|
1773
|
+
for (const e of this.links)
|
|
1774
|
+
this.updateLink(e, !1);
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* This will update the link.
|
|
1778
|
+
*
|
|
1779
|
+
* @param {object} link
|
|
1780
|
+
* @param {boolean} selected
|
|
1781
|
+
* @returns {void}
|
|
1782
|
+
*/
|
|
1783
|
+
updateLink(e, s) {
|
|
1784
|
+
e.update(s);
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* This will add a link.
|
|
1788
|
+
*
|
|
1789
|
+
* @param {object} option
|
|
1790
|
+
* @returns {object}
|
|
1791
|
+
*/
|
|
1792
|
+
addLink({ label: e, href: s, exact: a }) {
|
|
1793
|
+
const i = at({ text: e, href: s, exact: a });
|
|
1794
|
+
return this.links.push(i), i;
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* This will remove all the links.
|
|
1798
|
+
*
|
|
1799
|
+
* @returns {void}
|
|
1800
|
+
*/
|
|
1801
|
+
beforeDestroy() {
|
|
1802
|
+
this.links = [];
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
class Mt extends c {
|
|
1806
|
+
/**
|
|
1807
|
+
* This will declare the props for the compiler.
|
|
1808
|
+
*
|
|
1809
|
+
* @returns {void}
|
|
1810
|
+
*/
|
|
1811
|
+
declareProps() {
|
|
1812
|
+
this.options = [], this.class = "";
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* This will render the component.
|
|
1816
|
+
*
|
|
1817
|
+
* @returns {object}
|
|
1818
|
+
*/
|
|
1819
|
+
render() {
|
|
1820
|
+
return o({ class: "underlined-tab-panel" }, [
|
|
1821
|
+
new it({
|
|
1822
|
+
class: this.class,
|
|
1823
|
+
options: this.options
|
|
1824
|
+
}),
|
|
1825
|
+
C({
|
|
1826
|
+
class: "tab-content pt-6",
|
|
1827
|
+
switch: this.addGroup()
|
|
1828
|
+
})
|
|
1829
|
+
]);
|
|
1830
|
+
}
|
|
1831
|
+
/**
|
|
1832
|
+
* This will add the group.
|
|
1833
|
+
*
|
|
1834
|
+
* @returns {array}
|
|
1835
|
+
*/
|
|
1836
|
+
addGroup() {
|
|
1837
|
+
let e;
|
|
1838
|
+
const s = [], a = this.options;
|
|
1839
|
+
for (let i = 0, n = a.length; i < n; i++)
|
|
1840
|
+
e = a[i], s.push(
|
|
1841
|
+
{
|
|
1842
|
+
uri: e.uri || e.href,
|
|
1843
|
+
component: e.component,
|
|
1844
|
+
title: e.title || null,
|
|
1845
|
+
persist: !0
|
|
1846
|
+
}
|
|
1847
|
+
);
|
|
1848
|
+
return s;
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
class nt extends c {
|
|
1511
1852
|
/**
|
|
1512
1853
|
* Runs before rendering, sets up defaults, a timer for drawing,
|
|
1513
1854
|
* and basic canvas properties.
|
|
@@ -1525,7 +1866,7 @@ class Ge extends u {
|
|
|
1525
1866
|
* @returns {object} Layout definition for the canvas.
|
|
1526
1867
|
*/
|
|
1527
1868
|
render() {
|
|
1528
|
-
return
|
|
1869
|
+
return q({
|
|
1529
1870
|
style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
|
|
1530
1871
|
});
|
|
1531
1872
|
}
|
|
@@ -1578,8 +1919,8 @@ class Ge extends u {
|
|
|
1578
1919
|
s = f.clientX, a = f.clientY;
|
|
1579
1920
|
} else
|
|
1580
1921
|
s = e.x || e.clientX, a = e.y || e.clientY;
|
|
1581
|
-
const
|
|
1582
|
-
this.mouse.x =
|
|
1922
|
+
const d = parseInt((s - l.left) * n), r = parseInt((a - l.top) * n);
|
|
1923
|
+
this.mouse.x = d, this.mouse.y = r;
|
|
1583
1924
|
}
|
|
1584
1925
|
/**
|
|
1585
1926
|
* Called when the pointer goes down on the canvas.
|
|
@@ -1622,8 +1963,8 @@ class Ge extends u {
|
|
|
1622
1963
|
const { canvas: e, ctx: s } = this, a = e.toDataURL();
|
|
1623
1964
|
if (this.scale(), this.setupBackground(s), a !== "data:,") {
|
|
1624
1965
|
const i = new globalThis.Image();
|
|
1625
|
-
|
|
1626
|
-
s.drawImage(i, 0, 0),
|
|
1966
|
+
R.on("load", i, function n() {
|
|
1967
|
+
s.drawImage(i, 0, 0), R.off("load", i, n);
|
|
1627
1968
|
}), i.src = a;
|
|
1628
1969
|
}
|
|
1629
1970
|
this.draw();
|
|
@@ -1643,7 +1984,7 @@ class Ge extends u {
|
|
|
1643
1984
|
* @returns {void}
|
|
1644
1985
|
*/
|
|
1645
1986
|
noScaleResize() {
|
|
1646
|
-
const e =
|
|
1987
|
+
const e = W.getSize(container);
|
|
1647
1988
|
this.width = canvas.width = e.width, this.height = canvas.height = e.height;
|
|
1648
1989
|
}
|
|
1649
1990
|
/**
|
|
@@ -1653,13 +1994,13 @@ class Ge extends u {
|
|
|
1653
1994
|
* @returns {void}
|
|
1654
1995
|
*/
|
|
1655
1996
|
scale() {
|
|
1656
|
-
const e = this.canvas, s = this.container, a =
|
|
1657
|
-
let
|
|
1997
|
+
const e = this.canvas, s = this.container, a = W.getSize(s), i = this.targetSize, n = i.width, l = i.height;
|
|
1998
|
+
let d = n + "px", r = l + "px";
|
|
1658
1999
|
if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
|
|
1659
|
-
const f = a.width,
|
|
1660
|
-
|
|
2000
|
+
const f = a.width, p = a.height, u = f / n, b = p / l, v = Math.min(u, b);
|
|
2001
|
+
d = n * v + "px", r = l * v + "px";
|
|
1661
2002
|
}
|
|
1662
|
-
e.style.width =
|
|
2003
|
+
e.style.width = d, e.style.height = r;
|
|
1663
2004
|
}
|
|
1664
2005
|
/**
|
|
1665
2006
|
* Main drawing loop. If the mouse is down, adds a line
|
|
@@ -1733,7 +2074,7 @@ class Ge extends u {
|
|
|
1733
2074
|
this.timer.stop(), this.status = "stopped";
|
|
1734
2075
|
}
|
|
1735
2076
|
}
|
|
1736
|
-
class
|
|
2077
|
+
class Pt extends c {
|
|
1737
2078
|
/**
|
|
1738
2079
|
* Sets up default properties for the signature panel.
|
|
1739
2080
|
*
|
|
@@ -1756,13 +2097,13 @@ class yt extends u {
|
|
|
1756
2097
|
bind: this.path + ".data"
|
|
1757
2098
|
}),
|
|
1758
2099
|
o({ class: "absolute top-2 right-2" }, [
|
|
1759
|
-
|
|
2100
|
+
M({
|
|
1760
2101
|
variant: "icon",
|
|
1761
|
-
icon:
|
|
2102
|
+
icon: D.circleX,
|
|
1762
2103
|
click: this.reset.bind(this)
|
|
1763
2104
|
})
|
|
1764
2105
|
]),
|
|
1765
|
-
new
|
|
2106
|
+
new nt({
|
|
1766
2107
|
cache: "canvasLayer",
|
|
1767
2108
|
margin: this.margin,
|
|
1768
2109
|
targetSize: this.targetSize,
|
|
@@ -1812,36 +2153,40 @@ class yt extends u {
|
|
|
1812
2153
|
}
|
|
1813
2154
|
}
|
|
1814
2155
|
export {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
2156
|
+
yt as B,
|
|
2157
|
+
xe as C,
|
|
2158
|
+
we as D,
|
|
2159
|
+
ke as H,
|
|
2160
|
+
Dt as I,
|
|
2161
|
+
wt as N,
|
|
1821
2162
|
j as O,
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
2163
|
+
ft as P,
|
|
2164
|
+
xt as S,
|
|
2165
|
+
P as T,
|
|
2166
|
+
Pe as U,
|
|
2167
|
+
pt as W,
|
|
1827
2168
|
he as a,
|
|
1828
|
-
|
|
2169
|
+
O as b,
|
|
1829
2170
|
ce as c,
|
|
1830
|
-
|
|
1831
|
-
|
|
2171
|
+
gt as d,
|
|
2172
|
+
mt as e,
|
|
1832
2173
|
fe as f,
|
|
1833
2174
|
de as g,
|
|
1834
|
-
|
|
2175
|
+
me as h,
|
|
1835
2176
|
pe as i,
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
2177
|
+
U as j,
|
|
2178
|
+
bt as k,
|
|
2179
|
+
kt as l,
|
|
2180
|
+
vt as m,
|
|
2181
|
+
St as n,
|
|
1841
2182
|
Ne as o,
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
2183
|
+
It as p,
|
|
2184
|
+
Ct as q,
|
|
2185
|
+
qe as r,
|
|
2186
|
+
Lt as s,
|
|
2187
|
+
Bt as t,
|
|
2188
|
+
Tt as u,
|
|
2189
|
+
it as v,
|
|
2190
|
+
Mt as w,
|
|
2191
|
+
Pt as x
|
|
1847
2192
|
};
|