cleek 2.11.39 → 2.11.40

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.
package/dist/main.es.js CHANGED
@@ -6,7 +6,7 @@ import { library as et } from "@fortawesome/fontawesome-svg-core";
6
6
  import { fas as Nt } from "@fortawesome/free-solid-svg-icons";
7
7
  import { far as Ht } from "@fortawesome/free-regular-svg-icons";
8
8
  import { fab as Ut } from "@fortawesome/free-brands-svg-icons";
9
- import { ref as M, computed as c, watch as ue, defineComponent as z, resolveDirective as tt, openBlock as d, createElementBlock as g, toDisplayString as P, createTextVNode as G, createCommentVNode as C, withDirectives as re, Fragment as J, unref as xe, createElementVNode as w, onMounted as $e, withKeys as be, renderSlot as O, createBlock as S, Teleport as Pe, normalizeStyle as E, normalizeClass as L, resolveComponent as Y, nextTick as yt, onBeforeUnmount as ot, useModel as fe, withCtx as q, vModelDynamic as jt, createVNode as H, mergeModels as te, renderList as se, vModelText as qe, mergeProps as Ae, withModifiers as ie, watchEffect as Ge, vShow as Ve, resolveDynamicComponent as Gt, pushScopeId as Yt, popScopeId as Kt, inject as it, provide as st, onUpdated as Zt, normalizeProps as Jt, guardReactiveProps as Xt, Transition as Qt, vModelRadio as eo, vModelSelect as to, vModelCheckbox as oo, createApp as Ye } from "vue";
9
+ import { ref as M, computed as c, watch as ce, defineComponent as z, resolveDirective as tt, openBlock as d, createElementBlock as g, toDisplayString as P, createTextVNode as G, createCommentVNode as C, withDirectives as re, Fragment as J, unref as xe, createElementVNode as w, onMounted as $e, withKeys as be, renderSlot as O, createBlock as S, Teleport as Pe, normalizeStyle as E, normalizeClass as L, resolveComponent as Y, nextTick as yt, onBeforeUnmount as ot, useModel as fe, withCtx as q, vModelDynamic as jt, createVNode as H, mergeModels as te, renderList as se, vModelText as qe, mergeProps as Ae, withModifiers as ie, watchEffect as Ge, vShow as Ve, resolveDynamicComponent as Gt, pushScopeId as Yt, popScopeId as Kt, inject as it, provide as st, onUpdated as Zt, normalizeProps as Jt, guardReactiveProps as Xt, Transition as Qt, vModelRadio as eo, vModelSelect as to, vModelCheckbox as oo, createApp as Ye } from "vue";
10
10
  import { defineStore as lo, storeToRefs as ne } from "pinia";
11
11
  import { FontAwesomeIcon as no } from "@fortawesome/vue-fontawesome";
12
12
  import { isValid as ve, startOfDecade as ao, endOfDecade as io, eachYearOfInterval as so, getYear as he, getDecade as ze, isBefore as Se, isAfter as Le, addYears as Ct, subYears as wt, startOfYear as ro, endOfYear as uo, format as We, eachMonthOfInterval as co, isSameMonth as Xe, isSameYear as rt, startOfMonth as $t, endOfMonth as xt, endOfWeek as po, startOfWeek as vo, setDay as fo, eachDayOfInterval as mo, isWithinInterval as ho, isSameDay as Ke, addMonths as go, subMonths as ko, set as ut, isSameHour as bo, isSameMinute as yo, parse as ct, startOfDay as Co, endOfDay as wo, max as $o, min as xo } from "date-fns";
@@ -164,7 +164,7 @@ function Io(e) {
164
164
  }
