@dronico/droni-kit 1.14.0 → 1.16.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.
- package/CHANGELOG.md +14 -0
- package/dist/droni-kit.cjs.js +9 -9
- package/dist/droni-kit.css +1 -1
- package/dist/droni-kit.es.js +877 -418
- package/dist/index.d.ts +3 -1
- package/dist/stories/Elements/DuiModal.stories.d.ts +205 -0
- package/dist/stories/Elements/DuiModal.vue.d.ts +64 -0
- package/dist/stories/Elements/DuiTooltip.stories.d.ts +221 -0
- package/dist/stories/Elements/DuiTooltip.vue.d.ts +82 -0
- package/package.json +2 -1
package/dist/droni-kit.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
function
|
|
1
|
+
import { getCurrentInstance as _e, defineComponent as A, computed as l, openBlock as r, createBlock as H, resolveDynamicComponent as K, mergeProps as I, withCtx as E, renderSlot as T, createElementBlock as o, toDisplayString as S, createCommentVNode as w, Fragment as O, renderList as G, ref as Q, normalizeClass as m, createElementVNode as p, createTextVNode as V, withDirectives as ne, vShow as se, useSlots as je, createVNode as oe, watch as re, onMounted as ue, onBeforeUnmount as ce, Teleport as be, Transition as pe, normalizeStyle as fe, withModifiers as Be, nextTick as te, reactive as Me } from "vue";
|
|
2
|
+
function Te() {
|
|
3
3
|
try {
|
|
4
|
-
const t =
|
|
5
|
-
return
|
|
4
|
+
const t = _e(), d = t == null ? void 0 : t.appContext.app;
|
|
5
|
+
return d ? !!(d.config.globalProperties.$router || d.config.globalProperties.$route || d.component("RouterLink")) : typeof window < "u" ? !!window.VueRouter : !1;
|
|
6
6
|
} catch {
|
|
7
7
|
return !1;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return t ?
|
|
10
|
+
function ee(t, d = !1) {
|
|
11
|
+
return t ? d ? "NuxtLink" : Te() ? "RouterLink" : "a" : "button";
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
return
|
|
13
|
+
function ae(t, d, e = {}) {
|
|
14
|
+
const i = { ...e };
|
|
15
|
+
return d === "a" ? (i.href = typeof t == "string" ? t : "#", i.role = "button") : d !== "button" && d !== "span" && (i.to = t), i;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const Ve = { key: 1 }, Pe = `
|
|
18
18
|
dk:transition
|
|
19
19
|
dk:text-center
|
|
20
20
|
dk:disabled:opacity-50
|
|
@@ -25,7 +25,7 @@ const re = { key: 1 }, oe = `
|
|
|
25
25
|
dk:text-ellipsis
|
|
26
26
|
dk:whitespace-nowrap
|
|
27
27
|
dk:active:scale-95
|
|
28
|
-
dk:max-w-full`,
|
|
28
|
+
dk:max-w-full`, ie = /* @__PURE__ */ A({
|
|
29
29
|
__name: "DuiButton",
|
|
30
30
|
props: {
|
|
31
31
|
variant: { default: "solid" },
|
|
@@ -41,21 +41,21 @@ const re = { key: 1 }, oe = `
|
|
|
41
41
|
nuxt: { type: Boolean, default: !1 }
|
|
42
42
|
},
|
|
43
43
|
setup(t) {
|
|
44
|
-
const
|
|
44
|
+
const d = t, e = l(() => ee(d.to, d.nuxt)), i = l(() => {
|
|
45
45
|
const a = {};
|
|
46
|
-
return
|
|
47
|
-
}),
|
|
46
|
+
return e.value === "button" && (a.type = d.type), ae(d.to, e.value, a);
|
|
47
|
+
}), f = {
|
|
48
48
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
49
49
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
50
50
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
51
|
-
},
|
|
51
|
+
}, c = {
|
|
52
52
|
all: "dk:rounded",
|
|
53
53
|
top: "dk:rounded-t",
|
|
54
54
|
bottom: "dk:rounded-b",
|
|
55
55
|
left: "dk:rounded-l",
|
|
56
56
|
right: "dk:rounded-r",
|
|
57
57
|
none: "dk:rounded-none"
|
|
58
|
-
},
|
|
58
|
+
}, x = {
|
|
59
59
|
solid: {
|
|
60
60
|
base: "dk:border-b",
|
|
61
61
|
neutral: `
|
|
@@ -227,23 +227,23 @@ const re = { key: 1 }, oe = `
|
|
|
227
227
|
dk:dark:text-amber-100
|
|
228
228
|
dk:dark:hover:bg-amber-800`
|
|
229
229
|
}
|
|
230
|
-
},
|
|
231
|
-
var
|
|
232
|
-
const a = (((
|
|
233
|
-
return [
|
|
230
|
+
}, v = l(() => {
|
|
231
|
+
var C;
|
|
232
|
+
const a = (((C = x[d.variant]) == null ? void 0 : C[d.color]) || "") + " " + x[d.variant].base, n = f[d.size] || "", k = d.block ? "dk:w-full" : "", s = c[d.rounded] || "";
|
|
233
|
+
return [Pe, a, n, k, s].join(" ");
|
|
234
234
|
});
|
|
235
|
-
return (a, n) => (r(),
|
|
236
|
-
class:
|
|
237
|
-
title:
|
|
238
|
-
disabled:
|
|
235
|
+
return (a, n) => (r(), H(K(e.value), I(i.value, {
|
|
236
|
+
class: v.value,
|
|
237
|
+
title: d.title,
|
|
238
|
+
disabled: d.disabled || d.loading
|
|
239
239
|
}), {
|
|
240
|
-
default:
|
|
241
|
-
|
|
240
|
+
default: E(() => [
|
|
241
|
+
d.loading ? (r(), o("span", Ve, "Cargando...")) : T(a.$slots, "default", { key: 0 })
|
|
242
242
|
]),
|
|
243
243
|
_: 3
|
|
244
244
|
}, 16, ["class", "title", "disabled"]));
|
|
245
245
|
}
|
|
246
|
-
}),
|
|
246
|
+
}), De = ["value"], Le = `
|
|
247
247
|
dk:border-b
|
|
248
248
|
dk:border-zinc-300
|
|
249
249
|
dk:bg-zinc-50
|
|
@@ -255,7 +255,7 @@ const re = { key: 1 }, oe = `
|
|
|
255
255
|
dk:dark:bg-zinc-800
|
|
256
256
|
dk:dark:text-zinc-100
|
|
257
257
|
dk:dark:focus:bg-zinc-700
|
|
258
|
-
dk:dark:[color-scheme:dark]`,
|
|
258
|
+
dk:dark:[color-scheme:dark]`, Bd = /* @__PURE__ */ A({
|
|
259
259
|
inheritAttrs: !1,
|
|
260
260
|
__name: "DuiInput",
|
|
261
261
|
props: {
|
|
@@ -277,33 +277,33 @@ const re = { key: 1 }, oe = `
|
|
|
277
277
|
}
|
|
278
278
|
},
|
|
279
279
|
emits: ["update:modelValue"],
|
|
280
|
-
setup(t, { emit:
|
|
281
|
-
const
|
|
282
|
-
function
|
|
280
|
+
setup(t, { emit: d }) {
|
|
281
|
+
const e = t, i = d;
|
|
282
|
+
function f(a) {
|
|
283
283
|
const n = a.target;
|
|
284
|
-
|
|
284
|
+
i("update:modelValue", n.value);
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const c = {
|
|
287
287
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
288
288
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
289
289
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
290
|
-
},
|
|
290
|
+
}, x = {
|
|
291
291
|
all: "dk:rounded",
|
|
292
292
|
top: "dk:rounded-t",
|
|
293
293
|
bottom: "dk:rounded-b",
|
|
294
294
|
left: "dk:rounded-l",
|
|
295
295
|
right: "dk:rounded-r",
|
|
296
296
|
none: "dk:rounded-none"
|
|
297
|
-
},
|
|
298
|
-
const a =
|
|
299
|
-
return [
|
|
297
|
+
}, v = l(() => {
|
|
298
|
+
const a = c[e.size] || "", n = e.block ? "dk:w-full" : "", k = x[e.rounded] || "";
|
|
299
|
+
return [Le, a, n, k].join(" ");
|
|
300
300
|
});
|
|
301
|
-
return (a, n) => (r(), o("input",
|
|
302
|
-
class:
|
|
301
|
+
return (a, n) => (r(), o("input", I({
|
|
302
|
+
class: v.value,
|
|
303
303
|
value: t.modelValue
|
|
304
|
-
}, a.$attrs, { onInput:
|
|
304
|
+
}, a.$attrs, { onInput: f }), null, 16, De));
|
|
305
305
|
}
|
|
306
|
-
}),
|
|
306
|
+
}), Ie = ["value"], We = `
|
|
307
307
|
dk:border-b
|
|
308
308
|
dk:border-zinc-300
|
|
309
309
|
dk:bg-zinc-50
|
|
@@ -315,7 +315,7 @@ const re = { key: 1 }, oe = `
|
|
|
315
315
|
dk:dark:bg-zinc-800
|
|
316
316
|
dk:dark:text-zinc-100
|
|
317
317
|
dk:dark:focus:bg-zinc-700
|
|
318
|
-
dk:dark:[color-scheme:dark]`,
|
|
318
|
+
dk:dark:[color-scheme:dark]`, Md = /* @__PURE__ */ A({
|
|
319
319
|
inheritAttrs: !1,
|
|
320
320
|
__name: "DuiTextarea",
|
|
321
321
|
props: {
|
|
@@ -345,46 +345,46 @@ const re = { key: 1 }, oe = `
|
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
347
|
emits: ["update:modelValue"],
|
|
348
|
-
setup(t, { emit:
|
|
349
|
-
const
|
|
350
|
-
function
|
|
348
|
+
setup(t, { emit: d }) {
|
|
349
|
+
const e = t, i = d;
|
|
350
|
+
function f(k) {
|
|
351
351
|
const s = k.target;
|
|
352
|
-
|
|
352
|
+
e.autoheight && n(s), i("update:modelValue", s.value);
|
|
353
353
|
}
|
|
354
|
-
const
|
|
354
|
+
const c = {
|
|
355
355
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
356
356
|
md: "dk:text-base dk:px-3 dk:py-2",
|
|
357
357
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
358
|
-
},
|
|
358
|
+
}, x = {
|
|
359
359
|
all: "dk:rounded",
|
|
360
360
|
top: "dk:rounded-t",
|
|
361
361
|
bottom: "dk:rounded-b",
|
|
362
362
|
left: "dk:rounded-l",
|
|
363
363
|
right: "dk:rounded-r",
|
|
364
364
|
none: "dk:rounded-none"
|
|
365
|
-
},
|
|
365
|
+
}, v = {
|
|
366
366
|
none: "dk:resize-none",
|
|
367
367
|
both: "dk:resize",
|
|
368
368
|
horizontal: "dk:resize-x",
|
|
369
369
|
vertical: "dk:resize-y"
|
|
370
|
-
}, a =
|
|
371
|
-
const k =
|
|
372
|
-
return [
|
|
370
|
+
}, a = l(() => {
|
|
371
|
+
const k = c[e.size] || "", s = e.block ? "dk:w-full" : "", C = x[e.rounded] || "", B = v[e.resize] || "";
|
|
372
|
+
return [We, k, s, C, B].join(" ");
|
|
373
373
|
}), n = (k) => {
|
|
374
374
|
k.style.height = "auto", k.style.height = `${k.scrollHeight + 5}px`;
|
|
375
375
|
};
|
|
376
|
-
return (k, s) => (r(), o("textarea",
|
|
376
|
+
return (k, s) => (r(), o("textarea", I(k.$attrs, {
|
|
377
377
|
class: a.value,
|
|
378
378
|
value: t.modelValue,
|
|
379
|
-
onInput:
|
|
380
|
-
}), null, 16,
|
|
379
|
+
onInput: f
|
|
380
|
+
}), null, 16, Ie));
|
|
381
381
|
}
|
|
382
|
-
}),
|
|
382
|
+
}), Ee = {
|
|
383
383
|
key: 0,
|
|
384
384
|
disabled: "",
|
|
385
385
|
selected: "",
|
|
386
386
|
hidden: ""
|
|
387
|
-
},
|
|
387
|
+
}, Ae = ["value", "selected"], Ne = `
|
|
388
388
|
dk:border-b
|
|
389
389
|
dk:border-zinc-300
|
|
390
390
|
dk:bg-zinc-50
|
|
@@ -397,7 +397,7 @@ const re = { key: 1 }, oe = `
|
|
|
397
397
|
dk:dark:text-zinc-100
|
|
398
398
|
dk:dark:focus:bg-zinc-700
|
|
399
399
|
dk:dark:[color-scheme:dark]
|
|
400
|
-
`,
|
|
400
|
+
`, Td = /* @__PURE__ */ A({
|
|
401
401
|
inheritAttrs: !1,
|
|
402
402
|
__name: "DuiSelect",
|
|
403
403
|
props: {
|
|
@@ -435,43 +435,43 @@ const re = { key: 1 }, oe = `
|
|
|
435
435
|
}
|
|
436
436
|
},
|
|
437
437
|
emits: ["update:modelValue"],
|
|
438
|
-
setup(t, { emit:
|
|
439
|
-
const
|
|
440
|
-
function
|
|
438
|
+
setup(t, { emit: d }) {
|
|
439
|
+
const e = t, i = d;
|
|
440
|
+
function f(a) {
|
|
441
441
|
const k = a.target.value, s = Number(k);
|
|
442
|
-
!isNaN(s) && k !== "" ?
|
|
442
|
+
!isNaN(s) && k !== "" ? i("update:modelValue", s) : i("update:modelValue", k);
|
|
443
443
|
}
|
|
444
|
-
const
|
|
444
|
+
const c = {
|
|
445
445
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
446
446
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
447
447
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
448
|
-
},
|
|
448
|
+
}, x = {
|
|
449
449
|
all: "dk:rounded",
|
|
450
450
|
top: "dk:rounded-t",
|
|
451
451
|
bottom: "dk:rounded-b",
|
|
452
452
|
left: "dk:rounded-l",
|
|
453
453
|
right: "dk:rounded-r",
|
|
454
454
|
none: "dk:rounded-none"
|
|
455
|
-
},
|
|
456
|
-
const a =
|
|
457
|
-
return [
|
|
455
|
+
}, v = l(() => {
|
|
456
|
+
const a = c[e.size] || "", n = e.block ? "dk:w-full" : "", k = x[e.rounded] || "";
|
|
457
|
+
return [Ne, a, n, k].join(" ");
|
|
458
458
|
});
|
|
459
|
-
return (a, n) => (r(), o("select",
|
|
460
|
-
class:
|
|
461
|
-
onChange:
|
|
459
|
+
return (a, n) => (r(), o("select", I(a.$attrs, {
|
|
460
|
+
class: v.value,
|
|
461
|
+
onChange: f
|
|
462
462
|
}), [
|
|
463
|
-
t.placeholder ? (r(), o("option",
|
|
464
|
-
(r(!0), o(
|
|
463
|
+
t.placeholder ? (r(), o("option", Ee, S(t.placeholder), 1)) : w("", !0),
|
|
464
|
+
(r(!0), o(O, null, G(t.options, (k, s) => (r(), o("option", {
|
|
465
465
|
key: s,
|
|
466
466
|
value: k[t.itemValue] ?? "",
|
|
467
467
|
selected: k[t.itemValue] == t.modelValue
|
|
468
|
-
},
|
|
468
|
+
}, S(k[t.itemLabel] ?? ""), 9, Ae))), 128))
|
|
469
469
|
], 16));
|
|
470
470
|
}
|
|
471
|
-
}),
|
|
471
|
+
}), Oe = {
|
|
472
472
|
key: 1,
|
|
473
473
|
class: "dk:text-rose-500 dk:ml-1"
|
|
474
|
-
},
|
|
474
|
+
}, Fe = { class: "tooltip-container tooltip-above dk:z-50 dk:text-xs dk:rounded dk:py-2 dk:px-3 dk:transition-all dk:duration-200 dk:min-w-[250px] dk:max-w-xs dk:shadow-lg dk:pointer-events-none" }, qe = "dk:space-y-1", He = /* @__PURE__ */ A({
|
|
475
475
|
__name: "DuiLabel",
|
|
476
476
|
props: {
|
|
477
477
|
title: {
|
|
@@ -500,68 +500,68 @@ const re = { key: 1 }, oe = `
|
|
|
500
500
|
}
|
|
501
501
|
},
|
|
502
502
|
setup(t) {
|
|
503
|
-
const
|
|
503
|
+
const d = Q(!1), e = t, i = {
|
|
504
504
|
s: "dk:text-sm",
|
|
505
505
|
m: "dk:text-base",
|
|
506
506
|
l: "dk:text-lg"
|
|
507
|
-
},
|
|
507
|
+
}, f = {
|
|
508
508
|
s: "dk:mt-1",
|
|
509
509
|
m: "dk:mt-1.5",
|
|
510
510
|
l: "dk:mt-2"
|
|
511
|
-
},
|
|
511
|
+
}, c = {
|
|
512
512
|
s: "dk:text-xs",
|
|
513
513
|
m: "dk:text-sm",
|
|
514
514
|
l: "dk:text-base"
|
|
515
|
-
},
|
|
516
|
-
const k =
|
|
517
|
-
return [s, k,
|
|
518
|
-
}), a =
|
|
515
|
+
}, x = l(() => [qe].join(" ")), v = l(() => {
|
|
516
|
+
const k = i[e.size] || i.m, s = "dk:block dk:font-medium dk:text-zinc-700 dk:dark:text-zinc-200 dk:flex dk:items-center", C = e.helpText ? "dk:cursor-help" : "";
|
|
517
|
+
return [s, k, C].join(" ");
|
|
518
|
+
}), a = l(() => [f[e.size] || f.m].join(" ")), n = l(() => ["dk:text-rose-600 dk:dark:text-rose-400 dk:flex dk:items-center dk:mt-1", c[e.size] || c.m].join(" "));
|
|
519
519
|
return (k, s) => (r(), o("label", {
|
|
520
|
-
class:
|
|
520
|
+
class: m(x.value)
|
|
521
521
|
}, [
|
|
522
522
|
t.title ? (r(), o("div", {
|
|
523
523
|
key: 0,
|
|
524
524
|
class: "dk:relative",
|
|
525
|
-
onMouseenter: s[0] || (s[0] = (
|
|
526
|
-
onMouseleave: s[1] || (s[1] = (
|
|
525
|
+
onMouseenter: s[0] || (s[0] = (C) => d.value = !!t.helpText),
|
|
526
|
+
onMouseleave: s[1] || (s[1] = (C) => d.value = !1)
|
|
527
527
|
}, [
|
|
528
|
-
|
|
529
|
-
class:
|
|
528
|
+
p("div", {
|
|
529
|
+
class: m(v.value)
|
|
530
530
|
}, [
|
|
531
531
|
t.icon ? (r(), o("i", {
|
|
532
532
|
key: 0,
|
|
533
|
-
class:
|
|
534
|
-
}, null, 2)) :
|
|
535
|
-
|
|
536
|
-
t.required ? (r(), o("span",
|
|
533
|
+
class: m([t.icon, "dk:mr-2"])
|
|
534
|
+
}, null, 2)) : w("", !0),
|
|
535
|
+
V(" " + S(t.title) + " ", 1),
|
|
536
|
+
t.required ? (r(), o("span", Oe, "*")) : w("", !0)
|
|
537
537
|
], 2),
|
|
538
|
-
|
|
539
|
-
S(
|
|
540
|
-
s[2] || (s[2] =
|
|
538
|
+
ne(p("div", Fe, [
|
|
539
|
+
V(S(t.helpText) + " ", 1),
|
|
540
|
+
s[2] || (s[2] = p("div", { class: "tooltip-arrow tooltip-arrow-down" }, null, -1))
|
|
541
541
|
], 512), [
|
|
542
|
-
[
|
|
542
|
+
[se, d.value && t.helpText]
|
|
543
543
|
])
|
|
544
|
-
], 32)) :
|
|
545
|
-
|
|
546
|
-
class:
|
|
544
|
+
], 32)) : w("", !0),
|
|
545
|
+
p("div", {
|
|
546
|
+
class: m(a.value)
|
|
547
547
|
}, [
|
|
548
|
-
|
|
548
|
+
T(k.$slots, "default", {}, void 0, !0)
|
|
549
549
|
], 2),
|
|
550
550
|
t.error ? (r(), o("div", {
|
|
551
551
|
key: 1,
|
|
552
|
-
class:
|
|
552
|
+
class: m(n.value)
|
|
553
553
|
}, [
|
|
554
|
-
s[3] || (s[3] =
|
|
555
|
-
|
|
556
|
-
], 2)) :
|
|
554
|
+
s[3] || (s[3] = p("span", { class: "dk:inline-flex dk:items-center dk:justify-center dk:w-4 dk:h-4 dk:text-xs dk:bg-rose-500 dk:text-white dk:rounded-full dk:mr-2 dk:flex-shrink-0" }, " ! ", -1)),
|
|
555
|
+
V(" " + S(t.error), 1)
|
|
556
|
+
], 2)) : w("", !0)
|
|
557
557
|
], 2));
|
|
558
558
|
}
|
|
559
|
-
}),
|
|
560
|
-
const
|
|
561
|
-
for (const [
|
|
562
|
-
|
|
563
|
-
return
|
|
564
|
-
},
|
|
559
|
+
}), ge = (t, d) => {
|
|
560
|
+
const e = t.__vccOpts || t;
|
|
561
|
+
for (const [i, f] of d)
|
|
562
|
+
e[i] = f;
|
|
563
|
+
return e;
|
|
564
|
+
}, Vd = /* @__PURE__ */ ge(He, [["__scopeId", "data-v-aa6b6cdc"]]), Ue = { class: "dk:relative dk:inline-flex dk:items-center dk:flex-shrink-0" }, Ke = ["checked", "disabled"], Pd = /* @__PURE__ */ A({
|
|
565
565
|
inheritAttrs: !1,
|
|
566
566
|
__name: "DuiCheckbox",
|
|
567
567
|
props: {
|
|
@@ -599,8 +599,8 @@ const re = { key: 1 }, oe = `
|
|
|
599
599
|
}
|
|
600
600
|
},
|
|
601
601
|
emits: ["update:modelValue"],
|
|
602
|
-
setup(t, { emit:
|
|
603
|
-
const
|
|
602
|
+
setup(t, { emit: d }) {
|
|
603
|
+
const e = t, i = d, f = je(), c = {
|
|
604
604
|
sm: {
|
|
605
605
|
track: "dk:w-9 dk:h-5",
|
|
606
606
|
thumb: "dk:w-3.5 dk:h-3.5",
|
|
@@ -616,94 +616,94 @@ const re = { key: 1 }, oe = `
|
|
|
616
616
|
thumb: "dk:w-5 dk:h-5",
|
|
617
617
|
translate: "dk:peer-checked:translate-x-7"
|
|
618
618
|
}
|
|
619
|
-
},
|
|
619
|
+
}, x = {
|
|
620
620
|
all: "dk:rounded-full",
|
|
621
621
|
top: "dk:rounded-t-full",
|
|
622
622
|
bottom: "dk:rounded-b-full",
|
|
623
623
|
left: "dk:rounded-l-full",
|
|
624
624
|
right: "dk:rounded-r-full",
|
|
625
625
|
none: "dk:rounded-none"
|
|
626
|
-
},
|
|
626
|
+
}, v = {
|
|
627
627
|
neutral: "dk:peer-checked:bg-zinc-500 dk:peer-checked:dark:bg-zinc-500",
|
|
628
628
|
primary: "dk:peer-checked:bg-slate-600 dk:peer-checked:dark:bg-slate-500",
|
|
629
629
|
secondary: "dk:peer-checked:bg-pink-600 dk:peer-checked:dark:bg-pink-500",
|
|
630
630
|
success: "dk:peer-checked:bg-emerald-600 dk:peer-checked:dark:bg-emerald-500",
|
|
631
631
|
warning: "dk:peer-checked:bg-amber-500 dk:peer-checked:dark:bg-amber-400",
|
|
632
632
|
danger: "dk:peer-checked:bg-rose-600 dk:peer-checked:dark:bg-rose-500"
|
|
633
|
-
}, a =
|
|
634
|
-
const
|
|
635
|
-
return ["dk:inline-flex dk:items-center dk:gap-3 dk:select-none",
|
|
636
|
-
}), k =
|
|
633
|
+
}, a = l(() => !!(e.label || f.default)), n = l(() => {
|
|
634
|
+
const j = e.block ? "dk:w-full dk:justify-between" : "", z = e.disabled ? "dk:opacity-60 dk:cursor-not-allowed" : "dk:cursor-pointer";
|
|
635
|
+
return ["dk:inline-flex dk:items-center dk:gap-3 dk:select-none", j, z].join(" ");
|
|
636
|
+
}), k = l(() => [
|
|
637
637
|
"dk:text-sm dk:leading-none dk:text-zinc-700 dk:dark:text-zinc-200",
|
|
638
|
-
|
|
639
|
-
].join(" ")), s =
|
|
640
|
-
const
|
|
638
|
+
e.disabled ? "dk:cursor-not-allowed" : "dk:cursor-pointer"
|
|
639
|
+
].join(" ")), s = l(() => {
|
|
640
|
+
const j = c[e.size] || c.md, z = x[e.rounded] || x.all, N = v[e.color] || v.primary;
|
|
641
641
|
return [
|
|
642
642
|
"dk:inline-flex dk:items-center dk:transition-colors dk:duration-200",
|
|
643
643
|
"dk:bg-zinc-300 dk:dark:bg-zinc-700",
|
|
644
644
|
"dk:peer-focus-visible:outline-none dk:peer-focus-visible:ring-2 dk:peer-focus-visible:ring-offset-2 dk:peer-focus-visible:ring-slate-400 dk:dark:peer-focus-visible:ring-slate-500",
|
|
645
645
|
"dk:peer-disabled:opacity-70",
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
646
|
+
j.track,
|
|
647
|
+
z,
|
|
648
|
+
N
|
|
649
649
|
].join(" ");
|
|
650
|
-
}),
|
|
651
|
-
const
|
|
650
|
+
}), C = l(() => {
|
|
651
|
+
const j = c[e.size] || c.md;
|
|
652
652
|
return [
|
|
653
653
|
"dk:absolute dk:left-1 dk:top-1/2 dk:-translate-y-1/2",
|
|
654
654
|
"dk:bg-white dk:dark:bg-zinc-100",
|
|
655
655
|
"dk:rounded-full dk:shadow-sm dk:transition-transform dk:duration-200",
|
|
656
656
|
"dk:pointer-events-none",
|
|
657
|
-
|
|
658
|
-
|
|
657
|
+
j.thumb,
|
|
658
|
+
j.translate
|
|
659
659
|
].join(" ");
|
|
660
660
|
});
|
|
661
|
-
function
|
|
662
|
-
const
|
|
663
|
-
|
|
661
|
+
function B(j) {
|
|
662
|
+
const z = j.target;
|
|
663
|
+
i("update:modelValue", z.checked);
|
|
664
664
|
}
|
|
665
|
-
return (
|
|
666
|
-
class:
|
|
665
|
+
return (j, z) => (r(), o("label", {
|
|
666
|
+
class: m(n.value)
|
|
667
667
|
}, [
|
|
668
668
|
a.value && t.labelPosition === "left" ? (r(), o("span", {
|
|
669
669
|
key: 0,
|
|
670
|
-
class:
|
|
670
|
+
class: m(k.value)
|
|
671
671
|
}, [
|
|
672
|
-
j
|
|
673
|
-
S(
|
|
672
|
+
T(j.$slots, "default", {}, () => [
|
|
673
|
+
V(S(t.label), 1)
|
|
674
674
|
])
|
|
675
|
-
], 2)) :
|
|
676
|
-
|
|
677
|
-
|
|
675
|
+
], 2)) : w("", !0),
|
|
676
|
+
p("span", Ue, [
|
|
677
|
+
p("input", I({
|
|
678
678
|
type: "checkbox",
|
|
679
679
|
class: "dk:sr-only dk:peer",
|
|
680
680
|
checked: t.modelValue,
|
|
681
681
|
disabled: t.disabled
|
|
682
|
-
},
|
|
683
|
-
|
|
684
|
-
class:
|
|
682
|
+
}, j.$attrs, { onChange: B }), null, 16, Ke),
|
|
683
|
+
p("span", {
|
|
684
|
+
class: m(s.value)
|
|
685
685
|
}, null, 2),
|
|
686
|
-
|
|
687
|
-
class:
|
|
686
|
+
p("span", {
|
|
687
|
+
class: m(C.value)
|
|
688
688
|
}, null, 2)
|
|
689
689
|
]),
|
|
690
690
|
a.value && t.labelPosition === "right" ? (r(), o("span", {
|
|
691
691
|
key: 1,
|
|
692
|
-
class:
|
|
692
|
+
class: m(k.value)
|
|
693
693
|
}, [
|
|
694
|
-
j
|
|
695
|
-
S(
|
|
694
|
+
T(j.$slots, "default", {}, () => [
|
|
695
|
+
V(S(t.label), 1)
|
|
696
696
|
])
|
|
697
|
-
], 2)) :
|
|
697
|
+
], 2)) : w("", !0)
|
|
698
698
|
], 2));
|
|
699
699
|
}
|
|
700
|
-
}),
|
|
700
|
+
}), Ge = `
|
|
701
701
|
dk:px-4
|
|
702
702
|
dk:py-3
|
|
703
703
|
dk:text-sm
|
|
704
704
|
dk:leading-relaxed
|
|
705
705
|
dk:max-w-full
|
|
706
|
-
`,
|
|
706
|
+
`, Dd = /* @__PURE__ */ A({
|
|
707
707
|
__name: "DuiAlert",
|
|
708
708
|
props: {
|
|
709
709
|
variant: {
|
|
@@ -720,14 +720,14 @@ const re = { key: 1 }, oe = `
|
|
|
720
720
|
}
|
|
721
721
|
},
|
|
722
722
|
setup(t) {
|
|
723
|
-
const
|
|
723
|
+
const d = t, e = {
|
|
724
724
|
all: "dk:rounded",
|
|
725
725
|
top: "dk:rounded-t",
|
|
726
726
|
bottom: "dk:rounded-b",
|
|
727
727
|
left: "dk:rounded-l",
|
|
728
728
|
right: "dk:rounded-r",
|
|
729
729
|
none: "dk:rounded-none"
|
|
730
|
-
},
|
|
730
|
+
}, i = {
|
|
731
731
|
solid: {
|
|
732
732
|
base: "",
|
|
733
733
|
neutral: "dk:bg-zinc-200 dk:text-zinc-800 dk:dark:bg-zinc-700 dk:dark:text-zinc-100",
|
|
@@ -755,22 +755,22 @@ const re = { key: 1 }, oe = `
|
|
|
755
755
|
warning: "dk:text-amber-700 dk:dark:text-amber-200 dk:bg-amber-50 dk:dark:bg-amber-800",
|
|
756
756
|
danger: "dk:text-rose-700 dk:dark:text-rose-200 dk:bg-rose-50 dk:dark:bg-rose-800"
|
|
757
757
|
}
|
|
758
|
-
},
|
|
758
|
+
}, f = l(() => {
|
|
759
759
|
var a;
|
|
760
|
-
const
|
|
761
|
-
return [
|
|
760
|
+
const c = ((a = i[d.variant]) == null ? void 0 : a[d.color]) || "", x = i[d.variant].base || "", v = e[d.rounded] || "";
|
|
761
|
+
return [Ge, x, c, v].join(" ");
|
|
762
762
|
});
|
|
763
|
-
return (
|
|
764
|
-
class:
|
|
763
|
+
return (c, x) => (r(), o("div", {
|
|
764
|
+
class: m(f.value),
|
|
765
765
|
role: "alert"
|
|
766
766
|
}, [
|
|
767
|
-
|
|
767
|
+
T(c.$slots, "default")
|
|
768
768
|
], 2));
|
|
769
769
|
}
|
|
770
|
-
}),
|
|
770
|
+
}), Je = { class: "dk:relative dk:overflow-x-auto dk:shadow-md dk:sm:rounded-lg" }, Qe = { class: "dk:w-full dk:text-sm dk:text-left dk:text-gray-700 dk:dark:text-gray-300" }, Xe = { class: "dk:text-xs dk:uppercase dk:bg-gray-100 dk:dark:bg-gray-700 dk:dark:text-gray-200 dk:relative" }, Ye = { key: 0 }, Ze = ["colspan"], Re = {
|
|
771
771
|
key: 0,
|
|
772
772
|
class: "dk:bg-gray-50 dk:dark:bg-gray-700 dk:border-t dk:border-gray-200 dk:dark:border-gray-600"
|
|
773
|
-
},
|
|
773
|
+
}, ed = ["colspan"], dd = { class: "pagination-container" }, td = { class: "pagination-info" }, rd = { class: "pagination-buttons" }, od = { class: "page-numbers" }, ad = ["onClick"], kd = /* @__PURE__ */ A({
|
|
774
774
|
__name: "DuiTable",
|
|
775
775
|
props: {
|
|
776
776
|
columns: {
|
|
@@ -791,102 +791,102 @@ const re = { key: 1 }, oe = `
|
|
|
791
791
|
}
|
|
792
792
|
},
|
|
793
793
|
emits: ["paginate"],
|
|
794
|
-
setup(t, { emit:
|
|
795
|
-
const
|
|
796
|
-
if (!
|
|
797
|
-
const
|
|
798
|
-
let s = Math.max(1, n - Math.floor(a / 2)),
|
|
799
|
-
|
|
800
|
-
for (let
|
|
801
|
-
|
|
802
|
-
return
|
|
803
|
-
}),
|
|
804
|
-
|
|
794
|
+
setup(t, { emit: d }) {
|
|
795
|
+
const e = t, i = d, f = l(() => e.pagination ? Math.ceil(e.pagination.total / e.pagination.perPage) : 0), c = l(() => {
|
|
796
|
+
if (!e.pagination) return [];
|
|
797
|
+
const v = [], a = 5, { page: n } = e.pagination, k = f.value;
|
|
798
|
+
let s = Math.max(1, n - Math.floor(a / 2)), C = Math.min(k, s + a - 1);
|
|
799
|
+
C - s < a - 1 && (s = Math.max(1, C - a + 1));
|
|
800
|
+
for (let B = s; B <= C; B++)
|
|
801
|
+
v.push(B);
|
|
802
|
+
return v;
|
|
803
|
+
}), x = (v) => {
|
|
804
|
+
e.pagination && v >= 1 && v <= f.value && i("paginate", v);
|
|
805
805
|
};
|
|
806
|
-
return (
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
(r(!0), o(
|
|
806
|
+
return (v, a) => (r(), o("div", Je, [
|
|
807
|
+
p("table", Qe, [
|
|
808
|
+
p("thead", Xe, [
|
|
809
|
+
p("tr", null, [
|
|
810
|
+
(r(!0), o(O, null, G(e.columns, (n) => (r(), o("th", {
|
|
811
811
|
key: n.name,
|
|
812
|
-
class:
|
|
813
|
-
},
|
|
812
|
+
class: m(["dk:px-6 dk:py-3", n.classes])
|
|
813
|
+
}, S(n.label), 3))), 128))
|
|
814
814
|
]),
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
colspan:
|
|
815
|
+
e.loading ? (r(), o("tr", Ye, [
|
|
816
|
+
p("td", {
|
|
817
|
+
colspan: e.columns.length,
|
|
818
818
|
class: "dk:p-0"
|
|
819
819
|
}, [...a[2] || (a[2] = [
|
|
820
|
-
|
|
821
|
-
])], 8,
|
|
822
|
-
])) :
|
|
820
|
+
p("div", { class: "loading-bar" }, null, -1)
|
|
821
|
+
])], 8, Ze)
|
|
822
|
+
])) : w("", !0)
|
|
823
823
|
]),
|
|
824
|
-
|
|
825
|
-
class:
|
|
824
|
+
p("tbody", {
|
|
825
|
+
class: m({ "is-loading": e.loading })
|
|
826
826
|
}, [
|
|
827
|
-
(r(!0), o(
|
|
827
|
+
(r(!0), o(O, null, G(e.rows, (n, k) => (r(), o("tr", {
|
|
828
828
|
key: k,
|
|
829
829
|
class: "dk:bg-white dk:border-b dk:border-gray-200 dk:dark:bg-gray-800 dk:dark:border-gray-700 dk:hover:bg-gray-50 dk:dark:hover:bg-gray-600 dk:transition-colors"
|
|
830
830
|
}, [
|
|
831
|
-
(r(!0), o(
|
|
831
|
+
(r(!0), o(O, null, G(e.columns, (s) => (r(), o("td", {
|
|
832
832
|
key: s.name,
|
|
833
833
|
class: "dk:px-6 dk:py-4 dk:text-gray-900 dk:dark:text-gray-100"
|
|
834
834
|
}, [
|
|
835
|
-
|
|
836
|
-
S(
|
|
835
|
+
T(v.$slots, s.name, I({ ref_for: !0 }, n), () => [
|
|
836
|
+
V(S(n[s.name]), 1)
|
|
837
837
|
], !0)
|
|
838
838
|
]))), 128))
|
|
839
839
|
]))), 128))
|
|
840
840
|
], 2),
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
colspan:
|
|
841
|
+
e.pagination ? (r(), o("tfoot", Re, [
|
|
842
|
+
p("tr", null, [
|
|
843
|
+
p("td", {
|
|
844
|
+
colspan: e.columns.length,
|
|
845
845
|
class: "dk:px-6 dk:py-4"
|
|
846
846
|
}, [
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
847
|
+
p("div", dd, [
|
|
848
|
+
p("div", td, " Página " + S(e.pagination.page) + " de " + S(f.value) + " | " + S(e.pagination.total) + " registros ", 1),
|
|
849
|
+
p("div", rd, [
|
|
850
|
+
oe(ie, {
|
|
851
851
|
variant: "outline",
|
|
852
852
|
color: "neutral",
|
|
853
853
|
size: "sm",
|
|
854
|
-
onClick: a[0] || (a[0] = (n) =>
|
|
855
|
-
disabled:
|
|
854
|
+
onClick: a[0] || (a[0] = (n) => x(e.pagination.page - 1)),
|
|
855
|
+
disabled: e.pagination.page === 1
|
|
856
856
|
}, {
|
|
857
|
-
default:
|
|
858
|
-
|
|
857
|
+
default: E(() => [...a[3] || (a[3] = [
|
|
858
|
+
V(" ← Anterior ", -1)
|
|
859
859
|
])]),
|
|
860
860
|
_: 1
|
|
861
861
|
}, 8, ["disabled"]),
|
|
862
|
-
|
|
863
|
-
(r(!0), o(
|
|
862
|
+
p("div", od, [
|
|
863
|
+
(r(!0), o(O, null, G(c.value, (n) => (r(), o("button", {
|
|
864
864
|
key: n,
|
|
865
|
-
onClick: (k) =>
|
|
866
|
-
class:
|
|
867
|
-
},
|
|
865
|
+
onClick: (k) => x(n),
|
|
866
|
+
class: m(["page-number", { active: n === e.pagination.page }])
|
|
867
|
+
}, S(n), 11, ad))), 128))
|
|
868
868
|
]),
|
|
869
|
-
|
|
869
|
+
oe(ie, {
|
|
870
870
|
variant: "outline",
|
|
871
871
|
color: "neutral",
|
|
872
872
|
size: "sm",
|
|
873
|
-
onClick: a[1] || (a[1] = (n) =>
|
|
874
|
-
disabled:
|
|
873
|
+
onClick: a[1] || (a[1] = (n) => x(e.pagination.page + 1)),
|
|
874
|
+
disabled: e.pagination.page === f.value
|
|
875
875
|
}, {
|
|
876
|
-
default:
|
|
877
|
-
|
|
876
|
+
default: E(() => [...a[4] || (a[4] = [
|
|
877
|
+
V(" Siguiente → ", -1)
|
|
878
878
|
])]),
|
|
879
879
|
_: 1
|
|
880
880
|
}, 8, ["disabled"])
|
|
881
881
|
])
|
|
882
882
|
])
|
|
883
|
-
], 8,
|
|
883
|
+
], 8, ed)
|
|
884
884
|
])
|
|
885
|
-
])) :
|
|
885
|
+
])) : w("", !0)
|
|
886
886
|
])
|
|
887
887
|
]));
|
|
888
888
|
}
|
|
889
|
-
}),
|
|
889
|
+
}), Ld = /* @__PURE__ */ ge(kd, [["__scopeId", "data-v-60002528"]]), nd = { key: 1 }, sd = `
|
|
890
890
|
dk:transition
|
|
891
891
|
dk:text-center
|
|
892
892
|
dk:disabled:opacity-50
|
|
@@ -897,7 +897,7 @@ const re = { key: 1 }, oe = `
|
|
|
897
897
|
dk:text-ellipsis
|
|
898
898
|
dk:whitespace-nowrap
|
|
899
899
|
dk:active:scale-95
|
|
900
|
-
dk:max-w-full`,
|
|
900
|
+
dk:max-w-full`, Id = /* @__PURE__ */ A({
|
|
901
901
|
__name: "DuiAction",
|
|
902
902
|
props: {
|
|
903
903
|
variant: { default: "solid" },
|
|
@@ -911,18 +911,18 @@ const re = { key: 1 }, oe = `
|
|
|
911
911
|
nuxt: { type: Boolean, default: !1 }
|
|
912
912
|
},
|
|
913
913
|
setup(t) {
|
|
914
|
-
const
|
|
914
|
+
const d = t, e = l(() => d.to ? ee(d.to, d.nuxt) : "span"), i = l(() => ae(d.to, e.value)), f = {
|
|
915
915
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
916
916
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
917
917
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
918
|
-
},
|
|
918
|
+
}, c = {
|
|
919
919
|
all: "dk:rounded",
|
|
920
920
|
top: "dk:rounded-t",
|
|
921
921
|
bottom: "dk:rounded-b",
|
|
922
922
|
left: "dk:rounded-l",
|
|
923
923
|
right: "dk:rounded-r",
|
|
924
924
|
none: "dk:rounded-none"
|
|
925
|
-
},
|
|
925
|
+
}, x = {
|
|
926
926
|
solid: {
|
|
927
927
|
base: "dk:border-b",
|
|
928
928
|
neutral: `
|
|
@@ -1094,25 +1094,25 @@ const re = { key: 1 }, oe = `
|
|
|
1094
1094
|
dk:dark:text-amber-100
|
|
1095
1095
|
dk:dark:hover:bg-amber-800`
|
|
1096
1096
|
}
|
|
1097
|
-
},
|
|
1098
|
-
var
|
|
1099
|
-
const a = (((
|
|
1100
|
-
return [
|
|
1097
|
+
}, v = l(() => {
|
|
1098
|
+
var C;
|
|
1099
|
+
const a = (((C = x[d.variant]) == null ? void 0 : C[d.color]) || "") + " " + x[d.variant].base, n = f[d.size] || "", k = d.block ? "dk:block" : "dk:inline-block", s = c[d.rounded] || "";
|
|
1100
|
+
return [sd, a, n, k, s].join(" ");
|
|
1101
1101
|
});
|
|
1102
|
-
return (a, n) => (r(),
|
|
1103
|
-
class:
|
|
1104
|
-
title:
|
|
1102
|
+
return (a, n) => (r(), H(K(e.value), I(i.value, {
|
|
1103
|
+
class: v.value,
|
|
1104
|
+
title: d.title
|
|
1105
1105
|
}), {
|
|
1106
|
-
default:
|
|
1107
|
-
|
|
1106
|
+
default: E(() => [
|
|
1107
|
+
d.loading ? (r(), o("span", nd, "Cargando...")) : T(a.$slots, "default", { key: 0 })
|
|
1108
1108
|
]),
|
|
1109
1109
|
_: 3
|
|
1110
1110
|
}, 16, ["class", "title"]));
|
|
1111
1111
|
}
|
|
1112
|
-
}),
|
|
1112
|
+
}), ld = {
|
|
1113
1113
|
key: 0,
|
|
1114
1114
|
class: "dk:relative dk:overflow-hidden dk:rounded-t-lg"
|
|
1115
|
-
},
|
|
1115
|
+
}, id = ["src", "alt"], Wd = /* @__PURE__ */ A({
|
|
1116
1116
|
__name: "DuiCard",
|
|
1117
1117
|
props: {
|
|
1118
1118
|
size: { default: "m" },
|
|
@@ -1123,10 +1123,10 @@ const re = { key: 1 }, oe = `
|
|
|
1123
1123
|
nuxt: { type: Boolean, default: !1 }
|
|
1124
1124
|
},
|
|
1125
1125
|
setup(t) {
|
|
1126
|
-
const
|
|
1127
|
-
const
|
|
1128
|
-
return
|
|
1129
|
-
},
|
|
1126
|
+
const d = t, e = () => d.to ? ee(d.to, d.nuxt) : "div", i = () => d.to ? ee(d.to, d.nuxt) : "h3", f = () => {
|
|
1127
|
+
const z = e();
|
|
1128
|
+
return ae(d.to, z);
|
|
1129
|
+
}, c = {
|
|
1130
1130
|
s: {
|
|
1131
1131
|
padding: "dk:p-3",
|
|
1132
1132
|
spacing: "dk:space-y-2",
|
|
@@ -1148,7 +1148,7 @@ const re = { key: 1 }, oe = `
|
|
|
1148
1148
|
subtitleSize: "dk:text-lg",
|
|
1149
1149
|
contentSize: "dk:text-lg"
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, x = l(() => [
|
|
1152
1152
|
// Glassmorphism card styles (Windows Vista inspired)
|
|
1153
1153
|
"dk:relative dk:bg-gradient-to-br dk:from-white/80 dk:via-white/70 dk:to-gray-50/80",
|
|
1154
1154
|
"dk:dark:from-gray-700/60 dk:dark:via-gray-800/60 dk:dark:to-gray-900/60",
|
|
@@ -1164,114 +1164,571 @@ const re = { key: 1 }, oe = `
|
|
|
1164
1164
|
"dk:before:absolute dk:before:top-0 dk:before:left-0 dk:before:right-0 dk:before:h-0.5",
|
|
1165
1165
|
"dk:before:bg-gradient-to-r dk:before:from-white/60 dk:before:via-white/40 dk:before:to-transparent",
|
|
1166
1166
|
"dk:dark:before:from-white/20 dk:dark:before:via-white/10 dk:dark:before:to-transparent"
|
|
1167
|
-
].join(" ")),
|
|
1167
|
+
].join(" ")), v = l(() => [
|
|
1168
1168
|
"dk:w-full dk:h-48 dk:object-cover",
|
|
1169
1169
|
"dk:relative dk:z-10"
|
|
1170
|
-
].join(" ")), a =
|
|
1171
|
-
const
|
|
1170
|
+
].join(" ")), a = l(() => {
|
|
1171
|
+
const z = c[d.size];
|
|
1172
1172
|
return [
|
|
1173
|
-
|
|
1174
|
-
|
|
1173
|
+
z.padding,
|
|
1174
|
+
z.spacing,
|
|
1175
1175
|
// Glass effect for content wrapper
|
|
1176
1176
|
"dk:relative dk:z-10"
|
|
1177
1177
|
].join(" ");
|
|
1178
|
-
}), n =
|
|
1179
|
-
|
|
1180
|
-
].join(" ")), k =
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1178
|
+
}), n = l(() => [
|
|
1179
|
+
c[d.size].spacing
|
|
1180
|
+
].join(" ")), k = l(() => {
|
|
1181
|
+
const N = [
|
|
1182
|
+
c[d.size].titleSize,
|
|
1183
1183
|
"dk:font-semibold dk:text-gray-900 dk:dark:text-gray-100",
|
|
1184
1184
|
"dk:line-clamp-2"
|
|
1185
1185
|
];
|
|
1186
|
-
return
|
|
1186
|
+
return d.to && N.push(
|
|
1187
1187
|
"dk:no-underline dk:hover:underline dk:transition-colors",
|
|
1188
1188
|
"dk:hover:text-blue-600 dk:dark:hover:text-blue-400"
|
|
1189
|
-
),
|
|
1190
|
-
}), s =
|
|
1191
|
-
const
|
|
1189
|
+
), N.join(" ");
|
|
1190
|
+
}), s = l(() => {
|
|
1191
|
+
const z = [
|
|
1192
1192
|
"dk:block",
|
|
1193
1193
|
"dk:transition-transform dk:duration-300",
|
|
1194
1194
|
"dk:hover:scale-105",
|
|
1195
1195
|
"dk:relative dk:z-10"
|
|
1196
1196
|
];
|
|
1197
|
-
return
|
|
1198
|
-
}),
|
|
1199
|
-
|
|
1197
|
+
return d.to && z.push("dk:no-underline"), z.join(" ");
|
|
1198
|
+
}), C = l(() => [
|
|
1199
|
+
c[d.size].subtitleSize,
|
|
1200
1200
|
"dk:text-gray-600 dk:dark:text-gray-400",
|
|
1201
1201
|
"dk:line-clamp-3"
|
|
1202
|
-
].join(" ")),
|
|
1203
|
-
|
|
1202
|
+
].join(" ")), B = l(() => [
|
|
1203
|
+
c[d.size].contentSize,
|
|
1204
1204
|
"dk:text-gray-700 dk:dark:text-gray-300"
|
|
1205
|
-
].join(" ")),
|
|
1205
|
+
].join(" ")), j = l(() => [
|
|
1206
1206
|
"dk:border-t dk:border-gray-300/40 dk:dark:border-white/10",
|
|
1207
1207
|
"dk:pt-3 dk:mt-3",
|
|
1208
1208
|
"dk:relative dk:z-10"
|
|
1209
1209
|
].join(" "));
|
|
1210
|
-
return (
|
|
1211
|
-
class:
|
|
1210
|
+
return (z, N) => (r(), o("div", {
|
|
1211
|
+
class: m(x.value)
|
|
1212
1212
|
}, [
|
|
1213
|
-
t.image ? (r(), o("div",
|
|
1214
|
-
(r(),
|
|
1215
|
-
default:
|
|
1216
|
-
|
|
1213
|
+
t.image ? (r(), o("div", ld, [
|
|
1214
|
+
(r(), H(K(e()), I(f(), { class: s.value }), {
|
|
1215
|
+
default: E(() => [
|
|
1216
|
+
p("img", {
|
|
1217
1217
|
src: t.image,
|
|
1218
1218
|
alt: t.title || "Card image",
|
|
1219
|
-
class:
|
|
1220
|
-
}, null, 10,
|
|
1219
|
+
class: m(v.value)
|
|
1220
|
+
}, null, 10, id)
|
|
1221
1221
|
]),
|
|
1222
1222
|
_: 1
|
|
1223
1223
|
}, 16, ["class"]))
|
|
1224
|
-
])) :
|
|
1225
|
-
|
|
1226
|
-
class:
|
|
1224
|
+
])) : w("", !0),
|
|
1225
|
+
p("div", {
|
|
1226
|
+
class: m(a.value)
|
|
1227
1227
|
}, [
|
|
1228
1228
|
t.title || t.subtitle ? (r(), o("div", {
|
|
1229
1229
|
key: 0,
|
|
1230
|
-
class:
|
|
1230
|
+
class: m(n.value)
|
|
1231
1231
|
}, [
|
|
1232
|
-
t.title ? (r(),
|
|
1233
|
-
default:
|
|
1234
|
-
S(
|
|
1232
|
+
t.title ? (r(), H(K(i()), I({ key: 0 }, f(), { class: k.value }), {
|
|
1233
|
+
default: E(() => [
|
|
1234
|
+
V(S(t.title), 1)
|
|
1235
1235
|
]),
|
|
1236
1236
|
_: 1
|
|
1237
|
-
}, 16, ["class"])) :
|
|
1237
|
+
}, 16, ["class"])) : w("", !0),
|
|
1238
1238
|
t.subtitle ? (r(), o("p", {
|
|
1239
1239
|
key: 1,
|
|
1240
|
-
class:
|
|
1241
|
-
},
|
|
1242
|
-
], 2)) :
|
|
1243
|
-
|
|
1240
|
+
class: m(C.value)
|
|
1241
|
+
}, S(t.subtitle), 3)) : w("", !0)
|
|
1242
|
+
], 2)) : w("", !0),
|
|
1243
|
+
z.$slots.default ? (r(), o("div", {
|
|
1244
1244
|
key: 1,
|
|
1245
|
-
class:
|
|
1245
|
+
class: m(B.value)
|
|
1246
1246
|
}, [
|
|
1247
|
-
|
|
1248
|
-
], 2)) :
|
|
1249
|
-
|
|
1247
|
+
T(z.$slots, "default")
|
|
1248
|
+
], 2)) : w("", !0),
|
|
1249
|
+
z.$slots.footer ? (r(), o("div", {
|
|
1250
1250
|
key: 2,
|
|
1251
|
-
class:
|
|
1251
|
+
class: m(j.value)
|
|
1252
1252
|
}, [
|
|
1253
|
-
|
|
1254
|
-
], 2)) :
|
|
1253
|
+
T(z.$slots, "footer")
|
|
1254
|
+
], 2)) : w("", !0)
|
|
1255
1255
|
], 2)
|
|
1256
1256
|
], 2));
|
|
1257
1257
|
}
|
|
1258
|
-
}),
|
|
1258
|
+
}), ud = ["aria-labelledby", "aria-describedby"], Ed = /* @__PURE__ */ A({
|
|
1259
|
+
__name: "DuiModal",
|
|
1260
|
+
props: {
|
|
1261
|
+
modelValue: { type: Boolean, default: !1 },
|
|
1262
|
+
title: { default: void 0 },
|
|
1263
|
+
description: { default: void 0 },
|
|
1264
|
+
size: { default: "md" },
|
|
1265
|
+
variant: { default: "solid" },
|
|
1266
|
+
color: { default: "neutral" },
|
|
1267
|
+
rounded: { default: "all" },
|
|
1268
|
+
showClose: { type: Boolean, default: !0 },
|
|
1269
|
+
closeOnBackdrop: { type: Boolean, default: !0 },
|
|
1270
|
+
closeOnEsc: { type: Boolean, default: !0 },
|
|
1271
|
+
persistent: { type: Boolean, default: !1 },
|
|
1272
|
+
centered: { type: Boolean, default: !0 },
|
|
1273
|
+
scrollable: { type: Boolean, default: !0 },
|
|
1274
|
+
blurBackdrop: { type: Boolean, default: !0 },
|
|
1275
|
+
zIndex: { default: 50 }
|
|
1276
|
+
},
|
|
1277
|
+
emits: ["update:modelValue", "open", "close", "backdrop", "escape"],
|
|
1278
|
+
setup(t, { emit: d }) {
|
|
1279
|
+
const e = t, i = d, f = Math.random().toString(36).slice(2, 10), c = `dui-modal-title-${f}`, x = `dui-modal-description-${f}`, v = {
|
|
1280
|
+
all: "dk:rounded-xl",
|
|
1281
|
+
top: "dk:rounded-t-xl",
|
|
1282
|
+
bottom: "dk:rounded-b-xl",
|
|
1283
|
+
left: "dk:rounded-l-xl",
|
|
1284
|
+
right: "dk:rounded-r-xl",
|
|
1285
|
+
none: "dk:rounded-none"
|
|
1286
|
+
}, a = {
|
|
1287
|
+
xs: "dk:w-full dk:max-w-xs",
|
|
1288
|
+
sm: "dk:w-full dk:max-w-md",
|
|
1289
|
+
md: "dk:w-full dk:max-w-xl",
|
|
1290
|
+
lg: "dk:w-full dk:max-w-3xl",
|
|
1291
|
+
xl: "dk:w-full dk:max-w-5xl",
|
|
1292
|
+
full: "dk:h-[calc(100vh-2rem)] dk:w-[calc(100vw-2rem)] dk:max-w-none"
|
|
1293
|
+
}, n = {
|
|
1294
|
+
solid: {
|
|
1295
|
+
base: "dk:border dk:shadow-xl",
|
|
1296
|
+
neutral: "dk:bg-white dk:text-zinc-900 dk:border-zinc-200 dk:dark:bg-zinc-900 dk:dark:text-zinc-100 dk:dark:border-zinc-700",
|
|
1297
|
+
primary: "dk:bg-slate-50 dk:text-slate-900 dk:border-slate-200 dk:dark:bg-slate-900 dk:dark:text-slate-100 dk:dark:border-slate-700",
|
|
1298
|
+
secondary: "dk:bg-pink-50 dk:text-pink-900 dk:border-pink-200 dk:dark:bg-pink-900 dk:dark:text-pink-100 dk:dark:border-pink-700",
|
|
1299
|
+
success: "dk:bg-emerald-50 dk:text-emerald-900 dk:border-emerald-200 dk:dark:bg-emerald-900 dk:dark:text-emerald-100 dk:dark:border-emerald-700",
|
|
1300
|
+
warning: "dk:bg-amber-50 dk:text-amber-900 dk:border-amber-200 dk:dark:bg-amber-900 dk:dark:text-amber-100 dk:dark:border-amber-700",
|
|
1301
|
+
danger: "dk:bg-rose-50 dk:text-rose-900 dk:border-rose-200 dk:dark:bg-rose-900 dk:dark:text-rose-100 dk:dark:border-rose-700"
|
|
1302
|
+
},
|
|
1303
|
+
outline: {
|
|
1304
|
+
base: "dk:border-2 dk:shadow-lg dk:bg-white/95 dk:dark:bg-zinc-900/95",
|
|
1305
|
+
neutral: "dk:text-zinc-900 dk:border-zinc-300 dk:dark:text-zinc-100 dk:dark:border-zinc-600",
|
|
1306
|
+
primary: "dk:text-slate-900 dk:border-slate-400 dk:dark:text-slate-100 dk:dark:border-slate-500",
|
|
1307
|
+
secondary: "dk:text-pink-900 dk:border-pink-400 dk:dark:text-pink-100 dk:dark:border-pink-500",
|
|
1308
|
+
success: "dk:text-emerald-900 dk:border-emerald-400 dk:dark:text-emerald-100 dk:dark:border-emerald-500",
|
|
1309
|
+
warning: "dk:text-amber-900 dk:border-amber-400 dk:dark:text-amber-100 dk:dark:border-amber-500",
|
|
1310
|
+
danger: "dk:text-rose-900 dk:border-rose-400 dk:dark:text-rose-100 dk:dark:border-rose-500"
|
|
1311
|
+
},
|
|
1312
|
+
ghost: {
|
|
1313
|
+
base: "dk:border dk:shadow-xl dk:backdrop-blur-md",
|
|
1314
|
+
neutral: "dk:bg-white/85 dk:text-zinc-900 dk:border-zinc-300/70 dk:dark:bg-zinc-900/75 dk:dark:text-zinc-100 dk:dark:border-zinc-600/60",
|
|
1315
|
+
primary: "dk:bg-slate-100/85 dk:text-slate-900 dk:border-slate-300/70 dk:dark:bg-slate-900/70 dk:dark:text-slate-100 dk:dark:border-slate-600/60",
|
|
1316
|
+
secondary: "dk:bg-pink-100/85 dk:text-pink-900 dk:border-pink-300/70 dk:dark:bg-pink-900/70 dk:dark:text-pink-100 dk:dark:border-pink-600/60",
|
|
1317
|
+
success: "dk:bg-emerald-100/85 dk:text-emerald-900 dk:border-emerald-300/70 dk:dark:bg-emerald-900/70 dk:dark:text-emerald-100 dk:dark:border-emerald-600/60",
|
|
1318
|
+
warning: "dk:bg-amber-100/85 dk:text-amber-900 dk:border-amber-300/70 dk:dark:bg-amber-900/70 dk:dark:text-amber-100 dk:dark:border-amber-600/60",
|
|
1319
|
+
danger: "dk:bg-rose-100/85 dk:text-rose-900 dk:border-rose-300/70 dk:dark:bg-rose-900/70 dk:dark:text-rose-100 dk:dark:border-rose-600/60"
|
|
1320
|
+
}
|
|
1321
|
+
}, k = l(() => [
|
|
1322
|
+
"dk:fixed dk:inset-0 dk:bg-black/55",
|
|
1323
|
+
e.blurBackdrop ? "dk:backdrop-blur-[2px]" : ""
|
|
1324
|
+
].join(" ")), s = l(() => [
|
|
1325
|
+
"dk:flex dk:min-h-full dk:w-full dk:p-4",
|
|
1326
|
+
e.centered ? "dk:items-center" : "dk:items-start dk:pt-8",
|
|
1327
|
+
"dk:justify-center"
|
|
1328
|
+
].join(" ")), C = l(() => {
|
|
1329
|
+
const $ = n[e.variant].base, M = n[e.variant][e.color], D = v[e.rounded], Y = a[e.size];
|
|
1330
|
+
return [
|
|
1331
|
+
"dk:relative dk:flex dk:flex-col dk:overflow-hidden",
|
|
1332
|
+
$,
|
|
1333
|
+
M,
|
|
1334
|
+
D,
|
|
1335
|
+
Y
|
|
1336
|
+
].join(" ");
|
|
1337
|
+
}), B = l(() => [
|
|
1338
|
+
"dk:flex dk:items-start dk:justify-between dk:gap-3 dk:px-5 dk:pt-5 dk:pb-3",
|
|
1339
|
+
"dk:border-b dk:border-current/10"
|
|
1340
|
+
].join(" ")), j = l(() => [
|
|
1341
|
+
"dk:px-5 dk:py-4",
|
|
1342
|
+
e.scrollable ? "dk:max-h-[65vh] dk:overflow-y-auto" : ""
|
|
1343
|
+
].join(" ")), z = l(() => [
|
|
1344
|
+
"dk:px-5 dk:py-4 dk:border-t dk:border-current/10",
|
|
1345
|
+
"dk:flex dk:items-center dk:justify-end dk:gap-2"
|
|
1346
|
+
].join(" "));
|
|
1347
|
+
function N() {
|
|
1348
|
+
if (typeof document > "u") return;
|
|
1349
|
+
const $ = document.body, D = Number($.dataset.duiModalCount || "0") + 1;
|
|
1350
|
+
$.dataset.duiModalCount = String(D), D === 1 && ($.style.overflow = "hidden");
|
|
1351
|
+
}
|
|
1352
|
+
function y() {
|
|
1353
|
+
if (typeof document > "u") return;
|
|
1354
|
+
const $ = document.body, M = Number($.dataset.duiModalCount || "0"), D = Math.max(0, M - 1);
|
|
1355
|
+
$.dataset.duiModalCount = String(D), D === 0 && ($.style.overflow = "");
|
|
1356
|
+
}
|
|
1357
|
+
function P($) {
|
|
1358
|
+
i("update:modelValue", !1), i("close", $);
|
|
1359
|
+
}
|
|
1360
|
+
function g() {
|
|
1361
|
+
i("backdrop"), !(e.persistent || !e.closeOnBackdrop) && P("backdrop");
|
|
1362
|
+
}
|
|
1363
|
+
function _($) {
|
|
1364
|
+
$.key !== "Escape" || !e.modelValue || (i("escape"), !(e.persistent || !e.closeOnEsc) && P("escape"));
|
|
1365
|
+
}
|
|
1366
|
+
return re(
|
|
1367
|
+
() => e.modelValue,
|
|
1368
|
+
($, M) => {
|
|
1369
|
+
$ && !M && (N(), i("open")), !$ && M && y();
|
|
1370
|
+
}
|
|
1371
|
+
), ue(() => {
|
|
1372
|
+
e.modelValue && N(), typeof window < "u" && window.addEventListener("keydown", _);
|
|
1373
|
+
}), ce(() => {
|
|
1374
|
+
e.modelValue && y(), typeof window < "u" && window.removeEventListener("keydown", _);
|
|
1375
|
+
}), ($, M) => (r(), H(be, { to: "body" }, [
|
|
1376
|
+
oe(pe, {
|
|
1377
|
+
"enter-active-class": "dk:transition-opacity dk:duration-200",
|
|
1378
|
+
"leave-active-class": "dk:transition-opacity dk:duration-200",
|
|
1379
|
+
"enter-from-class": "dk:opacity-0",
|
|
1380
|
+
"leave-to-class": "dk:opacity-0"
|
|
1381
|
+
}, {
|
|
1382
|
+
default: E(() => [
|
|
1383
|
+
e.modelValue ? (r(), o("div", {
|
|
1384
|
+
key: 0,
|
|
1385
|
+
style: fe({ zIndex: String(e.zIndex) }),
|
|
1386
|
+
class: m(k.value),
|
|
1387
|
+
onClick: g
|
|
1388
|
+
}, [
|
|
1389
|
+
p("div", {
|
|
1390
|
+
class: m(s.value)
|
|
1391
|
+
}, [
|
|
1392
|
+
p("div", {
|
|
1393
|
+
role: "dialog",
|
|
1394
|
+
"aria-modal": "true",
|
|
1395
|
+
"aria-labelledby": e.title ? c : void 0,
|
|
1396
|
+
"aria-describedby": e.description ? x : void 0,
|
|
1397
|
+
class: m(C.value),
|
|
1398
|
+
onClick: M[1] || (M[1] = Be(() => {
|
|
1399
|
+
}, ["stop"]))
|
|
1400
|
+
}, [
|
|
1401
|
+
$.$slots.header || e.title || e.description || e.showClose ? (r(), o("header", {
|
|
1402
|
+
key: 0,
|
|
1403
|
+
class: m(B.value)
|
|
1404
|
+
}, [
|
|
1405
|
+
p("div", null, [
|
|
1406
|
+
T($.$slots, "header", {}, () => [
|
|
1407
|
+
e.title ? (r(), o("h2", {
|
|
1408
|
+
key: 0,
|
|
1409
|
+
id: c,
|
|
1410
|
+
class: "dk:text-lg dk:font-semibold"
|
|
1411
|
+
}, S(e.title), 1)) : w("", !0),
|
|
1412
|
+
e.description ? (r(), o("p", {
|
|
1413
|
+
key: 1,
|
|
1414
|
+
id: x,
|
|
1415
|
+
class: "dk:mt-1 dk:text-sm dk:opacity-80"
|
|
1416
|
+
}, S(e.description), 1)) : w("", !0)
|
|
1417
|
+
])
|
|
1418
|
+
]),
|
|
1419
|
+
e.showClose ? (r(), o("button", {
|
|
1420
|
+
key: 0,
|
|
1421
|
+
type: "button",
|
|
1422
|
+
class: "dk:inline-flex dk:h-8 dk:w-8 dk:items-center dk:justify-center dk:rounded dk:text-current dk:opacity-70 dk:transition-opacity dk:hover:opacity-100 dk:focus-visible:opacity-100 dk:outline-none dk:ring-2 dk:ring-current/30",
|
|
1423
|
+
"aria-label": "Cerrar modal",
|
|
1424
|
+
onClick: M[0] || (M[0] = (D) => P("button"))
|
|
1425
|
+
}, [...M[2] || (M[2] = [
|
|
1426
|
+
p("span", { "aria-hidden": "true" }, "×", -1)
|
|
1427
|
+
])])) : w("", !0)
|
|
1428
|
+
], 2)) : w("", !0),
|
|
1429
|
+
p("section", {
|
|
1430
|
+
class: m(j.value)
|
|
1431
|
+
}, [
|
|
1432
|
+
T($.$slots, "default")
|
|
1433
|
+
], 2),
|
|
1434
|
+
$.$slots.footer ? (r(), o("footer", {
|
|
1435
|
+
key: 1,
|
|
1436
|
+
class: m(z.value)
|
|
1437
|
+
}, [
|
|
1438
|
+
T($.$slots, "footer")
|
|
1439
|
+
], 2)) : w("", !0)
|
|
1440
|
+
], 10, ud)
|
|
1441
|
+
], 2)
|
|
1442
|
+
], 6)) : w("", !0)
|
|
1443
|
+
]),
|
|
1444
|
+
_: 3
|
|
1445
|
+
})
|
|
1446
|
+
]));
|
|
1447
|
+
}
|
|
1448
|
+
}), cd = ["aria-describedby"], bd = { class: "dk:inline-flex dk:items-center" }, Ad = /* @__PURE__ */ A({
|
|
1449
|
+
__name: "DuiTooltip",
|
|
1450
|
+
props: {
|
|
1451
|
+
modelValue: { type: Boolean, default: void 0 },
|
|
1452
|
+
text: { default: "" },
|
|
1453
|
+
fallbackTriggerText: { default: "Tooltip" },
|
|
1454
|
+
trigger: { default: "hover" },
|
|
1455
|
+
placement: { default: "top" },
|
|
1456
|
+
variant: { default: "solid" },
|
|
1457
|
+
color: { default: "neutral" },
|
|
1458
|
+
size: { default: "md" },
|
|
1459
|
+
rounded: { default: "all" },
|
|
1460
|
+
disabled: { type: Boolean, default: !1 },
|
|
1461
|
+
interactive: { type: Boolean, default: !0 },
|
|
1462
|
+
arrow: { type: Boolean, default: !0 },
|
|
1463
|
+
showDelay: { default: 120 },
|
|
1464
|
+
hideDelay: { default: 90 },
|
|
1465
|
+
offset: { default: 10 },
|
|
1466
|
+
zIndex: { default: 60 },
|
|
1467
|
+
flip: { type: Boolean, default: !0 },
|
|
1468
|
+
viewportPadding: { default: 8 },
|
|
1469
|
+
maxWidth: { default: "md" },
|
|
1470
|
+
teleportTo: { default: "body" }
|
|
1471
|
+
},
|
|
1472
|
+
emits: ["update:modelValue", "open", "close"],
|
|
1473
|
+
setup(t, { emit: d }) {
|
|
1474
|
+
const e = t, i = d, f = Q(null), c = Q(null), x = Q(!1), v = l(() => e.modelValue !== void 0), a = l(() => v.value ? !!e.modelValue : x.value), n = Q(e.placement), k = Q({ top: 0, left: 0 }), s = Q(!1);
|
|
1475
|
+
let C = null, B = null;
|
|
1476
|
+
const j = `dui-tooltip-${Math.random().toString(36).slice(2, 10)}`, z = {
|
|
1477
|
+
all: "dk:rounded-md",
|
|
1478
|
+
top: "dk:rounded-t-md",
|
|
1479
|
+
bottom: "dk:rounded-b-md",
|
|
1480
|
+
left: "dk:rounded-l-md",
|
|
1481
|
+
right: "dk:rounded-r-md",
|
|
1482
|
+
none: "dk:rounded-none"
|
|
1483
|
+
}, N = {
|
|
1484
|
+
sm: "dk:px-2 dk:py-1 dk:text-xs",
|
|
1485
|
+
md: "dk:px-2.5 dk:py-1.5 dk:text-sm",
|
|
1486
|
+
lg: "dk:px-3 dk:py-2 dk:text-base"
|
|
1487
|
+
}, y = {
|
|
1488
|
+
xs: "dk:max-w-40",
|
|
1489
|
+
sm: "dk:max-w-56",
|
|
1490
|
+
md: "dk:max-w-72",
|
|
1491
|
+
lg: "dk:max-w-96",
|
|
1492
|
+
full: "dk:max-w-[min(92vw,42rem)]"
|
|
1493
|
+
};
|
|
1494
|
+
function P(b) {
|
|
1495
|
+
return typeof b == "string" && b in y;
|
|
1496
|
+
}
|
|
1497
|
+
const g = {
|
|
1498
|
+
solid: {
|
|
1499
|
+
base: "dk:border dk:shadow-lg",
|
|
1500
|
+
neutral: "dk:bg-zinc-900 dk:text-zinc-100 dk:border-zinc-700 dk:dark:bg-zinc-200 dk:dark:text-zinc-900 dk:dark:border-zinc-300",
|
|
1501
|
+
primary: "dk:bg-slate-900 dk:text-slate-100 dk:border-slate-700 dk:dark:bg-slate-200 dk:dark:text-slate-900 dk:dark:border-slate-300",
|
|
1502
|
+
secondary: "dk:bg-pink-900 dk:text-pink-100 dk:border-pink-700 dk:dark:bg-pink-200 dk:dark:text-pink-900 dk:dark:border-pink-300",
|
|
1503
|
+
success: "dk:bg-emerald-900 dk:text-emerald-100 dk:border-emerald-700 dk:dark:bg-emerald-200 dk:dark:text-emerald-900 dk:dark:border-emerald-300",
|
|
1504
|
+
warning: "dk:bg-amber-900 dk:text-amber-100 dk:border-amber-700 dk:dark:bg-amber-200 dk:dark:text-amber-900 dk:dark:border-amber-300",
|
|
1505
|
+
danger: "dk:bg-rose-900 dk:text-rose-100 dk:border-rose-700 dk:dark:bg-rose-200 dk:dark:text-rose-900 dk:dark:border-rose-300"
|
|
1506
|
+
},
|
|
1507
|
+
outline: {
|
|
1508
|
+
base: "dk:border dk:shadow-md dk:bg-white/95 dk:dark:bg-zinc-900/95",
|
|
1509
|
+
neutral: "dk:text-zinc-900 dk:border-zinc-300 dk:dark:text-zinc-100 dk:dark:border-zinc-600",
|
|
1510
|
+
primary: "dk:text-slate-900 dk:border-slate-400 dk:dark:text-slate-100 dk:dark:border-slate-500",
|
|
1511
|
+
secondary: "dk:text-pink-900 dk:border-pink-400 dk:dark:text-pink-100 dk:dark:border-pink-500",
|
|
1512
|
+
success: "dk:text-emerald-900 dk:border-emerald-400 dk:dark:text-emerald-100 dk:dark:border-emerald-500",
|
|
1513
|
+
warning: "dk:text-amber-900 dk:border-amber-400 dk:dark:text-amber-100 dk:dark:border-amber-500",
|
|
1514
|
+
danger: "dk:text-rose-900 dk:border-rose-400 dk:dark:text-rose-100 dk:dark:border-rose-500"
|
|
1515
|
+
}
|
|
1516
|
+
}, _ = l(() => {
|
|
1517
|
+
const b = z[e.rounded], u = N[e.size], h = g[e.variant].base, W = g[e.variant][e.color], L = P(e.maxWidth) ? y[e.maxWidth] : "";
|
|
1518
|
+
return [
|
|
1519
|
+
"dk:fixed dk:pointer-events-auto dk:leading-tight dk:select-text dk:cursor-default",
|
|
1520
|
+
"dk:break-words dk:whitespace-normal",
|
|
1521
|
+
b,
|
|
1522
|
+
u,
|
|
1523
|
+
h,
|
|
1524
|
+
W,
|
|
1525
|
+
L
|
|
1526
|
+
].join(" ");
|
|
1527
|
+
}), $ = l(() => {
|
|
1528
|
+
const b = {
|
|
1529
|
+
top: `${k.value.top}px`,
|
|
1530
|
+
left: `${k.value.left}px`,
|
|
1531
|
+
zIndex: String(e.zIndex)
|
|
1532
|
+
};
|
|
1533
|
+
return typeof e.maxWidth == "number" ? b.maxWidth = `${e.maxWidth}px` : typeof e.maxWidth == "string" && !P(e.maxWidth) && (b.maxWidth = e.maxWidth), b;
|
|
1534
|
+
}), M = l(() => {
|
|
1535
|
+
const b = g[e.variant][e.color], u = n.value, h = {
|
|
1536
|
+
top: "dk:-bottom-1.5 dk:left-1/2 dk:-translate-x-1/2 dk:rotate-45",
|
|
1537
|
+
"top-start": "dk:-bottom-1.5 dk:left-3 dk:rotate-45",
|
|
1538
|
+
"top-end": "dk:-bottom-1.5 dk:right-3 dk:rotate-45",
|
|
1539
|
+
bottom: "dk:-top-1.5 dk:left-1/2 dk:-translate-x-1/2 dk:rotate-45",
|
|
1540
|
+
"bottom-start": "dk:-top-1.5 dk:left-3 dk:rotate-45",
|
|
1541
|
+
"bottom-end": "dk:-top-1.5 dk:right-3 dk:rotate-45",
|
|
1542
|
+
left: "dk:-right-1.5 dk:top-1/2 dk:-translate-y-1/2 dk:rotate-45",
|
|
1543
|
+
"left-start": "dk:-right-1.5 dk:top-3 dk:rotate-45",
|
|
1544
|
+
"left-end": "dk:-right-1.5 dk:bottom-3 dk:rotate-45",
|
|
1545
|
+
right: "dk:-left-1.5 dk:top-1/2 dk:-translate-y-1/2 dk:rotate-45",
|
|
1546
|
+
"right-start": "dk:-left-1.5 dk:top-3 dk:rotate-45",
|
|
1547
|
+
"right-end": "dk:-left-1.5 dk:bottom-3 dk:rotate-45"
|
|
1548
|
+
};
|
|
1549
|
+
return [
|
|
1550
|
+
"dk:absolute dk:block dk:h-3 dk:w-3",
|
|
1551
|
+
b,
|
|
1552
|
+
h[u] || h.top
|
|
1553
|
+
].join(" ");
|
|
1554
|
+
});
|
|
1555
|
+
function D() {
|
|
1556
|
+
C && (clearTimeout(C), C = null), B && (clearTimeout(B), B = null);
|
|
1557
|
+
}
|
|
1558
|
+
function Y(b, u) {
|
|
1559
|
+
e.disabled || (v.value ? i("update:modelValue", b) : x.value = b, b ? (i("open", u), te(() => {
|
|
1560
|
+
J();
|
|
1561
|
+
})) : i("close", u));
|
|
1562
|
+
}
|
|
1563
|
+
function R(b) {
|
|
1564
|
+
D(), C = setTimeout(() => {
|
|
1565
|
+
Y(!0, b);
|
|
1566
|
+
}, Math.max(0, e.showDelay));
|
|
1567
|
+
}
|
|
1568
|
+
function X(b) {
|
|
1569
|
+
D(), B = setTimeout(() => {
|
|
1570
|
+
b === "hover" && e.interactive && s.value || Y(!1, b);
|
|
1571
|
+
}, Math.max(0, e.hideDelay));
|
|
1572
|
+
}
|
|
1573
|
+
function ke(b) {
|
|
1574
|
+
return {
|
|
1575
|
+
top: "bottom",
|
|
1576
|
+
"top-start": "bottom-start",
|
|
1577
|
+
"top-end": "bottom-end",
|
|
1578
|
+
bottom: "top",
|
|
1579
|
+
"bottom-start": "top-start",
|
|
1580
|
+
"bottom-end": "top-end",
|
|
1581
|
+
left: "right",
|
|
1582
|
+
"left-start": "right-start",
|
|
1583
|
+
"left-end": "right-end",
|
|
1584
|
+
right: "left",
|
|
1585
|
+
"right-start": "left-start",
|
|
1586
|
+
"right-end": "left-end"
|
|
1587
|
+
}[b];
|
|
1588
|
+
}
|
|
1589
|
+
function Z(b, u, h) {
|
|
1590
|
+
const [W, L] = b.split("-"), U = e.offset;
|
|
1591
|
+
let F = 0, q = 0;
|
|
1592
|
+
W === "top" && (F = u.top - h.height - U, L === "start" ? q = u.left : L === "end" ? q = u.right - h.width : q = u.left + u.width / 2 - h.width / 2), W === "bottom" && (F = u.bottom + U, L === "start" ? q = u.left : L === "end" ? q = u.right - h.width : q = u.left + u.width / 2 - h.width / 2), W === "left" && (q = u.left - h.width - U, L === "start" ? F = u.top : L === "end" ? F = u.bottom - h.height : F = u.top + u.height / 2 - h.height / 2), W === "right" && (q = u.right + U, L === "start" ? F = u.top : L === "end" ? F = u.bottom - h.height : F = u.top + u.height / 2 - h.height / 2);
|
|
1593
|
+
const de = e.viewportPadding, $e = window.innerWidth, Se = window.innerHeight;
|
|
1594
|
+
return F = Math.min(Math.max(de, F), Se - h.height - de), q = Math.min(Math.max(de, q), $e - h.width - de), { top: F, left: q };
|
|
1595
|
+
}
|
|
1596
|
+
function me(b, u, h) {
|
|
1597
|
+
if (!e.flip) return !1;
|
|
1598
|
+
const [W] = b.split("-"), L = e.offset, U = e.viewportPadding;
|
|
1599
|
+
return W === "top" ? u.top - h.height - L < U : W === "bottom" ? u.bottom + h.height + L > window.innerHeight - U : W === "left" ? u.left - h.width - L < U : u.right + h.width + L > window.innerWidth - U;
|
|
1600
|
+
}
|
|
1601
|
+
function J() {
|
|
1602
|
+
if (!f.value || !c.value) return;
|
|
1603
|
+
const b = f.value.getBoundingClientRect(), u = c.value.getBoundingClientRect();
|
|
1604
|
+
let h = e.placement;
|
|
1605
|
+
me(h, b, u) && (h = ke(h)), n.value = h, k.value = Z(h, b, u);
|
|
1606
|
+
}
|
|
1607
|
+
function he() {
|
|
1608
|
+
e.trigger === "hover" && R("hover");
|
|
1609
|
+
}
|
|
1610
|
+
function ve(b) {
|
|
1611
|
+
var u;
|
|
1612
|
+
if (e.trigger === "hover") {
|
|
1613
|
+
if (e.interactive) {
|
|
1614
|
+
const h = b.relatedTarget;
|
|
1615
|
+
if (h && ((u = c.value) != null && u.contains(h)))
|
|
1616
|
+
return;
|
|
1617
|
+
}
|
|
1618
|
+
X("hover");
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
function xe() {
|
|
1622
|
+
e.trigger !== "focus" && e.trigger !== "hover" || R("focus");
|
|
1623
|
+
}
|
|
1624
|
+
function ye() {
|
|
1625
|
+
e.trigger !== "focus" && e.trigger !== "hover" || X("focus");
|
|
1626
|
+
}
|
|
1627
|
+
function we(b) {
|
|
1628
|
+
e.trigger === "click" && (b.stopPropagation(), a.value ? X("click") : R("click"));
|
|
1629
|
+
}
|
|
1630
|
+
function ze() {
|
|
1631
|
+
e.interactive && (s.value = !0, D());
|
|
1632
|
+
}
|
|
1633
|
+
function Ce(b) {
|
|
1634
|
+
var h;
|
|
1635
|
+
if (!e.interactive) return;
|
|
1636
|
+
const u = b.relatedTarget;
|
|
1637
|
+
u && ((h = f.value) != null && h.contains(u)) || (s.value = !1, X("hover"));
|
|
1638
|
+
}
|
|
1639
|
+
function le(b) {
|
|
1640
|
+
var h, W;
|
|
1641
|
+
if (e.trigger !== "click" || !a.value) return;
|
|
1642
|
+
const u = b.target;
|
|
1643
|
+
(h = f.value) != null && h.contains(u) || (W = c.value) != null && W.contains(u) || X("outside");
|
|
1644
|
+
}
|
|
1645
|
+
return re(
|
|
1646
|
+
() => e.modelValue,
|
|
1647
|
+
(b) => {
|
|
1648
|
+
v.value && b && te(J);
|
|
1649
|
+
}
|
|
1650
|
+
), re(
|
|
1651
|
+
() => e.placement,
|
|
1652
|
+
() => {
|
|
1653
|
+
a.value && te(J);
|
|
1654
|
+
}
|
|
1655
|
+
), re(a, (b) => {
|
|
1656
|
+
b && te(J);
|
|
1657
|
+
}), ue(() => {
|
|
1658
|
+
typeof window > "u" || (window.addEventListener("resize", J), window.addEventListener("scroll", J, !0), window.addEventListener("click", le));
|
|
1659
|
+
}), ce(() => {
|
|
1660
|
+
D(), !(typeof window > "u") && (window.removeEventListener("resize", J), window.removeEventListener("scroll", J, !0), window.removeEventListener("click", le));
|
|
1661
|
+
}), (b, u) => (r(), o(O, null, [
|
|
1662
|
+
p("span", {
|
|
1663
|
+
ref_key: "triggerRef",
|
|
1664
|
+
ref: f,
|
|
1665
|
+
class: "dk:relative dk:inline-flex dk:max-w-full",
|
|
1666
|
+
"aria-describedby": a.value ? j : void 0,
|
|
1667
|
+
onMouseenter: he,
|
|
1668
|
+
onMouseleave: ve,
|
|
1669
|
+
onFocusin: xe,
|
|
1670
|
+
onFocusout: ye,
|
|
1671
|
+
onClick: we
|
|
1672
|
+
}, [
|
|
1673
|
+
T(b.$slots, "trigger", {}, () => [
|
|
1674
|
+
T(b.$slots, "default", {}, () => [
|
|
1675
|
+
p("span", bd, S(e.fallbackTriggerText), 1)
|
|
1676
|
+
])
|
|
1677
|
+
])
|
|
1678
|
+
], 40, cd),
|
|
1679
|
+
(r(), H(be, {
|
|
1680
|
+
to: e.teleportTo
|
|
1681
|
+
}, [
|
|
1682
|
+
oe(pe, {
|
|
1683
|
+
"enter-active-class": "dk:transition-opacity dk:duration-150",
|
|
1684
|
+
"leave-active-class": "dk:transition-opacity dk:duration-100",
|
|
1685
|
+
"enter-from-class": "dk:opacity-0",
|
|
1686
|
+
"leave-to-class": "dk:opacity-0"
|
|
1687
|
+
}, {
|
|
1688
|
+
default: E(() => [
|
|
1689
|
+
a.value && !e.disabled ? (r(), o("div", {
|
|
1690
|
+
key: 0,
|
|
1691
|
+
ref_key: "tooltipRef",
|
|
1692
|
+
ref: c,
|
|
1693
|
+
id: j,
|
|
1694
|
+
role: "tooltip",
|
|
1695
|
+
class: m(_.value),
|
|
1696
|
+
style: fe($.value),
|
|
1697
|
+
onMouseenter: ze,
|
|
1698
|
+
onMouseleave: Ce
|
|
1699
|
+
}, [
|
|
1700
|
+
T(b.$slots, "content", {}, () => [
|
|
1701
|
+
V(S(e.text), 1)
|
|
1702
|
+
]),
|
|
1703
|
+
e.arrow ? (r(), o("span", {
|
|
1704
|
+
key: 0,
|
|
1705
|
+
"aria-hidden": "true",
|
|
1706
|
+
class: m(M.value)
|
|
1707
|
+
}, null, 2)) : w("", !0)
|
|
1708
|
+
], 38)) : w("", !0)
|
|
1709
|
+
]),
|
|
1710
|
+
_: 3
|
|
1711
|
+
})
|
|
1712
|
+
], 8, ["to"]))
|
|
1713
|
+
], 64));
|
|
1714
|
+
}
|
|
1715
|
+
}), pd = {
|
|
1259
1716
|
key: 0,
|
|
1260
1717
|
class: "dk:flex dk:items-center dk:gap-4 dk:flex-shrink-0"
|
|
1261
|
-
},
|
|
1718
|
+
}, fd = { class: "dk:hidden dk:md:flex dk:items-center dk:flex-1" }, gd = {
|
|
1262
1719
|
key: 0,
|
|
1263
1720
|
class: "dk:relative dk:group"
|
|
1264
|
-
},
|
|
1721
|
+
}, md = { class: "dk:absolute dk:left-0 dk:top-full dk:min-w-56 dk:py-2 dk:mt-1 dk:bg-gradient-to-b dk:from-white/95 dk:to-gray-50/95 dk:dark:from-gray-700/90 dk:dark:to-gray-800/90 dk:backdrop-blur-md dk:rounded-lg dk:shadow-lg dk:border dk:border-white/40 dk:dark:border-white/10 dk:opacity-0 dk:invisible dk:group-hover:opacity-100 dk:group-hover:visible dk:transition-all dk:duration-200 dk:z-50" }, hd = {
|
|
1265
1722
|
key: 1,
|
|
1266
1723
|
class: "dk:hidden dk:md:flex dk:items-center dk:gap-2 dk:flex-shrink-0"
|
|
1267
|
-
},
|
|
1724
|
+
}, vd = {
|
|
1268
1725
|
class: "dk:w-6 dk:h-6 dk:stroke-gray-900 dk:dark:stroke-white",
|
|
1269
1726
|
fill: "none",
|
|
1270
1727
|
viewBox: "0 0 24 24"
|
|
1271
|
-
},
|
|
1728
|
+
}, xd = ["d"], yd = { class: "dk:md:hidden dk:absolute dk:top-full dk:left-0 dk:w-full dk:bg-gradient-to-b dk:from-white/95 dk:to-gray-50/95 dk:dark:from-gray-700/90 dk:dark:to-gray-800/90 dk:backdrop-blur-md dk:border-t dk:border-white/40 dk:dark:border-white/10 dk:shadow-lg dk:dark:shadow-black/30 dk:z-40" }, wd = { class: "dk:px-4 dk:py-3 dk:space-y-2" }, zd = { key: 0 }, Cd = ["onClick"], $d = { class: "dk:flex dk:items-center" }, Sd = { class: "dk:ml-4 dk:mt-2 dk:space-y-1" }, _d = {
|
|
1272
1729
|
key: 0,
|
|
1273
1730
|
class: "dk:pt-3 dk:border-t dk:border-white/20 dk:dark:border-white/10"
|
|
1274
|
-
},
|
|
1731
|
+
}, Nd = /* @__PURE__ */ A({
|
|
1275
1732
|
__name: "DuiNavbar",
|
|
1276
1733
|
props: {
|
|
1277
1734
|
items: { default: () => [] },
|
|
@@ -1281,17 +1738,17 @@ const re = { key: 1 }, oe = `
|
|
|
1281
1738
|
underlineColor: { default: "primary" }
|
|
1282
1739
|
},
|
|
1283
1740
|
setup(t) {
|
|
1284
|
-
const
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1287
|
-
},
|
|
1288
|
-
|
|
1289
|
-
},
|
|
1290
|
-
|
|
1291
|
-
|
|
1741
|
+
const d = t, e = Q(!1), i = Me({}), f = (y) => ee(y.to, d.nuxt), c = (y) => {
|
|
1742
|
+
const P = f(y);
|
|
1743
|
+
return ae(y.to, P);
|
|
1744
|
+
}, x = () => {
|
|
1745
|
+
e.value = !e.value;
|
|
1746
|
+
}, v = () => {
|
|
1747
|
+
e.value = !1, Object.keys(i).forEach((y) => {
|
|
1748
|
+
i[y] = !1;
|
|
1292
1749
|
});
|
|
1293
|
-
}, a = (
|
|
1294
|
-
|
|
1750
|
+
}, a = (y) => {
|
|
1751
|
+
i[y] = !i[y];
|
|
1295
1752
|
}, n = {
|
|
1296
1753
|
s: {
|
|
1297
1754
|
height: "dk:h-12",
|
|
@@ -1311,8 +1768,8 @@ const re = { key: 1 }, oe = `
|
|
|
1311
1768
|
text: "dk:text-lg",
|
|
1312
1769
|
itemPadding: "dk:px-4 dk:py-3"
|
|
1313
1770
|
}
|
|
1314
|
-
}, k =
|
|
1315
|
-
const
|
|
1771
|
+
}, k = l(() => {
|
|
1772
|
+
const y = n[d.size];
|
|
1316
1773
|
return [
|
|
1317
1774
|
// Glassmorphism navbar styles (Windows Vista inspired)
|
|
1318
1775
|
"dk:relative dk:bg-gradient-to-b dk:from-white/80 dk:via-white/70 dk:to-gray-50/80",
|
|
@@ -1325,19 +1782,19 @@ const re = { key: 1 }, oe = `
|
|
|
1325
1782
|
"dk:before:bg-gradient-to-r dk:before:from-white/60 dk:before:via-white/40 dk:before:to-transparent",
|
|
1326
1783
|
"dk:dark:before:from-white/20 dk:dark:before:via-white/10 dk:dark:before:to-transparent",
|
|
1327
1784
|
"dk:flex dk:items-center dk:w-full dk:gap-4",
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1785
|
+
y.height,
|
|
1786
|
+
y.padding,
|
|
1787
|
+
y.text
|
|
1331
1788
|
].join(" ");
|
|
1332
|
-
}), s =
|
|
1789
|
+
}), s = l(() => [
|
|
1333
1790
|
"dk:flex dk:items-center dk:space-x-1 dk:flex-1",
|
|
1334
1791
|
{
|
|
1335
1792
|
left: "dk:justify-start",
|
|
1336
1793
|
center: "dk:justify-center",
|
|
1337
1794
|
right: "dk:justify-end"
|
|
1338
|
-
}[
|
|
1339
|
-
].join(" ")),
|
|
1340
|
-
const
|
|
1795
|
+
}[d.itemsAlignment]
|
|
1796
|
+
].join(" ")), C = () => {
|
|
1797
|
+
const y = {
|
|
1341
1798
|
neutral: "dk:before:from-zinc-500 dk:before:to-zinc-600 dk:dark:before:from-zinc-400 dk:dark:before:to-zinc-500",
|
|
1342
1799
|
primary: "dk:before:from-slate-600 dk:before:to-slate-700 dk:dark:before:from-slate-400 dk:dark:before:to-slate-500",
|
|
1343
1800
|
secondary: "dk:before:from-pink-500 dk:before:to-pink-600 dk:dark:before:from-pink-400 dk:dark:before:to-pink-500",
|
|
@@ -1345,13 +1802,13 @@ const re = { key: 1 }, oe = `
|
|
|
1345
1802
|
danger: "dk:before:from-rose-500 dk:before:to-rose-600 dk:dark:before:from-rose-400 dk:dark:before:to-rose-500",
|
|
1346
1803
|
warning: "dk:before:from-amber-500 dk:before:to-amber-600 dk:dark:before:from-amber-400 dk:dark:before:to-amber-500"
|
|
1347
1804
|
};
|
|
1348
|
-
return
|
|
1349
|
-
},
|
|
1350
|
-
const
|
|
1351
|
-
return (
|
|
1352
|
-
const
|
|
1353
|
-
let
|
|
1354
|
-
return
|
|
1805
|
+
return y[d.underlineColor] || y.primary;
|
|
1806
|
+
}, B = l(() => {
|
|
1807
|
+
const y = n[d.size], P = C();
|
|
1808
|
+
return (g, _ = !0) => {
|
|
1809
|
+
const $ = g.active ?? !1, M = _ ? "dk:pl-3" : "dk:pl-2", D = "dk:pr-3", Y = _ ? "dk:pl-2" : "dk:pl-1", R = "dk:pr-2", X = _ ? "dk:pl-4" : "dk:pl-3", ke = "dk:pr-4";
|
|
1810
|
+
let Z = "";
|
|
1811
|
+
return y.itemPadding.includes("px-2") ? Z = `${Y} ${R} dk:py-1.5` : y.itemPadding.includes("px-4") ? Z = `${X} ${ke} dk:py-3` : Z = `${M} ${D} dk:py-2`, [
|
|
1355
1812
|
// Block style with animated underline
|
|
1356
1813
|
"dk:flex dk:items-center dk:relative dk:transition-all dk:duration-300",
|
|
1357
1814
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:dark:text-gray-300 dk:dark:hover:text-gray-100",
|
|
@@ -1360,62 +1817,62 @@ const re = { key: 1 }, oe = `
|
|
|
1360
1817
|
// Animated underline effect
|
|
1361
1818
|
"dk:before:absolute dk:before:bottom-0 dk:before:left-0 dk:before:h-0.5",
|
|
1362
1819
|
"dk:before:bg-gradient-to-r",
|
|
1363
|
-
|
|
1820
|
+
P,
|
|
1364
1821
|
"dk:before:transition-all dk:before:duration-300",
|
|
1365
|
-
|
|
1366
|
-
|
|
1822
|
+
$ ? "dk:before:w-full dk:text-gray-900 dk:dark:text-gray-100" : "dk:before:w-0 dk:hover:before:w-full",
|
|
1823
|
+
Z
|
|
1367
1824
|
].join(" ");
|
|
1368
1825
|
};
|
|
1369
|
-
}),
|
|
1826
|
+
}), j = l(() => [
|
|
1370
1827
|
"dk:block dk:w-full dk:text-left dk:px-4 dk:py-2 dk:text-sm dk:whitespace-nowrap",
|
|
1371
1828
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:hover:bg-white/50 dk:dark:hover:bg-white/10",
|
|
1372
1829
|
"dk:dark:text-gray-300 dk:dark:hover:text-gray-100",
|
|
1373
1830
|
"dk:transition-all dk:duration-200 dk:no-underline",
|
|
1374
1831
|
"dk:border-l-2 dk:border-transparent dk:hover:border-blue-500"
|
|
1375
|
-
].join(" ")),
|
|
1832
|
+
].join(" ")), z = l(() => [
|
|
1376
1833
|
"dk:flex dk:items-center dk:justify-start dk:w-full dk:text-left dk:px-3 dk:py-2",
|
|
1377
1834
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:rounded-lg",
|
|
1378
1835
|
"dk:bg-white/10 dk:hover:bg-white/25 dk:dark:bg-white/5 dk:dark:hover:bg-white/15",
|
|
1379
1836
|
"dk:dark:text-gray-300 dk:dark:hover:text-gray-100",
|
|
1380
1837
|
"dk:border dk:border-white/20 dk:dark:border-white/10 dk:hover:border-white/40 dk:dark:hover:border-white/20",
|
|
1381
1838
|
"dk:transition-all dk:duration-200 dk:no-underline"
|
|
1382
|
-
].join(" ")),
|
|
1839
|
+
].join(" ")), N = l(() => [
|
|
1383
1840
|
"dk:block dk:w-full dk:text-left dk:px-3 dk:py-2 dk:text-sm dk:rounded-lg",
|
|
1384
1841
|
"dk:text-gray-600 dk:hover:text-gray-800 dk:hover:bg-white/30 dk:dark:hover:bg-white/10",
|
|
1385
1842
|
"dk:dark:text-gray-400 dk:dark:hover:text-gray-200",
|
|
1386
1843
|
"dk:border-l-2 dk:border-transparent dk:hover:border-blue-500",
|
|
1387
1844
|
"dk:transition-all dk:duration-200 dk:no-underline"
|
|
1388
1845
|
].join(" "));
|
|
1389
|
-
return (
|
|
1390
|
-
class:
|
|
1846
|
+
return (y, P) => (r(), o("nav", {
|
|
1847
|
+
class: m(k.value)
|
|
1391
1848
|
}, [
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
])) :
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
class:
|
|
1849
|
+
y.$slots.brand ? (r(), o("div", pd, [
|
|
1850
|
+
T(y.$slots, "brand")
|
|
1851
|
+
])) : w("", !0),
|
|
1852
|
+
p("div", fd, [
|
|
1853
|
+
p("div", {
|
|
1854
|
+
class: m(s.value)
|
|
1398
1855
|
}, [
|
|
1399
|
-
(r(!0), o(
|
|
1400
|
-
key:
|
|
1856
|
+
(r(!0), o(O, null, G(t.items, (g) => (r(), o(O, {
|
|
1857
|
+
key: g.label
|
|
1401
1858
|
}, [
|
|
1402
|
-
|
|
1403
|
-
(r(),
|
|
1404
|
-
class:
|
|
1859
|
+
g.children && g.children.length > 0 ? (r(), o("div", gd, [
|
|
1860
|
+
(r(), H(K(f(g)), I({ ref_for: !0 }, c(g), {
|
|
1861
|
+
class: B.value(g, !0)
|
|
1405
1862
|
}), {
|
|
1406
|
-
default:
|
|
1407
|
-
|
|
1863
|
+
default: E(() => [
|
|
1864
|
+
g.icon ? (r(), o("i", {
|
|
1408
1865
|
key: 0,
|
|
1409
|
-
class:
|
|
1410
|
-
}, null, 2)) :
|
|
1411
|
-
|
|
1412
|
-
|
|
1866
|
+
class: m([g.icon, "dk:mr-2"])
|
|
1867
|
+
}, null, 2)) : w("", !0),
|
|
1868
|
+
V(" " + S(g.label) + " ", 1),
|
|
1869
|
+
P[0] || (P[0] = p("svg", {
|
|
1413
1870
|
class: "dk:w-4 dk:h-4 dk:ml-1 dk:transform dk:group-hover:rotate-180 dk:transition-transform",
|
|
1414
1871
|
fill: "none",
|
|
1415
1872
|
stroke: "currentColor",
|
|
1416
1873
|
viewBox: "0 0 24 24"
|
|
1417
1874
|
}, [
|
|
1418
|
-
|
|
1875
|
+
p("path", {
|
|
1419
1876
|
"stroke-linecap": "round",
|
|
1420
1877
|
"stroke-linejoin": "round",
|
|
1421
1878
|
"stroke-width": "2",
|
|
@@ -1425,143 +1882,145 @@ const re = { key: 1 }, oe = `
|
|
|
1425
1882
|
]),
|
|
1426
1883
|
_: 2
|
|
1427
1884
|
}, 1040, ["class"])),
|
|
1428
|
-
|
|
1429
|
-
(r(!0), o(
|
|
1430
|
-
key:
|
|
1431
|
-
}, { ref_for: !0 },
|
|
1432
|
-
default:
|
|
1433
|
-
|
|
1885
|
+
p("div", md, [
|
|
1886
|
+
(r(!0), o(O, null, G(g.children, (_) => (r(), H(K(f(_)), I({
|
|
1887
|
+
key: _.label
|
|
1888
|
+
}, { ref_for: !0 }, c(_), { class: j.value }), {
|
|
1889
|
+
default: E(() => [
|
|
1890
|
+
_.icon ? (r(), o("i", {
|
|
1434
1891
|
key: 0,
|
|
1435
|
-
class:
|
|
1436
|
-
}, null, 2)) :
|
|
1437
|
-
|
|
1892
|
+
class: m([_.icon, "dk:mr-2"])
|
|
1893
|
+
}, null, 2)) : w("", !0),
|
|
1894
|
+
V(" " + S(_.label), 1)
|
|
1438
1895
|
]),
|
|
1439
1896
|
_: 2
|
|
1440
1897
|
}, 1040, ["class"]))), 128))
|
|
1441
1898
|
])
|
|
1442
|
-
])) : (r(),
|
|
1899
|
+
])) : (r(), H(K(f(g)), I({
|
|
1443
1900
|
key: 1,
|
|
1444
1901
|
ref_for: !0
|
|
1445
|
-
},
|
|
1446
|
-
class:
|
|
1902
|
+
}, c(g), {
|
|
1903
|
+
class: B.value(g, !1)
|
|
1447
1904
|
}), {
|
|
1448
|
-
default:
|
|
1449
|
-
|
|
1905
|
+
default: E(() => [
|
|
1906
|
+
g.icon ? (r(), o("i", {
|
|
1450
1907
|
key: 0,
|
|
1451
|
-
class:
|
|
1452
|
-
}, null, 2)) :
|
|
1453
|
-
|
|
1908
|
+
class: m([g.icon, "dk:mr-2"])
|
|
1909
|
+
}, null, 2)) : w("", !0),
|
|
1910
|
+
V(" " + S(g.label), 1)
|
|
1454
1911
|
]),
|
|
1455
1912
|
_: 2
|
|
1456
1913
|
}, 1040, ["class"]))
|
|
1457
1914
|
], 64))), 128))
|
|
1458
1915
|
], 2)
|
|
1459
1916
|
]),
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
])) :
|
|
1463
|
-
|
|
1917
|
+
y.$slots.actions ? (r(), o("div", hd, [
|
|
1918
|
+
T(y.$slots, "actions")
|
|
1919
|
+
])) : w("", !0),
|
|
1920
|
+
p("button", {
|
|
1464
1921
|
type: "button",
|
|
1465
|
-
onClick:
|
|
1922
|
+
onClick: x,
|
|
1466
1923
|
class: "dk:md:hidden dk:ml-auto dk:flex-shrink-0 dk:p-2 dk:rounded-md dk:hover:bg-gray-100 dk:dark:hover:bg-gray-700 dk:transition-colors"
|
|
1467
1924
|
}, [
|
|
1468
|
-
(r(), o("svg",
|
|
1469
|
-
|
|
1925
|
+
(r(), o("svg", vd, [
|
|
1926
|
+
p("path", {
|
|
1470
1927
|
"stroke-linecap": "round",
|
|
1471
1928
|
"stroke-linejoin": "round",
|
|
1472
1929
|
"stroke-width": "2",
|
|
1473
|
-
d:
|
|
1474
|
-
}, null, 8,
|
|
1930
|
+
d: e.value ? "M6 18L18 6M6 6l12 12" : "M4 6h16M4 12h16M4 18h16"
|
|
1931
|
+
}, null, 8, xd)
|
|
1475
1932
|
]))
|
|
1476
1933
|
]),
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
(r(!0), o(
|
|
1480
|
-
key:
|
|
1934
|
+
ne(p("div", yd, [
|
|
1935
|
+
p("div", wd, [
|
|
1936
|
+
(r(!0), o(O, null, G(t.items, (g) => (r(), o(O, {
|
|
1937
|
+
key: g.label
|
|
1481
1938
|
}, [
|
|
1482
|
-
|
|
1483
|
-
|
|
1939
|
+
g.children && g.children.length > 0 ? (r(), o("div", zd, [
|
|
1940
|
+
p("button", {
|
|
1484
1941
|
type: "button",
|
|
1485
|
-
onClick: (
|
|
1486
|
-
class:
|
|
1942
|
+
onClick: (_) => a(g.label),
|
|
1943
|
+
class: m([z.value, "dk:justify-between"])
|
|
1487
1944
|
}, [
|
|
1488
|
-
|
|
1489
|
-
|
|
1945
|
+
p("div", $d, [
|
|
1946
|
+
g.icon ? (r(), o("i", {
|
|
1490
1947
|
key: 0,
|
|
1491
|
-
class:
|
|
1492
|
-
}, null, 2)) :
|
|
1493
|
-
|
|
1948
|
+
class: m([g.icon, "dk:mr-2"])
|
|
1949
|
+
}, null, 2)) : w("", !0),
|
|
1950
|
+
V(" " + S(g.label), 1)
|
|
1494
1951
|
]),
|
|
1495
1952
|
(r(), o("svg", {
|
|
1496
|
-
class:
|
|
1953
|
+
class: m(["dk:w-4 dk:h-4 dk:transform dk:transition-transform dk:flex-shrink-0", i[g.label] ? "dk:rotate-180" : ""]),
|
|
1497
1954
|
fill: "none",
|
|
1498
1955
|
stroke: "currentColor",
|
|
1499
1956
|
viewBox: "0 0 24 24"
|
|
1500
|
-
}, [...
|
|
1501
|
-
|
|
1957
|
+
}, [...P[1] || (P[1] = [
|
|
1958
|
+
p("path", {
|
|
1502
1959
|
"stroke-linecap": "round",
|
|
1503
1960
|
"stroke-linejoin": "round",
|
|
1504
1961
|
"stroke-width": "2",
|
|
1505
1962
|
d: "M19 9l-7 7-7-7"
|
|
1506
1963
|
}, null, -1)
|
|
1507
1964
|
])], 2))
|
|
1508
|
-
], 10,
|
|
1509
|
-
|
|
1510
|
-
(r(!0), o(
|
|
1511
|
-
key:
|
|
1512
|
-
}, { ref_for: !0 },
|
|
1513
|
-
class:
|
|
1514
|
-
onClick:
|
|
1965
|
+
], 10, Cd),
|
|
1966
|
+
ne(p("div", Sd, [
|
|
1967
|
+
(r(!0), o(O, null, G(g.children, (_) => (r(), H(K(f(_)), I({
|
|
1968
|
+
key: _.label
|
|
1969
|
+
}, { ref_for: !0 }, c(_), {
|
|
1970
|
+
class: N.value,
|
|
1971
|
+
onClick: v
|
|
1515
1972
|
}), {
|
|
1516
|
-
default:
|
|
1517
|
-
|
|
1973
|
+
default: E(() => [
|
|
1974
|
+
_.icon ? (r(), o("i", {
|
|
1518
1975
|
key: 0,
|
|
1519
|
-
class:
|
|
1520
|
-
}, null, 2)) :
|
|
1521
|
-
|
|
1976
|
+
class: m([_.icon, "dk:mr-2"])
|
|
1977
|
+
}, null, 2)) : w("", !0),
|
|
1978
|
+
V(" " + S(_.label), 1)
|
|
1522
1979
|
]),
|
|
1523
1980
|
_: 2
|
|
1524
1981
|
}, 1040, ["class"]))), 128))
|
|
1525
1982
|
], 512), [
|
|
1526
|
-
[
|
|
1983
|
+
[se, i[g.label]]
|
|
1527
1984
|
])
|
|
1528
|
-
])) : (r(),
|
|
1985
|
+
])) : (r(), H(K(f(g)), I({
|
|
1529
1986
|
key: 1,
|
|
1530
1987
|
ref_for: !0
|
|
1531
|
-
},
|
|
1532
|
-
class:
|
|
1533
|
-
onClick:
|
|
1988
|
+
}, c(g), {
|
|
1989
|
+
class: z.value,
|
|
1990
|
+
onClick: v
|
|
1534
1991
|
}), {
|
|
1535
|
-
default:
|
|
1536
|
-
|
|
1992
|
+
default: E(() => [
|
|
1993
|
+
g.icon ? (r(), o("i", {
|
|
1537
1994
|
key: 0,
|
|
1538
|
-
class:
|
|
1539
|
-
}, null, 2)) :
|
|
1540
|
-
|
|
1995
|
+
class: m([g.icon, "dk:mr-2"])
|
|
1996
|
+
}, null, 2)) : w("", !0),
|
|
1997
|
+
V(" " + S(g.label), 1)
|
|
1541
1998
|
]),
|
|
1542
1999
|
_: 2
|
|
1543
2000
|
}, 1040, ["class"]))
|
|
1544
2001
|
], 64))), 128)),
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
])) :
|
|
2002
|
+
y.$slots.actions ? (r(), o("div", _d, [
|
|
2003
|
+
T(y.$slots, "actions")
|
|
2004
|
+
])) : w("", !0)
|
|
1548
2005
|
])
|
|
1549
2006
|
], 512), [
|
|
1550
|
-
[
|
|
2007
|
+
[se, e.value]
|
|
1551
2008
|
])
|
|
1552
2009
|
], 2));
|
|
1553
2010
|
}
|
|
1554
2011
|
});
|
|
1555
2012
|
export {
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
2013
|
+
Id as DuiAction,
|
|
2014
|
+
Dd as DuiAlert,
|
|
2015
|
+
ie as DuiButton,
|
|
2016
|
+
Wd as DuiCard,
|
|
2017
|
+
Pd as DuiCheckbox,
|
|
2018
|
+
Bd as DuiInput,
|
|
2019
|
+
Vd as DuiLabel,
|
|
2020
|
+
Ed as DuiModal,
|
|
2021
|
+
Nd as DuiNavbar,
|
|
2022
|
+
Td as DuiSelect,
|
|
2023
|
+
Ld as DuiTable,
|
|
2024
|
+
Md as DuiTextarea,
|
|
2025
|
+
Ad as DuiTooltip
|
|
1567
2026
|
};
|