adverich-kun-ui 0.1.72 → 0.1.73

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,24 +1,24 @@
1
- import { mergeModels as A, useModel as R, onMounted as ne, onUnmounted as ie, ref as U, watch as re, createBlock as c, openBlock as r, unref as e, isRef as B, createSlots as ae, withCtx as i, createElementBlock as F, createCommentVNode as k, createVNode as a, Fragment as se, renderList as ue, createElementVNode as de, createTextVNode as w, toDisplayString as V, normalizeClass as ce } from "vue";
1
+ import { mergeModels as A, useModel as R, onMounted as ne, onUnmounted as ie, ref as U, watch as re, createBlock as c, openBlock as r, unref as e, isRef as B, createSlots as ae, withCtx as i, createElementBlock as F, createCommentVNode as k, createVNode as a, Fragment as se, renderList as ue, createElementVNode as de, createTextVNode as w, toDisplayString as V, normalizeClass as ce, withModifiers as me } from "vue";
2
2
  import { icons as p } from "../../../../icons/index.js";
3
- import { isNotEmpty as me, isArray as N } from "../../../../utils/utils.js";
4
- import fe from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
5
- import pe from "../../../KunList/src/components/KunList.vue.js";
3
+ import { isNotEmpty as fe, isArray as N } from "../../../../utils/utils.js";
4
+ import pe from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
5
+ import ve from "../../../KunList/src/components/KunList.vue.js";
6
6
  import T from "../../../KunListItem/src/components/KunListItem.vue.js";
7
- import ve from "../../../KunListItemTitle/src/components/KunListItemTitle.vue.js";
8
- import ye from "../../../KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
9
- import ke from "../../../kunMenu/src/components/kunMenu.vue.js";
10
- import { useAutocomplete as he } from "../composables/useAutocomplete.js";
11
- import { KunAutocompleteProps as ge } from "../composables/KunAutocompleteProps.js";
12
- import Ce from "../../../KunTextField/src/components/KunTextField.vue.js";
13
- import be from "../../../KunBtn/src/components/KunBtn.vue.js";
14
- import we from "../../../KunChip/src/components/KunChip.vue.js";
7
+ import ye from "../../../KunListItemTitle/src/components/KunListItemTitle.vue.js";
8
+ import ke from "../../../KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
9
+ import he from "../../../kunMenu/src/components/kunMenu.vue.js";
10
+ import { useAutocomplete as ge } from "../composables/useAutocomplete.js";
11
+ import { KunAutocompleteProps as Ce } from "../composables/KunAutocompleteProps.js";
12
+ import be from "../../../KunTextField/src/components/KunTextField.vue.js";
13
+ import we from "../../../KunBtn/src/components/KunBtn.vue.js";
14
+ import Ve from "../../../KunChip/src/components/KunChip.vue.js";
15
15
  import h from "../../../KunIcon/src/components/KunIcon.vue.js";
