@base-framework/ui 1.0.223 → 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 +1 -1
- package/dist/organisms.es.js +1 -1
- package/dist/{signature-panel-Casw0xrl.js → signature-panel-BHRFLEaa.js} +126 -111
- package/dist/types/components/organisms/calendar/range/month-calendar.d.ts +4 -1
- package/dist/types/components/organisms/calendar/range/range-days-grid.d.ts +5 -2
- package/package.json +1 -1
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
69
|
for (let l = 1 - s; l <= a; l++) {
|
|
70
|
-
const
|
|
71
|
-
i.push(l > 0 ?
|
|
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,19 +92,19 @@ 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 }, (
|
|
97
|
-
for (let
|
|
98
|
-
const p =
|
|
99
|
-
|
|
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
|
+
for (let h = 0; h < d.length; h += 7) {
|
|
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
|
+
u.push({
|
|
100
100
|
weekNumber: L,
|
|
101
101
|
year: T,
|
|
102
102
|
days: p
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
return
|
|
106
|
-
}, xt = ({ selectWeek: e }) =>
|
|
107
|
-
const { year: n, month: i, currentDate: l } = a,
|
|
105
|
+
return u;
|
|
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,8 +119,8 @@ const ft = (e) => {
|
|
|
119
119
|
)
|
|
120
120
|
),
|
|
121
121
|
// Render each "week" row
|
|
122
|
-
...
|
|
123
|
-
({ weekNumber: c, days:
|
|
122
|
+
...r.map(
|
|
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", {
|
|
126
126
|
ring: c
|
|
@@ -129,7 +129,7 @@ const ft = (e) => {
|
|
|
129
129
|
// Left column: ISO week number
|
|
130
130
|
o({
|
|
131
131
|
class: "font-medium text-center col-span-1 rounded-sm cursor-pointer",
|
|
132
|
-
click: () => e(c,
|
|
132
|
+
click: () => e(c, u),
|
|
133
133
|
// If you have a 'currentWeek' state, you can highlight it with 'onSet'
|
|
134
134
|
onSet: ["currentWeek", {
|
|
135
135
|
"text-primary-foreground": c,
|
|
@@ -140,11 +140,11 @@ const ft = (e) => {
|
|
|
140
140
|
// The 7 cells for each day in the row
|
|
141
141
|
o(
|
|
142
142
|
{ class: "grid grid-cols-7 col-span-7 text-center" },
|
|
143
|
-
|
|
144
|
-
(
|
|
145
|
-
year: (
|
|
146
|
-
month: (
|
|
147
|
-
day: (
|
|
143
|
+
d.map(
|
|
144
|
+
(h) => wt({
|
|
145
|
+
year: (h == null ? void 0 : h.getFullYear()) || null,
|
|
146
|
+
month: (h == null ? void 0 : h.getMonth()) || null,
|
|
147
|
+
day: (h == null ? void 0 : h.getDate()) || null,
|
|
148
148
|
weekNumber: c,
|
|
149
149
|
selectWeek: e
|
|
150
150
|
})
|
|
@@ -318,11 +318,11 @@ const j = ({ label: e, click: t }) => g(
|
|
|
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
320
|
), Ct = ({ day: e, iso: t, disabled: s, isStart: a, isEnd: n, isBetween: i, click: l }) => {
|
|
321
|
-
let
|
|
322
|
-
return a || n ? (
|
|
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
328
|
s || l();
|
|
@@ -330,20 +330,37 @@ const j = ({ label: e, click: t }) => g(
|
|
|
330
330
|
},
|
|
331
331
|
e.toString()
|
|
332
332
|
);
|
|
333
|
-
}, It = ({
|
|
334
|
-
{
|
|
335
|
-
|
|
336
|
-
(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
333
|
+
}, It = ({ today: e, current: t, blockPriorDates: s, onDateClick: a }) => {
|
|
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
|
+
c.push(null);
|
|
337
|
+
for (let d = 1; d <= r; d++) {
|
|
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
|
+
c.push({
|
|
340
|
+
day: d,
|
|
341
|
+
iso: u,
|
|
342
|
+
disabled: L,
|
|
343
|
+
isStart: T,
|
|
344
|
+
isEnd: B,
|
|
345
|
+
isBetween: X,
|
|
346
|
+
click: () => a(u)
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
return o(
|
|
350
|
+
{ class: "grid grid-cols-7 gap-1" },
|
|
351
|
+
c.map(
|
|
352
|
+
(d, u) => d ? Ct({
|
|
353
|
+
day: d.day,
|
|
354
|
+
iso: d.iso,
|
|
355
|
+
disabled: d.disabled,
|
|
356
|
+
isStart: d.isStart,
|
|
357
|
+
isEnd: d.isEnd,
|
|
358
|
+
isBetween: d.isBetween,
|
|
359
|
+
click: d.click
|
|
360
|
+
}) : o({ class: "h-9" })
|
|
361
|
+
)
|
|
362
|
+
);
|
|
363
|
+
}, Mt = f((e, t) => o({ class: "flex flex-auto flex-col" }, [
|
|
347
364
|
vt({
|
|
348
365
|
monthName: e.monthName,
|
|
349
366
|
year: e.year,
|
|
@@ -352,10 +369,21 @@ const j = ({ label: e, click: t }) => g(
|
|
|
352
369
|
next: e.next,
|
|
353
370
|
previous: e.previous
|
|
354
371
|
}),
|
|
355
|
-
o({
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
372
|
+
o({
|
|
373
|
+
class: "flex flex-auto flex-col w-full",
|
|
374
|
+
onSet: [
|
|
375
|
+
"currentDate",
|
|
376
|
+
() => [
|
|
377
|
+
St(),
|
|
378
|
+
It({
|
|
379
|
+
today: e.today,
|
|
380
|
+
current: e.current,
|
|
381
|
+
blockPriorDates: e.blockPriorDates,
|
|
382
|
+
onDateClick: e.onDateClick
|
|
383
|
+
})
|
|
384
|
+
]
|
|
385
|
+
]
|
|
386
|
+
})
|
|
359
387
|
])), Lt = ({ currentMonth: e, currentYear: t, onSelect: s }) => o(
|
|
360
388
|
{ class: "grid grid-cols-3 gap-2" },
|
|
361
389
|
P.monthNames.map(
|
|
@@ -371,22 +399,20 @@ const j = ({ label: e, click: t }) => g(
|
|
|
371
399
|
)
|
|
372
400
|
)
|
|
373
401
|
), Tt = ({ start: e, end: t, selecting: s, onSelectStart: a, onSelectEnd: n }) => o({ class: "flex space-x-2 mb-4" }, [
|
|
374
|
-
g({
|
|
402
|
+
w("selecting", (i) => g({
|
|
375
403
|
click: a,
|
|
376
|
-
variant:
|
|
377
|
-
class: "flex-1
|
|
404
|
+
variant: i === "start" ? "primary" : "outline",
|
|
405
|
+
class: "flex-1"
|
|
378
406
|
}, [
|
|
379
|
-
o({ class: "
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
g({
|
|
407
|
+
o({ class: "font-medium" }, e ? Y(e) : "Start Date")
|
|
408
|
+
])),
|
|
409
|
+
w("selecting", (i) => g({
|
|
383
410
|
click: n,
|
|
384
|
-
variant:
|
|
385
|
-
class: "flex-1
|
|
411
|
+
variant: i === "end" ? "primary" : "outline",
|
|
412
|
+
class: "flex-1"
|
|
386
413
|
}, [
|
|
387
|
-
o({ class: "
|
|
388
|
-
|
|
389
|
-
])
|
|
414
|
+
o({ class: "font-medium" }, t ? Y(t) : "End Date")
|
|
415
|
+
]))
|
|
390
416
|
]), Y = (e) => {
|
|
391
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"];
|
|
392
418
|
return `${s[t.getDay()]}, ${t.getDate()} ${a[t.getMonth()]}`;
|
|
@@ -486,21 +512,7 @@ class ke extends m {
|
|
|
486
512
|
* @returns {object}
|
|
487
513
|
*/
|
|
488
514
|
render() {
|
|
489
|
-
const { today: t, current: s, selecting: a } = this.data, { start: n, end: i } = s
|
|
490
|
-
for (let h = 0; h < l; h++)
|
|
491
|
-
c.push(null);
|
|
492
|
-
for (let h = 1; h <= u; h++) {
|
|
493
|
-
const r = st(s.year, s.month, h), d = new Date(s.year, s.month, h), p = new Date(t.year, t.month, t.date), y = d < p, L = this.blockPriorDates && y, T = n === r, B = i === r, X = n && i && r > n && r < i;
|
|
494
|
-
c.push({
|
|
495
|
-
day: h,
|
|
496
|
-
iso: r,
|
|
497
|
-
disabled: L,
|
|
498
|
-
isStart: T,
|
|
499
|
-
isEnd: B,
|
|
500
|
-
isBetween: X,
|
|
501
|
-
click: this.handleClick.bind(this, r)
|
|
502
|
-
});
|
|
503
|
-
}
|
|
515
|
+
const { today: t, current: s, selecting: a } = this.data, { start: n, end: i } = s;
|
|
504
516
|
return o({ class: "range-calendar bg-background border border-border rounded-lg shadow-md p-4 w-full max-w-sm" }, [
|
|
505
517
|
Tt({
|
|
506
518
|
start: n,
|
|
@@ -509,8 +521,8 @@ class ke extends m {
|
|
|
509
521
|
onSelectStart: () => this.data.selecting = "start",
|
|
510
522
|
onSelectEnd: () => this.data.selecting = "end"
|
|
511
523
|
}),
|
|
512
|
-
q("view", (
|
|
513
|
-
switch (
|
|
524
|
+
q("view", (l) => {
|
|
525
|
+
switch (l) {
|
|
514
526
|
case "months":
|
|
515
527
|
return Lt(
|
|
516
528
|
{
|
|
@@ -534,17 +546,20 @@ class ke extends m {
|
|
|
534
546
|
return Mt({
|
|
535
547
|
monthName: this.data.monthName,
|
|
536
548
|
year: s.year,
|
|
549
|
+
today: t,
|
|
550
|
+
current: s,
|
|
551
|
+
blockPriorDates: this.blockPriorDates,
|
|
552
|
+
onDateClick: (r) => this.handleClick(r),
|
|
537
553
|
onMonthClick: () => this.state.view = "months",
|
|
538
554
|
onYearClick: () => this.state.view = "years",
|
|
539
555
|
next: () => {
|
|
540
|
-
const r = this.data.current,
|
|
541
|
-
this.setCurrent(
|
|
556
|
+
const r = this.data.current, c = r.month === 11 ? { month: 0, year: r.year + 1 } : { month: r.month + 1, year: r.year };
|
|
557
|
+
this.setCurrent(c);
|
|
542
558
|
},
|
|
543
559
|
previous: () => {
|
|
544
|
-
const r = this.data.current,
|
|
545
|
-
this.setCurrent(
|
|
546
|
-
}
|
|
547
|
-
cells: c
|
|
560
|
+
const r = this.data.current, c = r.month === 0 ? { month: 11, year: r.year - 1 } : { month: r.month - 1, year: r.year };
|
|
561
|
+
this.setCurrent(c);
|
|
562
|
+
}
|
|
548
563
|
});
|
|
549
564
|
}
|
|
550
565
|
})
|
|
@@ -660,7 +675,7 @@ class E extends m {
|
|
|
660
675
|
render() {
|
|
661
676
|
const t = this.rows, s = this.border !== !1 ? "border" : "";
|
|
662
677
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
663
|
-
|
|
678
|
+
w("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
664
679
|
o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
665
680
|
R({ class: "w-full" }, [
|
|
666
681
|
// @ts-ignore
|
|
@@ -762,7 +777,7 @@ class $t extends E {
|
|
|
762
777
|
render() {
|
|
763
778
|
const t = this.rows, s = this.border !== !1 ? "border" : "";
|
|
764
779
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
765
|
-
|
|
780
|
+
w("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
766
781
|
o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
767
782
|
R({ class: "w-full" }, [
|
|
768
783
|
// @ts-ignore
|
|
@@ -838,7 +853,7 @@ class jt extends E {
|
|
|
838
853
|
render() {
|
|
839
854
|
const t = this.rows, s = this.border !== !1 ? "border" : "";
|
|
840
855
|
return o({ class: "w-full flex flex-auto flex-col" }, [
|
|
841
|
-
|
|
856
|
+
w("hasItems", (a) => a === !1 && this.emptyState ? this.emptyState() : null),
|
|
842
857
|
o({ class: `w-full rounded-md ${s} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
843
858
|
R({ class: "w-full" }, [
|
|
844
859
|
// @ts-ignore
|
|
@@ -897,18 +912,18 @@ const De = f((e) => new jt(
|
|
|
897
912
|
emptyState: e.emptyState
|
|
898
913
|
}
|
|
899
914
|
)), Yt = f(({ name: e, email: t }) => o({ class: "min-w-0 flex-auto" }, [
|
|
900
|
-
|
|
901
|
-
|
|
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)
|
|
902
917
|
])), At = () => o({ class: "flex items-center gap-x-1.5" }, [
|
|
903
918
|
o({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
904
919
|
o({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
905
920
|
]),
|
|
906
|
-
|
|
907
|
-
]), 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" }, [
|
|
908
923
|
S("Last seen "),
|
|
909
924
|
V({ datetime: e }, "3h ago")
|
|
910
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" }, [
|
|
911
|
-
|
|
926
|
+
x({ class: "text-sm leading-6 m-0" }, e),
|
|
912
927
|
Ht(s, t)
|
|
913
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" }, [
|
|
914
929
|
o({ class: "flex min-w-0 gap-x-4" }, [
|
|
@@ -958,11 +973,11 @@ class Ce extends m {
|
|
|
958
973
|
return I(
|
|
959
974
|
{ class: `flex items-center justify-center p-2 text-muted-foreground rounded-md ${this.class || ""}` },
|
|
960
975
|
[
|
|
961
|
-
|
|
976
|
+
k({
|
|
962
977
|
class: "flex space-x-4",
|
|
963
978
|
map: [this.options, (t) => this.addLink(t)],
|
|
964
979
|
watch: {
|
|
965
|
-
value: ["[[path]]",
|
|
980
|
+
value: ["[[path]]", v.data],
|
|
966
981
|
callBack: this.updateLinks.bind(this)
|
|
967
982
|
}
|
|
968
983
|
})
|
|
@@ -975,7 +990,7 @@ class Ce extends m {
|
|
|
975
990
|
* @returns {void}
|
|
976
991
|
*/
|
|
977
992
|
afterSetup() {
|
|
978
|
-
const t =
|
|
993
|
+
const t = v.data.path;
|
|
979
994
|
this.updateLinks(t);
|
|
980
995
|
}
|
|
981
996
|
/**
|
|
@@ -1268,7 +1283,7 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
|
|
|
1268
1283
|
}]
|
|
1269
1284
|
],
|
|
1270
1285
|
click: () => t(e)
|
|
1271
|
-
}, a)), Jt = f(({ selectOption: e, state: t }) =>
|
|
1286
|
+
}, a)), Jt = f(({ selectOption: e, state: t }) => k({
|
|
1272
1287
|
class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
|
|
1273
1288
|
for: ["filteredOptions", (s, a) => Gt({ index: a, click: e, state: t }, s.label)]
|
|
1274
1289
|
})), _t = f((e) => o({ class: "relative flex items-center" }, [
|
|
@@ -1429,14 +1444,14 @@ const Gt = f(({ index: e, click: t, state: s }, a) => C({
|
|
|
1429
1444
|
dataSet: ["selected", ["state", e.value, "active"]]
|
|
1430
1445
|
},
|
|
1431
1446
|
[
|
|
1432
|
-
|
|
1447
|
+
D({
|
|
1433
1448
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md",
|
|
1434
1449
|
onSet: ["selected", { selected: e.value }],
|
|
1435
1450
|
click: (t) => e.callBack(e.value)
|
|
1436
1451
|
}, e.label)
|
|
1437
1452
|
]
|
|
1438
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}` }, [
|
|
1439
|
-
|
|
1454
|
+
k({ class: "flex flex-auto flex-row", map: [e.options, (t) => te(t, e.callBack)] })
|
|
1440
1455
|
]);
|
|
1441
1456
|
class Be extends m {
|
|
1442
1457
|
/**
|
|
@@ -1532,7 +1547,7 @@ const se = (e) => C(
|
|
|
1532
1547
|
dataSet: ["selected", ["state", e.value, "active"]]
|
|
1533
1548
|
},
|
|
1534
1549
|
[
|
|
1535
|
-
|
|
1550
|
+
D({
|
|
1536
1551
|
class: "flex flex-auto justify-center items-center px-3 py-1.5 rounded-md disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1537
1552
|
onSet: ["selected", { selected: e.value }],
|
|
1538
1553
|
click: (t) => e.callBack(e.value),
|
|
@@ -1540,7 +1555,7 @@ const se = (e) => C(
|
|
|
1540
1555
|
}, e.label)
|
|
1541
1556
|
]
|
|
1542
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}` }, [
|
|
1543
|
-
|
|
1558
|
+
k({ class: "flex flex-auto flex-row", map: [e.options, (t) => ae(t, e.callBack)] })
|
|
1544
1559
|
]);
|
|
1545
1560
|
class Re extends m {
|
|
1546
1561
|
/**
|
|
@@ -1617,11 +1632,11 @@ class re extends m {
|
|
|
1617
1632
|
*/
|
|
1618
1633
|
render() {
|
|
1619
1634
|
return I({ class: `tab items-center justify-center rounded-md bg-muted p-1 text-muted-foreground ${this.class}` }, [
|
|
1620
|
-
|
|
1635
|
+
k({
|
|
1621
1636
|
class: "flex flex-auto flex-row",
|
|
1622
1637
|
map: [this.options, (t) => this.addLink(t)],
|
|
1623
1638
|
watch: {
|
|
1624
|
-
value: ["[[path]]",
|
|
1639
|
+
value: ["[[path]]", v.data],
|
|
1625
1640
|
callBack: this.updateLinks.bind(this)
|
|
1626
1641
|
}
|
|
1627
1642
|
})
|
|
@@ -1633,7 +1648,7 @@ class re extends m {
|
|
|
1633
1648
|
* @returns {void}
|
|
1634
1649
|
*/
|
|
1635
1650
|
afterSetup() {
|
|
1636
|
-
const t =
|
|
1651
|
+
const t = v.data.path;
|
|
1637
1652
|
this.updateLinks(t);
|
|
1638
1653
|
}
|
|
1639
1654
|
/**
|
|
@@ -1803,12 +1818,12 @@ class ce extends m {
|
|
|
1803
1818
|
let s, a;
|
|
1804
1819
|
const n = this.canvas, i = n.width / parseInt(n.style.width), l = n.getBoundingClientRect();
|
|
1805
1820
|
if (t.touches && t.touches.length) {
|
|
1806
|
-
const
|
|
1807
|
-
s =
|
|
1821
|
+
const d = t.touches[0];
|
|
1822
|
+
s = d.clientX, a = d.clientY;
|
|
1808
1823
|
} else
|
|
1809
1824
|
s = t.x || t.clientX, a = t.y || t.clientY;
|
|
1810
|
-
const
|
|
1811
|
-
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;
|
|
1812
1827
|
}
|
|
1813
1828
|
/**
|
|
1814
1829
|
* Called when the pointer goes down on the canvas.
|
|
@@ -1883,12 +1898,12 @@ class ce extends m {
|
|
|
1883
1898
|
*/
|
|
1884
1899
|
scale() {
|
|
1885
1900
|
const t = this.canvas, s = this.container, a = O.getSize(s), n = this.targetSize, i = n.width, l = n.height;
|
|
1886
|
-
let
|
|
1901
|
+
let r = i + "px", c = l + "px";
|
|
1887
1902
|
if (this.width = t.width = i, this.height = t.height = l, a.width !== 0 && a.height !== 0) {
|
|
1888
|
-
const
|
|
1889
|
-
|
|
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";
|
|
1890
1905
|
}
|
|
1891
|
-
t.style.width =
|
|
1906
|
+
t.style.width = r, t.style.height = c;
|
|
1892
1907
|
}
|
|
1893
1908
|
/**
|
|
1894
1909
|
* Main drawing loop. If the mouse is down, adds a line
|
|
@@ -2057,9 +2072,9 @@ export {
|
|
|
2057
2072
|
pt as a,
|
|
2058
2073
|
$ as b,
|
|
2059
2074
|
mt as c,
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2075
|
+
we as d,
|
|
2076
|
+
be as e,
|
|
2077
|
+
wt as f,
|
|
2063
2078
|
gt as g,
|
|
2064
2079
|
xt as h,
|
|
2065
2080
|
kt as i,
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
* @param {object} props
|
|
5
5
|
* @param {string} props.monthName
|
|
6
6
|
* @param {number} props.year
|
|
7
|
+
* @param {object} props.today
|
|
8
|
+
* @param {object} props.current
|
|
9
|
+
* @param {boolean} props.blockPriorDates
|
|
10
|
+
* @param {function} props.onDateClick
|
|
7
11
|
* @param {function} props.onMonthClick
|
|
8
12
|
* @param {function} props.onYearClick
|
|
9
13
|
* @param {function} props.next
|
|
10
14
|
* @param {function} props.previous
|
|
11
|
-
* @param {Array} props.cells
|
|
12
15
|
* @returns {object}
|
|
13
16
|
*/
|
|
14
17
|
export const MonthCalendar: Function;
|
package/package.json
CHANGED