adverich-kun-ui 0.1.394 → 0.1.395

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,107 @@
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";
3
- import d from "../../../KunCardItem/src/components/KunCardItem.vue.js";
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 }, {
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 }, {
8
8
  __name: "KunCard",
9
- props: c,
10
- setup(a) {
11
- const t = a, u = m(() => [
9
+ props: _,
10
+ setup(h) {
11
+ const t = h, d = f(() => [
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
17
  t.flat ? "shadow-none" : `shadow-${t.elevation}`
18
- ].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));
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, {
22
+ key: 0,
23
+ to: t.to,
24
+ replace: t.replace,
25
+ custom: !0
26
+ }, {
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, {
37
+ title: e.title,
38
+ subtitle: e.subtitle,
39
+ titleSize: e.titleSize
40
+ }, null, 8, ["title", "subtitle", "titleSize"])
41
+ ]),
42
+ _: 1
43
+ })
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"])
49
+ ]),
50
+ _: 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")
57
+ ]),
58
+ _: 3
59
+ })
60
+ ])) : r("", !0)
61
+ ]),
62
+ _: 2
63
+ }, 1040, ["href", "class", "onClick"]))
64
+ ]),
65
+ _: 3
66
+ }, 8, ["to", "replace"])) : (l(), n(m("div"), k({
67
+ key: 1,
68
+ class: d.value
69
+ }, 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, {
75
+ title: e.title,
76
+ subtitle: e.subtitle,
77
+ titleSize: e.titleSize
78
+ }, null, 8, ["title", "subtitle", "titleSize"])
79
+ ]),
80
+ _: 1
81
+ })
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"])
87
+ ]),
88
+ _: 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")
95
+ ]),
96
+ _: 3
97
+ })
98
+ ])) : r("", !0)
99
+ ]),
100
+ _: 3
101
+ }, 16, ["class"]));
102
+ };
49
103
  }
50
104
  });
51
105
  export {
52
- j as default
106
+ E as default
53
107
  };
@@ -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.395",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",