@base-framework/ui 1.2.51 → 1.2.54
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 +1 -1
- package/dist/{confirmation-tFjGo_pD.js → confirmation-DHquwIOY.js} +1 -1
- package/dist/{full-page-BSJ6rkbe.js → full-page-IgSz7snX.js} +744 -729
- package/dist/index.es.js +5 -5
- package/dist/molecules.es.js +2 -2
- package/dist/organisms.es.js +3 -3
- package/dist/pages.es.js +2 -2
- package/dist/{sidebar-menu-Qw5a8TeQ.js → sidebar-menu-BQ_CSIHb.js} +1 -1
- package/dist/{sidebar-menu-page-CPoNqLGD.js → sidebar-menu-page-B_et_k9N.js} +2 -2
- package/dist/{signature-panel-C0enb6BJ.js → signature-panel-hgJVdLcO.js} +132 -137
- package/dist/types/components/organisms/navigation/navigation-menu/navigation-menu.d.ts +1 -6
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Div as r, Button as b, On as
|
|
2
|
-
import { Component as k, Data as
|
|
3
|
-
import { f as
|
|
4
|
-
import { Icons as
|
|
5
|
-
import { IntervalTimer as
|
|
1
|
+
import { Div as r, Button as b, On as U, Span as $, Nav as f, Ul as p, Section as y, Li as w, Canvas as R } from "@base-framework/atoms";
|
|
2
|
+
import { Component as k, Data as F, DateTime as O, router as v, NavLink as C, base as P, Dom as W } from "@base-framework/base";
|
|
3
|
+
import { f as N, av as Y, b0 as d, a7 as A } from "./full-page-IgSz7snX.js";
|
|
4
|
+
import { Icons as B } from "./icons.es.js";
|
|
5
|
+
import { IntervalTimer as V } from "@base-framework/organisms";
|
|
6
6
|
class Pt extends k {
|
|
7
7
|
/**
|
|
8
8
|
* This will declare the props for the compiler.
|
|
@@ -38,14 +38,14 @@ const E = (s) => {
|
|
|
38
38
|
weekNumber: a,
|
|
39
39
|
year: i
|
|
40
40
|
};
|
|
41
|
-
},
|
|
41
|
+
}, X = (s, t, e) => {
|
|
42
42
|
if (e === 0) return [];
|
|
43
43
|
const i = new Date(s, t, 0).getDate();
|
|
44
44
|
return Array.from(
|
|
45
45
|
{ length: e },
|
|
46
46
|
(n, a) => new Date(s, t - 1, i - e + a + 1)
|
|
47
47
|
);
|
|
48
|
-
},
|
|
48
|
+
}, q = (s, t, e) => Array.from({ length: e }, (i, n) => new Date(s, t + 1, n + 1)), T = (s, t) => {
|
|
49
49
|
const e = new Date(t, 0, 4), i = (e.getDay() + 6) % 7, n = new Date(e);
|
|
50
50
|
n.setDate(e.getDate() - i);
|
|
51
51
|
const a = new Date(n);
|
|
@@ -54,21 +54,21 @@ const E = (s) => {
|
|
|
54
54
|
const e = new Date(s, t, 1).getDay(), i = new Date(s, t + 1, 0).getDate(), n = [];
|
|
55
55
|
let a = [];
|
|
56
56
|
for (let o = 1 - e; o <= i; o++) {
|
|
57
|
-
const
|
|
58
|
-
a.push(o > 0 ?
|
|
57
|
+
const c = new Date(s, t, o);
|
|
58
|
+
a.push(o > 0 ? c : null), (a.length === 7 || o === i) && (n.push([...a]), a = []);
|
|
59
59
|
}
|
|
60
60
|
return n;
|
|
61
|
-
},
|
|
61
|
+
}, Tt = (s, t) => {
|
|
62
62
|
const e = new Date(s, t + 1, 0).getDate(), i = [];
|
|
63
63
|
let n = [];
|
|
64
64
|
for (let a = 1; a <= e; a++)
|
|
65
65
|
n.push(new Date(s, t, a)), n.length === 7 && (i.push(n), n = []);
|
|
66
66
|
return n.length > 0 && i.push(n), i;
|
|
67
|
-
},
|
|
67
|
+
}, H = (s, t, e) => {
|
|
68
68
|
const i = /* @__PURE__ */ new Date();
|
|
69
69
|
return i.getDate() === s && i.getMonth() === t && i.getFullYear() === e;
|
|
70
|
-
},
|
|
71
|
-
const a =
|
|
70
|
+
}, _ = ({ day: s, month: t, year: e, weekNumber: i, selectWeek: n }) => {
|
|
71
|
+
const a = H(s, t, e);
|
|
72
72
|
return b({
|
|
73
73
|
text: s || "",
|
|
74
74
|
disabled: !s,
|
|
@@ -79,19 +79,19 @@ const E = (s) => {
|
|
|
79
79
|
`,
|
|
80
80
|
click: () => n(i, e)
|
|
81
81
|
});
|
|
82
|
-
},
|
|
83
|
-
const e = new Date(s, t, 1).getDay(), i = new Date(s, t + 1, 0).getDate(), n =
|
|
84
|
-
for (let
|
|
85
|
-
const m =
|
|
82
|
+
}, J = (s, t) => {
|
|
83
|
+
const e = new Date(s, t, 1).getDay(), i = new Date(s, t + 1, 0).getDate(), n = X(s, t, e), a = Array.from({ length: i }, (h, m) => new Date(s, t, m + 1)), o = (n.length + a.length) % 7, c = o === 0 ? 0 : 7 - o, l = q(s, t, c), u = [...n, ...a, ...l], g = [];
|
|
84
|
+
for (let h = 0; h < u.length; h += 7) {
|
|
85
|
+
const m = u.slice(h, h + 7), x = m.find((I) => I) || new Date(s, t, 1), { weekNumber: j, year: z } = G(x);
|
|
86
86
|
g.push({
|
|
87
|
-
weekNumber:
|
|
88
|
-
year:
|
|
87
|
+
weekNumber: j,
|
|
88
|
+
year: z,
|
|
89
89
|
days: m
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
return g;
|
|
93
|
-
},
|
|
94
|
-
const { year: n, month: a, currentDate: o } = i,
|
|
93
|
+
}, K = ({ selectWeek: s }) => U("month", (t, e, { data: i }) => {
|
|
94
|
+
const { year: n, month: a, currentDate: o } = i, c = J(n, a);
|
|
95
95
|
return r(
|
|
96
96
|
{ class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
|
|
97
97
|
[
|
|
@@ -102,12 +102,12 @@ const E = (s) => {
|
|
|
102
102
|
class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
|
|
103
103
|
},
|
|
104
104
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
105
|
-
(l) =>
|
|
105
|
+
(l) => $({ class: "px-1 py-1", text: l })
|
|
106
106
|
)
|
|
107
107
|
),
|
|
108
108
|
// Render each "week" row
|
|
109
|
-
...
|
|
110
|
-
({ weekNumber: l, days:
|
|
109
|
+
...c.map(
|
|
110
|
+
({ weekNumber: l, days: u, year: g }) => r({
|
|
111
111
|
class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
|
|
112
112
|
onSet: ["currentWeek", {
|
|
113
113
|
ring: l
|
|
@@ -127,11 +127,11 @@ const E = (s) => {
|
|
|
127
127
|
// The 7 cells for each day in the row
|
|
128
128
|
r(
|
|
129
129
|
{ class: "grid grid-cols-7 col-span-7 text-center" },
|
|
130
|
-
|
|
131
|
-
(
|
|
132
|
-
year:
|
|
133
|
-
month:
|
|
134
|
-
day:
|
|
130
|
+
u.map(
|
|
131
|
+
(h) => _({
|
|
132
|
+
year: h?.getFullYear() || null,
|
|
133
|
+
month: h?.getMonth() || null,
|
|
134
|
+
day: h?.getDate() || null,
|
|
135
135
|
weekNumber: l,
|
|
136
136
|
selectWeek: s
|
|
137
137
|
})
|
|
@@ -141,7 +141,7 @@ const E = (s) => {
|
|
|
141
141
|
)
|
|
142
142
|
]
|
|
143
143
|
);
|
|
144
|
-
}),
|
|
144
|
+
}), M = ({ label: s, click: t }) => N(
|
|
145
145
|
{
|
|
146
146
|
class: `
|
|
147
147
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -152,20 +152,20 @@ const E = (s) => {
|
|
|
152
152
|
click: t,
|
|
153
153
|
"aria-label": `${s} month`,
|
|
154
154
|
variant: "icon",
|
|
155
|
-
icon: s === "Previous" ?
|
|
155
|
+
icon: s === "Previous" ? B.chevron.single.left : B.chevron.single.right
|
|
156
156
|
}
|
|
157
|
-
),
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
), Q = ({ next: s, previous: t }) => r({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
|
|
158
|
+
$("[[monthName]] [[year]]"),
|
|
159
|
+
M({
|
|
160
160
|
label: "Previous",
|
|
161
161
|
click: t
|
|
162
162
|
}),
|
|
163
|
-
|
|
163
|
+
M({
|
|
164
164
|
label: "Next",
|
|
165
165
|
click: s
|
|
166
166
|
})
|
|
167
167
|
]);
|
|
168
|
-
class
|
|
168
|
+
class Mt extends k {
|
|
169
169
|
/**
|
|
170
170
|
* This will declare the props for the compiler.
|
|
171
171
|
*
|
|
@@ -180,8 +180,8 @@ class Tt extends k {
|
|
|
180
180
|
* @returns {Data}
|
|
181
181
|
*/
|
|
182
182
|
setData() {
|
|
183
|
-
const t = /* @__PURE__ */ new Date(), e = this.selectedWeek || this.calculateCurrentWeek(t), i =
|
|
184
|
-
return new
|
|
183
|
+
const t = /* @__PURE__ */ new Date(), e = this.selectedWeek || this.calculateCurrentWeek(t), i = T(e, t.getFullYear());
|
|
184
|
+
return new F({
|
|
185
185
|
monthName: this.getMonthName(i.getMonth()),
|
|
186
186
|
year: i.getFullYear(),
|
|
187
187
|
month: i.getMonth(),
|
|
@@ -218,7 +218,7 @@ class Tt extends k {
|
|
|
218
218
|
* @returns {string}
|
|
219
219
|
*/
|
|
220
220
|
getMonthName(t) {
|
|
221
|
-
return
|
|
221
|
+
return O.monthNames[t];
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
224
|
* Updates the calendar to show the previous month.
|
|
@@ -263,7 +263,7 @@ class Tt extends k {
|
|
|
263
263
|
*/
|
|
264
264
|
selectWeek(t, e) {
|
|
265
265
|
this.data.currentWeek = t;
|
|
266
|
-
const i =
|
|
266
|
+
const i = T(t, e);
|
|
267
267
|
this.setDate(i.getMonth(), i.getFullYear(), i.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(t);
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
@@ -273,24 +273,24 @@ class Tt extends k {
|
|
|
273
273
|
*/
|
|
274
274
|
render() {
|
|
275
275
|
return r({ class: "week-calendar-container border rounded-md p-3" }, [
|
|
276
|
-
|
|
276
|
+
Q({
|
|
277
277
|
next: () => this.goToNextMonth(),
|
|
278
278
|
previous: () => this.goToPreviousMonth()
|
|
279
279
|
}),
|
|
280
|
-
|
|
280
|
+
K({
|
|
281
281
|
selectWeek: (t, e) => this.selectWeek(t, e)
|
|
282
282
|
})
|
|
283
283
|
]);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const D = /* @__PURE__ */ new Map(), Z = (s, t) => (D.has(s) || D.set(s, new RegExp(`${s}($|/|\\.).*`)), D.get(s).test(t)), tt = (s, t, e) => s.exact ? e === t : Z(t, e), et = ({ text: s, href: t, exact: e, hidden: i }) => new C({
|
|
287
287
|
text: s,
|
|
288
288
|
href: t,
|
|
289
289
|
exact: e,
|
|
290
290
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
291
291
|
class: `${i ? "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`
|
|
292
292
|
});
|
|
293
|
-
class
|
|
293
|
+
class $t extends k {
|
|
294
294
|
/**
|
|
295
295
|
* This will declare the props for the compiler.
|
|
296
296
|
*
|
|
@@ -303,7 +303,7 @@ class Mt extends k {
|
|
|
303
303
|
* This will configure the links.
|
|
304
304
|
*/
|
|
305
305
|
beforeSetup() {
|
|
306
|
-
this.links = [];
|
|
306
|
+
this.links = [], this.activeLink = null;
|
|
307
307
|
}
|
|
308
308
|
/**
|
|
309
309
|
* This will render the component.
|
|
@@ -341,24 +341,14 @@ class Mt extends k {
|
|
|
341
341
|
* @returns {void}
|
|
342
342
|
*/
|
|
343
343
|
updateLinks(t) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
for (const n of this.links)
|
|
347
|
-
if (
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
!e && i && this.updateLink(i, !0);
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* This will deactivate all links.
|
|
356
|
-
*
|
|
357
|
-
* @returns {void}
|
|
358
|
-
*/
|
|
359
|
-
deactivateAllLinks() {
|
|
360
|
-
for (const t of this.links)
|
|
361
|
-
this.updateLink(t, !1);
|
|
344
|
+
const e = this.links[0] ?? null;
|
|
345
|
+
let i = null;
|
|
346
|
+
for (const n of this.links)
|
|
347
|
+
if (n.rendered && tt(n, n.getLinkPath(), t)) {
|
|
348
|
+
i = n;
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
i === null && e && (i = e), this.activeLink && this.activeLink !== i && this.updateLink(this.activeLink, !1), i && i !== this.activeLink && this.updateLink(i, !0), this.activeLink = i;
|
|
362
352
|
}
|
|
363
353
|
/**
|
|
364
354
|
* This will update the link's active state.
|
|
@@ -377,7 +367,7 @@ class Mt extends k {
|
|
|
377
367
|
* @returns {object}
|
|
378
368
|
*/
|
|
379
369
|
addLink({ label: t, href: e, exact: i, hidden: n }) {
|
|
380
|
-
const a =
|
|
370
|
+
const a = et({ text: t, href: e, exact: i, hidden: n });
|
|
381
371
|
return this.links.push(a), a;
|
|
382
372
|
}
|
|
383
373
|
/**
|
|
@@ -386,10 +376,10 @@ class Mt extends k {
|
|
|
386
376
|
* @returns {void}
|
|
387
377
|
*/
|
|
388
378
|
beforeDestroy() {
|
|
389
|
-
this.links = [];
|
|
379
|
+
this.links = [], this.activeLink = null;
|
|
390
380
|
}
|
|
391
381
|
}
|
|
392
|
-
class
|
|
382
|
+
class Nt extends Y {
|
|
393
383
|
/**
|
|
394
384
|
* This will get the overlay type.
|
|
395
385
|
*
|
|
@@ -408,7 +398,7 @@ class $t extends O {
|
|
|
408
398
|
this.container = t, this.initialize();
|
|
409
399
|
}
|
|
410
400
|
}
|
|
411
|
-
const
|
|
401
|
+
const st = (s) => w(
|
|
412
402
|
{
|
|
413
403
|
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",
|
|
414
404
|
dataStateSet: ["selected", ["state", s.value, "active"]]
|
|
@@ -420,10 +410,10 @@ const et = (s) => w(
|
|
|
420
410
|
click: (t) => s.callBack(s.value)
|
|
421
411
|
}, s.label)
|
|
422
412
|
]
|
|
423
|
-
),
|
|
424
|
-
p({ class: "flex flex-auto flex-row", map: [s.options, (t) =>
|
|
413
|
+
), it = (s, t) => st({ ...s, callBack: t }), nt = (s) => f({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${s.class}` }, [
|
|
414
|
+
p({ class: "flex flex-auto flex-row", map: [s.options, (t) => it(t, s.callBack)] })
|
|
425
415
|
]);
|
|
426
|
-
class
|
|
416
|
+
class jt extends d {
|
|
427
417
|
/**
|
|
428
418
|
* This will declare the props for the compiler.
|
|
429
419
|
*
|
|
@@ -440,7 +430,7 @@ class Nt extends u {
|
|
|
440
430
|
render() {
|
|
441
431
|
const t = this.select.bind(this);
|
|
442
432
|
return r({ class: "" }, [
|
|
443
|
-
|
|
433
|
+
nt({
|
|
444
434
|
class: this.class,
|
|
445
435
|
options: this.options,
|
|
446
436
|
callBack: t
|
|
@@ -512,7 +502,7 @@ class Nt extends u {
|
|
|
512
502
|
};
|
|
513
503
|
}
|
|
514
504
|
}
|
|
515
|
-
const
|
|
505
|
+
const at = (s) => w(
|
|
516
506
|
{
|
|
517
507
|
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",
|
|
518
508
|
dataStateSet: ["selected", ["state", s.value, "active"]]
|
|
@@ -525,10 +515,10 @@ const nt = (s) => w(
|
|
|
525
515
|
disabled: s.disabled
|
|
526
516
|
}, s.label)
|
|
527
517
|
]
|
|
528
|
-
),
|
|
529
|
-
p({ class: "flex flex-auto flex-row", map: [s.options, (t) =>
|
|
518
|
+
), ot = (s, t) => at({ ...s, callBack: t }), lt = (s) => f({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${s.class}` }, [
|
|
519
|
+
p({ class: "flex flex-auto flex-row", map: [s.options, (t) => ot(t, s.callBack)] })
|
|
530
520
|
]);
|
|
531
|
-
class
|
|
521
|
+
class zt extends d {
|
|
532
522
|
/**
|
|
533
523
|
* This will declare the props for the compiler.
|
|
534
524
|
*
|
|
@@ -544,7 +534,7 @@ class jt extends u {
|
|
|
544
534
|
*/
|
|
545
535
|
render() {
|
|
546
536
|
const t = this.select.bind(this);
|
|
547
|
-
return
|
|
537
|
+
return lt({
|
|
548
538
|
class: this.class,
|
|
549
539
|
options: this.options,
|
|
550
540
|
callBack: t
|
|
@@ -571,17 +561,17 @@ class jt extends u {
|
|
|
571
561
|
};
|
|
572
562
|
}
|
|
573
563
|
}
|
|
574
|
-
const
|
|
564
|
+
const L = /* @__PURE__ */ new Map(), rt = (s, t) => (L.has(s) || L.set(s, new RegExp(`${s}($|/|\\.).*`)), L.get(s).test(t)), ct = (s, t) => {
|
|
575
565
|
const e = s.getLinkPath();
|
|
576
|
-
return s.exact ? t === e :
|
|
577
|
-
},
|
|
566
|
+
return s.exact ? t === e : rt(e, t);
|
|
567
|
+
}, ht = ({ text: s, href: t, exact: e }) => new C({
|
|
578
568
|
text: s,
|
|
579
569
|
href: t,
|
|
580
570
|
exact: e,
|
|
581
571
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
582
572
|
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"
|
|
583
573
|
});
|
|
584
|
-
class
|
|
574
|
+
class ut extends d {
|
|
585
575
|
/**
|
|
586
576
|
* This will declare the props for the compiler.
|
|
587
577
|
*
|
|
@@ -632,7 +622,7 @@ class ht extends u {
|
|
|
632
622
|
const e = this.links[0];
|
|
633
623
|
let i = null;
|
|
634
624
|
for (const n of this.links)
|
|
635
|
-
if (n.rendered !== !1 &&
|
|
625
|
+
if (n.rendered !== !1 && ct(n, t)) {
|
|
636
626
|
i = n;
|
|
637
627
|
break;
|
|
638
628
|
}
|
|
@@ -655,7 +645,7 @@ class ht extends u {
|
|
|
655
645
|
* @returns {object}
|
|
656
646
|
*/
|
|
657
647
|
addLink({ label: t, href: e, exact: i }) {
|
|
658
|
-
const n =
|
|
648
|
+
const n = ht({ text: t, href: e, exact: i });
|
|
659
649
|
return this.links.push(n), n;
|
|
660
650
|
}
|
|
661
651
|
/**
|
|
@@ -667,7 +657,7 @@ class ht extends u {
|
|
|
667
657
|
this.links = [], this.activeLink = null;
|
|
668
658
|
}
|
|
669
659
|
}
|
|
670
|
-
class
|
|
660
|
+
class It extends d {
|
|
671
661
|
/**
|
|
672
662
|
* This will declare the props for the compiler.
|
|
673
663
|
*
|
|
@@ -683,7 +673,7 @@ class zt extends u {
|
|
|
683
673
|
*/
|
|
684
674
|
render() {
|
|
685
675
|
return r({ class: "tab-panel" }, [
|
|
686
|
-
new
|
|
676
|
+
new ut({
|
|
687
677
|
class: this.class,
|
|
688
678
|
options: this.options
|
|
689
679
|
}),
|
|
@@ -726,10 +716,10 @@ const dt = (s) => w(
|
|
|
726
716
|
click: (t) => s.callBack(s.value)
|
|
727
717
|
}, s.label)
|
|
728
718
|
]
|
|
729
|
-
),
|
|
730
|
-
p({ class: "flex flex-row items-center", map: [s.options, (t) =>
|
|
719
|
+
), ft = (s, t) => (s.callBack = t, dt(s)), pt = (s) => f({ class: `border-b border-border ${s.class}` }, [
|
|
720
|
+
p({ class: "flex flex-row items-center", map: [s.options, (t) => ft(t, s.callBack)] })
|
|
731
721
|
]);
|
|
732
|
-
class
|
|
722
|
+
class Ut extends d {
|
|
733
723
|
/**
|
|
734
724
|
* This will declare the props for the compiler.
|
|
735
725
|
*
|
|
@@ -746,7 +736,7 @@ class It extends u {
|
|
|
746
736
|
render() {
|
|
747
737
|
const t = this.select.bind(this);
|
|
748
738
|
return r({ class: "underlined-button-tab-panel flex flex-auto flex-col" }, [
|
|
749
|
-
|
|
739
|
+
pt({
|
|
750
740
|
class: this.class,
|
|
751
741
|
options: this.options,
|
|
752
742
|
callBack: t
|
|
@@ -809,7 +799,7 @@ class It extends u {
|
|
|
809
799
|
};
|
|
810
800
|
}
|
|
811
801
|
}
|
|
812
|
-
const
|
|
802
|
+
const gt = (s) => w(
|
|
813
803
|
{
|
|
814
804
|
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",
|
|
815
805
|
dataStateSet: ["selected", ["state", s.value, "active"]]
|
|
@@ -822,10 +812,10 @@ const pt = (s) => w(
|
|
|
822
812
|
disabled: s.disabled
|
|
823
813
|
}, s.label)
|
|
824
814
|
]
|
|
825
|
-
),
|
|
826
|
-
p({ class: "flex flex-row items-center", map: [s.options, (t) =>
|
|
815
|
+
), mt = (s, t) => gt({ ...s, callBack: t }), vt = (s) => f({ class: `border-b border-border ${s.class}` }, [
|
|
816
|
+
p({ class: "flex flex-row items-center", map: [s.options, (t) => mt(t, s.callBack)] })
|
|
827
817
|
]);
|
|
828
|
-
class
|
|
818
|
+
class Rt extends d {
|
|
829
819
|
/**
|
|
830
820
|
* This will declare the props for the compiler.
|
|
831
821
|
*
|
|
@@ -841,7 +831,7 @@ class Ut extends u {
|
|
|
841
831
|
*/
|
|
842
832
|
render() {
|
|
843
833
|
const t = this.select.bind(this);
|
|
844
|
-
return
|
|
834
|
+
return vt({
|
|
845
835
|
class: this.class,
|
|
846
836
|
options: this.options,
|
|
847
837
|
callBack: t
|
|
@@ -868,17 +858,17 @@ class Ut extends u {
|
|
|
868
858
|
};
|
|
869
859
|
}
|
|
870
860
|
}
|
|
871
|
-
const
|
|
861
|
+
const S = /* @__PURE__ */ new Map(), bt = (s, t) => (S.has(s) || S.set(s, new RegExp(`${s}($|/|\\.).*`)), S.get(s).test(t)), kt = (s, t) => {
|
|
872
862
|
const e = s.getLinkPath();
|
|
873
|
-
return s.exact ? t === e :
|
|
874
|
-
},
|
|
863
|
+
return s.exact ? t === e : bt(e, t);
|
|
864
|
+
}, xt = ({ text: s, href: t, exact: e }) => new C({
|
|
875
865
|
text: s,
|
|
876
866
|
href: t,
|
|
877
867
|
exact: e,
|
|
878
868
|
dataSet: ["selected", ["state", !0, "active"]],
|
|
879
869
|
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"
|
|
880
870
|
});
|
|
881
|
-
class
|
|
871
|
+
class yt extends d {
|
|
882
872
|
/**
|
|
883
873
|
* This will declare the props for the compiler.
|
|
884
874
|
*
|
|
@@ -930,7 +920,7 @@ class xt extends u {
|
|
|
930
920
|
const e = this.links[0];
|
|
931
921
|
let i = null;
|
|
932
922
|
for (const n of this.links)
|
|
933
|
-
if (n.rendered !== !1 &&
|
|
923
|
+
if (n.rendered !== !1 && kt(n, t)) {
|
|
934
924
|
i = n;
|
|
935
925
|
break;
|
|
936
926
|
}
|
|
@@ -944,7 +934,12 @@ class xt extends u {
|
|
|
944
934
|
* @returns {void}
|
|
945
935
|
*/
|
|
946
936
|
updateLink(t, e) {
|
|
947
|
-
t.update(e), e && this.scrollable && t.panel
|
|
937
|
+
if (t.update(e), e && this.scrollable && t.panel) {
|
|
938
|
+
const i = t.panel, n = i.closest("nav");
|
|
939
|
+
if (!n) return;
|
|
940
|
+
const a = i.getBoundingClientRect(), o = n.getBoundingClientRect();
|
|
941
|
+
a.left >= o.left && a.right <= o.right || i.scrollIntoView({ behavior: "smooth", inline: "nearest", block: "nearest" });
|
|
942
|
+
}
|
|
948
943
|
}
|
|
949
944
|
/**
|
|
950
945
|
* This will add a link.
|
|
@@ -953,7 +948,7 @@ class xt extends u {
|
|
|
953
948
|
* @returns {object}
|
|
954
949
|
*/
|
|
955
950
|
addLink({ label: t, href: e, exact: i }) {
|
|
956
|
-
const n =
|
|
951
|
+
const n = xt({ text: t, href: e, exact: i });
|
|
957
952
|
return this.links.push(n), n;
|
|
958
953
|
}
|
|
959
954
|
/**
|
|
@@ -965,7 +960,7 @@ class xt extends u {
|
|
|
965
960
|
this.links = [], this.activeLink = null;
|
|
966
961
|
}
|
|
967
962
|
}
|
|
968
|
-
class
|
|
963
|
+
class Ft extends d {
|
|
969
964
|
/**
|
|
970
965
|
* This will declare the props for the compiler.
|
|
971
966
|
*
|
|
@@ -981,7 +976,7 @@ class At extends u {
|
|
|
981
976
|
*/
|
|
982
977
|
render() {
|
|
983
978
|
return r({ class: "underlined-tab-panel flex flex-auto flex-col" }, [
|
|
984
|
-
new
|
|
979
|
+
new yt({
|
|
985
980
|
class: this.class,
|
|
986
981
|
options: this.options,
|
|
987
982
|
scrollable: this.scrollable
|
|
@@ -1013,7 +1008,7 @@ class At extends u {
|
|
|
1013
1008
|
return e;
|
|
1014
1009
|
}
|
|
1015
1010
|
}
|
|
1016
|
-
class
|
|
1011
|
+
class wt extends k {
|
|
1017
1012
|
/**
|
|
1018
1013
|
* Runs before rendering, sets up defaults, a timer for drawing,
|
|
1019
1014
|
* and basic canvas properties.
|
|
@@ -1023,7 +1018,7 @@ class yt extends k {
|
|
|
1023
1018
|
onCreated() {
|
|
1024
1019
|
this.lineWidth = this.lineWidth || 3, this.lineColor = this.lineColor || "#000000", this.canvas = null, this.ctx = null, this.status = "stopped";
|
|
1025
1020
|
const t = 1e3 / 60;
|
|
1026
|
-
this.timer = new
|
|
1021
|
+
this.timer = new V(t, 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";
|
|
1027
1022
|
}
|
|
1028
1023
|
/**
|
|
1029
1024
|
* Renders a <canvas> element.
|
|
@@ -1031,7 +1026,7 @@ class yt extends k {
|
|
|
1031
1026
|
* @returns {object} Layout definition for the canvas.
|
|
1032
1027
|
*/
|
|
1033
1028
|
render() {
|
|
1034
|
-
return
|
|
1029
|
+
return R({
|
|
1035
1030
|
style: "touch-action: none; -webkit-user-select: none; -webkit-touch-callout: none;"
|
|
1036
1031
|
});
|
|
1037
1032
|
}
|
|
@@ -1080,12 +1075,12 @@ class yt extends k {
|
|
|
1080
1075
|
let e, i;
|
|
1081
1076
|
const n = this.canvas, a = n.width / parseInt(n.style.width), o = n.getBoundingClientRect();
|
|
1082
1077
|
if (t.touches && t.touches.length) {
|
|
1083
|
-
const
|
|
1084
|
-
e =
|
|
1078
|
+
const u = t.touches[0];
|
|
1079
|
+
e = u.clientX, i = u.clientY;
|
|
1085
1080
|
} else
|
|
1086
1081
|
e = t.x || t.clientX, i = t.y || t.clientY;
|
|
1087
|
-
const
|
|
1088
|
-
this.mouse.x =
|
|
1082
|
+
const c = parseInt((e - o.left) * a), l = parseInt((i - o.top) * a);
|
|
1083
|
+
this.mouse.x = c, this.mouse.y = l;
|
|
1089
1084
|
}
|
|
1090
1085
|
/**
|
|
1091
1086
|
* Called when the pointer goes down on the canvas.
|
|
@@ -1160,12 +1155,12 @@ class yt extends k {
|
|
|
1160
1155
|
*/
|
|
1161
1156
|
scale() {
|
|
1162
1157
|
const t = this.canvas, e = this.container, i = W.getSize(e), n = this.targetSize, a = n.width, o = n.height;
|
|
1163
|
-
let
|
|
1158
|
+
let c = a + "px", l = o + "px";
|
|
1164
1159
|
if (this.width = t.width = a, this.height = t.height = o, i.width !== 0 && i.height !== 0) {
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1160
|
+
const u = i.width, g = i.height, h = u / a, m = g / o, x = Math.min(h, m);
|
|
1161
|
+
c = a * x + "px", l = o * x + "px";
|
|
1167
1162
|
}
|
|
1168
|
-
t.style.width =
|
|
1163
|
+
t.style.width = c, t.style.height = l;
|
|
1169
1164
|
}
|
|
1170
1165
|
/**
|
|
1171
1166
|
* Main drawing loop. If the mouse is down, adds a line
|
|
@@ -1239,7 +1234,7 @@ class yt extends k {
|
|
|
1239
1234
|
this.timer.stop(), this.status = "stopped";
|
|
1240
1235
|
}
|
|
1241
1236
|
}
|
|
1242
|
-
class
|
|
1237
|
+
class Ot extends k {
|
|
1243
1238
|
/**
|
|
1244
1239
|
* Sets up default properties for the signature panel.
|
|
1245
1240
|
*
|
|
@@ -1256,19 +1251,19 @@ class Ft extends k {
|
|
|
1256
1251
|
*/
|
|
1257
1252
|
render() {
|
|
1258
1253
|
return r({ class: "signature-panel relative flex flex-auto overflow-hidden select-none" }, [
|
|
1259
|
-
|
|
1254
|
+
A({
|
|
1260
1255
|
cache: "hiddenInput",
|
|
1261
1256
|
required: !0,
|
|
1262
1257
|
bind: this.path + ".data"
|
|
1263
1258
|
}),
|
|
1264
1259
|
r({ class: "absolute top-2 right-2" }, [
|
|
1265
|
-
|
|
1260
|
+
N({
|
|
1266
1261
|
variant: "icon",
|
|
1267
|
-
icon:
|
|
1262
|
+
icon: B.circleX,
|
|
1268
1263
|
click: this.reset.bind(this)
|
|
1269
1264
|
})
|
|
1270
1265
|
]),
|
|
1271
|
-
new
|
|
1266
|
+
new wt({
|
|
1272
1267
|
cache: "canvasLayer",
|
|
1273
1268
|
margin: this.margin,
|
|
1274
1269
|
targetSize: this.targetSize,
|
|
@@ -1326,26 +1321,26 @@ class Ft extends k {
|
|
|
1326
1321
|
}
|
|
1327
1322
|
}
|
|
1328
1323
|
export {
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1324
|
+
jt as B,
|
|
1325
|
+
Nt as I,
|
|
1326
|
+
$t as N,
|
|
1332
1327
|
Pt as P,
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1328
|
+
Ot as S,
|
|
1329
|
+
It as T,
|
|
1330
|
+
Ut as U,
|
|
1331
|
+
Mt as W,
|
|
1332
|
+
zt as a,
|
|
1333
|
+
ut as b,
|
|
1334
|
+
Ft as c,
|
|
1335
|
+
Rt as d,
|
|
1336
|
+
yt as e,
|
|
1337
|
+
_ as f,
|
|
1338
|
+
K as g,
|
|
1339
|
+
Q as h,
|
|
1345
1340
|
G as i,
|
|
1346
1341
|
Wt as j,
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1342
|
+
T as k,
|
|
1343
|
+
Tt as l,
|
|
1344
|
+
q as m,
|
|
1345
|
+
X as n
|
|
1351
1346
|
};
|
|
@@ -22,6 +22,7 @@ export class NavigationMenu extends Component {
|
|
|
22
22
|
* @type {array} links - This will hold the links for the navigation.
|
|
23
23
|
*/
|
|
24
24
|
links: any[];
|
|
25
|
+
activeLink: any;
|
|
25
26
|
/**
|
|
26
27
|
* This will render the component.
|
|
27
28
|
*
|
|
@@ -35,12 +36,6 @@ export class NavigationMenu extends Component {
|
|
|
35
36
|
* @returns {void}
|
|
36
37
|
*/
|
|
37
38
|
updateLinks(path: string): void;
|
|
38
|
-
/**
|
|
39
|
-
* This will deactivate all links.
|
|
40
|
-
*
|
|
41
|
-
* @returns {void}
|
|
42
|
-
*/
|
|
43
|
-
deactivateAllLinks(): void;
|
|
44
39
|
/**
|
|
45
40
|
* This will update the link's active state.
|
|
46
41
|
*
|