cleek 2.4.42 → 2.4.45

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.
Files changed (38) hide show
  1. package/dist/cleek.es.js +72 -82
  2. package/dist/cleek.umd.js +10 -10
  3. package/dist/style.css +1 -1
  4. package/package.json +1 -1
  5. package/dist/components/ck-button.vue.d.ts +0 -50
  6. package/dist/components/ck-checkbox.vue.d.ts +0 -26
  7. package/dist/components/ck-chip.vue.d.ts +0 -28
  8. package/dist/components/ck-div.vue.d.ts +0 -19
  9. package/dist/components/ck-dropdown/ck-dropdown.vue.d.ts +0 -20
  10. package/dist/components/ck-icon.vue.d.ts +0 -34
  11. package/dist/components/ck-img.vue.d.ts +0 -38
  12. package/dist/components/ck-input.vue.d.ts +0 -75
  13. package/dist/components/ck-label.vue.d.ts +0 -20
  14. package/dist/components/ck-navbar/ck-navbar.vue.d.ts +0 -17
  15. package/dist/components/ck-notify/ck-notify.d.ts +0 -21
  16. package/dist/components/ck-notify/components/CkConfirm.vue.d.ts +0 -10
  17. package/dist/components/ck-notify/components/CkNotify.vue.d.ts +0 -9
  18. package/dist/components/ck-popup.vue.d.ts +0 -64
  19. package/dist/components/ck-radio.vue.d.ts +0 -34
  20. package/dist/components/ck-select.vue.d.ts +0 -82
  21. package/dist/components/ck-sidebar.vue.d.ts +0 -33
  22. package/dist/components/ck-switch-options.vue.d.ts +0 -42
  23. package/dist/components/ck-switch.vue.d.ts +0 -32
  24. package/dist/components/ck-table/ck-table.vue.d.ts +0 -59
  25. package/dist/components/ck-table/ck-td.vue.d.ts +0 -43
  26. package/dist/components/ck-table/ck-th.vue.d.ts +0 -17
  27. package/dist/components/ck-table/ck-tr.vue.d.ts +0 -2
  28. package/dist/components/ck-table/inner-components/ck-table__columns-manager.vue.d.ts +0 -24
  29. package/dist/components/ck-table/inner-components/ck-table__header-items.vue.d.ts +0 -42
  30. package/dist/components/ck-table/inner-components/ck-table__pagination.vue.d.ts +0 -31
  31. package/dist/components/ck-table/inner-components/ck-table__title.vue.d.ts +0 -16
  32. package/dist/components/ck-textarea.vue.d.ts +0 -36
  33. package/dist/components/index.d.ts +0 -22
  34. package/dist/hooks/windowWidth.d.ts +0 -3
  35. package/dist/types/cleek-options.d.ts +0 -42
  36. package/dist/types/table.d.ts +0 -6
  37. package/dist/utils/functions.d.ts +0 -15
  38. package/dist/utils/globalVariables.d.ts +0 -6
