cleek 2.1.1 → 2.1.6

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.
@@ -55,6 +55,8 @@ margin-padding-bottom(val)
55
55
 
56
56
  my-box-shadow(val = 0.05, color = black)
57
57
  box-shadow 0 4px 20px 0 rgba(color, val)
58
+ ck-box-shadow(val = 0.05, color = black)
59
+ box-shadow 0 4px 20px 0 rgba(color, val)
58
60
  // flex shortcuts
59
61
  justify-align-center()
60
62
  align-items center
@@ -1,8 +1,9 @@
1
+ @import './.custom';
1
2
  @import './align-items';
2
3
  @import './display';
4
+ @import './justify-content';
3
5
  @import './margin';
4
6
  @import './padding';
7
+ @import './position';
5
8
  @import './text-align';
6
- @import './width';
7
- @import './.custom';
8
- @import './justify-content';
9
+ @import './width';
@@ -0,0 +1,10 @@
1
+ .static
2
+ position static
3
+ .fixed
4
+ position fixed
5
+ .absolute
6
+ position absolute
7
+ .relative
8
+ position relative
9
+ .sticky
10
+ position sticky
package/dist/cleek.es.js CHANGED
@@ -17,7 +17,98 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed as computed$2, watch, h, openBlock, createElementBlock, normalizeClass, unref as unref$1, createBlock, createCommentVNode, ref, onMounted, getCurrentInstance, renderSlot, mergeProps, withKeys, withModifiers, createElementVNode, pushScopeId, popScopeId, normalizeStyle, withCtx, createTextVNode, toDisplayString, withDirectives, isRef as isRef$1, vModelDynamic, createVNode, Fragment, renderList, vModelRadio, vModelSelect, vModelCheckbox, vModelText } from "vue";
20
+ import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, renderSlot, normalizeClass, createCommentVNode, computed as computed$2, normalizeStyle, unref as unref$1, watch, h, createBlock, onMounted, getCurrentInstance, mergeProps, withKeys, withModifiers, pushScopeId, popScopeId, withCtx, createTextVNode, toDisplayString, withDirectives, isRef as isRef$1, vModelDynamic, createVNode, Fragment, renderList, vModelRadio, vModelSelect, vModelCheckbox, vModelText } from "vue";
21
+ var ckDropdown_vue_vue_type_style_index_0_scoped_true_lang = "";
22
+ var _export_sfc = (sfc, props) => {
23
+ const target = sfc.__vccOpts || sfc;
24
+ for (const [key, val] of props) {
25
+ target[key] = val;
26
+ }
27
+ return target;
28
+ };
29
+ const _hoisted_1$j = { class: "ck-dropdown" };
30
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
31
+ props: {
32
+ triggerType: { type: String, default: "click" },
33
+ dark: { type: Boolean, default: false }
34
+ },
35
+ setup(__props) {
36
+ const isOpen = ref(false);
37
+ const popperRef = ref(null);
38
+ function openClose() {
39
+ if (isOpen.value)
40
+ return;
41
+ const closeListerner = (event) => {
42
+ if (popperRef.value != event.target)
43
+ isOpen.value = false;
44
+ window.removeEventListener("click", closeListerner);
45
+ };
46
+ setTimeout(() => {
47
+ window.addEventListener("click", closeListerner);
48
+ });
49
+ isOpen.value = true;
50
+ }
51
+ return (_ctx, _cache) => {
52
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
53
+ createElementVNode("div", {
54
+ class: "ck-dropdown__trigger",
55
+ onClick: _cache[0] || (_cache[0] = ($event) => openClose())
56
+ }, [
57
+ renderSlot(_ctx.$slots, "trigger", {}, void 0, true)
58
+ ]),
59
+ isOpen.value ? (openBlock(), createElementBlock("section", {
60
+ key: 0,
61
+ class: normalizeClass(["ck-dropdown__popper", { "ck-dropdown__popper--dark": __props.dark }]),
62
+ ref_key: "popperRef",
63
+ ref: popperRef
64
+ }, [
65
+ createElementVNode("div", {
66
+ class: normalizeClass(["ck-dropdown__popper--arrow", { "ck-dropdown__popper--arrow--dark": __props.dark }])
67
+ }, null, 2),
68
+ renderSlot(_ctx.$slots, "popper", {}, void 0, true)
69
+ ], 2)) : createCommentVNode("", true)
70
+ ]);
71
+ };
72
+ }
73
+ });
74
+ var ckDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-64a91fb4"]]);
75
+ var ckNavbar_vue_vue_type_style_index_0_scoped_true_lang = "";
76
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
77
+ props: {
78
+ padding: { type: String, default: 0 },
79
+ position: { type: String, default: "fixed" }
80
+ },
81
+ setup(__props) {
82
+ const props = __props;
83
+ const computedClassContent = computed$2(() => {
84
+ const list = [];
85
+ if (props.padding)
86
+ list.push("has-padding");
87
+ return list;
88
+ });
89
+ const computedStyle = computed$2(() => {
90
+ const list = [];
91
+ if (props.padding)
92
+ list.push({ padding: props.padding });
93
+ if (props.position)
94
+ list.push({ position: props.position });
95
+ return list;
96
+ });
97
+ return (_ctx, _cache) => {
98
+ return openBlock(), createElementBlock("div", {
99
+ class: "ck-navbar",
100
+ style: normalizeStyle(unref$1(computedStyle))
101
+ }, [
102
+ createElementVNode("div", {
103
+ class: normalizeClass(["ck-navbar__content", unref$1(computedClassContent)])
104
+ }, [
105
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
106
+ ], 2)
107
+ ], 4);
108
+ };
109
+ }
110
+ });
111
+ var ckNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-5024db6a"]]);
21
112
  var validators = {
22
113
  size: (type) => {
23
114
  return ["", "xs", "s", "m", "l", "xl"].includes(type);
@@ -11208,13 +11299,6 @@ defineComponent({
11208
11299
  }
11209
11300
  });
11210
11301
  var ckIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
11211
- var _export_sfc = (sfc, props) => {
11212
- const target = sfc.__vccOpts || sfc;
11213
- for (const [key, val] of props) {
11214
- target[key] = val;
11215
- }
11216
- return target;
11217
- };
11218
11302
  const _sfc_main$l = /* @__PURE__ */ defineComponent({
11219
11303
  props: {
11220
11304
  icon: { type: [String, Array], default: "" },
@@ -12252,7 +12336,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
12252
12336
  };
12253
12337
  }
12254
12338
  });
