@base-framework/ui 1.0.224 → 1.0.225
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { V as w, a as R } from "./veil-D4dRxILB.js";
|
|
|
5
5
|
import { Icons as E } from "./icons.es.js";
|
|
6
6
|
import { A as O, B as V, C as j, t as q, E as z, v as J, w as _, x as K, D as Q, j as X, k as Y, H as Z, G as $, s as aa, c as ea, a as sa, b as oa, I as ta, i as ra, g as na, e as la, h as ia, F as pa, d as ua, f as ma, u as da, M as ca, l as ga, N as Ca, P as Ta, p as ba, q as Da, S as Ia, n as Sa, o as Ba, T as Pa, y as Fa, z as Ma, m as ka, r as Na } from "./empty-state-2O1fITpG.js";
|
|
7
7
|
import { A as va, b as xa, C as ya, D as ha, a as Wa, F as Ha, M as La, P as Aa, c as wa, g as Ra, p as Ua } from "./calendar-Bn55oWBo.js";
|
|
8
|
-
import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, R as Za, S as $a, n as ae, o as ee, t as se, s as oe, q as te, r as re, T as ne, l as le, U as ie, W as pe, f as ue, h as me, i as de, c as ce, d as ge, b as Ce, e as Te, a as be, g as De } from "./signature-panel-
|
|
8
|
+
import { B as Ga, p as Oa, C as Va, j as ja, D as qa, m as za, k as Ja, H as _a, I as Ka, N as Qa, O as Xa, P as Ya, R as Za, S as $a, n as ae, o as ee, t as se, s as oe, q as te, r as re, T as ne, l as le, U as ie, W as pe, f as ue, h as me, i as de, c as ce, d as ge, b as Ce, e as Te, a as be, g as De } from "./signature-panel-BHRFLEaa.js";
|
|
9
9
|
import { B as Se, I as Be, M as Pe, d as Fe, e as Me, g as ke, N as Ne, b as fe, a as ve, f as xe, P as ye, c as he, S as We, T as He } from "./mobile-nav-wrapper-Dj67Pb8l.js";
|
|
10
10
|
import { B as Ae, a as we, C as Re, F as Ue, b as Ee, c as Ge, M as Oe, P as Ve, S as je } from "./sidebar-menu-page-BVryQj2Z.js";
|
|
11
11
|
import { A as ze, F as Je, M as _e, a as Ke, T as Qe } from "./aside-template-McEj_Gxc.js";
|
package/dist/organisms.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as g, O as p, P as u, R as v, S as D, n as N, o as k, t as C, s as c, q as T, r as M, T as m, l as y, U as B, W, f as h, h as S, i as H, c as P, d as I, b as f, e as x, a as L, g as O } from "./signature-panel-
|
|
1
|
+
import { B as s, p as t, C as o, j as r, D as n, m as l, k as i, H as b, I as d, N as g, O as p, P as u, R as v, S as D, n as N, o as k, t as C, s as c, q as T, r as M, T as m, l as y, U as B, W, f as h, h as S, i as H, c as P, d as I, b as f, e as x, a as L, g as O } from "./signature-panel-BHRFLEaa.js";
|
|
2
2
|
import { b as U, C as G, D as R, a as j, F as q, M as w, c as z, p as A } from "./calendar-Bn55oWBo.js";
|
|
3
3
|
import { B as J, I as K, M as Q, d as V, e as X, g as Y, N as Z, b as _, a as $, f as aa, P as ea, c as sa, S as ta, T as oa } from "./mobile-nav-wrapper-Dj67Pb8l.js";
|
|
4
4
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Atom as f, Component as m, Data as M, DateTime as P, router as
|
|
1
|
+
import { Button as D, Div as o, On as w, Span as S, OnState as q, Th as A, UseParent as K, I as G, Thead as J, Tr as _, Table as R, P as x, Li as C, Time as V, Nav as I, Ul as k, Section as F, Canvas as Z } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as f, Component as m, Data as M, DateTime as P, router as v, NavLink as H, DataTracker as U, Jot as tt, base as W, Dom as O } from "@base-framework/base";
|
|
3
3
|
import { B as g, I as et } from "./buttons-Cm9etaEG.js";
|
|
4
4
|
import { Icons as b } from "./icons.es.js";
|
|
5
5
|
import { F as st, A as at, P as nt } from "./calendar-Bn55oWBo.js";
|
|
@@ -10,7 +10,7 @@ f((e, t) => ({
|
|
|
10
10
|
...e,
|
|
11
11
|
children: t
|
|
12
12
|
}));
|
|
13
|
-
f(({ value: e, label: t }) =>
|
|
13
|
+
f(({ value: e, label: t }) => D({
|
|
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: e }],
|
|
16
16
|
dataSet: ["performance", ["state", e, "active"]],
|
|
@@ -63,15 +63,15 @@ const ft = (e) => {
|
|
|
63
63
|
n.setDate(s.getDate() - a);
|
|
64
64
|
const i = new Date(n);
|
|
65
65
|
return i.setDate(n.getDate() + (e - 1) * 7), i;
|
|
66
|
-
},
|
|
66
|
+
}, we = (e, t) => {
|
|
67
67
|
const s = new Date(e, t, 1).getDay(), a = new Date(e, t + 1, 0).getDate(), n = [];
|
|
68
68
|
let i = [];
|
|
69
|
-
for (let
|
|
70
|
-
const
|
|
71
|
-
i.push(
|
|
69
|
+
for (let l = 1 - s; l <= a; l++) {
|
|
70
|
+
const r = new Date(e, t, l);
|
|
71
|
+
i.push(l > 0 ? r : null), (i.length === 7 || l === a) && (n.push([...i]), i = []);
|
|
72
72
|
}
|
|
73
73
|
return n;
|
|
74
|
-
},
|
|
74
|
+
}, be = (e, t) => {
|
|
75
75
|
const s = new Date(e, t + 1, 0).getDate(), a = [];
|
|
76
76
|
let n = [];
|
|
77
77
|
for (let i = 1; i <= s; i++)
|
|
@@ -80,9 +80,9 @@ const ft = (e) => {
|
|
|
80
80
|
}, yt = (e, t, s) => {
|
|
81
81
|
const a = /* @__PURE__ */ new Date();
|
|
82
82
|
return a.getDate() === e && a.getMonth() === t && a.getFullYear() === s;
|
|
83
|
-
},
|
|
83
|
+
}, wt = ({ day: e, month: t, year: s, weekNumber: a, selectWeek: n }) => {
|
|
84
84
|
const i = yt(e, t, s);
|
|
85
|
-
return
|
|
85
|
+
return D({
|
|
86
86
|
text: e || "",
|
|
87
87
|
disabled: !e,
|
|
88
88
|
class: `
|
|
@@ -92,8 +92,8 @@ const ft = (e) => {
|
|
|
92
92
|
`,
|
|
93
93
|
click: () => n(a, s)
|
|
94
94
|
});
|
|
95
|
-
},
|
|
96
|
-
const s = new Date(e, t, 1).getDay(), a = new Date(e, t + 1, 0).getDate(), n = gt(e, t, s), i = Array.from({ length: a }, (h, p) => new Date(e, t, p + 1)),
|
|
95
|
+
}, bt = (e, t) => {
|
|
96
|
+
const s = new Date(e, t, 1).getDay(), a = new Date(e, t + 1, 0).getDate(), n = gt(e, t, s), i = Array.from({ length: a }, (h, p) => new Date(e, t, p + 1)), l = (n.length + i.length) % 7, r = l === 0 ? 0 : 7 - l, c = pt(e, t, r), d = [...n, ...i, ...c], u = [];
|
|
97
97
|
for (let h = 0; h < d.length; h += 7) {
|
|
98
98
|
const p = d.slice(h, h + 7), y = p.find((B) => B) || new Date(e, t, 1), { weekNumber: L, year: T } = mt(y);
|
|
99
99
|
u.push({
|
|
@@ -103,8 +103,8 @@ const ft = (e) => {
|
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
return u;
|
|
106
|
-
}, xt = ({ selectWeek: e }) =>
|
|
107
|
-
const { year: n, month: i, currentDate:
|
|
106
|
+
}, xt = ({ selectWeek: e }) => w("month", (t, s, { data: a }) => {
|
|
107
|
+
const { year: n, month: i, currentDate: l } = a, r = bt(n, i);
|
|
108
108
|
return o(
|
|
109
109
|
{ class: "grid grid-cols-8 gap-1 text-sm px-4 py-2" },
|
|
110
110
|
[
|
|
@@ -119,7 +119,7 @@ const ft = (e) => {
|
|
|
119
119
|
)
|
|
120
120
|
),
|
|
121
121
|
// Render each "week" row
|
|
122
|
-
...
|
|
122
|
+
...r.map(
|
|
123
123
|
({ weekNumber: c, days: d, year: u }) => o({
|
|
124
124
|
class: "grid grid-cols-8 col-span-8 items-center ring-primary rounded-sm px-1",
|
|
125
125
|
onSet: ["currentWeek", {
|
|
@@ -141,7 +141,7 @@ const ft = (e) => {
|
|
|
141
141
|
o(
|
|
142
142
|
{ class: "grid grid-cols-7 col-span-7 text-center" },
|
|
143
143
|
d.map(
|
|
144
|
-
(h) =>
|
|
144
|
+
(h) => wt({
|
|
145
145
|
year: (h == null ? void 0 : h.getFullYear()) || null,
|
|
146
146
|
month: (h == null ? void 0 : h.getMonth()) || null,
|
|
147
147
|
day: (h == null ? void 0 : h.getDate()) || null,
|
|
@@ -317,24 +317,24 @@ const j = ({ label: e, click: t }) => g(
|
|
|
317
317
|
]), Dt = (e) => o({ class: "h-9 flex items-center justify-center font-medium" }, e), St = () => o(
|
|
318
318
|
{ class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
|
|
319
319
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(Dt)
|
|
320
|
-
), Ct = ({ day: e, iso: t, disabled: s, isStart: a, isEnd: n, isBetween: i, click:
|
|
321
|
-
let
|
|
322
|
-
return a || n ? (
|
|
320
|
+
), Ct = ({ day: e, iso: t, disabled: s, isStart: a, isEnd: n, isBetween: i, click: l }) => {
|
|
321
|
+
let r = "ghost", c = "";
|
|
322
|
+
return a || n ? (r = "default", c = "bg-primary text-primary-foreground hover:bg-primary/90") : i && (c = "bg-accent text-accent-foreground hover:bg-accent/80"), s && (c += " opacity-50 cursor-not-allowed"), g(
|
|
323
323
|
{
|
|
324
324
|
class: `flex items-center justify-center h-9 w-9 p-0 text-sm font-medium rounded-md transition-colors ${c}`,
|
|
325
|
-
variant:
|
|
325
|
+
variant: r,
|
|
326
326
|
disabled: s,
|
|
327
327
|
click: () => {
|
|
328
|
-
s ||
|
|
328
|
+
s || l();
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
e.toString()
|
|
332
332
|
);
|
|
333
333
|
}, It = ({ today: e, current: t, blockPriorDates: s, onDateClick: a }) => {
|
|
334
|
-
const { start: n, end: i } = t,
|
|
335
|
-
for (let d = 0; d <
|
|
334
|
+
const { start: n, end: i } = t, l = new Date(t.year, t.month, 1).getDay(), r = new Date(t.year, t.month + 1, 0).getDate(), c = [];
|
|
335
|
+
for (let d = 0; d < l; d++)
|
|
336
336
|
c.push(null);
|
|
337
|
-
for (let d = 1; d <=
|
|
337
|
+
for (let d = 1; d <= r; d++) {
|
|
338
338
|
const u = st(t.year, t.month, d), h = new Date(t.year, t.month, d), p = new Date(e.year, e.month, e.date), y = h < p, L = s && y, T = n === u, B = i === u, X = n && i && u > n && u < i;
|
|
339
339
|
c.push({
|
|
340
340
|
day: d,
|
|
@@ -399,22 +399,20 @@ const j = ({ label: e, click: t }) => g(
|
|
|
399
399
|
)
|
|
400
400
|
)
|
|
401
401
|
), Tt = ({ start: e, end: t, selecting: s, onSelectStart: a, onSelectEnd: n }) => o({ class: "flex space-x-2 mb-4" }, [
|
|
402
|
-
g({
|
|
402
|
+
w("selecting", (i) => g({
|
|
403
403
|
click: a,
|
|
404
|
-
variant:
|
|
405
|
-
class: "flex-1
|
|
404
|
+
variant: i === "start" ? "primary" : "outline",
|
|
405
|
+
class: "flex-1"
|
|
406
406
|
}, [
|
|
407
|
-
o({ class: "
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
g({
|
|
407
|
+
o({ class: "font-medium" }, e ? Y(e) : "Start Date")
|
|
408
|
+
])),
|
|
409
|
+
w("selecting", (i) => g({
|
|
411
410
|
click: n,
|
|
412
|
-
variant:
|
|
413
|
-
class: "flex-1
|
|
411
|
+
variant: i === "end" ? "primary" : "outline",
|
|
412
|
+
class: "flex-1"
|
|
414
413
|
}, [
|
|
415
|
-
o({ class: "
|
|
416
|
-
|
|
417
|
-
])
|
|
414
|
+
o({ class: "font-medium" }, t ? Y(t) : "End Date")
|
|
415
|
+
]))
|
|
418
416
|
]), Y = (e) => {
|
|
419
417
|
const t = /* @__PURE__ */ new Date(e + "T00:00:00"), s = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
420
418
|
return `${s[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
|
|
@@ -523,15 +521,15 @@ class ke extends m {
|
|
|
523
521
|
onSelectStart: () => this.data.selecting = "start",
|
|
524
522
|
onSelectEnd: () => this.data.selecting = "end"
|
|
525
523
|
}),
|
|
526
|
-
q("view", (
|
|
527
|
-
switch (
|
|
524
|
+
q("view", (l) => {
|
|
525
|
+
switch (l) {
|
|
528
526
|
case "months":
|
|
529
527
|
return Lt(
|
|
530
528
|
{
|
|
531
529
|
currentMonth: s.month,
|
|
532
530
|
currentYear: s.year,
|
|
533
|
-
onSelect: (
|
|
534
|
-
this.setCurrent({ month:
|
|
531
|
+
onSelect: (r) => {
|
|
532
|
+
this.setCurrent({ month: r, year: s.year }), this.state.view = "calendar";
|
|
535
533
|
}
|
|
536
534
|
}
|
|
537
535
|
);
|
|
@@ -539,8 +537,8 @@ class ke extends m {
|
|
|
539
537
|
return Bt(
|
|
540
538
|
{
|
|
541
539
|
currentYear: s.year,
|
|
542
|
-
onSelect: (
|
|
543
|
-
this.setCurrent({ month: s.month, year:
|
|
540
|
+
onSelect: (r) => {
|
|
541
|
+
this.setCurrent({ month: s.month, year: r }), this.state.view = "calendar";
|
|
544
542
|
}
|
|
545
543
|
}
|
|
546
544
|
);
|
|
@@ -551,15 +549,15 @@ class ke extends m {
|
|
|
551
549
|
today: t,
|
|
552
550
|
current: s,
|
|
553
551
|
blockPriorDates: this.blockPriorDates,
|
|
554
|
-
onDateClick: (
|
|
552
|
+
onDateClick: (r) => this.handleClick(r),
|
|
555
553
|
onMonthClick: () => this.state.view = "months",
|
|
556
554
|
onYearClick: () => this.state.view = "years",
|
|
557
555
|
next: () => {
|
|
558
|
-
const
|
|
556
|
+
const r = this.data.current, c = r.month === 11 ? { month: 0, year: r.year + 1 } : { month: r.month + 1, year: r.year };
|
|
559
557
|
this.setCurrent(c);
|
|
560
558
|
},
|
|
561
559
|
previous: () => {
|
|
562
|
-
const
|
|
560
|
+
const r = this.data.current, c = r.month === 0 ? { month: 11, year: r.year - 1 } : { month: r.month - 1, year: r.year };
|
|
563
561
|
this.setCurrent(c);
|
|
564
562
|
}
|
|
565
563
|
});
|
|
@@ -574,12 +572,12 @@ const Rt = (e, t) => {
|
|
|
574
572
|
}, Pt = (e) => A({ class: `cursor-pointer py-3 px-4 text-base w-10 ${e.class || ""}` }, [
|
|
575
573
|
K((t) => new dt({ class: "mr-2", onChange: (s, a) => Rt(t, a) }))
|
|
576
574
|
]), Nt = ({ align: e, sortable: t, key: s, label: a, sort: n, class: i }) => {
|
|
577
|
-
const
|
|
575
|
+
const l = e || "justify-start";
|
|
578
576
|
return A({
|
|
579
577
|
class: `cursor-pointer py-3 px-4 text-base ${i || ""}`,
|
|
580
578
|
click: t && (() => n(s))
|
|
581
579
|
}, [
|
|
582
|
-
o({ class: `flex flex-auto w-full items-center ${
|
|
580
|
+
o({ class: `flex flex-auto w-full items-center ${l}` }, [
|
|
583
581
|
S(a),
|
|
584
582
|
t && G({ class: "ml-2", html: b.arrows.upDown })
|
|
585
583
|
])
|
|
@@ -677,7 +675,7 @@ class E extends m {
|
|
|
677
675
|
render() {
|
|
678
676
|
const t = this.rows, s = this.border !== !1 ? "border" : "";
|
|
679
677
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
680
|
-
|
|
678
|
+
w("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
681
679
|
o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
682
680
|
R({ class: "w-full" }, [
|
|
683
681
|
// @ts-ignore
|
|
@@ -779,7 +777,7 @@ class $t extends E {
|
|
|
779
777
|
render() {
|
|
780
778
|
const t = this.rows, s = this.border !== !1 ? "border" : "";
|
|
781
779
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
782
|
-
|
|
780
|
+
w("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
783
781
|
o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
784
782
|
R({ class: "w-full" }, [
|
|
785
783
|
// @ts-ignore
|
|
@@ -855,7 +853,7 @@ class jt extends E {
|
|
|
855
853
|
render() {
|
|
856
854
|
const t = this.rows, s = this.border !== !1 ? "border" : "";
|
|
857
855
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
858
|
-
|
|
856
|
+
w("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
859
857
|
o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
860
858
|
R({ class: "w-full" }, [
|
|
861
859
|
// @ts-ignore
|
|
@@ -914,18 +912,18 @@ const De = f((e) => new jt(
|
|
|
914
912
|
emptyState: e.emptyState
|
|
915
913
|
}
|
|
916
914
|
)), Yt = f(({ name: e, email: t }) => o({ class: "min-w-0 flex-auto" }, [
|
|
917
|
-
|
|
918
|
-
|
|
915
|
+
x({ class: "text-base font-semibold leading-6 m-0" }, e),
|
|
916
|
+
x({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, t)
|
|
919
917
|
])), At = () => o({ class: "flex items-center gap-x-1.5" }, [
|
|
920
918
|
o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
921
919
|
o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
922
920
|
]),
|
|
923
|
-
|
|
924
|
-
]), Ft = (e) =>
|
|
921
|
+
x({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
922
|
+
]), Ft = (e) => x({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
925
923
|
S("Last seen "),
|
|
926
924
|
V({ datetime: e }, "3h ago")
|
|
927
925
|
]), Ht = (e, t) => e === "online" ? At() : Ft(t), Ut = f(({ role: e, lastSeen: t, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
928
|
-
|
|
926
|
+
x({ class: "text-sm leading-6 m-0" }, e),
|
|
929
927
|
Ht(s, t)
|
|
930
928
|
])), Et = (e) => e.split(" ").map((s) => s[0]).join(""), Qt = f((e) => C({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
931
929
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
@@ -975,11 +973,11 @@ class Ce extends m {
|
|
|
975
973
|
return I(
|
|
976
974
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
977
975
|
[
|
|
978
|
-
|
|
976
|
+
k({
|
|
979
977
|
class: "flex space-x-4",
|
|
980
978
|
map: [this.options, (t) => this.addLink(t)],
|
|
981
979
|
watch: {
|
|
982
|
-
value: ["[[path]]",
|
|
980
|
+
value: ["[[path]]", v.data],
|
|
983
981
|
callBack: this.updateLinks.bind(this)
|
|
984
982
|
}
|
|
985
983
|
})
|
|
@@ -992,7 +990,7 @@ class Ce extends m {
|
|
|
992
990
|
* @returns {void}
|
|
993
991
|
*/
|
|
994
992
|
afterSetup() {
|
|
995
|
-
const t =
|
|
993
|
+
const t = v.data.path;
|
|
996
994
|
this.updateLinks(t);
|
|
997
995
|
}
|
|
998
996
|
/**
|
|
@@ -1285,7 +1283,7 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
|
|
|
1285
1283
|
}]
|
|
1286
1284
|
],
|
|
1287
1285
|
click: () => t(e)
|
|
1288
|
-
}, a)), Jt = f(({ selectOption: e, state: t }) =>
|
|
1286
|
+
}, a)), Jt = f(({ selectOption: e, state: t }) => k({
|
|
1289
1287
|
class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
|
|
1290
1288
|
for: ["filteredOptions", (s, a) => Gt({ index: a, click: e, state: t }, s.label)]
|
|
1291
1289
|
})), _t = f((e) => o({ class: "relative flex items-center" }, [
|
|
@@ -1446,14 +1444,14 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
|
|
|
1446
1444
|
dataSet: ["selected", ["state", e.value, "active"]]
|
|
1447
1445
|
},
|
|
1448
1446
|
[
|
|
1449
|
-
|
|
1447
|
+
D({
|
|
1450
1448
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
|
|
1451
1449
|
onSet: ["selected", { selected: e.value }],
|
|
1452
1450
|
click: (t) => e.callBack(e.value)
|
|
1453
1451
|
}, e.label)
|
|
1454
1452
|
]
|
|
1455
1453
|
), te = (e, t) => (e.callBack = t, Zt(e)), ee = (e) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
|
|
1456
|
-
|
|
1454
|
+
k({ class: "flex flex-auto flex-row", map: [e.options, (t) => te(t, e.callBack)] })
|
|
1457
1455
|
]);
|
|
1458
1456
|
class Be extends m {
|
|
1459
1457
|
/**
|
|
@@ -1549,7 +1547,7 @@ const se = (e) => C(
|
|
|
1549
1547
|
dataSet: ["selected", ["state", e.value, "active"]]
|
|
1550
1548
|
},
|
|
1551
1549
|
[
|
|
1552
|
-
|
|
1550
|
+
D({
|
|
1553
1551
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1554
1552
|
onSet: ["selected", { selected: e.value }],
|
|
1555
1553
|
click: (t) => e.callBack(e.value),
|
|
@@ -1557,7 +1555,7 @@ const se = (e) => C(
|
|
|
1557
1555
|
}, e.label)
|
|
1558
1556
|
]
|
|
1559
1557
|
), ae = (e, t) => (e.callBack = t, se(e)), ne = (e) => I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
|
|
1560
|
-
|
|
1558
|
+
k({ class: "flex flex-auto flex-row", map: [e.options, (t) => ae(t, e.callBack)] })
|
|
1561
1559
|
]);
|
|
1562
1560
|
class Re extends m {
|
|
1563
1561
|
/**
|
|
@@ -1634,11 +1632,11 @@ class re extends m {
|
|
|
1634
1632
|
*/
|
|
1635
1633
|
render() {
|
|
1636
1634
|
return I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
|
|
1637
|
-
|
|
1635
|
+
k({
|
|
1638
1636
|
class: "flex flex-auto flex-row",
|
|
1639
1637
|
map: [this.options, (t) => this.addLink(t)],
|
|
1640
1638
|
watch: {
|
|
1641
|
-
value: ["[[path]]",
|
|
1639
|
+
value: ["[[path]]", v.data],
|
|
1642
1640
|
callBack: this.updateLinks.bind(this)
|
|
1643
1641
|
}
|
|
1644
1642
|
})
|
|
@@ -1650,7 +1648,7 @@ class re extends m {
|
|
|
1650
1648
|
* @returns {void}
|
|
1651
1649
|
*/
|
|
1652
1650
|
afterSetup() {
|
|
1653
|
-
const t =
|
|
1651
|
+
const t = v.data.path;
|
|
1654
1652
|
this.updateLinks(t);
|
|
1655
1653
|
}
|
|
1656
1654
|
/**
|
|
@@ -1801,11 +1799,11 @@ class ce extends m {
|
|
|
1801
1799
|
* @returns {Array} An array of [eventName, element, callback] definitions.
|
|
1802
1800
|
*/
|
|
1803
1801
|
setupEvents() {
|
|
1804
|
-
const t = this.panel, s = this.pointerPosition.bind(this), a = this.pointerUp.bind(this), n = this.pointerDown.bind(this), i = this.resize.bind(this),
|
|
1802
|
+
const t = this.panel, s = this.pointerPosition.bind(this), a = this.pointerUp.bind(this), n = this.pointerDown.bind(this), i = this.resize.bind(this), l = { passive: !1 };
|
|
1805
1803
|
return [
|
|
1806
|
-
["pointermove", t, s,
|
|
1804
|
+
["pointermove", t, s, l],
|
|
1807
1805
|
["pointerup", t, a],
|
|
1808
|
-
["pointerdown", t, n,
|
|
1806
|
+
["pointerdown", t, n, l],
|
|
1809
1807
|
["pointerout", t, a],
|
|
1810
1808
|
["resize", globalThis, i]
|
|
1811
1809
|
];
|
|
@@ -1818,14 +1816,14 @@ class ce extends m {
|
|
|
1818
1816
|
*/
|
|
1819
1817
|
getEventPosition(t) {
|
|
1820
1818
|
let s, a;
|
|
1821
|
-
const n = this.canvas, i = n.width / parseInt(n.style.width),
|
|
1819
|
+
const n = this.canvas, i = n.width / parseInt(n.style.width), l = n.getBoundingClientRect();
|
|
1822
1820
|
if (t.touches && t.touches.length) {
|
|
1823
1821
|
const d = t.touches[0];
|
|
1824
1822
|
s = d.clientX, a = d.clientY;
|
|
1825
1823
|
} else
|
|
1826
1824
|
s = t.x || t.clientX, a = t.y || t.clientY;
|
|
1827
|
-
const
|
|
1828
|
-
this.mouse.x =
|
|
1825
|
+
const r = parseInt((s - l.left) * i), c = parseInt((a - l.top) * i);
|
|
1826
|
+
this.mouse.x = r, this.mouse.y = c;
|
|
1829
1827
|
}
|
|
1830
1828
|
/**
|
|
1831
1829
|
* Called when the pointer goes down on the canvas.
|
|
@@ -1899,13 +1897,13 @@ class ce extends m {
|
|
|
1899
1897
|
* @returns {void}
|
|
1900
1898
|
*/
|
|
1901
1899
|
scale() {
|
|
1902
|
-
const t = this.canvas, s = this.container, a = O.getSize(s), n = this.targetSize, i = n.width,
|
|
1903
|
-
let
|
|
1904
|
-
if (this.width = t.width = i, this.height = t.height =
|
|
1905
|
-
const d = a.width, u = a.height, h = d / i, p = u /
|
|
1906
|
-
|
|
1900
|
+
const t = this.canvas, s = this.container, a = O.getSize(s), n = this.targetSize, i = n.width, l = n.height;
|
|
1901
|
+
let r = i + "px", c = l + "px";
|
|
1902
|
+
if (this.width = t.width = i, this.height = t.height = l, a.width !== 0 && a.height !== 0) {
|
|
1903
|
+
const d = a.width, u = a.height, h = d / i, p = u / l, y = Math.min(h, p);
|
|
1904
|
+
r = i * y + "px", c = l * y + "px";
|
|
1907
1905
|
}
|
|
1908
|
-
t.style.width =
|
|
1906
|
+
t.style.width = r, t.style.height = c;
|
|
1909
1907
|
}
|
|
1910
1908
|
/**
|
|
1911
1909
|
* Main drawing loop. If the mouse is down, adds a line
|
|
@@ -1939,8 +1937,8 @@ class ce extends m {
|
|
|
1939
1937
|
*/
|
|
1940
1938
|
addLine(t, s, a, n) {
|
|
1941
1939
|
this.signed || (this.signed = !0);
|
|
1942
|
-
const i = Math.round(s),
|
|
1943
|
-
t.lineWidth = this.lineWidth, t.strokeStyle = n, t.lineTo(i,
|
|
1940
|
+
const i = Math.round(s), l = Math.round(a);
|
|
1941
|
+
t.lineWidth = this.lineWidth, t.strokeStyle = n, t.lineTo(i, l), t.stroke();
|
|
1944
1942
|
}
|
|
1945
1943
|
/**
|
|
1946
1944
|
* Clears the canvas, sets signed to false, and re-initializes
|
|
@@ -2074,9 +2072,9 @@ export {
|
|
|
2074
2072
|
pt as a,
|
|
2075
2073
|
$ as b,
|
|
2076
2074
|
mt as c,
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2075
|
+
we as d,
|
|
2076
|
+
be as e,
|
|
2077
|
+
wt as f,
|
|
2080
2078
|
gt as g,
|
|
2081
2079
|
xt as h,
|
|
2082
2080
|
kt as i,
|
package/package.json
CHANGED