@myghf/ui 0.4.0 → 0.5.1
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/README.md +32 -0
- package/dist/components/data-table/DataTable.vue.d.ts +3 -0
- package/dist/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/select/Select.vue.d.ts.map +1 -1
- package/dist/index.js +583 -556
- package/dist/index.js.map +1 -1
- package/dist/nuxt.d.ts +49 -2
- package/dist/nuxt.d.ts.map +1 -1
- package/dist/nuxt.js +82 -16
- package/dist/nuxt.js.map +1 -1
- package/package.json +5 -1
package/dist/index.js
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
1
|
import { clsx as e } from "clsx";
|
|
2
2
|
import { twMerge as t } from "tailwind-merge";
|
|
3
3
|
import { CalendarDate as n, CalendarDateTime as r, getLocalTimeZone as i } from "@internationalized/date";
|
|
4
|
-
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, mergeProps as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onBeforeUpdate as y, onMounted as b, openBlock as x, provide as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as E, toDisplayString as D, unref as O, useAttrs as k, useId as ee, useSlots as A, vModelSelect as
|
|
5
|
-
import * as
|
|
6
|
-
import { Calendar as
|
|
7
|
-
import { tv as
|
|
8
|
-
import { CheckboxIndicator as
|
|
9
|
-
import { FlexRender as
|
|
4
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, mergeProps as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onBeforeUpdate as y, onMounted as b, openBlock as x, provide as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as E, toDisplayString as D, unref as O, useAttrs as k, useId as ee, useSlots as A, vModelSelect as te, vModelText as j, vShow as ne, watch as M, withCtx as N, withDirectives as P, withModifiers as F } from "vue";
|
|
5
|
+
import * as I from "lucide-vue-next";
|
|
6
|
+
import { Calendar as re, Check as L, ChevronDown as R, ChevronLeft as ie, ChevronRight as z, ChevronUp as ae, ChevronsLeft as oe, ChevronsRight as B, ChevronsUpDown as se, Clock as ce, Eye as le, EyeOff as ue, Moon as de, Search as fe, Sun as pe, X as V } from "lucide-vue-next";
|
|
7
|
+
import { tv as me } from "tailwind-variants";
|
|
8
|
+
import { CheckboxIndicator as he, CheckboxRoot as ge, DialogClose as _e, DialogContent as ve, DialogDescription as ye, DialogOverlay as be, DialogPortal as xe, DialogRoot as Se, DialogTitle as Ce, DialogTrigger as we, DropdownMenuContent as Te, DropdownMenuGroup as Ee, DropdownMenuItem as De, DropdownMenuLabel as Oe, DropdownMenuPortal as ke, DropdownMenuRoot as Ae, DropdownMenuSeparator as je, DropdownMenuTrigger as Me, NumberFieldDecrement as Ne, NumberFieldIncrement as Pe, NumberFieldInput as Fe, NumberFieldRoot as Ie, PopoverContent as Le, PopoverPortal as Re, PopoverRoot as ze, PopoverTrigger as Be, RadioGroupIndicator as Ve, RadioGroupItem as He, RadioGroupRoot as Ue, SelectContent as We, SelectItem as Ge, SelectItemIndicator as Ke, SelectItemText as qe, SelectPortal as Je, SelectRoot as Ye, SelectTrigger as Xe, SelectValue as Ze, TabsContent as Qe, TabsList as $e, TabsRoot as et, TabsTrigger as tt, ToastAction as nt, ToastClose as rt, ToastDescription as it, ToastProvider as at, ToastRoot as ot, ToastTitle as st, ToastViewport as ct, TreeItem as lt, TreeRoot as ut, VisuallyHidden as dt } from "reka-ui";
|
|
9
|
+
import { FlexRender as ft, createExpandedRowModel as pt, createPaginatedRowModel as mt, createSortedRowModel as ht, rowExpandingFeature as gt, rowPaginationFeature as _t, rowSortingFeature as vt, sortFns as yt, tableFeatures as bt, useTable as xt } from "@tanstack/vue-table";
|
|
10
10
|
//#region src/lib/cn.ts
|
|
11
|
-
function
|
|
11
|
+
function H(...n) {
|
|
12
12
|
return t(e(n));
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/lib/date.ts
|
|
16
|
-
function
|
|
16
|
+
function St(e) {
|
|
17
17
|
return new n(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Ct(e) {
|
|
20
20
|
return e instanceof r ? e.toDate(i()) : new Date(e.year, e.month - 1, e.day);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function wt(e) {
|
|
23
23
|
let [t, n] = e.split(":").map(Number);
|
|
24
24
|
return t * 60 + (n || 0);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function U(e) {
|
|
27
27
|
let t = Math.floor(e / 60), n = e % 60;
|
|
28
28
|
return `${String(t).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Tt(e, t) {
|
|
31
31
|
let n = new Date(e);
|
|
32
|
-
return n.setHours(Math.floor(
|
|
32
|
+
return n.setHours(Math.floor(wt(t) / 60), wt(t) % 60, 0, 0), n;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function W(e, t) {
|
|
35
35
|
return !e || !t || e.getTime() <= t.getTime() ? [e, t] : [t, e];
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Et(e) {
|
|
38
38
|
let t = e.getMonth() + 1, n = e.getDate();
|
|
39
39
|
return `${e.getFullYear()}-${String(t).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Dt(e) {
|
|
42
42
|
return e === "12" ? Array.from({ length: 12 }, (e, t) => t + 1) : Array.from({ length: 24 }, (e, t) => t);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Ot(e) {
|
|
45
45
|
let t = Number.isFinite(e) && e > 0 ? e : 1, n = [];
|
|
46
46
|
for (let e = 0; e < 60; e += t) n.push(e);
|
|
47
47
|
return n;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function G(e) {
|
|
50
50
|
let t = (Math.trunc(e) % 24 + 24) % 24, n = t < 12 ? "am" : "pm";
|
|
51
51
|
return {
|
|
52
52
|
hour: t % 12 == 0 ? 12 : t % 12,
|
|
53
53
|
meridiem: n
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function kt(e, t) {
|
|
57
57
|
let n = Math.trunc(e) % 12;
|
|
58
58
|
return t === "pm" ? n + 12 : n;
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region src/lib/locale.ts
|
|
62
|
-
function
|
|
62
|
+
function At(e) {
|
|
63
63
|
try {
|
|
64
64
|
let t = new Intl.Locale(e), n = t.weekInfo ?? t.getWeekInfo?.();
|
|
65
65
|
if (n && typeof n.firstDay == "number") return n.firstDay % 7;
|
|
66
66
|
} catch {}
|
|
67
67
|
return 1;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function jt(e, t) {
|
|
70
70
|
let n = (Math.trunc(t) % 7 + 7) % 7, r = new Intl.DateTimeFormat(e, { weekday: "short" });
|
|
71
71
|
return Array.from({ length: 7 }, (e, t) => r.format(new Date(2026, 0, 4 + (n + t) % 7)));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Mt(e, t) {
|
|
74
74
|
return new Intl.DateTimeFormat(t, {
|
|
75
75
|
month: "long",
|
|
76
76
|
year: "numeric"
|
|
77
77
|
}).format(e);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function K(e, t) {
|
|
80
80
|
return new Intl.DateTimeFormat(t, { dateStyle: "medium" }).format(e);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Nt(e, t, n) {
|
|
83
83
|
let r = n === "24" ? {
|
|
84
84
|
hour: "2-digit",
|
|
85
85
|
minute: "2-digit",
|
|
@@ -93,10 +93,10 @@ function At(e, t, n) {
|
|
|
93
93
|
}
|
|
94
94
|
//#endregion
|
|
95
95
|
//#region src/lib/number.ts
|
|
96
|
-
function
|
|
96
|
+
function Pt(e) {
|
|
97
97
|
return e == null || !Number.isFinite(e) ? null : e;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Ft(e) {
|
|
100
100
|
return {
|
|
101
101
|
...e.currency ? {
|
|
102
102
|
style: "currency",
|
|
@@ -108,17 +108,17 @@ function Mt(e) {
|
|
|
108
108
|
}
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region src/lib/icons.ts
|
|
111
|
-
function
|
|
111
|
+
function It(e) {
|
|
112
112
|
return e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
114
|
+
var Lt = "circle";
|
|
115
|
+
function Rt(e) {
|
|
116
116
|
let t = e.trim();
|
|
117
|
-
return t ? t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase() :
|
|
117
|
+
return t ? t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase() : Lt;
|
|
118
118
|
}
|
|
119
119
|
//#endregion
|
|
120
120
|
//#region src/lib/tones.ts
|
|
121
|
-
var
|
|
121
|
+
var q = {
|
|
122
122
|
info: {
|
|
123
123
|
soft: "bg-primary-100 text-primary-800 dark:bg-primary-900/40 dark:text-primary-200",
|
|
124
124
|
outline: "border border-primary-300 text-primary-800 dark:border-primary-700 dark:text-primary-200",
|
|
@@ -149,14 +149,14 @@ var J = {
|
|
|
149
149
|
icon: "text-muted",
|
|
150
150
|
role: "status"
|
|
151
151
|
}
|
|
152
|
-
},
|
|
153
|
-
function
|
|
152
|
+
}, zt = "myghf-theme", Bt = "both", Vt = "system";
|
|
153
|
+
function J() {
|
|
154
154
|
return typeof window < "u" && typeof document < "u";
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
return !
|
|
156
|
+
function Ht() {
|
|
157
|
+
return !J() || typeof window.matchMedia != "function" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Ut(e) {
|
|
160
160
|
try {
|
|
161
161
|
let t = window.localStorage.getItem(e);
|
|
162
162
|
return t === "light" || t === "dark" || t === "system" ? t : null;
|
|
@@ -164,22 +164,22 @@ function Bt(e) {
|
|
|
164
164
|
return null;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Wt(e) {
|
|
168
168
|
return {
|
|
169
|
-
storageKey: e.storageKey ??
|
|
170
|
-
attribute: e.attribute ??
|
|
171
|
-
defaultMode: e.defaultMode ??
|
|
169
|
+
storageKey: e.storageKey ?? zt,
|
|
170
|
+
attribute: e.attribute ?? Bt,
|
|
171
|
+
defaultMode: e.defaultMode ?? Vt
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
let { storageKey: t, attribute: n, defaultMode: r } =
|
|
174
|
+
function Gt(e = {}) {
|
|
175
|
+
let { storageKey: t, attribute: n, defaultMode: r } = Wt(e), i = J() ? Ut(t) ?? r : r, a = C(i), s = o(() => a.value === "system" ? Ht() : a.value), c = o(() => s.value === "dark");
|
|
176
176
|
function l() {
|
|
177
|
-
if (!
|
|
177
|
+
if (!J()) return;
|
|
178
178
|
let e = c.value, t = document.documentElement;
|
|
179
179
|
n === "both" || n === "class" ? t.classList.toggle("dark", e) : t.classList.remove("dark"), (n === "both" || n === "data-theme") && e ? t.setAttribute("data-theme", "dark") : t.removeAttribute("data-theme");
|
|
180
180
|
}
|
|
181
181
|
function u(e) {
|
|
182
|
-
if (
|
|
182
|
+
if (J()) try {
|
|
183
183
|
e === "system" ? window.localStorage.removeItem(t) : window.localStorage.setItem(t, e);
|
|
184
184
|
} catch {}
|
|
185
185
|
}
|
|
@@ -196,7 +196,7 @@ function Ht(e = {}) {
|
|
|
196
196
|
d("light");
|
|
197
197
|
}
|
|
198
198
|
function h() {
|
|
199
|
-
if (a.value = "system",
|
|
199
|
+
if (a.value = "system", J()) try {
|
|
200
200
|
window.localStorage.removeItem(t);
|
|
201
201
|
} catch {}
|
|
202
202
|
l();
|
|
@@ -212,20 +212,20 @@ function Ht(e = {}) {
|
|
|
212
212
|
reset: h
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
var
|
|
216
|
-
function
|
|
217
|
-
return
|
|
215
|
+
var Kt = null;
|
|
216
|
+
function qt(e) {
|
|
217
|
+
return Kt || (Kt = Gt(e), Kt);
|
|
218
218
|
}
|
|
219
219
|
//#endregion
|
|
220
220
|
//#region src/components/theme-toggle/ThemeToggle.vue?vue&type=script&setup=true&lang.ts
|
|
221
|
-
var
|
|
221
|
+
var Jt = ["aria-label", "aria-pressed"], Yt = /* @__PURE__ */ p({
|
|
222
222
|
__name: "ThemeToggle",
|
|
223
223
|
props: {
|
|
224
224
|
size: { default: "default" },
|
|
225
225
|
label: { default: "Toggle theme" }
|
|
226
226
|
},
|
|
227
227
|
setup(e) {
|
|
228
|
-
let t = e, { isDark: n, toggle: r } =
|
|
228
|
+
let t = e, { isDark: n, toggle: r } = qt(), i = {
|
|
229
229
|
sm: "h-8 px-3 text-xs",
|
|
230
230
|
default: "h-9 px-4",
|
|
231
231
|
lg: "h-10 px-6"
|
|
@@ -242,16 +242,16 @@ var Gt = ["aria-label", "aria-pressed"], Kt = /* @__PURE__ */ p({
|
|
|
242
242
|
"aria-label": e.label,
|
|
243
243
|
"aria-pressed": O(n),
|
|
244
244
|
onClick: i[0] ||= (e) => O(r)()
|
|
245
|
-
}, [O(n) ? (x(), s(O(
|
|
245
|
+
}, [O(n) ? (x(), s(O(pe), { key: 0 })) : (x(), s(O(de), { key: 1 }))], 10, Jt));
|
|
246
246
|
}
|
|
247
|
-
}),
|
|
247
|
+
}), Y = /* @__PURE__ */ p({
|
|
248
248
|
__name: "Icon",
|
|
249
249
|
props: {
|
|
250
250
|
name: {},
|
|
251
251
|
size: { default: 16 }
|
|
252
252
|
},
|
|
253
253
|
setup(e) {
|
|
254
|
-
let t = e, n = o(() =>
|
|
254
|
+
let t = e, n = o(() => I[It(Rt(t.name))] ?? I.Circle);
|
|
255
255
|
return (t, r) => (x(), s(E(n.value), {
|
|
256
256
|
size: e.size,
|
|
257
257
|
"aria-hidden": "true",
|
|
@@ -259,12 +259,12 @@ var Gt = ["aria-label", "aria-pressed"], Kt = /* @__PURE__ */ p({
|
|
|
259
259
|
name: e.name
|
|
260
260
|
}, null, 8, ["size", "name"]));
|
|
261
261
|
}
|
|
262
|
-
}),
|
|
262
|
+
}), Xt = [
|
|
263
263
|
"type",
|
|
264
264
|
"disabled",
|
|
265
265
|
"data-loading",
|
|
266
266
|
"aria-busy"
|
|
267
|
-
],
|
|
267
|
+
], X = /* @__PURE__ */ p({
|
|
268
268
|
__name: "Button",
|
|
269
269
|
props: {
|
|
270
270
|
variant: { default: "default" },
|
|
@@ -284,7 +284,7 @@ var Gt = ["aria-label", "aria-pressed"], Kt = /* @__PURE__ */ p({
|
|
|
284
284
|
iconPos: { default: "start" }
|
|
285
285
|
},
|
|
286
286
|
setup(e) {
|
|
287
|
-
let t =
|
|
287
|
+
let t = me({
|
|
288
288
|
base: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 data-[loading=true]:cursor-not-allowed",
|
|
289
289
|
variants: {
|
|
290
290
|
variant: {
|
|
@@ -317,35 +317,35 @@ var Gt = ["aria-label", "aria-pressed"], Kt = /* @__PURE__ */ p({
|
|
|
317
317
|
size: e.size
|
|
318
318
|
})
|
|
319
319
|
}, O(r)), [
|
|
320
|
-
e.loading ? (x(), s(
|
|
320
|
+
e.loading ? (x(), s(Y, {
|
|
321
321
|
key: 0,
|
|
322
322
|
name: "loader-circle",
|
|
323
323
|
class: "animate-spin",
|
|
324
324
|
"aria-hidden": "true"
|
|
325
|
-
})) : e.iconPos === "start" && e.icon ? (x(), s(
|
|
325
|
+
})) : e.iconPos === "start" && e.icon ? (x(), s(Y, {
|
|
326
326
|
key: 1,
|
|
327
327
|
name: e.icon,
|
|
328
328
|
"aria-hidden": "true"
|
|
329
329
|
}, null, 8, ["name"])) : c("", !0),
|
|
330
330
|
T(n.$slots, "default", {}, () => [d(D(e.label), 1)]),
|
|
331
|
-
e.iconTrailing ? (x(), s(
|
|
331
|
+
e.iconTrailing ? (x(), s(Y, {
|
|
332
332
|
key: 2,
|
|
333
333
|
name: e.iconTrailing,
|
|
334
334
|
"aria-hidden": "true"
|
|
335
|
-
}, null, 8, ["name"])) : e.iconPos === "end" && e.icon ? (x(), s(
|
|
335
|
+
}, null, 8, ["name"])) : e.iconPos === "end" && e.icon ? (x(), s(Y, {
|
|
336
336
|
key: 3,
|
|
337
337
|
name: e.icon,
|
|
338
338
|
"aria-hidden": "true"
|
|
339
339
|
}, null, 8, ["name"])) : c("", !0)
|
|
340
|
-
], 16,
|
|
340
|
+
], 16, Xt));
|
|
341
341
|
}
|
|
342
|
-
}),
|
|
343
|
-
function
|
|
344
|
-
return m(
|
|
342
|
+
}), Zt = Symbol("myghf-form-field");
|
|
343
|
+
function Z() {
|
|
344
|
+
return m(Zt, null);
|
|
345
345
|
}
|
|
346
346
|
//#endregion
|
|
347
347
|
//#region src/components/input/Input.vue?vue&type=script&setup=true&lang.ts
|
|
348
|
-
var
|
|
348
|
+
var Qt = { class: "relative w-full" }, $t = [
|
|
349
349
|
"id",
|
|
350
350
|
"type",
|
|
351
351
|
"name",
|
|
@@ -356,7 +356,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
356
356
|
"required",
|
|
357
357
|
"aria-invalid",
|
|
358
358
|
"aria-describedby"
|
|
359
|
-
],
|
|
359
|
+
], en = /* @__PURE__ */ p({
|
|
360
360
|
__name: "Input",
|
|
361
361
|
props: {
|
|
362
362
|
modelValue: {},
|
|
@@ -380,9 +380,9 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
380
380
|
},
|
|
381
381
|
emits: ["update:modelValue"],
|
|
382
382
|
setup(e, { expose: t, emit: n }) {
|
|
383
|
-
let r = e, i = n, a = k(), d = C(), f =
|
|
384
|
-
return t({ focus: () => d.value?.focus() }), (t, n) => (x(), l("div",
|
|
385
|
-
e.leadingIcon ? (x(), s(
|
|
383
|
+
let r = e, i = n, a = k(), d = C(), f = Z(), p = o(() => r.id ?? f?.id.value), m = o(() => r.invalid ?? f?.invalid.value ?? !1), g = o(() => r.required ?? f?.required.value ?? !1), _ = o(() => f?.describedBy.value);
|
|
384
|
+
return t({ focus: () => d.value?.focus() }), (t, n) => (x(), l("div", Qt, [
|
|
385
|
+
e.leadingIcon ? (x(), s(Y, {
|
|
386
386
|
key: 0,
|
|
387
387
|
name: e.leadingIcon,
|
|
388
388
|
class: "pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2 text-muted"
|
|
@@ -407,24 +407,24 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
407
407
|
e.trailingIcon ? "pe-9" : "pe-3",
|
|
408
408
|
m.value ? "border-error-500 focus-visible:ring-error-500" : ""
|
|
409
409
|
]
|
|
410
|
-
}, O(a), { onInput: n[0] ||= (e) => i("update:modelValue", e.target.value) }), null, 16,
|
|
411
|
-
e.trailingIcon ? (x(), s(
|
|
410
|
+
}, O(a), { onInput: n[0] ||= (e) => i("update:modelValue", e.target.value) }), null, 16, $t),
|
|
411
|
+
e.trailingIcon ? (x(), s(Y, {
|
|
412
412
|
key: 1,
|
|
413
413
|
name: e.trailingIcon,
|
|
414
414
|
class: "pointer-events-none absolute end-3 top-1/2 size-4 -translate-y-1/2 text-muted"
|
|
415
415
|
}, null, 8, ["name"])) : c("", !0)
|
|
416
416
|
]));
|
|
417
417
|
}
|
|
418
|
-
}),
|
|
418
|
+
}), tn = {
|
|
419
419
|
key: 0,
|
|
420
420
|
class: "shrink-0 select-none text-muted"
|
|
421
|
-
},
|
|
421
|
+
}, nn = {
|
|
422
422
|
key: 1,
|
|
423
423
|
class: "shrink-0 select-none text-muted"
|
|
424
|
-
},
|
|
424
|
+
}, rn = {
|
|
425
425
|
key: 2,
|
|
426
426
|
class: "ms-1 flex shrink-0 flex-col"
|
|
427
|
-
},
|
|
427
|
+
}, an = /* @__PURE__ */ p({
|
|
428
428
|
inheritAttrs: !1,
|
|
429
429
|
__name: "InputNumber",
|
|
430
430
|
props: {
|
|
@@ -450,7 +450,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
450
450
|
},
|
|
451
451
|
emits: ["update:modelValue"],
|
|
452
452
|
setup(e, { emit: t }) {
|
|
453
|
-
let n = e, r = t, i = k(), a = o(() => Number.isFinite(n.step) && n.step > 0 ? n.step : 1), s = o(() =>
|
|
453
|
+
let n = e, r = t, i = k(), a = o(() => Number.isFinite(n.step) && n.step > 0 ? n.step : 1), s = o(() => Ft({
|
|
454
454
|
currency: n.currency,
|
|
455
455
|
formatOptions: n.formatOptions,
|
|
456
456
|
integer: n.integer
|
|
@@ -465,7 +465,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
465
465
|
e.size === "sm" ? "h-8 text-xs" : e.size === "lg" ? "h-10" : "h-9",
|
|
466
466
|
e.invalid ? "border-error-500 focus-within:ring-error-500" : "",
|
|
467
467
|
e.disabled ? "cursor-not-allowed opacity-50" : ""
|
|
468
|
-
]]) }, [f(O(
|
|
468
|
+
]]) }, [f(O(Ie), {
|
|
469
469
|
"model-value": e.modelValue,
|
|
470
470
|
min: e.min,
|
|
471
471
|
max: e.max,
|
|
@@ -478,11 +478,11 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
478
478
|
id: e.id,
|
|
479
479
|
name: e.name,
|
|
480
480
|
class: "flex min-w-0 flex-1 items-center gap-1",
|
|
481
|
-
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", O(
|
|
481
|
+
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", O(Pt)(e))
|
|
482
482
|
}, {
|
|
483
|
-
default:
|
|
484
|
-
e.prefix ? (x(), l("span",
|
|
485
|
-
f(O(
|
|
483
|
+
default: N(() => [
|
|
484
|
+
e.prefix ? (x(), l("span", tn, D(e.prefix), 1)) : c("", !0),
|
|
485
|
+
f(O(Fe), h(O(i), {
|
|
486
486
|
placeholder: e.placeholder,
|
|
487
487
|
"aria-invalid": e.invalid || void 0,
|
|
488
488
|
"aria-valuetext": u.value,
|
|
@@ -492,15 +492,15 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
492
492
|
"aria-invalid",
|
|
493
493
|
"aria-valuetext"
|
|
494
494
|
]),
|
|
495
|
-
e.suffix ? (x(), l("span",
|
|
496
|
-
e.showButtons ? (x(), l("div",
|
|
497
|
-
default:
|
|
495
|
+
e.suffix ? (x(), l("span", nn, D(e.suffix), 1)) : c("", !0),
|
|
496
|
+
e.showButtons ? (x(), l("div", rn, [f(O(Pe), { class: "flex size-4 items-center justify-center rounded text-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-500 disabled:cursor-not-allowed disabled:opacity-40" }, {
|
|
497
|
+
default: N(() => [f(Y, {
|
|
498
498
|
name: "chevron-up",
|
|
499
499
|
size: 12
|
|
500
500
|
})]),
|
|
501
501
|
_: 1
|
|
502
|
-
}), f(O(
|
|
503
|
-
default:
|
|
502
|
+
}), f(O(Ne), { class: "flex size-4 items-center justify-center rounded text-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-500 disabled:cursor-not-allowed disabled:opacity-40" }, {
|
|
503
|
+
default: N(() => [f(Y, {
|
|
504
504
|
name: "chevron-down",
|
|
505
505
|
size: 12
|
|
506
506
|
})]),
|
|
@@ -522,7 +522,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
522
522
|
"name"
|
|
523
523
|
])], 2));
|
|
524
524
|
}
|
|
525
|
-
}),
|
|
525
|
+
}), on = [
|
|
526
526
|
"id",
|
|
527
527
|
"value",
|
|
528
528
|
"placeholder",
|
|
@@ -531,7 +531,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
531
531
|
"required",
|
|
532
532
|
"aria-invalid",
|
|
533
533
|
"aria-describedby"
|
|
534
|
-
],
|
|
534
|
+
], sn = /* @__PURE__ */ p({
|
|
535
535
|
__name: "Textarea",
|
|
536
536
|
props: {
|
|
537
537
|
modelValue: {},
|
|
@@ -552,7 +552,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
552
552
|
},
|
|
553
553
|
emits: ["update:modelValue"],
|
|
554
554
|
setup(e, { emit: t }) {
|
|
555
|
-
let n = e, r = t, i = k(), a = C(), s =
|
|
555
|
+
let n = e, r = t, i = k(), a = C(), s = Z(), c = C(!1), u = o(() => n.id ?? s?.id.value), d = o(() => n.invalid ?? s?.invalid.value ?? !1), f = o(() => n.required ?? s?.required.value ?? !1), p = o(() => s?.describedBy.value);
|
|
556
556
|
function m() {
|
|
557
557
|
if (!n.autoResize || !a.value) return;
|
|
558
558
|
let e = a.value;
|
|
@@ -567,7 +567,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
567
567
|
function g(e) {
|
|
568
568
|
r("update:modelValue", e.target.value), m();
|
|
569
569
|
}
|
|
570
|
-
return b(m),
|
|
570
|
+
return b(m), M(() => n.modelValue, m, { flush: "post" }), (t, n) => (x(), l("textarea", h({
|
|
571
571
|
ref_key: "el",
|
|
572
572
|
ref: a,
|
|
573
573
|
id: u.value,
|
|
@@ -584,19 +584,19 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
584
584
|
e.autoResize ? "resize-none" : "",
|
|
585
585
|
c.value ? "overflow-y-auto" : ""
|
|
586
586
|
]
|
|
587
|
-
}, O(i), { onInput: g }), null, 16,
|
|
587
|
+
}, O(i), { onInput: g }), null, 16, on));
|
|
588
588
|
}
|
|
589
|
-
}),
|
|
589
|
+
}), cn = { class: "w-full" }, ln = { class: "relative w-full" }, un = [
|
|
590
590
|
"id",
|
|
591
591
|
"type",
|
|
592
592
|
"value",
|
|
593
593
|
"placeholder",
|
|
594
594
|
"disabled"
|
|
595
|
-
],
|
|
595
|
+
], dn = ["disabled"], fn = {
|
|
596
596
|
key: 0,
|
|
597
597
|
class: "mt-1.5 flex items-center gap-1.5",
|
|
598
598
|
"aria-hidden": "true"
|
|
599
|
-
},
|
|
599
|
+
}, pn = /* @__PURE__ */ p({
|
|
600
600
|
__name: "Password",
|
|
601
601
|
props: {
|
|
602
602
|
modelValue: {},
|
|
@@ -617,7 +617,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
617
617
|
let t = 0;
|
|
618
618
|
return e.length >= 8 && t++, e.length >= 12 && t++, /[A-Z]/.test(e) && /[a-z]/.test(e) && t++, /\d/.test(e) && t++, /[^A-Za-z0-9]/.test(e) && t++, Math.max(1, Math.min(4, Math.ceil(t / 5 * 4)));
|
|
619
619
|
});
|
|
620
|
-
return (t, n) => (x(), l("div",
|
|
620
|
+
return (t, n) => (x(), l("div", cn, [u("div", ln, [u("input", h({
|
|
621
621
|
id: e.id,
|
|
622
622
|
type: f.value,
|
|
623
623
|
value: e.modelValue,
|
|
@@ -628,41 +628,41 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
628
628
|
e.invalid ? "border-error-500 focus-visible:ring-error-500" : "",
|
|
629
629
|
"pe-10"
|
|
630
630
|
]
|
|
631
|
-
}, O(i), { onInput: n[0] ||= (e) => r("update:modelValue", e.target.value) }), null, 16,
|
|
631
|
+
}, O(i), { onInput: n[0] ||= (e) => r("update:modelValue", e.target.value) }), null, 16, un), u("button", {
|
|
632
632
|
type: "button",
|
|
633
633
|
disabled: e.disabled,
|
|
634
634
|
"aria-label": "Toggle password visibility",
|
|
635
635
|
class: "absolute end-2 top-1/2 -translate-y-1/2 rounded p-1 text-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
636
636
|
onClick: n[1] ||= (e) => d.value = !d.value
|
|
637
|
-
}, [d.value ? (x(), s(O(
|
|
637
|
+
}, [d.value ? (x(), s(O(ue), {
|
|
638
638
|
key: 0,
|
|
639
639
|
class: "size-4"
|
|
640
|
-
})) : (x(), s(O(
|
|
640
|
+
})) : (x(), s(O(le), {
|
|
641
641
|
key: 1,
|
|
642
642
|
class: "size-4"
|
|
643
|
-
}))], 8,
|
|
643
|
+
}))], 8, dn)]), e.feedback && e.modelValue ? (x(), l("div", fn, [(x(), l(a, null, w(4, (e) => u("span", {
|
|
644
644
|
key: e,
|
|
645
645
|
class: g(["h-1 flex-1 rounded-full transition-colors", e <= p.value ? "bg-success-500" : "bg-surface-muted"])
|
|
646
646
|
}, null, 2)), 64))])) : c("", !0)]));
|
|
647
647
|
}
|
|
648
|
-
}),
|
|
648
|
+
}), mn = ["for"], hn = {
|
|
649
649
|
key: 0,
|
|
650
650
|
class: "text-error-600",
|
|
651
651
|
"aria-hidden": "true"
|
|
652
|
-
},
|
|
652
|
+
}, gn = /* @__PURE__ */ p({
|
|
653
653
|
__name: "Label",
|
|
654
654
|
props: {
|
|
655
655
|
for: {},
|
|
656
656
|
required: { type: Boolean }
|
|
657
657
|
},
|
|
658
658
|
setup(e) {
|
|
659
|
-
let t = e, n =
|
|
659
|
+
let t = e, n = Z(), r = o(() => t.for ?? n?.id.value);
|
|
660
660
|
return (t, n) => (x(), l("label", {
|
|
661
661
|
for: r.value,
|
|
662
662
|
class: "text-sm font-medium text-foreground text-start"
|
|
663
|
-
}, [T(t.$slots, "default"), e.required ? (x(), l("span",
|
|
663
|
+
}, [T(t.$slots, "default"), e.required ? (x(), l("span", hn, "*")) : c("", !0)], 8, mn));
|
|
664
664
|
}
|
|
665
|
-
}),
|
|
665
|
+
}), _n = ["id"], vn = /* @__PURE__ */ p({
|
|
666
666
|
__name: "FormDescription",
|
|
667
667
|
props: { id: {} },
|
|
668
668
|
setup(e) {
|
|
@@ -670,9 +670,9 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
670
670
|
key: 0,
|
|
671
671
|
id: e.id,
|
|
672
672
|
class: "text-sm text-muted"
|
|
673
|
-
}, [T(t.$slots, "default")], 8,
|
|
673
|
+
}, [T(t.$slots, "default")], 8, _n)) : c("", !0);
|
|
674
674
|
}
|
|
675
|
-
}),
|
|
675
|
+
}), yn = ["id"], bn = /* @__PURE__ */ p({
|
|
676
676
|
__name: "FormMessage",
|
|
677
677
|
props: { id: {} },
|
|
678
678
|
setup(e) {
|
|
@@ -681,9 +681,9 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
681
681
|
id: e.id,
|
|
682
682
|
role: "alert",
|
|
683
683
|
class: "text-sm text-error-600"
|
|
684
|
-
}, [T(t.$slots, "default")], 8,
|
|
684
|
+
}, [T(t.$slots, "default")], 8, yn)) : c("", !0);
|
|
685
685
|
}
|
|
686
|
-
}),
|
|
686
|
+
}), xn = { class: "grid gap-2" }, Sn = /* @__PURE__ */ p({
|
|
687
687
|
__name: "FormField",
|
|
688
688
|
props: {
|
|
689
689
|
label: {},
|
|
@@ -706,38 +706,38 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
706
706
|
let e = [];
|
|
707
707
|
return (t.description || n.description) && e.push(`${a.value}-description`), (t.error || n.error) && e.push(`${a.value}-error`), e.length > 0 ? e.join(" ") : void 0;
|
|
708
708
|
});
|
|
709
|
-
return S(
|
|
709
|
+
return S(Zt, {
|
|
710
710
|
id: a,
|
|
711
711
|
describedBy: p,
|
|
712
712
|
invalid: u,
|
|
713
713
|
required: f
|
|
714
|
-
}), (t, n) => (x(), l("div",
|
|
715
|
-
e.label || t.$slots.label ? (x(), s(
|
|
714
|
+
}), (t, n) => (x(), l("div", xn, [
|
|
715
|
+
e.label || t.$slots.label ? (x(), s(gn, {
|
|
716
716
|
key: 0,
|
|
717
717
|
for: a.value,
|
|
718
718
|
required: f.value
|
|
719
719
|
}, {
|
|
720
|
-
default:
|
|
720
|
+
default: N(() => [T(t.$slots, "label", {}, () => [d(D(e.label), 1)])]),
|
|
721
721
|
_: 3
|
|
722
722
|
}, 8, ["for", "required"])) : c("", !0),
|
|
723
723
|
T(t.$slots, "default"),
|
|
724
|
-
e.description || t.$slots.description ? (x(), s(
|
|
724
|
+
e.description || t.$slots.description ? (x(), s(vn, {
|
|
725
725
|
key: 1,
|
|
726
726
|
id: `${a.value}-description`
|
|
727
727
|
}, {
|
|
728
|
-
default:
|
|
728
|
+
default: N(() => [T(t.$slots, "description", {}, () => [d(D(e.description), 1)])]),
|
|
729
729
|
_: 3
|
|
730
730
|
}, 8, ["id"])) : c("", !0),
|
|
731
|
-
e.error || t.$slots.error ? (x(), s(
|
|
731
|
+
e.error || t.$slots.error ? (x(), s(bn, {
|
|
732
732
|
key: 2,
|
|
733
733
|
id: `${a.value}-error`
|
|
734
734
|
}, {
|
|
735
|
-
default:
|
|
735
|
+
default: N(() => [T(t.$slots, "error", {}, () => [d(D(e.error), 1)])]),
|
|
736
736
|
_: 3
|
|
737
737
|
}, 8, ["id"])) : c("", !0)
|
|
738
738
|
]));
|
|
739
739
|
}
|
|
740
|
-
}),
|
|
740
|
+
}), Cn = /* @__PURE__ */ p({
|
|
741
741
|
__name: "Checkbox",
|
|
742
742
|
props: {
|
|
743
743
|
modelValue: {
|
|
@@ -750,15 +750,15 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
750
750
|
emits: ["update:modelValue"],
|
|
751
751
|
setup(e, { emit: t }) {
|
|
752
752
|
let n = t;
|
|
753
|
-
return (t, r) => (x(), s(O(
|
|
753
|
+
return (t, r) => (x(), s(O(ge), {
|
|
754
754
|
id: e.id,
|
|
755
755
|
"model-value": e.modelValue,
|
|
756
756
|
disabled: e.disabled,
|
|
757
757
|
class: "peer size-4 shrink-0 rounded border border-border bg-surface shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-background data-[state=checked]:border-primary-500 data-[state=checked]:bg-primary-500 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
758
758
|
"onUpdate:modelValue": r[0] ||= (e) => n("update:modelValue", e)
|
|
759
759
|
}, {
|
|
760
|
-
default:
|
|
761
|
-
default:
|
|
760
|
+
default: N(() => [f(O(he), { class: "flex items-center justify-center text-white" }, {
|
|
761
|
+
default: N(() => [f(O(L), { class: "size-3.5" })]),
|
|
762
762
|
_: 1
|
|
763
763
|
})]),
|
|
764
764
|
_: 1
|
|
@@ -768,7 +768,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
768
768
|
"disabled"
|
|
769
769
|
]));
|
|
770
770
|
}
|
|
771
|
-
}),
|
|
771
|
+
}), wn = ["aria-label"], Tn = /* @__PURE__ */ p({
|
|
772
772
|
__name: "Tag",
|
|
773
773
|
props: {
|
|
774
774
|
tone: { default: "secondary" },
|
|
@@ -779,8 +779,8 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
779
779
|
emits: ["remove"],
|
|
780
780
|
setup(e, { emit: t }) {
|
|
781
781
|
let n = t;
|
|
782
|
-
return (t, r) => (x(), l("span", { class: g(["inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", O(
|
|
783
|
-
e.icon ? (x(), s(
|
|
782
|
+
return (t, r) => (x(), l("span", { class: g(["inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", O(q)[e.tone].soft]) }, [
|
|
783
|
+
e.icon ? (x(), s(Y, {
|
|
784
784
|
key: 0,
|
|
785
785
|
name: e.icon,
|
|
786
786
|
class: "size-3"
|
|
@@ -791,14 +791,14 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
791
791
|
type: "button",
|
|
792
792
|
"aria-label": e.removeLabel,
|
|
793
793
|
class: "-me-0.5 ms-0.5 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
794
|
-
onClick: r[0] ||=
|
|
795
|
-
}, [f(O(
|
|
794
|
+
onClick: r[0] ||= F((e) => n("remove"), ["stop"])
|
|
795
|
+
}, [f(O(V), { class: "size-3" })], 8, wn)) : c("", !0)
|
|
796
796
|
], 2));
|
|
797
797
|
}
|
|
798
|
-
}),
|
|
798
|
+
}), En = ["role"], Dn = { class: "min-w-0 flex-1" }, On = {
|
|
799
799
|
key: 0,
|
|
800
800
|
class: "font-medium"
|
|
801
|
-
},
|
|
801
|
+
}, kn = ["aria-label"], An = /* @__PURE__ */ p({
|
|
802
802
|
__name: "Alert",
|
|
803
803
|
props: {
|
|
804
804
|
tone: { default: "info" },
|
|
@@ -830,7 +830,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
830
830
|
m !== void 0 && (clearTimeout(m), m = void 0);
|
|
831
831
|
}
|
|
832
832
|
function S(e) {
|
|
833
|
-
y(), !(e <= 0) && (_ = e, h = Date.now() + e, m = setTimeout(
|
|
833
|
+
y(), !(e <= 0) && (_ = e, h = Date.now() + e, m = setTimeout(j, e));
|
|
834
834
|
}
|
|
835
835
|
function w() {
|
|
836
836
|
m !== void 0 && (y(), _ = Math.max(0, h - Date.now()));
|
|
@@ -838,7 +838,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
838
838
|
function E() {
|
|
839
839
|
if (!(a.value || o.value || p.value || m !== void 0) && !(!n.duration || n.duration <= 0)) {
|
|
840
840
|
if (_ <= 0) {
|
|
841
|
-
|
|
841
|
+
j();
|
|
842
842
|
return;
|
|
843
843
|
}
|
|
844
844
|
S(_);
|
|
@@ -853,30 +853,30 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
853
853
|
function A() {
|
|
854
854
|
p.value = !0, w();
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function te() {
|
|
857
857
|
p.value = !1, E();
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function j() {
|
|
860
860
|
a.value || (a.value = !0, y(), r("close"));
|
|
861
861
|
}
|
|
862
862
|
return b(() => {
|
|
863
863
|
n.duration && n.duration > 0 && S(n.duration);
|
|
864
864
|
}), v(y), (t, n) => a.value ? c("", !0) : (x(), l("div", {
|
|
865
865
|
key: 0,
|
|
866
|
-
role: O(
|
|
867
|
-
class: g(["flex w-full items-start gap-3 rounded-lg p-4 text-sm", O(
|
|
866
|
+
role: O(q)[e.tone].role,
|
|
867
|
+
class: g(["flex w-full items-start gap-3 rounded-lg p-4 text-sm", O(q)[e.tone][e.variant]]),
|
|
868
868
|
onMouseenter: k,
|
|
869
869
|
onMouseleave: ee,
|
|
870
870
|
onFocusin: A,
|
|
871
|
-
onFocusout:
|
|
871
|
+
onFocusout: te
|
|
872
872
|
}, [
|
|
873
|
-
T(t.$slots, "icon", {}, () => [e.showIcon ? (x(), s(
|
|
873
|
+
T(t.$slots, "icon", {}, () => [e.showIcon ? (x(), s(Y, {
|
|
874
874
|
key: 0,
|
|
875
875
|
name: e.icon || i[e.tone],
|
|
876
|
-
class: g(["mt-0.5 size-4 shrink-0", O(
|
|
876
|
+
class: g(["mt-0.5 size-4 shrink-0", O(q)[e.tone].icon])
|
|
877
877
|
}, null, 8, ["name", "class"])) : c("", !0)]),
|
|
878
|
-
u("div",
|
|
879
|
-
e.title || t.$slots.title ? (x(), l("p",
|
|
878
|
+
u("div", Dn, [
|
|
879
|
+
e.title || t.$slots.title ? (x(), l("p", On, [T(t.$slots, "title", {}, () => [d(D(e.title), 1)])])) : c("", !0),
|
|
880
880
|
e.description || t.$slots.description ? (x(), l("div", {
|
|
881
881
|
key: 1,
|
|
882
882
|
class: g(["leading-relaxed", e.title || t.$slots.title ? "mt-1" : ""])
|
|
@@ -889,11 +889,11 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
889
889
|
type: "button",
|
|
890
890
|
"aria-label": e.closeLabel,
|
|
891
891
|
class: "-me-1 -mt-1 ms-auto shrink-0 rounded-md p-1 transition-colors hover:bg-black/10 dark:hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
892
|
-
onClick:
|
|
893
|
-
}, [T(t.$slots, "close", {}, () => [f(O(
|
|
894
|
-
], 42,
|
|
892
|
+
onClick: j
|
|
893
|
+
}, [T(t.$slots, "close", {}, () => [f(O(V), { class: "size-4" })])], 8, kn)) : c("", !0)
|
|
894
|
+
], 42, En));
|
|
895
895
|
}
|
|
896
|
-
}),
|
|
896
|
+
}), jn = { class: "sr-only" }, Mn = /* @__PURE__ */ p({
|
|
897
897
|
__name: "Spinner",
|
|
898
898
|
props: {
|
|
899
899
|
size: { default: "default" },
|
|
@@ -905,18 +905,18 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
905
905
|
sm: "size-4",
|
|
906
906
|
default: "size-5",
|
|
907
907
|
lg: "size-6"
|
|
908
|
-
}, r = o(() =>
|
|
908
|
+
}, r = o(() => H("inline-flex items-center", q[t.tone].icon));
|
|
909
909
|
return (t, i) => (x(), l("span", {
|
|
910
910
|
role: "status",
|
|
911
911
|
"aria-live": "polite",
|
|
912
912
|
class: g(r.value)
|
|
913
|
-
}, [f(
|
|
913
|
+
}, [f(Y, {
|
|
914
914
|
name: "loader-circle",
|
|
915
|
-
class: g(O(
|
|
915
|
+
class: g(O(H)("animate-spin", n[e.size])),
|
|
916
916
|
"aria-hidden": "true"
|
|
917
|
-
}, null, 8, ["class"]), u("span",
|
|
917
|
+
}, null, 8, ["class"]), u("span", jn, D(e.label), 1)], 2));
|
|
918
918
|
}
|
|
919
|
-
}),
|
|
919
|
+
}), Nn = /* @__PURE__ */ p({
|
|
920
920
|
inheritAttrs: !1,
|
|
921
921
|
__name: "Skeleton",
|
|
922
922
|
props: {
|
|
@@ -925,7 +925,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
925
925
|
height: {}
|
|
926
926
|
},
|
|
927
927
|
setup(e) {
|
|
928
|
-
let t =
|
|
928
|
+
let t = me({
|
|
929
929
|
base: "animate-pulse bg-surface-muted",
|
|
930
930
|
variants: { rounded: {
|
|
931
931
|
none: "",
|
|
@@ -944,7 +944,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
944
944
|
}
|
|
945
945
|
}, n.$attrs), [T(n.$slots, "default")], 16));
|
|
946
946
|
}
|
|
947
|
-
}),
|
|
947
|
+
}), Pn = ["src", "alt"], Fn = ["role", "aria-label"], In = /* @__PURE__ */ p({
|
|
948
948
|
inheritAttrs: !1,
|
|
949
949
|
__name: "Avatar",
|
|
950
950
|
props: {
|
|
@@ -968,58 +968,58 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
968
968
|
let e = t.alt ?? t.name ?? i.value;
|
|
969
969
|
return e === "" ? void 0 : e;
|
|
970
970
|
}), c = C(!1);
|
|
971
|
-
return
|
|
971
|
+
return M(() => t.src, () => {
|
|
972
972
|
c.value = !1;
|
|
973
973
|
}), (t, n) => e.src && !c.value ? (x(), l("img", h({ key: 0 }, t.$attrs, {
|
|
974
974
|
src: e.src,
|
|
975
975
|
alt: e.alt ?? e.name ?? "",
|
|
976
|
-
class: O(
|
|
976
|
+
class: O(H)(a.value, "shrink-0 rounded-full object-cover"),
|
|
977
977
|
onError: n[0] ||= (e) => c.value = !0
|
|
978
|
-
}), null, 16,
|
|
978
|
+
}), null, 16, Pn)) : (x(), l("span", h({ key: 1 }, t.$attrs, {
|
|
979
979
|
role: s.value ? "img" : void 0,
|
|
980
980
|
"aria-label": s.value,
|
|
981
|
-
class: O(
|
|
982
|
-
}), D(i.value), 17,
|
|
981
|
+
class: O(H)(a.value, O(q).info.soft, "inline-flex shrink-0 items-center justify-center rounded-full font-medium")
|
|
982
|
+
}), D(i.value), 17, Fn));
|
|
983
983
|
}
|
|
984
|
-
}),
|
|
984
|
+
}), Ln = /* @__PURE__ */ p({
|
|
985
985
|
__name: "Tabs",
|
|
986
986
|
props: { modelValue: {} },
|
|
987
987
|
emits: ["update:modelValue"],
|
|
988
988
|
setup(e, { emit: t }) {
|
|
989
989
|
let n = t;
|
|
990
|
-
return (t, r) => (x(), s(O(
|
|
990
|
+
return (t, r) => (x(), s(O(et), {
|
|
991
991
|
"model-value": e.modelValue,
|
|
992
992
|
"onUpdate:modelValue": r[0] ||= (e) => n("update:modelValue", e)
|
|
993
993
|
}, {
|
|
994
|
-
default:
|
|
994
|
+
default: N(() => [T(t.$slots, "default")]),
|
|
995
995
|
_: 3
|
|
996
996
|
}, 8, ["model-value"]));
|
|
997
997
|
}
|
|
998
|
-
}),
|
|
998
|
+
}), Rn = /* @__PURE__ */ p({
|
|
999
999
|
__name: "TabsList",
|
|
1000
1000
|
setup(e) {
|
|
1001
|
-
return (e, t) => (x(), s(O(
|
|
1002
|
-
default:
|
|
1001
|
+
return (e, t) => (x(), s(O($e), { class: "inline-flex h-9 w-full items-center justify-start gap-1 rounded-lg bg-surface-muted p-1 text-muted" }, {
|
|
1002
|
+
default: N(() => [T(e.$slots, "default")]),
|
|
1003
1003
|
_: 3
|
|
1004
1004
|
}));
|
|
1005
1005
|
}
|
|
1006
|
-
}),
|
|
1006
|
+
}), zn = /* @__PURE__ */ p({
|
|
1007
1007
|
__name: "TabsTrigger",
|
|
1008
1008
|
props: {
|
|
1009
1009
|
value: {},
|
|
1010
1010
|
disabled: { type: Boolean }
|
|
1011
1011
|
},
|
|
1012
1012
|
setup(e) {
|
|
1013
|
-
return (t, n) => (x(), s(O(
|
|
1013
|
+
return (t, n) => (x(), s(O(tt), {
|
|
1014
1014
|
value: e.value,
|
|
1015
1015
|
disabled: e.disabled,
|
|
1016
1016
|
class: "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 data-[state=active]:bg-surface data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[disabled]:opacity-50"
|
|
1017
1017
|
}, {
|
|
1018
|
-
default:
|
|
1018
|
+
default: N(() => [T(t.$slots, "default")]),
|
|
1019
1019
|
_: 3
|
|
1020
1020
|
}, 8, ["value", "disabled"]));
|
|
1021
1021
|
}
|
|
1022
|
-
}),
|
|
1022
|
+
}), Bn = /* @__PURE__ */ p({
|
|
1023
1023
|
__name: "TabsContent",
|
|
1024
1024
|
props: {
|
|
1025
1025
|
value: {},
|
|
@@ -1029,15 +1029,15 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1029
1029
|
}
|
|
1030
1030
|
},
|
|
1031
1031
|
setup(e) {
|
|
1032
|
-
return (t, n) => (x(), s(O(
|
|
1032
|
+
return (t, n) => (x(), s(O(Qe), {
|
|
1033
1033
|
value: e.value,
|
|
1034
1034
|
class: g(["focus-visible:outline-none", e.padding ? "pt-4" : ""])
|
|
1035
1035
|
}, {
|
|
1036
|
-
default:
|
|
1036
|
+
default: N(() => [T(t.$slots, "default")]),
|
|
1037
1037
|
_: 3
|
|
1038
1038
|
}, 8, ["value", "class"]));
|
|
1039
1039
|
}
|
|
1040
|
-
}),
|
|
1040
|
+
}), Vn = { class: "truncate" }, Hn = { class: "ms-auto flex shrink-0 items-center gap-1" }, Un = /* @__PURE__ */ p({
|
|
1041
1041
|
__name: "Select",
|
|
1042
1042
|
props: {
|
|
1043
1043
|
modelValue: {},
|
|
@@ -1061,7 +1061,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1061
1061
|
},
|
|
1062
1062
|
emits: ["update:modelValue"],
|
|
1063
1063
|
setup(e, { emit: t }) {
|
|
1064
|
-
let n = e, r = t, i =
|
|
1064
|
+
let n = e, r = t, i = Z(), p = o(() => n.id ?? i?.id.value), m = o(() => n.invalid ?? i?.invalid.value ?? !1), g = o(() => n.required ?? i?.required.value ?? !1), _ = o(() => i?.describedBy.value), v = C(!1);
|
|
1065
1065
|
function y(e) {
|
|
1066
1066
|
return e && typeof e == "object" && n.optionValue ? e[n.optionValue] ?? e : e;
|
|
1067
1067
|
}
|
|
@@ -1072,7 +1072,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1072
1072
|
function E() {
|
|
1073
1073
|
r("update:modelValue", n.multiple ? [] : null);
|
|
1074
1074
|
}
|
|
1075
|
-
return (t, n) => (x(), s(O(
|
|
1075
|
+
return (t, n) => (x(), s(O(Ye), {
|
|
1076
1076
|
open: v.value,
|
|
1077
1077
|
"onUpdate:open": n[0] ||= (e) => v.value = e,
|
|
1078
1078
|
"model-value": e.modelValue,
|
|
@@ -1081,50 +1081,53 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1081
1081
|
required: g.value || void 0,
|
|
1082
1082
|
"onUpdate:modelValue": n[1] ||= (e) => r("update:modelValue", e)
|
|
1083
1083
|
}, {
|
|
1084
|
-
default:
|
|
1085
|
-
class: O(
|
|
1084
|
+
default: N(() => [f(O(Xe), h({
|
|
1085
|
+
class: O(H)("flex w-full items-center justify-between gap-2 rounded-md border border-border bg-surface px-3 text-sm text-foreground shadow-sm transition-colors placeholder:text-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 disabled:cursor-not-allowed disabled:opacity-50", e.size === "sm" ? "h-8 text-xs" : "h-9", m.value ? "border-error-500 focus-visible:ring-error-500" : "", t.$attrs.class || ""),
|
|
1086
1086
|
id: p.value,
|
|
1087
1087
|
"aria-invalid": m.value || void 0,
|
|
1088
1088
|
"aria-describedby": _.value
|
|
1089
1089
|
}, t.$attrs), {
|
|
1090
|
-
default:
|
|
1091
|
-
default:
|
|
1090
|
+
default: N(() => [f(O(Ze), { placeholder: e.placeholder }, {
|
|
1091
|
+
default: N(() => [u("span", Vn, D(S.value || e.placeholder), 1)]),
|
|
1092
1092
|
_: 1
|
|
1093
|
-
}, 8, ["placeholder"]), u("span",
|
|
1093
|
+
}, 8, ["placeholder"]), u("span", Hn, [e.clearable && T.value ? (x(), l("button", {
|
|
1094
1094
|
key: 0,
|
|
1095
1095
|
type: "button",
|
|
1096
1096
|
"aria-label": "Clear selection",
|
|
1097
1097
|
class: "rounded p-0.5 text-muted transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1098
|
-
onClick:
|
|
1099
|
-
}, [f(O(
|
|
1098
|
+
onClick: F(E, ["stop"])
|
|
1099
|
+
}, [f(O(V), { class: "size-3.5" })])) : c("", !0), f(O(R), { class: "size-4 opacity-50" })])]),
|
|
1100
1100
|
_: 1
|
|
1101
1101
|
}, 16, [
|
|
1102
1102
|
"class",
|
|
1103
1103
|
"id",
|
|
1104
1104
|
"aria-invalid",
|
|
1105
1105
|
"aria-describedby"
|
|
1106
|
-
]),
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
default: P(() => [(x(!0), l(a, null, w(e.options, (e) => (x(), s(O(Ue), {
|
|
1113
|
-
key: String(y(e)),
|
|
1114
|
-
value: y(e),
|
|
1115
|
-
class: "relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 pe-8 text-sm text-foreground outline-none transition-colors focus:bg-surface-muted data-[highlighted]:bg-surface-muted data-[disabled]:opacity-50"
|
|
1106
|
+
]), f(O(Je), null, {
|
|
1107
|
+
default: N(() => [v.value ? (x(), s(O(We), {
|
|
1108
|
+
key: 0,
|
|
1109
|
+
position: "popper",
|
|
1110
|
+
"side-offset": 4,
|
|
1111
|
+
class: "z-50 min-w-[--reka-select-trigger-width] rounded-md border border-border bg-surface p-1 shadow-popover"
|
|
1116
1112
|
}, {
|
|
1117
|
-
default:
|
|
1118
|
-
|
|
1113
|
+
default: N(() => [(x(!0), l(a, null, w(e.options, (e) => (x(), s(O(Ge), {
|
|
1114
|
+
key: String(y(e)),
|
|
1115
|
+
value: y(e),
|
|
1116
|
+
class: "relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 pe-8 text-sm text-foreground outline-none transition-colors focus:bg-surface-muted data-[highlighted]:bg-surface-muted data-[disabled]:opacity-50"
|
|
1117
|
+
}, {
|
|
1118
|
+
default: N(() => [f(O(qe), null, {
|
|
1119
|
+
default: N(() => [d(D(b(e)), 1)]),
|
|
1120
|
+
_: 2
|
|
1121
|
+
}, 1024), f(O(Ke), { class: "absolute end-2 flex items-center justify-center text-primary-600" }, {
|
|
1122
|
+
default: N(() => [f(O(L), { class: "size-4" })]),
|
|
1123
|
+
_: 1
|
|
1124
|
+
})]),
|
|
1119
1125
|
_: 2
|
|
1120
|
-
},
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
})]),
|
|
1124
|
-
_: 2
|
|
1125
|
-
}, 1032, ["value"]))), 128))]),
|
|
1126
|
+
}, 1032, ["value"]))), 128))]),
|
|
1127
|
+
_: 1
|
|
1128
|
+
})) : c("", !0)]),
|
|
1126
1129
|
_: 1
|
|
1127
|
-
})
|
|
1130
|
+
})]),
|
|
1128
1131
|
_: 1
|
|
1129
1132
|
}, 8, [
|
|
1130
1133
|
"open",
|
|
@@ -1134,7 +1137,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1134
1137
|
"required"
|
|
1135
1138
|
]));
|
|
1136
1139
|
}
|
|
1137
|
-
}),
|
|
1140
|
+
}), Wn = /* @__PURE__ */ p({
|
|
1138
1141
|
__name: "SelectButton",
|
|
1139
1142
|
props: {
|
|
1140
1143
|
modelValue: {},
|
|
@@ -1180,7 +1183,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1180
1183
|
g(), typeof ResizeObserver < "u" && i.value?.$el && (y = new ResizeObserver(g), y.observe(i.value.$el)), window.addEventListener("resize", g);
|
|
1181
1184
|
}), v(() => {
|
|
1182
1185
|
cancelAnimationFrame(c), y?.disconnect(), window.removeEventListener("resize", g);
|
|
1183
|
-
}),
|
|
1186
|
+
}), M(() => n.modelValue, g), M(() => n.options, g, { deep: !0 }), (t, n) => (x(), s(O(Ue), {
|
|
1184
1187
|
ref_key: "rootEl",
|
|
1185
1188
|
ref: i,
|
|
1186
1189
|
"model-value": e.modelValue,
|
|
@@ -1188,7 +1191,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1188
1191
|
class: "relative inline-flex flex-wrap items-center gap-1 rounded-md border border-border bg-surface p-1",
|
|
1189
1192
|
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
1190
1193
|
}, {
|
|
1191
|
-
default:
|
|
1194
|
+
default: N(() => [P(u("span", {
|
|
1192
1195
|
"aria-hidden": "true",
|
|
1193
1196
|
class: "pointer-events-none absolute rounded bg-primary-500 transition-all duration-200 ease-out motion-reduce:transition-none",
|
|
1194
1197
|
style: _({
|
|
@@ -1197,31 +1200,31 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1197
1200
|
width: `${o.value.width}px`,
|
|
1198
1201
|
height: `${o.value.height}px`
|
|
1199
1202
|
})
|
|
1200
|
-
}, null, 4), [[
|
|
1203
|
+
}, null, 4), [[ne, o.value.ready]]), (x(!0), l(a, null, w(e.options, (t) => (x(), s(O(He), {
|
|
1201
1204
|
key: String(p(t)),
|
|
1202
1205
|
value: p(t),
|
|
1203
1206
|
disabled: e.disabled,
|
|
1204
1207
|
class: "relative inline-flex items-center justify-center rounded px-3 py-1 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 data-[state=checked]:text-white data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"
|
|
1205
1208
|
}, {
|
|
1206
|
-
default:
|
|
1209
|
+
default: N(() => [f(O(Ve), { class: "hidden" }), d(" " + D(m(t)), 1)]),
|
|
1207
1210
|
_: 2
|
|
1208
1211
|
}, 1032, ["value", "disabled"]))), 128))]),
|
|
1209
1212
|
_: 1
|
|
1210
1213
|
}, 8, ["model-value", "disabled"]));
|
|
1211
1214
|
}
|
|
1212
|
-
}),
|
|
1215
|
+
}), Gn = ["id", "disabled"], Kn = { class: "flex items-center justify-between" }, qn = ["aria-label"], Jn = {
|
|
1213
1216
|
"data-test": "month-label",
|
|
1214
1217
|
class: "text-sm font-medium"
|
|
1215
|
-
},
|
|
1218
|
+
}, Yn = ["aria-label"], Xn = {
|
|
1216
1219
|
"data-test": "weekdays",
|
|
1217
1220
|
class: "mt-2 grid grid-cols-7 gap-0.5 text-center text-xs"
|
|
1218
|
-
},
|
|
1221
|
+
}, Zn = { key: 0 }, Qn = ["onClick"], $n = {
|
|
1219
1222
|
key: 0,
|
|
1220
1223
|
class: "mt-3 flex items-center justify-between gap-2 border-t border-border pt-3"
|
|
1221
|
-
},
|
|
1224
|
+
}, er = ["aria-label"], tr = ["aria-label"], nr = ["value"], rr = ["aria-label"], ir = ["value"], ar = ["aria-label"], or = { value: "am" }, sr = { value: "pm" }, cr = { class: "flex items-center gap-2" }, lr = ["disabled"], ur = {
|
|
1222
1225
|
key: 1,
|
|
1223
1226
|
class: "mt-3 flex justify-end border-t border-border pt-3"
|
|
1224
|
-
},
|
|
1227
|
+
}, dr = /* @__PURE__ */ p({
|
|
1225
1228
|
__name: "DatePicker",
|
|
1226
1229
|
props: {
|
|
1227
1230
|
mode: { default: "date" },
|
|
@@ -1340,91 +1343,91 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1340
1343
|
}
|
|
1341
1344
|
return S.value[e];
|
|
1342
1345
|
}
|
|
1343
|
-
let k = o(() => i.weekStartsOn ??
|
|
1344
|
-
|
|
1346
|
+
let k = o(() => i.weekStartsOn ?? At(b.value)), ee = o(() => jt(b.value, k.value)), j = o(() => Mt(h.value, b.value));
|
|
1347
|
+
M(() => i.modelValue, (e) => {
|
|
1345
1348
|
Array.isArray(e) ? (_.value = e[0] ?? null, v.value = e[1] ?? null) : e instanceof Date ? (_.value = e, v.value = null) : (_.value = null, v.value = null);
|
|
1346
1349
|
}, { immediate: !0 });
|
|
1347
|
-
let
|
|
1350
|
+
let ne = o(() => {
|
|
1348
1351
|
let e = (new Date(h.value.getFullYear(), h.value.getMonth(), 1).getDay() - k.value + 7) % 7, t = Array.from({ length: e }, () => null), n = new Date(h.value.getFullYear(), h.value.getMonth() + 1, 0).getDate();
|
|
1349
1352
|
for (let e = 1; e <= n; e++) t.push(new Date(h.value.getFullYear(), h.value.getMonth(), e));
|
|
1350
1353
|
return t;
|
|
1351
1354
|
});
|
|
1352
|
-
function
|
|
1355
|
+
function F(e) {
|
|
1353
1356
|
if (!_.value || !v.value) return !1;
|
|
1354
|
-
let [t, n] =
|
|
1357
|
+
let [t, n] = W(_.value, v.value);
|
|
1355
1358
|
return e.getTime() >= t.getTime() && e.getTime() <= n.getTime();
|
|
1356
1359
|
}
|
|
1357
|
-
function
|
|
1360
|
+
function I(e) {
|
|
1358
1361
|
h.value = new Date(h.value.getFullYear(), h.value.getMonth() + e, 1);
|
|
1359
1362
|
}
|
|
1360
|
-
function
|
|
1363
|
+
function L() {
|
|
1361
1364
|
return i.mode === "range" ? !!(_.value && v.value) : !!_.value;
|
|
1362
1365
|
}
|
|
1363
|
-
function
|
|
1366
|
+
function R(e) {
|
|
1364
1367
|
if (i.mode === "range") {
|
|
1365
1368
|
if (!_.value || v.value) _.value = e, v.value = null;
|
|
1366
1369
|
else {
|
|
1367
|
-
let [t, n] =
|
|
1370
|
+
let [t, n] = W(_.value, e);
|
|
1368
1371
|
_.value = t, v.value = n;
|
|
1369
1372
|
}
|
|
1370
1373
|
return;
|
|
1371
1374
|
}
|
|
1372
|
-
_.value = e, i.mode !== "datetime" && (
|
|
1375
|
+
_.value = e, i.mode !== "datetime" && (ae(), m.value = !1);
|
|
1373
1376
|
}
|
|
1374
|
-
function
|
|
1377
|
+
function ae() {
|
|
1375
1378
|
if (_.value) {
|
|
1376
1379
|
if (i.mode === "range") {
|
|
1377
1380
|
if (!v.value) return;
|
|
1378
1381
|
d("update:modelValue", [_.value, v.value]);
|
|
1379
|
-
} else i.mode === "datetime" ? d("update:modelValue",
|
|
1382
|
+
} else i.mode === "datetime" ? d("update:modelValue", Tt(_.value, y.value)) : d("update:modelValue", _.value);
|
|
1380
1383
|
}
|
|
1381
1384
|
}
|
|
1382
|
-
function
|
|
1385
|
+
function oe() {
|
|
1383
1386
|
_.value = null, v.value = null, d("update:modelValue", null), m.value = !1;
|
|
1384
1387
|
}
|
|
1385
|
-
let
|
|
1388
|
+
let B = o(() => {
|
|
1386
1389
|
let [e, t] = y.value.split(":").map(Number);
|
|
1387
1390
|
return {
|
|
1388
1391
|
hour24: Number.isFinite(e) ? (Math.trunc(e) % 24 + 24) % 24 : 0,
|
|
1389
1392
|
minute: Number.isFinite(t) ? (Math.trunc(t) % 60 + 60) % 60 : 0
|
|
1390
1393
|
};
|
|
1391
|
-
}),
|
|
1392
|
-
get: () => i.hourFormat === "12" ?
|
|
1394
|
+
}), se = o(() => Dt(i.hourFormat)), le = o(() => Ot(Math.min(30, Math.max(1, i.minuteStep ?? 1)))), ue = o({
|
|
1395
|
+
get: () => i.hourFormat === "12" ? G(B.value.hour24).hour : B.value.hour24,
|
|
1393
1396
|
set: (e) => {
|
|
1394
|
-
let { hour24: t, minute: n } =
|
|
1395
|
-
y.value =
|
|
1397
|
+
let { hour24: t, minute: n } = B.value, r = i.hourFormat === "12" ? kt(e, G(t).meridiem) : e;
|
|
1398
|
+
y.value = U(r * 60 + n);
|
|
1396
1399
|
}
|
|
1397
|
-
}),
|
|
1398
|
-
get: () =>
|
|
1400
|
+
}), de = o({
|
|
1401
|
+
get: () => B.value.minute,
|
|
1399
1402
|
set: (e) => {
|
|
1400
|
-
y.value =
|
|
1403
|
+
y.value = U(B.value.hour24 * 60 + e);
|
|
1401
1404
|
}
|
|
1402
|
-
}),
|
|
1403
|
-
get: () =>
|
|
1405
|
+
}), fe = o({
|
|
1406
|
+
get: () => G(B.value.hour24).meridiem,
|
|
1404
1407
|
set: (e) => {
|
|
1405
|
-
let { hour: t } =
|
|
1406
|
-
y.value =
|
|
1408
|
+
let { hour: t } = G(B.value.hour24);
|
|
1409
|
+
y.value = U(kt(t, e) * 60 + B.value.minute);
|
|
1407
1410
|
}
|
|
1408
1411
|
});
|
|
1409
|
-
function
|
|
1412
|
+
function pe(e) {
|
|
1410
1413
|
return String(e).padStart(2, "0");
|
|
1411
1414
|
}
|
|
1412
|
-
let
|
|
1415
|
+
let V = o(() => {
|
|
1413
1416
|
if (i.mode === "range") {
|
|
1414
1417
|
if (!_.value || !v.value) return "";
|
|
1415
|
-
let [e, t] =
|
|
1416
|
-
return `${
|
|
1418
|
+
let [e, t] = W(_.value, v.value);
|
|
1419
|
+
return `${K(e, b.value)} – ${K(t, b.value)}`;
|
|
1417
1420
|
}
|
|
1418
1421
|
if (!_.value) return "";
|
|
1419
|
-
let e = i.mode === "datetime" ?
|
|
1420
|
-
return i.mode === "datetime" ? `${
|
|
1422
|
+
let e = i.mode === "datetime" ? Tt(_.value, y.value) : _.value;
|
|
1423
|
+
return i.mode === "datetime" ? `${K(e, b.value)} ${Nt(e, b.value, i.hourFormat)}` : K(e, b.value);
|
|
1421
1424
|
});
|
|
1422
|
-
return (t, n) => (x(), s(O(
|
|
1425
|
+
return (t, n) => (x(), s(O(ze), {
|
|
1423
1426
|
open: m.value,
|
|
1424
1427
|
"onUpdate:open": n[6] ||= (e) => m.value = e
|
|
1425
1428
|
}, {
|
|
1426
|
-
default:
|
|
1427
|
-
default:
|
|
1429
|
+
default: N(() => [f(O(Be), { "as-child": "" }, {
|
|
1430
|
+
default: N(() => [u("button", {
|
|
1428
1431
|
type: "button",
|
|
1429
1432
|
id: e.inputId,
|
|
1430
1433
|
disabled: e.disabled,
|
|
@@ -1433,110 +1436,113 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1433
1436
|
e.size === "sm" ? "h-8 text-xs" : "h-9",
|
|
1434
1437
|
e.invalid ? "border-error-500" : ""
|
|
1435
1438
|
])
|
|
1436
|
-
}, [u("span", { class: g(["truncate",
|
|
1439
|
+
}, [u("span", { class: g(["truncate", V.value ? "text-foreground" : "text-muted"]) }, D(V.value || E("placeholder")), 3), f(O(re), { class: "size-4 shrink-0 text-muted" })], 10, Gn)]),
|
|
1437
1440
|
_: 1
|
|
1438
|
-
}), f(O(
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
u("
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
u("div", qn, [(x(!0), l(a, null, w(ee.value, (e, t) => (x(), l("span", {
|
|
1459
|
-
key: t,
|
|
1460
|
-
class: "py-1 font-medium text-muted"
|
|
1461
|
-
}, D(e), 1))), 128)), (x(!0), l(a, null, w(te.value, (e, t) => (x(), l(a, { key: t }, [e ? (x(), l("button", {
|
|
1462
|
-
key: 1,
|
|
1463
|
-
type: "button",
|
|
1464
|
-
class: g([
|
|
1465
|
-
"flex h-8 items-center justify-center rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1466
|
-
I(e) ? "bg-primary-100 text-primary-800 dark:bg-primary-900/40 dark:text-primary-200" : "hover:bg-surface-muted",
|
|
1467
|
-
_.value && _.value.getTime() === e.getTime() ? "bg-primary-500 text-white hover:bg-primary-500" : "",
|
|
1468
|
-
v.value && v.value.getTime() === e.getTime() ? "bg-primary-500 text-white hover:bg-primary-500" : ""
|
|
1441
|
+
}), f(O(Re), null, {
|
|
1442
|
+
default: N(() => [f(O(Le), {
|
|
1443
|
+
"side-offset": 4,
|
|
1444
|
+
class: "z-50 rounded-md border border-border bg-surface p-3 shadow-popover"
|
|
1445
|
+
}, {
|
|
1446
|
+
default: N(() => [
|
|
1447
|
+
u("div", Kn, [
|
|
1448
|
+
u("button", {
|
|
1449
|
+
type: "button",
|
|
1450
|
+
"aria-label": E("previousMonth"),
|
|
1451
|
+
class: "rounded p-1 text-muted transition-colors hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1452
|
+
onClick: n[0] ||= (e) => I(-1)
|
|
1453
|
+
}, [f(O(ie), { class: "size-4 rtl:rotate-180" })], 8, qn),
|
|
1454
|
+
u("span", Jn, D(j.value), 1),
|
|
1455
|
+
u("button", {
|
|
1456
|
+
type: "button",
|
|
1457
|
+
"aria-label": E("nextMonth"),
|
|
1458
|
+
class: "rounded p-1 text-muted transition-colors hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1459
|
+
onClick: n[1] ||= (e) => I(1)
|
|
1460
|
+
}, [f(O(z), { class: "size-4 rtl:rotate-180" })], 8, Yn)
|
|
1469
1461
|
]),
|
|
1470
|
-
|
|
1471
|
-
}, D(e.getDate()), 11, Yn)) : (x(), l("span", Jn))], 64))), 128))]),
|
|
1472
|
-
e.mode === "datetime" ? (x(), l("div", Xn, [u("div", {
|
|
1473
|
-
role: "group",
|
|
1474
|
-
"aria-label": E("time"),
|
|
1475
|
-
class: "flex items-center gap-1.5 text-xs text-muted"
|
|
1476
|
-
}, [
|
|
1477
|
-
f(O(se), { class: "size-3.5" }),
|
|
1478
|
-
F(u("select", {
|
|
1479
|
-
"onUpdate:modelValue": n[2] ||= (e) => le.value = e,
|
|
1480
|
-
"data-test": "hours",
|
|
1481
|
-
"aria-label": E("hour"),
|
|
1482
|
-
class: "rounded border border-border bg-surface px-1.5 py-1 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"
|
|
1483
|
-
}, [(x(!0), l(a, null, w(oe.value, (t) => (x(), l("option", {
|
|
1462
|
+
u("div", Xn, [(x(!0), l(a, null, w(ee.value, (e, t) => (x(), l("span", {
|
|
1484
1463
|
key: t,
|
|
1485
|
-
|
|
1486
|
-
}, D(e
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
key: e,
|
|
1500
|
-
value: e
|
|
1501
|
-
}, D(fe(e)), 9, tr))), 128))], 8, er), [[
|
|
1502
|
-
j,
|
|
1503
|
-
ue.value,
|
|
1504
|
-
void 0,
|
|
1505
|
-
{ number: !0 }
|
|
1506
|
-
]]),
|
|
1507
|
-
e.hourFormat === "12" ? F((x(), l("select", {
|
|
1508
|
-
key: 0,
|
|
1509
|
-
"onUpdate:modelValue": n[4] ||= (e) => de.value = e,
|
|
1510
|
-
"data-test": "meridiem",
|
|
1464
|
+
class: "py-1 font-medium text-muted"
|
|
1465
|
+
}, D(e), 1))), 128)), (x(!0), l(a, null, w(ne.value, (e, t) => (x(), l(a, { key: t }, [e ? (x(), l("button", {
|
|
1466
|
+
key: 1,
|
|
1467
|
+
type: "button",
|
|
1468
|
+
class: g([
|
|
1469
|
+
"flex h-8 items-center justify-center rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1470
|
+
F(e) ? "bg-primary-100 text-primary-800 dark:bg-primary-900/40 dark:text-primary-200" : "hover:bg-surface-muted",
|
|
1471
|
+
_.value && _.value.getTime() === e.getTime() ? "bg-primary-500 text-white hover:bg-primary-500" : "",
|
|
1472
|
+
v.value && v.value.getTime() === e.getTime() ? "bg-primary-500 text-white hover:bg-primary-500" : ""
|
|
1473
|
+
]),
|
|
1474
|
+
onClick: (t) => R(e)
|
|
1475
|
+
}, D(e.getDate()), 11, Qn)) : (x(), l("span", Zn))], 64))), 128))]),
|
|
1476
|
+
e.mode === "datetime" ? (x(), l("div", $n, [u("div", {
|
|
1477
|
+
role: "group",
|
|
1511
1478
|
"aria-label": E("time"),
|
|
1512
|
-
class: "
|
|
1513
|
-
}, [
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1479
|
+
class: "flex items-center gap-1.5 text-xs text-muted"
|
|
1480
|
+
}, [
|
|
1481
|
+
f(O(ce), { class: "size-3.5" }),
|
|
1482
|
+
P(u("select", {
|
|
1483
|
+
"onUpdate:modelValue": n[2] ||= (e) => ue.value = e,
|
|
1484
|
+
"data-test": "hours",
|
|
1485
|
+
"aria-label": E("hour"),
|
|
1486
|
+
class: "rounded border border-border bg-surface px-1.5 py-1 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"
|
|
1487
|
+
}, [(x(!0), l(a, null, w(se.value, (t) => (x(), l("option", {
|
|
1488
|
+
key: t,
|
|
1489
|
+
value: t
|
|
1490
|
+
}, D(e.hourFormat === "12" ? t : pe(t)), 9, nr))), 128))], 8, tr), [[
|
|
1491
|
+
te,
|
|
1492
|
+
ue.value,
|
|
1493
|
+
void 0,
|
|
1494
|
+
{ number: !0 }
|
|
1495
|
+
]]),
|
|
1496
|
+
n[7] ||= u("span", { "aria-hidden": "true" }, ":", -1),
|
|
1497
|
+
P(u("select", {
|
|
1498
|
+
"onUpdate:modelValue": n[3] ||= (e) => de.value = e,
|
|
1499
|
+
"data-test": "minutes",
|
|
1500
|
+
"aria-label": E("minute"),
|
|
1501
|
+
class: "rounded border border-border bg-surface px-1.5 py-1 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"
|
|
1502
|
+
}, [(x(!0), l(a, null, w(le.value, (e) => (x(), l("option", {
|
|
1503
|
+
key: e,
|
|
1504
|
+
value: e
|
|
1505
|
+
}, D(pe(e)), 9, ir))), 128))], 8, rr), [[
|
|
1506
|
+
te,
|
|
1507
|
+
de.value,
|
|
1508
|
+
void 0,
|
|
1509
|
+
{ number: !0 }
|
|
1510
|
+
]]),
|
|
1511
|
+
e.hourFormat === "12" ? P((x(), l("select", {
|
|
1512
|
+
key: 0,
|
|
1513
|
+
"onUpdate:modelValue": n[4] ||= (e) => fe.value = e,
|
|
1514
|
+
"data-test": "meridiem",
|
|
1515
|
+
"aria-label": E("time"),
|
|
1516
|
+
class: "rounded border border-border bg-surface px-1.5 py-1 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"
|
|
1517
|
+
}, [u("option", or, D(E("am")), 1), u("option", sr, D(E("pm")), 1)], 8, ar)), [[te, fe.value]]) : c("", !0)
|
|
1518
|
+
], 8, er), u("div", cr, [u("button", {
|
|
1519
|
+
type: "button",
|
|
1520
|
+
class: "rounded px-3 py-1 text-sm text-muted transition-colors hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1521
|
+
onClick: oe
|
|
1522
|
+
}, D(E("clear")), 1), u("button", {
|
|
1523
|
+
type: "button",
|
|
1524
|
+
disabled: !_.value,
|
|
1525
|
+
class: "rounded bg-primary-500 px-3 py-1 text-sm text-white transition-colors hover:bg-primary-600 disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1526
|
+
onClick: n[5] ||= (e) => {
|
|
1527
|
+
ae(), m.value = !1;
|
|
1528
|
+
}
|
|
1529
|
+
}, D(E("apply")), 9, lr)])])) : L() ? (x(), l("div", ur, [u("button", {
|
|
1530
|
+
type: "button",
|
|
1531
|
+
class: "rounded px-3 py-1 text-sm text-muted transition-colors hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1532
|
+
onClick: oe
|
|
1533
|
+
}, D(E("clear")), 1)])) : c("", !0)
|
|
1534
|
+
]),
|
|
1535
|
+
_: 1
|
|
1536
|
+
})]),
|
|
1531
1537
|
_: 1
|
|
1532
1538
|
})]),
|
|
1533
1539
|
_: 1
|
|
1534
1540
|
}, 8, ["open"]));
|
|
1535
1541
|
}
|
|
1536
|
-
}),
|
|
1542
|
+
}), fr = { class: "flex shrink-0 items-start justify-between gap-4 border-b border-border p-5 pb-4" }, pr = { class: "min-w-0" }, mr = { class: "flex-1 overflow-y-auto bg-surface p-5" }, hr = {
|
|
1537
1543
|
key: 0,
|
|
1538
|
-
class: "flex justify-end gap-2 border-t border-border bg-surface-muted p-4"
|
|
1539
|
-
},
|
|
1544
|
+
class: "flex shrink-0 justify-end gap-2 border-t border-border bg-surface-muted p-4"
|
|
1545
|
+
}, gr = /* @__PURE__ */ p({
|
|
1540
1546
|
__name: "Dialog",
|
|
1541
1547
|
props: {
|
|
1542
1548
|
visible: { type: Boolean },
|
|
@@ -1558,40 +1564,40 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1558
1564
|
function p(e) {
|
|
1559
1565
|
r("update:visible", e), e || r("close");
|
|
1560
1566
|
}
|
|
1561
|
-
return (t, n) => (x(), s(O(
|
|
1567
|
+
return (t, n) => (x(), s(O(Se), {
|
|
1562
1568
|
open: i.value,
|
|
1563
1569
|
"onUpdate:open": p
|
|
1564
1570
|
}, {
|
|
1565
|
-
default:
|
|
1571
|
+
default: N(() => [t.$slots.trigger ? (x(), s(O(we), {
|
|
1566
1572
|
key: 0,
|
|
1567
1573
|
"as-child": ""
|
|
1568
1574
|
}, {
|
|
1569
|
-
default:
|
|
1575
|
+
default: N(() => [T(t.$slots, "trigger")]),
|
|
1570
1576
|
_: 3
|
|
1571
|
-
})) : c("", !0), f(O(
|
|
1572
|
-
default:
|
|
1573
|
-
default:
|
|
1574
|
-
u("div",
|
|
1577
|
+
})) : c("", !0), f(O(xe), null, {
|
|
1578
|
+
default: N(() => [f(O(be), { class: "fixed inset-0 z-50 bg-black/50 dark:bg-black/70" }), f(O(ve), { class: g(["fixed left-1/2 top-1/2 z-50 flex flex-col w-full max-h-[85vh] -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-lg border border-border bg-surface shadow-dialog focus-visible:outline-none", a[e.size]]) }, {
|
|
1579
|
+
default: N(() => [
|
|
1580
|
+
u("div", fr, [u("div", pr, [e.title || t.$slots.header ? (x(), s(O(Ce), {
|
|
1575
1581
|
key: 0,
|
|
1576
1582
|
class: "text-lg font-semibold text-foreground"
|
|
1577
1583
|
}, {
|
|
1578
|
-
default:
|
|
1584
|
+
default: N(() => [T(t.$slots, "header", {}, () => [d(D(e.title), 1)])]),
|
|
1579
1585
|
_: 3
|
|
1580
|
-
})) : c("", !0), e.description || t.$slots.description ? (x(), s(O(
|
|
1586
|
+
})) : c("", !0), e.description || t.$slots.description ? (x(), s(O(ye), {
|
|
1581
1587
|
key: 1,
|
|
1582
1588
|
class: "mt-1 text-sm text-muted"
|
|
1583
1589
|
}, {
|
|
1584
|
-
default:
|
|
1590
|
+
default: N(() => [T(t.$slots, "description", {}, () => [d(D(e.description), 1)])]),
|
|
1585
1591
|
_: 3
|
|
1586
|
-
})) : c("", !0)]), f(O(
|
|
1592
|
+
})) : c("", !0)]), f(O(_e), {
|
|
1587
1593
|
class: "rounded-md p-1 text-muted transition-colors hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1588
1594
|
"aria-label": "Close"
|
|
1589
1595
|
}, {
|
|
1590
|
-
default:
|
|
1596
|
+
default: N(() => [f(O(V), { class: "size-4" })]),
|
|
1591
1597
|
_: 1
|
|
1592
1598
|
})]),
|
|
1593
|
-
u("div",
|
|
1594
|
-
t.$slots.footer ? (x(), l("div",
|
|
1599
|
+
u("div", mr, [T(t.$slots, "default")]),
|
|
1600
|
+
t.$slots.footer ? (x(), l("div", hr, [T(t.$slots, "footer")])) : c("", !0)
|
|
1595
1601
|
]),
|
|
1596
1602
|
_: 3
|
|
1597
1603
|
}, 8, ["class"])]),
|
|
@@ -1600,13 +1606,13 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1600
1606
|
_: 3
|
|
1601
1607
|
}, 8, ["open"]));
|
|
1602
1608
|
}
|
|
1603
|
-
}),
|
|
1609
|
+
}), _r = {
|
|
1604
1610
|
key: 1,
|
|
1605
1611
|
class: "flex shrink-0 items-start justify-between gap-4 border-b border-border p-5 pb-4"
|
|
1606
|
-
},
|
|
1612
|
+
}, vr = { class: "min-w-0" }, yr = { class: "flex-1 overflow-y-auto p-5" }, br = {
|
|
1607
1613
|
key: 2,
|
|
1608
1614
|
class: "shrink-0 border-t border-border bg-surface-muted p-4"
|
|
1609
|
-
},
|
|
1615
|
+
}, xr = /* @__PURE__ */ p({
|
|
1610
1616
|
__name: "Drawer",
|
|
1611
1617
|
props: {
|
|
1612
1618
|
open: {
|
|
@@ -1675,21 +1681,21 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1675
1681
|
lg: "max-h-[32rem]",
|
|
1676
1682
|
full: "max-h-full"
|
|
1677
1683
|
}, y = o(() => n.position === "top" || n.position === "bottom"), b = o(() => y.value ? v[n.size] : _[n.size]);
|
|
1678
|
-
return (t, n) => (x(), s(O(
|
|
1684
|
+
return (t, n) => (x(), s(O(Se), {
|
|
1679
1685
|
open: i.value,
|
|
1680
1686
|
"onUpdate:open": a
|
|
1681
1687
|
}, {
|
|
1682
|
-
default:
|
|
1688
|
+
default: N(() => [t.$slots.trigger ? (x(), s(O(we), {
|
|
1683
1689
|
key: 0,
|
|
1684
1690
|
"as-child": ""
|
|
1685
1691
|
}, {
|
|
1686
|
-
default:
|
|
1692
|
+
default: N(() => [T(t.$slots, "trigger")]),
|
|
1687
1693
|
_: 3
|
|
1688
|
-
})) : c("", !0), f(O(
|
|
1689
|
-
default:
|
|
1694
|
+
})) : c("", !0), f(O(xe), { "force-mount": i.value }, {
|
|
1695
|
+
default: N(() => [e.backdrop || e.preventScroll ? (x(), s(O(be), {
|
|
1690
1696
|
key: 0,
|
|
1691
1697
|
class: g(["fixed inset-0 z-50", e.backdrop ? "bg-black/50 dark:bg-black/70" : "bg-transparent"])
|
|
1692
|
-
}, null, 8, ["class"])) : c("", !0), f(O(
|
|
1698
|
+
}, null, 8, ["class"])) : c("", !0), f(O(ve), {
|
|
1693
1699
|
class: g([
|
|
1694
1700
|
"fixed z-50 flex flex-col overflow-hidden border-border bg-surface shadow-dialog transition-transform duration-200 focus-visible:outline-none",
|
|
1695
1701
|
h[e.position],
|
|
@@ -1698,36 +1704,36 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1698
1704
|
onEscapeKeyDown: p,
|
|
1699
1705
|
onPointerDownOutside: m
|
|
1700
1706
|
}, {
|
|
1701
|
-
default:
|
|
1702
|
-
!e.title && !t.$slots.header ? (x(), s(O(
|
|
1703
|
-
default:
|
|
1704
|
-
default:
|
|
1707
|
+
default: N(() => [
|
|
1708
|
+
!e.title && !t.$slots.header ? (x(), s(O(dt), { key: 0 }, {
|
|
1709
|
+
default: N(() => [f(O(Ce), null, {
|
|
1710
|
+
default: N(() => [...n[0] ||= [d("Drawer", -1)]]),
|
|
1705
1711
|
_: 1
|
|
1706
1712
|
})]),
|
|
1707
1713
|
_: 1
|
|
1708
1714
|
})) : c("", !0),
|
|
1709
|
-
e.title || t.$slots.header || e.description || t.$slots.description || e.showClose ? (x(), l("header",
|
|
1715
|
+
e.title || t.$slots.header || e.description || t.$slots.description || e.showClose ? (x(), l("header", _r, [u("div", vr, [e.title || t.$slots.header ? (x(), s(O(Ce), {
|
|
1710
1716
|
key: 0,
|
|
1711
1717
|
class: "text-lg font-semibold text-foreground"
|
|
1712
1718
|
}, {
|
|
1713
|
-
default:
|
|
1719
|
+
default: N(() => [T(t.$slots, "header", {}, () => [d(D(e.title), 1)])]),
|
|
1714
1720
|
_: 3
|
|
1715
|
-
})) : c("", !0), e.description || t.$slots.description ? (x(), s(O(
|
|
1721
|
+
})) : c("", !0), e.description || t.$slots.description ? (x(), s(O(ye), {
|
|
1716
1722
|
key: 1,
|
|
1717
1723
|
class: "mt-1 text-sm text-muted"
|
|
1718
1724
|
}, {
|
|
1719
|
-
default:
|
|
1725
|
+
default: N(() => [T(t.$slots, "description", {}, () => [d(D(e.description), 1)])]),
|
|
1720
1726
|
_: 3
|
|
1721
|
-
})) : c("", !0)]), e.showClose ? (x(), s(O(
|
|
1727
|
+
})) : c("", !0)]), e.showClose ? (x(), s(O(_e), {
|
|
1722
1728
|
key: 0,
|
|
1723
1729
|
class: "ms-auto shrink-0 rounded-md p-1 text-muted transition-colors hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
1724
1730
|
"aria-label": "Close"
|
|
1725
1731
|
}, {
|
|
1726
|
-
default:
|
|
1732
|
+
default: N(() => [T(t.$slots, "close", {}, () => [f(O(V), { class: "size-4" })])]),
|
|
1727
1733
|
_: 3
|
|
1728
1734
|
})) : c("", !0)])) : c("", !0),
|
|
1729
|
-
u("div",
|
|
1730
|
-
t.$slots.footer ? (x(), l("footer",
|
|
1735
|
+
u("div", yr, [T(t.$slots, "default")]),
|
|
1736
|
+
t.$slots.footer ? (x(), l("footer", br, [T(t.$slots, "footer")])) : c("", !0)
|
|
1731
1737
|
]),
|
|
1732
1738
|
_: 3
|
|
1733
1739
|
}, 8, ["class"])]),
|
|
@@ -1736,28 +1742,28 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1736
1742
|
_: 3
|
|
1737
1743
|
}, 8, ["open"]));
|
|
1738
1744
|
}
|
|
1739
|
-
}),
|
|
1745
|
+
}), Sr = /* @__PURE__ */ p({
|
|
1740
1746
|
__name: "DropdownMenu",
|
|
1741
1747
|
emits: ["update:open"],
|
|
1742
1748
|
setup(e, { emit: t }) {
|
|
1743
1749
|
let n = t;
|
|
1744
|
-
return (e, t) => (x(), s(O(
|
|
1745
|
-
default:
|
|
1750
|
+
return (e, t) => (x(), s(O(Ae), h(e.$attrs, { "onUpdate:open": t[0] ||= (e) => n("update:open", e) }), {
|
|
1751
|
+
default: N(() => [T(e.$slots, "default")]),
|
|
1746
1752
|
_: 3
|
|
1747
1753
|
}, 16));
|
|
1748
1754
|
}
|
|
1749
|
-
}),
|
|
1755
|
+
}), Cr = /* @__PURE__ */ p({
|
|
1750
1756
|
__name: "DropdownMenuTrigger",
|
|
1751
1757
|
setup(e) {
|
|
1752
|
-
return (e, t) => (x(), s(O(
|
|
1758
|
+
return (e, t) => (x(), s(O(Me), {
|
|
1753
1759
|
"as-child": "",
|
|
1754
1760
|
"focus-on-select": ""
|
|
1755
1761
|
}, {
|
|
1756
|
-
default:
|
|
1762
|
+
default: N(() => [T(e.$slots, "default")]),
|
|
1757
1763
|
_: 3
|
|
1758
1764
|
}));
|
|
1759
1765
|
}
|
|
1760
|
-
}),
|
|
1766
|
+
}), wr = /* @__PURE__ */ p({
|
|
1761
1767
|
__name: "DropdownMenuContent",
|
|
1762
1768
|
props: {
|
|
1763
1769
|
align: { default: "start" },
|
|
@@ -1765,14 +1771,14 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1765
1771
|
sideOffset: { default: 4 }
|
|
1766
1772
|
},
|
|
1767
1773
|
setup(e) {
|
|
1768
|
-
return (t, n) => (x(), s(O(
|
|
1769
|
-
default:
|
|
1774
|
+
return (t, n) => (x(), s(O(ke), null, {
|
|
1775
|
+
default: N(() => [f(O(Te), {
|
|
1770
1776
|
align: e.align,
|
|
1771
1777
|
side: e.side,
|
|
1772
1778
|
"side-offset": e.sideOffset,
|
|
1773
1779
|
class: "z-50 min-w-40 rounded-md border border-border bg-surface p-1 shadow-popover"
|
|
1774
1780
|
}, {
|
|
1775
|
-
default:
|
|
1781
|
+
default: N(() => [T(t.$slots, "default")]),
|
|
1776
1782
|
_: 3
|
|
1777
1783
|
}, 8, [
|
|
1778
1784
|
"align",
|
|
@@ -1782,7 +1788,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1782
1788
|
_: 3
|
|
1783
1789
|
}));
|
|
1784
1790
|
}
|
|
1785
|
-
}),
|
|
1791
|
+
}), Tr = /* @__PURE__ */ p({
|
|
1786
1792
|
__name: "DropdownMenuItem",
|
|
1787
1793
|
props: {
|
|
1788
1794
|
variant: {},
|
|
@@ -1794,7 +1800,7 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1794
1800
|
},
|
|
1795
1801
|
emits: ["select"],
|
|
1796
1802
|
setup(e, { emit: t }) {
|
|
1797
|
-
let n =
|
|
1803
|
+
let n = me({
|
|
1798
1804
|
base: "relative flex w-full cursor-pointer select-none items-center gap-2 rounded px-2 py-1.5 text-sm outline-none transition-colors focus:bg-surface-muted data-[highlighted]:bg-surface-muted data-[highlighted]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1799
1805
|
variants: { variant: {
|
|
1800
1806
|
default: "text-foreground",
|
|
@@ -1805,12 +1811,12 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1805
1811
|
function a() {
|
|
1806
1812
|
r.disabled || i("select");
|
|
1807
1813
|
}
|
|
1808
|
-
return (t, r) => (x(), s(O(
|
|
1814
|
+
return (t, r) => (x(), s(O(De), {
|
|
1809
1815
|
disabled: e.disabled,
|
|
1810
1816
|
class: g(O(n)({ variant: e.variant })),
|
|
1811
1817
|
onSelect: a
|
|
1812
1818
|
}, {
|
|
1813
|
-
default:
|
|
1819
|
+
default: N(() => [e.icon ? (x(), s(Y, {
|
|
1814
1820
|
key: 0,
|
|
1815
1821
|
name: e.icon,
|
|
1816
1822
|
class: "size-4 shrink-0"
|
|
@@ -1818,34 +1824,34 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1818
1824
|
_: 3
|
|
1819
1825
|
}, 8, ["disabled", "class"]));
|
|
1820
1826
|
}
|
|
1821
|
-
}),
|
|
1827
|
+
}), Er = /* @__PURE__ */ p({
|
|
1822
1828
|
__name: "DropdownMenuSeparator",
|
|
1823
1829
|
setup(e) {
|
|
1824
|
-
return (e, t) => (x(), s(O(
|
|
1830
|
+
return (e, t) => (x(), s(O(je), { class: "my-1 h-px bg-border" }));
|
|
1825
1831
|
}
|
|
1826
|
-
}),
|
|
1832
|
+
}), Dr = /* @__PURE__ */ p({
|
|
1827
1833
|
__name: "DropdownMenuLabel",
|
|
1828
1834
|
setup(e) {
|
|
1829
|
-
return (e, t) => (x(), s(O(
|
|
1830
|
-
default:
|
|
1835
|
+
return (e, t) => (x(), s(O(Oe), { class: "px-2 py-1.5 text-xs font-medium text-muted" }, {
|
|
1836
|
+
default: N(() => [T(e.$slots, "default")]),
|
|
1831
1837
|
_: 3
|
|
1832
1838
|
}));
|
|
1833
1839
|
}
|
|
1834
|
-
}),
|
|
1840
|
+
}), Or = /* @__PURE__ */ p({
|
|
1835
1841
|
__name: "DropdownMenuGroup",
|
|
1836
1842
|
setup(e) {
|
|
1837
|
-
return (e, t) => (x(), s(O(
|
|
1838
|
-
default:
|
|
1843
|
+
return (e, t) => (x(), s(O(Ee), null, {
|
|
1844
|
+
default: N(() => [T(e.$slots, "default")]),
|
|
1839
1845
|
_: 3
|
|
1840
1846
|
}));
|
|
1841
1847
|
}
|
|
1842
|
-
}),
|
|
1848
|
+
}), kr = { class: "flex flex-col gap-2 sm:flex-row sm:items-stretch" }, Ar = { class: "border-b border-border px-3 py-2 text-xs font-medium text-muted" }, jr = { class: "max-h-64 flex-1 overflow-y-auto p-1" }, Mr = ["disabled", "onClick"], Nr = { class: "truncate" }, Pr = {
|
|
1843
1849
|
key: 0,
|
|
1844
1850
|
class: "px-2 py-1.5 text-sm text-muted"
|
|
1845
|
-
},
|
|
1851
|
+
}, Fr = { class: "flex flex-row items-center justify-center gap-1 sm:flex-col" }, Ir = { class: "border-b border-border px-3 py-2 text-xs font-medium text-muted" }, Lr = { class: "max-h-64 flex-1 overflow-y-auto p-1" }, Rr = ["disabled", "onClick"], zr = { class: "truncate" }, Br = {
|
|
1846
1852
|
key: 0,
|
|
1847
1853
|
class: "px-2 py-1.5 text-sm text-muted"
|
|
1848
|
-
},
|
|
1854
|
+
}, Vr = /* @__PURE__ */ p({
|
|
1849
1855
|
__name: "TransferList",
|
|
1850
1856
|
props: {
|
|
1851
1857
|
options: {},
|
|
@@ -1883,82 +1889,82 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1883
1889
|
function E() {
|
|
1884
1890
|
i.value.clear(), p.value.clear(), _();
|
|
1885
1891
|
}
|
|
1886
|
-
return (t, n) => (x(), l("div",
|
|
1887
|
-
u("div", { class: g(["flex min-h-40 flex-1 flex-col rounded-md border border-border bg-surface", e.disabled && "opacity-50"]) }, [u("div",
|
|
1892
|
+
return (t, n) => (x(), l("div", kr, [
|
|
1893
|
+
u("div", { class: g(["flex min-h-40 flex-1 flex-col rounded-md border border-border bg-surface", e.disabled && "opacity-50"]) }, [u("div", Ar, [T(t.$slots, "source-header", {}, () => [d(D(e.sourceLabel), 1)])]), u("ul", jr, [(x(!0), l(a, null, w(m.value, (r) => (x(), l("li", { key: r.value }, [u("button", {
|
|
1888
1894
|
type: "button",
|
|
1889
1895
|
disabled: e.disabled,
|
|
1890
1896
|
class: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors hover:bg-surface-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 disabled:cursor-not-allowed",
|
|
1891
1897
|
onClick: (e) => v(s.value, r.value)
|
|
1892
|
-
}, [f(
|
|
1898
|
+
}, [f(Cn, {
|
|
1893
1899
|
"model-value": s.value.has(r.value),
|
|
1894
1900
|
disabled: e.disabled,
|
|
1895
|
-
onClick: n[0] ||=
|
|
1901
|
+
onClick: n[0] ||= F(() => {}, ["stop"]),
|
|
1896
1902
|
"onUpdate:modelValue": (e) => v(s.value, r.value)
|
|
1897
1903
|
}, null, 8, [
|
|
1898
1904
|
"model-value",
|
|
1899
1905
|
"disabled",
|
|
1900
1906
|
"onUpdate:modelValue"
|
|
1901
|
-
]), T(t.$slots, "item", { option: r }, () => [u("span",
|
|
1902
|
-
u("div",
|
|
1903
|
-
f(
|
|
1907
|
+
]), T(t.$slots, "item", { option: r }, () => [u("span", Nr, D(r.label), 1)])], 8, Mr)]))), 128)), m.value.length === 0 ? (x(), l("li", Pr, "Empty")) : c("", !0)])], 2),
|
|
1908
|
+
u("div", Fr, [
|
|
1909
|
+
f(X, {
|
|
1904
1910
|
variant: "outline",
|
|
1905
1911
|
size: "icon-sm",
|
|
1906
1912
|
disabled: e.disabled || s.value.size === 0,
|
|
1907
1913
|
"aria-label": "Move selected to target",
|
|
1908
1914
|
onClick: y
|
|
1909
1915
|
}, {
|
|
1910
|
-
default:
|
|
1916
|
+
default: N(() => [f(O(z), { class: "size-4" })]),
|
|
1911
1917
|
_: 1
|
|
1912
1918
|
}, 8, ["disabled"]),
|
|
1913
|
-
f(
|
|
1919
|
+
f(X, {
|
|
1914
1920
|
variant: "outline",
|
|
1915
1921
|
size: "icon-sm",
|
|
1916
1922
|
disabled: e.disabled || p.value.size === 0,
|
|
1917
1923
|
"aria-label": "Move selected to source",
|
|
1918
1924
|
onClick: b
|
|
1919
1925
|
}, {
|
|
1920
|
-
default:
|
|
1926
|
+
default: N(() => [f(O(ie), { class: "size-4" })]),
|
|
1921
1927
|
_: 1
|
|
1922
1928
|
}, 8, ["disabled"]),
|
|
1923
|
-
f(
|
|
1929
|
+
f(X, {
|
|
1924
1930
|
variant: "ghost",
|
|
1925
1931
|
size: "icon-sm",
|
|
1926
1932
|
disabled: e.disabled,
|
|
1927
1933
|
"aria-label": "Move all to target",
|
|
1928
1934
|
onClick: S
|
|
1929
1935
|
}, {
|
|
1930
|
-
default:
|
|
1936
|
+
default: N(() => [f(O(B), { class: "size-4" })]),
|
|
1931
1937
|
_: 1
|
|
1932
1938
|
}, 8, ["disabled"]),
|
|
1933
|
-
f(
|
|
1939
|
+
f(X, {
|
|
1934
1940
|
variant: "ghost",
|
|
1935
1941
|
size: "icon-sm",
|
|
1936
1942
|
disabled: e.disabled,
|
|
1937
1943
|
"aria-label": "Move all to source",
|
|
1938
1944
|
onClick: E
|
|
1939
1945
|
}, {
|
|
1940
|
-
default:
|
|
1946
|
+
default: N(() => [f(O(oe), { class: "size-4" })]),
|
|
1941
1947
|
_: 1
|
|
1942
1948
|
}, 8, ["disabled"])
|
|
1943
1949
|
]),
|
|
1944
|
-
u("div", { class: g(["flex min-h-40 flex-1 flex-col rounded-md border border-border bg-surface", e.disabled && "opacity-50"]) }, [u("div",
|
|
1950
|
+
u("div", { class: g(["flex min-h-40 flex-1 flex-col rounded-md border border-border bg-surface", e.disabled && "opacity-50"]) }, [u("div", Ir, [T(t.$slots, "target-header", {}, () => [d(D(e.targetLabel), 1)])]), u("ul", Lr, [(x(!0), l(a, null, w(h.value, (r) => (x(), l("li", { key: r.value }, [u("button", {
|
|
1945
1951
|
type: "button",
|
|
1946
1952
|
disabled: e.disabled,
|
|
1947
1953
|
class: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors hover:bg-surface-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 disabled:cursor-not-allowed",
|
|
1948
1954
|
onClick: (e) => v(p.value, r.value)
|
|
1949
|
-
}, [f(
|
|
1955
|
+
}, [f(Cn, {
|
|
1950
1956
|
"model-value": p.value.has(r.value),
|
|
1951
1957
|
disabled: e.disabled,
|
|
1952
|
-
onClick: n[1] ||=
|
|
1958
|
+
onClick: n[1] ||= F(() => {}, ["stop"]),
|
|
1953
1959
|
"onUpdate:modelValue": (e) => v(p.value, r.value)
|
|
1954
1960
|
}, null, 8, [
|
|
1955
1961
|
"model-value",
|
|
1956
1962
|
"disabled",
|
|
1957
1963
|
"onUpdate:modelValue"
|
|
1958
|
-
]), T(t.$slots, "item", { option: r }, () => [u("span",
|
|
1964
|
+
]), T(t.$slots, "item", { option: r }, () => [u("span", zr, D(r.label), 1)])], 8, Rr)]))), 128)), h.value.length === 0 ? (x(), l("li", Br, "Empty")) : c("", !0)])], 2)
|
|
1959
1965
|
]));
|
|
1960
1966
|
}
|
|
1961
|
-
}),
|
|
1967
|
+
}), Hr = /* @__PURE__ */ p({
|
|
1962
1968
|
__name: "Table",
|
|
1963
1969
|
props: {
|
|
1964
1970
|
striped: { type: Boolean },
|
|
@@ -1969,22 +1975,22 @@ var Yt = { class: "relative w-full" }, Xt = [
|
|
|
1969
1975
|
}
|
|
1970
1976
|
},
|
|
1971
1977
|
setup(e) {
|
|
1972
|
-
let t = e, n = o(() =>
|
|
1978
|
+
let t = e, n = o(() => H("w-full border-collapse text-start text-sm text-foreground", t.size === "sm" ? "text-xs" : "text-sm", t.striped && "[&_tbody>tr:nth-child(even)]:bg-surface-muted/40", t.contained && "overflow-hidden rounded-md border border-border bg-surface"));
|
|
1973
1979
|
return (e, t) => (x(), l("table", { class: g(n.value) }, [T(e.$slots, "default")], 2));
|
|
1974
1980
|
}
|
|
1975
|
-
}),
|
|
1981
|
+
}), Ur = (e, t) => {
|
|
1976
1982
|
let n = e.__vccOpts || e;
|
|
1977
1983
|
for (let [e, r] of t) n[e] = r;
|
|
1978
1984
|
return n;
|
|
1979
|
-
},
|
|
1980
|
-
function Ur(e, t) {
|
|
1981
|
-
return x(), l("thead", Hr, [T(e.$slots, "default")]);
|
|
1982
|
-
}
|
|
1983
|
-
var Wr = /*#__PURE__*/ Br(Vr, [["render", Ur]]), Gr = {};
|
|
1985
|
+
}, Wr = {}, Gr = { class: "border-b border-border bg-surface-muted/60 text-xs font-medium text-muted" };
|
|
1984
1986
|
function Kr(e, t) {
|
|
1987
|
+
return x(), l("thead", Gr, [T(e.$slots, "default")]);
|
|
1988
|
+
}
|
|
1989
|
+
var qr = /*#__PURE__*/ Ur(Wr, [["render", Kr]]), Jr = {};
|
|
1990
|
+
function Yr(e, t) {
|
|
1985
1991
|
return x(), l("tbody", null, [T(e.$slots, "default")]);
|
|
1986
1992
|
}
|
|
1987
|
-
var
|
|
1993
|
+
var Xr = /*#__PURE__*/ Ur(Jr, [["render", Yr]]), Q = /* @__PURE__ */ p({
|
|
1988
1994
|
__name: "TableRow",
|
|
1989
1995
|
props: { clickable: {
|
|
1990
1996
|
type: Boolean,
|
|
@@ -1993,7 +1999,7 @@ var qr = /*#__PURE__*/ Br(Gr, [["render", Kr]]), $ = /* @__PURE__ */ p({
|
|
|
1993
1999
|
setup(e) {
|
|
1994
2000
|
return (t, n) => (x(), l("tr", { class: g(["border-b border-border/60 last:border-b-0", e.clickable && "cursor-pointer transition-colors hover:bg-surface-muted/50"]) }, [T(t.$slots, "default")], 2));
|
|
1995
2001
|
}
|
|
1996
|
-
}),
|
|
2002
|
+
}), Zr = ["aria-sort"], Qr = /* @__PURE__ */ p({
|
|
1997
2003
|
__name: "TableHead",
|
|
1998
2004
|
props: {
|
|
1999
2005
|
sortDirection: {},
|
|
@@ -2006,20 +2012,20 @@ var qr = /*#__PURE__*/ Br(Gr, [["render", Kr]]), $ = /* @__PURE__ */ p({
|
|
|
2006
2012
|
scope: "col",
|
|
2007
2013
|
"aria-sort": n.value,
|
|
2008
2014
|
style: _(e.width ? { width: e.width } : void 0),
|
|
2009
|
-
class: g(O(
|
|
2010
|
-
}, [T(t.$slots, "default")], 14,
|
|
2015
|
+
class: g(O(H)("px-3 py-2 font-medium", e.align === "center" && "text-center", e.align === "end" && "text-end"))
|
|
2016
|
+
}, [T(t.$slots, "default")], 14, Zr));
|
|
2011
2017
|
}
|
|
2012
|
-
}),
|
|
2018
|
+
}), $ = /* @__PURE__ */ p({
|
|
2013
2019
|
__name: "TableCell",
|
|
2014
2020
|
props: {
|
|
2015
2021
|
align: { default: "start" },
|
|
2016
2022
|
truncate: { type: Boolean }
|
|
2017
2023
|
},
|
|
2018
2024
|
setup(e) {
|
|
2019
|
-
let t = e, n = o(() =>
|
|
2025
|
+
let t = e, n = o(() => H("px-3 py-2 align-middle", t.align === "center" && "text-center", t.align === "end" && "text-end", t.truncate && "max-w-0 truncate"));
|
|
2020
2026
|
return (e, t) => (x(), l("td", { class: g(n.value) }, [T(e.$slots, "default")], 2));
|
|
2021
2027
|
}
|
|
2022
|
-
}),
|
|
2028
|
+
}), $r = ["colspan"], ei = /* @__PURE__ */ p({
|
|
2023
2029
|
__name: "TableEmpty",
|
|
2024
2030
|
props: {
|
|
2025
2031
|
columns: {},
|
|
@@ -2029,12 +2035,12 @@ var qr = /*#__PURE__*/ Br(Gr, [["render", Kr]]), $ = /* @__PURE__ */ p({
|
|
|
2029
2035
|
return (t, n) => (x(), l("tr", null, [u("td", {
|
|
2030
2036
|
colspan: e.columns,
|
|
2031
2037
|
class: "px-3 py-8 text-center text-sm text-muted"
|
|
2032
|
-
}, [T(t.$slots, "default", {}, () => [d(D(e.label), 1)])], 8,
|
|
2038
|
+
}, [T(t.$slots, "default", {}, () => [d(D(e.label), 1)])], 8, $r)]));
|
|
2033
2039
|
}
|
|
2034
2040
|
});
|
|
2035
2041
|
//#endregion
|
|
2036
2042
|
//#region src/lib/pagination.ts
|
|
2037
|
-
function
|
|
2043
|
+
function ti(e, t, n) {
|
|
2038
2044
|
if (n <= 0 || t <= 0) return {
|
|
2039
2045
|
from: 0,
|
|
2040
2046
|
to: 0,
|
|
@@ -2051,17 +2057,17 @@ function $r(e, t, n) {
|
|
|
2051
2057
|
total: n
|
|
2052
2058
|
};
|
|
2053
2059
|
}
|
|
2054
|
-
function
|
|
2060
|
+
function ni(e, t) {
|
|
2055
2061
|
return t <= 0 ? 1 : Math.max(1, Math.ceil(e / t));
|
|
2056
2062
|
}
|
|
2057
|
-
function
|
|
2063
|
+
function ri(e, t, n = 5) {
|
|
2058
2064
|
if (t <= 0) return [];
|
|
2059
2065
|
let r = Math.floor(n / 2), i = Math.max(0, Math.min(e - r, t - n)), a = Math.max(0, i);
|
|
2060
2066
|
return Array.from({ length: Math.min(n, t - a) }, (e, t) => a + t + 1);
|
|
2061
2067
|
}
|
|
2062
2068
|
//#endregion
|
|
2063
2069
|
//#region src/components/table/TablePagination.vue?vue&type=script&setup=true&lang.ts
|
|
2064
|
-
var
|
|
2070
|
+
var ii = { class: "flex flex-wrap items-center justify-between gap-3 px-3 py-2 text-sm text-muted" }, ai = { class: "flex items-center gap-2" }, oi = ["value"], si = ["value"], ci = { class: "flex items-center gap-2" }, li = { class: "flex items-center gap-1" }, ui = /* @__PURE__ */ p({
|
|
2065
2071
|
__name: "TablePagination",
|
|
2066
2072
|
props: {
|
|
2067
2073
|
pageIndex: {},
|
|
@@ -2079,63 +2085,63 @@ var ni = { class: "flex flex-wrap items-center justify-between gap-3 px-3 py-2 t
|
|
|
2079
2085
|
},
|
|
2080
2086
|
emits: ["update:pageIndex", "update:pageSize"],
|
|
2081
2087
|
setup(e, { emit: t }) {
|
|
2082
|
-
let n = e, r = t, i = o(() =>
|
|
2088
|
+
let n = e, r = t, i = o(() => ni(n.total, n.pageSize)), c = o(() => ti(n.pageIndex, n.pageSize, n.total)), p = o(() => ri(n.pageIndex, i.value));
|
|
2083
2089
|
function m(e) {
|
|
2084
2090
|
r("update:pageIndex", Math.max(0, Math.min(e, i.value - 1)));
|
|
2085
2091
|
}
|
|
2086
|
-
return (t, n) => (x(), l("div",
|
|
2092
|
+
return (t, n) => (x(), l("div", ii, [u("div", ai, [u("span", null, D(e.rowsPerPageLabel), 1), u("select", {
|
|
2087
2093
|
value: e.pageSize,
|
|
2088
2094
|
class: "rounded-md border border-border bg-surface px-2 py-1 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
2089
2095
|
onChange: n[0] ||= (e) => r("update:pageSize", Number(e.target.value))
|
|
2090
2096
|
}, [(x(!0), l(a, null, w(e.pageSizeOptions, (e) => (x(), l("option", {
|
|
2091
2097
|
key: e,
|
|
2092
2098
|
value: e
|
|
2093
|
-
}, D(e), 9,
|
|
2094
|
-
f(
|
|
2099
|
+
}, D(e), 9, si))), 128))], 40, oi)]), u("div", ci, [u("span", null, D(c.value.from) + "–" + D(c.value.to) + " " + D(e.ofLabel) + " " + D(c.value.total), 1), u("div", li, [
|
|
2100
|
+
f(X, {
|
|
2095
2101
|
variant: "ghost",
|
|
2096
2102
|
size: "icon-sm",
|
|
2097
2103
|
disabled: e.pageIndex <= 0,
|
|
2098
2104
|
"aria-label": e.previousLabel,
|
|
2099
2105
|
onClick: n[1] ||= (t) => m(e.pageIndex - 1)
|
|
2100
2106
|
}, {
|
|
2101
|
-
default:
|
|
2107
|
+
default: N(() => [f(O(ie), { class: "size-4 rtl:rotate-180" })]),
|
|
2102
2108
|
_: 1
|
|
2103
2109
|
}, 8, ["disabled", "aria-label"]),
|
|
2104
|
-
(x(!0), l(a, null, w(p.value, (t) => (x(), s(
|
|
2110
|
+
(x(!0), l(a, null, w(p.value, (t) => (x(), s(X, {
|
|
2105
2111
|
key: t,
|
|
2106
2112
|
variant: t - 1 === e.pageIndex ? "default" : "ghost",
|
|
2107
2113
|
size: "icon-sm",
|
|
2108
2114
|
"aria-current": t - 1 === e.pageIndex ? "page" : void 0,
|
|
2109
2115
|
onClick: (e) => m(t - 1)
|
|
2110
2116
|
}, {
|
|
2111
|
-
default:
|
|
2117
|
+
default: N(() => [d(D(t), 1)]),
|
|
2112
2118
|
_: 2
|
|
2113
2119
|
}, 1032, [
|
|
2114
2120
|
"variant",
|
|
2115
2121
|
"aria-current",
|
|
2116
2122
|
"onClick"
|
|
2117
2123
|
]))), 128)),
|
|
2118
|
-
f(
|
|
2124
|
+
f(X, {
|
|
2119
2125
|
variant: "ghost",
|
|
2120
2126
|
size: "icon-sm",
|
|
2121
2127
|
disabled: e.pageIndex >= i.value - 1,
|
|
2122
2128
|
"aria-label": e.nextLabel,
|
|
2123
2129
|
onClick: n[2] ||= (t) => m(e.pageIndex + 1)
|
|
2124
2130
|
}, {
|
|
2125
|
-
default:
|
|
2131
|
+
default: N(() => [f(O(z), { class: "size-4 rtl:rotate-180" })]),
|
|
2126
2132
|
_: 1
|
|
2127
2133
|
}, 8, ["disabled", "aria-label"])
|
|
2128
2134
|
])])]));
|
|
2129
2135
|
}
|
|
2130
|
-
}),
|
|
2131
|
-
rowSortingFeature:
|
|
2132
|
-
rowPaginationFeature:
|
|
2133
|
-
rowExpandingFeature:
|
|
2134
|
-
sortedRowModel:
|
|
2135
|
-
paginatedRowModel:
|
|
2136
|
-
expandedRowModel:
|
|
2137
|
-
sortFns:
|
|
2138
|
-
}),
|
|
2136
|
+
}), di = bt({
|
|
2137
|
+
rowSortingFeature: vt,
|
|
2138
|
+
rowPaginationFeature: _t,
|
|
2139
|
+
rowExpandingFeature: gt,
|
|
2140
|
+
sortedRowModel: ht(),
|
|
2141
|
+
paginatedRowModel: mt(),
|
|
2142
|
+
expandedRowModel: pt(),
|
|
2143
|
+
sortFns: yt
|
|
2144
|
+
}), fi = [
|
|
2139
2145
|
"a[href]",
|
|
2140
2146
|
"button",
|
|
2141
2147
|
"input",
|
|
@@ -2148,16 +2154,21 @@ var ni = { class: "flex flex-wrap items-center justify-between gap-3 px-3 py-2 t
|
|
|
2148
2154
|
"[role=\"menu\"]",
|
|
2149
2155
|
"[data-row-toggle-ignore]"
|
|
2150
2156
|
].join(",");
|
|
2151
|
-
function
|
|
2157
|
+
function pi(e) {
|
|
2152
2158
|
let t = e;
|
|
2153
|
-
return !t || typeof t.closest != "function" ? !1 : t.closest(
|
|
2159
|
+
return !t || typeof t.closest != "function" ? !1 : t.closest(fi) !== null;
|
|
2154
2160
|
}
|
|
2155
|
-
function
|
|
2161
|
+
function mi(e, t) {
|
|
2156
2162
|
return e[t] ? {} : { [t]: !0 };
|
|
2157
2163
|
}
|
|
2158
2164
|
//#endregion
|
|
2159
2165
|
//#region src/components/data-table/DataTable.vue?vue&type=script&setup=true&lang.ts
|
|
2160
|
-
var
|
|
2166
|
+
var hi = ["aria-busy"], gi = {
|
|
2167
|
+
key: 0,
|
|
2168
|
+
class: "sr-only",
|
|
2169
|
+
role: "status",
|
|
2170
|
+
"aria-live": "polite"
|
|
2171
|
+
}, _i = ["onClick"], vi = /* @__PURE__ */ p({
|
|
2161
2172
|
__name: "DataTable",
|
|
2162
2173
|
props: {
|
|
2163
2174
|
data: {},
|
|
@@ -2182,7 +2193,13 @@ var pi = ["onClick"], mi = /* @__PURE__ */ p({
|
|
|
2182
2193
|
type: Boolean,
|
|
2183
2194
|
default: !0
|
|
2184
2195
|
},
|
|
2185
|
-
maxHeight: {}
|
|
2196
|
+
maxHeight: {},
|
|
2197
|
+
loading: {
|
|
2198
|
+
type: Boolean,
|
|
2199
|
+
default: !1
|
|
2200
|
+
},
|
|
2201
|
+
loadingRows: { default: 5 },
|
|
2202
|
+
loadingLabel: { default: "Loading…" }
|
|
2186
2203
|
},
|
|
2187
2204
|
emits: [
|
|
2188
2205
|
"update:sorting",
|
|
@@ -2190,8 +2207,8 @@ var pi = ["onClick"], mi = /* @__PURE__ */ p({
|
|
|
2190
2207
|
"row-click"
|
|
2191
2208
|
],
|
|
2192
2209
|
setup(e, { emit: t }) {
|
|
2193
|
-
let n = e, r = t, i = A(), u = C([]), p = n.getRowId ? (e) => n.getRowId(e) : void 0, m =
|
|
2194
|
-
features:
|
|
2210
|
+
let n = e, r = t, i = A(), u = C([]), p = n.getRowId ? (e) => n.getRowId(e) : void 0, m = xt({
|
|
2211
|
+
features: di,
|
|
2195
2212
|
get columns() {
|
|
2196
2213
|
return n.columns;
|
|
2197
2214
|
},
|
|
@@ -2218,47 +2235,48 @@ var pi = ["onClick"], mi = /* @__PURE__ */ p({
|
|
|
2218
2235
|
let t = typeof e == "function" ? e(n.expanded) : e;
|
|
2219
2236
|
r("update:expanded", t === !0 ? {} : t);
|
|
2220
2237
|
}
|
|
2221
|
-
}), h = o(() => m.getRowModel().rows), v = o(() => m.getAllLeafColumns().length);
|
|
2222
|
-
function
|
|
2238
|
+
}), h = o(() => m.getRowModel().rows), v = o(() => m.getAllLeafColumns().length), y = o(() => Math.max(1, Math.floor(n.loadingRows)));
|
|
2239
|
+
function b(e) {
|
|
2223
2240
|
let t = m.getColumn(e);
|
|
2224
2241
|
return t?.getIsSorted() ? t.getIsSorted() === "desc" ? "descending" : "ascending" : "none";
|
|
2225
2242
|
}
|
|
2226
|
-
let
|
|
2243
|
+
let S = (e) => !!i[`cell-${e}`], E = (e) => {
|
|
2227
2244
|
let t = e.size;
|
|
2228
2245
|
return t ? `${t}px` : void 0;
|
|
2229
2246
|
};
|
|
2230
|
-
function
|
|
2231
|
-
r("row-click", h.value.find((e) => e.id === t)?.original), n.expandable && (n.stopRowToggleOnInteractiveCells &&
|
|
2247
|
+
function k(e, t) {
|
|
2248
|
+
r("row-click", h.value.find((e) => e.id === t)?.original), n.expandable && (n.stopRowToggleOnInteractiveCells && pi(e.target) || r("update:expanded", mi(n.expanded, t)));
|
|
2232
2249
|
}
|
|
2233
2250
|
return (t, n) => (x(), l("div", {
|
|
2234
2251
|
class: g(e.maxHeight ? "overflow-auto" : void 0),
|
|
2235
|
-
style: _(e.maxHeight ? { maxHeight: e.maxHeight } : void 0)
|
|
2236
|
-
|
|
2252
|
+
style: _(e.maxHeight ? { maxHeight: e.maxHeight } : void 0),
|
|
2253
|
+
"aria-busy": e.loading || void 0
|
|
2254
|
+
}, [e.loading ? (x(), l("span", gi, D(e.loadingLabel), 1)) : c("", !0), f(Hr, {
|
|
2237
2255
|
striped: e.striped,
|
|
2238
2256
|
size: e.size
|
|
2239
2257
|
}, {
|
|
2240
|
-
default:
|
|
2241
|
-
default:
|
|
2242
|
-
default:
|
|
2258
|
+
default: N(() => [f(qr, null, {
|
|
2259
|
+
default: N(() => [f(Q, null, {
|
|
2260
|
+
default: N(() => [(x(!0), l(a, null, w(O(m).getHeaderGroups()[0]?.headers ?? [], (t) => (x(), s(Qr, {
|
|
2243
2261
|
key: t.id,
|
|
2244
|
-
width:
|
|
2245
|
-
"sort-direction": t.column.getCanSort() ?
|
|
2262
|
+
width: E(t.column.columnDef),
|
|
2263
|
+
"sort-direction": t.column.getCanSort() ? b(t.column.id) : void 0
|
|
2246
2264
|
}, {
|
|
2247
|
-
default:
|
|
2265
|
+
default: N(() => [e.sortable && t.column.getCanSort() ? (x(), l("button", {
|
|
2248
2266
|
key: 0,
|
|
2249
2267
|
type: "button",
|
|
2250
2268
|
class: "inline-flex items-center gap-1 rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
2251
2269
|
onClick: (e) => t.column.toggleSorting()
|
|
2252
|
-
}, [f(O(
|
|
2270
|
+
}, [f(O(ft), { header: t }, null, 8, ["header"]), b(t.column.id) === "descending" ? (x(), s(O(R), {
|
|
2253
2271
|
key: 0,
|
|
2254
2272
|
class: "size-3.5"
|
|
2255
|
-
})) :
|
|
2273
|
+
})) : b(t.column.id) === "ascending" ? (x(), s(O(ae), {
|
|
2256
2274
|
key: 1,
|
|
2257
2275
|
class: "size-3.5"
|
|
2258
|
-
})) : (x(), s(O(
|
|
2276
|
+
})) : (x(), s(O(se), {
|
|
2259
2277
|
key: 2,
|
|
2260
2278
|
class: "size-3.5 opacity-40"
|
|
2261
|
-
}))], 8,
|
|
2279
|
+
}))], 8, _i)) : (x(), s(O(ft), {
|
|
2262
2280
|
key: 1,
|
|
2263
2281
|
header: t
|
|
2264
2282
|
}, null, 8, ["header"]))]),
|
|
@@ -2267,25 +2285,34 @@ var pi = ["onClick"], mi = /* @__PURE__ */ p({
|
|
|
2267
2285
|
_: 1
|
|
2268
2286
|
})]),
|
|
2269
2287
|
_: 1
|
|
2270
|
-
}), f(
|
|
2271
|
-
default:
|
|
2288
|
+
}), f(Xr, null, {
|
|
2289
|
+
default: N(() => [!e.loading && h.value.length === 0 ? (x(), s(ei, {
|
|
2272
2290
|
key: 0,
|
|
2273
2291
|
columns: v.value
|
|
2274
2292
|
}, {
|
|
2275
|
-
default:
|
|
2293
|
+
default: N(() => [T(t.$slots, "empty", {}, () => [d(D(e.emptyLabel), 1)])]),
|
|
2276
2294
|
_: 3
|
|
2277
|
-
}, 8, ["columns"])) : c("", !0), (x(!0), l(a,
|
|
2295
|
+
}, 8, ["columns"])) : c("", !0), e.loading ? (x(!0), l(a, { key: 1 }, w(y.value, (e) => (x(), s(Q, { key: "loading-" + e }, {
|
|
2296
|
+
default: N(() => [(x(!0), l(a, null, w(v.value, (e) => (x(), s($, { key: e }, {
|
|
2297
|
+
default: N(() => [f(Nn, {
|
|
2298
|
+
height: "1rem",
|
|
2299
|
+
rounded: "sm"
|
|
2300
|
+
})]),
|
|
2301
|
+
_: 1
|
|
2302
|
+
}))), 128))]),
|
|
2303
|
+
_: 1
|
|
2304
|
+
}))), 128)) : (x(!0), l(a, { key: 2 }, w(h.value, (n) => (x(), l(a, { key: n.id }, [f(Q, {
|
|
2278
2305
|
clickable: e.expandable,
|
|
2279
2306
|
"data-row-id": n.id,
|
|
2280
2307
|
"data-state": n.getIsExpanded() ? "expanded" : void 0,
|
|
2281
|
-
onClick: (e) =>
|
|
2308
|
+
onClick: (e) => k(e, n.id)
|
|
2282
2309
|
}, {
|
|
2283
|
-
default:
|
|
2284
|
-
default:
|
|
2310
|
+
default: N(() => [(x(!0), l(a, null, w(n.getAllCells(), (e) => (x(), s($, { key: e.id }, {
|
|
2311
|
+
default: N(() => [S(e.column.id) ? T(t.$slots, `cell-${e.column.id}`, {
|
|
2285
2312
|
row: n,
|
|
2286
2313
|
cell: e,
|
|
2287
2314
|
value: e.getValue()
|
|
2288
|
-
}, void 0, void 0, 0) : (x(), s(O(
|
|
2315
|
+
}, void 0, void 0, 0) : (x(), s(O(ft), {
|
|
2289
2316
|
key: 1,
|
|
2290
2317
|
cell: e
|
|
2291
2318
|
}, null, 8, ["cell"]))]),
|
|
@@ -2297,12 +2324,12 @@ var pi = ["onClick"], mi = /* @__PURE__ */ p({
|
|
|
2297
2324
|
"data-row-id",
|
|
2298
2325
|
"data-state",
|
|
2299
2326
|
"onClick"
|
|
2300
|
-
]), n.getIsExpanded() ? (x(), s(
|
|
2327
|
+
]), n.getIsExpanded() ? (x(), s(Q, {
|
|
2301
2328
|
key: 0,
|
|
2302
2329
|
class: "bg-surface-muted/30"
|
|
2303
2330
|
}, {
|
|
2304
|
-
default:
|
|
2305
|
-
default:
|
|
2331
|
+
default: N(() => [f($, { colspan: v.value }, {
|
|
2332
|
+
default: N(() => [T(t.$slots, "expansion", { row: n })]),
|
|
2306
2333
|
_: 2
|
|
2307
2334
|
}, 1032, ["colspan"])]),
|
|
2308
2335
|
_: 2
|
|
@@ -2310,12 +2337,12 @@ var pi = ["onClick"], mi = /* @__PURE__ */ p({
|
|
|
2310
2337
|
_: 3
|
|
2311
2338
|
})]),
|
|
2312
2339
|
_: 3
|
|
2313
|
-
}, 8, ["striped", "size"])],
|
|
2340
|
+
}, 8, ["striped", "size"])], 14, hi));
|
|
2314
2341
|
}
|
|
2315
2342
|
});
|
|
2316
2343
|
//#endregion
|
|
2317
2344
|
//#region src/lib/tree.ts
|
|
2318
|
-
function
|
|
2345
|
+
function yi(e, t, n = 1, r = null) {
|
|
2319
2346
|
return e.flatMap((e) => {
|
|
2320
2347
|
let i = {
|
|
2321
2348
|
node: e,
|
|
@@ -2324,27 +2351,27 @@ function hi(e, t, n = 1, r = null) {
|
|
|
2324
2351
|
parentKey: r,
|
|
2325
2352
|
hasChildren: !!e.children?.length
|
|
2326
2353
|
};
|
|
2327
|
-
return !i.hasChildren || !t.includes(e.value) ? [i] : [i, ...
|
|
2354
|
+
return !i.hasChildren || !t.includes(e.value) ? [i] : [i, ...yi(e.children, t, n + 1, e.value)];
|
|
2328
2355
|
});
|
|
2329
2356
|
}
|
|
2330
|
-
function
|
|
2357
|
+
function bi(e, t) {
|
|
2331
2358
|
for (let n of e) {
|
|
2332
2359
|
if (n.value === t) return n;
|
|
2333
|
-
let e = n.children ?
|
|
2360
|
+
let e = n.children ? bi(n.children, t) : void 0;
|
|
2334
2361
|
if (e) return e;
|
|
2335
2362
|
}
|
|
2336
2363
|
}
|
|
2337
|
-
function
|
|
2338
|
-
return e.flatMap((e) => e.children?.length ?
|
|
2364
|
+
function xi(e) {
|
|
2365
|
+
return e.flatMap((e) => e.children?.length ? xi(e.children) : [e.value]);
|
|
2339
2366
|
}
|
|
2340
|
-
function
|
|
2341
|
-
let n = e.children?.length ?
|
|
2367
|
+
function Si(e, t) {
|
|
2368
|
+
let n = e.children?.length ? xi([e]) : [e.value], r = n.filter((e) => t.includes(e)).length;
|
|
2342
2369
|
return r === 0 ? "unchecked" : r === n.length ? "checked" : "indeterminate";
|
|
2343
2370
|
}
|
|
2344
|
-
function
|
|
2371
|
+
function Ci(e, t, n = (e) => e.label ?? "") {
|
|
2345
2372
|
let r = t.trim().toLowerCase();
|
|
2346
2373
|
return r ? e.reduce((e, i) => {
|
|
2347
|
-
let a = i.children ?
|
|
2374
|
+
let a = i.children ? Ci(i.children, t, n) : void 0;
|
|
2348
2375
|
return !n(i).toLowerCase().includes(r) && (!a || a.length === 0) || e.push({
|
|
2349
2376
|
...i,
|
|
2350
2377
|
children: a
|
|
@@ -2353,10 +2380,10 @@ function yi(e, t, n = (e) => e.label ?? "") {
|
|
|
2353
2380
|
}
|
|
2354
2381
|
//#endregion
|
|
2355
2382
|
//#region src/components/tree-table/TreeTable.vue?vue&type=script&setup=true&lang.ts
|
|
2356
|
-
var
|
|
2383
|
+
var wi = { class: "overflow-hidden rounded-md border border-border bg-surface" }, Ti = { class: "px-3 py-2" }, Ei = ["aria-label", "onClick"], Di = {
|
|
2357
2384
|
key: 1,
|
|
2358
2385
|
class: "inline-block size-4"
|
|
2359
|
-
},
|
|
2386
|
+
}, Oi = /* @__PURE__ */ p({
|
|
2360
2387
|
__name: "TreeTable",
|
|
2361
2388
|
props: {
|
|
2362
2389
|
nodes: {},
|
|
@@ -2370,21 +2397,21 @@ var bi = { class: "overflow-hidden rounded-md border border-border bg-surface" }
|
|
|
2370
2397
|
},
|
|
2371
2398
|
emits: ["update:expanded"],
|
|
2372
2399
|
setup(e, { emit: t }) {
|
|
2373
|
-
let n = e, r = t, i = o(() => `minmax(12rem, 1fr) ${n.columns.map((e) => e.width ?? "minmax(6rem, 1fr)").join(" ")}`), c = o(() =>
|
|
2374
|
-
return (t, n) => (x(), l("div",
|
|
2400
|
+
let n = e, r = t, i = o(() => `minmax(12rem, 1fr) ${n.columns.map((e) => e.width ?? "minmax(6rem, 1fr)").join(" ")}`), c = o(() => yi(n.nodes, n.expanded));
|
|
2401
|
+
return (t, n) => (x(), l("div", wi, [u("div", {
|
|
2375
2402
|
class: "grid border-b border-border bg-surface-muted/60 text-xs font-medium text-muted",
|
|
2376
2403
|
style: _({ gridTemplateColumns: i.value })
|
|
2377
|
-
}, [u("div",
|
|
2404
|
+
}, [u("div", Ti, [T(t.$slots, "header", {}, () => [d(D(e.rowColumnHeader), 1)])]), (x(!0), l(a, null, w(e.columns, (e) => (x(), l("div", {
|
|
2378
2405
|
key: e.key,
|
|
2379
2406
|
class: g(["px-3 py-2", [e.align === "center" && "text-center", e.align === "end" && "text-end"]])
|
|
2380
|
-
}, D(e.header), 3))), 128))], 4), f(O(
|
|
2407
|
+
}, D(e.header), 3))), 128))], 4), f(O(ut), {
|
|
2381
2408
|
items: e.nodes,
|
|
2382
2409
|
"get-key": (e) => e.value,
|
|
2383
2410
|
"get-children": (e) => e.children,
|
|
2384
2411
|
expanded: e.expanded,
|
|
2385
2412
|
"onUpdate:expanded": n[0] ||= (e) => r("update:expanded", e)
|
|
2386
2413
|
}, {
|
|
2387
|
-
default:
|
|
2414
|
+
default: N(() => [(x(!0), l(a, null, w(c.value, (n) => (x(), s(O(lt), {
|
|
2388
2415
|
key: n.key,
|
|
2389
2416
|
value: n.node,
|
|
2390
2417
|
level: n.level,
|
|
@@ -2392,7 +2419,7 @@ var bi = { class: "overflow-hidden rounded-md border border-border bg-surface" }
|
|
|
2392
2419
|
class: "grid items-center border-b border-border/60 text-sm last:border-b-0 data-[selected]:bg-surface-muted/30",
|
|
2393
2420
|
style: _({ gridTemplateColumns: i.value })
|
|
2394
2421
|
}, {
|
|
2395
|
-
default:
|
|
2422
|
+
default: N(({ isExpanded: r, handleToggle: i }) => [u("div", {
|
|
2396
2423
|
class: "flex items-center gap-1 px-3 py-2",
|
|
2397
2424
|
style: _({ paddingInlineStart: `calc(0.75rem + ${(n.level - 1) * 1.25}rem)` })
|
|
2398
2425
|
}, [n.hasChildren ? (x(), l("button", {
|
|
@@ -2400,8 +2427,8 @@ var bi = { class: "overflow-hidden rounded-md border border-border bg-surface" }
|
|
|
2400
2427
|
type: "button",
|
|
2401
2428
|
"aria-label": e.rowLabel(n.node),
|
|
2402
2429
|
class: g(["rounded p-0.5 text-muted transition-transform hover:bg-surface-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500", r && "rotate-90"]),
|
|
2403
|
-
onClick:
|
|
2404
|
-
}, [f(O(
|
|
2430
|
+
onClick: F(i, ["stop"])
|
|
2431
|
+
}, [f(O(z), { class: "size-3.5 rtl:rotate-180" })], 10, Ei)) : (x(), l("span", Di)), T(t.$slots, "row-label", {
|
|
2405
2432
|
node: n.node,
|
|
2406
2433
|
level: n.level
|
|
2407
2434
|
}, () => [d(D(e.rowLabel(n.node)), 1)])], 4), (x(!0), l(a, null, w(e.columns, (e) => (x(), l("div", {
|
|
@@ -2428,22 +2455,22 @@ var bi = { class: "overflow-hidden rounded-md border border-border bg-surface" }
|
|
|
2428
2455
|
"expanded"
|
|
2429
2456
|
])]));
|
|
2430
2457
|
}
|
|
2431
|
-
}),
|
|
2458
|
+
}), ki = ["disabled"], Ai = {
|
|
2432
2459
|
key: 0,
|
|
2433
2460
|
class: "truncate text-muted"
|
|
2434
|
-
},
|
|
2461
|
+
}, ji = {
|
|
2435
2462
|
key: 1,
|
|
2436
2463
|
class: "flex flex-wrap items-center gap-1"
|
|
2437
|
-
},
|
|
2464
|
+
}, Mi = {
|
|
2438
2465
|
key: 0,
|
|
2439
2466
|
class: "relative mb-2"
|
|
2440
|
-
},
|
|
2467
|
+
}, Ni = ["placeholder"], Pi = {
|
|
2441
2468
|
key: 1,
|
|
2442
2469
|
class: "block h-0.5 w-2 rounded bg-white"
|
|
2443
|
-
},
|
|
2470
|
+
}, Fi = { class: "truncate" }, Ii = {
|
|
2444
2471
|
key: 1,
|
|
2445
2472
|
class: "mt-2 flex justify-end border-t border-border pt-2"
|
|
2446
|
-
},
|
|
2473
|
+
}, Li = /* @__PURE__ */ p({
|
|
2447
2474
|
__name: "TreeSelect",
|
|
2448
2475
|
props: {
|
|
2449
2476
|
modelValue: { default: () => [] },
|
|
@@ -2463,45 +2490,45 @@ var bi = { class: "overflow-hidden rounded-md border border-border bg-surface" }
|
|
|
2463
2490
|
},
|
|
2464
2491
|
emits: ["update:modelValue"],
|
|
2465
2492
|
setup(e, { emit: t }) {
|
|
2466
|
-
let n = e, r = t, i = C(!1), p = C(""), m = C([]), h = o(() =>
|
|
2493
|
+
let n = e, r = t, i = C(!1), p = C(""), m = C([]), h = o(() => Ci(n.nodes, p.value)), v = o(() => yi(h.value, m.value)), y = o(() => xi(n.nodes)), b = o(() => n.modelValue.map((e) => bi(n.nodes, e)).filter((e) => !!e));
|
|
2467
2494
|
function S(e) {
|
|
2468
|
-
return
|
|
2495
|
+
return Si(e, n.modelValue);
|
|
2469
2496
|
}
|
|
2470
2497
|
function T(e) {
|
|
2471
2498
|
let t = (Array.isArray(e) ? e : []).map((e) => e.value);
|
|
2472
2499
|
r("update:modelValue", n.leafOnly ? t.filter((e) => y.value.includes(e)) : t);
|
|
2473
2500
|
}
|
|
2474
|
-
return (t, n) => (x(), s(O(
|
|
2501
|
+
return (t, n) => (x(), s(O(ze), {
|
|
2475
2502
|
open: i.value,
|
|
2476
2503
|
"onUpdate:open": n[3] ||= (e) => i.value = e
|
|
2477
2504
|
}, {
|
|
2478
|
-
default:
|
|
2505
|
+
default: N(() => [f(O(Be), {
|
|
2479
2506
|
"as-child": "",
|
|
2480
2507
|
disabled: e.disabled
|
|
2481
2508
|
}, {
|
|
2482
|
-
default:
|
|
2509
|
+
default: N(() => [u("button", {
|
|
2483
2510
|
type: "button",
|
|
2484
2511
|
disabled: e.disabled,
|
|
2485
2512
|
class: g(["flex w-full items-center justify-between gap-2 rounded-md border border-border bg-surface px-3 text-start text-sm text-foreground shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 disabled:cursor-not-allowed disabled:opacity-50", e.size === "sm" ? "min-h-8 py-1 text-xs" : "min-h-9 py-1.5"])
|
|
2486
|
-
}, [b.value.length === 0 ? (x(), l("span",
|
|
2513
|
+
}, [b.value.length === 0 ? (x(), l("span", Ai, D(e.placeholder), 1)) : (x(), l("span", ji, [(x(!0), l(a, null, w(b.value, (e) => (x(), s(Tn, {
|
|
2487
2514
|
key: e.value,
|
|
2488
2515
|
tone: "secondary"
|
|
2489
2516
|
}, {
|
|
2490
|
-
default:
|
|
2517
|
+
default: N(() => [d(D(e.label ?? e.value), 1)]),
|
|
2491
2518
|
_: 2
|
|
2492
|
-
}, 1024))), 128))])), f(O(
|
|
2519
|
+
}, 1024))), 128))])), f(O(R), { class: "size-4 shrink-0 opacity-50" })], 10, ki)]),
|
|
2493
2520
|
_: 1
|
|
2494
|
-
}, 8, ["disabled"]), f(O(
|
|
2521
|
+
}, 8, ["disabled"]), f(O(Le), {
|
|
2495
2522
|
"side-offset": 4,
|
|
2496
2523
|
class: "z-50 w-72 rounded-md border border-border bg-surface p-2 shadow-popover"
|
|
2497
2524
|
}, {
|
|
2498
|
-
default:
|
|
2499
|
-
e.filterable ? (x(), l("div",
|
|
2525
|
+
default: N(() => [
|
|
2526
|
+
e.filterable ? (x(), l("div", Mi, [f(O(fe), { class: "pointer-events-none absolute start-2 top-1/2 size-3.5 -translate-y-1/2 text-muted" }), P(u("input", {
|
|
2500
2527
|
"onUpdate:modelValue": n[0] ||= (e) => p.value = e,
|
|
2501
2528
|
placeholder: e.filterPlaceholder,
|
|
2502
2529
|
class: "w-full rounded-md border border-border bg-surface py-1.5 pe-2 ps-7 text-sm placeholder:text-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"
|
|
2503
|
-
}, null, 8,
|
|
2504
|
-
f(O(
|
|
2530
|
+
}, null, 8, Ni), [[j, p.value]])])) : c("", !0),
|
|
2531
|
+
f(O(ut), {
|
|
2505
2532
|
"model-value": b.value,
|
|
2506
2533
|
items: h.value,
|
|
2507
2534
|
"get-key": (e) => e.value,
|
|
@@ -2512,7 +2539,7 @@ var bi = { class: "overflow-hidden rounded-md border border-border bg-surface" }
|
|
|
2512
2539
|
"bubble-select": "",
|
|
2513
2540
|
"onUpdate:modelValue": T
|
|
2514
2541
|
}, {
|
|
2515
|
-
default:
|
|
2542
|
+
default: N(() => [(x(!0), l(a, null, w(v.value, (e) => (x(), s(O(lt), {
|
|
2516
2543
|
key: e.key,
|
|
2517
2544
|
value: e.node,
|
|
2518
2545
|
level: e.level,
|
|
@@ -2520,13 +2547,13 @@ var bi = { class: "overflow-hidden rounded-md border border-border bg-surface" }
|
|
|
2520
2547
|
class: "flex items-center gap-2 rounded py-1.5 text-sm text-foreground data-[selected]:bg-surface-muted/50",
|
|
2521
2548
|
style: _({ paddingInlineStart: `calc(0.5rem + ${(e.level - 1) * 1}rem)` })
|
|
2522
2549
|
}, {
|
|
2523
|
-
default:
|
|
2550
|
+
default: N(() => [u("span", {
|
|
2524
2551
|
class: g(["flex size-4 shrink-0 items-center justify-center rounded border border-border", S(e.node) !== "unchecked" && "border-primary-500 bg-primary-500 text-white"]),
|
|
2525
2552
|
"aria-hidden": "true"
|
|
2526
|
-
}, [S(e.node) === "checked" ? (x(), s(O(
|
|
2553
|
+
}, [S(e.node) === "checked" ? (x(), s(O(L), {
|
|
2527
2554
|
key: 0,
|
|
2528
2555
|
class: "size-3"
|
|
2529
|
-
})) : S(e.node) === "indeterminate" ? (x(), l("span",
|
|
2556
|
+
})) : S(e.node) === "indeterminate" ? (x(), l("span", Pi)) : c("", !0)], 2), u("span", Fi, D(e.node.label ?? e.node.value), 1)]),
|
|
2530
2557
|
_: 2
|
|
2531
2558
|
}, 1032, [
|
|
2532
2559
|
"value",
|
|
@@ -2541,22 +2568,22 @@ var bi = { class: "overflow-hidden rounded-md border border-border bg-surface" }
|
|
|
2541
2568
|
"get-children",
|
|
2542
2569
|
"expanded"
|
|
2543
2570
|
]),
|
|
2544
|
-
e.modelValue.length ? (x(), l("div",
|
|
2571
|
+
e.modelValue.length ? (x(), l("div", Ii, [u("button", {
|
|
2545
2572
|
type: "button",
|
|
2546
2573
|
class: "inline-flex items-center gap-1 rounded px-2 py-1 text-xs text-muted hover:bg-surface-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
2547
2574
|
onClick: n[2] ||= (e) => r("update:modelValue", [])
|
|
2548
|
-
}, [f(O(
|
|
2575
|
+
}, [f(O(V), { class: "size-3" }), n[4] ||= d("Clear ", -1)])])) : c("", !0)
|
|
2549
2576
|
]),
|
|
2550
2577
|
_: 1
|
|
2551
2578
|
})]),
|
|
2552
2579
|
_: 1
|
|
2553
2580
|
}, 8, ["open"]));
|
|
2554
2581
|
}
|
|
2555
|
-
}),
|
|
2556
|
-
function
|
|
2582
|
+
}), Ri = Symbol("myghf-toast"), zi = 0;
|
|
2583
|
+
function Bi(e = {}) {
|
|
2557
2584
|
let t = Math.max(1, e.max ?? 4), n = e.duration ?? 5e3, r = e.position ?? "top-end", i = C([]), a = o(() => i.value.slice(0, t));
|
|
2558
2585
|
function s(e) {
|
|
2559
|
-
let t = `toast-${++
|
|
2586
|
+
let t = `toast-${++zi}`;
|
|
2560
2587
|
return i.value.push({
|
|
2561
2588
|
severity: "info",
|
|
2562
2589
|
position: r,
|
|
@@ -2592,14 +2619,14 @@ function Ii(e = {}) {
|
|
|
2592
2619
|
secondary: u("secondary")
|
|
2593
2620
|
};
|
|
2594
2621
|
}
|
|
2595
|
-
function
|
|
2596
|
-
let e = m(
|
|
2622
|
+
function Vi() {
|
|
2623
|
+
let e = m(Ri);
|
|
2597
2624
|
if (!e) throw Error("useToast() requires a <Toaster /> mounted above this component.");
|
|
2598
2625
|
return e;
|
|
2599
2626
|
}
|
|
2600
2627
|
//#endregion
|
|
2601
2628
|
//#region src/components/toast/Toast.vue?vue&type=script&setup=true&lang.ts
|
|
2602
|
-
var
|
|
2629
|
+
var Hi = { class: "min-w-0 flex-1" }, Ui = /* @__PURE__ */ p({
|
|
2603
2630
|
__name: "Toast",
|
|
2604
2631
|
props: {
|
|
2605
2632
|
item: {},
|
|
@@ -2614,48 +2641,48 @@ var Ri = { class: "min-w-0 flex-1" }, zi = /* @__PURE__ */ p({
|
|
|
2614
2641
|
danger: "circle-alert",
|
|
2615
2642
|
secondary: "info"
|
|
2616
2643
|
};
|
|
2617
|
-
return (t, n) => (x(), s(O(
|
|
2644
|
+
return (t, n) => (x(), s(O(ot), {
|
|
2618
2645
|
"default-open": !0,
|
|
2619
2646
|
duration: l.value,
|
|
2620
2647
|
type: a.value,
|
|
2621
2648
|
"data-toast-root": "",
|
|
2622
2649
|
"data-duration": l.value,
|
|
2623
|
-
class: g(["pointer-events-auto flex w-full items-start gap-3 rounded-lg p-4 text-sm shadow-popover", O(
|
|
2650
|
+
class: g(["pointer-events-auto flex w-full items-start gap-3 rounded-lg p-4 text-sm shadow-popover", O(q)[i.value].soft]),
|
|
2624
2651
|
"onUpdate:open": n[1] ||= (e) => !e && r("close")
|
|
2625
2652
|
}, {
|
|
2626
|
-
default:
|
|
2627
|
-
f(
|
|
2653
|
+
default: N(() => [
|
|
2654
|
+
f(Y, {
|
|
2628
2655
|
name: e.item.icon || p[i.value],
|
|
2629
|
-
class: g(["mt-0.5 size-4 shrink-0", O(
|
|
2656
|
+
class: g(["mt-0.5 size-4 shrink-0", O(q)[i.value].icon])
|
|
2630
2657
|
}, null, 8, ["name", "class"]),
|
|
2631
|
-
u("div",
|
|
2658
|
+
u("div", Hi, [e.item.title ? (x(), s(O(st), {
|
|
2632
2659
|
key: 0,
|
|
2633
2660
|
class: "font-medium"
|
|
2634
2661
|
}, {
|
|
2635
|
-
default:
|
|
2662
|
+
default: N(() => [d(D(e.item.title), 1)]),
|
|
2636
2663
|
_: 1
|
|
2637
|
-
})) : c("", !0), e.item.description ? (x(), s(O(
|
|
2664
|
+
})) : c("", !0), e.item.description ? (x(), s(O(it), {
|
|
2638
2665
|
key: 1,
|
|
2639
2666
|
class: g(["leading-relaxed", e.item.title ? "mt-1" : ""])
|
|
2640
2667
|
}, {
|
|
2641
|
-
default:
|
|
2668
|
+
default: N(() => [d(D(e.item.description), 1)]),
|
|
2642
2669
|
_: 1
|
|
2643
2670
|
}, 8, ["class"])) : c("", !0)]),
|
|
2644
|
-
e.item.action ? (x(), s(O(
|
|
2671
|
+
e.item.action ? (x(), s(O(nt), {
|
|
2645
2672
|
key: 0,
|
|
2646
2673
|
"alt-text": e.item.action.label,
|
|
2647
2674
|
class: "-my-1 shrink-0 rounded-md px-2 py-1 font-medium transition-colors hover:bg-black/10 dark:hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
2648
2675
|
onClick: n[0] ||= (t) => e.item.action.onClick()
|
|
2649
2676
|
}, {
|
|
2650
|
-
default:
|
|
2677
|
+
default: N(() => [d(D(e.item.action.label), 1)]),
|
|
2651
2678
|
_: 1
|
|
2652
2679
|
}, 8, ["alt-text"])) : c("", !0),
|
|
2653
|
-
e.item.closable === !1 ? c("", !0) : (x(), s(O(
|
|
2680
|
+
e.item.closable === !1 ? c("", !0) : (x(), s(O(rt), {
|
|
2654
2681
|
key: 1,
|
|
2655
2682
|
"aria-label": "Close",
|
|
2656
2683
|
class: "-me-1 -mt-1 shrink-0 rounded-md p-1 transition-colors hover:bg-black/10 dark:hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"
|
|
2657
2684
|
}, {
|
|
2658
|
-
default:
|
|
2685
|
+
default: N(() => [f(O(V), { class: "size-4" })]),
|
|
2659
2686
|
_: 1
|
|
2660
2687
|
}))
|
|
2661
2688
|
]),
|
|
@@ -2667,7 +2694,7 @@ var Ri = { class: "min-w-0 flex-1" }, zi = /* @__PURE__ */ p({
|
|
|
2667
2694
|
"class"
|
|
2668
2695
|
]));
|
|
2669
2696
|
}
|
|
2670
|
-
}),
|
|
2697
|
+
}), Wi = /* @__PURE__ */ p({
|
|
2671
2698
|
__name: "Toaster",
|
|
2672
2699
|
props: {
|
|
2673
2700
|
position: { default: "top-end" },
|
|
@@ -2678,12 +2705,12 @@ var Ri = { class: "min-w-0 flex-1" }, zi = /* @__PURE__ */ p({
|
|
|
2678
2705
|
store: {}
|
|
2679
2706
|
},
|
|
2680
2707
|
setup(e) {
|
|
2681
|
-
let t = e, n = t.store ??
|
|
2708
|
+
let t = e, n = t.store ?? Bi({
|
|
2682
2709
|
max: t.max,
|
|
2683
2710
|
duration: t.duration,
|
|
2684
2711
|
position: t.position
|
|
2685
2712
|
});
|
|
2686
|
-
S(
|
|
2713
|
+
S(Ri, n);
|
|
2687
2714
|
let r = [
|
|
2688
2715
|
"top-start",
|
|
2689
2716
|
"top-center",
|
|
@@ -2702,17 +2729,17 @@ var Ri = { class: "min-w-0 flex-1" }, zi = /* @__PURE__ */ p({
|
|
|
2702
2729
|
function o(e) {
|
|
2703
2730
|
return n.visible.value.filter((n) => (n.position ?? t.position) === e);
|
|
2704
2731
|
}
|
|
2705
|
-
return (t, u) => (x(), s(O(
|
|
2732
|
+
return (t, u) => (x(), s(O(at), {
|
|
2706
2733
|
label: e.label,
|
|
2707
2734
|
duration: e.duration
|
|
2708
2735
|
}, {
|
|
2709
|
-
default:
|
|
2736
|
+
default: N(() => [T(t.$slots, "default"), (x(), l(a, null, w(r, (t) => (x(), l(a, { key: t }, [o(t).length > 0 ? (x(), s(O(ct), {
|
|
2710
2737
|
key: 0,
|
|
2711
2738
|
label: e.label,
|
|
2712
2739
|
class: g(["pointer-events-none fixed z-50 flex max-h-screen w-full max-w-sm flex-col", i[t]]),
|
|
2713
2740
|
style: _({ gap: e.gap })
|
|
2714
2741
|
}, {
|
|
2715
|
-
default:
|
|
2742
|
+
default: N(() => [(x(!0), l(a, null, w(o(t), (t) => (x(), s(Ui, {
|
|
2716
2743
|
key: t.id,
|
|
2717
2744
|
item: t,
|
|
2718
2745
|
duration: e.duration,
|
|
@@ -2733,6 +2760,6 @@ var Ri = { class: "min-w-0 flex-1" }, zi = /* @__PURE__ */ p({
|
|
|
2733
2760
|
}
|
|
2734
2761
|
});
|
|
2735
2762
|
//#endregion
|
|
2736
|
-
export {
|
|
2763
|
+
export { An as Alert, An as Message, In as Avatar, X as Button, Cn as Checkbox, vi as DataTable, dr as DatePicker, gr as Dialog, xr as Drawer, Sr as DropdownMenu, wr as DropdownMenuContent, Or as DropdownMenuGroup, Tr as DropdownMenuItem, Dr as DropdownMenuLabel, Er as DropdownMenuSeparator, Cr as DropdownMenuTrigger, vn as FormDescription, Sn as FormField, bn as FormMessage, Y as Icon, en as Input, an as InputNumber, gn as Label, pn as Password, Un as Select, Wn as SelectButton, Nn as Skeleton, Mn as Spinner, Hr as Table, Xr as TableBody, $ as TableCell, ei as TableEmpty, Qr as TableHead, qr as TableHeader, ui as TablePagination, Q as TableRow, Ln as Tabs, Bn as TabsContent, Rn as TabsList, zn as TabsTrigger, Tn as Tag, sn as Textarea, Yt as ThemeToggle, Wi as Toaster, Vr as TransferList, Li as TreeSelect, Oi as TreeTable, Dt as buildHourOptions, Ot as buildMinuteOptions, Tt as clampTime, H as cn, Gt as createTheme, Bi as createToastStore, St as dateToValue, K as formatLocalizedDate, Nt as formatLocalizedTime, kt as from12Hour, At as getFirstDayOfWeek, Mt as getMonthLabel, jt as getWeekdayLabels, Ft as mergeFormatOptions, Rt as resolveIconName, W as sortRange, G as to12Hour, Et as toISODate, wt as toMinutes, Pt as toNumberOrNull, It as toPascalCase, U as toTime, Ri as toastKey, q as toneClasses, Z as useFormField, qt as useTheme, Vi as useToast, Ct as valueToDate };
|
|
2737
2764
|
|
|
2738
2765
|
//# sourceMappingURL=index.js.map
|