adverich-kun-ui 0.1.270 → 0.1.271

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,4 +1,4 @@
1
- import { useAttrs as F, ref as U, inject as E, onMounted as q, onBeforeUnmount as H, computed as d, createBlock as u, openBlock as n, unref as J, withCtx as B, resolveDynamicComponent as v, mergeProps as j, withKeys as K, withModifiers as R, createElementVNode as k, createElementBlock as a, createCommentVNode as s, renderSlot as o, normalizeClass as r, toDisplayString as h } from "vue";
1
+ import { useAttrs as F, ref as U, inject as E, onMounted as q, onBeforeUnmount as H, computed as d, createBlock as u, openBlock as n, unref as J, withCtx as A, resolveDynamicComponent as v, mergeProps as j, withKeys as K, withModifiers as R, createElementVNode as k, createElementBlock as a, createCommentVNode as s, renderSlot as o, normalizeClass as r, toDisplayString as h } from "vue";
2
2
  import L from "../../../KunIcon/src/components/KunIcon.vue.js";
3
3
  import { RouterLink as Q } from "vue-router";
4
4
  const T = { class: "flex w-full items-center" }, W = {
@@ -39,7 +39,6 @@ const T = { class: "flex w-full items-center" }, W = {
39
39
  hoverBg: { type: String, default: "hover:bg-gray-100 dark:hover:bg-gray-600" },
40
40
  noGutters: Boolean,
41
41
  itemPosition: { type: String, default: "items-start" },
42
- itemClass: String,
43
42
  prependIcon: [String, Object, Function],
44
43
  prependAvatar: String,
45
44
  prependClass: String,
@@ -53,22 +52,22 @@ const T = { class: "flex w-full items-center" }, W = {
53
52
  },
54
53
  emits: ["click"],
55
54
  setup(e, { emit: N }) {
56
- const O = F(), t = e, P = N, f = U(null), p = E("registerListItemRef", null), c = E("kunListContext", null);
55
+ const O = F(), t = e, P = N, f = U(null), y = E("registerListItemRef", null), c = E("kunListContext", null);
57
56
  q(() => {
58
- p && f.value && p(f.value);
57
+ y && f.value && y(f.value);
59
58
  }), H(() => {
60
- p && p(null);
59
+ y && y(null);
61
60
  });
62
- const y = (l) => typeof l == "object" || typeof l == "function", $ = d(() => !!(t.prependIcon || t.prependAvatar)), A = d(() => !!(t.appendIcon || t.appendAvatar)), C = d(() => {
61
+ const p = (l) => typeof l == "object" || typeof l == "function", B = d(() => !!(t.prependIcon || t.prependAvatar)), $ = d(() => !!(t.appendIcon || t.appendAvatar)), C = d(() => {
63
62
  var l;
64
63
  return ((l = c == null ? void 0 : c.isSelected) == null ? void 0 : l.call(c, t.value)) ?? !1;
65
64
  }), I = d(() => t.active), D = d(() => !!t.to);
66
- function g(l, S = null) {
67
- var m, b;
65
+ function b(l, S = null) {
66
+ var m, g;
68
67
  if (t.disabled) return;
69
68
  P("click", l);
70
69
  const i = ((m = f.value) == null ? void 0 : m.$el) ?? f.value;
71
- i != null && i.dispatchEvent && i.dispatchEvent(new CustomEvent("select", { detail: t.value, bubbles: !0 })), c && t.selectable && t.value !== null && ((b = c.toggleItem) == null || b.call(c, t.value), i != null && i.dispatchEvent && i.dispatchEvent(new CustomEvent("selected", { detail: t.value, bubbles: !0 }))), S && S(l);
70
+ i != null && i.dispatchEvent && i.dispatchEvent(new CustomEvent("select", { detail: t.value, bubbles: !0 })), c && t.selectable && t.value !== null && ((g = c.toggleItem) == null || g.call(c, t.value), i != null && i.dispatchEvent && i.dispatchEvent(new CustomEvent("selected", { detail: t.value, bubbles: !0 }))), S && S(l);
72
71
  }
73
72
  const G = d(() => {
74
73
  switch (t.variant) {
@@ -94,52 +93,54 @@ const T = { class: "flex w-full items-center" }, W = {
94
93
  default:
95
94
  return "py-3";
96
95
  }
97
- }), V = d(() => t.tile ? "rounded-none" : t.rounded === !0 ? "rounded-md" : t.rounded === !1 ? "" : `rounded-${t.rounded}`), z = d(() => t.ripple ? "relative overflow-hidden" : ""), x = d(() => [
98
- re,
99
- G.value,
100
- M.value,
101
- V.value,
102
- z.value,
103
- t.bgItems,
104
- t.textColor,
105
- t.itemPosition,
106
- {
107
- "cursor-not-allowed opacity-50": t.disabled,
108
- [`cursor-pointer ${t.hoverBg}`]: t.selectable && !t.disabled,
109
- [t.activeClass]: C.value || I.value,
110
- "px-4": !t.noGutters
111
- },
112
- t.itemClass,
113
- O.class
114
- ]);
96
+ }), V = d(() => t.tile ? "rounded-none" : t.rounded === !0 ? "rounded-md" : t.rounded === !1 ? "" : `rounded-${t.rounded}`), z = d(() => t.ripple ? "relative overflow-hidden" : ""), x = d(() => {
97
+ const l = O.class;
98
+ return [
99
+ re,
100
+ G.value,
101
+ M.value,
102
+ V.value,
103
+ z.value,
104
+ t.bgItems,
105
+ t.textColor,
106
+ t.itemPosition,
107
+ {
108
+ "cursor-not-allowed opacity-50": t.disabled,
109
+ [`cursor-pointer ${t.hoverBg}`]: t.selectable && !t.disabled,
110
+ [t.activeClass]: C.value || I.value,
111
+ "px-4": !t.noGutters
112
+ },
113
+ ...Array.isArray(l) ? l : [l]
114
+ ];
115
+ });
115
116
  return (l, S) => D.value ? (n(), u(J(Q), {
116
117
  key: 0,
117
118
  to: e.to,
118
119
  replace: e.replace,
119
120
  custom: !0
120
121
  }, {
121
- default: B(({ href: i, navigate: m, isActive: b }) => [
122
+ default: A(({ href: i, navigate: m, isActive: g }) => [
122
123
  (n(), u(v(e.tag), j({
123
124
  ref_key: "liRef",
124
125
  ref: f,
125
126
  href: i,
126
127
  role: "option",
127
- "aria-selected": C.value || I.value || b,
128
+ "aria-selected": C.value || I.value || g,
128
129
  "aria-disabled": e.disabled,
129
130
  tabindex: "-1",
130
131
  class: x.value,
131
- onClick: (w) => g(w, m),
132
- onKeydown: K(R((w) => g(w, m), ["prevent"]), ["enter"])
132
+ onClick: (w) => b(w, m),
133
+ onKeydown: K(R((w) => b(w, m), ["prevent"]), ["enter"])
133
134
  }, l.$attrs), {
134
- default: B(() => [
135
+ default: A(() => [
135
136
  k("div", T, [
136
- $.value || l.$slots.prepend ? (n(), a("div", W, [
137
+ B.value || l.$slots.prepend ? (n(), a("div", W, [
137
138
  o(l.$slots, "prepend", {}, () => [
138
139
  e.prependAvatar ? (n(), a("img", {
139
140
  key: 0,
140
141
  src: e.prependAvatar,
141
142
  class: r(["rounded-full", e.prependClass])
142
- }, null, 10, X)) : y(e.prependIcon) ? (n(), u(v(e.prependIcon), {
143
+ }, null, 10, X)) : p(e.prependIcon) ? (n(), u(v(e.prependIcon), {
143
144
  key: 1,
144
145
  class: r(e.prependClass)
145
146
  }, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (n(), u(L, {
@@ -165,14 +166,14 @@ const T = { class: "flex w-full items-center" }, W = {
165
166
  ])
166
167
  ])
167
168
  ]),
168
- A.value ? (n(), a("div", Z, [
169
+ $.value ? (n(), a("div", Z, [
169
170
  o(l.$slots, "append", {}, () => [
170
171
  e.appendAvatar ? (n(), a("img", {
171
172
  key: 0,
172
173
  src: e.appendAvatar,
173
174
  class: "w-8 h-8 rounded-full"
174
175
  }, null, 8, _)) : s("", !0),
175
- y(e.appendIcon) ? (n(), u(v(e.appendIcon), {
176
+ p(e.appendIcon) ? (n(), u(v(e.appendIcon), {
176
177
  key: 1,
177
178
  class: "w-5 h-5"
178
179
  })) : e.appendIcon ? (n(), a("i", {
@@ -196,18 +197,18 @@ const T = { class: "flex w-full items-center" }, W = {
196
197
  "aria-disabled": e.disabled,
197
198
  tabindex: "-1",
198
199
  class: x.value,
199
- onClick: g,
200
- onKeydown: K(R(g, ["prevent"]), ["enter"])
200
+ onClick: b,
201
+ onKeydown: K(R(b, ["prevent"]), ["enter"])
201
202
  }, l.$attrs), {
202
- default: B(() => [
203
+ default: A(() => [
203
204
  k("div", ee, [
204
- $.value || l.$slots.prepend ? (n(), a("div", te, [
205
+ B.value || l.$slots.prepend ? (n(), a("div", te, [
205
206
  o(l.$slots, "prepend", {}, () => [
206
207
  e.prependAvatar ? (n(), a("img", {
207
208
  key: 0,
208
209
  src: e.prependAvatar,
209
210
  class: r(["rounded-full", e.prependClass])
210
- }, null, 10, le)) : y(e.prependIcon) ? (n(), u(v(e.prependIcon), {
211
+ }, null, 10, le)) : p(e.prependIcon) ? (n(), u(v(e.prependIcon), {
211
212
  key: 1,
212
213
  class: r(e.prependClass)
213
214
  }, null, 8, ["class"])) : typeof e.prependIcon == "string" ? (n(), u(L, {
@@ -233,14 +234,14 @@ const T = { class: "flex w-full items-center" }, W = {
233
234
  ])
234
235
  ])
235
236
  ]),
236
- A.value ? (n(), a("div", ae, [
237
+ $.value ? (n(), a("div", ae, [
237
238
  o(l.$slots, "append", {}, () => [
238
239
  e.appendAvatar ? (n(), a("img", {
239
240
  key: 0,
240
241
  src: e.appendAvatar,
241
242
  class: "w-8 h-8 rounded-full"
242
243
  }, null, 8, se)) : s("", !0),
243
- y(e.appendIcon) ? (n(), u(v(e.appendIcon), {
244
+ p(e.appendIcon) ? (n(), u(v(e.appendIcon), {
244
245
  key: 1,
245
246
  class: "w-5 h-5"
246
247
  })) : e.appendIcon ? (n(), a("i", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.270",
3
+ "version": "0.1.271",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",