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