@dronico/droni-kit 1.16.0 → 1.18.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 +25 -2
- package/dist/droni-kit.cjs.js +9 -9
- package/dist/droni-kit.css +1 -1
- package/dist/droni-kit.es.js +1773 -620
- package/dist/index.d.ts +12 -1
- package/dist/stories/Elements/DuiAccordion.stories.d.ts +104 -0
- package/dist/stories/Elements/DuiAccordion.vue.d.ts +44 -0
- package/dist/stories/Elements/DuiBadge.stories.d.ts +124 -0
- package/dist/stories/Elements/DuiBadge.vue.d.ts +41 -0
- package/dist/stories/Elements/DuiDropdown.stories.d.ts +131 -0
- package/dist/stories/Elements/DuiDropdown.vue.d.ts +51 -0
- package/dist/stories/Elements/DuiDropdownItem.vue.d.ts +40 -0
- package/dist/stories/Elements/DuiDropdownSeparator.vue.d.ts +2 -0
- package/dist/stories/Elements/DuiPagination.stories.d.ts +98 -0
- package/dist/stories/Elements/DuiPagination.vue.d.ts +35 -0
- package/dist/stories/Elements/DuiSkeleton.stories.d.ts +54 -0
- package/dist/stories/Elements/DuiSkeleton.vue.d.ts +13 -0
- package/dist/stories/Elements/DuiTabs.stories.d.ts +95 -0
- package/dist/stories/Elements/DuiTabs.vue.d.ts +43 -0
- package/dist/stories/Elements/DuiToast.stories.d.ts +44 -0
- package/dist/stories/Elements/DuiToast.vue.d.ts +12 -0
- package/dist/stories/Elements/useToast.d.ts +41 -0
- package/dist/stories/Forms/DuiRadio.stories.d.ts +70 -0
- package/dist/stories/Forms/DuiRadio.vue.d.ts +34 -0
- package/dist/stories/Forms/DuiSwitch.stories.d.ts +252 -0
- package/dist/stories/Forms/DuiSwitch.vue.d.ts +108 -0
- package/package.json +1 -1
package/dist/droni-kit.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
function
|
|
1
|
+
import { getCurrentInstance as Le, defineComponent as L, computed as o, openBlock as r, createBlock as F, resolveDynamicComponent as Q, mergeProps as W, withCtx as E, renderSlot as _, createElementBlock as a, toDisplayString as j, createCommentVNode as S, Fragment as I, renderList as N, ref as U, normalizeClass as s, createElementVNode as b, createTextVNode as A, withDirectives as be, vShow as pe, useSlots as we, unref as R, createVNode as de, watch as le, onMounted as ge, onBeforeUnmount as me, Teleport as fe, Transition as he, normalizeStyle as ie, withModifiers as te, nextTick as se, withKeys as ve, reactive as ze, readonly as Ae, TransitionGroup as Ie } from "vue";
|
|
2
|
+
function We() {
|
|
3
3
|
try {
|
|
4
|
-
const
|
|
5
|
-
return
|
|
4
|
+
const d = Le(), t = d == null ? void 0 : d.appContext.app;
|
|
5
|
+
return t ? !!(t.config.globalProperties.$router || t.config.globalProperties.$route || t.component("RouterLink")) : typeof window < "u" ? !!window.VueRouter : !1;
|
|
6
6
|
} catch {
|
|
7
7
|
return !1;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return
|
|
10
|
+
function ae(d, t = !1) {
|
|
11
|
+
return d ? t ? "NuxtLink" : We() ? "RouterLink" : "a" : "button";
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function ce(d, t, e = {}) {
|
|
14
14
|
const i = { ...e };
|
|
15
|
-
return
|
|
15
|
+
return t === "a" ? (i.href = typeof d == "string" ? d : "#", i.role = "button") : t !== "button" && t !== "span" && (i.to = d), i;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const Ee = { key: 1 }, Oe = `
|
|
18
18
|
dk:transition
|
|
19
19
|
dk:text-center
|
|
20
20
|
dk:disabled:opacity-50
|
|
@@ -25,7 +25,7 @@ const Ve = { key: 1 }, Pe = `
|
|
|
25
25
|
dk:text-ellipsis
|
|
26
26
|
dk:whitespace-nowrap
|
|
27
27
|
dk:active:scale-95
|
|
28
|
-
dk:max-w-full`,
|
|
28
|
+
dk:max-w-full`, ye = /* @__PURE__ */ L({
|
|
29
29
|
__name: "DuiButton",
|
|
30
30
|
props: {
|
|
31
31
|
variant: { default: "solid" },
|
|
@@ -40,22 +40,22 @@ const Ve = { key: 1 }, Pe = `
|
|
|
40
40
|
to: { default: void 0 },
|
|
41
41
|
nuxt: { type: Boolean, default: !1 }
|
|
42
42
|
},
|
|
43
|
-
setup(
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
return e.value === "button" && (
|
|
47
|
-
}),
|
|
43
|
+
setup(d) {
|
|
44
|
+
const t = d, e = o(() => ae(t.to, t.nuxt)), i = o(() => {
|
|
45
|
+
const n = {};
|
|
46
|
+
return e.value === "button" && (n.type = t.type), ce(t.to, e.value, n);
|
|
47
|
+
}), g = {
|
|
48
48
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
49
49
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
50
50
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
51
|
-
},
|
|
51
|
+
}, u = {
|
|
52
52
|
all: "dk:rounded",
|
|
53
53
|
top: "dk:rounded-t",
|
|
54
54
|
bottom: "dk:rounded-b",
|
|
55
55
|
left: "dk:rounded-l",
|
|
56
56
|
right: "dk:rounded-r",
|
|
57
57
|
none: "dk:rounded-none"
|
|
58
|
-
},
|
|
58
|
+
}, z = {
|
|
59
59
|
solid: {
|
|
60
60
|
base: "dk:border-b",
|
|
61
61
|
neutral: `
|
|
@@ -227,23 +227,23 @@ const Ve = { key: 1 }, Pe = `
|
|
|
227
227
|
dk:dark:text-amber-100
|
|
228
228
|
dk:dark:hover:bg-amber-800`
|
|
229
229
|
}
|
|
230
|
-
},
|
|
230
|
+
}, y = o(() => {
|
|
231
231
|
var C;
|
|
232
|
-
const
|
|
233
|
-
return [
|
|
232
|
+
const n = (((C = z[t.variant]) == null ? void 0 : C[t.color]) || "") + " " + z[t.variant].base, c = g[t.size] || "", m = t.block ? "dk:w-full" : "", h = u[t.rounded] || "";
|
|
233
|
+
return [Oe, n, c, m, h].join(" ");
|
|
234
234
|
});
|
|
235
|
-
return (
|
|
236
|
-
class:
|
|
237
|
-
title:
|
|
238
|
-
disabled:
|
|
235
|
+
return (n, c) => (r(), F(Q(e.value), W(i.value, {
|
|
236
|
+
class: y.value,
|
|
237
|
+
title: t.title,
|
|
238
|
+
disabled: t.disabled || t.loading
|
|
239
239
|
}), {
|
|
240
240
|
default: E(() => [
|
|
241
|
-
|
|
241
|
+
t.loading ? (r(), a("span", Ee, "Cargando...")) : _(n.$slots, "default", { key: 0 })
|
|
242
242
|
]),
|
|
243
243
|
_: 3
|
|
244
244
|
}, 16, ["class", "title", "disabled"]));
|
|
245
245
|
}
|
|
246
|
-
}),
|
|
246
|
+
}), Ne = ["value"], Fe = `
|
|
247
247
|
dk:border-b
|
|
248
248
|
dk:border-zinc-300
|
|
249
249
|
dk:bg-zinc-50
|
|
@@ -255,7 +255,7 @@ const Ve = { key: 1 }, Pe = `
|
|
|
255
255
|
dk:dark:bg-zinc-800
|
|
256
256
|
dk:dark:text-zinc-100
|
|
257
257
|
dk:dark:focus:bg-zinc-700
|
|
258
|
-
dk:dark:[color-scheme:dark]`,
|
|
258
|
+
dk:dark:[color-scheme:dark]`, yt = /* @__PURE__ */ L({
|
|
259
259
|
inheritAttrs: !1,
|
|
260
260
|
__name: "DuiInput",
|
|
261
261
|
props: {
|
|
@@ -277,33 +277,33 @@ const Ve = { key: 1 }, Pe = `
|
|
|
277
277
|
}
|
|
278
278
|
},
|
|
279
279
|
emits: ["update:modelValue"],
|
|
280
|
-
setup(
|
|
281
|
-
const e =
|
|
282
|
-
function
|
|
283
|
-
const
|
|
284
|
-
i("update:modelValue",
|
|
280
|
+
setup(d, { emit: t }) {
|
|
281
|
+
const e = d, i = t;
|
|
282
|
+
function g(n) {
|
|
283
|
+
const c = n.target;
|
|
284
|
+
i("update:modelValue", c.value);
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const u = {
|
|
287
287
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
288
288
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
289
289
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
290
|
-
},
|
|
290
|
+
}, z = {
|
|
291
291
|
all: "dk:rounded",
|
|
292
292
|
top: "dk:rounded-t",
|
|
293
293
|
bottom: "dk:rounded-b",
|
|
294
294
|
left: "dk:rounded-l",
|
|
295
295
|
right: "dk:rounded-r",
|
|
296
296
|
none: "dk:rounded-none"
|
|
297
|
-
},
|
|
298
|
-
const
|
|
299
|
-
return [
|
|
297
|
+
}, y = o(() => {
|
|
298
|
+
const n = u[e.size] || "", c = e.block ? "dk:w-full" : "", m = z[e.rounded] || "";
|
|
299
|
+
return [Fe, n, c, m].join(" ");
|
|
300
300
|
});
|
|
301
|
-
return (
|
|
302
|
-
class:
|
|
303
|
-
value:
|
|
304
|
-
},
|
|
301
|
+
return (n, c) => (r(), a("input", W({
|
|
302
|
+
class: y.value,
|
|
303
|
+
value: d.modelValue
|
|
304
|
+
}, n.$attrs, { onInput: g }), null, 16, Ne));
|
|
305
305
|
}
|
|
306
|
-
}),
|
|
306
|
+
}), Ke = ["value"], qe = `
|
|
307
307
|
dk:border-b
|
|
308
308
|
dk:border-zinc-300
|
|
309
309
|
dk:bg-zinc-50
|
|
@@ -315,7 +315,7 @@ const Ve = { key: 1 }, Pe = `
|
|
|
315
315
|
dk:dark:bg-zinc-800
|
|
316
316
|
dk:dark:text-zinc-100
|
|
317
317
|
dk:dark:focus:bg-zinc-700
|
|
318
|
-
dk:dark:[color-scheme:dark]`,
|
|
318
|
+
dk:dark:[color-scheme:dark]`, wt = /* @__PURE__ */ L({
|
|
319
319
|
inheritAttrs: !1,
|
|
320
320
|
__name: "DuiTextarea",
|
|
321
321
|
props: {
|
|
@@ -345,46 +345,46 @@ const Ve = { key: 1 }, Pe = `
|
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
347
|
emits: ["update:modelValue"],
|
|
348
|
-
setup(
|
|
349
|
-
const e =
|
|
350
|
-
function
|
|
351
|
-
const
|
|
352
|
-
e.autoheight &&
|
|
348
|
+
setup(d, { emit: t }) {
|
|
349
|
+
const e = d, i = t;
|
|
350
|
+
function g(m) {
|
|
351
|
+
const h = m.target;
|
|
352
|
+
e.autoheight && c(h), i("update:modelValue", h.value);
|
|
353
353
|
}
|
|
354
|
-
const
|
|
354
|
+
const u = {
|
|
355
355
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
356
356
|
md: "dk:text-base dk:px-3 dk:py-2",
|
|
357
357
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
358
|
-
},
|
|
358
|
+
}, z = {
|
|
359
359
|
all: "dk:rounded",
|
|
360
360
|
top: "dk:rounded-t",
|
|
361
361
|
bottom: "dk:rounded-b",
|
|
362
362
|
left: "dk:rounded-l",
|
|
363
363
|
right: "dk:rounded-r",
|
|
364
364
|
none: "dk:rounded-none"
|
|
365
|
-
},
|
|
365
|
+
}, y = {
|
|
366
366
|
none: "dk:resize-none",
|
|
367
367
|
both: "dk:resize",
|
|
368
368
|
horizontal: "dk:resize-x",
|
|
369
369
|
vertical: "dk:resize-y"
|
|
370
|
-
},
|
|
371
|
-
const
|
|
372
|
-
return [
|
|
373
|
-
}),
|
|
374
|
-
|
|
370
|
+
}, n = o(() => {
|
|
371
|
+
const m = u[e.size] || "", h = e.block ? "dk:w-full" : "", C = z[e.rounded] || "", D = y[e.resize] || "";
|
|
372
|
+
return [qe, m, h, C, D].join(" ");
|
|
373
|
+
}), c = (m) => {
|
|
374
|
+
m.style.height = "auto", m.style.height = `${m.scrollHeight + 5}px`;
|
|
375
375
|
};
|
|
376
|
-
return (
|
|
377
|
-
class:
|
|
378
|
-
value:
|
|
379
|
-
onInput:
|
|
380
|
-
}), null, 16,
|
|
376
|
+
return (m, h) => (r(), a("textarea", W(m.$attrs, {
|
|
377
|
+
class: n.value,
|
|
378
|
+
value: d.modelValue,
|
|
379
|
+
onInput: g
|
|
380
|
+
}), null, 16, Ke));
|
|
381
381
|
}
|
|
382
|
-
}),
|
|
382
|
+
}), He = {
|
|
383
383
|
key: 0,
|
|
384
384
|
disabled: "",
|
|
385
385
|
selected: "",
|
|
386
386
|
hidden: ""
|
|
387
|
-
},
|
|
387
|
+
}, Ue = ["value", "selected"], Qe = `
|
|
388
388
|
dk:border-b
|
|
389
389
|
dk:border-zinc-300
|
|
390
390
|
dk:bg-zinc-50
|
|
@@ -397,7 +397,7 @@ const Ve = { key: 1 }, Pe = `
|
|
|
397
397
|
dk:dark:text-zinc-100
|
|
398
398
|
dk:dark:focus:bg-zinc-700
|
|
399
399
|
dk:dark:[color-scheme:dark]
|
|
400
|
-
`,
|
|
400
|
+
`, zt = /* @__PURE__ */ L({
|
|
401
401
|
inheritAttrs: !1,
|
|
402
402
|
__name: "DuiSelect",
|
|
403
403
|
props: {
|
|
@@ -435,43 +435,43 @@ const Ve = { key: 1 }, Pe = `
|
|
|
435
435
|
}
|
|
436
436
|
},
|
|
437
437
|
emits: ["update:modelValue"],
|
|
438
|
-
setup(
|
|
439
|
-
const e =
|
|
440
|
-
function
|
|
441
|
-
const
|
|
442
|
-
!isNaN(
|
|
438
|
+
setup(d, { emit: t }) {
|
|
439
|
+
const e = d, i = t;
|
|
440
|
+
function g(n) {
|
|
441
|
+
const m = n.target.value, h = Number(m);
|
|
442
|
+
!isNaN(h) && m !== "" ? i("update:modelValue", h) : i("update:modelValue", m);
|
|
443
443
|
}
|
|
444
|
-
const
|
|
444
|
+
const u = {
|
|
445
445
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
446
446
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
447
447
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
448
|
-
},
|
|
448
|
+
}, z = {
|
|
449
449
|
all: "dk:rounded",
|
|
450
450
|
top: "dk:rounded-t",
|
|
451
451
|
bottom: "dk:rounded-b",
|
|
452
452
|
left: "dk:rounded-l",
|
|
453
453
|
right: "dk:rounded-r",
|
|
454
454
|
none: "dk:rounded-none"
|
|
455
|
-
},
|
|
456
|
-
const
|
|
457
|
-
return [
|
|
455
|
+
}, y = o(() => {
|
|
456
|
+
const n = u[e.size] || "", c = e.block ? "dk:w-full" : "", m = z[e.rounded] || "";
|
|
457
|
+
return [Qe, n, c, m].join(" ");
|
|
458
458
|
});
|
|
459
|
-
return (
|
|
460
|
-
class:
|
|
461
|
-
onChange:
|
|
459
|
+
return (n, c) => (r(), a("select", W(n.$attrs, {
|
|
460
|
+
class: y.value,
|
|
461
|
+
onChange: g
|
|
462
462
|
}), [
|
|
463
|
-
|
|
464
|
-
(r(!0),
|
|
465
|
-
key:
|
|
466
|
-
value:
|
|
467
|
-
selected:
|
|
468
|
-
},
|
|
463
|
+
d.placeholder ? (r(), a("option", He, j(d.placeholder), 1)) : S("", !0),
|
|
464
|
+
(r(!0), a(I, null, N(d.options, (m, h) => (r(), a("option", {
|
|
465
|
+
key: h,
|
|
466
|
+
value: m[d.itemValue] ?? "",
|
|
467
|
+
selected: m[d.itemValue] == d.modelValue
|
|
468
|
+
}, j(m[d.itemLabel] ?? ""), 9, Ue))), 128))
|
|
469
469
|
], 16));
|
|
470
470
|
}
|
|
471
|
-
}),
|
|
471
|
+
}), Ge = {
|
|
472
472
|
key: 1,
|
|
473
473
|
class: "dk:text-rose-500 dk:ml-1"
|
|
474
|
-
},
|
|
474
|
+
}, Je = { 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" }, Xe = "dk:space-y-1", Ye = /* @__PURE__ */ L({
|
|
475
475
|
__name: "DuiLabel",
|
|
476
476
|
props: {
|
|
477
477
|
title: {
|
|
@@ -499,69 +499,69 @@ const Ve = { key: 1 }, Pe = `
|
|
|
499
499
|
default: !1
|
|
500
500
|
}
|
|
501
501
|
},
|
|
502
|
-
setup(
|
|
503
|
-
const
|
|
502
|
+
setup(d) {
|
|
503
|
+
const t = U(!1), e = d, i = {
|
|
504
504
|
s: "dk:text-sm",
|
|
505
505
|
m: "dk:text-base",
|
|
506
506
|
l: "dk:text-lg"
|
|
507
|
-
},
|
|
507
|
+
}, g = {
|
|
508
508
|
s: "dk:mt-1",
|
|
509
509
|
m: "dk:mt-1.5",
|
|
510
510
|
l: "dk:mt-2"
|
|
511
|
-
},
|
|
511
|
+
}, u = {
|
|
512
512
|
s: "dk:text-xs",
|
|
513
513
|
m: "dk:text-sm",
|
|
514
514
|
l: "dk:text-base"
|
|
515
|
-
},
|
|
516
|
-
const
|
|
517
|
-
return [
|
|
518
|
-
}),
|
|
519
|
-
return (
|
|
520
|
-
class:
|
|
515
|
+
}, z = o(() => [Xe].join(" ")), y = o(() => {
|
|
516
|
+
const m = i[e.size] || i.m, h = "dk:block dk:font-medium dk:text-zinc-700 dk:dark:text-zinc-200 dk:flex dk:items-center", C = e.helpText ? "dk:cursor-help" : "";
|
|
517
|
+
return [h, m, C].join(" ");
|
|
518
|
+
}), n = o(() => [g[e.size] || g.m].join(" ")), c = o(() => ["dk:text-rose-600 dk:dark:text-rose-400 dk:flex dk:items-center dk:mt-1", u[e.size] || u.m].join(" "));
|
|
519
|
+
return (m, h) => (r(), a("label", {
|
|
520
|
+
class: s(z.value)
|
|
521
521
|
}, [
|
|
522
|
-
|
|
522
|
+
d.title ? (r(), a("div", {
|
|
523
523
|
key: 0,
|
|
524
524
|
class: "dk:relative",
|
|
525
|
-
onMouseenter:
|
|
526
|
-
onMouseleave:
|
|
525
|
+
onMouseenter: h[0] || (h[0] = (C) => t.value = !!d.helpText),
|
|
526
|
+
onMouseleave: h[1] || (h[1] = (C) => t.value = !1)
|
|
527
527
|
}, [
|
|
528
|
-
|
|
529
|
-
class:
|
|
528
|
+
b("div", {
|
|
529
|
+
class: s(y.value)
|
|
530
530
|
}, [
|
|
531
|
-
|
|
531
|
+
d.icon ? (r(), a("i", {
|
|
532
532
|
key: 0,
|
|
533
|
-
class:
|
|
534
|
-
}, null, 2)) :
|
|
535
|
-
|
|
536
|
-
|
|
533
|
+
class: s([d.icon, "dk:mr-2"])
|
|
534
|
+
}, null, 2)) : S("", !0),
|
|
535
|
+
A(" " + j(d.title) + " ", 1),
|
|
536
|
+
d.required ? (r(), a("span", Ge, "*")) : S("", !0)
|
|
537
537
|
], 2),
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
538
|
+
be(b("div", Je, [
|
|
539
|
+
A(j(d.helpText) + " ", 1),
|
|
540
|
+
h[2] || (h[2] = b("div", { class: "tooltip-arrow tooltip-arrow-down" }, null, -1))
|
|
541
541
|
], 512), [
|
|
542
|
-
[
|
|
542
|
+
[pe, t.value && d.helpText]
|
|
543
543
|
])
|
|
544
|
-
], 32)) :
|
|
545
|
-
|
|
546
|
-
class:
|
|
544
|
+
], 32)) : S("", !0),
|
|
545
|
+
b("div", {
|
|
546
|
+
class: s(n.value)
|
|
547
547
|
}, [
|
|
548
|
-
|
|
548
|
+
_(m.$slots, "default", {}, void 0, !0)
|
|
549
549
|
], 2),
|
|
550
|
-
|
|
550
|
+
d.error ? (r(), a("div", {
|
|
551
551
|
key: 1,
|
|
552
|
-
class:
|
|
552
|
+
class: s(c.value)
|
|
553
553
|
}, [
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
], 2)) :
|
|
554
|
+
h[3] || (h[3] = b("span", { class: "dk:inline-flex dk:items-center dk:justify-center dk:w-4 dk:h-4 dk:text-xs dk:bg-rose-500 dk:text-white dk:rounded-full dk:mr-2 dk:flex-shrink-0" }, " ! ", -1)),
|
|
555
|
+
A(" " + j(d.error), 1)
|
|
556
|
+
], 2)) : S("", !0)
|
|
557
557
|
], 2));
|
|
558
558
|
}
|
|
559
|
-
}),
|
|
560
|
-
const e =
|
|
561
|
-
for (const [i,
|
|
562
|
-
e[i] =
|
|
559
|
+
}), ke = (d, t) => {
|
|
560
|
+
const e = d.__vccOpts || d;
|
|
561
|
+
for (const [i, g] of t)
|
|
562
|
+
e[i] = g;
|
|
563
563
|
return e;
|
|
564
|
-
},
|
|
564
|
+
}, Ct = /* @__PURE__ */ ke(Ye, [["__scopeId", "data-v-aa6b6cdc"]]), Ze = { class: "dk:relative dk:inline-flex dk:items-center dk:flex-shrink-0" }, Re = ["checked", "disabled"], $t = /* @__PURE__ */ L({
|
|
565
565
|
inheritAttrs: !1,
|
|
566
566
|
__name: "DuiCheckbox",
|
|
567
567
|
props: {
|
|
@@ -599,8 +599,8 @@ const Ve = { key: 1 }, Pe = `
|
|
|
599
599
|
}
|
|
600
600
|
},
|
|
601
601
|
emits: ["update:modelValue"],
|
|
602
|
-
setup(
|
|
603
|
-
const e =
|
|
602
|
+
setup(d, { emit: t }) {
|
|
603
|
+
const e = d, i = t, g = we(), u = {
|
|
604
604
|
sm: {
|
|
605
605
|
track: "dk:w-9 dk:h-5",
|
|
606
606
|
thumb: "dk:w-3.5 dk:h-3.5",
|
|
@@ -616,94 +616,410 @@ const Ve = { key: 1 }, Pe = `
|
|
|
616
616
|
thumb: "dk:w-5 dk:h-5",
|
|
617
617
|
translate: "dk:peer-checked:translate-x-7"
|
|
618
618
|
}
|
|
619
|
-
},
|
|
619
|
+
}, z = {
|
|
620
620
|
all: "dk:rounded-full",
|
|
621
621
|
top: "dk:rounded-t-full",
|
|
622
622
|
bottom: "dk:rounded-b-full",
|
|
623
623
|
left: "dk:rounded-l-full",
|
|
624
624
|
right: "dk:rounded-r-full",
|
|
625
625
|
none: "dk:rounded-none"
|
|
626
|
-
},
|
|
626
|
+
}, y = {
|
|
627
627
|
neutral: "dk:peer-checked:bg-zinc-500 dk:peer-checked:dark:bg-zinc-500",
|
|
628
628
|
primary: "dk:peer-checked:bg-slate-600 dk:peer-checked:dark:bg-slate-500",
|
|
629
629
|
secondary: "dk:peer-checked:bg-pink-600 dk:peer-checked:dark:bg-pink-500",
|
|
630
630
|
success: "dk:peer-checked:bg-emerald-600 dk:peer-checked:dark:bg-emerald-500",
|
|
631
631
|
warning: "dk:peer-checked:bg-amber-500 dk:peer-checked:dark:bg-amber-400",
|
|
632
632
|
danger: "dk:peer-checked:bg-rose-600 dk:peer-checked:dark:bg-rose-500"
|
|
633
|
-
},
|
|
634
|
-
const
|
|
635
|
-
return ["dk:inline-flex dk:items-center dk:gap-3 dk:select-none",
|
|
636
|
-
}),
|
|
633
|
+
}, n = o(() => !!(e.label || g.default)), c = o(() => {
|
|
634
|
+
const x = e.block ? "dk:w-full dk:justify-between" : "", l = e.disabled ? "dk:opacity-60 dk:cursor-not-allowed" : "dk:cursor-pointer";
|
|
635
|
+
return ["dk:inline-flex dk:items-center dk:gap-3 dk:select-none", x, l].join(" ");
|
|
636
|
+
}), m = o(() => [
|
|
637
637
|
"dk:text-sm dk:leading-none dk:text-zinc-700 dk:dark:text-zinc-200",
|
|
638
638
|
e.disabled ? "dk:cursor-not-allowed" : "dk:cursor-pointer"
|
|
639
|
-
].join(" ")),
|
|
640
|
-
const
|
|
639
|
+
].join(" ")), h = o(() => {
|
|
640
|
+
const x = u[e.size] || u.md, l = z[e.rounded] || z.all, k = y[e.color] || y.primary;
|
|
641
641
|
return [
|
|
642
642
|
"dk:inline-flex dk:items-center dk:transition-colors dk:duration-200",
|
|
643
643
|
"dk:bg-zinc-300 dk:dark:bg-zinc-700",
|
|
644
644
|
"dk:peer-focus-visible:outline-none dk:peer-focus-visible:ring-2 dk:peer-focus-visible:ring-offset-2 dk:peer-focus-visible:ring-slate-400 dk:dark:peer-focus-visible:ring-slate-500",
|
|
645
645
|
"dk:peer-disabled:opacity-70",
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
646
|
+
x.track,
|
|
647
|
+
l,
|
|
648
|
+
k
|
|
649
649
|
].join(" ");
|
|
650
|
-
}), C =
|
|
651
|
-
const
|
|
650
|
+
}), C = o(() => {
|
|
651
|
+
const x = u[e.size] || u.md;
|
|
652
652
|
return [
|
|
653
653
|
"dk:absolute dk:left-1 dk:top-1/2 dk:-translate-y-1/2",
|
|
654
654
|
"dk:bg-white dk:dark:bg-zinc-100",
|
|
655
655
|
"dk:rounded-full dk:shadow-sm dk:transition-transform dk:duration-200",
|
|
656
656
|
"dk:pointer-events-none",
|
|
657
|
-
|
|
658
|
-
|
|
657
|
+
x.thumb,
|
|
658
|
+
x.translate
|
|
659
659
|
].join(" ");
|
|
660
660
|
});
|
|
661
|
-
function
|
|
662
|
-
const
|
|
663
|
-
i("update:modelValue",
|
|
661
|
+
function D(x) {
|
|
662
|
+
const l = x.target;
|
|
663
|
+
i("update:modelValue", l.checked);
|
|
664
664
|
}
|
|
665
|
-
return (
|
|
666
|
-
class:
|
|
665
|
+
return (x, l) => (r(), a("label", {
|
|
666
|
+
class: s(c.value)
|
|
667
667
|
}, [
|
|
668
|
-
|
|
668
|
+
n.value && d.labelPosition === "left" ? (r(), a("span", {
|
|
669
669
|
key: 0,
|
|
670
|
-
class: m
|
|
670
|
+
class: s(m.value)
|
|
671
671
|
}, [
|
|
672
|
-
|
|
673
|
-
|
|
672
|
+
_(x.$slots, "default", {}, () => [
|
|
673
|
+
A(j(d.label), 1)
|
|
674
674
|
])
|
|
675
|
-
], 2)) :
|
|
676
|
-
|
|
677
|
-
|
|
675
|
+
], 2)) : S("", !0),
|
|
676
|
+
b("span", Ze, [
|
|
677
|
+
b("input", W({
|
|
678
678
|
type: "checkbox",
|
|
679
679
|
class: "dk:sr-only dk:peer",
|
|
680
|
-
checked:
|
|
681
|
-
disabled:
|
|
682
|
-
},
|
|
683
|
-
|
|
684
|
-
class:
|
|
680
|
+
checked: d.modelValue,
|
|
681
|
+
disabled: d.disabled
|
|
682
|
+
}, x.$attrs, { onChange: D }), null, 16, Re),
|
|
683
|
+
b("span", {
|
|
684
|
+
class: s(h.value)
|
|
685
685
|
}, null, 2),
|
|
686
|
-
|
|
687
|
-
class:
|
|
686
|
+
b("span", {
|
|
687
|
+
class: s(C.value)
|
|
688
688
|
}, null, 2)
|
|
689
689
|
]),
|
|
690
|
-
|
|
690
|
+
n.value && d.labelPosition === "right" ? (r(), a("span", {
|
|
691
691
|
key: 1,
|
|
692
|
-
class: m
|
|
692
|
+
class: s(m.value)
|
|
693
693
|
}, [
|
|
694
|
-
|
|
695
|
-
|
|
694
|
+
_(x.$slots, "default", {}, () => [
|
|
695
|
+
A(j(d.label), 1)
|
|
696
696
|
])
|
|
697
|
-
], 2)) :
|
|
697
|
+
], 2)) : S("", !0)
|
|
698
|
+
], 2));
|
|
699
|
+
}
|
|
700
|
+
}), ed = ["aria-labelledby"], dd = ["id"], td = { class: "dk:relative dk:inline-flex dk:flex-shrink-0" }, rd = ["name", "value", "checked", "disabled", "onChange"], St = /* @__PURE__ */ L({
|
|
701
|
+
inheritAttrs: !1,
|
|
702
|
+
__name: "DuiRadio",
|
|
703
|
+
props: {
|
|
704
|
+
modelValue: { default: void 0 },
|
|
705
|
+
options: {},
|
|
706
|
+
name: { default: () => `radio-${Math.random().toString(36).slice(2, 8)}` },
|
|
707
|
+
groupLabel: { default: void 0 },
|
|
708
|
+
color: { default: "primary" },
|
|
709
|
+
size: { default: "md" },
|
|
710
|
+
orientation: { default: "vertical" },
|
|
711
|
+
block: { type: Boolean, default: !1 },
|
|
712
|
+
disabled: { type: Boolean, default: !1 }
|
|
713
|
+
},
|
|
714
|
+
emits: ["update:modelValue", "change"],
|
|
715
|
+
setup(d, { emit: t }) {
|
|
716
|
+
const e = d, i = t, g = Math.random().toString(36).slice(2, 8);
|
|
717
|
+
function u(w) {
|
|
718
|
+
i("update:modelValue", w), i("change", w);
|
|
719
|
+
}
|
|
720
|
+
const z = {
|
|
721
|
+
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" },
|
|
722
|
+
md: { radio: "dk:w-4 dk:h-4", dot: "dk:w-2 dk:h-2", label: "dk:text-sm", description: "dk:text-xs" },
|
|
723
|
+
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" }
|
|
724
|
+
}, y = {
|
|
725
|
+
neutral: "dk:peer-checked:border-zinc-600 dk:dark:peer-checked:border-zinc-400",
|
|
726
|
+
primary: "dk:peer-checked:border-slate-600 dk:dark:peer-checked:border-slate-400",
|
|
727
|
+
secondary: "dk:peer-checked:border-pink-600 dk:dark:peer-checked:border-pink-400",
|
|
728
|
+
success: "dk:peer-checked:border-emerald-600 dk:dark:peer-checked:border-emerald-400",
|
|
729
|
+
warning: "dk:peer-checked:border-amber-500 dk:dark:peer-checked:border-amber-400",
|
|
730
|
+
danger: "dk:peer-checked:border-rose-600 dk:dark:peer-checked:border-rose-400"
|
|
731
|
+
}, n = {
|
|
732
|
+
neutral: "dk:peer-checked:bg-zinc-600 dk:dark:peer-checked:bg-zinc-400",
|
|
733
|
+
primary: "dk:peer-checked:bg-slate-600 dk:dark:peer-checked:bg-slate-400",
|
|
734
|
+
secondary: "dk:peer-checked:bg-pink-600 dk:dark:peer-checked:bg-pink-400",
|
|
735
|
+
success: "dk:peer-checked:bg-emerald-600 dk:dark:peer-checked:bg-emerald-400",
|
|
736
|
+
warning: "dk:peer-checked:bg-amber-500 dk:dark:peer-checked:bg-amber-400",
|
|
737
|
+
danger: "dk:peer-checked:bg-rose-600 dk:dark:peer-checked:bg-rose-400"
|
|
738
|
+
}, c = {
|
|
739
|
+
neutral: "dk:peer-focus-visible:ring-zinc-400",
|
|
740
|
+
primary: "dk:peer-focus-visible:ring-slate-400",
|
|
741
|
+
secondary: "dk:peer-focus-visible:ring-pink-400",
|
|
742
|
+
success: "dk:peer-focus-visible:ring-emerald-400",
|
|
743
|
+
warning: "dk:peer-focus-visible:ring-amber-400",
|
|
744
|
+
danger: "dk:peer-focus-visible:ring-rose-400"
|
|
745
|
+
}, m = 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(" ")), h = 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");
|
|
746
|
+
function C(w, f) {
|
|
747
|
+
const $ = f || e.disabled ? "dk:opacity-50 dk:cursor-not-allowed" : "dk:cursor-pointer", M = e.block ? "dk:w-full dk:justify-between" : "";
|
|
748
|
+
return ["dk:inline-flex dk:items-start dk:gap-3 dk:select-none", $, M].join(" ");
|
|
749
|
+
}
|
|
750
|
+
function D(w) {
|
|
751
|
+
const f = z[e.size], v = y[e.color], $ = c[e.color];
|
|
752
|
+
return [
|
|
753
|
+
"dk:rounded-full dk:border-2 dk:transition-colors dk:duration-150",
|
|
754
|
+
"dk:border-zinc-300 dk:dark:border-zinc-600",
|
|
755
|
+
"dk:peer-focus-visible:outline-none dk:peer-focus-visible:ring-2 dk:peer-focus-visible:ring-offset-2",
|
|
756
|
+
"dk:bg-white dk:dark:bg-zinc-900",
|
|
757
|
+
f.radio,
|
|
758
|
+
v,
|
|
759
|
+
$
|
|
760
|
+
].join(" ");
|
|
761
|
+
}
|
|
762
|
+
const x = o(() => {
|
|
763
|
+
const w = z[e.size], f = n[e.color];
|
|
764
|
+
return [
|
|
765
|
+
"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",
|
|
766
|
+
w.dot,
|
|
767
|
+
f
|
|
768
|
+
].join(" ");
|
|
769
|
+
}), l = o(() => "dk:flex dk:flex-col"), k = o(() => [z[e.size].label, "dk:leading-snug dk:text-zinc-800 dk:dark:text-zinc-200"].join(" ")), p = o(() => [z[e.size].description, "dk:leading-snug dk:text-zinc-500 dk:dark:text-zinc-400 dk:mt-0.5"].join(" "));
|
|
770
|
+
return (w, f) => (r(), a("div", {
|
|
771
|
+
class: s(m.value),
|
|
772
|
+
role: "radiogroup",
|
|
773
|
+
"aria-labelledby": d.groupLabel ? `rg-label-${R(g)}` : void 0
|
|
774
|
+
}, [
|
|
775
|
+
d.groupLabel ? (r(), a("span", {
|
|
776
|
+
key: 0,
|
|
777
|
+
id: `rg-label-${R(g)}`,
|
|
778
|
+
class: s(h.value)
|
|
779
|
+
}, j(d.groupLabel), 11, dd)) : S("", !0),
|
|
780
|
+
(r(!0), a(I, null, N(d.options, (v) => (r(), a("label", {
|
|
781
|
+
key: v.value,
|
|
782
|
+
class: s(C(v.value, v.disabled))
|
|
783
|
+
}, [
|
|
784
|
+
b("span", td, [
|
|
785
|
+
b("input", W({
|
|
786
|
+
type: "radio",
|
|
787
|
+
class: "dk:sr-only dk:peer",
|
|
788
|
+
name: d.name,
|
|
789
|
+
value: v.value,
|
|
790
|
+
checked: d.modelValue === v.value,
|
|
791
|
+
disabled: v.disabled || d.disabled
|
|
792
|
+
}, { ref_for: !0 }, w.$attrs, {
|
|
793
|
+
onChange: ($) => u(v.value)
|
|
794
|
+
}), null, 16, rd),
|
|
795
|
+
b("span", {
|
|
796
|
+
class: s(D(v.value))
|
|
797
|
+
}, null, 2),
|
|
798
|
+
b("span", {
|
|
799
|
+
class: s(x.value)
|
|
800
|
+
}, null, 2)
|
|
801
|
+
]),
|
|
802
|
+
b("span", {
|
|
803
|
+
class: s(l.value)
|
|
804
|
+
}, [
|
|
805
|
+
b("span", {
|
|
806
|
+
class: s(k.value)
|
|
807
|
+
}, j(v.label), 3),
|
|
808
|
+
v.description ? (r(), a("span", {
|
|
809
|
+
key: 0,
|
|
810
|
+
class: s(p.value)
|
|
811
|
+
}, j(v.description), 3)) : S("", !0)
|
|
812
|
+
], 2)
|
|
813
|
+
], 2))), 128))
|
|
814
|
+
], 10, ed));
|
|
815
|
+
}
|
|
816
|
+
}), ad = { class: "dk:relative dk:inline-flex dk:items-center dk:flex-shrink-0" }, od = ["aria-checked", "checked", "disabled"], kd = {
|
|
817
|
+
key: 0,
|
|
818
|
+
viewBox: "0 0 12 12",
|
|
819
|
+
fill: "currentColor",
|
|
820
|
+
class: "dk:w-2.5 dk:h-2.5"
|
|
821
|
+
}, nd = {
|
|
822
|
+
key: 1,
|
|
823
|
+
viewBox: "0 0 12 12",
|
|
824
|
+
fill: "none",
|
|
825
|
+
class: "dk:w-2.5 dk:h-2.5"
|
|
826
|
+
}, jt = /* @__PURE__ */ L({
|
|
827
|
+
inheritAttrs: !1,
|
|
828
|
+
__name: "DuiSwitch",
|
|
829
|
+
props: {
|
|
830
|
+
modelValue: {
|
|
831
|
+
type: Boolean,
|
|
832
|
+
default: !1
|
|
833
|
+
},
|
|
834
|
+
label: {
|
|
835
|
+
type: String,
|
|
836
|
+
default: ""
|
|
837
|
+
},
|
|
838
|
+
description: {
|
|
839
|
+
type: String,
|
|
840
|
+
default: ""
|
|
841
|
+
},
|
|
842
|
+
labelPosition: {
|
|
843
|
+
type: String,
|
|
844
|
+
default: "right"
|
|
845
|
+
},
|
|
846
|
+
color: {
|
|
847
|
+
type: String,
|
|
848
|
+
default: "primary"
|
|
849
|
+
},
|
|
850
|
+
size: {
|
|
851
|
+
type: String,
|
|
852
|
+
default: "md"
|
|
853
|
+
},
|
|
854
|
+
block: {
|
|
855
|
+
type: Boolean,
|
|
856
|
+
default: !1
|
|
857
|
+
},
|
|
858
|
+
disabled: {
|
|
859
|
+
type: Boolean,
|
|
860
|
+
default: !1
|
|
861
|
+
},
|
|
862
|
+
showIcons: {
|
|
863
|
+
type: Boolean,
|
|
864
|
+
default: !1
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
emits: ["update:modelValue", "change"],
|
|
868
|
+
setup(d, { emit: t }) {
|
|
869
|
+
const e = d, i = t, g = we(), u = {
|
|
870
|
+
sm: {
|
|
871
|
+
track: "dk:w-8 dk:h-4",
|
|
872
|
+
thumb: "dk:w-3 dk:h-3",
|
|
873
|
+
translate: "dk:peer-checked:translate-x-[16px]",
|
|
874
|
+
offset: "dk:top-0.5 dk:left-0.5"
|
|
875
|
+
},
|
|
876
|
+
md: {
|
|
877
|
+
track: "dk:w-10 dk:h-5",
|
|
878
|
+
thumb: "dk:w-4 dk:h-4",
|
|
879
|
+
translate: "dk:peer-checked:translate-x-5",
|
|
880
|
+
offset: "dk:top-0.5 dk:left-0.5"
|
|
881
|
+
},
|
|
882
|
+
lg: {
|
|
883
|
+
track: "dk:w-12 dk:h-6",
|
|
884
|
+
thumb: "dk:w-5 dk:h-5",
|
|
885
|
+
translate: "dk:peer-checked:translate-x-6",
|
|
886
|
+
offset: "dk:top-0.5 dk:left-0.5"
|
|
887
|
+
}
|
|
888
|
+
}, z = {
|
|
889
|
+
neutral: "dk:peer-checked:bg-zinc-600 dk:dark:peer-checked:bg-zinc-500",
|
|
890
|
+
primary: "dk:peer-checked:bg-slate-600 dk:dark:peer-checked:bg-slate-500",
|
|
891
|
+
secondary: "dk:peer-checked:bg-pink-600 dk:dark:peer-checked:bg-pink-500",
|
|
892
|
+
success: "dk:peer-checked:bg-emerald-600 dk:dark:peer-checked:bg-emerald-500",
|
|
893
|
+
warning: "dk:peer-checked:bg-amber-500 dk:dark:peer-checked:bg-amber-400",
|
|
894
|
+
danger: "dk:peer-checked:bg-rose-600 dk:dark:peer-checked:bg-rose-500"
|
|
895
|
+
}, y = o(() => !!(e.label || g.default)), n = o(() => {
|
|
896
|
+
const k = e.block ? "dk:w-full dk:justify-between" : "", p = e.block ? "dk:flex" : "dk:inline-flex", w = e.disabled ? "dk:opacity-60 dk:cursor-not-allowed" : "dk:cursor-pointer";
|
|
897
|
+
return [p, "dk:items-center dk:gap-3 dk:select-none", k, w].join(" ");
|
|
898
|
+
}), c = o(() => [
|
|
899
|
+
"dk:flex dk:flex-col",
|
|
900
|
+
"dk:text-sm dk:leading-snug dk:text-zinc-700 dk:dark:text-zinc-200",
|
|
901
|
+
e.disabled ? "dk:cursor-not-allowed" : "dk:cursor-pointer"
|
|
902
|
+
].join(" ")), m = o(() => "dk:text-xs dk:text-zinc-500 dk:dark:text-zinc-400 dk:mt-0.5"), h = o(() => {
|
|
903
|
+
const k = u[e.size], p = z[e.color];
|
|
904
|
+
return [
|
|
905
|
+
"dk:relative dk:inline-flex dk:items-center dk:transition-colors dk:duration-200 dk:rounded-full",
|
|
906
|
+
"dk:bg-zinc-300 dk:dark:bg-zinc-600",
|
|
907
|
+
"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",
|
|
908
|
+
"dk:peer-disabled:opacity-70",
|
|
909
|
+
k.track,
|
|
910
|
+
p
|
|
911
|
+
].join(" ");
|
|
912
|
+
}), C = o(() => {
|
|
913
|
+
const k = u[e.size];
|
|
914
|
+
return [
|
|
915
|
+
"dk:absolute",
|
|
916
|
+
k.offset,
|
|
917
|
+
"dk:bg-white dk:dark:bg-zinc-100",
|
|
918
|
+
"dk:rounded-full dk:shadow-sm dk:transition-all dk:duration-200",
|
|
919
|
+
"dk:pointer-events-none dk:flex dk:items-center dk:justify-center",
|
|
920
|
+
k.thumb,
|
|
921
|
+
k.translate
|
|
922
|
+
].join(" ");
|
|
923
|
+
}), D = {
|
|
924
|
+
neutral: "dk:text-zinc-600 dk:dark:text-zinc-400",
|
|
925
|
+
primary: "dk:text-slate-600 dk:dark:text-slate-400",
|
|
926
|
+
secondary: "dk:text-pink-600 dk:dark:text-pink-400",
|
|
927
|
+
success: "dk:text-emerald-600 dk:dark:text-emerald-400",
|
|
928
|
+
warning: "dk:text-amber-600 dk:dark:text-amber-400",
|
|
929
|
+
danger: "dk:text-rose-600 dk:dark:text-rose-400"
|
|
930
|
+
}, x = o(() => e.modelValue ? D[e.color] : "dk:text-zinc-400 dk:dark:text-zinc-500");
|
|
931
|
+
function l(k) {
|
|
932
|
+
const p = k.target;
|
|
933
|
+
i("update:modelValue", p.checked), i("change", p.checked);
|
|
934
|
+
}
|
|
935
|
+
return (k, p) => (r(), a("label", {
|
|
936
|
+
class: s(n.value)
|
|
937
|
+
}, [
|
|
938
|
+
y.value && d.labelPosition === "left" ? (r(), a("span", {
|
|
939
|
+
key: 0,
|
|
940
|
+
class: s(c.value)
|
|
941
|
+
}, [
|
|
942
|
+
_(k.$slots, "default", {}, () => [
|
|
943
|
+
A(j(d.label), 1)
|
|
944
|
+
]),
|
|
945
|
+
d.description ? (r(), a("span", {
|
|
946
|
+
key: 0,
|
|
947
|
+
class: s(m.value)
|
|
948
|
+
}, j(d.description), 3)) : S("", !0)
|
|
949
|
+
], 2)) : S("", !0),
|
|
950
|
+
b("span", ad, [
|
|
951
|
+
b("input", W({
|
|
952
|
+
type: "checkbox",
|
|
953
|
+
class: "dk:sr-only dk:peer",
|
|
954
|
+
role: "switch",
|
|
955
|
+
"aria-checked": d.modelValue,
|
|
956
|
+
checked: d.modelValue,
|
|
957
|
+
disabled: d.disabled
|
|
958
|
+
}, k.$attrs, { onChange: l }), null, 16, od),
|
|
959
|
+
b("span", {
|
|
960
|
+
class: s(h.value)
|
|
961
|
+
}, null, 2),
|
|
962
|
+
b("span", {
|
|
963
|
+
class: s(C.value)
|
|
964
|
+
}, [
|
|
965
|
+
d.showIcons ? (r(), a("span", {
|
|
966
|
+
key: 0,
|
|
967
|
+
"aria-hidden": "true",
|
|
968
|
+
class: s(x.value)
|
|
969
|
+
}, [
|
|
970
|
+
d.modelValue ? (r(), a("svg", kd, [...p[0] || (p[0] = [
|
|
971
|
+
b("path", {
|
|
972
|
+
d: "M3.5 6.5l2 2 3-3",
|
|
973
|
+
stroke: "currentColor",
|
|
974
|
+
"stroke-width": "1.5",
|
|
975
|
+
"stroke-linecap": "round",
|
|
976
|
+
"stroke-linejoin": "round",
|
|
977
|
+
fill: "none"
|
|
978
|
+
}, null, -1)
|
|
979
|
+
])])) : (r(), a("svg", nd, [...p[1] || (p[1] = [
|
|
980
|
+
b("line", {
|
|
981
|
+
x1: "3",
|
|
982
|
+
y1: "3",
|
|
983
|
+
x2: "9",
|
|
984
|
+
y2: "9",
|
|
985
|
+
stroke: "currentColor",
|
|
986
|
+
"stroke-width": "1.5",
|
|
987
|
+
"stroke-linecap": "round"
|
|
988
|
+
}, null, -1),
|
|
989
|
+
b("line", {
|
|
990
|
+
x1: "9",
|
|
991
|
+
y1: "3",
|
|
992
|
+
x2: "3",
|
|
993
|
+
y2: "9",
|
|
994
|
+
stroke: "currentColor",
|
|
995
|
+
"stroke-width": "1.5",
|
|
996
|
+
"stroke-linecap": "round"
|
|
997
|
+
}, null, -1)
|
|
998
|
+
])]))
|
|
999
|
+
], 2)) : S("", !0)
|
|
1000
|
+
], 2)
|
|
1001
|
+
]),
|
|
1002
|
+
y.value && d.labelPosition === "right" ? (r(), a("span", {
|
|
1003
|
+
key: 1,
|
|
1004
|
+
class: s(c.value)
|
|
1005
|
+
}, [
|
|
1006
|
+
_(k.$slots, "default", {}, () => [
|
|
1007
|
+
A(j(d.label), 1)
|
|
1008
|
+
]),
|
|
1009
|
+
d.description ? (r(), a("span", {
|
|
1010
|
+
key: 0,
|
|
1011
|
+
class: s(m.value)
|
|
1012
|
+
}, j(d.description), 3)) : S("", !0)
|
|
1013
|
+
], 2)) : S("", !0)
|
|
698
1014
|
], 2));
|
|
699
1015
|
}
|
|
700
|
-
}),
|
|
1016
|
+
}), sd = `
|
|
701
1017
|
dk:px-4
|
|
702
1018
|
dk:py-3
|
|
703
1019
|
dk:text-sm
|
|
704
1020
|
dk:leading-relaxed
|
|
705
1021
|
dk:max-w-full
|
|
706
|
-
`,
|
|
1022
|
+
`, Vt = /* @__PURE__ */ L({
|
|
707
1023
|
__name: "DuiAlert",
|
|
708
1024
|
props: {
|
|
709
1025
|
variant: {
|
|
@@ -719,8 +1035,8 @@ const Ve = { key: 1 }, Pe = `
|
|
|
719
1035
|
default: "all"
|
|
720
1036
|
}
|
|
721
1037
|
},
|
|
722
|
-
setup(
|
|
723
|
-
const
|
|
1038
|
+
setup(d) {
|
|
1039
|
+
const t = d, e = {
|
|
724
1040
|
all: "dk:rounded",
|
|
725
1041
|
top: "dk:rounded-t",
|
|
726
1042
|
bottom: "dk:rounded-b",
|
|
@@ -755,22 +1071,22 @@ const Ve = { key: 1 }, Pe = `
|
|
|
755
1071
|
warning: "dk:text-amber-700 dk:dark:text-amber-200 dk:bg-amber-50 dk:dark:bg-amber-800",
|
|
756
1072
|
danger: "dk:text-rose-700 dk:dark:text-rose-200 dk:bg-rose-50 dk:dark:bg-rose-800"
|
|
757
1073
|
}
|
|
758
|
-
},
|
|
759
|
-
var
|
|
760
|
-
const
|
|
761
|
-
return [
|
|
1074
|
+
}, g = o(() => {
|
|
1075
|
+
var n;
|
|
1076
|
+
const u = ((n = i[t.variant]) == null ? void 0 : n[t.color]) || "", z = i[t.variant].base || "", y = e[t.rounded] || "";
|
|
1077
|
+
return [sd, z, u, y].join(" ");
|
|
762
1078
|
});
|
|
763
|
-
return (
|
|
764
|
-
class:
|
|
1079
|
+
return (u, z) => (r(), a("div", {
|
|
1080
|
+
class: s(g.value),
|
|
765
1081
|
role: "alert"
|
|
766
1082
|
}, [
|
|
767
|
-
|
|
1083
|
+
_(u.$slots, "default")
|
|
768
1084
|
], 2));
|
|
769
1085
|
}
|
|
770
|
-
}),
|
|
1086
|
+
}), ld = { class: "dk:relative dk:overflow-x-auto dk:shadow-md dk:sm:rounded-lg" }, id = { class: "dk:w-full dk:text-sm dk:text-left dk:text-gray-700 dk:dark:text-gray-300" }, cd = { class: "dk:text-xs dk:uppercase dk:bg-gray-100 dk:dark:bg-gray-700 dk:dark:text-gray-200 dk:relative" }, ud = { key: 0 }, bd = ["colspan"], pd = {
|
|
771
1087
|
key: 0,
|
|
772
1088
|
class: "dk:bg-gray-50 dk:dark:bg-gray-700 dk:border-t dk:border-gray-200 dk:dark:border-gray-600"
|
|
773
|
-
},
|
|
1089
|
+
}, gd = ["colspan"], md = { class: "pagination-container" }, fd = { class: "pagination-info" }, hd = { class: "pagination-buttons" }, xd = { class: "page-numbers" }, vd = ["onClick"], yd = /* @__PURE__ */ L({
|
|
774
1090
|
__name: "DuiTable",
|
|
775
1091
|
props: {
|
|
776
1092
|
columns: {
|
|
@@ -791,102 +1107,102 @@ const Ve = { key: 1 }, Pe = `
|
|
|
791
1107
|
}
|
|
792
1108
|
},
|
|
793
1109
|
emits: ["paginate"],
|
|
794
|
-
setup(
|
|
795
|
-
const e =
|
|
1110
|
+
setup(d, { emit: t }) {
|
|
1111
|
+
const e = d, i = t, g = o(() => e.pagination ? Math.ceil(e.pagination.total / e.pagination.perPage) : 0), u = o(() => {
|
|
796
1112
|
if (!e.pagination) return [];
|
|
797
|
-
const
|
|
798
|
-
let
|
|
799
|
-
C -
|
|
800
|
-
for (let
|
|
801
|
-
|
|
802
|
-
return
|
|
803
|
-
}),
|
|
804
|
-
e.pagination &&
|
|
1113
|
+
const y = [], n = 5, { page: c } = e.pagination, m = g.value;
|
|
1114
|
+
let h = Math.max(1, c - Math.floor(n / 2)), C = Math.min(m, h + n - 1);
|
|
1115
|
+
C - h < n - 1 && (h = Math.max(1, C - n + 1));
|
|
1116
|
+
for (let D = h; D <= C; D++)
|
|
1117
|
+
y.push(D);
|
|
1118
|
+
return y;
|
|
1119
|
+
}), z = (y) => {
|
|
1120
|
+
e.pagination && y >= 1 && y <= g.value && i("paginate", y);
|
|
805
1121
|
};
|
|
806
|
-
return (
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
(r(!0),
|
|
811
|
-
key:
|
|
812
|
-
class:
|
|
813
|
-
},
|
|
1122
|
+
return (y, n) => (r(), a("div", ld, [
|
|
1123
|
+
b("table", id, [
|
|
1124
|
+
b("thead", cd, [
|
|
1125
|
+
b("tr", null, [
|
|
1126
|
+
(r(!0), a(I, null, N(e.columns, (c) => (r(), a("th", {
|
|
1127
|
+
key: c.name,
|
|
1128
|
+
class: s(["dk:px-6 dk:py-3", c.classes])
|
|
1129
|
+
}, j(c.label), 3))), 128))
|
|
814
1130
|
]),
|
|
815
|
-
e.loading ? (r(),
|
|
816
|
-
|
|
1131
|
+
e.loading ? (r(), a("tr", ud, [
|
|
1132
|
+
b("td", {
|
|
817
1133
|
colspan: e.columns.length,
|
|
818
1134
|
class: "dk:p-0"
|
|
819
|
-
}, [...
|
|
820
|
-
|
|
821
|
-
])], 8,
|
|
822
|
-
])) :
|
|
1135
|
+
}, [...n[2] || (n[2] = [
|
|
1136
|
+
b("div", { class: "loading-bar" }, null, -1)
|
|
1137
|
+
])], 8, bd)
|
|
1138
|
+
])) : S("", !0)
|
|
823
1139
|
]),
|
|
824
|
-
|
|
825
|
-
class:
|
|
1140
|
+
b("tbody", {
|
|
1141
|
+
class: s({ "is-loading": e.loading })
|
|
826
1142
|
}, [
|
|
827
|
-
(r(!0),
|
|
828
|
-
key:
|
|
1143
|
+
(r(!0), a(I, null, N(e.rows, (c, m) => (r(), a("tr", {
|
|
1144
|
+
key: m,
|
|
829
1145
|
class: "dk:bg-white dk:border-b dk:border-gray-200 dk:dark:bg-gray-800 dk:dark:border-gray-700 dk:hover:bg-gray-50 dk:dark:hover:bg-gray-600 dk:transition-colors"
|
|
830
1146
|
}, [
|
|
831
|
-
(r(!0),
|
|
832
|
-
key:
|
|
1147
|
+
(r(!0), a(I, null, N(e.columns, (h) => (r(), a("td", {
|
|
1148
|
+
key: h.name,
|
|
833
1149
|
class: "dk:px-6 dk:py-4 dk:text-gray-900 dk:dark:text-gray-100"
|
|
834
1150
|
}, [
|
|
835
|
-
|
|
836
|
-
|
|
1151
|
+
_(y.$slots, h.name, W({ ref_for: !0 }, c), () => [
|
|
1152
|
+
A(j(c[h.name]), 1)
|
|
837
1153
|
], !0)
|
|
838
1154
|
]))), 128))
|
|
839
1155
|
]))), 128))
|
|
840
1156
|
], 2),
|
|
841
|
-
e.pagination ? (r(),
|
|
842
|
-
|
|
843
|
-
|
|
1157
|
+
e.pagination ? (r(), a("tfoot", pd, [
|
|
1158
|
+
b("tr", null, [
|
|
1159
|
+
b("td", {
|
|
844
1160
|
colspan: e.columns.length,
|
|
845
1161
|
class: "dk:px-6 dk:py-4"
|
|
846
1162
|
}, [
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
1163
|
+
b("div", md, [
|
|
1164
|
+
b("div", fd, " Página " + j(e.pagination.page) + " de " + j(g.value) + " | " + j(e.pagination.total) + " registros ", 1),
|
|
1165
|
+
b("div", hd, [
|
|
1166
|
+
de(ye, {
|
|
851
1167
|
variant: "outline",
|
|
852
1168
|
color: "neutral",
|
|
853
1169
|
size: "sm",
|
|
854
|
-
onClick:
|
|
1170
|
+
onClick: n[0] || (n[0] = (c) => z(e.pagination.page - 1)),
|
|
855
1171
|
disabled: e.pagination.page === 1
|
|
856
1172
|
}, {
|
|
857
|
-
default: E(() => [...
|
|
858
|
-
|
|
1173
|
+
default: E(() => [...n[3] || (n[3] = [
|
|
1174
|
+
A(" ← Anterior ", -1)
|
|
859
1175
|
])]),
|
|
860
1176
|
_: 1
|
|
861
1177
|
}, 8, ["disabled"]),
|
|
862
|
-
|
|
863
|
-
(r(!0),
|
|
864
|
-
key:
|
|
865
|
-
onClick: (
|
|
866
|
-
class:
|
|
867
|
-
},
|
|
1178
|
+
b("div", xd, [
|
|
1179
|
+
(r(!0), a(I, null, N(u.value, (c) => (r(), a("button", {
|
|
1180
|
+
key: c,
|
|
1181
|
+
onClick: (m) => z(c),
|
|
1182
|
+
class: s(["page-number", { active: c === e.pagination.page }])
|
|
1183
|
+
}, j(c), 11, vd))), 128))
|
|
868
1184
|
]),
|
|
869
|
-
|
|
1185
|
+
de(ye, {
|
|
870
1186
|
variant: "outline",
|
|
871
1187
|
color: "neutral",
|
|
872
1188
|
size: "sm",
|
|
873
|
-
onClick:
|
|
874
|
-
disabled: e.pagination.page ===
|
|
1189
|
+
onClick: n[1] || (n[1] = (c) => z(e.pagination.page + 1)),
|
|
1190
|
+
disabled: e.pagination.page === g.value
|
|
875
1191
|
}, {
|
|
876
|
-
default: E(() => [...
|
|
877
|
-
|
|
1192
|
+
default: E(() => [...n[4] || (n[4] = [
|
|
1193
|
+
A(" Siguiente → ", -1)
|
|
878
1194
|
])]),
|
|
879
1195
|
_: 1
|
|
880
1196
|
}, 8, ["disabled"])
|
|
881
1197
|
])
|
|
882
1198
|
])
|
|
883
|
-
], 8,
|
|
1199
|
+
], 8, gd)
|
|
884
1200
|
])
|
|
885
|
-
])) :
|
|
1201
|
+
])) : S("", !0)
|
|
886
1202
|
])
|
|
887
1203
|
]));
|
|
888
1204
|
}
|
|
889
|
-
}),
|
|
1205
|
+
}), Bt = /* @__PURE__ */ ke(yd, [["__scopeId", "data-v-60002528"]]), wd = { key: 1 }, zd = `
|
|
890
1206
|
dk:transition
|
|
891
1207
|
dk:text-center
|
|
892
1208
|
dk:disabled:opacity-50
|
|
@@ -897,7 +1213,7 @@ const Ve = { key: 1 }, Pe = `
|
|
|
897
1213
|
dk:text-ellipsis
|
|
898
1214
|
dk:whitespace-nowrap
|
|
899
1215
|
dk:active:scale-95
|
|
900
|
-
dk:max-w-full`,
|
|
1216
|
+
dk:max-w-full`, Mt = /* @__PURE__ */ L({
|
|
901
1217
|
__name: "DuiAction",
|
|
902
1218
|
props: {
|
|
903
1219
|
variant: { default: "solid" },
|
|
@@ -910,19 +1226,19 @@ const Ve = { key: 1 }, Pe = `
|
|
|
910
1226
|
to: { default: void 0 },
|
|
911
1227
|
nuxt: { type: Boolean, default: !1 }
|
|
912
1228
|
},
|
|
913
|
-
setup(
|
|
914
|
-
const
|
|
1229
|
+
setup(d) {
|
|
1230
|
+
const t = d, e = o(() => t.to ? ae(t.to, t.nuxt) : "span"), i = o(() => ce(t.to, e.value)), g = {
|
|
915
1231
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
916
1232
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
917
1233
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
918
|
-
},
|
|
1234
|
+
}, u = {
|
|
919
1235
|
all: "dk:rounded",
|
|
920
1236
|
top: "dk:rounded-t",
|
|
921
1237
|
bottom: "dk:rounded-b",
|
|
922
1238
|
left: "dk:rounded-l",
|
|
923
1239
|
right: "dk:rounded-r",
|
|
924
1240
|
none: "dk:rounded-none"
|
|
925
|
-
},
|
|
1241
|
+
}, z = {
|
|
926
1242
|
solid: {
|
|
927
1243
|
base: "dk:border-b",
|
|
928
1244
|
neutral: `
|
|
@@ -1094,25 +1410,25 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1094
1410
|
dk:dark:text-amber-100
|
|
1095
1411
|
dk:dark:hover:bg-amber-800`
|
|
1096
1412
|
}
|
|
1097
|
-
},
|
|
1413
|
+
}, y = o(() => {
|
|
1098
1414
|
var C;
|
|
1099
|
-
const
|
|
1100
|
-
return [
|
|
1415
|
+
const n = (((C = z[t.variant]) == null ? void 0 : C[t.color]) || "") + " " + z[t.variant].base, c = g[t.size] || "", m = t.block ? "dk:block" : "dk:inline-block", h = u[t.rounded] || "";
|
|
1416
|
+
return [zd, n, c, m, h].join(" ");
|
|
1101
1417
|
});
|
|
1102
|
-
return (
|
|
1103
|
-
class:
|
|
1104
|
-
title:
|
|
1418
|
+
return (n, c) => (r(), F(Q(e.value), W(i.value, {
|
|
1419
|
+
class: y.value,
|
|
1420
|
+
title: t.title
|
|
1105
1421
|
}), {
|
|
1106
1422
|
default: E(() => [
|
|
1107
|
-
|
|
1423
|
+
t.loading ? (r(), a("span", wd, "Cargando...")) : _(n.$slots, "default", { key: 0 })
|
|
1108
1424
|
]),
|
|
1109
1425
|
_: 3
|
|
1110
1426
|
}, 16, ["class", "title"]));
|
|
1111
1427
|
}
|
|
1112
|
-
}),
|
|
1428
|
+
}), Cd = {
|
|
1113
1429
|
key: 0,
|
|
1114
1430
|
class: "dk:relative dk:overflow-hidden dk:rounded-t-lg"
|
|
1115
|
-
},
|
|
1431
|
+
}, $d = ["src", "alt"], Dt = /* @__PURE__ */ L({
|
|
1116
1432
|
__name: "DuiCard",
|
|
1117
1433
|
props: {
|
|
1118
1434
|
size: { default: "m" },
|
|
@@ -1122,11 +1438,11 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1122
1438
|
to: { default: void 0 },
|
|
1123
1439
|
nuxt: { type: Boolean, default: !1 }
|
|
1124
1440
|
},
|
|
1125
|
-
setup(
|
|
1126
|
-
const
|
|
1127
|
-
const
|
|
1128
|
-
return
|
|
1129
|
-
},
|
|
1441
|
+
setup(d) {
|
|
1442
|
+
const t = d, e = () => t.to ? ae(t.to, t.nuxt) : "div", i = () => t.to ? ae(t.to, t.nuxt) : "h3", g = () => {
|
|
1443
|
+
const l = e();
|
|
1444
|
+
return ce(t.to, l);
|
|
1445
|
+
}, u = {
|
|
1130
1446
|
s: {
|
|
1131
1447
|
padding: "dk:p-3",
|
|
1132
1448
|
spacing: "dk:space-y-2",
|
|
@@ -1148,7 +1464,7 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1148
1464
|
subtitleSize: "dk:text-lg",
|
|
1149
1465
|
contentSize: "dk:text-lg"
|
|
1150
1466
|
}
|
|
1151
|
-
},
|
|
1467
|
+
}, z = o(() => [
|
|
1152
1468
|
// Glassmorphism card styles (Windows Vista inspired)
|
|
1153
1469
|
"dk:relative dk:bg-gradient-to-br dk:from-white/80 dk:via-white/70 dk:to-gray-50/80",
|
|
1154
1470
|
"dk:dark:from-gray-700/60 dk:dark:via-gray-800/60 dk:dark:to-gray-900/60",
|
|
@@ -1164,98 +1480,98 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1164
1480
|
"dk:before:absolute dk:before:top-0 dk:before:left-0 dk:before:right-0 dk:before:h-0.5",
|
|
1165
1481
|
"dk:before:bg-gradient-to-r dk:before:from-white/60 dk:before:via-white/40 dk:before:to-transparent",
|
|
1166
1482
|
"dk:dark:before:from-white/20 dk:dark:before:via-white/10 dk:dark:before:to-transparent"
|
|
1167
|
-
].join(" ")),
|
|
1483
|
+
].join(" ")), y = o(() => [
|
|
1168
1484
|
"dk:w-full dk:h-48 dk:object-cover",
|
|
1169
1485
|
"dk:relative dk:z-10"
|
|
1170
|
-
].join(" ")),
|
|
1171
|
-
const
|
|
1486
|
+
].join(" ")), n = o(() => {
|
|
1487
|
+
const l = u[t.size];
|
|
1172
1488
|
return [
|
|
1173
|
-
|
|
1174
|
-
|
|
1489
|
+
l.padding,
|
|
1490
|
+
l.spacing,
|
|
1175
1491
|
// Glass effect for content wrapper
|
|
1176
1492
|
"dk:relative dk:z-10"
|
|
1177
1493
|
].join(" ");
|
|
1178
|
-
}),
|
|
1179
|
-
|
|
1180
|
-
].join(" ")),
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1494
|
+
}), c = o(() => [
|
|
1495
|
+
u[t.size].spacing
|
|
1496
|
+
].join(" ")), m = o(() => {
|
|
1497
|
+
const k = [
|
|
1498
|
+
u[t.size].titleSize,
|
|
1183
1499
|
"dk:font-semibold dk:text-gray-900 dk:dark:text-gray-100",
|
|
1184
1500
|
"dk:line-clamp-2"
|
|
1185
1501
|
];
|
|
1186
|
-
return
|
|
1502
|
+
return t.to && k.push(
|
|
1187
1503
|
"dk:no-underline dk:hover:underline dk:transition-colors",
|
|
1188
1504
|
"dk:hover:text-blue-600 dk:dark:hover:text-blue-400"
|
|
1189
|
-
),
|
|
1190
|
-
}),
|
|
1191
|
-
const
|
|
1505
|
+
), k.join(" ");
|
|
1506
|
+
}), h = o(() => {
|
|
1507
|
+
const l = [
|
|
1192
1508
|
"dk:block",
|
|
1193
1509
|
"dk:transition-transform dk:duration-300",
|
|
1194
1510
|
"dk:hover:scale-105",
|
|
1195
1511
|
"dk:relative dk:z-10"
|
|
1196
1512
|
];
|
|
1197
|
-
return
|
|
1198
|
-
}), C =
|
|
1199
|
-
|
|
1513
|
+
return t.to && l.push("dk:no-underline"), l.join(" ");
|
|
1514
|
+
}), C = o(() => [
|
|
1515
|
+
u[t.size].subtitleSize,
|
|
1200
1516
|
"dk:text-gray-600 dk:dark:text-gray-400",
|
|
1201
1517
|
"dk:line-clamp-3"
|
|
1202
|
-
].join(" ")),
|
|
1203
|
-
|
|
1518
|
+
].join(" ")), D = o(() => [
|
|
1519
|
+
u[t.size].contentSize,
|
|
1204
1520
|
"dk:text-gray-700 dk:dark:text-gray-300"
|
|
1205
|
-
].join(" ")),
|
|
1521
|
+
].join(" ")), x = o(() => [
|
|
1206
1522
|
"dk:border-t dk:border-gray-300/40 dk:dark:border-white/10",
|
|
1207
1523
|
"dk:pt-3 dk:mt-3",
|
|
1208
1524
|
"dk:relative dk:z-10"
|
|
1209
1525
|
].join(" "));
|
|
1210
|
-
return (
|
|
1211
|
-
class:
|
|
1526
|
+
return (l, k) => (r(), a("div", {
|
|
1527
|
+
class: s(z.value)
|
|
1212
1528
|
}, [
|
|
1213
|
-
|
|
1214
|
-
(r(),
|
|
1529
|
+
d.image ? (r(), a("div", Cd, [
|
|
1530
|
+
(r(), F(Q(e()), W(g(), { class: h.value }), {
|
|
1215
1531
|
default: E(() => [
|
|
1216
|
-
|
|
1217
|
-
src:
|
|
1218
|
-
alt:
|
|
1219
|
-
class:
|
|
1220
|
-
}, null, 10,
|
|
1532
|
+
b("img", {
|
|
1533
|
+
src: d.image,
|
|
1534
|
+
alt: d.title || "Card image",
|
|
1535
|
+
class: s(y.value)
|
|
1536
|
+
}, null, 10, $d)
|
|
1221
1537
|
]),
|
|
1222
1538
|
_: 1
|
|
1223
1539
|
}, 16, ["class"]))
|
|
1224
|
-
])) :
|
|
1225
|
-
|
|
1226
|
-
class:
|
|
1540
|
+
])) : S("", !0),
|
|
1541
|
+
b("div", {
|
|
1542
|
+
class: s(n.value)
|
|
1227
1543
|
}, [
|
|
1228
|
-
|
|
1544
|
+
d.title || d.subtitle ? (r(), a("div", {
|
|
1229
1545
|
key: 0,
|
|
1230
|
-
class:
|
|
1546
|
+
class: s(c.value)
|
|
1231
1547
|
}, [
|
|
1232
|
-
|
|
1548
|
+
d.title ? (r(), F(Q(i()), W({ key: 0 }, g(), { class: m.value }), {
|
|
1233
1549
|
default: E(() => [
|
|
1234
|
-
|
|
1550
|
+
A(j(d.title), 1)
|
|
1235
1551
|
]),
|
|
1236
1552
|
_: 1
|
|
1237
|
-
}, 16, ["class"])) :
|
|
1238
|
-
|
|
1553
|
+
}, 16, ["class"])) : S("", !0),
|
|
1554
|
+
d.subtitle ? (r(), a("p", {
|
|
1239
1555
|
key: 1,
|
|
1240
|
-
class:
|
|
1241
|
-
},
|
|
1242
|
-
], 2)) :
|
|
1243
|
-
|
|
1556
|
+
class: s(C.value)
|
|
1557
|
+
}, j(d.subtitle), 3)) : S("", !0)
|
|
1558
|
+
], 2)) : S("", !0),
|
|
1559
|
+
l.$slots.default ? (r(), a("div", {
|
|
1244
1560
|
key: 1,
|
|
1245
|
-
class:
|
|
1561
|
+
class: s(D.value)
|
|
1246
1562
|
}, [
|
|
1247
|
-
|
|
1248
|
-
], 2)) :
|
|
1249
|
-
|
|
1563
|
+
_(l.$slots, "default")
|
|
1564
|
+
], 2)) : S("", !0),
|
|
1565
|
+
l.$slots.footer ? (r(), a("div", {
|
|
1250
1566
|
key: 2,
|
|
1251
|
-
class:
|
|
1567
|
+
class: s(x.value)
|
|
1252
1568
|
}, [
|
|
1253
|
-
|
|
1254
|
-
], 2)) :
|
|
1569
|
+
_(l.$slots, "footer")
|
|
1570
|
+
], 2)) : S("", !0)
|
|
1255
1571
|
], 2)
|
|
1256
1572
|
], 2));
|
|
1257
1573
|
}
|
|
1258
|
-
}),
|
|
1574
|
+
}), Sd = ["aria-labelledby", "aria-describedby"], Tt = /* @__PURE__ */ L({
|
|
1259
1575
|
__name: "DuiModal",
|
|
1260
1576
|
props: {
|
|
1261
1577
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1275,22 +1591,22 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1275
1591
|
zIndex: { default: 50 }
|
|
1276
1592
|
},
|
|
1277
1593
|
emits: ["update:modelValue", "open", "close", "backdrop", "escape"],
|
|
1278
|
-
setup(
|
|
1279
|
-
const e =
|
|
1594
|
+
setup(d, { emit: t }) {
|
|
1595
|
+
const e = d, i = t, g = Math.random().toString(36).slice(2, 10), u = `dui-modal-title-${g}`, z = `dui-modal-description-${g}`, y = {
|
|
1280
1596
|
all: "dk:rounded-xl",
|
|
1281
1597
|
top: "dk:rounded-t-xl",
|
|
1282
1598
|
bottom: "dk:rounded-b-xl",
|
|
1283
1599
|
left: "dk:rounded-l-xl",
|
|
1284
1600
|
right: "dk:rounded-r-xl",
|
|
1285
1601
|
none: "dk:rounded-none"
|
|
1286
|
-
},
|
|
1602
|
+
}, n = {
|
|
1287
1603
|
xs: "dk:w-full dk:max-w-xs",
|
|
1288
1604
|
sm: "dk:w-full dk:max-w-md",
|
|
1289
1605
|
md: "dk:w-full dk:max-w-xl",
|
|
1290
1606
|
lg: "dk:w-full dk:max-w-3xl",
|
|
1291
1607
|
xl: "dk:w-full dk:max-w-5xl",
|
|
1292
1608
|
full: "dk:h-[calc(100vh-2rem)] dk:w-[calc(100vw-2rem)] dk:max-w-none"
|
|
1293
|
-
},
|
|
1609
|
+
}, c = {
|
|
1294
1610
|
solid: {
|
|
1295
1611
|
base: "dk:border dk:shadow-xl",
|
|
1296
1612
|
neutral: "dk:bg-white dk:text-zinc-900 dk:border-zinc-200 dk:dark:bg-zinc-900 dk:dark:text-zinc-100 dk:dark:border-zinc-700",
|
|
@@ -1318,134 +1634,134 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1318
1634
|
warning: "dk:bg-amber-100/85 dk:text-amber-900 dk:border-amber-300/70 dk:dark:bg-amber-900/70 dk:dark:text-amber-100 dk:dark:border-amber-600/60",
|
|
1319
1635
|
danger: "dk:bg-rose-100/85 dk:text-rose-900 dk:border-rose-300/70 dk:dark:bg-rose-900/70 dk:dark:text-rose-100 dk:dark:border-rose-600/60"
|
|
1320
1636
|
}
|
|
1321
|
-
},
|
|
1637
|
+
}, m = o(() => [
|
|
1322
1638
|
"dk:fixed dk:inset-0 dk:bg-black/55",
|
|
1323
1639
|
e.blurBackdrop ? "dk:backdrop-blur-[2px]" : ""
|
|
1324
|
-
].join(" ")),
|
|
1640
|
+
].join(" ")), h = o(() => [
|
|
1325
1641
|
"dk:flex dk:min-h-full dk:w-full dk:p-4",
|
|
1326
1642
|
e.centered ? "dk:items-center" : "dk:items-start dk:pt-8",
|
|
1327
1643
|
"dk:justify-center"
|
|
1328
|
-
].join(" ")), C =
|
|
1329
|
-
const $ =
|
|
1644
|
+
].join(" ")), C = o(() => {
|
|
1645
|
+
const $ = c[e.variant].base, M = c[e.variant][e.color], P = y[e.rounded], J = n[e.size];
|
|
1330
1646
|
return [
|
|
1331
1647
|
"dk:relative dk:flex dk:flex-col dk:overflow-hidden",
|
|
1332
1648
|
$,
|
|
1333
1649
|
M,
|
|
1334
|
-
|
|
1335
|
-
|
|
1650
|
+
P,
|
|
1651
|
+
J
|
|
1336
1652
|
].join(" ");
|
|
1337
|
-
}),
|
|
1653
|
+
}), D = o(() => [
|
|
1338
1654
|
"dk:flex dk:items-start dk:justify-between dk:gap-3 dk:px-5 dk:pt-5 dk:pb-3",
|
|
1339
1655
|
"dk:border-b dk:border-current/10"
|
|
1340
|
-
].join(" ")),
|
|
1656
|
+
].join(" ")), x = o(() => [
|
|
1341
1657
|
"dk:px-5 dk:py-4",
|
|
1342
1658
|
e.scrollable ? "dk:max-h-[65vh] dk:overflow-y-auto" : ""
|
|
1343
|
-
].join(" ")),
|
|
1659
|
+
].join(" ")), l = o(() => [
|
|
1344
1660
|
"dk:px-5 dk:py-4 dk:border-t dk:border-current/10",
|
|
1345
1661
|
"dk:flex dk:items-center dk:justify-end dk:gap-2"
|
|
1346
1662
|
].join(" "));
|
|
1347
|
-
function
|
|
1663
|
+
function k() {
|
|
1348
1664
|
if (typeof document > "u") return;
|
|
1349
|
-
const $ = document.body,
|
|
1350
|
-
$.dataset.duiModalCount = String(
|
|
1665
|
+
const $ = document.body, P = Number($.dataset.duiModalCount || "0") + 1;
|
|
1666
|
+
$.dataset.duiModalCount = String(P), P === 1 && ($.style.overflow = "hidden");
|
|
1351
1667
|
}
|
|
1352
|
-
function
|
|
1668
|
+
function p() {
|
|
1353
1669
|
if (typeof document > "u") return;
|
|
1354
|
-
const $ = document.body, M = Number($.dataset.duiModalCount || "0"),
|
|
1355
|
-
$.dataset.duiModalCount = String(
|
|
1670
|
+
const $ = document.body, M = Number($.dataset.duiModalCount || "0"), P = Math.max(0, M - 1);
|
|
1671
|
+
$.dataset.duiModalCount = String(P), P === 0 && ($.style.overflow = "");
|
|
1356
1672
|
}
|
|
1357
|
-
function
|
|
1673
|
+
function w($) {
|
|
1358
1674
|
i("update:modelValue", !1), i("close", $);
|
|
1359
1675
|
}
|
|
1360
|
-
function
|
|
1361
|
-
i("backdrop"), !(e.persistent || !e.closeOnBackdrop) &&
|
|
1676
|
+
function f() {
|
|
1677
|
+
i("backdrop"), !(e.persistent || !e.closeOnBackdrop) && w("backdrop");
|
|
1362
1678
|
}
|
|
1363
|
-
function
|
|
1364
|
-
$.key !== "Escape" || !e.modelValue || (i("escape"), !(e.persistent || !e.closeOnEsc) &&
|
|
1679
|
+
function v($) {
|
|
1680
|
+
$.key !== "Escape" || !e.modelValue || (i("escape"), !(e.persistent || !e.closeOnEsc) && w("escape"));
|
|
1365
1681
|
}
|
|
1366
|
-
return
|
|
1682
|
+
return le(
|
|
1367
1683
|
() => e.modelValue,
|
|
1368
1684
|
($, M) => {
|
|
1369
|
-
$ && !M && (
|
|
1685
|
+
$ && !M && (k(), i("open")), !$ && M && p();
|
|
1370
1686
|
}
|
|
1371
|
-
),
|
|
1372
|
-
e.modelValue &&
|
|
1373
|
-
}),
|
|
1374
|
-
e.modelValue &&
|
|
1375
|
-
}), ($, M) => (r(),
|
|
1376
|
-
|
|
1687
|
+
), ge(() => {
|
|
1688
|
+
e.modelValue && k(), typeof window < "u" && window.addEventListener("keydown", v);
|
|
1689
|
+
}), me(() => {
|
|
1690
|
+
e.modelValue && p(), typeof window < "u" && window.removeEventListener("keydown", v);
|
|
1691
|
+
}), ($, M) => (r(), F(fe, { to: "body" }, [
|
|
1692
|
+
de(he, {
|
|
1377
1693
|
"enter-active-class": "dk:transition-opacity dk:duration-200",
|
|
1378
1694
|
"leave-active-class": "dk:transition-opacity dk:duration-200",
|
|
1379
1695
|
"enter-from-class": "dk:opacity-0",
|
|
1380
1696
|
"leave-to-class": "dk:opacity-0"
|
|
1381
1697
|
}, {
|
|
1382
1698
|
default: E(() => [
|
|
1383
|
-
e.modelValue ? (r(),
|
|
1699
|
+
e.modelValue ? (r(), a("div", {
|
|
1384
1700
|
key: 0,
|
|
1385
|
-
style:
|
|
1386
|
-
class: m
|
|
1387
|
-
onClick:
|
|
1701
|
+
style: ie({ zIndex: String(e.zIndex) }),
|
|
1702
|
+
class: s(m.value),
|
|
1703
|
+
onClick: f
|
|
1388
1704
|
}, [
|
|
1389
|
-
|
|
1390
|
-
class:
|
|
1705
|
+
b("div", {
|
|
1706
|
+
class: s(h.value)
|
|
1391
1707
|
}, [
|
|
1392
|
-
|
|
1708
|
+
b("div", {
|
|
1393
1709
|
role: "dialog",
|
|
1394
1710
|
"aria-modal": "true",
|
|
1395
|
-
"aria-labelledby": e.title ?
|
|
1396
|
-
"aria-describedby": e.description ?
|
|
1397
|
-
class:
|
|
1398
|
-
onClick: M[1] || (M[1] =
|
|
1711
|
+
"aria-labelledby": e.title ? u : void 0,
|
|
1712
|
+
"aria-describedby": e.description ? z : void 0,
|
|
1713
|
+
class: s(C.value),
|
|
1714
|
+
onClick: M[1] || (M[1] = te(() => {
|
|
1399
1715
|
}, ["stop"]))
|
|
1400
1716
|
}, [
|
|
1401
|
-
$.$slots.header || e.title || e.description || e.showClose ? (r(),
|
|
1717
|
+
$.$slots.header || e.title || e.description || e.showClose ? (r(), a("header", {
|
|
1402
1718
|
key: 0,
|
|
1403
|
-
class:
|
|
1719
|
+
class: s(D.value)
|
|
1404
1720
|
}, [
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
e.title ? (r(),
|
|
1721
|
+
b("div", null, [
|
|
1722
|
+
_($.$slots, "header", {}, () => [
|
|
1723
|
+
e.title ? (r(), a("h2", {
|
|
1408
1724
|
key: 0,
|
|
1409
|
-
id:
|
|
1725
|
+
id: u,
|
|
1410
1726
|
class: "dk:text-lg dk:font-semibold"
|
|
1411
|
-
},
|
|
1412
|
-
e.description ? (r(),
|
|
1727
|
+
}, j(e.title), 1)) : S("", !0),
|
|
1728
|
+
e.description ? (r(), a("p", {
|
|
1413
1729
|
key: 1,
|
|
1414
|
-
id:
|
|
1730
|
+
id: z,
|
|
1415
1731
|
class: "dk:mt-1 dk:text-sm dk:opacity-80"
|
|
1416
|
-
},
|
|
1732
|
+
}, j(e.description), 1)) : S("", !0)
|
|
1417
1733
|
])
|
|
1418
1734
|
]),
|
|
1419
|
-
e.showClose ? (r(),
|
|
1735
|
+
e.showClose ? (r(), a("button", {
|
|
1420
1736
|
key: 0,
|
|
1421
1737
|
type: "button",
|
|
1422
1738
|
class: "dk:inline-flex dk:h-8 dk:w-8 dk:items-center dk:justify-center dk:rounded dk:text-current dk:opacity-70 dk:transition-opacity dk:hover:opacity-100 dk:focus-visible:opacity-100 dk:outline-none dk:ring-2 dk:ring-current/30",
|
|
1423
1739
|
"aria-label": "Cerrar modal",
|
|
1424
|
-
onClick: M[0] || (M[0] = (
|
|
1740
|
+
onClick: M[0] || (M[0] = (P) => w("button"))
|
|
1425
1741
|
}, [...M[2] || (M[2] = [
|
|
1426
|
-
|
|
1427
|
-
])])) :
|
|
1428
|
-
], 2)) :
|
|
1429
|
-
|
|
1430
|
-
class:
|
|
1742
|
+
b("span", { "aria-hidden": "true" }, "×", -1)
|
|
1743
|
+
])])) : S("", !0)
|
|
1744
|
+
], 2)) : S("", !0),
|
|
1745
|
+
b("section", {
|
|
1746
|
+
class: s(x.value)
|
|
1431
1747
|
}, [
|
|
1432
|
-
|
|
1748
|
+
_($.$slots, "default")
|
|
1433
1749
|
], 2),
|
|
1434
|
-
$.$slots.footer ? (r(),
|
|
1750
|
+
$.$slots.footer ? (r(), a("footer", {
|
|
1435
1751
|
key: 1,
|
|
1436
|
-
class:
|
|
1752
|
+
class: s(l.value)
|
|
1437
1753
|
}, [
|
|
1438
|
-
|
|
1439
|
-
], 2)) :
|
|
1440
|
-
], 10,
|
|
1754
|
+
_($.$slots, "footer")
|
|
1755
|
+
], 2)) : S("", !0)
|
|
1756
|
+
], 10, Sd)
|
|
1441
1757
|
], 2)
|
|
1442
|
-
], 6)) :
|
|
1758
|
+
], 6)) : S("", !0)
|
|
1443
1759
|
]),
|
|
1444
1760
|
_: 3
|
|
1445
1761
|
})
|
|
1446
1762
|
]));
|
|
1447
1763
|
}
|
|
1448
|
-
}),
|
|
1764
|
+
}), jd = ["aria-describedby"], Vd = { class: "dk:inline-flex dk:items-center" }, _t = /* @__PURE__ */ L({
|
|
1449
1765
|
__name: "DuiTooltip",
|
|
1450
1766
|
props: {
|
|
1451
1767
|
modelValue: { type: Boolean, default: void 0 },
|
|
@@ -1470,31 +1786,31 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1470
1786
|
teleportTo: { default: "body" }
|
|
1471
1787
|
},
|
|
1472
1788
|
emits: ["update:modelValue", "open", "close"],
|
|
1473
|
-
setup(
|
|
1474
|
-
const e =
|
|
1475
|
-
let C = null,
|
|
1476
|
-
const
|
|
1789
|
+
setup(d, { emit: t }) {
|
|
1790
|
+
const e = d, i = t, g = U(null), u = U(null), z = U(!1), y = o(() => e.modelValue !== void 0), n = o(() => y.value ? !!e.modelValue : z.value), c = U(e.placement), m = U({ top: 0, left: 0 }), h = U(!1);
|
|
1791
|
+
let C = null, D = null;
|
|
1792
|
+
const x = `dui-tooltip-${Math.random().toString(36).slice(2, 10)}`, l = {
|
|
1477
1793
|
all: "dk:rounded-md",
|
|
1478
1794
|
top: "dk:rounded-t-md",
|
|
1479
1795
|
bottom: "dk:rounded-b-md",
|
|
1480
1796
|
left: "dk:rounded-l-md",
|
|
1481
1797
|
right: "dk:rounded-r-md",
|
|
1482
1798
|
none: "dk:rounded-none"
|
|
1483
|
-
},
|
|
1799
|
+
}, k = {
|
|
1484
1800
|
sm: "dk:px-2 dk:py-1 dk:text-xs",
|
|
1485
1801
|
md: "dk:px-2.5 dk:py-1.5 dk:text-sm",
|
|
1486
1802
|
lg: "dk:px-3 dk:py-2 dk:text-base"
|
|
1487
|
-
},
|
|
1803
|
+
}, p = {
|
|
1488
1804
|
xs: "dk:max-w-40",
|
|
1489
1805
|
sm: "dk:max-w-56",
|
|
1490
1806
|
md: "dk:max-w-72",
|
|
1491
1807
|
lg: "dk:max-w-96",
|
|
1492
1808
|
full: "dk:max-w-[min(92vw,42rem)]"
|
|
1493
1809
|
};
|
|
1494
|
-
function
|
|
1495
|
-
return typeof
|
|
1810
|
+
function w(B) {
|
|
1811
|
+
return typeof B == "string" && B in p;
|
|
1496
1812
|
}
|
|
1497
|
-
const
|
|
1813
|
+
const f = {
|
|
1498
1814
|
solid: {
|
|
1499
1815
|
base: "dk:border dk:shadow-lg",
|
|
1500
1816
|
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",
|
|
@@ -1513,26 +1829,26 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1513
1829
|
warning: "dk:text-amber-900 dk:border-amber-400 dk:dark:text-amber-100 dk:dark:border-amber-500",
|
|
1514
1830
|
danger: "dk:text-rose-900 dk:border-rose-400 dk:dark:text-rose-100 dk:dark:border-rose-500"
|
|
1515
1831
|
}
|
|
1516
|
-
},
|
|
1517
|
-
const
|
|
1832
|
+
}, v = o(() => {
|
|
1833
|
+
const B = l[e.rounded], V = k[e.size], T = f[e.variant].base, K = f[e.variant][e.color], O = w(e.maxWidth) ? p[e.maxWidth] : "";
|
|
1518
1834
|
return [
|
|
1519
1835
|
"dk:fixed dk:pointer-events-auto dk:leading-tight dk:select-text dk:cursor-default",
|
|
1520
1836
|
"dk:break-words dk:whitespace-normal",
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1837
|
+
B,
|
|
1838
|
+
V,
|
|
1839
|
+
T,
|
|
1840
|
+
K,
|
|
1841
|
+
O
|
|
1526
1842
|
].join(" ");
|
|
1527
|
-
}), $ =
|
|
1528
|
-
const
|
|
1529
|
-
top: `${
|
|
1530
|
-
left: `${
|
|
1843
|
+
}), $ = o(() => {
|
|
1844
|
+
const B = {
|
|
1845
|
+
top: `${m.value.top}px`,
|
|
1846
|
+
left: `${m.value.left}px`,
|
|
1531
1847
|
zIndex: String(e.zIndex)
|
|
1532
1848
|
};
|
|
1533
|
-
return typeof e.maxWidth == "number" ?
|
|
1534
|
-
}), M =
|
|
1535
|
-
const
|
|
1849
|
+
return typeof e.maxWidth == "number" ? B.maxWidth = `${e.maxWidth}px` : typeof e.maxWidth == "string" && !w(e.maxWidth) && (B.maxWidth = e.maxWidth), B;
|
|
1850
|
+
}), M = o(() => {
|
|
1851
|
+
const B = f[e.variant][e.color], V = c.value, T = {
|
|
1536
1852
|
top: "dk:-bottom-1.5 dk:left-1/2 dk:-translate-x-1/2 dk:rotate-45",
|
|
1537
1853
|
"top-start": "dk:-bottom-1.5 dk:left-3 dk:rotate-45",
|
|
1538
1854
|
"top-end": "dk:-bottom-1.5 dk:right-3 dk:rotate-45",
|
|
@@ -1548,29 +1864,29 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1548
1864
|
};
|
|
1549
1865
|
return [
|
|
1550
1866
|
"dk:absolute dk:block dk:h-3 dk:w-3",
|
|
1551
|
-
|
|
1552
|
-
|
|
1867
|
+
B,
|
|
1868
|
+
T[V] || T.top
|
|
1553
1869
|
].join(" ");
|
|
1554
1870
|
});
|
|
1555
|
-
function
|
|
1556
|
-
C && (clearTimeout(C), C = null),
|
|
1871
|
+
function P() {
|
|
1872
|
+
C && (clearTimeout(C), C = null), D && (clearTimeout(D), D = null);
|
|
1557
1873
|
}
|
|
1558
|
-
function
|
|
1559
|
-
e.disabled || (
|
|
1560
|
-
|
|
1561
|
-
})) : i("close",
|
|
1874
|
+
function J(B, V) {
|
|
1875
|
+
e.disabled || (y.value ? i("update:modelValue", B) : z.value = B, B ? (i("open", V), se(() => {
|
|
1876
|
+
X();
|
|
1877
|
+
})) : i("close", V));
|
|
1562
1878
|
}
|
|
1563
|
-
function
|
|
1564
|
-
|
|
1565
|
-
|
|
1879
|
+
function Y(B) {
|
|
1880
|
+
P(), C = setTimeout(() => {
|
|
1881
|
+
J(!0, B);
|
|
1566
1882
|
}, Math.max(0, e.showDelay));
|
|
1567
1883
|
}
|
|
1568
|
-
function
|
|
1569
|
-
|
|
1570
|
-
|
|
1884
|
+
function Z(B) {
|
|
1885
|
+
P(), D = setTimeout(() => {
|
|
1886
|
+
B === "hover" && e.interactive && h.value || J(!1, B);
|
|
1571
1887
|
}, Math.max(0, e.hideDelay));
|
|
1572
1888
|
}
|
|
1573
|
-
function
|
|
1889
|
+
function ue(B) {
|
|
1574
1890
|
return {
|
|
1575
1891
|
top: "bottom",
|
|
1576
1892
|
"top-start": "bottom-start",
|
|
@@ -1584,151 +1900,977 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1584
1900
|
right: "left",
|
|
1585
1901
|
"right-start": "left-start",
|
|
1586
1902
|
"right-end": "left-end"
|
|
1587
|
-
}[
|
|
1903
|
+
}[B];
|
|
1588
1904
|
}
|
|
1589
|
-
function
|
|
1590
|
-
const [
|
|
1591
|
-
let
|
|
1592
|
-
|
|
1593
|
-
const
|
|
1594
|
-
return
|
|
1905
|
+
function ee(B, V, T) {
|
|
1906
|
+
const [K, O] = B.split("-"), G = e.offset;
|
|
1907
|
+
let q = 0, H = 0;
|
|
1908
|
+
K === "top" && (q = V.top - T.height - G, O === "start" ? H = V.left : O === "end" ? H = V.right - T.width : H = V.left + V.width / 2 - T.width / 2), K === "bottom" && (q = V.bottom + G, O === "start" ? H = V.left : O === "end" ? H = V.right - T.width : H = V.left + V.width / 2 - T.width / 2), K === "left" && (H = V.left - T.width - G, O === "start" ? q = V.top : O === "end" ? q = V.bottom - T.height : q = V.top + V.height / 2 - T.height / 2), K === "right" && (H = V.right + G, O === "start" ? q = V.top : O === "end" ? q = V.bottom - T.height : q = V.top + V.height / 2 - T.height / 2);
|
|
1909
|
+
const ne = e.viewportPadding, _e = window.innerWidth, Pe = window.innerHeight;
|
|
1910
|
+
return q = Math.min(Math.max(ne, q), Pe - T.height - ne), H = Math.min(Math.max(ne, H), _e - T.width - ne), { top: q, left: H };
|
|
1595
1911
|
}
|
|
1596
|
-
function
|
|
1912
|
+
function $e(B, V, T) {
|
|
1597
1913
|
if (!e.flip) return !1;
|
|
1598
|
-
const [
|
|
1599
|
-
return
|
|
1914
|
+
const [K] = B.split("-"), O = e.offset, G = e.viewportPadding;
|
|
1915
|
+
return K === "top" ? V.top - T.height - O < G : K === "bottom" ? V.bottom + T.height + O > window.innerHeight - G : K === "left" ? V.left - T.width - O < G : V.right + T.width + O > window.innerWidth - G;
|
|
1600
1916
|
}
|
|
1601
|
-
function
|
|
1602
|
-
if (!
|
|
1603
|
-
const
|
|
1604
|
-
let
|
|
1605
|
-
|
|
1917
|
+
function X() {
|
|
1918
|
+
if (!g.value || !u.value) return;
|
|
1919
|
+
const B = g.value.getBoundingClientRect(), V = u.value.getBoundingClientRect();
|
|
1920
|
+
let T = e.placement;
|
|
1921
|
+
$e(T, B, V) && (T = ue(T)), c.value = T, m.value = ee(T, B, V);
|
|
1606
1922
|
}
|
|
1607
|
-
function
|
|
1608
|
-
e.trigger === "hover" &&
|
|
1923
|
+
function Se() {
|
|
1924
|
+
e.trigger === "hover" && Y("hover");
|
|
1609
1925
|
}
|
|
1610
|
-
function
|
|
1611
|
-
var
|
|
1926
|
+
function je(B) {
|
|
1927
|
+
var V;
|
|
1612
1928
|
if (e.trigger === "hover") {
|
|
1613
1929
|
if (e.interactive) {
|
|
1614
|
-
const
|
|
1615
|
-
if (
|
|
1930
|
+
const T = B.relatedTarget;
|
|
1931
|
+
if (T && ((V = u.value) != null && V.contains(T)))
|
|
1616
1932
|
return;
|
|
1617
1933
|
}
|
|
1618
|
-
|
|
1934
|
+
Z("hover");
|
|
1619
1935
|
}
|
|
1620
1936
|
}
|
|
1621
|
-
function
|
|
1622
|
-
e.trigger !== "focus" && e.trigger !== "hover" ||
|
|
1937
|
+
function Ve() {
|
|
1938
|
+
e.trigger !== "focus" && e.trigger !== "hover" || Y("focus");
|
|
1623
1939
|
}
|
|
1624
|
-
function
|
|
1625
|
-
e.trigger !== "focus" && e.trigger !== "hover" ||
|
|
1940
|
+
function Be() {
|
|
1941
|
+
e.trigger !== "focus" && e.trigger !== "hover" || Z("focus");
|
|
1626
1942
|
}
|
|
1627
|
-
function
|
|
1628
|
-
e.trigger === "click" && (
|
|
1943
|
+
function Me(B) {
|
|
1944
|
+
e.trigger === "click" && (B.stopPropagation(), n.value ? Z("click") : Y("click"));
|
|
1629
1945
|
}
|
|
1630
|
-
function
|
|
1631
|
-
e.interactive && (
|
|
1946
|
+
function De() {
|
|
1947
|
+
e.interactive && (h.value = !0, P());
|
|
1632
1948
|
}
|
|
1633
|
-
function
|
|
1634
|
-
var
|
|
1949
|
+
function Te(B) {
|
|
1950
|
+
var T;
|
|
1635
1951
|
if (!e.interactive) return;
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1952
|
+
const V = B.relatedTarget;
|
|
1953
|
+
V && ((T = g.value) != null && T.contains(V)) || (h.value = !1, Z("hover"));
|
|
1638
1954
|
}
|
|
1639
|
-
function
|
|
1640
|
-
var
|
|
1641
|
-
if (e.trigger !== "click" || !
|
|
1642
|
-
const
|
|
1643
|
-
(
|
|
1955
|
+
function xe(B) {
|
|
1956
|
+
var T, K;
|
|
1957
|
+
if (e.trigger !== "click" || !n.value) return;
|
|
1958
|
+
const V = B.target;
|
|
1959
|
+
(T = g.value) != null && T.contains(V) || (K = u.value) != null && K.contains(V) || Z("outside");
|
|
1644
1960
|
}
|
|
1645
|
-
return
|
|
1961
|
+
return le(
|
|
1646
1962
|
() => e.modelValue,
|
|
1647
|
-
(
|
|
1648
|
-
|
|
1963
|
+
(B) => {
|
|
1964
|
+
y.value && B && se(X);
|
|
1649
1965
|
}
|
|
1650
|
-
),
|
|
1966
|
+
), le(
|
|
1651
1967
|
() => e.placement,
|
|
1652
1968
|
() => {
|
|
1653
|
-
|
|
1969
|
+
n.value && se(X);
|
|
1654
1970
|
}
|
|
1655
|
-
),
|
|
1656
|
-
|
|
1657
|
-
}),
|
|
1658
|
-
typeof window > "u" || (window.addEventListener("resize",
|
|
1659
|
-
}),
|
|
1660
|
-
|
|
1661
|
-
}), (
|
|
1662
|
-
|
|
1971
|
+
), le(n, (B) => {
|
|
1972
|
+
B && se(X);
|
|
1973
|
+
}), ge(() => {
|
|
1974
|
+
typeof window > "u" || (window.addEventListener("resize", X), window.addEventListener("scroll", X, !0), window.addEventListener("click", xe));
|
|
1975
|
+
}), me(() => {
|
|
1976
|
+
P(), !(typeof window > "u") && (window.removeEventListener("resize", X), window.removeEventListener("scroll", X, !0), window.removeEventListener("click", xe));
|
|
1977
|
+
}), (B, V) => (r(), a(I, null, [
|
|
1978
|
+
b("span", {
|
|
1663
1979
|
ref_key: "triggerRef",
|
|
1664
|
-
ref:
|
|
1980
|
+
ref: g,
|
|
1665
1981
|
class: "dk:relative dk:inline-flex dk:max-w-full",
|
|
1666
|
-
"aria-describedby":
|
|
1667
|
-
onMouseenter:
|
|
1668
|
-
onMouseleave:
|
|
1669
|
-
onFocusin:
|
|
1670
|
-
onFocusout:
|
|
1671
|
-
onClick:
|
|
1982
|
+
"aria-describedby": n.value ? x : void 0,
|
|
1983
|
+
onMouseenter: Se,
|
|
1984
|
+
onMouseleave: je,
|
|
1985
|
+
onFocusin: Ve,
|
|
1986
|
+
onFocusout: Be,
|
|
1987
|
+
onClick: Me
|
|
1672
1988
|
}, [
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1989
|
+
_(B.$slots, "trigger", {}, () => [
|
|
1990
|
+
_(B.$slots, "default", {}, () => [
|
|
1991
|
+
b("span", Vd, j(e.fallbackTriggerText), 1)
|
|
1676
1992
|
])
|
|
1677
1993
|
])
|
|
1678
|
-
], 40,
|
|
1679
|
-
(r(),
|
|
1994
|
+
], 40, jd),
|
|
1995
|
+
(r(), F(fe, {
|
|
1680
1996
|
to: e.teleportTo
|
|
1681
1997
|
}, [
|
|
1682
|
-
|
|
1998
|
+
de(he, {
|
|
1683
1999
|
"enter-active-class": "dk:transition-opacity dk:duration-150",
|
|
1684
2000
|
"leave-active-class": "dk:transition-opacity dk:duration-100",
|
|
1685
2001
|
"enter-from-class": "dk:opacity-0",
|
|
1686
2002
|
"leave-to-class": "dk:opacity-0"
|
|
1687
2003
|
}, {
|
|
1688
2004
|
default: E(() => [
|
|
1689
|
-
|
|
2005
|
+
n.value && !e.disabled ? (r(), a("div", {
|
|
1690
2006
|
key: 0,
|
|
1691
2007
|
ref_key: "tooltipRef",
|
|
1692
|
-
ref:
|
|
1693
|
-
id:
|
|
2008
|
+
ref: u,
|
|
2009
|
+
id: x,
|
|
1694
2010
|
role: "tooltip",
|
|
1695
|
-
class:
|
|
1696
|
-
style:
|
|
1697
|
-
onMouseenter:
|
|
1698
|
-
onMouseleave:
|
|
2011
|
+
class: s(v.value),
|
|
2012
|
+
style: ie($.value),
|
|
2013
|
+
onMouseenter: De,
|
|
2014
|
+
onMouseleave: Te
|
|
1699
2015
|
}, [
|
|
1700
|
-
|
|
1701
|
-
|
|
2016
|
+
_(B.$slots, "content", {}, () => [
|
|
2017
|
+
A(j(e.text), 1)
|
|
1702
2018
|
]),
|
|
1703
|
-
e.arrow ? (r(),
|
|
2019
|
+
e.arrow ? (r(), a("span", {
|
|
1704
2020
|
key: 0,
|
|
1705
2021
|
"aria-hidden": "true",
|
|
1706
|
-
class:
|
|
1707
|
-
}, null, 2)) :
|
|
1708
|
-
], 38)) :
|
|
2022
|
+
class: s(M.value)
|
|
2023
|
+
}, null, 2)) : S("", !0)
|
|
2024
|
+
], 38)) : S("", !0)
|
|
1709
2025
|
]),
|
|
1710
2026
|
_: 3
|
|
1711
2027
|
})
|
|
1712
2028
|
], 8, ["to"]))
|
|
1713
2029
|
], 64));
|
|
1714
2030
|
}
|
|
1715
|
-
}),
|
|
2031
|
+
}), Bd = ["open"], Md = ["onClick"], Dd = { class: "dui-acc-title" }, Td = { class: "dui-acc-panel" }, _d = /* @__PURE__ */ L({
|
|
2032
|
+
__name: "DuiAccordion",
|
|
2033
|
+
props: {
|
|
2034
|
+
items: {},
|
|
2035
|
+
modelValue: { default: void 0 },
|
|
2036
|
+
multiple: { type: Boolean, default: !1 },
|
|
2037
|
+
variant: { default: "bordered" },
|
|
2038
|
+
color: { default: "neutral" },
|
|
2039
|
+
size: { default: "md" },
|
|
2040
|
+
flush: { type: Boolean, default: !1 }
|
|
2041
|
+
},
|
|
2042
|
+
emits: ["update:modelValue", "change"],
|
|
2043
|
+
setup(d, { emit: t }) {
|
|
2044
|
+
const e = d, i = t, g = U([]);
|
|
2045
|
+
function u() {
|
|
2046
|
+
return e.modelValue === void 0 ? g.value : Array.isArray(e.modelValue) ? e.modelValue : e.modelValue ? [e.modelValue] : [];
|
|
2047
|
+
}
|
|
2048
|
+
function z(w) {
|
|
2049
|
+
return u().includes(w);
|
|
2050
|
+
}
|
|
2051
|
+
function y(w, f) {
|
|
2052
|
+
if (f) return;
|
|
2053
|
+
const v = u();
|
|
2054
|
+
let $;
|
|
2055
|
+
e.multiple ? $ = v.includes(w) ? v.filter((M) => M !== w) : [...v, w] : $ = v.includes(w) ? [] : [w], g.value = $, i("update:modelValue", e.multiple ? $ : $[0] ?? ""), i("change", w);
|
|
2056
|
+
}
|
|
2057
|
+
const n = {
|
|
2058
|
+
sm: {
|
|
2059
|
+
summary: "dk:px-3 dk:py-2.5 dk:text-sm dk:gap-2",
|
|
2060
|
+
content: "dk:px-3 dk:pt-0 dk:pb-3 dk:text-sm",
|
|
2061
|
+
icon: "dk:text-base",
|
|
2062
|
+
chevron: "dk:w-3.5 dk:h-3.5"
|
|
2063
|
+
},
|
|
2064
|
+
md: {
|
|
2065
|
+
summary: "dk:px-4 dk:py-3.5 dk:text-sm dk:gap-2.5",
|
|
2066
|
+
content: "dk:px-4 dk:pt-0 dk:pb-4 dk:text-sm",
|
|
2067
|
+
icon: "dk:text-lg",
|
|
2068
|
+
chevron: "dk:w-4 dk:h-4"
|
|
2069
|
+
},
|
|
2070
|
+
lg: {
|
|
2071
|
+
summary: "dk:px-5 dk:py-4 dk:text-base dk:gap-3",
|
|
2072
|
+
content: "dk:px-5 dk:pt-0 dk:pb-5 dk:text-base",
|
|
2073
|
+
icon: "dk:text-xl",
|
|
2074
|
+
chevron: "dk:w-5 dk:h-5"
|
|
2075
|
+
}
|
|
2076
|
+
}, c = {
|
|
2077
|
+
neutral: "dk:bg-zinc-50 dk:dark:bg-zinc-800/60",
|
|
2078
|
+
primary: "dk:bg-slate-50 dk:dark:bg-slate-800/60",
|
|
2079
|
+
secondary: "dk:bg-pink-50 dk:dark:bg-pink-900/30",
|
|
2080
|
+
success: "dk:bg-emerald-50 dk:dark:bg-emerald-900/30",
|
|
2081
|
+
warning: "dk:bg-amber-50 dk:dark:bg-amber-900/30",
|
|
2082
|
+
danger: "dk:bg-rose-50 dk:dark:bg-rose-900/30"
|
|
2083
|
+
}, m = {
|
|
2084
|
+
neutral: "dk:text-zinc-900 dk:dark:text-zinc-50",
|
|
2085
|
+
primary: "dk:text-slate-800 dk:dark:text-slate-100",
|
|
2086
|
+
secondary: "dk:text-pink-800 dk:dark:text-pink-100",
|
|
2087
|
+
success: "dk:text-emerald-800 dk:dark:text-emerald-100",
|
|
2088
|
+
warning: "dk:text-amber-800 dk:dark:text-amber-100",
|
|
2089
|
+
danger: "dk:text-rose-800 dk:dark:text-rose-100"
|
|
2090
|
+
}, h = {
|
|
2091
|
+
neutral: "dk:text-zinc-500 dk:dark:text-zinc-400",
|
|
2092
|
+
primary: "dk:text-slate-500 dk:dark:text-slate-400",
|
|
2093
|
+
secondary: "dk:text-pink-500 dk:dark:text-pink-400",
|
|
2094
|
+
success: "dk:text-emerald-500 dk:dark:text-emerald-400",
|
|
2095
|
+
warning: "dk:text-amber-500 dk:dark:text-amber-400",
|
|
2096
|
+
danger: "dk:text-rose-500 dk:dark:text-rose-400"
|
|
2097
|
+
}, C = 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"), D = 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");
|
|
2098
|
+
function x(w, f) {
|
|
2099
|
+
const v = n[e.size], $ = z(w), M = [
|
|
2100
|
+
"dk:flex dk:w-full dk:items-center dk:select-none dk:outline-none",
|
|
2101
|
+
"dk:transition-colors dk:duration-150",
|
|
2102
|
+
v.summary
|
|
2103
|
+
], P = $ ? [c[e.color], m[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"], J = "dk:focus-visible:ring-2 dk:focus-visible:ring-inset dk:focus-visible:ring-slate-400 dk:dark:focus-visible:ring-slate-500", Y = f ? "dk:opacity-40 dk:cursor-not-allowed dk:pointer-events-none" : "dk:cursor-pointer";
|
|
2104
|
+
return [...M, ...P, J, Y].join(" ");
|
|
2105
|
+
}
|
|
2106
|
+
function l(w) {
|
|
2107
|
+
const f = n[e.size];
|
|
2108
|
+
return [
|
|
2109
|
+
"dk:flex-shrink-0 dk:transition-transform dk:duration-250 dk:ease-in-out dk:ml-auto",
|
|
2110
|
+
z(w) ? "dk:rotate-180 " + h[e.color] : "dk:text-zinc-400 dk:dark:text-zinc-500",
|
|
2111
|
+
f.chevron
|
|
2112
|
+
].join(" ");
|
|
2113
|
+
}
|
|
2114
|
+
const k = o(() => ["dk:flex-shrink-0 dk:leading-none", n[e.size].icon].join(" ")), p = o(() => [
|
|
2115
|
+
n[e.size].content,
|
|
2116
|
+
"dk:text-zinc-600 dk:dark:text-zinc-400 dk:leading-relaxed"
|
|
2117
|
+
].join(" "));
|
|
2118
|
+
return (w, f) => (r(), a("div", {
|
|
2119
|
+
class: s(C.value)
|
|
2120
|
+
}, [
|
|
2121
|
+
(r(!0), a(I, null, N(d.items, (v, $) => (r(), a("details", {
|
|
2122
|
+
key: v.value ?? $,
|
|
2123
|
+
open: z(v.value ?? String($)),
|
|
2124
|
+
class: s(D.value),
|
|
2125
|
+
onToggle: f[0] || (f[0] = te(() => {
|
|
2126
|
+
}, ["prevent"]))
|
|
2127
|
+
}, [
|
|
2128
|
+
b("summary", {
|
|
2129
|
+
class: s(x(v.value ?? String($), v.disabled)),
|
|
2130
|
+
onClick: te((M) => y(v.value ?? String($), v.disabled), ["prevent"])
|
|
2131
|
+
}, [
|
|
2132
|
+
v.icon ? (r(), a("span", {
|
|
2133
|
+
key: 0,
|
|
2134
|
+
"aria-hidden": "true",
|
|
2135
|
+
class: s(k.value)
|
|
2136
|
+
}, j(v.icon), 3)) : S("", !0),
|
|
2137
|
+
b("span", Dd, j(v.title), 1),
|
|
2138
|
+
(r(), a("svg", {
|
|
2139
|
+
class: s(l(v.value ?? String($))),
|
|
2140
|
+
viewBox: "0 0 16 16",
|
|
2141
|
+
fill: "none",
|
|
2142
|
+
stroke: "currentColor",
|
|
2143
|
+
"stroke-width": "2",
|
|
2144
|
+
"stroke-linecap": "round",
|
|
2145
|
+
"stroke-linejoin": "round",
|
|
2146
|
+
"aria-hidden": "true"
|
|
2147
|
+
}, [...f[1] || (f[1] = [
|
|
2148
|
+
b("polyline", { points: "4 6 8 10 12 6" }, null, -1)
|
|
2149
|
+
])], 2))
|
|
2150
|
+
], 10, Md),
|
|
2151
|
+
b("div", Td, [
|
|
2152
|
+
b("div", {
|
|
2153
|
+
class: s(p.value)
|
|
2154
|
+
}, [
|
|
2155
|
+
_(w.$slots, v.value ?? String($), {}, () => [
|
|
2156
|
+
b("p", null, j(v.content), 1)
|
|
2157
|
+
], !0)
|
|
2158
|
+
], 2)
|
|
2159
|
+
])
|
|
2160
|
+
], 42, Bd))), 128))
|
|
2161
|
+
], 2));
|
|
2162
|
+
}
|
|
2163
|
+
}), Pt = /* @__PURE__ */ ke(_d, [["__scopeId", "data-v-9bd77ff3"]]), Pd = ["aria-label"], Lt = /* @__PURE__ */ L({
|
|
2164
|
+
inheritAttrs: !1,
|
|
2165
|
+
__name: "DuiBadge",
|
|
2166
|
+
props: {
|
|
2167
|
+
label: { default: void 0 },
|
|
2168
|
+
color: { default: "neutral" },
|
|
2169
|
+
variant: { default: "soft" },
|
|
2170
|
+
size: { default: "sm" },
|
|
2171
|
+
rounded: { default: "full" },
|
|
2172
|
+
dot: { type: Boolean, default: !1 },
|
|
2173
|
+
dismissible: { type: Boolean, default: !1 },
|
|
2174
|
+
href: { default: void 0 }
|
|
2175
|
+
},
|
|
2176
|
+
emits: ["dismiss"],
|
|
2177
|
+
setup(d, { emit: t }) {
|
|
2178
|
+
const e = d, i = t, g = {
|
|
2179
|
+
xs: "dk:text-[10px] dk:leading-none dk:px-1.5 dk:py-0.5 dk:gap-1",
|
|
2180
|
+
sm: "dk:text-xs dk:leading-none dk:px-2 dk:py-1 dk:gap-1",
|
|
2181
|
+
md: "dk:text-sm dk:px-2.5 dk:py-1 dk:gap-1.5",
|
|
2182
|
+
lg: "dk:text-base dk:px-3 dk:py-1.5 dk:gap-2"
|
|
2183
|
+
}, u = {
|
|
2184
|
+
full: "dk:rounded-full",
|
|
2185
|
+
md: "dk:rounded-md",
|
|
2186
|
+
none: "dk:rounded-none"
|
|
2187
|
+
}, z = {
|
|
2188
|
+
soft: {
|
|
2189
|
+
neutral: "dk:bg-zinc-100 dk:text-zinc-700 dk:dark:bg-zinc-800 dk:dark:text-zinc-300",
|
|
2190
|
+
primary: "dk:bg-slate-100 dk:text-slate-700 dk:dark:bg-slate-800 dk:dark:text-slate-300",
|
|
2191
|
+
secondary: "dk:bg-pink-100 dk:text-pink-700 dk:dark:bg-pink-900/50 dk:dark:text-pink-300",
|
|
2192
|
+
success: "dk:bg-emerald-100 dk:text-emerald-700 dk:dark:bg-emerald-900/50 dk:dark:text-emerald-300",
|
|
2193
|
+
warning: "dk:bg-amber-100 dk:text-amber-700 dk:dark:bg-amber-900/50 dk:dark:text-amber-300",
|
|
2194
|
+
danger: "dk:bg-rose-100 dk:text-rose-700 dk:dark:bg-rose-900/50 dk:dark:text-rose-300"
|
|
2195
|
+
},
|
|
2196
|
+
solid: {
|
|
2197
|
+
neutral: "dk:bg-zinc-600 dk:text-white dk:dark:bg-zinc-500",
|
|
2198
|
+
primary: "dk:bg-slate-600 dk:text-white dk:dark:bg-slate-500",
|
|
2199
|
+
secondary: "dk:bg-pink-600 dk:text-white dk:dark:bg-pink-500",
|
|
2200
|
+
success: "dk:bg-emerald-600 dk:text-white dk:dark:bg-emerald-500",
|
|
2201
|
+
warning: "dk:bg-amber-500 dk:text-white dk:dark:bg-amber-400",
|
|
2202
|
+
danger: "dk:bg-rose-600 dk:text-white dk:dark:bg-rose-500"
|
|
2203
|
+
},
|
|
2204
|
+
outline: {
|
|
2205
|
+
neutral: "dk:border dk:border-zinc-400 dk:text-zinc-700 dk:dark:border-zinc-500 dk:dark:text-zinc-300",
|
|
2206
|
+
primary: "dk:border dk:border-slate-400 dk:text-slate-700 dk:dark:border-slate-500 dk:dark:text-slate-300",
|
|
2207
|
+
secondary: "dk:border dk:border-pink-400 dk:text-pink-700 dk:dark:border-pink-500 dk:dark:text-pink-300",
|
|
2208
|
+
success: "dk:border dk:border-emerald-400 dk:text-emerald-700 dk:dark:border-emerald-500 dk:dark:text-emerald-300",
|
|
2209
|
+
warning: "dk:border dk:border-amber-400 dk:text-amber-700 dk:dark:border-amber-500 dk:dark:text-amber-300",
|
|
2210
|
+
danger: "dk:border dk:border-rose-400 dk:text-rose-700 dk:dark:border-rose-500 dk:dark:text-rose-300"
|
|
2211
|
+
}
|
|
2212
|
+
}, y = {
|
|
2213
|
+
neutral: "dk:bg-zinc-500 dk:dark:bg-zinc-400",
|
|
2214
|
+
primary: "dk:bg-slate-500 dk:dark:bg-slate-400",
|
|
2215
|
+
secondary: "dk:bg-pink-500 dk:dark:bg-pink-400",
|
|
2216
|
+
success: "dk:bg-emerald-500 dk:dark:bg-emerald-400",
|
|
2217
|
+
warning: "dk:bg-amber-500 dk:dark:bg-amber-400",
|
|
2218
|
+
danger: "dk:bg-rose-500 dk:dark:bg-rose-400"
|
|
2219
|
+
}, n = o(() => {
|
|
2220
|
+
const C = "dk:inline-flex dk:items-center dk:font-medium dk:whitespace-nowrap dk:select-none", D = g[e.size], x = u[e.rounded], l = z[e.variant][e.color], k = e.href ? "dk:cursor-pointer dk:hover:opacity-80 dk:transition-opacity" : "";
|
|
2221
|
+
return [C, D, x, l, k].join(" ");
|
|
2222
|
+
}), c = 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], y[e.color]].join(" ")), m = o(() => "dk:flex-shrink-0 dk:flex dk:items-center"), h = o(() => [
|
|
2223
|
+
"dk:-mr-0.5 dk:flex-shrink-0 dk:inline-flex dk:items-center dk:justify-center",
|
|
2224
|
+
"dk:rounded-full dk:w-3.5 dk:h-3.5 dk:text-sm dk:leading-none",
|
|
2225
|
+
"dk:opacity-60 dk:hover:opacity-100 dk:transition-opacity dk:outline-none",
|
|
2226
|
+
"dk:hover:bg-black/10 dk:dark:hover:bg-white/10"
|
|
2227
|
+
].join(" "));
|
|
2228
|
+
return (C, D) => (r(), F(Q(d.href ? "a" : "span"), W({
|
|
2229
|
+
href: d.href,
|
|
2230
|
+
class: n.value
|
|
2231
|
+
}, C.$attrs), {
|
|
2232
|
+
default: E(() => [
|
|
2233
|
+
C.$slots.icon || d.dot ? (r(), a("span", {
|
|
2234
|
+
key: 0,
|
|
2235
|
+
"aria-hidden": "true",
|
|
2236
|
+
class: s(m.value)
|
|
2237
|
+
}, [
|
|
2238
|
+
d.dot ? (r(), a("span", {
|
|
2239
|
+
key: 0,
|
|
2240
|
+
class: s(c.value)
|
|
2241
|
+
}, null, 2)) : _(C.$slots, "icon", { key: 1 })
|
|
2242
|
+
], 2)) : S("", !0),
|
|
2243
|
+
_(C.$slots, "default", {}, () => [
|
|
2244
|
+
A(j(d.label), 1)
|
|
2245
|
+
]),
|
|
2246
|
+
d.dismissible ? (r(), a("button", {
|
|
2247
|
+
key: 1,
|
|
2248
|
+
type: "button",
|
|
2249
|
+
class: s(h.value),
|
|
2250
|
+
"aria-label": d.label ? `Quitar ${d.label}` : "Quitar",
|
|
2251
|
+
onClick: D[0] || (D[0] = te((x) => i("dismiss"), ["prevent"]))
|
|
2252
|
+
}, " × ", 10, Pd)) : S("", !0)
|
|
2253
|
+
]),
|
|
2254
|
+
_: 3
|
|
2255
|
+
}, 16, ["href", "class"]));
|
|
2256
|
+
}
|
|
2257
|
+
}), Ld = ["onKeydown"], Ad = ["aria-label"], At = /* @__PURE__ */ L({
|
|
2258
|
+
__name: "DuiDropdown",
|
|
2259
|
+
props: {
|
|
2260
|
+
modelValue: { type: Boolean, default: void 0 },
|
|
2261
|
+
placement: { default: "bottom-start" },
|
|
2262
|
+
variant: { default: "solid" },
|
|
2263
|
+
color: { default: "neutral" },
|
|
2264
|
+
size: { default: "md" },
|
|
2265
|
+
rounded: { default: "all" },
|
|
2266
|
+
minWidth: { default: "10rem" },
|
|
2267
|
+
ariaLabel: { default: "Menu" },
|
|
2268
|
+
disabled: { type: Boolean, default: !1 }
|
|
2269
|
+
},
|
|
2270
|
+
emits: ["update:modelValue", "open", "close"],
|
|
2271
|
+
setup(d, { emit: t }) {
|
|
2272
|
+
const e = d, i = t, g = U(null), u = U(!1), z = o(() => e.modelValue !== void 0 ? e.modelValue : u.value);
|
|
2273
|
+
function y() {
|
|
2274
|
+
if (e.disabled) return;
|
|
2275
|
+
const l = !z.value;
|
|
2276
|
+
u.value = l, i("update:modelValue", l), i(l ? "open" : "close");
|
|
2277
|
+
}
|
|
2278
|
+
function n() {
|
|
2279
|
+
u.value = !1, i("update:modelValue", !1), i("close");
|
|
2280
|
+
}
|
|
2281
|
+
function c(l) {
|
|
2282
|
+
g.value && !g.value.contains(l.target) && n();
|
|
2283
|
+
}
|
|
2284
|
+
ge(() => document.addEventListener("mousedown", c)), me(() => document.removeEventListener("mousedown", c));
|
|
2285
|
+
const m = {
|
|
2286
|
+
"bottom-start": "dk:top-full dk:left-0 dk:mt-1 dk:origin-top-left",
|
|
2287
|
+
"bottom-end": "dk:top-full dk:right-0 dk:mt-1 dk:origin-top-right",
|
|
2288
|
+
bottom: "dk:top-full dk:left-1/2 dk:-translate-x-1/2 dk:mt-1 dk:origin-top",
|
|
2289
|
+
"top-start": "dk:bottom-full dk:left-0 dk:mb-1 dk:origin-bottom-left",
|
|
2290
|
+
"top-end": "dk:bottom-full dk:right-0 dk:mb-1 dk:origin-bottom-right",
|
|
2291
|
+
top: "dk:bottom-full dk:left-1/2 dk:-translate-x-1/2 dk:mb-1 dk:origin-bottom"
|
|
2292
|
+
}, h = {
|
|
2293
|
+
all: "dk:rounded-xl",
|
|
2294
|
+
sm: "dk:rounded-lg",
|
|
2295
|
+
none: "dk:rounded-none"
|
|
2296
|
+
}, C = {
|
|
2297
|
+
solid: {
|
|
2298
|
+
neutral: "dk:bg-white dk:dark:bg-zinc-900 dk:border dk:border-zinc-200 dk:dark:border-zinc-700 dk:text-zinc-800 dk:dark:text-zinc-200",
|
|
2299
|
+
primary: "dk:bg-slate-50 dk:dark:bg-slate-900 dk:border dk:border-slate-200 dk:dark:border-slate-700 dk:text-slate-800 dk:dark:text-slate-200",
|
|
2300
|
+
secondary: "dk:bg-pink-50 dk:dark:bg-pink-900 dk:border dk:border-pink-200 dk:dark:border-pink-700 dk:text-pink-800 dk:dark:text-pink-200",
|
|
2301
|
+
success: "dk:bg-emerald-50 dk:dark:bg-emerald-900 dk:border dk:border-emerald-200 dk:dark:border-emerald-700 dk:text-emerald-800 dk:dark:text-emerald-200",
|
|
2302
|
+
warning: "dk:bg-amber-50 dk:dark:bg-amber-900 dk:border dk:border-amber-200 dk:dark:border-amber-700 dk:text-amber-800 dk:dark:text-amber-200",
|
|
2303
|
+
danger: "dk:bg-rose-50 dk:dark:bg-rose-900 dk:border dk:border-rose-200 dk:dark:border-rose-700 dk:text-rose-800 dk:dark:text-rose-200"
|
|
2304
|
+
},
|
|
2305
|
+
outline: {
|
|
2306
|
+
neutral: "dk:bg-white/95 dk:dark:bg-zinc-900/95 dk:border-2 dk:border-zinc-300 dk:dark:border-zinc-600 dk:text-zinc-800 dk:dark:text-zinc-200",
|
|
2307
|
+
primary: "dk:bg-white/95 dk:dark:bg-zinc-900/95 dk:border-2 dk:border-slate-400 dk:dark:border-slate-500 dk:text-slate-800 dk:dark:text-slate-200",
|
|
2308
|
+
secondary: "dk:bg-white/95 dk:dark:bg-zinc-900/95 dk:border-2 dk:border-pink-400 dk:dark:border-pink-500 dk:text-pink-800 dk:dark:text-pink-200",
|
|
2309
|
+
success: "dk:bg-white/95 dk:dark:bg-zinc-900/95 dk:border-2 dk:border-emerald-400 dk:dark:border-emerald-500 dk:text-emerald-800 dk:dark:text-emerald-200",
|
|
2310
|
+
warning: "dk:bg-white/95 dk:dark:bg-zinc-900/95 dk:border-2 dk:border-amber-400 dk:dark:border-amber-500 dk:text-amber-800 dk:dark:text-amber-200",
|
|
2311
|
+
danger: "dk:bg-white/95 dk:dark:bg-zinc-900/95 dk:border-2 dk:border-rose-400 dk:dark:border-rose-500 dk:text-rose-800 dk:dark:text-rose-200"
|
|
2312
|
+
},
|
|
2313
|
+
ghost: {
|
|
2314
|
+
neutral: "dk:bg-white/85 dk:dark:bg-zinc-900/75 dk:backdrop-blur-md dk:border dk:border-zinc-300/70 dk:dark:border-zinc-600/60 dk:text-zinc-800 dk:dark:text-zinc-200",
|
|
2315
|
+
primary: "dk:bg-slate-100/85 dk:dark:bg-slate-900/70 dk:backdrop-blur-md dk:border dk:border-slate-300/70 dk:dark:border-slate-600/60 dk:text-slate-800 dk:dark:text-slate-200",
|
|
2316
|
+
secondary: "dk:bg-pink-100/85 dk:dark:bg-pink-900/70 dk:backdrop-blur-md dk:border dk:border-pink-300/70 dk:dark:border-pink-600/60 dk:text-pink-800 dk:dark:text-pink-200",
|
|
2317
|
+
success: "dk:bg-emerald-100/85 dk:dark:bg-emerald-900/70 dk:backdrop-blur-md dk:border dk:border-emerald-300/70 dk:dark:border-emerald-600/60 dk:text-emerald-800 dk:dark:text-emerald-200",
|
|
2318
|
+
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",
|
|
2319
|
+
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"
|
|
2320
|
+
}
|
|
2321
|
+
}, D = o(() => ({ minWidth: e.minWidth })), x = o(() => [
|
|
2322
|
+
"dk:absolute dk:z-50 dk:shadow-lg dk:py-1",
|
|
2323
|
+
m[e.placement],
|
|
2324
|
+
h[e.rounded],
|
|
2325
|
+
C[e.variant][e.color]
|
|
2326
|
+
].join(" "));
|
|
2327
|
+
return (l, k) => (r(), a("div", {
|
|
2328
|
+
ref_key: "wrapperRef",
|
|
2329
|
+
ref: g,
|
|
2330
|
+
class: "dk:relative dk:inline-block"
|
|
2331
|
+
}, [
|
|
2332
|
+
b("div", {
|
|
2333
|
+
onClick: y,
|
|
2334
|
+
onKeydown: [
|
|
2335
|
+
ve(te(y, ["prevent"]), ["enter"]),
|
|
2336
|
+
ve(te(y, ["prevent"]), ["space"])
|
|
2337
|
+
]
|
|
2338
|
+
}, [
|
|
2339
|
+
_(l.$slots, "trigger")
|
|
2340
|
+
], 40, Ld),
|
|
2341
|
+
de(he, {
|
|
2342
|
+
"enter-active-class": "dk:transition-all dk:duration-150 dk:ease-out",
|
|
2343
|
+
"leave-active-class": "dk:transition-all dk:duration-100 dk:ease-in",
|
|
2344
|
+
"enter-from-class": "dk:opacity-0 dk:scale-95",
|
|
2345
|
+
"leave-to-class": "dk:opacity-0 dk:scale-95"
|
|
2346
|
+
}, {
|
|
2347
|
+
default: E(() => [
|
|
2348
|
+
z.value ? (r(), a("div", {
|
|
2349
|
+
key: 0,
|
|
2350
|
+
class: s(x.value),
|
|
2351
|
+
style: ie(D.value),
|
|
2352
|
+
role: "menu",
|
|
2353
|
+
"aria-label": d.ariaLabel
|
|
2354
|
+
}, [
|
|
2355
|
+
_(l.$slots, "default")
|
|
2356
|
+
], 14, Ad)) : S("", !0)
|
|
2357
|
+
]),
|
|
2358
|
+
_: 3
|
|
2359
|
+
})
|
|
2360
|
+
], 512));
|
|
2361
|
+
}
|
|
2362
|
+
}), Id = { class: "dk:flex-1 dk:truncate" }, Wd = {
|
|
2363
|
+
key: 1,
|
|
2364
|
+
class: "dk:ml-auto dk:opacity-60 dk:text-xs"
|
|
2365
|
+
}, It = /* @__PURE__ */ L({
|
|
2366
|
+
__name: "DuiDropdownItem",
|
|
2367
|
+
props: {
|
|
2368
|
+
label: { default: void 0 },
|
|
2369
|
+
icon: { default: void 0 },
|
|
2370
|
+
href: { default: void 0 },
|
|
2371
|
+
target: { default: void 0 },
|
|
2372
|
+
disabled: { type: Boolean, default: !1 },
|
|
2373
|
+
danger: { type: Boolean, default: !1 },
|
|
2374
|
+
size: { default: "md" }
|
|
2375
|
+
},
|
|
2376
|
+
emits: ["click"],
|
|
2377
|
+
setup(d, { emit: t }) {
|
|
2378
|
+
const e = d, i = t, g = o(() => e.href ? { href: e.href, target: e.target } : { type: "button", disabled: e.disabled }), u = {
|
|
2379
|
+
sm: "dk:px-3 dk:py-1 dk:text-xs",
|
|
2380
|
+
md: "dk:px-3 dk:py-2 dk:text-sm",
|
|
2381
|
+
lg: "dk:px-4 dk:py-2.5 dk:text-base"
|
|
2382
|
+
}, z = o(() => {
|
|
2383
|
+
const c = "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", m = u[e.size], h = 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", C = e.disabled ? "dk:opacity-50 dk:cursor-not-allowed dk:pointer-events-none" : "dk:cursor-pointer";
|
|
2384
|
+
return [c, m, h, C].join(" ");
|
|
2385
|
+
}), y = o(() => "dk:flex-shrink-0 dk:w-4 dk:h-4 dk:flex dk:items-center dk:justify-center dk:opacity-70");
|
|
2386
|
+
function n(c) {
|
|
2387
|
+
e.disabled || i("click", c);
|
|
2388
|
+
}
|
|
2389
|
+
return (c, m) => (r(), F(Q(d.href ? "a" : "button"), W(g.value, {
|
|
2390
|
+
class: z.value,
|
|
2391
|
+
role: "menuitem",
|
|
2392
|
+
"aria-disabled": d.disabled,
|
|
2393
|
+
onClick: n
|
|
2394
|
+
}), {
|
|
2395
|
+
default: E(() => [
|
|
2396
|
+
c.$slots.icon || d.icon ? (r(), a("span", {
|
|
2397
|
+
key: 0,
|
|
2398
|
+
class: s(y.value),
|
|
2399
|
+
"aria-hidden": "true"
|
|
2400
|
+
}, [
|
|
2401
|
+
_(c.$slots, "icon", {}, () => [
|
|
2402
|
+
A(j(d.icon), 1)
|
|
2403
|
+
])
|
|
2404
|
+
], 2)) : S("", !0),
|
|
2405
|
+
b("span", Id, [
|
|
2406
|
+
_(c.$slots, "default", {}, () => [
|
|
2407
|
+
A(j(d.label), 1)
|
|
2408
|
+
])
|
|
2409
|
+
]),
|
|
2410
|
+
c.$slots.trailing ? (r(), a("span", Wd, [
|
|
2411
|
+
_(c.$slots, "trailing")
|
|
2412
|
+
])) : S("", !0)
|
|
2413
|
+
]),
|
|
2414
|
+
_: 3
|
|
2415
|
+
}, 16, ["class", "aria-disabled"]));
|
|
2416
|
+
}
|
|
2417
|
+
}), Ed = {}, Od = {
|
|
2418
|
+
class: "dk:my-1 dk:border-current/10",
|
|
2419
|
+
role: "separator",
|
|
2420
|
+
"aria-orientation": "horizontal"
|
|
2421
|
+
};
|
|
2422
|
+
function Nd(d, t) {
|
|
2423
|
+
return r(), a("hr", Od);
|
|
2424
|
+
}
|
|
2425
|
+
const Wt = /* @__PURE__ */ ke(Ed, [["render", Nd]]), Fd = ["aria-label"], Kd = ["disabled", "aria-label"], qd = {
|
|
2426
|
+
key: 0,
|
|
2427
|
+
class: "dk:hidden dk:sm:inline"
|
|
2428
|
+
}, Hd = ["aria-label", "aria-current", "onClick"], Ud = ["disabled", "aria-label"], Qd = {
|
|
2429
|
+
key: 0,
|
|
2430
|
+
class: "dk:hidden dk:sm:inline"
|
|
2431
|
+
}, Et = /* @__PURE__ */ L({
|
|
2432
|
+
__name: "DuiPagination",
|
|
2433
|
+
props: {
|
|
2434
|
+
modelValue: {},
|
|
2435
|
+
total: {},
|
|
2436
|
+
perPage: { default: 10 },
|
|
2437
|
+
siblingCount: { default: 1 },
|
|
2438
|
+
showBoundary: { type: Boolean, default: !0 },
|
|
2439
|
+
color: { default: "primary" },
|
|
2440
|
+
variant: { default: "solid" },
|
|
2441
|
+
size: { default: "md" },
|
|
2442
|
+
rounded: { default: "md" },
|
|
2443
|
+
showLabels: { type: Boolean, default: !1 },
|
|
2444
|
+
prevLabel: { default: "Anterior" },
|
|
2445
|
+
nextLabel: { default: "Siguiente" },
|
|
2446
|
+
ariaLabel: { default: "Paginacion" }
|
|
2447
|
+
},
|
|
2448
|
+
emits: ["update:modelValue", "change"],
|
|
2449
|
+
setup(d, { emit: t }) {
|
|
2450
|
+
const e = d, i = t, g = o(() => Math.max(1, Math.ceil(e.total / e.perPage)));
|
|
2451
|
+
function u(l) {
|
|
2452
|
+
l < 1 || l > g.value || l === e.modelValue || (i("update:modelValue", l), i("change", l));
|
|
2453
|
+
}
|
|
2454
|
+
const z = o(() => {
|
|
2455
|
+
const l = g.value, k = e.modelValue, p = e.siblingCount, w = e.showBoundary ? 1 : 0;
|
|
2456
|
+
if (l <= 2 * p + 2 * w + 3)
|
|
2457
|
+
return Array.from({ length: l }, (M, P) => P + 1);
|
|
2458
|
+
const f = [];
|
|
2459
|
+
for (let M = 1; M <= w; M++) f.push(M);
|
|
2460
|
+
const v = Math.max(w + 1, k - p), $ = Math.min(l - w, k + p);
|
|
2461
|
+
v > w + 1 && f.push("...");
|
|
2462
|
+
for (let M = v; M <= $; M++) f.push(M);
|
|
2463
|
+
$ < l - w && f.push("...");
|
|
2464
|
+
for (let M = l - w + 1; M <= l; M++) f.push(M);
|
|
2465
|
+
return f;
|
|
2466
|
+
}), y = {
|
|
2467
|
+
sm: "dk:w-7 dk:h-7 dk:text-xs",
|
|
2468
|
+
md: "dk:w-9 dk:h-9 dk:text-sm",
|
|
2469
|
+
lg: "dk:w-11 dk:h-11 dk:text-base"
|
|
2470
|
+
}, n = {
|
|
2471
|
+
full: "dk:rounded-full",
|
|
2472
|
+
md: "dk:rounded-lg",
|
|
2473
|
+
none: "dk:rounded-none"
|
|
2474
|
+
}, c = {
|
|
2475
|
+
solid: {
|
|
2476
|
+
neutral: "dk:bg-zinc-700 dk:text-white dk:dark:bg-zinc-500",
|
|
2477
|
+
primary: "dk:bg-slate-600 dk:text-white dk:dark:bg-slate-500",
|
|
2478
|
+
secondary: "dk:bg-pink-600 dk:text-white dk:dark:bg-pink-500",
|
|
2479
|
+
success: "dk:bg-emerald-600 dk:text-white dk:dark:bg-emerald-500",
|
|
2480
|
+
warning: "dk:bg-amber-500 dk:text-white dk:dark:bg-amber-400",
|
|
2481
|
+
danger: "dk:bg-rose-600 dk:text-white dk:dark:bg-rose-500"
|
|
2482
|
+
},
|
|
2483
|
+
outline: {
|
|
2484
|
+
neutral: "dk:border-2 dk:border-zinc-600 dk:text-zinc-700 dk:dark:border-zinc-400 dk:dark:text-zinc-200",
|
|
2485
|
+
primary: "dk:border-2 dk:border-slate-600 dk:text-slate-700 dk:dark:border-slate-400 dk:dark:text-slate-200",
|
|
2486
|
+
secondary: "dk:border-2 dk:border-pink-600 dk:text-pink-700 dk:dark:border-pink-400 dk:dark:text-pink-200",
|
|
2487
|
+
success: "dk:border-2 dk:border-emerald-600 dk:text-emerald-700 dk:dark:border-emerald-400 dk:dark:text-emerald-200",
|
|
2488
|
+
warning: "dk:border-2 dk:border-amber-500 dk:text-amber-700 dk:dark:border-amber-400 dk:dark:text-amber-200",
|
|
2489
|
+
danger: "dk:border-2 dk:border-rose-600 dk:text-rose-700 dk:dark:border-rose-400 dk:dark:text-rose-200"
|
|
2490
|
+
},
|
|
2491
|
+
ghost: {
|
|
2492
|
+
neutral: "dk:bg-zinc-100 dk:text-zinc-800 dk:dark:bg-zinc-700 dk:dark:text-zinc-100",
|
|
2493
|
+
primary: "dk:bg-slate-100 dk:text-slate-800 dk:dark:bg-slate-700 dk:dark:text-slate-100",
|
|
2494
|
+
secondary: "dk:bg-pink-100 dk:text-pink-800 dk:dark:bg-pink-800 dk:dark:text-pink-100",
|
|
2495
|
+
success: "dk:bg-emerald-100 dk:text-emerald-800 dk:dark:bg-emerald-800 dk:dark:text-emerald-100",
|
|
2496
|
+
warning: "dk:bg-amber-100 dk:text-amber-800 dk:dark:bg-amber-700 dk:dark:text-amber-100",
|
|
2497
|
+
danger: "dk:bg-rose-100 dk:text-rose-800 dk:dark:bg-rose-800 dk:dark:text-rose-100"
|
|
2498
|
+
}
|
|
2499
|
+
}, m = o(() => "dk:flex dk:items-center dk:gap-1 dk:flex-wrap"), h = o(() => {
|
|
2500
|
+
const l = y[e.size], k = n[e.rounded];
|
|
2501
|
+
return [
|
|
2502
|
+
"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",
|
|
2503
|
+
l,
|
|
2504
|
+
k,
|
|
2505
|
+
"dk:focus-visible:ring-2 dk:focus-visible:ring-offset-1 dk:focus-visible:ring-slate-400"
|
|
2506
|
+
].join(" ");
|
|
2507
|
+
}), C = o(() => [
|
|
2508
|
+
h.value,
|
|
2509
|
+
"dk:text-zinc-600 dk:dark:text-zinc-400",
|
|
2510
|
+
"dk:hover:bg-zinc-100 dk:dark:hover:bg-zinc-700",
|
|
2511
|
+
"dk:hover:text-zinc-900 dk:dark:hover:text-zinc-100"
|
|
2512
|
+
].join(" "));
|
|
2513
|
+
function D(l) {
|
|
2514
|
+
return l === e.modelValue ? [h.value, c[e.variant][e.color]].join(" ") : [
|
|
2515
|
+
h.value,
|
|
2516
|
+
"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"
|
|
2517
|
+
].join(" ");
|
|
2518
|
+
}
|
|
2519
|
+
const x = o(() => ["dk:inline-flex dk:items-center dk:justify-center dk:text-zinc-400 dk:select-none", y[e.size]].join(" "));
|
|
2520
|
+
return (l, k) => (r(), a("nav", {
|
|
2521
|
+
"aria-label": d.ariaLabel,
|
|
2522
|
+
class: s(m.value)
|
|
2523
|
+
}, [
|
|
2524
|
+
b("button", {
|
|
2525
|
+
type: "button",
|
|
2526
|
+
disabled: d.modelValue <= 1,
|
|
2527
|
+
"aria-label": d.prevLabel,
|
|
2528
|
+
class: s([C.value, d.modelValue <= 1 ? "dk:opacity-40 dk:cursor-not-allowed" : ""]),
|
|
2529
|
+
onClick: k[0] || (k[0] = (p) => u(d.modelValue - 1))
|
|
2530
|
+
}, [
|
|
2531
|
+
k[2] || (k[2] = b("svg", {
|
|
2532
|
+
class: "dk:w-4 dk:h-4",
|
|
2533
|
+
viewBox: "0 0 16 16",
|
|
2534
|
+
fill: "none",
|
|
2535
|
+
stroke: "currentColor",
|
|
2536
|
+
"stroke-width": "2",
|
|
2537
|
+
"stroke-linecap": "round",
|
|
2538
|
+
"stroke-linejoin": "round",
|
|
2539
|
+
"aria-hidden": "true"
|
|
2540
|
+
}, [
|
|
2541
|
+
b("polyline", { points: "10 4 6 8 10 12" })
|
|
2542
|
+
], -1)),
|
|
2543
|
+
d.showLabels ? (r(), a("span", qd, j(d.prevLabel), 1)) : S("", !0)
|
|
2544
|
+
], 10, Kd),
|
|
2545
|
+
(r(!0), a(I, null, N(z.value, (p) => (r(), a(I, { key: p }, [
|
|
2546
|
+
p === "..." ? (r(), a("span", {
|
|
2547
|
+
key: 0,
|
|
2548
|
+
class: s(x.value),
|
|
2549
|
+
"aria-hidden": "true"
|
|
2550
|
+
}, "…", 2)) : (r(), a("button", {
|
|
2551
|
+
key: 1,
|
|
2552
|
+
type: "button",
|
|
2553
|
+
"aria-label": `Pagina ${p}`,
|
|
2554
|
+
"aria-current": d.modelValue === p ? "page" : void 0,
|
|
2555
|
+
class: s(D(p)),
|
|
2556
|
+
onClick: (w) => u(p)
|
|
2557
|
+
}, j(p), 11, Hd))
|
|
2558
|
+
], 64))), 128)),
|
|
2559
|
+
b("button", {
|
|
2560
|
+
type: "button",
|
|
2561
|
+
disabled: d.modelValue >= g.value,
|
|
2562
|
+
"aria-label": d.nextLabel,
|
|
2563
|
+
class: s([C.value, d.modelValue >= g.value ? "dk:opacity-40 dk:cursor-not-allowed" : ""]),
|
|
2564
|
+
onClick: k[1] || (k[1] = (p) => u(d.modelValue + 1))
|
|
2565
|
+
}, [
|
|
2566
|
+
d.showLabels ? (r(), a("span", Qd, j(d.nextLabel), 1)) : S("", !0),
|
|
2567
|
+
k[3] || (k[3] = b("svg", {
|
|
2568
|
+
class: "dk:w-4 dk:h-4",
|
|
2569
|
+
viewBox: "0 0 16 16",
|
|
2570
|
+
fill: "none",
|
|
2571
|
+
stroke: "currentColor",
|
|
2572
|
+
"stroke-width": "2",
|
|
2573
|
+
"stroke-linecap": "round",
|
|
2574
|
+
"stroke-linejoin": "round",
|
|
2575
|
+
"aria-hidden": "true"
|
|
2576
|
+
}, [
|
|
2577
|
+
b("polyline", { points: "6 4 10 8 6 12" })
|
|
2578
|
+
], -1))
|
|
2579
|
+
], 10, Ud)
|
|
2580
|
+
], 10, Fd));
|
|
2581
|
+
}
|
|
2582
|
+
}), Gd = /* @__PURE__ */ L({
|
|
2583
|
+
__name: "DuiSkeleton",
|
|
2584
|
+
props: {
|
|
2585
|
+
variant: { default: "text" },
|
|
2586
|
+
width: { default: void 0 },
|
|
2587
|
+
height: { default: void 0 },
|
|
2588
|
+
animation: { default: "pulse" }
|
|
2589
|
+
},
|
|
2590
|
+
setup(d) {
|
|
2591
|
+
const t = d;
|
|
2592
|
+
function e(y) {
|
|
2593
|
+
if (y !== void 0)
|
|
2594
|
+
return typeof y == "number" ? `${y}px` : y;
|
|
2595
|
+
}
|
|
2596
|
+
const i = o(() => ({
|
|
2597
|
+
width: e(t.width),
|
|
2598
|
+
height: e(t.height)
|
|
2599
|
+
})), g = {
|
|
2600
|
+
pulse: "dui-skeleton-pulse",
|
|
2601
|
+
wave: "dui-skeleton-wave",
|
|
2602
|
+
none: ""
|
|
2603
|
+
}, u = {
|
|
2604
|
+
text: "dk:block dk:h-4 dk:w-full dk:rounded",
|
|
2605
|
+
circular: "dk:block dk:w-10 dk:h-10 dk:rounded-full",
|
|
2606
|
+
rectangular: "dk:block dk:w-full dk:h-20 dk:rounded-none",
|
|
2607
|
+
rounded: "dk:block dk:w-full dk:h-20 dk:rounded-xl"
|
|
2608
|
+
}, z = o(() => [
|
|
2609
|
+
"dk:bg-zinc-200 dk:dark:bg-zinc-700",
|
|
2610
|
+
u[t.variant],
|
|
2611
|
+
g[t.animation]
|
|
2612
|
+
].join(" "));
|
|
2613
|
+
return (y, n) => (r(), a("span", {
|
|
2614
|
+
class: s(z.value),
|
|
2615
|
+
style: ie(i.value),
|
|
2616
|
+
"aria-hidden": "true",
|
|
2617
|
+
role: "presentation"
|
|
2618
|
+
}, null, 6));
|
|
2619
|
+
}
|
|
2620
|
+
}), Ot = /* @__PURE__ */ ke(Gd, [["__scopeId", "data-v-8c9c6005"]]), Jd = ["aria-label"], Xd = ["id", "aria-controls", "aria-selected", "disabled", "onClick", "onKeydown"], Yd = {
|
|
2621
|
+
key: 0,
|
|
2622
|
+
"aria-hidden": "true",
|
|
2623
|
+
class: "dk:flex-shrink-0"
|
|
2624
|
+
}, Zd = ["id", "aria-labelledby", "tabindex", "hidden"], Nt = /* @__PURE__ */ L({
|
|
2625
|
+
__name: "DuiTabs",
|
|
2626
|
+
props: {
|
|
2627
|
+
modelValue: {},
|
|
2628
|
+
tabs: {},
|
|
2629
|
+
variant: { default: "underline" },
|
|
2630
|
+
color: { default: "primary" },
|
|
2631
|
+
size: { default: "md" },
|
|
2632
|
+
fullWidth: { type: Boolean, default: !1 },
|
|
2633
|
+
ariaLabel: { default: "Tabs" }
|
|
2634
|
+
},
|
|
2635
|
+
emits: ["update:modelValue", "change"],
|
|
2636
|
+
setup(d, { emit: t }) {
|
|
2637
|
+
const e = d, i = t, g = Math.random().toString(36).slice(2, 8);
|
|
2638
|
+
function u(x, l) {
|
|
2639
|
+
l || (i("update:modelValue", x), i("change", x));
|
|
2640
|
+
}
|
|
2641
|
+
function z(x, l) {
|
|
2642
|
+
const k = e.tabs.filter((w) => !w.disabled).map((w) => w.value), p = k.indexOf(l);
|
|
2643
|
+
if (x.key === "ArrowRight" || x.key === "ArrowDown") {
|
|
2644
|
+
x.preventDefault();
|
|
2645
|
+
const w = k[(p + 1) % k.length];
|
|
2646
|
+
u(w);
|
|
2647
|
+
}
|
|
2648
|
+
if (x.key === "ArrowLeft" || x.key === "ArrowUp") {
|
|
2649
|
+
x.preventDefault();
|
|
2650
|
+
const w = k[(p - 1 + k.length) % k.length];
|
|
2651
|
+
u(w);
|
|
2652
|
+
}
|
|
2653
|
+
x.key === "Home" && (x.preventDefault(), u(k[0])), x.key === "End" && (x.preventDefault(), u(k[k.length - 1]));
|
|
2654
|
+
}
|
|
2655
|
+
const y = {
|
|
2656
|
+
sm: "dk:text-xs dk:px-3 dk:py-1.5",
|
|
2657
|
+
md: "dk:text-sm dk:px-4 dk:py-2",
|
|
2658
|
+
lg: "dk:text-base dk:px-5 dk:py-2.5"
|
|
2659
|
+
}, n = {
|
|
2660
|
+
neutral: { underline: "dk:border-zinc-600 dk:text-zinc-700 dk:dark:border-zinc-400 dk:dark:text-zinc-200", pills: "dk:bg-zinc-600 dk:text-white dk:dark:bg-zinc-500", boxed: "dk:bg-white dk:text-zinc-700 dk:dark:bg-zinc-800 dk:dark:text-zinc-200 dk:shadow-sm" },
|
|
2661
|
+
primary: { underline: "dk:border-slate-600 dk:text-slate-700 dk:dark:border-slate-400 dk:dark:text-slate-200", pills: "dk:bg-slate-600 dk:text-white dk:dark:bg-slate-500", boxed: "dk:bg-white dk:text-slate-700 dk:dark:bg-zinc-800 dk:dark:text-slate-200 dk:shadow-sm" },
|
|
2662
|
+
secondary: { underline: "dk:border-pink-600 dk:text-pink-700 dk:dark:border-pink-400 dk:dark:text-pink-200", pills: "dk:bg-pink-600 dk:text-white dk:dark:bg-pink-500", boxed: "dk:bg-white dk:text-pink-700 dk:dark:bg-zinc-800 dk:dark:text-pink-200 dk:shadow-sm" },
|
|
2663
|
+
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" },
|
|
2664
|
+
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" },
|
|
2665
|
+
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" }
|
|
2666
|
+
}, c = o(() => "dk:w-full"), m = o(() => {
|
|
2667
|
+
const x = "dk:flex dk:items-center dk:gap-0.5", l = e.fullWidth ? "dk:w-full" : "", k = {
|
|
2668
|
+
underline: "dk:border-b dk:border-zinc-200 dk:dark:border-zinc-700",
|
|
2669
|
+
pills: "dk:gap-1",
|
|
2670
|
+
boxed: "dk:bg-zinc-100 dk:dark:bg-zinc-800 dk:p-1 dk:rounded-xl dk:gap-1"
|
|
2671
|
+
}[e.variant];
|
|
2672
|
+
return [x, l, k].join(" ");
|
|
2673
|
+
});
|
|
2674
|
+
function h(x, l) {
|
|
2675
|
+
const k = "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", p = y[e.size], w = e.modelValue === x, f = l ? "dk:opacity-40 dk:cursor-not-allowed" : "dk:cursor-pointer", v = "dk:focus-visible:ring-2 dk:focus-visible:ring-offset-1 dk:focus-visible:ring-slate-400 dk:dark:focus-visible:ring-slate-500";
|
|
2676
|
+
if (e.variant === "underline") {
|
|
2677
|
+
const P = w ? `dk:border-b-2 ${n[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";
|
|
2678
|
+
return [k, p, P, f, v].join(" ");
|
|
2679
|
+
}
|
|
2680
|
+
if (e.variant === "pills") {
|
|
2681
|
+
const P = w ? `dk:rounded-lg ${n[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";
|
|
2682
|
+
return [k, p, P, f, v].join(" ");
|
|
2683
|
+
}
|
|
2684
|
+
const $ = w ? `dk:rounded-lg ${n[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", M = e.fullWidth ? "dk:flex-1 dk:text-center dk:justify-center" : "";
|
|
2685
|
+
return [k, p, $, f, v, M].join(" ");
|
|
2686
|
+
}
|
|
2687
|
+
const C = 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"), D = o(() => [{ sm: "dk:pt-3", md: "dk:pt-4", lg: "dk:pt-5" }[e.size], "dk:outline-none"].join(" "));
|
|
2688
|
+
return (x, l) => (r(), a("div", {
|
|
2689
|
+
class: s(c.value)
|
|
2690
|
+
}, [
|
|
2691
|
+
b("div", {
|
|
2692
|
+
class: s(m.value),
|
|
2693
|
+
role: "tablist",
|
|
2694
|
+
"aria-label": d.ariaLabel
|
|
2695
|
+
}, [
|
|
2696
|
+
(r(!0), a(I, null, N(d.tabs, (k) => (r(), a("button", {
|
|
2697
|
+
key: k.value,
|
|
2698
|
+
id: `tab-${R(g)}-${k.value}`,
|
|
2699
|
+
"aria-controls": `panel-${R(g)}-${k.value}`,
|
|
2700
|
+
"aria-selected": d.modelValue === k.value,
|
|
2701
|
+
disabled: k.disabled,
|
|
2702
|
+
role: "tab",
|
|
2703
|
+
class: s(h(k.value, k.disabled)),
|
|
2704
|
+
onClick: (p) => u(k.value, k.disabled),
|
|
2705
|
+
onKeydown: (p) => z(p, k.value)
|
|
2706
|
+
}, [
|
|
2707
|
+
k.icon ? (r(), a("span", Yd, j(k.icon), 1)) : S("", !0),
|
|
2708
|
+
A(" " + j(k.label) + " ", 1),
|
|
2709
|
+
k.badge !== void 0 ? (r(), a("span", {
|
|
2710
|
+
key: 1,
|
|
2711
|
+
class: s(C.value)
|
|
2712
|
+
}, j(k.badge), 3)) : S("", !0)
|
|
2713
|
+
], 42, Xd))), 128))
|
|
2714
|
+
], 10, Jd),
|
|
2715
|
+
(r(!0), a(I, null, N(d.tabs, (k) => (r(), a("div", {
|
|
2716
|
+
key: k.value,
|
|
2717
|
+
id: `panel-${R(g)}-${k.value}`,
|
|
2718
|
+
"aria-labelledby": `tab-${R(g)}-${k.value}`,
|
|
2719
|
+
role: "tabpanel",
|
|
2720
|
+
tabindex: d.modelValue === k.value ? 0 : -1,
|
|
2721
|
+
hidden: d.modelValue !== k.value,
|
|
2722
|
+
class: s(D.value)
|
|
2723
|
+
}, [
|
|
2724
|
+
_(x.$slots, k.value)
|
|
2725
|
+
], 10, Zd))), 128))
|
|
2726
|
+
], 2));
|
|
2727
|
+
}
|
|
2728
|
+
}), oe = ze({ toasts: [] });
|
|
2729
|
+
function re(d) {
|
|
2730
|
+
const t = Math.random().toString(36).slice(2, 10), e = {
|
|
2731
|
+
id: t,
|
|
2732
|
+
title: d.title,
|
|
2733
|
+
message: d.message,
|
|
2734
|
+
color: d.color ?? "neutral",
|
|
2735
|
+
duration: d.duration ?? 4e3,
|
|
2736
|
+
closable: d.closable ?? !0,
|
|
2737
|
+
icon: d.icon
|
|
2738
|
+
};
|
|
2739
|
+
return oe.toasts.push(e), e.duration > 0 && setTimeout(() => Ce(t), e.duration), t;
|
|
2740
|
+
}
|
|
2741
|
+
function Ce(d) {
|
|
2742
|
+
const t = oe.toasts.findIndex((e) => e.id === d);
|
|
2743
|
+
t !== -1 && oe.toasts.splice(t, 1);
|
|
2744
|
+
}
|
|
2745
|
+
function Rd() {
|
|
2746
|
+
oe.toasts.splice(0);
|
|
2747
|
+
}
|
|
2748
|
+
function et() {
|
|
2749
|
+
return {
|
|
2750
|
+
toasts: Ae(oe.toasts),
|
|
2751
|
+
add: re,
|
|
2752
|
+
remove: Ce,
|
|
2753
|
+
clear: Rd,
|
|
2754
|
+
success: (d, t) => re({ ...t, message: d, color: "success" }),
|
|
2755
|
+
error: (d, t) => re({ ...t, message: d, color: "danger" }),
|
|
2756
|
+
warning: (d, t) => re({ ...t, message: d, color: "warning" }),
|
|
2757
|
+
info: (d, t) => re({ ...t, message: d, color: "primary" })
|
|
2758
|
+
};
|
|
2759
|
+
}
|
|
2760
|
+
const dt = {
|
|
2761
|
+
key: 0,
|
|
2762
|
+
"aria-hidden": "true",
|
|
2763
|
+
class: "dk:flex-shrink-0 dk:text-lg"
|
|
2764
|
+
}, tt = { class: "dk:flex-1 dk:min-w-0" }, rt = {
|
|
2765
|
+
key: 0,
|
|
2766
|
+
class: "dk:text-sm dk:font-semibold dk:leading-snug"
|
|
2767
|
+
}, at = ["onClick"], ot = "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", Ft = /* @__PURE__ */ L({
|
|
2768
|
+
__name: "DuiToast",
|
|
2769
|
+
props: {
|
|
2770
|
+
position: { default: "top-right" },
|
|
2771
|
+
maxToasts: { default: 5 },
|
|
2772
|
+
zIndex: { default: 9999 }
|
|
2773
|
+
},
|
|
2774
|
+
setup(d) {
|
|
2775
|
+
const t = d, { toasts: e, remove: i } = et(), g = o(() => e.slice(0, t.maxToasts)), u = {
|
|
2776
|
+
"top-right": "dk:top-4 dk:right-4 dk:items-end",
|
|
2777
|
+
"top-left": "dk:top-4 dk:left-4 dk:items-start",
|
|
2778
|
+
"top-center": "dk:top-4 dk:left-1/2 dk:-translate-x-1/2 dk:items-center",
|
|
2779
|
+
"bottom-right": "dk:bottom-4 dk:right-4 dk:items-end",
|
|
2780
|
+
"bottom-left": "dk:bottom-4 dk:left-4 dk:items-start",
|
|
2781
|
+
"bottom-center": "dk:bottom-4 dk:left-1/2 dk:-translate-x-1/2 dk:items-center"
|
|
2782
|
+
}, z = o(() => [
|
|
2783
|
+
"dk:fixed dk:pointer-events-none",
|
|
2784
|
+
u[t.position],
|
|
2785
|
+
`dk:z-[${t.zIndex}]`
|
|
2786
|
+
].join(" ")), y = o(() => "dk:relative dk:flex dk:flex-col dk:gap-2 dk:w-80 dk:max-w-[calc(100vw-2rem)]"), n = {
|
|
2787
|
+
neutral: "dk:bg-zinc-800 dk:dark:bg-zinc-700 dk:text-white dk:border-zinc-600",
|
|
2788
|
+
primary: "dk:bg-slate-700 dk:dark:bg-slate-700 dk:text-white dk:border-slate-500",
|
|
2789
|
+
secondary: "dk:bg-pink-600 dk:dark:bg-pink-700 dk:text-white dk:border-pink-400",
|
|
2790
|
+
success: "dk:bg-emerald-600 dk:dark:bg-emerald-700 dk:text-white dk:border-emerald-400",
|
|
2791
|
+
warning: "dk:bg-amber-600 dk:dark:bg-amber-700 dk:text-white dk:border-amber-400",
|
|
2792
|
+
danger: "dk:bg-rose-600 dk:dark:bg-rose-700 dk:text-white dk:border-rose-400"
|
|
2793
|
+
}, c = {
|
|
2794
|
+
neutral: "dk:bg-zinc-300",
|
|
2795
|
+
primary: "dk:bg-slate-300",
|
|
2796
|
+
secondary: "dk:bg-pink-200",
|
|
2797
|
+
success: "dk:bg-emerald-200",
|
|
2798
|
+
warning: "dk:bg-amber-200",
|
|
2799
|
+
danger: "dk:bg-rose-200"
|
|
2800
|
+
};
|
|
2801
|
+
function m(C) {
|
|
2802
|
+
return [
|
|
2803
|
+
"dk:pointer-events-auto dk:flex dk:items-start dk:gap-3",
|
|
2804
|
+
"dk:rounded-xl dk:border dk:px-4 dk:py-3 dk:shadow-xl",
|
|
2805
|
+
n[C]
|
|
2806
|
+
].join(" ");
|
|
2807
|
+
}
|
|
2808
|
+
function h(C) {
|
|
2809
|
+
return ["dk:flex-shrink-0 dk:w-2 dk:h-2 dk:rounded-full dk:mt-1", c[C]].join(" ");
|
|
2810
|
+
}
|
|
2811
|
+
return (C, D) => (r(), F(fe, { to: "body" }, [
|
|
2812
|
+
b("div", {
|
|
2813
|
+
class: s(z.value),
|
|
2814
|
+
"aria-live": "polite",
|
|
2815
|
+
"aria-atomic": "false"
|
|
2816
|
+
}, [
|
|
2817
|
+
de(Ie, {
|
|
2818
|
+
tag: "div",
|
|
2819
|
+
class: s(y.value),
|
|
2820
|
+
"enter-active-class": "dk:transition-all dk:duration-300 dk:ease-out",
|
|
2821
|
+
"leave-active-class": "dk:transition-all dk:duration-200 dk:ease-in dk:absolute dk:w-full",
|
|
2822
|
+
"enter-from-class": "dk:opacity-0 dk:translate-y-2 dk:scale-95",
|
|
2823
|
+
"leave-to-class": "dk:opacity-0 dk:scale-95",
|
|
2824
|
+
"move-class": "dk:transition-all dk:duration-300"
|
|
2825
|
+
}, {
|
|
2826
|
+
default: E(() => [
|
|
2827
|
+
(r(!0), a(I, null, N(g.value, (x) => (r(), a("div", {
|
|
2828
|
+
key: x.id,
|
|
2829
|
+
role: "alert",
|
|
2830
|
+
class: s(m(x.color))
|
|
2831
|
+
}, [
|
|
2832
|
+
x.icon ? (r(), a("span", dt, j(x.icon), 1)) : (r(), a("span", {
|
|
2833
|
+
key: 1,
|
|
2834
|
+
class: s(h(x.color)),
|
|
2835
|
+
"aria-hidden": "true"
|
|
2836
|
+
}, null, 2)),
|
|
2837
|
+
b("div", tt, [
|
|
2838
|
+
x.title ? (r(), a("p", rt, j(x.title), 1)) : S("", !0),
|
|
2839
|
+
b("p", {
|
|
2840
|
+
class: s(["dk:text-sm dk:leading-snug", { "dk:opacity-80": x.title }])
|
|
2841
|
+
}, j(x.message), 3)
|
|
2842
|
+
]),
|
|
2843
|
+
x.closable ? (r(), a("button", {
|
|
2844
|
+
key: 2,
|
|
2845
|
+
type: "button",
|
|
2846
|
+
class: s(ot),
|
|
2847
|
+
"aria-label": "Cerrar notificacion",
|
|
2848
|
+
onClick: (l) => R(i)(x.id)
|
|
2849
|
+
}, " × ", 8, at)) : S("", !0)
|
|
2850
|
+
], 2))), 128))
|
|
2851
|
+
]),
|
|
2852
|
+
_: 1
|
|
2853
|
+
}, 8, ["class"])
|
|
2854
|
+
], 2)
|
|
2855
|
+
]));
|
|
2856
|
+
}
|
|
2857
|
+
}), kt = {
|
|
1716
2858
|
key: 0,
|
|
1717
2859
|
class: "dk:flex dk:items-center dk:gap-4 dk:flex-shrink-0"
|
|
1718
|
-
},
|
|
2860
|
+
}, nt = { class: "dk:hidden dk:md:flex dk:items-center dk:flex-1" }, st = {
|
|
1719
2861
|
key: 0,
|
|
1720
2862
|
class: "dk:relative dk:group"
|
|
1721
|
-
},
|
|
2863
|
+
}, lt = { class: "dk:absolute dk:left-0 dk:top-full dk:min-w-56 dk:py-2 dk:mt-1 dk:bg-gradient-to-b dk:from-white/95 dk:to-gray-50/95 dk:dark:from-gray-700/90 dk:dark:to-gray-800/90 dk:backdrop-blur-md dk:rounded-lg dk:shadow-lg dk:border dk:border-white/40 dk:dark:border-white/10 dk:opacity-0 dk:invisible dk:group-hover:opacity-100 dk:group-hover:visible dk:transition-all dk:duration-200 dk:z-50" }, it = {
|
|
1722
2864
|
key: 1,
|
|
1723
2865
|
class: "dk:hidden dk:md:flex dk:items-center dk:gap-2 dk:flex-shrink-0"
|
|
1724
|
-
},
|
|
2866
|
+
}, ct = {
|
|
1725
2867
|
class: "dk:w-6 dk:h-6 dk:stroke-gray-900 dk:dark:stroke-white",
|
|
1726
2868
|
fill: "none",
|
|
1727
2869
|
viewBox: "0 0 24 24"
|
|
1728
|
-
},
|
|
2870
|
+
}, ut = ["d"], bt = { class: "dk:md:hidden dk:absolute dk:top-full dk:left-0 dk:w-full dk:bg-gradient-to-b dk:from-white/95 dk:to-gray-50/95 dk:dark:from-gray-700/90 dk:dark:to-gray-800/90 dk:backdrop-blur-md dk:border-t dk:border-white/40 dk:dark:border-white/10 dk:shadow-lg dk:dark:shadow-black/30 dk:z-40" }, pt = { class: "dk:px-4 dk:py-3 dk:space-y-2" }, gt = { key: 0 }, mt = ["onClick"], ft = { class: "dk:flex dk:items-center" }, ht = { class: "dk:ml-4 dk:mt-2 dk:space-y-1" }, xt = {
|
|
1729
2871
|
key: 0,
|
|
1730
2872
|
class: "dk:pt-3 dk:border-t dk:border-white/20 dk:dark:border-white/10"
|
|
1731
|
-
},
|
|
2873
|
+
}, Kt = /* @__PURE__ */ L({
|
|
1732
2874
|
__name: "DuiNavbar",
|
|
1733
2875
|
props: {
|
|
1734
2876
|
items: { default: () => [] },
|
|
@@ -1737,19 +2879,19 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1737
2879
|
itemsAlignment: { default: "left" },
|
|
1738
2880
|
underlineColor: { default: "primary" }
|
|
1739
2881
|
},
|
|
1740
|
-
setup(
|
|
1741
|
-
const
|
|
1742
|
-
const
|
|
1743
|
-
return
|
|
1744
|
-
},
|
|
2882
|
+
setup(d) {
|
|
2883
|
+
const t = d, e = U(!1), i = ze({}), g = (p) => ae(p.to, t.nuxt), u = (p) => {
|
|
2884
|
+
const w = g(p);
|
|
2885
|
+
return ce(p.to, w);
|
|
2886
|
+
}, z = () => {
|
|
1745
2887
|
e.value = !e.value;
|
|
1746
|
-
},
|
|
1747
|
-
e.value = !1, Object.keys(i).forEach((
|
|
1748
|
-
i[
|
|
2888
|
+
}, y = () => {
|
|
2889
|
+
e.value = !1, Object.keys(i).forEach((p) => {
|
|
2890
|
+
i[p] = !1;
|
|
1749
2891
|
});
|
|
1750
|
-
},
|
|
1751
|
-
i[
|
|
1752
|
-
},
|
|
2892
|
+
}, n = (p) => {
|
|
2893
|
+
i[p] = !i[p];
|
|
2894
|
+
}, c = {
|
|
1753
2895
|
s: {
|
|
1754
2896
|
height: "dk:h-12",
|
|
1755
2897
|
padding: "dk:px-3",
|
|
@@ -1768,8 +2910,8 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1768
2910
|
text: "dk:text-lg",
|
|
1769
2911
|
itemPadding: "dk:px-4 dk:py-3"
|
|
1770
2912
|
}
|
|
1771
|
-
},
|
|
1772
|
-
const
|
|
2913
|
+
}, m = o(() => {
|
|
2914
|
+
const p = c[t.size];
|
|
1773
2915
|
return [
|
|
1774
2916
|
// Glassmorphism navbar styles (Windows Vista inspired)
|
|
1775
2917
|
"dk:relative dk:bg-gradient-to-b dk:from-white/80 dk:via-white/70 dk:to-gray-50/80",
|
|
@@ -1782,19 +2924,19 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1782
2924
|
"dk:before:bg-gradient-to-r dk:before:from-white/60 dk:before:via-white/40 dk:before:to-transparent",
|
|
1783
2925
|
"dk:dark:before:from-white/20 dk:dark:before:via-white/10 dk:dark:before:to-transparent",
|
|
1784
2926
|
"dk:flex dk:items-center dk:w-full dk:gap-4",
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
2927
|
+
p.height,
|
|
2928
|
+
p.padding,
|
|
2929
|
+
p.text
|
|
1788
2930
|
].join(" ");
|
|
1789
|
-
}),
|
|
2931
|
+
}), h = o(() => [
|
|
1790
2932
|
"dk:flex dk:items-center dk:space-x-1 dk:flex-1",
|
|
1791
2933
|
{
|
|
1792
2934
|
left: "dk:justify-start",
|
|
1793
2935
|
center: "dk:justify-center",
|
|
1794
2936
|
right: "dk:justify-end"
|
|
1795
|
-
}[
|
|
2937
|
+
}[t.itemsAlignment]
|
|
1796
2938
|
].join(" ")), C = () => {
|
|
1797
|
-
const
|
|
2939
|
+
const p = {
|
|
1798
2940
|
neutral: "dk:before:from-zinc-500 dk:before:to-zinc-600 dk:dark:before:from-zinc-400 dk:dark:before:to-zinc-500",
|
|
1799
2941
|
primary: "dk:before:from-slate-600 dk:before:to-slate-700 dk:dark:before:from-slate-400 dk:dark:before:to-slate-500",
|
|
1800
2942
|
secondary: "dk:before:from-pink-500 dk:before:to-pink-600 dk:dark:before:from-pink-400 dk:dark:before:to-pink-500",
|
|
@@ -1802,13 +2944,13 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1802
2944
|
danger: "dk:before:from-rose-500 dk:before:to-rose-600 dk:dark:before:from-rose-400 dk:dark:before:to-rose-500",
|
|
1803
2945
|
warning: "dk:before:from-amber-500 dk:before:to-amber-600 dk:dark:before:from-amber-400 dk:dark:before:to-amber-500"
|
|
1804
2946
|
};
|
|
1805
|
-
return
|
|
1806
|
-
},
|
|
1807
|
-
const
|
|
1808
|
-
return (
|
|
1809
|
-
const $ =
|
|
1810
|
-
let
|
|
1811
|
-
return
|
|
2947
|
+
return p[t.underlineColor] || p.primary;
|
|
2948
|
+
}, D = o(() => {
|
|
2949
|
+
const p = c[t.size], w = C();
|
|
2950
|
+
return (f, v = !0) => {
|
|
2951
|
+
const $ = f.active ?? !1, M = v ? "dk:pl-3" : "dk:pl-2", P = "dk:pr-3", J = v ? "dk:pl-2" : "dk:pl-1", Y = "dk:pr-2", Z = v ? "dk:pl-4" : "dk:pl-3", ue = "dk:pr-4";
|
|
2952
|
+
let ee = "";
|
|
2953
|
+
return p.itemPadding.includes("px-2") ? ee = `${J} ${Y} dk:py-1.5` : p.itemPadding.includes("px-4") ? ee = `${Z} ${ue} dk:py-3` : ee = `${M} ${P} dk:py-2`, [
|
|
1812
2954
|
// Block style with animated underline
|
|
1813
2955
|
"dk:flex dk:items-center dk:relative dk:transition-all dk:duration-300",
|
|
1814
2956
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:dark:text-gray-300 dk:dark:hover:text-gray-100",
|
|
@@ -1817,62 +2959,62 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1817
2959
|
// Animated underline effect
|
|
1818
2960
|
"dk:before:absolute dk:before:bottom-0 dk:before:left-0 dk:before:h-0.5",
|
|
1819
2961
|
"dk:before:bg-gradient-to-r",
|
|
1820
|
-
|
|
2962
|
+
w,
|
|
1821
2963
|
"dk:before:transition-all dk:before:duration-300",
|
|
1822
2964
|
$ ? "dk:before:w-full dk:text-gray-900 dk:dark:text-gray-100" : "dk:before:w-0 dk:hover:before:w-full",
|
|
1823
|
-
|
|
2965
|
+
ee
|
|
1824
2966
|
].join(" ");
|
|
1825
2967
|
};
|
|
1826
|
-
}),
|
|
2968
|
+
}), x = o(() => [
|
|
1827
2969
|
"dk:block dk:w-full dk:text-left dk:px-4 dk:py-2 dk:text-sm dk:whitespace-nowrap",
|
|
1828
2970
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:hover:bg-white/50 dk:dark:hover:bg-white/10",
|
|
1829
2971
|
"dk:dark:text-gray-300 dk:dark:hover:text-gray-100",
|
|
1830
2972
|
"dk:transition-all dk:duration-200 dk:no-underline",
|
|
1831
2973
|
"dk:border-l-2 dk:border-transparent dk:hover:border-blue-500"
|
|
1832
|
-
].join(" ")),
|
|
2974
|
+
].join(" ")), l = o(() => [
|
|
1833
2975
|
"dk:flex dk:items-center dk:justify-start dk:w-full dk:text-left dk:px-3 dk:py-2",
|
|
1834
2976
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:rounded-lg",
|
|
1835
2977
|
"dk:bg-white/10 dk:hover:bg-white/25 dk:dark:bg-white/5 dk:dark:hover:bg-white/15",
|
|
1836
2978
|
"dk:dark:text-gray-300 dk:dark:hover:text-gray-100",
|
|
1837
2979
|
"dk:border dk:border-white/20 dk:dark:border-white/10 dk:hover:border-white/40 dk:dark:hover:border-white/20",
|
|
1838
2980
|
"dk:transition-all dk:duration-200 dk:no-underline"
|
|
1839
|
-
].join(" ")),
|
|
2981
|
+
].join(" ")), k = o(() => [
|
|
1840
2982
|
"dk:block dk:w-full dk:text-left dk:px-3 dk:py-2 dk:text-sm dk:rounded-lg",
|
|
1841
2983
|
"dk:text-gray-600 dk:hover:text-gray-800 dk:hover:bg-white/30 dk:dark:hover:bg-white/10",
|
|
1842
2984
|
"dk:dark:text-gray-400 dk:dark:hover:text-gray-200",
|
|
1843
2985
|
"dk:border-l-2 dk:border-transparent dk:hover:border-blue-500",
|
|
1844
2986
|
"dk:transition-all dk:duration-200 dk:no-underline"
|
|
1845
2987
|
].join(" "));
|
|
1846
|
-
return (
|
|
1847
|
-
class: m
|
|
2988
|
+
return (p, w) => (r(), a("nav", {
|
|
2989
|
+
class: s(m.value)
|
|
1848
2990
|
}, [
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
])) :
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
class:
|
|
2991
|
+
p.$slots.brand ? (r(), a("div", kt, [
|
|
2992
|
+
_(p.$slots, "brand")
|
|
2993
|
+
])) : S("", !0),
|
|
2994
|
+
b("div", nt, [
|
|
2995
|
+
b("div", {
|
|
2996
|
+
class: s(h.value)
|
|
1855
2997
|
}, [
|
|
1856
|
-
(r(!0),
|
|
1857
|
-
key:
|
|
2998
|
+
(r(!0), a(I, null, N(d.items, (f) => (r(), a(I, {
|
|
2999
|
+
key: f.label
|
|
1858
3000
|
}, [
|
|
1859
|
-
|
|
1860
|
-
(r(),
|
|
1861
|
-
class:
|
|
3001
|
+
f.children && f.children.length > 0 ? (r(), a("div", st, [
|
|
3002
|
+
(r(), F(Q(g(f)), W({ ref_for: !0 }, u(f), {
|
|
3003
|
+
class: D.value(f, !0)
|
|
1862
3004
|
}), {
|
|
1863
3005
|
default: E(() => [
|
|
1864
|
-
|
|
3006
|
+
f.icon ? (r(), a("i", {
|
|
1865
3007
|
key: 0,
|
|
1866
|
-
class:
|
|
1867
|
-
}, null, 2)) :
|
|
1868
|
-
|
|
1869
|
-
|
|
3008
|
+
class: s([f.icon, "dk:mr-2"])
|
|
3009
|
+
}, null, 2)) : S("", !0),
|
|
3010
|
+
A(" " + j(f.label) + " ", 1),
|
|
3011
|
+
w[0] || (w[0] = b("svg", {
|
|
1870
3012
|
class: "dk:w-4 dk:h-4 dk:ml-1 dk:transform dk:group-hover:rotate-180 dk:transition-transform",
|
|
1871
3013
|
fill: "none",
|
|
1872
3014
|
stroke: "currentColor",
|
|
1873
3015
|
viewBox: "0 0 24 24"
|
|
1874
3016
|
}, [
|
|
1875
|
-
|
|
3017
|
+
b("path", {
|
|
1876
3018
|
"stroke-linecap": "round",
|
|
1877
3019
|
"stroke-linejoin": "round",
|
|
1878
3020
|
"stroke-width": "2",
|
|
@@ -1882,145 +3024,156 @@ const Ve = { key: 1 }, Pe = `
|
|
|
1882
3024
|
]),
|
|
1883
3025
|
_: 2
|
|
1884
3026
|
}, 1040, ["class"])),
|
|
1885
|
-
|
|
1886
|
-
(r(!0),
|
|
1887
|
-
key:
|
|
1888
|
-
}, { ref_for: !0 },
|
|
3027
|
+
b("div", lt, [
|
|
3028
|
+
(r(!0), a(I, null, N(f.children, (v) => (r(), F(Q(g(v)), W({
|
|
3029
|
+
key: v.label
|
|
3030
|
+
}, { ref_for: !0 }, u(v), { class: x.value }), {
|
|
1889
3031
|
default: E(() => [
|
|
1890
|
-
|
|
3032
|
+
v.icon ? (r(), a("i", {
|
|
1891
3033
|
key: 0,
|
|
1892
|
-
class:
|
|
1893
|
-
}, null, 2)) :
|
|
1894
|
-
|
|
3034
|
+
class: s([v.icon, "dk:mr-2"])
|
|
3035
|
+
}, null, 2)) : S("", !0),
|
|
3036
|
+
A(" " + j(v.label), 1)
|
|
1895
3037
|
]),
|
|
1896
3038
|
_: 2
|
|
1897
3039
|
}, 1040, ["class"]))), 128))
|
|
1898
3040
|
])
|
|
1899
|
-
])) : (r(),
|
|
3041
|
+
])) : (r(), F(Q(g(f)), W({
|
|
1900
3042
|
key: 1,
|
|
1901
3043
|
ref_for: !0
|
|
1902
|
-
},
|
|
1903
|
-
class:
|
|
3044
|
+
}, u(f), {
|
|
3045
|
+
class: D.value(f, !1)
|
|
1904
3046
|
}), {
|
|
1905
3047
|
default: E(() => [
|
|
1906
|
-
|
|
3048
|
+
f.icon ? (r(), a("i", {
|
|
1907
3049
|
key: 0,
|
|
1908
|
-
class:
|
|
1909
|
-
}, null, 2)) :
|
|
1910
|
-
|
|
3050
|
+
class: s([f.icon, "dk:mr-2"])
|
|
3051
|
+
}, null, 2)) : S("", !0),
|
|
3052
|
+
A(" " + j(f.label), 1)
|
|
1911
3053
|
]),
|
|
1912
3054
|
_: 2
|
|
1913
3055
|
}, 1040, ["class"]))
|
|
1914
3056
|
], 64))), 128))
|
|
1915
3057
|
], 2)
|
|
1916
3058
|
]),
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
])) :
|
|
1920
|
-
|
|
3059
|
+
p.$slots.actions ? (r(), a("div", it, [
|
|
3060
|
+
_(p.$slots, "actions")
|
|
3061
|
+
])) : S("", !0),
|
|
3062
|
+
b("button", {
|
|
1921
3063
|
type: "button",
|
|
1922
|
-
onClick:
|
|
3064
|
+
onClick: z,
|
|
1923
3065
|
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"
|
|
1924
3066
|
}, [
|
|
1925
|
-
(r(),
|
|
1926
|
-
|
|
3067
|
+
(r(), a("svg", ct, [
|
|
3068
|
+
b("path", {
|
|
1927
3069
|
"stroke-linecap": "round",
|
|
1928
3070
|
"stroke-linejoin": "round",
|
|
1929
3071
|
"stroke-width": "2",
|
|
1930
3072
|
d: e.value ? "M6 18L18 6M6 6l12 12" : "M4 6h16M4 12h16M4 18h16"
|
|
1931
|
-
}, null, 8,
|
|
3073
|
+
}, null, 8, ut)
|
|
1932
3074
|
]))
|
|
1933
3075
|
]),
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
(r(!0),
|
|
1937
|
-
key:
|
|
3076
|
+
be(b("div", bt, [
|
|
3077
|
+
b("div", pt, [
|
|
3078
|
+
(r(!0), a(I, null, N(d.items, (f) => (r(), a(I, {
|
|
3079
|
+
key: f.label
|
|
1938
3080
|
}, [
|
|
1939
|
-
|
|
1940
|
-
|
|
3081
|
+
f.children && f.children.length > 0 ? (r(), a("div", gt, [
|
|
3082
|
+
b("button", {
|
|
1941
3083
|
type: "button",
|
|
1942
|
-
onClick: (
|
|
1943
|
-
class:
|
|
3084
|
+
onClick: (v) => n(f.label),
|
|
3085
|
+
class: s([l.value, "dk:justify-between"])
|
|
1944
3086
|
}, [
|
|
1945
|
-
|
|
1946
|
-
|
|
3087
|
+
b("div", ft, [
|
|
3088
|
+
f.icon ? (r(), a("i", {
|
|
1947
3089
|
key: 0,
|
|
1948
|
-
class:
|
|
1949
|
-
}, null, 2)) :
|
|
1950
|
-
|
|
3090
|
+
class: s([f.icon, "dk:mr-2"])
|
|
3091
|
+
}, null, 2)) : S("", !0),
|
|
3092
|
+
A(" " + j(f.label), 1)
|
|
1951
3093
|
]),
|
|
1952
|
-
(r(),
|
|
1953
|
-
class:
|
|
3094
|
+
(r(), a("svg", {
|
|
3095
|
+
class: s(["dk:w-4 dk:h-4 dk:transform dk:transition-transform dk:flex-shrink-0", i[f.label] ? "dk:rotate-180" : ""]),
|
|
1954
3096
|
fill: "none",
|
|
1955
3097
|
stroke: "currentColor",
|
|
1956
3098
|
viewBox: "0 0 24 24"
|
|
1957
|
-
}, [...
|
|
1958
|
-
|
|
3099
|
+
}, [...w[1] || (w[1] = [
|
|
3100
|
+
b("path", {
|
|
1959
3101
|
"stroke-linecap": "round",
|
|
1960
3102
|
"stroke-linejoin": "round",
|
|
1961
3103
|
"stroke-width": "2",
|
|
1962
3104
|
d: "M19 9l-7 7-7-7"
|
|
1963
3105
|
}, null, -1)
|
|
1964
3106
|
])], 2))
|
|
1965
|
-
], 10,
|
|
1966
|
-
|
|
1967
|
-
(r(!0),
|
|
1968
|
-
key:
|
|
1969
|
-
}, { ref_for: !0 },
|
|
1970
|
-
class:
|
|
1971
|
-
onClick:
|
|
3107
|
+
], 10, mt),
|
|
3108
|
+
be(b("div", ht, [
|
|
3109
|
+
(r(!0), a(I, null, N(f.children, (v) => (r(), F(Q(g(v)), W({
|
|
3110
|
+
key: v.label
|
|
3111
|
+
}, { ref_for: !0 }, u(v), {
|
|
3112
|
+
class: k.value,
|
|
3113
|
+
onClick: y
|
|
1972
3114
|
}), {
|
|
1973
3115
|
default: E(() => [
|
|
1974
|
-
|
|
3116
|
+
v.icon ? (r(), a("i", {
|
|
1975
3117
|
key: 0,
|
|
1976
|
-
class:
|
|
1977
|
-
}, null, 2)) :
|
|
1978
|
-
|
|
3118
|
+
class: s([v.icon, "dk:mr-2"])
|
|
3119
|
+
}, null, 2)) : S("", !0),
|
|
3120
|
+
A(" " + j(v.label), 1)
|
|
1979
3121
|
]),
|
|
1980
3122
|
_: 2
|
|
1981
3123
|
}, 1040, ["class"]))), 128))
|
|
1982
3124
|
], 512), [
|
|
1983
|
-
[
|
|
3125
|
+
[pe, i[f.label]]
|
|
1984
3126
|
])
|
|
1985
|
-
])) : (r(),
|
|
3127
|
+
])) : (r(), F(Q(g(f)), W({
|
|
1986
3128
|
key: 1,
|
|
1987
3129
|
ref_for: !0
|
|
1988
|
-
},
|
|
1989
|
-
class:
|
|
1990
|
-
onClick:
|
|
3130
|
+
}, u(f), {
|
|
3131
|
+
class: l.value,
|
|
3132
|
+
onClick: y
|
|
1991
3133
|
}), {
|
|
1992
3134
|
default: E(() => [
|
|
1993
|
-
|
|
3135
|
+
f.icon ? (r(), a("i", {
|
|
1994
3136
|
key: 0,
|
|
1995
|
-
class:
|
|
1996
|
-
}, null, 2)) :
|
|
1997
|
-
|
|
3137
|
+
class: s([f.icon, "dk:mr-2"])
|
|
3138
|
+
}, null, 2)) : S("", !0),
|
|
3139
|
+
A(" " + j(f.label), 1)
|
|
1998
3140
|
]),
|
|
1999
3141
|
_: 2
|
|
2000
3142
|
}, 1040, ["class"]))
|
|
2001
3143
|
], 64))), 128)),
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
])) :
|
|
3144
|
+
p.$slots.actions ? (r(), a("div", xt, [
|
|
3145
|
+
_(p.$slots, "actions")
|
|
3146
|
+
])) : S("", !0)
|
|
2005
3147
|
])
|
|
2006
3148
|
], 512), [
|
|
2007
|
-
[
|
|
3149
|
+
[pe, e.value]
|
|
2008
3150
|
])
|
|
2009
3151
|
], 2));
|
|
2010
3152
|
}
|
|
2011
3153
|
});
|
|
2012
3154
|
export {
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
3155
|
+
Pt as DuiAccordion,
|
|
3156
|
+
Mt as DuiAction,
|
|
3157
|
+
Vt as DuiAlert,
|
|
3158
|
+
Lt as DuiBadge,
|
|
3159
|
+
ye as DuiButton,
|
|
3160
|
+
Dt as DuiCard,
|
|
3161
|
+
$t as DuiCheckbox,
|
|
3162
|
+
At as DuiDropdown,
|
|
3163
|
+
It as DuiDropdownItem,
|
|
3164
|
+
Wt as DuiDropdownSeparator,
|
|
3165
|
+
yt as DuiInput,
|
|
3166
|
+
Ct as DuiLabel,
|
|
3167
|
+
Tt as DuiModal,
|
|
3168
|
+
Kt as DuiNavbar,
|
|
3169
|
+
Et as DuiPagination,
|
|
3170
|
+
St as DuiRadio,
|
|
3171
|
+
zt as DuiSelect,
|
|
3172
|
+
Ot as DuiSkeleton,
|
|
3173
|
+
jt as DuiSwitch,
|
|
3174
|
+
Bt as DuiTable,
|
|
3175
|
+
Nt as DuiTabs,
|
|
3176
|
+
wt as DuiTextarea,
|
|
3177
|
+
Ft as DuiToast,
|
|
3178
|
+
_t as DuiTooltip
|
|
2026
3179
|
};
|