@dronico/droni-kit 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/droni-kit.cjs.js +9 -9
- package/dist/droni-kit.css +1 -1
- package/dist/droni-kit.es.js +409 -459
- package/dist/index.d.ts +2 -1
- package/dist/stories/Elements/DuiCard.stories.d.ts +92 -0
- package/dist/stories/Elements/DuiCard.vue.d.ts +31 -0
- package/dist/stories/Forms/DuiInput.stories.d.ts +20 -186
- package/dist/stories/Forms/DuiInput.vue.d.ts +1 -118
- package/dist/stories/Forms/DuiLabel.stories.d.ts +161 -0
- package/dist/stories/Forms/DuiLabel.vue.d.ts +74 -0
- package/dist/stories/Forms/DuiSelect.stories.d.ts +22 -97
- package/dist/stories/Forms/DuiSelect.vue.d.ts +10 -64
- package/dist/stories/Forms/DuiTextarea.stories.d.ts +10 -105
- package/dist/stories/Forms/DuiTextarea.vue.d.ts +1 -64
- package/package.json +1 -1
package/dist/droni-kit.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const H = { key: 1 },
|
|
1
|
+
import { defineComponent as L, getCurrentInstance as M, computed as s, createBlock as T, openBlock as t, resolveDynamicComponent as j, mergeProps as w, withCtx as V, renderSlot as N, createElementBlock as o, createCommentVNode as y, toDisplayString as _, Fragment as $, renderList as P, normalizeClass as m, createElementVNode as p, createTextVNode as D, ref as q, reactive as F, withDirectives as O, vShow as E } from "vue";
|
|
2
|
+
const H = { key: 1 }, W = `
|
|
3
3
|
dk:transition
|
|
4
4
|
dk:text-center
|
|
5
5
|
dk:disabled:opacity-50
|
|
@@ -10,7 +10,7 @@ const H = { key: 1 }, G = `
|
|
|
10
10
|
dk:text-ellipsis
|
|
11
11
|
dk:whitespace-nowrap
|
|
12
12
|
dk:active:scale-95
|
|
13
|
-
dk:max-w-full`,
|
|
13
|
+
dk:max-w-full`, ye = /* @__PURE__ */ L({
|
|
14
14
|
__name: "DuiButton",
|
|
15
15
|
props: {
|
|
16
16
|
variant: { default: "solid" },
|
|
@@ -24,36 +24,36 @@ const H = { key: 1 }, G = `
|
|
|
24
24
|
rounded: { default: "all" },
|
|
25
25
|
to: { default: void 0 }
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
27
|
+
setup(i) {
|
|
28
|
+
const d = i, k = M(), e = k == null ? void 0 : k.appContext.app, u = s(() => {
|
|
29
29
|
try {
|
|
30
|
-
return !!(
|
|
31
|
-
|
|
30
|
+
return !!(e != null && e.config.globalProperties.$router || e != null && e.config.globalProperties.$route || globalThis.VueRouter || // Check if RouterLink component is globally registered
|
|
31
|
+
e != null && e.component("RouterLink"));
|
|
32
32
|
} catch {
|
|
33
33
|
return !1;
|
|
34
34
|
}
|
|
35
|
-
}), b =
|
|
35
|
+
}), b = s(() => {
|
|
36
36
|
try {
|
|
37
37
|
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt || // Check if NuxtLink component is globally available
|
|
38
|
-
|
|
38
|
+
e != null && e.component("NuxtLink"));
|
|
39
39
|
} catch {
|
|
40
40
|
return !1;
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
43
|
-
const
|
|
44
|
-
return
|
|
45
|
-
}),
|
|
42
|
+
}), g = s(() => d.to ? b.value ? "NuxtLink" : u.value ? "RouterLink" : "a" : "button"), f = s(() => {
|
|
43
|
+
const h = {};
|
|
44
|
+
return g.value === "button" ? h.type = d.type : g.value === "a" ? (h.href = typeof d.to == "string" ? d.to : "#", h.role = "button") : h.to = d.to, h;
|
|
45
|
+
}), l = {
|
|
46
46
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
47
47
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
48
48
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
49
|
-
},
|
|
49
|
+
}, c = {
|
|
50
50
|
all: "dk:rounded",
|
|
51
51
|
top: "dk:rounded-t",
|
|
52
52
|
bottom: "dk:rounded-b",
|
|
53
53
|
left: "dk:rounded-l",
|
|
54
54
|
right: "dk:rounded-r",
|
|
55
55
|
none: "dk:rounded-none"
|
|
56
|
-
},
|
|
56
|
+
}, n = {
|
|
57
57
|
solid: {
|
|
58
58
|
base: "dk:border-b",
|
|
59
59
|
neutral: `
|
|
@@ -225,26 +225,23 @@ const H = { key: 1 }, G = `
|
|
|
225
225
|
dk:dark:text-amber-100
|
|
226
226
|
dk:dark:hover:bg-amber-800`
|
|
227
227
|
}
|
|
228
|
-
},
|
|
229
|
-
var
|
|
230
|
-
const
|
|
231
|
-
return [
|
|
228
|
+
}, x = s(() => {
|
|
229
|
+
var S;
|
|
230
|
+
const h = (((S = n[d.variant]) == null ? void 0 : S[d.color]) || "") + " " + n[d.variant].base, C = l[d.size] || "", B = d.block ? "dk:w-full" : "", R = c[d.rounded] || "";
|
|
231
|
+
return [W, h, C, B, R].join(" ");
|
|
232
232
|
});
|
|
233
|
-
return (
|
|
234
|
-
class:
|
|
235
|
-
title:
|
|
236
|
-
disabled:
|
|
233
|
+
return (h, C) => (t(), T(j(g.value), w(f.value, {
|
|
234
|
+
class: x.value,
|
|
235
|
+
title: d.title,
|
|
236
|
+
disabled: d.disabled || d.loading
|
|
237
237
|
}), {
|
|
238
|
-
default:
|
|
239
|
-
|
|
238
|
+
default: V(() => [
|
|
239
|
+
d.loading ? (t(), o("span", H, "Cargando...")) : N(h.$slots, "default", { key: 0 })
|
|
240
240
|
]),
|
|
241
241
|
_: 3
|
|
242
242
|
}, 16, ["class", "title", "disabled"]));
|
|
243
243
|
}
|
|
244
|
-
}),
|
|
245
|
-
key: 0,
|
|
246
|
-
class: "dk:text-rose-500"
|
|
247
|
-
}, Q = ["type", "value", "disabled", "placeholder", "required", "name", "id", "pattern", "readonly", "min", "max", "step", "aria-label", "aria-disabled", "aria-required"], U = `
|
|
244
|
+
}), G = ["value"], J = `
|
|
248
245
|
dk:border-b
|
|
249
246
|
dk:border-zinc-300
|
|
250
247
|
dk:bg-zinc-50
|
|
@@ -256,17 +253,14 @@ const H = { key: 1 }, G = `
|
|
|
256
253
|
dk:dark:bg-zinc-800
|
|
257
254
|
dk:dark:text-zinc-100
|
|
258
255
|
dk:dark:focus:bg-zinc-700
|
|
259
|
-
dk:dark:[color-scheme:dark]`,
|
|
256
|
+
dk:dark:[color-scheme:dark]`, fe = /* @__PURE__ */ L({
|
|
257
|
+
inheritAttrs: !1,
|
|
260
258
|
__name: "DuiInput",
|
|
261
259
|
props: {
|
|
262
260
|
modelValue: {
|
|
263
261
|
type: [String, Number],
|
|
264
262
|
default: ""
|
|
265
263
|
},
|
|
266
|
-
type: {
|
|
267
|
-
type: String,
|
|
268
|
-
default: "text"
|
|
269
|
-
},
|
|
270
264
|
size: {
|
|
271
265
|
type: String,
|
|
272
266
|
default: "md"
|
|
@@ -275,122 +269,39 @@ const H = { key: 1 }, G = `
|
|
|
275
269
|
type: Boolean,
|
|
276
270
|
default: !0
|
|
277
271
|
},
|
|
278
|
-
disabled: {
|
|
279
|
-
type: Boolean,
|
|
280
|
-
default: !1
|
|
281
|
-
},
|
|
282
|
-
placeholder: {
|
|
283
|
-
type: String,
|
|
284
|
-
default: void 0
|
|
285
|
-
},
|
|
286
|
-
name: {
|
|
287
|
-
type: String,
|
|
288
|
-
default: void 0
|
|
289
|
-
},
|
|
290
|
-
id: {
|
|
291
|
-
type: String,
|
|
292
|
-
default: void 0
|
|
293
|
-
},
|
|
294
|
-
required: {
|
|
295
|
-
type: Boolean,
|
|
296
|
-
default: !1
|
|
297
|
-
},
|
|
298
|
-
label: {
|
|
299
|
-
type: String,
|
|
300
|
-
default: void 0
|
|
301
|
-
},
|
|
302
|
-
pattern: {
|
|
303
|
-
type: String,
|
|
304
|
-
default: void 0
|
|
305
|
-
},
|
|
306
|
-
readonly: {
|
|
307
|
-
type: Boolean,
|
|
308
|
-
default: !1
|
|
309
|
-
},
|
|
310
272
|
rounded: {
|
|
311
273
|
type: String,
|
|
312
274
|
default: "all"
|
|
313
|
-
},
|
|
314
|
-
min: {
|
|
315
|
-
type: [String, Number],
|
|
316
|
-
default: void 0
|
|
317
|
-
},
|
|
318
|
-
max: {
|
|
319
|
-
type: [String, Number],
|
|
320
|
-
default: void 0
|
|
321
|
-
},
|
|
322
|
-
step: {
|
|
323
|
-
type: [String, Number],
|
|
324
|
-
default: void 0
|
|
325
|
-
},
|
|
326
|
-
autocomplete: {
|
|
327
|
-
type: String,
|
|
328
|
-
default: void 0
|
|
329
275
|
}
|
|
330
276
|
},
|
|
331
277
|
emits: ["update:modelValue"],
|
|
332
|
-
setup(
|
|
333
|
-
const
|
|
278
|
+
setup(i, { emit: d }) {
|
|
279
|
+
const k = i, e = d;
|
|
334
280
|
function u(l) {
|
|
335
|
-
const
|
|
336
|
-
|
|
281
|
+
const c = l.target;
|
|
282
|
+
e("update:modelValue", c.value);
|
|
337
283
|
}
|
|
338
284
|
const b = {
|
|
339
285
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
340
286
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
341
287
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
342
|
-
},
|
|
288
|
+
}, g = {
|
|
343
289
|
all: "dk:rounded",
|
|
344
290
|
top: "dk:rounded-t",
|
|
345
291
|
bottom: "dk:rounded-b",
|
|
346
292
|
left: "dk:rounded-l",
|
|
347
293
|
right: "dk:rounded-r",
|
|
348
294
|
none: "dk:rounded-none"
|
|
349
|
-
},
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
lg: "dk:text-lg dk:pb-2"
|
|
353
|
-
}, x = i(() => {
|
|
354
|
-
const l = b[e.size] || "", g = e.block ? "dk:w-full" : "", o = c[e.rounded] || "";
|
|
355
|
-
return [U, l, g, o].join(" ");
|
|
356
|
-
}), m = i(() => {
|
|
357
|
-
const l = z[e.size] || "", g = e.block ? "dk:w-full" : "";
|
|
358
|
-
return [l, g].join(" ");
|
|
295
|
+
}, f = s(() => {
|
|
296
|
+
const l = b[k.size] || "", c = k.block ? "dk:w-full" : "", n = g[k.rounded] || "";
|
|
297
|
+
return [J, l, c, n].join(" ");
|
|
359
298
|
});
|
|
360
|
-
return (l,
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
class: y([m.value, "dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])
|
|
365
|
-
}, [
|
|
366
|
-
S(w(e.label) + " ", 1),
|
|
367
|
-
e.required ? (r(), a("span", K, "*")) : v("", !0)
|
|
368
|
-
], 10, J)) : v("", !0),
|
|
369
|
-
s("input", {
|
|
370
|
-
type: e.type,
|
|
371
|
-
class: y(x.value),
|
|
372
|
-
value: h.modelValue,
|
|
373
|
-
disabled: e.disabled,
|
|
374
|
-
placeholder: e.placeholder,
|
|
375
|
-
required: e.required,
|
|
376
|
-
name: e.name,
|
|
377
|
-
id: e.id,
|
|
378
|
-
pattern: e.pattern,
|
|
379
|
-
readonly: e.readonly,
|
|
380
|
-
min: e.min,
|
|
381
|
-
max: e.max,
|
|
382
|
-
step: e.step,
|
|
383
|
-
"aria-label": e.placeholder,
|
|
384
|
-
"aria-disabled": e.disabled,
|
|
385
|
-
"aria-required": e.required,
|
|
386
|
-
onInput: u
|
|
387
|
-
}, null, 42, Q)
|
|
388
|
-
]));
|
|
299
|
+
return (l, c) => (t(), o("input", w({
|
|
300
|
+
class: f.value,
|
|
301
|
+
value: i.modelValue
|
|
302
|
+
}, l.$attrs, { onInput: u }), null, 16, G));
|
|
389
303
|
}
|
|
390
|
-
}),
|
|
391
|
-
key: 0,
|
|
392
|
-
class: "dk:text-rose-500"
|
|
393
|
-
}, Y = ["value", "disabled", "placeholder", "required", "name", "id", "readonly", "aria-label", "aria-disabled", "aria-required"], Z = `
|
|
304
|
+
}), K = ["value"], Q = `
|
|
394
305
|
dk:border-b
|
|
395
306
|
dk:border-zinc-300
|
|
396
307
|
dk:bg-zinc-50
|
|
@@ -402,7 +313,8 @@ const H = { key: 1 }, G = `
|
|
|
402
313
|
dk:dark:bg-zinc-800
|
|
403
314
|
dk:dark:text-zinc-100
|
|
404
315
|
dk:dark:focus:bg-zinc-700
|
|
405
|
-
dk:dark:[color-scheme:dark]`,
|
|
316
|
+
dk:dark:[color-scheme:dark]`, ze = /* @__PURE__ */ L({
|
|
317
|
+
inheritAttrs: !1,
|
|
406
318
|
__name: "DuiTextarea",
|
|
407
319
|
props: {
|
|
408
320
|
modelValue: {
|
|
@@ -417,34 +329,6 @@ const H = { key: 1 }, G = `
|
|
|
417
329
|
type: Boolean,
|
|
418
330
|
default: !0
|
|
419
331
|
},
|
|
420
|
-
disabled: {
|
|
421
|
-
type: Boolean,
|
|
422
|
-
default: !1
|
|
423
|
-
},
|
|
424
|
-
placeholder: {
|
|
425
|
-
type: String,
|
|
426
|
-
default: void 0
|
|
427
|
-
},
|
|
428
|
-
name: {
|
|
429
|
-
type: String,
|
|
430
|
-
default: void 0
|
|
431
|
-
},
|
|
432
|
-
id: {
|
|
433
|
-
type: String,
|
|
434
|
-
default: void 0
|
|
435
|
-
},
|
|
436
|
-
required: {
|
|
437
|
-
type: Boolean,
|
|
438
|
-
default: !1
|
|
439
|
-
},
|
|
440
|
-
label: {
|
|
441
|
-
type: String,
|
|
442
|
-
default: void 0
|
|
443
|
-
},
|
|
444
|
-
readonly: {
|
|
445
|
-
type: Boolean,
|
|
446
|
-
default: !1
|
|
447
|
-
},
|
|
448
332
|
rounded: {
|
|
449
333
|
type: String,
|
|
450
334
|
default: "all"
|
|
@@ -459,75 +343,46 @@ const H = { key: 1 }, G = `
|
|
|
459
343
|
}
|
|
460
344
|
},
|
|
461
345
|
emits: ["update:modelValue"],
|
|
462
|
-
setup(
|
|
463
|
-
const
|
|
464
|
-
function u(
|
|
465
|
-
const
|
|
466
|
-
|
|
346
|
+
setup(i, { emit: d }) {
|
|
347
|
+
const k = i, e = d;
|
|
348
|
+
function u(n) {
|
|
349
|
+
const x = n.target;
|
|
350
|
+
k.autoheight && c(x), e("update:modelValue", x.value);
|
|
467
351
|
}
|
|
468
352
|
const b = {
|
|
469
353
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
470
354
|
md: "dk:text-base dk:px-3 dk:py-2",
|
|
471
355
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
472
|
-
},
|
|
356
|
+
}, g = {
|
|
473
357
|
all: "dk:rounded",
|
|
474
358
|
top: "dk:rounded-t",
|
|
475
359
|
bottom: "dk:rounded-b",
|
|
476
360
|
left: "dk:rounded-l",
|
|
477
361
|
right: "dk:rounded-r",
|
|
478
362
|
none: "dk:rounded-none"
|
|
479
|
-
},
|
|
480
|
-
sm: "dk:text-sm dk:pb-0.5",
|
|
481
|
-
md: "dk:text-base dk:pb-1",
|
|
482
|
-
lg: "dk:text-lg dk:pb-2"
|
|
483
|
-
}, x = {
|
|
363
|
+
}, f = {
|
|
484
364
|
none: "dk:resize-none",
|
|
485
365
|
both: "dk:resize",
|
|
486
366
|
horizontal: "dk:resize-x",
|
|
487
367
|
vertical: "dk:resize-y"
|
|
488
|
-
},
|
|
489
|
-
const
|
|
490
|
-
return [
|
|
491
|
-
}),
|
|
492
|
-
|
|
493
|
-
return [o, p].join(" ");
|
|
494
|
-
}), g = (o) => {
|
|
495
|
-
o.style.height = "auto", o.style.height = `${o.scrollHeight + 5}px`;
|
|
368
|
+
}, l = s(() => {
|
|
369
|
+
const n = b[k.size] || "", x = k.block ? "dk:w-full" : "", h = g[k.rounded] || "", C = f[k.resize] || "";
|
|
370
|
+
return [Q, n, x, h, C].join(" ");
|
|
371
|
+
}), c = (n) => {
|
|
372
|
+
n.style.height = "auto", n.style.height = `${n.scrollHeight + 5}px`;
|
|
496
373
|
};
|
|
497
|
-
return (
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}, [
|
|
503
|
-
S(w(e.label) + " ", 1),
|
|
504
|
-
e.required ? (r(), a("span", X, "*")) : v("", !0)
|
|
505
|
-
], 10, W)) : v("", !0),
|
|
506
|
-
s("textarea", {
|
|
507
|
-
class: y(m.value),
|
|
508
|
-
value: h.modelValue,
|
|
509
|
-
disabled: e.disabled,
|
|
510
|
-
placeholder: e.placeholder,
|
|
511
|
-
required: e.required,
|
|
512
|
-
name: e.name,
|
|
513
|
-
id: e.id,
|
|
514
|
-
readonly: e.readonly,
|
|
515
|
-
"aria-label": e.placeholder,
|
|
516
|
-
"aria-disabled": e.disabled,
|
|
517
|
-
"aria-required": e.required,
|
|
518
|
-
onInput: u
|
|
519
|
-
}, null, 42, Y)
|
|
520
|
-
]));
|
|
374
|
+
return (n, x) => (t(), o("textarea", w(n.$attrs, {
|
|
375
|
+
class: l.value,
|
|
376
|
+
value: i.modelValue,
|
|
377
|
+
onInput: u
|
|
378
|
+
}), null, 16, K));
|
|
521
379
|
}
|
|
522
|
-
}),
|
|
523
|
-
key: 0,
|
|
524
|
-
class: "dk:text-rose-500"
|
|
525
|
-
}, re = ["id", "name", "disabled", "required", "readonly", "aria-label", "aria-disabled", "aria-required"], te = {
|
|
380
|
+
}), U = {
|
|
526
381
|
key: 0,
|
|
527
382
|
disabled: "",
|
|
528
383
|
selected: "",
|
|
529
384
|
hidden: ""
|
|
530
|
-
},
|
|
385
|
+
}, X = ["value", "selected"], Y = `
|
|
531
386
|
dk:border-b
|
|
532
387
|
dk:border-zinc-300
|
|
533
388
|
dk:bg-zinc-50
|
|
@@ -540,7 +395,8 @@ const H = { key: 1 }, G = `
|
|
|
540
395
|
dk:dark:text-zinc-100
|
|
541
396
|
dk:dark:focus:bg-zinc-700
|
|
542
397
|
dk:dark:[color-scheme:dark]
|
|
543
|
-
`,
|
|
398
|
+
`, we = /* @__PURE__ */ L({
|
|
399
|
+
inheritAttrs: !1,
|
|
544
400
|
__name: "DuiSelect",
|
|
545
401
|
props: {
|
|
546
402
|
modelValue: {
|
|
@@ -559,34 +415,6 @@ const H = { key: 1 }, G = `
|
|
|
559
415
|
type: Boolean,
|
|
560
416
|
default: !0
|
|
561
417
|
},
|
|
562
|
-
disabled: {
|
|
563
|
-
type: Boolean,
|
|
564
|
-
default: !1
|
|
565
|
-
},
|
|
566
|
-
name: {
|
|
567
|
-
type: String,
|
|
568
|
-
default: void 0
|
|
569
|
-
},
|
|
570
|
-
id: {
|
|
571
|
-
type: String,
|
|
572
|
-
default: void 0
|
|
573
|
-
},
|
|
574
|
-
required: {
|
|
575
|
-
type: Boolean,
|
|
576
|
-
default: !1
|
|
577
|
-
},
|
|
578
|
-
label: {
|
|
579
|
-
type: String,
|
|
580
|
-
default: void 0
|
|
581
|
-
},
|
|
582
|
-
placeholder: {
|
|
583
|
-
type: String,
|
|
584
|
-
default: void 0
|
|
585
|
-
},
|
|
586
|
-
readonly: {
|
|
587
|
-
type: Boolean,
|
|
588
|
-
default: !1
|
|
589
|
-
},
|
|
590
418
|
rounded: {
|
|
591
419
|
type: String,
|
|
592
420
|
default: "all"
|
|
@@ -598,74 +426,53 @@ const H = { key: 1 }, G = `
|
|
|
598
426
|
itemValue: {
|
|
599
427
|
type: String,
|
|
600
428
|
default: "value"
|
|
429
|
+
},
|
|
430
|
+
placeholder: {
|
|
431
|
+
type: String,
|
|
432
|
+
default: void 0
|
|
601
433
|
}
|
|
602
434
|
},
|
|
603
435
|
emits: ["update:modelValue"],
|
|
604
|
-
setup(
|
|
605
|
-
const
|
|
436
|
+
setup(i, { emit: d }) {
|
|
437
|
+
const k = i, e = d;
|
|
606
438
|
function u(l) {
|
|
607
|
-
const
|
|
608
|
-
!isNaN(
|
|
439
|
+
const n = l.target.value, x = Number(n);
|
|
440
|
+
!isNaN(x) && n !== "" ? e("update:modelValue", x) : e("update:modelValue", n);
|
|
609
441
|
}
|
|
610
442
|
const b = {
|
|
611
443
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
612
444
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
613
445
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
614
|
-
},
|
|
446
|
+
}, g = {
|
|
615
447
|
all: "dk:rounded",
|
|
616
448
|
top: "dk:rounded-t",
|
|
617
449
|
bottom: "dk:rounded-b",
|
|
618
450
|
left: "dk:rounded-l",
|
|
619
451
|
right: "dk:rounded-r",
|
|
620
452
|
none: "dk:rounded-none"
|
|
621
|
-
},
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
lg: "dk:text-lg dk:pb-2"
|
|
625
|
-
}, x = i(() => {
|
|
626
|
-
const l = b[e.size] || "", g = e.block ? "dk:w-full" : "", o = c[e.rounded] || "";
|
|
627
|
-
return [ae, l, g, o].join(" ");
|
|
628
|
-
}), m = i(() => {
|
|
629
|
-
const l = z[e.size] || "", g = e.block ? "dk:w-full" : "";
|
|
630
|
-
return [l, g].join(" ");
|
|
453
|
+
}, f = s(() => {
|
|
454
|
+
const l = b[k.size] || "", c = k.block ? "dk:w-full" : "", n = g[k.rounded] || "";
|
|
455
|
+
return [Y, l, c, n].join(" ");
|
|
631
456
|
});
|
|
632
|
-
return (l,
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
name: e.name,
|
|
644
|
-
disabled: e.disabled,
|
|
645
|
-
required: e.required,
|
|
646
|
-
class: y(x.value),
|
|
647
|
-
readonly: e.readonly,
|
|
648
|
-
"aria-label": e.label || "select input",
|
|
649
|
-
"aria-disabled": e.disabled,
|
|
650
|
-
"aria-required": e.required,
|
|
651
|
-
onChange: u
|
|
652
|
-
}, [
|
|
653
|
-
e.placeholder ? (r(), a("option", te, w(e.placeholder), 1)) : v("", !0),
|
|
654
|
-
(r(!0), a(C, null, V(e.options, (o, p) => (r(), a("option", {
|
|
655
|
-
key: p,
|
|
656
|
-
value: o[e.itemValue] ?? "",
|
|
657
|
-
selected: o[e.itemValue] == e.modelValue
|
|
658
|
-
}, w(o[e.itemLabel] ?? ""), 9, oe))), 128))
|
|
659
|
-
], 42, re)
|
|
660
|
-
]));
|
|
457
|
+
return (l, c) => (t(), o("select", w(l.$attrs, {
|
|
458
|
+
class: f.value,
|
|
459
|
+
onChange: u
|
|
460
|
+
}), [
|
|
461
|
+
i.placeholder ? (t(), o("option", U, _(i.placeholder), 1)) : y("", !0),
|
|
462
|
+
(t(!0), o($, null, P(i.options, (n, x) => (t(), o("option", {
|
|
463
|
+
key: x,
|
|
464
|
+
value: n[i.itemValue] ?? "",
|
|
465
|
+
selected: n[i.itemValue] == i.modelValue
|
|
466
|
+
}, _(n[i.itemLabel] ?? ""), 9, X))), 128))
|
|
467
|
+
], 16));
|
|
661
468
|
}
|
|
662
|
-
}),
|
|
469
|
+
}), Z = `
|
|
663
470
|
dk:px-4
|
|
664
471
|
dk:py-3
|
|
665
472
|
dk:text-sm
|
|
666
473
|
dk:leading-relaxed
|
|
667
474
|
dk:max-w-full
|
|
668
|
-
`,
|
|
475
|
+
`, Ce = /* @__PURE__ */ L({
|
|
669
476
|
__name: "DuiAlert",
|
|
670
477
|
props: {
|
|
671
478
|
variant: {
|
|
@@ -681,15 +488,15 @@ const H = { key: 1 }, G = `
|
|
|
681
488
|
default: "all"
|
|
682
489
|
}
|
|
683
490
|
},
|
|
684
|
-
setup(
|
|
685
|
-
const
|
|
491
|
+
setup(i) {
|
|
492
|
+
const d = i, k = {
|
|
686
493
|
all: "dk:rounded",
|
|
687
494
|
top: "dk:rounded-t",
|
|
688
495
|
bottom: "dk:rounded-b",
|
|
689
496
|
left: "dk:rounded-l",
|
|
690
497
|
right: "dk:rounded-r",
|
|
691
498
|
none: "dk:rounded-none"
|
|
692
|
-
},
|
|
499
|
+
}, e = {
|
|
693
500
|
solid: {
|
|
694
501
|
base: "",
|
|
695
502
|
neutral: "dk:bg-zinc-200 dk:text-zinc-800 dk:dark:bg-zinc-700 dk:dark:text-zinc-100",
|
|
@@ -717,19 +524,19 @@ const H = { key: 1 }, G = `
|
|
|
717
524
|
warning: "dk:text-amber-700 dk:dark:text-amber-200 dk:bg-amber-50 dk:dark:bg-amber-800",
|
|
718
525
|
danger: "dk:text-rose-700 dk:dark:text-rose-200 dk:bg-rose-50 dk:dark:bg-rose-800"
|
|
719
526
|
}
|
|
720
|
-
}, u =
|
|
721
|
-
var
|
|
722
|
-
const b = ((
|
|
723
|
-
return [
|
|
527
|
+
}, u = s(() => {
|
|
528
|
+
var l;
|
|
529
|
+
const b = ((l = e[d.variant]) == null ? void 0 : l[d.color]) || "", g = e[d.variant].base || "", f = k[d.rounded] || "";
|
|
530
|
+
return [Z, g, b, f].join(" ");
|
|
724
531
|
});
|
|
725
|
-
return (b,
|
|
726
|
-
class:
|
|
532
|
+
return (b, g) => (t(), o("div", {
|
|
533
|
+
class: m(u.value),
|
|
727
534
|
role: "alert"
|
|
728
535
|
}, [
|
|
729
|
-
|
|
536
|
+
N(b.$slots, "default")
|
|
730
537
|
], 2));
|
|
731
538
|
}
|
|
732
|
-
}),
|
|
539
|
+
}), ee = { class: "dk:relative dk:overflow-x-auto dk:shadow-md dk:sm:rounded-lg" }, de = { class: "dk:w-full dk:text-sm dk:text-left dk:text-gray-700 dk:dark:text-gray-300" }, re = { class: "dk:text-xs dk:uppercase dk:bg-gray-100 dk:dark:bg-gray-700 dk:dark:text-gray-200" }, _e = /* @__PURE__ */ L({
|
|
733
540
|
__name: "DuiTable",
|
|
734
541
|
props: {
|
|
735
542
|
columns: {
|
|
@@ -741,29 +548,29 @@ const H = { key: 1 }, G = `
|
|
|
741
548
|
required: !0
|
|
742
549
|
}
|
|
743
550
|
},
|
|
744
|
-
setup(
|
|
745
|
-
const
|
|
746
|
-
return (
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
(
|
|
551
|
+
setup(i) {
|
|
552
|
+
const d = i;
|
|
553
|
+
return (k, e) => (t(), o("div", ee, [
|
|
554
|
+
p("table", de, [
|
|
555
|
+
p("thead", re, [
|
|
556
|
+
p("tr", null, [
|
|
557
|
+
(t(!0), o($, null, P(d.columns, (u) => (t(), o("th", {
|
|
751
558
|
key: u.name,
|
|
752
|
-
class:
|
|
753
|
-
},
|
|
559
|
+
class: m(["dk:px-6 dk:py-3", u.classes])
|
|
560
|
+
}, _(u.label), 3))), 128))
|
|
754
561
|
])
|
|
755
562
|
]),
|
|
756
|
-
|
|
757
|
-
(
|
|
563
|
+
p("tbody", null, [
|
|
564
|
+
(t(!0), o($, null, P(d.rows, (u, b) => (t(), o("tr", {
|
|
758
565
|
key: b,
|
|
759
566
|
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"
|
|
760
567
|
}, [
|
|
761
|
-
(
|
|
762
|
-
key:
|
|
568
|
+
(t(!0), o($, null, P(d.columns, (g) => (t(), o("td", {
|
|
569
|
+
key: g.name,
|
|
763
570
|
class: "dk:px-6 dk:py-4 dk:text-gray-900 dk:dark:text-gray-100"
|
|
764
571
|
}, [
|
|
765
|
-
|
|
766
|
-
|
|
572
|
+
N(k.$slots, g.name, w({ ref_for: !0 }, u), () => [
|
|
573
|
+
D(_(u[g.name]), 1)
|
|
767
574
|
])
|
|
768
575
|
]))), 128))
|
|
769
576
|
]))), 128))
|
|
@@ -771,7 +578,7 @@ const H = { key: 1 }, G = `
|
|
|
771
578
|
])
|
|
772
579
|
]));
|
|
773
580
|
}
|
|
774
|
-
}),
|
|
581
|
+
}), te = { key: 1 }, oe = `
|
|
775
582
|
dk:transition
|
|
776
583
|
dk:text-center
|
|
777
584
|
dk:disabled:opacity-50
|
|
@@ -782,7 +589,7 @@ const H = { key: 1 }, G = `
|
|
|
782
589
|
dk:text-ellipsis
|
|
783
590
|
dk:whitespace-nowrap
|
|
784
591
|
dk:active:scale-95
|
|
785
|
-
dk:max-w-full`,
|
|
592
|
+
dk:max-w-full`, $e = /* @__PURE__ */ L({
|
|
786
593
|
__name: "DuiAction",
|
|
787
594
|
props: {
|
|
788
595
|
variant: { default: "solid" },
|
|
@@ -794,34 +601,34 @@ const H = { key: 1 }, G = `
|
|
|
794
601
|
rounded: { default: "all" },
|
|
795
602
|
to: { default: void 0 }
|
|
796
603
|
},
|
|
797
|
-
setup(
|
|
798
|
-
const
|
|
604
|
+
setup(i) {
|
|
605
|
+
const d = i, k = M(), e = k == null ? void 0 : k.appContext.app, u = s(() => {
|
|
799
606
|
try {
|
|
800
|
-
return !!(
|
|
607
|
+
return !!(e != null && e.config.globalProperties.$router || e != null && e.config.globalProperties.$route || globalThis.VueRouter || e != null && e.component("RouterLink"));
|
|
801
608
|
} catch {
|
|
802
609
|
return !1;
|
|
803
610
|
}
|
|
804
|
-
}), b =
|
|
611
|
+
}), b = s(() => {
|
|
805
612
|
try {
|
|
806
|
-
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt ||
|
|
613
|
+
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt || e != null && e.component("NuxtLink"));
|
|
807
614
|
} catch {
|
|
808
615
|
return !1;
|
|
809
616
|
}
|
|
810
|
-
}),
|
|
811
|
-
const
|
|
812
|
-
return
|
|
813
|
-
}),
|
|
617
|
+
}), g = s(() => d.to ? b.value ? "NuxtLink" : u.value ? "RouterLink" : "a" : "span"), f = s(() => {
|
|
618
|
+
const h = {};
|
|
619
|
+
return g.value === "a" ? (h.href = typeof d.to == "string" ? d.to : "#", h.role = "button") : g.value !== "span" && (h.to = d.to), h;
|
|
620
|
+
}), l = {
|
|
814
621
|
sm: "dk:text-sm dk:px-3 dk:py-1.5",
|
|
815
622
|
md: "dk:text-base dk:px-4 dk:py-2",
|
|
816
623
|
lg: "dk:text-lg dk:px-5 dk:py-3"
|
|
817
|
-
},
|
|
624
|
+
}, c = {
|
|
818
625
|
all: "dk:rounded",
|
|
819
626
|
top: "dk:rounded-t",
|
|
820
627
|
bottom: "dk:rounded-b",
|
|
821
628
|
left: "dk:rounded-l",
|
|
822
629
|
right: "dk:rounded-r",
|
|
823
630
|
none: "dk:rounded-none"
|
|
824
|
-
},
|
|
631
|
+
}, n = {
|
|
825
632
|
solid: {
|
|
826
633
|
base: "dk:border-b",
|
|
827
634
|
neutral: `
|
|
@@ -993,64 +800,206 @@ const H = { key: 1 }, G = `
|
|
|
993
800
|
dk:dark:text-amber-100
|
|
994
801
|
dk:dark:hover:bg-amber-800`
|
|
995
802
|
}
|
|
996
|
-
},
|
|
997
|
-
var
|
|
998
|
-
const
|
|
999
|
-
return [
|
|
803
|
+
}, x = s(() => {
|
|
804
|
+
var S;
|
|
805
|
+
const h = (((S = n[d.variant]) == null ? void 0 : S[d.color]) || "") + " " + n[d.variant].base, C = l[d.size] || "", B = d.block ? "dk:block" : "dk:inline-block", R = c[d.rounded] || "";
|
|
806
|
+
return [oe, h, C, B, R].join(" ");
|
|
1000
807
|
});
|
|
1001
|
-
return (
|
|
1002
|
-
class:
|
|
1003
|
-
title:
|
|
808
|
+
return (h, C) => (t(), T(j(g.value), w(f.value, {
|
|
809
|
+
class: x.value,
|
|
810
|
+
title: d.title
|
|
1004
811
|
}), {
|
|
1005
|
-
default:
|
|
1006
|
-
|
|
812
|
+
default: V(() => [
|
|
813
|
+
d.loading ? (t(), o("span", te, "Cargando...")) : N(h.$slots, "default", { key: 0 })
|
|
1007
814
|
]),
|
|
1008
815
|
_: 3
|
|
1009
816
|
}, 16, ["class", "title"]));
|
|
1010
817
|
}
|
|
1011
|
-
}),
|
|
818
|
+
}), ke = {
|
|
819
|
+
key: 0,
|
|
820
|
+
class: "dk:relative dk:overflow-hidden dk:rounded-t-lg"
|
|
821
|
+
}, ae = ["src", "alt"], Se = /* @__PURE__ */ L({
|
|
822
|
+
__name: "DuiCard",
|
|
823
|
+
props: {
|
|
824
|
+
size: { default: "m" },
|
|
825
|
+
image: { default: void 0 },
|
|
826
|
+
title: { default: void 0 },
|
|
827
|
+
subtitle: { default: void 0 },
|
|
828
|
+
to: { default: void 0 }
|
|
829
|
+
},
|
|
830
|
+
setup(i) {
|
|
831
|
+
const d = i, k = M(), e = k == null ? void 0 : k.appContext.app, u = s(() => {
|
|
832
|
+
try {
|
|
833
|
+
return !!(e != null && e.config.globalProperties.$router || e != null && e.config.globalProperties.$route || globalThis.VueRouter || e != null && e.component("RouterLink"));
|
|
834
|
+
} catch {
|
|
835
|
+
return !1;
|
|
836
|
+
}
|
|
837
|
+
}), b = s(() => {
|
|
838
|
+
try {
|
|
839
|
+
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt || e != null && e.component("NuxtLink"));
|
|
840
|
+
} catch {
|
|
841
|
+
return !1;
|
|
842
|
+
}
|
|
843
|
+
}), g = () => d.to ? b.value ? "NuxtLink" : u.value ? "RouterLink" : "a" : "div", f = () => d.to ? b.value ? "NuxtLink" : u.value ? "RouterLink" : "a" : "h3", l = () => {
|
|
844
|
+
const r = {};
|
|
845
|
+
if (!d.to) return r;
|
|
846
|
+
const v = g();
|
|
847
|
+
return v === "a" ? r.href = typeof d.to == "string" ? d.to : "#" : (v === "RouterLink" || v === "NuxtLink") && (r.to = d.to), r;
|
|
848
|
+
}, c = {
|
|
849
|
+
s: {
|
|
850
|
+
padding: "dk:p-3",
|
|
851
|
+
spacing: "dk:space-y-2",
|
|
852
|
+
titleSize: "dk:text-base",
|
|
853
|
+
subtitleSize: "dk:text-sm",
|
|
854
|
+
contentSize: "dk:text-sm"
|
|
855
|
+
},
|
|
856
|
+
m: {
|
|
857
|
+
padding: "dk:p-4",
|
|
858
|
+
spacing: "dk:space-y-3",
|
|
859
|
+
titleSize: "dk:text-lg",
|
|
860
|
+
subtitleSize: "dk:text-base",
|
|
861
|
+
contentSize: "dk:text-base"
|
|
862
|
+
},
|
|
863
|
+
l: {
|
|
864
|
+
padding: "dk:p-6",
|
|
865
|
+
spacing: "dk:space-y-4",
|
|
866
|
+
titleSize: "dk:text-xl",
|
|
867
|
+
subtitleSize: "dk:text-lg",
|
|
868
|
+
contentSize: "dk:text-lg"
|
|
869
|
+
}
|
|
870
|
+
}, n = s(() => [
|
|
871
|
+
// Base card styles
|
|
872
|
+
"dk:bg-white dk:rounded-lg dk:shadow-md dk:border dk:border-gray-200",
|
|
873
|
+
"dk:dark:bg-gray-800 dk:dark:border-gray-700 dk:dark:shadow-gray-900/20",
|
|
874
|
+
"dk:transition-all dk:duration-200",
|
|
875
|
+
"dk:hover:shadow-lg dk:dark:hover:shadow-gray-900/40",
|
|
876
|
+
"dk:overflow-hidden"
|
|
877
|
+
].join(" ")), x = s(() => [
|
|
878
|
+
"dk:w-full dk:h-48 dk:object-cover"
|
|
879
|
+
].join(" ")), h = s(() => {
|
|
880
|
+
const r = c[d.size];
|
|
881
|
+
return [
|
|
882
|
+
r.padding,
|
|
883
|
+
r.spacing
|
|
884
|
+
].join(" ");
|
|
885
|
+
}), C = s(() => [
|
|
886
|
+
c[d.size].spacing
|
|
887
|
+
].join(" ")), B = s(() => {
|
|
888
|
+
const v = [
|
|
889
|
+
c[d.size].titleSize,
|
|
890
|
+
"dk:font-semibold dk:text-gray-900 dk:dark:text-gray-100",
|
|
891
|
+
"dk:line-clamp-2"
|
|
892
|
+
];
|
|
893
|
+
return d.to && v.push(
|
|
894
|
+
"dk:no-underline dk:hover:underline dk:transition-colors",
|
|
895
|
+
"dk:hover:text-blue-600 dk:dark:hover:text-blue-400"
|
|
896
|
+
), v.join(" ");
|
|
897
|
+
}), R = s(() => d.to ? [
|
|
898
|
+
"dk:block dk:no-underline",
|
|
899
|
+
"dk:transition-transform dk:duration-200",
|
|
900
|
+
"dk:hover:scale-105"
|
|
901
|
+
].join(" ") : "dk:block"), S = s(() => [
|
|
902
|
+
c[d.size].subtitleSize,
|
|
903
|
+
"dk:text-gray-600 dk:dark:text-gray-400",
|
|
904
|
+
"dk:line-clamp-3"
|
|
905
|
+
].join(" ")), A = s(() => [
|
|
906
|
+
c[d.size].contentSize,
|
|
907
|
+
"dk:text-gray-700 dk:dark:text-gray-300"
|
|
908
|
+
].join(" ")), I = s(() => [
|
|
909
|
+
"dk:border-t dk:border-gray-200 dk:dark:border-gray-700",
|
|
910
|
+
"dk:pt-3 dk:mt-3"
|
|
911
|
+
].join(" "));
|
|
912
|
+
return (r, v) => (t(), o("div", {
|
|
913
|
+
class: m(n.value)
|
|
914
|
+
}, [
|
|
915
|
+
r.image ? (t(), o("div", ke, [
|
|
916
|
+
(t(), T(j(g()), w(l(), { class: R.value }), {
|
|
917
|
+
default: V(() => [
|
|
918
|
+
p("img", {
|
|
919
|
+
src: r.image,
|
|
920
|
+
alt: r.title || "Card image",
|
|
921
|
+
class: m(x.value)
|
|
922
|
+
}, null, 10, ae)
|
|
923
|
+
]),
|
|
924
|
+
_: 1
|
|
925
|
+
}, 16, ["class"]))
|
|
926
|
+
])) : y("", !0),
|
|
927
|
+
p("div", {
|
|
928
|
+
class: m(h.value)
|
|
929
|
+
}, [
|
|
930
|
+
r.title || r.subtitle ? (t(), o("div", {
|
|
931
|
+
key: 0,
|
|
932
|
+
class: m(C.value)
|
|
933
|
+
}, [
|
|
934
|
+
r.title ? (t(), T(j(f()), w({ key: 0 }, l(), { class: B.value }), {
|
|
935
|
+
default: V(() => [
|
|
936
|
+
D(_(r.title), 1)
|
|
937
|
+
]),
|
|
938
|
+
_: 1
|
|
939
|
+
}, 16, ["class"])) : y("", !0),
|
|
940
|
+
r.subtitle ? (t(), o("p", {
|
|
941
|
+
key: 1,
|
|
942
|
+
class: m(S.value)
|
|
943
|
+
}, _(r.subtitle), 3)) : y("", !0)
|
|
944
|
+
], 2)) : y("", !0),
|
|
945
|
+
r.$slots.default ? (t(), o("div", {
|
|
946
|
+
key: 1,
|
|
947
|
+
class: m(A.value)
|
|
948
|
+
}, [
|
|
949
|
+
N(r.$slots, "default")
|
|
950
|
+
], 2)) : y("", !0),
|
|
951
|
+
r.$slots.footer ? (t(), o("div", {
|
|
952
|
+
key: 2,
|
|
953
|
+
class: m(I.value)
|
|
954
|
+
}, [
|
|
955
|
+
N(r.$slots, "footer")
|
|
956
|
+
], 2)) : y("", !0)
|
|
957
|
+
], 2)
|
|
958
|
+
], 2));
|
|
959
|
+
}
|
|
960
|
+
}), ne = {
|
|
1012
961
|
key: 0,
|
|
1013
962
|
class: "dk:flex dk:items-center dk:gap-4"
|
|
1014
|
-
},
|
|
963
|
+
}, se = { class: "dk:hidden dk:md:flex dk:items-center dk:space-x-1" }, le = {
|
|
1015
964
|
key: 0,
|
|
1016
965
|
class: "dk:relative dk:group"
|
|
1017
|
-
},
|
|
966
|
+
}, ie = { class: "dk:absolute dk:left-0 dk:top-full dk:min-w-48 dk:py-2 dk:mt-1 dk:bg-white dk:rounded-lg dk:shadow-lg dk:border dk:border-gray-200 dk:opacity-0 dk:invisible dk:group-hover:opacity-100 dk:group-hover:visible dk:transition-all dk:duration-200 dk:z-50 dk:dark:bg-gray-800 dk:dark:border-gray-700" }, ue = {
|
|
1018
967
|
key: 2,
|
|
1019
968
|
class: "dk:hidden dk:md:flex dk:items-center dk:gap-2"
|
|
1020
|
-
},
|
|
969
|
+
}, ce = { class: "dk:md:hidden dk:absolute dk:top-full dk:left-0 dk:w-full dk:bg-white dk:border-t dk:border-gray-200 dk:shadow-lg dk:dark:bg-gray-800 dk:dark:border-gray-700 dk:z-40" }, be = { class: "dk:px-4 dk:py-3 dk:space-y-2" }, ge = { key: 0 }, he = ["onClick"], pe = { class: "dk:flex dk:items-center dk:flex-1" }, ve = { class: "dk:ml-4 dk:mt-2 dk:space-y-1" }, xe = {
|
|
1021
970
|
key: 0,
|
|
1022
971
|
class: "dk:pt-3 dk:border-t dk:border-gray-200 dk:dark:border-gray-700"
|
|
1023
|
-
}, Te = /* @__PURE__ */
|
|
972
|
+
}, Te = /* @__PURE__ */ L({
|
|
1024
973
|
__name: "DuiNavbar",
|
|
1025
974
|
props: {
|
|
1026
975
|
items: { default: () => [] },
|
|
1027
976
|
size: { default: "m" }
|
|
1028
977
|
},
|
|
1029
|
-
setup(
|
|
1030
|
-
const
|
|
978
|
+
setup(i) {
|
|
979
|
+
const d = i, k = M(), e = k == null ? void 0 : k.appContext.app, u = q(!1), b = F({}), g = s(() => {
|
|
1031
980
|
try {
|
|
1032
|
-
return !!(
|
|
981
|
+
return !!(e != null && e.config.globalProperties.$router || e != null && e.config.globalProperties.$route || globalThis.VueRouter || e != null && e.component("RouterLink"));
|
|
1033
982
|
} catch {
|
|
1034
983
|
return !1;
|
|
1035
984
|
}
|
|
1036
|
-
}),
|
|
985
|
+
}), f = s(() => {
|
|
1037
986
|
try {
|
|
1038
|
-
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt ||
|
|
987
|
+
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt || e != null && e.component("NuxtLink"));
|
|
1039
988
|
} catch {
|
|
1040
989
|
return !1;
|
|
1041
990
|
}
|
|
1042
|
-
}),
|
|
1043
|
-
const
|
|
1044
|
-
return
|
|
1045
|
-
},
|
|
991
|
+
}), l = (r) => r.to ? f.value ? "NuxtLink" : g.value ? "RouterLink" : "a" : "button", c = (r) => {
|
|
992
|
+
const v = {}, a = l(r);
|
|
993
|
+
return a === "a" ? v.href = typeof r.to == "string" ? r.to : "#" : a !== "button" && (v.to = r.to), v;
|
|
994
|
+
}, n = () => {
|
|
1046
995
|
u.value = !u.value;
|
|
1047
|
-
},
|
|
1048
|
-
u.value = !1, Object.keys(b).forEach((
|
|
1049
|
-
b[
|
|
996
|
+
}, x = () => {
|
|
997
|
+
u.value = !1, Object.keys(b).forEach((r) => {
|
|
998
|
+
b[r] = !1;
|
|
1050
999
|
});
|
|
1051
|
-
},
|
|
1052
|
-
b[
|
|
1053
|
-
},
|
|
1000
|
+
}, h = (r) => {
|
|
1001
|
+
b[r] = !b[r];
|
|
1002
|
+
}, C = {
|
|
1054
1003
|
s: {
|
|
1055
1004
|
height: "dk:h-12",
|
|
1056
1005
|
padding: "dk:px-3",
|
|
@@ -1069,61 +1018,61 @@ const H = { key: 1 }, G = `
|
|
|
1069
1018
|
text: "dk:text-lg",
|
|
1070
1019
|
itemPadding: "dk:px-4 dk:py-3"
|
|
1071
1020
|
}
|
|
1072
|
-
},
|
|
1073
|
-
const
|
|
1021
|
+
}, B = s(() => {
|
|
1022
|
+
const r = C[d.size];
|
|
1074
1023
|
return [
|
|
1075
1024
|
// Base classes
|
|
1076
1025
|
"dk:relative dk:bg-white dk:border-b dk:border-gray-200 dk:shadow-sm",
|
|
1077
1026
|
"dk:dark:bg-gray-800 dk:dark:border-gray-700",
|
|
1078
1027
|
"dk:flex dk:items-center dk:w-full",
|
|
1079
1028
|
// Conditional justify based on slots
|
|
1080
|
-
!!(
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1029
|
+
!!(k != null && k.slots.brand || k != null && k.slots.actions) ? "dk:justify-between" : "dk:justify-center dk:md:justify-start",
|
|
1030
|
+
r.height,
|
|
1031
|
+
r.padding,
|
|
1032
|
+
r.text
|
|
1084
1033
|
].join(" ");
|
|
1085
|
-
}),
|
|
1034
|
+
}), R = s(() => [
|
|
1086
1035
|
// Base styles
|
|
1087
1036
|
"dk:flex dk:items-center dk:rounded-lg dk:transition-all dk:duration-200",
|
|
1088
1037
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:hover:bg-gray-100",
|
|
1089
1038
|
"dk:dark:text-gray-300 dk:dark:hover:text-gray-100 dk:dark:hover:bg-gray-700",
|
|
1090
1039
|
"dk:focus:outline-none dk:focus:ring-2 dk:focus:ring-gray-200 dk:dark:focus:ring-gray-600",
|
|
1091
1040
|
"dk:no-underline",
|
|
1092
|
-
|
|
1093
|
-
].join(" ")),
|
|
1041
|
+
C[d.size].itemPadding
|
|
1042
|
+
].join(" ")), S = s(() => [
|
|
1094
1043
|
"dk:block dk:w-full dk:text-left dk:px-4 dk:py-2 dk:text-sm",
|
|
1095
1044
|
"dk:text-gray-700 dk:hover:bg-gray-100 dk:hover:text-gray-900",
|
|
1096
1045
|
"dk:dark:text-gray-300 dk:dark:hover:bg-gray-700 dk:dark:hover:text-gray-100",
|
|
1097
1046
|
"dk:transition-colors dk:duration-200 dk:no-underline"
|
|
1098
|
-
].join(" ")),
|
|
1047
|
+
].join(" ")), A = s(() => [
|
|
1099
1048
|
"dk:flex dk:items-center dk:justify-between dk:w-full dk:text-left dk:px-3 dk:py-2",
|
|
1100
1049
|
"dk:text-gray-700 dk:hover:bg-gray-100 dk:hover:text-gray-900 dk:rounded-lg",
|
|
1101
1050
|
"dk:dark:text-gray-300 dk:dark:hover:bg-gray-700 dk:dark:hover:text-gray-100",
|
|
1102
1051
|
"dk:transition-colors dk:duration-200 dk:no-underline"
|
|
1103
|
-
].join(" ")),
|
|
1052
|
+
].join(" ")), I = s(() => [
|
|
1104
1053
|
"dk:block dk:w-full dk:text-left dk:px-3 dk:py-2 dk:text-sm dk:rounded-lg",
|
|
1105
1054
|
"dk:text-gray-600 dk:hover:bg-gray-100 dk:hover:text-gray-800",
|
|
1106
1055
|
"dk:dark:text-gray-400 dk:dark:hover:bg-gray-700 dk:dark:hover:text-gray-200",
|
|
1107
1056
|
"dk:transition-colors dk:duration-200 dk:no-underline"
|
|
1108
1057
|
].join(" "));
|
|
1109
|
-
return (
|
|
1110
|
-
class:
|
|
1058
|
+
return (r, v) => (t(), o("nav", {
|
|
1059
|
+
class: m(B.value)
|
|
1111
1060
|
}, [
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1061
|
+
r.$slots.brand ? (t(), o("div", ne, [
|
|
1062
|
+
N(r.$slots, "brand"),
|
|
1063
|
+
p("button", {
|
|
1115
1064
|
type: "button",
|
|
1116
1065
|
class: "dk:md:hidden dk:p-2 dk:rounded-lg dk:text-gray-500 dk:hover:bg-gray-100 dk:focus:outline-none dk:focus:ring-2 dk:focus:ring-gray-200 dk:dark:text-gray-400 dk:dark:hover:bg-gray-700 dk:dark:focus:ring-gray-600",
|
|
1117
|
-
onClick:
|
|
1118
|
-
},
|
|
1119
|
-
|
|
1120
|
-
|
|
1066
|
+
onClick: n
|
|
1067
|
+
}, v[0] || (v[0] = [
|
|
1068
|
+
p("span", { class: "dk:sr-only" }, "Open main menu", -1),
|
|
1069
|
+
p("svg", {
|
|
1121
1070
|
class: "dk:w-5 dk:h-5",
|
|
1122
1071
|
fill: "none",
|
|
1123
1072
|
stroke: "currentColor",
|
|
1124
1073
|
viewBox: "0 0 24 24"
|
|
1125
1074
|
}, [
|
|
1126
|
-
|
|
1075
|
+
p("path", {
|
|
1127
1076
|
"stroke-linecap": "round",
|
|
1128
1077
|
"stroke-linejoin": "round",
|
|
1129
1078
|
"stroke-width": "2",
|
|
@@ -1131,21 +1080,21 @@ const H = { key: 1 }, G = `
|
|
|
1131
1080
|
})
|
|
1132
1081
|
], -1)
|
|
1133
1082
|
]))
|
|
1134
|
-
])) :
|
|
1135
|
-
|
|
1083
|
+
])) : y("", !0),
|
|
1084
|
+
r.$slots.brand ? y("", !0) : (t(), o("button", {
|
|
1136
1085
|
key: 1,
|
|
1137
1086
|
type: "button",
|
|
1138
1087
|
class: "dk:md:hidden dk:p-2 dk:rounded-lg dk:text-gray-500 dk:hover:bg-gray-100 dk:focus:outline-none dk:focus:ring-2 dk:focus:ring-gray-200 dk:dark:text-gray-400 dk:dark:hover:bg-gray-700 dk:dark:focus:ring-gray-600",
|
|
1139
|
-
onClick:
|
|
1140
|
-
},
|
|
1141
|
-
|
|
1142
|
-
|
|
1088
|
+
onClick: n
|
|
1089
|
+
}, v[1] || (v[1] = [
|
|
1090
|
+
p("span", { class: "dk:sr-only" }, "Open main menu", -1),
|
|
1091
|
+
p("svg", {
|
|
1143
1092
|
class: "dk:w-5 dk:h-5",
|
|
1144
1093
|
fill: "none",
|
|
1145
1094
|
stroke: "currentColor",
|
|
1146
1095
|
viewBox: "0 0 24 24"
|
|
1147
1096
|
}, [
|
|
1148
|
-
|
|
1097
|
+
p("path", {
|
|
1149
1098
|
"stroke-linecap": "round",
|
|
1150
1099
|
"stroke-linejoin": "round",
|
|
1151
1100
|
"stroke-width": "2",
|
|
@@ -1153,25 +1102,25 @@ const H = { key: 1 }, G = `
|
|
|
1153
1102
|
})
|
|
1154
1103
|
], -1)
|
|
1155
1104
|
]))),
|
|
1156
|
-
|
|
1157
|
-
(
|
|
1158
|
-
key:
|
|
1105
|
+
p("div", se, [
|
|
1106
|
+
(t(!0), o($, null, P(r.items, (a) => (t(), o($, {
|
|
1107
|
+
key: a.label
|
|
1159
1108
|
}, [
|
|
1160
|
-
|
|
1161
|
-
(
|
|
1162
|
-
default:
|
|
1163
|
-
|
|
1109
|
+
a.children && a.children.length > 0 ? (t(), o("div", le, [
|
|
1110
|
+
(t(), T(j(l(a)), w({ ref_for: !0 }, c(a), { class: R.value }), {
|
|
1111
|
+
default: V(() => [
|
|
1112
|
+
a.icon ? (t(), o("i", {
|
|
1164
1113
|
key: 0,
|
|
1165
|
-
class:
|
|
1166
|
-
}, null, 2)) :
|
|
1167
|
-
|
|
1168
|
-
|
|
1114
|
+
class: m([a.icon, "dk:mr-2"])
|
|
1115
|
+
}, null, 2)) : y("", !0),
|
|
1116
|
+
D(" " + _(a.label) + " ", 1),
|
|
1117
|
+
v[2] || (v[2] = p("svg", {
|
|
1169
1118
|
class: "dk:w-4 dk:h-4 dk:ml-1 dk:transform dk:group-hover:rotate-180 dk:transition-transform",
|
|
1170
1119
|
fill: "none",
|
|
1171
1120
|
stroke: "currentColor",
|
|
1172
1121
|
viewBox: "0 0 24 24"
|
|
1173
1122
|
}, [
|
|
1174
|
-
|
|
1123
|
+
p("path", {
|
|
1175
1124
|
"stroke-linecap": "round",
|
|
1176
1125
|
"stroke-linejoin": "round",
|
|
1177
1126
|
"stroke-width": "2",
|
|
@@ -1181,125 +1130,126 @@ const H = { key: 1 }, G = `
|
|
|
1181
1130
|
]),
|
|
1182
1131
|
_: 2
|
|
1183
1132
|
}, 1040, ["class"])),
|
|
1184
|
-
|
|
1185
|
-
(
|
|
1186
|
-
key:
|
|
1133
|
+
p("div", ie, [
|
|
1134
|
+
(t(!0), o($, null, P(a.children, (z) => (t(), T(j(l(z)), w({
|
|
1135
|
+
key: z.label,
|
|
1187
1136
|
ref_for: !0
|
|
1188
|
-
},
|
|
1189
|
-
default:
|
|
1190
|
-
|
|
1137
|
+
}, c(z), { class: S.value }), {
|
|
1138
|
+
default: V(() => [
|
|
1139
|
+
z.icon ? (t(), o("i", {
|
|
1191
1140
|
key: 0,
|
|
1192
|
-
class:
|
|
1193
|
-
}, null, 2)) :
|
|
1194
|
-
|
|
1141
|
+
class: m([z.icon, "dk:mr-2"])
|
|
1142
|
+
}, null, 2)) : y("", !0),
|
|
1143
|
+
D(" " + _(z.label), 1)
|
|
1195
1144
|
]),
|
|
1196
1145
|
_: 2
|
|
1197
1146
|
}, 1040, ["class"]))), 128))
|
|
1198
1147
|
])
|
|
1199
|
-
])) : (
|
|
1148
|
+
])) : (t(), T(j(l(a)), w({
|
|
1200
1149
|
key: 1,
|
|
1201
1150
|
ref_for: !0
|
|
1202
|
-
},
|
|
1203
|
-
default:
|
|
1204
|
-
|
|
1151
|
+
}, c(a), { class: R.value }), {
|
|
1152
|
+
default: V(() => [
|
|
1153
|
+
a.icon ? (t(), o("i", {
|
|
1205
1154
|
key: 0,
|
|
1206
|
-
class:
|
|
1207
|
-
}, null, 2)) :
|
|
1208
|
-
|
|
1155
|
+
class: m([a.icon, "dk:mr-2"])
|
|
1156
|
+
}, null, 2)) : y("", !0),
|
|
1157
|
+
D(" " + _(a.label), 1)
|
|
1209
1158
|
]),
|
|
1210
1159
|
_: 2
|
|
1211
1160
|
}, 1040, ["class"]))
|
|
1212
1161
|
], 64))), 128))
|
|
1213
1162
|
]),
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
])) :
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
(
|
|
1220
|
-
key:
|
|
1163
|
+
r.$slots.actions ? (t(), o("div", ue, [
|
|
1164
|
+
N(r.$slots, "actions")
|
|
1165
|
+
])) : y("", !0),
|
|
1166
|
+
O(p("div", ce, [
|
|
1167
|
+
p("div", be, [
|
|
1168
|
+
(t(!0), o($, null, P(r.items, (a) => (t(), o($, {
|
|
1169
|
+
key: a.label
|
|
1221
1170
|
}, [
|
|
1222
|
-
|
|
1223
|
-
|
|
1171
|
+
a.children && a.children.length > 0 ? (t(), o("div", ge, [
|
|
1172
|
+
p("button", {
|
|
1224
1173
|
type: "button",
|
|
1225
|
-
onClick: (
|
|
1226
|
-
class:
|
|
1174
|
+
onClick: (z) => h(a.label),
|
|
1175
|
+
class: m(A.value)
|
|
1227
1176
|
}, [
|
|
1228
|
-
|
|
1229
|
-
|
|
1177
|
+
p("div", pe, [
|
|
1178
|
+
a.icon ? (t(), o("i", {
|
|
1230
1179
|
key: 0,
|
|
1231
|
-
class:
|
|
1232
|
-
}, null, 2)) :
|
|
1233
|
-
|
|
1180
|
+
class: m([a.icon, "dk:mr-2"])
|
|
1181
|
+
}, null, 2)) : y("", !0),
|
|
1182
|
+
D(" " + _(a.label), 1)
|
|
1234
1183
|
]),
|
|
1235
|
-
(
|
|
1236
|
-
class:
|
|
1184
|
+
(t(), o("svg", {
|
|
1185
|
+
class: m(["dk:w-4 dk:h-4 dk:transform dk:transition-transform", b[a.label] ? "dk:rotate-180" : ""]),
|
|
1237
1186
|
fill: "none",
|
|
1238
1187
|
stroke: "currentColor",
|
|
1239
1188
|
viewBox: "0 0 24 24"
|
|
1240
|
-
},
|
|
1241
|
-
|
|
1189
|
+
}, v[3] || (v[3] = [
|
|
1190
|
+
p("path", {
|
|
1242
1191
|
"stroke-linecap": "round",
|
|
1243
1192
|
"stroke-linejoin": "round",
|
|
1244
1193
|
"stroke-width": "2",
|
|
1245
1194
|
d: "M19 9l-7 7-7-7"
|
|
1246
1195
|
}, null, -1)
|
|
1247
1196
|
]), 2))
|
|
1248
|
-
], 10,
|
|
1249
|
-
|
|
1250
|
-
(
|
|
1251
|
-
key:
|
|
1197
|
+
], 10, he),
|
|
1198
|
+
O(p("div", ve, [
|
|
1199
|
+
(t(!0), o($, null, P(a.children, (z) => (t(), T(j(l(z)), w({
|
|
1200
|
+
key: z.label,
|
|
1252
1201
|
ref_for: !0
|
|
1253
|
-
},
|
|
1254
|
-
class:
|
|
1255
|
-
onClick:
|
|
1202
|
+
}, c(z), {
|
|
1203
|
+
class: I.value,
|
|
1204
|
+
onClick: x
|
|
1256
1205
|
}), {
|
|
1257
|
-
default:
|
|
1258
|
-
|
|
1206
|
+
default: V(() => [
|
|
1207
|
+
z.icon ? (t(), o("i", {
|
|
1259
1208
|
key: 0,
|
|
1260
|
-
class:
|
|
1261
|
-
}, null, 2)) :
|
|
1262
|
-
|
|
1209
|
+
class: m([z.icon, "dk:mr-2"])
|
|
1210
|
+
}, null, 2)) : y("", !0),
|
|
1211
|
+
D(" " + _(z.label), 1)
|
|
1263
1212
|
]),
|
|
1264
1213
|
_: 2
|
|
1265
1214
|
}, 1040, ["class"]))), 128))
|
|
1266
1215
|
], 512), [
|
|
1267
|
-
[
|
|
1216
|
+
[E, b[a.label]]
|
|
1268
1217
|
])
|
|
1269
|
-
])) : (
|
|
1218
|
+
])) : (t(), T(j(l(a)), w({
|
|
1270
1219
|
key: 1,
|
|
1271
1220
|
ref_for: !0
|
|
1272
|
-
},
|
|
1273
|
-
class:
|
|
1274
|
-
onClick:
|
|
1221
|
+
}, c(a), {
|
|
1222
|
+
class: A.value,
|
|
1223
|
+
onClick: x
|
|
1275
1224
|
}), {
|
|
1276
|
-
default:
|
|
1277
|
-
|
|
1225
|
+
default: V(() => [
|
|
1226
|
+
a.icon ? (t(), o("i", {
|
|
1278
1227
|
key: 0,
|
|
1279
|
-
class:
|
|
1280
|
-
}, null, 2)) :
|
|
1281
|
-
|
|
1228
|
+
class: m([a.icon, "dk:mr-2"])
|
|
1229
|
+
}, null, 2)) : y("", !0),
|
|
1230
|
+
D(" " + _(a.label), 1)
|
|
1282
1231
|
]),
|
|
1283
1232
|
_: 2
|
|
1284
1233
|
}, 1040, ["class"]))
|
|
1285
1234
|
], 64))), 128)),
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
])) :
|
|
1235
|
+
r.$slots.actions ? (t(), o("div", xe, [
|
|
1236
|
+
N(r.$slots, "actions")
|
|
1237
|
+
])) : y("", !0)
|
|
1289
1238
|
])
|
|
1290
1239
|
], 512), [
|
|
1291
|
-
[
|
|
1240
|
+
[E, u.value]
|
|
1292
1241
|
])
|
|
1293
1242
|
], 2));
|
|
1294
1243
|
}
|
|
1295
1244
|
});
|
|
1296
1245
|
export {
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1246
|
+
$e as DuiAction,
|
|
1247
|
+
Ce as DuiAlert,
|
|
1248
|
+
ye as DuiButton,
|
|
1249
|
+
Se as DuiCard,
|
|
1250
|
+
fe as DuiInput,
|
|
1301
1251
|
Te as DuiNavbar,
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1252
|
+
we as DuiSelect,
|
|
1253
|
+
_e as DuiTable,
|
|
1254
|
+
ze as DuiTextarea
|
|
1305
1255
|
};
|