12255
- var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-73ff343b"]]);
12339
+ var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-5333de26"]]);
12256
12340
  var globalVariables = {
12257
12341
  defaultFailImg: "df",
12258
12342
  imagesFolderPath: "",
@@ -12274,7 +12358,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
12274
12358
  zoomTitle: { type: String, default: "" },
12275
12359
  hasBorder: { type: Boolean, default: false },
12276
12360
  radius: { type: String, default: "" },
12277
- borderColor: { type: String, default: "" }
12361
+ borderColor: { type: String, default: "" },
12362
+ rounded: { type: Boolean, default: false }
12278
12363
  },
12279
12364
  setup(__props) {
12280
12365
  const props = __props;
@@ -12295,6 +12380,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
12295
12380
  }
12296
12381
  if (size)
12297
12382
  classList2.push(`ck-img__size--${size}`);
12383
+ if (props.rounded)
12384
+ classList2.push("is-rounded");
12298
12385
  if (props.hasBorder) {
12299
12386
  classList2.push("ck-img__has-border");
12300
12387
  if (functions$1.isColorTemplateVariable(realBorderColor.value)) {
@@ -12368,7 +12455,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
12368
12455
  };
12369
12456
  }
12370
12457
  });
12371
- var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-53d78f2e"]]);
12458
+ var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-ba1551a2"]]);
12372
12459
  var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
12373
12460
  const _hoisted_1$e = ["for"];
12374
12461
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
@@ -12396,7 +12483,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
12396
12483
  };
12397
12484
  }
12398
12485
  });
12399
- var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-6efffcd8"]]);
12486
+ var ckLabel = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ef74ea02"]]);
12400
12487
  var ckInput_vue_vue_type_style_index_0_scoped_true_lang = "";
12401
12488
  const _hoisted_1$d = { class: "ck-input" };
12402
12489
  const _hoisted_2$7 = ["type", "placeholder", "id", "disabled"];
@@ -12504,7 +12591,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
12504
12591
  };
12505
12592
  }
12506
12593
  });
12507
- var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-61fababc"]]);
12594
+ var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-5db08b1e"]]);
12508
12595
  var ckPopup_vue_vue_type_style_index_0_lang = "";