16
- const Ve = {
16
+ const Se = {
17
17
  key: 0,
18
18
  class: "flex justify-center align-center"
19
- }, Se = { class: "flex justify-center align-center" }, Ne = {
19
+ }, _e = { class: "flex justify-center align-center" }, Te = {
20
20
  __name: "KunAutocomplete",
21
- props: /* @__PURE__ */ A(ge, {
21
+ props: /* @__PURE__ */ A(Ce, {
22
22
  modelValue: { default: null },
23
23
  modelModifiers: {},
24
24
  items: { default: [], type: Array, required: !0 },
@@ -45,7 +45,7 @@ const Ve = {
45
45
  itemToString: I,
46
46
  placeholder: K,
47
47
  hasCreateItem: Q
48
- } = he(n, v, u, S);
48
+ } = ge(n, v, u, S);
49
49
  ne(() => {
50
50
  b(), window.addEventListener("resize", b), n.focusOnRender && d.value.focus();
51
51
  }), ie(() => {
@@ -54,7 +54,7 @@ const Ve = {
54
54
  function X(t) {
55
55
  return u.value === null || u.value === void 0 ? n.bgItemListColor : n.multiple ? u.value.find((o) => o[n.itemValue] === t[n.itemValue]) ? n.selectedColor : n.bgItemListColor : K.value === t[n.itemTitle] ? n.selectedColor : n.bgItemListColor;
56
56
  }
57
- const y = U(""), D = (t) => {
57
+ const y = U(""), M = (t) => {
58
58
  for (const o of n.rules) {
59
59
  const l = o(t);
60
60
  if (l !== !0)
@@ -63,9 +63,9 @@ const Ve = {
63
63
  return y.value = "", v("validation", !0), !0;
64
64
  };
65
65
  re(() => u.value, (t, o) => {
66
- me(n.rules) && D(t);
66
+ fe(n.rules) && M(t);
67
67
  });
68
- function M() {
68
+ function D() {
69
69
  s.value = !1, d.value.$el.focus();
70
70
  }
71
71
  function Y(t) {
@@ -88,12 +88,12 @@ const Ve = {
88
88
  }
89
89
  }
90
90
  function Z() {
91
- D(u);
91
+ M(u);
92
92
  }
93
93
  function ee(t) {
94
94
  const o = t.key;
95
95
  if (o === "Escape") {
96
- M();
96
+ D();
97
97
  return;
98
98
  }
99
99
  if (["ArrowDown", "ArrowUp"].includes(o)) {
@@ -109,7 +109,7 @@ const Ve = {
109
109
  function le() {
110
110
  s.value = !1;
111
111
  }
112
- return (t, o) => (r(), c(Ce, {
112
+ return (t, o) => (r(), c(be, {
113
113
  modelValue: e(f),
114
114
  "onUpdate:modelValue": [
115
115
  o[2] || (o[2] = (l) => B(f) ? f.value = l : null),
@@ -131,14 +131,14 @@ const Ve = {
131
131
  "error-messages": y.value
132
132
  }, ae({
133
133
  default: i(() => [
134
- e(N)(e(m)) ? (r(), F("div", Ve, [
135
- (r(!0), F(se, null, ue(e(m), (l) => (r(), c(we, {
134
+ e(N)(e(m)) ? (r(), F("div", Se, [
135
+ (r(!0), F(se, null, ue(e(m), (l) => (r(), c(Ve, {
136
136
  key: l.id ?? l.name,
137
137
  size: "small",
138
138
  class: "ml-1"
139
139
  }, {
140
140
  default: i(() => [
141
- de("div", Se, [
141
+ de("div", _e, [
142
142
  w(V(e(W)(l, t.itemTitle)) + " ", 1),
143
143
  a(h, {
144
144
  color: "error",
@@ -152,20 +152,20 @@ const Ve = {
152
152
  _: 2
153
153
  }, 1024))), 128))
154
154
  ])) : k("", !0),
155
- a(ke, {
155
+ a(he, {
156
156
  transition: "fade",
157
157
  "onClick:outside": e(_),
158
158
  modelValue: e(s),
159
159
  "onUpdate:modelValue": o[1] || (o[1] = (l) => B(s) ? s.value = l : null),
160
160
  activator: "parent",
161
161
  "text-field-ref": e(d),
162
- onHandleEscape: M,
162
+ onHandleEscape: D,
163
163
  "close-on-content-click": t.closeOnSelect,
164
164
  "max-height": t.maxHeight,
165
165
  menuPositionStyle: E.value
166
166
  }, {
167
167
  default: i(() => [
168
- a(pe, {
168
+ a(ve, {
169
169
  "onUpdate:selected": e(j),
170
170
  "onClick:select": o[0] || (o[0] = (l) => e(_)()),
171
171
  ref_key: "listRef",
@@ -175,7 +175,7 @@ const Ve = {
175
175
  default: i(() => [
176
176
  e(Q) ? (r(), c(T, { key: 0 }, {
177
177
  default: i(() => [
178
- a(be, {
178
+ a(we, {
179
179
  onClick: e(G),
180
180
  class: "w-full",
181
181
  color: "bg-green-400"
@@ -189,7 +189,7 @@ const Ve = {
189
189
  ]),
190
190
  _: 1
191
191
  })) : k("", !0),
192
- a(fe, {
192
+ a(pe, {
193
193
  items: S.value,
194
194
  search: e(f),
195
195
  "searchable-keys": n.searchableKeys,
@@ -210,13 +210,13 @@ const Ve = {
210
210
  id: ((z = l.id) == null ? void 0 : z.toString()) ?? l.name
211
211
  }, {
212
212
  default: i(() => [
213
- a(ve, { class: "text-wrap" }, {
213
+ a(ye, { class: "text-wrap" }, {
214
214
  default: i(() => [
215
215
  w(V(e(I)(l, e(q), "hasDefault")), 1)
216
216
  ]),
217
217
  _: 2
218
218
  }, 1024),
219
- a(ye, {
219
+ a(ke, {
220
220
  textContent: V(t.itemSubtitle ? e(I)(l, t.itemSubtitle) : "")
221
221
  }, null, 8, ["textContent"])
222
222
  ]),
@@ -251,7 +251,7 @@ const Ve = {
251
251
  size: "large",
252
252
  class: "cursor-pointer",
253
253
  icon: e(s) ? e(p).menuUpOutline : e(p).menuDownOutline,
254
- onClick: e($)
254
+ onClick: me(e($), ["stop"])
255
255
  }, null, 8, ["icon", "onClick"]),
256
256
  t.required ? (r(), c(h, {
257
257
  key: 1,
@@ -267,5 +267,5 @@ const Ve = {
267
267
  }
268
268
  };
269
269
  export {
270
- Ne as default
270
+ Te as default
271
271
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.72",
3
+ "version": "0.1.73",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",