@vue/devtools-ui 7.0.0

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.
Files changed (36) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -0
  3. package/dist/index.cjs +3 -0
  4. package/dist/index.js +1520 -0
  5. package/dist/style.css +1 -0
  6. package/dist/theme.cjs +17 -0
  7. package/dist/theme.js +278 -0
  8. package/dist/types/src/components/Badge.d.ts +9 -0
  9. package/dist/types/src/components/Button.d.ts +68 -0
  10. package/dist/types/src/components/Card.d.ts +9 -0
  11. package/dist/types/src/components/Checkbox.d.ts +35 -0
  12. package/dist/types/src/components/Confirm.d.ts +82 -0
  13. package/dist/types/src/components/DarkToggle.d.ts +55 -0
  14. package/dist/types/src/components/Dialog.d.ts +75 -0
  15. package/dist/types/src/components/Drawer.d.ts +74 -0
  16. package/dist/types/src/components/Dropdown.d.ts +101 -0
  17. package/dist/types/src/components/DropdownButton.d.ts +38 -0
  18. package/dist/types/src/components/FormField.d.ts +47 -0
  19. package/dist/types/src/components/Icon.d.ts +33 -0
  20. package/dist/types/src/components/Input.d.ts +79 -0
  21. package/dist/types/src/components/LoadingIndicator.d.ts +2 -0
  22. package/dist/types/src/components/Notification.d.ts +32 -0
  23. package/dist/types/src/components/Overlay.d.ts +22 -0
  24. package/dist/types/src/components/Select.d.ts +125 -0
  25. package/dist/types/src/components/Switch.d.ts +28 -0
  26. package/dist/types/src/components/Tooltip.d.ts +20 -0
  27. package/dist/types/src/components/index.d.ts +20 -0
  28. package/dist/types/src/composables/index.d.ts +2 -0
  29. package/dist/types/src/composables/notification.d.ts +10 -0
  30. package/dist/types/src/index.d.ts +5 -0
  31. package/dist/types/src/types/floating-vue.d.ts +9 -0
  32. package/dist/types/src/types/index.d.ts +1 -0
  33. package/dist/types/theme/index.d.ts +2 -0
  34. package/dist/types/theme/theme.d.ts +66 -0
  35. package/dist/types/theme/uno.config.d.ts +2 -0
  36. package/package.json +55 -0
