adverich-kun-ui 0.1.394 → 0.1.396

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.
@@ -1,53 +1,117 @@
1
- import { computed as m, createElementBlock as l, openBlock as o, mergeProps as f, createCommentVNode as s, createVNode as r, withCtx as i, createBlock as p, renderSlot as n } from "vue";
2
- import { kunCardProps as c } from "../composables/kunCardProps.js";
1
+ import { computed as k, resolveComponent as w, createBlock as u, openBlock as o, withCtx as s, resolveDynamicComponent as c, mergeProps as y, withKeys as S, withModifiers as _, createElementBlock as r, createCommentVNode as n, createVNode as i, renderSlot as a } from "vue";
2
+ import { kunCardProps as z } from "../composables/kunCardProps.js";
3
3
  import d from "../../../KunCardItem/src/components/KunCardItem.vue.js";
4
4
  import $ from "../../../KunCardTitle/src/components/KunCardTitle.vue.js";
5
- import k from "../../../KunCardText/src/components/KunCardText.vue.js";
6
- import C from "../../../KunCardActions/src/components/KunCardActions.vue.js";
7
- const b = { key: 0 }, h = { key: 1 }, _ = { key: 2 }, j = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
5
+ import h from "../../../KunCardText/src/components/KunCardText.vue.js";
6
+ import b from "../../../KunCardActions/src/components/KunCardActions.vue.js";
7
+ const B = { key: 0 }, g = { key: 1 }, L = { key: 2 }, j = { key: 0 }, N = { key: 1 }, P = { key: 2 }, T = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
8
8
  __name: "KunCard",
9
- props: c,
10
- setup(a) {
11
- const t = a, u = m(() => [
9
+ props: z,
10
+ setup(v) {
11
+ const t = v, f = k(() => !!(t.to || t.href)), m = k(() => [
12
12
  "w-full",
13
13
  t.bgColor,
14
14
  t.textColor || "text-black",
15
15
  t.outlined ? `border ${t.outlineColor}` : "",
16
16
  t.rounded === !0 ? "rounded-lg" : t.rounded ? `rounded-${t.rounded}` : "",
17
- t.flat ? "shadow-none" : `shadow-${t.elevation}`
17
+ t.flat ? "shadow-none" : `shadow-${t.elevation}`,
18
+ f.value ? "cursor-pointer" : ""
18
19
  ].filter(Boolean).join(" "));
19
- return (e, v) => (o(), l("div", f({ class: u.value }, e.$attrs), [
20
- e.$slots.title || e.title || e.subtitle ? (o(), l("div", b, [
21
- r(d, { dense: "" }, {
22
- default: i(() => [
23
- r($, {
24
- title: e.title,
25
- subtitle: e.subtitle,
26
- titleSize: e.titleSize
27
- }, null, 8, ["title", "subtitle", "titleSize"])
28
- ]),
29
- _: 1
30
- })
31
- ])) : s("", !0),
32
- e.$slots.default || e.text ? (o(), l("div", h, [
33
- e.text ? (o(), p(d, { key: 0 }, {
34
- default: i(() => [
35
- r(k, { text: e.text }, null, 8, ["text"])
36
- ]),
37
- _: 1
38
- })) : n(e.$slots, "default", { key: 1 })
39
- ])) : s("", !0),
40
- e.$slots.actions ? (o(), l("div", _, [
41
- r(C, null, {
42
- default: i(() => [
43
- n(e.$slots, "actions")
44
- ]),
45
- _: 3
46
- })
47
- ])) : s("", !0)
48
- ], 16));
20
+ return (e, R) => {
21
+ const C = w("RouterLink");
22
+ return f.value ? (o(), u(C, {
23
+ key: 0,
24
+ to: t.to,
25
+ replace: t.replace,
26
+ custom: !0,
27
+ role: "link",
28
+ tabindex: "0"
29
+ }, {
30
+ default: s(({ href: K, navigate: p }) => [
31
+ (o(), u(c("a"), y({
32
+ href: K,
33
+ class: m.value
34
+ }, e.$attrs, {
35
+ onClick: (l) => {
36
+ l.ctrlKey || l.metaKey || l.button === 1 || p(l);
37
+ },
38
+ onKeydown: S(_((l) => {
39
+ l.ctrlKey || l.metaKey || l.button === 1 || p(l);
40
+ }, ["prevent"]), ["enter"])
41
+ }), {
42
+ default: s(() => [
43
+ e.$slots.title || e.title || e.subtitle ? (o(), r("div", B, [
44
+ i(d, { dense: "" }, {
45
+ default: s(() => [
46
+ i($, {
47
+ title: e.title,
48
+ subtitle: e.subtitle,
49
+ titleSize: e.titleSize
50
+ }, null, 8, ["title", "subtitle", "titleSize"])
51
+ ]),
52
+ _: 1
53
+ })
54
+ ])) : n("", !0),
55
+ e.$slots.default || e.text ? (o(), r("div", g, [
56
+ e.text ? (o(), u(d, { key: 0 }, {
57
+ default: s(() => [
58
+ i(h, { text: e.text }, null, 8, ["text"])
59
+ ]),
60
+ _: 1
61
+ })) : a(e.$slots, "default", { key: 1 })
62
+ ])) : n("", !0),
63
+ e.$slots.actions ? (o(), r("div", L, [
64
+ i(b, null, {
65
+ default: s(() => [
66
+ a(e.$slots, "actions")
67
+ ]),
68
+ _: 3
69
+ })
70
+ ])) : n("", !0)
71
+ ]),
72
+ _: 2
73
+ }, 1040, ["href", "class", "onClick", "onKeydown"]))
74
+ ]),
75
+ _: 3
76
+ }, 8, ["to", "replace"])) : (o(), u(c("div"), y({
77
+ key: 1,
78
+ class: m.value
79
+ }, e.$attrs), {
80
+ default: s(() => [
81
+ e.$slots.title || e.title || e.subtitle ? (o(), r("div", j, [
82
+ i(d, { dense: "" }, {
83
+ default: s(() => [
84
+ i($, {
85
+ title: e.title,
86
+ subtitle: e.subtitle,
87
+ titleSize: e.titleSize
88
+ }, null, 8, ["title", "subtitle", "titleSize"])
89
+ ]),
90
+ _: 1
91
+ })
92
+ ])) : n("", !0),
93
+ e.$slots.default || e.text ? (o(), r("div", N, [
94
+ e.text ? (o(), u(d, { key: 0 }, {
95
+ default: s(() => [
96
+ i(h, { text: e.text }, null, 8, ["text"])
97
+ ]),
98
+ _: 1
99
+ })) : a(e.$slots, "default", { key: 1 })
100
+ ])) : n("", !0),
101
+ e.$slots.actions ? (o(), r("div", P, [
102
+ i(b, null, {
103
+ default: s(() => [
104
+ a(e.$slots, "actions")
105
+ ]),
106
+ _: 3
107
+ })
108
+ ])) : n("", !0)
109
+ ]),
110
+ _: 3
111
+ }, 16, ["class"]));
112
+ };
49
113
  }
50
114
  });
51
115
  export {
52
- j as default
116
+ T as default
53
117
  };
@@ -30,7 +30,10 @@ const e = {
30
30
  type: [String, Number],
31
31
  default: 1,
32
32
  validator: (t) => ["0", "1", "2", "3", "4", "5", "", 0, 1, 2, 3, 4, 5].includes(t)
33
- }
33
+ },
34
+ to: [String, Object],
35
+ href: String,
36
+ replace: Boolean
34
37
  };
35
38
  export {
36
39
  e as kunCardProps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.394",
3
+ "version": "0.1.396",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",