adverich-kun-ui 0.1.214 → 0.1.215

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,16 +1,13 @@
1
- import { ref as V, inject as E, onMounted as z, onBeforeUnmount as F, computed as i, createBlock as c, openBlock as n, unref as U, withCtx as C, resolveDynamicComponent as f, mergeProps as j, withKeys as K, withModifiers as R, createElementVNode as b, createElementBlock as l, createCommentVNode as s, renderSlot as d, normalizeClass as h, toDisplayString as k } from "vue";
1
+ import { ref as V, inject as $, onMounted as z, onBeforeUnmount as F, computed as i, createBlock as c, openBlock as n, unref as U, withCtx as C, resolveDynamicComponent as f, mergeProps as E, withKeys as j, withModifiers as K, createElementVNode as m, renderSlot as d, createElementBlock as l, createCommentVNode as s, normalizeClass as h, toDisplayString as k } from "vue";
2
2
  import { RouterLink as q } from "vue-router";
3
- const H = { class: "flex w-full items-center" }, J = {
4
- key: 0,
5
- class: "shrink-0 flex items-center gap-2 me-3"
6
- }, Q = ["src"], T = { class: "flex flex-col min-w-0 flex-1" }, W = {
3
+ const H = { class: "flex w-full items-center" }, J = { class: "shrink-0 flex items-center gap-2 me-3" }, Q = ["src"], T = { class: "flex flex-col min-w-0 flex-1" }, W = {
7
4
  key: 0,
8
5
  class: "font-medium truncate"
9
6
  }, X = {
10
7
  key: 0,
11
8
  class: "text-sm text-gray-500 dark:text-gray-400 truncate"
12
9
  }, Y = {
13
- key: 1,
10
+ key: 0,
14
11
  class: "shrink-0 flex items-center gap-2 ms-3"
15
12
  }, Z = ["src"], _ = { class: "flex w-full items-center" }, ee = {
16
13
  key: 0,
@@ -52,30 +49,32 @@ const H = { class: "flex w-full items-center" }, J = {
52
49
  itemPosition: { type: String, default: "items-start" },
53
50
  itemClass: String,
54
51
  prependIcon: [String, Object, Function],
55
- appendIcon: [String, Object, Function],
56
52
  prependAvatar: String,
53
+ prependClass: String,
54
+ appendIcon: [String, Object, Function],
57
55
  appendAvatar: String,
56
+ appendClass: String,
58
57
  title: [String, Number, Boolean],
59
58
  subtitle: [String, Number, Boolean]
60
59
  },
61
60
  emits: ["click"],
62
- setup(e, { emit: L }) {
63
- const t = e, N = L, u = V(null), m = E("registerListItemRef", null), o = E("kunListContext", null);
61
+ setup(e, { emit: R }) {
62
+ const t = e, L = R, u = V(null), g = $("registerListItemRef", null), o = $("kunListContext", null);
64
63
  z(() => {
65
- m && u.value && m(u.value);
64
+ g && u.value && g(u.value);
66
65
  }), F(() => {
67
- m && m(null);
66
+ g && g(null);
68
67
  });
69
- const y = (a) => typeof a == "object" || typeof a == "function", B = i(() => !!(t.prependIcon || t.prependAvatar)), A = i(() => !!(t.appendIcon || t.appendAvatar)), w = i(() => {
68
+ const p = (a) => typeof a == "object" || typeof a == "function", N = i(() => !!(t.prependIcon || t.prependAvatar)), B = i(() => !!(t.appendIcon || t.appendAvatar)), w = i(() => {
70
69
  var a;
71
70
  return ((a = o == null ? void 0 : o.isSelected) == null ? void 0 : a.call(o, t.value)) ?? !1;
72
71
  }), I = i(() => t.active), O = i(() => !!t.to);
73
- function g(a, x = null) {
74
- var v, p;
72
+ function y(a, x = null) {
73
+ var v, b;
75
74
  if (t.disabled) return;
76
- N("click", a);
75
+ L("click", a);
77
76
  const r = ((v = u.value) == null ? void 0 : v.$el) ?? u.value;
78
- r != null && r.dispatchEvent && r.dispatchEvent(new CustomEvent("select", { detail: t.value, bubbles: !0 })), o && t.selectable && t.value !== null && ((p = o.toggleItem) == null || p.call(o, t.value), r != null && r.dispatchEvent && r.dispatchEvent(new CustomEvent("selected", { detail: t.value, bubbles: !0 }))), x && x(a);
77
+ r != null && r.dispatchEvent && r.dispatchEvent(new CustomEvent("select", { detail: t.value, bubbles: !0 })), o && t.selectable && t.value !== null && ((b = o.toggleItem) == null || b.call(o, t.value), r != null && r.dispatchEvent && r.dispatchEvent(new CustomEvent("selected", { detail: t.value, bubbles: !0 }))), x && x(a);
79
78
  }
80
79
  const P = i(() => {
81
80
  switch (t.variant) {
@@ -101,7 +100,7 @@ const H = { class: "flex w-full items-center" }, J = {
101
100
  default:
102
101
  return "py-3";
103
102
  }
104
- }), G = i(() => t.tile ? "rounded-none" : t.rounded === !0 ? "rounded-md" : t.rounded === !1 ? "" : `rounded-${t.rounded}`), M = i(() => t.ripple ? "relative overflow-hidden" : ""), $ = i(() => [
103
+ }), G = i(() => t.tile ? "rounded-none" : t.rounded === !0 ? "rounded-md" : t.rounded === !1 ? "" : `rounded-${t.rounded}`), M = i(() => t.ripple ? "relative overflow-hidden" : ""), A = i(() => [
105
104
  ie,
106
105
  P.value,
107
106
  D.value,
@@ -124,38 +123,38 @@ const H = { class: "flex w-full items-center" }, J = {
124
123
  replace: e.replace,
125
124
  custom: !0
126
125
  }, {
127
- default: C(({ href: r, navigate: v, isActive: p }) => [
128
- (n(), c(f(e.tag), j({
126
+ default: C(({ href: r, navigate: v, isActive: b }) => [
127
+ (n(), c(f(e.tag), E({
129
128
  ref_key: "liRef",
130
129
  ref: u,
131
130
  href: r,
132
131
  role: "option",
133
- "aria-selected": w.value || I.value || p,
132
+ "aria-selected": w.value || I.value || b,
134
133
  "aria-disabled": e.disabled,
135
134
  tabindex: "-1",
136
- class: $.value,
137
- onClick: (S) => g(S, v),
138
- onKeydown: K(R((S) => g(S, v), ["prevent"]), ["enter"])
135
+ class: A.value,
136
+ onClick: (S) => y(S, v),
137
+ onKeydown: j(K((S) => y(S, v), ["prevent"]), ["enter"])
139
138
  }, a.$attrs), {
140
139
  default: C(() => [
141
- b("div", H, [
142
- B.value ? (n(), l("div", J, [
143
- d(a.$slots, "prepend", {}, () => [
140
+ m("div", H, [
141
+ d(a.$slots, "prepend", {}, () => [
142
+ m("div", J, [
144
143
  e.prependAvatar ? (n(), l("img", {
145
144
  key: 0,
146
145
  src: e.prependAvatar,
147
146
  class: "w-8 h-8 rounded-full"
148
147
  }, null, 8, Q)) : s("", !0),
149
- y(e.prependIcon) ? (n(), c(f(e.prependIcon), {
148
+ p(e.prependIcon) ? (n(), c(f(e.prependIcon), {
150
149
  key: 1,
151
150
  class: "w-5 h-5"
152
151
  })) : e.prependIcon ? (n(), l("i", {
153
152
  key: 2,
154
- class: h([e.prependIcon, "text-xl leading-none"])
153
+ class: h([e.prependClass, "text-xl leading-none"])
155
154
  }, null, 2)) : s("", !0)
156
155
  ])
157
- ])) : s("", !0),
158
- b("div", T, [
156
+ ]),
157
+ m("div", T, [
159
158
  d(a.$slots, "default", {}, () => [
160
159
  d(a.$slots, "title", {}, () => [
161
160
  e.title ? (n(), l("div", W, k(e.title), 1)) : s("", !0)
@@ -165,19 +164,19 @@ const H = { class: "flex w-full items-center" }, J = {
165
164
  ])
166
165
  ])
167
166
  ]),
168
- A.value ? (n(), l("div", Y, [
167
+ B.value ? (n(), l("div", Y, [
169
168
  d(a.$slots, "append", {}, () => [
170
169
  e.appendAvatar ? (n(), l("img", {
171
170
  key: 0,
172
171
  src: e.appendAvatar,
173
172
  class: "w-8 h-8 rounded-full"
174
173
  }, null, 8, Z)) : s("", !0),
175
- y(e.appendIcon) ? (n(), c(f(e.appendIcon), {
174
+ p(e.appendIcon) ? (n(), c(f(e.appendIcon), {
176
175
  key: 1,
177
176
  class: "w-5 h-5"
178
177
  })) : e.appendIcon ? (n(), l("i", {
179
178
  key: 2,
180
- class: h([e.appendIcon, "text-xl leading-none"])
179
+ class: h([e.appendClass, "text-xl leading-none"])
181
180
  }, null, 2)) : s("", !0)
182
181
  ])
183
182
  ])) : s("", !0)
@@ -187,7 +186,7 @@ const H = { class: "flex w-full items-center" }, J = {
187
186
  }, 1040, ["href", "aria-selected", "aria-disabled", "class", "onClick", "onKeydown"]))
188
187
  ]),
189
188
  _: 3
190
- }, 8, ["to", "replace"])) : (n(), c(f(e.tag), j({
189
+ }, 8, ["to", "replace"])) : (n(), c(f(e.tag), E({
191
190
  key: 1,
192
191
  ref_key: "liRef",
193
192
  ref: u,
@@ -195,20 +194,20 @@ const H = { class: "flex w-full items-center" }, J = {
195
194
  "aria-selected": w.value || I.value,
196
195
  "aria-disabled": e.disabled,
197
196
  tabindex: "-1",
198
- class: $.value,
199
- onClick: g,
200
- onKeydown: K(R(g, ["prevent"]), ["enter"])
197
+ class: A.value,
198
+ onClick: y,
199
+ onKeydown: j(K(y, ["prevent"]), ["enter"])
201
200
  }, a.$attrs), {
202
201
  default: C(() => [
203
- b("div", _, [
204
- B.value ? (n(), l("div", ee, [
202
+ m("div", _, [
203
+ N.value ? (n(), l("div", ee, [
205
204
  d(a.$slots, "prepend", {}, () => [
206
205
  e.prependAvatar ? (n(), l("img", {
207
206
  key: 0,
208
207
  src: e.prependAvatar,
209
208
  class: "w-8 h-8 rounded-full"
210
209
  }, null, 8, te)) : s("", !0),
211
- y(e.prependIcon) ? (n(), c(f(e.prependIcon), {
210
+ p(e.prependIcon) ? (n(), c(f(e.prependIcon), {
212
211
  key: 1,
213
212
  class: "w-5 h-5"
214
213
  })) : e.prependIcon ? (n(), l("i", {
@@ -217,7 +216,7 @@ const H = { class: "flex w-full items-center" }, J = {
217
216
  }, null, 2)) : s("", !0)
218
217
  ])
219
218
  ])) : s("", !0),
220
- b("div", ne, [
219
+ m("div", ne, [
221
220
  d(a.$slots, "default", {}, () => [
222
221
  d(a.$slots, "title", {}, () => [
223
222
  e.title ? (n(), l("div", ae, k(e.title), 1)) : s("", !0)
@@ -227,14 +226,14 @@ const H = { class: "flex w-full items-center" }, J = {
227
226
  ])
228
227
  ])
229
228
  ]),
230
- A.value ? (n(), l("div", se, [
229
+ B.value ? (n(), l("div", se, [
231
230
  d(a.$slots, "append", {}, () => [
232
231
  e.appendAvatar ? (n(), l("img", {
233
232
  key: 0,
234
233
  src: e.appendAvatar,
235
234
  class: "w-8 h-8 rounded-full"
236
235
  }, null, 8, re)) : s("", !0),
237
- y(e.appendIcon) ? (n(), c(f(e.appendIcon), {
236
+ p(e.appendIcon) ? (n(), c(f(e.appendIcon), {
238
237
  key: 1,
239
238
  class: "w-5 h-5"
240
239
  })) : e.appendIcon ? (n(), l("i", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.214",
3
+ "version": "0.1.215",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",