@base-framework/ui 1.0.300 → 1.0.302
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 +3 -3
- package/dist/{empty-state-KJX3HcJo.js → empty-state-BunnaSN9.js} +130 -130
- package/dist/index.es.js +6 -6
- package/dist/{inputs-DJhlHvWE.js → inputs-9udyzkHR.js} +26 -26
- package/dist/molecules.es.js +2 -2
- package/dist/organisms.es.js +2 -2
- package/dist/{range-calendar-CcFEHyEp.js → range-calendar-CnBylqhu.js} +49 -49
- package/dist/{signature-panel-C2lrBRBh.js → signature-panel-CEqzd6Sa.js} +39 -39
- package/dist/{tooltip-DD5l7kTI.js → tooltip-EO3J6QFR.js} +4 -4
- package/dist/{veil-B1pwIy-D.js → veil-fLMV40Wv.js} +14 -14
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { B as s, C as o, F as t, L as r, P as n, R as l, S as i, a as p, T as m } from "./tooltip-
|
|
1
|
+
import { B as s, C as o, F as t, L as r, P as n, R as l, S as i, a as p, T as m } from "./tooltip-EO3J6QFR.js";
|
|
2
2
|
import { B as d, I as g, L as C } from "./buttons-CHEs54Wl.js";
|
|
3
|
-
import { C as T, F as D, V as I, a as b } from "./veil-
|
|
4
|
-
import { C as F, d as P, D as B, c as k, E as M, F as f, H as x, I as N, M as v, N as y, P as h, R as L, T as W, a as H, b as A, U as R, W as w } from "./inputs-
|
|
3
|
+
import { C as T, F as D, V as I, a as b } from "./veil-fLMV40Wv.js";
|
|
4
|
+
import { C as F, d as P, D as B, c as k, E as M, F as f, H as x, I as N, M as v, N as y, P as h, R as L, T as W, a as H, b as A, U as R, W as w } from "./inputs-9udyzkHR.js";
|
|
5
5
|
import { Icons as G } from "./icons.es.js";
|
|
6
|
-
import { A as E, B as V, C as j, w as q, J, y as z, z as K, E as Q, G as _, D as X, m as Y, n as Z, O as $, K as aa, v as ea, c as sa, a as oa, b as ta, Q as ra, l as na, g as la, i as ia, h as pa, j as ma, e as ua, k as da, F as ga, d as Ca, f as ca, L as Ta, x as Da, M as Ia, o as ba, N as Sa, P as Fa, s as Pa, t as Ba, S as ka, q as Ma, r as fa, T as xa, H as Na, I as va, p as ya, u as ha } from "./empty-state-
|
|
7
|
-
import { A as Wa, b as Ha, C as Aa, D as Ra, a as wa, F as Ua, M as Ga, P as Oa, R as Ea, c as Va, g as ja, p as qa } from "./range-calendar-
|
|
8
|
-
import { B as za, p as Ka, C as Qa, j as _a, D as Xa, m as Ya, k as Za, H as $a, I as ae, N as ee, O as se, P as oe, S as te, n as re, o as ne, t as le, s as ie, q as pe, r as me, T as ue, l as de, U as ge, W as Ce, f as ce, h as Te, i as De, c as Ie, d as be, b as Se, e as Fe, a as Pe, g as Be } from "./signature-panel-
|
|
6
|
+
import { A as E, B as V, C as j, w as q, J, y as z, z as K, E as Q, G as _, D as X, m as Y, n as Z, O as $, K as aa, v as ea, c as sa, a as oa, b as ta, Q as ra, l as na, g as la, i as ia, h as pa, j as ma, e as ua, k as da, F as ga, d as Ca, f as ca, L as Ta, x as Da, M as Ia, o as ba, N as Sa, P as Fa, s as Pa, t as Ba, S as ka, q as Ma, r as fa, T as xa, H as Na, I as va, p as ya, u as ha } from "./empty-state-BunnaSN9.js";
|
|
7
|
+
import { A as Wa, b as Ha, C as Aa, D as Ra, a as wa, F as Ua, M as Ga, P as Oa, R as Ea, c as Va, g as ja, p as qa } from "./range-calendar-CnBylqhu.js";
|
|
8
|
+
import { B as za, p as Ka, C as Qa, j as _a, D as Xa, m as Ya, k as Za, H as $a, I as ae, N as ee, O as se, P as oe, S as te, n as re, o as ne, t as le, s as ie, q as pe, r as me, T as ue, l as de, U as ge, W as Ce, f as ce, h as Te, i as De, c as Ie, d as be, b as Se, e as Fe, a as Pe, g as Be } from "./signature-panel-CEqzd6Sa.js";
|
|
9
9
|
import { B as Me, I as fe, M as xe, d as Ne, e as ve, g as ye, N as he, b as Le, a as We, f as He, P as Ae, c as Re, S as we, T as Ue } from "./mobile-nav-wrapper-CWqhZ0qz.js";
|
|
10
10
|
import { B as Oe, a as Ee, C as Ve, F as je, b as qe, c as Je, M as ze, P as Ke, S as Qe } from "./sidebar-menu-page-UmKsAvjb.js";
|
|
11
11
|
import { A as Xe, F as Ye, M as Ze, a as $e, T as as } from "./aside-template-sUm-F2f0.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Div as u, Label as h, Checkbox as
|
|
1
|
+
import { Div as u, Label as h, Checkbox as m, Span as $, OnState as p, I as x, Input as r, Textarea as k } from "@base-framework/atoms";
|
|
2
2
|
import { Jot as g, Atom as s } from "@base-framework/base";
|
|
3
3
|
import { Icons as y } from "./icons.es.js";
|
|
4
|
-
const I = "flex h-10 w-full px-3 py-2 text-sm",
|
|
4
|
+
const I = "flex h-10 w-full px-3 py-2 text-sm", n = "rounded-md border border-border bg-input", o = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background", a = "disabled:cursor-not-allowed disabled:opacity-50 [&:user-invalid]:border-destructive", l = "placeholder:text-muted-foreground", f = `${I} ${n} ${o} ${l} ${a}`, C = ({ id: e, checked: c, bind: t, required: d }) => m({
|
|
5
5
|
id: e,
|
|
6
6
|
cache: "checkbox",
|
|
7
7
|
class: "absolute opacity-0 w-full h-full cursor-pointer pointer-events-none",
|
|
@@ -28,7 +28,7 @@ const I = "flex h-10 w-full px-3 py-2 text-sm", r = "rounded-md border border-bo
|
|
|
28
28
|
"checked",
|
|
29
29
|
{
|
|
30
30
|
"bg-primary": !0,
|
|
31
|
-
"text-foreground": !0,
|
|
31
|
+
"text-primary-foreground": !0,
|
|
32
32
|
"border-primary": !0
|
|
33
33
|
}
|
|
34
34
|
],
|
|
@@ -83,7 +83,7 @@ const I = "flex h-10 w-full px-3 py-2 text-sm", r = "rounded-md border border-bo
|
|
|
83
83
|
*/
|
|
84
84
|
render() {
|
|
85
85
|
const e = this.getId(), c = (t) => this.clickHandler(t);
|
|
86
|
-
return u({ class: `flex items-center
|
|
86
|
+
return u({ class: `flex items-center gap-x-2 cursor-pointer ${this.class || ""}` }, [
|
|
87
87
|
w({
|
|
88
88
|
id: e,
|
|
89
89
|
// @ts-ignore
|
|
@@ -107,9 +107,9 @@ const I = "flex h-10 w-full px-3 py-2 text-sm", r = "rounded-md border border-bo
|
|
|
107
107
|
}, D = (e) => {
|
|
108
108
|
const c = e.target, t = H(c.value);
|
|
109
109
|
t && (c.value = t);
|
|
110
|
-
}, i = s((e) =>
|
|
110
|
+
}, i = s((e) => r({
|
|
111
111
|
...e,
|
|
112
|
-
class: `${
|
|
112
|
+
class: `${f} ${e.class || ""}`.trim()
|
|
113
113
|
})), M = s((e) => i({
|
|
114
114
|
...e,
|
|
115
115
|
type: "tel",
|
|
@@ -127,34 +127,34 @@ const I = "flex h-10 w-full px-3 py-2 text-sm", r = "rounded-md border border-bo
|
|
|
127
127
|
})), q = s((e) => k({
|
|
128
128
|
...e,
|
|
129
129
|
as: "textarea",
|
|
130
|
-
class: `flex w-full h-24 px-3 py-2 text-sm ${
|
|
131
|
-
})), R = (e = {}) => u({ class: "flex items-center
|
|
132
|
-
|
|
130
|
+
class: `flex w-full h-24 px-3 py-2 text-sm ${n} ${o} ${l} ${a} ${e.class || ""}`.trim()
|
|
131
|
+
})), R = (e = {}) => u({ class: "flex items-center gap-x-2" }, [
|
|
132
|
+
r({
|
|
133
133
|
...e,
|
|
134
134
|
type: "radio",
|
|
135
135
|
class: "cursor-pointer appearance-none h-4 w-4 border rounded-full checked:border-primary checked:bg-primary focus:ring focus:ring-primary".trim()
|
|
136
136
|
}),
|
|
137
137
|
e.label && h({ forHTML: e.value, class: "cursor-pointer" }, e.label)
|
|
138
|
-
]), U = s((e) =>
|
|
138
|
+
]), U = s((e) => r({
|
|
139
139
|
...e,
|
|
140
140
|
type: "date",
|
|
141
|
-
class: `${
|
|
142
|
-
})), W = s((e) =>
|
|
141
|
+
class: `${n} ${o} ${l} ${a} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
142
|
+
})), W = s((e) => r({
|
|
143
143
|
...e,
|
|
144
144
|
type: "time",
|
|
145
|
-
class: `${
|
|
146
|
-
})), j = s((e) =>
|
|
145
|
+
class: `${n} ${o} ${l} ${a} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
146
|
+
})), j = s((e) => r({
|
|
147
147
|
...e,
|
|
148
148
|
type: "datetime-local",
|
|
149
|
-
class: `${
|
|
150
|
-
})), z = s((e) =>
|
|
149
|
+
class: `${n} ${o} ${l} ${a} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
150
|
+
})), z = s((e) => r({
|
|
151
151
|
...e,
|
|
152
152
|
type: "month",
|
|
153
|
-
class: `${
|
|
154
|
-
})), A = s((e) =>
|
|
153
|
+
class: `${n} ${o} ${l} ${a} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
154
|
+
})), A = s((e) => r({
|
|
155
155
|
...e,
|
|
156
156
|
type: "week",
|
|
157
|
-
class: `${
|
|
157
|
+
class: `${n} ${o} ${l} ${a} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
158
158
|
})), B = s((e) => i({
|
|
159
159
|
...e,
|
|
160
160
|
type: "number"
|
|
@@ -172,19 +172,19 @@ const O = s((e) => i({
|
|
|
172
172
|
})), G = s((e) => i({
|
|
173
173
|
...e,
|
|
174
174
|
type: "hidden"
|
|
175
|
-
})), K = s((e) =>
|
|
175
|
+
})), K = s((e) => r({
|
|
176
176
|
...e,
|
|
177
177
|
type: "color",
|
|
178
|
-
class: `${
|
|
178
|
+
class: `${n} text-foreground p-0 ${a} ${e.class || ""}`.trim()
|
|
179
179
|
}));
|
|
180
|
-
s((e) =>
|
|
180
|
+
s((e) => m({
|
|
181
181
|
...e,
|
|
182
|
-
class: `flex h-4 w-4 text-foreground ${
|
|
182
|
+
class: `flex h-4 w-4 text-foreground ${n} ${o} ${a} ${e.class || ""}`.trim()
|
|
183
183
|
}));
|
|
184
|
-
const E = "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", Q = s((e) =>
|
|
184
|
+
const E = "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", Q = s((e) => r({
|
|
185
185
|
...e,
|
|
186
186
|
type: "file",
|
|
187
|
-
class: `${
|
|
187
|
+
class: `${f} ${E} ${e.class || ""}`.trim()
|
|
188
188
|
}));
|
|
189
189
|
export {
|
|
190
190
|
L as C,
|
|
@@ -206,5 +206,5 @@ export {
|
|
|
206
206
|
K as d,
|
|
207
207
|
a as e,
|
|
208
208
|
o as f,
|
|
209
|
-
|
|
209
|
+
f as g
|
|
210
210
|
};
|
package/dist/molecules.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as s, B as t, C as r, w as e, J as i, y as n, z as m, E as l, G as C, D as d, m as S, n as p, O as u, K as D, v as c, c as g, a as F, b as T, Q as P, l as A, g as f, i as w, h as I, j as b, e as y, k as B, F as M, d as k, f as x, L, x as v, M as E, o as N, N as R, P as U, s as h, t as G, S as O, q as j, r as q, T as z, H, I as J, p as K, u as Q } from "./empty-state-
|
|
2
|
-
import { A as V, P as W, g as X } from "./range-calendar-
|
|
1
|
+
import { A as s, B as t, C as r, w as e, J as i, y as n, z as m, E as l, G as C, D as d, m as S, n as p, O as u, K as D, v as c, c as g, a as F, b as T, Q as P, l as A, g as f, i as w, h as I, j as b, e as y, k as B, F as M, d as k, f as x, L, x as v, M as E, o as N, N as R, P as U, s as h, t as G, S as O, q as j, r as q, T as z, H, I as J, p as K, u as Q } from "./empty-state-BunnaSN9.js";
|
|
2
|
+
import { A as V, P as W, g as X } from "./range-calendar-CnBylqhu.js";
|
|
3
3
|
export {
|
|
4
4
|
s as Alert,
|
|
5
5
|
V as Avatar,
|
package/dist/organisms.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, S as v, n as D, o as N, t as k, s as C, q as c, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } from "./signature-panel-
|
|
2
|
-
import { b as F, C as U, D as G, a as R, F as j, M as q, R as w, c as z, p as A } from "./range-calendar-
|
|
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, S as v, n as D, o as N, t as k, s as C, q as c, r as T, T as M, l as m, U as y, W as B, f as W, h, i as S, c as H, d as P, b as I, e as f, a as x, g as L } from "./signature-panel-CEqzd6Sa.js";
|
|
2
|
+
import { b as F, C as U, D as G, a as R, F as j, M as q, R as w, c as z, p as A } from "./range-calendar-CnBylqhu.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-CWqhZ0qz.js";
|
|
4
4
|
export {
|
|
5
5
|
s as BackButton,
|
|
@@ -3,10 +3,10 @@ import { Component as O, Data as B, Atom as j, DateTime as T } from "@base-frame
|
|
|
3
3
|
import { B as f } from "./buttons-CHEs54Wl.js";
|
|
4
4
|
import { Icons as P } from "./icons.es.js";
|
|
5
5
|
const U = (n, t) => {
|
|
6
|
-
const e = n ? n.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX,
|
|
7
|
-
let i = e.left + r, d = e.bottom +
|
|
6
|
+
const e = n ? n.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, a = t.getBoundingClientRect(), s = 10, r = globalThis.scrollX, l = globalThis.scrollY;
|
|
7
|
+
let i = e.left + r, d = e.bottom + l;
|
|
8
8
|
const g = globalThis.innerHeight - e.bottom, m = e.top;
|
|
9
|
-
return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height && m > g ? d = e.top +
|
|
9
|
+
return i + a.width > globalThis.innerWidth && (i = globalThis.innerWidth - a.width - s), g < a.height && m > g ? d = e.top + l - a.height - s : g < a.height && (d = e.bottom + l - (a.height - g) - s), { x: i, y: d };
|
|
10
10
|
};
|
|
11
11
|
class Pt extends O {
|
|
12
12
|
/**
|
|
@@ -205,7 +205,7 @@ const q = j(({ src: n, alt: t }) => n ? _({
|
|
|
205
205
|
a.substring(0, 3)
|
|
206
206
|
)
|
|
207
207
|
)
|
|
208
|
-
), D = (n) => (n *= 1, n < 10 ? `0${n}` : String(n)), nt = (n) => (n.indexOf("T") === -1 && n.indexOf(" ") === -1 && (n += "T00:00:01"), n.replace(" ", "T"), n), w = (n, t, e) => `${n}-${D(t + 1)}-${D(e)}`, at = (n) => n ? "bg-accent text-primary" : "", st = (n) => n ? "text-muted-foreground opacity-50" : "", rt = (n, t) => n === t, ot = (n, t) => rt(n, t) ? "bg-primary text-foreground" : "", it = (n, t, e, a) => {
|
|
208
|
+
), D = (n) => (n *= 1, n < 10 ? `0${n}` : String(n)), nt = (n) => (n.indexOf("T") === -1 && n.indexOf(" ") === -1 && (n += "T00:00:01"), n.replace(" ", "T"), n), w = (n, t, e) => `${n}-${D(t + 1)}-${D(e)}`, at = (n) => n ? "bg-accent text-primary" : "", st = (n) => n ? "text-muted-foreground opacity-50" : "", rt = (n, t) => n === t, ot = (n, t) => rt(n, t) ? "bg-primary text-primary-foreground" : "", it = (n, t, e, a) => {
|
|
209
209
|
const s = ot(t, a);
|
|
210
210
|
return s || (n ? at(n) : e ? st(e) : "text-foreground");
|
|
211
211
|
}, N = (n) => {
|
|
@@ -215,7 +215,7 @@ const q = j(({ src: n, alt: t }) => n ? _({
|
|
|
215
215
|
date: a,
|
|
216
216
|
isToday: s,
|
|
217
217
|
isOutsideMonth: r,
|
|
218
|
-
select:
|
|
218
|
+
select: l,
|
|
219
219
|
disabled: i
|
|
220
220
|
} = n;
|
|
221
221
|
return L(
|
|
@@ -229,18 +229,18 @@ const q = j(({ src: n, alt: t }) => n ? _({
|
|
|
229
229
|
disabled: i || t === null,
|
|
230
230
|
"aria-label": t ? `Day ${t}` : null,
|
|
231
231
|
// Only call select if it's not disabled.
|
|
232
|
-
click: () => !i &&
|
|
232
|
+
click: () => !i && l(a)
|
|
233
233
|
},
|
|
234
234
|
t.toString()
|
|
235
235
|
);
|
|
236
|
-
}, Y = (n, t, e, a) => n === a.date && t === a.month && e === a.year,
|
|
237
|
-
const { year: s, month: r } = n,
|
|
236
|
+
}, Y = (n, t, e, a) => n === a.date && t === a.month && e === a.year, lt = (n, t, e, a = !1) => {
|
|
237
|
+
const { year: s, month: r } = n, l = w(s, r, n.date), i = new Date(s, r, 1).getDay(), d = new Date(s, r + 1, 0).getDate(), g = new Date(s, r, 0).getDate(), m = [], C = r === 0 ? 11 : r - 1, v = r === 0 ? s - 1 : s;
|
|
238
238
|
for (let o = i - 1; o >= 0; o--) {
|
|
239
239
|
const u = g - o, p = Y(u, C, v, t), y = new Date(v, C, u) < new Date(t.year, t.month, t.date), x = a && y;
|
|
240
240
|
m.push(
|
|
241
241
|
N({
|
|
242
242
|
day: u,
|
|
243
|
-
currentDate:
|
|
243
|
+
currentDate: l,
|
|
244
244
|
date: w(v, C, u),
|
|
245
245
|
isToday: p,
|
|
246
246
|
isOutsideMonth: !0,
|
|
@@ -254,7 +254,7 @@ const q = j(({ src: n, alt: t }) => n ? _({
|
|
|
254
254
|
m.push(
|
|
255
255
|
N({
|
|
256
256
|
day: o,
|
|
257
|
-
currentDate:
|
|
257
|
+
currentDate: l,
|
|
258
258
|
date: w(s, r, o),
|
|
259
259
|
isToday: u,
|
|
260
260
|
isOutsideMonth: !1,
|
|
@@ -263,13 +263,13 @@ const q = j(({ src: n, alt: t }) => n ? _({
|
|
|
263
263
|
})
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
|
-
const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s,
|
|
267
|
-
for (let o = 1; o <=
|
|
266
|
+
const b = r === 11 ? 0 : r + 1, $ = r === 11 ? s + 1 : s, c = (7 - m.length % 7) % 7;
|
|
267
|
+
for (let o = 1; o <= c; o++) {
|
|
268
268
|
const u = Y(o, b, $, t), p = new Date($, b, o) < new Date(t.year, t.month, t.date), y = a && p;
|
|
269
269
|
m.push(
|
|
270
270
|
N({
|
|
271
271
|
day: o,
|
|
272
|
-
currentDate:
|
|
272
|
+
currentDate: l,
|
|
273
273
|
date: w($, b, o),
|
|
274
274
|
isToday: u,
|
|
275
275
|
isOutsideMonth: !0,
|
|
@@ -292,7 +292,7 @@ const q = j(({ src: n, alt: t }) => n ? _({
|
|
|
292
292
|
variant: "icon",
|
|
293
293
|
icon: n === "Previous" ? P.chevron.single.left : P.chevron.single.right
|
|
294
294
|
}
|
|
295
|
-
),
|
|
295
|
+
), ct = ({ onMonthClick: n, onYearClick: t, next: e, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
296
296
|
f({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
|
|
297
297
|
f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
|
|
298
298
|
R({ label: "Previous", click: a }),
|
|
@@ -300,8 +300,8 @@ const q = j(({ src: n, alt: t }) => n ? _({
|
|
|
300
300
|
]), ht = (n) => h(
|
|
301
301
|
{ class: "flex items-center justify-center h-9 w-auto text-[0.8rem] font-normal text-muted-foreground" },
|
|
302
302
|
n
|
|
303
|
-
), ut = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ht), dt = (n) => h({ class: "rdp w-full
|
|
304
|
-
|
|
303
|
+
), ut = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ht), dt = (n) => h({ class: "rdp flex flex-auto flex-col w-full gap-y-1" }, [
|
|
304
|
+
ct({
|
|
305
305
|
onMonthClick: n.onMonthClick,
|
|
306
306
|
onYearClick: n.onYearClick,
|
|
307
307
|
next: n.next,
|
|
@@ -315,7 +315,7 @@ const q = j(({ src: n, alt: t }) => n ? _({
|
|
|
315
315
|
h({ class: "grid grid-cols-7" }, ut()),
|
|
316
316
|
h(
|
|
317
317
|
{ class: "grid grid-cols-7" },
|
|
318
|
-
|
|
318
|
+
lt(
|
|
319
319
|
n.current,
|
|
320
320
|
n.today,
|
|
321
321
|
n.select,
|
|
@@ -326,14 +326,14 @@ const q = j(({ src: n, alt: t }) => n ? _({
|
|
|
326
326
|
]
|
|
327
327
|
})
|
|
328
328
|
]), gt = ({ currentMonth: n, currentYear: t, onSelect: e }) => {
|
|
329
|
-
const a = t - 50, s = Array.from({ length: 101 }, (r,
|
|
329
|
+
const a = t - 50, s = Array.from({ length: 101 }, (r, l) => a + l);
|
|
330
330
|
return h(
|
|
331
331
|
{ class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
|
|
332
332
|
s.map(
|
|
333
333
|
(r) => f(
|
|
334
334
|
{
|
|
335
|
-
click: (
|
|
336
|
-
|
|
335
|
+
click: (l) => {
|
|
336
|
+
l.preventDefault(), l.stopPropagation(), e(r);
|
|
337
337
|
},
|
|
338
338
|
variant: r === t ? "primary" : "ghost",
|
|
339
339
|
"aria-label": `Select ${r}`
|
|
@@ -508,7 +508,7 @@ const W = ({ label: n, click: t }) => f(
|
|
|
508
508
|
variant: "icon",
|
|
509
509
|
icon: n === "Previous" ? P.chevron.single.left : P.chevron.single.right
|
|
510
510
|
}
|
|
511
|
-
), mt = ({ onMonthClick: n, onYearClick: t, next: e, previous: a }) => h({ class: "flex items-center justify-center
|
|
511
|
+
), mt = ({ onMonthClick: n, onYearClick: t, next: e, previous: a }) => h({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
512
512
|
f({ click: n, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
|
|
513
513
|
f({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
|
|
514
514
|
W({ label: "Previous", click: a }),
|
|
@@ -516,9 +516,9 @@ const W = ({ label: n, click: t }) => f(
|
|
|
516
516
|
]), ft = (n) => h({ class: "h-9 flex items-center justify-center font-medium" }, n), pt = () => h(
|
|
517
517
|
{ class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
|
|
518
518
|
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(ft)
|
|
519
|
-
), yt = ({ day: n, iso: t, disabled: e, isStart: a, isEnd: s, isBetween: r, isOtherMonth:
|
|
519
|
+
), yt = ({ day: n, iso: t, disabled: e, isStart: a, isEnd: s, isBetween: r, isOtherMonth: l, click: i }) => {
|
|
520
520
|
let d = "ghost", g = "";
|
|
521
|
-
return a || s ? (d = "default", g = "bg-primary text-foreground hover:bg-primary/90") : r && (g = "bg-accent text-accent-foreground hover:bg-accent/80"), e && (g += " opacity-50 cursor-not-allowed"),
|
|
521
|
+
return a || s ? (d = "default", g = "bg-primary text-primary-foreground hover:bg-primary/90") : r && (g = "bg-accent text-accent-foreground hover:bg-accent/80"), e && (g += " opacity-50 cursor-not-allowed"), l && (g += " text-muted-foreground opacity-50"), f(
|
|
522
522
|
{
|
|
523
523
|
class: `flex items-center justify-center p-0 text-sm font-medium rounded-md transition-colors ${g}`,
|
|
524
524
|
variant: d,
|
|
@@ -530,9 +530,9 @@ const W = ({ label: n, click: t }) => f(
|
|
|
530
530
|
n.toString()
|
|
531
531
|
);
|
|
532
532
|
}, Dt = ({ today: n, current: t, blockPriorDates: e, onDateClick: a }) => {
|
|
533
|
-
const { start: s, end: r } = t,
|
|
534
|
-
for (let
|
|
535
|
-
const o = C -
|
|
533
|
+
const { start: s, end: r } = t, l = new Date(t.year, t.month, 1).getDay(), i = new Date(t.year, t.month + 1, 0).getDate(), d = [], g = t.month === 0 ? 11 : t.month - 1, m = t.month === 0 ? t.year - 1 : t.year, C = new Date(m, g + 1, 0).getDate(), v = t.month === 11 ? 0 : t.month + 1, b = t.month === 11 ? t.year + 1 : t.year;
|
|
534
|
+
for (let c = l - 1; c >= 0; c--) {
|
|
535
|
+
const o = C - c, u = w(m, g, o), p = new Date(m, g, o), y = new Date(n.year, n.month, n.date), x = p < y, M = e && x, S = s === u, k = r === u, X = s && r && u > s && u < r;
|
|
536
536
|
d.push({
|
|
537
537
|
day: o,
|
|
538
538
|
iso: u,
|
|
@@ -544,10 +544,10 @@ const W = ({ label: n, click: t }) => f(
|
|
|
544
544
|
click: () => a(u)
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
|
-
for (let
|
|
548
|
-
const o = w(t.year, t.month,
|
|
547
|
+
for (let c = 1; c <= i; c++) {
|
|
548
|
+
const o = w(t.year, t.month, c), u = new Date(t.year, t.month, c), p = new Date(n.year, n.month, n.date), y = u < p, x = e && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
|
|
549
549
|
d.push({
|
|
550
|
-
day:
|
|
550
|
+
day: c,
|
|
551
551
|
iso: o,
|
|
552
552
|
disabled: x,
|
|
553
553
|
isStart: M,
|
|
@@ -560,10 +560,10 @@ const W = ({ label: n, click: t }) => f(
|
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
562
|
const F = (7 - d.length % 7) % 7;
|
|
563
|
-
for (let
|
|
564
|
-
const o = w(b, v,
|
|
563
|
+
for (let c = 1; c <= F; c++) {
|
|
564
|
+
const o = w(b, v, c), u = new Date(b, v, c), p = new Date(n.year, n.month, n.date), y = u < p, x = e && y, M = s === o, S = r === o, k = s && r && o > s && o < r;
|
|
565
565
|
d.push({
|
|
566
|
-
day:
|
|
566
|
+
day: c,
|
|
567
567
|
iso: o,
|
|
568
568
|
disabled: x,
|
|
569
569
|
isStart: M,
|
|
@@ -576,15 +576,15 @@ const W = ({ label: n, click: t }) => f(
|
|
|
576
576
|
return h(
|
|
577
577
|
{ class: "grid grid-cols-7 gap-1" },
|
|
578
578
|
d.map(
|
|
579
|
-
(
|
|
580
|
-
day:
|
|
581
|
-
iso:
|
|
582
|
-
disabled:
|
|
583
|
-
isStart:
|
|
584
|
-
isEnd:
|
|
585
|
-
isBetween:
|
|
586
|
-
isOtherMonth:
|
|
587
|
-
click:
|
|
579
|
+
(c, o) => yt({
|
|
580
|
+
day: c.day,
|
|
581
|
+
iso: c.iso,
|
|
582
|
+
disabled: c.disabled,
|
|
583
|
+
isStart: c.isStart,
|
|
584
|
+
isEnd: c.isEnd,
|
|
585
|
+
isBetween: c.isBetween,
|
|
586
|
+
isOtherMonth: c.isOtherMonth,
|
|
587
|
+
click: c.click
|
|
588
588
|
})
|
|
589
589
|
)
|
|
590
590
|
);
|
|
@@ -624,7 +624,7 @@ const W = ({ label: n, click: t }) => f(
|
|
|
624
624
|
a.substring(0, 3)
|
|
625
625
|
)
|
|
626
626
|
)
|
|
627
|
-
), vt = ({ start: n, end: t, selecting: e, onSelectStart: a, onSelectEnd: s }) => h({ class: "flex
|
|
627
|
+
), vt = ({ start: n, end: t, selecting: e, onSelectStart: a, onSelectEnd: s }) => h({ class: "flex gap-x-2 mb-4" }, [
|
|
628
628
|
z("selecting", (r) => f({
|
|
629
629
|
click: a,
|
|
630
630
|
variant: r === "start" ? "primary" : "outline",
|
|
@@ -761,15 +761,15 @@ class Yt extends O {
|
|
|
761
761
|
start: s,
|
|
762
762
|
end: r,
|
|
763
763
|
selecting: a,
|
|
764
|
-
onSelectStart: (
|
|
765
|
-
|
|
764
|
+
onSelectStart: (l) => {
|
|
765
|
+
l.preventDefault(), l.stopPropagation(), this.data.selecting = "start";
|
|
766
766
|
},
|
|
767
|
-
onSelectEnd: (
|
|
768
|
-
|
|
767
|
+
onSelectEnd: (l) => {
|
|
768
|
+
l.preventDefault(), l.stopPropagation(), this.data.selecting = "end";
|
|
769
769
|
}
|
|
770
770
|
}),
|
|
771
|
-
J("view", (
|
|
772
|
-
switch (
|
|
771
|
+
J("view", (l) => {
|
|
772
|
+
switch (l) {
|
|
773
773
|
case "months":
|
|
774
774
|
return wt(
|
|
775
775
|
{
|
|
@@ -819,7 +819,7 @@ class Yt extends O {
|
|
|
819
819
|
}
|
|
820
820
|
export {
|
|
821
821
|
Tt as A,
|
|
822
|
-
|
|
822
|
+
lt as C,
|
|
823
823
|
N as D,
|
|
824
824
|
w as F,
|
|
825
825
|
dt as M,
|