package/dist/cleek.es.js CHANGED
@@ -18907,51 +18907,51 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18907
18907
  setup(__props) {
18908
18908
  const props = __props;
18909
18909
  const computedTdClass = computed$2(() => {
18910
+ var _a, _b, _c;
18910
18911
  const list = [];
18911
- if (props.autoWidth)
18912
+ if (props.autoWidth || ((_a = props.col) == null ? void 0 : _a.autoWidth))
18912
18913
  list.push("auto-width");
18913
- if (props.overflowAuto)
18914
+ if (props.overflowAuto || ((_b = props.col) == null ? void 0 : _b.overflowAuto))
18914
18915
  list.push("overflow-auto");
18915
- if (props.verticalAlign)
18916
- list.push(`vertical-align--${props.verticalAlign}`);
18916
+ const verticalAlign = props.verticalAlign || ((_c = props.col) == null ? void 0 : _c.verticalAlign);
18917
+ if (verticalAlign)
18918
+ list.push(`vertical-align--${verticalAlign}`);
18917
18919
  return list;
18918
18920
  });
18919
18921
  const computedSpanClass = computed$2(() => {
18922
+ var _a, _b, _c;
18920
18923
  const list = [];
18921
- let align;
18922
- if (props.col)
18923
- align = props.col.align;
18924
- if (props.align)
18925
- align = props.align;
18924
+ const align = props.align || ((_a = props.col) == null ? void 0 : _a.align);
18926
18925
  if (align) {
18927
18926
  if (align === "center")
18928
18927
  list.push("align-center");
18929
18928
  if (align === "right")
18930
18929
  list.push("align-right");
18931
18930
  }
18932
- if (props.block)
18931
+ if (props.block || ((_b = props.col) == null ? void 0 : _b.block))
18933
18932
  list.push("block");
18934
- if (props.block)
18933
+ if (props.nowrap || ((_c = props.col) == null ? void 0 : _c.nowrap))
18935
18934
  list.push("no-wrap-text");
18936
18935
  return list;
18937
18936
  });
18938
18937
  const computedStyle = computed$2(() => {
18938
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
18939
18939
  const list = {};
18940
- let minWidth = "";
18941
- if (props.minWidth)
18942
- minWidth = props.minWidth;
18943
- if (props.fixedWidth)
18944
- minWidth = props.fixedWidth;
18940
+ let minWidth;
18941
+ if (props.minWidth || ((_a = props.col) == null ? void 0 : _a.minWidth))
18942
+ minWidth = props.minWidth || ((_b = props.col) == null ? void 0 : _b.minWidth);
18943
+ if (props.fixedWidth || ((_c = props.col) == null ? void 0 : _c.fixedWidth))
18944
+ minWidth = props.fixedWidth || ((_d = props.col) == null ? void 0 : _d.fixedWidth);
18945
18945
  if (minWidth)
18946
18946
  list.minWidth = minWidth;
18947
- let maxWidth = "";
18948
- if (props.maxWidth)
18949
- maxWidth = props.maxWidth;
18950
- if (props.fixedWidth)
18951
- maxWidth = props.fixedWidth;
18947
+ let maxWidth;
18948
+ if (props.maxWidth || ((_e = props.col) == null ? void 0 : _e.maxWidth))
18949
+ maxWidth = props.maxWidth || ((_f = props.col) == null ? void 0 : _f.maxWidth);
18950
+ if (props.fixedWidth || ((_g = props.col) == null ? void 0 : _g.fixedWidth))
18951
+ maxWidth = props.fixedWidth || ((_h = props.col) == null ? void 0 : _h.fixedWidth);
18952
18952
  if (maxWidth)
18953
18953
  list.maxWidth = maxWidth;
18954
- if (props.maxHeight)
18954
+ if (props.maxHeight || ((_i = props.col) == null ? void 0 : _i.maxHeight))
18955
18955
  list.maxHeight = props.maxHeight;
18956
18956
  return list;
18957
18957
  });
@@ -18979,7 +18979,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18979
18979
  };
18980
18980
  }
18981
18981
  });
18982
- var CkTd = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-7f4cf041"]]);
18982
+ var CkTd = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-eb135f78"]]);
18983
18983
  var axios$2 = { exports: {} };
18984
18984
  var bind$2 = function bind2(fn, thisArg) {
18985
18985
  return function wrap() {
@@ -21235,8 +21235,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21235
21235
  emits("update:search", val);
21236
21236
  }
21237
21237
  });
