cleek 2.4.51 → 2.4.52

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 (41) hide show
  1. package/dist/cleek-styles/cleek-mixins.styl +7 -0
  2. package/dist/cleek.es.js +39 -35
  3. package/dist/cleek.umd.js +6 -6
  4. package/dist/style.css +1 -1
  5. package/package.json +1 -1
  6. package/dist/components/ck-button.vue.d.ts +0 -50
  7. package/dist/components/ck-checkbox.vue.d.ts +0 -26
  8. package/dist/components/ck-chip.vue.d.ts +0 -30
  9. package/dist/components/ck-div.vue.d.ts +0 -19
  10. package/dist/components/ck-dropdown/ck-dropdown.vue.d.ts +0 -20
  11. package/dist/components/ck-icon.vue.d.ts +0 -34
  12. package/dist/components/ck-img.vue.d.ts +0 -38
  13. package/dist/components/ck-input.vue.d.ts +0 -81
  14. package/dist/components/ck-label.vue.d.ts +0 -20
  15. package/dist/components/ck-navbar/ck-navbar.vue.d.ts +0 -17
  16. package/dist/components/ck-notify/ck-notify.d.ts +0 -27
  17. package/dist/components/ck-notify/components/CkAlert.vue.d.ts +0 -6
  18. package/dist/components/ck-notify/components/CkConfirm.vue.d.ts +0 -9
  19. package/dist/components/ck-notify/components/CkNotify.vue.d.ts +0 -9
  20. package/dist/components/ck-popup.vue.d.ts +0 -64
  21. package/dist/components/ck-radio.vue.d.ts +0 -34
  22. package/dist/components/ck-select.vue.d.ts +0 -82
  23. package/dist/components/ck-sidebar.vue.d.ts +0 -33
  24. package/dist/components/ck-switch-options.vue.d.ts +0 -42
  25. package/dist/components/ck-switch.vue.d.ts +0 -32
  26. package/dist/components/ck-table/ck-table.vue.d.ts +0 -59
  27. package/dist/components/ck-table/ck-td.vue.d.ts +0 -37
  28. package/dist/components/ck-table/ck-th.vue.d.ts +0 -17
  29. package/dist/components/ck-table/ck-tr.vue.d.ts +0 -2
  30. package/dist/components/ck-table/inner-components/ck-table__columns-manager.vue.d.ts +0 -24
  31. package/dist/components/ck-table/inner-components/ck-table__header-items.vue.d.ts +0 -42
  32. package/dist/components/ck-table/inner-components/ck-table__pagination.vue.d.ts +0 -31
  33. package/dist/components/ck-table/inner-components/ck-table__title.vue.d.ts +0 -16
  34. package/dist/components/ck-textarea.vue.d.ts +0 -63
  35. package/dist/components/index.d.ts +0 -22
  36. package/dist/hooks/windowWidth.d.ts +0 -3
  37. package/dist/package-config.d.ts +0 -3
  38. package/dist/types/cleek-options.d.ts +0 -42
  39. package/dist/types/table.d.ts +0 -17
  40. package/dist/utils/functions.d.ts +0 -15
  41. package/dist/utils/globalVariables.d.ts +0 -6
@@ -77,6 +77,13 @@ flex-all-center() // should be deleted
77
77
  inline-flex-all-center() // should be deleted
78
78
  inline-flex-center()
79
79
 
80
+ unselectable()
81
+ user-select none
82
+ -moz-user-select none
83
+ -khtml-user-select none
84
+ -webkit-user-select none
85
+ -o-user-select none
86
+
80
87
  //
81
88
  //
82
89
  //
package/dist/cleek.es.js CHANGED
@@ -21333,7 +21333,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21333
21333
  });
21334
21334
  var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-4bfc21c8"]]);
21335
21335
  var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
21336
- const _withScopeId$4 = (n) => (pushScopeId("data-v-78fe58de"), n = n(), popScopeId(), n);
21336
+ const _withScopeId$4 = (n) => (pushScopeId("data-v-46510d24"), n = n(), popScopeId(), n);
21337
21337
  const _hoisted_1$f = { class: "ck-table__pagination" };
21338
21338
  const _hoisted_2$b = { class: "ck-table__pagination--numbers-container" };
21339
21339
  const _hoisted_3$7 = ["onClick"];
@@ -21354,6 +21354,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21354
21354
  let cleekOptions2 = ref();
