@dronico/droni-kit 1.24.2 → 1.25.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/README.md +23 -0
- package/dist/droni-kit.cjs.js +9 -9
- package/dist/droni-kit.css +1 -1
- package/dist/droni-kit.es.js +870 -774
- package/dist/index.d.ts +2 -1
- package/dist/stories/Forms/DuiForm.stories.d.ts +130 -0
- package/dist/stories/Forms/DuiForm.vue.d.ts +52 -0
- package/dist/stories/Forms/DuiInput.stories.d.ts +3 -3
- package/dist/stories/Forms/DuiInput.vue.d.ts +3 -3
- package/dist/stories/Forms/DuiSelect.stories.d.ts +3 -3
- package/dist/stories/Forms/DuiSelect.vue.d.ts +3 -3
- package/package.json +1 -1
package/dist/droni-kit.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getCurrentInstance as Pe, defineComponent as L, computed as
|
|
2
|
-
function
|
|
1
|
+
import { getCurrentInstance as Pe, defineComponent as L, computed as o, openBlock as t, createBlock as W, resolveDynamicComponent as Q, mergeProps as O, withCtx as A, renderSlot as _, createElementBlock as a, ref as N, watch as ae, normalizeClass as s, createElementVNode as m, withModifiers as G, toDisplayString as j, createCommentVNode as S, Fragment as E, renderList as K, createTextVNode as P, withDirectives as xe, vShow as he, useSlots as we, unref as R, provide as Ie, createVNode as J, onMounted as be, onBeforeUnmount as pe, Teleport as me, Transition as ne, normalizeStyle as te, nextTick as ue, withKeys as ye, reactive as ze, readonly as Ae, TransitionGroup as Ee } from "vue";
|
|
2
|
+
function We() {
|
|
3
3
|
try {
|
|
4
4
|
const d = Pe(), r = d == null ? void 0 : d.appContext.app;
|
|
5
5
|
return r ? !!(r.config.globalProperties.$router || r.config.globalProperties.$route || r.component("RouterLink")) : typeof window < "u" ? !!window.VueRouter : !1;
|
|
@@ -8,13 +8,13 @@ function Ee() {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
function se(d) {
|
|
11
|
-
return d ?
|
|
11
|
+
return d ? We() ? "RouterLink" : "a" : "button";
|
|
12
12
|
}
|
|
13
13
|
function fe(d, r, e = {}) {
|
|
14
|
-
const
|
|
15
|
-
return r === "a" ? (
|
|
14
|
+
const l = { ...e };
|
|
15
|
+
return r === "a" ? (l.href = typeof d == "string" ? d : "#", l.role = "button") : r !== "button" && r !== "span" && (l.to = d), l;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const Oe = { key: 1 }, Fe = `
|
|
18
18
|
dk:transition
|
|
19
19
|
dk:text-center
|
|
20
20
|
dk:disabled:opacity-50
|
|
@@ -40,7 +40,7 @@ const We = { key: 1 }, Oe = `
|
|
|
40
40
|
to: { default: void 0 }
|
|
41
41
|
},
|
|
42
42
|
setup(d) {
|
|
43
|
-
const r = d, e =
|
|
43
|
+
const r = d, e = o(() => se(r.to)), l = o(() => {
|
|
44
44
|
const p = {};
|
|
45
45
|
return e.value === "button" && (p.type = r.type), fe(r.to, e.value, p);
|
|
46
46
|
}), g = {
|
|
@@ -226,23 +226,23 @@ const We = { key: 1 }, Oe = `
|
|
|
226
226
|
dk:dark:text-amber-100
|
|
227
227
|
dk:dark:hover:bg-amber-800`
|
|
228
228
|
}
|
|
229
|
-
},
|
|
229
|
+
}, h = o(() => {
|
|
230
230
|
var z;
|
|
231
|
-
const p = (((z = w[r.variant]) == null ? void 0 : z[r.color]) || "") + " " + w[r.variant].base, b = g[r.size] || "",
|
|
232
|
-
return [
|
|
231
|
+
const p = (((z = w[r.variant]) == null ? void 0 : z[r.color]) || "") + " " + w[r.variant].base, b = g[r.size] || "", v = r.block ? "dk:w-full" : "", f = n[r.rounded] || "";
|
|
232
|
+
return [Fe, p, b, v, f].join(" ");
|
|
233
233
|
});
|
|
234
|
-
return (p, b) => (t(), W(Q(e.value), O(
|
|
235
|
-
class:
|
|
234
|
+
return (p, b) => (t(), W(Q(e.value), O(l.value, {
|
|
235
|
+
class: h.value,
|
|
236
236
|
title: r.title,
|
|
237
237
|
disabled: r.disabled || r.loading
|
|
238
238
|
}), {
|
|
239
239
|
default: A(() => [
|
|
240
|
-
r.loading ? (t(), a("span",
|
|
240
|
+
r.loading ? (t(), a("span", Oe, "Cargando...")) : _(p.$slots, "default", {}, void 0, void 0, 0)
|
|
241
241
|
]),
|
|
242
242
|
_: 3
|
|
243
243
|
}, 16, ["class", "title", "disabled"]));
|
|
244
244
|
}
|
|
245
|
-
}), Ne = ["accept"],
|
|
245
|
+
}), Ne = ["accept"], Bt = /* @__PURE__ */ L({
|
|
246
246
|
inheritAttrs: !1,
|
|
247
247
|
__name: "DuiFile",
|
|
248
248
|
props: {
|
|
@@ -277,80 +277,80 @@ const We = { key: 1 }, Oe = `
|
|
|
277
277
|
},
|
|
278
278
|
emits: ["update:modelValue", "open-browser", "upload-file", "open-file"],
|
|
279
279
|
setup(d, { emit: r }) {
|
|
280
|
-
const e = d,
|
|
280
|
+
const e = d, l = r, g = N(null), n = N(""), w = {
|
|
281
281
|
sm: "dk:gap-1 dk:px-2 dk:py-1",
|
|
282
282
|
md: "dk:gap-2 dk:px-3 dk:py-2",
|
|
283
283
|
lg: "dk:gap-3 dk:px-4 dk:py-3"
|
|
284
|
-
},
|
|
284
|
+
}, h = {
|
|
285
285
|
all: "dk:rounded-xl",
|
|
286
286
|
top: "dk:rounded-t-xl",
|
|
287
287
|
bottom: "dk:rounded-b-xl",
|
|
288
288
|
left: "dk:rounded-l-xl",
|
|
289
289
|
right: "dk:rounded-r-xl",
|
|
290
290
|
none: "dk:rounded-none"
|
|
291
|
-
}, p =
|
|
292
|
-
const
|
|
291
|
+
}, p = o(() => e.block ? "dk:w-full" : "dk:inline-flex dk:max-w-full"), b = o(() => {
|
|
292
|
+
const k = w[e.size] || w.md, u = h[e.rounded] || h.all;
|
|
293
293
|
return [
|
|
294
294
|
"dk:flex dk:w-full dk:flex-col dk:items-stretch dk:justify-between dk:border-b dk:border-zinc-300 dk:bg-zinc-50 dk:text-zinc-800 dk:shadow-sm dk:transition-colors",
|
|
295
295
|
"dk:dark:border-zinc-600 dk:dark:bg-zinc-800 dk:dark:text-zinc-100",
|
|
296
296
|
"dk:sm:flex-row dk:sm:items-center",
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
k,
|
|
298
|
+
u
|
|
299
299
|
].join(" ");
|
|
300
|
-
}),
|
|
300
|
+
}), v = o(() => "dk:min-w-0 dk:flex-1"), f = o(() => [
|
|
301
301
|
"dk:flex dk:flex-col dk:gap-2 dk:w-full",
|
|
302
302
|
"dk:sm:w-auto dk:sm:flex-row dk:sm:items-center dk:sm:justify-end"
|
|
303
|
-
].join(" ")), z =
|
|
303
|
+
].join(" ")), z = o(() => [
|
|
304
304
|
"dk:mt-1 dk:max-w-full dk:overflow-hidden dk:text-ellipsis dk:whitespace-nowrap dk:text-sm",
|
|
305
305
|
e.modelValue || n.value ? "dk:text-zinc-900 dk:dark:text-zinc-100" : "dk:text-zinc-500 dk:dark:text-zinc-400"
|
|
306
|
-
].join(" ")), V =
|
|
306
|
+
].join(" ")), V = o(() => n.value ? n.value : e.modelValue ? y(e.modelValue) : "No hay archivo seleccionado");
|
|
307
307
|
ae(
|
|
308
308
|
() => e.modelValue,
|
|
309
|
-
(
|
|
310
|
-
|
|
309
|
+
(k) => {
|
|
310
|
+
k && (n.value = "");
|
|
311
311
|
}
|
|
312
312
|
);
|
|
313
|
-
function
|
|
314
|
-
const
|
|
315
|
-
return
|
|
313
|
+
function y(k) {
|
|
314
|
+
const u = k.split("/");
|
|
315
|
+
return u[u.length - 1];
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
|
|
317
|
+
function c() {
|
|
318
|
+
l("open-browser");
|
|
319
319
|
}
|
|
320
|
-
function
|
|
321
|
-
var
|
|
322
|
-
(
|
|
320
|
+
function i() {
|
|
321
|
+
var k;
|
|
322
|
+
(k = g.value) == null || k.click();
|
|
323
323
|
}
|
|
324
|
-
function x(
|
|
324
|
+
function x(k) {
|
|
325
325
|
var D;
|
|
326
|
-
const
|
|
327
|
-
|
|
326
|
+
const u = k.target, $ = (D = u.files) == null ? void 0 : D[0];
|
|
327
|
+
$ && (n.value = $.name, l("upload-file", $), C(u));
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
|
|
329
|
+
function C(k) {
|
|
330
|
+
k.value = "";
|
|
331
331
|
}
|
|
332
|
-
return (
|
|
333
|
-
class:
|
|
332
|
+
return (k, u) => (t(), a("div", {
|
|
333
|
+
class: s(p.value)
|
|
334
334
|
}, [
|
|
335
335
|
m("div", {
|
|
336
|
-
class:
|
|
336
|
+
class: s(b.value)
|
|
337
337
|
}, [
|
|
338
338
|
m("div", {
|
|
339
|
-
class:
|
|
339
|
+
class: s(v.value)
|
|
340
340
|
}, [
|
|
341
341
|
e.modelValue ?? n.value ? (t(), a("p", {
|
|
342
342
|
key: 0,
|
|
343
|
-
class:
|
|
343
|
+
class: s(z.value)
|
|
344
344
|
}, [
|
|
345
345
|
m("a", {
|
|
346
346
|
href: "#",
|
|
347
|
-
onClick:
|
|
347
|
+
onClick: u[0] || (u[0] = G(($) => l("open-file", e.modelValue ?? n.value), ["prevent"])),
|
|
348
348
|
class: "dk:ml-2 dk:text-pink-500 dk:underline dk:transition-colors dk:hover:text-pink-800 dk:dark:text-pink-400 dk:dark:hover:text-pink-300"
|
|
349
349
|
}, j(V.value), 1)
|
|
350
350
|
], 2)) : S("", !0)
|
|
351
351
|
], 2),
|
|
352
352
|
m("div", {
|
|
353
|
-
class:
|
|
353
|
+
class: s(f.value)
|
|
354
354
|
}, [
|
|
355
355
|
e.browserBtn ? (t(), W(oe, {
|
|
356
356
|
key: 0,
|
|
@@ -359,9 +359,9 @@ const We = { key: 1 }, Oe = `
|
|
|
359
359
|
size: "sm",
|
|
360
360
|
block: !1,
|
|
361
361
|
title: "Abrir navegador de archivos",
|
|
362
|
-
onClick:
|
|
362
|
+
onClick: c
|
|
363
363
|
}, {
|
|
364
|
-
default: A(() => [...
|
|
364
|
+
default: A(() => [...u[1] || (u[1] = [
|
|
365
365
|
m("i", {
|
|
366
366
|
class: "mdi mdi-folder-search-outline",
|
|
367
367
|
"aria-hidden": "true"
|
|
@@ -376,9 +376,9 @@ const We = { key: 1 }, Oe = `
|
|
|
376
376
|
size: "sm",
|
|
377
377
|
block: !1,
|
|
378
378
|
title: "Subir nuevo archivo",
|
|
379
|
-
onClick:
|
|
379
|
+
onClick: i
|
|
380
380
|
}, {
|
|
381
|
-
default: A(() => [...
|
|
381
|
+
default: A(() => [...u[2] || (u[2] = [
|
|
382
382
|
m("i", {
|
|
383
383
|
class: "mdi mdi-upload",
|
|
384
384
|
"aria-hidden": "true"
|
|
@@ -398,7 +398,7 @@ const We = { key: 1 }, Oe = `
|
|
|
398
398
|
}, null, 40, Ne)
|
|
399
399
|
], 2));
|
|
400
400
|
}
|
|
401
|
-
}),
|
|
401
|
+
}), Ke = ["value"], Ue = `
|
|
402
402
|
dk:border-b
|
|
403
403
|
dk:border-zinc-300
|
|
404
404
|
dk:bg-zinc-50
|
|
@@ -410,12 +410,12 @@ const We = { key: 1 }, Oe = `
|
|
|
410
410
|
dk:dark:bg-zinc-800
|
|
411
411
|
dk:dark:text-zinc-100
|
|
412
412
|
dk:dark:focus:bg-zinc-700
|
|
413
|
-
dk:dark:[color-scheme:dark]`,
|
|
413
|
+
dk:dark:[color-scheme:dark]`, Dt = /* @__PURE__ */ L({
|
|
414
414
|
inheritAttrs: !1,
|
|
415
415
|
__name: "DuiInput",
|
|
416
416
|
props: {
|
|
417
417
|
modelValue: {
|
|
418
|
-
type: [String, Number],
|
|
418
|
+
type: [String, Number, null],
|
|
419
419
|
default: ""
|
|
420
420
|
},
|
|
421
421
|
size: {
|
|
@@ -433,10 +433,10 @@ const We = { key: 1 }, Oe = `
|
|
|
433
433
|
},
|
|
434
434
|
emits: ["update:modelValue"],
|
|
435
435
|
setup(d, { emit: r }) {
|
|
436
|
-
const e = d,
|
|
436
|
+
const e = d, l = r;
|
|
437
437
|
function g(p) {
|
|
438
438
|
const b = p.target;
|
|
439
|
-
|
|
439
|
+
l("update:modelValue", b.value);
|
|
440
440
|
}
|
|
441
441
|
const n = {
|
|
442
442
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
@@ -449,16 +449,16 @@ const We = { key: 1 }, Oe = `
|
|
|
449
449
|
left: "dk:rounded-l",
|
|
450
450
|
right: "dk:rounded-r",
|
|
451
451
|
none: "dk:rounded-none"
|
|
452
|
-
},
|
|
453
|
-
const p = n[e.size] || "", b = e.block ? "dk:w-full" : "",
|
|
454
|
-
return [
|
|
452
|
+
}, h = o(() => {
|
|
453
|
+
const p = n[e.size] || "", b = e.block ? "dk:w-full" : "", v = w[e.rounded] || "";
|
|
454
|
+
return [Ue, p, b, v].join(" ");
|
|
455
455
|
});
|
|
456
456
|
return (p, b) => (t(), a("input", O({
|
|
457
|
-
class:
|
|
457
|
+
class: h.value,
|
|
458
458
|
value: d.modelValue
|
|
459
|
-
}, p.$attrs, { onInput: g }), null, 16,
|
|
459
|
+
}, p.$attrs, { onInput: g }), null, 16, Ke));
|
|
460
460
|
}
|
|
461
|
-
}), qe = ["value"],
|
|
461
|
+
}), qe = ["value"], He = `
|
|
462
462
|
dk:border-b
|
|
463
463
|
dk:border-zinc-300
|
|
464
464
|
dk:bg-zinc-50
|
|
@@ -470,7 +470,7 @@ const We = { key: 1 }, Oe = `
|
|
|
470
470
|
dk:dark:bg-zinc-800
|
|
471
471
|
dk:dark:text-zinc-100
|
|
472
472
|
dk:dark:focus:bg-zinc-700
|
|
473
|
-
dk:dark:[color-scheme:dark]`,
|
|
473
|
+
dk:dark:[color-scheme:dark]`, Mt = /* @__PURE__ */ L({
|
|
474
474
|
inheritAttrs: !1,
|
|
475
475
|
__name: "DuiTextarea",
|
|
476
476
|
props: {
|
|
@@ -501,10 +501,10 @@ const We = { key: 1 }, Oe = `
|
|
|
501
501
|
},
|
|
502
502
|
emits: ["update:modelValue"],
|
|
503
503
|
setup(d, { emit: r }) {
|
|
504
|
-
const e = d,
|
|
505
|
-
function g(
|
|
506
|
-
const f =
|
|
507
|
-
e.autoheight && b(f),
|
|
504
|
+
const e = d, l = r;
|
|
505
|
+
function g(v) {
|
|
506
|
+
const f = v.target;
|
|
507
|
+
e.autoheight && b(f), l("update:modelValue", f.value);
|
|
508
508
|
}
|
|
509
509
|
const n = {
|
|
510
510
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
@@ -517,29 +517,29 @@ const We = { key: 1 }, Oe = `
|
|
|
517
517
|
left: "dk:rounded-l",
|
|
518
518
|
right: "dk:rounded-r",
|
|
519
519
|
none: "dk:rounded-none"
|
|
520
|
-
},
|
|
520
|
+
}, h = {
|
|
521
521
|
none: "dk:resize-none",
|
|
522
522
|
both: "dk:resize",
|
|
523
523
|
horizontal: "dk:resize-x",
|
|
524
524
|
vertical: "dk:resize-y"
|
|
525
|
-
}, p =
|
|
526
|
-
const
|
|
527
|
-
return [
|
|
528
|
-
}), b = (
|
|
529
|
-
|
|
525
|
+
}, p = o(() => {
|
|
526
|
+
const v = n[e.size] || "", f = e.block ? "dk:w-full" : "", z = w[e.rounded] || "", V = h[e.resize] || "";
|
|
527
|
+
return [He, v, f, z, V].join(" ");
|
|
528
|
+
}), b = (v) => {
|
|
529
|
+
v.style.height = "auto", v.style.height = `${v.scrollHeight + 5}px`;
|
|
530
530
|
};
|
|
531
|
-
return (
|
|
531
|
+
return (v, f) => (t(), a("textarea", O(v.$attrs, {
|
|
532
532
|
class: p.value,
|
|
533
533
|
value: d.modelValue,
|
|
534
534
|
onInput: g
|
|
535
535
|
}), null, 16, qe));
|
|
536
536
|
}
|
|
537
|
-
}),
|
|
537
|
+
}), Qe = {
|
|
538
538
|
key: 0,
|
|
539
539
|
disabled: "",
|
|
540
540
|
selected: "",
|
|
541
541
|
hidden: ""
|
|
542
|
-
},
|
|
542
|
+
}, Ge = ["value", "selected"], Ye = `
|
|
543
543
|
dk:border-b
|
|
544
544
|
dk:border-zinc-300
|
|
545
545
|
dk:bg-zinc-50
|
|
@@ -552,12 +552,12 @@ const We = { key: 1 }, Oe = `
|
|
|
552
552
|
dk:dark:text-zinc-100
|
|
553
553
|
dk:dark:focus:bg-zinc-700
|
|
554
554
|
dk:dark:[color-scheme:dark]
|
|
555
|
-
`,
|
|
555
|
+
`, Tt = /* @__PURE__ */ L({
|
|
556
556
|
inheritAttrs: !1,
|
|
557
557
|
__name: "DuiSelect",
|
|
558
558
|
props: {
|
|
559
559
|
modelValue: {
|
|
560
|
-
type: [String, Number],
|
|
560
|
+
type: [String, Number, null],
|
|
561
561
|
default: ""
|
|
562
562
|
},
|
|
563
563
|
options: {
|
|
@@ -592,8 +592,8 @@ const We = { key: 1 }, Oe = `
|
|
|
592
592
|
emits: ["update:modelValue"],
|
|
593
593
|
setup(d, { emit: r }) {
|
|
594
594
|
const e = d;
|
|
595
|
-
function
|
|
596
|
-
const f =
|
|
595
|
+
function l(b, v) {
|
|
596
|
+
const f = v.split(".").reduce((z, V) => {
|
|
597
597
|
if (!(z === null || typeof z != "object"))
|
|
598
598
|
return z[V];
|
|
599
599
|
}, b);
|
|
@@ -608,33 +608,33 @@ const We = { key: 1 }, Oe = `
|
|
|
608
608
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
609
609
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
610
610
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
611
|
-
},
|
|
611
|
+
}, h = {
|
|
612
612
|
all: "dk:rounded",
|
|
613
613
|
top: "dk:rounded-t",
|
|
614
614
|
bottom: "dk:rounded-b",
|
|
615
615
|
left: "dk:rounded-l",
|
|
616
616
|
right: "dk:rounded-r",
|
|
617
617
|
none: "dk:rounded-none"
|
|
618
|
-
}, p =
|
|
619
|
-
const b = w[e.size] || "",
|
|
620
|
-
return [
|
|
618
|
+
}, p = o(() => {
|
|
619
|
+
const b = w[e.size] || "", v = e.block ? "dk:w-full" : "", f = h[e.rounded] || "";
|
|
620
|
+
return [Ye, b, v, f].join(" ");
|
|
621
621
|
});
|
|
622
|
-
return (b,
|
|
622
|
+
return (b, v) => (t(), a("select", O(b.$attrs, {
|
|
623
623
|
class: p.value,
|
|
624
624
|
onChange: n
|
|
625
625
|
}), [
|
|
626
|
-
d.placeholder ? (t(), a("option",
|
|
626
|
+
d.placeholder ? (t(), a("option", Qe, j(d.placeholder), 1)) : S("", !0),
|
|
627
627
|
(t(!0), a(E, null, K(d.options, (f, z) => (t(), a("option", {
|
|
628
628
|
key: z,
|
|
629
|
-
value:
|
|
630
|
-
selected:
|
|
631
|
-
}, j(
|
|
629
|
+
value: l(f, d.itemValue) ?? "",
|
|
630
|
+
selected: l(f, d.itemValue) == d.modelValue
|
|
631
|
+
}, j(l(f, d.itemLabel) ?? ""), 9, Ge))), 128))
|
|
632
632
|
], 16));
|
|
633
633
|
}
|
|
634
634
|
}), Je = {
|
|
635
635
|
key: 1,
|
|
636
636
|
class: "dk:text-rose-500 dk:ml-1"
|
|
637
|
-
}, Xe = { 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" },
|
|
637
|
+
}, Xe = { 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" }, Ze = "dk:space-y-1", Re = /* @__PURE__ */ L({
|
|
638
638
|
__name: "DuiLabel",
|
|
639
639
|
props: {
|
|
640
640
|
title: {
|
|
@@ -663,7 +663,7 @@ const We = { key: 1 }, Oe = `
|
|
|
663
663
|
}
|
|
664
664
|
},
|
|
665
665
|
setup(d) {
|
|
666
|
-
const r =
|
|
666
|
+
const r = N(!1), e = d, l = {
|
|
667
667
|
s: "dk:text-sm",
|
|
668
668
|
m: "dk:text-base",
|
|
669
669
|
l: "dk:text-lg"
|
|
@@ -675,12 +675,12 @@ const We = { key: 1 }, Oe = `
|
|
|
675
675
|
s: "dk:text-xs",
|
|
676
676
|
m: "dk:text-sm",
|
|
677
677
|
l: "dk:text-base"
|
|
678
|
-
}, w =
|
|
679
|
-
const
|
|
680
|
-
return [f,
|
|
681
|
-
}), p =
|
|
682
|
-
return (
|
|
683
|
-
class:
|
|
678
|
+
}, w = o(() => [Ze].join(" ")), h = o(() => {
|
|
679
|
+
const v = l[e.size] || l.m, f = "dk:block dk:font-medium dk:text-zinc-700 dk:dark:text-zinc-200 dk:flex dk:items-center", z = e.helpText ? "dk:cursor-help" : "";
|
|
680
|
+
return [f, v, z].join(" ");
|
|
681
|
+
}), p = o(() => [g[e.size] || g.m].join(" ")), b = o(() => ["dk:text-rose-600 dk:dark:text-rose-400 dk:flex dk:items-center dk:mt-1", n[e.size] || n.m].join(" "));
|
|
682
|
+
return (v, f) => (t(), a("label", {
|
|
683
|
+
class: s(w.value)
|
|
684
684
|
}, [
|
|
685
685
|
d.title ? (t(), a("div", {
|
|
686
686
|
key: 0,
|
|
@@ -689,11 +689,11 @@ const We = { key: 1 }, Oe = `
|
|
|
689
689
|
onMouseleave: f[1] || (f[1] = (z) => r.value = !1)
|
|
690
690
|
}, [
|
|
691
691
|
m("div", {
|
|
692
|
-
class:
|
|
692
|
+
class: s(h.value)
|
|
693
693
|
}, [
|
|
694
694
|
d.icon ? (t(), a("i", {
|
|
695
695
|
key: 0,
|
|
696
|
-
class:
|
|
696
|
+
class: s([d.icon, "dk:mr-2"])
|
|
697
697
|
}, null, 2)) : S("", !0),
|
|
698
698
|
P(" " + j(d.title) + " ", 1),
|
|
699
699
|
d.required ? (t(), a("span", Je, "*")) : S("", !0)
|
|
@@ -706,13 +706,13 @@ const We = { key: 1 }, Oe = `
|
|
|
706
706
|
])
|
|
707
707
|
], 32)) : S("", !0),
|
|
708
708
|
m("div", {
|
|
709
|
-
class:
|
|
709
|
+
class: s(p.value)
|
|
710
710
|
}, [
|
|
711
|
-
_(
|
|
711
|
+
_(v.$slots, "default", {}, void 0, !0)
|
|
712
712
|
], 2),
|
|
713
713
|
d.error ? (t(), a("div", {
|
|
714
714
|
key: 1,
|
|
715
|
-
class:
|
|
715
|
+
class: s(b.value)
|
|
716
716
|
}, [
|
|
717
717
|
f[3] || (f[3] = m("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)),
|
|
718
718
|
P(" " + j(d.error), 1)
|
|
@@ -721,10 +721,10 @@ const We = { key: 1 }, Oe = `
|
|
|
721
721
|
}
|
|
722
722
|
}), ie = (d, r) => {
|
|
723
723
|
const e = d.__vccOpts || d;
|
|
724
|
-
for (const [
|
|
725
|
-
e[
|
|
724
|
+
for (const [l, g] of r)
|
|
725
|
+
e[l] = g;
|
|
726
726
|
return e;
|
|
727
|
-
},
|
|
727
|
+
}, _t = /* @__PURE__ */ ie(Re, [["__scopeId", "data-v-aa6b6cdc"]]), ed = { class: "dk:relative dk:inline-flex dk:items-center dk:flex-shrink-0" }, dd = ["checked", "disabled"], Lt = /* @__PURE__ */ L({
|
|
728
728
|
inheritAttrs: !1,
|
|
729
729
|
__name: "DuiCheckbox",
|
|
730
730
|
props: {
|
|
@@ -763,7 +763,7 @@ const We = { key: 1 }, Oe = `
|
|
|
763
763
|
},
|
|
764
764
|
emits: ["update:modelValue"],
|
|
765
765
|
setup(d, { emit: r }) {
|
|
766
|
-
const e = d,
|
|
766
|
+
const e = d, l = r, g = we(), n = {
|
|
767
767
|
sm: {
|
|
768
768
|
track: "dk:w-9 dk:h-5",
|
|
769
769
|
thumb: "dk:w-3.5 dk:h-3.5",
|
|
@@ -786,81 +786,81 @@ const We = { key: 1 }, Oe = `
|
|
|
786
786
|
left: "dk:rounded-l-full",
|
|
787
787
|
right: "dk:rounded-r-full",
|
|
788
788
|
none: "dk:rounded-none"
|
|
789
|
-
},
|
|
789
|
+
}, h = {
|
|
790
790
|
neutral: "dk:peer-checked:bg-zinc-500 dk:peer-checked:dark:bg-zinc-500",
|
|
791
791
|
primary: "dk:peer-checked:bg-slate-600 dk:peer-checked:dark:bg-slate-500",
|
|
792
792
|
secondary: "dk:peer-checked:bg-pink-600 dk:peer-checked:dark:bg-pink-500",
|
|
793
793
|
success: "dk:peer-checked:bg-emerald-600 dk:peer-checked:dark:bg-emerald-500",
|
|
794
794
|
warning: "dk:peer-checked:bg-amber-500 dk:peer-checked:dark:bg-amber-400",
|
|
795
795
|
danger: "dk:peer-checked:bg-rose-600 dk:peer-checked:dark:bg-rose-500"
|
|
796
|
-
}, p =
|
|
797
|
-
const
|
|
798
|
-
return ["dk:inline-flex dk:items-center dk:gap-3 dk:select-none",
|
|
799
|
-
}),
|
|
796
|
+
}, p = o(() => !!(e.label || g.default)), b = o(() => {
|
|
797
|
+
const y = e.block ? "dk:w-full dk:justify-between" : "", c = e.disabled ? "dk:opacity-60 dk:cursor-not-allowed" : "dk:cursor-pointer";
|
|
798
|
+
return ["dk:inline-flex dk:items-center dk:gap-3 dk:select-none", y, c].join(" ");
|
|
799
|
+
}), v = o(() => [
|
|
800
800
|
"dk:text-sm dk:leading-none dk:text-zinc-700 dk:dark:text-zinc-200",
|
|
801
801
|
e.disabled ? "dk:cursor-not-allowed" : "dk:cursor-pointer"
|
|
802
|
-
].join(" ")), f =
|
|
803
|
-
const
|
|
802
|
+
].join(" ")), f = o(() => {
|
|
803
|
+
const y = n[e.size] || n.md, c = w[e.rounded] || w.all, i = h[e.color] || h.primary;
|
|
804
804
|
return [
|
|
805
805
|
"dk:inline-flex dk:items-center dk:transition-colors dk:duration-200",
|
|
806
806
|
"dk:bg-zinc-300 dk:dark:bg-zinc-700",
|
|
807
807
|
"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",
|
|
808
808
|
"dk:peer-disabled:opacity-70",
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
809
|
+
y.track,
|
|
810
|
+
c,
|
|
811
|
+
i
|
|
812
812
|
].join(" ");
|
|
813
|
-
}), z =
|
|
814
|
-
const
|
|
813
|
+
}), z = o(() => {
|
|
814
|
+
const y = n[e.size] || n.md;
|
|
815
815
|
return [
|
|
816
816
|
"dk:absolute dk:left-1 dk:top-1/2 dk:-translate-y-1/2",
|
|
817
817
|
"dk:bg-white dk:dark:bg-zinc-100",
|
|
818
818
|
"dk:rounded-full dk:shadow-sm dk:transition-transform dk:duration-200",
|
|
819
819
|
"dk:pointer-events-none",
|
|
820
|
-
|
|
821
|
-
|
|
820
|
+
y.thumb,
|
|
821
|
+
y.translate
|
|
822
822
|
].join(" ");
|
|
823
823
|
});
|
|
824
|
-
function V(
|
|
825
|
-
const
|
|
826
|
-
|
|
824
|
+
function V(y) {
|
|
825
|
+
const c = y.target;
|
|
826
|
+
l("update:modelValue", c.checked);
|
|
827
827
|
}
|
|
828
|
-
return (
|
|
829
|
-
class:
|
|
828
|
+
return (y, c) => (t(), a("label", {
|
|
829
|
+
class: s(b.value)
|
|
830
830
|
}, [
|
|
831
831
|
p.value && d.labelPosition === "left" ? (t(), a("span", {
|
|
832
832
|
key: 0,
|
|
833
|
-
class:
|
|
833
|
+
class: s(v.value)
|
|
834
834
|
}, [
|
|
835
|
-
_(
|
|
835
|
+
_(y.$slots, "default", {}, () => [
|
|
836
836
|
P(j(d.label), 1)
|
|
837
837
|
])
|
|
838
838
|
], 2)) : S("", !0),
|
|
839
|
-
m("span",
|
|
839
|
+
m("span", ed, [
|
|
840
840
|
m("input", O({
|
|
841
841
|
type: "checkbox",
|
|
842
842
|
class: "dk:sr-only dk:peer",
|
|
843
843
|
checked: d.modelValue,
|
|
844
844
|
disabled: d.disabled
|
|
845
|
-
},
|
|
845
|
+
}, y.$attrs, { onChange: V }), null, 16, dd),
|
|
846
846
|
m("span", {
|
|
847
|
-
class:
|
|
847
|
+
class: s(f.value)
|
|
848
848
|
}, null, 2),
|
|
849
849
|
m("span", {
|
|
850
|
-
class:
|
|
850
|
+
class: s(z.value)
|
|
851
851
|
}, null, 2)
|
|
852
852
|
]),
|
|
853
853
|
p.value && d.labelPosition === "right" ? (t(), a("span", {
|
|
854
854
|
key: 1,
|
|
855
|
-
class:
|
|
855
|
+
class: s(v.value)
|
|
856
856
|
}, [
|
|
857
|
-
_(
|
|
857
|
+
_(y.$slots, "default", {}, () => [
|
|
858
858
|
P(j(d.label), 1)
|
|
859
859
|
])
|
|
860
860
|
], 2)) : S("", !0)
|
|
861
861
|
], 2));
|
|
862
862
|
}
|
|
863
|
-
}),
|
|
863
|
+
}), td = ["aria-labelledby"], rd = ["id"], ad = { class: "dk:relative dk:inline-flex dk:flex-shrink-0" }, od = ["name", "value", "checked", "disabled", "onChange"], Pt = /* @__PURE__ */ L({
|
|
864
864
|
inheritAttrs: !1,
|
|
865
865
|
__name: "DuiRadio",
|
|
866
866
|
props: {
|
|
@@ -876,15 +876,15 @@ const We = { key: 1 }, Oe = `
|
|
|
876
876
|
},
|
|
877
877
|
emits: ["update:modelValue", "change"],
|
|
878
878
|
setup(d, { emit: r }) {
|
|
879
|
-
const e = d,
|
|
880
|
-
function n(
|
|
881
|
-
|
|
879
|
+
const e = d, l = r, g = Math.random().toString(36).slice(2, 8);
|
|
880
|
+
function n(C) {
|
|
881
|
+
l("update:modelValue", C), l("change", C);
|
|
882
882
|
}
|
|
883
883
|
const w = {
|
|
884
884
|
sm: { radio: "dk:w-3.5 dk:h-3.5", dot: "dk:w-1.5 dk:h-1.5", label: "dk:text-xs", description: "dk:text-xs" },
|
|
885
885
|
md: { radio: "dk:w-4 dk:h-4", dot: "dk:w-2 dk:h-2", label: "dk:text-sm", description: "dk:text-xs" },
|
|
886
886
|
lg: { radio: "dk:w-5 dk:h-5", dot: "dk:w-2.5 dk:h-2.5", label: "dk:text-base", description: "dk:text-sm" }
|
|
887
|
-
},
|
|
887
|
+
}, h = {
|
|
888
888
|
neutral: "dk:peer-checked:border-zinc-600 dk:dark:peer-checked:border-zinc-400",
|
|
889
889
|
primary: "dk:peer-checked:border-slate-600 dk:dark:peer-checked:border-slate-400",
|
|
890
890
|
secondary: "dk:peer-checked:border-pink-600 dk:dark:peer-checked:border-pink-400",
|
|
@@ -905,88 +905,88 @@ const We = { key: 1 }, Oe = `
|
|
|
905
905
|
success: "dk:peer-focus-visible:ring-emerald-400",
|
|
906
906
|
warning: "dk:peer-focus-visible:ring-amber-400",
|
|
907
907
|
danger: "dk:peer-focus-visible:ring-rose-400"
|
|
908
|
-
},
|
|
909
|
-
function z(
|
|
910
|
-
const
|
|
911
|
-
return ["dk:inline-flex dk:items-start dk:gap-3 dk:select-none",
|
|
908
|
+
}, v = o(() => [e.orientation === "horizontal" ? "dk:flex dk:flex-row dk:flex-wrap dk:gap-x-5 dk:gap-y-3" : "dk:flex dk:flex-col dk:gap-3"].join(" ")), f = o(() => "dk:block dk:text-xs dk:font-semibold dk:uppercase dk:tracking-wide dk:text-zinc-500 dk:dark:text-zinc-400 dk:mb-1");
|
|
909
|
+
function z(C, k) {
|
|
910
|
+
const $ = k || e.disabled ? "dk:opacity-50 dk:cursor-not-allowed" : "dk:cursor-pointer", D = e.block ? "dk:w-full dk:justify-between" : "";
|
|
911
|
+
return ["dk:inline-flex dk:items-start dk:gap-3 dk:select-none", $, D].join(" ");
|
|
912
912
|
}
|
|
913
|
-
function V(
|
|
914
|
-
const
|
|
913
|
+
function V(C) {
|
|
914
|
+
const k = w[e.size], u = h[e.color], $ = b[e.color];
|
|
915
915
|
return [
|
|
916
916
|
"dk:rounded-full dk:border-2 dk:transition-colors dk:duration-150",
|
|
917
917
|
"dk:border-zinc-300 dk:dark:border-zinc-600",
|
|
918
918
|
"dk:peer-focus-visible:outline-none dk:peer-focus-visible:ring-2 dk:peer-focus-visible:ring-offset-2",
|
|
919
919
|
"dk:bg-white dk:dark:bg-zinc-900",
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
920
|
+
k.radio,
|
|
921
|
+
u,
|
|
922
|
+
$
|
|
923
923
|
].join(" ");
|
|
924
924
|
}
|
|
925
|
-
const
|
|
926
|
-
const
|
|
925
|
+
const y = o(() => {
|
|
926
|
+
const C = w[e.size], k = p[e.color];
|
|
927
927
|
return [
|
|
928
928
|
"dk:absolute dk:inset-0 dk:m-auto dk:rounded-full dk:scale-0 dk:peer-checked:scale-100 dk:transition-transform dk:duration-150 dk:pointer-events-none",
|
|
929
|
-
|
|
930
|
-
|
|
929
|
+
C.dot,
|
|
930
|
+
k
|
|
931
931
|
].join(" ");
|
|
932
|
-
}),
|
|
933
|
-
return (
|
|
934
|
-
class:
|
|
932
|
+
}), c = o(() => "dk:flex dk:flex-col"), i = o(() => [w[e.size].label, "dk:leading-snug dk:text-zinc-800 dk:dark:text-zinc-200"].join(" ")), x = o(() => [w[e.size].description, "dk:leading-snug dk:text-zinc-500 dk:dark:text-zinc-400 dk:mt-0.5"].join(" "));
|
|
933
|
+
return (C, k) => (t(), a("div", {
|
|
934
|
+
class: s(v.value),
|
|
935
935
|
role: "radiogroup",
|
|
936
|
-
"aria-labelledby": d.groupLabel ? `rg-label-${
|
|
936
|
+
"aria-labelledby": d.groupLabel ? `rg-label-${R(g)}` : void 0
|
|
937
937
|
}, [
|
|
938
938
|
d.groupLabel ? (t(), a("span", {
|
|
939
939
|
key: 0,
|
|
940
|
-
id: `rg-label-${
|
|
941
|
-
class:
|
|
942
|
-
}, j(d.groupLabel), 11,
|
|
943
|
-
(t(!0), a(E, null, K(d.options, (
|
|
944
|
-
key:
|
|
945
|
-
class:
|
|
940
|
+
id: `rg-label-${R(g)}`,
|
|
941
|
+
class: s(f.value)
|
|
942
|
+
}, j(d.groupLabel), 11, rd)) : S("", !0),
|
|
943
|
+
(t(!0), a(E, null, K(d.options, (u) => (t(), a("label", {
|
|
944
|
+
key: u.value,
|
|
945
|
+
class: s(z(u.value, u.disabled))
|
|
946
946
|
}, [
|
|
947
|
-
m("span",
|
|
947
|
+
m("span", ad, [
|
|
948
948
|
m("input", O({
|
|
949
949
|
type: "radio",
|
|
950
950
|
class: "dk:sr-only dk:peer",
|
|
951
951
|
name: d.name,
|
|
952
|
-
value:
|
|
953
|
-
checked: d.modelValue ===
|
|
954
|
-
disabled:
|
|
955
|
-
}, { ref_for: !0 },
|
|
956
|
-
onChange: (
|
|
957
|
-
}), null, 16,
|
|
952
|
+
value: u.value,
|
|
953
|
+
checked: d.modelValue === u.value,
|
|
954
|
+
disabled: u.disabled || d.disabled
|
|
955
|
+
}, { ref_for: !0 }, C.$attrs, {
|
|
956
|
+
onChange: ($) => n(u.value)
|
|
957
|
+
}), null, 16, od),
|
|
958
958
|
m("span", {
|
|
959
|
-
class:
|
|
959
|
+
class: s(V(u.value))
|
|
960
960
|
}, null, 2),
|
|
961
961
|
m("span", {
|
|
962
|
-
class:
|
|
962
|
+
class: s(y.value)
|
|
963
963
|
}, null, 2)
|
|
964
964
|
]),
|
|
965
965
|
m("span", {
|
|
966
|
-
class: c
|
|
966
|
+
class: s(c.value)
|
|
967
967
|
}, [
|
|
968
968
|
m("span", {
|
|
969
|
-
class:
|
|
970
|
-
}, j(
|
|
971
|
-
|
|
969
|
+
class: s(i.value)
|
|
970
|
+
}, j(u.label), 3),
|
|
971
|
+
u.description ? (t(), a("span", {
|
|
972
972
|
key: 0,
|
|
973
|
-
class:
|
|
974
|
-
}, j(
|
|
973
|
+
class: s(x.value)
|
|
974
|
+
}, j(u.description), 3)) : S("", !0)
|
|
975
975
|
], 2)
|
|
976
976
|
], 2))), 128))
|
|
977
|
-
], 10,
|
|
977
|
+
], 10, td));
|
|
978
978
|
}
|
|
979
|
-
}),
|
|
979
|
+
}), kd = { class: "dk:relative dk:inline-flex dk:items-center dk:flex-shrink-0" }, nd = ["aria-checked", "checked", "disabled"], sd = {
|
|
980
980
|
key: 0,
|
|
981
981
|
viewBox: "0 0 12 12",
|
|
982
982
|
fill: "currentColor",
|
|
983
983
|
class: "dk:w-2.5 dk:h-2.5"
|
|
984
|
-
},
|
|
984
|
+
}, ld = {
|
|
985
985
|
key: 1,
|
|
986
986
|
viewBox: "0 0 12 12",
|
|
987
987
|
fill: "none",
|
|
988
988
|
class: "dk:w-2.5 dk:h-2.5"
|
|
989
|
-
},
|
|
989
|
+
}, id = /* @__PURE__ */ L({
|
|
990
990
|
inheritAttrs: !1,
|
|
991
991
|
__name: "DuiSwitch",
|
|
992
992
|
props: {
|
|
@@ -1029,7 +1029,7 @@ const We = { key: 1 }, Oe = `
|
|
|
1029
1029
|
},
|
|
1030
1030
|
emits: ["update:modelValue", "change"],
|
|
1031
1031
|
setup(d, { emit: r }) {
|
|
1032
|
-
const e = d,
|
|
1032
|
+
const e = d, l = r, g = we(), n = {
|
|
1033
1033
|
sm: {
|
|
1034
1034
|
track: "dk:w-8 dk:h-4",
|
|
1035
1035
|
thumb: "dk:w-3 dk:h-3",
|
|
@@ -1055,33 +1055,33 @@ const We = { key: 1 }, Oe = `
|
|
|
1055
1055
|
success: "dk:peer-checked:bg-emerald-600 dk:dark:peer-checked:bg-emerald-500",
|
|
1056
1056
|
warning: "dk:peer-checked:bg-amber-500 dk:dark:peer-checked:bg-amber-400",
|
|
1057
1057
|
danger: "dk:peer-checked:bg-rose-600 dk:dark:peer-checked:bg-rose-500"
|
|
1058
|
-
},
|
|
1059
|
-
const
|
|
1060
|
-
return [x, "dk:items-center dk:gap-3 dk:select-none",
|
|
1061
|
-
}), b =
|
|
1058
|
+
}, h = o(() => !!(e.label || g.default)), p = o(() => {
|
|
1059
|
+
const i = e.block ? "dk:w-full dk:justify-between" : "", x = e.block ? "dk:flex" : "dk:inline-flex", C = e.disabled ? "dk:opacity-60 dk:cursor-not-allowed" : "dk:cursor-pointer";
|
|
1060
|
+
return [x, "dk:items-center dk:gap-3 dk:select-none", i, C].join(" ");
|
|
1061
|
+
}), b = o(() => [
|
|
1062
1062
|
"dk:flex dk:flex-col",
|
|
1063
1063
|
"dk:text-sm dk:leading-snug dk:text-zinc-700 dk:dark:text-zinc-200",
|
|
1064
1064
|
e.disabled ? "dk:cursor-not-allowed" : "dk:cursor-pointer"
|
|
1065
|
-
].join(" ")),
|
|
1066
|
-
const
|
|
1065
|
+
].join(" ")), v = o(() => "dk:text-xs dk:text-zinc-500 dk:dark:text-zinc-400 dk:mt-0.5"), f = o(() => {
|
|
1066
|
+
const i = n[e.size], x = w[e.color];
|
|
1067
1067
|
return [
|
|
1068
1068
|
"dk:relative dk:inline-flex dk:items-center dk:transition-colors dk:duration-200 dk:rounded-full",
|
|
1069
1069
|
"dk:bg-zinc-300 dk:dark:bg-zinc-600",
|
|
1070
1070
|
"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",
|
|
1071
1071
|
"dk:peer-disabled:opacity-70",
|
|
1072
|
-
|
|
1072
|
+
i.track,
|
|
1073
1073
|
x
|
|
1074
1074
|
].join(" ");
|
|
1075
|
-
}), z =
|
|
1076
|
-
const
|
|
1075
|
+
}), z = o(() => {
|
|
1076
|
+
const i = n[e.size];
|
|
1077
1077
|
return [
|
|
1078
1078
|
"dk:absolute",
|
|
1079
|
-
|
|
1079
|
+
i.offset,
|
|
1080
1080
|
"dk:bg-white dk:dark:bg-zinc-100",
|
|
1081
1081
|
"dk:rounded-full dk:shadow-sm dk:transition-all dk:duration-200",
|
|
1082
1082
|
"dk:pointer-events-none dk:flex dk:items-center dk:justify-center",
|
|
1083
|
-
|
|
1084
|
-
|
|
1083
|
+
i.thumb,
|
|
1084
|
+
i.translate
|
|
1085
1085
|
].join(" ");
|
|
1086
1086
|
}), V = {
|
|
1087
1087
|
neutral: "dk:text-zinc-600 dk:dark:text-zinc-400",
|
|
@@ -1090,27 +1090,27 @@ const We = { key: 1 }, Oe = `
|
|
|
1090
1090
|
success: "dk:text-emerald-600 dk:dark:text-emerald-400",
|
|
1091
1091
|
warning: "dk:text-amber-600 dk:dark:text-amber-400",
|
|
1092
1092
|
danger: "dk:text-rose-600 dk:dark:text-rose-400"
|
|
1093
|
-
},
|
|
1094
|
-
function
|
|
1095
|
-
const x =
|
|
1096
|
-
|
|
1093
|
+
}, y = o(() => e.modelValue ? V[e.color] : "dk:text-zinc-400 dk:dark:text-zinc-500");
|
|
1094
|
+
function c(i) {
|
|
1095
|
+
const x = i.target;
|
|
1096
|
+
l("update:modelValue", x.checked), l("change", x.checked);
|
|
1097
1097
|
}
|
|
1098
|
-
return (
|
|
1099
|
-
class:
|
|
1098
|
+
return (i, x) => (t(), a("label", {
|
|
1099
|
+
class: s(p.value)
|
|
1100
1100
|
}, [
|
|
1101
|
-
|
|
1101
|
+
h.value && d.labelPosition === "left" ? (t(), a("span", {
|
|
1102
1102
|
key: 0,
|
|
1103
|
-
class:
|
|
1103
|
+
class: s(b.value)
|
|
1104
1104
|
}, [
|
|
1105
|
-
_(
|
|
1105
|
+
_(i.$slots, "default", {}, () => [
|
|
1106
1106
|
P(j(d.label), 1)
|
|
1107
1107
|
]),
|
|
1108
1108
|
d.description ? (t(), a("span", {
|
|
1109
1109
|
key: 0,
|
|
1110
|
-
class:
|
|
1110
|
+
class: s(v.value)
|
|
1111
1111
|
}, j(d.description), 3)) : S("", !0)
|
|
1112
1112
|
], 2)) : S("", !0),
|
|
1113
|
-
m("span",
|
|
1113
|
+
m("span", kd, [
|
|
1114
1114
|
m("input", O({
|
|
1115
1115
|
type: "checkbox",
|
|
1116
1116
|
class: "dk:sr-only dk:peer",
|
|
@@ -1118,19 +1118,19 @@ const We = { key: 1 }, Oe = `
|
|
|
1118
1118
|
"aria-checked": d.modelValue,
|
|
1119
1119
|
checked: d.modelValue,
|
|
1120
1120
|
disabled: d.disabled
|
|
1121
|
-
},
|
|
1121
|
+
}, i.$attrs, { onChange: c }), null, 16, nd),
|
|
1122
1122
|
m("span", {
|
|
1123
|
-
class:
|
|
1123
|
+
class: s(f.value)
|
|
1124
1124
|
}, null, 2),
|
|
1125
1125
|
m("span", {
|
|
1126
|
-
class:
|
|
1126
|
+
class: s(z.value)
|
|
1127
1127
|
}, [
|
|
1128
1128
|
d.showIcons ? (t(), a("span", {
|
|
1129
1129
|
key: 0,
|
|
1130
1130
|
"aria-hidden": "true",
|
|
1131
|
-
class:
|
|
1131
|
+
class: s(y.value)
|
|
1132
1132
|
}, [
|
|
1133
|
-
d.modelValue ? (t(), a("svg",
|
|
1133
|
+
d.modelValue ? (t(), a("svg", sd, [...x[0] || (x[0] = [
|
|
1134
1134
|
m("path", {
|
|
1135
1135
|
d: "M3.5 6.5l2 2 3-3",
|
|
1136
1136
|
stroke: "currentColor",
|
|
@@ -1139,7 +1139,7 @@ const We = { key: 1 }, Oe = `
|
|
|
1139
1139
|
"stroke-linejoin": "round",
|
|
1140
1140
|
fill: "none"
|
|
1141
1141
|
}, null, -1)
|
|
1142
|
-
])])) : (t(), a("svg",
|
|
1142
|
+
])])) : (t(), a("svg", ld, [...x[1] || (x[1] = [
|
|
1143
1143
|
m("line", {
|
|
1144
1144
|
x1: "3",
|
|
1145
1145
|
y1: "3",
|
|
@@ -1162,27 +1162,122 @@ const We = { key: 1 }, Oe = `
|
|
|
1162
1162
|
], 2)) : S("", !0)
|
|
1163
1163
|
], 2)
|
|
1164
1164
|
]),
|
|
1165
|
-
|
|
1165
|
+
h.value && d.labelPosition === "right" ? (t(), a("span", {
|
|
1166
1166
|
key: 1,
|
|
1167
|
-
class:
|
|
1167
|
+
class: s(b.value)
|
|
1168
1168
|
}, [
|
|
1169
|
-
_(
|
|
1169
|
+
_(i.$slots, "default", {}, () => [
|
|
1170
1170
|
P(j(d.label), 1)
|
|
1171
1171
|
]),
|
|
1172
1172
|
d.description ? (t(), a("span", {
|
|
1173
1173
|
key: 0,
|
|
1174
|
-
class:
|
|
1174
|
+
class: s(v.value)
|
|
1175
1175
|
}, j(d.description), 3)) : S("", !0)
|
|
1176
1176
|
], 2)) : S("", !0)
|
|
1177
1177
|
], 2));
|
|
1178
1178
|
}
|
|
1179
|
-
}),
|
|
1179
|
+
}), cd = ["novalidate", "method", "action", "aria-busy"], ud = ["disabled"], It = /* @__PURE__ */ L({
|
|
1180
|
+
__name: "DuiForm",
|
|
1181
|
+
props: {
|
|
1182
|
+
novalidate: { type: Boolean, default: !1 },
|
|
1183
|
+
loading: { type: Boolean, default: !1 },
|
|
1184
|
+
disabled: { type: Boolean, default: !1 },
|
|
1185
|
+
method: { default: void 0 },
|
|
1186
|
+
action: { default: void 0 },
|
|
1187
|
+
gap: { default: "md" }
|
|
1188
|
+
},
|
|
1189
|
+
emits: ["submit", "reset"],
|
|
1190
|
+
setup(d, { emit: r }) {
|
|
1191
|
+
const e = d, l = r, g = Symbol("DuiForm");
|
|
1192
|
+
Ie(g, {
|
|
1193
|
+
loading: o(() => e.loading),
|
|
1194
|
+
disabled: o(() => e.disabled)
|
|
1195
|
+
});
|
|
1196
|
+
function n(y) {
|
|
1197
|
+
const c = y.target, i = new FormData(c);
|
|
1198
|
+
l("submit", { formData: i, event: y });
|
|
1199
|
+
}
|
|
1200
|
+
function w(y) {
|
|
1201
|
+
l("reset", y);
|
|
1202
|
+
}
|
|
1203
|
+
const h = {
|
|
1204
|
+
sm: "dk:space-y-3",
|
|
1205
|
+
md: "dk:space-y-5",
|
|
1206
|
+
lg: "dk:space-y-7"
|
|
1207
|
+
}, p = o(() => [
|
|
1208
|
+
"dk:relative",
|
|
1209
|
+
e.disabled && !e.loading ? "dk:opacity-60 dk:pointer-events-none" : ""
|
|
1210
|
+
].filter(Boolean).join(" ")), b = o(() => [
|
|
1211
|
+
"dk:mb-5",
|
|
1212
|
+
"dk:pb-4",
|
|
1213
|
+
"dk:border-b dk:border-zinc-200 dk:dark:border-zinc-700"
|
|
1214
|
+
].join(" ")), v = o(() => h[e.gap] || h.md), f = o(() => [
|
|
1215
|
+
"dk:mt-6",
|
|
1216
|
+
"dk:pt-4",
|
|
1217
|
+
"dk:border-t dk:border-zinc-200 dk:dark:border-zinc-700",
|
|
1218
|
+
"dk:flex dk:items-center dk:gap-3"
|
|
1219
|
+
].join(" ")), z = o(() => [
|
|
1220
|
+
"dk:absolute dk:inset-0",
|
|
1221
|
+
"dk:flex dk:items-center dk:justify-center",
|
|
1222
|
+
"dk:bg-white/60 dk:dark:bg-zinc-900/60",
|
|
1223
|
+
"dk:rounded",
|
|
1224
|
+
"dk:z-10"
|
|
1225
|
+
].join(" ")), V = o(() => [
|
|
1226
|
+
"dk:w-6 dk:h-6",
|
|
1227
|
+
"dk:border-2 dk:border-zinc-300 dk:dark:border-zinc-600",
|
|
1228
|
+
"dk:border-t-zinc-700 dk:dark:border-t-zinc-200",
|
|
1229
|
+
"dk:rounded-full",
|
|
1230
|
+
"dk:animate-spin"
|
|
1231
|
+
].join(" "));
|
|
1232
|
+
return (y, c) => (t(), a("form", {
|
|
1233
|
+
novalidate: d.novalidate,
|
|
1234
|
+
method: d.method,
|
|
1235
|
+
action: d.action,
|
|
1236
|
+
class: s(p.value),
|
|
1237
|
+
"aria-busy": d.loading,
|
|
1238
|
+
onSubmit: G(n, ["prevent"]),
|
|
1239
|
+
onReset: G(w, ["prevent"])
|
|
1240
|
+
}, [
|
|
1241
|
+
y.$slots.header ? (t(), a("div", {
|
|
1242
|
+
key: 0,
|
|
1243
|
+
class: s(b.value)
|
|
1244
|
+
}, [
|
|
1245
|
+
_(y.$slots, "header")
|
|
1246
|
+
], 2)) : S("", !0),
|
|
1247
|
+
m("fieldset", {
|
|
1248
|
+
disabled: d.loading || d.disabled,
|
|
1249
|
+
class: "dk:border-0 dk:p-0 dk:m-0 dk:min-w-0"
|
|
1250
|
+
}, [
|
|
1251
|
+
m("div", {
|
|
1252
|
+
class: s(v.value)
|
|
1253
|
+
}, [
|
|
1254
|
+
_(y.$slots, "default")
|
|
1255
|
+
], 2)
|
|
1256
|
+
], 8, ud),
|
|
1257
|
+
y.$slots.footer ? (t(), a("div", {
|
|
1258
|
+
key: 1,
|
|
1259
|
+
class: s(f.value)
|
|
1260
|
+
}, [
|
|
1261
|
+
_(y.$slots, "footer")
|
|
1262
|
+
], 2)) : S("", !0),
|
|
1263
|
+
d.loading ? (t(), a("div", {
|
|
1264
|
+
key: 2,
|
|
1265
|
+
class: s(z.value),
|
|
1266
|
+
"aria-hidden": "true"
|
|
1267
|
+
}, [
|
|
1268
|
+
m("span", {
|
|
1269
|
+
class: s(V.value)
|
|
1270
|
+
}, null, 2)
|
|
1271
|
+
], 2)) : S("", !0)
|
|
1272
|
+
], 42, cd));
|
|
1273
|
+
}
|
|
1274
|
+
}), bd = `
|
|
1180
1275
|
dk:px-4
|
|
1181
1276
|
dk:py-3
|
|
1182
1277
|
dk:text-sm
|
|
1183
1278
|
dk:leading-relaxed
|
|
1184
1279
|
dk:max-w-full
|
|
1185
|
-
`,
|
|
1280
|
+
`, At = /* @__PURE__ */ L({
|
|
1186
1281
|
__name: "DuiAlert",
|
|
1187
1282
|
props: {
|
|
1188
1283
|
variant: {
|
|
@@ -1206,7 +1301,7 @@ const We = { key: 1 }, Oe = `
|
|
|
1206
1301
|
left: "dk:rounded-l",
|
|
1207
1302
|
right: "dk:rounded-r",
|
|
1208
1303
|
none: "dk:rounded-none"
|
|
1209
|
-
},
|
|
1304
|
+
}, l = {
|
|
1210
1305
|
solid: {
|
|
1211
1306
|
base: "",
|
|
1212
1307
|
neutral: "dk:bg-zinc-200 dk:text-zinc-800 dk:dark:bg-zinc-700 dk:dark:text-zinc-100",
|
|
@@ -1234,22 +1329,22 @@ const We = { key: 1 }, Oe = `
|
|
|
1234
1329
|
warning: "dk:text-amber-700 dk:dark:text-amber-200 dk:bg-amber-50 dk:dark:bg-amber-800",
|
|
1235
1330
|
danger: "dk:text-rose-700 dk:dark:text-rose-200 dk:bg-rose-50 dk:dark:bg-rose-800"
|
|
1236
1331
|
}
|
|
1237
|
-
}, g =
|
|
1332
|
+
}, g = o(() => {
|
|
1238
1333
|
var p;
|
|
1239
|
-
const n = ((p =
|
|
1240
|
-
return [
|
|
1334
|
+
const n = ((p = l[r.variant]) == null ? void 0 : p[r.color]) || "", w = l[r.variant].base || "", h = e[r.rounded] || "";
|
|
1335
|
+
return [bd, w, n, h].join(" ");
|
|
1241
1336
|
});
|
|
1242
1337
|
return (n, w) => (t(), a("div", {
|
|
1243
|
-
class:
|
|
1338
|
+
class: s(g.value),
|
|
1244
1339
|
role: "alert"
|
|
1245
1340
|
}, [
|
|
1246
1341
|
_(n.$slots, "default")
|
|
1247
1342
|
], 2));
|
|
1248
1343
|
}
|
|
1249
|
-
}),
|
|
1344
|
+
}), pd = { class: "dk:relative dk:overflow-x-auto dk:shadow-md dk:sm:rounded-lg" }, md = { class: "dk:w-full dk:text-sm dk:text-left dk:text-gray-700 dk:dark:text-gray-300" }, fd = { class: "dk:text-xs dk:uppercase dk:bg-gray-100 dk:dark:bg-gray-700 dk:dark:text-gray-200 dk:relative" }, gd = { key: 0 }, xd = ["colspan"], hd = {
|
|
1250
1345
|
key: 0,
|
|
1251
1346
|
class: "dk:bg-gray-50 dk:dark:bg-gray-700 dk:border-t dk:border-gray-200 dk:dark:border-gray-600"
|
|
1252
|
-
},
|
|
1347
|
+
}, vd = ["colspan"], yd = { class: "pagination-container" }, wd = { class: "pagination-info" }, zd = { class: "pagination-buttons" }, Cd = { class: "page-numbers" }, $d = ["onClick"], Sd = /* @__PURE__ */ L({
|
|
1253
1348
|
__name: "DuiTable",
|
|
1254
1349
|
props: {
|
|
1255
1350
|
columns: {
|
|
@@ -1271,61 +1366,61 @@ const We = { key: 1 }, Oe = `
|
|
|
1271
1366
|
},
|
|
1272
1367
|
emits: ["paginate"],
|
|
1273
1368
|
setup(d, { emit: r }) {
|
|
1274
|
-
const e = d,
|
|
1369
|
+
const e = d, l = r, g = o(() => e.pagination ? Math.ceil(e.pagination.total / e.pagination.perPage) : 0), n = o(() => {
|
|
1275
1370
|
if (!e.pagination) return [];
|
|
1276
|
-
const
|
|
1277
|
-
let f = Math.max(1, b - Math.floor(p / 2)), z = Math.min(
|
|
1371
|
+
const h = [], p = 5, { page: b } = e.pagination, v = g.value;
|
|
1372
|
+
let f = Math.max(1, b - Math.floor(p / 2)), z = Math.min(v, f + p - 1);
|
|
1278
1373
|
z - f < p - 1 && (f = Math.max(1, z - p + 1));
|
|
1279
1374
|
for (let V = f; V <= z; V++)
|
|
1280
|
-
|
|
1281
|
-
return
|
|
1282
|
-
}), w = (
|
|
1283
|
-
e.pagination &&
|
|
1375
|
+
h.push(V);
|
|
1376
|
+
return h;
|
|
1377
|
+
}), w = (h) => {
|
|
1378
|
+
e.pagination && h >= 1 && h <= g.value && l("paginate", h);
|
|
1284
1379
|
};
|
|
1285
|
-
return (
|
|
1286
|
-
m("table",
|
|
1287
|
-
m("thead",
|
|
1380
|
+
return (h, p) => (t(), a("div", pd, [
|
|
1381
|
+
m("table", md, [
|
|
1382
|
+
m("thead", fd, [
|
|
1288
1383
|
m("tr", null, [
|
|
1289
1384
|
(t(!0), a(E, null, K(e.columns, (b) => (t(), a("th", {
|
|
1290
1385
|
key: b.name,
|
|
1291
|
-
class:
|
|
1386
|
+
class: s(["dk:px-6 dk:py-3", b.classes])
|
|
1292
1387
|
}, j(b.label), 3))), 128))
|
|
1293
1388
|
]),
|
|
1294
|
-
e.loading ? (t(), a("tr",
|
|
1389
|
+
e.loading ? (t(), a("tr", gd, [
|
|
1295
1390
|
m("td", {
|
|
1296
1391
|
colspan: e.columns.length,
|
|
1297
1392
|
class: "dk:p-0"
|
|
1298
1393
|
}, [...p[2] || (p[2] = [
|
|
1299
1394
|
m("div", { class: "loading-bar" }, null, -1)
|
|
1300
|
-
])], 8,
|
|
1395
|
+
])], 8, xd)
|
|
1301
1396
|
])) : S("", !0)
|
|
1302
1397
|
]),
|
|
1303
1398
|
m("tbody", {
|
|
1304
|
-
class:
|
|
1399
|
+
class: s({ "is-loading": e.loading })
|
|
1305
1400
|
}, [
|
|
1306
|
-
(t(!0), a(E, null, K(e.rows, (b,
|
|
1307
|
-
key:
|
|
1401
|
+
(t(!0), a(E, null, K(e.rows, (b, v) => (t(), a("tr", {
|
|
1402
|
+
key: v,
|
|
1308
1403
|
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"
|
|
1309
1404
|
}, [
|
|
1310
1405
|
(t(!0), a(E, null, K(e.columns, (f) => (t(), a("td", {
|
|
1311
1406
|
key: f.name,
|
|
1312
1407
|
class: "dk:px-6 dk:py-4 dk:text-gray-900 dk:dark:text-gray-100"
|
|
1313
1408
|
}, [
|
|
1314
|
-
_(
|
|
1409
|
+
_(h.$slots, f.name, O({ ref_for: !0 }, b), () => [
|
|
1315
1410
|
P(j(b[f.name]), 1)
|
|
1316
1411
|
], !0)
|
|
1317
1412
|
]))), 128))
|
|
1318
1413
|
]))), 128))
|
|
1319
1414
|
], 2),
|
|
1320
|
-
e.pagination ? (t(), a("tfoot",
|
|
1415
|
+
e.pagination ? (t(), a("tfoot", hd, [
|
|
1321
1416
|
m("tr", null, [
|
|
1322
1417
|
m("td", {
|
|
1323
1418
|
colspan: e.columns.length,
|
|
1324
1419
|
class: "dk:px-6 dk:py-4"
|
|
1325
1420
|
}, [
|
|
1326
|
-
m("div",
|
|
1327
|
-
m("div",
|
|
1328
|
-
m("div",
|
|
1421
|
+
m("div", yd, [
|
|
1422
|
+
m("div", wd, " Página " + j(e.pagination.page) + " de " + j(g.value) + " | " + j(e.pagination.total) + " registros ", 1),
|
|
1423
|
+
m("div", zd, [
|
|
1329
1424
|
J(oe, {
|
|
1330
1425
|
variant: "outline",
|
|
1331
1426
|
color: "neutral",
|
|
@@ -1338,12 +1433,12 @@ const We = { key: 1 }, Oe = `
|
|
|
1338
1433
|
])]),
|
|
1339
1434
|
_: 1
|
|
1340
1435
|
}, 8, ["disabled"]),
|
|
1341
|
-
m("div",
|
|
1436
|
+
m("div", Cd, [
|
|
1342
1437
|
(t(!0), a(E, null, K(n.value, (b) => (t(), a("button", {
|
|
1343
1438
|
key: b,
|
|
1344
|
-
onClick: (
|
|
1345
|
-
class:
|
|
1346
|
-
}, j(b), 11,
|
|
1439
|
+
onClick: (v) => w(b),
|
|
1440
|
+
class: s(["page-number", { active: b === e.pagination.page }])
|
|
1441
|
+
}, j(b), 11, $d))), 128))
|
|
1347
1442
|
]),
|
|
1348
1443
|
J(oe, {
|
|
1349
1444
|
variant: "outline",
|
|
@@ -1359,13 +1454,13 @@ const We = { key: 1 }, Oe = `
|
|
|
1359
1454
|
}, 8, ["disabled"])
|
|
1360
1455
|
])
|
|
1361
1456
|
])
|
|
1362
|
-
], 8,
|
|
1457
|
+
], 8, vd)
|
|
1363
1458
|
])
|
|
1364
1459
|
])) : S("", !0)
|
|
1365
1460
|
])
|
|
1366
1461
|
]));
|
|
1367
1462
|
}
|
|
1368
|
-
}),
|
|
1463
|
+
}), Et = /* @__PURE__ */ ie(Sd, [["__scopeId", "data-v-60002528"]]), jd = { key: 1 }, Vd = `
|
|
1369
1464
|
dk:transition
|
|
1370
1465
|
dk:text-center
|
|
1371
1466
|
dk:disabled:opacity-50
|
|
@@ -1376,7 +1471,7 @@ const We = { key: 1 }, Oe = `
|
|
|
1376
1471
|
dk:text-ellipsis
|
|
1377
1472
|
dk:whitespace-nowrap
|
|
1378
1473
|
dk:active:scale-95
|
|
1379
|
-
dk:max-w-full`,
|
|
1474
|
+
dk:max-w-full`, Wt = /* @__PURE__ */ L({
|
|
1380
1475
|
__name: "DuiAction",
|
|
1381
1476
|
props: {
|
|
1382
1477
|
variant: { default: "solid" },
|
|
@@ -1389,7 +1484,7 @@ const We = { key: 1 }, Oe = `
|
|
|
1389
1484
|
to: { default: void 0 }
|
|
1390
1485
|
},
|
|
1391
1486
|
setup(d) {
|
|
1392
|
-
const r = d, e =
|
|
1487
|
+
const r = d, e = o(() => r.to ? se(r.to) : "span"), l = o(() => fe(r.to, e.value)), g = {
|
|
1393
1488
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
1394
1489
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
1395
1490
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
@@ -1572,25 +1667,25 @@ const We = { key: 1 }, Oe = `
|
|
|
1572
1667
|
dk:dark:text-amber-100
|
|
1573
1668
|
dk:dark:hover:bg-amber-800`
|
|
1574
1669
|
}
|
|
1575
|
-
},
|
|
1670
|
+
}, h = o(() => {
|
|
1576
1671
|
var z;
|
|
1577
|
-
const p = (((z = w[r.variant]) == null ? void 0 : z[r.color]) || "") + " " + w[r.variant].base, b = g[r.size] || "",
|
|
1578
|
-
return [
|
|
1672
|
+
const p = (((z = w[r.variant]) == null ? void 0 : z[r.color]) || "") + " " + w[r.variant].base, b = g[r.size] || "", v = r.block ? "dk:block" : "dk:inline-block", f = n[r.rounded] || "";
|
|
1673
|
+
return [Vd, p, b, v, f].join(" ");
|
|
1579
1674
|
});
|
|
1580
|
-
return (p, b) => (t(), W(Q(e.value), O(
|
|
1581
|
-
class:
|
|
1675
|
+
return (p, b) => (t(), W(Q(e.value), O(l.value, {
|
|
1676
|
+
class: h.value,
|
|
1582
1677
|
title: r.title
|
|
1583
1678
|
}), {
|
|
1584
1679
|
default: A(() => [
|
|
1585
|
-
r.loading ? (t(), a("span",
|
|
1680
|
+
r.loading ? (t(), a("span", jd, "Cargando...")) : _(p.$slots, "default", {}, void 0, void 0, 0)
|
|
1586
1681
|
]),
|
|
1587
1682
|
_: 3
|
|
1588
1683
|
}, 16, ["class", "title"]));
|
|
1589
1684
|
}
|
|
1590
|
-
}),
|
|
1685
|
+
}), Bd = {
|
|
1591
1686
|
key: 0,
|
|
1592
1687
|
class: "dk:relative dk:overflow-hidden dk:rounded-t-lg"
|
|
1593
|
-
},
|
|
1688
|
+
}, Dd = ["src", "alt"], Ot = /* @__PURE__ */ L({
|
|
1594
1689
|
__name: "DuiCard",
|
|
1595
1690
|
props: {
|
|
1596
1691
|
size: { default: "m" },
|
|
@@ -1600,9 +1695,9 @@ const We = { key: 1 }, Oe = `
|
|
|
1600
1695
|
to: { default: void 0 }
|
|
1601
1696
|
},
|
|
1602
1697
|
setup(d) {
|
|
1603
|
-
const r = d, e = () => r.to ? se(r.to) : "div",
|
|
1604
|
-
const
|
|
1605
|
-
return fe(r.to,
|
|
1698
|
+
const r = d, e = () => r.to ? se(r.to) : "div", l = () => r.to ? se(r.to) : "h3", g = () => {
|
|
1699
|
+
const c = e();
|
|
1700
|
+
return fe(r.to, c);
|
|
1606
1701
|
}, n = {
|
|
1607
1702
|
s: {
|
|
1608
1703
|
padding: "dk:p-3",
|
|
@@ -1625,7 +1720,7 @@ const We = { key: 1 }, Oe = `
|
|
|
1625
1720
|
subtitleSize: "dk:text-lg",
|
|
1626
1721
|
contentSize: "dk:text-lg"
|
|
1627
1722
|
}
|
|
1628
|
-
}, w =
|
|
1723
|
+
}, w = o(() => [
|
|
1629
1724
|
// Glassmorphism card styles (Windows Vista inspired)
|
|
1630
1725
|
"dk:relative dk:bg-gradient-to-br dk:from-white/80 dk:via-white/70 dk:to-gray-50/80",
|
|
1631
1726
|
"dk:dark:from-gray-700/60 dk:dark:via-gray-800/60 dk:dark:to-gray-900/60",
|
|
@@ -1641,72 +1736,72 @@ const We = { key: 1 }, Oe = `
|
|
|
1641
1736
|
"dk:before:absolute dk:before:top-0 dk:before:left-0 dk:before:right-0 dk:before:h-0.5",
|
|
1642
1737
|
"dk:before:bg-gradient-to-r dk:before:from-white/60 dk:before:via-white/40 dk:before:to-transparent",
|
|
1643
1738
|
"dk:dark:before:from-white/20 dk:dark:before:via-white/10 dk:dark:before:to-transparent"
|
|
1644
|
-
].join(" ")),
|
|
1739
|
+
].join(" ")), h = o(() => [
|
|
1645
1740
|
"dk:w-full dk:h-48 dk:object-cover",
|
|
1646
1741
|
"dk:relative dk:z-10"
|
|
1647
|
-
].join(" ")), p =
|
|
1648
|
-
const
|
|
1742
|
+
].join(" ")), p = o(() => {
|
|
1743
|
+
const c = n[r.size];
|
|
1649
1744
|
return [
|
|
1650
|
-
|
|
1651
|
-
|
|
1745
|
+
c.padding,
|
|
1746
|
+
c.spacing,
|
|
1652
1747
|
// Glass effect for content wrapper
|
|
1653
1748
|
"dk:relative dk:z-10"
|
|
1654
1749
|
].join(" ");
|
|
1655
|
-
}), b =
|
|
1750
|
+
}), b = o(() => [
|
|
1656
1751
|
n[r.size].spacing
|
|
1657
|
-
].join(" ")),
|
|
1658
|
-
const
|
|
1752
|
+
].join(" ")), v = o(() => {
|
|
1753
|
+
const i = [
|
|
1659
1754
|
n[r.size].titleSize,
|
|
1660
1755
|
"dk:font-semibold dk:text-gray-900 dk:dark:text-gray-100",
|
|
1661
1756
|
"dk:line-clamp-2"
|
|
1662
1757
|
];
|
|
1663
|
-
return r.to &&
|
|
1758
|
+
return r.to && i.push(
|
|
1664
1759
|
"dk:no-underline dk:hover:underline dk:transition-colors",
|
|
1665
1760
|
"dk:hover:text-blue-600 dk:dark:hover:text-blue-400"
|
|
1666
|
-
),
|
|
1667
|
-
}), f =
|
|
1668
|
-
const
|
|
1761
|
+
), i.join(" ");
|
|
1762
|
+
}), f = o(() => {
|
|
1763
|
+
const c = [
|
|
1669
1764
|
"dk:block",
|
|
1670
1765
|
"dk:transition-transform dk:duration-300",
|
|
1671
1766
|
"dk:hover:scale-105",
|
|
1672
1767
|
"dk:relative dk:z-10"
|
|
1673
1768
|
];
|
|
1674
|
-
return r.to &&
|
|
1675
|
-
}), z =
|
|
1769
|
+
return r.to && c.push("dk:no-underline"), c.join(" ");
|
|
1770
|
+
}), z = o(() => [
|
|
1676
1771
|
n[r.size].subtitleSize,
|
|
1677
1772
|
"dk:text-gray-600 dk:dark:text-gray-400",
|
|
1678
1773
|
"dk:line-clamp-3"
|
|
1679
|
-
].join(" ")), V =
|
|
1774
|
+
].join(" ")), V = o(() => [
|
|
1680
1775
|
n[r.size].contentSize,
|
|
1681
1776
|
"dk:text-gray-700 dk:dark:text-gray-300"
|
|
1682
|
-
].join(" ")),
|
|
1777
|
+
].join(" ")), y = o(() => [
|
|
1683
1778
|
"dk:border-t dk:border-gray-300/40 dk:dark:border-white/10",
|
|
1684
1779
|
"dk:pt-3 dk:mt-3",
|
|
1685
1780
|
"dk:relative dk:z-10"
|
|
1686
1781
|
].join(" "));
|
|
1687
|
-
return (
|
|
1688
|
-
class:
|
|
1782
|
+
return (c, i) => (t(), a("div", {
|
|
1783
|
+
class: s(w.value)
|
|
1689
1784
|
}, [
|
|
1690
|
-
d.image ? (t(), a("div",
|
|
1785
|
+
d.image ? (t(), a("div", Bd, [
|
|
1691
1786
|
(t(), W(Q(e()), O(g(), { class: f.value }), {
|
|
1692
1787
|
default: A(() => [
|
|
1693
1788
|
m("img", {
|
|
1694
1789
|
src: d.image,
|
|
1695
1790
|
alt: d.title || "Card image",
|
|
1696
|
-
class:
|
|
1697
|
-
}, null, 10,
|
|
1791
|
+
class: s(h.value)
|
|
1792
|
+
}, null, 10, Dd)
|
|
1698
1793
|
]),
|
|
1699
1794
|
_: 1
|
|
1700
1795
|
}, 16, ["class"]))
|
|
1701
1796
|
])) : S("", !0),
|
|
1702
1797
|
m("div", {
|
|
1703
|
-
class:
|
|
1798
|
+
class: s(p.value)
|
|
1704
1799
|
}, [
|
|
1705
1800
|
d.title || d.subtitle ? (t(), a("div", {
|
|
1706
1801
|
key: 0,
|
|
1707
|
-
class:
|
|
1802
|
+
class: s(b.value)
|
|
1708
1803
|
}, [
|
|
1709
|
-
d.title ? (t(), W(Q(
|
|
1804
|
+
d.title ? (t(), W(Q(l()), O({ key: 0 }, g(), { class: v.value }), {
|
|
1710
1805
|
default: A(() => [
|
|
1711
1806
|
P(j(d.title), 1)
|
|
1712
1807
|
]),
|
|
@@ -1714,25 +1809,25 @@ const We = { key: 1 }, Oe = `
|
|
|
1714
1809
|
}, 16, ["class"])) : S("", !0),
|
|
1715
1810
|
d.subtitle ? (t(), a("p", {
|
|
1716
1811
|
key: 1,
|
|
1717
|
-
class:
|
|
1812
|
+
class: s(z.value)
|
|
1718
1813
|
}, j(d.subtitle), 3)) : S("", !0)
|
|
1719
1814
|
], 2)) : S("", !0),
|
|
1720
|
-
|
|
1815
|
+
c.$slots.default ? (t(), a("div", {
|
|
1721
1816
|
key: 1,
|
|
1722
|
-
class:
|
|
1817
|
+
class: s(V.value)
|
|
1723
1818
|
}, [
|
|
1724
|
-
_(
|
|
1819
|
+
_(c.$slots, "default")
|
|
1725
1820
|
], 2)) : S("", !0),
|
|
1726
|
-
|
|
1821
|
+
c.$slots.footer ? (t(), a("div", {
|
|
1727
1822
|
key: 2,
|
|
1728
|
-
class:
|
|
1823
|
+
class: s(y.value)
|
|
1729
1824
|
}, [
|
|
1730
|
-
_(
|
|
1825
|
+
_(c.$slots, "footer")
|
|
1731
1826
|
], 2)) : S("", !0)
|
|
1732
1827
|
], 2)
|
|
1733
1828
|
], 2));
|
|
1734
1829
|
}
|
|
1735
|
-
}),
|
|
1830
|
+
}), Md = ["aria-labelledby", "aria-describedby"], Ft = /* @__PURE__ */ L({
|
|
1736
1831
|
__name: "DuiModal",
|
|
1737
1832
|
props: {
|
|
1738
1833
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1753,7 +1848,7 @@ const We = { key: 1 }, Oe = `
|
|
|
1753
1848
|
},
|
|
1754
1849
|
emits: ["update:modelValue", "open", "close", "backdrop", "escape"],
|
|
1755
1850
|
setup(d, { emit: r }) {
|
|
1756
|
-
const e = d,
|
|
1851
|
+
const e = d, l = r, g = Math.random().toString(36).slice(2, 10), n = `dui-modal-title-${g}`, w = `dui-modal-description-${g}`, h = {
|
|
1757
1852
|
all: "dk:rounded-xl",
|
|
1758
1853
|
top: "dk:rounded-t-xl",
|
|
1759
1854
|
bottom: "dk:rounded-b-xl",
|
|
@@ -1795,61 +1890,61 @@ const We = { key: 1 }, Oe = `
|
|
|
1795
1890
|
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",
|
|
1796
1891
|
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"
|
|
1797
1892
|
}
|
|
1798
|
-
},
|
|
1893
|
+
}, v = o(() => [
|
|
1799
1894
|
"dk:fixed dk:inset-0 dk:bg-black/55",
|
|
1800
1895
|
e.blurBackdrop ? "dk:backdrop-blur-[2px]" : ""
|
|
1801
|
-
].join(" ")), f =
|
|
1896
|
+
].join(" ")), f = o(() => [
|
|
1802
1897
|
"dk:flex dk:min-h-full dk:w-full dk:p-4",
|
|
1803
1898
|
e.centered ? "dk:items-center" : "dk:items-start dk:pt-8",
|
|
1804
1899
|
"dk:justify-center"
|
|
1805
|
-
].join(" ")), z =
|
|
1806
|
-
const
|
|
1900
|
+
].join(" ")), z = o(() => {
|
|
1901
|
+
const $ = b[e.variant].base, D = b[e.variant][e.color], I = h[e.rounded], X = p[e.size];
|
|
1807
1902
|
return [
|
|
1808
1903
|
"dk:relative dk:flex dk:flex-col dk:overflow-hidden",
|
|
1809
|
-
|
|
1904
|
+
$,
|
|
1810
1905
|
D,
|
|
1811
1906
|
I,
|
|
1812
1907
|
X
|
|
1813
1908
|
].join(" ");
|
|
1814
|
-
}), V =
|
|
1909
|
+
}), V = o(() => [
|
|
1815
1910
|
"dk:flex dk:items-start dk:justify-between dk:gap-3 dk:px-5 dk:pt-5 dk:pb-3",
|
|
1816
1911
|
"dk:border-b dk:border-current/10"
|
|
1817
|
-
].join(" ")),
|
|
1912
|
+
].join(" ")), y = o(() => [
|
|
1818
1913
|
"dk:px-5 dk:py-4",
|
|
1819
1914
|
e.scrollable ? "dk:max-h-[65vh] dk:overflow-y-auto" : ""
|
|
1820
|
-
].join(" ")),
|
|
1915
|
+
].join(" ")), c = o(() => [
|
|
1821
1916
|
"dk:px-5 dk:py-4 dk:border-t dk:border-current/10",
|
|
1822
1917
|
"dk:flex dk:items-center dk:justify-end dk:gap-2"
|
|
1823
1918
|
].join(" "));
|
|
1824
|
-
function
|
|
1919
|
+
function i() {
|
|
1825
1920
|
if (typeof document > "u") return;
|
|
1826
|
-
const
|
|
1827
|
-
|
|
1921
|
+
const $ = document.body, I = Number($.dataset.duiModalCount || "0") + 1;
|
|
1922
|
+
$.dataset.duiModalCount = String(I), I === 1 && ($.style.overflow = "hidden");
|
|
1828
1923
|
}
|
|
1829
1924
|
function x() {
|
|
1830
1925
|
if (typeof document > "u") return;
|
|
1831
|
-
const
|
|
1832
|
-
|
|
1926
|
+
const $ = document.body, D = Number($.dataset.duiModalCount || "0"), I = Math.max(0, D - 1);
|
|
1927
|
+
$.dataset.duiModalCount = String(I), I === 0 && ($.style.overflow = "");
|
|
1833
1928
|
}
|
|
1834
|
-
function
|
|
1835
|
-
|
|
1929
|
+
function C($) {
|
|
1930
|
+
l("update:modelValue", !1), l("close", $);
|
|
1836
1931
|
}
|
|
1837
|
-
function
|
|
1838
|
-
|
|
1932
|
+
function k() {
|
|
1933
|
+
l("backdrop"), !(e.persistent || !e.closeOnBackdrop) && C("backdrop");
|
|
1839
1934
|
}
|
|
1840
|
-
function
|
|
1841
|
-
|
|
1935
|
+
function u($) {
|
|
1936
|
+
$.key !== "Escape" || !e.modelValue || (l("escape"), !(e.persistent || !e.closeOnEsc) && C("escape"));
|
|
1842
1937
|
}
|
|
1843
1938
|
return ae(
|
|
1844
1939
|
() => e.modelValue,
|
|
1845
|
-
(
|
|
1846
|
-
|
|
1940
|
+
($, D) => {
|
|
1941
|
+
$ && !D && (i(), l("open")), !$ && D && x();
|
|
1847
1942
|
}
|
|
1848
1943
|
), be(() => {
|
|
1849
|
-
e.modelValue &&
|
|
1944
|
+
e.modelValue && i(), typeof window < "u" && window.addEventListener("keydown", u);
|
|
1850
1945
|
}), pe(() => {
|
|
1851
|
-
e.modelValue && x(), typeof window < "u" && window.removeEventListener("keydown",
|
|
1852
|
-
}), (
|
|
1946
|
+
e.modelValue && x(), typeof window < "u" && window.removeEventListener("keydown", u);
|
|
1947
|
+
}), ($, D) => (t(), W(me, { to: "body" }, [
|
|
1853
1948
|
J(ne, {
|
|
1854
1949
|
"enter-active-class": "dk:transition-opacity dk:duration-200",
|
|
1855
1950
|
"leave-active-class": "dk:transition-opacity dk:duration-200",
|
|
@@ -1860,27 +1955,27 @@ const We = { key: 1 }, Oe = `
|
|
|
1860
1955
|
e.modelValue ? (t(), a("div", {
|
|
1861
1956
|
key: 0,
|
|
1862
1957
|
style: te({ zIndex: String(e.zIndex) }),
|
|
1863
|
-
class:
|
|
1864
|
-
onClick:
|
|
1958
|
+
class: s(v.value),
|
|
1959
|
+
onClick: k
|
|
1865
1960
|
}, [
|
|
1866
1961
|
m("div", {
|
|
1867
|
-
class:
|
|
1962
|
+
class: s(f.value)
|
|
1868
1963
|
}, [
|
|
1869
1964
|
m("div", {
|
|
1870
1965
|
role: "dialog",
|
|
1871
1966
|
"aria-modal": "true",
|
|
1872
1967
|
"aria-labelledby": e.title ? n : void 0,
|
|
1873
1968
|
"aria-describedby": e.description ? w : void 0,
|
|
1874
|
-
class:
|
|
1875
|
-
onClick: D[1] || (D[1] =
|
|
1969
|
+
class: s(z.value),
|
|
1970
|
+
onClick: D[1] || (D[1] = G(() => {
|
|
1876
1971
|
}, ["stop"]))
|
|
1877
1972
|
}, [
|
|
1878
|
-
|
|
1973
|
+
$.$slots.header || e.title || e.description || e.showClose ? (t(), a("header", {
|
|
1879
1974
|
key: 0,
|
|
1880
|
-
class:
|
|
1975
|
+
class: s(V.value)
|
|
1881
1976
|
}, [
|
|
1882
1977
|
m("div", null, [
|
|
1883
|
-
_(
|
|
1978
|
+
_($.$slots, "header", {}, () => [
|
|
1884
1979
|
e.title ? (t(), a("h2", {
|
|
1885
1980
|
key: 0,
|
|
1886
1981
|
id: n,
|
|
@@ -1898,23 +1993,23 @@ const We = { key: 1 }, Oe = `
|
|
|
1898
1993
|
type: "button",
|
|
1899
1994
|
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",
|
|
1900
1995
|
"aria-label": "Cerrar modal",
|
|
1901
|
-
onClick: D[0] || (D[0] = (I) =>
|
|
1996
|
+
onClick: D[0] || (D[0] = (I) => C("button"))
|
|
1902
1997
|
}, [...D[2] || (D[2] = [
|
|
1903
1998
|
m("span", { "aria-hidden": "true" }, "×", -1)
|
|
1904
1999
|
])])) : S("", !0)
|
|
1905
2000
|
], 2)) : S("", !0),
|
|
1906
2001
|
m("section", {
|
|
1907
|
-
class:
|
|
2002
|
+
class: s(y.value)
|
|
1908
2003
|
}, [
|
|
1909
|
-
_(
|
|
2004
|
+
_($.$slots, "default")
|
|
1910
2005
|
], 2),
|
|
1911
|
-
|
|
2006
|
+
$.$slots.footer ? (t(), a("footer", {
|
|
1912
2007
|
key: 1,
|
|
1913
|
-
class: c
|
|
2008
|
+
class: s(c.value)
|
|
1914
2009
|
}, [
|
|
1915
|
-
_(
|
|
2010
|
+
_($.$slots, "footer")
|
|
1916
2011
|
], 2)) : S("", !0)
|
|
1917
|
-
], 10,
|
|
2012
|
+
], 10, Md)
|
|
1918
2013
|
], 2)
|
|
1919
2014
|
], 6)) : S("", !0)
|
|
1920
2015
|
]),
|
|
@@ -1922,7 +2017,7 @@ const We = { key: 1 }, Oe = `
|
|
|
1922
2017
|
})
|
|
1923
2018
|
]));
|
|
1924
2019
|
}
|
|
1925
|
-
}),
|
|
2020
|
+
}), Td = ["aria-labelledby"], _d = "dk:flex-1 dk:overflow-y-auto dk:px-5 dk:py-4", Nt = /* @__PURE__ */ L({
|
|
1926
2021
|
__name: "DuiDrawer",
|
|
1927
2022
|
props: {
|
|
1928
2023
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1940,7 +2035,7 @@ const We = { key: 1 }, Oe = `
|
|
|
1940
2035
|
},
|
|
1941
2036
|
emits: ["update:modelValue", "open", "close", "backdrop", "escape"],
|
|
1942
2037
|
setup(d, { emit: r }) {
|
|
1943
|
-
const e = d,
|
|
2038
|
+
const e = d, l = r, n = `dui-drawer-title-${Math.random().toString(36).slice(2, 10)}`, w = {
|
|
1944
2039
|
left: {
|
|
1945
2040
|
sm: "dk:w-[95%] dk:md:w-16",
|
|
1946
2041
|
md: "dk:w-[95%] dk:md:w-1/3",
|
|
@@ -1965,12 +2060,12 @@ const We = { key: 1 }, Oe = `
|
|
|
1965
2060
|
lg: "dk:h-[95%] dk:md:h-1/2",
|
|
1966
2061
|
xl: "dk:h-[95%] dk:md:h-[90%]"
|
|
1967
2062
|
}
|
|
1968
|
-
},
|
|
2063
|
+
}, h = {
|
|
1969
2064
|
left: "dk:inset-y-0 dk:left-0 dk:h-full dk:rounded-r-xl",
|
|
1970
2065
|
right: "dk:inset-y-0 dk:right-0 dk:h-full dk:rounded-l-xl",
|
|
1971
2066
|
top: "dk:inset-x-0 dk:top-0 dk:w-full dk:rounded-b-xl",
|
|
1972
2067
|
bottom: "dk:inset-x-0 dk:bottom-0 dk:w-full dk:rounded-t-xl"
|
|
1973
|
-
}, p =
|
|
2068
|
+
}, p = o(() => ({
|
|
1974
2069
|
enterActive: "dk:transition-transform dk:duration-300",
|
|
1975
2070
|
leaveActive: "dk:transition-transform dk:duration-300",
|
|
1976
2071
|
hidden: {
|
|
@@ -2007,54 +2102,54 @@ const We = { key: 1 }, Oe = `
|
|
|
2007
2102
|
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",
|
|
2008
2103
|
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"
|
|
2009
2104
|
}
|
|
2010
|
-
},
|
|
2105
|
+
}, v = o(() => [
|
|
2011
2106
|
"dk:fixed dk:inset-0 dk:bg-black/55",
|
|
2012
2107
|
e.blurBackdrop ? "dk:backdrop-blur-[2px]" : ""
|
|
2013
|
-
].join(" ")), f =
|
|
2014
|
-
const
|
|
2108
|
+
].join(" ")), f = o(() => {
|
|
2109
|
+
const k = b[e.variant].base, u = b[e.variant][e.color], $ = w[e.position][e.size];
|
|
2015
2110
|
return [
|
|
2016
2111
|
"dk:fixed dk:flex dk:flex-col dk:overflow-hidden",
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2112
|
+
h[e.position],
|
|
2113
|
+
k,
|
|
2114
|
+
u,
|
|
2115
|
+
$
|
|
2021
2116
|
].join(" ");
|
|
2022
|
-
}), z =
|
|
2117
|
+
}), z = o(() => [
|
|
2023
2118
|
"dk:flex dk:items-center dk:justify-between dk:gap-3 dk:px-5 dk:py-4 dk:shrink-0",
|
|
2024
2119
|
"dk:border-b dk:border-current/10"
|
|
2025
2120
|
].join(" ")), V = [
|
|
2026
2121
|
"dk:px-5 dk:py-4 dk:border-t dk:border-current/10 dk:shrink-0",
|
|
2027
2122
|
"dk:flex dk:items-center dk:justify-end dk:gap-2"
|
|
2028
2123
|
].join(" ");
|
|
2029
|
-
function
|
|
2124
|
+
function y() {
|
|
2030
2125
|
if (typeof document > "u") return;
|
|
2031
|
-
const
|
|
2032
|
-
|
|
2126
|
+
const k = document.body, $ = Number(k.dataset.duiDrawerCount || "0") + 1;
|
|
2127
|
+
k.dataset.duiDrawerCount = String($), $ === 1 && (k.style.overflow = "hidden");
|
|
2033
2128
|
}
|
|
2034
|
-
function
|
|
2129
|
+
function c() {
|
|
2035
2130
|
if (typeof document > "u") return;
|
|
2036
|
-
const
|
|
2037
|
-
|
|
2131
|
+
const k = document.body, u = Number(k.dataset.duiDrawerCount || "0"), $ = Math.max(0, u - 1);
|
|
2132
|
+
k.dataset.duiDrawerCount = String($), $ === 0 && (k.style.overflow = "");
|
|
2038
2133
|
}
|
|
2039
|
-
function
|
|
2040
|
-
|
|
2134
|
+
function i(k) {
|
|
2135
|
+
l("update:modelValue", !1), l("close", k);
|
|
2041
2136
|
}
|
|
2042
2137
|
function x() {
|
|
2043
|
-
|
|
2138
|
+
l("backdrop"), !(e.persistent || !e.closeOnBackdrop) && i("backdrop");
|
|
2044
2139
|
}
|
|
2045
|
-
function
|
|
2046
|
-
|
|
2140
|
+
function C(k) {
|
|
2141
|
+
k.key !== "Escape" || !e.modelValue || (l("escape"), !(e.persistent || !e.closeOnEsc) && i("escape"));
|
|
2047
2142
|
}
|
|
2048
2143
|
return ae(
|
|
2049
2144
|
() => e.modelValue,
|
|
2050
|
-
(
|
|
2051
|
-
|
|
2145
|
+
(k, u) => {
|
|
2146
|
+
k && !u && (y(), l("open")), !k && u && c();
|
|
2052
2147
|
}
|
|
2053
2148
|
), be(() => {
|
|
2054
|
-
e.modelValue &&
|
|
2149
|
+
e.modelValue && y(), typeof window < "u" && window.addEventListener("keydown", C);
|
|
2055
2150
|
}), pe(() => {
|
|
2056
|
-
e.modelValue &&
|
|
2057
|
-
}), (
|
|
2151
|
+
e.modelValue && c(), typeof window < "u" && window.removeEventListener("keydown", C);
|
|
2152
|
+
}), (k, u) => (t(), W(me, { to: "body" }, [
|
|
2058
2153
|
J(ne, {
|
|
2059
2154
|
"enter-active-class": "dk:transition-opacity dk:duration-200",
|
|
2060
2155
|
"leave-active-class": "dk:transition-opacity dk:duration-200",
|
|
@@ -2065,7 +2160,7 @@ const We = { key: 1 }, Oe = `
|
|
|
2065
2160
|
e.modelValue ? (t(), a("div", {
|
|
2066
2161
|
key: 0,
|
|
2067
2162
|
style: te({ zIndex: String(e.zIndex) }),
|
|
2068
|
-
class:
|
|
2163
|
+
class: s(v.value),
|
|
2069
2164
|
onClick: x
|
|
2070
2165
|
}, null, 6)) : S("", !0)
|
|
2071
2166
|
]),
|
|
@@ -2084,15 +2179,15 @@ const We = { key: 1 }, Oe = `
|
|
|
2084
2179
|
role: "dialog",
|
|
2085
2180
|
"aria-modal": "true",
|
|
2086
2181
|
"aria-labelledby": e.name ? n : void 0,
|
|
2087
|
-
class:
|
|
2088
|
-
onClick:
|
|
2182
|
+
class: s(f.value),
|
|
2183
|
+
onClick: u[1] || (u[1] = G(() => {
|
|
2089
2184
|
}, ["stop"]))
|
|
2090
2185
|
}, [
|
|
2091
|
-
|
|
2186
|
+
k.$slots.header || e.name || e.showClose ? (t(), a("header", {
|
|
2092
2187
|
key: 0,
|
|
2093
|
-
class:
|
|
2188
|
+
class: s(z.value)
|
|
2094
2189
|
}, [
|
|
2095
|
-
_(
|
|
2190
|
+
_(k.$slots, "header", {}, () => [
|
|
2096
2191
|
e.name ? (t(), a("h2", {
|
|
2097
2192
|
key: 0,
|
|
2098
2193
|
id: n,
|
|
@@ -2104,29 +2199,29 @@ const We = { key: 1 }, Oe = `
|
|
|
2104
2199
|
type: "button",
|
|
2105
2200
|
class: "dk:ml-auto dk:inline-flex dk:h-8 dk:w-8 dk:shrink-0 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",
|
|
2106
2201
|
"aria-label": "Cerrar panel",
|
|
2107
|
-
onClick:
|
|
2108
|
-
}, [...
|
|
2202
|
+
onClick: u[0] || (u[0] = ($) => i("button"))
|
|
2203
|
+
}, [...u[2] || (u[2] = [
|
|
2109
2204
|
m("span", { "aria-hidden": "true" }, "×", -1)
|
|
2110
2205
|
])])) : S("", !0)
|
|
2111
2206
|
], 2)) : S("", !0),
|
|
2112
2207
|
m("section", {
|
|
2113
|
-
class:
|
|
2208
|
+
class: s(_d)
|
|
2114
2209
|
}, [
|
|
2115
|
-
_(
|
|
2210
|
+
_(k.$slots, "default")
|
|
2116
2211
|
]),
|
|
2117
|
-
|
|
2212
|
+
k.$slots.actions ? (t(), a("footer", {
|
|
2118
2213
|
key: 1,
|
|
2119
|
-
class:
|
|
2214
|
+
class: s(R(V))
|
|
2120
2215
|
}, [
|
|
2121
|
-
_(
|
|
2216
|
+
_(k.$slots, "actions")
|
|
2122
2217
|
], 2)) : S("", !0)
|
|
2123
|
-
], 14,
|
|
2218
|
+
], 14, Td)) : S("", !0)
|
|
2124
2219
|
]),
|
|
2125
2220
|
_: 3
|
|
2126
2221
|
}, 8, ["enter-active-class", "leave-active-class", "enter-from-class", "leave-to-class"])
|
|
2127
2222
|
]));
|
|
2128
2223
|
}
|
|
2129
|
-
}),
|
|
2224
|
+
}), Ld = ["aria-describedby"], Pd = { class: "dk:inline-flex dk:items-center" }, Kt = /* @__PURE__ */ L({
|
|
2130
2225
|
__name: "DuiTooltip",
|
|
2131
2226
|
props: {
|
|
2132
2227
|
modelValue: { type: Boolean, default: void 0 },
|
|
@@ -2152,16 +2247,16 @@ const We = { key: 1 }, Oe = `
|
|
|
2152
2247
|
},
|
|
2153
2248
|
emits: ["update:modelValue", "open", "close"],
|
|
2154
2249
|
setup(d, { emit: r }) {
|
|
2155
|
-
const e = d,
|
|
2250
|
+
const e = d, l = r, g = N(null), n = N(null), w = N(!1), h = o(() => e.modelValue !== void 0), p = o(() => h.value ? !!e.modelValue : w.value), b = N(e.placement), v = N({ top: 0, left: 0 }), f = N(!1);
|
|
2156
2251
|
let z = null, V = null;
|
|
2157
|
-
const
|
|
2252
|
+
const y = `dui-tooltip-${Math.random().toString(36).slice(2, 10)}`, c = {
|
|
2158
2253
|
all: "dk:rounded-md",
|
|
2159
2254
|
top: "dk:rounded-t-md",
|
|
2160
2255
|
bottom: "dk:rounded-b-md",
|
|
2161
2256
|
left: "dk:rounded-l-md",
|
|
2162
2257
|
right: "dk:rounded-r-md",
|
|
2163
2258
|
none: "dk:rounded-none"
|
|
2164
|
-
},
|
|
2259
|
+
}, i = {
|
|
2165
2260
|
sm: "dk:px-2 dk:py-1 dk:text-xs",
|
|
2166
2261
|
md: "dk:px-2.5 dk:py-1.5 dk:text-sm",
|
|
2167
2262
|
lg: "dk:px-3 dk:py-2 dk:text-base"
|
|
@@ -2172,10 +2267,10 @@ const We = { key: 1 }, Oe = `
|
|
|
2172
2267
|
lg: "dk:max-w-96",
|
|
2173
2268
|
full: "dk:max-w-[min(92vw,42rem)]"
|
|
2174
2269
|
};
|
|
2175
|
-
function
|
|
2270
|
+
function C(M) {
|
|
2176
2271
|
return typeof M == "string" && M in x;
|
|
2177
2272
|
}
|
|
2178
|
-
const
|
|
2273
|
+
const k = {
|
|
2179
2274
|
solid: {
|
|
2180
2275
|
base: "dk:border dk:shadow-lg",
|
|
2181
2276
|
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",
|
|
@@ -2194,26 +2289,26 @@ const We = { key: 1 }, Oe = `
|
|
|
2194
2289
|
warning: "dk:text-amber-900 dk:border-amber-400 dk:dark:text-amber-100 dk:dark:border-amber-500",
|
|
2195
2290
|
danger: "dk:text-rose-900 dk:border-rose-400 dk:dark:text-rose-100 dk:dark:border-rose-500"
|
|
2196
2291
|
}
|
|
2197
|
-
},
|
|
2198
|
-
const M =
|
|
2292
|
+
}, u = o(() => {
|
|
2293
|
+
const M = c[e.rounded], B = i[e.size], T = k[e.variant].base, U = k[e.variant][e.color], F = C(e.maxWidth) ? x[e.maxWidth] : "";
|
|
2199
2294
|
return [
|
|
2200
2295
|
"dk:fixed dk:pointer-events-auto dk:leading-tight dk:select-text dk:cursor-default",
|
|
2201
2296
|
"dk:break-words dk:whitespace-normal",
|
|
2202
2297
|
M,
|
|
2203
2298
|
B,
|
|
2204
2299
|
T,
|
|
2205
|
-
|
|
2206
|
-
|
|
2300
|
+
U,
|
|
2301
|
+
F
|
|
2207
2302
|
].join(" ");
|
|
2208
|
-
}),
|
|
2303
|
+
}), $ = o(() => {
|
|
2209
2304
|
const M = {
|
|
2210
|
-
top: `${
|
|
2211
|
-
left: `${
|
|
2305
|
+
top: `${v.value.top}px`,
|
|
2306
|
+
left: `${v.value.left}px`,
|
|
2212
2307
|
zIndex: String(e.zIndex)
|
|
2213
2308
|
};
|
|
2214
|
-
return typeof e.maxWidth == "number" ? M.maxWidth = `${e.maxWidth}px` : typeof e.maxWidth == "string" && !
|
|
2215
|
-
}), D =
|
|
2216
|
-
const M =
|
|
2309
|
+
return typeof e.maxWidth == "number" ? M.maxWidth = `${e.maxWidth}px` : typeof e.maxWidth == "string" && !C(e.maxWidth) && (M.maxWidth = e.maxWidth), M;
|
|
2310
|
+
}), D = o(() => {
|
|
2311
|
+
const M = k[e.variant][e.color], B = b.value, T = {
|
|
2217
2312
|
top: "dk:-bottom-1.5 dk:left-1/2 dk:-translate-x-1/2 dk:rotate-45",
|
|
2218
2313
|
"top-start": "dk:-bottom-1.5 dk:left-3 dk:rotate-45",
|
|
2219
2314
|
"top-end": "dk:-bottom-1.5 dk:right-3 dk:rotate-45",
|
|
@@ -2237,9 +2332,9 @@ const We = { key: 1 }, Oe = `
|
|
|
2237
2332
|
z && (clearTimeout(z), z = null), V && (clearTimeout(V), V = null);
|
|
2238
2333
|
}
|
|
2239
2334
|
function X(M, B) {
|
|
2240
|
-
e.disabled || (
|
|
2241
|
-
|
|
2242
|
-
})) :
|
|
2335
|
+
e.disabled || (h.value ? l("update:modelValue", M) : w.value = M, M ? (l("open", B), ue(() => {
|
|
2336
|
+
Z();
|
|
2337
|
+
})) : l("close", B));
|
|
2243
2338
|
}
|
|
2244
2339
|
function ee(M) {
|
|
2245
2340
|
I(), z = setTimeout(() => {
|
|
@@ -2268,22 +2363,22 @@ const We = { key: 1 }, Oe = `
|
|
|
2268
2363
|
}[M];
|
|
2269
2364
|
}
|
|
2270
2365
|
function re(M, B, T) {
|
|
2271
|
-
const [
|
|
2272
|
-
let
|
|
2273
|
-
|
|
2366
|
+
const [U, F] = M.split("-"), Y = e.offset;
|
|
2367
|
+
let q = 0, H = 0;
|
|
2368
|
+
U === "top" && (q = B.top - T.height - Y, F === "start" ? H = B.left : F === "end" ? H = B.right - T.width : H = B.left + B.width / 2 - T.width / 2), U === "bottom" && (q = B.bottom + Y, F === "start" ? H = B.left : F === "end" ? H = B.right - T.width : H = B.left + B.width / 2 - T.width / 2), U === "left" && (H = B.left - T.width - Y, F === "start" ? q = B.top : F === "end" ? q = B.bottom - T.height : q = B.top + B.height / 2 - T.height / 2), U === "right" && (H = B.right + Y, F === "start" ? q = B.top : F === "end" ? q = B.bottom - T.height : q = B.top + B.height / 2 - T.height / 2);
|
|
2274
2369
|
const ce = e.viewportPadding, _e = window.innerWidth, Le = window.innerHeight;
|
|
2275
|
-
return
|
|
2370
|
+
return q = Math.min(Math.max(ce, q), Le - T.height - ce), H = Math.min(Math.max(ce, H), _e - T.width - ce), { top: q, left: H };
|
|
2276
2371
|
}
|
|
2277
2372
|
function $e(M, B, T) {
|
|
2278
2373
|
if (!e.flip) return !1;
|
|
2279
|
-
const [
|
|
2280
|
-
return
|
|
2374
|
+
const [U] = M.split("-"), F = e.offset, Y = e.viewportPadding;
|
|
2375
|
+
return U === "top" ? B.top - T.height - F < Y : U === "bottom" ? B.bottom + T.height + F > window.innerHeight - Y : U === "left" ? B.left - T.width - F < Y : B.right + T.width + F > window.innerWidth - Y;
|
|
2281
2376
|
}
|
|
2282
|
-
function
|
|
2377
|
+
function Z() {
|
|
2283
2378
|
if (!g.value || !n.value) return;
|
|
2284
2379
|
const M = g.value.getBoundingClientRect(), B = n.value.getBoundingClientRect();
|
|
2285
2380
|
let T = e.placement;
|
|
2286
|
-
$e(T, M, B) && (T = ge(T)), b.value = T,
|
|
2381
|
+
$e(T, M, B) && (T = ge(T)), b.value = T, v.value = re(T, M, B);
|
|
2287
2382
|
}
|
|
2288
2383
|
function Se() {
|
|
2289
2384
|
e.trigger === "hover" && ee("hover");
|
|
@@ -2318,33 +2413,33 @@ const We = { key: 1 }, Oe = `
|
|
|
2318
2413
|
B && ((T = g.value) != null && T.contains(B)) || (f.value = !1, de("hover"));
|
|
2319
2414
|
}
|
|
2320
2415
|
function ve(M) {
|
|
2321
|
-
var T,
|
|
2416
|
+
var T, U;
|
|
2322
2417
|
if (e.trigger !== "click" || !p.value) return;
|
|
2323
2418
|
const B = M.target;
|
|
2324
|
-
(T = g.value) != null && T.contains(B) || (
|
|
2419
|
+
(T = g.value) != null && T.contains(B) || (U = n.value) != null && U.contains(B) || de("outside");
|
|
2325
2420
|
}
|
|
2326
2421
|
return ae(
|
|
2327
2422
|
() => e.modelValue,
|
|
2328
2423
|
(M) => {
|
|
2329
|
-
|
|
2424
|
+
h.value && M && ue(Z);
|
|
2330
2425
|
}
|
|
2331
2426
|
), ae(
|
|
2332
2427
|
() => e.placement,
|
|
2333
2428
|
() => {
|
|
2334
|
-
p.value && ue(
|
|
2429
|
+
p.value && ue(Z);
|
|
2335
2430
|
}
|
|
2336
2431
|
), ae(p, (M) => {
|
|
2337
|
-
M && ue(
|
|
2432
|
+
M && ue(Z);
|
|
2338
2433
|
}), be(() => {
|
|
2339
|
-
typeof window > "u" || (window.addEventListener("resize",
|
|
2434
|
+
typeof window > "u" || (window.addEventListener("resize", Z), window.addEventListener("scroll", Z, !0), window.addEventListener("click", ve));
|
|
2340
2435
|
}), pe(() => {
|
|
2341
|
-
I(), !(typeof window > "u") && (window.removeEventListener("resize",
|
|
2436
|
+
I(), !(typeof window > "u") && (window.removeEventListener("resize", Z), window.removeEventListener("scroll", Z, !0), window.removeEventListener("click", ve));
|
|
2342
2437
|
}), (M, B) => (t(), a(E, null, [
|
|
2343
2438
|
m("span", {
|
|
2344
2439
|
ref_key: "triggerRef",
|
|
2345
2440
|
ref: g,
|
|
2346
2441
|
class: "dk:relative dk:inline-flex dk:max-w-full",
|
|
2347
|
-
"aria-describedby": p.value ?
|
|
2442
|
+
"aria-describedby": p.value ? y : void 0,
|
|
2348
2443
|
onMouseenter: Se,
|
|
2349
2444
|
onMouseleave: je,
|
|
2350
2445
|
onFocusin: Ve,
|
|
@@ -2353,10 +2448,10 @@ const We = { key: 1 }, Oe = `
|
|
|
2353
2448
|
}, [
|
|
2354
2449
|
_(M.$slots, "trigger", {}, () => [
|
|
2355
2450
|
_(M.$slots, "default", {}, () => [
|
|
2356
|
-
m("span",
|
|
2451
|
+
m("span", Pd, j(e.fallbackTriggerText), 1)
|
|
2357
2452
|
])
|
|
2358
2453
|
])
|
|
2359
|
-
], 40,
|
|
2454
|
+
], 40, Ld),
|
|
2360
2455
|
(t(), W(me, {
|
|
2361
2456
|
to: e.teleportTo
|
|
2362
2457
|
}, [
|
|
@@ -2371,10 +2466,10 @@ const We = { key: 1 }, Oe = `
|
|
|
2371
2466
|
key: 0,
|
|
2372
2467
|
ref_key: "tooltipRef",
|
|
2373
2468
|
ref: n,
|
|
2374
|
-
id:
|
|
2469
|
+
id: y,
|
|
2375
2470
|
role: "tooltip",
|
|
2376
|
-
class:
|
|
2377
|
-
style: te(
|
|
2471
|
+
class: s(u.value),
|
|
2472
|
+
style: te($.value),
|
|
2378
2473
|
onMouseenter: Me,
|
|
2379
2474
|
onMouseleave: Te
|
|
2380
2475
|
}, [
|
|
@@ -2384,7 +2479,7 @@ const We = { key: 1 }, Oe = `
|
|
|
2384
2479
|
e.arrow ? (t(), a("span", {
|
|
2385
2480
|
key: 0,
|
|
2386
2481
|
"aria-hidden": "true",
|
|
2387
|
-
class:
|
|
2482
|
+
class: s(D.value)
|
|
2388
2483
|
}, null, 2)) : S("", !0)
|
|
2389
2484
|
], 38)) : S("", !0)
|
|
2390
2485
|
]),
|
|
@@ -2393,7 +2488,7 @@ const We = { key: 1 }, Oe = `
|
|
|
2393
2488
|
], 8, ["to"]))
|
|
2394
2489
|
], 64));
|
|
2395
2490
|
}
|
|
2396
|
-
}),
|
|
2491
|
+
}), Id = ["open"], Ad = ["onClick"], Ed = { class: "dui-acc-title" }, Wd = { class: "dui-acc-panel" }, Od = /* @__PURE__ */ L({
|
|
2397
2492
|
__name: "DuiAccordion",
|
|
2398
2493
|
props: {
|
|
2399
2494
|
items: {},
|
|
@@ -2406,18 +2501,18 @@ const We = { key: 1 }, Oe = `
|
|
|
2406
2501
|
},
|
|
2407
2502
|
emits: ["update:modelValue", "change"],
|
|
2408
2503
|
setup(d, { emit: r }) {
|
|
2409
|
-
const e = d,
|
|
2504
|
+
const e = d, l = r, g = N([]);
|
|
2410
2505
|
function n() {
|
|
2411
2506
|
return e.modelValue === void 0 ? g.value : Array.isArray(e.modelValue) ? e.modelValue : e.modelValue ? [e.modelValue] : [];
|
|
2412
2507
|
}
|
|
2413
|
-
function w(
|
|
2414
|
-
return n().includes(
|
|
2508
|
+
function w(C) {
|
|
2509
|
+
return n().includes(C);
|
|
2415
2510
|
}
|
|
2416
|
-
function
|
|
2417
|
-
if (
|
|
2418
|
-
const
|
|
2419
|
-
let
|
|
2420
|
-
e.multiple ?
|
|
2511
|
+
function h(C, k) {
|
|
2512
|
+
if (k) return;
|
|
2513
|
+
const u = n();
|
|
2514
|
+
let $;
|
|
2515
|
+
e.multiple ? $ = u.includes(C) ? u.filter((D) => D !== C) : [...u, C] : $ = u.includes(C) ? [] : [C], g.value = $, l("update:modelValue", e.multiple ? $ : $[0] ?? ""), l("change", C);
|
|
2421
2516
|
}
|
|
2422
2517
|
const p = {
|
|
2423
2518
|
sm: {
|
|
@@ -2445,7 +2540,7 @@ const We = { key: 1 }, Oe = `
|
|
|
2445
2540
|
success: "dk:bg-emerald-50 dk:dark:bg-emerald-900/30",
|
|
2446
2541
|
warning: "dk:bg-amber-50 dk:dark:bg-amber-900/30",
|
|
2447
2542
|
danger: "dk:bg-rose-50 dk:dark:bg-rose-900/30"
|
|
2448
|
-
},
|
|
2543
|
+
}, v = {
|
|
2449
2544
|
neutral: "dk:text-zinc-900 dk:dark:text-zinc-50",
|
|
2450
2545
|
primary: "dk:text-slate-800 dk:dark:text-slate-100",
|
|
2451
2546
|
secondary: "dk:text-pink-800 dk:dark:text-pink-100",
|
|
@@ -2459,49 +2554,49 @@ const We = { key: 1 }, Oe = `
|
|
|
2459
2554
|
success: "dk:text-emerald-500 dk:dark:text-emerald-400",
|
|
2460
2555
|
warning: "dk:text-amber-500 dk:dark:text-amber-400",
|
|
2461
2556
|
danger: "dk:text-rose-500 dk:dark:text-rose-400"
|
|
2462
|
-
}, z =
|
|
2463
|
-
function
|
|
2464
|
-
const
|
|
2557
|
+
}, z = o(() => e.variant === "separated" ? "dk:flex dk:flex-col dk:gap-2" : e.variant === "ghost" ? "dk:divide-y dk:divide-zinc-200 dk:dark:divide-zinc-700/60" : e.flush ? "dk:divide-y dk:divide-zinc-200 dk:dark:divide-zinc-700" : "dk:border dk:border-zinc-200 dk:dark:border-zinc-700 dk:rounded-xl dk:divide-y dk:divide-zinc-200 dk:dark:divide-zinc-700 dk:overflow-hidden dk:shadow-sm"), V = o(() => e.variant === "separated" ? "dk:rounded-xl dk:border dk:border-zinc-200 dk:dark:border-zinc-700 dk:overflow-hidden dk:shadow-sm dk:bg-white dk:dark:bg-zinc-900" : e.variant === "ghost" ? "" : "dk:bg-white dk:dark:bg-zinc-900");
|
|
2558
|
+
function y(C, k) {
|
|
2559
|
+
const u = p[e.size], $ = w(C), D = [
|
|
2465
2560
|
"dk:flex dk:w-full dk:items-center dk:select-none dk:outline-none",
|
|
2466
2561
|
"dk:transition-colors dk:duration-150",
|
|
2467
|
-
|
|
2468
|
-
], I =
|
|
2562
|
+
u.summary
|
|
2563
|
+
], I = $ ? [b[e.color], v[e.color]] : ["dk:text-zinc-700 dk:dark:text-zinc-300", "dk:hover:bg-zinc-50 dk:dark:hover:bg-zinc-800/50 dk:hover:text-zinc-900 dk:dark:hover:text-zinc-100"], X = "dk:focus-visible:ring-2 dk:focus-visible:ring-inset dk:focus-visible:ring-slate-400 dk:dark:focus-visible:ring-slate-500", ee = k ? "dk:opacity-40 dk:cursor-not-allowed dk:pointer-events-none" : "dk:cursor-pointer";
|
|
2469
2564
|
return [...D, ...I, X, ee].join(" ");
|
|
2470
2565
|
}
|
|
2471
|
-
function
|
|
2472
|
-
const
|
|
2566
|
+
function c(C) {
|
|
2567
|
+
const k = p[e.size];
|
|
2473
2568
|
return [
|
|
2474
2569
|
"dk:flex-shrink-0 dk:transition-transform dk:duration-250 dk:ease-in-out dk:ml-auto",
|
|
2475
|
-
w(
|
|
2476
|
-
|
|
2570
|
+
w(C) ? "dk:rotate-180 " + f[e.color] : "dk:text-zinc-400 dk:dark:text-zinc-500",
|
|
2571
|
+
k.chevron
|
|
2477
2572
|
].join(" ");
|
|
2478
2573
|
}
|
|
2479
|
-
const
|
|
2574
|
+
const i = o(() => ["dk:flex-shrink-0 dk:leading-none", p[e.size].icon].join(" ")), x = o(() => [
|
|
2480
2575
|
p[e.size].content,
|
|
2481
2576
|
"dk:text-zinc-600 dk:dark:text-zinc-400 dk:leading-relaxed"
|
|
2482
2577
|
].join(" "));
|
|
2483
|
-
return (
|
|
2484
|
-
class:
|
|
2578
|
+
return (C, k) => (t(), a("div", {
|
|
2579
|
+
class: s(z.value)
|
|
2485
2580
|
}, [
|
|
2486
|
-
(t(!0), a(E, null, K(d.items, (
|
|
2487
|
-
key:
|
|
2488
|
-
open: w(
|
|
2489
|
-
class:
|
|
2490
|
-
onToggle:
|
|
2581
|
+
(t(!0), a(E, null, K(d.items, (u, $) => (t(), a("details", {
|
|
2582
|
+
key: u.value ?? $,
|
|
2583
|
+
open: w(u.value ?? String($)),
|
|
2584
|
+
class: s(V.value),
|
|
2585
|
+
onToggle: k[0] || (k[0] = G(() => {
|
|
2491
2586
|
}, ["prevent"]))
|
|
2492
2587
|
}, [
|
|
2493
2588
|
m("summary", {
|
|
2494
|
-
class:
|
|
2495
|
-
onClick:
|
|
2589
|
+
class: s(y(u.value ?? String($), u.disabled)),
|
|
2590
|
+
onClick: G((D) => h(u.value ?? String($), u.disabled), ["prevent"])
|
|
2496
2591
|
}, [
|
|
2497
|
-
|
|
2592
|
+
u.icon ? (t(), a("span", {
|
|
2498
2593
|
key: 0,
|
|
2499
2594
|
"aria-hidden": "true",
|
|
2500
|
-
class:
|
|
2501
|
-
}, j(
|
|
2502
|
-
m("span",
|
|
2595
|
+
class: s(i.value)
|
|
2596
|
+
}, j(u.icon), 3)) : S("", !0),
|
|
2597
|
+
m("span", Ed, j(u.title), 1),
|
|
2503
2598
|
(t(), a("svg", {
|
|
2504
|
-
class: c(u
|
|
2599
|
+
class: s(c(u.value ?? String($))),
|
|
2505
2600
|
viewBox: "0 0 16 16",
|
|
2506
2601
|
fill: "none",
|
|
2507
2602
|
stroke: "currentColor",
|
|
@@ -2509,23 +2604,23 @@ const We = { key: 1 }, Oe = `
|
|
|
2509
2604
|
"stroke-linecap": "round",
|
|
2510
2605
|
"stroke-linejoin": "round",
|
|
2511
2606
|
"aria-hidden": "true"
|
|
2512
|
-
}, [...
|
|
2607
|
+
}, [...k[1] || (k[1] = [
|
|
2513
2608
|
m("polyline", { points: "4 6 8 10 12 6" }, null, -1)
|
|
2514
2609
|
])], 2))
|
|
2515
|
-
], 10,
|
|
2516
|
-
m("div",
|
|
2610
|
+
], 10, Ad),
|
|
2611
|
+
m("div", Wd, [
|
|
2517
2612
|
m("div", {
|
|
2518
|
-
class:
|
|
2613
|
+
class: s(x.value)
|
|
2519
2614
|
}, [
|
|
2520
|
-
_(
|
|
2521
|
-
m("p", null, j(
|
|
2615
|
+
_(C.$slots, u.value ?? String($), {}, () => [
|
|
2616
|
+
m("p", null, j(u.content), 1)
|
|
2522
2617
|
], !0)
|
|
2523
2618
|
], 2)
|
|
2524
2619
|
])
|
|
2525
|
-
], 42,
|
|
2620
|
+
], 42, Id))), 128))
|
|
2526
2621
|
], 2));
|
|
2527
2622
|
}
|
|
2528
|
-
}),
|
|
2623
|
+
}), Ut = /* @__PURE__ */ ie(Od, [["__scopeId", "data-v-9bd77ff3"]]), Fd = ["aria-label"], qt = /* @__PURE__ */ L({
|
|
2529
2624
|
inheritAttrs: !1,
|
|
2530
2625
|
__name: "DuiBadge",
|
|
2531
2626
|
props: {
|
|
@@ -2540,7 +2635,7 @@ const We = { key: 1 }, Oe = `
|
|
|
2540
2635
|
},
|
|
2541
2636
|
emits: ["dismiss"],
|
|
2542
2637
|
setup(d, { emit: r }) {
|
|
2543
|
-
const e = d,
|
|
2638
|
+
const e = d, l = r, g = {
|
|
2544
2639
|
xs: "dk:text-[10px] dk:leading-none dk:px-1.5 dk:py-0.5 dk:gap-1",
|
|
2545
2640
|
sm: "dk:text-xs dk:leading-none dk:px-2 dk:py-1 dk:gap-1",
|
|
2546
2641
|
md: "dk:text-sm dk:px-2.5 dk:py-1 dk:gap-1.5",
|
|
@@ -2574,17 +2669,17 @@ const We = { key: 1 }, Oe = `
|
|
|
2574
2669
|
warning: "dk:border dk:border-amber-400 dk:text-amber-700 dk:dark:border-amber-500 dk:dark:text-amber-300",
|
|
2575
2670
|
danger: "dk:border dk:border-rose-400 dk:text-rose-700 dk:dark:border-rose-500 dk:dark:text-rose-300"
|
|
2576
2671
|
}
|
|
2577
|
-
},
|
|
2672
|
+
}, h = {
|
|
2578
2673
|
neutral: "dk:bg-zinc-500 dk:dark:bg-zinc-400",
|
|
2579
2674
|
primary: "dk:bg-slate-500 dk:dark:bg-slate-400",
|
|
2580
2675
|
secondary: "dk:bg-pink-500 dk:dark:bg-pink-400",
|
|
2581
2676
|
success: "dk:bg-emerald-500 dk:dark:bg-emerald-400",
|
|
2582
2677
|
warning: "dk:bg-amber-500 dk:dark:bg-amber-400",
|
|
2583
2678
|
danger: "dk:bg-rose-500 dk:dark:bg-rose-400"
|
|
2584
|
-
}, p =
|
|
2585
|
-
const z = "dk:inline-flex dk:items-center dk:font-medium dk:whitespace-nowrap dk:select-none", V = g[e.size],
|
|
2586
|
-
return [z, V,
|
|
2587
|
-
}), b =
|
|
2679
|
+
}, p = o(() => {
|
|
2680
|
+
const z = "dk:inline-flex dk:items-center dk:font-medium dk:whitespace-nowrap dk:select-none", V = g[e.size], y = n[e.rounded], c = w[e.variant][e.color], i = e.href ? "dk:cursor-pointer dk:hover:opacity-80 dk:transition-opacity" : "";
|
|
2681
|
+
return [z, V, y, c, i].join(" ");
|
|
2682
|
+
}), b = o(() => ["dk:rounded-full dk:flex-shrink-0", { xs: "dk:w-1.5 dk:h-1.5", sm: "dk:w-2 dk:h-2", md: "dk:w-2 dk:h-2", lg: "dk:w-2.5 dk:h-2.5" }[e.size], h[e.color]].join(" ")), v = o(() => "dk:flex-shrink-0 dk:flex dk:items-center"), f = o(() => [
|
|
2588
2683
|
"dk:-mr-0.5 dk:flex-shrink-0 dk:inline-flex dk:items-center dk:justify-center",
|
|
2589
2684
|
"dk:rounded-full dk:w-3.5 dk:h-3.5 dk:text-sm dk:leading-none",
|
|
2590
2685
|
"dk:opacity-60 dk:hover:opacity-100 dk:transition-opacity dk:outline-none",
|
|
@@ -2598,11 +2693,11 @@ const We = { key: 1 }, Oe = `
|
|
|
2598
2693
|
z.$slots.icon || d.dot ? (t(), a("span", {
|
|
2599
2694
|
key: 0,
|
|
2600
2695
|
"aria-hidden": "true",
|
|
2601
|
-
class:
|
|
2696
|
+
class: s(v.value)
|
|
2602
2697
|
}, [
|
|
2603
2698
|
d.dot ? (t(), a("span", {
|
|
2604
2699
|
key: 0,
|
|
2605
|
-
class:
|
|
2700
|
+
class: s(b.value)
|
|
2606
2701
|
}, null, 2)) : _(z.$slots, "icon", {}, void 0, void 0, 1)
|
|
2607
2702
|
], 2)) : S("", !0),
|
|
2608
2703
|
_(z.$slots, "default", {}, () => [
|
|
@@ -2611,15 +2706,15 @@ const We = { key: 1 }, Oe = `
|
|
|
2611
2706
|
d.dismissible ? (t(), a("button", {
|
|
2612
2707
|
key: 1,
|
|
2613
2708
|
type: "button",
|
|
2614
|
-
class:
|
|
2709
|
+
class: s(f.value),
|
|
2615
2710
|
"aria-label": d.label ? `Quitar ${d.label}` : "Quitar",
|
|
2616
|
-
onClick: V[0] || (V[0] =
|
|
2617
|
-
}, " × ", 10,
|
|
2711
|
+
onClick: V[0] || (V[0] = G((y) => l("dismiss"), ["prevent"]))
|
|
2712
|
+
}, " × ", 10, Fd)) : S("", !0)
|
|
2618
2713
|
]),
|
|
2619
2714
|
_: 3
|
|
2620
2715
|
}, 16, ["href", "class"]));
|
|
2621
2716
|
}
|
|
2622
|
-
}),
|
|
2717
|
+
}), Nd = ["onKeydown"], Kd = ["aria-label"], Ht = /* @__PURE__ */ L({
|
|
2623
2718
|
__name: "DuiDropdown",
|
|
2624
2719
|
props: {
|
|
2625
2720
|
modelValue: { type: Boolean, default: void 0 },
|
|
@@ -2634,20 +2729,20 @@ const We = { key: 1 }, Oe = `
|
|
|
2634
2729
|
},
|
|
2635
2730
|
emits: ["update:modelValue", "open", "close"],
|
|
2636
2731
|
setup(d, { emit: r }) {
|
|
2637
|
-
const e = d,
|
|
2638
|
-
function
|
|
2732
|
+
const e = d, l = r, g = N(null), n = N(!1), w = o(() => e.modelValue !== void 0 ? e.modelValue : n.value);
|
|
2733
|
+
function h() {
|
|
2639
2734
|
if (e.disabled) return;
|
|
2640
|
-
const
|
|
2641
|
-
n.value =
|
|
2735
|
+
const c = !w.value;
|
|
2736
|
+
n.value = c, l("update:modelValue", c), l(c ? "open" : "close");
|
|
2642
2737
|
}
|
|
2643
2738
|
function p() {
|
|
2644
|
-
n.value = !1,
|
|
2739
|
+
n.value = !1, l("update:modelValue", !1), l("close");
|
|
2645
2740
|
}
|
|
2646
|
-
function b(
|
|
2647
|
-
g.value && !g.value.contains(
|
|
2741
|
+
function b(c) {
|
|
2742
|
+
g.value && !g.value.contains(c.target) && p();
|
|
2648
2743
|
}
|
|
2649
2744
|
be(() => document.addEventListener("mousedown", b)), pe(() => document.removeEventListener("mousedown", b));
|
|
2650
|
-
const
|
|
2745
|
+
const v = {
|
|
2651
2746
|
"bottom-start": "dk:top-full dk:left-0 dk:mt-1 dk:origin-top-left",
|
|
2652
2747
|
"bottom-end": "dk:top-full dk:right-0 dk:mt-1 dk:origin-top-right",
|
|
2653
2748
|
bottom: "dk:top-full dk:left-1/2 dk:-translate-x-1/2 dk:mt-1 dk:origin-top",
|
|
@@ -2683,26 +2778,26 @@ const We = { key: 1 }, Oe = `
|
|
|
2683
2778
|
warning: "dk:bg-amber-100/85 dk:dark:bg-amber-900/70 dk:backdrop-blur-md dk:border dk:border-amber-300/70 dk:dark:border-amber-600/60 dk:text-amber-800 dk:dark:text-amber-200",
|
|
2684
2779
|
danger: "dk:bg-rose-100/85 dk:dark:bg-rose-900/70 dk:backdrop-blur-md dk:border dk:border-rose-300/70 dk:dark:border-rose-600/60 dk:text-rose-800 dk:dark:text-rose-200"
|
|
2685
2780
|
}
|
|
2686
|
-
}, V =
|
|
2781
|
+
}, V = o(() => ({ minWidth: e.minWidth })), y = o(() => [
|
|
2687
2782
|
"dk:absolute dk:z-50 dk:shadow-lg dk:py-1",
|
|
2688
|
-
|
|
2783
|
+
v[e.placement],
|
|
2689
2784
|
f[e.rounded],
|
|
2690
2785
|
z[e.variant][e.color]
|
|
2691
2786
|
].join(" "));
|
|
2692
|
-
return (
|
|
2787
|
+
return (c, i) => (t(), a("div", {
|
|
2693
2788
|
ref_key: "wrapperRef",
|
|
2694
2789
|
ref: g,
|
|
2695
2790
|
class: "dk:relative dk:inline-block"
|
|
2696
2791
|
}, [
|
|
2697
2792
|
m("div", {
|
|
2698
|
-
onClick:
|
|
2793
|
+
onClick: h,
|
|
2699
2794
|
onKeydown: [
|
|
2700
|
-
ye(
|
|
2701
|
-
ye(
|
|
2795
|
+
ye(G(h, ["prevent"]), ["enter"]),
|
|
2796
|
+
ye(G(h, ["prevent"]), ["space"])
|
|
2702
2797
|
]
|
|
2703
2798
|
}, [
|
|
2704
|
-
_(
|
|
2705
|
-
], 40,
|
|
2799
|
+
_(c.$slots, "trigger")
|
|
2800
|
+
], 40, Nd),
|
|
2706
2801
|
J(ne, {
|
|
2707
2802
|
"enter-active-class": "dk:transition-all dk:duration-150 dk:ease-out",
|
|
2708
2803
|
"leave-active-class": "dk:transition-all dk:duration-100 dk:ease-in",
|
|
@@ -2712,22 +2807,22 @@ const We = { key: 1 }, Oe = `
|
|
|
2712
2807
|
default: A(() => [
|
|
2713
2808
|
w.value ? (t(), a("div", {
|
|
2714
2809
|
key: 0,
|
|
2715
|
-
class:
|
|
2810
|
+
class: s(y.value),
|
|
2716
2811
|
style: te(V.value),
|
|
2717
2812
|
role: "menu",
|
|
2718
2813
|
"aria-label": d.ariaLabel
|
|
2719
2814
|
}, [
|
|
2720
|
-
_(
|
|
2721
|
-
], 14,
|
|
2815
|
+
_(c.$slots, "default")
|
|
2816
|
+
], 14, Kd)) : S("", !0)
|
|
2722
2817
|
]),
|
|
2723
2818
|
_: 3
|
|
2724
2819
|
})
|
|
2725
2820
|
], 512));
|
|
2726
2821
|
}
|
|
2727
|
-
}),
|
|
2822
|
+
}), Ud = { class: "dk:flex-1 dk:truncate" }, qd = {
|
|
2728
2823
|
key: 1,
|
|
2729
2824
|
class: "dk:ml-auto dk:opacity-60 dk:text-xs"
|
|
2730
|
-
},
|
|
2825
|
+
}, Qt = /* @__PURE__ */ L({
|
|
2731
2826
|
__name: "DuiDropdownItem",
|
|
2732
2827
|
props: {
|
|
2733
2828
|
label: { default: void 0 },
|
|
@@ -2740,18 +2835,18 @@ const We = { key: 1 }, Oe = `
|
|
|
2740
2835
|
},
|
|
2741
2836
|
emits: ["click"],
|
|
2742
2837
|
setup(d, { emit: r }) {
|
|
2743
|
-
const e = d,
|
|
2838
|
+
const e = d, l = r, g = o(() => e.href ? { href: e.href, target: e.target } : { type: "button", disabled: e.disabled }), n = {
|
|
2744
2839
|
sm: "dk:px-3 dk:py-1 dk:text-xs",
|
|
2745
2840
|
md: "dk:px-3 dk:py-2 dk:text-sm",
|
|
2746
2841
|
lg: "dk:px-4 dk:py-2.5 dk:text-base"
|
|
2747
|
-
}, w =
|
|
2748
|
-
const b = "dk:flex dk:w-full dk:items-center dk:gap-2 dk:transition-colors dk:duration-100 dk:outline-none dk:text-left dk:select-none",
|
|
2749
|
-
return [b,
|
|
2750
|
-
}),
|
|
2842
|
+
}, w = o(() => {
|
|
2843
|
+
const b = "dk:flex dk:w-full dk:items-center dk:gap-2 dk:transition-colors dk:duration-100 dk:outline-none dk:text-left dk:select-none", v = n[e.size], f = e.danger ? "dk:text-rose-600 dk:dark:text-rose-400 dk:hover:bg-rose-50 dk:dark:hover:bg-rose-900/40 dk:focus-visible:bg-rose-50 dk:dark:focus-visible:bg-rose-900/40" : "dk:hover:bg-black/5 dk:dark:hover:bg-white/10 dk:focus-visible:bg-black/5 dk:dark:focus-visible:bg-white/10", z = e.disabled ? "dk:opacity-50 dk:cursor-not-allowed dk:pointer-events-none" : "dk:cursor-pointer";
|
|
2844
|
+
return [b, v, f, z].join(" ");
|
|
2845
|
+
}), h = o(() => "dk:flex-shrink-0 dk:w-4 dk:h-4 dk:flex dk:items-center dk:justify-center dk:opacity-70");
|
|
2751
2846
|
function p(b) {
|
|
2752
|
-
e.disabled ||
|
|
2847
|
+
e.disabled || l("click", b);
|
|
2753
2848
|
}
|
|
2754
|
-
return (b,
|
|
2849
|
+
return (b, v) => (t(), W(Q(d.href ? "a" : "button"), O(g.value, {
|
|
2755
2850
|
class: w.value,
|
|
2756
2851
|
role: "menuitem",
|
|
2757
2852
|
"aria-disabled": d.disabled,
|
|
@@ -2760,40 +2855,40 @@ const We = { key: 1 }, Oe = `
|
|
|
2760
2855
|
default: A(() => [
|
|
2761
2856
|
b.$slots.icon || d.icon ? (t(), a("span", {
|
|
2762
2857
|
key: 0,
|
|
2763
|
-
class:
|
|
2858
|
+
class: s(h.value),
|
|
2764
2859
|
"aria-hidden": "true"
|
|
2765
2860
|
}, [
|
|
2766
2861
|
_(b.$slots, "icon", {}, () => [
|
|
2767
2862
|
P(j(d.icon), 1)
|
|
2768
2863
|
])
|
|
2769
2864
|
], 2)) : S("", !0),
|
|
2770
|
-
m("span",
|
|
2865
|
+
m("span", Ud, [
|
|
2771
2866
|
_(b.$slots, "default", {}, () => [
|
|
2772
2867
|
P(j(d.label), 1)
|
|
2773
2868
|
])
|
|
2774
2869
|
]),
|
|
2775
|
-
b.$slots.trailing ? (t(), a("span",
|
|
2870
|
+
b.$slots.trailing ? (t(), a("span", qd, [
|
|
2776
2871
|
_(b.$slots, "trailing")
|
|
2777
2872
|
])) : S("", !0)
|
|
2778
2873
|
]),
|
|
2779
2874
|
_: 3
|
|
2780
2875
|
}, 16, ["class", "aria-disabled"]));
|
|
2781
2876
|
}
|
|
2782
|
-
}),
|
|
2877
|
+
}), Hd = {}, Qd = {
|
|
2783
2878
|
class: "dk:my-1 dk:border-current/10",
|
|
2784
2879
|
role: "separator",
|
|
2785
2880
|
"aria-orientation": "horizontal"
|
|
2786
2881
|
};
|
|
2787
|
-
function
|
|
2788
|
-
return t(), a("hr",
|
|
2882
|
+
function Gd(d, r) {
|
|
2883
|
+
return t(), a("hr", Qd);
|
|
2789
2884
|
}
|
|
2790
|
-
const
|
|
2885
|
+
const Gt = /* @__PURE__ */ ie(Hd, [["render", Gd]]), Yd = ["aria-label"], Jd = ["disabled", "aria-label"], Xd = {
|
|
2791
2886
|
key: 0,
|
|
2792
2887
|
class: "dk:hidden dk:sm:inline"
|
|
2793
|
-
},
|
|
2888
|
+
}, Zd = ["aria-label", "aria-current", "onClick"], Rd = ["disabled", "aria-label"], et = {
|
|
2794
2889
|
key: 0,
|
|
2795
2890
|
class: "dk:hidden dk:sm:inline"
|
|
2796
|
-
},
|
|
2891
|
+
}, Yt = /* @__PURE__ */ L({
|
|
2797
2892
|
__name: "DuiPagination",
|
|
2798
2893
|
props: {
|
|
2799
2894
|
modelValue: {},
|
|
@@ -2812,23 +2907,23 @@ const qt = /* @__PURE__ */ ie(Kd, [["render", Ud]]), Hd = ["aria-label"], Qd = [
|
|
|
2812
2907
|
},
|
|
2813
2908
|
emits: ["update:modelValue", "change"],
|
|
2814
2909
|
setup(d, { emit: r }) {
|
|
2815
|
-
const e = d,
|
|
2816
|
-
function n(
|
|
2817
|
-
|
|
2818
|
-
}
|
|
2819
|
-
const w =
|
|
2820
|
-
const
|
|
2821
|
-
if (
|
|
2822
|
-
return Array.from({ length:
|
|
2823
|
-
const
|
|
2824
|
-
for (let D = 1; D <=
|
|
2825
|
-
const
|
|
2826
|
-
|
|
2827
|
-
for (let D =
|
|
2828
|
-
|
|
2829
|
-
for (let D =
|
|
2830
|
-
return
|
|
2831
|
-
}),
|
|
2910
|
+
const e = d, l = r, g = o(() => Math.max(1, Math.ceil(e.total / e.perPage)));
|
|
2911
|
+
function n(c) {
|
|
2912
|
+
c < 1 || c > g.value || c === e.modelValue || (l("update:modelValue", c), l("change", c));
|
|
2913
|
+
}
|
|
2914
|
+
const w = o(() => {
|
|
2915
|
+
const c = g.value, i = e.modelValue, x = e.siblingCount, C = e.showBoundary ? 1 : 0;
|
|
2916
|
+
if (c <= 2 * x + 2 * C + 3)
|
|
2917
|
+
return Array.from({ length: c }, (D, I) => I + 1);
|
|
2918
|
+
const k = [];
|
|
2919
|
+
for (let D = 1; D <= C; D++) k.push(D);
|
|
2920
|
+
const u = Math.max(C + 1, i - x), $ = Math.min(c - C, i + x);
|
|
2921
|
+
u > C + 1 && k.push("...");
|
|
2922
|
+
for (let D = u; D <= $; D++) k.push(D);
|
|
2923
|
+
$ < c - C && k.push("...");
|
|
2924
|
+
for (let D = c - C + 1; D <= c; D++) k.push(D);
|
|
2925
|
+
return k;
|
|
2926
|
+
}), h = {
|
|
2832
2927
|
sm: "dk:w-7 dk:h-7 dk:text-xs",
|
|
2833
2928
|
md: "dk:w-9 dk:h-9 dk:text-sm",
|
|
2834
2929
|
lg: "dk:w-11 dk:h-11 dk:text-base"
|
|
@@ -2861,39 +2956,39 @@ const qt = /* @__PURE__ */ ie(Kd, [["render", Ud]]), Hd = ["aria-label"], Qd = [
|
|
|
2861
2956
|
warning: "dk:bg-amber-100 dk:text-amber-800 dk:dark:bg-amber-700 dk:dark:text-amber-100",
|
|
2862
2957
|
danger: "dk:bg-rose-100 dk:text-rose-800 dk:dark:bg-rose-800 dk:dark:text-rose-100"
|
|
2863
2958
|
}
|
|
2864
|
-
},
|
|
2865
|
-
const
|
|
2959
|
+
}, v = o(() => "dk:flex dk:items-center dk:gap-1 dk:flex-wrap"), f = o(() => {
|
|
2960
|
+
const c = h[e.size], i = p[e.rounded];
|
|
2866
2961
|
return [
|
|
2867
2962
|
"dk:inline-flex dk:items-center dk:justify-center dk:font-medium dk:transition-colors dk:duration-150 dk:outline-none dk:select-none dk:cursor-pointer dk:disabled:cursor-not-allowed dk:disabled:pointer-events-none",
|
|
2868
|
-
|
|
2869
|
-
|
|
2963
|
+
c,
|
|
2964
|
+
i,
|
|
2870
2965
|
"dk:focus-visible:ring-2 dk:focus-visible:ring-offset-1 dk:focus-visible:ring-slate-400"
|
|
2871
2966
|
].join(" ");
|
|
2872
|
-
}), z =
|
|
2967
|
+
}), z = o(() => [
|
|
2873
2968
|
f.value,
|
|
2874
2969
|
"dk:text-zinc-600 dk:dark:text-zinc-400",
|
|
2875
2970
|
"dk:hover:bg-zinc-100 dk:dark:hover:bg-zinc-700",
|
|
2876
2971
|
"dk:hover:text-zinc-900 dk:dark:hover:text-zinc-100"
|
|
2877
2972
|
].join(" "));
|
|
2878
|
-
function V(
|
|
2879
|
-
return
|
|
2973
|
+
function V(c) {
|
|
2974
|
+
return c === e.modelValue ? [f.value, b[e.variant][e.color]].join(" ") : [
|
|
2880
2975
|
f.value,
|
|
2881
2976
|
"dk:text-zinc-600 dk:dark:text-zinc-400 dk:hover:bg-zinc-100 dk:dark:hover:bg-zinc-700 dk:hover:text-zinc-900 dk:dark:hover:text-zinc-100"
|
|
2882
2977
|
].join(" ");
|
|
2883
2978
|
}
|
|
2884
|
-
const
|
|
2885
|
-
return (
|
|
2979
|
+
const y = o(() => ["dk:inline-flex dk:items-center dk:justify-center dk:text-zinc-400 dk:select-none", h[e.size]].join(" "));
|
|
2980
|
+
return (c, i) => (t(), a("nav", {
|
|
2886
2981
|
"aria-label": d.ariaLabel,
|
|
2887
|
-
class:
|
|
2982
|
+
class: s(v.value)
|
|
2888
2983
|
}, [
|
|
2889
2984
|
m("button", {
|
|
2890
2985
|
type: "button",
|
|
2891
2986
|
disabled: d.modelValue <= 1,
|
|
2892
2987
|
"aria-label": d.prevLabel,
|
|
2893
|
-
class:
|
|
2894
|
-
onClick:
|
|
2988
|
+
class: s([z.value, d.modelValue <= 1 ? "dk:opacity-40 dk:cursor-not-allowed" : ""]),
|
|
2989
|
+
onClick: i[0] || (i[0] = (x) => n(d.modelValue - 1))
|
|
2895
2990
|
}, [
|
|
2896
|
-
|
|
2991
|
+
i[2] || (i[2] = m("svg", {
|
|
2897
2992
|
class: "dk:w-4 dk:h-4",
|
|
2898
2993
|
viewBox: "0 0 16 16",
|
|
2899
2994
|
fill: "none",
|
|
@@ -2905,31 +3000,31 @@ const qt = /* @__PURE__ */ ie(Kd, [["render", Ud]]), Hd = ["aria-label"], Qd = [
|
|
|
2905
3000
|
}, [
|
|
2906
3001
|
m("polyline", { points: "10 4 6 8 10 12" })
|
|
2907
3002
|
], -1)),
|
|
2908
|
-
d.showLabels ? (t(), a("span",
|
|
2909
|
-
], 10,
|
|
3003
|
+
d.showLabels ? (t(), a("span", Xd, j(d.prevLabel), 1)) : S("", !0)
|
|
3004
|
+
], 10, Jd),
|
|
2910
3005
|
(t(!0), a(E, null, K(w.value, (x) => (t(), a(E, { key: x }, [
|
|
2911
3006
|
x === "..." ? (t(), a("span", {
|
|
2912
3007
|
key: 0,
|
|
2913
|
-
class:
|
|
3008
|
+
class: s(y.value),
|
|
2914
3009
|
"aria-hidden": "true"
|
|
2915
3010
|
}, "…", 2)) : (t(), a("button", {
|
|
2916
3011
|
key: 1,
|
|
2917
3012
|
type: "button",
|
|
2918
3013
|
"aria-label": `Pagina ${x}`,
|
|
2919
3014
|
"aria-current": d.modelValue === x ? "page" : void 0,
|
|
2920
|
-
class:
|
|
2921
|
-
onClick: (
|
|
2922
|
-
}, j(x), 11,
|
|
3015
|
+
class: s(V(x)),
|
|
3016
|
+
onClick: (C) => n(x)
|
|
3017
|
+
}, j(x), 11, Zd))
|
|
2923
3018
|
], 64))), 128)),
|
|
2924
3019
|
m("button", {
|
|
2925
3020
|
type: "button",
|
|
2926
3021
|
disabled: d.modelValue >= g.value,
|
|
2927
3022
|
"aria-label": d.nextLabel,
|
|
2928
|
-
class:
|
|
2929
|
-
onClick:
|
|
3023
|
+
class: s([z.value, d.modelValue >= g.value ? "dk:opacity-40 dk:cursor-not-allowed" : ""]),
|
|
3024
|
+
onClick: i[1] || (i[1] = (x) => n(d.modelValue + 1))
|
|
2930
3025
|
}, [
|
|
2931
|
-
d.showLabels ? (t(), a("span",
|
|
2932
|
-
|
|
3026
|
+
d.showLabels ? (t(), a("span", et, j(d.nextLabel), 1)) : S("", !0),
|
|
3027
|
+
i[3] || (i[3] = m("svg", {
|
|
2933
3028
|
class: "dk:w-4 dk:h-4",
|
|
2934
3029
|
viewBox: "0 0 16 16",
|
|
2935
3030
|
fill: "none",
|
|
@@ -2941,10 +3036,10 @@ const qt = /* @__PURE__ */ ie(Kd, [["render", Ud]]), Hd = ["aria-label"], Qd = [
|
|
|
2941
3036
|
}, [
|
|
2942
3037
|
m("polyline", { points: "6 4 10 8 6 12" })
|
|
2943
3038
|
], -1))
|
|
2944
|
-
], 10,
|
|
2945
|
-
], 10,
|
|
3039
|
+
], 10, Rd)
|
|
3040
|
+
], 10, Yd));
|
|
2946
3041
|
}
|
|
2947
|
-
}),
|
|
3042
|
+
}), dt = /* @__PURE__ */ L({
|
|
2948
3043
|
__name: "DuiSkeleton",
|
|
2949
3044
|
props: {
|
|
2950
3045
|
variant: { default: "text" },
|
|
@@ -2954,11 +3049,11 @@ const qt = /* @__PURE__ */ ie(Kd, [["render", Ud]]), Hd = ["aria-label"], Qd = [
|
|
|
2954
3049
|
},
|
|
2955
3050
|
setup(d) {
|
|
2956
3051
|
const r = d;
|
|
2957
|
-
function e(
|
|
2958
|
-
if (
|
|
2959
|
-
return typeof
|
|
3052
|
+
function e(h) {
|
|
3053
|
+
if (h !== void 0)
|
|
3054
|
+
return typeof h == "number" ? `${h}px` : h;
|
|
2960
3055
|
}
|
|
2961
|
-
const
|
|
3056
|
+
const l = o(() => ({
|
|
2962
3057
|
width: e(r.width),
|
|
2963
3058
|
height: e(r.height)
|
|
2964
3059
|
})), g = {
|
|
@@ -2970,23 +3065,23 @@ const qt = /* @__PURE__ */ ie(Kd, [["render", Ud]]), Hd = ["aria-label"], Qd = [
|
|
|
2970
3065
|
circular: "dk:block dk:w-10 dk:h-10 dk:rounded-full",
|
|
2971
3066
|
rectangular: "dk:block dk:w-full dk:h-20 dk:rounded-none",
|
|
2972
3067
|
rounded: "dk:block dk:w-full dk:h-20 dk:rounded-xl"
|
|
2973
|
-
}, w =
|
|
3068
|
+
}, w = o(() => [
|
|
2974
3069
|
"dk:bg-zinc-200 dk:dark:bg-zinc-700",
|
|
2975
3070
|
n[r.variant],
|
|
2976
3071
|
g[r.animation]
|
|
2977
3072
|
].join(" "));
|
|
2978
|
-
return (
|
|
2979
|
-
class:
|
|
2980
|
-
style: te(
|
|
3073
|
+
return (h, p) => (t(), a("span", {
|
|
3074
|
+
class: s(w.value),
|
|
3075
|
+
style: te(l.value),
|
|
2981
3076
|
"aria-hidden": "true",
|
|
2982
3077
|
role: "presentation"
|
|
2983
3078
|
}, null, 6));
|
|
2984
3079
|
}
|
|
2985
|
-
}),
|
|
3080
|
+
}), Jt = /* @__PURE__ */ ie(dt, [["__scopeId", "data-v-8c9c6005"]]), tt = ["aria-label"], rt = ["id", "aria-controls", "aria-selected", "disabled", "onClick", "onKeydown"], at = {
|
|
2986
3081
|
key: 0,
|
|
2987
3082
|
"aria-hidden": "true",
|
|
2988
3083
|
class: "dk:flex-shrink-0"
|
|
2989
|
-
},
|
|
3084
|
+
}, ot = ["id", "aria-labelledby", "tabindex", "hidden"], Xt = /* @__PURE__ */ L({
|
|
2990
3085
|
__name: "DuiTabs",
|
|
2991
3086
|
props: {
|
|
2992
3087
|
modelValue: {},
|
|
@@ -2999,25 +3094,25 @@ const qt = /* @__PURE__ */ ie(Kd, [["render", Ud]]), Hd = ["aria-label"], Qd = [
|
|
|
2999
3094
|
},
|
|
3000
3095
|
emits: ["update:modelValue", "change"],
|
|
3001
3096
|
setup(d, { emit: r }) {
|
|
3002
|
-
const e = d,
|
|
3003
|
-
function n(
|
|
3004
|
-
|
|
3005
|
-
}
|
|
3006
|
-
function w(
|
|
3007
|
-
const
|
|
3008
|
-
if (
|
|
3009
|
-
|
|
3010
|
-
const
|
|
3011
|
-
n(
|
|
3097
|
+
const e = d, l = r, g = Math.random().toString(36).slice(2, 8);
|
|
3098
|
+
function n(y, c) {
|
|
3099
|
+
c || (l("update:modelValue", y), l("change", y));
|
|
3100
|
+
}
|
|
3101
|
+
function w(y, c) {
|
|
3102
|
+
const i = e.tabs.filter((C) => !C.disabled).map((C) => C.value), x = i.indexOf(c);
|
|
3103
|
+
if (y.key === "ArrowRight" || y.key === "ArrowDown") {
|
|
3104
|
+
y.preventDefault();
|
|
3105
|
+
const C = i[(x + 1) % i.length];
|
|
3106
|
+
n(C);
|
|
3012
3107
|
}
|
|
3013
|
-
if (
|
|
3014
|
-
|
|
3015
|
-
const
|
|
3016
|
-
n(
|
|
3108
|
+
if (y.key === "ArrowLeft" || y.key === "ArrowUp") {
|
|
3109
|
+
y.preventDefault();
|
|
3110
|
+
const C = i[(x - 1 + i.length) % i.length];
|
|
3111
|
+
n(C);
|
|
3017
3112
|
}
|
|
3018
|
-
|
|
3113
|
+
y.key === "Home" && (y.preventDefault(), n(i[0])), y.key === "End" && (y.preventDefault(), n(i[i.length - 1]));
|
|
3019
3114
|
}
|
|
3020
|
-
const
|
|
3115
|
+
const h = {
|
|
3021
3116
|
sm: "dk:text-xs dk:px-3 dk:py-1.5",
|
|
3022
3117
|
md: "dk:text-sm dk:px-4 dk:py-2",
|
|
3023
3118
|
lg: "dk:text-base dk:px-5 dk:py-2.5"
|
|
@@ -3028,67 +3123,67 @@ const qt = /* @__PURE__ */ ie(Kd, [["render", Ud]]), Hd = ["aria-label"], Qd = [
|
|
|
3028
3123
|
success: { underline: "dk:border-emerald-600 dk:text-emerald-700 dk:dark:border-emerald-400 dk:dark:text-emerald-200", pills: "dk:bg-emerald-600 dk:text-white dk:dark:bg-emerald-500", boxed: "dk:bg-white dk:text-emerald-700 dk:dark:bg-zinc-800 dk:dark:text-emerald-200 dk:shadow-sm" },
|
|
3029
3124
|
warning: { underline: "dk:border-amber-500 dk:text-amber-700 dk:dark:border-amber-400 dk:dark:text-amber-200", pills: "dk:bg-amber-500 dk:text-white dk:dark:bg-amber-400", boxed: "dk:bg-white dk:text-amber-700 dk:dark:bg-zinc-800 dk:dark:text-amber-200 dk:shadow-sm" },
|
|
3030
3125
|
danger: { underline: "dk:border-rose-600 dk:text-rose-700 dk:dark:border-rose-400 dk:dark:text-rose-200", pills: "dk:bg-rose-600 dk:text-white dk:dark:bg-rose-500", boxed: "dk:bg-white dk:text-rose-700 dk:dark:bg-zinc-800 dk:dark:text-rose-200 dk:shadow-sm" }
|
|
3031
|
-
}, b =
|
|
3032
|
-
const
|
|
3126
|
+
}, b = o(() => "dk:w-full"), v = o(() => {
|
|
3127
|
+
const y = "dk:flex dk:items-center dk:gap-0.5", c = e.fullWidth ? "dk:w-full" : "", i = {
|
|
3033
3128
|
underline: "dk:border-b dk:border-zinc-200 dk:dark:border-zinc-700",
|
|
3034
3129
|
pills: "dk:gap-1",
|
|
3035
3130
|
boxed: "dk:bg-zinc-100 dk:dark:bg-zinc-800 dk:p-1 dk:rounded-xl dk:gap-1"
|
|
3036
3131
|
}[e.variant];
|
|
3037
|
-
return [
|
|
3132
|
+
return [y, c, i].join(" ");
|
|
3038
3133
|
});
|
|
3039
|
-
function f(
|
|
3040
|
-
const
|
|
3134
|
+
function f(y, c) {
|
|
3135
|
+
const i = "dk:inline-flex dk:items-center dk:gap-1.5 dk:font-medium dk:transition-all dk:duration-150 dk:outline-none dk:select-none dk:rounded-t", x = h[e.size], C = e.modelValue === y, k = c ? "dk:opacity-40 dk:cursor-not-allowed" : "dk:cursor-pointer", u = "dk:focus-visible:ring-2 dk:focus-visible:ring-offset-1 dk:focus-visible:ring-slate-400 dk:dark:focus-visible:ring-slate-500";
|
|
3041
3136
|
if (e.variant === "underline") {
|
|
3042
|
-
const I =
|
|
3043
|
-
return [
|
|
3137
|
+
const I = C ? `dk:border-b-2 ${p[e.color].underline}` : "dk:border-b-2 dk:border-transparent dk:text-zinc-500 dk:dark:text-zinc-400 dk:hover:text-zinc-700 dk:dark:hover:text-zinc-200 dk:hover:border-zinc-300 dk:dark:hover:border-zinc-600";
|
|
3138
|
+
return [i, x, I, k, u].join(" ");
|
|
3044
3139
|
}
|
|
3045
3140
|
if (e.variant === "pills") {
|
|
3046
|
-
const I =
|
|
3047
|
-
return [
|
|
3141
|
+
const I = C ? `dk:rounded-lg ${p[e.color].pills}` : "dk:rounded-lg dk:text-zinc-500 dk:dark:text-zinc-400 dk:hover:bg-zinc-100 dk:dark:hover:bg-zinc-700 dk:hover:text-zinc-700 dk:dark:hover:text-zinc-200";
|
|
3142
|
+
return [i, x, I, k, u].join(" ");
|
|
3048
3143
|
}
|
|
3049
|
-
const
|
|
3050
|
-
return [
|
|
3144
|
+
const $ = C ? `dk:rounded-lg ${p[e.color].boxed}` : "dk:rounded-lg dk:text-zinc-500 dk:dark:text-zinc-400 dk:hover:bg-black/5 dk:dark:hover:bg-white/5 dk:hover:text-zinc-700 dk:dark:hover:text-zinc-200", D = e.fullWidth ? "dk:flex-1 dk:text-center dk:justify-center" : "";
|
|
3145
|
+
return [i, x, $, k, u, D].join(" ");
|
|
3051
3146
|
}
|
|
3052
|
-
const z =
|
|
3053
|
-
return (
|
|
3054
|
-
class:
|
|
3147
|
+
const z = o(() => "dk:ml-1 dk:inline-flex dk:items-center dk:justify-center dk:rounded-full dk:bg-current/15 dk:text-current dk:text-[10px] dk:font-semibold dk:px-1.5 dk:py-px dk:leading-none"), V = o(() => [{ sm: "dk:pt-3", md: "dk:pt-4", lg: "dk:pt-5" }[e.size], "dk:outline-none"].join(" "));
|
|
3148
|
+
return (y, c) => (t(), a("div", {
|
|
3149
|
+
class: s(b.value)
|
|
3055
3150
|
}, [
|
|
3056
3151
|
m("div", {
|
|
3057
|
-
class:
|
|
3152
|
+
class: s(v.value),
|
|
3058
3153
|
role: "tablist",
|
|
3059
3154
|
"aria-label": d.ariaLabel
|
|
3060
3155
|
}, [
|
|
3061
|
-
(t(!0), a(E, null, K(d.tabs, (
|
|
3062
|
-
key:
|
|
3156
|
+
(t(!0), a(E, null, K(d.tabs, (i) => (t(), a("button", {
|
|
3157
|
+
key: i.value,
|
|
3063
3158
|
type: "button",
|
|
3064
|
-
id: `tab-${
|
|
3065
|
-
"aria-controls": `panel-${
|
|
3066
|
-
"aria-selected": d.modelValue ===
|
|
3067
|
-
disabled:
|
|
3159
|
+
id: `tab-${R(g)}-${i.value}`,
|
|
3160
|
+
"aria-controls": `panel-${R(g)}-${i.value}`,
|
|
3161
|
+
"aria-selected": d.modelValue === i.value,
|
|
3162
|
+
disabled: i.disabled,
|
|
3068
3163
|
role: "tab",
|
|
3069
|
-
class:
|
|
3070
|
-
onClick: (x) => n(
|
|
3071
|
-
onKeydown: (x) => w(x,
|
|
3164
|
+
class: s(f(i.value, i.disabled)),
|
|
3165
|
+
onClick: (x) => n(i.value, i.disabled),
|
|
3166
|
+
onKeydown: (x) => w(x, i.value)
|
|
3072
3167
|
}, [
|
|
3073
|
-
|
|
3074
|
-
P(" " + j(
|
|
3075
|
-
|
|
3168
|
+
i.icon ? (t(), a("span", at, j(i.icon), 1)) : S("", !0),
|
|
3169
|
+
P(" " + j(i.label) + " ", 1),
|
|
3170
|
+
i.badge !== void 0 ? (t(), a("span", {
|
|
3076
3171
|
key: 1,
|
|
3077
|
-
class:
|
|
3078
|
-
}, j(
|
|
3079
|
-
], 42,
|
|
3080
|
-
], 10,
|
|
3081
|
-
(t(!0), a(E, null, K(d.tabs, (
|
|
3082
|
-
key:
|
|
3083
|
-
id: `panel-${
|
|
3084
|
-
"aria-labelledby": `tab-${
|
|
3172
|
+
class: s(z.value)
|
|
3173
|
+
}, j(i.badge), 3)) : S("", !0)
|
|
3174
|
+
], 42, rt))), 128))
|
|
3175
|
+
], 10, tt),
|
|
3176
|
+
(t(!0), a(E, null, K(d.tabs, (i) => (t(), a("div", {
|
|
3177
|
+
key: i.value,
|
|
3178
|
+
id: `panel-${R(g)}-${i.value}`,
|
|
3179
|
+
"aria-labelledby": `tab-${R(g)}-${i.value}`,
|
|
3085
3180
|
role: "tabpanel",
|
|
3086
|
-
tabindex: d.modelValue ===
|
|
3087
|
-
hidden: d.modelValue !==
|
|
3088
|
-
class:
|
|
3181
|
+
tabindex: d.modelValue === i.value ? 0 : -1,
|
|
3182
|
+
hidden: d.modelValue !== i.value,
|
|
3183
|
+
class: s(V.value)
|
|
3089
3184
|
}, [
|
|
3090
|
-
_(
|
|
3091
|
-
], 10,
|
|
3185
|
+
_(y.$slots, i.value)
|
|
3186
|
+
], 10, ot))), 128))
|
|
3092
3187
|
], 2));
|
|
3093
3188
|
}
|
|
3094
3189
|
}), le = ze({ toasts: [] });
|
|
@@ -3108,29 +3203,29 @@ function Ce(d) {
|
|
|
3108
3203
|
const r = le.toasts.findIndex((e) => e.id === d);
|
|
3109
3204
|
r !== -1 && le.toasts.splice(r, 1);
|
|
3110
3205
|
}
|
|
3111
|
-
function
|
|
3206
|
+
function kt() {
|
|
3112
3207
|
le.toasts.splice(0);
|
|
3113
3208
|
}
|
|
3114
|
-
function
|
|
3209
|
+
function nt() {
|
|
3115
3210
|
return {
|
|
3116
|
-
toasts:
|
|
3211
|
+
toasts: Ae(le.toasts),
|
|
3117
3212
|
add: ke,
|
|
3118
3213
|
remove: Ce,
|
|
3119
|
-
clear:
|
|
3214
|
+
clear: kt,
|
|
3120
3215
|
success: (d, r) => ke({ ...r, message: d, color: "success" }),
|
|
3121
3216
|
error: (d, r) => ke({ ...r, message: d, color: "danger" }),
|
|
3122
3217
|
warning: (d, r) => ke({ ...r, message: d, color: "warning" }),
|
|
3123
3218
|
info: (d, r) => ke({ ...r, message: d, color: "primary" })
|
|
3124
3219
|
};
|
|
3125
3220
|
}
|
|
3126
|
-
const
|
|
3221
|
+
const st = {
|
|
3127
3222
|
key: 0,
|
|
3128
3223
|
"aria-hidden": "true",
|
|
3129
3224
|
class: "dk:flex-shrink-0 dk:text-lg"
|
|
3130
|
-
},
|
|
3225
|
+
}, lt = { class: "dk:flex-1 dk:min-w-0" }, it = {
|
|
3131
3226
|
key: 0,
|
|
3132
3227
|
class: "dk:text-sm dk:font-semibold dk:leading-snug"
|
|
3133
|
-
},
|
|
3228
|
+
}, ct = ["onClick"], ut = "dk:flex-shrink-0 dk:flex dk:items-center dk:justify-center dk:w-5 dk:h-5 dk:rounded dk:text-current dk:opacity-70 dk:hover:opacity-100 dk:transition-opacity dk:text-base dk:leading-none dk:outline-none dk:ring-1 dk:ring-current/30 dk:focus-visible:ring-2", Zt = /* @__PURE__ */ L({
|
|
3134
3229
|
__name: "DuiToast",
|
|
3135
3230
|
props: {
|
|
3136
3231
|
position: { default: "top-right" },
|
|
@@ -3138,26 +3233,26 @@ const ot = {
|
|
|
3138
3233
|
zIndex: { default: 9999 }
|
|
3139
3234
|
},
|
|
3140
3235
|
setup(d) {
|
|
3141
|
-
const r = d, { toasts: e, remove:
|
|
3236
|
+
const r = d, { toasts: e, remove: l } = nt(), g = o(() => e.slice(0, r.maxToasts)), n = {
|
|
3142
3237
|
"top-right": "dk:top-4 dk:right-4 dk:items-end",
|
|
3143
3238
|
"top-left": "dk:top-4 dk:left-4 dk:items-start",
|
|
3144
3239
|
"top-center": "dk:top-4 dk:left-1/2 dk:-translate-x-1/2 dk:items-center",
|
|
3145
3240
|
"bottom-right": "dk:bottom-4 dk:right-4 dk:items-end",
|
|
3146
3241
|
"bottom-left": "dk:bottom-4 dk:left-4 dk:items-start",
|
|
3147
3242
|
"bottom-center": "dk:bottom-4 dk:left-1/2 dk:-translate-x-1/2 dk:items-center"
|
|
3148
|
-
}, w =
|
|
3243
|
+
}, w = o(() => [
|
|
3149
3244
|
"dk:fixed dk:pointer-events-none",
|
|
3150
3245
|
n[r.position]
|
|
3151
|
-
].join(" ")),
|
|
3246
|
+
].join(" ")), h = o(() => ({
|
|
3152
3247
|
zIndex: String(r.zIndex)
|
|
3153
|
-
})), p =
|
|
3248
|
+
})), p = o(() => "dk:relative dk:flex dk:flex-col dk:gap-2 dk:w-80 dk:max-w-[calc(100vw-2rem)]"), b = {
|
|
3154
3249
|
neutral: "dk:bg-zinc-800 dk:dark:bg-zinc-700 dk:text-white dk:border-zinc-600",
|
|
3155
3250
|
primary: "dk:bg-slate-700 dk:dark:bg-slate-700 dk:text-white dk:border-slate-500",
|
|
3156
3251
|
secondary: "dk:bg-pink-600 dk:dark:bg-pink-700 dk:text-white dk:border-pink-400",
|
|
3157
3252
|
success: "dk:bg-emerald-600 dk:dark:bg-emerald-700 dk:text-white dk:border-emerald-400",
|
|
3158
3253
|
warning: "dk:bg-amber-600 dk:dark:bg-amber-700 dk:text-white dk:border-amber-400",
|
|
3159
3254
|
danger: "dk:bg-rose-600 dk:dark:bg-rose-700 dk:text-white dk:border-rose-400"
|
|
3160
|
-
},
|
|
3255
|
+
}, v = {
|
|
3161
3256
|
neutral: "dk:bg-zinc-300",
|
|
3162
3257
|
primary: "dk:bg-slate-300",
|
|
3163
3258
|
secondary: "dk:bg-pink-200",
|
|
@@ -3173,18 +3268,18 @@ const ot = {
|
|
|
3173
3268
|
].join(" ");
|
|
3174
3269
|
}
|
|
3175
3270
|
function z(V) {
|
|
3176
|
-
return ["dk:flex-shrink-0 dk:w-2 dk:h-2 dk:rounded-full dk:mt-1",
|
|
3271
|
+
return ["dk:flex-shrink-0 dk:w-2 dk:h-2 dk:rounded-full dk:mt-1", v[V]].join(" ");
|
|
3177
3272
|
}
|
|
3178
|
-
return (V,
|
|
3273
|
+
return (V, y) => (t(), W(me, { to: "body" }, [
|
|
3179
3274
|
m("div", {
|
|
3180
|
-
class:
|
|
3181
|
-
style: te(
|
|
3275
|
+
class: s(w.value),
|
|
3276
|
+
style: te(h.value),
|
|
3182
3277
|
"aria-live": "polite",
|
|
3183
3278
|
"aria-atomic": "false"
|
|
3184
3279
|
}, [
|
|
3185
|
-
J(
|
|
3280
|
+
J(Ee, {
|
|
3186
3281
|
tag: "div",
|
|
3187
|
-
class:
|
|
3282
|
+
class: s(p.value),
|
|
3188
3283
|
"enter-active-class": "dk:transition-all dk:duration-300 dk:ease-out",
|
|
3189
3284
|
"leave-active-class": "dk:transition-all dk:duration-200 dk:ease-in dk:absolute dk:w-full",
|
|
3190
3285
|
"enter-from-class": "dk:opacity-0 dk:translate-y-2 dk:scale-95",
|
|
@@ -3192,34 +3287,34 @@ const ot = {
|
|
|
3192
3287
|
"move-class": "dk:transition-all dk:duration-300"
|
|
3193
3288
|
}, {
|
|
3194
3289
|
default: A(() => [
|
|
3195
|
-
(t(!0), a(E, null, K(g.value, (
|
|
3196
|
-
key:
|
|
3290
|
+
(t(!0), a(E, null, K(g.value, (c) => (t(), a("div", {
|
|
3291
|
+
key: c.id,
|
|
3197
3292
|
role: "alert",
|
|
3198
|
-
class:
|
|
3293
|
+
class: s(f(c.color))
|
|
3199
3294
|
}, [
|
|
3200
|
-
|
|
3295
|
+
c.icon ? (t(), a("span", st, j(c.icon), 1)) : (t(), a("span", {
|
|
3201
3296
|
key: 1,
|
|
3202
|
-
class:
|
|
3297
|
+
class: s(z(c.color)),
|
|
3203
3298
|
"aria-hidden": "true"
|
|
3204
3299
|
}, null, 2)),
|
|
3205
|
-
m("div",
|
|
3206
|
-
|
|
3300
|
+
m("div", lt, [
|
|
3301
|
+
c.title ? (t(), a("p", it, j(c.title), 1)) : S("", !0),
|
|
3207
3302
|
m("p", {
|
|
3208
|
-
class:
|
|
3209
|
-
}, j(
|
|
3303
|
+
class: s(["dk:text-sm dk:leading-snug", { "dk:opacity-80": c.title }])
|
|
3304
|
+
}, j(c.message), 3)
|
|
3210
3305
|
]),
|
|
3211
|
-
|
|
3306
|
+
c.closable ? (t(), a("button", {
|
|
3212
3307
|
key: 2,
|
|
3213
3308
|
type: "button",
|
|
3214
|
-
class:
|
|
3309
|
+
class: s(ut),
|
|
3215
3310
|
"aria-label": "Cerrar notificacion",
|
|
3216
|
-
onClick: (
|
|
3217
|
-
}, [
|
|
3311
|
+
onClick: (i) => R(l)(c.id)
|
|
3312
|
+
}, [...y[0] || (y[0] = [
|
|
3218
3313
|
m("i", {
|
|
3219
3314
|
class: "mdi mdi-close",
|
|
3220
3315
|
"aria-hidden": "true"
|
|
3221
3316
|
}, null, -1)
|
|
3222
|
-
])], 8,
|
|
3317
|
+
])], 8, ct)) : S("", !0)
|
|
3223
3318
|
], 2))), 128))
|
|
3224
3319
|
]),
|
|
3225
3320
|
_: 1
|
|
@@ -3227,7 +3322,7 @@ const ot = {
|
|
|
3227
3322
|
], 6)
|
|
3228
3323
|
]));
|
|
3229
3324
|
}
|
|
3230
|
-
}),
|
|
3325
|
+
}), bt = { key: 1 }, Rt = /* @__PURE__ */ L({
|
|
3231
3326
|
__name: "DuiConfirmation",
|
|
3232
3327
|
props: {
|
|
3233
3328
|
label: {},
|
|
@@ -3239,29 +3334,29 @@ const ot = {
|
|
|
3239
3334
|
},
|
|
3240
3335
|
emits: ["confirmed"],
|
|
3241
3336
|
setup(d, { emit: r }) {
|
|
3242
|
-
const e =
|
|
3337
|
+
const e = N(!1), l = N(!1), g = r, n = d;
|
|
3243
3338
|
function w() {
|
|
3244
3339
|
e.value = !0, setTimeout(() => {
|
|
3245
|
-
e.value = !1,
|
|
3340
|
+
e.value = !1, l.value = !1;
|
|
3246
3341
|
}, 1e4);
|
|
3247
3342
|
}
|
|
3248
|
-
function
|
|
3249
|
-
g("confirmed"), e.value = !1,
|
|
3343
|
+
function h() {
|
|
3344
|
+
g("confirmed"), e.value = !1, l.value = !1;
|
|
3250
3345
|
}
|
|
3251
|
-
return (p, b) => e.value ? (t(), a("div",
|
|
3252
|
-
J(
|
|
3253
|
-
modelValue:
|
|
3254
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
3346
|
+
return (p, b) => e.value ? (t(), a("div", bt, [
|
|
3347
|
+
J(id, {
|
|
3348
|
+
modelValue: l.value,
|
|
3349
|
+
"onUpdate:modelValue": b[0] || (b[0] = (v) => l.value = v),
|
|
3255
3350
|
label: n.checkLabel,
|
|
3256
3351
|
size: n.size,
|
|
3257
3352
|
variant: n.variant,
|
|
3258
3353
|
color: n.color,
|
|
3259
|
-
checked:
|
|
3354
|
+
checked: l.value
|
|
3260
3355
|
}, null, 8, ["modelValue", "label", "size", "variant", "color", "checked"]),
|
|
3261
3356
|
b[2] || (b[2] = m("br", null, null, -1)),
|
|
3262
|
-
|
|
3357
|
+
l.value ? (t(), W(oe, {
|
|
3263
3358
|
key: 0,
|
|
3264
|
-
onClick: b[1] || (b[1] = (
|
|
3359
|
+
onClick: b[1] || (b[1] = (v) => h()),
|
|
3265
3360
|
variant: n.variant,
|
|
3266
3361
|
color: n.color,
|
|
3267
3362
|
size: n.size
|
|
@@ -3284,23 +3379,23 @@ const ot = {
|
|
|
3284
3379
|
_: 1
|
|
3285
3380
|
}, 8, ["variant", "color", "size"]));
|
|
3286
3381
|
}
|
|
3287
|
-
}),
|
|
3382
|
+
}), pt = {
|
|
3288
3383
|
key: 0,
|
|
3289
3384
|
class: "dk:flex dk:items-center dk:gap-4 dk:flex-shrink-0"
|
|
3290
|
-
},
|
|
3385
|
+
}, mt = { class: "dk:hidden dk:md:flex dk:items-center dk:flex-1" }, ft = {
|
|
3291
3386
|
key: 0,
|
|
3292
3387
|
class: "dk:relative dk:group"
|
|
3293
|
-
},
|
|
3388
|
+
}, gt = { 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:bg-none dk:dark:bg-zinc-900 dk:backdrop-blur-md dk:shadow-lg dk:border dk:border-white/40 dk:dark:border-zinc-800 dk:opacity-0 dk:invisible dk:group-hover:opacity-100 dk:group-hover:visible dk:transition-all dk:duration-200 dk:z-50" }, xt = {
|
|
3294
3389
|
key: 1,
|
|
3295
3390
|
class: "dk:hidden dk:md:flex dk:items-center dk:gap-2 dk:flex-shrink-0"
|
|
3296
|
-
},
|
|
3391
|
+
}, ht = {
|
|
3297
3392
|
class: "dk:w-6 dk:h-6 dk:stroke-gray-900 dk:dark:stroke-white",
|
|
3298
3393
|
fill: "none",
|
|
3299
3394
|
viewBox: "0 0 24 24"
|
|
3300
|
-
},
|
|
3395
|
+
}, vt = ["d"], yt = { 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:bg-none dk:dark:bg-zinc-900 dk:backdrop-blur-md dk:border-t dk:border-white/40 dk:dark:border-zinc-800 dk:shadow-lg dk:dark:shadow-black/30 dk:z-40" }, wt = { class: "dk:px-4 dk:py-3 dk:space-y-2" }, zt = { key: 0 }, Ct = ["onClick"], $t = { class: "dk:flex dk:items-center" }, St = { class: "dk:ml-4 dk:mt-2 dk:space-y-1" }, jt = {
|
|
3301
3396
|
key: 0,
|
|
3302
3397
|
class: "dk:pt-3 dk:border-t dk:border-white/20 dk:dark:border-white/10"
|
|
3303
|
-
},
|
|
3398
|
+
}, er = /* @__PURE__ */ L({
|
|
3304
3399
|
__name: "DuiNavbar",
|
|
3305
3400
|
props: {
|
|
3306
3401
|
items: { default: () => [] },
|
|
@@ -3309,17 +3404,17 @@ const ot = {
|
|
|
3309
3404
|
underlineColor: { default: "primary" }
|
|
3310
3405
|
},
|
|
3311
3406
|
setup(d) {
|
|
3312
|
-
const r = d, e =
|
|
3313
|
-
const
|
|
3314
|
-
return fe(x.to,
|
|
3407
|
+
const r = d, e = N(!1), l = ze({}), g = (x) => se(x.to), n = (x) => {
|
|
3408
|
+
const C = g(x);
|
|
3409
|
+
return fe(x.to, C);
|
|
3315
3410
|
}, w = () => {
|
|
3316
3411
|
e.value = !e.value;
|
|
3317
|
-
},
|
|
3318
|
-
e.value = !1, Object.keys(
|
|
3319
|
-
|
|
3412
|
+
}, h = () => {
|
|
3413
|
+
e.value = !1, Object.keys(l).forEach((x) => {
|
|
3414
|
+
l[x] = !1;
|
|
3320
3415
|
});
|
|
3321
3416
|
}, p = (x) => {
|
|
3322
|
-
|
|
3417
|
+
l[x] = !l[x];
|
|
3323
3418
|
}, b = {
|
|
3324
3419
|
s: {
|
|
3325
3420
|
height: "dk:h-12",
|
|
@@ -3339,7 +3434,7 @@ const ot = {
|
|
|
3339
3434
|
text: "dk:text-lg",
|
|
3340
3435
|
itemPadding: "dk:px-4 dk:py-3"
|
|
3341
3436
|
}
|
|
3342
|
-
},
|
|
3437
|
+
}, v = o(() => {
|
|
3343
3438
|
const x = b[r.size];
|
|
3344
3439
|
return [
|
|
3345
3440
|
"dk:relative",
|
|
@@ -3357,7 +3452,7 @@ const ot = {
|
|
|
3357
3452
|
x.padding,
|
|
3358
3453
|
x.text
|
|
3359
3454
|
].join(" ");
|
|
3360
|
-
}), f =
|
|
3455
|
+
}), f = o(() => [
|
|
3361
3456
|
"dk:flex dk:items-center dk:space-x-1 dk:flex-1",
|
|
3362
3457
|
{
|
|
3363
3458
|
left: "dk:justify-start",
|
|
@@ -3374,10 +3469,10 @@ const ot = {
|
|
|
3374
3469
|
warning: "dk:before:from-amber-500 dk:before:to-amber-600 dk:dark:before:from-amber-400 dk:dark:before:to-amber-500"
|
|
3375
3470
|
};
|
|
3376
3471
|
return x[r.underlineColor] || x.primary;
|
|
3377
|
-
}, V =
|
|
3378
|
-
const x = b[r.size],
|
|
3379
|
-
return (
|
|
3380
|
-
const
|
|
3472
|
+
}, V = o(() => {
|
|
3473
|
+
const x = b[r.size], C = z();
|
|
3474
|
+
return (k, u = !0) => {
|
|
3475
|
+
const $ = k.active ?? !1, D = u ? "dk:pl-3" : "dk:pl-2", I = "dk:pr-3", X = u ? "dk:pl-2" : "dk:pl-1", ee = "dk:pr-2", de = u ? "dk:pl-4" : "dk:pl-3", ge = "dk:pr-4";
|
|
3381
3476
|
let re = "";
|
|
3382
3477
|
return x.itemPadding.includes("px-2") ? re = `${X} ${ee} dk:py-1.5` : x.itemPadding.includes("px-4") ? re = `${de} ${ge} dk:py-3` : re = `${D} ${I} dk:py-2`, [
|
|
3383
3478
|
// Block style with animated underline
|
|
@@ -3388,56 +3483,56 @@ const ot = {
|
|
|
3388
3483
|
// Animated underline effect
|
|
3389
3484
|
"dk:before:absolute dk:before:bottom-0 dk:before:left-0 dk:before:h-0.5",
|
|
3390
3485
|
"dk:before:bg-gradient-to-r",
|
|
3391
|
-
|
|
3486
|
+
C,
|
|
3392
3487
|
"dk:before:transition-all dk:before:duration-300",
|
|
3393
|
-
|
|
3488
|
+
$ ? "dk:before:w-full dk:text-gray-900 dk:dark:text-gray-100" : "dk:before:w-0 dk:hover:before:w-full",
|
|
3394
3489
|
re
|
|
3395
3490
|
].join(" ");
|
|
3396
3491
|
};
|
|
3397
|
-
}),
|
|
3492
|
+
}), y = o(() => [
|
|
3398
3493
|
"dk:block dk:w-full dk:text-left dk:px-4 dk:py-2 dk:text-sm dk:whitespace-nowrap",
|
|
3399
3494
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:hover:bg-white/50 dk:dark:hover:bg-white/10",
|
|
3400
3495
|
"dk:dark:text-gray-300 dk:dark:hover:text-gray-100",
|
|
3401
3496
|
"dk:transition-all dk:duration-200 dk:no-underline",
|
|
3402
3497
|
"dk:border-l-2 dk:border-transparent dk:hover:border-blue-500"
|
|
3403
|
-
].join(" ")),
|
|
3498
|
+
].join(" ")), c = o(() => [
|
|
3404
3499
|
"dk:flex dk:items-center dk:justify-start dk:w-full dk:text-left dk:px-3 dk:py-2",
|
|
3405
3500
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:rounded-lg",
|
|
3406
3501
|
"dk:bg-white/10 dk:hover:bg-white/25 dk:dark:bg-white/5 dk:dark:hover:bg-white/15",
|
|
3407
3502
|
"dk:dark:text-gray-300 dk:dark:hover:text-gray-100",
|
|
3408
3503
|
"dk:border dk:border-white/20 dk:dark:border-white/10 dk:hover:border-white/40 dk:dark:hover:border-white/20",
|
|
3409
3504
|
"dk:transition-all dk:duration-200 dk:no-underline"
|
|
3410
|
-
].join(" ")),
|
|
3505
|
+
].join(" ")), i = o(() => [
|
|
3411
3506
|
"dk:block dk:w-full dk:text-left dk:px-3 dk:py-2 dk:text-sm dk:rounded-lg",
|
|
3412
3507
|
"dk:text-gray-600 dk:hover:text-gray-800 dk:hover:bg-white/30 dk:dark:hover:bg-white/10",
|
|
3413
3508
|
"dk:dark:text-gray-400 dk:dark:hover:text-gray-200",
|
|
3414
3509
|
"dk:border-l-2 dk:border-transparent dk:hover:border-blue-500",
|
|
3415
3510
|
"dk:transition-all dk:duration-200 dk:no-underline"
|
|
3416
3511
|
].join(" "));
|
|
3417
|
-
return (x,
|
|
3418
|
-
class:
|
|
3512
|
+
return (x, C) => (t(), a("nav", {
|
|
3513
|
+
class: s(v.value)
|
|
3419
3514
|
}, [
|
|
3420
|
-
x.$slots.brand ? (t(), a("div",
|
|
3515
|
+
x.$slots.brand ? (t(), a("div", pt, [
|
|
3421
3516
|
_(x.$slots, "brand")
|
|
3422
3517
|
])) : S("", !0),
|
|
3423
|
-
m("div",
|
|
3518
|
+
m("div", mt, [
|
|
3424
3519
|
m("div", {
|
|
3425
|
-
class:
|
|
3520
|
+
class: s(f.value)
|
|
3426
3521
|
}, [
|
|
3427
|
-
(t(!0), a(E, null, K(d.items, (
|
|
3428
|
-
key:
|
|
3522
|
+
(t(!0), a(E, null, K(d.items, (k) => (t(), a(E, {
|
|
3523
|
+
key: k.label
|
|
3429
3524
|
}, [
|
|
3430
|
-
|
|
3431
|
-
(t(), W(Q(g(
|
|
3432
|
-
class: V.value(
|
|
3525
|
+
k.children && k.children.length > 0 ? (t(), a("div", ft, [
|
|
3526
|
+
(t(), W(Q(g(k)), O({ ref_for: !0 }, n(k), {
|
|
3527
|
+
class: V.value(k, !0)
|
|
3433
3528
|
}), {
|
|
3434
3529
|
default: A(() => [
|
|
3435
|
-
|
|
3530
|
+
k.icon ? (t(), a("i", {
|
|
3436
3531
|
key: 0,
|
|
3437
|
-
class:
|
|
3532
|
+
class: s([k.icon, "dk:mr-2"])
|
|
3438
3533
|
}, null, 2)) : S("", !0),
|
|
3439
|
-
P(" " + j(
|
|
3440
|
-
|
|
3534
|
+
P(" " + j(k.label) + " ", 1),
|
|
3535
|
+
C[0] || (C[0] = m("svg", {
|
|
3441
3536
|
class: "dk:w-4 dk:h-4 dk:ml-1 dk:transform dk:group-hover:rotate-180 dk:transition-transform",
|
|
3442
3537
|
fill: "none",
|
|
3443
3538
|
stroke: "currentColor",
|
|
@@ -3453,39 +3548,39 @@ const ot = {
|
|
|
3453
3548
|
]),
|
|
3454
3549
|
_: 2
|
|
3455
3550
|
}, 1040, ["class"])),
|
|
3456
|
-
m("div",
|
|
3457
|
-
(t(!0), a(E, null, K(
|
|
3458
|
-
key:
|
|
3459
|
-
}, { ref_for: !0 }, n(
|
|
3551
|
+
m("div", gt, [
|
|
3552
|
+
(t(!0), a(E, null, K(k.children, (u) => (t(), W(Q(g(u)), O({
|
|
3553
|
+
key: u.label
|
|
3554
|
+
}, { ref_for: !0 }, n(u), { class: y.value }), {
|
|
3460
3555
|
default: A(() => [
|
|
3461
|
-
|
|
3556
|
+
u.icon ? (t(), a("i", {
|
|
3462
3557
|
key: 0,
|
|
3463
|
-
class:
|
|
3558
|
+
class: s([u.icon, "dk:mr-2"])
|
|
3464
3559
|
}, null, 2)) : S("", !0),
|
|
3465
|
-
P(" " + j(
|
|
3560
|
+
P(" " + j(u.label), 1)
|
|
3466
3561
|
]),
|
|
3467
3562
|
_: 2
|
|
3468
3563
|
}, 1040, ["class"]))), 128))
|
|
3469
3564
|
])
|
|
3470
|
-
])) : (t(), W(Q(g(
|
|
3565
|
+
])) : (t(), W(Q(g(k)), O({
|
|
3471
3566
|
key: 1,
|
|
3472
3567
|
ref_for: !0
|
|
3473
|
-
}, n(
|
|
3474
|
-
class: V.value(
|
|
3568
|
+
}, n(k), {
|
|
3569
|
+
class: V.value(k, !1)
|
|
3475
3570
|
}), {
|
|
3476
3571
|
default: A(() => [
|
|
3477
|
-
|
|
3572
|
+
k.icon ? (t(), a("i", {
|
|
3478
3573
|
key: 0,
|
|
3479
|
-
class:
|
|
3574
|
+
class: s([k.icon, "dk:mr-2"])
|
|
3480
3575
|
}, null, 2)) : S("", !0),
|
|
3481
|
-
P(" " + j(
|
|
3576
|
+
P(" " + j(k.label), 1)
|
|
3482
3577
|
]),
|
|
3483
3578
|
_: 2
|
|
3484
3579
|
}, 1040, ["class"]))
|
|
3485
3580
|
], 64))), 128))
|
|
3486
3581
|
], 2)
|
|
3487
3582
|
]),
|
|
3488
|
-
x.$slots.actions ? (t(), a("div",
|
|
3583
|
+
x.$slots.actions ? (t(), a("div", xt, [
|
|
3489
3584
|
_(x.$slots, "actions")
|
|
3490
3585
|
])) : S("", !0),
|
|
3491
3586
|
m("button", {
|
|
@@ -3493,39 +3588,39 @@ const ot = {
|
|
|
3493
3588
|
onClick: w,
|
|
3494
3589
|
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"
|
|
3495
3590
|
}, [
|
|
3496
|
-
(t(), a("svg",
|
|
3591
|
+
(t(), a("svg", ht, [
|
|
3497
3592
|
m("path", {
|
|
3498
3593
|
"stroke-linecap": "round",
|
|
3499
3594
|
"stroke-linejoin": "round",
|
|
3500
3595
|
"stroke-width": "2",
|
|
3501
3596
|
d: e.value ? "M6 18L18 6M6 6l12 12" : "M4 6h16M4 12h16M4 18h16"
|
|
3502
|
-
}, null, 8,
|
|
3597
|
+
}, null, 8, vt)
|
|
3503
3598
|
]))
|
|
3504
3599
|
]),
|
|
3505
|
-
xe(m("div",
|
|
3506
|
-
m("div",
|
|
3507
|
-
(t(!0), a(E, null, K(d.items, (
|
|
3508
|
-
key:
|
|
3600
|
+
xe(m("div", yt, [
|
|
3601
|
+
m("div", wt, [
|
|
3602
|
+
(t(!0), a(E, null, K(d.items, (k) => (t(), a(E, {
|
|
3603
|
+
key: k.label
|
|
3509
3604
|
}, [
|
|
3510
|
-
|
|
3605
|
+
k.children && k.children.length > 0 ? (t(), a("div", zt, [
|
|
3511
3606
|
m("button", {
|
|
3512
3607
|
type: "button",
|
|
3513
|
-
onClick: (
|
|
3514
|
-
class:
|
|
3608
|
+
onClick: (u) => p(k.label),
|
|
3609
|
+
class: s([c.value, "dk:justify-between"])
|
|
3515
3610
|
}, [
|
|
3516
|
-
m("div",
|
|
3517
|
-
|
|
3611
|
+
m("div", $t, [
|
|
3612
|
+
k.icon ? (t(), a("i", {
|
|
3518
3613
|
key: 0,
|
|
3519
|
-
class:
|
|
3614
|
+
class: s([k.icon, "dk:mr-2"])
|
|
3520
3615
|
}, null, 2)) : S("", !0),
|
|
3521
|
-
P(" " + j(
|
|
3616
|
+
P(" " + j(k.label), 1)
|
|
3522
3617
|
]),
|
|
3523
3618
|
(t(), a("svg", {
|
|
3524
|
-
class:
|
|
3619
|
+
class: s(["dk:w-4 dk:h-4 dk:transform dk:transition-transform dk:flex-shrink-0", l[k.label] ? "dk:rotate-180" : ""]),
|
|
3525
3620
|
fill: "none",
|
|
3526
3621
|
stroke: "currentColor",
|
|
3527
3622
|
viewBox: "0 0 24 24"
|
|
3528
|
-
}, [...
|
|
3623
|
+
}, [...C[1] || (C[1] = [
|
|
3529
3624
|
m("path", {
|
|
3530
3625
|
"stroke-linecap": "round",
|
|
3531
3626
|
"stroke-linejoin": "round",
|
|
@@ -3533,44 +3628,44 @@ const ot = {
|
|
|
3533
3628
|
d: "M19 9l-7 7-7-7"
|
|
3534
3629
|
}, null, -1)
|
|
3535
3630
|
])], 2))
|
|
3536
|
-
], 10,
|
|
3537
|
-
xe(m("div",
|
|
3538
|
-
(t(!0), a(E, null, K(
|
|
3539
|
-
key:
|
|
3540
|
-
}, { ref_for: !0 }, n(
|
|
3541
|
-
class:
|
|
3542
|
-
onClick:
|
|
3631
|
+
], 10, Ct),
|
|
3632
|
+
xe(m("div", St, [
|
|
3633
|
+
(t(!0), a(E, null, K(k.children, (u) => (t(), W(Q(g(u)), O({
|
|
3634
|
+
key: u.label
|
|
3635
|
+
}, { ref_for: !0 }, n(u), {
|
|
3636
|
+
class: i.value,
|
|
3637
|
+
onClick: h
|
|
3543
3638
|
}), {
|
|
3544
3639
|
default: A(() => [
|
|
3545
|
-
|
|
3640
|
+
u.icon ? (t(), a("i", {
|
|
3546
3641
|
key: 0,
|
|
3547
|
-
class:
|
|
3642
|
+
class: s([u.icon, "dk:mr-2"])
|
|
3548
3643
|
}, null, 2)) : S("", !0),
|
|
3549
|
-
P(" " + j(
|
|
3644
|
+
P(" " + j(u.label), 1)
|
|
3550
3645
|
]),
|
|
3551
3646
|
_: 2
|
|
3552
3647
|
}, 1040, ["class"]))), 128))
|
|
3553
3648
|
], 512), [
|
|
3554
|
-
[he,
|
|
3649
|
+
[he, l[k.label]]
|
|
3555
3650
|
])
|
|
3556
|
-
])) : (t(), W(Q(g(
|
|
3651
|
+
])) : (t(), W(Q(g(k)), O({
|
|
3557
3652
|
key: 1,
|
|
3558
3653
|
ref_for: !0
|
|
3559
|
-
}, n(
|
|
3560
|
-
class:
|
|
3561
|
-
onClick:
|
|
3654
|
+
}, n(k), {
|
|
3655
|
+
class: c.value,
|
|
3656
|
+
onClick: h
|
|
3562
3657
|
}), {
|
|
3563
3658
|
default: A(() => [
|
|
3564
|
-
|
|
3659
|
+
k.icon ? (t(), a("i", {
|
|
3565
3660
|
key: 0,
|
|
3566
|
-
class:
|
|
3661
|
+
class: s([k.icon, "dk:mr-2"])
|
|
3567
3662
|
}, null, 2)) : S("", !0),
|
|
3568
|
-
P(" " + j(
|
|
3663
|
+
P(" " + j(k.label), 1)
|
|
3569
3664
|
]),
|
|
3570
3665
|
_: 2
|
|
3571
3666
|
}, 1040, ["class"]))
|
|
3572
3667
|
], 64))), 128)),
|
|
3573
|
-
x.$slots.actions ? (t(), a("div",
|
|
3668
|
+
x.$slots.actions ? (t(), a("div", jt, [
|
|
3574
3669
|
_(x.$slots, "actions")
|
|
3575
3670
|
])) : S("", !0)
|
|
3576
3671
|
])
|
|
@@ -3581,32 +3676,33 @@ const ot = {
|
|
|
3581
3676
|
}
|
|
3582
3677
|
});
|
|
3583
3678
|
export {
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3679
|
+
Ut as DuiAccordion,
|
|
3680
|
+
Wt as DuiAction,
|
|
3681
|
+
At as DuiAlert,
|
|
3682
|
+
qt as DuiBadge,
|
|
3588
3683
|
oe as DuiButton,
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
Dt as
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3684
|
+
Ot as DuiCard,
|
|
3685
|
+
Lt as DuiCheckbox,
|
|
3686
|
+
Rt as DuiConfirmation,
|
|
3687
|
+
Nt as DuiDrawer,
|
|
3688
|
+
Ht as DuiDropdown,
|
|
3689
|
+
Qt as DuiDropdownItem,
|
|
3690
|
+
Gt as DuiDropdownSeparator,
|
|
3691
|
+
Bt as DuiFile,
|
|
3692
|
+
It as DuiForm,
|
|
3693
|
+
Dt as DuiInput,
|
|
3694
|
+
_t as DuiLabel,
|
|
3695
|
+
Ft as DuiModal,
|
|
3696
|
+
er as DuiNavbar,
|
|
3697
|
+
Yt as DuiPagination,
|
|
3698
|
+
Pt as DuiRadio,
|
|
3699
|
+
Tt as DuiSelect,
|
|
3700
|
+
Jt as DuiSkeleton,
|
|
3701
|
+
id as DuiSwitch,
|
|
3702
|
+
Et as DuiTable,
|
|
3703
|
+
Xt as DuiTabs,
|
|
3704
|
+
Mt as DuiTextarea,
|
|
3705
|
+
Zt as DuiToast,
|
|
3706
|
+
Kt as DuiTooltip,
|
|
3707
|
+
nt as useToast
|
|
3612
3708
|
};
|