adverich-kun-ui 0.1.395 → 0.1.397

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