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