21355
21355
  const itemsShowed = 5;
21356
21356
  const currentPageLocal = computed$2({
21357
+ get() {
21358
+ return props.currentPage;
21359
+ },
21360
+ set(val) {
21361
+ emits("update:currentPage", val);
21362
+ }
21363
+ });
21364
+ const currentPageInputValue = computed$2({
21357
21365
  get() {
21358
21366
  return props.currentPage;
21359
21367
  },
@@ -21363,9 +21371,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21363
21371
  const hasArrowLeft = computed$2(() => {
21364
21372
  return props.currentPage !== 1;
21365
21373
  });
21366
- const hasArrowRight = computed$2(() => {
21367
- return props.currentPage !== listRight.value[listRight.value.length - 1];
21368
- });
21374
+ const hasArrowRight = computed$2(() => !!listRight.value.length);
21369
21375
  const totalPages = computed$2(() => {
21370
21376
  return Math.ceil(props.listLength / props.itemsPerPage);
21371
21377
  });
@@ -21404,29 +21410,24 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21404
21410
  list.push(layout);
21405
21411
  return list;
21406
21412
  });
21407
- function updateCurrentPage(val, validator7 = true) {
21408
- if (!validator7)
21409
- return;
21410
- emits("update:currentPage", val);
21413
+ watch(() => currentPageLocal.value, () => {
21411
21414
  emits("refreshList");
21412
- }
21413
- function validateInputNumber(val) {
21414
- console.log("valido", val);
21415
- val = +val;
21416
- if (val > totalPages.value)
21417
- val = totalPages.value;
21418
- if (val < 1)
21419
- val = 1;
21420
- if (val === props.currentPage)
21421
- return;
21422
- updateCurrentPage(val);
21415
+ });
21416
+ function updatePageByInput(eventTarget) {
21417
+ let newValue = +eventTarget.value;
21418
+ if (newValue > totalPages.value)
21419
+ newValue = totalPages.value;
21420
+ if (newValue < 1)
21421
+ newValue = 1;
21422
+ if (props.currentPage === newValue) {
21423
+ eventTarget.value = `${newValue}`;
21424
+ } else {
21425
+ currentPageLocal.value = newValue;
21426
+ }
21423
21427
  }
21424
21428
  onMounted(() => {
21425
21429
  cleekOptions2.value = hooks8.getCleekOptions(getCurrentInstance);
21426
21430
  });
21427
- hooks8.preventUnusedError([
21428
- validateInputNumber
21429
- ]);
21430
21431
  return (_ctx, _cache) => {
21431
21432
  return __props.currentPage && unref$1(totalPages) > 1 ? (openBlock(), createElementBlock("div", {
21432
21433
  key: 0,
@@ -21435,7 +21436,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21435
21436
  createElementVNode("div", _hoisted_1$f, [
21436
21437
  createElementVNode("div", {
21437
21438
  class: normalizeClass(["ck-table__pagination--arrow-left", { disabled: !unref$1(hasArrowLeft) }]),
21438
- onClick: _cache[0] || (_cache[0] = ($event) => updateCurrentPage(__props.currentPage - 1, unref$1(hasArrowLeft)))
21439
+ onClick: _cache[0] || (_cache[0] = ($event) => currentPageLocal.value = __props.currentPage - 1)
21439
21440
  }, [
21440
21441
  createVNode(CkIcon, {
21441
21442
  icon: unref$1(hasArrowLeft) ? "angle-left" : "grip-lines-vertical"
@@ -21445,31 +21446,31 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21445
21446
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(listLeft), (num) => {
21446
21447
  return openBlock(), createElementBlock("div", {
21447
21448
  class: "ck-table__pagination-item--left",
21448
- onClick: ($event) => updateCurrentPage(num)
21449
+ onClick: ($event) => currentPageLocal.value = num
21449
21450
  }, toDisplayString(num), 9, _hoisted_3$7);
21450
21451
  }), 256)),
21451
21452
  createElementVNode("div", _hoisted_4$6, [
21452
21453
  withDirectives(createElementVNode("input", {
21453
21454
  class: "ck-table__pagination-input",
21454
21455
  type: "number",
21455
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(currentPageLocal) ? currentPageLocal.value = $event : null),
21456
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(currentPageInputValue) ? currentPageInputValue.value = $event : null),
21456
21457
  onClick: _cache[2] || (_cache[2] = ($event) => $event.target.select()),
21457
- onChange: _cache[3] || (_cache[3] = ($event) => validateInputNumber($event.target.value))
21458
+ onChange: _cache[3] || (_cache[3] = ($event) => updatePageByInput($event.target))
21458
21459
  }, null, 544), [
21459
- [vModelText, unref$1(currentPageLocal)]
21460
+ [vModelText, unref$1(currentPageInputValue)]
21460
21461
  ]),
21461
21462
  _hoisted_5$3
21462
21463
  ]),
21463
21464
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(listRight), (num) => {
21464
21465
  return openBlock(), createElementBlock("div", {
21465
21466
  class: "ck-table__pagination-item--right",
21466
- onClick: ($event) => updateCurrentPage(num)
21467
+ onClick: ($event) => currentPageLocal.value = num
21467
21468
  }, toDisplayString(num), 9, _hoisted_6$3);
21468
21469
  }), 256))
21469
21470
  ]),
21470
21471
  createElementVNode("div", {
21471
21472
  class: normalizeClass(["ck-table__pagination--arrow-right", { disabled: !unref$1(hasArrowRight) }]),
21472
- onClick: _cache[4] || (_cache[4] = ($event) => updateCurrentPage(__props.currentPage + 1, unref$1(hasArrowRight)))
21473
+ onClick: _cache[4] || (_cache[4] = ($event) => currentPageLocal.value = __props.currentPage + 1)
21473
21474
  }, [
21474
21475
  createVNode(CkIcon, {
21475
21476
  icon: unref$1(hasArrowRight) ? "angle-right" : "grip-lines-vertical"
@@ -21480,7 +21481,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21480
21481
  };
21481
21482
  }
21482
21483
  });
21483
- var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-78fe58de"]]);
21484
+ var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-46510d24"]]);
21484
21485
  const EMPTY_OBJ = {};
21485
21486
  const NOOP = () => {
21486
21487
  };
@@ -23557,7 +23558,7 @@ const _hoisted_1$4 = { class: "ck-switch-options__container-exterior" };
23557
23558
  const _hoisted_2$3 = ["onClick"];
23558
23559
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
23559
23560
  props: {
23560
- modelValue: { type: [Boolean, Number, Object] },
23561
+ modelValue: { type: [Boolean, Number, Object, String] },
23561
23562
  options: null,
23562
23563
  prop: null,
23563
23564
  notReduce: { type: Boolean },
@@ -23633,7 +23634,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
23633
23634
  };
23634
23635
  }