package/dist/index.js ADDED
@@ -0,0 +1,1520 @@
1
+ // @unocss-include
2
+
3
+ import { Dropdown as Re, VClosePopper as $e, Tooltip as We } from "floating-vue";
4
+ import { VTooltip as $o } from "floating-vue";
5
+ import { openBlock as m, createElementBlock as $, createElementVNode as b, defineComponent as D, useAttrs as ze, computed as _, useSlots as _e, createBlock as M, resolveDynamicComponent as Ce, mergeProps as q, withCtx as y, renderSlot as w, unref as k, createCommentVNode as E, normalizeClass as S, ref as T, watch as R, customRef as Ve, isRef as Q, getCurrentScope as je, onScopeDispose as Ie, toRef as He, readonly as Se, onMounted as Y, nextTick as Z, getCurrentInstance as ue, shallowRef as Je, watchEffect as X, normalizeProps as ce, guardReactiveProps as de, Teleport as Be, createVNode as x, Transition as fe, normalizeStyle as pe, createTextVNode as j, toDisplayString as I, withDirectives as me, vModelDynamic as Ue, provide as Ge, createSlots as Te, inject as Ke, Fragment as he, renderList as be, withModifiers as Ye, h as Xe, render as ye } from "vue";
6
+ const ve = (e, o) => {
7
+ const t = e.__vccOpts || e;
8
+ for (const [a, n] of o)
9
+ t[a] = n;
10
+ return t;
11
+ }, qe = {}, Qe = { class: "h-3 w-3 $ui-inline-fcc" }, Ze = /* @__PURE__ */ b("svg", {
12
+ class: "animate-spin",
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ fill: "none",
15
+ viewBox: "0 0 24 24"
16
+ }, [
17
+ /* @__PURE__ */ b("circle", {
18
+ class: "opacity-25",
19
+ cx: "12",
20
+ cy: "12",
21
+ r: "10",
22
+ stroke: "currentColor",
23
+ "stroke-width": "4"
24
+ }),
25
+ /* @__PURE__ */ b("path", {
26
+ class: "opacity-75",
27
+ fill: "currentColor",
28
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
29
+ })
30
+ ], -1), et = [
31
+ Ze
32
+ ];
33
+ function tt(e, o) {
34
+ return m(), $("div", Qe, et);
35
+ }
36
+ const De = /* @__PURE__ */ ve(qe, [["render", tt]]), ot = { key: 2 }, K = /* @__PURE__ */ D({
37
+ inheritAttrs: !1,
38
+ __name: "Button",
39
+ props: {
40
+ type: { default: "default" },
41
+ round: { type: [String, Boolean], default: "normal" },
42
+ loading: { type: Boolean, default: !1 },
43
+ disabled: { type: Boolean, default: !1 },
44
+ size: { default: "normal" },
45
+ flat: { type: Boolean, default: !1 },
46
+ outlined: { type: Boolean, default: !1 }
47
+ },
48
+ emits: ["click"],
49
+ setup(e, { emit: o }) {
50
+ const t = e, a = o, n = ze(), s = _(() => n.to ? "router-link" : n.href ? "a" : "button"), r = _(() => t.loading || t.disabled);
51
+ function i(u) {
52
+ if (r.value) {
53
+ u.preventDefault(), u.stopPropagation(), u.stopImmediatePropagation();
54
+ return;
55
+ }
56
+ a("click", u);
57
+ }
58
+ const l = {
59
+ common: {
60
+ default: "active:bg-primary-100-darker dark:active:bg-gray-800-darker",
61
+ primary: "active:bg-primary-500-darker",
62
+ accent: "active:bg-accent-500-darker",
63
+ danger: "active:bg-danger-500-darker",
64
+ warning: "active:bg-warning-500-darker",
65
+ info: "active:bg-primary-100-darker dark:active:bg-gray-800-darker",
66
+ success: "active:bg-primary-100-darker dark:active:bg-gray-800-darker"
67
+ },
68
+ normal: {
69
+ default: "bg-primary-100 hover:bg-primary-100-lighter dark:bg-gray-800 dark:hover:bg-gray-800-lighter dark:hover:text-white",
70
+ primary: " text-white bg-primary-500 hover:bg-primary-500-lighter dark:hover:bg-primary-500-darker",
71
+ accent: "text-white bg-accent-500 hover:bg-accent-500-lighter dark:bg-accent-500-darker dark:bg-accent-300",
72
+ danger: "text-white bg-danger-500 hover:bg-danger-500-lighter dark:hover:bg-danger-500-darker",
73
+ warning: "text-white bg-warning-500 hover:bg-warning-500-lighter dark:hover:bg-warning-500-darker",
74
+ info: "text-info-500 bg-primary-100 hover:bg-primary-100-lighter dark:bg-gray-800 dark:hover:bg-gray-800-lighter",
75
+ success: "text-primary-500 bg-primary-100 hover:bg-primary-100-lighter dark:bg-gray-800 dark:hover:bg-gray-800-lighter"
76
+ },
77
+ flat: {
78
+ default: "hover:bg-primary-100 hover:text-black !dark:text-white dark:hover:bg-primary-800",
79
+ primary: "hover:bg-primary-500 hover:text-white",
80
+ accent: "hover:bg-accent-500 hover:text-white",
81
+ danger: "hover:bg-danger-500 hover:text-white",
82
+ warning: "hover:bg-warning-500 hover:text-white",
83
+ info: "hover:bg-primary-100 hover:text-info-500 dark:hover:bg-gray-800 dark:hover:text-info-400",
84
+ success: "hover:bg-primary-100 hover:text-primary-500 dark:hover:bg-primary-800 dark:hover:text-primary-400"
85
+ },
86
+ outlined: {
87
+ default: "hover:border-primary-100 hover:text-primary-300 hover:active:ring-primary-100:5 hover:active:bg-primary-100:5",
88
+ primary: "hover:border-primary-500 hover:text-primary-500 active:ring-primary-500:5 active:bg-primary-500:5",
89
+ accent: "hover:border-accent-500 hover:text-accent-500 active:ring-accent-500:5 active:bg-accent-500:5",
90
+ danger: "hover:border-danger-500 hover:text-danger-500 active:ring-danger-500:5 active:bg-danger-500:5",
91
+ warning: "hover:border-warning-500 hover:text-warning-500 active:ring-warning-500:5 active:bg-warning-500:5",
92
+ info: "hover:border-info-500 hover:text-info-500 active:ring-info-500:5 active:bg-info-500:5",
93
+ success: "hover:border-primary-500 hover:text-primary-500 active:ring-primary-500:5 active:bg-primary-500:5"
94
+ }
95
+ }, c = _e(), d = _(() => t.flat ? l.flat[t.type] : t.outlined ? l.outlined[t.type] : l.normal[t.type]);
96
+ return (u, f) => (m(), M(Ce(s.value), q(u.$attrs, {
97
+ role: "button",
98
+ "aria-disabled": r.value,
99
+ class: ["$ui-base $ui-inline-fcc inline-flex cursor-pointer select-none gap1.25 py-0 no-underline $ui-transition", [
100
+ [l.common[t.type]],
101
+ {
102
+ "rounded-full": t.round === "full",
103
+ "$ui-base-br": t.round === "normal",
104
+ "opacity-50 cursor-not-allowed": r.value,
105
+ "bg-transparent": t.flat || t.outlined
106
+ },
107
+ [
108
+ u.outlined ? "b-1 $ui-border-base active:ring-3 shadow-sm" : "border-none",
109
+ u.size === "mini" ? "px1 text-3 h5.5" : "px3.5 text-3.5 h8",
110
+ d.value
111
+ ]
112
+ ]],
113
+ onClickCapture: i
114
+ }), {
115
+ default: y(() => [
116
+ u.loading ? (m(), M(De, {
117
+ key: 0,
118
+ class: "mt0.5 h-full w3"
119
+ })) : w(u.$slots, "icon", {
120
+ key: 1,
121
+ class: "h-full w3 $ui-inline-fcc"
122
+ }),
123
+ k(c).default ? (m(), $("div", ot, [
124
+ w(u.$slots, "default")
125
+ ])) : E("", !0),
126
+ w(u.$slots, "icon-right")
127
+ ]),
128
+ _: 3
129
+ }, 16, ["aria-disabled", "class"]));
130
+ }
131
+ }), nt = {}, rt = { class: "mx-0.5 $ui-base inline-block select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs" };
132
+ function at(e, o) {
133
+ return m(), $("span", rt, [
134
+ w(e.$slots, "default")
135
+ ]);
136
+ }
137
+ const so = /* @__PURE__ */ ve(nt, [["render", at]]), ie = /* @__PURE__ */ D({
138
+ __name: "Icon",
139
+ props: {
140
+ icon: {},
141
+ inline: { type: Boolean },
142
+ action: { type: Boolean, default: !1 }
143
+ },
144
+ setup(e) {
145
+ return (o, t) => (m(), M(Ce(o.inline ? "span" : "div"), {
146
+ class: S(["$ui-base", [o.icon, o.action ? "cursor-pointer hover:op50" : ""]])
147
+ }, null, 8, ["class"]));
148
+ }
149
+ });
150
+ function ae(e) {
151
+ return je() ? (Ie(e), !0) : !1;
152
+ }
153
+ function lt(e, o, { enumerable: t = !1, unwrap: a = !0 } = {}) {
154
+ for (const [n, s] of Object.entries(o))
155
+ n !== "value" && (Q(s) && a ? Object.defineProperty(e, n, {
156
+ get() {
157
+ return s.value;
158
+ },
159
+ set(r) {
160
+ s.value = r;
161
+ },
162
+ enumerable: t
163
+ }) : Object.defineProperty(e, n, { value: s, enumerable: t }));
164
+ return e;
165
+ }
166
+ function N(e) {
167
+ return typeof e == "function" ? e() : k(e);
168
+ }
169
+ const Oe = typeof window < "u" && typeof document < "u";
170
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
171
+ const st = (e) => typeof e < "u", it = Object.prototype.toString, ut = (e) => it.call(e) === "[object Object]", ne = () => {
172
+ }, we = /* @__PURE__ */ ct();
173
+ function ct() {
174
+ var e, o;
175
+ return Oe && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((o = window == null ? void 0 : window.navigator) == null ? void 0 : o.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
176
+ }
177
+ function Me(e, o) {
178
+ function t(...a) {
179
+ return new Promise((n, s) => {
180
+ Promise.resolve(e(() => o.apply(this, a), { fn: o, thisArg: this, args: a })).then(n).catch(s);
181
+ });
182
+ }
183
+ return t;
184
+ }
185
+ const Ae = (e) => e();
186
+ function dt(e, o = {}) {
187
+ let t, a, n = ne;
188
+ const s = (i) => {
189
+ clearTimeout(i), n(), n = ne;
190
+ };
191
+ return (i) => {
192
+ const l = N(e), c = N(o.maxWait);
193
+ return t && s(t), l <= 0 || c !== void 0 && c <= 0 ? (a && (s(a), a = null), Promise.resolve(i())) : new Promise((d, u) => {
194
+ n = o.rejectOnCancel ? u : d, c && !a && (a = setTimeout(() => {
195
+ t && s(t), a = null, d(i());
196
+ }, c)), t = setTimeout(() => {
197
+ a && s(a), a = null, d(i());
198
+ }, l);
199
+ });
200
+ };
201
+ }
202
+ function ft(e = Ae) {
203
+ const o = T(!0);
204
+ function t() {
205
+ o.value = !1;
206
+ }
207
+ function a() {
208
+ o.value = !0;
209
+ }
210
+ const n = (...s) => {
211
+ o.value && e(...s);
212
+ };
213
+ return { isActive: Se(o), pause: t, resume: a, eventFilter: n };
214
+ }
215
+ function pt(e) {
216
+ return e || ue();
217
+ }
218
+ function Ee(...e) {
219
+ if (e.length !== 1)
220
+ return He(...e);
221
+ const o = e[0];
222
+ return typeof o == "function" ? Se(Ve(() => ({ get: o, set: ne }))) : T(o);
223
+ }
224
+ function mt(e, o = 200, t = {}) {
225
+ return Me(
226
+ dt(o, t),
227
+ e
228
+ );
229
+ }
230
+ function vt(e, o = 200, t = {}) {
231
+ const a = T(e.value), n = mt(() => {
232
+ a.value = e.value;
233
+ }, o, t);
234
+ return R(e, () => n()), a;
235
+ }
236
+ function gt(e, o = {}) {
237
+ let t = e, a, n;
238
+ const s = Ve((f, p) => (a = f, n = p, {
239
+ get() {
240
+ return r();
241
+ },
242
+ set(g) {
243
+ i(g);
244
+ }
245
+ }));
246
+ function r(f = !0) {
247
+ return f && a(), t;
248
+ }
249
+ function i(f, p = !0) {
250
+ var g, h;
251
+ if (f === t)
252
+ return;
253
+ const O = t;
254
+ ((g = o.onBeforeChange) == null ? void 0 : g.call(o, f, O)) !== !1 && (t = f, (h = o.onChanged) == null || h.call(o, f, O), p && n());
255
+ }
256
+ return lt(
257
+ s,
258
+ {
259
+ get: r,
260
+ set: i,
261
+ untrackedGet: () => r(!1),
262
+ silentSet: (f) => i(f, !1),
263
+ peek: () => r(!1),
264
+ lay: (f) => i(f, !1)
265
+ },
266
+ { enumerable: !0 }
267
+ );
268
+ }
269
+ function ht(e, o, t = {}) {
270
+ const {
271
+ eventFilter: a = Ae,
272
+ ...n
273
+ } = t;
274
+ return R(
275
+ e,
276
+ Me(
277
+ a,
278
+ o
279
+ ),
280
+ n
281
+ );
282
+ }
283
+ function bt(e, o, t = {}) {
284
+ const {
285
+ eventFilter: a,
286
+ ...n
287
+ } = t, { eventFilter: s, pause: r, resume: i, isActive: l } = ft(a);
288
+ return { stop: ht(
289
+ e,
290
+ o,
291
+ {
292
+ ...n,
293
+ eventFilter: s
294
+ }
295
+ ), pause: r, resume: i, isActive: l };
296
+ }
297
+ function ge(e, o = !0, t) {
298
+ pt() ? Y(e, t) : o ? e() : Z(e);
299
+ }
300
+ function yt(e = !1, o = {}) {
301
+ const {
302
+ truthyValue: t = !0,
303
+ falsyValue: a = !1
304
+ } = o, n = Q(e), s = T(e);
305
+ function r(i) {
306
+ if (arguments.length)
307
+ return s.value = i, s.value;
308
+ {
309
+ const l = N(t);
310
+ return s.value = s.value === l ? N(a) : l, s.value;
311
+ }
312
+ }
313
+ return n ? r : [s, r];
314
+ }
315
+ function z(e) {
316
+ var o;
317
+ const t = N(e);
318
+ return (o = t == null ? void 0 : t.$el) != null ? o : t;
319
+ }
320
+ const H = Oe ? window : void 0;
321
+ function re(...e) {
322
+ let o, t, a, n;
323
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, a, n] = e, o = H) : [o, t, a, n] = e, !o)
324
+ return ne;
325
+ Array.isArray(t) || (t = [t]), Array.isArray(a) || (a = [a]);
326
+ const s = [], r = () => {
327
+ s.forEach((d) => d()), s.length = 0;
328
+ }, i = (d, u, f, p) => (d.addEventListener(u, f, p), () => d.removeEventListener(u, f, p)), l = R(
329
+ () => [z(o), N(n)],
330
+ ([d, u]) => {
331
+ if (r(), !d)
332
+ return;
333
+ const f = ut(u) ? { ...u } : u;
334
+ s.push(
335
+ ...t.flatMap((p) => a.map((g) => i(d, p, g, f)))
336
+ );
337
+ },
338
+ { immediate: !0, flush: "post" }
339
+ ), c = () => {
340
+ l(), r();
341
+ };
342
+ return ae(c), c;
343
+ }
344
+ function wt(e) {
345
+ return typeof e == "function" ? e : typeof e == "string" ? (o) => o.key === e : Array.isArray(e) ? (o) => e.includes(o.key) : () => !0;
346
+ }
347
+ function Ne(...e) {
348
+ let o, t, a = {};
349
+ e.length === 3 ? (o = e[0], t = e[1], a = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (o = !0, t = e[0], a = e[1]) : (o = e[0], t = e[1]) : (o = !0, t = e[0]);
350
+ const {
351
+ target: n = H,
352
+ eventName: s = "keydown",
353
+ passive: r = !1,
354
+ dedupe: i = !1
355
+ } = a, l = wt(o);
356
+ return re(n, s, (d) => {
357
+ d.repeat && N(i) || l(d) && t(d);
358
+ }, r);
359
+ }
360
+ function kt() {
361
+ const e = T(!1);
362
+ return ue() && Y(() => {
363
+ e.value = !0;
364
+ }), e;
365
+ }
366
+ function Pe(e) {
367
+ const o = kt();
368
+ return _(() => (o.value, !!e()));
369
+ }
370
+ function $t(e, o = {}) {
371
+ const { window: t = H } = o, a = Pe(() => t && "matchMedia" in t && typeof t.matchMedia == "function");
372
+ let n;
373
+ const s = T(!1), r = (c) => {
374
+ s.value = c.matches;
375
+ }, i = () => {
376
+ n && ("removeEventListener" in n ? n.removeEventListener("change", r) : n.removeListener(r));
377
+ }, l = X(() => {
378
+ a.value && (i(), n = t.matchMedia(N(e)), "addEventListener" in n ? n.addEventListener("change", r) : n.addListener(r), s.value = n.matches);
379
+ });
380
+ return ae(() => {
381
+ l(), i(), n = void 0;
382
+ }), s;
383
+ }
384
+ function _t(e) {
385
+ return JSON.parse(JSON.stringify(e));
386
+ }
387
+ const ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, te = "__vueuse_ssr_handlers__", Ct = /* @__PURE__ */ Vt();
388
+ function Vt() {
389
+ return te in ee || (ee[te] = ee[te] || {}), ee[te];
390
+ }
391
+ function xe(e, o) {
392
+ return Ct[e] || o;
393
+ }
394
+ function St(e) {
395
+ return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
396
+ }
397
+ const Bt = {
398
+ boolean: {
399
+ read: (e) => e === "true",
400
+ write: (e) => String(e)
401
+ },
402
+ object: {
403
+ read: (e) => JSON.parse(e),
404
+ write: (e) => JSON.stringify(e)
405
+ },
406
+ number: {
407
+ read: (e) => Number.parseFloat(e),
408
+ write: (e) => String(e)
409
+ },
410
+ any: {
411
+ read: (e) => e,
412
+ write: (e) => String(e)
413
+ },
414
+ string: {
415
+ read: (e) => e,
416
+ write: (e) => String(e)
417
+ },
418
+ map: {
419
+ read: (e) => new Map(JSON.parse(e)),
420
+ write: (e) => JSON.stringify(Array.from(e.entries()))
421
+ },
422
+ set: {
423
+ read: (e) => new Set(JSON.parse(e)),
424
+ write: (e) => JSON.stringify(Array.from(e))
425
+ },
426
+ date: {
427
+ read: (e) => new Date(e),
428
+ write: (e) => e.toISOString()
429
+ }
430
+ }, ke = "vueuse-storage";
431
+ function Tt(e, o, t, a = {}) {
432
+ var n;
433
+ const {
434
+ flush: s = "pre",
435
+ deep: r = !0,
436
+ listenToStorageChanges: i = !0,
437
+ writeDefaults: l = !0,
438
+ mergeDefaults: c = !1,
439
+ shallow: d,
440
+ window: u = H,
441
+ eventFilter: f,
442
+ onError: p = (v) => {
443
+ console.error(v);
444
+ },
445
+ initOnMounted: g
446
+ } = a, h = (d ? Je : T)(typeof o == "function" ? o() : o);
447
+ if (!t)
448
+ try {
449
+ t = xe("getDefaultStorage", () => {
450
+ var v;
451
+ return (v = H) == null ? void 0 : v.localStorage;
452
+ })();
453
+ } catch (v) {
454
+ p(v);
455
+ }
456
+ if (!t)
457
+ return h;
458
+ const O = N(o), W = St(O), P = (n = a.serializer) != null ? n : Bt[W], { pause: B, resume: C } = bt(
459
+ h,
460
+ () => A(h.value),
461
+ { flush: s, deep: r, eventFilter: f }
462
+ );
463
+ return u && i && ge(() => {
464
+ re(u, "storage", F), re(u, ke, G), g && F();
465
+ }), g || F(), h;
466
+ function A(v) {
467
+ try {
468
+ if (v == null)
469
+ t.removeItem(e);
470
+ else {
471
+ const V = P.write(v), U = t.getItem(e);
472
+ U !== V && (t.setItem(e, V), u && u.dispatchEvent(new CustomEvent(ke, {
473
+ detail: {
474
+ key: e,
475
+ oldValue: U,
476
+ newValue: V,
477
+ storageArea: t
478
+ }
479
+ })));
480
+ }
481
+ } catch (V) {
482
+ p(V);
483
+ }
484
+ }
485
+ function L(v) {
486
+ const V = v ? v.newValue : t.getItem(e);
487
+ if (V == null)
488
+ return l && O != null && t.setItem(e, P.write(O)), O;
489
+ if (!v && c) {
490
+ const U = P.read(V);
491
+ return typeof c == "function" ? c(U, O) : W === "object" && !Array.isArray(U) ? { ...O, ...U } : U;
492
+ } else
493
+ return typeof V != "string" ? V : P.read(V);
494
+ }
495
+ function G(v) {
496
+ F(v.detail);
497
+ }
498
+ function F(v) {
499
+ if (!(v && v.storageArea !== t)) {
500
+ if (v && v.key == null) {
501
+ h.value = O;
502
+ return;
503
+ }
504
+ if (!(v && v.key !== e)) {
505
+ B();
506
+ try {
507
+ (v == null ? void 0 : v.newValue) !== P.write(h.value) && (h.value = L(v));
508
+ } catch (V) {
509
+ p(V);
510
+ } finally {
511
+ v ? Z(C) : C();
512
+ }
513
+ }
514
+ }
515
+ }
516
+ }
517
+ function Dt(e) {
518
+ return $t("(prefers-color-scheme: dark)", e);
519
+ }
520
+ function Ot(e = {}) {
521
+ const {
522
+ selector: o = "html",
523
+ attribute: t = "class",
524
+ initialValue: a = "auto",
525
+ window: n = H,
526
+ storage: s,
527
+ storageKey: r = "vueuse-color-scheme",
528
+ listenToStorageChanges: i = !0,
529
+ storageRef: l,
530
+ emitAuto: c,
531
+ disableTransition: d = !0
532
+ } = e, u = {
533
+ auto: "",
534
+ light: "light",
535
+ dark: "dark",
536
+ ...e.modes || {}
537
+ }, f = Dt({ window: n }), p = _(() => f.value ? "dark" : "light"), g = l || (r == null ? Ee(a) : Tt(r, a, s, { window: n, listenToStorageChanges: i })), h = _(() => g.value === "auto" ? p.value : g.value), O = xe(
538
+ "updateHTMLAttrs",
539
+ (C, A, L) => {
540
+ const G = typeof C == "string" ? n == null ? void 0 : n.document.querySelector(C) : z(C);
541
+ if (!G)
542
+ return;
543
+ let F;
544
+ if (d) {
545
+ F = n.document.createElement("style");
546
+ const v = "*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";
547
+ F.appendChild(document.createTextNode(v)), n.document.head.appendChild(F);
548
+ }
549
+ if (A === "class") {
550
+ const v = L.split(/\s/g);
551
+ Object.values(u).flatMap((V) => (V || "").split(/\s/g)).filter(Boolean).forEach((V) => {
552
+ v.includes(V) ? G.classList.add(V) : G.classList.remove(V);
553
+ });
554
+ } else
555
+ G.setAttribute(A, L);
556
+ d && (n.getComputedStyle(F).opacity, document.head.removeChild(F));
557
+ }
558
+ );
559
+ function W(C) {
560
+ var A;
561
+ O(o, t, (A = u[C]) != null ? A : C);
562
+ }
563
+ function P(C) {
564
+ e.onChanged ? e.onChanged(C, W) : W(C);
565
+ }
566
+ R(h, P, { flush: "post", immediate: !0 }), ge(() => P(h.value));
567
+ const B = _({
568
+ get() {
569
+ return c ? g.value : h.value;
570
+ },
571
+ set(C) {
572
+ g.value = C;
573
+ }
574
+ });
575
+ try {
576
+ return Object.assign(B, { store: g, system: p, state: h });
577
+ } catch {
578
+ return B;
579
+ }
580
+ }
581
+ function Mt(e, o, t = {}) {
582
+ const { window: a = H, ...n } = t;
583
+ let s;
584
+ const r = Pe(() => a && "ResizeObserver" in a), i = () => {
585
+ s && (s.disconnect(), s = void 0);
586
+ }, l = _(() => Array.isArray(e) ? e.map((u) => z(u)) : [z(e)]), c = R(
587
+ l,
588
+ (u) => {
589
+ if (i(), r.value && a) {
590
+ s = new ResizeObserver(o);
591
+ for (const f of u)
592
+ f && s.observe(f, n);
593
+ }
594
+ },
595
+ { immediate: !0, flush: "post", deep: !0 }
596
+ ), d = () => {
597
+ i(), c();
598
+ };
599
+ return ae(d), {
600
+ isSupported: r,
601
+ stop: d
602
+ };
603
+ }
604
+ function At(e, o = { width: 0, height: 0 }, t = {}) {
605
+ const { window: a = H, box: n = "content-box" } = t, s = _(() => {
606
+ var u, f;
607
+ return (f = (u = z(e)) == null ? void 0 : u.namespaceURI) == null ? void 0 : f.includes("svg");
608
+ }), r = T(o.width), i = T(o.height), { stop: l } = Mt(
609
+ e,
610
+ ([u]) => {
611
+ const f = n === "border-box" ? u.borderBoxSize : n === "content-box" ? u.contentBoxSize : u.devicePixelContentBoxSize;
612
+ if (a && s.value) {
613
+ const p = z(e);
614
+ if (p) {
615
+ const g = a.getComputedStyle(p);
616
+ r.value = Number.parseFloat(g.width), i.value = Number.parseFloat(g.height);
617
+ }
618
+ } else if (f) {
619
+ const p = Array.isArray(f) ? f : [f];
620
+ r.value = p.reduce((g, { inlineSize: h }) => g + h, 0), i.value = p.reduce((g, { blockSize: h }) => g + h, 0);
621
+ } else
622
+ r.value = u.contentRect.width, i.value = u.contentRect.height;
623
+ },
624
+ t
625
+ );
626
+ ge(() => {
627
+ const u = z(e);
628
+ u && (r.value = "offsetWidth" in u ? u.offsetWidth : o.width, i.value = "offsetHeight" in u ? u.offsetHeight : o.height);
629
+ });
630
+ const c = R(
631
+ () => z(e),
632
+ (u) => {
633
+ r.value = u ? o.width : 0, i.value = u ? o.height : 0;
634
+ }
635
+ );
636
+ function d() {
637
+ l(), c();
638
+ }
639
+ return {
640
+ width: r,
641
+ height: i,
642
+ stop: d
643
+ };
644
+ }
645
+ function le(e) {
646
+ return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
647
+ }
648
+ function Fe(e) {
649
+ const o = window.getComputedStyle(e);
650
+ if (o.overflowX === "scroll" || o.overflowY === "scroll" || o.overflowX === "auto" && e.clientWidth < e.scrollWidth || o.overflowY === "auto" && e.clientHeight < e.scrollHeight)
651
+ return !0;
652
+ {
653
+ const t = e.parentNode;
654
+ return !t || t.tagName === "BODY" ? !1 : Fe(t);
655
+ }
656
+ }
657
+ function Et(e) {
658
+ const o = e || window.event, t = o.target;
659
+ return Fe(t) ? !1 : o.touches.length > 1 ? !0 : (o.preventDefault && o.preventDefault(), !1);
660
+ }
661
+ const oe = /* @__PURE__ */ new WeakMap();
662
+ function Nt(e, o = !1) {
663
+ const t = T(o);
664
+ let a = null, n;
665
+ R(Ee(e), (i) => {
666
+ const l = le(N(i));
667
+ if (l) {
668
+ const c = l;
669
+ oe.get(c) || oe.set(c, n), t.value && (c.style.overflow = "hidden");
670
+ }
671
+ }, {
672
+ immediate: !0
673
+ });
674
+ const s = () => {
675
+ const i = le(N(e));
676
+ !i || t.value || (we && (a = re(
677
+ i,
678
+ "touchmove",
679
+ (l) => {
680
+ Et(l);
681
+ },
682
+ { passive: !1 }
683
+ )), i.style.overflow = "hidden", t.value = !0);
684
+ }, r = () => {
685
+ var i;
686
+ const l = le(N(e));
687
+ !l || !t.value || (we && (a == null || a()), l.style.overflow = (i = oe.get(l)) != null ? i : "", oe.delete(l), t.value = !1);
688
+ };
689
+ return ae(r), _({
690
+ get() {
691
+ return t.value;
692
+ },
693
+ set(i) {
694
+ i ? s() : r();
695
+ }
696
+ });
697
+ }
698
+ function J(e, o, t, a = {}) {
699
+ var n, s, r;
700
+ const {
701
+ clone: i = !1,
702
+ passive: l = !1,
703
+ eventName: c,
704
+ deep: d = !1,
705
+ defaultValue: u,
706
+ shouldEmit: f
707
+ } = a, p = ue(), g = t || (p == null ? void 0 : p.emit) || ((n = p == null ? void 0 : p.$emit) == null ? void 0 : n.bind(p)) || ((r = (s = p == null ? void 0 : p.proxy) == null ? void 0 : s.$emit) == null ? void 0 : r.bind(p == null ? void 0 : p.proxy));
708
+ let h = c;
709
+ o || (o = "modelValue"), h = h || `update:${o.toString()}`;
710
+ const O = (B) => i ? typeof i == "function" ? i(B) : _t(B) : B, W = () => st(e[o]) ? O(e[o]) : u, P = (B) => {
711
+ f ? f(B) && g(h, B) : g(h, B);
712
+ };
713
+ if (l) {
714
+ const B = W(), C = T(B);
715
+ let A = !1;
716
+ return R(
717
+ () => e[o],
718
+ (L) => {
719
+ A || (A = !0, C.value = O(L), Z(() => A = !1));
720
+ }
721
+ ), R(
722
+ C,
723
+ (L) => {
724
+ !A && (L !== e[o] || d) && P(L);
725
+ },
726
+ { deep: d }
727
+ ), C;
728
+ } else
729
+ return _({
730
+ get() {
731
+ return W();
732
+ },
733
+ set(B) {
734
+ P(B);
735
+ }
736
+ });
737
+ }
738
+ const Pt = { class: "$ui-dark-toggle-vtr" }, io = /* @__PURE__ */ D({
739
+ __name: "DarkToggle",
740
+ props: {
741
+ isDark: { type: Boolean, default: !1 },
742
+ animation: { type: Boolean, default: !0 },
743
+ animationDuration: { default: 400 }
744
+ },
745
+ setup(e) {
746
+ const o = e, t = J(o, "isDark"), a = Ot({
747
+ initialValue: t.value ? "dark" : "light",
748
+ onChanged: (l) => {
749
+ t.value = l === "dark";
750
+ }
751
+ }), n = _({
752
+ get: () => a.value === "dark",
753
+ set: (l) => a.value = l ? "dark" : "light"
754
+ }), s = document.startViewTransition && !window.matchMedia("(prefers-reduced-motion: reduce)").matches;
755
+ function r(l) {
756
+ if (!s || !l || !o.animation) {
757
+ n.value = !n.value;
758
+ return;
759
+ }
760
+ const c = l.clientX, d = l.clientY, u = Math.hypot(
761
+ Math.max(c, innerWidth - c),
762
+ Math.max(d, innerHeight - d)
763
+ );
764
+ document.startViewTransition(async () => {
765
+ n.value = !n.value, await Z();
766
+ }).ready.then(() => {
767
+ const p = [
768
+ `circle(0px at ${c}px ${d}px)`,
769
+ `circle(${u}px at ${c}px ${d}px)`
770
+ ];
771
+ document.documentElement.animate(
772
+ {
773
+ clipPath: n.value ? [...p].reverse() : p
774
+ },
775
+ {
776
+ duration: o.animationDuration,
777
+ easing: "ease-in",
778
+ pseudoElement: n.value ? "::view-transition-old(root)" : "::view-transition-new(root)"
779
+ }
780
+ );
781
+ });
782
+ }
783
+ const i = {
784
+ mode: a,
785
+ isDark: n,
786
+ toggle: r
787
+ };
788
+ return (l, c) => (m(), $("span", Pt, [
789
+ w(l.$slots, "default", ce(de(i)))
790
+ ]));
791
+ }
792
+ }), xt = {}, Ft = { class: "$ui-base border $ui-border-base rounded shadow-sm" };
793
+ function Lt(e, o) {
794
+ return m(), $("div", Ft, [
795
+ w(e.$slots, "default")
796
+ ]);
797
+ }
798
+ const uo = /* @__PURE__ */ ve(xt, [["render", Lt]]), Le = /* @__PURE__ */ D({
799
+ __name: "Overlay",
800
+ props: {
801
+ dim: { type: Boolean },
802
+ blur: { type: Boolean }
803
+ },
804
+ setup(e) {
805
+ return (o, t) => (m(), $("div", {
806
+ class: S(["fixed left-0 top-0 $ui-z-max h-full w-full $ui-fcc transition-opacity transition-duration-300 $ui-bg-base", [
807
+ o.dim ? "bg-opacity-50!" : "bg-opacity-0!",
808
+ o.blur ? "backdrop-blur-sm" : ""
809
+ ]])
810
+ }, [
811
+ w(o.$slots, "default")
812
+ ], 2));
813
+ }
814
+ }), Rt = { class: "h7.5 w-full $ui-fbc" }, Wt = { class: "text-4.5" }, zt = /* @__PURE__ */ b("div", { class: "i-carbon-close" }, null, -1), jt = [
815
+ zt
816
+ ], It = { class: "content transition-all transition-duration-300" }, Ht = { class: "footer h8 w-full transition-all transition-duration-300 delay-250" }, Jt = { class: "$ui-fcc" }, Ut = /* @__PURE__ */ D({
817
+ __name: "Dialog",
818
+ props: {
819
+ modelValue: { type: Boolean, default: !1 },
820
+ autoClose: { type: Boolean, default: !0 },
821
+ title: { default: "Dialog" },
822
+ width: { default: "32rem" },
823
+ height: { default: "18rem" },
824
+ closable: { type: Boolean, default: !0 },
825
+ mountTo: { default: "body" },
826
+ dim: { type: Boolean },
827
+ blur: { type: Boolean }
828
+ },
829
+ emits: ["close", "update:modelValue"],
830
+ setup(e, { emit: o }) {
831
+ const t = e, n = J(t, "modelValue", o, { passive: !0 }), s = Nt(() => window.document.documentElement);
832
+ X(() => {
833
+ n.value ? s.value = !0 : s.value = !1;
834
+ });
835
+ function r() {
836
+ n.value && t.autoClose && (n.value = !1);
837
+ }
838
+ Ne("Escape", () => {
839
+ r();
840
+ });
841
+ const i = T(!1);
842
+ return Y(() => i.value = !0), (l, c) => i.value || l.mountTo === "body" ? (m(), M(Be, {
843
+ key: 0,
844
+ to: l.mountTo
845
+ }, [
846
+ x(fe, {
847
+ "enter-from-class": "opacity-0 [&_.modal]:scale-95 [&_.content,&_.footer]:translate-y--2.5 [&_.content,&_.footer]:opacity-0",
848
+ "enter-to-class": "opacity-100 [&_.modal]:scale-100",
849
+ "leave-from-class": "opacity-100 [&_.modal]:scale-100",
850
+ "leave-to-class": "opacity-0 [&_.modal]:scale-95"
851
+ }, {
852
+ default: y(() => [
853
+ k(n) ? (m(), M(Le, {
854
+ key: 0,
855
+ dim: l.dim,
856
+ blur: l.blur
857
+ }, {
858
+ default: y(() => [
859
+ b("div", {
860
+ class: "modal relative grid grid-rows-[1.875rem_1fr_2.5rem] $ui-base max-h-[calc(100vh-6.25rem)] max-w-[calc(100vw-6.25rem)] min-h-6.25rem min-w-12.5rem gap-2.5 rounded-md bg-white px6 py4.5 color-gray-800 shadow-2xl transition-transform transition-duration-300 dark:bg-gray-900 dark:color-gray-200",
861
+ style: pe({
862
+ width: t.width,
863
+ height: t.height
864
+ })
865
+ }, [
866
+ b("div", Rt, [
867
+ b("div", Wt, [
868
+ w(l.$slots, "title", {}, () => [
869
+ j(I(t.title), 1)
870
+ ])
871
+ ]),
872
+ l.closable ? (m(), $("div", {
873
+ key: 0,
874
+ class: "h6 w6 $ui-fcc cursor-pointer rounded-full transition-colors hover:bg-primary-100 dark:hover:bg-gray-700",
875
+ onClick: r
876
+ }, jt)) : E("", !0)
877
+ ]),
878
+ b("div", It, [
879
+ w(l.$slots, "default")
880
+ ]),
881
+ b("div", Ht, [
882
+ w(l.$slots, "footer", {}, () => [
883
+ w(l.$slots, "footer", {}, () => [
884
+ b("div", Jt, [
885
+ x(K, {
886
+ type: "primary",
887
+ onClick: r
888
+ }, {
889
+ default: y(() => [
890
+ j(" close ")
891
+ ]),
892
+ _: 1
893
+ })
894
+ ])
895
+ ])
896
+ ])
897
+ ])
898
+ ], 4)
899
+ ]),
900
+ _: 3
901
+ }, 8, ["dim", "blur"])) : E("", !0)
902
+ ]),
903
+ _: 3
904
+ })
905
+ ], 8, ["to"])) : E("", !0);
906
+ }
907
+ }), Gt = ["type", "placeholder", "disabled"], Kt = {
908
+ key: 3,
909
+ class: "pointer-events-none absolute bottom--0.25 left-50% right-50% z-9999 h-0.75 bg-primary-500 opacity-0 transition-all duration-240 group-[&.focused]:left-0 group-[&.focused]:right-0 group-[&.focused]:opacity-100 group-[&.accent.focused]:bg-accent-500"
910
+ }, se = "transition-colors $ui-fcc color-gray-500 dark:color-gray-300 group-[&.focused]:color-primary-500; group-[&.accent.focused]:color-accent-500", Yt = /* @__PURE__ */ D({
911
+ __name: "Input",
912
+ props: {
913
+ modelValue: {},
914
+ placeholder: { default: "" },
915
+ variant: { default: "normal" },
916
+ disabled: { type: Boolean, default: !1 },
917
+ password: { type: Boolean, default: !1 },
918
+ leftIcon: {},
919
+ rightIcon: {},
920
+ loading: { type: Boolean, default: !1 },
921
+ autoFocus: { type: Boolean, default: !1 },
922
+ loadingDebounceTime: { default: 0 }
923
+ },
924
+ emits: ["update:modelValue", "updateFocused", "keyTab"],
925
+ setup(e, { emit: o }) {
926
+ const t = e, a = o, n = J(t, "modelValue", a), s = vt(_(() => t.loading), t.loadingDebounceTime), r = gt(!1, {
927
+ onChanged(u) {
928
+ a("updateFocused", u);
929
+ }
930
+ }), i = _(() => t.variant === "flat" || t.variant === "warning"), l = _(() => t.disabled || s.value), c = T();
931
+ let d = !1;
932
+ return X(() => {
933
+ s.value && r.value ? d = !0 : !s.value && d && (d = !1, Z(() => {
934
+ r.value = !0;
935
+ }));
936
+ }), Y(() => {
937
+ t.autoFocus && (r.value = !0);
938
+ }), X(() => {
939
+ var u;
940
+ r.value && ((u = c.value) == null || u.focus());
941
+ }), (u, f) => (m(), $("div", {
942
+ class: S(["group relative w-50 w-auto flex items-center justify-between gap-0.5 overflow-hidden b-1 rounded-1 px3 py-0.75 color-gray-800 dark:color-gray-100", [
943
+ {
944
+ "border-none bg-transparent group": u.variant === "flat",
945
+ "cursor-not-allowed opacity-50": l.value,
946
+ accent: u.variant === "accent",
947
+ focused: k(r)
948
+ },
949
+ [
950
+ u.variant === "warning" ? "border-warning-500 dark:border-warning-300" : "border-primary-100 dark:border-gray-700"
951
+ ]
952
+ ]]),
953
+ onClick: f[2] || (f[2] = () => {
954
+ r.value = !0;
955
+ })
956
+ }, [
957
+ u.leftIcon ? (m(), $("div", {
958
+ key: 0,
959
+ class: S(se)
960
+ }, [
961
+ x(ie, { icon: u.leftIcon }, null, 8, ["icon"])
962
+ ])) : E("", !0),
963
+ me(b("input", {
964
+ ref_key: "inputRef",
965
+ ref: c,
966
+ "onUpdate:modelValue": f[0] || (f[0] = (p) => Q(n) ? n.value = p : null),
967
+ class: "$ui-base w-full bg-transparent color-inherit outline-none placeholder-color-gray-500 dark:placeholder-gray-300",
968
+ type: t.password ? "password" : "text",
969
+ placeholder: u.placeholder,
970
+ disabled: l.value,
971
+ onBlur: f[1] || (f[1] = (p) => r.value = !1)
972
+ }, null, 40, Gt), [
973
+ [Ue, k(n)]
974
+ ]),
975
+ k(s) ? (m(), $("div", {
976
+ key: 1,
977
+ class: S(se)
978
+ }, [
979
+ x(De)
980
+ ])) : u.rightIcon ? (m(), $("div", {
981
+ key: 2,
982
+ class: S(se)
983
+ }, [
984
+ x(ie, { icon: u.rightIcon }, null, 8, ["icon"])
985
+ ])) : E("", !0),
986
+ i.value ? E("", !0) : (m(), $("div", Kt))
987
+ ], 2));
988
+ }
989
+ }), Xt = { class: "$ui-base" }, co = /* @__PURE__ */ D({
990
+ __name: "FormField",
991
+ props: {
992
+ modelValue: {},
993
+ status: { default: "normal" },
994
+ showMessage: { type: Boolean, default: !0 },
995
+ message: { default: "" },
996
+ placeholder: {}
997
+ },
998
+ emits: ["update:modelValue"],
999
+ setup(e, { emit: o }) {
1000
+ const t = e, n = J(t, "modelValue", o), s = T(!1), r = _(() => t.message && t.message.length && t.showMessage), i = {
1001
+ normal: "color-gray-600 dark:color-gray-400",
1002
+ warning: "color-warning-500 dark:color-warning-200",
1003
+ danger: "color-danger-500 dark:color-danger-200",
1004
+ success: "color-primary-700 dark:color-primary-500"
1005
+ }, l = {
1006
+ warning: "i-bx:bxs-error",
1007
+ danger: "i-ic-round-error",
1008
+ success: "i-ep:success-filled"
1009
+ };
1010
+ return (c, d) => (m(), $("div", Xt, [
1011
+ x(Yt, {
1012
+ modelValue: k(n),
1013
+ "onUpdate:modelValue": d[0] || (d[0] = (u) => Q(n) ? n.value = u : null),
1014
+ placeholder: c.placeholder,
1015
+ onUpdateFocused: d[1] || (d[1] = (u) => s.value = u)
1016
+ }, null, 8, ["modelValue", "placeholder"]),
1017
+ b("div", {
1018
+ class: S(["mt2 $ui-base text-3.5", [
1019
+ i[c.status],
1020
+ { "opacity-65": !s.value }
1021
+ ]])
1022
+ }, [
1023
+ c.status !== "normal" && r.value ? (m(), M(ie, {
1024
+ key: 0,
1025
+ inline: "",
1026
+ icon: l[c.status]
1027
+ }, null, 8, ["icon"])) : E("", !0),
1028
+ j(" " + I(r.value ? c.message : ""), 1)
1029
+ ], 2)
1030
+ ]));
1031
+ }
1032
+ }), qt = { class: "overflow-hidden rounded-lg shadow-lg" }, Qt = /* @__PURE__ */ b("div", { class: "p2 opacity-40" }, " Empty... ", -1), Zt = /* @__PURE__ */ D({
1033
+ __name: "Dropdown",
1034
+ props: {
1035
+ label: {},
1036
+ buttonProps: { default: () => ({}) },
1037
+ buttonClass: { default: "" },
1038
+ trigger: { default: "click" },
1039
+ distance: { default: 0 },
1040
+ skidding: {},
1041
+ placement: {},
1042
+ disabled: { type: Boolean, default: !1 },
1043
+ shown: { type: Boolean }
1044
+ },
1045
+ emits: ["update:visible"],
1046
+ setup(e) {
1047
+ const o = e;
1048
+ return Ge("$ui-dropdown-disabled", _(() => o.disabled)), (t, a) => (m(), M(k(Re), {
1049
+ disabled: t.disabled,
1050
+ class: "inline-block w-auto",
1051
+ shown: t.shown,
1052
+ triggers: [t.trigger],
1053
+ distance: t.distance + 6,
1054
+ placement: t.placement,
1055
+ skidding: t.skidding,
1056
+ "onUpdate:shown": a[0] || (a[0] = (n) => t.$emit("update:visible", n)),
1057
+ onClick: a[1] || (a[1] = (n) => {
1058
+ n.stopPropagation();
1059
+ })
1060
+ }, {
1061
+ popper: y(({ hide: n }) => [
1062
+ b("div", qt, [
1063
+ w(t.$slots, "popper", ce(de({ hide: n })), () => [
1064
+ Qt
1065
+ ])
1066
+ ])
1067
+ ]),
1068
+ default: y(() => [
1069
+ w(t.$slots, "default", {}, () => [
1070
+ x(K, q({
1071
+ ...t.buttonProps,
1072
+ disabled: t.disabled
1073
+ }, { class: t.buttonClass }), Te({
1074
+ icon: y(() => [
1075
+ w(t.$slots, "button-icon")
1076
+ ]),
1077
+ "icon-right": y(() => [
1078
+ w(t.$slots, "button-icon-right")
1079
+ ]),
1080
+ _: 2
1081
+ }, [
1082
+ t.label ? {
1083
+ name: "default",
1084
+ fn: y(() => [
1085
+ j(I(t.label), 1)
1086
+ ]),
1087
+ key: "0"
1088
+ } : void 0
1089
+ ]), 1040, ["class"])
1090
+ ])
1091
+ ]),
1092
+ _: 3
1093
+ }, 8, ["disabled", "shown", "triggers", "distance", "placement", "skidding"]));
1094
+ }
1095
+ }), fo = /* @__PURE__ */ D({
1096
+ __name: "DropdownButton",
1097
+ props: {
1098
+ type: {},
1099
+ round: { type: [String, Boolean] },
1100
+ loading: { type: Boolean },
1101
+ disabled: { type: Boolean },
1102
+ size: {},
1103
+ flat: { type: Boolean },
1104
+ outlined: { type: Boolean },
1105
+ keepOpen: { type: Boolean, default: !1 }
1106
+ },
1107
+ setup(e) {
1108
+ const o = e, t = Ke("$ui-dropdown-disabled", void 0);
1109
+ return (a, n) => me((m(), M(K, q({
1110
+ ...o,
1111
+ round: !1
1112
+ }, {
1113
+ disabled: k(t),
1114
+ class: "w-full justify-start transition-colors not-action:bg-transparent!"
1115
+ }), {
1116
+ icon: y(() => [
1117
+ w(a.$slots, "icon")
1118
+ ]),
1119
+ default: y(() => [
1120
+ w(a.$slots, "default")
1121
+ ]),
1122
+ _: 3
1123
+ }, 16, ["disabled"])), [
1124
+ [k($e)]
1125
+ ]);
1126
+ }
1127
+ }), eo = { class: "$ui-fec gap2.5" }, po = /* @__PURE__ */ D({
1128
+ __name: "Confirm",
1129
+ props: {
1130
+ modelValue: { type: Boolean },
1131
+ content: {},
1132
+ cancelText: { default: "Cancel" },
1133
+ confirmText: { default: "Confirm" },
1134
+ width: { default: "20%" },
1135
+ height: { default: "9rem" },
1136
+ title: { default: "Warning" },
1137
+ loading: { type: Boolean, default: !1 },
1138
+ autoClose: { type: Boolean, default: !0 }
1139
+ },
1140
+ emits: ["update:modelValue", "confirm", "cancel", "close"],
1141
+ setup(e, { emit: o }) {
1142
+ const t = e, a = o, n = J(t, "modelValue", a);
1143
+ X(() => {
1144
+ n.value || a("close");
1145
+ });
1146
+ function s(r = !1) {
1147
+ (t.autoClose || r) && (n.value = !1);
1148
+ }
1149
+ return (r, i) => (m(), M(Ut, {
1150
+ modelValue: k(n),
1151
+ "onUpdate:modelValue": i[2] || (i[2] = (l) => Q(n) ? n.value = l : null),
1152
+ width: r.width,
1153
+ height: r.height,
1154
+ title: r.title,
1155
+ closable: !1
1156
+ }, {
1157
+ footer: y(() => [
1158
+ b("div", eo, [
1159
+ x(K, {
1160
+ onClick: i[0] || (i[0] = () => {
1161
+ a("cancel"), s(!0);
1162
+ })
1163
+ }, {
1164
+ default: y(() => [
1165
+ j(I(r.cancelText), 1)
1166
+ ]),
1167
+ _: 1
1168
+ }),
1169
+ x(K, {
1170
+ loading: r.loading,
1171
+ type: "primary",
1172
+ onClick: i[1] || (i[1] = () => {
1173
+ a("confirm"), s();
1174
+ })
1175
+ }, {
1176
+ default: y(() => [
1177
+ j(I(r.confirmText), 1)
1178
+ ]),
1179
+ _: 1
1180
+ }, 8, ["loading"])
1181
+ ])
1182
+ ]),
1183
+ default: y(() => [
1184
+ w(r.$slots, "default", { class: "h-auto w-auto" }, () => [
1185
+ j(I(r.content), 1)
1186
+ ])
1187
+ ]),
1188
+ _: 3
1189
+ }, 8, ["modelValue", "width", "height", "title"]));
1190
+ }
1191
+ }), to = { class: "m1 min-w-35 w-auto flex flex-col" }, oo = ["onClick"], no = /* @__PURE__ */ b("div", { class: "i-mdi-chevron-down" }, null, -1), mo = /* @__PURE__ */ D({
1192
+ __name: "Select",
1193
+ props: {
1194
+ modelValue: {},
1195
+ multiple: { default: !1 },
1196
+ options: {},
1197
+ placeholder: { default: "Select..." },
1198
+ autoClose: { type: Boolean, default: !0 },
1199
+ disabled: { type: Boolean, default: !1 },
1200
+ labelRenderer: { type: Function, default: (e) => String(e) },
1201
+ buttonProps: { default: () => ({}) }
1202
+ },
1203
+ emits: ["update:modelValue"],
1204
+ setup(e, { emit: o }) {
1205
+ const t = e, a = o, n = _e(), s = _({
1206
+ get: () => t.modelValue,
1207
+ set: (l) => a("update:modelValue", l)
1208
+ }), r = _(() => {
1209
+ const l = t.options.find((c) => c.value === s.value);
1210
+ return l != null && l.label ? t.labelRenderer(l.label) : t.placeholder;
1211
+ });
1212
+ function i(l) {
1213
+ t.multiple ? s.value = s.value.includes(l.value) ? s.value.filter((c) => c !== l.value) : [...s.value, l.value] : s.value = l.value;
1214
+ }
1215
+ return (l, c) => (m(), M(Zt, q({ label: r.value }, {
1216
+ buttonProps: l.buttonProps,
1217
+ disabled: l.disabled
1218
+ }), Te({
1219
+ popper: y(() => [
1220
+ b("div", to, [
1221
+ k(n).item ? (m(!0), $(he, { key: 0 }, be(l.options, (d) => (m(), $("div", {
1222
+ key: d.value,
1223
+ class: "cursor-pointer",
1224
+ onClick: (u) => i(d)
1225
+ }, [
1226
+ w(l.$slots, "item", ce(de({
1227
+ item: d,
1228
+ active: l.multiple ? s.value.includes(d.value) : d.value === s.value,
1229
+ disabled: l.disabled
1230
+ })))
1231
+ ], 8, oo))), 128)) : (m(!0), $(he, { key: 1 }, be(l.options, (d) => me((m(), M(K, {
1232
+ key: d.value,
1233
+ disabled: l.disabled,
1234
+ round: "normal",
1235
+ class: S(["flex-[auto_1_1] not-hover:[&:not(.active)]:bg-transparent!", {
1236
+ active: l.multiple ? s.value.includes(d.value) : d.value === s.value
1237
+ }]),
1238
+ onClick: (u) => i(d)
1239
+ }, {
1240
+ default: y(() => [
1241
+ j(I(d.label), 1)
1242
+ ]),
1243
+ _: 2
1244
+ }, 1032, ["disabled", "class", "onClick"])), [
1245
+ [k($e), l.autoClose]
1246
+ ])), 128))
1247
+ ])
1248
+ ]),
1249
+ "button-icon-right": y(() => [
1250
+ no
1251
+ ]),
1252
+ _: 2
1253
+ }, [
1254
+ k(n).button ? {
1255
+ name: "default",
1256
+ fn: y(() => [
1257
+ w(l.$slots, "button")
1258
+ ]),
1259
+ key: "0"
1260
+ } : void 0
1261
+ ]), 1040, ["label"]));
1262
+ }
1263
+ }), vo = /* @__PURE__ */ D({
1264
+ __name: "Switch",
1265
+ props: {
1266
+ modelValue: { type: Boolean },
1267
+ disabled: { type: Boolean }
1268
+ },
1269
+ emits: ["update:modelValue"],
1270
+ setup(e, { emit: o }) {
1271
+ const n = J(e, "modelValue", o), s = yt(n);
1272
+ return (r, i) => (m(), $("div", {
1273
+ class: S([[
1274
+ r.disabled ? "cursor-not-allowed" : "cursor-pointer"
1275
+ ], "$ui-base $ui-if-sc cursor-pointer select-none gap1.25 vertical-mid text-3.5"]),
1276
+ role: "checkbox",
1277
+ onClick: i[0] || (i[0] = (l) => !r.disabled && k(s)())
1278
+ }, [
1279
+ w(r.$slots, "default"),
1280
+ b("div", {
1281
+ class: S([{
1282
+ selected: k(n)
1283
+ }, "group relative $ui-base h4 w8 rounded-2 bg-primary-100 transition-colors dark:bg-gray-700 [&.selected]:bg-primary-500!"])
1284
+ }, [
1285
+ b("div", {
1286
+ class: S(["h4 w4 rounded-full bg-primary-800 transition-transform group-[&.selected]:transform-translate-x-4 dark:bg-white", [
1287
+ { "group-hover:opacity-75 group-active:scale-85": !r.disabled },
1288
+ { "opacity-65": r.disabled }
1289
+ ]])
1290
+ }, null, 2)
1291
+ ], 2)
1292
+ ], 2));
1293
+ }
1294
+ }), go = /* @__PURE__ */ D({
1295
+ __name: "Checkbox",
1296
+ props: {
1297
+ modelValue: { type: Boolean },
1298
+ variant: { default: "normal" }
1299
+ },
1300
+ emits: ["update:modelValue"],
1301
+ setup(e, { emit: o }) {
1302
+ const n = J(e, "modelValue", o);
1303
+ return (s, r) => (m(), $("div", {
1304
+ class: S(["relative $ui-base h5 w5 $ui-inline-fcc cursor-pointer border-0.125rem rounded-1.25 transition-colors duration-200 ease-in-out", [
1305
+ k(n) ? s.variant === "normal" ? "bg-primary-500 border-primary-200 dark:border-primary-100" : "bg-accent-500 border-accent-200 dark:border-accent-100" : ""
1306
+ ]]),
1307
+ onClick: r[0] || (r[0] = (i) => n.value = !k(n))
1308
+ }, [
1309
+ b("div", {
1310
+ class: S([[
1311
+ k(n) ? "opacity-100" : "opacity-0"
1312
+ ], "h-60% w-35% transform-translate-y--0.25 transform-rotate-45 border-width-[0_0.125rem_0.125rem_0] border-white border-solid transition-opacity duration-200 ease-in-out"])
1313
+ }, null, 2)
1314
+ ], 2));
1315
+ }
1316
+ }), ho = /* @__PURE__ */ D({
1317
+ __name: "Drawer",
1318
+ props: {
1319
+ modelValue: { type: Boolean },
1320
+ mountTo: { default: "body" },
1321
+ placement: { default: "right" },
1322
+ closeOutside: { type: Boolean, default: !0 },
1323
+ closable: { type: Boolean, default: !0 },
1324
+ contentClass: {},
1325
+ permanent: { type: Boolean, default: !1 },
1326
+ contentBlur: { type: Boolean, default: !1 },
1327
+ top: {},
1328
+ dim: { type: Boolean },
1329
+ blur: { type: Boolean }
1330
+ },
1331
+ emits: ["update:modelValue", "close"],
1332
+ setup(e, { emit: o }) {
1333
+ const t = e, a = o, { height: n } = At(() => typeof t.top == "string" ? document.querySelector(t.top) : t.top, void 0, { box: "border-box" }), s = J(t, "modelValue", a), r = {
1334
+ left: {
1335
+ class: "left-0 h-full b-r",
1336
+ transition: "[&_.drawer]:translate-x--100%"
1337
+ },
1338
+ right: {
1339
+ class: "right-0 h-full b-l",
1340
+ transition: "[&_.drawer]:translate-x-full"
1341
+ },
1342
+ top: {
1343
+ class: "w-full b-b",
1344
+ transition: "[&_.drawer]:translate-y--100%"
1345
+ },
1346
+ bottom: {
1347
+ class: "bottom-0 w-full b-t",
1348
+ transition: "[&_.drawer]:translate-y-100%"
1349
+ }
1350
+ };
1351
+ Ne("Escape", () => {
1352
+ t.closable && (s.value = !1);
1353
+ });
1354
+ const i = _(() => r[t.placement]), l = T(!1);
1355
+ return Y(() => l.value = !0), (c, d) => l.value || c.mountTo === "body" ? (m(), M(Be, {
1356
+ key: 0,
1357
+ to: c.mountTo
1358
+ }, [
1359
+ x(fe, {
1360
+ "enter-from-class": `${i.value.transition}`,
1361
+ "leave-to-class": `${i.value.transition}`
1362
+ }, {
1363
+ default: y(() => [
1364
+ k(s) ? (m(), M(Le, {
1365
+ key: 0,
1366
+ class: S({
1367
+ "pointer-events-none": c.permanent
1368
+ }),
1369
+ dim: c.dim,
1370
+ blur: c.blur,
1371
+ onClick: d[2] || (d[2] = (u) => c.closeOutside && c.closable && (s.value = !1))
1372
+ }, {
1373
+ default: y(() => [
1374
+ b("div", {
1375
+ class: S([[i.value.class, c.contentClass ?? "", c.contentBlur ? "$ui-glass-effect" : "$ui-bg-base"], "drawer pointer-events-auto absolute min-w-25 of-auto $ui-border-base transition-transform transition-duration-300"]),
1376
+ style: pe({
1377
+ top: c.placement === "bottom" ? "auto" : `${k(n)}px`,
1378
+ height: ["top", "bottom"].includes(c.placement) ? "auto" : `calc(100% - ${k(n)}px)`
1379
+ }),
1380
+ onClick: d[1] || (d[1] = Ye(() => {
1381
+ }, ["stop"]))
1382
+ }, [
1383
+ c.closable ? (m(), $("div", {
1384
+ key: 0,
1385
+ class: "i-carbon-close absolute right-1.5 top-1.5 $ui-z-max cursor-pointer p1 text-lg $ui-text",
1386
+ onClick: d[0] || (d[0] = (u) => s.value = !1)
1387
+ })) : E("", !0),
1388
+ w(c.$slots, "default")
1389
+ ], 6)
1390
+ ]),
1391
+ _: 3
1392
+ }, 8, ["class", "dim", "blur"])) : E("", !0)
1393
+ ]),
1394
+ _: 3
1395
+ }, 8, ["enter-from-class", "leave-to-class"])
1396
+ ], 8, ["to"])) : E("", !0);
1397
+ }
1398
+ }), ro = /* @__PURE__ */ D({
1399
+ __name: "Notification",
1400
+ props: {
1401
+ message: {},
1402
+ type: { default: "info" },
1403
+ classes: {},
1404
+ duration: { default: 3e3 },
1405
+ placement: { default: "top-center" },
1406
+ onClose: {}
1407
+ },
1408
+ setup(e) {
1409
+ const o = e, t = {
1410
+ success: "i-carbon-checkmark",
1411
+ info: "i-material-symbols-light-info",
1412
+ warning: "i-carbon-warning",
1413
+ error: "i-carbon-close"
1414
+ }, a = {
1415
+ success: "text-primary-500 border-primary-200 dark:text-primary-200 dark:border-primary-500",
1416
+ info: "text-blue-4 border-blue-2 dark:text-blue-2 dark:border-blue-4",
1417
+ warning: "text-amber-4 border-amber-2 dark:border-amber-4",
1418
+ error: "text-red-4 border-red-2 dark:border-red-4"
1419
+ }, n = T(!1);
1420
+ Y(() => {
1421
+ n.value = !0, setTimeout(() => {
1422
+ n.value = !1;
1423
+ }, o.duration);
1424
+ });
1425
+ const s = _(() => o.placement.startsWith("top") ? "translate-y--300%" : "translate-y-300%");
1426
+ return (r, i) => (m(), $("div", {
1427
+ class: S(["fixed left-0 right-0 $ui-z-max-override text-center", [
1428
+ { "top-0": r.placement.startsWith("top") },
1429
+ { "bottom-0": r.placement.startsWith("bottom") }
1430
+ ]])
1431
+ }, [
1432
+ x(fe, {
1433
+ "enter-from-class": s.value,
1434
+ "leave-to-class": s.value,
1435
+ onAfterLeave: i[0] || (i[0] = () => {
1436
+ var l;
1437
+ n.value || (l = r.onClose) == null || l.call(r);
1438
+ })
1439
+ }, {
1440
+ default: y(() => [
1441
+ n.value ? (m(), $("div", {
1442
+ key: 0,
1443
+ class: "flex transition-all duration-300",
1444
+ style: pe({ justifyContent: r.placement.includes("right") ? "right" : r.placement.includes("left") ? "left" : "center" })
1445
+ }, [
1446
+ b("div", {
1447
+ class: S(["m3 flex-inline items-center gap2 b-1 b-1 rounded px4 py1 shadow transition-all duration-300 $ui-bg-base", [r.classes, a[r.type]]])
1448
+ }, [
1449
+ b("div", {
1450
+ class: S(t[r.type])
1451
+ }, null, 2),
1452
+ b("div", null, I(r.message), 1)
1453
+ ], 2)
1454
+ ], 4)) : E("", !0)
1455
+ ]),
1456
+ _: 1
1457
+ }, 8, ["enter-from-class", "leave-to-class"])
1458
+ ], 2));
1459
+ }
1460
+ }), bo = /* @__PURE__ */ D({
1461
+ __name: "Tooltip",
1462
+ props: {
1463
+ trigger: {},
1464
+ distance: {},
1465
+ skidding: {},
1466
+ placement: {},
1467
+ disabled: { type: Boolean },
1468
+ shown: { type: Boolean }
1469
+ },
1470
+ setup(e) {
1471
+ return (o, t) => (m(), M(k(We), q({
1472
+ disabled: o.disabled,
1473
+ placement: o.placement
1474
+ }, o.$attrs), {
1475
+ popper: y(() => [
1476
+ w(o.$slots, "popper")
1477
+ ]),
1478
+ default: y(() => [
1479
+ w(o.$slots, "default")
1480
+ ]),
1481
+ _: 3
1482
+ }, 16, ["disabled", "placement"]));
1483
+ }
1484
+ });
1485
+ function yo(e) {
1486
+ const o = document.createElement("div");
1487
+ o.classList.add("$ui-z-max-override", "fixed"), document.body.appendChild(o);
1488
+ const t = e.onClose;
1489
+ function a() {
1490
+ ye(null, o);
1491
+ }
1492
+ e.onClose = () => {
1493
+ a(), t == null || t(), document.body.removeChild(o);
1494
+ };
1495
+ const n = Xe(ro, e);
1496
+ ye(n, o);
1497
+ }
1498
+ export {
1499
+ $o as VTooltip,
1500
+ so as VueBadge,
1501
+ K as VueButton,
1502
+ uo as VueCard,
1503
+ go as VueCheckbox,
1504
+ po as VueConfirm,
1505
+ io as VueDarkToggle,
1506
+ Ut as VueDialog,
1507
+ ho as VueDrawer,
1508
+ Zt as VueDropdown,
1509
+ fo as VueDropdownButton,
1510
+ co as VueFormField,
1511
+ ie as VueIcon,
1512
+ Yt as VueInput,
1513
+ De as VueLoadingIndicator,
1514
+ ro as VueNotification,
1515
+ Le as VueOverlay,
1516
+ mo as VueSelect,
1517
+ vo as VueSwitch,
1518
+ bo as VueTooltip,
1519
+ yo as showVueNotification
1520
+ };