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