adverich-kun-ui 0.1.506 → 0.1.508

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 X, toRefs as $e, useModel as Fe, ref as C, watch as Y, computed as Z, onMounted as Pe, createElementBlock as n, openBlock as l, mergeProps as O, createCommentVNode as a, createElementVNode as v, renderSlot as r, createBlock as T, unref as s, toDisplayString as z, Fragment as _, withCtx as D, createVNode as $, normalizeClass as N, withDirectives as ee, vModelText as Ae, vShow as se, normalizeProps as p, guardReactiveProps as y, createSlots as oe, renderList as te, isRef as Me, nextTick as Ie } from "vue";
1
+ import { mergeModels as X, toRefs as $e, useModel as Fe, ref as C, watch as Y, computed as Z, onMounted as Pe, createElementBlock as n, openBlock as l, mergeProps as O, createCommentVNode as a, createElementVNode as v, renderSlot as r, createBlock as T, unref as s, toDisplayString as j, Fragment as _, withCtx as z, createVNode as $, normalizeClass as D, withDirectives as ee, vModelText as Ae, vShow as se, normalizeProps as p, guardReactiveProps as w, createSlots as oe, renderList as te, isRef as Me, nextTick as Ie } from "vue";
2
2
  import { isMobile as f } from "../../../../utils/_platform.js";
3
3
  import le from "../../../KunIcon/src/components/KunIcon.vue.js";
4
4
  import Re from "../../../../icons/IconFilter.vue.js";
@@ -8,19 +8,19 @@ import Be from "./KunTableFooter.vue.js";
8
8
  import He from "./KunTableRows.vue.js";
9
9
  import Ve from "./KunTableIterators.vue.js";
10
10
  import Oe from "../../../KunBtn/src/components/KunBtn.vue.js";
11
- import ze from "./KunTableFilter.vue.js";
12
- import De from "../composables/useExpand.js";
13
- import Ne from "../composables/useOptions.js";
14
- import je from "../composables/useSelect.js";
11
+ import je from "./KunTableFilter.vue.js";
12
+ import ze from "../composables/useExpand.js";
13
+ import De from "../composables/useOptions.js";
14
+ import Ne from "../composables/useSelect.js";
15
15
  import Ke from "../composables/useFilter.js";
16
16
  import Le from "../composables/KunTableProps.js";
17
17
  const Ue = {
18
18
  key: 0,
19
19
  class: "p-2 bg-surface print:hidden flex w-full justify-between"
20
- }, We = { class: "w-fit flex items-center" }, Qe = {
20
+ }, We = { class: "w-full flex items-center" }, Qe = {
21
21
  key: 0,
22
- class: "flex items-center justify-center"
23
- }, qe = { class: "pr-2" }, Ge = { class: "flex h-full items-center" }, Je = ["placeholder"], Xe = { class: "flex-1 overflow-auto bg-surface" }, Ye = { key: 0 }, Ze = { key: 5 }, _e = {
22
+ class: "inline-flex items-center justify-center whitespace-nowrap"
23
+ }, qe = { class: "pr-2" }, Ge = { class: "w-full flex h-full items-center justify-end" }, Je = ["placeholder"], Xe = { class: "flex-1 overflow-auto bg-surface" }, Ye = { key: 0 }, Ze = { key: 5 }, _e = {
24
24
  key: 1,
25
25
  class: "h-full flex justify-center items-center"
26
26
  }, es = { class: "text-center text-4xl" }, ss = {
@@ -33,8 +33,8 @@ const Ue = {
33
33
  selectedItemsModifiers: {}
34
34
  }),
35
35
  emits: /* @__PURE__ */ X(["update:page", "update:itemsPerPage", "update:sortBy", "update:search", "focusOnSearch"], ["update:selectedItems"]),