12509
12596
  const _hoisted_1$c = {
12510
12597
  key: 0,
@@ -13270,7 +13357,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
13270
13357
  };
13271
13358
  }
13272
13359
  });
13273
- var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-dfbb0b9e"]]);
13360
+ var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-2c3e07c8"]]);
13274
13361
  const _hoisted_1$7 = { class: "ck-tr" };
13275
13362
  function render$1(_ctx, _cache) {
13276
13363
  return openBlock(), createElementBlock("tr", _hoisted_1$7, [
@@ -13314,7 +13401,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
13314
13401
  };
13315
13402
  }
13316
13403
  });
13317
- var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-a6c5a34e"]]);
13404
+ var ckTh = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-c179a3c2"]]);
13318
13405
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
13319
13406
  props: {
13320
13407
  col: { type: Object, required: true }
@@ -13369,7 +13456,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13369
13456
  return value;
13370
13457
  });
13371
13458
  const itemsPerPageIsVisible = computed$2(() => {
13372
- return !props.hideItemsPerPage && props.listLength;
13459
+ return !props.hideItemsPerPage && props.listLength && props.currentPage;
13373
13460
  });
13374
13461
  const searchGroupValue = computed$2(() => {
13375
13462
  if (itemsPerPageIsVisible.value && props.hasColumnsManager) {
@@ -13423,7 +13510,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
13423
13510
  };
13424
13511
  }
13425
13512
  });
13426
- var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-38244f67"]]);
13513
+ var TableHeaderItems = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-4f5cca80"]]);
13427
13514
  var ckTable__pagination_vue_vue_type_style_index_0_scoped_true_lang = "";
13428
13515
  const _hoisted_1$4 = { class: "ck-table__pagination" };
13429
13516
  const _hoisted_2$2 = ["onClick"];
@@ -13551,7 +13638,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
13551
13638
  };
13552
13639
  }
13553
13640
  }));
13554
- var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-7ad6042e"]]);
13641
+ var TablePagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-4045b8e3"]]);
13555
13642
  var ckTable__columnsManager_vue_vue_type_style_index_0_scoped_true_lang = "";
13556
13643
  const _hoisted_1$3 = { class: "columns-manger-container" };
13557
13644
  const _hoisted_2$1 = { class: "columns-manger__item" };
@@ -13635,7 +13722,7 @@ const _hoisted_3 = {
13635
13722
  key: 1,
13636
13723
  class: "ck-table__header--slot"
13637
13724
  };
13638
- const _hoisted_4 = { class: "ck-table__table" };
13725
+ const _hoisted_4 = { class: "ck-table__table-container" };
13639
13726
  const _hoisted_5 = { key: 0 };
13640
13727
  const _hoisted_6 = { key: 1 };
13641
13728
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
@@ -13649,7 +13736,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13649
13736
  search: { type: String, default: void 0 },
13650
13737
  hideHeaderActions: { type: Boolean, default: false },
13651
13738
  hideRefreshBtn: { type: Boolean, default: false },
13652
- hideItemsPerPage: { type: Boolean, default: false }
13739
+ hideItemsPerPage: { type: Boolean, default: false },
13740
+ notFullWidth: { type: Boolean, default: false }
13653
13741
  },
13654
13742
  emits: ["refreshList", "update:search", "update:currentPage"],
13655
13743
  setup(__props, { emit: emits }) {
@@ -13727,28 +13815,33 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13727
13815
  renderSlot(_ctx.$slots, "header", {}, void 0, true)
13728
13816
  ])) : createCommentVNode("", true)
13729
13817
  ])) : createCommentVNode("", true),
