adverich-kun-ui 0.1.418 → 0.1.419

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 { mergeModels as $, useModel as z, onMounted as oe, ref as R, watch as ie, createElementBlock as v, openBlock as n, createVNode as a, unref as l, isRef as S, createSlots as ae, withCtx as i, createCommentVNode as k, Fragment as ne, renderList as re, createBlock as m, createElementVNode as se, createTextVNode as y, toDisplayString as I, normalizeClass as ue, withModifiers as de } from "vue";
1
+ import { mergeModels as z, useModel as R, onMounted as oe, ref as S, watch as ie, createElementBlock as v, openBlock as n, createVNode as a, unref as l, isRef as _, createSlots as ae, withCtx as i, createCommentVNode as k, Fragment as ne, renderList as re, createBlock as m, createElementVNode as se, createTextVNode as y, toDisplayString as I, normalizeClass as ue, withModifiers as de } from "vue";
2
2
  import { icons as f } from "../../../../icons/index.js";
3
3
  import { isNotEmpty as ce, isArray as A } from "../../../../utils/utils.js";
4
4
  import me from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
@@ -11,37 +11,37 @@ import { useAutocomplete as ve } from "../composables/useAutocomplete.js";
11
11
  import { KunAutocompleteProps as ke } from "../composables/KunAutocompleteProps.js";
12
12
  import ye from "../../../KunTextField/src/components/KunTextField.vue.js";
13
13
  import be from "../../../KunBtn/src/components/KunBtn.vue.js";
14
- import Ce from "../../../KunChip/src/components/KunChip.vue.js";
14
+ import ge from "../../../KunChip/src/components/KunChip.vue.js";
15
15
  import b from "../../../KunIcon/src/components/KunIcon.vue.js";