21238
- const hideSearch = computed$2(() => {
21239
- return typeof searchLocal.value === "undefined";
21238
+ const isSearchVisible = computed$2(() => {
21239
+ return typeof searchLocal.value !== "undefined";
21240
21240
  });
21241
21241
  const itemsPerPageStart = computed$2(() => {
21242
21242
  return (props.currentPage - 1) * props.itemsPerPage + 1;
@@ -21296,9 +21296,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21296
21296
  }, null, 8, ["layout"])) : createCommentVNode("", true),
21297
21297
  unref$1(itemsPerPageIsVisible) ? (openBlock(), createElementBlock("div", {
21298
21298
  key: 1,
21299
- class: normalizeClass(["items-per-page", { "ck-component__group--left": !unref$1(hideSearch) }])
21299
+ class: normalizeClass(["items-per-page", { "ck-component__group--left": unref$1(isSearchVisible) }])
21300
21300
  }, toDisplayString(unref$1(itemsPerPageStart)) + " - " + toDisplayString(unref$1(itemsPerPageEnd)) + " de " + toDisplayString(__props.listLength), 3)) : createCommentVNode("", true),
21301
- !unref$1(hideSearch) ? (openBlock(), createBlock(CkInput, {
21301
+ unref$1(isSearchVisible) ? (openBlock(), createBlock(CkInput, {
21302
21302
  key: 2,
21303
21303
  modelValue: unref$1(searchLocal),
21304
21304
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(searchLocal) ? searchLocal.value = $event : null),
@@ -21313,7 +21313,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21313
21313
  icon: "columns",
21314
21314
  type: "filled",
21315
21315
  title: "Administrador de columnas",
21316
- group: unref$1(itemsPerPageIsVisible) || !unref$1(hideSearch) ? "right" : "",
21316
+ group: unref$1(itemsPerPageIsVisible) || unref$1(isSearchVisible) ? "right" : "",
21317
21317
  layout: __props.layout,
21318
21318
  onClick: _cache[3] || (_cache[3] = ($event) => emits("openColumnsManager"))
21319
21319
  }, null, 8, ["group", "layout"])) : createCommentVNode("", true)
@@ -21322,7 +21322,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21322
21322
  };
21323
21323
  }
21324
21324
  });
21325
- var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-af0d0550"]]);
21325
+ var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-4bfc21c8"]]);
21326
21326
  var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
21327
21327
  const _withScopeId$4 = (n) => (pushScopeId("data-v-78fe58de"), n = n(), popScopeId(), n);
21328
21328
  const _hoisted_1$e = { class: "ck-table__pagination" };
