@base-framework/ui 1.0.227 → 1.0.228
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-8RAhY1jM.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-8RAhY1jM.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,8 +1,8 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import { Atom as f, Component as g, Data as
|
|
1
|
+
import { Button as S, Div as o, On as w, Span as C, OnState as K, Th as F, UseParent as G, I as J, Thead as _, Tr as V, Table as P, P as x, Li as I, Time as Z, Nav as M, Ul as k, Section as H, Canvas as tt } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as f, Component as g, Data as L, DateTime as $, router as D, NavLink as U, DataTracker as E, Jot as et, base as N, Dom as O } from "@base-framework/base";
|
|
3
3
|
import { B as m, I as st } from "./buttons-Cm9etaEG.js";
|
|
4
4
|
import { Icons as b } from "./icons.es.js";
|
|
5
|
-
import { F as at, p as
|
|
5
|
+
import { F as at, p as v, A as nt, P as it } from "./calendar-Bn55oWBo.js";
|
|
6
6
|
import { TableBody as ot, DataTableBody as lt, ScrollableTableBody as rt, List as ct, IntervalTimer as dt } from "@base-framework/organisms";
|
|
7
7
|
import { C as ht, I as ut, H as ft } from "./inputs-CMjx5-IX.js";
|
|
8
8
|
f((e, t) => ({
|
|
@@ -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 }) => S({
|
|
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"]],
|
|
@@ -58,7 +58,7 @@ const gt = (e) => {
|
|
|
58
58
|
{ length: s },
|
|
59
59
|
(n, i) => new Date(e, t - 1, a - s + i + 1)
|
|
60
60
|
);
|
|
61
|
-
}, yt = (e, t, s) => Array.from({ length: s }, (a, n) => new Date(e, t + 1, n + 1)),
|
|
61
|
+
}, yt = (e, t, s) => Array.from({ length: s }, (a, n) => new Date(e, t + 1, n + 1)), z = (e, t) => {
|
|
62
62
|
const s = new Date(t, 0, 4), a = (s.getDay() + 6) % 7, n = new Date(s);
|
|
63
63
|
n.setDate(s.getDate() - a);
|
|
64
64
|
const i = new Date(n);
|
|
@@ -82,7 +82,7 @@ const gt = (e) => {
|
|
|
82
82
|
return a.getDate() === e && a.getMonth() === t && a.getFullYear() === s;
|
|
83
83
|
}, bt = ({ day: e, month: t, year: s, weekNumber: a, selectWeek: n }) => {
|
|
84
84
|
const i = wt(e, t, s);
|
|
85
|
-
return
|
|
85
|
+
return S({
|
|
86
86
|
text: e || "",
|
|
87
87
|
disabled: !e,
|
|
88
88
|
class: `
|
|
@@ -95,10 +95,10 @@ const gt = (e) => {
|
|
|
95
95
|
}, xt = (e, t) => {
|
|
96
96
|
const s = new Date(e, t, 1).getDay(), a = new Date(e, t + 1, 0).getDate(), n = pt(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 = yt(e, t, r), d = [...n, ...i, ...c], u = [];
|
|
97
97
|
for (let h = 0; h < d.length; h += 7) {
|
|
98
|
-
const p = d.slice(h, h + 7), y = p.find((
|
|
98
|
+
const p = d.slice(h, h + 7), y = p.find((R) => R) || new Date(e, t, 1), { weekNumber: T, year: B } = mt(y);
|
|
99
99
|
u.push({
|
|
100
|
-
weekNumber:
|
|
101
|
-
year:
|
|
100
|
+
weekNumber: T,
|
|
101
|
+
year: B,
|
|
102
102
|
days: p
|
|
103
103
|
});
|
|
104
104
|
}
|
|
@@ -115,7 +115,7 @@ const gt = (e) => {
|
|
|
115
115
|
class: "grid grid-cols-7 col-span-7 text-center text-muted-foreground items-center"
|
|
116
116
|
},
|
|
117
117
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
118
|
-
(c) =>
|
|
118
|
+
(c) => C({ class: "px-1 py-1", text: c })
|
|
119
119
|
)
|
|
120
120
|
),
|
|
121
121
|
// Render each "week" row
|
|
@@ -154,7 +154,7 @@ const gt = (e) => {
|
|
|
154
154
|
)
|
|
155
155
|
]
|
|
156
156
|
);
|
|
157
|
-
}),
|
|
157
|
+
}), Y = ({ label: e, click: t }) => m(
|
|
158
158
|
{
|
|
159
159
|
class: `
|
|
160
160
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -168,12 +168,12 @@ const gt = (e) => {
|
|
|
168
168
|
icon: e === "Previous" ? b.chevron.single.left : b.chevron.single.right
|
|
169
169
|
}
|
|
170
170
|
), vt = ({ next: e, previous: t }) => o({ class: "flex flex-auto min-h-12 text-sm font-medium relative justify-center items-center" }, [
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
C("[[monthName]] [[year]]"),
|
|
172
|
+
Y({
|
|
173
173
|
label: "Previous",
|
|
174
174
|
click: t
|
|
175
175
|
}),
|
|
176
|
-
|
|
176
|
+
Y({
|
|
177
177
|
label: "Next",
|
|
178
178
|
click: e
|
|
179
179
|
})
|
|
@@ -193,8 +193,8 @@ class ve extends g {
|
|
|
193
193
|
* @returns {Data}
|
|
194
194
|
*/
|
|
195
195
|
setData() {
|
|
196
|
-
const t = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(t), a =
|
|
197
|
-
return new
|
|
196
|
+
const t = /* @__PURE__ */ new Date(), s = this.selectedWeek || this.calculateCurrentWeek(t), a = z(s, t.getFullYear());
|
|
197
|
+
return new L({
|
|
198
198
|
monthName: this.getMonthName(a.getMonth()),
|
|
199
199
|
year: a.getFullYear(),
|
|
200
200
|
month: a.getMonth(),
|
|
@@ -276,7 +276,7 @@ class ve extends g {
|
|
|
276
276
|
*/
|
|
277
277
|
selectWeek(t, s) {
|
|
278
278
|
this.data.currentWeek = t;
|
|
279
|
-
const a =
|
|
279
|
+
const a = z(t, s);
|
|
280
280
|
this.setDate(a.getMonth(), a.getFullYear(), a.getDate()), typeof this.selectedCallBack == "function" && this.selectedCallBack(t);
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
@@ -296,7 +296,7 @@ class ve extends g {
|
|
|
296
296
|
]);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
const
|
|
299
|
+
const j = ({ label: e, click: t }) => m(
|
|
300
300
|
{
|
|
301
301
|
class: `
|
|
302
302
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -312,8 +312,8 @@ const A = ({ label: e, click: t }) => m(
|
|
|
312
312
|
), Dt = ({ monthName: e, year: t, onMonthClick: s, onYearClick: a, next: n, previous: i }) => o({ class: "flex items-center justify-center space-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
313
313
|
m({ click: s, variant: "ghost", "aria-label": "Select month" }, e || "[[monthName]]"),
|
|
314
314
|
m({ click: a, variant: "ghost", "aria-label": "Select year" }, (t == null ? void 0 : t.toString()) || "[[current.year]]"),
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
j({ label: "Previous", click: i }),
|
|
316
|
+
j({ label: "Next", click: n })
|
|
317
317
|
]), St = (e) => o({ class: "h-9 flex items-center justify-center font-medium" }, e), Ct = () => 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(St)
|
|
@@ -321,7 +321,7 @@ const A = ({ label: e, click: t }) => m(
|
|
|
321
321
|
let r = "ghost", c = "";
|
|
322
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"), m(
|
|
323
323
|
{
|
|
324
|
-
class: `flex items-center justify-center
|
|
324
|
+
class: `flex items-center justify-center p-0 text-sm font-medium rounded-md transition-colors ${c}`,
|
|
325
325
|
variant: r,
|
|
326
326
|
disabled: s,
|
|
327
327
|
click: () => {
|
|
@@ -335,22 +335,14 @@ const A = ({ label: e, click: t }) => m(
|
|
|
335
335
|
for (let d = 0; d < l; d++)
|
|
336
336
|
c.push(null);
|
|
337
337
|
for (let d = 1; d <= r; d++) {
|
|
338
|
-
const u = at(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,
|
|
339
|
-
|
|
338
|
+
const u = at(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, T = s && y, B = n === u, R = i === u, q = n && i && u > n && u < i;
|
|
339
|
+
c.push({
|
|
340
340
|
day: d,
|
|
341
341
|
iso: u,
|
|
342
|
-
disabled:
|
|
343
|
-
isStart:
|
|
344
|
-
isEnd:
|
|
345
|
-
isBetween:
|
|
346
|
-
click: () => a(u)
|
|
347
|
-
}), c.push({
|
|
348
|
-
day: d,
|
|
349
|
-
iso: u,
|
|
350
|
-
disabled: v,
|
|
351
|
-
isStart: D,
|
|
352
|
-
isEnd: S,
|
|
353
|
-
isBetween: N,
|
|
342
|
+
disabled: T,
|
|
343
|
+
isStart: B,
|
|
344
|
+
isEnd: R,
|
|
345
|
+
isBetween: q,
|
|
354
346
|
click: () => a(u)
|
|
355
347
|
});
|
|
356
348
|
}
|
|
@@ -412,16 +404,16 @@ const A = ({ label: e, click: t }) => m(
|
|
|
412
404
|
variant: i === "start" ? "primary" : "outline",
|
|
413
405
|
class: "flex-1"
|
|
414
406
|
}, [
|
|
415
|
-
o({ class: "font-medium" },
|
|
407
|
+
o({ class: "font-medium" }, A("current.start", "Start Date"))
|
|
416
408
|
])),
|
|
417
409
|
w("selecting", (i) => m({
|
|
418
410
|
click: n,
|
|
419
411
|
variant: i === "end" ? "primary" : "outline",
|
|
420
412
|
class: "flex-1"
|
|
421
413
|
}, [
|
|
422
|
-
o({ class: "font-medium" },
|
|
414
|
+
o({ class: "font-medium" }, A("current.end", "End Date"))
|
|
423
415
|
]))
|
|
424
|
-
]),
|
|
416
|
+
]), A = (e, t) => [`[[${e}]]`, (s) => s == null ? t : Rt(s)], Rt = (e) => {
|
|
425
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"];
|
|
426
418
|
return `${s[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
|
|
427
419
|
}, Pt = ({ currentYear: e, onSelect: t }) => {
|
|
@@ -458,14 +450,14 @@ class De extends g {
|
|
|
458
450
|
*/
|
|
459
451
|
setData() {
|
|
460
452
|
const t = /* @__PURE__ */ new Date(), s = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, a = s.getMonth(), n = s.getFullYear();
|
|
461
|
-
return new
|
|
453
|
+
return new L({
|
|
462
454
|
today: {
|
|
463
455
|
date: t.getDate(),
|
|
464
456
|
month: t.getMonth(),
|
|
465
457
|
year: t.getFullYear()
|
|
466
458
|
},
|
|
467
459
|
monthName: this.getMonthName(a),
|
|
468
|
-
currentData: `${s.getFullYear()}-${
|
|
460
|
+
currentData: `${s.getFullYear()}-${v(s.getMonth() + 1)}-${v(s.getDate())}`,
|
|
469
461
|
current: {
|
|
470
462
|
date: t.getDate(),
|
|
471
463
|
month: a,
|
|
@@ -506,7 +498,7 @@ class De extends g {
|
|
|
506
498
|
if (this.data.selecting === "start") {
|
|
507
499
|
this.data.current.start = t, this.data.current.end = null, this.data.selecting = "end";
|
|
508
500
|
const s = new Date(t);
|
|
509
|
-
this.
|
|
501
|
+
this.setCurrent({
|
|
510
502
|
month: s.getMonth(),
|
|
511
503
|
year: s.getFullYear(),
|
|
512
504
|
date: s.getDate()
|
|
@@ -514,7 +506,7 @@ class De extends g {
|
|
|
514
506
|
} else {
|
|
515
507
|
this.data.current.start && t < this.data.current.start ? (this.data.current.end = this.data.current.start, this.data.current.start = t) : this.data.current.end = t, this.data.selecting = "start";
|
|
516
508
|
const s = new Date(t);
|
|
517
|
-
this.
|
|
509
|
+
this.setCurrent({
|
|
518
510
|
month: s.getMonth(),
|
|
519
511
|
year: s.getFullYear(),
|
|
520
512
|
date: s.getDate()
|
|
@@ -529,7 +521,7 @@ class De extends g {
|
|
|
529
521
|
*/
|
|
530
522
|
setCurrent({ month: t, year: s, date: a = null }) {
|
|
531
523
|
const n = this.data.current;
|
|
532
|
-
n.month = (t + 12) % 12, n.year = s + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (n.date = a), this.data.monthName = this.getMonthName(n.month), this.data.currentDate = `${s}-${
|
|
524
|
+
n.month = (t + 12) % 12, n.year = s + (t < 0 ? -1 : t > 11 ? 1 : 0), a !== null && (n.date = a), this.data.monthName = this.getMonthName(n.month), this.data.currentDate = `${s}-${v(t + 1)}-${v(n.date)}`;
|
|
533
525
|
}
|
|
534
526
|
/**
|
|
535
527
|
* Render the range calendar.
|
|
@@ -594,16 +586,16 @@ class De extends g {
|
|
|
594
586
|
const $t = (e, t) => {
|
|
595
587
|
const s = e.toggleAllSelectedRows();
|
|
596
588
|
t.state.checked = !s;
|
|
597
|
-
}, Wt = (e) =>
|
|
589
|
+
}, Wt = (e) => F({ class: `cursor-pointer py-3 px-4 text-base w-10 ${e.class || ""}` }, [
|
|
598
590
|
G((t) => new ht({ class: "mr-2", onChange: (s, a) => $t(t, a) }))
|
|
599
591
|
]), Nt = ({ align: e, sortable: t, key: s, label: a, sort: n, class: i }) => {
|
|
600
592
|
const l = e || "justify-start";
|
|
601
|
-
return
|
|
593
|
+
return F({
|
|
602
594
|
class: `cursor-pointer py-3 px-4 text-base ${i || ""}`,
|
|
603
595
|
click: t && (() => n(s))
|
|
604
596
|
}, [
|
|
605
597
|
o({ class: `flex flex-auto w-full items-center ${l}` }, [
|
|
606
|
-
|
|
598
|
+
C(a),
|
|
607
599
|
t && J({ class: "ml-2", html: b.arrows.upDown })
|
|
608
600
|
])
|
|
609
601
|
]);
|
|
@@ -629,7 +621,7 @@ const $t = (e, t) => {
|
|
|
629
621
|
class: "divide-y divide-border",
|
|
630
622
|
emptyState: n
|
|
631
623
|
});
|
|
632
|
-
class
|
|
624
|
+
class Q extends g {
|
|
633
625
|
/**
|
|
634
626
|
* Initializes component data.
|
|
635
627
|
*
|
|
@@ -637,7 +629,7 @@ class X extends g {
|
|
|
637
629
|
*/
|
|
638
630
|
setData() {
|
|
639
631
|
let t = this.rows && this.rows.length > 0;
|
|
640
|
-
return (this.loadMoreItems || this.tableData) && !t && (t = null), new
|
|
632
|
+
return (this.loadMoreItems || this.tableData) && !t && (t = null), new L({
|
|
641
633
|
selectedRows: [],
|
|
642
634
|
// @ts-ignore
|
|
643
635
|
hasItems: t,
|
|
@@ -793,7 +785,7 @@ const zt = (e) => new lt({
|
|
|
793
785
|
rowItem: (t) => e.rowItem(t, e.selectRow),
|
|
794
786
|
class: "divide-y divide-border"
|
|
795
787
|
});
|
|
796
|
-
class Yt extends
|
|
788
|
+
class Yt extends Q {
|
|
797
789
|
/**
|
|
798
790
|
* Renders the DataTable component.
|
|
799
791
|
*
|
|
@@ -869,7 +861,7 @@ const Se = f((e) => new Yt(
|
|
|
869
861
|
rowItem: (t) => e.rowItem(t, e.selectRow),
|
|
870
862
|
class: "divide-y divide-border"
|
|
871
863
|
});
|
|
872
|
-
class At extends
|
|
864
|
+
class At extends Q {
|
|
873
865
|
/**
|
|
874
866
|
* Renders the DataTable component.
|
|
875
867
|
*
|
|
@@ -945,12 +937,12 @@ const Ce = f((e) => new At(
|
|
|
945
937
|
]),
|
|
946
938
|
x({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
947
939
|
]), Ut = (e) => x({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
948
|
-
|
|
940
|
+
C("Last seen "),
|
|
949
941
|
Z({ datetime: e }, "3h ago")
|
|
950
942
|
]), Et = (e, t) => e === "online" ? Ht() : Ut(t), Qt = f(({ role: e, lastSeen: t, status: s }) => o({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
951
943
|
x({ class: "text-sm leading-6 m-0" }, e),
|
|
952
944
|
Et(s, t)
|
|
953
|
-
])), Xt = (e) => e.split(" ").map((s) => s[0]).join(""), qt = f((e) =>
|
|
945
|
+
])), Xt = (e) => e.split(" ").map((s) => s[0]).join(""), qt = f((e) => I({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
954
946
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
955
947
|
nt({ src: e.image, alt: e.name, fallbackText: Xt(e.name) }),
|
|
956
948
|
Ft({ name: e.name, email: e.email })
|
|
@@ -967,7 +959,7 @@ const Ce = f((e) => new At(
|
|
|
967
959
|
role: "list",
|
|
968
960
|
class: "divide-y divide-border",
|
|
969
961
|
rowItem: qt
|
|
970
|
-
})), Kt = (e, t) => t.includes(e), Gt = (e, t, s) => e.exact ? s === t : Kt(t, s), Jt = ({ text: e, href: t, exact: s, hidden: a }) => new
|
|
962
|
+
})), Kt = (e, t) => t.includes(e), Gt = (e, t, s) => e.exact ? s === t : Kt(t, s), Jt = ({ text: e, href: t, exact: s, hidden: a }) => new U({
|
|
971
963
|
text: e,
|
|
972
964
|
href: t,
|
|
973
965
|
exact: s,
|
|
@@ -995,14 +987,14 @@ class Me extends g {
|
|
|
995
987
|
* @returns {object}
|
|
996
988
|
*/
|
|
997
989
|
render() {
|
|
998
|
-
return
|
|
990
|
+
return M(
|
|
999
991
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
1000
992
|
[
|
|
1001
993
|
k({
|
|
1002
994
|
class: "flex space-x-4",
|
|
1003
995
|
map: [this.options, (t) => this.addLink(t)],
|
|
1004
996
|
watch: {
|
|
1005
|
-
value: ["[[path]]",
|
|
997
|
+
value: ["[[path]]", D.data],
|
|
1006
998
|
callBack: this.updateLinks.bind(this)
|
|
1007
999
|
}
|
|
1008
1000
|
})
|
|
@@ -1015,7 +1007,7 @@ class Me extends g {
|
|
|
1015
1007
|
* @returns {void}
|
|
1016
1008
|
*/
|
|
1017
1009
|
afterSetup() {
|
|
1018
|
-
const t =
|
|
1010
|
+
const t = D.data.path;
|
|
1019
1011
|
this.updateLinks(t);
|
|
1020
1012
|
}
|
|
1021
1013
|
/**
|
|
@@ -1078,7 +1070,7 @@ const Le = f((e) => {
|
|
|
1078
1070
|
m({ variant: "back", class: "ghost", ...e })
|
|
1079
1071
|
]);
|
|
1080
1072
|
});
|
|
1081
|
-
class
|
|
1073
|
+
class X extends g {
|
|
1082
1074
|
/**
|
|
1083
1075
|
* This will declare the props for the compiler.
|
|
1084
1076
|
*
|
|
@@ -1165,13 +1157,13 @@ class q extends g {
|
|
|
1165
1157
|
return this.children;
|
|
1166
1158
|
}
|
|
1167
1159
|
}
|
|
1168
|
-
|
|
1160
|
+
E.addType("dockableOverlay", (e) => {
|
|
1169
1161
|
if (!e)
|
|
1170
1162
|
return;
|
|
1171
1163
|
const t = e.component;
|
|
1172
1164
|
t && t.rendered === !0 && t.state.docked === !1 && t.destroy();
|
|
1173
1165
|
});
|
|
1174
|
-
class Te extends
|
|
1166
|
+
class Te extends X {
|
|
1175
1167
|
/**
|
|
1176
1168
|
* This will stop presistence.
|
|
1177
1169
|
*
|
|
@@ -1237,7 +1229,7 @@ class Te extends q {
|
|
|
1237
1229
|
* @returns {void}
|
|
1238
1230
|
*/
|
|
1239
1231
|
afterSetup() {
|
|
1240
|
-
|
|
1232
|
+
E.add(
|
|
1241
1233
|
this.container,
|
|
1242
1234
|
"dockableOverlay",
|
|
1243
1235
|
{
|
|
@@ -1280,7 +1272,7 @@ class Te extends q {
|
|
|
1280
1272
|
document.documentElement.style.overflowY = "auto";
|
|
1281
1273
|
}
|
|
1282
1274
|
}
|
|
1283
|
-
class Be extends
|
|
1275
|
+
class Be extends X {
|
|
1284
1276
|
/**
|
|
1285
1277
|
* This will get the overlay type.
|
|
1286
1278
|
*
|
|
@@ -1299,7 +1291,7 @@ class Be extends q {
|
|
|
1299
1291
|
this.container = t, this.initialize();
|
|
1300
1292
|
}
|
|
1301
1293
|
}
|
|
1302
|
-
const _t = f(({ index: e, click: t, state: s }, a) =>
|
|
1294
|
+
const _t = f(({ index: e, click: t, state: s }, a) => I({
|
|
1303
1295
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
1304
1296
|
onState: [
|
|
1305
1297
|
[s, "selectedIndex", {
|
|
@@ -1352,7 +1344,7 @@ const _t = f(({ index: e, click: t, state: s }, a) => T({
|
|
|
1352
1344
|
*/
|
|
1353
1345
|
setData() {
|
|
1354
1346
|
const e = this.options || [];
|
|
1355
|
-
return new
|
|
1347
|
+
return new L({
|
|
1356
1348
|
options: e,
|
|
1357
1349
|
filteredOptions: e
|
|
1358
1350
|
});
|
|
@@ -1463,19 +1455,19 @@ const _t = f(({ index: e, click: t, state: s }, a) => T({
|
|
|
1463
1455
|
]);
|
|
1464
1456
|
}
|
|
1465
1457
|
}
|
|
1466
|
-
), ee = (e) =>
|
|
1458
|
+
), ee = (e) => I(
|
|
1467
1459
|
{
|
|
1468
1460
|
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",
|
|
1469
1461
|
dataSet: ["selected", ["state", e.value, "active"]]
|
|
1470
1462
|
},
|
|
1471
1463
|
[
|
|
1472
|
-
|
|
1464
|
+
S({
|
|
1473
1465
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
|
|
1474
1466
|
onSet: ["selected", { selected: e.value }],
|
|
1475
1467
|
click: (t) => e.callBack(e.value)
|
|
1476
1468
|
}, e.label)
|
|
1477
1469
|
]
|
|
1478
|
-
), se = (e, t) => (e.callBack = t, ee(e)), ae = (e) =>
|
|
1470
|
+
), se = (e, t) => (e.callBack = t, ee(e)), ae = (e) => M({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
|
|
1479
1471
|
k({ class: "flex flex-auto flex-row", map: [e.options, (t) => se(t, e.callBack)] })
|
|
1480
1472
|
]);
|
|
1481
1473
|
class Pe extends g {
|
|
@@ -1500,7 +1492,7 @@ class Pe extends g {
|
|
|
1500
1492
|
options: this.options,
|
|
1501
1493
|
callBack: t
|
|
1502
1494
|
}),
|
|
1503
|
-
|
|
1495
|
+
H({
|
|
1504
1496
|
class: "tab-content",
|
|
1505
1497
|
onState: ["selected", this.updateContent.bind(this)]
|
|
1506
1498
|
})
|
|
@@ -1566,20 +1558,20 @@ class Pe extends g {
|
|
|
1566
1558
|
};
|
|
1567
1559
|
}
|
|
1568
1560
|
}
|
|
1569
|
-
const ne = (e) =>
|
|
1561
|
+
const ne = (e) => I(
|
|
1570
1562
|
{
|
|
1571
1563
|
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",
|
|
1572
1564
|
dataSet: ["selected", ["state", e.value, "active"]]
|
|
1573
1565
|
},
|
|
1574
1566
|
[
|
|
1575
|
-
|
|
1567
|
+
S({
|
|
1576
1568
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1577
1569
|
onSet: ["selected", { selected: e.value }],
|
|
1578
1570
|
click: (t) => e.callBack(e.value),
|
|
1579
1571
|
disabled: e.disabled
|
|
1580
1572
|
}, e.label)
|
|
1581
1573
|
]
|
|
1582
|
-
), ie = (e, t) => (e.callBack = t, ne(e)), oe = (e) =>
|
|
1574
|
+
), ie = (e, t) => (e.callBack = t, ne(e)), oe = (e) => M({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${e.class}` }, [
|
|
1583
1575
|
k({ class: "flex flex-auto flex-row", map: [e.options, (t) => ie(t, e.callBack)] })
|
|
1584
1576
|
]);
|
|
1585
1577
|
class $e extends g {
|
|
@@ -1628,7 +1620,7 @@ class $e extends g {
|
|
|
1628
1620
|
const le = (e, t) => new RegExp(`${e}($|/|\\.).*`).test(t), re = (e, t) => {
|
|
1629
1621
|
const s = e.getLinkPath();
|
|
1630
1622
|
return e.exact ? t === s : le(s, t);
|
|
1631
|
-
}, ce = ({ text: e, href: t, exact: s }) => new
|
|
1623
|
+
}, ce = ({ text: e, href: t, exact: s }) => new U({
|
|
1632
1624
|
text: e,
|
|
1633
1625
|
href: t,
|
|
1634
1626
|
exact: s,
|
|
@@ -1656,12 +1648,12 @@ class de extends g {
|
|
|
1656
1648
|
* @returns {object}
|
|
1657
1649
|
*/
|
|
1658
1650
|
render() {
|
|
1659
|
-
return
|
|
1651
|
+
return M({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
|
|
1660
1652
|
k({
|
|
1661
1653
|
class: "flex flex-auto flex-row",
|
|
1662
1654
|
map: [this.options, (t) => this.addLink(t)],
|
|
1663
1655
|
watch: {
|
|
1664
|
-
value: ["[[path]]",
|
|
1656
|
+
value: ["[[path]]", D.data],
|
|
1665
1657
|
callBack: this.updateLinks.bind(this)
|
|
1666
1658
|
}
|
|
1667
1659
|
})
|
|
@@ -1673,7 +1665,7 @@ class de extends g {
|
|
|
1673
1665
|
* @returns {void}
|
|
1674
1666
|
*/
|
|
1675
1667
|
afterSetup() {
|
|
1676
|
-
const t =
|
|
1668
|
+
const t = D.data.path;
|
|
1677
1669
|
this.updateLinks(t);
|
|
1678
1670
|
}
|
|
1679
1671
|
/**
|
|
@@ -1750,7 +1742,7 @@ class We extends g {
|
|
|
1750
1742
|
class: this.class,
|
|
1751
1743
|
options: this.options
|
|
1752
1744
|
}),
|
|
1753
|
-
|
|
1745
|
+
H({
|
|
1754
1746
|
class: "tab-content",
|
|
1755
1747
|
switch: this.addGroup()
|
|
1756
1748
|
})
|
|
@@ -1891,8 +1883,8 @@ class he extends g {
|
|
|
1891
1883
|
const { canvas: t, ctx: s } = this, a = t.toDataURL();
|
|
1892
1884
|
if (this.scale(), this.setupBackground(s), a !== "data:,") {
|
|
1893
1885
|
const n = new globalThis.Image();
|
|
1894
|
-
|
|
1895
|
-
s.drawImage(n, 0, 0),
|
|
1886
|
+
N.on("load", n, function i() {
|
|
1887
|
+
s.drawImage(n, 0, 0), N.off("load", n, i);
|
|
1896
1888
|
}), n.src = a;
|
|
1897
1889
|
}
|
|
1898
1890
|
this.draw();
|
|
@@ -1912,7 +1904,7 @@ class he extends g {
|
|
|
1912
1904
|
* @returns {void}
|
|
1913
1905
|
*/
|
|
1914
1906
|
noScaleResize() {
|
|
1915
|
-
const t =
|
|
1907
|
+
const t = O.getSize(container);
|
|
1916
1908
|
this.width = canvas.width = t.width, this.height = canvas.height = t.height;
|
|
1917
1909
|
}
|
|
1918
1910
|
/**
|
|
@@ -1922,7 +1914,7 @@ class he extends g {
|
|
|
1922
1914
|
* @returns {void}
|
|
1923
1915
|
*/
|
|
1924
1916
|
scale() {
|
|
1925
|
-
const t = this.canvas, s = this.container, a =
|
|
1917
|
+
const t = this.canvas, s = this.container, a = O.getSize(s), n = this.targetSize, i = n.width, l = n.height;
|
|
1926
1918
|
let r = i + "px", c = l + "px";
|
|
1927
1919
|
if (this.width = t.width = i, this.height = t.height = l, a.width !== 0 && a.height !== 0) {
|
|
1928
1920
|
const d = a.width, u = a.height, h = d / i, p = u / l, y = Math.min(h, p);
|
|
@@ -2087,7 +2079,7 @@ export {
|
|
|
2087
2079
|
Nt as H,
|
|
2088
2080
|
Be as I,
|
|
2089
2081
|
Me as N,
|
|
2090
|
-
|
|
2082
|
+
X as O,
|
|
2091
2083
|
be as P,
|
|
2092
2084
|
De as R,
|
|
2093
2085
|
Ce as S,
|
|
@@ -2095,7 +2087,7 @@ export {
|
|
|
2095
2087
|
qt as U,
|
|
2096
2088
|
ve as W,
|
|
2097
2089
|
yt as a,
|
|
2098
|
-
|
|
2090
|
+
z as b,
|
|
2099
2091
|
mt as c,
|
|
2100
2092
|
xe as d,
|
|
2101
2093
|
ke as e,
|
|
@@ -2103,7 +2095,7 @@ export {
|
|
|
2103
2095
|
pt as g,
|
|
2104
2096
|
kt as h,
|
|
2105
2097
|
vt as i,
|
|
2106
|
-
|
|
2098
|
+
Q as j,
|
|
2107
2099
|
Se as k,
|
|
2108
2100
|
Ie as l,
|
|
2109
2101
|
Te as m,
|
package/package.json
CHANGED