adverich-kun-ui 0.1.424 → 0.1.426

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 z, useModel as R, onMounted as oe, ref as S, watch as ie, createElementBlock as v, openBlock as r, createVNode as n, unref as l, isRef as A, createSlots as ne, withCtx as i, createCommentVNode as k, Fragment as re, renderList as ae, 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 r, unref as l, isRef as A, createSlots as re, withCtx as i, createCommentVNode as k, Fragment as ne, renderList as ae, createBlock as m, createElementVNode as se, createTextVNode as b, 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 _ } from "../../../../utils/utils.js";
4
4
  import me from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
@@ -9,11 +9,11 @@ import pe from "../../../KunListItemSubtitle/src/components/KunListItemSubtitle.
9
9
  import he from "../../../KunMenu/src/components/KunMenu.vue.js";
10
10
  import { useAutocomplete as ve } from "../composables/useAutocomplete.js";
11
11
  import { KunAutocompleteProps as ke } from "../composables/KunAutocompleteProps.js";
12
- import ye from "../../../KunTextField/src/components/KunTextField.vue.js";
13
- import be from "../../../KunBtn/src/components/KunBtn.vue.js";
14
- import ge from "../../../KunChip/src/components/KunChip.vue.js";
15
- import b from "../../../KunIcon/src/components/KunIcon.vue.js";
16
- const Ce = {
12
+ import be from "../../../KunTextField/src/components/KunTextField.vue.js";
13
+ import ye from "../../../KunBtn/src/components/KunBtn.vue.js";
14
+ import Ce from "../../../KunChip/src/components/KunChip.vue.js";
15
+ import y from "../../../KunIcon/src/components/KunIcon.vue.js";
16
+ const ge = {
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 = {
@@ -28,9 +28,9 @@ const Ce = {
28
28
  itemsModifiers: {}
29
29
  }),
30
30
  emits: /* @__PURE__ */ z(["update:modelValue", "selectedItem", "createItem", "validation", "search"], ["update:modelValue", "update:items"]),
31
- setup(g, { emit: T }) {
32
- const a = R(g, "modelValue"), M = R(g, "items"), u = g, p = T, {
33
- textFieldRef: C,
31
+ setup(C, { emit: T }) {
32
+ const a = R(C, "modelValue"), M = R(C, "items"), u = C, p = T, {
33
+ textFieldRef: g,
34
34
  listRef: w,
35
35
  menuModel: s,
36
36
  search: c,
@@ -40,8 +40,8 @@ const Ce = {
40
40
  openMenu: V,
41
41
  closeMenu: O,
42
42
  toggleMenu: U,
43
- onMenuKeydown: x,
44
- getSelectedItem: H,
43
+ onMenuKeydown: H,
44
+ getSelectedItem: x,
45
45
  textArr: q,
46
46
  getItemText: P,
47
47
  isAlphanumeric: W,
@@ -51,7 +51,7 @@ const Ce = {
51
51
  placeholder: J
52
52
  } = ve(u, p, a, M);
53
53
  oe(() => {
54
- u.focusOnRender && C.value.focus();
54
+ u.focusOnRender && g.value.focus();
55
55
  });
56
56
  const K = S(null), h = S(""), $ = (e) => {
57
57
  for (const o of u.rules) {
@@ -66,7 +66,7 @@ const Ce = {
66
66
  });
67
67
  function Q() {
68
68
  var e;
69
- s.value = !1, (e = C.value.inputField) == null || e.focus();
69
+ s.value = !1, (e = g.value.inputField) == null || e.focus();
70
70
  }
71
71
  function X(e) {
72
72
  var t, d;
@@ -84,16 +84,16 @@ const Ce = {
84
84
  $(a);
85
85
  }
86
86
  function ee(e) {
87
- x(e);
87
+ H(e);
88
88
  }
89
89
  function le() {
90
90
  }
91
- return (e, o) => (r(), v("div", {
91
+ return (e, o) => (n(), v("div", {
92
92
  class: "w-full h-fit",
93
93
  ref_key: "parentRef",
94
94
  ref: K
95
95
  }, [
96
- n(ye, {
96
+ r(be, {
97
97
  modelValue: l(c),
98
98
  "onUpdate:modelValue": [
99
99
  o[1] || (o[1] = (t) => A(c) ? c.value = t : null),
@@ -104,7 +104,7 @@ const Ce = {
104
104
  "hide-details": e.hideDetails,
105
105
  density: e.density,
106
106
  ref_key: "textFieldRef",
107
- ref: C,
107
+ ref: g,
108
108
  autocomplete: "off",
109
109
  onFocusInput: Z,
110
110
  onHandleClick: l(U),
@@ -114,17 +114,17 @@ const Ce = {
114
114
  placeholder: u.multiple && l(_)(a.value) && a.value.length ? "" : l(J),
115
115
  error: !!h.value,
116
116
  "error-messages": h.value
117
- }, ne({
117
+ }, re({
118
118
  default: i(() => [
119
- l(_)(a.value) ? (r(), v("div", Ce, [
120
- (r(!0), v(re, null, ae(a.value, (t) => (r(), m(ge, {
119
+ l(_)(a.value) ? (n(), v("div", ge, [
120
+ (n(!0), v(ne, null, ae(a.value, (t) => (n(), m(Ce, {
121
121
  key: t.id ?? t.name,
122
122
  size: "small"
123
123
  }, {
124
124
  default: i(() => [
125
125
  se("div", we, [
126
- y(I(l(P)(t, e.itemTitle)) + " ", 1),
127
- n(b, {
126
+ b(I(l(P)(t, e.itemTitle)) + " ", 1),
127
+ r(y, {
128
128
  color: "error",
129
129
  icon: l(f).close,
130
130
  size: "small",
@@ -136,7 +136,7 @@ const Ce = {
136
136
  _: 2
137
137
  }, 1024))), 128))
138
138
  ])) : k("", !0),
139
- n(he, {
139
+ r(he, {
140
140
  transition: "fade",
141
141
  "onClick:outside": l(L),
142
142
  modelValue: l(s),
@@ -146,34 +146,35 @@ const Ce = {
146
146
  "parent-ref": K.value,
147
147
  origin: e.menuOrigin,
148
148
  onHandleEscape: Q,
149
+ bgColor: e.bgMenuColor,
149
150
  "close-on-content-click": e.closeOnSelect,
150
151
  width: "w-full",
151
152
  "max-height": e.maxHeight,
152
153
  "hide-details": e.hideDetails
153
154
  }, {
154
155
  default: i(() => [
155
- e.hasCreateItem ? (r(), v("div", Ve, [
156
- n(be, {
156
+ e.hasCreateItem ? (n(), v("div", Ve, [
157
+ r(ye, {
157
158
  onClick: l(j),
158
159
  bgColor: e.btnCreateBg,
159
160
  class: ue(e.btnCreateClass)
160
161
  }, {
161
162
  default: i(() => [
162
- y(I(e.btnCreateText), 1)
163
+ b(I(e.btnCreateText), 1)
163
164
  ]),
164
165
  _: 1
165
166
  }, 8, ["onClick", "bgColor", "class"])
166
167
  ])) : k("", !0),
167
- n(fe, {
168
- "onClick:select": l(H),
168
+ r(fe, {
169
+ "onClick:select": l(x),
169
170
  ref_key: "listRef",
170
171
  ref: w,
171
172
  onKeyDown: ee,
172
173
  selectable: !0,
173
- bgColor: e.bgMenuColor
174
+ bgColor: e.listColor
174
175
  }, {
175
176
  default: i(() => [
176
- n(me, {
177
+ r(me, {
177
178
  items: M.value,
178
179
  search: l(c),
179
180
  "searchable-keys": u.searchableKeys,
@@ -183,7 +184,7 @@ const Ce = {
183
184
  "item-height": 48
184
185
  }, {
185
186
  default: i(({ item: t, index: d, empty: te }) => [
186
- !te && t != null ? (r(), m(B, {
187
+ !te && t != null ? (n(), m(B, {
187
188
  value: t,
188
189
  key: `kun-list-${d + 1}`,
189
190
  id: `kun-item-${d + 1}`,
@@ -195,25 +196,25 @@ const Ce = {
195
196
  selectable: !0
196
197
  }, {
197
198
  default: i(() => [
198
- n(F, { class: "text-wrap" }, {
199
+ r(F, { class: "text-wrap" }, {
199
200
  default: i(() => [
200
- y(I(l(D)(t, e.itemTitle ?? l(q), "hasDefault")), 1)
201
+ b(I(l(D)(t, e.itemTitle ?? l(q), "hasDefault")), 1)
201
202
  ]),
202
203
  _: 2
203
204
  }, 1024),
204
- n(pe, {
205
+ r(pe, {
205
206
  text: e.itemSubtitle ? l(D)(t, e.itemSubtitle) : ""
206
207
  }, null, 8, ["text"])
207
208
  ]),
208
209
  _: 2
209
- }, 1032, ["value", "id", "disabled", "bg-items", "hover-bg", "activeClass", "density"])) : (r(), m(B, {
210
+ }, 1032, ["value", "id", "disabled", "bg-items", "hover-bg", "activeClass", "density"])) : (n(), m(B, {
210
211
  key: 1,
211
212
  disabled: ""
212
213
  }, {
213
214
  default: i(() => [
214
- n(F, { class: "text-center w-full text-gray-500" }, {
215
+ r(F, { class: "text-center w-full text-gray-500" }, {
215
216
  default: i(() => o[2] || (o[2] = [
216
- y(" No hay elementos disponibles ")
217
+ b(" No hay elementos disponibles ")
217
218
  ])),
218
219
  _: 1,
219
220
  __: [2]
@@ -229,14 +230,14 @@ const Ce = {
229
230
  }, 8, ["onClick:select", "bgColor"])
230
231
  ]),
231
232
  _: 1
232
- }, 8, ["onClick:outside", "modelValue", "z-index", "parent-ref", "origin", "close-on-content-click", "max-height", "hide-details"])
233
+ }, 8, ["onClick:outside", "modelValue", "z-index", "parent-ref", "origin", "bgColor", "close-on-content-click", "max-height", "hide-details"])
233
234
  ]),
234
235
  _: 2
235
236
  }, [
236
237
  e.hasIcons ? {
237
238
  name: "append-inner",
238
239
  fn: i(() => [
239
- e.clearable && a.value ? (r(), m(b, {
240
+ e.clearable && a.value ? (n(), m(y, {
240
241
  key: 0,
241
242
  onClick: l(N),
242
243
  size: "small",
@@ -244,14 +245,14 @@ const Ce = {
244
245
  icon: l(f).close,
245
246
  class: "mr-1 mt-1"
246
247
  }, null, 8, ["onClick", "icon"])) : k("", !0),
247
- n(b, {
248
+ r(y, {
248
249
  color: "teal-darken-1",
249
250
  size: "large",
250
251
  class: "cursor-pointer",
251
252
  icon: l(s) ? l(f).menuUpOutline : l(f).menuDownOutline,
252
253
  onClick: de(l(V), ["stop"])
253
254
  }, null, 8, ["icon", "onClick"]),
254
- e.required ? (r(), m(b, {
255
+ e.required ? (n(), m(y, {
255
256
  key: 1,
256
257
  color: "teal-darken-1",
257
258
  size: "x-small",
@@ -1,4 +1,4 @@
1
- import { computed as t, createElementBlock as a, openBlock as i, normalizeClass as c, renderSlot as d } from "vue";
1
+ import { computed as l, createElementBlock as a, openBlock as i, normalizeClass as c, renderSlot as d } from "vue";
2
2
  const u = {
3
3
  __name: "KunDialogContent",
4
4
  props: {
@@ -12,22 +12,19 @@ const u = {
12
12
  height: String,
13
13
  maxHeight: String
14
14
  },
15
- setup(s) {
16
- const e = s, n = t(() => e.fullscreen ? `fixed inset-0 w-screen h-screen rounded-none shadow-none overflow-visible ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}` : `relative rounded-xl shadow-xl transition-all ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}`), r = t(() => {
17
- var o, l;
18
- return [
19
- n.value,
20
- ...((o = e.bgColor) == null ? void 0 : o.split(" ")) || [],
21
- ...((l = e.contentClass) == null ? void 0 : l.split(" ")) || [],
22
- e.minWidth,
23
- e.width,
24
- e.maxWidth,
25
- e.height,
26
- e.maxHeight
27
- ];
28
- });
29
- return (o, l) => (i(), a("div", {
30
- class: c(r.value)
15
+ setup(t) {
16
+ const e = t, s = l(() => e.fullscreen ? `fixed inset-0 w-screen h-screen rounded-none shadow-none overflow-visible ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}` : `relative rounded-xl shadow-xl transition-all ${e.scrollable ? "overflow-y-auto" : "overflow-visible"}`), n = l(() => [
17
+ s.value,
18
+ e.contentClass,
19
+ e.bgColor,
20
+ e.minWidth,
21
+ e.width,
22
+ e.maxWidth,
23
+ e.height,
24
+ e.maxHeight
25
+ ]);
26
+ return (o, r) => (i(), a("div", {
27
+ class: c(n.value)
31
28
  }, [
32
29
  d(o.$slots, "default")
33
30
  ], 2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.424",
3
+ "version": "0.1.426",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",