@@ -22645,12 +22645,17 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22645
22645
  setup(__props, { emit: emits }) {
22646
22646
  const props = __props;
22647
22647
  let cleekOptions2 = ref();
22648
- const defaultNoResultsText = "No results found";
22649
22648
  const defaultItemsPerPage = 40;
22650
22649
  const { windowWidth } = useWindowWidth();
22651
22650
  const isPopupActive = ref({
22652
22651
  columnsManager: false
22653
22652
  });
22653
+ const defaultNoResultsText = computed$2(() => {
22654
+ var _a;
22655
+ if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
22656
+ return "No se encontraron resultados";
22657
+ return "No results found";
22658
+ });
22654
22659
  const columnsAreObj = computed$2(() => !qmObj.isArray(props.columns || []));
22655
22660
  const columnsArray = computed$2(() => {
22656
22661
  if (columnsAreObj.value) {
@@ -22677,7 +22682,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22677
22682
  });
22678
22683
  const searchLocal = computed$2({
22679
22684
  get() {
22680
- return props.search || "";
22685
+ return props.search;
22681
22686
  },
22682
22687
  set(val) {
22683
22688
  emits("update:search", val);
@@ -22773,7 +22778,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22773
22778
  class: normalizeClass(["ck-table__table", unref$1(computedClassTable)])
22774
22779
  }, [
22775
22780
  unref$1(filteredColumnsList).length && !(_ctx.$slots.mobile && unref$1(isMobileVisible)) ? (openBlock(), createElementBlock("thead", _hoisted_4$4, [
22776
- createVNode(CkTr, null, {
22781
+ createVNode(CkTr, { class: "header-row" }, {
22777
22782
  default: withCtx(() => [
22778
22783
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredColumnsList), (col) => {
22779
22784
  return openBlock(), createBlock(_sfc_main$l, {
@@ -22796,7 +22801,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22796
22801
  align: "center"
22797
22802
  }, {
22798
22803
  default: withCtx(() => [
22799
- createTextVNode(toDisplayString(__props.noResultsText || defaultNoResultsText), 1)
22804
+ createTextVNode(toDisplayString(__props.noResultsText || unref$1(defaultNoResultsText)), 1)
22800
22805
  ]),
22801
22806
  _: 1
22802
22807
  })
@@ -22827,7 +22832,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22827
22832
  };
22828
22833
  }
22829
22834
  });
22830
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-6d6258c2"]]);
22835
+ var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-64f91af6"]]);
22831
22836
  var ckChip_vue_vue_type_style_index_0_scoped_true_lang = "";
22832
22837
  const _hoisted_1$9 = ["color"];
22833
22838
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
@@ -22835,6 +22840,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
22835
22840
  size: null,
22836
22841
  color: null,
22837
22842
  textColor: null,
22843
+ align: null,
22838
22844
  icon: null,
22839
22845
  iconPack: null
22840
22846
  },
@@ -22844,10 +22850,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
22844
22850
  const defaultColor = "primary";
22845
22851
  const defaultSize = "s";
22846
22852
  const computedClass = computed$2(() => {
22847
- return [
22848
- `size-${props.size || defaultSize}`,
22849
- `ck-component__bg-color--${props.color || defaultColor}`
22850
- ];
22853
+ const list = [];
22854
+ list.push(`size-${props.size || defaultSize}`);
22855
+ list.push(`ck-component__bg-color--${props.color || defaultColor}`);
22856
+ if (props.align)
22857
+ list.push(`align--${props.align}`);
22858
+ return list;
22851
22859
  });
22852
22860
  const computedStyle = computed$2(() => {
22853
22861
  return [];
@@ -22869,7 +22877,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
22869
22877
  };
22870
22878
  }
22871
22879
  });
22872
- var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-65283496"]]);
22880
+ var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-ad665c4a"]]);
22873
22881
  var ckDiv_vue_vue_type_style_index_0_lang = "";
22874
22882
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
22875
22883
  props: {
@@ -23696,7 +23704,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23696
23704
  });
23697
23705
  var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6f36045c"]]);
23698
23706
  var CkConfirm_vue_vue_type_style_index_0_scoped_true_lang = "";
23699
- const _withScopeId = (n) => (pushScopeId("data-v-5d01d37a"), n = n(), popScopeId(), n);
23707
+ const _withScopeId = (n) => (pushScopeId("data-v-314de9fc"), n = n(), popScopeId(), n);
23700
23708
  const _hoisted_1$1 = { class: "ck-confirm--background" };
23701
23709
  const _hoisted_2$1 = { class: "ck-confirm" };
23702
23710
  const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-confirm__icon" }, [
@@ -23721,22 +23729,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
23721
23729
  const responseFailure = ref(() => {
23722
23730
  });
23723
23731
  const defaultTitle = computed$2(() => {
23724
- var _a;
23725
- if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
23726
- return "\xBFEst\xE1s seguro?";
23727
- return "\xBFAre you sure?";
23732
+ return "\xBFEst\xE1s seguro?";
23728
23733
  });
23729
23734
  const defaultAcceptText = computed$2(() => {
23730
- var _a;
23731
- if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
23732
- return "Aceptar";
23733
- return "Accept";
23735
+ return "Aceptar";
23734
23736
  });
23735
23737
  const defaultCancelText = computed$2(() => {
23736
- var _a;
23737
- if (((_a = cleekOptions2.value) == null ? void 0 : _a.lang) === "es")
23738
- return "Cancelar";
23739
- return "Cancel";
23738
+ return "Cancelar";
23740
23739
  });
23741
23740
  function onCancel() {
23742
23741
  responseFailure.value();
@@ -23758,6 +23757,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
23758
23757
  return (_ctx, _cache) => {
23759
23758
  return openBlock(), createElementBlock("div", _hoisted_1$1, [
23760
23759
  createElementVNode("div", _hoisted_2$1, [
23760
+ createElementVNode("div", null, "cleekOptions " + toDisplayString(unref$1(cleekOptions2)), 1),
23761
23761
  _hoisted_3$1,
23762
23762
  createElementVNode("div", _hoisted_4$1, toDisplayString(title.value || unref$1(defaultTitle)), 1),
23763
23763
  createElementVNode("div", _hoisted_5, toDisplayString(msg.value), 1),
@@ -23776,7 +23776,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
23776
23776
  };
23777
23777
  }
23778
23778
  });
23779
- var CkConfirmComponent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5d01d37a"]]);
23779
+ var CkConfirmComponent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-314de9fc"]]);
23780
23780
  var CkNotify_vue_vue_type_style_index_0_scoped_true_lang = "";
23781
23781
  const _hoisted_1 = { class: "ck-notify__container" };
23782
23782
  const _hoisted_2 = { class: "ck-notify__title" };
@@ -23802,17 +23802,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23802
23802
  const defaultTitle = computed$2(() => {
23803
23803
  switch (color.value) {
23804
23804
  case "success":
23805
- if (lang === "es")
23806
- return "\xC9xito";
23807
- return "Success";
23805
+ return "\xC9xito";
23808
23806
  case "danger":
23809
- if (lang === "es")
23810
- return "Error";
23811
23807
  return "Error";
23812
23808
  case "warning":
23813
- if (lang === "es")
23814
- return "Atenci\xF3n";
23815
- return "Alert";
23809
+ return "Atenci\xF3n";
23816
23810
  }
23817
23811
  return "";
23818
23812
  });
@@ -23833,8 +23827,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23833
23827
  onMounted(() => {
23834
23828
  cleekOptions2.value = hooks8.getCleekOptions(getCurrentInstance);
23835
23829
  setTimeout(() => {
23836
- closeCallback.value();
23837
- }, duration.value);
23830
+ setTimeout(() => {
23831
+ closeCallback.value();
23832
+ }, duration.value);
23833
+ }, 10);
23838
23834
  });
23839
23835
  return (_ctx, _cache) => {
23840
23836
  return isActive.value ? (openBlock(), createBlock(Teleport, {
@@ -23863,7 +23859,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23863
23859
  };
23864
23860
  }
23865
23861
  });
23866
- var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-04e2d5fe"]]);
23862
+ var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7c413389"]]);
23867
23863
  const defaultDuration = 2e3;
23868
23864
  var ckNotify = {
23869
23865
  confirmOptions({
@@ -23877,20 +23873,13 @@ var ckNotify = {
23877
23873
  }
23878
23874
  }) {
23879
23875
  const tempDiv = document.createElement("div");
23880
- const instance = createApp(CkConfirmComponent).mount(tempDiv);
23881
- instance.title = title;
23882
- instance.msg = msg;
23883
- instance.acceptText = acceptText;
23884
- instance.cancelText = cancelText;
23885
- instance.responseSuccess = () => {
23886
- instance.$el.remove();
23887
- success();
23888
- };
23889
- instance.responseFailure = () => {
23890
- instance.$el.remove();
23891
- failure();
23892
- };
23893
- document.body.appendChild(instance.$el);
23876
+ const instance = createApp(CkConfirmComponent);
23877
+ const instanceMounted = instance.mount(tempDiv);
23878
+ instanceMounted.title = title;
23879
+ instanceMounted.msg = msg;
23880
+ instanceMounted.acceptText = acceptText;
23881
+ instanceMounted.cancelText = cancelText;
23882
+ document.body.appendChild(instanceMounted.$el);
23894
23883
  },
23895
23884
  confirm(msg, success, failure) {
23896
23885
  this.confirmOptions({
@@ -23899,15 +23888,16 @@ var ckNotify = {
23899
23888
  failure
23900
23889
  });
23901
23890
  },
23902
- notify({ text: text2 = "", title = "", color = "", duration = defaultDuration }) {
23891
+ notify({ text: text2 = "", title = "", color = "", duration = 0 }) {
23903
23892
  const tempDiv = document.createElement("div");
23904
- const instance = createApp(CkNotifyComponent).mount(tempDiv);
23893
+ const app = createApp(CkNotifyComponent);
23894
+ const instance = app.mount(tempDiv);
23905
23895
  instance.title = title;
23906
23896
  instance.text = text2;
23907
23897
  instance.color = color;
23908
- instance.duration = duration;
23898
+ instance.duration = duration || defaultDuration;
23909
23899
  instance.closeCallback = () => {
23910
- instance.$el.remove();
23900
+ app.unmount();
23911
23901
  };
23912
23902
  },
23913
23903
  notifySuccess(text2, title = "") {