@dronico/droni-kit 1.11.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 +13 -0
- package/dist/droni-kit.cjs.js +8 -8
- package/dist/droni-kit.css +1 -1
- package/dist/droni-kit.es.js +338 -531
- 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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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
2
|
const H = { key: 1 }, W = `
|
|
3
3
|
dk:transition
|
|
4
4
|
dk:text-center
|
|
@@ -10,7 +10,7 @@ const H = { key: 1 }, W = `
|
|
|
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 }, W = `
|
|
|
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
|
-
}),
|
|
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 }, W = `
|
|
|
225
225
|
dk:dark:text-amber-100
|
|
226
226
|
dk:dark:hover:bg-amber-800`
|
|
227
227
|
}
|
|
228
|
-
},
|
|
229
|
-
var
|
|
230
|
-
const
|
|
231
|
-
return [W,
|
|
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
|
-
}), G = ["
|
|
245
|
-
key: 0,
|
|
246
|
-
class: "dk:text-rose-500"
|
|
247
|
-
}, K = ["type", "value", "disabled", "placeholder", "required", "name", "id", "pattern", "readonly", "min", "max", "step", "aria-label", "aria-disabled", "aria-required"], Q = `
|
|
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 }, W = `
|
|
|
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 }, W = `
|
|
|
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
|
|
334
|
-
function l
|
|
335
|
-
const
|
|
336
|
-
|
|
278
|
+
setup(i, { emit: d }) {
|
|
279
|
+
const k = i, e = d;
|
|
280
|
+
function u(l) {
|
|
281
|
+
const c = l.target;
|
|
282
|
+
e("update:modelValue", c.value);
|
|
337
283
|
}
|
|
338
|
-
const
|
|
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
|
-
}, v = n(() => {
|
|
354
|
-
const i = c[e.size] || "", p = e.block ? "dk:w-full" : "", k = b[e.rounded] || "";
|
|
355
|
-
return [Q, i, p, k].join(" ");
|
|
356
|
-
}), y = n(() => {
|
|
357
|
-
const i = z[e.size] || "", p = e.block ? "dk:w-full" : "";
|
|
358
|
-
return [i, p].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 (
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
class: g([y.value, "dk:text-start dk:block dk:text-zinc-700 dk:dark:text-zinc-200 dk:px-0"])
|
|
365
|
-
}, [
|
|
366
|
-
C(w(e.label) + " ", 1),
|
|
367
|
-
e.required ? (t(), a("span", J, "*")) : x("", !0)
|
|
368
|
-
], 10, G)) : x("", !0),
|
|
369
|
-
u("input", {
|
|
370
|
-
type: e.type,
|
|
371
|
-
class: g(v.value),
|
|
372
|
-
value: f.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: l
|
|
387
|
-
}, null, 42, K)
|
|
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 }, W = `
|
|
|
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 }, W = `
|
|
|
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 }, W = `
|
|
|
459
343
|
}
|
|
460
344
|
},
|
|
461
345
|
emits: ["update:modelValue"],
|
|
462
|
-
setup(
|
|
463
|
-
const
|
|
464
|
-
function
|
|
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
|
-
const
|
|
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
|
-
}, v = {
|
|
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 [k, h].join(" ");
|
|
494
|
-
}), p = (k) => {
|
|
495
|
-
k.style.height = "auto", k.style.height = `${k.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
|
-
C(w(e.label) + " ", 1),
|
|
504
|
-
e.required ? (t(), a("span", X, "*")) : x("", !0)
|
|
505
|
-
], 10, U)) : x("", !0),
|
|
506
|
-
u("textarea", {
|
|
507
|
-
class: g(y.value),
|
|
508
|
-
value: f.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: l
|
|
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 }, W = `
|
|
|
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 }, W = `
|
|
|
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 }, W = `
|
|
|
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
|
|
606
|
-
function l
|
|
607
|
-
const
|
|
608
|
-
!isNaN(
|
|
436
|
+
setup(i, { emit: d }) {
|
|
437
|
+
const k = i, e = d;
|
|
438
|
+
function u(l) {
|
|
439
|
+
const n = l.target.value, x = Number(n);
|
|
440
|
+
!isNaN(x) && n !== "" ? e("update:modelValue", x) : e("update:modelValue", n);
|
|
609
441
|
}
|
|
610
|
-
const
|
|
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
|
-
}, v = n(() => {
|
|
626
|
-
const i = c[e.size] || "", p = e.block ? "dk:w-full" : "", k = b[e.rounded] || "";
|
|
627
|
-
return [ae, i, p, k].join(" ");
|
|
628
|
-
}), y = n(() => {
|
|
629
|
-
const i = z[e.size] || "", p = e.block ? "dk:w-full" : "";
|
|
630
|
-
return [i, p].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 (
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
name: e.name,
|
|
644
|
-
disabled: e.disabled,
|
|
645
|
-
required: e.required,
|
|
646
|
-
class: g(v.value),
|
|
647
|
-
readonly: e.readonly,
|
|
648
|
-
"aria-label": e.label || "select input",
|
|
649
|
-
"aria-disabled": e.disabled,
|
|
650
|
-
"aria-required": e.required,
|
|
651
|
-
onChange: l
|
|
652
|
-
}, [
|
|
653
|
-
e.placeholder ? (t(), a("option", te, w(e.placeholder), 1)) : x("", !0),
|
|
654
|
-
(t(!0), a($, null, D(e.options, (k, h) => (t(), a("option", {
|
|
655
|
-
key: h,
|
|
656
|
-
value: k[e.itemValue] ?? "",
|
|
657
|
-
selected: k[e.itemValue] == e.modelValue
|
|
658
|
-
}, w(k[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 }, W = `
|
|
|
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 }, W = `
|
|
|
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
|
-
},
|
|
721
|
-
var
|
|
722
|
-
const
|
|
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 (
|
|
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 }, W = `
|
|
|
741
548
|
required: !0
|
|
742
549
|
}
|
|
743
550
|
},
|
|
744
|
-
setup(
|
|
745
|
-
const
|
|
746
|
-
return (
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
(t(!0),
|
|
751
|
-
key:
|
|
752
|
-
class:
|
|
753
|
-
},
|
|
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", {
|
|
558
|
+
key: u.name,
|
|
559
|
+
class: m(["dk:px-6 dk:py-3", u.classes])
|
|
560
|
+
}, _(u.label), 3))), 128))
|
|
754
561
|
])
|
|
755
562
|
]),
|
|
756
|
-
|
|
757
|
-
(t(!0),
|
|
758
|
-
key:
|
|
563
|
+
p("tbody", null, [
|
|
564
|
+
(t(!0), o($, null, P(d.rows, (u, b) => (t(), o("tr", {
|
|
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
|
-
(t(!0),
|
|
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 }, W = `
|
|
|
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 }, W = `
|
|
|
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 }, W = `
|
|
|
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
|
-
}),
|
|
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,25 +800,25 @@ const H = { key: 1 }, W = `
|
|
|
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 = {
|
|
1012
819
|
key: 0,
|
|
1013
820
|
class: "dk:relative dk:overflow-hidden dk:rounded-t-lg"
|
|
1014
|
-
},
|
|
821
|
+
}, ae = ["src", "alt"], Se = /* @__PURE__ */ L({
|
|
1015
822
|
__name: "DuiCard",
|
|
1016
823
|
props: {
|
|
1017
824
|
size: { default: "m" },
|
|
@@ -1020,25 +827,25 @@ const H = { key: 1 }, W = `
|
|
|
1020
827
|
subtitle: { default: void 0 },
|
|
1021
828
|
to: { default: void 0 }
|
|
1022
829
|
},
|
|
1023
|
-
setup(
|
|
1024
|
-
const
|
|
830
|
+
setup(i) {
|
|
831
|
+
const d = i, k = M(), e = k == null ? void 0 : k.appContext.app, u = s(() => {
|
|
1025
832
|
try {
|
|
1026
|
-
return !!(
|
|
833
|
+
return !!(e != null && e.config.globalProperties.$router || e != null && e.config.globalProperties.$route || globalThis.VueRouter || e != null && e.component("RouterLink"));
|
|
1027
834
|
} catch {
|
|
1028
835
|
return !1;
|
|
1029
836
|
}
|
|
1030
|
-
}),
|
|
837
|
+
}), b = s(() => {
|
|
1031
838
|
try {
|
|
1032
|
-
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt ||
|
|
839
|
+
return !!(globalThis.$nuxt || globalThis.useNuxtApp || globalThis.navigateTo || typeof window < "u" && window.$nuxt || e != null && e.component("NuxtLink"));
|
|
1033
840
|
} catch {
|
|
1034
841
|
return !1;
|
|
1035
842
|
}
|
|
1036
|
-
}),
|
|
1037
|
-
const
|
|
1038
|
-
if (!
|
|
1039
|
-
const
|
|
1040
|
-
return
|
|
1041
|
-
},
|
|
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 = {
|
|
1042
849
|
s: {
|
|
1043
850
|
padding: "dk:p-3",
|
|
1044
851
|
spacing: "dk:space-y-2",
|
|
@@ -1060,139 +867,139 @@ const H = { key: 1 }, W = `
|
|
|
1060
867
|
subtitleSize: "dk:text-lg",
|
|
1061
868
|
contentSize: "dk:text-lg"
|
|
1062
869
|
}
|
|
1063
|
-
},
|
|
870
|
+
}, n = s(() => [
|
|
1064
871
|
// Base card styles
|
|
1065
872
|
"dk:bg-white dk:rounded-lg dk:shadow-md dk:border dk:border-gray-200",
|
|
1066
873
|
"dk:dark:bg-gray-800 dk:dark:border-gray-700 dk:dark:shadow-gray-900/20",
|
|
1067
874
|
"dk:transition-all dk:duration-200",
|
|
1068
875
|
"dk:hover:shadow-lg dk:dark:hover:shadow-gray-900/40",
|
|
1069
876
|
"dk:overflow-hidden"
|
|
1070
|
-
].join(" ")),
|
|
877
|
+
].join(" ")), x = s(() => [
|
|
1071
878
|
"dk:w-full dk:h-48 dk:object-cover"
|
|
1072
|
-
].join(" ")),
|
|
1073
|
-
const
|
|
879
|
+
].join(" ")), h = s(() => {
|
|
880
|
+
const r = c[d.size];
|
|
1074
881
|
return [
|
|
1075
|
-
|
|
1076
|
-
|
|
882
|
+
r.padding,
|
|
883
|
+
r.spacing
|
|
1077
884
|
].join(" ");
|
|
1078
|
-
}),
|
|
1079
|
-
|
|
1080
|
-
].join(" ")),
|
|
1081
|
-
const
|
|
1082
|
-
|
|
885
|
+
}), C = s(() => [
|
|
886
|
+
c[d.size].spacing
|
|
887
|
+
].join(" ")), B = s(() => {
|
|
888
|
+
const v = [
|
|
889
|
+
c[d.size].titleSize,
|
|
1083
890
|
"dk:font-semibold dk:text-gray-900 dk:dark:text-gray-100",
|
|
1084
891
|
"dk:line-clamp-2"
|
|
1085
892
|
];
|
|
1086
|
-
return
|
|
893
|
+
return d.to && v.push(
|
|
1087
894
|
"dk:no-underline dk:hover:underline dk:transition-colors",
|
|
1088
895
|
"dk:hover:text-blue-600 dk:dark:hover:text-blue-400"
|
|
1089
|
-
),
|
|
1090
|
-
}),
|
|
896
|
+
), v.join(" ");
|
|
897
|
+
}), R = s(() => d.to ? [
|
|
1091
898
|
"dk:block dk:no-underline",
|
|
1092
899
|
"dk:transition-transform dk:duration-200",
|
|
1093
900
|
"dk:hover:scale-105"
|
|
1094
|
-
].join(" ") : "dk:block"),
|
|
1095
|
-
|
|
901
|
+
].join(" ") : "dk:block"), S = s(() => [
|
|
902
|
+
c[d.size].subtitleSize,
|
|
1096
903
|
"dk:text-gray-600 dk:dark:text-gray-400",
|
|
1097
904
|
"dk:line-clamp-3"
|
|
1098
|
-
].join(" ")),
|
|
1099
|
-
|
|
905
|
+
].join(" ")), A = s(() => [
|
|
906
|
+
c[d.size].contentSize,
|
|
1100
907
|
"dk:text-gray-700 dk:dark:text-gray-300"
|
|
1101
|
-
].join(" ")),
|
|
908
|
+
].join(" ")), I = s(() => [
|
|
1102
909
|
"dk:border-t dk:border-gray-200 dk:dark:border-gray-700",
|
|
1103
910
|
"dk:pt-3 dk:mt-3"
|
|
1104
911
|
].join(" "));
|
|
1105
|
-
return (
|
|
1106
|
-
class:
|
|
912
|
+
return (r, v) => (t(), o("div", {
|
|
913
|
+
class: m(n.value)
|
|
1107
914
|
}, [
|
|
1108
|
-
|
|
1109
|
-
(t(),
|
|
1110
|
-
default:
|
|
1111
|
-
|
|
1112
|
-
src:
|
|
1113
|
-
alt:
|
|
1114
|
-
class:
|
|
1115
|
-
}, null, 10,
|
|
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)
|
|
1116
923
|
]),
|
|
1117
924
|
_: 1
|
|
1118
925
|
}, 16, ["class"]))
|
|
1119
|
-
])) :
|
|
1120
|
-
|
|
1121
|
-
class:
|
|
926
|
+
])) : y("", !0),
|
|
927
|
+
p("div", {
|
|
928
|
+
class: m(h.value)
|
|
1122
929
|
}, [
|
|
1123
|
-
|
|
930
|
+
r.title || r.subtitle ? (t(), o("div", {
|
|
1124
931
|
key: 0,
|
|
1125
|
-
class:
|
|
932
|
+
class: m(C.value)
|
|
1126
933
|
}, [
|
|
1127
|
-
|
|
1128
|
-
default:
|
|
1129
|
-
|
|
934
|
+
r.title ? (t(), T(j(f()), w({ key: 0 }, l(), { class: B.value }), {
|
|
935
|
+
default: V(() => [
|
|
936
|
+
D(_(r.title), 1)
|
|
1130
937
|
]),
|
|
1131
938
|
_: 1
|
|
1132
|
-
}, 16, ["class"])) :
|
|
1133
|
-
|
|
939
|
+
}, 16, ["class"])) : y("", !0),
|
|
940
|
+
r.subtitle ? (t(), o("p", {
|
|
1134
941
|
key: 1,
|
|
1135
|
-
class:
|
|
1136
|
-
},
|
|
1137
|
-
], 2)) :
|
|
1138
|
-
|
|
942
|
+
class: m(S.value)
|
|
943
|
+
}, _(r.subtitle), 3)) : y("", !0)
|
|
944
|
+
], 2)) : y("", !0),
|
|
945
|
+
r.$slots.default ? (t(), o("div", {
|
|
1139
946
|
key: 1,
|
|
1140
|
-
class:
|
|
947
|
+
class: m(A.value)
|
|
1141
948
|
}, [
|
|
1142
|
-
|
|
1143
|
-
], 2)) :
|
|
1144
|
-
|
|
949
|
+
N(r.$slots, "default")
|
|
950
|
+
], 2)) : y("", !0),
|
|
951
|
+
r.$slots.footer ? (t(), o("div", {
|
|
1145
952
|
key: 2,
|
|
1146
|
-
class:
|
|
953
|
+
class: m(I.value)
|
|
1147
954
|
}, [
|
|
1148
|
-
|
|
1149
|
-
], 2)) :
|
|
955
|
+
N(r.$slots, "footer")
|
|
956
|
+
], 2)) : y("", !0)
|
|
1150
957
|
], 2)
|
|
1151
958
|
], 2));
|
|
1152
959
|
}
|
|
1153
|
-
}),
|
|
960
|
+
}), ne = {
|
|
1154
961
|
key: 0,
|
|
1155
962
|
class: "dk:flex dk:items-center dk:gap-4"
|
|
1156
|
-
},
|
|
963
|
+
}, se = { class: "dk:hidden dk:md:flex dk:items-center dk:space-x-1" }, le = {
|
|
1157
964
|
key: 0,
|
|
1158
965
|
class: "dk:relative dk:group"
|
|
1159
|
-
},
|
|
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 = {
|
|
1160
967
|
key: 2,
|
|
1161
968
|
class: "dk:hidden dk:md:flex dk:items-center dk:gap-2"
|
|
1162
|
-
},
|
|
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 = {
|
|
1163
970
|
key: 0,
|
|
1164
971
|
class: "dk:pt-3 dk:border-t dk:border-gray-200 dk:dark:border-gray-700"
|
|
1165
|
-
},
|
|
972
|
+
}, Te = /* @__PURE__ */ L({
|
|
1166
973
|
__name: "DuiNavbar",
|
|
1167
974
|
props: {
|
|
1168
975
|
items: { default: () => [] },
|
|
1169
976
|
size: { default: "m" }
|
|
1170
977
|
},
|
|
1171
|
-
setup(
|
|
1172
|
-
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(() => {
|
|
1173
980
|
try {
|
|
1174
|
-
return !!(
|
|
981
|
+
return !!(e != null && e.config.globalProperties.$router || e != null && e.config.globalProperties.$route || globalThis.VueRouter || e != null && e.component("RouterLink"));
|
|
1175
982
|
} catch {
|
|
1176
983
|
return !1;
|
|
1177
984
|
}
|
|
1178
|
-
}),
|
|
985
|
+
}), f = s(() => {
|
|
1179
986
|
try {
|
|
1180
|
-
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"));
|
|
1181
988
|
} catch {
|
|
1182
989
|
return !1;
|
|
1183
990
|
}
|
|
1184
|
-
}),
|
|
1185
|
-
const
|
|
1186
|
-
return
|
|
1187
|
-
},
|
|
1188
|
-
|
|
1189
|
-
},
|
|
1190
|
-
|
|
1191
|
-
|
|
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 = () => {
|
|
995
|
+
u.value = !u.value;
|
|
996
|
+
}, x = () => {
|
|
997
|
+
u.value = !1, Object.keys(b).forEach((r) => {
|
|
998
|
+
b[r] = !1;
|
|
1192
999
|
});
|
|
1193
|
-
},
|
|
1194
|
-
|
|
1195
|
-
},
|
|
1000
|
+
}, h = (r) => {
|
|
1001
|
+
b[r] = !b[r];
|
|
1002
|
+
}, C = {
|
|
1196
1003
|
s: {
|
|
1197
1004
|
height: "dk:h-12",
|
|
1198
1005
|
padding: "dk:px-3",
|
|
@@ -1211,61 +1018,61 @@ const H = { key: 1 }, W = `
|
|
|
1211
1018
|
text: "dk:text-lg",
|
|
1212
1019
|
itemPadding: "dk:px-4 dk:py-3"
|
|
1213
1020
|
}
|
|
1214
|
-
},
|
|
1215
|
-
const
|
|
1021
|
+
}, B = s(() => {
|
|
1022
|
+
const r = C[d.size];
|
|
1216
1023
|
return [
|
|
1217
1024
|
// Base classes
|
|
1218
1025
|
"dk:relative dk:bg-white dk:border-b dk:border-gray-200 dk:shadow-sm",
|
|
1219
1026
|
"dk:dark:bg-gray-800 dk:dark:border-gray-700",
|
|
1220
1027
|
"dk:flex dk:items-center dk:w-full",
|
|
1221
1028
|
// Conditional justify based on slots
|
|
1222
|
-
!!(
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
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
|
|
1226
1033
|
].join(" ");
|
|
1227
|
-
}),
|
|
1034
|
+
}), R = s(() => [
|
|
1228
1035
|
// Base styles
|
|
1229
1036
|
"dk:flex dk:items-center dk:rounded-lg dk:transition-all dk:duration-200",
|
|
1230
1037
|
"dk:text-gray-700 dk:hover:text-gray-900 dk:hover:bg-gray-100",
|
|
1231
1038
|
"dk:dark:text-gray-300 dk:dark:hover:text-gray-100 dk:dark:hover:bg-gray-700",
|
|
1232
1039
|
"dk:focus:outline-none dk:focus:ring-2 dk:focus:ring-gray-200 dk:dark:focus:ring-gray-600",
|
|
1233
1040
|
"dk:no-underline",
|
|
1234
|
-
|
|
1235
|
-
].join(" ")),
|
|
1041
|
+
C[d.size].itemPadding
|
|
1042
|
+
].join(" ")), S = s(() => [
|
|
1236
1043
|
"dk:block dk:w-full dk:text-left dk:px-4 dk:py-2 dk:text-sm",
|
|
1237
1044
|
"dk:text-gray-700 dk:hover:bg-gray-100 dk:hover:text-gray-900",
|
|
1238
1045
|
"dk:dark:text-gray-300 dk:dark:hover:bg-gray-700 dk:dark:hover:text-gray-100",
|
|
1239
1046
|
"dk:transition-colors dk:duration-200 dk:no-underline"
|
|
1240
|
-
].join(" ")),
|
|
1047
|
+
].join(" ")), A = s(() => [
|
|
1241
1048
|
"dk:flex dk:items-center dk:justify-between dk:w-full dk:text-left dk:px-3 dk:py-2",
|
|
1242
1049
|
"dk:text-gray-700 dk:hover:bg-gray-100 dk:hover:text-gray-900 dk:rounded-lg",
|
|
1243
1050
|
"dk:dark:text-gray-300 dk:dark:hover:bg-gray-700 dk:dark:hover:text-gray-100",
|
|
1244
1051
|
"dk:transition-colors dk:duration-200 dk:no-underline"
|
|
1245
|
-
].join(" ")),
|
|
1052
|
+
].join(" ")), I = s(() => [
|
|
1246
1053
|
"dk:block dk:w-full dk:text-left dk:px-3 dk:py-2 dk:text-sm dk:rounded-lg",
|
|
1247
1054
|
"dk:text-gray-600 dk:hover:bg-gray-100 dk:hover:text-gray-800",
|
|
1248
1055
|
"dk:dark:text-gray-400 dk:dark:hover:bg-gray-700 dk:dark:hover:text-gray-200",
|
|
1249
1056
|
"dk:transition-colors dk:duration-200 dk:no-underline"
|
|
1250
1057
|
].join(" "));
|
|
1251
|
-
return (
|
|
1252
|
-
class:
|
|
1058
|
+
return (r, v) => (t(), o("nav", {
|
|
1059
|
+
class: m(B.value)
|
|
1253
1060
|
}, [
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1061
|
+
r.$slots.brand ? (t(), o("div", ne, [
|
|
1062
|
+
N(r.$slots, "brand"),
|
|
1063
|
+
p("button", {
|
|
1257
1064
|
type: "button",
|
|
1258
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",
|
|
1259
|
-
onClick:
|
|
1260
|
-
},
|
|
1261
|
-
|
|
1262
|
-
|
|
1066
|
+
onClick: n
|
|
1067
|
+
}, v[0] || (v[0] = [
|
|
1068
|
+
p("span", { class: "dk:sr-only" }, "Open main menu", -1),
|
|
1069
|
+
p("svg", {
|
|
1263
1070
|
class: "dk:w-5 dk:h-5",
|
|
1264
1071
|
fill: "none",
|
|
1265
1072
|
stroke: "currentColor",
|
|
1266
1073
|
viewBox: "0 0 24 24"
|
|
1267
1074
|
}, [
|
|
1268
|
-
|
|
1075
|
+
p("path", {
|
|
1269
1076
|
"stroke-linecap": "round",
|
|
1270
1077
|
"stroke-linejoin": "round",
|
|
1271
1078
|
"stroke-width": "2",
|
|
@@ -1273,21 +1080,21 @@ const H = { key: 1 }, W = `
|
|
|
1273
1080
|
})
|
|
1274
1081
|
], -1)
|
|
1275
1082
|
]))
|
|
1276
|
-
])) :
|
|
1277
|
-
|
|
1083
|
+
])) : y("", !0),
|
|
1084
|
+
r.$slots.brand ? y("", !0) : (t(), o("button", {
|
|
1278
1085
|
key: 1,
|
|
1279
1086
|
type: "button",
|
|
1280
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",
|
|
1281
|
-
onClick:
|
|
1282
|
-
},
|
|
1283
|
-
|
|
1284
|
-
|
|
1088
|
+
onClick: n
|
|
1089
|
+
}, v[1] || (v[1] = [
|
|
1090
|
+
p("span", { class: "dk:sr-only" }, "Open main menu", -1),
|
|
1091
|
+
p("svg", {
|
|
1285
1092
|
class: "dk:w-5 dk:h-5",
|
|
1286
1093
|
fill: "none",
|
|
1287
1094
|
stroke: "currentColor",
|
|
1288
1095
|
viewBox: "0 0 24 24"
|
|
1289
1096
|
}, [
|
|
1290
|
-
|
|
1097
|
+
p("path", {
|
|
1291
1098
|
"stroke-linecap": "round",
|
|
1292
1099
|
"stroke-linejoin": "round",
|
|
1293
1100
|
"stroke-width": "2",
|
|
@@ -1295,25 +1102,25 @@ const H = { key: 1 }, W = `
|
|
|
1295
1102
|
})
|
|
1296
1103
|
], -1)
|
|
1297
1104
|
]))),
|
|
1298
|
-
|
|
1299
|
-
(t(!0),
|
|
1300
|
-
key:
|
|
1105
|
+
p("div", se, [
|
|
1106
|
+
(t(!0), o($, null, P(r.items, (a) => (t(), o($, {
|
|
1107
|
+
key: a.label
|
|
1301
1108
|
}, [
|
|
1302
|
-
|
|
1303
|
-
(t(),
|
|
1304
|
-
default:
|
|
1305
|
-
|
|
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", {
|
|
1306
1113
|
key: 0,
|
|
1307
|
-
class:
|
|
1308
|
-
}, null, 2)) :
|
|
1309
|
-
|
|
1310
|
-
|
|
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", {
|
|
1311
1118
|
class: "dk:w-4 dk:h-4 dk:ml-1 dk:transform dk:group-hover:rotate-180 dk:transition-transform",
|
|
1312
1119
|
fill: "none",
|
|
1313
1120
|
stroke: "currentColor",
|
|
1314
1121
|
viewBox: "0 0 24 24"
|
|
1315
1122
|
}, [
|
|
1316
|
-
|
|
1123
|
+
p("path", {
|
|
1317
1124
|
"stroke-linecap": "round",
|
|
1318
1125
|
"stroke-linejoin": "round",
|
|
1319
1126
|
"stroke-width": "2",
|
|
@@ -1323,126 +1130,126 @@ const H = { key: 1 }, W = `
|
|
|
1323
1130
|
]),
|
|
1324
1131
|
_: 2
|
|
1325
1132
|
}, 1040, ["class"])),
|
|
1326
|
-
|
|
1327
|
-
(t(!0),
|
|
1328
|
-
key:
|
|
1133
|
+
p("div", ie, [
|
|
1134
|
+
(t(!0), o($, null, P(a.children, (z) => (t(), T(j(l(z)), w({
|
|
1135
|
+
key: z.label,
|
|
1329
1136
|
ref_for: !0
|
|
1330
|
-
},
|
|
1331
|
-
default:
|
|
1332
|
-
|
|
1137
|
+
}, c(z), { class: S.value }), {
|
|
1138
|
+
default: V(() => [
|
|
1139
|
+
z.icon ? (t(), o("i", {
|
|
1333
1140
|
key: 0,
|
|
1334
|
-
class:
|
|
1335
|
-
}, null, 2)) :
|
|
1336
|
-
|
|
1141
|
+
class: m([z.icon, "dk:mr-2"])
|
|
1142
|
+
}, null, 2)) : y("", !0),
|
|
1143
|
+
D(" " + _(z.label), 1)
|
|
1337
1144
|
]),
|
|
1338
1145
|
_: 2
|
|
1339
1146
|
}, 1040, ["class"]))), 128))
|
|
1340
1147
|
])
|
|
1341
|
-
])) : (t(),
|
|
1148
|
+
])) : (t(), T(j(l(a)), w({
|
|
1342
1149
|
key: 1,
|
|
1343
1150
|
ref_for: !0
|
|
1344
|
-
},
|
|
1345
|
-
default:
|
|
1346
|
-
|
|
1151
|
+
}, c(a), { class: R.value }), {
|
|
1152
|
+
default: V(() => [
|
|
1153
|
+
a.icon ? (t(), o("i", {
|
|
1347
1154
|
key: 0,
|
|
1348
|
-
class:
|
|
1349
|
-
}, null, 2)) :
|
|
1350
|
-
|
|
1155
|
+
class: m([a.icon, "dk:mr-2"])
|
|
1156
|
+
}, null, 2)) : y("", !0),
|
|
1157
|
+
D(" " + _(a.label), 1)
|
|
1351
1158
|
]),
|
|
1352
1159
|
_: 2
|
|
1353
1160
|
}, 1040, ["class"]))
|
|
1354
1161
|
], 64))), 128))
|
|
1355
1162
|
]),
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
])) :
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
(t(!0),
|
|
1362
|
-
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
|
|
1363
1170
|
}, [
|
|
1364
|
-
|
|
1365
|
-
|
|
1171
|
+
a.children && a.children.length > 0 ? (t(), o("div", ge, [
|
|
1172
|
+
p("button", {
|
|
1366
1173
|
type: "button",
|
|
1367
|
-
onClick: (
|
|
1368
|
-
class:
|
|
1174
|
+
onClick: (z) => h(a.label),
|
|
1175
|
+
class: m(A.value)
|
|
1369
1176
|
}, [
|
|
1370
|
-
|
|
1371
|
-
|
|
1177
|
+
p("div", pe, [
|
|
1178
|
+
a.icon ? (t(), o("i", {
|
|
1372
1179
|
key: 0,
|
|
1373
|
-
class:
|
|
1374
|
-
}, null, 2)) :
|
|
1375
|
-
|
|
1180
|
+
class: m([a.icon, "dk:mr-2"])
|
|
1181
|
+
}, null, 2)) : y("", !0),
|
|
1182
|
+
D(" " + _(a.label), 1)
|
|
1376
1183
|
]),
|
|
1377
|
-
(t(),
|
|
1378
|
-
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" : ""]),
|
|
1379
1186
|
fill: "none",
|
|
1380
1187
|
stroke: "currentColor",
|
|
1381
1188
|
viewBox: "0 0 24 24"
|
|
1382
|
-
},
|
|
1383
|
-
|
|
1189
|
+
}, v[3] || (v[3] = [
|
|
1190
|
+
p("path", {
|
|
1384
1191
|
"stroke-linecap": "round",
|
|
1385
1192
|
"stroke-linejoin": "round",
|
|
1386
1193
|
"stroke-width": "2",
|
|
1387
1194
|
d: "M19 9l-7 7-7-7"
|
|
1388
1195
|
}, null, -1)
|
|
1389
1196
|
]), 2))
|
|
1390
|
-
], 10,
|
|
1391
|
-
|
|
1392
|
-
(t(!0),
|
|
1393
|
-
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,
|
|
1394
1201
|
ref_for: !0
|
|
1395
|
-
},
|
|
1396
|
-
class:
|
|
1397
|
-
onClick:
|
|
1202
|
+
}, c(z), {
|
|
1203
|
+
class: I.value,
|
|
1204
|
+
onClick: x
|
|
1398
1205
|
}), {
|
|
1399
|
-
default:
|
|
1400
|
-
|
|
1206
|
+
default: V(() => [
|
|
1207
|
+
z.icon ? (t(), o("i", {
|
|
1401
1208
|
key: 0,
|
|
1402
|
-
class:
|
|
1403
|
-
}, null, 2)) :
|
|
1404
|
-
|
|
1209
|
+
class: m([z.icon, "dk:mr-2"])
|
|
1210
|
+
}, null, 2)) : y("", !0),
|
|
1211
|
+
D(" " + _(z.label), 1)
|
|
1405
1212
|
]),
|
|
1406
1213
|
_: 2
|
|
1407
1214
|
}, 1040, ["class"]))), 128))
|
|
1408
1215
|
], 512), [
|
|
1409
|
-
[
|
|
1216
|
+
[E, b[a.label]]
|
|
1410
1217
|
])
|
|
1411
|
-
])) : (t(),
|
|
1218
|
+
])) : (t(), T(j(l(a)), w({
|
|
1412
1219
|
key: 1,
|
|
1413
1220
|
ref_for: !0
|
|
1414
|
-
},
|
|
1415
|
-
class:
|
|
1416
|
-
onClick:
|
|
1221
|
+
}, c(a), {
|
|
1222
|
+
class: A.value,
|
|
1223
|
+
onClick: x
|
|
1417
1224
|
}), {
|
|
1418
|
-
default:
|
|
1419
|
-
|
|
1225
|
+
default: V(() => [
|
|
1226
|
+
a.icon ? (t(), o("i", {
|
|
1420
1227
|
key: 0,
|
|
1421
|
-
class:
|
|
1422
|
-
}, null, 2)) :
|
|
1423
|
-
|
|
1228
|
+
class: m([a.icon, "dk:mr-2"])
|
|
1229
|
+
}, null, 2)) : y("", !0),
|
|
1230
|
+
D(" " + _(a.label), 1)
|
|
1424
1231
|
]),
|
|
1425
1232
|
_: 2
|
|
1426
1233
|
}, 1040, ["class"]))
|
|
1427
1234
|
], 64))), 128)),
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
])) :
|
|
1235
|
+
r.$slots.actions ? (t(), o("div", xe, [
|
|
1236
|
+
N(r.$slots, "actions")
|
|
1237
|
+
])) : y("", !0)
|
|
1431
1238
|
])
|
|
1432
1239
|
], 512), [
|
|
1433
|
-
[
|
|
1240
|
+
[E, u.value]
|
|
1434
1241
|
])
|
|
1435
1242
|
], 2));
|
|
1436
1243
|
}
|
|
1437
1244
|
});
|
|
1438
1245
|
export {
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1246
|
+
$e as DuiAction,
|
|
1247
|
+
Ce as DuiAlert,
|
|
1248
|
+
ye as DuiButton,
|
|
1249
|
+
Se as DuiCard,
|
|
1250
|
+
fe as DuiInput,
|
|
1251
|
+
Te as DuiNavbar,
|
|
1252
|
+
we as DuiSelect,
|
|
1253
|
+
_e as DuiTable,
|
|
1254
|
+
ze as DuiTextarea
|
|
1448
1255
|
};
|