16
- const ge = {
16
+ const Ce = {
17
17
  key: 0,
18
18
  class: "w-full flex overflow-x-auto whitespace-nowrap space-x-1"
19
19
  }, we = { class: "flex items-center" }, Ve = {
20
20
  key: 0,
21
21
  class: "sticky top-0 z-10 p-2 border-b"
22
- }, Ne = {
22
+ }, xe = {
23
23
  __name: "KunAutocomplete",
24
- props: /* @__PURE__ */ $(ke, {
24
+ props: /* @__PURE__ */ z(ke, {
25
25
  modelValue: { default: null },
26
26
  modelModifiers: {},
27
27
  items: { default: [], type: Array, required: !0 },
28
28
  itemsModifiers: {}
29
29
  }),
30
- emits: /* @__PURE__ */ $(["update:modelValue", "selectedItem", "createItem", "validation", "search"], ["update:modelValue", "update:items"]),
31
- setup(C, { emit: T }) {
32
- const r = z(C, "modelValue"), D = z(C, "items"), u = C, p = T, {
33
- textFieldRef: g,
30
+ emits: /* @__PURE__ */ z(["update:modelValue", "selectedItem", "createItem", "validation", "search"], ["update:modelValue", "update:items"]),
31
+ setup(g, { emit: T }) {
32
+ const r = R(g, "modelValue"), D = R(g, "items"), u = g, p = T, {
33
+ textFieldRef: C,
34
34
  listRef: w,
35
35
  menuModel: s,
36
36
  search: c,
37
- removeItem: x,
38
- clearSelection: E,
39
- lightReset: N,
37
+ removeItem: E,
38
+ clearSelection: N,
39
+ lightReset: x,
40
40
  openMenu: V,
41
41
  closeMenu: L,
42
- toggleMenu: U,
43
- onMenuKeydown: H,
44
- getSelectedItem: O,
42
+ toggleMenu: O,
43
+ onMenuKeydown: U,
44
+ getSelectedItem: H,
45
45
  textArr: q,
46
46
  getItemText: P,
47
47
  isAlphanumeric: W,
@@ -51,9 +51,9 @@ const ge = {
51
51
  placeholder: J
52
52
  } = ve(u, p, r, D);
53
53
  oe(() => {
54
- u.focusOnRender && g.value.focus();
54
+ u.focusOnRender && C.value.focus();
55
55
  });
56
- const M = R(null), h = R(""), _ = (e) => {
56
+ const M = S(null), h = S(""), $ = (e) => {
57
57
  for (const o of u.rules) {
58
58
  const t = o(e);
59
59
  if (t !== !0)
@@ -62,11 +62,11 @@ const ge = {
62
62
  return h.value = "", p("validation", !0), !0;
63
63
  };
64
64
  ie(() => r.value, (e, o) => {
65
- ce(u.rules) && _(e);
65
+ ce(u.rules) && $(e);
66
66
  });
67
67
  function Q() {
68
68
  var e;
69
- s.value = !1, (e = g.value.inputField) == null || e.focus();
69
+ s.value = !1, (e = C.value.inputField) == null || e.focus();
70
70
  }
71
71
  function X(e) {
72
72
  var t, d;
@@ -81,10 +81,10 @@ const ge = {
81
81
  p("search", c);
82
82
  }
83
83
  function Z() {
84
- _(r);
84
+ $(r);
85
85
  }
86
86
  function ee(e) {
87
- H(e);
87
+ U(e);
88
88
  }
89
89
  function le() {
90
90
  }
@@ -96,7 +96,7 @@ const ge = {
96
96
  a(ye, {
97
97
  modelValue: l(c),
98
98
  "onUpdate:modelValue": [
99
- o[1] || (o[1] = (t) => S(c) ? c.value = t : null),
99
+ o[1] || (o[1] = (t) => _(c) ? c.value = t : null),
100
100
  Y
101
101
  ],
102
102
  label: e.label,
@@ -104,10 +104,10 @@ const ge = {
104
104
  "hide-details": e.hideDetails,
105
105
  density: e.density,
106
106
  ref_key: "textFieldRef",
107
- ref: g,
107
+ ref: C,
108
108
  autocomplete: "off",
109
109
  onFocusInput: Z,
110
- onHandleClick: l(U),
110
+ onHandleClick: l(O),
111
111
  rounded: l(s) ? "rounded-t" : "rounded",
112
112
  onBlur: le,
113
113
  onKeyDown: X,
@@ -116,8 +116,8 @@ const ge = {
116
116
  "error-messages": h.value
117
117
  }, ae({
118
118
  default: i(() => [
119
- l(A)(r.value) ? (n(), v("div", ge, [
120
- (n(!0), v(ne, null, re(r.value, (t) => (n(), m(Ce, {
119
+ l(A)(r.value) ? (n(), v("div", Ce, [
120
+ (n(!0), v(ne, null, re(r.value, (t) => (n(), m(ge, {
121
121
  key: t.id ?? t.name,
122
122
  size: "small"
123
123
  }, {
@@ -129,7 +129,7 @@ const ge = {
129
129
  icon: l(f).close,
130
130
  size: "small",
131
131
  class: "ml-1",
132
- onClick: (d) => l(x)(t)
132
+ onClick: (d) => l(E)(t)
133
133
  }, null, 8, ["icon", "onClick"])
134
134
  ])
135
135
  ]),
@@ -138,14 +138,13 @@ const ge = {
138
138
  ])) : k("", !0),
139
139
  a(he, {
140
140
  transition: "fade",
141
- "onClick:outside": l(N),
141
+ "onClick:outside": l(x),
142
142
  modelValue: l(s),
143
- "onUpdate:modelValue": o[0] || (o[0] = (t) => S(s) ? s.value = t : null),
143
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => _(s) ? s.value = t : null),
144
144
  activator: "parent",
145
145
  "z-index": e.zIndex,
146
146
  "parent-ref": M.value,
147
- location: "bottom",
148
- origin: "bottom left",
147
+ origin: e.menuOrigin,
149
148
  onHandleEscape: Q,
150
149
  "close-on-content-click": e.closeOnSelect,
151
150
  width: "w-full",
@@ -166,7 +165,7 @@ const ge = {
166
165
  }, 8, ["onClick", "bgColor", "class"])
167
166
  ])) : k("", !0),
168
167
  a(fe, {
169
- "onClick:select": l(O),
168
+ "onClick:select": l(H),
170
169
  ref_key: "listRef",
171
170
  ref: w,
172
171
  onKeyDown: ee,
@@ -229,7 +228,7 @@ const ge = {
229
228
  }, 8, ["onClick:select"])
230
229
  ]),
231
230
  _: 1
232
- }, 8, ["onClick:outside", "modelValue", "z-index", "parent-ref", "close-on-content-click", "max-height", "hide-details"])
231
+ }, 8, ["onClick:outside", "modelValue", "z-index", "parent-ref", "origin", "close-on-content-click", "max-height", "hide-details"])
233
232
  ]),
234
233
  _: 2
235
234
  }, [
@@ -238,7 +237,7 @@ const ge = {
238
237
  fn: i(() => [
239
238
  e.clearable && r.value ? (n(), m(b, {
240
239
  key: 0,
241
- onClick: l(E),
240
+ onClick: l(N),
242
241
  size: "small",
243
242
  color: "error",
244
243
  icon: l(f).close,
@@ -266,5 +265,5 @@ const ge = {
266
265
  }
267
266
  };
268
267
  export {
269
- Ne as default
268
+ xe as default
270
269
  };
@@ -47,6 +47,7 @@ const e = {
47
47
  default: !0
48
48
  },
49
49
  closeOnSelect: { type: Boolean, default: !0 },
50
+ menuOrigin: { type: String, default: "bottom left" },
50
51
  startEmtpy: { type: Boolean, default: !1 },
51
52
  placeholderText: { type: String, default: "Seleccionar" },
52
53
  textNoItems: { type: String, default: "No hay elementos" },
@@ -42,7 +42,7 @@ const e = {
42
42
  const n = new Date(t);
43
43
  return new Intl.DateTimeFormat("es-MX", {
44
44
  weekday: "short",
45
- day: "numeric",
45
+ day: "2-digit",
46
46
  month: "short",
47
47
  year: "2-digit"
48
48
  }).format(n);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.418",
3
+ "version": "0.1.419",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",