23635
23636
  });
23636
- var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-4bc709a8"]]);
23637
+ var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-285335eb"]]);
23637
23638
  var ckTextarea_vue_vue_type_style_index_0_scoped_true_lang = "";
23638
23639
  const _hoisted_1$3 = { class: "ck-textarea" };
23639
23640
  const _hoisted_2$2 = ["placeholder", "disabled"];
@@ -23872,7 +23873,7 @@ var CkNotify_vue_vue_type_style_index_0_scoped_true_lang = "";
23872
23873
  const _hoisted_1 = { class: "ck-notify__container" };
23873
23874
  const _hoisted_2 = { class: "ck-notify__title" };
23874
23875
  const _hoisted_3 = { class: "close-btn" };
23875
- const _hoisted_4 = { class: "ck-notify__text" };
23876
+ const _hoisted_4 = ["innerHTML"];
23876
23877
  const _sfc_main = /* @__PURE__ */ defineComponent({
23877
23878
  setup(__props, { expose }) {
23878
23879
  let cleekOptions2 = ref();
@@ -23943,14 +23944,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23943
23944
  ]),
23944
23945
  createTextVNode(toDisplayString(title.value || unref$1(defaultTitle)), 1)
23945
23946
  ]),
23946
- createElementVNode("div", _hoisted_4, toDisplayString(text2.value), 1)
23947
+ createElementVNode("div", {
23948
+ class: "ck-notify__text",
23949
+ innerHTML: text2.value
23950
+ }, null, 8, _hoisted_4)
23947
23951
  ], 6)
23948
23952
  ])
23949
23953
  ])) : createCommentVNode("", true);
23950
23954
  };
23951
23955
  }
23952
23956
  });
23953
- var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7c413389"]]);
23957
+ var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4cd3410e"]]);
23954
23958
  const defaultDuration = 2e3;
23955
23959
  var ckNotify = {
23956
23960
  alert(msg) {