36
- setup(j, { emit: ne }) {
37
- const k = ne, m = j, F = $e(m), w = Fe(j, "selectedItems"), {
36
+ setup(N, { emit: ne }) {
37
+ const k = ne, m = N, F = $e(m), y = Fe(N, "selectedItems"), {
38
38
  headers: K,
39
39
  showExpand: P,
40
40
  showSelect: A,
@@ -71,7 +71,7 @@ const Ue = {
71
71
  Y(b, (e) => {
72
72
  k("update:search", e), pe(e);
73
73
  });
74
- const { options: c, paginatedItems: u, updateSort: ge } = Ne(F, k, h), { isSelected: I, toggleSelect: R, toggleSelectAll: ve, allSelected: ye, someSelected: we, moreThanPaginated: be, clearSelection: W, selectCompleteAll: Q } = je(u, w, h), { isExpanded: E, toggleExpand: x } = De(), g = Z(() => ({
74
+ const { options: c, paginatedItems: u, updateSort: ge } = De(F, k, h), { isSelected: I, toggleSelect: R, toggleSelectAll: ve, allSelected: we, someSelected: ye, moreThanPaginated: be, clearSelection: W, selectCompleteAll: Q } = Ne(u, y, h), { isExpanded: E, toggleExpand: x } = ze(), g = Z(() => ({
75
75
  items: u.value,
76
76
  headers: K.value,
77
77
  page: c.page,
@@ -105,19 +105,19 @@ const Ue = {
105
105
  v("div", We, [
106
106
  r(e.$slots, "prependHeader")
107
107
  ]),
108
- w.value.length ? (l(), n("div", Qe, [
109
- v("span", qe, "Se han seleccionado " + z(w.value.length) + " registros.", 1),
108
+ y.value.length ? (l(), n("div", Qe, [
109
+ v("span", qe, "Se han seleccionado " + j(y.value.length) + " registros.", 1),
110
110
  s(u).length !== s(h).length ? (l(), n(_, { key: 0 }, [
111
- s(u).length === w.value.length ? (l(), n("span", {
111
+ s(u).length === y.value.length ? (l(), n("span", {
112
112
  key: 0,
113
- class: "bg-secondary hover:!bg-blue-500 rounded cursor-pointer px-2",
114
- onClick: o[0] || (o[0] = (...t) => s(Q) && s(Q)(...t))
115
- }, "Seleccionar todos los " + z(s(h).length) + " registros", 1)) : a("", !0),
116
- s(h).length === w.value.length ? (l(), n("span", {
113
+ onClick: o[0] || (o[0] = (...t) => s(Q) && s(Q)(...t)),
114
+ class: "bg-secondary hover:!bg-blue-500 rounded cursor-pointer px-2 ml-2"
115
+ }, " Seleccionar todos los " + j(s(h).length) + " registros ", 1)) : a("", !0),
116
+ s(h).length === y.value.length ? (l(), n("span", {
117
117
  key: 1,
118
- class: "bg-secondary hover:!bg-blue-500 rounded cursor-pointer px-2",
119
- onClick: o[1] || (o[1] = (...t) => s(W) && s(W)(...t))
120
- }, "Anular selección")) : a("", !0)
118
+ onClick: o[1] || (o[1] = (...t) => s(W) && s(W)(...t)),
119
+ class: "bg-secondary hover:!bg-blue-500 rounded cursor-pointer px-2 ml-2"
120
+ }, " Anular selección ")) : a("", !0)
121
121
  ], 64)) : a("", !0)
122
122
  ])) : a("", !0),
123
123
  v("div", Ge, [
@@ -130,7 +130,7 @@ const Ue = {
130
130
  size: "xs",
131
131
  bgColor: "bg-green-200 dark:bg-green-800"
132
132
  }, {
133
- default: D(() => [
133
+ default: z(() => [
134
134
  $(le, {
135
135
  class: "h-fit",
136
136
  icon: Re,
@@ -141,13 +141,13 @@ const Ue = {
141
141
  })) : a("", !0),
142
142
  s(U) ? (l(), n("div", {
143
143
  key: 1,
144
- class: N(["rounded flex mx-2", [V.value]])
144
+ class: D(["rounded flex mx-2", [V.value]])
145
145
  }, [
146
146
  ee(v("input", {
147
147
  "onUpdate:modelValue": o[3] || (o[3] = (t) => b.value = t),
148
148
  type: "text",
149
149
  placeholder: e.searchPlaceholder,
150
- class: N(["w-full text-sm", s(f) ? "px-1" : "px-2 py-1"]),
150
+ class: D(["w-full text-sm", s(f) ? "px-1" : "px-2 py-1"]),
151
151
  ref_key: "searchRef",
152
152
  ref: q,
153
153
  onFocus: J,
@@ -169,10 +169,10 @@ const Ue = {
169
169
  v("div", Xe, [
170
170
  s(u).length ? (l(), n("table", {
171
171
  key: 0,
172
- class: N(Ce)
172
+ class: D(Ce)
173
173
  }, [
174
174
  e.$slots.colgroup && !s(f) ? (l(), n("colgroup", Ye, [
175
- r(e.$slots, "colgroup", p(y(g.value)))
175
+ r(e.$slots, "colgroup", p(w(g.value)))
176
176
  ])) : a("", !0),
177
177
  !s(re) && !s(f) ? (l(), T(xe, {
178
178
  key: 1,
@@ -180,9 +180,9 @@ const Ue = {
180
180
  "sort-by": s(c).sortBy,
181
181
  "show-select": s(A),
182
182
  "show-expand": s(P),
183
- "all-selected": s(ye),
183
+ "all-selected": s(we),
184
184
  "more-than-paginated": s(be),
185
- "some-selected": s(we),
185
+ "some-selected": s(ye),
186
186
  "thead-class": e.theadClass,
187
187
  "tr-class": e.trClass,
188
188
  "th-class": e.thClass,
@@ -210,12 +210,12 @@ const Ue = {
210
210
  }, oe({ _: 2 }, [
211
211
  te(e.$slots, (t, d) => ({
212
212
  name: d,
213
- fn: D((i) => [
214
- r(e.$slots, d, p(y(i)))
213
+ fn: z((i) => [
214
+ r(e.$slots, d, p(w(i)))
215
215
  ])
216
216
  }))
217
217
  ]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"])) : (l(), n(_, { key: 3 }, [
218
- r(e.$slots, "body.prepend", p(y(g.value))),
218
+ r(e.$slots, "body.prepend", p(w(g.value))),
219
219
  $(He, {
220
220
  items: s(u),
221
221
  headers: M.value,
@@ -238,19 +238,19 @@ const Ue = {
238
238
  }, oe({ _: 2 }, [
239
239
  te(e.$slots, (t, d) => ({
240
240
  name: d,
241
- fn: D((i) => [
242
- r(e.$slots, d, p(y(i)))
241
+ fn: z((i) => [
242
+ r(e.$slots, d, p(w(i)))
243
243
  ])
244
244
  }))
245
245
  ]), 1032, ["items", "headers", "tbody-class", "row-class", "row-class-condition", "tr-class", "td-class", "selected-class", "striped-class", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"]),
246
- r(e.$slots, "body.append", p(y(g.value)))
246
+ r(e.$slots, "body.append", p(w(g.value)))
247
247
  ], 64)),
248
248
  e.$slots.tfoot ? (l(), n("tfoot", Ze, [
249
- r(e.$slots, "tfoot", p(y(g.value)))
249
+ r(e.$slots, "tfoot", p(w(g.value)))
250
250
  ])) : a("", !0)
251
251
  ])) : a("", !0),
252
252
  s(u).length ? a("", !0) : (l(), n("div", _e, [
253
- v("div", es, z(e.noDataText), 1)
253
+ v("div", es, j(e.noDataText), 1)
254
254
  ]))
255
255
  ]),
256
256
  s(ae) ? r(e.$slots, "footer", p(O({ key: 2 }, g.value))) : (l(), n("div", ss, [
@@ -263,7 +263,7 @@ const Ue = {
263
263
  "onUpdate:page": o[5] || (o[5] = (t) => s(c).page = t)
264
264
  }, null, 8, ["items-length", "items-per-page", "current-page", "page-options"])
265
265
  ])),
266
- e.filterable && s(S) ? (l(), T(ze, {
266
+ e.filterable && s(S) ? (l(), T(je, {
267
267
  key: 3,
268
268
  filters: e.filters,
269
269
  modelValue: s(S),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.506",
3
+ "version": "0.1.508",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",