cleek 2.3.11 → 2.3.14

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/cleek.es.js CHANGED
@@ -11393,6 +11393,9 @@ var validators = {
11393
11393
  align: (type) => {
11394
11394
  return ["left", "center", "right"].includes(type);
11395
11395
  },
11396
+ verticalAlign: (type) => {
11397
+ return ["top", "center", "bottom"].includes(type);
11398
+ },
11396
11399
  buttonType: (type) => {
11397
11400
  return ["filled", "outlined", "flat"].includes(type);
11398
11401
  },
@@ -13336,7 +13339,8 @@ var App;
13336
13339
  }
13337
13340
  App2.OtherClass = OtherClass;
13338
13341
  })(App || (App = {}));
13339
- var ckTable_vue_vue_type_style_index_0_scoped_true_lang = "";
13342
+ var ckTable_vue_vue_type_style_index_0_lang = "";
13343
+ var ckTable_vue_vue_type_style_index_1_scoped_true_lang = "";
13340
13344
  const _hoisted_1$8 = { class: "ck-table" };
13341
13345
  const _hoisted_2$3 = {
13342
13346
  key: 0,
@@ -13362,6 +13366,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13362
13366
  showRefreshBtn: { type: Boolean, default: false },
13363
13367
  hideItemsPerPage: { type: Boolean, default: false },
13364
13368
  notFullWidth: { type: Boolean, default: false },
13369
+ cellPadding: { type: String, "m": void 0 },
13365
13370
  mobileMaxWidth: { type: [Number, String], default: 800 }
13366
13371
  },
13367
13372
  emits: ["refreshList", "update:search", "update:currentPage"],
@@ -13374,15 +13379,24 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13374
13379
  });
13375
13380
  const columnsAreObj = computed$2(() => !qmObj2.isArray(props.columns));
13376
13381
  const columnsArray = computed$2(() => {
13377
- if (!columnsAreObj.value)
13378
- return props.columns;
13379
- const arr = Object.values(props.columns);
13380
- const keys = Object.keys(props.columns);
13381
- arr.forEach((col, index) => {
13382
- const key = keys[index];
13383
- col.name = key;
13382
+ if (columnsAreObj.value) {
13383
+ const arr = Object.values(props.columns);
13384
+ const keys = Object.keys(props.columns);
13385
+ arr.forEach((col, index) => {
13386
+ const key = keys[index];
13387
+ col.name = key;
13388
+ });
13389
+ return arr;
13390
+ }
13391
+ const newList = [];
13392
+ props.columns.forEach((col) => {
13393
+ if (typeof col === "string") {
13394
+ newList.push({ title: col });
13395
+ } else {
13396
+ newList.push(col);
13397
+ }
13384
13398
  });
13385
- return arr;
13399
+ return newList;
13386
13400
  });
13387
13401
  const filteredColumnsList = computed$2(() => {
13388
13402
  return columnsArray.value.filter(functions.isColumnDisplayed);
@@ -13416,6 +13430,14 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13416
13430
  console.log("ERROR ck-table", "The columns list should be an object");
13417
13431
  }
13418
13432
  }
13433
+ const computedClassTable = computed$2(() => {
13434
+ const list = [];
13435
+ if (props.cellPadding)
13436
+ list.push(`table__cell-padding--${props.cellPadding}`);
13437
+ if (props.notFullWidth)
13438
+ list.push("not-full-width");
13439
+ return list;
13440
+ });
13419
13441
  return (_ctx, _cache) => {
13420
13442
  return openBlock(), createElementBlock(Fragment, null, [
13421
13443
  __props.hasColumnsManager && unref$1(columnsAreObj) ? (openBlock(), createBlock(TableColumnsManager, {
@@ -13446,7 +13468,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13446
13468
  ])) : createCommentVNode("", true),
13447
13469
  createElementVNode("div", _hoisted_4$2, [
13448
13470
  createElementVNode("table", {
13449
- class: normalizeClass(["ck-table__table", { "not-full-width": __props.notFullWidth }])
13471
+ class: normalizeClass(["ck-table__table", unref$1(computedClassTable)])
13450
13472
  }, [
13451
13473
  unref$1(filteredColumnsList).length && !(_ctx.$slots.mobile && unref$1(isMobileVisible)) ? (openBlock(), createElementBlock("thead", _hoisted_5, [
13452
13474
  createVNode(ckTr, null, {
@@ -13485,7 +13507,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
13485
13507
  };
13486
13508
  }
13487
13509
  });
13488
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-79775e25"]]);
13510
+ var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-236cfb7e"]]);
13489
13511
  var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
13490
13512
  const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13491
13513
  props: {
@@ -13495,6 +13517,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13495
13517
  autoWidth: { type: Boolean, default: false },
13496
13518
  overflowAuto: { type: Boolean, default: false },
13497
13519
  align: { type: String, default: void 0, validator: validators.align },
13520
+ verticalAlign: { type: String, default: void 0, validator: validators.verticalAlign },
13498
13521
  fixedWidth: { type: String, default: "" },
13499
13522
  minWidth: { type: String, default: "" },
13500
13523
  maxWidth: { type: String, default: "" },
@@ -13503,10 +13526,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13503
13526
  setup(__props) {
13504
13527
  const props = __props;
13505
13528
  const computedTdClass = computed$2(() => {
13506
- return {
13507
- "auto-width": props.autoWidth,
13508
- "overflow-auto": props.overflowAuto
13509
- };
13529
+ const list = [];
13530
+ if (props.autoWidth)
13531
+ list.push("auto-width");
13532
+ if (props.overflowAuto)
13533
+ list.push("overflow-auto");
13534
+ if (props.verticalAlign)
13535
+ list.push(`vertical-align--${props.verticalAlign}`);
13536
+ return list;
13510
13537
  });
13511
13538
  const computedSpanClass = computed$2(() => {
13512
13539
  const list = [];
@@ -13561,7 +13588,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13561
13588
  };
13562
13589
  }
13563
13590
  });
13564
- var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-4eae6064"]]);
13591
+ var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-4077488a"]]);
13565
13592
  var ckChip_vue_vue_type_style_index_0_scoped_true_lang = "";
13566
13593
  const _hoisted_1$7 = ["color"];
13567
13594
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({