@base-framework/ui 1.2.53 → 1.2.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms.es.js +1 -1
- package/dist/{confirmation-Bb4yyCdN.js → confirmation-C9YqsZw-.js} +1 -1
- package/dist/{full-page-sr9FKjeC.js → full-page-CI8OB56g.js} +861 -843
- package/dist/index.es.js +5 -5
- package/dist/molecules.es.js +2 -2
- package/dist/organisms.es.js +3 -3
- package/dist/pages.es.js +2 -2
- package/dist/{sidebar-menu-B8UI-iLE.js → sidebar-menu-hNb7NQ1x.js} +1 -1
- package/dist/{sidebar-menu-page-tF3Yc9nB.js → sidebar-menu-page-CQ_ExHtv.js} +2 -2
- package/dist/{signature-panel-CWJHFDAm.js → signature-panel-CovV7Mn6.js} +57 -52
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { I as
|
|
2
|
-
import { Atom as i, router as
|
|
3
|
-
import { Icons as
|
|
4
|
-
import { Timer as
|
|
1
|
+
import { I as U, Span as f, Button as v, OnState as M, Div as l, Legend as mt, Fieldset as bt, H4 as Ke, P as k, Label as Y, Checkbox as me, Input as p, Textarea as Qe, UseParent as G, Img as be, H5 as xt, H2 as Z, Form as pt, Header as ee, Footer as xe, A as Je, H3 as pe, Nav as ye, Ul as te, Li as we, OnStateOpen as ve, On as X, Dialog as yt, Th as Xe, Thead as wt, Tr as vt, Table as ke, Time as kt, H1 as Ct } from "@base-framework/atoms";
|
|
2
|
+
import { Atom as i, router as q, Jot as B, Component as S, Html as Ze, Data as N, Events as H, DateTime as se, NavLink as St, DataTracker as et } from "@base-framework/base";
|
|
3
|
+
import { Icons as g } from "./icons.es.js";
|
|
4
|
+
import { Timer as $t, TableBody as Dt, DataTableBody as It, ScrollableTableBody as Tt, List as Pt } from "@base-framework/organisms";
|
|
5
5
|
import { F as W } from "./format-DE4rFWuD.js";
|
|
6
6
|
import { F as Mt } from "./bside-template-C7AQgQ6H.js";
|
|
7
|
-
const
|
|
7
|
+
const Bt = {
|
|
8
8
|
xs: "w-4 h-4",
|
|
9
9
|
sm: "w-6 h-6",
|
|
10
10
|
md: "w-8 h-8",
|
|
@@ -12,9 +12,9 @@ const Pt = {
|
|
|
12
12
|
xl: "w-12 h-12",
|
|
13
13
|
"2xl": "w-14 h-14",
|
|
14
14
|
"3xl": "w-16 h-16"
|
|
15
|
-
},
|
|
16
|
-
const s =
|
|
17
|
-
return
|
|
15
|
+
}, ge = i((e, t) => {
|
|
16
|
+
const s = Bt[e.size || "sm"];
|
|
17
|
+
return U({
|
|
18
18
|
...e,
|
|
19
19
|
// @ts-ignore
|
|
20
20
|
class: `stroke-current icon-size ${s} ${e.class || ""}`,
|
|
@@ -35,7 +35,7 @@ const Pt = {
|
|
|
35
35
|
// 56px - matches Icon
|
|
36
36
|
"3xl": "w-16 h-16"
|
|
37
37
|
// 64px - matches Icon
|
|
38
|
-
},
|
|
38
|
+
}, Pe = {
|
|
39
39
|
xs: "16px",
|
|
40
40
|
sm: "24px",
|
|
41
41
|
md: "32px",
|
|
@@ -43,17 +43,17 @@ const Pt = {
|
|
|
43
43
|
xl: "48px",
|
|
44
44
|
"2xl": "56px",
|
|
45
45
|
"3xl": "64px"
|
|
46
|
-
},
|
|
46
|
+
}, Me = {
|
|
47
47
|
outlined: "material-symbols-outlined",
|
|
48
48
|
filled: "material-symbols-filled",
|
|
49
49
|
rounded: "material-symbols-rounded",
|
|
50
50
|
sharp: "material-symbols-sharp"
|
|
51
51
|
}, Be = i((e) => {
|
|
52
|
-
const t = e.size || "sm", s = e.variant || "outlined", n = Te[t] || Te.sm, a =
|
|
53
|
-
return
|
|
52
|
+
const t = e.size || "sm", s = e.variant || "outlined", n = Te[t] || Te.sm, a = Pe[t] || Pe.sm, o = Me[s] || Me.outlined;
|
|
53
|
+
return f({
|
|
54
54
|
...e,
|
|
55
55
|
// @ts-ignore
|
|
56
|
-
class: `inline-flex items-center justify-center ${
|
|
56
|
+
class: `inline-flex items-center justify-center ${o} ${n} ${e.class || ""}`,
|
|
57
57
|
// @ts-ignore
|
|
58
58
|
style: `font-size: ${a}; ${e.style || ""}`,
|
|
59
59
|
// Remove props that shouldn't be passed to the DOM element
|
|
@@ -62,14 +62,14 @@ const Pt = {
|
|
|
62
62
|
name: void 0
|
|
63
63
|
// @ts-ignore
|
|
64
64
|
}, e.name);
|
|
65
|
-
}), x = (e = {}, t) => t ? typeof t == "string" && t.includes("<svg") ?
|
|
65
|
+
}), x = (e = {}, t) => t ? typeof t == "string" && t.includes("<svg") ? ge(e, t) : typeof t == "object" && t.name ? Be({
|
|
66
66
|
...e,
|
|
67
67
|
name: t.name,
|
|
68
68
|
variant: t.variant || e.variant || "outlined"
|
|
69
69
|
}) : typeof t == "string" ? Be({
|
|
70
70
|
...e,
|
|
71
71
|
name: t
|
|
72
|
-
}) :
|
|
72
|
+
}) : ge(e, t) : null, Ta = (e) => e ? !!(typeof e == "object" && e.name || typeof e == "string" && !e.includes("<svg")) : !1, Pa = (e) => typeof e == "string" && e.includes("<svg"), ze = {
|
|
73
73
|
gray: {
|
|
74
74
|
backgroundColor: "bg-gray-50",
|
|
75
75
|
textColor: "text-gray-600",
|
|
@@ -150,84 +150,102 @@ const Pt = {
|
|
|
150
150
|
textColor: "text-foreground",
|
|
151
151
|
ringColor: "ring-white/10"
|
|
152
152
|
}
|
|
153
|
-
},
|
|
154
|
-
const s =
|
|
155
|
-
return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${n} ${a} ${
|
|
153
|
+
}, zt = (e) => ze[e] || ze.gray, Ot = (e, t = {}) => {
|
|
154
|
+
const s = zt(e), n = t.backgroundColor ?? s.backgroundColor, a = t.textColor ?? s.textColor, o = t.ringColor ?? s.ringColor;
|
|
155
|
+
return `inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors ${n} ${a} ${o}`;
|
|
156
156
|
}, Ma = i((e, t) => {
|
|
157
|
-
const { type: s, icon: n, size: a = "xs", backgroundColor:
|
|
158
|
-
return
|
|
157
|
+
const { type: s, icon: n, size: a = "xs", backgroundColor: o, textColor: r, ringColor: c, ...u } = e, h = Ot(s, { backgroundColor: o, textColor: r, ringColor: c });
|
|
158
|
+
return f({ ...u, class: h }, [
|
|
159
159
|
n ? x({ size: a, class: "mr-1" }, n) : null,
|
|
160
160
|
...t || []
|
|
161
161
|
]);
|
|
162
162
|
});
|
|
163
|
-
let
|
|
164
|
-
const
|
|
163
|
+
let z = globalThis.history?.state?._pos ?? 0;
|
|
164
|
+
const le = /* @__PURE__ */ new Map(), re = (e) => (e || "").replace(/^\/+/, "").replace(/\/+$/, ""), tt = (e, t) => {
|
|
165
165
|
if (!t) return !1;
|
|
166
|
-
const s =
|
|
166
|
+
const s = re(e), n = re(t);
|
|
167
167
|
return s === n || s.startsWith(n + "/");
|
|
168
168
|
}, Nt = (e, t) => {
|
|
169
|
-
const s =
|
|
169
|
+
const s = re(e);
|
|
170
170
|
if (!t) return s;
|
|
171
|
-
const n =
|
|
171
|
+
const n = re(t);
|
|
172
172
|
if (!s.startsWith(n)) return s;
|
|
173
173
|
const a = s.substring(n.length);
|
|
174
174
|
if (!a || a === "/") return s;
|
|
175
|
-
const
|
|
176
|
-
return r < 0 ? s : n + "/" +
|
|
175
|
+
const o = a.startsWith("/") ? a.substring(1) : a, r = o.indexOf("/");
|
|
176
|
+
return r < 0 ? s : n + "/" + o.substring(0, r);
|
|
177
|
+
}, Ft = () => {
|
|
178
|
+
try {
|
|
179
|
+
return /** @type {any} */ globalThis.performance?.getEntriesByType?.("navigation")?.[0]?.type === "reload";
|
|
180
|
+
} catch {
|
|
181
|
+
return !1;
|
|
182
|
+
}
|
|
177
183
|
};
|
|
178
184
|
if (typeof globalThis.history?.pushState == "function") {
|
|
179
185
|
const e = globalThis.history.pushState, t = globalThis.history.replaceState;
|
|
180
186
|
globalThis.history.pushState = function(s, n, a) {
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
return e.call(this,
|
|
187
|
+
z++;
|
|
188
|
+
const o = s !== null && typeof s == "object" ? { ...s, _pos: z } : { _pos: z };
|
|
189
|
+
return e.call(this, o, n, a);
|
|
184
190
|
}, globalThis.history.replaceState = function(s, n, a) {
|
|
185
|
-
const
|
|
191
|
+
const o = globalThis.history.state?._pos ?? z, r = s !== null && typeof s == "object" ? { ...s, _pos: o } : { _pos: o };
|
|
186
192
|
return t.call(this, r, n, a);
|
|
187
193
|
}, globalThis.addEventListener("popstate", (s) => {
|
|
188
194
|
const n = (
|
|
189
195
|
/** @type {any} */
|
|
190
196
|
s.state?._pos
|
|
191
197
|
);
|
|
192
|
-
typeof n == "number" && (
|
|
198
|
+
typeof n == "number" && (z = n);
|
|
193
199
|
});
|
|
194
200
|
}
|
|
195
201
|
const Oe = (e) => {
|
|
196
|
-
const t = globalThis.history?.state;
|
|
197
|
-
if (t
|
|
202
|
+
const t = globalThis.history?.state || {};
|
|
203
|
+
if (!(t._entryKey === e.key && t._entryPos === e.pos && t._entrySourcePath === e.sourcePath && t._entryBasePath === e.basePath))
|
|
198
204
|
try {
|
|
199
205
|
globalThis.history.replaceState(
|
|
200
|
-
{
|
|
206
|
+
{
|
|
207
|
+
...t,
|
|
208
|
+
_entryKey: e.key,
|
|
209
|
+
_entryPos: e.pos,
|
|
210
|
+
_entrySourcePath: e.sourcePath,
|
|
211
|
+
_entryBasePath: e.basePath
|
|
212
|
+
},
|
|
201
213
|
"",
|
|
202
214
|
globalThis.location?.href
|
|
203
215
|
);
|
|
204
216
|
} catch {
|
|
205
217
|
}
|
|
206
|
-
}, Ft = (e) => {
|
|
207
|
-
const t = e || "", s = X.path || "", n = ge.get(t);
|
|
208
|
-
if (n && Ot(s, n.basePath))
|
|
209
|
-
return Oe(n.pos), n;
|
|
210
|
-
const a = globalThis.history?.state?._entryPos, l = typeof a == "number" ? a : A, r = {
|
|
211
|
-
pos: l,
|
|
212
|
-
sourcePath: X.lastPath || null,
|
|
213
|
-
basePath: Nt(s, e)
|
|
214
|
-
};
|
|
215
|
-
return Oe(l), ge.set(t, r), r;
|
|
216
218
|
}, Lt = (e) => {
|
|
217
|
-
|
|
219
|
+
const t = globalThis.history?.state || {}, s = q.path || "", n = Nt(s, e), o = typeof t._entryKey == "string" && t._entryKey ? t._entryKey : `${e || ""}|${n}|${z}`, r = le.get(o);
|
|
220
|
+
if (r && tt(s, r.basePath))
|
|
221
|
+
return Oe(r), r;
|
|
222
|
+
const c = t._entryPos, u = t._entrySourcePath, h = t._entryBasePath, y = typeof c == "number" ? c : z, R = typeof u == "string" || u === null ? u : q.lastPath || null, P = {
|
|
223
|
+
key: o,
|
|
224
|
+
pos: y,
|
|
225
|
+
sourcePath: R,
|
|
226
|
+
basePath: typeof h == "string" && h ? h : n
|
|
227
|
+
};
|
|
228
|
+
return Oe(P), le.set(o, P), P;
|
|
229
|
+
}, Rt = (e) => {
|
|
230
|
+
const t = globalThis.history?.state?._entryKey;
|
|
231
|
+
typeof t == "string" && t && le.delete(t), e && le.delete(e);
|
|
218
232
|
}, At = (e) => {
|
|
219
|
-
const t = Ft(e.backUrl);
|
|
233
|
+
const t = Ft(), s = Lt(e.backUrl);
|
|
220
234
|
return () => {
|
|
221
|
-
|
|
222
|
-
const
|
|
223
|
-
if (t.pos > 0) {
|
|
224
|
-
globalThis.history.go(-
|
|
235
|
+
Rt(e.backUrl);
|
|
236
|
+
const n = z - s.pos + 1, a = s.sourcePath, o = typeof a == "string" && a.length > 0 && !tt(a, s.basePath);
|
|
237
|
+
if (!t && s.pos > 0) {
|
|
238
|
+
globalThis.history.go(-n);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
if (o) {
|
|
242
|
+
q.navigate(a);
|
|
225
243
|
return;
|
|
226
244
|
}
|
|
227
|
-
e.backUrl &&
|
|
245
|
+
e.backUrl && q.navigate(e.backUrl);
|
|
228
246
|
};
|
|
229
247
|
};
|
|
230
|
-
class
|
|
248
|
+
class st extends S {
|
|
231
249
|
/**
|
|
232
250
|
* This will set the component context.
|
|
233
251
|
*
|
|
@@ -241,11 +259,11 @@ class tt extends S {
|
|
|
241
259
|
return s ? { data: s } : null;
|
|
242
260
|
}
|
|
243
261
|
}
|
|
244
|
-
const
|
|
262
|
+
const F = (e) => (
|
|
245
263
|
/** @type {VeilComponentConstructor} */
|
|
246
|
-
|
|
264
|
+
B(e, st)
|
|
247
265
|
);
|
|
248
|
-
class
|
|
266
|
+
class Ba extends st {
|
|
249
267
|
/**
|
|
250
268
|
* Declare public props and their defaults.
|
|
251
269
|
*/
|
|
@@ -279,10 +297,10 @@ class Pa extends tt {
|
|
|
279
297
|
const t = this.size, s = this.icon, n = this.activeIcon || this.icon, a = (() => {
|
|
280
298
|
if (this.dataKey) {
|
|
281
299
|
let r = `[[${this.dataKey}]]`;
|
|
282
|
-
return this.formatType === "number" ? r = W.number(r, "0") : this.formatType === "money" ? r = W.roundMoney(r) : this.formatType === "date" ? r = W.date(r) : this.formatType === "percent" && (r = W.percentage(r)),
|
|
300
|
+
return this.formatType === "number" ? r = W.number(r, "0") : this.formatType === "money" ? r = W.roundMoney(r) : this.formatType === "date" ? r = W.date(r) : this.formatType === "percent" && (r = W.percentage(r)), f({ class: "toggle-btn-value text-sm tabular-nums capitalize" }, r);
|
|
283
301
|
}
|
|
284
|
-
return this.value !== null && this.value !== void 0 ?
|
|
285
|
-
})(),
|
|
302
|
+
return this.value !== null && this.value !== void 0 ? f({ class: "toggle-btn-value text-sm tabular-nums" }, String(this.value)) : null;
|
|
303
|
+
})(), o = this.fill;
|
|
286
304
|
return v({
|
|
287
305
|
click: () => this.handleToggle(),
|
|
288
306
|
// @ts-ignore
|
|
@@ -290,13 +308,13 @@ class Pa extends tt {
|
|
|
290
308
|
}, [
|
|
291
309
|
M(
|
|
292
310
|
"active",
|
|
293
|
-
(r) => x({ size: t, variant: r &&
|
|
311
|
+
(r) => x({ size: t, variant: r && o ? "filled" : "outlined" }, r ? n : s)
|
|
294
312
|
),
|
|
295
313
|
a
|
|
296
314
|
]);
|
|
297
315
|
}
|
|
298
316
|
}
|
|
299
|
-
const
|
|
317
|
+
const ie = {
|
|
300
318
|
xs: "w-6 h-6",
|
|
301
319
|
sm: "w-8 h-8",
|
|
302
320
|
md: "w-10 h-10",
|
|
@@ -304,7 +322,7 @@ const re = {
|
|
|
304
322
|
xl: "w-14 h-14",
|
|
305
323
|
"2xl": "w-16 h-16"
|
|
306
324
|
};
|
|
307
|
-
class
|
|
325
|
+
class za extends S {
|
|
308
326
|
/**
|
|
309
327
|
* Declare public props.
|
|
310
328
|
*/
|
|
@@ -335,24 +353,24 @@ class Ba extends S {
|
|
|
335
353
|
* @returns {object}
|
|
336
354
|
*/
|
|
337
355
|
render() {
|
|
338
|
-
const t = this.icon, s = this.activeIcon || this.icon, n =
|
|
356
|
+
const t = this.icon, s = this.activeIcon || this.icon, n = ie[this.size] || ie.md, a = ["xs", "sm"].includes(this.size) ? "xs" : "sm", o = this.class ?? "bg-background/40 backdrop-blur-sm", r = "text-foreground", c = this.activeClass || r, u = this.circle ?? !1, h = this.fill;
|
|
339
357
|
return v({
|
|
340
358
|
click: () => this.handleToggle(),
|
|
341
359
|
// @ts-ignore
|
|
342
|
-
class: `circle-toggle-btn inline-flex items-center justify-center rounded-full border-0 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 ${n} ${
|
|
360
|
+
class: `circle-toggle-btn inline-flex items-center justify-center rounded-full border-0 cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 ${n} ${o}${u ? " rounded-full w-[40px] h-[40px] max-w-[40px]" : ""}`
|
|
343
361
|
}, [
|
|
344
|
-
M("active", (
|
|
362
|
+
M("active", (y) => [
|
|
345
363
|
x({
|
|
346
364
|
size: a,
|
|
347
|
-
variant:
|
|
348
|
-
class: `transition-colors ${
|
|
349
|
-
},
|
|
365
|
+
variant: y && h ? "filled" : "outlined",
|
|
366
|
+
class: `transition-colors ${y ? c : r}`
|
|
367
|
+
}, y ? s : t)
|
|
350
368
|
])
|
|
351
369
|
]);
|
|
352
370
|
}
|
|
353
371
|
}
|
|
354
|
-
const
|
|
355
|
-
const s = e.size || "md", n =
|
|
372
|
+
const Oa = i((e, t) => {
|
|
373
|
+
const s = e.size || "md", n = ie[s] || ie.md, a = ["xs", "sm"].includes(s) ? "xs" : "sm";
|
|
356
374
|
return v({
|
|
357
375
|
...e,
|
|
358
376
|
// @ts-ignore
|
|
@@ -362,12 +380,12 @@ const za = i((e, t) => {
|
|
|
362
380
|
e.icon ? x({ size: a }, e.icon) : null,
|
|
363
381
|
...t || []
|
|
364
382
|
]);
|
|
365
|
-
}),
|
|
383
|
+
}), E = (e) => i((t, s) => v({
|
|
366
384
|
...e,
|
|
367
385
|
...t,
|
|
368
386
|
// @ts-ignore
|
|
369
387
|
class: `bttn ${e.class} ${t.class || ""}`
|
|
370
|
-
}, s)),
|
|
388
|
+
}, s)), nt = i(
|
|
371
389
|
(e, t) => v({
|
|
372
390
|
...e,
|
|
373
391
|
// @ts-ignore
|
|
@@ -379,15 +397,15 @@ const za = i((e, t) => {
|
|
|
379
397
|
// @ts-ignore
|
|
380
398
|
e.icon && e.position === "right" ? x({ size: e.size || "sm", class: e.animation ?? null }, e.icon) : null
|
|
381
399
|
])
|
|
382
|
-
), Ne = (e) => i((t, s) =>
|
|
400
|
+
), Ne = (e) => i((t, s) => nt({
|
|
383
401
|
...e,
|
|
384
402
|
...t,
|
|
385
403
|
// @ts-ignore
|
|
386
404
|
class: `bttn ${e.class} ${t.class || ""}`
|
|
387
|
-
}, s)),
|
|
405
|
+
}, s)), jt = (e) => i((t, s) => (t.icon = t.icon || g.arrows.left, t.click = t.click || At(t), nt({
|
|
388
406
|
...e,
|
|
389
407
|
...t
|
|
390
|
-
}, s))),
|
|
408
|
+
}, s))), Et = i((e, t) => {
|
|
391
409
|
const s = e.size || "md", n = {
|
|
392
410
|
xs: "w-6 h-6",
|
|
393
411
|
sm: "w-8 h-8",
|
|
@@ -405,48 +423,48 @@ const za = i((e, t) => {
|
|
|
405
423
|
...t || []
|
|
406
424
|
]);
|
|
407
425
|
}), Fe = {
|
|
408
|
-
primary:
|
|
409
|
-
secondary:
|
|
410
|
-
destructive:
|
|
411
|
-
warning:
|
|
412
|
-
outline:
|
|
413
|
-
ghost:
|
|
414
|
-
link:
|
|
426
|
+
primary: E({ class: "primary" }),
|
|
427
|
+
secondary: E({ class: "secondary" }),
|
|
428
|
+
destructive: E({ class: "destructive" }),
|
|
429
|
+
warning: E({ class: "warning" }),
|
|
430
|
+
outline: E({ class: "outline" }),
|
|
431
|
+
ghost: E({ class: "ghost" }),
|
|
432
|
+
link: E({ class: "link" }),
|
|
415
433
|
icon: Ne({ class: "icon" }),
|
|
416
434
|
withIcon: Ne({ class: "with-icon" }),
|
|
417
|
-
back:
|
|
418
|
-
circleIcon:
|
|
419
|
-
}, b = i((e, t) => (Fe[e.variant] || Fe.primary)(e, t)),
|
|
435
|
+
back: jt({ class: "with-icon back-button" }),
|
|
436
|
+
circleIcon: Et
|
|
437
|
+
}, b = i((e, t) => (Fe[e.variant] || Fe.primary)(e, t)), Na = i((e, t) => b({ ...e, variant: "withIcon", icon: g.loading, animation: "animate-spin" }, t)), _t = i((e, t) => {
|
|
420
438
|
const s = e.margin ?? "my-5 mx-5", n = e.padding ?? "p-4", a = e.border ?? "border-border";
|
|
421
|
-
return e.hover && (e.class += " hover:shadow-lg hover:bg-muted/50"),
|
|
439
|
+
return e.hover && (e.class += " hover:shadow-lg hover:bg-muted/50"), l({
|
|
422
440
|
...e,
|
|
423
441
|
// @ts-ignore
|
|
424
442
|
class: `rounded-lg ${a} bg-card text-card-foreground shadow-md min-w-[120px] min-h-[80px] ${s} ${n} ${e.class || ""}`
|
|
425
443
|
}, t);
|
|
426
|
-
}), Ht = i((e, t) =>
|
|
444
|
+
}), Ht = i((e, t) => mt({
|
|
427
445
|
...e,
|
|
428
446
|
// @ts-ignore
|
|
429
447
|
class: ` font-medium -mt-4 -mx-1 px-2 py-2 ${e.class || ""}`
|
|
430
|
-
}, t)),
|
|
448
|
+
}, t)), Fa = i((e, t) => {
|
|
431
449
|
const s = e.border === "full" ? "border rounded-md" : "border-t";
|
|
432
|
-
return
|
|
450
|
+
return bt({
|
|
433
451
|
...e,
|
|
434
452
|
// @ts-ignore
|
|
435
453
|
class: `p-6 ${s} ${e.class || ""}`
|
|
436
454
|
}, [
|
|
437
455
|
// @ts-ignore
|
|
438
456
|
e.legend && Ht(e.legend),
|
|
439
|
-
|
|
457
|
+
l({ class: "flex flex-auto flex-col gap-y-6" }, t)
|
|
440
458
|
]);
|
|
441
|
-
}),
|
|
459
|
+
}), Ut = i((e, t) => {
|
|
442
460
|
const s = e.border === !0 ? "border-t" : "";
|
|
443
|
-
return
|
|
461
|
+
return l({
|
|
444
462
|
...e,
|
|
445
463
|
// @ts-ignore
|
|
446
464
|
class: `grid grid-cols-1 gap-y-4 sm:grid-cols-[1fr_2fr] sm:gap-x-6 pt-8 ${s} ${e.class || ""}`
|
|
447
465
|
}, [
|
|
448
466
|
// @ts-ignore
|
|
449
|
-
e.label &&
|
|
467
|
+
e.label && l({
|
|
450
468
|
// @ts-ignore
|
|
451
469
|
...e.labelProps,
|
|
452
470
|
// @ts-ignore
|
|
@@ -458,9 +476,9 @@ const za = i((e, t) => {
|
|
|
458
476
|
e.description && k({ class: "text-sm text-muted-foreground" }, e.description)
|
|
459
477
|
]),
|
|
460
478
|
// Controls container: grows to fill remaining space, spacing between items
|
|
461
|
-
|
|
479
|
+
l({ class: "flex flex-col gap-y-4" }, t)
|
|
462
480
|
]);
|
|
463
|
-
}),
|
|
481
|
+
}), Yt = "flex h-10 w-full px-3 py-2 text-sm", D = "rounded-md border border-border bg-input", $ = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background", C = "disabled:cursor-not-allowed disabled:opacity-50 [&:user-invalid]:border-destructive", V = "placeholder:text-muted-foreground", Ce = `${Yt} ${D} ${$} ${V} ${C}`, Vt = ({ id: e, checked: t, bind: s, required: n }) => me({
|
|
464
482
|
id: e,
|
|
465
483
|
cache: "checkbox",
|
|
466
484
|
class: "absolute opacity-0 w-full h-full cursor-pointer pointer-events-none",
|
|
@@ -470,15 +488,15 @@ const za = i((e, t) => {
|
|
|
470
488
|
required: n,
|
|
471
489
|
checked: t,
|
|
472
490
|
bind: s
|
|
473
|
-
}), Wt = () =>
|
|
491
|
+
}), Wt = () => f({ class: "absolute text-xs pointer-events-none" }, [
|
|
474
492
|
M(
|
|
475
493
|
"checked",
|
|
476
|
-
(e) => e ?
|
|
494
|
+
(e) => e ? U({
|
|
477
495
|
class: "w-2 h-2 pointer-events-none",
|
|
478
|
-
html:
|
|
496
|
+
html: g.check
|
|
479
497
|
}) : null
|
|
480
498
|
)
|
|
481
|
-
]),
|
|
499
|
+
]), qt = ({ id: e, bind: t, checked: s, required: n, clickHandler: a }) => l({
|
|
482
500
|
class: `relative flex items-center justify-center w-5 h-5 transition-colors duration-200 hover:border-accent-foreground
|
|
483
501
|
rounded-md border
|
|
484
502
|
${$}
|
|
@@ -498,13 +516,13 @@ const za = i((e, t) => {
|
|
|
498
516
|
tabIndex: 0,
|
|
499
517
|
click: a
|
|
500
518
|
}, [
|
|
501
|
-
|
|
519
|
+
Vt({ bind: t, checked: s, id: e, required: n }),
|
|
502
520
|
Wt()
|
|
503
|
-
]),
|
|
521
|
+
]), Gt = ({ id: e, label: t, clickHandler: s }) => Y({
|
|
504
522
|
class: "text-base cursor-pointer",
|
|
505
523
|
htmlFor: e,
|
|
506
524
|
click: s
|
|
507
|
-
}, t),
|
|
525
|
+
}, t), Kt = B(
|
|
508
526
|
{
|
|
509
527
|
/**
|
|
510
528
|
* This will initialize the state of the checkbox.
|
|
@@ -542,8 +560,8 @@ const za = i((e, t) => {
|
|
|
542
560
|
*/
|
|
543
561
|
render() {
|
|
544
562
|
const e = this.getId(), t = (s) => this.clickHandler(s);
|
|
545
|
-
return
|
|
546
|
-
|
|
563
|
+
return l({ class: `flex items-center gap-x-2 cursor-pointer ${this.class || ""}` }, [
|
|
564
|
+
qt({
|
|
547
565
|
id: e,
|
|
548
566
|
// @ts-ignore
|
|
549
567
|
bind: this.bind,
|
|
@@ -555,38 +573,38 @@ const za = i((e, t) => {
|
|
|
555
573
|
clickHandler: t
|
|
556
574
|
}),
|
|
557
575
|
// @ts-ignore
|
|
558
|
-
this.label &&
|
|
576
|
+
this.label && Gt({ id: e, label: this.label, clickHandler: t })
|
|
559
577
|
]);
|
|
560
578
|
}
|
|
561
579
|
}
|
|
562
|
-
),
|
|
580
|
+
), Qt = (e) => {
|
|
563
581
|
if (!e || e.length === 0) return "";
|
|
564
582
|
const s = e.replace(/\D/g, "").match(/^(\d{0,3})(\d{0,3})(\d{0,4})$/);
|
|
565
583
|
return s ? s[2] ? `(${s[1]}) ${s[2]}${s[3] ? "-" + s[3] : ""}` : s[1] || "" : e;
|
|
566
|
-
},
|
|
567
|
-
const t = e.target, s =
|
|
584
|
+
}, Jt = (e) => {
|
|
585
|
+
const t = e.target, s = Qt(t.value);
|
|
568
586
|
s && (t.value = s);
|
|
569
|
-
},
|
|
587
|
+
}, Xt = [
|
|
570
588
|
"peer w-full h-14 px-3 pt-5 pb-1",
|
|
571
589
|
"text-base text-foreground",
|
|
572
590
|
D,
|
|
573
591
|
$,
|
|
574
592
|
C,
|
|
575
593
|
"placeholder-transparent"
|
|
576
|
-
].join(" "),
|
|
594
|
+
].join(" "), Zt = [
|
|
577
595
|
"peer w-full min-h-[120px] px-3 pt-6 pb-2",
|
|
578
596
|
"text-base text-foreground",
|
|
579
597
|
D,
|
|
580
598
|
$,
|
|
581
599
|
C,
|
|
582
600
|
"placeholder-transparent resize-y"
|
|
583
|
-
].join(" "),
|
|
601
|
+
].join(" "), es = [
|
|
584
602
|
"peer w-full h-14 px-3 pt-5 pb-1 pr-10",
|
|
585
603
|
"text-base text-foreground appearance-none",
|
|
586
604
|
D,
|
|
587
605
|
$,
|
|
588
606
|
C
|
|
589
|
-
].join(" "),
|
|
607
|
+
].join(" "), ts = [
|
|
590
608
|
"absolute left-3",
|
|
591
609
|
"text-foreground-secondary",
|
|
592
610
|
"transition-all duration-200",
|
|
@@ -597,7 +615,7 @@ const za = i((e, t) => {
|
|
|
597
615
|
"peer-[:placeholder-shown:not(:focus)]:top-1/2",
|
|
598
616
|
"peer-[:placeholder-shown:not(:focus)]:-translate-y-1/2",
|
|
599
617
|
"peer-[:placeholder-shown:not(:focus)]:text-base"
|
|
600
|
-
].join(" "),
|
|
618
|
+
].join(" "), ss = [
|
|
601
619
|
"absolute left-3",
|
|
602
620
|
"text-foreground-secondary",
|
|
603
621
|
"transition-all duration-200",
|
|
@@ -607,39 +625,39 @@ const za = i((e, t) => {
|
|
|
607
625
|
// Placeholder state (empty + not focused)
|
|
608
626
|
"peer-[:placeholder-shown:not(:focus)]:top-3.5",
|
|
609
627
|
"peer-[:placeholder-shown:not(:focus)]:text-base"
|
|
610
|
-
].join(" "),
|
|
628
|
+
].join(" "), ns = [
|
|
611
629
|
"absolute left-3 top-2",
|
|
612
630
|
"text-xs text-foreground-secondary",
|
|
613
631
|
"pointer-events-none select-none"
|
|
614
632
|
].join(" ");
|
|
615
|
-
let
|
|
616
|
-
const Se = (e) => e.id || e.name || `floating-${++
|
|
633
|
+
let as = 0;
|
|
634
|
+
const Se = (e) => e.id || e.name || `floating-${++as}`, $e = (e, t, s, n) => e ? Y(
|
|
617
635
|
{ htmlFor: s, class: n },
|
|
618
|
-
t ? [
|
|
619
|
-
) : null,
|
|
636
|
+
t ? [f(e), f({ class: "text-destructive ml-0.5" }, "*")] : e
|
|
637
|
+
) : null, os = () => U({
|
|
620
638
|
class: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none w-4 h-4 text-foreground-secondary",
|
|
621
|
-
html:
|
|
639
|
+
html: g.chevron.single.down
|
|
622
640
|
}), ne = i((e) => {
|
|
623
641
|
const t = Se(e);
|
|
624
|
-
return
|
|
642
|
+
return l({ class: "relative" }, [
|
|
625
643
|
p({
|
|
626
644
|
...e,
|
|
627
645
|
id: t,
|
|
628
646
|
placeholder: " ",
|
|
629
|
-
class: `${
|
|
647
|
+
class: `${Xt} ${e.class || ""}`.trim()
|
|
630
648
|
}),
|
|
631
|
-
$e(e.label, e.required, t,
|
|
649
|
+
$e(e.label, e.required, t, ts)
|
|
632
650
|
]);
|
|
633
|
-
}),
|
|
651
|
+
}), La = i(
|
|
634
652
|
(e) => ne({
|
|
635
653
|
...e,
|
|
636
654
|
type: "tel",
|
|
637
655
|
name: e.name || "Phone",
|
|
638
656
|
label: e.label || "Phone",
|
|
639
657
|
pattern: e.pattern || "\\(\\d{3}\\) \\d{3}-\\d{4}",
|
|
640
|
-
keyup:
|
|
658
|
+
keyup: Jt
|
|
641
659
|
})
|
|
642
|
-
),
|
|
660
|
+
), Ra = i(
|
|
643
661
|
(e) => ne({
|
|
644
662
|
...e,
|
|
645
663
|
type: "email",
|
|
@@ -653,56 +671,56 @@ const Se = (e) => e.id || e.name || `floating-${++ns}`, $e = (e, t, s, n) => e ?
|
|
|
653
671
|
name: e.name || "Password",
|
|
654
672
|
label: e.label || "Password"
|
|
655
673
|
})
|
|
656
|
-
),
|
|
674
|
+
), ja = i(
|
|
657
675
|
(e) => ne({
|
|
658
676
|
...e,
|
|
659
677
|
type: "number"
|
|
660
678
|
})
|
|
661
|
-
),
|
|
679
|
+
), Ea = i(
|
|
662
680
|
(e) => ne({
|
|
663
681
|
...e,
|
|
664
682
|
type: "url",
|
|
665
683
|
name: e.name || "Url",
|
|
666
684
|
label: e.label || "URL"
|
|
667
685
|
})
|
|
668
|
-
),
|
|
686
|
+
), _a = i((e) => {
|
|
669
687
|
const t = Se(e);
|
|
670
|
-
return
|
|
688
|
+
return l({ class: "relative" }, [
|
|
671
689
|
Qe({
|
|
672
690
|
...e,
|
|
673
691
|
id: t,
|
|
674
692
|
placeholder: " ",
|
|
675
|
-
class: `${
|
|
693
|
+
class: `${Zt} ${e.class || ""}`.trim()
|
|
676
694
|
}),
|
|
677
|
-
$e(e.label, e.required, t,
|
|
695
|
+
$e(e.label, e.required, t, ss)
|
|
678
696
|
]);
|
|
679
697
|
}), Ha = i((e) => {
|
|
680
698
|
const t = Se(e), { options: s, onCreated: n, ...a } = e;
|
|
681
|
-
return
|
|
699
|
+
return l({ class: "relative" }, [
|
|
682
700
|
{
|
|
683
701
|
tag: "select",
|
|
684
702
|
...a,
|
|
685
703
|
id: t,
|
|
686
|
-
class: `[&>option]:text-foreground [&>option]:bg-background ${
|
|
687
|
-
onCreated(
|
|
688
|
-
s && Ze.setupSelectOptions(
|
|
704
|
+
class: `[&>option]:text-foreground [&>option]:bg-background ${es} ${a.class || ""}`.trim(),
|
|
705
|
+
onCreated(o) {
|
|
706
|
+
s && Ze.setupSelectOptions(o, s), typeof n == "function" && n(o);
|
|
689
707
|
}
|
|
690
708
|
},
|
|
691
|
-
|
|
692
|
-
$e(e.label, e.required, t,
|
|
709
|
+
os(),
|
|
710
|
+
$e(e.label, e.required, t, ns)
|
|
693
711
|
]);
|
|
694
|
-
}),
|
|
712
|
+
}), ls = (e) => {
|
|
695
713
|
if (!e || e.length === 0) return "";
|
|
696
714
|
const s = e.replace(/\D/g, "").match(/^(\d{0,3})(\d{0,3})(\d{0,4})$/);
|
|
697
715
|
return s ? s[2] ? `(${s[1]}) ${s[2]}${s[3] ? "-" + s[3] : ""}` : s[1] || "" : e;
|
|
698
|
-
},
|
|
699
|
-
const t = e.target, s =
|
|
716
|
+
}, rs = (e) => {
|
|
717
|
+
const t = e.target, s = ls(t.value);
|
|
700
718
|
s && (t.value = s);
|
|
701
|
-
},
|
|
719
|
+
}, L = i((e) => p({
|
|
702
720
|
...e,
|
|
703
721
|
// @ts-ignore
|
|
704
722
|
class: `${Ce} ${e.class || ""}`.trim()
|
|
705
|
-
})),
|
|
723
|
+
})), Ua = i((e) => L({
|
|
706
724
|
...e,
|
|
707
725
|
type: "tel",
|
|
708
726
|
// @ts-ignore
|
|
@@ -712,8 +730,8 @@ const Se = (e) => e.id || e.name || `floating-${++ns}`, $e = (e, t, s, n) => e ?
|
|
|
712
730
|
placeholder: "(555) 555-5555",
|
|
713
731
|
// @ts-ignore
|
|
714
732
|
pattern: e.pattern || "\\(\\d{3}\\) \\d{3}-\\d{4}",
|
|
715
|
-
keyup:
|
|
716
|
-
})),
|
|
733
|
+
keyup: rs
|
|
734
|
+
})), Ya = i((e) => L({
|
|
717
735
|
...e,
|
|
718
736
|
type: "email",
|
|
719
737
|
// @ts-ignore
|
|
@@ -721,61 +739,61 @@ const Se = (e) => e.id || e.name || `floating-${++ns}`, $e = (e, t, s, n) => e ?
|
|
|
721
739
|
// @ts-ignore
|
|
722
740
|
label: e.label || "Email",
|
|
723
741
|
placeholder: "Email address"
|
|
724
|
-
})),
|
|
742
|
+
})), Va = i((e) => Qe({
|
|
725
743
|
...e,
|
|
726
744
|
as: "textarea",
|
|
727
745
|
// @ts-ignore
|
|
728
|
-
class: `flex w-full h-24 px-3 py-2 text-sm ${D} ${$} ${
|
|
729
|
-
})), Wa = (e = {}) =>
|
|
746
|
+
class: `flex w-full h-24 px-3 py-2 text-sm ${D} ${$} ${V} ${C} ${e.class || ""}`.trim()
|
|
747
|
+
})), Wa = (e = {}) => l({ class: "flex items-center gap-x-2" }, [
|
|
730
748
|
p({
|
|
731
749
|
...e,
|
|
732
750
|
type: "radio",
|
|
733
751
|
class: "cursor-pointer appearance-none h-4 w-4 border rounded-full checked:border-primary checked:bg-primary focus:ring focus:ring-primary".trim()
|
|
734
752
|
}),
|
|
735
|
-
e.label &&
|
|
736
|
-
]),
|
|
753
|
+
e.label && Y({ forHTML: e.value, class: "cursor-pointer" }, e.label)
|
|
754
|
+
]), qa = i((e) => p({
|
|
737
755
|
...e,
|
|
738
756
|
type: "date",
|
|
739
757
|
// @ts-ignore
|
|
740
|
-
class: `${D} ${$} ${
|
|
741
|
-
})),
|
|
758
|
+
class: `${D} ${$} ${V} ${C} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
759
|
+
})), Ga = i((e) => p({
|
|
742
760
|
...e,
|
|
743
761
|
type: "time",
|
|
744
762
|
// @ts-ignore
|
|
745
|
-
class: `${D} ${$} ${
|
|
746
|
-
})),
|
|
763
|
+
class: `${D} ${$} ${V} ${C} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
764
|
+
})), Ka = i((e) => p({
|
|
747
765
|
...e,
|
|
748
766
|
type: "datetime-local",
|
|
749
767
|
// @ts-ignore
|
|
750
|
-
class: `${D} ${$} ${
|
|
751
|
-
})),
|
|
768
|
+
class: `${D} ${$} ${V} ${C} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
769
|
+
})), Qa = i((e) => p({
|
|
752
770
|
...e,
|
|
753
771
|
type: "month",
|
|
754
772
|
// @ts-ignore
|
|
755
|
-
class: `${D} ${$} ${
|
|
756
|
-
})),
|
|
773
|
+
class: `${D} ${$} ${V} ${C} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
774
|
+
})), Ja = i((e) => p({
|
|
757
775
|
...e,
|
|
758
776
|
type: "week",
|
|
759
777
|
// @ts-ignore
|
|
760
|
-
class: `${D} ${$} ${
|
|
761
|
-
})),
|
|
778
|
+
class: `${D} ${$} ${V} ${C} px-3 py-2 text-sm ring-offset-background ${e.class || ""}`.trim()
|
|
779
|
+
})), Xa = i((e) => L({
|
|
762
780
|
...e,
|
|
763
781
|
type: "number"
|
|
764
|
-
})),
|
|
782
|
+
})), Za = i((e) => L({
|
|
765
783
|
...e,
|
|
766
784
|
type: "password"
|
|
767
785
|
}));
|
|
768
|
-
i((e) =>
|
|
786
|
+
i((e) => L({
|
|
769
787
|
...e,
|
|
770
788
|
type: "search"
|
|
771
789
|
}));
|
|
772
|
-
const
|
|
790
|
+
const eo = i((e) => L({
|
|
773
791
|
...e,
|
|
774
792
|
type: "url"
|
|
775
|
-
})),
|
|
793
|
+
})), to = i((e) => L({
|
|
776
794
|
...e,
|
|
777
795
|
type: "hidden"
|
|
778
|
-
})),
|
|
796
|
+
})), so = i((e) => p({
|
|
779
797
|
...e,
|
|
780
798
|
type: "color",
|
|
781
799
|
// @ts-ignore
|
|
@@ -786,12 +804,12 @@ i((e) => me({
|
|
|
786
804
|
// @ts-ignore
|
|
787
805
|
class: `flex h-4 w-4 text-foreground ${D} ${$} ${C} ${e.class || ""}`.trim()
|
|
788
806
|
}));
|
|
789
|
-
const
|
|
807
|
+
const is = "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", no = i((e) => p({
|
|
790
808
|
...e,
|
|
791
809
|
type: "file",
|
|
792
810
|
// @ts-ignore
|
|
793
|
-
class: `${Ce} ${
|
|
794
|
-
})),
|
|
811
|
+
class: `${Ce} ${is} ${e.class || ""}`.trim()
|
|
812
|
+
})), ao = F(
|
|
795
813
|
{
|
|
796
814
|
/**
|
|
797
815
|
* This will create the initial state of the RangeSlider.
|
|
@@ -821,17 +839,17 @@ const rs = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
821
839
|
* @returns {object}
|
|
822
840
|
*/
|
|
823
841
|
render() {
|
|
824
|
-
return
|
|
842
|
+
return l({ class: "relative w-full h-4 flex items-center" }, [
|
|
825
843
|
// Track
|
|
826
|
-
|
|
827
|
-
|
|
844
|
+
l({ class: "absolute h-2 w-full rounded-full bg-muted" }),
|
|
845
|
+
G(({ state: e }) => [
|
|
828
846
|
// Filled Track
|
|
829
|
-
|
|
847
|
+
l({
|
|
830
848
|
class: "absolute h-2 bg-primary rounded-full",
|
|
831
849
|
style: ["width: [[filledPercentage]]%", e]
|
|
832
850
|
}),
|
|
833
851
|
// Thumb
|
|
834
|
-
|
|
852
|
+
l({
|
|
835
853
|
class: `
|
|
836
854
|
absolute block h-5 w-5 rounded-full border-2 border-primary bg-background
|
|
837
855
|
ring-offset-background transition-colors focus-visible:outline-none
|
|
@@ -863,7 +881,7 @@ const rs = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
863
881
|
]);
|
|
864
882
|
}
|
|
865
883
|
}
|
|
866
|
-
),
|
|
884
|
+
), oo = i((e) => {
|
|
867
885
|
const { options: t, onCreated: s, ...n } = e;
|
|
868
886
|
return {
|
|
869
887
|
tag: "select",
|
|
@@ -873,20 +891,20 @@ const rs = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
873
891
|
...n,
|
|
874
892
|
class: `[&>option]:text-foreground [&>option]:bg-background ${Ce} ${n.class || ""}`.trim()
|
|
875
893
|
};
|
|
876
|
-
}),
|
|
894
|
+
}), cs = i(({ src: e, alt: t, class: s, checkPath: n = !0, loading: a = "lazy", decoding: o = "async", fetchPriority: r = "auto" }) => !e || (s = s || "", n && e.indexOf(".") === -1 && e.indexOf("[[") === -1) ? null : be({
|
|
877
895
|
class: `absolute w-full h-full object-cover fadeIn ${s}`,
|
|
878
896
|
src: e,
|
|
879
897
|
alt: t,
|
|
880
898
|
loading: a,
|
|
881
|
-
decoding:
|
|
899
|
+
decoding: o,
|
|
882
900
|
fetchPriority: r,
|
|
883
901
|
load: (c) => c.target.style.visibility = "visible",
|
|
884
902
|
/**
|
|
885
903
|
* If there's an error loading the image, hide it.
|
|
886
904
|
*/
|
|
887
905
|
error: (c) => c.target.style.visibility = "hidden"
|
|
888
|
-
})),
|
|
889
|
-
const s = e, n = 16, a = 2 * Math.PI * n,
|
|
906
|
+
})), ds = (e) => !e || isNaN(e) ? null : e, Le = (e, t) => {
|
|
907
|
+
const s = e, n = 16, a = 2 * Math.PI * n, o = s / 100 * a, r = `
|
|
890
908
|
<svg class="w-40 h-40 mx-auto" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
|
|
891
909
|
<!-- Background Circle -->
|
|
892
910
|
<circle
|
|
@@ -909,7 +927,7 @@ const rs = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
909
927
|
stroke-width="4"
|
|
910
928
|
class="stroke-primary"
|
|
911
929
|
stroke-dasharray="${a}"
|
|
912
|
-
stroke-dashoffset="${a -
|
|
930
|
+
stroke-dashoffset="${a - o}"
|
|
913
931
|
stroke-linecap="round"
|
|
914
932
|
class="${t}"
|
|
915
933
|
/>
|
|
@@ -924,24 +942,24 @@ const rs = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
924
942
|
</text>
|
|
925
943
|
</svg>
|
|
926
944
|
`;
|
|
927
|
-
return
|
|
945
|
+
return l({
|
|
928
946
|
class: "circle-graph text-inherit",
|
|
929
947
|
html: r
|
|
930
948
|
});
|
|
931
|
-
},
|
|
949
|
+
}, lo = i((e) => {
|
|
932
950
|
const t = e.progress || 0, s = e.class || "", n = Le(t, s);
|
|
933
|
-
return
|
|
951
|
+
return l({
|
|
934
952
|
class: "circle-graph-wrap",
|
|
935
953
|
onSet: [
|
|
936
954
|
// @ts-ignore
|
|
937
955
|
e.prop,
|
|
938
|
-
(a) => (a =
|
|
956
|
+
(a) => (a = ds(a), a ? Le(a, s) : n)
|
|
939
957
|
]
|
|
940
958
|
}, [n]);
|
|
941
|
-
}),
|
|
959
|
+
}), us = () => G(({ state: e }) => l({
|
|
942
960
|
class: "absolute h-full rounded-full bg-primary transition-all duration-300",
|
|
943
961
|
style: ["width: [[progress]]%;", e]
|
|
944
|
-
})),
|
|
962
|
+
})), ro = F(
|
|
945
963
|
{
|
|
946
964
|
/**
|
|
947
965
|
* This will render the progress bar component.
|
|
@@ -949,8 +967,8 @@ const rs = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
949
967
|
* @returns {object}
|
|
950
968
|
*/
|
|
951
969
|
render() {
|
|
952
|
-
return
|
|
953
|
-
|
|
970
|
+
return l({ class: "relative w-full h-4 rounded-full bg-muted" }, [
|
|
971
|
+
us()
|
|
954
972
|
]);
|
|
955
973
|
},
|
|
956
974
|
/**
|
|
@@ -993,49 +1011,49 @@ const rs = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
993
1011
|
e < 0 && (e = 0), e > 100 && (e = 100), this.state.progress = e;
|
|
994
1012
|
}
|
|
995
1013
|
}
|
|
996
|
-
),
|
|
1014
|
+
), io = i((e = {}) => {
|
|
997
1015
|
const {
|
|
998
1016
|
class: t = "",
|
|
999
1017
|
background: s = !0,
|
|
1000
1018
|
blur: n = !0,
|
|
1001
1019
|
backgroundClass: a = "bg-background/95",
|
|
1002
|
-
blurClass:
|
|
1020
|
+
blurClass: o = "backdrop-blur",
|
|
1003
1021
|
zIndexClass: r = "z-9999",
|
|
1004
1022
|
style: c = ""
|
|
1005
|
-
} = e,
|
|
1023
|
+
} = e, u = [
|
|
1006
1024
|
"sticky bottom-0 left-0 right-0 w-full",
|
|
1007
1025
|
r,
|
|
1008
1026
|
s ? a : "",
|
|
1009
|
-
n ?
|
|
1027
|
+
n ? o : "",
|
|
1010
1028
|
t
|
|
1011
|
-
].filter(Boolean).join(" "),
|
|
1012
|
-
return
|
|
1013
|
-
class:
|
|
1014
|
-
style:
|
|
1029
|
+
].filter(Boolean).join(" "), h = `height: env(safe-area-inset-bottom, 0px);${c ? ` ${c}` : ""}`;
|
|
1030
|
+
return l({
|
|
1031
|
+
class: u,
|
|
1032
|
+
style: h,
|
|
1015
1033
|
"aria-hidden": "true"
|
|
1016
1034
|
});
|
|
1017
|
-
}),
|
|
1035
|
+
}), co = i((e = {}) => {
|
|
1018
1036
|
const {
|
|
1019
1037
|
class: t = "",
|
|
1020
1038
|
background: s = !0,
|
|
1021
1039
|
blur: n = !0,
|
|
1022
1040
|
backgroundClass: a = "bg-background/95",
|
|
1023
|
-
blurClass:
|
|
1041
|
+
blurClass: o = "backdrop-blur",
|
|
1024
1042
|
zIndexClass: r = "z-9999",
|
|
1025
1043
|
style: c = ""
|
|
1026
|
-
} = e,
|
|
1044
|
+
} = e, u = [
|
|
1027
1045
|
"fixed top-0 left-0 right-0 w-full",
|
|
1028
1046
|
r,
|
|
1029
1047
|
s ? a : "",
|
|
1030
|
-
n ?
|
|
1048
|
+
n ? o : "",
|
|
1031
1049
|
t
|
|
1032
|
-
].filter(Boolean).join(" "),
|
|
1033
|
-
return
|
|
1034
|
-
class:
|
|
1035
|
-
style:
|
|
1050
|
+
].filter(Boolean).join(" "), h = `height: env(safe-area-inset-top, 0px);${c ? ` ${c}` : ""}`;
|
|
1051
|
+
return l({
|
|
1052
|
+
class: u,
|
|
1053
|
+
style: h,
|
|
1036
1054
|
"aria-hidden": "true"
|
|
1037
1055
|
});
|
|
1038
|
-
}),
|
|
1056
|
+
}), Re = {
|
|
1039
1057
|
top: "bottom-full left-1/2 transform -translate-x-1/2 mb-2",
|
|
1040
1058
|
"top-right": "bottom-full left-full transform -translate-x-1 mb-2",
|
|
1041
1059
|
"top-left": "bottom-full right-full transform translate-x-1 mb-2",
|
|
@@ -1044,19 +1062,19 @@ const rs = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
1044
1062
|
"bottom-left": "top-full right-full transform translate-x-1 mt-2",
|
|
1045
1063
|
left: "top-1/2 right-full transform -translate-y-1/2 mr-2",
|
|
1046
1064
|
right: "top-1/2 left-full transform -translate-y-1/2 ml-2"
|
|
1047
|
-
},
|
|
1048
|
-
const n =
|
|
1049
|
-
return Array.isArray(s) === !1 && (s = [s]),
|
|
1065
|
+
}, hs = (e) => Re[String(e)] || Re.top, uo = i(({ position: e = "top", content: t }, s) => {
|
|
1066
|
+
const n = hs(e);
|
|
1067
|
+
return Array.isArray(s) === !1 && (s = [s]), l({ class: "relative group inline-block" }, [
|
|
1050
1068
|
...s,
|
|
1051
1069
|
// Tooltip box
|
|
1052
|
-
|
|
1070
|
+
f({
|
|
1053
1071
|
class: `
|
|
1054
1072
|
absolute z-20 px-2 py-1 border text-sm bg-background rounded shadow-md opacity-0 whitespace-nowrap
|
|
1055
1073
|
group-hover:opacity-100 transition-opacity duration-200 ${n} pointer-events-none
|
|
1056
1074
|
`
|
|
1057
1075
|
}, t)
|
|
1058
1076
|
]);
|
|
1059
|
-
}),
|
|
1077
|
+
}), Ae = {
|
|
1060
1078
|
info: {
|
|
1061
1079
|
borderColor: "border-blue-500",
|
|
1062
1080
|
bgColor: "bg-muted/10",
|
|
@@ -1082,23 +1100,23 @@ const rs = "file:border-0 file:bg-transparent file:text-sm file:font-medium file
|
|
|
1082
1100
|
bgColor: "bg-muted/10",
|
|
1083
1101
|
iconColor: "text-muted-foreground"
|
|
1084
1102
|
}
|
|
1085
|
-
},
|
|
1103
|
+
}, fs = (e, t) => l({ class: `flex items-center justify-center h-6 w-6 mr-3 ${t}` }, [
|
|
1086
1104
|
x({ size: "sm" }, e)
|
|
1087
|
-
]),
|
|
1088
|
-
const { borderColor: a, bgColor:
|
|
1089
|
-
return
|
|
1105
|
+
]), gs = (e) => xt({ class: "font-semibold" }, e), ms = (e) => k({ class: "text-sm text-muted-foreground" }, e), ho = i(({ title: e, description: t, icon: s, type: n = "default" }) => {
|
|
1106
|
+
const { borderColor: a, bgColor: o, iconColor: r } = Ae[n] || Ae.default;
|
|
1107
|
+
return l({ class: `flex items-start p-4 border rounded-lg ${o} ${a}` }, [
|
|
1090
1108
|
// Icon and content
|
|
1091
|
-
s &&
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1109
|
+
s && fs(s, r),
|
|
1110
|
+
l({ class: "flex flex-col" }, [
|
|
1111
|
+
gs(e),
|
|
1112
|
+
ms(t)
|
|
1095
1113
|
])
|
|
1096
1114
|
]);
|
|
1097
|
-
}),
|
|
1098
|
-
const s = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, n = t.getBoundingClientRect(), a = 10,
|
|
1099
|
-
let c = s.left +
|
|
1100
|
-
const
|
|
1101
|
-
return c + n.width > globalThis.innerWidth && (c = globalThis.innerWidth - n.width - a),
|
|
1115
|
+
}), bs = (e, t) => {
|
|
1116
|
+
const s = e ? e.getBoundingClientRect() : { top: 0, bottom: 0, left: 0 }, n = t.getBoundingClientRect(), a = 10, o = globalThis.scrollX, r = globalThis.scrollY;
|
|
1117
|
+
let c = s.left + o, u = s.bottom + r;
|
|
1118
|
+
const h = globalThis.innerHeight - s.bottom, y = s.top;
|
|
1119
|
+
return c + n.width > globalThis.innerWidth && (c = globalThis.innerWidth - n.width - a), h < n.height && y > h ? u = s.top + r - n.height - a : h < n.height && (u = s.bottom + r - (n.height - h) - a), { x: c, y: u };
|
|
1102
1120
|
};
|
|
1103
1121
|
class ae extends S {
|
|
1104
1122
|
/**
|
|
@@ -1107,7 +1125,7 @@ class ae extends S {
|
|
|
1107
1125
|
* @returns {object}
|
|
1108
1126
|
*/
|
|
1109
1127
|
setData() {
|
|
1110
|
-
const t = this.parent.data || new
|
|
1128
|
+
const t = this.parent.data || new N();
|
|
1111
1129
|
return t.set({
|
|
1112
1130
|
position: { x: 0, y: 0 }
|
|
1113
1131
|
}), t;
|
|
@@ -1148,7 +1166,7 @@ class ae extends S {
|
|
|
1148
1166
|
*/
|
|
1149
1167
|
render() {
|
|
1150
1168
|
const t = this.getSize();
|
|
1151
|
-
return
|
|
1169
|
+
return l({
|
|
1152
1170
|
class: `absolute inset-auto fadeIn mt-2 rounded-md p-0 shadow-lg bg-popover min-h-12 backdrop:bg-transparent text-inherit r z-30 ${t}`,
|
|
1153
1171
|
popover: "manual",
|
|
1154
1172
|
toggle: (s, { state: n }) => s.newState === "closed" ? n.open = !1 : null,
|
|
@@ -1177,7 +1195,7 @@ class ae extends S {
|
|
|
1177
1195
|
* @returns {void}
|
|
1178
1196
|
*/
|
|
1179
1197
|
updatePosition() {
|
|
1180
|
-
const t = this.button ?? null, s = this.panel, n =
|
|
1198
|
+
const t = this.button ?? null, s = this.panel, n = bs(t, s);
|
|
1181
1199
|
this.data.position = n;
|
|
1182
1200
|
}
|
|
1183
1201
|
/**
|
|
@@ -1229,38 +1247,38 @@ class ae extends S {
|
|
|
1229
1247
|
this?.panel?.hidePopover();
|
|
1230
1248
|
}
|
|
1231
1249
|
}
|
|
1232
|
-
const
|
|
1250
|
+
const xs = i((e, t) => l({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t)), ps = i((e, t) => Y({ ...e, class: "flex auto text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" }, t)), ys = i((e, t) => k({ ...e, class: "text-sm text-muted-foreground italic" }, t)), ws = i((e, t) => k({ ...e, class: "text-sm text-destructive" }, t)), fo = i((e, t = []) => _t({ class: "flex flex-auto flex-col gap-y-0", margin: "m-0", padding: "p-0" }, [
|
|
1233
1251
|
// @ts-ignore
|
|
1234
1252
|
e.title && Z({ class: "text-lg font-semibold py-4 px-6" }, e.title),
|
|
1235
1253
|
// @ts-ignore
|
|
1236
1254
|
e.description && k({ class: "text-sm text-muted-foreground pb-4 px-6 max-w-[700px]" }, e.description),
|
|
1237
1255
|
...t
|
|
1238
|
-
])),
|
|
1256
|
+
])), go = i((e, t = []) => (
|
|
1239
1257
|
// @ts-ignore
|
|
1240
|
-
|
|
1241
|
-
|
|
1258
|
+
Ut({ label: e.label, description: e.description, class: "py-4 px-6", border: e.border }, [
|
|
1259
|
+
l({ class: "flex flex-col gap-y-6" }, t)
|
|
1242
1260
|
])
|
|
1243
|
-
)),
|
|
1261
|
+
)), mo = i((e, t = []) => {
|
|
1244
1262
|
const s = e.border ? "border-t" : "";
|
|
1245
|
-
return
|
|
1246
|
-
}),
|
|
1263
|
+
return l({ ...e, class: `flex flex-col pb-4 px-6 gap-y-4 ${s} ${e.class || ""}` }, t);
|
|
1264
|
+
}), vs = (e) => e.tag === "input" || e.tag === "select" || e.tag === "textarea", at = (e, t, s) => e.map((n) => !n || (n.children && n.children.length > 0 && (n.children = at(n.children, t, s)), !n.required) ? n : vs(n) ? {
|
|
1247
1265
|
...n,
|
|
1248
1266
|
aria: {
|
|
1249
1267
|
invalid: ["hasError"]
|
|
1250
1268
|
},
|
|
1251
1269
|
invalid: s,
|
|
1252
1270
|
input: t
|
|
1253
|
-
} : n),
|
|
1254
|
-
const a =
|
|
1255
|
-
|
|
1256
|
-
}, (
|
|
1257
|
-
e.setError(
|
|
1271
|
+
} : n), ks = i((e, t) => {
|
|
1272
|
+
const a = at(t, (o) => {
|
|
1273
|
+
o.target.checkValidity() && e.setError(null);
|
|
1274
|
+
}, (o) => {
|
|
1275
|
+
e.setError(o.target.validationMessage);
|
|
1258
1276
|
});
|
|
1259
|
-
return
|
|
1277
|
+
return l({
|
|
1260
1278
|
...e,
|
|
1261
1279
|
class: "w-full"
|
|
1262
1280
|
}, a);
|
|
1263
|
-
}),
|
|
1281
|
+
}), bo = F(
|
|
1264
1282
|
{
|
|
1265
1283
|
/**
|
|
1266
1284
|
* The initial state of the FormField.
|
|
@@ -1281,85 +1299,85 @@ const bs = i((e, t) => o({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
1281
1299
|
* @returns {object}
|
|
1282
1300
|
*/
|
|
1283
1301
|
render() {
|
|
1284
|
-
const e = this.name, t = this.getId(`${e}`), { label: s, description: n } = this, a = (
|
|
1285
|
-
this.state.error =
|
|
1302
|
+
const e = this.name, t = this.getId(`${e}`), { label: s, description: n } = this, a = (o) => {
|
|
1303
|
+
this.state.error = o, this.state.hasError = !!o;
|
|
1286
1304
|
};
|
|
1287
|
-
return
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1305
|
+
return l({ class: "flex flex-auto gap-y-4" }, [
|
|
1306
|
+
xs([
|
|
1307
|
+
ps({ htmlFor: t }, s),
|
|
1308
|
+
ks({
|
|
1291
1309
|
id: t,
|
|
1292
1310
|
name: e,
|
|
1293
1311
|
value: this.state.value,
|
|
1294
1312
|
setError: a
|
|
1295
1313
|
}, this.children),
|
|
1296
|
-
n &&
|
|
1297
|
-
|
|
1314
|
+
n && ys({ id: this.getId("description") }, n),
|
|
1315
|
+
l({ onState: ["error", (o) => o && ws(o)] })
|
|
1298
1316
|
])
|
|
1299
1317
|
]);
|
|
1300
1318
|
}
|
|
1301
1319
|
}
|
|
1302
|
-
),
|
|
1320
|
+
), Cs = (e, t, s = null) => {
|
|
1303
1321
|
e.target.checkValidity() && (e.preventDefault(), s && s(e, t));
|
|
1304
|
-
},
|
|
1322
|
+
}, ot = i(
|
|
1305
1323
|
(e, t) => (
|
|
1306
1324
|
// @ts-ignore
|
|
1307
|
-
|
|
1325
|
+
pt({ ...e, submit: (s, n) => Cs(s, n, e.submit), class: `w-full ${e.class ?? ""}` }, t)
|
|
1308
1326
|
)
|
|
1309
|
-
),
|
|
1327
|
+
), xo = i((e, t) => (
|
|
1310
1328
|
// @ts-ignore
|
|
1311
|
-
|
|
1312
|
-
)),
|
|
1329
|
+
l({ ...e, class: `flex flex-auto flex-col gap-y-6 p-4 md:p-6 divide-y ${e.class || ""}` }, t)
|
|
1330
|
+
)), po = i((e, t = []) => l({ class: "flex flex-col gap-y-3 py-4" }, [
|
|
1313
1331
|
// @ts-ignore
|
|
1314
1332
|
e.title && Z({ class: "font-semibold" }, e.title),
|
|
1315
1333
|
...t
|
|
1316
|
-
])),
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
]),
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
]),
|
|
1334
|
+
])), yo = (e, t) => l({ class: "flex justify-between" }, [
|
|
1335
|
+
f({ class: "text-muted-foreground" }, e),
|
|
1336
|
+
f(t)
|
|
1337
|
+
]), wo = (e, t) => l({ class: "flex" }, [
|
|
1338
|
+
f({ class: "text-muted-foreground mr-8 w-24 truncate text-nowrap" }, e),
|
|
1339
|
+
f(t)
|
|
1340
|
+
]), Ss = i(({ title: e, description: t, back: s, icon: n, options: a = [], titleCenter: o = !1 }) => ee({ class: "modal-header bg-background/80 backdrop-blur-md sticky flex flex-none items-center py-4 px-6 z-10 min-w-0" }, [
|
|
1323
1341
|
/**
|
|
1324
1342
|
* Back Button (Mobile Only)
|
|
1325
1343
|
*/
|
|
1326
1344
|
s && b({
|
|
1327
1345
|
variant: "icon",
|
|
1328
|
-
icon:
|
|
1346
|
+
icon: g.arrows.left,
|
|
1329
1347
|
class: "mr-2 p-0 flex sm:hidden",
|
|
1330
1348
|
click: (r, c) => c.close()
|
|
1331
1349
|
}),
|
|
1332
1350
|
/**
|
|
1333
1351
|
* Icon Container
|
|
1334
1352
|
*/
|
|
1335
|
-
n &&
|
|
1353
|
+
n && l({ class: "mr-2 w-12 h-12 rounded-full bg-muted flex flex-none items-center justify-center" }, [
|
|
1336
1354
|
x({ size: "md" }, n)
|
|
1337
1355
|
]),
|
|
1338
|
-
|
|
1339
|
-
|
|
1356
|
+
l({ class: "flex flex-auto flex-row justify-between ml-2 gap-2 min-w-0" }, [
|
|
1357
|
+
l({ class: `flex flex-auto flex-col min-w-0 ${o ? "items-center" : ""}` }, [
|
|
1340
1358
|
Z({ class: "text-lg font-semibold m-0 truncate" }, e),
|
|
1341
|
-
t &&
|
|
1359
|
+
t && l({ class: "text-sm text-muted-foreground truncate" }, t)
|
|
1342
1360
|
]),
|
|
1343
|
-
|
|
1361
|
+
l({ class: "flex flex-none items-center gap-2" }, a)
|
|
1344
1362
|
])
|
|
1345
|
-
])),
|
|
1363
|
+
])), vo = i((e, t) => {
|
|
1346
1364
|
const s = e.class?.includes("drawer");
|
|
1347
|
-
return
|
|
1365
|
+
return l({
|
|
1348
1366
|
popover: "manual",
|
|
1349
1367
|
// @ts-ignore
|
|
1350
1368
|
class: `modal ${s ? "" : "m-auto top-0 right-0 bottom-0 left-0"} ${s ? "" : "h-full max-h-screen"} fixed z-20 grid w-full gap-2 lg:border bg-background text-foreground shadow-xl wrap-break-words p-0 overflow-y-auto overscroll-y-contain ${e.class}`,
|
|
1351
|
-
click: (
|
|
1352
|
-
|
|
1369
|
+
click: (o, r) => {
|
|
1370
|
+
o.target === r.panel && (o.preventDefault(), o.stopPropagation(), r.state.open = !1);
|
|
1353
1371
|
}
|
|
1354
1372
|
}, [
|
|
1355
|
-
|
|
1373
|
+
ot({
|
|
1356
1374
|
class: "modal-content relative bg-background z-1 flex flex-auto flex-col gap-y-4 min-w-0",
|
|
1357
1375
|
// @ts-ignore
|
|
1358
|
-
submit: (
|
|
1376
|
+
submit: (o, r) => e.onSubmit && e.onSubmit(r),
|
|
1359
1377
|
cache: "modalContent"
|
|
1360
1378
|
}, [
|
|
1361
|
-
|
|
1362
|
-
|
|
1379
|
+
Ss(e),
|
|
1380
|
+
l({ class: "modal-body flex grow flex-col py-0 px-6 z-0", cache: "modalBody" }, t),
|
|
1363
1381
|
// @ts-ignore
|
|
1364
1382
|
!e.hideFooter && xe({ class: "modal-footer sticky bottom-0 bg-background/80 backdrop-blur-md flex flex-none justify-between py-4 px-6 z-10" }, e.buttons)
|
|
1365
1383
|
])
|
|
@@ -1390,22 +1408,22 @@ const bs = i((e, t) => o({ ...e, class: "flex flex-auto flex-col gap-y-2" }, t))
|
|
|
1390
1408
|
borderColor: "border",
|
|
1391
1409
|
iconColor: "text-muted-foreground"
|
|
1392
1410
|
}
|
|
1393
|
-
},
|
|
1411
|
+
}, $s = (e) => ee({ class: "flex justify-center" }, [
|
|
1394
1412
|
pe({ class: "text-lg font-bold mb-0" }, e)
|
|
1395
|
-
]),
|
|
1413
|
+
]), Ds = i(({ href: e, class: t }, s) => Je({
|
|
1396
1414
|
class: `bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
|
|
1397
1415
|
href: e,
|
|
1398
1416
|
animateIn: "pullRightIn",
|
|
1399
1417
|
animateOut: "pullRight",
|
|
1400
1418
|
role: "alert"
|
|
1401
|
-
}, s)),
|
|
1419
|
+
}, s)), Is = i(({ close: e, class: t }, s) => l({
|
|
1402
1420
|
class: `pullRightIn bg-popover text-popover-foreground relative flex flex-auto flex-col justify-start shadow-lg pointer-events-auto p-4 border rounded-md min-w-[340px] max-w-[450px] mt-4 ${t}`,
|
|
1403
1421
|
click: () => e(),
|
|
1404
1422
|
animateIn: "pullRightIn",
|
|
1405
1423
|
animateOut: "pullRight",
|
|
1406
1424
|
role: "alert"
|
|
1407
1425
|
}, s));
|
|
1408
|
-
class
|
|
1426
|
+
class ko extends S {
|
|
1409
1427
|
/**
|
|
1410
1428
|
* This will declare the props for the compiler.
|
|
1411
1429
|
*
|
|
@@ -1428,14 +1446,14 @@ class vo extends S {
|
|
|
1428
1446
|
* @returns {object}
|
|
1429
1447
|
*/
|
|
1430
1448
|
render() {
|
|
1431
|
-
const { bgColor: t, borderColor: s, iconColor: n } = this.getTypeStyles(), a = this.href || null,
|
|
1432
|
-
return a ?
|
|
1449
|
+
const { bgColor: t, borderColor: s, iconColor: n } = this.getTypeStyles(), a = this.href || null, o = this.getChildren(n);
|
|
1450
|
+
return a ? Ds({
|
|
1433
1451
|
href: a,
|
|
1434
1452
|
class: `${t} ${s}`
|
|
1435
|
-
},
|
|
1453
|
+
}, o) : Is({
|
|
1436
1454
|
close: this.close.bind(this),
|
|
1437
1455
|
class: `${t} ${s}`
|
|
1438
|
-
},
|
|
1456
|
+
}, o);
|
|
1439
1457
|
}
|
|
1440
1458
|
/**
|
|
1441
1459
|
* This will be called after the component is set up.
|
|
@@ -1444,7 +1462,7 @@ class vo extends S {
|
|
|
1444
1462
|
*/
|
|
1445
1463
|
afterSetup() {
|
|
1446
1464
|
const t = this.duration;
|
|
1447
|
-
t !== "infinite" && (this.timer = new
|
|
1465
|
+
t !== "infinite" && (this.timer = new $t(t, this.close.bind(this)), this.timer.start());
|
|
1448
1466
|
}
|
|
1449
1467
|
/**
|
|
1450
1468
|
* This will get the style properties based on the notification type.
|
|
@@ -1462,7 +1480,7 @@ class vo extends S {
|
|
|
1462
1480
|
*/
|
|
1463
1481
|
getButtons() {
|
|
1464
1482
|
return [
|
|
1465
|
-
|
|
1483
|
+
l({ class: "flex flex-row mt-6 gap-2" }, [
|
|
1466
1484
|
this.secondary && b({ variant: "outline", click: () => this.secondaryAction && this.secondaryAction() }, this.secondary),
|
|
1467
1485
|
this.primary && b({ click: () => this.primaryAction && this.primaryAction() }, this.primary)
|
|
1468
1486
|
])
|
|
@@ -1476,13 +1494,13 @@ class vo extends S {
|
|
|
1476
1494
|
*/
|
|
1477
1495
|
getChildren(t) {
|
|
1478
1496
|
return [
|
|
1479
|
-
|
|
1480
|
-
this.icon &&
|
|
1497
|
+
l({ class: "flex items-start" }, [
|
|
1498
|
+
this.icon && l({ class: `mr-4 ${t}` }, [
|
|
1481
1499
|
x({ size: "md" }, this.icon)
|
|
1482
1500
|
]),
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
this.title &&
|
|
1501
|
+
l({ class: "flex flex-auto flex-col" }, [
|
|
1502
|
+
l({ class: "flex flex-auto flex-row items-center w-full pr-12" }, [
|
|
1503
|
+
this.title && $s(this.title)
|
|
1486
1504
|
]),
|
|
1487
1505
|
k({ class: "text-base text-muted-foreground m-0 pr-12" }, this.description),
|
|
1488
1506
|
(this.primary || this.secondary) && xe({ class: "margin-top-24 flex align-center" }, this.getButtons())
|
|
@@ -1491,7 +1509,7 @@ class vo extends S {
|
|
|
1491
1509
|
b({
|
|
1492
1510
|
class: "absolute top-[12px] right-[12px]",
|
|
1493
1511
|
variant: "icon",
|
|
1494
|
-
icon:
|
|
1512
|
+
icon: g.x,
|
|
1495
1513
|
click: this.close.bind(this)
|
|
1496
1514
|
})
|
|
1497
1515
|
];
|
|
@@ -1506,17 +1524,17 @@ class vo extends S {
|
|
|
1506
1524
|
t && t.stopPropagation(), this.duration !== "infinite" && this.timer.stop(), this.onClick && this.onClick(), this.destroy();
|
|
1507
1525
|
}
|
|
1508
1526
|
}
|
|
1509
|
-
const Ee = globalThis.matchMedia,
|
|
1527
|
+
const Ee = globalThis.matchMedia, ce = i(({ value: e, label: t, icon: s }) => v({
|
|
1510
1528
|
class: 'text-sm gap-1 font-medium leading-none disabled:cursor-not-allowed disabled:opacity-70 flex flex-col items-center justify-between rounded-md border-2 bg-popover p-4 hover:bg-accent hover:text-accent-foreground data-[state="active"]:border-primary [&:has([data-state="active"])]:border-primary',
|
|
1511
1529
|
onState: ["method", { active: e }],
|
|
1512
1530
|
dataSet: ["method", ["state", e, "active"]],
|
|
1513
1531
|
click: (n, { state: a }) => {
|
|
1514
|
-
a.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"),
|
|
1532
|
+
a.method = e, localStorage.setItem("theme", e), e === "system" && localStorage.removeItem("theme"), Ts(e);
|
|
1515
1533
|
}
|
|
1516
1534
|
}, [
|
|
1517
1535
|
x({}, s),
|
|
1518
|
-
|
|
1519
|
-
])),
|
|
1536
|
+
f(t)
|
|
1537
|
+
])), Ts = (e) => {
|
|
1520
1538
|
const t = document.documentElement;
|
|
1521
1539
|
if (e === "system" && (e = globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"), Ee && !Ee("(prefers-color-scheme: " + e + ")").matches) {
|
|
1522
1540
|
t.classList.add(e);
|
|
@@ -1524,7 +1542,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1524
1542
|
}
|
|
1525
1543
|
const s = e === "light" ? "dark" : "light";
|
|
1526
1544
|
t.classList.remove(s);
|
|
1527
|
-
},
|
|
1545
|
+
}, Co = B(
|
|
1528
1546
|
{
|
|
1529
1547
|
/**
|
|
1530
1548
|
* This will render the component.
|
|
@@ -1532,11 +1550,11 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1532
1550
|
* @returns {object}
|
|
1533
1551
|
*/
|
|
1534
1552
|
render() {
|
|
1535
|
-
return
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1553
|
+
return l({ class: "flex flex-auto flex-col" }, [
|
|
1554
|
+
l({ class: "grid grid-cols-3 gap-4" }, [
|
|
1555
|
+
ce({ label: "System", value: "system", icon: g.adjustments.horizontal }),
|
|
1556
|
+
ce({ label: "Light", value: "light", icon: g.sun }),
|
|
1557
|
+
ce({ label: "Dark", value: "dark", icon: g.moon })
|
|
1540
1558
|
])
|
|
1541
1559
|
]);
|
|
1542
1560
|
},
|
|
@@ -1551,7 +1569,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1551
1569
|
};
|
|
1552
1570
|
}
|
|
1553
1571
|
}
|
|
1554
|
-
),
|
|
1572
|
+
), So = F(
|
|
1555
1573
|
{
|
|
1556
1574
|
/**
|
|
1557
1575
|
* The initial state of the Toggle.
|
|
@@ -1596,20 +1614,20 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1596
1614
|
bind: this.bind,
|
|
1597
1615
|
required: this.required
|
|
1598
1616
|
}),
|
|
1599
|
-
|
|
1617
|
+
f({
|
|
1600
1618
|
class: "absolute h-5 w-5 bg-background rounded-full shadow-md transform transition-transform",
|
|
1601
1619
|
onState: ["active", { "translate-x-[22px]": !0, "translate-x-[2px]": !1 }]
|
|
1602
1620
|
})
|
|
1603
1621
|
]);
|
|
1604
1622
|
}
|
|
1605
1623
|
}
|
|
1606
|
-
),
|
|
1624
|
+
), Ps = i(({ src: e, alt: t }) => !e || e.indexOf(".") === -1 && e.indexOf("[[") === -1 ? null : cs({
|
|
1607
1625
|
src: e,
|
|
1608
1626
|
alt: t,
|
|
1609
1627
|
class: "rounded-full"
|
|
1610
|
-
})), Ms = (e) => e && (Array.isArray(e) && (e = e.join(" ")), typeof e != "string" && (e = String(e)), e.split(" ").map((t) => t.charAt(0)).join("").toUpperCase()),
|
|
1611
|
-
s.textContent =
|
|
1612
|
-
}]),
|
|
1628
|
+
})), Ms = (e) => e && (Array.isArray(e) && (e = e.join(" ")), typeof e != "string" && (e = String(e)), e.split(" ").map((t) => t.charAt(0)).join("").toUpperCase()), lt = (e) => !e || e.length < 2 ? e : Ms(e), Bs = (e) => f([e, (t, s) => {
|
|
1629
|
+
s.textContent = lt(t);
|
|
1630
|
+
}]), _e = {
|
|
1613
1631
|
xs: "h-6 w-6",
|
|
1614
1632
|
sm: "h-8 w-8",
|
|
1615
1633
|
md: "h-12 w-12",
|
|
@@ -1619,7 +1637,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1619
1637
|
"3xl": "h-48 w-48",
|
|
1620
1638
|
"4xl": "h-64 w-64",
|
|
1621
1639
|
default: "h-12 w-12"
|
|
1622
|
-
},
|
|
1640
|
+
}, He = {
|
|
1623
1641
|
xs: "text-[7px]",
|
|
1624
1642
|
sm: "text-xs",
|
|
1625
1643
|
md: "text-base",
|
|
@@ -1629,9 +1647,9 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1629
1647
|
"3xl": "text-4xl",
|
|
1630
1648
|
"4xl": "text-5xl",
|
|
1631
1649
|
default: "text-base"
|
|
1632
|
-
},
|
|
1633
|
-
const n =
|
|
1634
|
-
return
|
|
1650
|
+
}, zs = (e) => _e[e] || _e.default, Os = (e) => He[e] || He.default, Ns = (e, t = null, s = "md") => {
|
|
1651
|
+
const n = lt(String(e)), a = Os(s);
|
|
1652
|
+
return l(
|
|
1635
1653
|
{
|
|
1636
1654
|
class: `
|
|
1637
1655
|
flex items-center justify-center w-full h-full rounded-full
|
|
@@ -1640,21 +1658,21 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1640
1658
|
`
|
|
1641
1659
|
},
|
|
1642
1660
|
[
|
|
1643
|
-
t ?
|
|
1661
|
+
t ? Bs(t) : f({ class: "uppercase" }, n)
|
|
1644
1662
|
]
|
|
1645
1663
|
);
|
|
1646
|
-
},
|
|
1647
|
-
const
|
|
1648
|
-
return
|
|
1664
|
+
}, Fs = i(({ src: e, alt: t, fallbackText: s, watcherFallback: n, size: a }) => {
|
|
1665
|
+
const o = zs(a);
|
|
1666
|
+
return l(
|
|
1649
1667
|
{
|
|
1650
|
-
class: `relative flex items-center justify-center ${
|
|
1668
|
+
class: `relative flex items-center justify-center ${o}`
|
|
1651
1669
|
},
|
|
1652
1670
|
[
|
|
1653
|
-
|
|
1654
|
-
|
|
1671
|
+
Ps({ src: e, alt: t }),
|
|
1672
|
+
Ns(s, n, a)
|
|
1655
1673
|
]
|
|
1656
1674
|
);
|
|
1657
|
-
}), Ue = (e) => !e || e.includes("[[") || e.indexOf(".") === -1 && e.indexOf("blob:") === -1,
|
|
1675
|
+
}), Ue = (e) => !e || e.includes("[[") || e.indexOf(".") === -1 && e.indexOf("blob:") === -1, $o = B(
|
|
1658
1676
|
{
|
|
1659
1677
|
/**
|
|
1660
1678
|
* Get the initial state for the component.
|
|
@@ -1674,7 +1692,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1674
1692
|
*/
|
|
1675
1693
|
openFileBrowse() {
|
|
1676
1694
|
const e = this.input;
|
|
1677
|
-
e && (e.value = "",
|
|
1695
|
+
e && (e.value = "", H.trigger("click", e));
|
|
1678
1696
|
},
|
|
1679
1697
|
/**
|
|
1680
1698
|
* Get the URL for the uploaded file.
|
|
@@ -1692,7 +1710,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1692
1710
|
*/
|
|
1693
1711
|
render() {
|
|
1694
1712
|
const e = "image-upload", t = this.onChange || null;
|
|
1695
|
-
return
|
|
1713
|
+
return l({ class: "flex-none items-center" }, [
|
|
1696
1714
|
p({
|
|
1697
1715
|
id: e,
|
|
1698
1716
|
cache: "input",
|
|
@@ -1704,18 +1722,18 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1704
1722
|
n && t && (this.state.loaded = !1, t(n, this.parent), this.src = this.getFileUrl(n), this.state.loaded = !0);
|
|
1705
1723
|
}
|
|
1706
1724
|
}),
|
|
1707
|
-
|
|
1725
|
+
l({
|
|
1708
1726
|
class: "relative w-32 h-32 rounded-full border flex items-center justify-center cursor-pointer hover:bg-muted transition-colors duration-150 overflow-hidden group",
|
|
1709
1727
|
click: (s) => {
|
|
1710
1728
|
s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
|
|
1711
1729
|
}
|
|
1712
1730
|
}, [
|
|
1713
|
-
M("loaded", (s) => s === !1 || Ue(this.src) ?
|
|
1731
|
+
M("loaded", (s) => s === !1 || Ue(this.src) ? Y({
|
|
1714
1732
|
htmlFor: e,
|
|
1715
1733
|
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
|
|
1716
1734
|
}, [
|
|
1717
|
-
|
|
1718
|
-
|
|
1735
|
+
ge(g.upload),
|
|
1736
|
+
l("Upload Image")
|
|
1719
1737
|
]) : be({
|
|
1720
1738
|
// @ts-ignore
|
|
1721
1739
|
src: this.src,
|
|
@@ -1725,7 +1743,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1725
1743
|
]);
|
|
1726
1744
|
}
|
|
1727
1745
|
}
|
|
1728
|
-
),
|
|
1746
|
+
), Do = B(
|
|
1729
1747
|
{
|
|
1730
1748
|
/**
|
|
1731
1749
|
* Get the initial state for the component.
|
|
@@ -1745,7 +1763,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1745
1763
|
*/
|
|
1746
1764
|
openFileBrowse() {
|
|
1747
1765
|
const e = this.input;
|
|
1748
|
-
e && (e.value = "",
|
|
1766
|
+
e && (e.value = "", H.trigger("click", e));
|
|
1749
1767
|
},
|
|
1750
1768
|
/**
|
|
1751
1769
|
* Get the URL for the uploaded file.
|
|
@@ -1763,7 +1781,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1763
1781
|
*/
|
|
1764
1782
|
render() {
|
|
1765
1783
|
const e = "logo-upload", t = this.onChange || null;
|
|
1766
|
-
return
|
|
1784
|
+
return l({ class: "flex-none items-center" }, [
|
|
1767
1785
|
p({
|
|
1768
1786
|
id: e,
|
|
1769
1787
|
cache: "input",
|
|
@@ -1775,7 +1793,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1775
1793
|
n && t && (this.state.loaded = !1, t(n, this.parent), this.src = this.getFileUrl(n), this.state.loaded = !0);
|
|
1776
1794
|
}
|
|
1777
1795
|
}),
|
|
1778
|
-
|
|
1796
|
+
l({
|
|
1779
1797
|
class: "relative w-32 h-32 rounded-full border flex items-center justify-center cursor-pointer hover:bg-muted transition-colors duration-150 overflow-hidden group",
|
|
1780
1798
|
click: (s) => {
|
|
1781
1799
|
s.preventDefault(), s.stopPropagation(), this.openFileBrowse();
|
|
@@ -1787,12 +1805,12 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1787
1805
|
// @ts-ignore
|
|
1788
1806
|
src: this.src,
|
|
1789
1807
|
class: "absolute inset-0 w-full h-full object-cover rounded-full"
|
|
1790
|
-
}) :
|
|
1808
|
+
}) : Y({
|
|
1791
1809
|
htmlFor: e,
|
|
1792
1810
|
class: "z-10 flex flex-col items-center justify-center text-sm text-muted-foreground group-hover:text-primary"
|
|
1793
1811
|
}, [
|
|
1794
|
-
x({},
|
|
1795
|
-
|
|
1812
|
+
x({}, g.upload),
|
|
1813
|
+
l("Upload logo")
|
|
1796
1814
|
])
|
|
1797
1815
|
)
|
|
1798
1816
|
])
|
|
@@ -1807,22 +1825,22 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1807
1825
|
this.input = null;
|
|
1808
1826
|
}
|
|
1809
1827
|
}
|
|
1810
|
-
),
|
|
1828
|
+
), Ls = (e, t) => Je(
|
|
1811
1829
|
{
|
|
1812
1830
|
href: e,
|
|
1813
1831
|
"aria-current": t === "Breadcrumb" && "page",
|
|
1814
1832
|
// Only set aria-current on the last item
|
|
1815
1833
|
class: "text-muted-foreground font-medium hover:text-foreground"
|
|
1816
1834
|
},
|
|
1817
|
-
[
|
|
1818
|
-
),
|
|
1835
|
+
[f(t)]
|
|
1836
|
+
), Rs = () => x({
|
|
1819
1837
|
class: "mx-3 text-muted-foreground",
|
|
1820
1838
|
"aria-hidden": !0,
|
|
1821
1839
|
size: "xs"
|
|
1822
|
-
},
|
|
1823
|
-
e.href ?
|
|
1824
|
-
e.separator &&
|
|
1825
|
-
]),
|
|
1840
|
+
}, g.chevron.single.right), As = (e) => l({ class: "flex items-center" }, [
|
|
1841
|
+
e.href ? Ls(e.href, e.label) : f(e.label),
|
|
1842
|
+
e.separator && Rs()
|
|
1843
|
+
]), Io = B(
|
|
1826
1844
|
{
|
|
1827
1845
|
/**
|
|
1828
1846
|
* Set initial data
|
|
@@ -1830,7 +1848,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1830
1848
|
* @returns {Data}
|
|
1831
1849
|
*/
|
|
1832
1850
|
setData() {
|
|
1833
|
-
return new
|
|
1851
|
+
return new N({
|
|
1834
1852
|
// @ts-ignore
|
|
1835
1853
|
items: this.items || []
|
|
1836
1854
|
});
|
|
@@ -1848,7 +1866,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1848
1866
|
class: "flex items-center gap-x-1 text-sm"
|
|
1849
1867
|
},
|
|
1850
1868
|
[
|
|
1851
|
-
|
|
1869
|
+
l({
|
|
1852
1870
|
role: "list",
|
|
1853
1871
|
class: "flex items-center",
|
|
1854
1872
|
for: ["items", (t, s) => As({
|
|
@@ -1870,8 +1888,8 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1870
1888
|
"2xl": "h-16 w-16",
|
|
1871
1889
|
"3xl": "h-24 w-24",
|
|
1872
1890
|
default: "h-4 w-4"
|
|
1873
|
-
},
|
|
1874
|
-
|
|
1891
|
+
}, js = (e) => Ye[e] || Ye.default, Es = ({ index: e, size: t }) => l({ class: `${t} rounded-full bg-muted cursor-pointer` }, [
|
|
1892
|
+
f({
|
|
1875
1893
|
class: "block w-full h-full rounded-full transition-colors",
|
|
1876
1894
|
onSet: ["activeIndex", {
|
|
1877
1895
|
"bg-primary": e,
|
|
@@ -1881,10 +1899,10 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1881
1899
|
n.activeIndex = e, a && a(e);
|
|
1882
1900
|
}
|
|
1883
1901
|
})
|
|
1884
|
-
]),
|
|
1902
|
+
]), _s = (e, t) => Array.from({ length: e }, (s, n) => Es({
|
|
1885
1903
|
index: n,
|
|
1886
1904
|
size: t
|
|
1887
|
-
})),
|
|
1905
|
+
})), To = B(
|
|
1888
1906
|
{
|
|
1889
1907
|
/**
|
|
1890
1908
|
* Defines component data (props).
|
|
@@ -1892,7 +1910,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1892
1910
|
* @returns {Data}
|
|
1893
1911
|
*/
|
|
1894
1912
|
setData() {
|
|
1895
|
-
return new
|
|
1913
|
+
return new N({
|
|
1896
1914
|
// @ts-ignore
|
|
1897
1915
|
count: this.count || 4,
|
|
1898
1916
|
// total dots
|
|
@@ -1906,11 +1924,11 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1906
1924
|
* @returns {object}
|
|
1907
1925
|
*/
|
|
1908
1926
|
render() {
|
|
1909
|
-
const e = this.gap || "gap-2", t =
|
|
1910
|
-
return
|
|
1927
|
+
const e = this.gap || "gap-2", t = js(this.size || "sm"), s = _s(this.data.count, t);
|
|
1928
|
+
return l(
|
|
1911
1929
|
{ class: "flex justify-center items-center py-2" },
|
|
1912
1930
|
[
|
|
1913
|
-
|
|
1931
|
+
l({ class: `flex ${e}` }, s)
|
|
1914
1932
|
]
|
|
1915
1933
|
);
|
|
1916
1934
|
}
|
|
@@ -1922,19 +1940,19 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1922
1940
|
click: e
|
|
1923
1941
|
},
|
|
1924
1942
|
[
|
|
1925
|
-
|
|
1926
|
-
x({ size: "sm" },
|
|
1943
|
+
f({ onState: ["selectedLabel", (t) => t || "Select item..."] }),
|
|
1944
|
+
x({ size: "sm" }, g.chevron.upDown)
|
|
1927
1945
|
]
|
|
1928
|
-
),
|
|
1946
|
+
), Us = (e, t, s) => we({
|
|
1929
1947
|
class: "flex flex-auto items-center cursor-pointer p-2 hover:bg-muted/50 rounded-sm",
|
|
1930
1948
|
click: () => t(e),
|
|
1931
1949
|
onState: [s, "selectedValue", { "bg-secondary": e.value }]
|
|
1932
1950
|
}, [
|
|
1933
|
-
e.icon &&
|
|
1934
|
-
|
|
1935
|
-
]),
|
|
1936
|
-
te({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) =>
|
|
1937
|
-
]),
|
|
1951
|
+
e.icon && f({ class: "mr-2 flex items-baseline" }, [x({ size: "xs" }, e.icon)]),
|
|
1952
|
+
f({ class: "text-base font-normal" }, e.label)
|
|
1953
|
+
]), Ys = (e, t) => l({ class: "w-full border rounded-md" }, [
|
|
1954
|
+
te({ class: "max-h-60 overflow-y-auto p-2 grid gap-1", for: ["items", (s) => Us(s, e, t)] })
|
|
1955
|
+
]), Vs = ({ onSelect: e, state: t }) => l({ class: "flex flex-auto flex-col" }, [
|
|
1938
1956
|
M(
|
|
1939
1957
|
"open",
|
|
1940
1958
|
(s, n, a) => s ? new ae({
|
|
@@ -1942,10 +1960,10 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1942
1960
|
parent: a,
|
|
1943
1961
|
button: a.button
|
|
1944
1962
|
}, [
|
|
1945
|
-
|
|
1963
|
+
Ys(e, t)
|
|
1946
1964
|
]) : null
|
|
1947
1965
|
)
|
|
1948
|
-
]),
|
|
1966
|
+
]), Po = B(
|
|
1949
1967
|
{
|
|
1950
1968
|
/**
|
|
1951
1969
|
* This will set up the data.
|
|
@@ -1953,7 +1971,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
1953
1971
|
* @returns {Data}
|
|
1954
1972
|
*/
|
|
1955
1973
|
setData() {
|
|
1956
|
-
return new
|
|
1974
|
+
return new N({
|
|
1957
1975
|
// @ts-ignore
|
|
1958
1976
|
items: this.items || []
|
|
1959
1977
|
});
|
|
@@ -2024,10 +2042,10 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
2024
2042
|
*/
|
|
2025
2043
|
render() {
|
|
2026
2044
|
const e = this.class || "", t = this.maxWidth || "max-w-[250px]", s = this.width || "w-full";
|
|
2027
|
-
return
|
|
2045
|
+
return l({ class: `relative ${s} flex flex-auto flex-col ${t} ${e}` }, [
|
|
2028
2046
|
// @ts-ignore
|
|
2029
2047
|
Hs({ toggleDropdown: this.toggleDropdown.bind(this) }),
|
|
2030
|
-
|
|
2048
|
+
Vs({
|
|
2031
2049
|
// @ts-ignore
|
|
2032
2050
|
state: this.state,
|
|
2033
2051
|
// @ts-ignore
|
|
@@ -2047,25 +2065,25 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
2047
2065
|
]);
|
|
2048
2066
|
}
|
|
2049
2067
|
}
|
|
2050
|
-
),
|
|
2068
|
+
), rt = ({ icon: e, click: t, ariaLabel: s }) => b({
|
|
2051
2069
|
variant: "icon",
|
|
2052
2070
|
class: "flex flex-none",
|
|
2053
2071
|
click: t,
|
|
2054
2072
|
icon: e,
|
|
2055
2073
|
"aria-label": s
|
|
2056
|
-
}), Ws = ({ click: e }) =>
|
|
2057
|
-
icon:
|
|
2074
|
+
}), Ws = ({ click: e }) => rt({
|
|
2075
|
+
icon: g.circleMinus,
|
|
2058
2076
|
click: e,
|
|
2059
2077
|
ariaLabel: "Decrement"
|
|
2060
|
-
}),
|
|
2061
|
-
icon:
|
|
2078
|
+
}), qs = ({ click: e }) => rt({
|
|
2079
|
+
icon: g.circlePlus,
|
|
2062
2080
|
click: e,
|
|
2063
2081
|
ariaLabel: "Increment"
|
|
2064
|
-
}),
|
|
2082
|
+
}), Gs = ({ bind: e, min: t, max: s, readonly: n = !1 }) => G(({ state: a }) => p({
|
|
2065
2083
|
value: ["[[count]]", a],
|
|
2066
2084
|
bind: e,
|
|
2067
|
-
blur: (
|
|
2068
|
-
let c = parseInt(
|
|
2085
|
+
blur: (o, { state: r }) => {
|
|
2086
|
+
let c = parseInt(o.target.value, 10);
|
|
2069
2087
|
isNaN(c) && (c = t ?? 0), t !== void 0 && (c = Math.max(c, t)), s !== void 0 && (c = Math.min(c, s)), r.count = c;
|
|
2070
2088
|
},
|
|
2071
2089
|
class: "flex flex-auto text-lg font-medium bg-input text-center border min-w-0",
|
|
@@ -2074,7 +2092,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
2074
2092
|
max: s,
|
|
2075
2093
|
type: "number",
|
|
2076
2094
|
"aria-label": "Counter"
|
|
2077
|
-
})), Mo =
|
|
2095
|
+
})), Mo = F(
|
|
2078
2096
|
{
|
|
2079
2097
|
/**
|
|
2080
2098
|
* Initial state for the counter component.
|
|
@@ -2096,25 +2114,25 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
2096
2114
|
*/
|
|
2097
2115
|
render() {
|
|
2098
2116
|
const e = this.class ?? "";
|
|
2099
|
-
return
|
|
2117
|
+
return l({ class: `flex flex-auto items-center justify-between gap-x-4 p-4 ${e}` }, [
|
|
2100
2118
|
Ws({ click: () => this.state.decrement("count") }),
|
|
2101
|
-
|
|
2119
|
+
Gs({
|
|
2102
2120
|
bind: this.bind,
|
|
2103
2121
|
readonly: this.readonly,
|
|
2104
2122
|
min: this.min,
|
|
2105
2123
|
max: this.max
|
|
2106
2124
|
}),
|
|
2107
|
-
|
|
2125
|
+
qs({ click: () => this.state.increment("count") })
|
|
2108
2126
|
]);
|
|
2109
2127
|
}
|
|
2110
2128
|
}
|
|
2111
|
-
),
|
|
2129
|
+
), Ks = ({ currentMonth: e, currentYear: t, onSelect: s }) => l(
|
|
2112
2130
|
{ class: "grid grid-cols-3 gap-2" },
|
|
2113
2131
|
se.monthNames.map(
|
|
2114
2132
|
(n, a) => b(
|
|
2115
2133
|
{
|
|
2116
|
-
click: (
|
|
2117
|
-
|
|
2134
|
+
click: (o) => {
|
|
2135
|
+
o.preventDefault(), o.stopPropagation(), s(a);
|
|
2118
2136
|
},
|
|
2119
2137
|
variant: e === a ? "primary" : "ghost",
|
|
2120
2138
|
"aria-label": `Select ${n} ${t}`
|
|
@@ -2122,16 +2140,16 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
2122
2140
|
n.substring(0, 3)
|
|
2123
2141
|
)
|
|
2124
2142
|
)
|
|
2125
|
-
),
|
|
2126
|
-
const a =
|
|
2127
|
-
return a || (e ?
|
|
2128
|
-
},
|
|
2143
|
+
), O = (e) => (e *= 1, e < 10 ? `0${e}` : String(e)), Qs = (e) => (e.indexOf("T") === -1 && e.indexOf(" ") === -1 && (e += "T00:00:01"), e.replace(" ", "T"), e), _ = (e, t, s) => `${e}-${O(t + 1)}-${O(s)}`, Js = (e) => e ? "bg-accent text-primary" : "", Xs = (e) => e ? "text-muted-foreground opacity-50" : "", Zs = (e, t) => e === t, en = (e, t) => Zs(e, t) ? "bg-primary text-primary-foreground" : "", tn = (e, t, s, n) => {
|
|
2144
|
+
const a = en(t, n);
|
|
2145
|
+
return a || (e ? Js(e) : s ? Xs(s) : "text-foreground");
|
|
2146
|
+
}, de = (e) => {
|
|
2129
2147
|
const {
|
|
2130
2148
|
day: t,
|
|
2131
2149
|
currentDate: s,
|
|
2132
2150
|
date: n,
|
|
2133
2151
|
isToday: a,
|
|
2134
|
-
isOutsideMonth:
|
|
2152
|
+
isOutsideMonth: o,
|
|
2135
2153
|
select: r,
|
|
2136
2154
|
disabled: c
|
|
2137
2155
|
} = e;
|
|
@@ -2139,7 +2157,7 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
2139
2157
|
{
|
|
2140
2158
|
class: `
|
|
2141
2159
|
flex items-center justify-center h-9 w-auto p-0 font-normal text-sm rounded-md cursor-pointer
|
|
2142
|
-
${
|
|
2160
|
+
${tn(a, s, o, n)}
|
|
2143
2161
|
hover:bg-muted/50 hover:text-muted-foreground focus:z-10
|
|
2144
2162
|
disabled:pointer-events-none disabled:opacity-50
|
|
2145
2163
|
`,
|
|
@@ -2150,53 +2168,53 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
2150
2168
|
},
|
|
2151
2169
|
t.toString()
|
|
2152
2170
|
);
|
|
2153
|
-
},
|
|
2154
|
-
const { year: a, month:
|
|
2171
|
+
}, ue = (e, t, s, n) => e === n.date && t === n.month && s === n.year, sn = (e, t, s, n = !1) => {
|
|
2172
|
+
const { year: a, month: o } = e, r = _(a, o, e.date), c = new Date(a, o, 1).getDay(), u = new Date(a, o + 1, 0).getDate(), h = new Date(a, o, 0).getDate(), y = [], R = o === 0 ? 11 : o - 1, A = o === 0 ? a - 1 : a;
|
|
2155
2173
|
for (let d = c - 1; d >= 0; d--) {
|
|
2156
|
-
const
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
day:
|
|
2174
|
+
const w = h - d, I = ue(w, R, A, t), T = new Date(A, R, w) < new Date(t.year, t.month, t.date), j = n && T;
|
|
2175
|
+
y.push(
|
|
2176
|
+
de({
|
|
2177
|
+
day: w,
|
|
2160
2178
|
currentDate: r,
|
|
2161
|
-
date:
|
|
2179
|
+
date: _(A, R, w),
|
|
2162
2180
|
isToday: I,
|
|
2163
2181
|
isOutsideMonth: !0,
|
|
2164
2182
|
select: s,
|
|
2165
|
-
disabled:
|
|
2183
|
+
disabled: j
|
|
2166
2184
|
})
|
|
2167
2185
|
);
|
|
2168
2186
|
}
|
|
2169
|
-
for (let d = 1; d <=
|
|
2170
|
-
const
|
|
2171
|
-
|
|
2172
|
-
|
|
2187
|
+
for (let d = 1; d <= u; d++) {
|
|
2188
|
+
const w = ue(d, o, a, t), I = new Date(a, o, d) < new Date(t.year, t.month, t.date), T = n && I;
|
|
2189
|
+
y.push(
|
|
2190
|
+
de({
|
|
2173
2191
|
day: d,
|
|
2174
2192
|
currentDate: r,
|
|
2175
|
-
date:
|
|
2176
|
-
isToday:
|
|
2193
|
+
date: _(a, o, d),
|
|
2194
|
+
isToday: w,
|
|
2177
2195
|
isOutsideMonth: !1,
|
|
2178
2196
|
select: s,
|
|
2179
2197
|
disabled: T
|
|
2180
2198
|
})
|
|
2181
2199
|
);
|
|
2182
2200
|
}
|
|
2183
|
-
const
|
|
2184
|
-
for (let d = 1; d <=
|
|
2185
|
-
const
|
|
2186
|
-
|
|
2187
|
-
|
|
2201
|
+
const P = o === 11 ? 0 : o + 1, oe = o === 11 ? a + 1 : a, m = (7 - y.length % 7) % 7;
|
|
2202
|
+
for (let d = 1; d <= m; d++) {
|
|
2203
|
+
const w = ue(d, P, oe, t), I = new Date(oe, P, d) < new Date(t.year, t.month, t.date), T = n && I;
|
|
2204
|
+
y.push(
|
|
2205
|
+
de({
|
|
2188
2206
|
day: d,
|
|
2189
2207
|
currentDate: r,
|
|
2190
|
-
date:
|
|
2191
|
-
isToday:
|
|
2208
|
+
date: _(oe, P, d),
|
|
2209
|
+
isToday: w,
|
|
2192
2210
|
isOutsideMonth: !0,
|
|
2193
2211
|
select: s,
|
|
2194
2212
|
disabled: T
|
|
2195
2213
|
})
|
|
2196
2214
|
);
|
|
2197
2215
|
}
|
|
2198
|
-
return
|
|
2199
|
-
},
|
|
2216
|
+
return y;
|
|
2217
|
+
}, Ve = ({ label: e, click: t }) => b(
|
|
2200
2218
|
{
|
|
2201
2219
|
class: `
|
|
2202
2220
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -2207,32 +2225,32 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
2207
2225
|
click: t,
|
|
2208
2226
|
"aria-label": `${e} month`,
|
|
2209
2227
|
variant: "icon",
|
|
2210
|
-
icon: e === "Previous" ?
|
|
2228
|
+
icon: e === "Previous" ? g.chevron.single.left : g.chevron.single.right
|
|
2211
2229
|
}
|
|
2212
|
-
),
|
|
2230
|
+
), nn = ({ onMonthClick: e, onYearClick: t, next: s, previous: n }) => l({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
2213
2231
|
b({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
|
|
2214
2232
|
b({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
]),
|
|
2233
|
+
Ve({ label: "Previous", click: n }),
|
|
2234
|
+
Ve({ label: "Next", click: s })
|
|
2235
|
+
]), an = (e) => l(
|
|
2218
2236
|
{ class: "flex items-center justify-center h-9 w-auto text-[0.8rem] font-normal text-muted-foreground" },
|
|
2219
2237
|
e
|
|
2220
|
-
),
|
|
2221
|
-
|
|
2238
|
+
), on = () => ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(an), ln = (e) => l({ class: "rdp flex flex-auto flex-col w-full gap-y-1" }, [
|
|
2239
|
+
nn({
|
|
2222
2240
|
onMonthClick: e.onMonthClick,
|
|
2223
2241
|
onYearClick: e.onYearClick,
|
|
2224
2242
|
next: e.next,
|
|
2225
2243
|
previous: e.previous
|
|
2226
2244
|
}),
|
|
2227
|
-
|
|
2245
|
+
l({
|
|
2228
2246
|
class: "flex flex-auto flex-col w-full",
|
|
2229
2247
|
onSet: [
|
|
2230
2248
|
"currentDate",
|
|
2231
2249
|
() => [
|
|
2232
|
-
|
|
2233
|
-
|
|
2250
|
+
l({ class: "grid grid-cols-7" }, on()),
|
|
2251
|
+
l(
|
|
2234
2252
|
{ class: "grid grid-cols-7" },
|
|
2235
|
-
|
|
2253
|
+
sn(
|
|
2236
2254
|
e.current,
|
|
2237
2255
|
e.today,
|
|
2238
2256
|
e.select,
|
|
@@ -2242,25 +2260,25 @@ const Ee = globalThis.matchMedia, ie = i(({ value: e, label: t, icon: s }) => v(
|
|
|
2242
2260
|
]
|
|
2243
2261
|
]
|
|
2244
2262
|
})
|
|
2245
|
-
]),
|
|
2246
|
-
const n = t - 50, a = Array.from({ length: 101 }, (
|
|
2247
|
-
return
|
|
2263
|
+
]), rn = ({ currentMonth: e, currentYear: t, onSelect: s }) => {
|
|
2264
|
+
const n = t - 50, a = Array.from({ length: 101 }, (o, r) => n + r);
|
|
2265
|
+
return l(
|
|
2248
2266
|
{ class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
|
|
2249
2267
|
a.map(
|
|
2250
|
-
(
|
|
2268
|
+
(o) => b(
|
|
2251
2269
|
{
|
|
2252
2270
|
click: (r) => {
|
|
2253
|
-
r.preventDefault(), r.stopPropagation(), s(
|
|
2271
|
+
r.preventDefault(), r.stopPropagation(), s(o);
|
|
2254
2272
|
},
|
|
2255
|
-
variant:
|
|
2256
|
-
"aria-label": `Select ${
|
|
2273
|
+
variant: o === t ? "primary" : "ghost",
|
|
2274
|
+
"aria-label": `Select ${o}`
|
|
2257
2275
|
},
|
|
2258
|
-
|
|
2276
|
+
o.toString()
|
|
2259
2277
|
)
|
|
2260
2278
|
)
|
|
2261
2279
|
);
|
|
2262
2280
|
};
|
|
2263
|
-
class
|
|
2281
|
+
class cn extends S {
|
|
2264
2282
|
/**
|
|
2265
2283
|
* This will declare the props for the compiler.
|
|
2266
2284
|
*
|
|
@@ -2276,7 +2294,7 @@ class rn extends S {
|
|
|
2276
2294
|
* @returns {Date}
|
|
2277
2295
|
*/
|
|
2278
2296
|
getSelectedDate(t) {
|
|
2279
|
-
const s = this.selectedDate ? new Date(
|
|
2297
|
+
const s = this.selectedDate ? new Date(Qs(this.selectedDate)) : t;
|
|
2280
2298
|
return new Date(s.getFullYear(), s.getMonth(), s.getDate());
|
|
2281
2299
|
}
|
|
2282
2300
|
/**
|
|
@@ -2286,7 +2304,7 @@ class rn extends S {
|
|
|
2286
2304
|
*/
|
|
2287
2305
|
setData() {
|
|
2288
2306
|
const t = /* @__PURE__ */ new Date(), s = this.getSelectedDate(t), n = s.getMonth();
|
|
2289
|
-
return new
|
|
2307
|
+
return new N({
|
|
2290
2308
|
monthName: this.getMonthName(n),
|
|
2291
2309
|
currentDate: `${s.getFullYear()}-${n + 1}-${s.getDate()}`,
|
|
2292
2310
|
current: {
|
|
@@ -2351,7 +2369,7 @@ class rn extends S {
|
|
|
2351
2369
|
*/
|
|
2352
2370
|
setCurrentDate(t, s, n = null) {
|
|
2353
2371
|
const a = this.data;
|
|
2354
|
-
a.current.month = t, a.current.year = s, typeof n == "number" && (a.current.date =
|
|
2372
|
+
a.current.month = t, a.current.year = s, typeof n == "number" && (a.current.date = O(n)), a.currentDate = `${s}-${O(t + 1)}-${a.current.date}`, a.monthName = this.getMonthName(t);
|
|
2355
2373
|
}
|
|
2356
2374
|
/**
|
|
2357
2375
|
* This will select a date.
|
|
@@ -2369,11 +2387,11 @@ class rn extends S {
|
|
|
2369
2387
|
* @returns {object}
|
|
2370
2388
|
*/
|
|
2371
2389
|
render() {
|
|
2372
|
-
return
|
|
2390
|
+
return l({ class: "calendar-container p-3 rounded-md border min-w-80" }, [
|
|
2373
2391
|
M("view", (t) => {
|
|
2374
2392
|
switch (t) {
|
|
2375
2393
|
case "months":
|
|
2376
|
-
return
|
|
2394
|
+
return Ks(
|
|
2377
2395
|
{
|
|
2378
2396
|
// @ts-ignore
|
|
2379
2397
|
currentMonth: this.data.current.month,
|
|
@@ -2385,7 +2403,7 @@ class rn extends S {
|
|
|
2385
2403
|
}
|
|
2386
2404
|
);
|
|
2387
2405
|
case "years":
|
|
2388
|
-
return
|
|
2406
|
+
return rn(
|
|
2389
2407
|
{
|
|
2390
2408
|
// @ts-ignore
|
|
2391
2409
|
currentMonth: this.data.current.month,
|
|
@@ -2397,7 +2415,7 @@ class rn extends S {
|
|
|
2397
2415
|
}
|
|
2398
2416
|
);
|
|
2399
2417
|
default:
|
|
2400
|
-
return
|
|
2418
|
+
return ln({
|
|
2401
2419
|
// @ts-ignore
|
|
2402
2420
|
current: this.data.current,
|
|
2403
2421
|
// @ts-ignore
|
|
@@ -2418,57 +2436,57 @@ class rn extends S {
|
|
|
2418
2436
|
]);
|
|
2419
2437
|
}
|
|
2420
2438
|
}
|
|
2421
|
-
const
|
|
2439
|
+
const dn = (e) => {
|
|
2422
2440
|
let t = "";
|
|
2423
2441
|
return e.length > 0 && (t = e.substring(0, 2), e.length > 2 && (t += "/" + e.substring(2, 4), e.length > 4 && (t += "/" + e.substring(4, 8)))), t;
|
|
2424
|
-
},
|
|
2442
|
+
}, un = (e) => {
|
|
2425
2443
|
if (e.length !== 8)
|
|
2426
2444
|
return null;
|
|
2427
2445
|
const t = parseInt(e.substring(0, 2), 10), s = parseInt(e.substring(2, 4), 10), n = parseInt(e.substring(4, 8), 10);
|
|
2428
2446
|
return t >= 1 && t <= 12 && s >= 1 && s <= 31 && n >= 1900 ? `${n}-${t.toString().padStart(2, "0")}-${s.toString().padStart(2, "0")}` : null;
|
|
2429
|
-
},
|
|
2447
|
+
}, hn = ({ bind: e, required: t }) => p({
|
|
2430
2448
|
cache: "input",
|
|
2431
2449
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
2432
2450
|
bind: e,
|
|
2433
2451
|
required: t
|
|
2434
|
-
}),
|
|
2452
|
+
}), fn = ({ placeholder: e, handleInputChange: t, handleInputFocus: s }) => p({
|
|
2435
2453
|
cache: "dateInput",
|
|
2436
2454
|
class: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground border-0",
|
|
2437
2455
|
placeholder: e || "mm/dd/yyyy",
|
|
2438
2456
|
input: t,
|
|
2439
2457
|
focus: s,
|
|
2440
2458
|
onState: ["selectedDate", (n) => n ? se.format("standard", n) : ""]
|
|
2441
|
-
}),
|
|
2459
|
+
}), gn = ({ bind: e, required: t, toggleOpen: s, handleInputChange: n, handleInputFocus: a, placeholder: o }) => l(
|
|
2442
2460
|
{
|
|
2443
2461
|
class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 pr-4 py-2"
|
|
2444
2462
|
},
|
|
2445
2463
|
[
|
|
2446
|
-
|
|
2447
|
-
|
|
2464
|
+
hn({ bind: e, required: t }),
|
|
2465
|
+
fn({ placeholder: o, handleInputChange: n, handleInputFocus: a }),
|
|
2448
2466
|
v(
|
|
2449
2467
|
{
|
|
2450
2468
|
class: "shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
|
|
2451
2469
|
click: s
|
|
2452
2470
|
},
|
|
2453
2471
|
[
|
|
2454
|
-
|
|
2472
|
+
U({ html: g.calendar.days })
|
|
2455
2473
|
]
|
|
2456
2474
|
)
|
|
2457
2475
|
]
|
|
2458
|
-
),
|
|
2476
|
+
), mn = ({ handleDateSelect: e, blockPriorDates: t }) => ve(
|
|
2459
2477
|
(s, n, a) => new ae({
|
|
2460
2478
|
cache: "dropdown",
|
|
2461
2479
|
parent: a,
|
|
2462
2480
|
button: a.panel,
|
|
2463
2481
|
size: "fit"
|
|
2464
2482
|
}, [
|
|
2465
|
-
new
|
|
2483
|
+
new cn({
|
|
2466
2484
|
selectedDate: a.state.selectedDate,
|
|
2467
2485
|
selectedCallBack: e,
|
|
2468
2486
|
blockPriorDates: t
|
|
2469
2487
|
})
|
|
2470
2488
|
])
|
|
2471
|
-
),
|
|
2489
|
+
), Bo = F(
|
|
2472
2490
|
{
|
|
2473
2491
|
/**
|
|
2474
2492
|
* The initial state of the DatePicker.
|
|
@@ -2497,9 +2515,9 @@ const cn = (e) => {
|
|
|
2497
2515
|
*/
|
|
2498
2516
|
handleInputChange(e) {
|
|
2499
2517
|
const s = e.target.value.replace(/\D/g, "");
|
|
2500
|
-
e.target.value =
|
|
2501
|
-
const n =
|
|
2502
|
-
n && (this.state.selectedDate = n, this.input.value = n,
|
|
2518
|
+
e.target.value = dn(s);
|
|
2519
|
+
const n = un(s);
|
|
2520
|
+
n && (this.state.selectedDate = n, this.input.value = n, H.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(n));
|
|
2503
2521
|
},
|
|
2504
2522
|
/**
|
|
2505
2523
|
* Handles input focus - select all text for easy editing.
|
|
@@ -2515,7 +2533,7 @@ const cn = (e) => {
|
|
|
2515
2533
|
* @param {string} date
|
|
2516
2534
|
*/
|
|
2517
2535
|
handleDateSelect(e) {
|
|
2518
|
-
this.state.selectedDate = e, this.state.open = !1, this.input.value = e,
|
|
2536
|
+
this.state.selectedDate = e, this.state.open = !1, this.input.value = e, H.trigger("change", this.input), typeof this.onChange == "function" && this.onChange(e);
|
|
2519
2537
|
},
|
|
2520
2538
|
/**
|
|
2521
2539
|
* Toggles the calendar popover.
|
|
@@ -2532,10 +2550,10 @@ const cn = (e) => {
|
|
|
2532
2550
|
* @returns {object}
|
|
2533
2551
|
*/
|
|
2534
2552
|
render() {
|
|
2535
|
-
return
|
|
2553
|
+
return l(
|
|
2536
2554
|
{ class: "relative w-full max-w-[320px]" },
|
|
2537
2555
|
[
|
|
2538
|
-
|
|
2556
|
+
gn({
|
|
2539
2557
|
toggleOpen: this.toggleOpen.bind(this),
|
|
2540
2558
|
bind: this.bind,
|
|
2541
2559
|
required: this.required,
|
|
@@ -2543,7 +2561,7 @@ const cn = (e) => {
|
|
|
2543
2561
|
handleInputFocus: this.handleInputFocus.bind(this),
|
|
2544
2562
|
placeholder: this.placeholder
|
|
2545
2563
|
}),
|
|
2546
|
-
|
|
2564
|
+
mn({
|
|
2547
2565
|
handleDateSelect: this.handleDateSelect.bind(this),
|
|
2548
2566
|
blockPriorDates: this.blockPriorDates || !1
|
|
2549
2567
|
})
|
|
@@ -2551,7 +2569,7 @@ const cn = (e) => {
|
|
|
2551
2569
|
);
|
|
2552
2570
|
}
|
|
2553
2571
|
}
|
|
2554
|
-
),
|
|
2572
|
+
), We = ({ label: e, click: t }) => b(
|
|
2555
2573
|
{
|
|
2556
2574
|
class: `
|
|
2557
2575
|
inline-flex items-center justify-center h-7 w-7 bg-transparent p-0
|
|
@@ -2562,90 +2580,90 @@ const cn = (e) => {
|
|
|
2562
2580
|
click: t,
|
|
2563
2581
|
"aria-label": `${e} month`,
|
|
2564
2582
|
variant: "icon",
|
|
2565
|
-
icon: e === "Previous" ?
|
|
2583
|
+
icon: e === "Previous" ? g.chevron.single.left : g.chevron.single.right
|
|
2566
2584
|
}
|
|
2567
|
-
),
|
|
2585
|
+
), bn = ({ onMonthClick: e, onYearClick: t, next: s, previous: n }) => l({ class: "flex items-center justify-center gap-x-2 relative min-h-12 text-sm font-medium" }, [
|
|
2568
2586
|
b({ click: e, variant: "ghost", "aria-label": "Select month" }, "[[monthName]]"),
|
|
2569
2587
|
b({ click: t, variant: "ghost", "aria-label": "Select year" }, "[[current.year]]"),
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
]),
|
|
2588
|
+
We({ label: "Previous", click: n }),
|
|
2589
|
+
We({ label: "Next", click: s })
|
|
2590
|
+
]), xn = (e) => l({ class: "h-9 flex items-center justify-center font-medium" }, e), pn = () => l(
|
|
2573
2591
|
{ class: "grid grid-cols-7 gap-1 text-center text-xs font-medium text-muted-foreground mb-2" },
|
|
2574
|
-
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
2575
|
-
),
|
|
2576
|
-
let
|
|
2577
|
-
return n || a ? (
|
|
2592
|
+
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(xn)
|
|
2593
|
+
), yn = ({ day: e, iso: t, disabled: s, isStart: n, isEnd: a, isBetween: o, isOtherMonth: r, click: c }) => {
|
|
2594
|
+
let u = "ghost", h = "";
|
|
2595
|
+
return n || a ? (u = "default", h = "bg-primary text-primary-foreground hover:bg-primary/90") : o && (h = "bg-accent text-accent-foreground hover:bg-accent/80"), s && (h += " opacity-50 cursor-not-allowed"), r && (h += " text-muted-foreground opacity-50"), b(
|
|
2578
2596
|
{
|
|
2579
|
-
class: `flex items-center justify-center p-0 text-sm font-medium rounded-md transition-colors ${
|
|
2580
|
-
variant:
|
|
2597
|
+
class: `flex items-center justify-center p-0 text-sm font-medium rounded-md transition-colors ${h}`,
|
|
2598
|
+
variant: u,
|
|
2581
2599
|
disabled: s,
|
|
2582
|
-
click: (
|
|
2583
|
-
|
|
2600
|
+
click: (y) => {
|
|
2601
|
+
y.preventDefault(), y.stopPropagation(), s || c();
|
|
2584
2602
|
}
|
|
2585
2603
|
},
|
|
2586
2604
|
e.toString()
|
|
2587
2605
|
);
|
|
2588
|
-
},
|
|
2589
|
-
const { start: a, end:
|
|
2590
|
-
for (let
|
|
2591
|
-
const d =
|
|
2592
|
-
|
|
2606
|
+
}, wn = ({ today: e, current: t, blockPriorDates: s, onDateClick: n }) => {
|
|
2607
|
+
const { start: a, end: o } = t, r = new Date(t.year, t.month, 1).getDay(), c = new Date(t.year, t.month + 1, 0).getDate(), u = [], h = t.month === 0 ? 11 : t.month - 1, y = t.month === 0 ? t.year - 1 : t.year, R = new Date(y, h + 1, 0).getDate(), A = t.month === 11 ? 0 : t.month + 1, P = t.month === 11 ? t.year + 1 : t.year;
|
|
2608
|
+
for (let m = r - 1; m >= 0; m--) {
|
|
2609
|
+
const d = R - m, w = _(y, h, d), I = new Date(y, h, d), T = new Date(e.year, e.month, e.date), j = I < T, K = s && j, Q = a === w, J = o === w, gt = a && o && w > a && w < o;
|
|
2610
|
+
u.push({
|
|
2593
2611
|
day: d,
|
|
2594
|
-
iso:
|
|
2595
|
-
disabled:
|
|
2596
|
-
isStart:
|
|
2597
|
-
isEnd:
|
|
2598
|
-
isBetween:
|
|
2612
|
+
iso: w,
|
|
2613
|
+
disabled: K,
|
|
2614
|
+
isStart: Q,
|
|
2615
|
+
isEnd: J,
|
|
2616
|
+
isBetween: gt,
|
|
2599
2617
|
isOtherMonth: !0,
|
|
2600
|
-
click: () => n(
|
|
2618
|
+
click: () => n(w)
|
|
2601
2619
|
});
|
|
2602
2620
|
}
|
|
2603
|
-
for (let
|
|
2604
|
-
const d =
|
|
2605
|
-
|
|
2606
|
-
day:
|
|
2621
|
+
for (let m = 1; m <= c; m++) {
|
|
2622
|
+
const d = _(t.year, t.month, m), w = new Date(t.year, t.month, m), I = new Date(e.year, e.month, e.date), T = w < I, j = s && T, K = a === d, Q = o === d, J = a && o && d > a && d < o;
|
|
2623
|
+
u.push({
|
|
2624
|
+
day: m,
|
|
2607
2625
|
iso: d,
|
|
2608
|
-
disabled:
|
|
2609
|
-
isStart:
|
|
2610
|
-
isEnd:
|
|
2611
|
-
isBetween:
|
|
2626
|
+
disabled: j,
|
|
2627
|
+
isStart: K,
|
|
2628
|
+
isEnd: Q,
|
|
2629
|
+
isBetween: J,
|
|
2612
2630
|
isOtherMonth: !1,
|
|
2613
2631
|
click: () => {
|
|
2614
2632
|
n(d);
|
|
2615
2633
|
}
|
|
2616
2634
|
});
|
|
2617
2635
|
}
|
|
2618
|
-
const Ie = (7 -
|
|
2619
|
-
for (let
|
|
2620
|
-
const d =
|
|
2621
|
-
|
|
2622
|
-
day:
|
|
2636
|
+
const Ie = (7 - u.length % 7) % 7;
|
|
2637
|
+
for (let m = 1; m <= Ie; m++) {
|
|
2638
|
+
const d = _(P, A, m), w = new Date(P, A, m), I = new Date(e.year, e.month, e.date), T = w < I, j = s && T, K = a === d, Q = o === d, J = a && o && d > a && d < o;
|
|
2639
|
+
u.push({
|
|
2640
|
+
day: m,
|
|
2623
2641
|
iso: d,
|
|
2624
|
-
disabled:
|
|
2625
|
-
isStart:
|
|
2626
|
-
isEnd:
|
|
2627
|
-
isBetween:
|
|
2642
|
+
disabled: j,
|
|
2643
|
+
isStart: K,
|
|
2644
|
+
isEnd: Q,
|
|
2645
|
+
isBetween: J,
|
|
2628
2646
|
isOtherMonth: !0,
|
|
2629
2647
|
click: () => n(d)
|
|
2630
2648
|
});
|
|
2631
2649
|
}
|
|
2632
|
-
return
|
|
2650
|
+
return l(
|
|
2633
2651
|
{ class: "grid grid-cols-7 gap-1" },
|
|
2634
|
-
|
|
2635
|
-
(
|
|
2636
|
-
day:
|
|
2637
|
-
iso:
|
|
2638
|
-
disabled:
|
|
2639
|
-
isStart:
|
|
2640
|
-
isEnd:
|
|
2641
|
-
isBetween:
|
|
2642
|
-
isOtherMonth:
|
|
2643
|
-
click:
|
|
2652
|
+
u.map(
|
|
2653
|
+
(m, d) => yn({
|
|
2654
|
+
day: m.day,
|
|
2655
|
+
iso: m.iso,
|
|
2656
|
+
disabled: m.disabled,
|
|
2657
|
+
isStart: m.isStart,
|
|
2658
|
+
isEnd: m.isEnd,
|
|
2659
|
+
isBetween: m.isBetween,
|
|
2660
|
+
isOtherMonth: m.isOtherMonth,
|
|
2661
|
+
click: m.click
|
|
2644
2662
|
})
|
|
2645
2663
|
)
|
|
2646
2664
|
);
|
|
2647
|
-
},
|
|
2648
|
-
|
|
2665
|
+
}, vn = i((e, t) => l({ class: "flex flex-auto flex-col" }, [
|
|
2666
|
+
bn({
|
|
2649
2667
|
// @ts-ignore
|
|
2650
2668
|
onMonthClick: e.onMonthClick,
|
|
2651
2669
|
// @ts-ignore
|
|
@@ -2655,13 +2673,13 @@ const cn = (e) => {
|
|
|
2655
2673
|
// @ts-ignore
|
|
2656
2674
|
previous: e.previous
|
|
2657
2675
|
}),
|
|
2658
|
-
|
|
2676
|
+
l({
|
|
2659
2677
|
class: "flex flex-auto flex-col w-full",
|
|
2660
2678
|
onSet: [
|
|
2661
2679
|
"currentDate",
|
|
2662
2680
|
() => [
|
|
2663
|
-
|
|
2664
|
-
|
|
2681
|
+
pn(),
|
|
2682
|
+
wn({
|
|
2665
2683
|
// @ts-ignore
|
|
2666
2684
|
today: e.today,
|
|
2667
2685
|
// @ts-ignore
|
|
@@ -2674,13 +2692,13 @@ const cn = (e) => {
|
|
|
2674
2692
|
]
|
|
2675
2693
|
]
|
|
2676
2694
|
})
|
|
2677
|
-
])),
|
|
2695
|
+
])), kn = ({ currentMonth: e, currentYear: t, onSelect: s }) => l(
|
|
2678
2696
|
{ class: "grid grid-cols-3 gap-2" },
|
|
2679
2697
|
se.monthNames.map(
|
|
2680
2698
|
(n, a) => b(
|
|
2681
2699
|
{
|
|
2682
|
-
click: (
|
|
2683
|
-
|
|
2700
|
+
click: (o) => {
|
|
2701
|
+
o.preventDefault(), o.stopPropagation(), s(a);
|
|
2684
2702
|
},
|
|
2685
2703
|
variant: e === a ? "primary" : "ghost",
|
|
2686
2704
|
"aria-label": `Select ${n} ${t}`
|
|
@@ -2688,33 +2706,33 @@ const cn = (e) => {
|
|
|
2688
2706
|
n.substring(0, 3)
|
|
2689
2707
|
)
|
|
2690
2708
|
)
|
|
2691
|
-
),
|
|
2692
|
-
|
|
2709
|
+
), Cn = ({ start: e, end: t, selecting: s, onSelectStart: n, onSelectEnd: a }) => l({ class: "flex gap-x-2 mb-4" }, [
|
|
2710
|
+
X("selecting", (o) => b({
|
|
2693
2711
|
click: n,
|
|
2694
|
-
variant:
|
|
2712
|
+
variant: o === "start" ? "primary" : "outline",
|
|
2695
2713
|
class: "flex-1"
|
|
2696
2714
|
}, [
|
|
2697
|
-
|
|
2715
|
+
l({ class: "font-medium" }, qe("current.start", "Start Date"))
|
|
2698
2716
|
])),
|
|
2699
|
-
|
|
2717
|
+
X("selecting", (o) => b({
|
|
2700
2718
|
click: a,
|
|
2701
|
-
variant:
|
|
2719
|
+
variant: o === "end" ? "primary" : "outline",
|
|
2702
2720
|
class: "flex-1"
|
|
2703
2721
|
}, [
|
|
2704
|
-
|
|
2722
|
+
l({ class: "font-medium" }, qe("current.end", "End Date"))
|
|
2705
2723
|
]))
|
|
2706
|
-
]), qe = (e, t) => [`[[${e}]]`, (s) => s == null ? t :
|
|
2724
|
+
]), qe = (e, t) => [`[[${e}]]`, (s) => s == null ? t : Sn(s)], Sn = (e) => {
|
|
2707
2725
|
const t = /* @__PURE__ */ new Date(e + "T00:00:00"), s = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], n = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
2708
2726
|
return `${s[t.getDay()]}, ${t.getDate()} ${n[t.getMonth()]}`;
|
|
2709
|
-
},
|
|
2710
|
-
const s = e - 50, n = Array.from({ length: 101 }, (a,
|
|
2711
|
-
return
|
|
2727
|
+
}, $n = ({ currentYear: e, onSelect: t }) => {
|
|
2728
|
+
const s = e - 50, n = Array.from({ length: 101 }, (a, o) => s + o);
|
|
2729
|
+
return l(
|
|
2712
2730
|
{ class: "grid grid-cols-4 gap-2 overflow-y-auto max-h-72" },
|
|
2713
2731
|
n.map(
|
|
2714
2732
|
(a) => b(
|
|
2715
2733
|
{
|
|
2716
|
-
click: (
|
|
2717
|
-
|
|
2734
|
+
click: (o) => {
|
|
2735
|
+
o.preventDefault(), o.stopPropagation(), t(a);
|
|
2718
2736
|
},
|
|
2719
2737
|
variant: a === e ? "primary" : "ghost",
|
|
2720
2738
|
"aria-label": `Select ${a}`
|
|
@@ -2724,7 +2742,7 @@ const cn = (e) => {
|
|
|
2724
2742
|
)
|
|
2725
2743
|
);
|
|
2726
2744
|
};
|
|
2727
|
-
class
|
|
2745
|
+
class Dn extends S {
|
|
2728
2746
|
/**
|
|
2729
2747
|
* Declare compiler props.
|
|
2730
2748
|
*
|
|
@@ -2740,14 +2758,14 @@ class $n extends S {
|
|
|
2740
2758
|
*/
|
|
2741
2759
|
setData() {
|
|
2742
2760
|
const t = /* @__PURE__ */ new Date(), s = this.startDate ? /* @__PURE__ */ new Date(this.startDate + "T00:00:00") : t, n = s.getMonth(), a = s.getFullYear();
|
|
2743
|
-
return new
|
|
2761
|
+
return new N({
|
|
2744
2762
|
today: {
|
|
2745
2763
|
date: t.getDate(),
|
|
2746
2764
|
month: t.getMonth(),
|
|
2747
2765
|
year: t.getFullYear()
|
|
2748
2766
|
},
|
|
2749
2767
|
monthName: this.getMonthName(n),
|
|
2750
|
-
currentData: `${s.getFullYear()}-${
|
|
2768
|
+
currentData: `${s.getFullYear()}-${O(s.getMonth() + 1)}-${O(s.getDate())}`,
|
|
2751
2769
|
current: {
|
|
2752
2770
|
date: t.getDate(),
|
|
2753
2771
|
month: n,
|
|
@@ -2811,7 +2829,7 @@ class $n extends S {
|
|
|
2811
2829
|
*/
|
|
2812
2830
|
setCurrent({ month: t, year: s, date: n = null }) {
|
|
2813
2831
|
const a = this.data.current;
|
|
2814
|
-
a.month = (t + 12) % 12, a.year = s + (t < 0 ? -1 : t > 11 ? 1 : 0), n !== null && (a.date = n), this.data.monthName = this.getMonthName(a.month), this.data.currentDate = `${s}-${
|
|
2832
|
+
a.month = (t + 12) % 12, a.year = s + (t < 0 ? -1 : t > 11 ? 1 : 0), n !== null && (a.date = n), this.data.monthName = this.getMonthName(a.month), this.data.currentDate = `${s}-${O(t + 1)}-${O(a.date)}`;
|
|
2815
2833
|
}
|
|
2816
2834
|
/**
|
|
2817
2835
|
* Render the range calendar.
|
|
@@ -2819,11 +2837,11 @@ class $n extends S {
|
|
|
2819
2837
|
* @returns {object}
|
|
2820
2838
|
*/
|
|
2821
2839
|
render() {
|
|
2822
|
-
const { today: t, current: s, selecting: n } = this.data, { start: a, end:
|
|
2823
|
-
return
|
|
2824
|
-
|
|
2840
|
+
const { today: t, current: s, selecting: n } = this.data, { start: a, end: o } = s;
|
|
2841
|
+
return l({ class: "range-calendar border border-border rounded-lg shadow-md p-4 w-full max-w-sm min-w-80" }, [
|
|
2842
|
+
Cn({
|
|
2825
2843
|
start: a,
|
|
2826
|
-
end:
|
|
2844
|
+
end: o,
|
|
2827
2845
|
selecting: n,
|
|
2828
2846
|
onSelectStart: (r) => {
|
|
2829
2847
|
r.preventDefault(), r.stopPropagation(), this.data.selecting = "start";
|
|
@@ -2835,7 +2853,7 @@ class $n extends S {
|
|
|
2835
2853
|
M("view", (r) => {
|
|
2836
2854
|
switch (r) {
|
|
2837
2855
|
case "months":
|
|
2838
|
-
return
|
|
2856
|
+
return kn(
|
|
2839
2857
|
{
|
|
2840
2858
|
currentMonth: s.month,
|
|
2841
2859
|
currentYear: s.year,
|
|
@@ -2845,7 +2863,7 @@ class $n extends S {
|
|
|
2845
2863
|
}
|
|
2846
2864
|
);
|
|
2847
2865
|
case "years":
|
|
2848
|
-
return
|
|
2866
|
+
return $n(
|
|
2849
2867
|
{
|
|
2850
2868
|
currentYear: s.year,
|
|
2851
2869
|
onSelect: (c) => {
|
|
@@ -2854,7 +2872,7 @@ class $n extends S {
|
|
|
2854
2872
|
}
|
|
2855
2873
|
);
|
|
2856
2874
|
default:
|
|
2857
|
-
return
|
|
2875
|
+
return vn({
|
|
2858
2876
|
// @ts-ignore
|
|
2859
2877
|
monthName: this.data.monthName,
|
|
2860
2878
|
year: s.year,
|
|
@@ -2869,12 +2887,12 @@ class $n extends S {
|
|
|
2869
2887
|
c.preventDefault(), c.stopPropagation(), this.state.view = "years";
|
|
2870
2888
|
},
|
|
2871
2889
|
next: () => {
|
|
2872
|
-
const c = this.data.current,
|
|
2873
|
-
this.setCurrent(
|
|
2890
|
+
const c = this.data.current, u = c.month === 11 ? { month: 0, year: c.year + 1 } : { month: c.month + 1, year: c.year };
|
|
2891
|
+
this.setCurrent(u);
|
|
2874
2892
|
},
|
|
2875
2893
|
previous: () => {
|
|
2876
|
-
const c = this.data.current,
|
|
2877
|
-
this.setCurrent(
|
|
2894
|
+
const c = this.data.current, u = c.month === 0 ? { month: 11, year: c.year - 1 } : { month: c.month - 1, year: c.year };
|
|
2895
|
+
this.setCurrent(u);
|
|
2878
2896
|
}
|
|
2879
2897
|
});
|
|
2880
2898
|
}
|
|
@@ -2882,35 +2900,35 @@ class $n extends S {
|
|
|
2882
2900
|
]);
|
|
2883
2901
|
}
|
|
2884
2902
|
}
|
|
2885
|
-
const
|
|
2903
|
+
const In = ({ bind: e, required: t }) => p({
|
|
2886
2904
|
cache: "input",
|
|
2887
2905
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
2888
2906
|
bind: e,
|
|
2889
2907
|
required: t
|
|
2890
|
-
}),
|
|
2908
|
+
}), Tn = ({ bind: e, required: t, toggleOpen: s }) => v({
|
|
2891
2909
|
class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 px-4 py-2",
|
|
2892
2910
|
click: s
|
|
2893
2911
|
}, [
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2912
|
+
In({ bind: e, required: t }),
|
|
2913
|
+
G(({ state: n }) => [
|
|
2914
|
+
f(W.date(["[[start]]", n], "Start Date")),
|
|
2915
|
+
f(" - "),
|
|
2916
|
+
f(W.date(["[[end]]", n], "End Date"))
|
|
2899
2917
|
]),
|
|
2900
|
-
|
|
2901
|
-
]),
|
|
2918
|
+
U({ html: g.calendar.days })
|
|
2919
|
+
]), Pn = ({ handleDateSelect: e, blockPriorDates: t }) => ve((s, n, a) => new ae({
|
|
2902
2920
|
cache: "dropdown",
|
|
2903
2921
|
parent: a,
|
|
2904
2922
|
button: a.panel,
|
|
2905
2923
|
size: "xl"
|
|
2906
2924
|
}, [
|
|
2907
|
-
new
|
|
2925
|
+
new Dn({
|
|
2908
2926
|
startDate: a.state.start,
|
|
2909
2927
|
endDate: a.state.end,
|
|
2910
2928
|
onRangeSelect: e,
|
|
2911
2929
|
blockPriorDates: t
|
|
2912
2930
|
})
|
|
2913
|
-
])),
|
|
2931
|
+
])), zo = F(
|
|
2914
2932
|
{
|
|
2915
2933
|
/**
|
|
2916
2934
|
* The initial state of the DateRangePicker.
|
|
@@ -2943,15 +2961,15 @@ const Dn = ({ bind: e, required: t }) => p({
|
|
|
2943
2961
|
*/
|
|
2944
2962
|
render() {
|
|
2945
2963
|
const e = (s, { state: n }) => n.toggle("open"), t = (s, n) => {
|
|
2946
|
-
this.state.start = s, this.state.end = n, this.state.open = !1, this.input.value = `${s}-${n}`,
|
|
2964
|
+
this.state.start = s, this.state.end = n, this.state.open = !1, this.input.value = `${s}-${n}`, H.trigger("change", this.input), typeof this.onChange == "function" && this.onChange({ start: s, end: n }, this.parent);
|
|
2947
2965
|
};
|
|
2948
|
-
return
|
|
2949
|
-
|
|
2966
|
+
return l({ class: "relative w-full max-w-[320px]" }, [
|
|
2967
|
+
Tn({
|
|
2950
2968
|
toggleOpen: e,
|
|
2951
2969
|
bind: this.bind,
|
|
2952
2970
|
required: this.required
|
|
2953
2971
|
}),
|
|
2954
|
-
|
|
2972
|
+
Pn({
|
|
2955
2973
|
handleDateSelect: t,
|
|
2956
2974
|
blockPriorDates: this.blockPriorDates || !1
|
|
2957
2975
|
})
|
|
@@ -2963,7 +2981,7 @@ function Mn(e) {
|
|
|
2963
2981
|
let t = "";
|
|
2964
2982
|
return e.length > 0 && (t = e.substring(0, 2), e.length > 2 && (t += ":" + e.substring(2, 4))), t;
|
|
2965
2983
|
}
|
|
2966
|
-
function
|
|
2984
|
+
function Bn(e) {
|
|
2967
2985
|
if (e.length < 4)
|
|
2968
2986
|
return { formattedTime: null, hour: null, minute: null, meridian: null };
|
|
2969
2987
|
const t = parseInt(e.substring(0, 2), 10), s = parseInt(e.substring(2, 4), 10);
|
|
@@ -2977,7 +2995,7 @@ function Pn(e) {
|
|
|
2977
2995
|
meridian: a
|
|
2978
2996
|
};
|
|
2979
2997
|
}
|
|
2980
|
-
function
|
|
2998
|
+
function zn({ bind: e, required: t }) {
|
|
2981
2999
|
return p({
|
|
2982
3000
|
cache: "input",
|
|
2983
3001
|
class: "opacity-0 absolute top-0 left-0 w-full h-full pointer-events-none",
|
|
@@ -2985,7 +3003,7 @@ function Bn({ bind: e, required: t }) {
|
|
|
2985
3003
|
required: t
|
|
2986
3004
|
});
|
|
2987
3005
|
}
|
|
2988
|
-
function
|
|
3006
|
+
function On({ placeholder: e, handleInputChange: t, handleInputFocus: s }) {
|
|
2989
3007
|
return p({
|
|
2990
3008
|
cache: "timeInput",
|
|
2991
3009
|
class: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground border-0",
|
|
@@ -2995,31 +3013,31 @@ function zn({ placeholder: e, handleInputChange: t, handleInputFocus: s }) {
|
|
|
2995
3013
|
onState: ["selectedTime", (n) => n || ""]
|
|
2996
3014
|
});
|
|
2997
3015
|
}
|
|
2998
|
-
function
|
|
2999
|
-
return
|
|
3016
|
+
function Nn({ bind: e, required: t, toggleOpen: s, handleInputChange: n, handleInputFocus: a, placeholder: o }) {
|
|
3017
|
+
return l(
|
|
3000
3018
|
{
|
|
3001
3019
|
class: "relative flex items-center gap-2 w-full justify-between border bg-input hover:bg-muted rounded-md h-10 pr-4 py-2"
|
|
3002
3020
|
},
|
|
3003
3021
|
[
|
|
3004
|
-
|
|
3005
|
-
|
|
3022
|
+
zn({ bind: e, required: t }),
|
|
3023
|
+
On({ placeholder: o, handleInputChange: n, handleInputFocus: a }),
|
|
3006
3024
|
v(
|
|
3007
3025
|
{
|
|
3008
3026
|
class: "shrink-0 hover:bg-muted/50 rounded p-1 cursor-pointer",
|
|
3009
3027
|
click: s
|
|
3010
3028
|
},
|
|
3011
3029
|
[
|
|
3012
|
-
|
|
3030
|
+
U({ html: g.clock })
|
|
3013
3031
|
]
|
|
3014
3032
|
)
|
|
3015
3033
|
]
|
|
3016
3034
|
);
|
|
3017
3035
|
}
|
|
3018
|
-
function
|
|
3019
|
-
return
|
|
3036
|
+
function he({ items: e, handleTimeSelect: t, state: s, stateValue: n, pad: a = !1 }) {
|
|
3037
|
+
return l(
|
|
3020
3038
|
{ class: "flex flex-col max-h-[200px] overflow-y-auto" },
|
|
3021
|
-
e.map((
|
|
3022
|
-
let r = a ?
|
|
3039
|
+
e.map((o) => {
|
|
3040
|
+
let r = a ? o.toString().padStart(2, "0") : o.toString();
|
|
3023
3041
|
return v({
|
|
3024
3042
|
text: r,
|
|
3025
3043
|
class: "hover:bg-muted/50 rounded-md pr-2 py-1",
|
|
@@ -3029,7 +3047,7 @@ function ue({ items: e, handleTimeSelect: t, state: s, stateValue: n, pad: a = !
|
|
|
3029
3047
|
})
|
|
3030
3048
|
);
|
|
3031
3049
|
}
|
|
3032
|
-
function
|
|
3050
|
+
function Fn({ handleTimeSelect: e }) {
|
|
3033
3051
|
return ve(
|
|
3034
3052
|
(t, s, n) => new ae(
|
|
3035
3053
|
{
|
|
@@ -3039,30 +3057,30 @@ function Nn({ handleTimeSelect: e }) {
|
|
|
3039
3057
|
size: "fit"
|
|
3040
3058
|
},
|
|
3041
3059
|
[
|
|
3042
|
-
|
|
3060
|
+
l(
|
|
3043
3061
|
{ class: "flex flex-auto flex-col border rounded-md shadow-md" },
|
|
3044
3062
|
[
|
|
3045
|
-
|
|
3063
|
+
l(
|
|
3046
3064
|
{ class: "grid grid-cols-3 gap-2 p-4 text-center max-h-[220px] min-w-[240px]" },
|
|
3047
3065
|
[
|
|
3048
3066
|
// Hours column
|
|
3049
|
-
|
|
3050
|
-
items: Array.from({ length: 12 }, (a,
|
|
3067
|
+
he({
|
|
3068
|
+
items: Array.from({ length: 12 }, (a, o) => o + 1),
|
|
3051
3069
|
handleTimeSelect: e,
|
|
3052
3070
|
state: n.state,
|
|
3053
3071
|
stateValue: "hour",
|
|
3054
3072
|
pad: !0
|
|
3055
3073
|
}),
|
|
3056
3074
|
// Minutes column
|
|
3057
|
-
|
|
3058
|
-
items: Array.from({ length: 60 }, (a,
|
|
3075
|
+
he({
|
|
3076
|
+
items: Array.from({ length: 60 }, (a, o) => o),
|
|
3059
3077
|
handleTimeSelect: e,
|
|
3060
3078
|
state: n.state,
|
|
3061
3079
|
stateValue: "minute",
|
|
3062
3080
|
pad: !0
|
|
3063
3081
|
}),
|
|
3064
3082
|
// AM/PM column
|
|
3065
|
-
|
|
3083
|
+
he({
|
|
3066
3084
|
items: ["AM", "PM"],
|
|
3067
3085
|
handleTimeSelect: e,
|
|
3068
3086
|
state: n.state,
|
|
@@ -3082,14 +3100,14 @@ function Ge(e) {
|
|
|
3082
3100
|
const t = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?$/i, s = e.match(t);
|
|
3083
3101
|
if (!s)
|
|
3084
3102
|
return { hour: null, minute: null, meridian: null };
|
|
3085
|
-
let [, n, a, ,
|
|
3086
|
-
return r < 0 || r > 23 || c < 0 || c > 59 ? { hour: null, minute: null, meridian: null } : (
|
|
3103
|
+
let [, n, a, , o] = s, r = parseInt(n, 10), c = parseInt(a, 10);
|
|
3104
|
+
return r < 0 || r > 23 || c < 0 || c > 59 ? { hour: null, minute: null, meridian: null } : (o ? (o = o.toUpperCase(), o === "PM" && r < 12 ? r += 12 : o === "AM" && r === 12 && (r = 12)) : r === 0 ? (o = "AM", r = 12) : r < 12 ? o = "AM" : r === 12 ? o = "PM" : (o = "PM", r -= 12), {
|
|
3087
3105
|
hour: r.toString().padStart(2, "0"),
|
|
3088
3106
|
minute: c.toString().padStart(2, "0"),
|
|
3089
|
-
meridian:
|
|
3107
|
+
meridian: o
|
|
3090
3108
|
});
|
|
3091
3109
|
}
|
|
3092
|
-
const
|
|
3110
|
+
const Oo = F(
|
|
3093
3111
|
{
|
|
3094
3112
|
/**
|
|
3095
3113
|
* The initial shallow state of the TimePicker.
|
|
@@ -3138,13 +3156,13 @@ const zo = O(
|
|
|
3138
3156
|
*/
|
|
3139
3157
|
handleInputChange(e) {
|
|
3140
3158
|
let t = e.target.value.replace(/[^\d]/g, ""), s = Mn(t);
|
|
3141
|
-
const n =
|
|
3159
|
+
const n = Bn(t);
|
|
3142
3160
|
n.formattedTime && (s = n.formattedTime, this.state.set({
|
|
3143
3161
|
hour: n.hour,
|
|
3144
3162
|
minute: n.minute,
|
|
3145
3163
|
meridian: n.meridian,
|
|
3146
3164
|
selectedTime: n.formattedTime
|
|
3147
|
-
}), this.input.value = n.formattedTime,
|
|
3165
|
+
}), this.input.value = n.formattedTime, H.trigger("change", this.input), typeof this.change == "function" && this.change(n.formattedTime)), e.target.value = s;
|
|
3148
3166
|
},
|
|
3149
3167
|
/**
|
|
3150
3168
|
* Handles input focus - select all text for easy editing.
|
|
@@ -3162,7 +3180,7 @@ const zo = O(
|
|
|
3162
3180
|
handleTimeSelect({ hour: e, minute: t, meridian: s }) {
|
|
3163
3181
|
if (e && (this.state.hour = e), t && (this.state.minute = t), s && (this.state.meridian = s), this.state.hour && this.state.minute && this.state.meridian) {
|
|
3164
3182
|
const n = `${this.state.hour}:${this.state.minute} ${this.state.meridian}`;
|
|
3165
|
-
this.state.selectedTime = n, this.state.open = !1, this.input.value = n,
|
|
3183
|
+
this.state.selectedTime = n, this.state.open = !1, this.input.value = n, H.trigger("change", this.input), typeof this.change == "function" && this.change(n);
|
|
3166
3184
|
}
|
|
3167
3185
|
},
|
|
3168
3186
|
/**
|
|
@@ -3171,10 +3189,10 @@ const zo = O(
|
|
|
3171
3189
|
* @returns {object}
|
|
3172
3190
|
*/
|
|
3173
3191
|
render() {
|
|
3174
|
-
return
|
|
3192
|
+
return l(
|
|
3175
3193
|
{ class: "relative w-full max-w-[320px]" },
|
|
3176
3194
|
[
|
|
3177
|
-
|
|
3195
|
+
Nn({
|
|
3178
3196
|
toggleOpen: this.toggleOpen.bind(this),
|
|
3179
3197
|
bind: this.bind,
|
|
3180
3198
|
required: this.required,
|
|
@@ -3182,18 +3200,18 @@ const zo = O(
|
|
|
3182
3200
|
handleInputFocus: this.handleInputFocus.bind(this),
|
|
3183
3201
|
placeholder: this.placeholder
|
|
3184
3202
|
}),
|
|
3185
|
-
|
|
3203
|
+
Fn({
|
|
3186
3204
|
handleTimeSelect: this.handleTimeSelect.bind(this)
|
|
3187
3205
|
})
|
|
3188
3206
|
]
|
|
3189
3207
|
);
|
|
3190
3208
|
}
|
|
3191
3209
|
}
|
|
3192
|
-
),
|
|
3210
|
+
), Ln = (e, t) => l({ class: `hidden md:flex items-start justify-center w-6 h-6 mr-3 ${t}` }, [
|
|
3193
3211
|
x({ size: "lg" }, e)
|
|
3194
|
-
]),
|
|
3212
|
+
]), Rn = ({ title: e }) => ee({ class: "flex flex-auto items-center" }, [
|
|
3195
3213
|
Z({ class: "text-lg font-semibold" }, e)
|
|
3196
|
-
]),
|
|
3214
|
+
]), No = i((e, t) => yt(
|
|
3197
3215
|
{
|
|
3198
3216
|
class: `fixed pullUpIn z-30 w-[98%] border md:w-full max-w-lg bg-popover text-foreground shadow-lg duration-200
|
|
3199
3217
|
rounded-lg flex flex-auto flex-col
|
|
@@ -3203,28 +3221,28 @@ const zo = O(
|
|
|
3203
3221
|
aria: { expanded: ["open"] }
|
|
3204
3222
|
},
|
|
3205
3223
|
[
|
|
3206
|
-
|
|
3224
|
+
l({ class: "flex flex-auto p-6 pb-12 md:pb-6" }, [
|
|
3207
3225
|
// Icon and content
|
|
3208
3226
|
// @ts-ignore
|
|
3209
|
-
e.icon &&
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3227
|
+
e.icon && Ln(e.icon, e.iconColor),
|
|
3228
|
+
l({ class: "flex flex-auto flex-col gap-4" }, [
|
|
3229
|
+
l({ class: "flex flex-auto flex-col gap-y-2" }, [
|
|
3230
|
+
Rn(e),
|
|
3213
3231
|
// @ts-ignore
|
|
3214
3232
|
e.description && k({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, e.description),
|
|
3215
|
-
|
|
3233
|
+
l({ class: "flex flex-auto flex-col text-sm text-muted-foreground" }, t)
|
|
3216
3234
|
]),
|
|
3217
3235
|
// @ts-ignore
|
|
3218
3236
|
e.buttons && xe({ class: "flex flex-col-reverse sm:flex-row sm:justify-end mt-6 gap-2 sm:gap-0 sm:gap-x-2" }, e.buttons)
|
|
3219
3237
|
])
|
|
3220
3238
|
])
|
|
3221
3239
|
]
|
|
3222
|
-
)),
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3240
|
+
)), Fo = i((e, t = []) => l({ class: "w-full max-w-md p-6 m-auto" }, [
|
|
3241
|
+
ot({ class: "flex flex-auto flex-col" }, [
|
|
3242
|
+
l({ class: "flex flex-auto flex-col gap-y-4" }, [
|
|
3243
|
+
l({ class: "flex flex-auto items-center justify-center" }, [
|
|
3226
3244
|
// @ts-ignore
|
|
3227
|
-
e.icon &&
|
|
3245
|
+
e.icon && l({ class: "w-16 h-16 mb-2 text-primary" }, [
|
|
3228
3246
|
// @ts-ignore
|
|
3229
3247
|
x({ size: "lg" }, e.icon)
|
|
3230
3248
|
])
|
|
@@ -3253,25 +3271,25 @@ i(({ value: e, label: t }) => v({
|
|
|
3253
3271
|
const An = (e, t) => {
|
|
3254
3272
|
const s = e.toggleAllSelectedRows();
|
|
3255
3273
|
t.state.checked = !s;
|
|
3256
|
-
},
|
|
3257
|
-
|
|
3258
|
-
]),
|
|
3274
|
+
}, jn = (e) => Xe({ class: `cursor-pointer py-3 px-4 text-base w-10 ${e.class || ""}` }, [
|
|
3275
|
+
G((t) => new Kt({ class: "mr-2", onChange: (s, n) => An(t, n) }))
|
|
3276
|
+
]), En = ({ align: e, sortable: t, key: s, label: n, sort: a, class: o }) => {
|
|
3259
3277
|
const r = e || "justify-start";
|
|
3260
3278
|
return Xe({
|
|
3261
|
-
class: `cursor-pointer py-3 px-4 text-base ${
|
|
3279
|
+
class: `cursor-pointer py-3 px-4 text-base ${o || ""}`,
|
|
3262
3280
|
click: t && (() => a(s))
|
|
3263
3281
|
}, [
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
t &&
|
|
3282
|
+
l({ class: `flex flex-auto w-full items-center ${r}` }, [
|
|
3283
|
+
f(n),
|
|
3284
|
+
t && U({ class: "ml-2", html: g.arrows.upDown })
|
|
3267
3285
|
])
|
|
3268
3286
|
]);
|
|
3269
|
-
}, De = (e) =>
|
|
3270
|
-
|
|
3287
|
+
}, De = (e) => wt([
|
|
3288
|
+
vt({
|
|
3271
3289
|
class: "text-muted-foreground border-b",
|
|
3272
3290
|
map: [
|
|
3273
3291
|
e.headers,
|
|
3274
|
-
(t) => t.label === "checkbox" ?
|
|
3292
|
+
(t) => t.label === "checkbox" ? jn({ toggle: e.toggle }) : En({
|
|
3275
3293
|
align: t.align,
|
|
3276
3294
|
sortable: t.sortable,
|
|
3277
3295
|
key: t.key,
|
|
@@ -3280,17 +3298,17 @@ const An = (e, t) => {
|
|
|
3280
3298
|
})
|
|
3281
3299
|
]
|
|
3282
3300
|
})
|
|
3283
|
-
]),
|
|
3301
|
+
]), _n = ({ key: e, rows: t, selectRow: s, rowItem: n, emptyState: a, skeleton: o, columnCount: r }) => new Dt({
|
|
3284
3302
|
cache: "list",
|
|
3285
3303
|
key: e,
|
|
3286
3304
|
items: t,
|
|
3287
3305
|
rowItem: (c) => n(c, s),
|
|
3288
3306
|
class: "divide-y divide-border",
|
|
3289
3307
|
emptyState: a,
|
|
3290
|
-
skeleton:
|
|
3308
|
+
skeleton: o,
|
|
3291
3309
|
columnCount: r
|
|
3292
3310
|
});
|
|
3293
|
-
class
|
|
3311
|
+
class it extends S {
|
|
3294
3312
|
/**
|
|
3295
3313
|
* Initializes component data.
|
|
3296
3314
|
*
|
|
@@ -3298,7 +3316,7 @@ class rt extends S {
|
|
|
3298
3316
|
*/
|
|
3299
3317
|
setData() {
|
|
3300
3318
|
let t = this.rows && this.rows.length > 0;
|
|
3301
|
-
return (this.loadMoreItems || this.tableData) && !t && (t = null), new
|
|
3319
|
+
return (this.loadMoreItems || this.tableData) && !t && (t = null), new N({
|
|
3302
3320
|
selectedRows: [],
|
|
3303
3321
|
// @ts-ignore
|
|
3304
3322
|
hasItems: t,
|
|
@@ -3350,7 +3368,7 @@ class rt extends S {
|
|
|
3350
3368
|
selectRow(t) {
|
|
3351
3369
|
const s = t.selected ?? !1;
|
|
3352
3370
|
t.selected = !s;
|
|
3353
|
-
const n = this.data.get("selectedRows"), a = t.selected ? [...n, t] : n.filter((
|
|
3371
|
+
const n = this.data.get("selectedRows"), a = t.selected ? [...n, t] : n.filter((o) => o !== t);
|
|
3354
3372
|
this.data.selectedRows = a, this.updateSelected();
|
|
3355
3373
|
}
|
|
3356
3374
|
/**
|
|
@@ -3368,15 +3386,15 @@ class rt extends S {
|
|
|
3368
3386
|
*/
|
|
3369
3387
|
render() {
|
|
3370
3388
|
const t = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
3371
|
-
return
|
|
3372
|
-
|
|
3373
|
-
|
|
3389
|
+
return l({ class: "w-full flex flex-auto flex-col" }, [
|
|
3390
|
+
X("hasItems", (n) => n === !1 && this.emptyState ? this.emptyState() : null),
|
|
3391
|
+
l({ class: `w-full rounded-md ${t} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
3374
3392
|
ke({ class: "w-full" }, [
|
|
3375
3393
|
// @ts-ignore
|
|
3376
3394
|
this.headers && De({ headers: this.headers, sort: (n) => this.sortRows(n) }),
|
|
3377
3395
|
// @ts-ignore
|
|
3378
3396
|
this.customHeader ?? null,
|
|
3379
|
-
|
|
3397
|
+
_n({
|
|
3380
3398
|
// @ts-ignore
|
|
3381
3399
|
key: this.key,
|
|
3382
3400
|
// @ts-ignore
|
|
@@ -3455,7 +3473,7 @@ class rt extends S {
|
|
|
3455
3473
|
this.data.selectedRows = [];
|
|
3456
3474
|
}
|
|
3457
3475
|
}
|
|
3458
|
-
const Hn = (e) => new
|
|
3476
|
+
const Hn = (e) => new It({
|
|
3459
3477
|
cache: "list",
|
|
3460
3478
|
loadMoreItems: e.loadMoreItems,
|
|
3461
3479
|
offset: e.offset,
|
|
@@ -3469,7 +3487,7 @@ const Hn = (e) => new Dt({
|
|
|
3469
3487
|
skeleton: e.skeleton,
|
|
3470
3488
|
columnCount: e.columnCount
|
|
3471
3489
|
});
|
|
3472
|
-
class
|
|
3490
|
+
class Un extends it {
|
|
3473
3491
|
/**
|
|
3474
3492
|
* Renders the DataTable component.
|
|
3475
3493
|
*
|
|
@@ -3477,9 +3495,9 @@ class _n extends rt {
|
|
|
3477
3495
|
*/
|
|
3478
3496
|
render() {
|
|
3479
3497
|
const t = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
3480
|
-
return
|
|
3481
|
-
|
|
3482
|
-
|
|
3498
|
+
return l({ class: "w-full flex flex-auto flex-col" }, [
|
|
3499
|
+
X("hasItems", (n) => n === !1 && this.emptyState ? this.emptyState() : null),
|
|
3500
|
+
l({ class: `w-full rounded-md ${t} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
3483
3501
|
ke({ class: "w-full" }, [
|
|
3484
3502
|
// @ts-ignore
|
|
3485
3503
|
this.headers && De({ headers: this.headers, sort: (n) => this.sortRows(n) }),
|
|
@@ -3523,7 +3541,7 @@ class _n extends rt {
|
|
|
3523
3541
|
this.list.refresh();
|
|
3524
3542
|
}
|
|
3525
3543
|
}
|
|
3526
|
-
const
|
|
3544
|
+
const Lo = i((e) => new Un(
|
|
3527
3545
|
{
|
|
3528
3546
|
// @ts-ignore
|
|
3529
3547
|
cache: e.cache ?? "list",
|
|
@@ -3556,7 +3574,7 @@ const Fo = i((e) => new _n(
|
|
|
3556
3574
|
// @ts-ignore
|
|
3557
3575
|
skeleton: e.skeleton
|
|
3558
3576
|
}
|
|
3559
|
-
)),
|
|
3577
|
+
)), Yn = (e) => new Tt({
|
|
3560
3578
|
cache: "list",
|
|
3561
3579
|
scrollContainer: e.scrollContainer,
|
|
3562
3580
|
loadMoreItems: e.loadMoreItems,
|
|
@@ -3571,7 +3589,7 @@ const Fo = i((e) => new _n(
|
|
|
3571
3589
|
skeleton: e.skeleton,
|
|
3572
3590
|
columnCount: e.columnCount
|
|
3573
3591
|
});
|
|
3574
|
-
class
|
|
3592
|
+
class Vn extends it {
|
|
3575
3593
|
/**
|
|
3576
3594
|
* Renders the DataTable component.
|
|
3577
3595
|
*
|
|
@@ -3579,15 +3597,15 @@ class Yn extends rt {
|
|
|
3579
3597
|
*/
|
|
3580
3598
|
render() {
|
|
3581
3599
|
const t = this.border !== !1 ? "border" : "", s = this.getHeaderColCount();
|
|
3582
|
-
return
|
|
3583
|
-
|
|
3584
|
-
|
|
3600
|
+
return l({ class: "w-full flex flex-auto flex-col" }, [
|
|
3601
|
+
X("hasItems", (n) => n === !1 && this.emptyState ? this.emptyState() : null),
|
|
3602
|
+
l({ class: `w-full rounded-md ${t} overflow-x-auto`, onSet: ["hasItems", { hidden: !1 }] }, [
|
|
3585
3603
|
ke({ class: "w-full" }, [
|
|
3586
3604
|
// @ts-ignore
|
|
3587
3605
|
this.headers && De({ headers: this.headers, sort: (n) => this.sortRows(n) }),
|
|
3588
3606
|
// @ts-ignore
|
|
3589
3607
|
this.customHeader ?? null,
|
|
3590
|
-
|
|
3608
|
+
Yn({
|
|
3591
3609
|
// @ts-ignore
|
|
3592
3610
|
scrollContainer: this.scrollContainer,
|
|
3593
3611
|
// @ts-ignore
|
|
@@ -3627,7 +3645,7 @@ class Yn extends rt {
|
|
|
3627
3645
|
this.list.refresh();
|
|
3628
3646
|
}
|
|
3629
3647
|
}
|
|
3630
|
-
const
|
|
3648
|
+
const Ro = i((e) => new Vn(
|
|
3631
3649
|
{
|
|
3632
3650
|
// @ts-ignore
|
|
3633
3651
|
cache: e.cache ?? "list",
|
|
@@ -3662,28 +3680,28 @@ const Lo = i((e) => new Yn(
|
|
|
3662
3680
|
// @ts-ignore
|
|
3663
3681
|
skeleton: e.skeleton
|
|
3664
3682
|
}
|
|
3665
|
-
)), Wn = i(({ name: e, email: t }) =>
|
|
3683
|
+
)), Wn = i(({ name: e, email: t }) => l({ class: "min-w-0 flex-auto" }, [
|
|
3666
3684
|
k({ class: "text-base font-semibold leading-6 m-0" }, e),
|
|
3667
3685
|
k({ class: "truncate text-sm leading-5 text-muted-foreground m-0" }, t)
|
|
3668
|
-
])),
|
|
3669
|
-
|
|
3670
|
-
|
|
3686
|
+
])), qn = () => l({ class: "flex items-center gap-x-1.5" }, [
|
|
3687
|
+
l({ class: "flex-none rounded-full bg-emerald-500/20 p-1" }, [
|
|
3688
|
+
l({ class: "h-1.5 w-1.5 rounded-full bg-emerald-500" })
|
|
3671
3689
|
]),
|
|
3672
3690
|
k({ class: "text-xs leading-5 text-gray-500" }, "Online")
|
|
3673
|
-
]),
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
]),
|
|
3691
|
+
]), Gn = (e) => k({ class: "text-xs leading-5 text-muted-foreground" }, [
|
|
3692
|
+
f("Last seen "),
|
|
3693
|
+
kt({ datetime: e }, "3h ago")
|
|
3694
|
+
]), Kn = (e, t) => e === "online" ? qn() : Gn(t), Qn = i(({ role: e, lastSeen: t, status: s }) => l({ class: "hidden shrink-0 sm:flex sm:flex-col sm:items-end" }, [
|
|
3677
3695
|
k({ class: "text-sm leading-6 m-0" }, e),
|
|
3678
|
-
|
|
3679
|
-
])),
|
|
3680
|
-
|
|
3696
|
+
Kn(s, t)
|
|
3697
|
+
])), Jn = (e) => e.split(" ").map((s) => s[0]).join(""), Xn = i((e) => we({ class: "fadeIn flex justify-between gap-x-6 py-4 px-4 rounded-md hover:bg-muted/50" }, [
|
|
3698
|
+
l({ class: "flex min-w-0 gap-x-4" }, [
|
|
3681
3699
|
// @ts-ignore
|
|
3682
|
-
|
|
3700
|
+
Fs({ src: e.image, alt: e.name, fallbackText: Jn(e.name) }),
|
|
3683
3701
|
// @ts-ignore
|
|
3684
3702
|
Wn({ name: e.name, email: e.email })
|
|
3685
3703
|
]),
|
|
3686
|
-
|
|
3704
|
+
Qn({
|
|
3687
3705
|
// @ts-ignore
|
|
3688
3706
|
role: e.role,
|
|
3689
3707
|
// @ts-ignore
|
|
@@ -3691,16 +3709,16 @@ const Lo = i((e) => new Yn(
|
|
|
3691
3709
|
// @ts-ignore
|
|
3692
3710
|
status: e.status
|
|
3693
3711
|
})
|
|
3694
|
-
])), Ao = i((e) => new
|
|
3712
|
+
])), Ao = i((e) => new Pt({
|
|
3695
3713
|
cache: "list",
|
|
3696
3714
|
key: "name",
|
|
3697
3715
|
// @ts-ignore
|
|
3698
3716
|
items: e.users,
|
|
3699
3717
|
role: "list",
|
|
3700
3718
|
class: "divide-y divide-border",
|
|
3701
|
-
rowItem:
|
|
3719
|
+
rowItem: Xn
|
|
3702
3720
|
}));
|
|
3703
|
-
class
|
|
3721
|
+
class Zn extends S {
|
|
3704
3722
|
/**
|
|
3705
3723
|
* This will declare the props for the compiler.
|
|
3706
3724
|
*
|
|
@@ -3761,15 +3779,15 @@ class Xn extends S {
|
|
|
3761
3779
|
});
|
|
3762
3780
|
}
|
|
3763
3781
|
}
|
|
3764
|
-
const
|
|
3782
|
+
const ea = i(({ options: e, click: t }, s) => ({
|
|
3765
3783
|
tag: "li",
|
|
3766
3784
|
...{
|
|
3767
3785
|
class: `relative flex flex-row w-auto text-left p-0 transition-all cursor-pointer min-w-[48px] option${e ? " sub" : ""}`,
|
|
3768
3786
|
click: t
|
|
3769
3787
|
},
|
|
3770
3788
|
children: s
|
|
3771
|
-
})),
|
|
3772
|
-
t &&
|
|
3789
|
+
})), ta = (e, t = null, s = !1) => [
|
|
3790
|
+
t && l({
|
|
3773
3791
|
class: "icon w-12 rounded-md flex items-center justify-center min-w-12",
|
|
3774
3792
|
onState: ["selected", {
|
|
3775
3793
|
selected: !0
|
|
@@ -3777,8 +3795,8 @@ const Zn = i(({ options: e, click: t }, s) => ({
|
|
|
3777
3795
|
}, [
|
|
3778
3796
|
x({ size: "sm" }, t)
|
|
3779
3797
|
]),
|
|
3780
|
-
|
|
3781
|
-
s &&
|
|
3798
|
+
Y({ class: "label flex flex-auto text-sm items-center cursor-pointer whitespace-nowrap" }, e),
|
|
3799
|
+
s && f(
|
|
3782
3800
|
{
|
|
3783
3801
|
class: "flex justify-center items-center px-1 transition-all text-muted-foreground mr-2",
|
|
3784
3802
|
onState: [
|
|
@@ -3791,11 +3809,11 @@ const Zn = i(({ options: e, click: t }, s) => ({
|
|
|
3791
3809
|
]
|
|
3792
3810
|
},
|
|
3793
3811
|
[
|
|
3794
|
-
x({ size: "xs" },
|
|
3812
|
+
x({ size: "xs" }, g.chevron.single.down)
|
|
3795
3813
|
]
|
|
3796
3814
|
)
|
|
3797
3815
|
];
|
|
3798
|
-
class
|
|
3816
|
+
class ct extends S {
|
|
3799
3817
|
/**
|
|
3800
3818
|
* This will declare the props for the compiler.
|
|
3801
3819
|
*
|
|
@@ -3812,7 +3830,7 @@ class it extends S {
|
|
|
3812
3830
|
*/
|
|
3813
3831
|
render() {
|
|
3814
3832
|
const t = !this.options && this.callBack;
|
|
3815
|
-
return
|
|
3833
|
+
return ea(
|
|
3816
3834
|
{ options: this.options, click: t },
|
|
3817
3835
|
[
|
|
3818
3836
|
this.addLink()
|
|
@@ -3826,8 +3844,8 @@ class it extends S {
|
|
|
3826
3844
|
* @protected
|
|
3827
3845
|
*/
|
|
3828
3846
|
addLink() {
|
|
3829
|
-
const t = this.options && this.options.length > 0, s = this.content ||
|
|
3830
|
-
return this.href ? new
|
|
3847
|
+
const t = this.options && this.options.length > 0, s = this.content || ta(String(this.label), this.icon, t);
|
|
3848
|
+
return this.href ? new St(
|
|
3831
3849
|
{
|
|
3832
3850
|
class: "flex flex-auto flex-row rounded-md transition-all overflow-x-hidden",
|
|
3833
3851
|
cache: "link",
|
|
@@ -3836,7 +3854,7 @@ class it extends S {
|
|
|
3836
3854
|
exact: this.exact || !1
|
|
3837
3855
|
},
|
|
3838
3856
|
s
|
|
3839
|
-
) : new
|
|
3857
|
+
) : new Zn({
|
|
3840
3858
|
class: "flex flex-auto flex-row rounded-md transition-all overflow-x-hidden",
|
|
3841
3859
|
cache: "link",
|
|
3842
3860
|
checkCallBack: this.checkCallBack
|
|
@@ -3854,10 +3872,10 @@ class it extends S {
|
|
|
3854
3872
|
this.link.update(t);
|
|
3855
3873
|
}
|
|
3856
3874
|
}
|
|
3857
|
-
const
|
|
3875
|
+
const sa = i(({ map: e }, t) => te({ class: "navigation-group flex flex-col gap-2 list-none m-0 py-2 px-0", map: e }, [
|
|
3858
3876
|
Ke({ class: "text-muted-foreground text-sm py-0 px-4 whitespace-nowrap" }, t)
|
|
3859
3877
|
]));
|
|
3860
|
-
class
|
|
3878
|
+
class na extends S {
|
|
3861
3879
|
/**
|
|
3862
3880
|
* This will declare the props for the compiler.
|
|
3863
3881
|
*
|
|
@@ -3906,7 +3924,7 @@ class sa extends S {
|
|
|
3906
3924
|
*/
|
|
3907
3925
|
addGroup(t) {
|
|
3908
3926
|
const s = this.mapOptions(t.options);
|
|
3909
|
-
return
|
|
3927
|
+
return sa({ map: s }, t.group);
|
|
3910
3928
|
}
|
|
3911
3929
|
/**
|
|
3912
3930
|
* This will add a link.
|
|
@@ -3915,10 +3933,10 @@ class sa extends S {
|
|
|
3915
3933
|
* @returns {object}
|
|
3916
3934
|
*/
|
|
3917
3935
|
addLink(t) {
|
|
3918
|
-
return new
|
|
3936
|
+
return new ct(t);
|
|
3919
3937
|
}
|
|
3920
3938
|
}
|
|
3921
|
-
class
|
|
3939
|
+
class dt extends na {
|
|
3922
3940
|
onCreated() {
|
|
3923
3941
|
this.links = [];
|
|
3924
3942
|
}
|
|
@@ -3929,7 +3947,7 @@ class ct extends sa {
|
|
|
3929
3947
|
* @returns {object}
|
|
3930
3948
|
*/
|
|
3931
3949
|
setupSubNav(t) {
|
|
3932
|
-
return new
|
|
3950
|
+
return new la(
|
|
3933
3951
|
{
|
|
3934
3952
|
parentLink: t,
|
|
3935
3953
|
options: t.options
|
|
@@ -3953,7 +3971,7 @@ class ct extends sa {
|
|
|
3953
3971
|
* @returns {object}
|
|
3954
3972
|
*/
|
|
3955
3973
|
addLink(t) {
|
|
3956
|
-
const s = new
|
|
3974
|
+
const s = new ct(t);
|
|
3957
3975
|
if (this.links.push(s), !s.options)
|
|
3958
3976
|
return s;
|
|
3959
3977
|
const n = this.addSubNav(s);
|
|
@@ -3964,11 +3982,11 @@ class ct extends sa {
|
|
|
3964
3982
|
};
|
|
3965
3983
|
}
|
|
3966
3984
|
}
|
|
3967
|
-
const
|
|
3985
|
+
const fe = /* @__PURE__ */ new Map(), aa = (e, t) => (fe.has(e) || fe.set(e, new RegExp(`${e}($|/|\\.).*`)), fe.get(e).test(t)), oa = (e, t) => {
|
|
3968
3986
|
const s = e.link.panel.pathname;
|
|
3969
|
-
return !s && e.isSelected() ? !0 : e.exact ? t === s :
|
|
3987
|
+
return !s && e.isSelected() ? !0 : e.exact ? t === s : aa(s, t);
|
|
3970
3988
|
};
|
|
3971
|
-
class
|
|
3989
|
+
class la extends dt {
|
|
3972
3990
|
/**
|
|
3973
3991
|
* This will declare the props for the compiler.
|
|
3974
3992
|
*
|
|
@@ -3997,7 +4015,7 @@ class oa extends ct {
|
|
|
3997
4015
|
addWatcher() {
|
|
3998
4016
|
return {
|
|
3999
4017
|
watch: {
|
|
4000
|
-
value: ["[[path]]",
|
|
4018
|
+
value: ["[[path]]", q.data],
|
|
4001
4019
|
callBack: this.updateLinks.bind(this)
|
|
4002
4020
|
}
|
|
4003
4021
|
};
|
|
@@ -4038,7 +4056,7 @@ class oa extends ct {
|
|
|
4038
4056
|
* @returns {void}
|
|
4039
4057
|
*/
|
|
4040
4058
|
afterSetup() {
|
|
4041
|
-
const t =
|
|
4059
|
+
const t = q.data.path;
|
|
4042
4060
|
this.updateLinks(t);
|
|
4043
4061
|
}
|
|
4044
4062
|
/**
|
|
@@ -4050,27 +4068,27 @@ class oa extends ct {
|
|
|
4050
4068
|
updateLinks(t) {
|
|
4051
4069
|
let s = !1;
|
|
4052
4070
|
for (const n of this.links)
|
|
4053
|
-
if (n.rendered && (s =
|
|
4071
|
+
if (n.rendered && (s = oa(n, t), s === !0))
|
|
4054
4072
|
break;
|
|
4055
4073
|
this.parentLink.update(s);
|
|
4056
4074
|
}
|
|
4057
4075
|
}
|
|
4058
|
-
const
|
|
4076
|
+
const ra = (e) => pe({ class: "text-lg ml-2" }, e), ia = (e) => l({ class: "sticky flex flex-row items-center bg-popover lg:hidden top-0 z-10 border-0 border-b" }, [
|
|
4059
4077
|
b({
|
|
4060
4078
|
variant: "icon",
|
|
4061
4079
|
class: "m-2",
|
|
4062
4080
|
click: (t, { state: s }) => s.toggle("open"),
|
|
4063
|
-
icon:
|
|
4081
|
+
icon: g.arrows.left
|
|
4064
4082
|
}),
|
|
4065
|
-
e.title &&
|
|
4066
|
-
]),
|
|
4083
|
+
e.title && ra(e.title)
|
|
4084
|
+
]), ca = () => l({
|
|
4067
4085
|
class: `
|
|
4068
4086
|
absolute inset-0 bg-black/40 z-[-1] fadeIn
|
|
4069
4087
|
transition-opacity duration-200
|
|
4070
4088
|
`,
|
|
4071
4089
|
click: (e, { state: t }) => t.open = !1
|
|
4072
4090
|
});
|
|
4073
|
-
class
|
|
4091
|
+
class da extends S {
|
|
4074
4092
|
/**
|
|
4075
4093
|
* This will declare the props for the compiler.
|
|
4076
4094
|
*
|
|
@@ -4085,21 +4103,21 @@ class ca extends S {
|
|
|
4085
4103
|
* @returns {object}
|
|
4086
4104
|
*/
|
|
4087
4105
|
render() {
|
|
4088
|
-
return
|
|
4106
|
+
return l({
|
|
4089
4107
|
class: "fixed inset-0 z-50",
|
|
4090
4108
|
style: "[[typeClass]]"
|
|
4091
4109
|
}, [
|
|
4092
|
-
|
|
4110
|
+
ca(),
|
|
4093
4111
|
// Popover Content
|
|
4094
|
-
|
|
4112
|
+
l({
|
|
4095
4113
|
class: `
|
|
4096
4114
|
absolute popIn w-auto p-0 bg-popover m-auto shadow-lg rounded-md top-0 bottom-0 left-2 right-2 max-h-[85vh] text-inherit block
|
|
4097
4115
|
`,
|
|
4098
4116
|
dataSet: ["open", ["expanded", !0, "true"]]
|
|
4099
4117
|
}, [
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4118
|
+
l({ class: "flex flex-auto flex-col w-full h-full overflow-y-auto max-h-[85vh] rounded-md bg-popover border" }, [
|
|
4119
|
+
ia({ title: this.title }),
|
|
4120
|
+
l({ class: "flex flex-auto flex-col" }, this.children)
|
|
4103
4121
|
])
|
|
4104
4122
|
])
|
|
4105
4123
|
]);
|
|
@@ -4136,23 +4154,23 @@ class ca extends S {
|
|
|
4136
4154
|
this.container = app.root;
|
|
4137
4155
|
}
|
|
4138
4156
|
}
|
|
4139
|
-
const
|
|
4157
|
+
const ut = () => b({ class: "m-2", variant: "ghost", addState() {
|
|
4140
4158
|
return {
|
|
4141
4159
|
open: !1
|
|
4142
4160
|
};
|
|
4143
4161
|
}, click: (e, { state: t }) => t.toggle("open") }, [
|
|
4144
|
-
x({},
|
|
4145
|
-
]),
|
|
4146
|
-
|
|
4147
|
-
e.title &&
|
|
4148
|
-
]),
|
|
4162
|
+
x({}, g.bar.three)
|
|
4163
|
+
]), ua = (e) => pe({ class: "text-lg ml-2" }, e), ha = (e) => l({ class: "flex flex-auto flex-row items-center lg:hidden" }, [
|
|
4164
|
+
ut(),
|
|
4165
|
+
e.title && ua(e.title)
|
|
4166
|
+
]), ht = (e, t) => e.map((s) => s.options ? { ...s, options: ht(s.options, t) } : { ...s, callBack: t }), ft = (e) => l({ class: "bg-background flex flex-auto flex-col w-full relative" }, [
|
|
4149
4167
|
M(
|
|
4150
4168
|
"open",
|
|
4151
4169
|
(t) => t ? [
|
|
4152
|
-
new
|
|
4153
|
-
|
|
4154
|
-
const n = (
|
|
4155
|
-
return new
|
|
4170
|
+
new da({ title: e.title }, [
|
|
4171
|
+
G(({ state: s }) => {
|
|
4172
|
+
const n = (o) => s.open = !1, a = ht(e.options, n);
|
|
4173
|
+
return new dt(
|
|
4156
4174
|
{
|
|
4157
4175
|
options: a
|
|
4158
4176
|
}
|
|
@@ -4161,23 +4179,23 @@ const dt = () => b({ class: "m-2", variant: "ghost", addState() {
|
|
|
4161
4179
|
])
|
|
4162
4180
|
] : null
|
|
4163
4181
|
)
|
|
4164
|
-
]),
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4182
|
+
]), jo = i((e) => l({ cache: "mobileNav", class: "inline-flex relative lg:hidden" }, [
|
|
4183
|
+
l([
|
|
4184
|
+
ut(),
|
|
4185
|
+
ft(e)
|
|
4168
4186
|
])
|
|
4169
|
-
])),
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4187
|
+
])), Eo = i((e) => l({ cache: "mobileNav", class: "flex flex-auto flex-col w-full relative lg:hidden" }, [
|
|
4188
|
+
l({ class: "flex flex-auto flex-col w-full" }, [
|
|
4189
|
+
ha(e),
|
|
4190
|
+
ft(e)
|
|
4173
4191
|
])
|
|
4174
|
-
])),
|
|
4192
|
+
])), _o = i((e) => {
|
|
4175
4193
|
const t = e.margin || "m-4 ml-0";
|
|
4176
|
-
return
|
|
4194
|
+
return l({ class: `flex-none ${t}` }, [
|
|
4177
4195
|
b({ variant: "back", class: "ghost", ...e })
|
|
4178
4196
|
]);
|
|
4179
4197
|
});
|
|
4180
|
-
class
|
|
4198
|
+
class fa extends S {
|
|
4181
4199
|
/**
|
|
4182
4200
|
* This will declare the props for the compiler.
|
|
4183
4201
|
*
|
|
@@ -4192,7 +4210,7 @@ class ha extends S {
|
|
|
4192
4210
|
* @returns {object}
|
|
4193
4211
|
*/
|
|
4194
4212
|
render() {
|
|
4195
|
-
return
|
|
4213
|
+
return l(
|
|
4196
4214
|
{
|
|
4197
4215
|
class: this.getClassName(),
|
|
4198
4216
|
// @ts-ignore
|
|
@@ -4261,7 +4279,7 @@ class ha extends S {
|
|
|
4261
4279
|
* @returns {object}
|
|
4262
4280
|
*/
|
|
4263
4281
|
addBody() {
|
|
4264
|
-
return
|
|
4282
|
+
return l({ class: "body fadeIn flex flex-auto flex-col bg-background" }, this.getContents());
|
|
4265
4283
|
}
|
|
4266
4284
|
/**
|
|
4267
4285
|
* This will get the body contents.
|
|
@@ -4278,7 +4296,7 @@ et.addType("dockableOverlay", (e) => {
|
|
|
4278
4296
|
const t = e.component;
|
|
4279
4297
|
t && t.rendered === !0 && t.state.docked === !1 && t.destroy();
|
|
4280
4298
|
});
|
|
4281
|
-
class Ho extends
|
|
4299
|
+
class Ho extends fa {
|
|
4282
4300
|
/**
|
|
4283
4301
|
* This will stop presistence.
|
|
4284
4302
|
*
|
|
@@ -4294,7 +4312,7 @@ class Ho extends ha {
|
|
|
4294
4312
|
*/
|
|
4295
4313
|
render() {
|
|
4296
4314
|
const t = this.container;
|
|
4297
|
-
return
|
|
4315
|
+
return l(
|
|
4298
4316
|
{
|
|
4299
4317
|
// @ts-ignore
|
|
4300
4318
|
animateIn: this.animateIn ?? null,
|
|
@@ -4383,7 +4401,7 @@ class Ho extends ha {
|
|
|
4383
4401
|
this.state.docked = this.canDock();
|
|
4384
4402
|
}
|
|
4385
4403
|
}
|
|
4386
|
-
const
|
|
4404
|
+
const ga = i(({ index: e, click: t, state: s }, n) => we({
|
|
4387
4405
|
class: "p-2 cursor-pointer hover:bg-muted/50",
|
|
4388
4406
|
onState: [
|
|
4389
4407
|
[s, "selectedIndex", {
|
|
@@ -4392,11 +4410,11 @@ const fa = i(({ index: e, click: t, state: s }, n) => we({
|
|
|
4392
4410
|
}]
|
|
4393
4411
|
],
|
|
4394
4412
|
click: () => t(e)
|
|
4395
|
-
}, n)),
|
|
4413
|
+
}, n)), ma = i(({ selectOption: e, state: t }) => te({
|
|
4396
4414
|
class: "border rounded-md list-none m-0 p-0 max-h-[400px] overflow-y-auto",
|
|
4397
|
-
for: ["filteredOptions", (s, n) =>
|
|
4398
|
-
})),
|
|
4399
|
-
|
|
4415
|
+
for: ["filteredOptions", (s, n) => ga({ index: n, click: e, state: t }, s.label)]
|
|
4416
|
+
})), ba = i((e) => l({ class: "relative flex flex-auto items-center" }, [
|
|
4417
|
+
L({
|
|
4400
4418
|
cache: "input",
|
|
4401
4419
|
// @ts-ignore
|
|
4402
4420
|
class: e.class ?? "",
|
|
@@ -4416,11 +4434,11 @@ const fa = i(({ index: e, click: t, state: s }, n) => we({
|
|
|
4416
4434
|
]
|
|
4417
4435
|
}),
|
|
4418
4436
|
// @ts-ignore
|
|
4419
|
-
e.icon &&
|
|
4437
|
+
e.icon && l({ class: "absolute flex right-0 mr-2" }, [
|
|
4420
4438
|
// @ts-ignore
|
|
4421
4439
|
x({ size: "sm" }, e.icon)
|
|
4422
4440
|
])
|
|
4423
|
-
])),
|
|
4441
|
+
])), xa = (e) => l({
|
|
4424
4442
|
class: "relative flex fle-auto flex-col",
|
|
4425
4443
|
onState: ["open", (t, s, n) => {
|
|
4426
4444
|
if (t)
|
|
@@ -4430,10 +4448,10 @@ const fa = i(({ index: e, click: t, state: s }, n) => we({
|
|
|
4430
4448
|
button: n.input,
|
|
4431
4449
|
size: "xl"
|
|
4432
4450
|
}, [
|
|
4433
|
-
|
|
4451
|
+
ma(e)
|
|
4434
4452
|
]);
|
|
4435
4453
|
}]
|
|
4436
|
-
}),
|
|
4454
|
+
}), Uo = B(
|
|
4437
4455
|
{
|
|
4438
4456
|
/**
|
|
4439
4457
|
* This will set up the data object.
|
|
@@ -4442,7 +4460,7 @@ const fa = i(({ index: e, click: t, state: s }, n) => we({
|
|
|
4442
4460
|
*/
|
|
4443
4461
|
setData() {
|
|
4444
4462
|
const e = this.options || [];
|
|
4445
|
-
return new
|
|
4463
|
+
return new N({
|
|
4446
4464
|
options: e,
|
|
4447
4465
|
filteredOptions: e
|
|
4448
4466
|
});
|
|
@@ -4529,8 +4547,8 @@ const fa = i(({ index: e, click: t, state: s }, n) => we({
|
|
|
4529
4547
|
* @returns {object} - The rendered component.
|
|
4530
4548
|
*/
|
|
4531
4549
|
render() {
|
|
4532
|
-
return
|
|
4533
|
-
|
|
4550
|
+
return l({ class: "relative w-full max-w-md" }, [
|
|
4551
|
+
ba({
|
|
4534
4552
|
// @ts-ignore
|
|
4535
4553
|
state: this.state,
|
|
4536
4554
|
// @ts-ignore
|
|
@@ -4542,7 +4560,7 @@ const fa = i(({ index: e, click: t, state: s }, n) => we({
|
|
|
4542
4560
|
// @ts-ignore
|
|
4543
4561
|
handleKeyDown: this.handleKeyDown.bind(this)
|
|
4544
4562
|
}),
|
|
4545
|
-
|
|
4563
|
+
xa({
|
|
4546
4564
|
// @ts-ignore
|
|
4547
4565
|
state: this.state,
|
|
4548
4566
|
// @ts-ignore
|
|
@@ -4553,13 +4571,13 @@ const fa = i(({ index: e, click: t, state: s }, n) => we({
|
|
|
4553
4571
|
]);
|
|
4554
4572
|
}
|
|
4555
4573
|
}
|
|
4556
|
-
),
|
|
4557
|
-
const t = e.icon ??
|
|
4558
|
-
return
|
|
4574
|
+
), Yo = i((e) => {
|
|
4575
|
+
const t = e.icon ?? g.magnifyingGlass.default;
|
|
4576
|
+
return l({
|
|
4559
4577
|
// @ts-ignore
|
|
4560
4578
|
class: `relative flex items-center w-full rounded-xl bg-muted/30 focus-within:ring-2 focus-within:ring-ring transition-all ${e.containerClass || ""}`
|
|
4561
4579
|
}, [
|
|
4562
|
-
|
|
4580
|
+
l({ class: "absolute left-4 flex items-center pointer-events-none text-muted-foreground" }, [
|
|
4563
4581
|
x({ size: "sm" }, t)
|
|
4564
4582
|
]),
|
|
4565
4583
|
p({
|
|
@@ -4589,7 +4607,7 @@ const fa = i(({ index: e, click: t, state: s }, n) => we({
|
|
|
4589
4607
|
})
|
|
4590
4608
|
]);
|
|
4591
4609
|
});
|
|
4592
|
-
class
|
|
4610
|
+
class pa extends S {
|
|
4593
4611
|
/**
|
|
4594
4612
|
* This will declare the props for the compiler.
|
|
4595
4613
|
*
|
|
@@ -4604,10 +4622,10 @@ class xa extends S {
|
|
|
4604
4622
|
* @returns {object}
|
|
4605
4623
|
*/
|
|
4606
4624
|
render() {
|
|
4607
|
-
return
|
|
4625
|
+
return l({ class: `${this.class || ""}` }, this.children);
|
|
4608
4626
|
}
|
|
4609
4627
|
}
|
|
4610
|
-
class
|
|
4628
|
+
class ya extends pa {
|
|
4611
4629
|
/**
|
|
4612
4630
|
* This will be called every time the route
|
|
4613
4631
|
* is activated.
|
|
@@ -4617,15 +4635,15 @@ class pa extends xa {
|
|
|
4617
4635
|
update(t) {
|
|
4618
4636
|
}
|
|
4619
4637
|
}
|
|
4620
|
-
const
|
|
4638
|
+
const wa = i((e, t) => (e.class = "basic-page pt-[80px] sm:pt-0 flex flex-auto flex-col " + (e.class || ""), {
|
|
4621
4639
|
tag: "section",
|
|
4622
4640
|
...e,
|
|
4623
4641
|
children: t
|
|
4624
|
-
})),
|
|
4625
|
-
|
|
4642
|
+
})), va = i(({ title: e, description: t }) => ee({ class: "sm:py-8 px-6 md:px-5 flex flex-col" }, [
|
|
4643
|
+
Ct({ class: "scroll-m-20 text-3xl font-bold tracking-tight" }, e),
|
|
4626
4644
|
t && k({ class: "text-base text-muted-foreground py-2 max-w-[700px]" }, t)
|
|
4627
4645
|
]));
|
|
4628
|
-
class
|
|
4646
|
+
class Vo extends ya {
|
|
4629
4647
|
/**
|
|
4630
4648
|
* This will declare the props for the compiler.
|
|
4631
4649
|
*
|
|
@@ -4640,8 +4658,8 @@ class Yo extends pa {
|
|
|
4640
4658
|
* @returns {object}
|
|
4641
4659
|
*/
|
|
4642
4660
|
render() {
|
|
4643
|
-
return
|
|
4644
|
-
|
|
4661
|
+
return wa([
|
|
4662
|
+
va({
|
|
4645
4663
|
title: this.title,
|
|
4646
4664
|
description: this.description
|
|
4647
4665
|
}),
|
|
@@ -4650,131 +4668,131 @@ class Yo extends pa {
|
|
|
4650
4668
|
}
|
|
4651
4669
|
}
|
|
4652
4670
|
export {
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4671
|
+
bo as $,
|
|
4672
|
+
ho as A,
|
|
4673
|
+
_o as B,
|
|
4674
|
+
cn as C,
|
|
4675
|
+
it as D,
|
|
4676
|
+
po as E,
|
|
4677
|
+
No as F,
|
|
4660
4678
|
Ho as G,
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4679
|
+
To as H,
|
|
4680
|
+
Lo as I,
|
|
4681
|
+
Ya as J,
|
|
4682
|
+
Fo as K,
|
|
4683
|
+
Fa as L,
|
|
4684
|
+
no as M,
|
|
4685
|
+
Ra as N,
|
|
4668
4686
|
ne as O,
|
|
4669
|
-
|
|
4687
|
+
ja as P,
|
|
4670
4688
|
Aa as Q,
|
|
4671
4689
|
Ha as R,
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4690
|
+
La as S,
|
|
4691
|
+
_a as T,
|
|
4692
|
+
Ea as U,
|
|
4693
|
+
ot as V,
|
|
4694
|
+
fo as W,
|
|
4695
|
+
mo as X,
|
|
4696
|
+
go as Y,
|
|
4697
|
+
ks as Z,
|
|
4698
|
+
ys as _,
|
|
4699
|
+
Fs as a,
|
|
4700
|
+
Xn as a$,
|
|
4701
|
+
Ut as a0,
|
|
4702
|
+
xs as a1,
|
|
4703
|
+
ps as a2,
|
|
4704
|
+
ws as a3,
|
|
4705
|
+
_ as a4,
|
|
4706
|
+
Vo as a5,
|
|
4707
|
+
En as a6,
|
|
4708
|
+
to as a7,
|
|
4709
|
+
ge as a8,
|
|
4710
|
+
cs as a9,
|
|
4711
|
+
ia as aA,
|
|
4712
|
+
ro as aB,
|
|
4695
4713
|
Wa as aC,
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4714
|
+
Dn as aD,
|
|
4715
|
+
ao as aE,
|
|
4716
|
+
io as aF,
|
|
4717
|
+
co as aG,
|
|
4718
|
+
Ro as aH,
|
|
4719
|
+
Uo as aI,
|
|
4720
|
+
ba as aJ,
|
|
4721
|
+
oo as aK,
|
|
4722
|
+
Yo as aL,
|
|
4723
|
+
yo as aM,
|
|
4724
|
+
la as aN,
|
|
4707
4725
|
De as aO,
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4726
|
+
Ua as aP,
|
|
4727
|
+
Va as aQ,
|
|
4728
|
+
Co as aR,
|
|
4729
|
+
Ga as aS,
|
|
4730
|
+
Oo as aT,
|
|
4731
|
+
ha as aU,
|
|
4732
|
+
So as aV,
|
|
4733
|
+
Ba as aW,
|
|
4734
|
+
uo as aX,
|
|
4717
4735
|
x as aY,
|
|
4718
|
-
|
|
4736
|
+
eo as aZ,
|
|
4719
4737
|
Ao as a_,
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4738
|
+
$o as aa,
|
|
4739
|
+
dt as ab,
|
|
4740
|
+
L as ac,
|
|
4723
4741
|
Ht as ad,
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4742
|
+
Na as ae,
|
|
4743
|
+
Do as af,
|
|
4744
|
+
ct as ag,
|
|
4745
|
+
wa as ah,
|
|
4728
4746
|
Be as ai,
|
|
4729
4747
|
Ws as aj,
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4748
|
+
jo as ak,
|
|
4749
|
+
Eo as al,
|
|
4750
|
+
ln as am,
|
|
4751
|
+
Qa as an,
|
|
4752
|
+
ut as ao,
|
|
4753
|
+
Zn as ap,
|
|
4754
|
+
na as aq,
|
|
4755
|
+
sa as ar,
|
|
4756
|
+
da as as,
|
|
4757
|
+
ko as at,
|
|
4758
|
+
Xa as au,
|
|
4759
|
+
fa as av,
|
|
4760
|
+
pa as aw,
|
|
4761
|
+
Za as ax,
|
|
4762
|
+
qs as ay,
|
|
4745
4763
|
ae as az,
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4764
|
+
ca as b,
|
|
4765
|
+
st as b0,
|
|
4766
|
+
F as b1,
|
|
4767
|
+
Ja as b2,
|
|
4768
|
+
Qs as b3,
|
|
4769
|
+
bs as b4,
|
|
4770
|
+
Pa as b5,
|
|
4771
|
+
Ta as b6,
|
|
4772
|
+
O as b7,
|
|
4773
|
+
vo as b8,
|
|
4756
4774
|
Ma as c,
|
|
4757
|
-
|
|
4758
|
-
|
|
4775
|
+
ya as d,
|
|
4776
|
+
Io as e,
|
|
4759
4777
|
b as f,
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4778
|
+
sn as g,
|
|
4779
|
+
_t as h,
|
|
4780
|
+
Kt as i,
|
|
4781
|
+
jn as j,
|
|
4782
|
+
Oa as k,
|
|
4783
|
+
lo as l,
|
|
4784
|
+
za as m,
|
|
4785
|
+
so as n,
|
|
4786
|
+
wo as o,
|
|
4787
|
+
Po as p,
|
|
4788
|
+
Gs as q,
|
|
4771
4789
|
Mo as r,
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4790
|
+
_n as s,
|
|
4791
|
+
qa as t,
|
|
4792
|
+
Bo as u,
|
|
4793
|
+
zo as v,
|
|
4794
|
+
Ka as w,
|
|
4795
|
+
de as x,
|
|
4796
|
+
an as y,
|
|
4797
|
+
xo as z
|
|
4780
4798
|
};
|