165
165
  const le = lo("cleek-options", () => {
166
166
  const e = M(_t), o = c(() => e.value.colors), t = c(() => e.value.styles), n = c(() => e.value.button), l = c(() => e.value.chip), i = c(() => e.value.div), a = c(() => e.value.img), p = c(() => e.value.popup), u = c(() => e.value.select), f = c(() => e.value.table);
167
- return ue(o, (r) => Io(r), { deep: !0, immediate: !0 }), {
167
+ return ce(o, (r) => Io(r), { deep: !0, immediate: !0 }), {
168
168
  cleekOptions: e,
169
169
  colorsOptions: o,
170
170
  stylesOptions: t,
@@ -304,12 +304,12 @@ const Oo = {
304
304
  const v = t.layout || n.value.styles.layout;
305
305
  return v && r.push(`ck-dropdown--content__${v}`), r;
306
306
  });
307
- ue(() => l.value, (r) => {
307
+ ce(() => l.value, (r) => {
308
308
  if (r) {
309
309
  const v = document.documentElement.clientHeight, s = document.documentElement.clientWidth, h = i.value.getBoundingClientRect(), m = {};
310
310
  h.top < v / 2 ? (m.top = `${h.bottom}px`, m["margin-top"] = "0.5rem") : (m.bottom = `${v - h.top}px`, m["margin-bottom"] = "0.5rem"), t.align === "left" ? m.left = `${h.left}px` : t.align === "right" && (m.right = `${s - h.right}px`), p.value = m;
311
311
  }
312
- }), ue(() => a.value, (r) => {
312
+ }), ce(() => a.value, (r) => {
313
313
  if (r && t.align !== "left" && t.align !== "right") {
314
314
  const v = i.value.getBoundingClientRect();
315
315
  p.value.left = `${v.left + v.width / 2 - r.getBoundingClientRect().width / 2}px`;
@@ -761,7 +761,7 @@ const al = ["title", "aria-label", "disabled", "tabindex"], Ze = "transparent",
761
761
  return a.value.darkMode && (R = a.value.darkModeColorText), R && !A.isColorTemplateVariable(R) && (V.push(`ck-component__color--${R}`), V.push({ color: R })), V;
762
762
  });
763
763
  let _ = !1;
764
- ue(
764
+ ce(
765
765
  () => n.value,
766
766
  (V) => {
767
767
  _ && s.value === "number" && Number(f.value || 0) === Number(V) || (_ = !0, me(V));
@@ -821,12 +821,12 @@ const al = ["title", "aria-label", "disabled", "tabindex"], Ze = "transparent",
821
821
  const V = me(+f.value + 1);
822
822
  F(V), K(V);
823
823
  }
824
- function ce(V) {
824
+ function ue(V) {
825
825
  let T = V;
826
826
  return l.capitalize && (T = Bt(`${T}`)), l.toUpperCase && (T = `${T}`.toUpperCase()), h.value && (T = parseInt(`${+T}`)), typeof l.min < "u" && +T < +l.min && (T = +l.min), typeof l.max < "u" && +T > +l.max && (T = +l.max), T;
827
827
  }
828
828
  function Ce(V) {
829
- const T = Number(ce(V));
829
+ const T = Number(ue(V));
830
830
  return Number.isFinite(T) ? T : 0;
831
831
  }
832
832
  function me(V) {
@@ -834,7 +834,7 @@ const al = ["title", "aria-label", "disabled", "tabindex"], Ze = "transparent",
834
834
  const Z = V === "" || V === null || V === void 0, R = Z ? 0 : Ce(V);
835
835
  return n.value = R, f.value = Z ? "" : R, R;
836
836
  }
837
- const T = ce(V);
837
+ const T = ue(V);
838
838
  return n.value = T, f.value = T, T;
839
839
  }
840
840
  return $e(() => {
@@ -1041,7 +1041,7 @@ const al = ["title", "aria-label", "disabled", "tabindex"], Ze = "transparent",
1041
1041
  const y = t.layout || l.value.styles.layout;
1042
1042
  return y && k.push(y), k;
1043
1043
  });
1044
- ue(() => i.value, () => n("refreshList"));
1044
+ ce(() => i.value, () => n("refreshList"));
1045
1045
  function s(k) {
1046
1046
  let b = +k.value;
1047
1047
  b > t.totalPages && (b = t.totalPages), b < 1 && (b = 1), t.currentPage === b ? k.value = `${b}` : i.value = b;
@@ -1257,8 +1257,8 @@ const Ml = {
1257
1257
  j && x.push({ "max-width": j });
1258
1258
  const pe = l.textColor || a.value.popup.textColor;
1259
1259
  pe && !A.isColorTemplateVariable(pe) && (x.push(`ck-component__color--${pe}`), x.push({ color: pe }));
1260
- let ce = "white";
1261
- return a.value.popup.backgroundColor && (ce = a.value.popup.backgroundColor), a.value.darkMode && (ce = a.value.darkModeColorItems), l.backgroundColor && (ce = l.backgroundColor), ce && !A.isColorTemplateVariable(ce) && x.push({ backgroundColor: ce }), x;
1260
+ let ue = "white";
1261
+ return a.value.popup.backgroundColor && (ue = a.value.popup.backgroundColor), a.value.darkMode && (ue = a.value.darkModeColorItems), l.backgroundColor && (ue = l.backgroundColor), ue && !A.isColorTemplateVariable(ue) && x.push({ backgroundColor: ue }), x;
1262
1262
  }), h = c(() => {
1263
1263
  const x = [];
1264
1264
  let B = "";
@@ -1275,7 +1275,7 @@ const Ml = {
1275
1275
  const j = l.headerColor || a.value.popup.headerColor;
1276
1276
  return j && A.isColorTemplateVariable(j) && x.push(`ck-component__bg-color--${j}`), _.value || x.push("close-btn-hidden"), x;
1277
1277
  }), b = c(() => l.acceptBtnType ? l.acceptBtnType : a.value.popup.acceptBtnType ? a.value.popup.acceptBtnType : "outlined"), y = c(() => l.cancelBtnType ? l.cancelBtnType : a.value.popup.cancelBtnType ? a.value.popup.cancelBtnType : "flat"), _ = c(() => !(l.notCloseBtn || l.notClose)), W = c(() => l.acceptBtnText ? l.acceptBtnText : a.value.lang === "es" ? "Aceptar" : "Accept"), D = c(() => l.cancelBtnText ? l.cancelBtnText : a.value.lang === "es" ? "Cancelar" : "Cancel");
1278
- ue(() => t.value, (x) => {
1278
+ ce(() => t.value, (x) => {
1279
1279
  At(!x), x ? f() : r();
1280
1280
  });
1281
1281
  function F() {
@@ -1405,15 +1405,13 @@ const Ml = {
1405
1405
  n("update:modelValue", u);
1406
1406
  }
1407
1407
  });
1408
- ue(() => i.value, (u) => {
1409
- u && a();
1410
- }), ue(() => i.value, (u) => {
1408
+ ce(() => i.value, (u) => {
1411
1409
  u && a();
1412
1410
  });
1413
1411
  function a() {
1414
1412
  const u = [];
1415
1413
  (t.columnsArray || []).forEach((f) => {
1416
- f.unchangeable || u.push({
1414
+ !f.unchangeable && !f.neverDisplay && f.title && u.push({
1417
1415
  name: f.name,
1418
1416
  title: f.title,
1419
1417
  value: A.isColumnDisplayed(f)
@@ -1450,7 +1448,7 @@ const Ml = {
1450
1448
  _: 1
1451
1449
  }, 8, ["modelValue"]));
1452
1450
  }
1453
- }), ql = /* @__PURE__ */ U(Fl, [["__scopeId", "data-v-49853870"]]), Nl = /* @__PURE__ */ z({
1451
+ }), ql = /* @__PURE__ */ U(Fl, [["__scopeId", "data-v-3d70f3ce"]]), Nl = /* @__PURE__ */ z({
1454
1452
  __name: "LoadingAndNoResultsText",
1455
1453
  props: {
1456
1454
  listLength: {},
@@ -1552,8 +1550,8 @@ const Ml = {
1552
1550
  }), m = c(() => !y.value[y.value.length - 1].title), k = c(() => !Array.isArray(n.columns || [])), b = c(() => {
1553
1551
  if (k.value) {
1554
1552
  const B = Object.values(n.columns || []), j = Object.keys(n.columns || []);
1555
- return B.forEach((pe, ce) => {
1556
- const Ce = j[ce];
1553
+ return B.forEach((pe, ue) => {
1554
+ const Ce = j[ue];
1557
1555
  pe.name = Ce;
1558
1556
  }), B;
1559
1557
  }
@@ -1599,7 +1597,7 @@ const Ml = {
1599
1597
  }
1600
1598
  return (x, B) => {
1601
1599
  var me, V, T, Z;
1602
- const j = Y("ck-checkbox"), pe = Y("ck-chip"), ce = Y("ck-button"), Ce = Y("ck-th");
1600
+ const j = Y("ck-checkbox"), pe = Y("ck-chip"), ue = Y("ck-button"), Ce = Y("ck-th");
1603
1601
  return d(), g("div", Hl, [
1604
1602
  e.hasColumnsManager && k.value ? (d(), S(ql, {
1605
1603
  key: 0,
@@ -1662,7 +1660,7 @@ const Ml = {
1662
1660
  })
1663
1661
  ]),
1664
1662
  O(x.$slots, "selectedRowsActions", {}, void 0, !0),
1665
- e.currentPage && r.value > 1 ? (d(), S(ce, {
1663
+ e.currentPage && r.value > 1 ? (d(), S(ue, {
1666
1664
  key: 0,
1667
1665
  size: "s",
1668
1666
  color: "dark"
@@ -2446,7 +2444,7 @@ const Sn = z({
2446
2444
  },
2447
2445
  setup(e, { emit: o }) {
2448
2446
  const t = M(null), n = M(null), l = c(() => e.pageDate ?? e.selected), i = M(l.value.getHours()), a = M(l.value.getMinutes());
2449
- ue(
2447
+ ce(
2450
2448
  () => e.selected,
2451
2449
  (v) => {
2452
2450
  let s = 0, h = 0;
@@ -2493,7 +2491,7 @@ const Sn = z({
2493
2491
  );
2494
2492
  v && s && (kt(t.value, v.ref.value), kt(n.value, s.ref.value));
2495
2493
  };
2496
- return ue(
2494
+ return ce(
2497
2495
  () => e.visible,
2498
2496
  (v) => {
2499
2497
  v && yt(r);
@@ -2943,7 +2941,7 @@ const Nn = /* @__PURE__ */ Te(On, [["render", qn]]), Hn = ["id"], Un = {
2943
2941
  let _ = "";
2944
2942
  return l.value.darkMode && (_ = l.value.darkModeColorItems), _ && !A.isColorTemplateVariable(_) && y.push({ backgroundColor: _ }), y;
2945
2943
  });
2946
- ue(() => t.modelValue, (y) => {
2944
+ ce(() => t.modelValue, (y) => {
2947
2945
  a.value && (a.value.style.display = "block", a.value.focus(), a.value.style.display = "none"), n("change", y);
2948
2946
  });
2949
2947
  function s(y) {
@@ -3794,7 +3792,7 @@ const qa = {
3794
3792
  ), j = c(() => oe.value || l.notClearable ? !1 : !ge.value), pe = c(() => {
3795
3793
  const $ = [];
3796
3794
  return l.icon && $.push("has-icon-left"), l.iconRight && $.push("has-icon-right"), $;
3797
- }), ce = c(() => {
3795
+ }), ue = c(() => {
3798
3796
  const $ = [];
3799
3797
  let I = !1;
3800
3798
  if (l.widthBreaks) {
@@ -3821,9 +3819,9 @@ const qa = {
3821
3819
  let I = a.value.popup.textColor;
3822
3820
  return a.value.darkMode && (I = a.value.darkModeColorText), I && (A.isColorTemplateVariable(I) ? $.push(`ck-component__color--${I}`) : $.push({ color: I })), $;
3823
3821
  });
3824
- ue(() => b.value, () => je()), ue(() => F.value, ($) => {
3822
+ ce(() => b.value, () => je()), ce(() => F.value, ($) => {
3825
3823
  k.value !== -1 && (k.value + 1 <= $ || (k.value = $ - 1));
3826
- }), ue(() => r.value, ($) => {
3824
+ }), ce(() => r.value, ($) => {
3827
3825
  $ && (v.value = { display: "none" }, setTimeout(() => {
3828
3826
  const I = document.documentElement.clientHeight, ee = document.documentElement.clientWidth, N = f.value.getBoundingClientRect(), ke = {}, Ie = N.top < I / 2;
3829
3827
  Ie ? ke.top = `${N.bottom}px` : ke.bottom = `${I - N.top}px`, ke.left = `${N.left}px`, ke.right = `${ee - N.right}px`;
@@ -3889,7 +3887,7 @@ const qa = {
3889
3887
  const ee = Y("ck-button");
3890
3888
  return d(), g("div", {
3891
3889
  class: L(["ck-select", pe.value]),
3892
- style: E(ce.value)
3890
+ style: E(ue.value)
3893
3891
  }, [
3894
3892
  e.label ? (d(), S(Me, {
3895
3893
  key: 0,
@@ -4042,7 +4040,7 @@ const qa = {
4042
4040
  const u = [];
4043
4041
  return t.headerColor && !A.isColorTemplateVariable(t.headerColor) && u.push({ "background-color": t.headerColor }), u;
4044
4042
  }), p = c(() => t.closeBtnIcon ? t.closeBtnIcon : "times");
4045
- return ue(() => o.value, (u) => At(!u)), (u, f) => {
4043
+ return ce(() => o.value, (u) => At(!u)), (u, f) => {
4046
4044
  const r = Y("ck-icon");
4047
4045
  return o.value ? (d(), g("div", {
4048
4046
  key: 0,
@@ -4401,7 +4399,7 @@ const qa = {
4401
4399
  if (i.value)
4402
4400
  return n.size === "l" && !n.columns ? { "grid-template-columns": "repeat(auto-fit, minmax(220px, 1fr))" } : { "grid-template-columns": `repeat(${n.columns || wi}, 1fr)` };
4403
4401
  });
4404
- ue(t, (v) => {
4402
+ ce(t, (v) => {
4405
4403
  i.value = !v;
4406
4404
  });
4407
4405
  function f(v) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cleek",
3
3
  "description": "Complete UX Vue library",
4
- "version": "2.11.39",
4
+ "version": "2.11.40",
5
5
  "author": "Quantic Onion",
6
6
  "license": "MIT",
7
7
  "repository": "github:quantic-core/cleek",