adverich-kun-ui 0.1.18 → 0.1.19

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,13 +1,13 @@
1
- import { computed as u, createElementBlock as l, openBlock as e, normalizeClass as x, createElementVNode as c, createCommentVNode as n, renderSlot as r, createBlock as a, createVNode as f, h as g } from "vue";
1
+ import { computed as u, createElementBlock as l, openBlock as e, normalizeClass as S, createElementVNode as c, createCommentVNode as n, renderSlot as o, createBlock as r, createVNode as g, h as f } from "vue";
2
2
  import s from "../../../KunAppbarTitle/src/components/KunAppbarTitle.vue.js";
3
- import h from "../../../KunIcon/src/components/KunIcon.vue.js";
4
- const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
3
+ import m from "../../../KunIcon/src/components/KunIcon.vue.js";
4
+ const x = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
5
5
  key: 0,
6
6
  class: "absolute left-1/2 -translate-x-1/2"
7
7
  }, b = {
8
8
  key: 1,
9
9
  class: "flex-1 flex justify-end"
10
- }, k = { class: "flex items-center gap-2 flex-1 justify-end" }, $ = {
10
+ }, k = { class: "flex items-center gap-2 flex-1 justify-end" }, C = {
11
11
  __name: "KunAppbar",
12
12
  props: {
13
13
  bgColor: {
@@ -18,6 +18,10 @@ const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
18
18
  type: String,
19
19
  default: ""
20
20
  },
21
+ titleImage: {
22
+ type: String,
23
+ default: ""
24
+ },
21
25
  titleSize: {
22
26
  type: String,
23
27
  default: "text-base"
@@ -57,8 +61,8 @@ const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
57
61
  }
58
62
  },
59
63
  setup(t) {
60
- const o = t, m = u(() => {
61
- switch (o.density) {
64
+ const a = t, h = u(() => {
65
+ switch (a.density) {
62
66
  case "comfortable":
63
67
  return "h-12 py-1";
64
68
  case "compact":
@@ -66,16 +70,16 @@ const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
66
70
  default:
67
71
  return "h-14 py-2";
68
72
  }
69
- }), y = u(() => o.elevation === "none" ? "" : `shadow-${o.elevation}`), w = {
73
+ }), y = u(() => a.elevation === "none" ? "" : `shadow-${a.elevation}`), w = {
70
74
  render() {
71
- return g("svg", {
75
+ return f("svg", {
72
76
  xmlns: "http://www.w3.org/2000/svg",
73
77
  class: "h-5 w-5",
74
78
  fill: "none",
75
79
  viewBox: "0 0 24 24",
76
80
  stroke: "currentColor"
77
81
  }, [
78
- g("path", {
82
+ f("path", {
79
83
  "stroke-linecap": "round",
80
84
  "stroke-linejoin": "round",
81
85
  "stroke-width": "2",
@@ -85,26 +89,26 @@ const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
85
89
  }
86
90
  };
87
91
  return (i, d) => (e(), l("header", {
88
- class: x(["flex items-center px-4 w-full", [
89
- m.value,
92
+ class: S(["flex items-center px-4 w-full", [
93
+ h.value,
90
94
  t.bgColor,
91
95
  y.value,
92
96
  t.bordered ? "border-b border-gray-200" : ""
93
97
  ]])
94
98
  }, [
95
- c("div", S, [
96
- r(i.$slots, "appbarButton", {}, () => [
99
+ c("div", x, [
100
+ o(i.$slots, "appbarButton", {}, () => [
97
101
  t.showDrawerButton ? (e(), l("button", {
98
102
  key: 0,
99
103
  class: "p-2 rounded-md hover:bg-white/10 transition",
100
104
  onClick: d[0] || (d[0] = (z) => i.$emit("toggle-drawer"))
101
105
  }, [
102
- t.drawerIcon ? (e(), a(h, {
106
+ t.drawerIcon ? (e(), r(m, {
103
107
  key: 1,
104
108
  icon: t.drawerIcon,
105
109
  class: "text-white",
106
110
  size: "text-lg"
107
- }, null, 8, ["icon"])) : (e(), a(h, {
111
+ }, null, 8, ["icon"])) : (e(), r(m, {
108
112
  key: 0,
109
113
  icon: w,
110
114
  class: "text-white",
@@ -112,34 +116,37 @@ const S = { class: "flex items-center gap-2 flex-1 min-w-0" }, v = {
112
116
  }))
113
117
  ])) : n("", !0)
114
118
  ]),
115
- r(i.$slots, "prepend"),
116
- t.title && t.titlePosition === "left" ? (e(), a(s, {
119
+ o(i.$slots, "prepend"),
120
+ t.title && t.titlePosition === "left" ? (e(), r(s, {
117
121
  key: 0,
118
122
  title: t.title,
123
+ titleImage: t.titleImage,
119
124
  textSize: t.titleSize,
120
125
  fontWeight: t.titleWeight
121
- }, null, 8, ["title", "textSize", "fontWeight"])) : n("", !0)
126
+ }, null, 8, ["title", "titleImage", "textSize", "fontWeight"])) : n("", !0)
122
127
  ]),
123
128
  t.title && t.titlePosition === "center" ? (e(), l("div", v, [
124
- f(s, {
129
+ g(s, {
125
130
  title: t.title,
131
+ titleImage: t.titleImage,
126
132
  textSize: t.titleSize,
127
133
  fontWeight: t.titleWeight
128
- }, null, 8, ["title", "textSize", "fontWeight"])
134
+ }, null, 8, ["title", "titleImage", "textSize", "fontWeight"])
129
135
  ])) : n("", !0),
130
136
  t.title && t.titlePosition === "right" ? (e(), l("div", b, [
131
- f(s, {
137
+ g(s, {
132
138
  title: t.title,
139
+ titleImage: t.titleImage,
133
140
  textSize: t.titleSize,
134
141
  fontWeight: t.titleWeight
135
- }, null, 8, ["title", "textSize", "fontWeight"])
142
+ }, null, 8, ["title", "titleImage", "textSize", "fontWeight"])
136
143
  ])) : n("", !0),
137
144
  c("div", k, [
138
- r(i.$slots, "actions")
145
+ o(i.$slots, "actions")
139
146
  ])
140
147
  ], 2));
141
148
  }
142
149
  };
143
150
  export {
144
- $ as default
151
+ C as default
145
152
  };
@@ -1,8 +1,9 @@
1
1
  import { createElementBlock as e, openBlock as i, normalizeClass as n, toDisplayString as a } from "vue";
2
- const o = {
2
+ const l = ["src"], c = { key: 1 }, m = {
3
3
  __name: "KunAppbarTitle",
4
4
  props: {
5
5
  title: String,
6
+ titleImage: String,
6
7
  textSize: {
7
8
  type: String,
8
9
  default: "text-base"
@@ -13,11 +14,18 @@ const o = {
13
14
  }
14
15
  },
15
16
  setup(t) {
16
- return (r, l) => (i(), e("div", {
17
+ return (o, s) => (i(), e("div", {
17
18
  class: n(["flex items-center min-w-0 truncate", [t.textSize, t.fontWeight]])
18
- }, a(t.title), 3));
19
+ }, [
20
+ t.titleImage ? (i(), e("img", {
21
+ key: 0,
22
+ src: t.titleImage,
23
+ alt: "Logo",
24
+ class: "h-6 object-contain"
25
+ }, null, 8, l)) : (i(), e("span", c, a(t.title), 1))
26
+ ], 2));
19
27
  }
20
28
  };
21
29
  export {
22
- o as default
30
+ m as default
23
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",