13730
- createElementVNode("table", _hoisted_4, [
13731
- unref$1(filteredColumnsList).length ? (openBlock(), createElementBlock("thead", _hoisted_5, [
13732
- createVNode(ckTr, null, {
13733
- default: withCtx(() => [
13734
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredColumnsList), (col) => {
13735
- return openBlock(), createBlock(_sfc_main$7, {
13736
- key: col.title,
13737
- col
13738
- }, null, 8, ["col"]);
13739
- }), 128))
13740
- ]),
13741
- _: 1
13742
- })
13743
- ])) : createCommentVNode("", true),
13744
- createElementVNode("tbody", null, [
13745
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
13746
- ]),
13747
- _ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [
13748
- renderSlot(_ctx.$slots, "footer", {}, void 0, true)
13749
- ])) : createCommentVNode("", true)
13818
+ createElementVNode("div", _hoisted_4, [
13819
+ createElementVNode("table", {
13820
+ class: normalizeClass(["ck-table__table", { "not-full-width": __props.notFullWidth }])
13821
+ }, [
13822
+ unref$1(filteredColumnsList).length ? (openBlock(), createElementBlock("thead", _hoisted_5, [
13823
+ createVNode(ckTr, null, {
13824
+ default: withCtx(() => [
13825
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref$1(filteredColumnsList), (col) => {
13826
+ return openBlock(), createBlock(_sfc_main$7, {
13827
+ key: col.title,
13828
+ col
13829
+ }, null, 8, ["col"]);
13830
+ }), 128))
13831
+ ]),
13832
+ _: 1
13833
+ })
13834
+ ])) : createCommentVNode("", true),
13835
+ createElementVNode("tbody", null, [
13836
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
13837
+ ]),
13838
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("tfoot", _hoisted_6, [
13839
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
13840
+ ])) : createCommentVNode("", true)
13841
+ ], 2)
13750
13842
  ]),
13751
13843
  createVNode(TablePagination, {
13844
+ class: "ck-table__pagination",
13752
13845
  currentPage: unref$1(currentPageLocal),
13753
13846
  "onUpdate:currentPage": _cache[4] || (_cache[4] = ($event) => isRef$1(currentPageLocal) ? currentPageLocal.value = $event : null),
13754
13847
  itemsPerPage: __props.itemsPerPage,
@@ -13761,12 +13854,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
13761
13854
  };
13762
13855
  }
13763
13856
  });
13764
- var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4abe8990"]]);
13857
+ var ckTable = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a5722810"]]);
13765
13858
  var ckTd_vue_vue_type_style_index_0_scoped_true_lang = "";
13766
13859
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
13767
13860
  props: {
13768
13861
  col: { type: Object, default: void 0 },
13769
- wrap: { type: Boolean, default: false },
13862
+ nowrap: { type: Boolean, default: false },
13770
13863
  block: { type: Boolean, default: false },
13771
13864
  autoWidth: { type: Boolean, default: false },
13772
13865
  align: { type: String, default: void 0, validator: validators.align },
@@ -13798,7 +13891,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
13798
13891
  if (props.block)
13799
13892
  list.push("block");
13800
13893
  if (props.block)
13801
- list.push("wrap-text");
13894
+ list.push("no-wrap-text");
13802
13895
  return list;
13803
13896
  });
13804
13897
  const computedStyle = computed$2(() => {
@@ -13835,7 +13928,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
13835
13928
  };
13836
13929
  }
13837
13930
  });
13838
- var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-c34b91ca"]]);
13931
+ var ckTd = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-47b8a441"]]);
13839
13932
  var ckTextarea_vue_vue_type_style_index_0_scoped_true_lang = "";
13840
13933
  const _hoisted_1$1 = { class: "ck-textarea" };
13841
13934
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -16476,6 +16569,8 @@ const unlockScroll = () => {
16476
16569
  var components = /* @__PURE__ */ Object.freeze({
16477
16570
  __proto__: null,
16478
16571
  [Symbol.toStringTag]: "Module",
16572
+ ckDropdown,
16573
+ ckNavbar,
16479
16574
  ckButton,
16480
16575
  ckCheckbox,
16481
16576
  ckChip,
@@ -16530,4 +16625,4 @@ const install = function installCleek(app, options) {
16530
16625
  app.component(componentName, component);
16531
16626
  });
16532
16627
  };
16533
- export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckChip, ckIcon, ckImg, ckInput, ckLabel, _sfc_main$e as ckPopup, ckRadio, ckSelect, ckSwitch, ckSwitchOptions, ckTable, ckTd, ckTextarea, ckTh, ckTooltip, ckTr, install as default, lockScroll, unlockScroll };
16628
+ export { events as EVENTS, mitt as EventBus, ckButton, ckCheckbox, ckChip, ckDropdown, ckIcon, ckImg, ckInput, ckLabel, ckNavbar, _sfc_main$e as ckPopup, ckRadio, ckSelect, ckSwitch, ckSwitchOptions, ckTable, ckTd, ckTextarea, ckTh, ckTooltip, ckTr, install as default, lockScroll, unlockScroll };