@base-framework/ui 1.0.322 → 1.0.324
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 +28 -27
- package/dist/{empty-state-C5ekpz8A.js → empty-state-ByQ_GcoM.js} +59 -58
- package/dist/form-group-CJzpq9Us.js +29 -0
- package/dist/index.es.js +157 -156
- package/dist/molecules.es.js +1 -1
- package/dist/organisms.es.js +1 -1
- package/dist/{signature-panel-Dshz3HOW.js → signature-panel-IVyojJhK.js} +245 -240
- package/dist/{tooltip-B5hKQNZQ.js → tooltip-PupzYM1r.js} +1 -1
- package/dist/types/components/organisms/tabs/button-tab.d.ts +2 -2
- package/dist/types/components/organisms/tabs/tab-group.d.ts +3 -3
- package/dist/types/components/organisms/tabs/tab-navigation.d.ts +2 -2
- package/dist/types/components/organisms/tabs/tab.d.ts +2 -2
- package/dist/types/components/organisms/tabs/underlined-button-tab.d.ts +2 -2
- package/dist/types/components/organisms/tabs/underlined-tab-group.d.ts +3 -3
- package/dist/types/components/organisms/tabs/underlined-tab-navigation.d.ts +2 -2
- package/dist/types/components/organisms/tabs/underlined-tab.d.ts +2 -2
- package/dist/veil-CqnAmj-D.js +20 -0
- package/package.json +1 -1
- package/dist/types/components/organisms/tabs/underlined-tab-examples.d.ts +0 -2
- package/dist/veil-CVCuKSvj.js +0 -46
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Atom as
|
|
3
|
-
import { B as
|
|
4
|
-
import { Icons as
|
|
5
|
-
import { TableBody as
|
|
6
|
-
import { C as
|
|
7
|
-
import { A as
|
|
8
|
-
|
|
1
|
+
import { Button as x, Div as o, On as C, Span as L, Th as N, UseParent as E, I as Q, Thead as V, Tr as G, Table as B, P as v, Li as y, Time as X, Nav as g, Ul as f, Section as I, Canvas as q } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as d, Component as p, Data as T, DateTime as K, router as w, NavLink as M, DataTracker as U, Jot as _, base as O, Dom as W } from "@base-framework/base";
|
|
3
|
+
import { B as P, I as J } from "./buttons-CHEs54Wl.js";
|
|
4
|
+
import { Icons as S } from "./icons.es.js";
|
|
5
|
+
import { TableBody as Z, DataTableBody as ee, ScrollableTableBody as te, List as se, IntervalTimer as ae } from "@base-framework/organisms";
|
|
6
|
+
import { C as ie, I as ne, H as oe } from "./inputs-9udyzkHR.js";
|
|
7
|
+
import { A as le, P as re } from "./range-calendar-BMWSJTE0.js";
|
|
8
|
+
import { V as m } from "./veil-CqnAmj-D.js";
|
|
9
|
+
d((t, e) => ({
|
|
9
10
|
class: "flex items-center px-4 py-2",
|
|
10
11
|
...t,
|
|
11
12
|
children: e
|
|
12
13
|
}));
|
|
13
|
-
|
|
14
|
+
d(({ value: t, label: e }) => x({
|
|
14
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",
|
|
15
16
|
onState: ["performance", { active: t }],
|
|
16
17
|
dataSet: ["performance", ["state", t, "active"]],
|
|
17
18
|
click: (s, { state: a }) => a.performance = t
|
|
18
19
|
}, e));
|
|
19
|
-
class
|
|
20
|
+
class gt extends p {
|
|
20
21
|
/**
|
|
21
22
|
* This will declare the props for the compiler.
|
|
22
23
|
*
|
|
@@ -34,55 +35,55 @@ class ft extends c {
|
|
|
34
35
|
return o({ class: this.class || "" }, this.children);
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
const
|
|
38
|
+
const ce = (t) => {
|
|
38
39
|
const e = new Date(t, 11, 31), s = new Date(t, 0, 1);
|
|
39
40
|
return e.getDay() === 4 || // December 31 is a Thursday
|
|
40
41
|
s.getDay() === 4;
|
|
41
|
-
},
|
|
42
|
+
}, de = (t) => {
|
|
42
43
|
const e = new Date(t.valueOf()), s = (e.getDay() + 6) % 7;
|
|
43
44
|
e.setDate(e.getDate() - s + 3);
|
|
44
45
|
const a = e.getFullYear(), i = new Date(a, 0, 4);
|
|
45
46
|
i.setDate(i.getDate() - (i.getDay() + 6) % 7);
|
|
46
47
|
const n = Math.ceil((e - i) / 6048e5) + 1;
|
|
47
|
-
return n > 52 && !
|
|
48
|
+
return n > 52 && !ce(a) ? {
|
|
48
49
|
weekNumber: 1,
|
|
49
50
|
year: a + 1
|
|
50
51
|
} : {
|
|
51
52
|
weekNumber: n,
|
|
52
53
|
year: a
|
|
53
54
|
};
|
|
54
|
-
},
|
|
55
|
+
}, he = (t, e, s) => {
|
|
55
56
|
if (s === 0) return [];
|
|
56
57
|
const a = new Date(t, e, 0).getDate();
|
|
57
58
|
return Array.from(
|
|
58
59
|
{ length: s },
|
|
59
60
|
(i, n) => new Date(t, e - 1, a - s + n + 1)
|
|
60
61
|
);
|
|
61
|
-
},
|
|
62
|
+
}, ue = (t, e, s) => Array.from({ length: s }, (a, i) => new Date(t, e + 1, i + 1)), $ = (t, e) => {
|
|
62
63
|
const s = new Date(e, 0, 4), a = (s.getDay() + 6) % 7, i = new Date(s);
|
|
63
64
|
i.setDate(s.getDate() - a);
|
|
64
65
|
const n = new Date(i);
|
|
65
66
|
return n.setDate(i.getDate() + (t - 1) * 7), n;
|
|
66
|
-
},
|
|
67
|
+
}, pt = (t, e) => {
|
|
67
68
|
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = [];
|
|
68
69
|
let n = [];
|
|
69
70
|
for (let l = 1 - s; l <= a; l++) {
|
|
70
|
-
const
|
|
71
|
-
n.push(l > 0 ?
|
|
71
|
+
const c = new Date(t, e, l);
|
|
72
|
+
n.push(l > 0 ? c : null), (n.length === 7 || l === a) && (i.push([...n]), n = []);
|
|
72
73
|
}
|
|
73
74
|
return i;
|
|
74
|
-
},
|
|
75
|
+
}, bt = (t, e) => {
|
|
75
76
|
const s = new Date(t, e + 1, 0).getDate(), a = [];
|
|
76
77
|
let i = [];
|
|
77
78
|
for (let n = 1; n <= s; n++)
|
|
78
79
|
i.push(new Date(t, e, n)), i.length === 7 && (a.push(i), i = []);
|
|
79
80
|
return i.length > 0 && a.push(i), a;
|
|
80
|
-
},
|
|
81
|
+
}, fe = (t, e, s) => {
|
|
81
82
|
const a = /* @__PURE__ */ new Date();
|
|
82
83
|
return a.getDate() === t && a.getMonth() === e && a.getFullYear() === s;
|
|
83
|
-
},
|
|
84
|
-
const n =
|
|
85
|
-
return
|
|
84
|
+
}, me = ({ day: t, month: e, year: s, weekNumber: a, selectWeek: i }) => {
|
|
85
|
+
const n = fe(t, e, s);
|
|
86
|
+
return x({
|
|
86
87
|
text: t || "",
|
|
87
88
|
disabled: !t,
|
|
88
89
|
class: `
|
|
@@ -93,18 +94,18 @@ const re = (t) => {
|
|
|
93
94
|
click: () => i(a, s)
|
|
94
95
|
});
|
|
95
96
|
}, ge = (t, e) => {
|
|
96
|
-
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i =
|
|
97
|
-
for (let
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
weekNumber:
|
|
101
|
-
year:
|
|
102
|
-
days:
|
|
97
|
+
const s = new Date(t, e, 1).getDay(), a = new Date(t, e + 1, 0).getDate(), i = he(t, e, s), n = Array.from({ length: a }, (h, k) => new Date(t, e, k + 1)), l = (i.length + n.length) % 7, c = l === 0 ? 0 : 7 - l, r = ue(t, e, c), u = [...i, ...n, ...r], b = [];
|
|
98
|
+
for (let h = 0; h < u.length; h += 7) {
|
|
99
|
+
const k = u.slice(h, h + 7), D = k.find((F) => F) || new Date(t, e, 1), { weekNumber: H, year: Y } = de(D);
|
|
100
|
+
b.push({
|
|
101
|
+
weekNumber: H,
|
|
102
|
+
year: Y,
|
|
103
|
+
days: k
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
|
-
return
|
|
106
|
-
},
|
|
107
|
-
const { year: i, month: n, currentDate: l } = a,
|
|
106
|
+
return b;
|
|
107
|
+
}, pe = ({ selectWeek: t }) => C("month", (e, s, { data: a }) => {
|
|
108
|
+
const { year: i, month: n, currentDate: l } = a, c = ge(i, n);
|
|
108
109
|
return o(
|
|
109
110
|
{ class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
|
|
110
111
|
[
|
|
@@ -115,12 +116,12 @@ const re = (t) => {
|
|
|
115
116
|
class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
|
|
116
117
|
},
|
|
117
118
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
118
|
-
(r) =>
|
|
119
|
+
(r) => L({ class: "px-1 py-1", text: r })
|
|
119
120
|
)
|
|
120
121
|
),
|
|
121
122
|
// Render each "week" row
|
|
122
|
-
...
|
|
123
|
-
({ weekNumber: r, days:
|
|
123
|
+
...c.map(
|
|
124
|
+
({ weekNumber: r, days: u, year: b }) => o({
|
|
124
125
|
class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
|
|
125
126
|
onSet: ["currentWeek", {
|
|
126
127
|
ring: r
|
|
@@ -129,7 +130,7 @@ const re = (t) => {
|
|
|
129
130
|
// Left column: ISO week number
|
|
130
131
|
o({
|
|
131
132
|
class: "font-medium text-center col-span-1 rounded-sm cursor-pointer",
|
|
132
|
-
click: () => t(r,
|
|
133
|
+
click: () => t(r, b),
|
|
133
134
|
// If you have a 'currentWeek' state, you can highlight it with 'onSet'
|
|
134
135
|
onSet: ["currentWeek", {
|
|
135
136
|
"text-primary-foreground": r,
|
|
@@ -140,11 +141,11 @@ const re = (t) => {
|
|
|
140
141
|
// The 7 cells for each day in the row
|
|
141
142
|
o(
|
|
142
143
|
{ class: "grid grid-cols-7 col-span-7 text-center" },
|
|
143
|
-
|
|
144
|
-
(
|
|
145
|
-
year:
|
|
146
|
-
month:
|
|
147
|
-
day:
|
|
144
|
+
u.map(
|
|
145
|
+
(h) => me({
|
|
146
|
+
year: h?.getFullYear() || null,
|
|
147
|
+
month: h?.getMonth() || null,
|
|
148
|
+
day: h?.getDate() || null,
|
|
148
149
|
weekNumber: r,
|
|
149
150
|
selectWeek: t
|
|
150
151
|
})
|
|
@@ -154,7 +155,7 @@ const re = (t) => {
|
|
|
154
155
|
)
|
|
155
156
|
]
|
|
156
157
|
);
|
|
157
|
-
}),
|
|
158
|
+
}), z = ({ label: t, click: e }) => P(
|
|
158
159
|
{
|
|
159
160
|
class: `
|
|
160
161
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -165,20 +166,20 @@ const re = (t) => {
|
|
|
165
166
|
click: e,
|
|
166
167
|
"aria-label": `${t} month`,
|
|
167
168
|
variant: "icon",
|
|
168
|
-
icon: t === "Previous" ?
|
|
169
|
+
icon: t === "Previous" ? S.chevron.single.left : S.chevron.single.right
|
|
169
170
|
}
|
|
170
|
-
),
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
), be = ({ next: t, previous: e }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
|
|
172
|
+
L("[[monthName]] [[year]]"),
|
|
173
|
+
z({
|
|
173
174
|
label: "Previous",
|
|
174
175
|
click: e
|
|
175
176
|
}),
|
|
176
|
-
|
|
177
|
+
z({
|
|
177
178
|
label: "Next",
|
|
178
179
|
click: t
|
|
179
180
|
})
|
|
180
181
|
]);
|
|
181
|
-
class
|
|
182
|
+
class kt extends p {
|
|
182
183
|
/**
|
|
183
184
|
* This will declare the props for the compiler.
|
|
184
185
|
*
|
|
@@ -193,8 +194,8 @@ class pt extends c {
|
|
|
193
194
|
* @returns {Data}
|
|
194
195
|
*/
|
|
195
196
|
setData() {
|
|
196
|
-
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a =
|
|
197
|
-
return new
|
|
197
|
+
const e = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(e), a = $(s, e.getFullYear());
|
|
198
|
+
return new T({
|
|
198
199
|
monthName: this.getMonthName(a.getMonth()),
|
|
199
200
|
year: a.getFullYear(),
|
|
200
201
|
month: a.getMonth(),
|
|
@@ -276,7 +277,7 @@ class pt extends c {
|
|
|
276
277
|
*/
|
|
277
278
|
selectWeek(e, s) {
|
|
278
279
|
this.data.currentWeek = e;
|
|
279
|
-
const a =
|
|
280
|
+
const a = $(e, s);
|
|
280
281
|
this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(e);
|
|
281
282
|
}
|
|
282
283
|
/**
|
|
@@ -286,38 +287,38 @@ class pt extends c {
|
|
|
286
287
|
*/
|
|
287
288
|
render() {
|
|
288
289
|
return o({ class: "week-calendar-container border rounded-md p-3" }, [
|
|
289
|
-
|
|
290
|
+
be({
|
|
290
291
|
next: () => this.goToNextMonth(),
|
|
291
292
|
previous: () => this.goToPreviousMonth()
|
|
292
293
|
}),
|
|
293
|
-
|
|
294
|
+
pe({
|
|
294
295
|
selectWeek: (e, s) => this.selectWeek(e, s)
|
|
295
296
|
})
|
|
296
297
|
]);
|
|
297
298
|
}
|
|
298
299
|
}
|
|
299
|
-
const
|
|
300
|
+
const ke = (t, e) => {
|
|
300
301
|
const s = t.toggleAllSelectedRows();
|
|
301
302
|
e.state.checked = !s;
|
|
302
|
-
},
|
|
303
|
-
|
|
304
|
-
]),
|
|
303
|
+
}, we = (t) => N({ class: `cursor-pointer py-3 px-4 text-base w-10 ${t.class || ""}` }, [
|
|
304
|
+
E((e) => new ie({ class: "mr-2", onChange: (s, a) => ke(e, a) }))
|
|
305
|
+
]), xe = ({ align: t, sortable: e, key: s, label: a, sort: i, class: n }) => {
|
|
305
306
|
const l = t || "justify-start";
|
|
306
|
-
return
|
|
307
|
+
return N({
|
|
307
308
|
class: `cursor-pointer py-3 px-4 text-base ${n || ""}`,
|
|
308
309
|
click: e && (() => i(s))
|
|
309
310
|
}, [
|
|
310
311
|
o({ class: `flex flex-auto w-full items-center ${l}` }, [
|
|
311
|
-
|
|
312
|
-
e &&
|
|
312
|
+
L(a),
|
|
313
|
+
e && Q({ class: "ml-2", html: S.arrows.upDown })
|
|
313
314
|
])
|
|
314
315
|
]);
|
|
315
|
-
},
|
|
316
|
+
}, R = (t) => V([
|
|
316
317
|
G({
|
|
317
318
|
class: "text-muted-foreground border-b",
|
|
318
319
|
map: [
|
|
319
320
|
t.headers,
|
|
320
|
-
(e) => e.label === "checkbox" ?
|
|
321
|
+
(e) => e.label === "checkbox" ? we({ toggle: t.toggle }) : xe({
|
|
321
322
|
align: e.align,
|
|
322
323
|
sortable: e.sortable,
|
|
323
324
|
key: e.key,
|
|
@@ -326,17 +327,17 @@ const be = (t, e) => {
|
|
|
326
327
|
})
|
|
327
328
|
]
|
|
328
329
|
})
|
|
329
|
-
]),
|
|
330
|
+
]), ye = ({ key: t, rows: e, selectRow: s, rowItem: a, emptyState: i, skeleton: n, columnCount: l }) => new Z({
|
|
330
331
|
cache: "list",
|
|
331
332
|
key: t,
|
|
332
333
|
items: e,
|
|
333
|
-
rowItem: (
|
|
334
|
+
rowItem: (c) => a(c, s),
|
|
334
335
|
class: "divide-y divide-border",
|
|
335
336
|
emptyState: i,
|
|
336
337
|
skeleton: n,
|
|
337
338
|
columnCount: l
|
|
338
339
|
});
|
|
339
|
-
class
|
|
340
|
+
class j extends p {
|
|
340
341
|
/**
|
|
341
342
|
* Initializes component data.
|
|
342
343
|
*
|
|
@@ -344,7 +345,7 @@ class U extends c {
|
|
|
344
345
|
*/
|
|
345
346
|
setData() {
|
|
346
347
|
let e = this.rows && this.rows.length > 0;
|
|
347
|
-
return (this.loadMoreItems || this.tableData) && !e && (e = null), new
|
|
348
|
+
return (this.loadMoreItems || this.tableData) && !e && (e = null), new T({
|
|
348
349
|
selectedRows: [],
|
|
349
350
|
// @ts-ignore
|
|
350
351
|
hasItems: e,
|
|
@@ -415,14 +416,14 @@ class U extends c {
|
|
|
415
416
|
render() {
|
|
416
417
|
const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
417
418
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
418
|
-
|
|
419
|
+
C("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
419
420
|
o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
420
|
-
|
|
421
|
+
B({ class: "w-full" }, [
|
|
421
422
|
// @ts-ignore
|
|
422
|
-
this.headers &&
|
|
423
|
+
this.headers && R({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
423
424
|
// @ts-ignore
|
|
424
425
|
this.customHeader ?? null,
|
|
425
|
-
|
|
426
|
+
ye({
|
|
426
427
|
// @ts-ignore
|
|
427
428
|
key: this.key,
|
|
428
429
|
// @ts-ignore
|
|
@@ -501,7 +502,7 @@ class U extends c {
|
|
|
501
502
|
this.data.selectedRows = [];
|
|
502
503
|
}
|
|
503
504
|
}
|
|
504
|
-
const
|
|
505
|
+
const ve = (t) => new ee({
|
|
505
506
|
cache: "list",
|
|
506
507
|
loadMoreItems: t.loadMoreItems,
|
|
507
508
|
offset: t.offset,
|
|
@@ -514,7 +515,7 @@ const ye = (t) => new Z({
|
|
|
514
515
|
skeleton: t.skeleton,
|
|
515
516
|
columnCount: t.columnCount
|
|
516
517
|
});
|
|
517
|
-
class
|
|
518
|
+
class De extends j {
|
|
518
519
|
/**
|
|
519
520
|
* Renders the DataTable component.
|
|
520
521
|
*
|
|
@@ -523,14 +524,14 @@ class ve extends U {
|
|
|
523
524
|
render() {
|
|
524
525
|
const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
525
526
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
526
|
-
|
|
527
|
+
C("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
527
528
|
o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
528
|
-
|
|
529
|
+
B({ class: "w-full" }, [
|
|
529
530
|
// @ts-ignore
|
|
530
|
-
this.headers &&
|
|
531
|
+
this.headers && R({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
531
532
|
// @ts-ignore
|
|
532
533
|
this.customHeader ?? null,
|
|
533
|
-
|
|
534
|
+
ve({
|
|
534
535
|
// @ts-ignore
|
|
535
536
|
loadMoreItems: this.loadMoreItems,
|
|
536
537
|
// @ts-ignore
|
|
@@ -566,7 +567,7 @@ class ve extends U {
|
|
|
566
567
|
this.list.refresh();
|
|
567
568
|
}
|
|
568
569
|
}
|
|
569
|
-
const
|
|
570
|
+
const wt = d((t) => new De(
|
|
570
571
|
{
|
|
571
572
|
cache: t.cache ?? "list",
|
|
572
573
|
tableData: t.data,
|
|
@@ -583,7 +584,7 @@ const bt = h((t) => new ve(
|
|
|
583
584
|
emptyState: t.emptyState,
|
|
584
585
|
skeleton: t.skeleton
|
|
585
586
|
}
|
|
586
|
-
)),
|
|
587
|
+
)), Se = (t) => new te({
|
|
587
588
|
cache: "list",
|
|
588
589
|
scrollContainer: t.scrollContainer,
|
|
589
590
|
loadMoreItems: t.loadMoreItems,
|
|
@@ -597,7 +598,7 @@ const bt = h((t) => new ve(
|
|
|
597
598
|
skeleton: t.skeleton,
|
|
598
599
|
columnCount: t.columnCount
|
|
599
600
|
});
|
|
600
|
-
class
|
|
601
|
+
class Ce extends j {
|
|
601
602
|
/**
|
|
602
603
|
* Renders the DataTable component.
|
|
603
604
|
*
|
|
@@ -606,14 +607,14 @@ class Se extends U {
|
|
|
606
607
|
render() {
|
|
607
608
|
const e = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
608
609
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
609
|
-
|
|
610
|
+
C("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
610
611
|
o({ class: `w-full rounded-md ${e} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
611
|
-
|
|
612
|
+
B({ class: "w-full" }, [
|
|
612
613
|
// @ts-ignore
|
|
613
|
-
this.headers &&
|
|
614
|
+
this.headers && R({ headers: this.headers, sort: (a) => this.sortRows(a) }),
|
|
614
615
|
// @ts-ignore
|
|
615
616
|
this.customHeader ?? null,
|
|
616
|
-
|
|
617
|
+
Se({
|
|
617
618
|
// @ts-ignore
|
|
618
619
|
scrollContainer: this.scrollContainer,
|
|
619
620
|
// @ts-ignore
|
|
@@ -651,7 +652,7 @@ class Se extends U {
|
|
|
651
652
|
this.list.refresh();
|
|
652
653
|
}
|
|
653
654
|
}
|
|
654
|
-
const xt =
|
|
655
|
+
const xt = d((t) => new Ce(
|
|
655
656
|
{
|
|
656
657
|
cache: t.cache ?? "list",
|
|
657
658
|
tableData: t.data,
|
|
@@ -669,45 +670,45 @@ const xt = h((t) => new Se(
|
|
|
669
670
|
emptyState: t.emptyState,
|
|
670
671
|
skeleton: t.skeleton
|
|
671
672
|
}
|
|
672
|
-
)),
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
])),
|
|
673
|
+
)), Le = d(({ name: t, email: e }) => o({ class: "min-w-0 flex-auto" }, [
|
|
674
|
+
v({ class: "text-base font-semibold leading-6 m-0" }, t),
|
|
675
|
+
v({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, e)
|
|
676
|
+
])), Ie = () => o({ class: "flex items-center gap-x-1.5" }, [
|
|
676
677
|
o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
677
678
|
o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
678
679
|
]),
|
|
679
|
-
|
|
680
|
-
]),
|
|
681
|
-
|
|
680
|
+
v({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
681
|
+
]), Be = (t) => v({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
682
|
+
L("Last seen "),
|
|
682
683
|
X({ datetime: t }, "3h ago")
|
|
683
|
-
]),
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
])),
|
|
684
|
+
]), Te = (t, e) => t === "online" ? Ie() : Be(e), Me = d(({ role: t, lastSeen: e, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
685
|
+
v({ class: "text-sm leading-6 m-0" }, t),
|
|
686
|
+
Te(s, e)
|
|
687
|
+
])), Pe = (t) => t.split(" ").map((s) => s[0]).join(""), Re = d((t) => y({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
687
688
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
688
|
-
|
|
689
|
-
|
|
689
|
+
le({ src: t.image, alt: t.name, fallbackText: Pe(t.name) }),
|
|
690
|
+
Le({ name: t.name, email: t.email })
|
|
690
691
|
]),
|
|
691
|
-
|
|
692
|
+
Me({
|
|
692
693
|
role: t.role,
|
|
693
694
|
lastSeen: t.lastSeen,
|
|
694
695
|
status: t.status
|
|
695
696
|
})
|
|
696
|
-
])),
|
|
697
|
+
])), yt = d((t) => new se({
|
|
697
698
|
cache: "list",
|
|
698
699
|
key: "name",
|
|
699
700
|
items: t.users,
|
|
700
701
|
role: "list",
|
|
701
702
|
class: "divide-y divide-border",
|
|
702
|
-
rowItem:
|
|
703
|
-
})),
|
|
703
|
+
rowItem: Re
|
|
704
|
+
})), Oe = (t, e) => e.includes(t), We = (t, e, s) => t.exact ? s === e : Oe(e, s), $e = ({ text: t, href: e, exact: s, hidden: a }) => new M({
|
|
704
705
|
text: t,
|
|
705
706
|
href: e,
|
|
706
707
|
exact: s,
|
|
707
708
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
708
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`
|
|
709
710
|
});
|
|
710
|
-
class
|
|
711
|
+
class vt extends p {
|
|
711
712
|
/**
|
|
712
713
|
* This will declare the props for the compiler.
|
|
713
714
|
*
|
|
@@ -728,14 +729,14 @@ class wt extends c {
|
|
|
728
729
|
* @returns {object}
|
|
729
730
|
*/
|
|
730
731
|
render() {
|
|
731
|
-
return
|
|
732
|
+
return g(
|
|
732
733
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
733
734
|
[
|
|
734
|
-
|
|
735
|
+
f({
|
|
735
736
|
class: "flex gap-x-4",
|
|
736
737
|
map: [this.options, (e) => this.addLink(e)],
|
|
737
738
|
watch: {
|
|
738
|
-
value: ["[[path]]",
|
|
739
|
+
value: ["[[path]]", w.data],
|
|
739
740
|
callBack: this.updateLinks.bind(this)
|
|
740
741
|
}
|
|
741
742
|
})
|
|
@@ -748,7 +749,7 @@ class wt extends c {
|
|
|
748
749
|
* @returns {void}
|
|
749
750
|
*/
|
|
750
751
|
afterSetup() {
|
|
751
|
-
const e =
|
|
752
|
+
const e = w.data.path;
|
|
752
753
|
this.updateLinks(e);
|
|
753
754
|
}
|
|
754
755
|
/**
|
|
@@ -763,7 +764,7 @@ class wt extends c {
|
|
|
763
764
|
for (const a of this.links) {
|
|
764
765
|
if (!a.rendered)
|
|
765
766
|
continue;
|
|
766
|
-
|
|
767
|
+
We(a, a.getLinkPath(), e) ? (this.updateLink(a, !0), s = !0) : this.updateLink(a, !1);
|
|
767
768
|
}
|
|
768
769
|
!s && this.links[0] && this.updateLink(this.links[0], !0);
|
|
769
770
|
}
|
|
@@ -793,7 +794,7 @@ class wt extends c {
|
|
|
793
794
|
* @returns {object}
|
|
794
795
|
*/
|
|
795
796
|
addLink({ label: e, href: s, exact: a, hidden: i }) {
|
|
796
|
-
const n =
|
|
797
|
+
const n = $e({ text: e, href: s, exact: a, hidden: i });
|
|
797
798
|
return this.links.push(n), n;
|
|
798
799
|
}
|
|
799
800
|
/**
|
|
@@ -805,13 +806,13 @@ class wt extends c {
|
|
|
805
806
|
this.links = [];
|
|
806
807
|
}
|
|
807
808
|
}
|
|
808
|
-
const
|
|
809
|
+
const Dt = d((t) => {
|
|
809
810
|
const e = t.margin || "m-4 ml-0";
|
|
810
811
|
return t.allowHistory = t.allowHistory === !0, o({ class: `flex-none ${e}` }, [
|
|
811
|
-
|
|
812
|
+
P({ variant: "back", class: "ghost", ...t })
|
|
812
813
|
]);
|
|
813
814
|
});
|
|
814
|
-
class
|
|
815
|
+
class A extends p {
|
|
815
816
|
/**
|
|
816
817
|
* This will declare the props for the compiler.
|
|
817
818
|
*
|
|
@@ -844,7 +845,11 @@ class j extends c {
|
|
|
844
845
|
* @returns {string}
|
|
845
846
|
*/
|
|
846
847
|
getClassName() {
|
|
847
|
-
return
|
|
848
|
+
return `absolute left-0 top-0 right-0 z-20
|
|
849
|
+
h-svh max-h-svh min-h-svh
|
|
850
|
+
bg-background pointer-events-auto
|
|
851
|
+
lg:left-16
|
|
852
|
+
pb-[calc(env(safe-area-inset-bottom)+56px)] will-change-contents ${this.class || ""}`;
|
|
848
853
|
}
|
|
849
854
|
/**
|
|
850
855
|
* This will setup and render the component.
|
|
@@ -898,13 +903,13 @@ class j extends c {
|
|
|
898
903
|
return this.children;
|
|
899
904
|
}
|
|
900
905
|
}
|
|
901
|
-
|
|
906
|
+
U.addType("dockableOverlay", (t) => {
|
|
902
907
|
if (!t)
|
|
903
908
|
return;
|
|
904
909
|
const e = t.component;
|
|
905
910
|
e && e.rendered === !0 && e.state.docked === !1 && e.destroy();
|
|
906
911
|
});
|
|
907
|
-
class
|
|
912
|
+
class St extends A {
|
|
908
913
|
/**
|
|
909
914
|
* This will stop presistence.
|
|
910
915
|
*
|
|
@@ -970,7 +975,7 @@ class vt extends j {
|
|
|
970
975
|
* @returns {void}
|
|
971
976
|
*/
|
|
972
977
|
afterSetup() {
|
|
973
|
-
|
|
978
|
+
U.add(
|
|
974
979
|
this.container,
|
|
975
980
|
"dockableOverlay",
|
|
976
981
|
{
|
|
@@ -1013,7 +1018,7 @@ class vt extends j {
|
|
|
1013
1018
|
document.documentElement.style.overflowY = "auto";
|
|
1014
1019
|
}
|
|
1015
1020
|
}
|
|
1016
|
-
class
|
|
1021
|
+
class Ct extends A {
|
|
1017
1022
|
/**
|
|
1018
1023
|
* This will get the overlay type.
|
|
1019
1024
|
*
|
|
@@ -1032,7 +1037,7 @@ class Dt extends j {
|
|
|
1032
1037
|
this.container = e, this.initialize();
|
|
1033
1038
|
}
|
|
1034
1039
|
}
|
|
1035
|
-
const
|
|
1040
|
+
const ze = d(({ index: t, click: e, state: s }, a) => y({
|
|
1036
1041
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
1037
1042
|
onState: [
|
|
1038
1043
|
[s, "selectedIndex", {
|
|
@@ -1041,11 +1046,11 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1041
1046
|
}]
|
|
1042
1047
|
],
|
|
1043
1048
|
click: () => e(t)
|
|
1044
|
-
}, a)),
|
|
1049
|
+
}, a)), Ne = d(({ selectOption: t, state: e }) => f({
|
|
1045
1050
|
class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
|
|
1046
|
-
for: ["filteredOptions", (s, a) =>
|
|
1047
|
-
})),
|
|
1048
|
-
|
|
1051
|
+
for: ["filteredOptions", (s, a) => ze({ index: a, click: t, state: e }, s.label)]
|
|
1052
|
+
})), Ue = d((t) => o({ class: "relative flex items-center" }, [
|
|
1053
|
+
ne({
|
|
1049
1054
|
cache: "input",
|
|
1050
1055
|
class: t.class ?? "",
|
|
1051
1056
|
placeholder: t.placeholder ?? "Search...",
|
|
@@ -1061,22 +1066,22 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1061
1066
|
]
|
|
1062
1067
|
}),
|
|
1063
1068
|
t.icon && o({ class: "absolute flex right-0 mr-2" }, [
|
|
1064
|
-
|
|
1069
|
+
J(t.icon)
|
|
1065
1070
|
])
|
|
1066
|
-
])),
|
|
1071
|
+
])), je = (t) => o({
|
|
1067
1072
|
class: "relative flex fle-auto flex-col",
|
|
1068
1073
|
onState: ["open", (e, s, a) => {
|
|
1069
1074
|
if (e)
|
|
1070
|
-
return new
|
|
1075
|
+
return new re({
|
|
1071
1076
|
cache: "dropdown",
|
|
1072
1077
|
parent: a,
|
|
1073
1078
|
button: a.input,
|
|
1074
1079
|
size: "xl"
|
|
1075
1080
|
}, [
|
|
1076
|
-
|
|
1081
|
+
Ne(t)
|
|
1077
1082
|
]);
|
|
1078
1083
|
}]
|
|
1079
|
-
}),
|
|
1084
|
+
}), Lt = _(
|
|
1080
1085
|
{
|
|
1081
1086
|
/**
|
|
1082
1087
|
* This will set up the data object.
|
|
@@ -1085,7 +1090,7 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1085
1090
|
*/
|
|
1086
1091
|
setData() {
|
|
1087
1092
|
const t = this.options || [];
|
|
1088
|
-
return new
|
|
1093
|
+
return new T({
|
|
1089
1094
|
options: t,
|
|
1090
1095
|
filteredOptions: t
|
|
1091
1096
|
});
|
|
@@ -1173,7 +1178,7 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1173
1178
|
*/
|
|
1174
1179
|
render() {
|
|
1175
1180
|
return o({ class: "relative w-full max-w-md" }, [
|
|
1176
|
-
|
|
1181
|
+
Ue({
|
|
1177
1182
|
// @ts-ignore
|
|
1178
1183
|
state: this.state,
|
|
1179
1184
|
// @ts-ignore
|
|
@@ -1185,7 +1190,7 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1185
1190
|
// @ts-ignore
|
|
1186
1191
|
handleKeyDown: this.handleKeyDown.bind(this)
|
|
1187
1192
|
}),
|
|
1188
|
-
|
|
1193
|
+
je({
|
|
1189
1194
|
// @ts-ignore
|
|
1190
1195
|
state: this.state,
|
|
1191
1196
|
// @ts-ignore
|
|
@@ -1196,22 +1201,22 @@ const $e = h(({ index: t, click: e, state: s }, a) => w({
|
|
|
1196
1201
|
]);
|
|
1197
1202
|
}
|
|
1198
1203
|
}
|
|
1199
|
-
),
|
|
1204
|
+
), Ae = (t) => y(
|
|
1200
1205
|
{
|
|
1201
1206
|
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
|
-
|
|
1207
|
+
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1203
1208
|
},
|
|
1204
1209
|
[
|
|
1205
|
-
|
|
1210
|
+
x({
|
|
1206
1211
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
|
|
1207
|
-
|
|
1212
|
+
onState: ["selected", { selected: t.value }],
|
|
1208
1213
|
click: (e) => t.callBack(t.value)
|
|
1209
1214
|
}, t.label)
|
|
1210
1215
|
]
|
|
1211
|
-
),
|
|
1212
|
-
|
|
1216
|
+
), He = (t, e) => (t.callBack = e, Ae(t)), Ye = (t) => g({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1217
|
+
f({ class: "flex flex-auto flex-row", map: [t.options, (e) => He(e, t.callBack)] })
|
|
1213
1218
|
]);
|
|
1214
|
-
class
|
|
1219
|
+
class It extends m {
|
|
1215
1220
|
/**
|
|
1216
1221
|
* This will declare the props for the compiler.
|
|
1217
1222
|
*
|
|
@@ -1228,12 +1233,12 @@ class Ct extends c {
|
|
|
1228
1233
|
render() {
|
|
1229
1234
|
const e = this.select.bind(this);
|
|
1230
1235
|
return o({ class: "" }, [
|
|
1231
|
-
|
|
1236
|
+
Ye({
|
|
1232
1237
|
class: this.class,
|
|
1233
1238
|
options: this.options,
|
|
1234
1239
|
callBack: e
|
|
1235
1240
|
}),
|
|
1236
|
-
|
|
1241
|
+
I({
|
|
1237
1242
|
class: "tab-content",
|
|
1238
1243
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1239
1244
|
})
|
|
@@ -1298,23 +1303,23 @@ class Ct extends c {
|
|
|
1298
1303
|
};
|
|
1299
1304
|
}
|
|
1300
1305
|
}
|
|
1301
|
-
const
|
|
1306
|
+
const Fe = (t) => y(
|
|
1302
1307
|
{
|
|
1303
1308
|
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
|
-
|
|
1309
|
+
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1305
1310
|
},
|
|
1306
1311
|
[
|
|
1307
|
-
|
|
1312
|
+
x({
|
|
1308
1313
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1309
|
-
|
|
1314
|
+
onState: ["selected", { selected: t.value }],
|
|
1310
1315
|
click: (e) => t.callBack(t.value),
|
|
1311
1316
|
disabled: t.disabled
|
|
1312
1317
|
}, t.label)
|
|
1313
1318
|
]
|
|
1314
|
-
),
|
|
1315
|
-
|
|
1319
|
+
), Ee = (t, e) => (t.callBack = e, Fe(t)), Qe = (t) => g({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${t.class}` }, [
|
|
1320
|
+
f({ class: "flex flex-auto flex-row", map: [t.options, (e) => Ee(e, t.callBack)] })
|
|
1316
1321
|
]);
|
|
1317
|
-
class
|
|
1322
|
+
class Bt extends m {
|
|
1318
1323
|
/**
|
|
1319
1324
|
* This will declare the props for the compiler.
|
|
1320
1325
|
*
|
|
@@ -1330,7 +1335,7 @@ class Lt extends c {
|
|
|
1330
1335
|
*/
|
|
1331
1336
|
render() {
|
|
1332
1337
|
const e = this.select.bind(this);
|
|
1333
|
-
return
|
|
1338
|
+
return Qe({
|
|
1334
1339
|
class: this.class,
|
|
1335
1340
|
options: this.options,
|
|
1336
1341
|
callBack: e
|
|
@@ -1356,17 +1361,17 @@ class Lt extends c {
|
|
|
1356
1361
|
};
|
|
1357
1362
|
}
|
|
1358
1363
|
}
|
|
1359
|
-
const
|
|
1364
|
+
const Ve = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), Ge = (t, e) => {
|
|
1360
1365
|
const s = t.getLinkPath();
|
|
1361
|
-
return t.exact ? e === s :
|
|
1362
|
-
}, Xe = ({ text: t, href: e, exact: s }) => new
|
|
1366
|
+
return t.exact ? e === s : Ve(s, e);
|
|
1367
|
+
}, Xe = ({ text: t, href: e, exact: s }) => new M({
|
|
1363
1368
|
text: t,
|
|
1364
1369
|
href: e,
|
|
1365
1370
|
exact: s,
|
|
1366
1371
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
1367
1372
|
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
1373
|
});
|
|
1369
|
-
class qe extends
|
|
1374
|
+
class qe extends m {
|
|
1370
1375
|
/**
|
|
1371
1376
|
* This will declare the props for the compiler.
|
|
1372
1377
|
*
|
|
@@ -1387,12 +1392,12 @@ class qe extends c {
|
|
|
1387
1392
|
* @returns {object}
|
|
1388
1393
|
*/
|
|
1389
1394
|
render() {
|
|
1390
|
-
return
|
|
1391
|
-
|
|
1395
|
+
return g({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
|
|
1396
|
+
f({
|
|
1392
1397
|
class: "flex flex-auto flex-row",
|
|
1393
1398
|
map: [this.options, (e) => this.addLink(e)],
|
|
1394
1399
|
watch: {
|
|
1395
|
-
value: ["[[path]]",
|
|
1400
|
+
value: ["[[path]]", w.data],
|
|
1396
1401
|
callBack: this.updateLinks.bind(this)
|
|
1397
1402
|
}
|
|
1398
1403
|
})
|
|
@@ -1404,7 +1409,7 @@ class qe extends c {
|
|
|
1404
1409
|
* @returns {void}
|
|
1405
1410
|
*/
|
|
1406
1411
|
afterSetup() {
|
|
1407
|
-
const e =
|
|
1412
|
+
const e = w.data.path;
|
|
1408
1413
|
this.updateLinks(e);
|
|
1409
1414
|
}
|
|
1410
1415
|
/**
|
|
@@ -1461,7 +1466,7 @@ class qe extends c {
|
|
|
1461
1466
|
this.links = [];
|
|
1462
1467
|
}
|
|
1463
1468
|
}
|
|
1464
|
-
class
|
|
1469
|
+
class Tt extends m {
|
|
1465
1470
|
/**
|
|
1466
1471
|
* This will declare the props for the compiler.
|
|
1467
1472
|
*
|
|
@@ -1481,7 +1486,7 @@ class It extends c {
|
|
|
1481
1486
|
class: this.class,
|
|
1482
1487
|
options: this.options
|
|
1483
1488
|
}),
|
|
1484
|
-
|
|
1489
|
+
I({
|
|
1485
1490
|
class: "tab-content",
|
|
1486
1491
|
switch: this.addGroup()
|
|
1487
1492
|
})
|
|
@@ -1507,22 +1512,22 @@ class It extends c {
|
|
|
1507
1512
|
return s;
|
|
1508
1513
|
}
|
|
1509
1514
|
}
|
|
1510
|
-
const Ke = (t) =>
|
|
1515
|
+
const Ke = (t) => y(
|
|
1511
1516
|
{
|
|
1512
1517
|
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
|
-
|
|
1518
|
+
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1514
1519
|
},
|
|
1515
1520
|
[
|
|
1516
|
-
|
|
1521
|
+
x({
|
|
1517
1522
|
class: "flex flex-auto justify-center items-center px-4 py-3 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1518
|
-
|
|
1523
|
+
onState: ["selected", { selected: t.value }],
|
|
1519
1524
|
click: (e) => t.callBack(t.value)
|
|
1520
1525
|
}, t.label)
|
|
1521
1526
|
]
|
|
1522
|
-
),
|
|
1523
|
-
|
|
1527
|
+
), _e = (t, e) => (t.callBack = e, Ke(t)), Je = (t) => g({ class: `border-b border-border ${t.class}` }, [
|
|
1528
|
+
f({ class: "flex flex-row items-center", map: [t.options, (e) => _e(e, t.callBack)] })
|
|
1524
1529
|
]);
|
|
1525
|
-
class
|
|
1530
|
+
class Mt extends m {
|
|
1526
1531
|
/**
|
|
1527
1532
|
* This will declare the props for the compiler.
|
|
1528
1533
|
*
|
|
@@ -1539,12 +1544,12 @@ class Bt extends c {
|
|
|
1539
1544
|
render() {
|
|
1540
1545
|
const e = this.select.bind(this);
|
|
1541
1546
|
return o({ class: "underlined-button-tab-panel" }, [
|
|
1542
|
-
|
|
1547
|
+
Je({
|
|
1543
1548
|
class: this.class,
|
|
1544
1549
|
options: this.options,
|
|
1545
1550
|
callBack: e
|
|
1546
1551
|
}),
|
|
1547
|
-
|
|
1552
|
+
I({
|
|
1548
1553
|
class: "tab-content pt-6",
|
|
1549
1554
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1550
1555
|
})
|
|
@@ -1600,23 +1605,23 @@ class Bt extends c {
|
|
|
1600
1605
|
};
|
|
1601
1606
|
}
|
|
1602
1607
|
}
|
|
1603
|
-
const
|
|
1608
|
+
const Ze = (t) => y(
|
|
1604
1609
|
{
|
|
1605
1610
|
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",
|
|
1606
|
-
|
|
1611
|
+
dataStateSet: ["selected", ["state", t.value, "active"]]
|
|
1607
1612
|
},
|
|
1608
1613
|
[
|
|
1609
|
-
|
|
1614
|
+
x({
|
|
1610
1615
|
class: "flex flex-auto justify-center items-center px-4 py-3 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",
|
|
1611
|
-
|
|
1616
|
+
onState: ["selected", { selected: t.value }],
|
|
1612
1617
|
click: (e) => t.callBack(t.value),
|
|
1613
1618
|
disabled: t.disabled
|
|
1614
1619
|
}, t.label)
|
|
1615
1620
|
]
|
|
1616
|
-
),
|
|
1617
|
-
|
|
1621
|
+
), et = (t, e) => (t.callBack = e, Ze(t)), tt = (t) => g({ class: `border-b border-border ${t.class}` }, [
|
|
1622
|
+
f({ class: "flex flex-row items-center", map: [t.options, (e) => et(e, t.callBack)] })
|
|
1618
1623
|
]);
|
|
1619
|
-
class
|
|
1624
|
+
class Pt extends m {
|
|
1620
1625
|
/**
|
|
1621
1626
|
* This will declare the props for the compiler.
|
|
1622
1627
|
*
|
|
@@ -1632,7 +1637,7 @@ class Tt extends c {
|
|
|
1632
1637
|
*/
|
|
1633
1638
|
render() {
|
|
1634
1639
|
const e = this.select.bind(this);
|
|
1635
|
-
return
|
|
1640
|
+
return tt({
|
|
1636
1641
|
class: this.class,
|
|
1637
1642
|
options: this.options,
|
|
1638
1643
|
callBack: e
|
|
@@ -1658,17 +1663,17 @@ class Tt extends c {
|
|
|
1658
1663
|
};
|
|
1659
1664
|
}
|
|
1660
1665
|
}
|
|
1661
|
-
const
|
|
1666
|
+
const st = (t, e) => new RegExp(`${t}($|/|\\.).*`).test(e), at = (t, e) => {
|
|
1662
1667
|
const s = t.getLinkPath();
|
|
1663
|
-
return t.exact ? e === s :
|
|
1664
|
-
},
|
|
1668
|
+
return t.exact ? e === s : st(s, e);
|
|
1669
|
+
}, it = ({ text: t, href: e, exact: s }) => new M({
|
|
1665
1670
|
text: t,
|
|
1666
1671
|
href: e,
|
|
1667
1672
|
exact: s,
|
|
1668
1673
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
1669
1674
|
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"
|
|
1670
1675
|
});
|
|
1671
|
-
class
|
|
1676
|
+
class nt extends m {
|
|
1672
1677
|
/**
|
|
1673
1678
|
* This will declare the props for the compiler.
|
|
1674
1679
|
*
|
|
@@ -1689,12 +1694,12 @@ class it extends c {
|
|
|
1689
1694
|
* @returns {object}
|
|
1690
1695
|
*/
|
|
1691
1696
|
render() {
|
|
1692
|
-
return
|
|
1693
|
-
|
|
1697
|
+
return g({ class: `border-b border-border ${this.class}` }, [
|
|
1698
|
+
f({
|
|
1694
1699
|
class: "flex flex-row items-center",
|
|
1695
1700
|
map: [this.options, (e) => this.addLink(e)],
|
|
1696
1701
|
watch: {
|
|
1697
|
-
value: ["[[path]]",
|
|
1702
|
+
value: ["[[path]]", w.data],
|
|
1698
1703
|
callBack: this.updateLinks.bind(this)
|
|
1699
1704
|
}
|
|
1700
1705
|
})
|
|
@@ -1706,7 +1711,7 @@ class it extends c {
|
|
|
1706
1711
|
* @returns {void}
|
|
1707
1712
|
*/
|
|
1708
1713
|
afterSetup() {
|
|
1709
|
-
const e =
|
|
1714
|
+
const e = w.data.path;
|
|
1710
1715
|
this.updateLinks(e);
|
|
1711
1716
|
}
|
|
1712
1717
|
/**
|
|
@@ -1719,7 +1724,7 @@ class it extends c {
|
|
|
1719
1724
|
let s = !1, a = this.links[0];
|
|
1720
1725
|
this.deactivateAllLinks();
|
|
1721
1726
|
for (const i of this.links)
|
|
1722
|
-
if (i.rendered !== !1 && (s =
|
|
1727
|
+
if (i.rendered !== !1 && (s = at(i, e), s === !0)) {
|
|
1723
1728
|
this.updateLink(i, !0);
|
|
1724
1729
|
break;
|
|
1725
1730
|
}
|
|
@@ -1751,7 +1756,7 @@ class it extends c {
|
|
|
1751
1756
|
* @returns {object}
|
|
1752
1757
|
*/
|
|
1753
1758
|
addLink({ label: e, href: s, exact: a }) {
|
|
1754
|
-
const i =
|
|
1759
|
+
const i = it({ text: e, href: s, exact: a });
|
|
1755
1760
|
return this.links.push(i), i;
|
|
1756
1761
|
}
|
|
1757
1762
|
/**
|
|
@@ -1763,7 +1768,7 @@ class it extends c {
|
|
|
1763
1768
|
this.links = [];
|
|
1764
1769
|
}
|
|
1765
1770
|
}
|
|
1766
|
-
class
|
|
1771
|
+
class Rt extends m {
|
|
1767
1772
|
/**
|
|
1768
1773
|
* This will declare the props for the compiler.
|
|
1769
1774
|
*
|
|
@@ -1779,11 +1784,11 @@ class Mt extends c {
|
|
|
1779
1784
|
*/
|
|
1780
1785
|
render() {
|
|
1781
1786
|
return o({ class: "underlined-tab-panel flex flex-auto flex-col" }, [
|
|
1782
|
-
new
|
|
1787
|
+
new nt({
|
|
1783
1788
|
class: this.class,
|
|
1784
1789
|
options: this.options
|
|
1785
1790
|
}),
|
|
1786
|
-
|
|
1791
|
+
I({
|
|
1787
1792
|
class: "tab-content pt-6 flex flex-auto flex-col",
|
|
1788
1793
|
switch: this.addGroup()
|
|
1789
1794
|
})
|
|
@@ -1809,7 +1814,7 @@ class Mt extends c {
|
|
|
1809
1814
|
return s;
|
|
1810
1815
|
}
|
|
1811
1816
|
}
|
|
1812
|
-
class
|
|
1817
|
+
class ot extends p {
|
|
1813
1818
|
/**
|
|
1814
1819
|
* Runs before rendering, sets up defaults, a timer for drawing,
|
|
1815
1820
|
* and basic canvas properties.
|
|
@@ -1819,7 +1824,7 @@ class nt extends c {
|
|
|
1819
1824
|
onCreated() {
|
|
1820
1825
|
this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
|
|
1821
1826
|
const e = 1e3 / 60;
|
|
1822
|
-
this.timer = new
|
|
1827
|
+
this.timer = new ae(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";
|
|
1823
1828
|
}
|
|
1824
1829
|
/**
|
|
1825
1830
|
* Renders a <canvas> element.
|
|
@@ -1876,12 +1881,12 @@ class nt extends c {
|
|
|
1876
1881
|
let s, a;
|
|
1877
1882
|
const i = this.canvas, n = i.width / parseInt(i.style.width), l = i.getBoundingClientRect();
|
|
1878
1883
|
if (e.touches && e.touches.length) {
|
|
1879
|
-
const
|
|
1880
|
-
s =
|
|
1884
|
+
const u = e.touches[0];
|
|
1885
|
+
s = u.clientX, a = u.clientY;
|
|
1881
1886
|
} else
|
|
1882
1887
|
s = e.x || e.clientX, a = e.y || e.clientY;
|
|
1883
|
-
const
|
|
1884
|
-
this.mouse.x =
|
|
1888
|
+
const c = parseInt((s - l.left) * n), r = parseInt((a - l.top) * n);
|
|
1889
|
+
this.mouse.x = c, this.mouse.y = r;
|
|
1885
1890
|
}
|
|
1886
1891
|
/**
|
|
1887
1892
|
* Called when the pointer goes down on the canvas.
|
|
@@ -1924,8 +1929,8 @@ class nt extends c {
|
|
|
1924
1929
|
const { canvas: e, ctx: s } = this, a = e.toDataURL();
|
|
1925
1930
|
if (this.scale(), this.setupBackground(s), a !== "data:,") {
|
|
1926
1931
|
const i = new globalThis.Image();
|
|
1927
|
-
|
|
1928
|
-
s.drawImage(i, 0, 0),
|
|
1932
|
+
O.on("load", i, function n() {
|
|
1933
|
+
s.drawImage(i, 0, 0), O.off("load", i, n);
|
|
1929
1934
|
}), i.src = a;
|
|
1930
1935
|
}
|
|
1931
1936
|
this.draw();
|
|
@@ -1945,7 +1950,7 @@ class nt extends c {
|
|
|
1945
1950
|
* @returns {void}
|
|
1946
1951
|
*/
|
|
1947
1952
|
noScaleResize() {
|
|
1948
|
-
const e =
|
|
1953
|
+
const e = W.getSize(container);
|
|
1949
1954
|
this.width = canvas.width = e.width, this.height = canvas.height = e.height;
|
|
1950
1955
|
}
|
|
1951
1956
|
/**
|
|
@@ -1955,13 +1960,13 @@ class nt extends c {
|
|
|
1955
1960
|
* @returns {void}
|
|
1956
1961
|
*/
|
|
1957
1962
|
scale() {
|
|
1958
|
-
const e = this.canvas, s = this.container, a =
|
|
1959
|
-
let
|
|
1963
|
+
const e = this.canvas, s = this.container, a = W.getSize(s), i = this.targetSize, n = i.width, l = i.height;
|
|
1964
|
+
let c = n + "px", r = l + "px";
|
|
1960
1965
|
if (this.width = e.width = n, this.height = e.height = l, a.width !== 0 && a.height !== 0) {
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1966
|
+
const u = a.width, b = a.height, h = u / n, k = b / l, D = Math.min(h, k);
|
|
1967
|
+
c = n * D + "px", r = l * D + "px";
|
|
1963
1968
|
}
|
|
1964
|
-
e.style.width =
|
|
1969
|
+
e.style.width = c, e.style.height = r;
|
|
1965
1970
|
}
|
|
1966
1971
|
/**
|
|
1967
1972
|
* Main drawing loop. If the mouse is down, adds a line
|
|
@@ -2035,7 +2040,7 @@ class nt extends c {
|
|
|
2035
2040
|
this.timer.stop(), this.status = "stopped";
|
|
2036
2041
|
}
|
|
2037
2042
|
}
|
|
2038
|
-
class
|
|
2043
|
+
class Ot extends p {
|
|
2039
2044
|
/**
|
|
2040
2045
|
* Sets up default properties for the signature panel.
|
|
2041
2046
|
*
|
|
@@ -2052,19 +2057,19 @@ class Pt extends c {
|
|
|
2052
2057
|
*/
|
|
2053
2058
|
render() {
|
|
2054
2059
|
return o({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
|
|
2055
|
-
|
|
2060
|
+
oe({
|
|
2056
2061
|
cache: "hiddenInput",
|
|
2057
2062
|
required: !0,
|
|
2058
2063
|
bind: this.path + ".data"
|
|
2059
2064
|
}),
|
|
2060
2065
|
o({ class: "absolute top-2 right-2" }, [
|
|
2061
|
-
|
|
2066
|
+
P({
|
|
2062
2067
|
variant: "icon",
|
|
2063
|
-
icon:
|
|
2068
|
+
icon: S.circleX,
|
|
2064
2069
|
click: this.reset.bind(this)
|
|
2065
2070
|
})
|
|
2066
2071
|
]),
|
|
2067
|
-
new
|
|
2072
|
+
new ot({
|
|
2068
2073
|
cache: "canvasLayer",
|
|
2069
2074
|
margin: this.margin,
|
|
2070
2075
|
targetSize: this.targetSize,
|
|
@@ -2114,40 +2119,40 @@ class Pt extends c {
|
|
|
2114
2119
|
}
|
|
2115
2120
|
}
|
|
2116
2121
|
export {
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2122
|
+
Dt as B,
|
|
2123
|
+
we as C,
|
|
2124
|
+
ye as D,
|
|
2125
|
+
xe as H,
|
|
2126
|
+
Ct as I,
|
|
2127
|
+
vt as N,
|
|
2128
|
+
A as O,
|
|
2129
|
+
gt as P,
|
|
2125
2130
|
xt as S,
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2131
|
+
R as T,
|
|
2132
|
+
Re as U,
|
|
2133
|
+
kt as W,
|
|
2134
|
+
ue as a,
|
|
2135
|
+
$ as b,
|
|
2136
|
+
de as c,
|
|
2137
|
+
pt as d,
|
|
2138
|
+
bt as e,
|
|
2139
|
+
me as f,
|
|
2140
|
+
he as g,
|
|
2141
|
+
pe as h,
|
|
2142
|
+
be as i,
|
|
2143
|
+
j,
|
|
2144
|
+
wt as k,
|
|
2145
|
+
yt as l,
|
|
2146
|
+
St as m,
|
|
2147
|
+
Lt as n,
|
|
2148
|
+
Ue as o,
|
|
2149
|
+
It as p,
|
|
2150
|
+
Bt as q,
|
|
2146
2151
|
qe as r,
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2152
|
+
Tt as s,
|
|
2153
|
+
Mt as t,
|
|
2154
|
+
Pt as u,
|
|
2155
|
+
nt as v,
|
|
2156
|
+
Rt as w,
|
|
2157
|
+
Ot as x
|
|
2153
2158
|
};
|