cleek 2.4.11 → 2.4.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
@@ -3386,11 +3386,11 @@ if (!w[NAMESPACE_IDENTIFIER].hooks)
3386
3386
  if (!w[NAMESPACE_IDENTIFIER].shims)
3387
3387
  w[NAMESPACE_IDENTIFIER].shims = [];
3388
3388
  var namespace = w[NAMESPACE_IDENTIFIER];
3389
- var functions$1 = [];
3389
+ var functions = [];
3390
3390
  var listener = function listener2() {
3391
3391
  DOCUMENT.removeEventListener("DOMContentLoaded", listener2);
3392
3392
  loaded = 1;
3393
- functions$1.map(function(fn) {
3393
+ functions.map(function(fn) {
3394
3394
  return fn();
3395
3395
  });
3396
3396
  };
@@ -3403,7 +3403,7 @@ if (IS_DOM) {
3403
3403
  function domready(fn) {
3404
3404
  if (!IS_DOM)
3405
3405
  return;
3406
- loaded ? setTimeout(fn, 0) : functions$1.push(fn);
3406
+ loaded ? setTimeout(fn, 0) : functions.push(fn);
3407
3407
  }
3408
3408
  function toHtml(abstractNodes) {
3409
3409
  var tag = abstractNodes.tag, _abstractNodes$attrib = abstractNodes.attributes, attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib, _abstractNodes$childr = abstractNodes.children, children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;
@@ -3759,12 +3759,12 @@ function registerPlugins(nextPlugins, _ref2) {
3759
3759
  }
3760
3760
  });
3761
3761
  if (plugin2.hooks) {
3762
- var hooks8 = plugin2.hooks();
3763
- Object.keys(hooks8).forEach(function(hook) {
3762
+ var hooks9 = plugin2.hooks();
3763
+ Object.keys(hooks9).forEach(function(hook) {
3764
3764
  if (!_hooks[hook]) {
3765
3765
  _hooks[hook] = [];
3766
3766
  }
3767
- _hooks[hook].push(hooks8[hook]);
3767
+ _hooks[hook].push(hooks9[hook]);
3768
3768
  });
3769
3769
  }
3770
3770
  if (plugin2.provides) {
@@ -18790,7 +18790,7 @@ function render2(_ctx, _cache) {
18790
18790
  var ckTr_vue_vue_type_style_index_0_scoped_true_lang = "";
18791
18791
  const _sfc_main$o = {};
18792
18792
  var CkTr = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", render2], ["__scopeId", "data-v-519cf874"]]);
18793
- var functions = {
18793
+ var hooks8 = {
18794
18794
  getCleekOptions(getCurrentInstance2) {
18795
18795
  return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
18796
18796
  },
@@ -18943,9 +18943,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18943
18943
  const isColumnDisplayed = computed$2(() => {
18944
18944
  if (!props.col)
18945
18945
  return true;
18946
- return functions.isColumnDisplayed(props.col);
18946
+ return hooks8.isColumnDisplayed(props.col);
18947
18947
  });
18948
- functions.preventUnusedError([
18948
+ hooks8.preventUnusedError([
18949
18949
  isColumnDisplayed,
18950
18950
  computedStyle
18951
18951
  ]);
@@ -20814,14 +20814,14 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
20814
20814
  });
20815
20815
  const computedClass = computed$2(() => {
20816
20816
  const list = [];
20817
- if (props.color && functions.isColorTemplateVariable(props.color)) {
20817
+ if (props.color && hooks8.isColorTemplateVariable(props.color)) {
20818
20818
  list.push(`ck-component__color--${props.color}`);
20819
20819
  }
20820
20820
  return list;
20821
20821
  });
20822
20822
  const computedStyle = computed$2(() => {
20823
20823
  const list = [];
20824
- if (props.color && !functions.isColorTemplateVariable(props.color)) {
20824
+ if (props.color && !hooks8.isColorTemplateVariable(props.color)) {
20825
20825
  list.push({ color: props.color });
20826
20826
  }
20827
20827
  return list;
@@ -20829,7 +20829,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
20829
20829
  function onClick2(event) {
20830
20830
  emits("click", event);
20831
20831
  }
20832
- functions.preventUnusedError([
20832
+ hooks8.preventUnusedError([
20833
20833
  onClick2,
20834
20834
  computedStyle
20835
20835
  ]);
@@ -20913,7 +20913,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20913
20913
  });
20914
20914
  const computedClass = computed$2(() => {
20915
20915
  const list = [];
20916
- list.push(functions.getGroupClass(props, windowWidth.value));
20916
+ list.push(hooks8.getGroupClass(props, windowWidth.value));
20917
20917
  const color = props.color || defaultColor;
20918
20918
  if (color !== defaultColor) {
20919
20919
  if (realButtonType.value === "filled") {
@@ -20926,7 +20926,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20926
20926
  if (align === "center" || align === "right") {
20927
20927
  list.push(`ck-button__align--${props.align}`);
20928
20928
  }
20929
- const layout = functions.geRealLayout(props, cleekOptions2);
20929
+ const layout = hooks8.geRealLayout(props, cleekOptions2);
20930
20930
  if (layout)
20931
20931
  list.push(layout);
20932
20932
  list.push(`type-${realButtonType.value}`);
@@ -20938,7 +20938,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20938
20938
  const list = [];
20939
20939
  let isWidthDefined = false;
20940
20940
  if (props.widthBreaks) {
20941
- const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
20941
+ const width = hooks8.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
20942
20942
  if (width) {
20943
20943
  isWidthDefined = true;
20944
20944
  list.push({ width });
@@ -20952,9 +20952,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20952
20952
  emits("click", event);
20953
20953
  }
20954
20954
  onMounted(() => {
20955
- cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
20955
+ cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
20956
20956
  });
20957
- functions.preventUnusedError([
20957
+ hooks8.preventUnusedError([
20958
20958
  onClick2,
20959
20959
  computedStyle,
20960
20960
  computedClass
@@ -21083,7 +21083,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21083
21083
  };
21084
21084
  const computedClassInput = computed$2(() => {
21085
21085
  const list = [];
21086
- list.push(functions.getGroupClass(props, windowWidth.value));
21086
+ list.push(hooks8.getGroupClass(props, windowWidth.value));
21087
21087
  if (props.icon)
21088
21088
  list.push("has-icon-left");
21089
21089
  if (props.iconRight)
@@ -21092,20 +21092,22 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21092
21092
  list.push(`align--${props.align}`);
21093
21093
  if (props.hideBorder)
21094
21094
  list.push("no-border");
21095
- const layout = functions.geRealLayout(props, cleekOptions2);
21095
+ const layout = hooks8.geRealLayout(props, cleekOptions2);
21096
21096
  if (layout)
21097
21097
  list.push(layout);
21098
21098
  if (props.size)
21099
21099
  list.push(`ck-input-size__${props.size}`);
21100
- if (props.borderColor && functions.isColorTemplateVariable(props.borderColor)) {
21101
- list.push(`ck-input--border-color__${props.borderColor}`);
21100
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
21101
+ if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
21102
+ list.push(`ck-component__border-color--${borderColor}`);
21102
21103
  }
21103
21104
  return list;
21104
21105
  });
21105
21106
  const computedStyleInput = computed$2(() => {
21106
21107
  const list = [];
21107
- if (props.borderColor && !functions.isColorTemplateVariable(props.borderColor)) {
21108
- list.push({ "border-color": props.borderColor });
21108
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
21109
+ if (borderColor && !hooks8.isColorTemplateVariable(borderColor)) {
21110
+ list.push({ "border-color": borderColor });
21109
21111
  }
21110
21112
  return list;
21111
21113
  });
@@ -21113,7 +21115,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21113
21115
  const list = [];
21114
21116
  list.push({ width: props.width });
21115
21117
  if (props.widthBreaks) {
21116
- const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
21118
+ const width = hooks8.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
21117
21119
  if (width)
21118
21120
  list.push({ width });
21119
21121
  }
@@ -21134,7 +21136,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21134
21136
  }
21135
21137
  }, props.delayChangeTime || defaultDelayChangeTime);
21136
21138
  }
21137
- functions.preventUnusedError([
21139
+ hooks8.preventUnusedError([
21138
21140
  computedStyle,
21139
21141
  computedClassInput,
21140
21142
  realLabelAlign,
@@ -21144,7 +21146,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21144
21146
  onClick2
21145
21147
  ]);
21146
21148
  onMounted(() => {
21147
- cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
21149
+ cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
21148
21150
  });
21149
21151
  return (_ctx, _cache) => {
21150
21152
  return openBlock(), createElementBlock("div", {
@@ -21196,7 +21198,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21196
21198
  };
21197
21199
  }
21198
21200
  });
21199
- var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-2d610c78"]]);
21201
+ var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-d0ed260a"]]);
21200
21202
  var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
21201
21203
  const _hoisted_1$f = { class: "ck-table__header-items" };
21202
21204
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
@@ -21257,7 +21259,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21257
21259
  emits("refreshList", false);
21258
21260
  }, 1e3);
21259
21261
  }
21260
- functions.preventUnusedError([
21262
+ hooks8.preventUnusedError([
21261
21263
  searchGroupValue,
21262
21264
  checkRefresh
21263
21265
  ]);
@@ -21372,7 +21374,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
21372
21374
  return;
21373
21375
  updateCurrentPage(val);
21374
21376
  }
21375
- functions.preventUnusedError([
21377
+ hooks8.preventUnusedError([
21376
21378
  validateInputNumber
21377
21379
  ]);
21378
21380
  return (_ctx, _cache) => {
@@ -22414,7 +22416,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
22414
22416
  list.push({
22415
22417
  name: col.name,
22416
22418
  title: col.title,
22417
- value: functions.isColumnDisplayed(col)
22419
+ value: hooks8.isColumnDisplayed(col)
22418
22420
  });
22419
22421
  }
22420
22422
  });
@@ -22520,7 +22522,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22520
22522
  return newList;
22521
22523
  });
22522
22524
  const filteredColumnsList = computed$2(() => {
22523
- return columnsArray.value.filter(functions.isColumnDisplayed);
22525
+ return columnsArray.value.filter(hooks8.isColumnDisplayed);
22524
22526
  });
22525
22527
  const searchLocal = computed$2({
22526
22528
  get() {
@@ -22561,7 +22563,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22561
22563
  list.push("not-full-width");
22562
22564
  return list;
22563
22565
  });
22564
- functions.preventUnusedError([
22566
+ hooks8.preventUnusedError([
22565
22567
  computedClassTable,
22566
22568
  defaultNoResultsText,
22567
22569
  isMobileVisible,
@@ -22720,7 +22722,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
22720
22722
  const computedStyle = computed$2(() => {
22721
22723
  const list = [];
22722
22724
  if (props.widthBreaks) {
22723
- const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
22725
+ const width = hooks8.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
22724
22726
  if (width)
22725
22727
  list.push({ width });
22726
22728
  }
@@ -22783,7 +22785,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
22783
22785
  classList2.push("is-rounded");
22784
22786
  if (props.hasBorder) {
22785
22787
  classList2.push("ck-img__has-border");
22786
- if (functions.isColorTemplateVariable(realBorderColor.value)) {
22788
+ if (hooks8.isColorTemplateVariable(realBorderColor.value)) {
22787
22789
  classList2.push(`ck-component__border-color--${realBorderColor.value}`);
22788
22790
  }
22789
22791
  }
@@ -22800,7 +22802,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
22800
22802
  if (props.radius)
22801
22803
  styleList.push({ "border-radius": props.radius });
22802
22804
  if (props.hasBorder) {
22803
- if (!functions.isColorTemplateVariable(realBorderColor.value)) {
22805
+ if (!hooks8.isColorTemplateVariable(realBorderColor.value)) {
22804
22806
  styleList.push({ "border-color": realBorderColor.value });
22805
22807
  }
22806
22808
  }
@@ -22833,10 +22835,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
22833
22835
  return `${path}${src}`;
22834
22836
  }
22835
22837
  onMounted(() => {
22836
- $cleekOptions = functions.getCleekOptions(getCurrentInstance);
22838
+ $cleekOptions = hooks8.getCleekOptions(getCurrentInstance);
22837
22839
  isMounted.value = true;
22838
22840
  });
22839
- functions.preventUnusedError([
22841
+ hooks8.preventUnusedError([
22840
22842
  computedImgStyle,
22841
22843
  computedStyle,
22842
22844
  computedClass,
@@ -22961,10 +22963,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22961
22963
  emits: ["update:modelValue", "click", "change"],
22962
22964
  setup(__props, { expose, emit: emits }) {
22963
22965
  const props = __props;
22964
- let cleekOptions2;
22965
22966
  expose({
22966
22967
  setFocus
22967
22968
  });
22969
+ let cleekOptions2;
22968
22970
  const defaultMinWidth = "180px";
22969
22971
  const defaultClearValue = "auto";
22970
22972
  const defaultReduceNameProp = "name";
@@ -22998,26 +23000,23 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22998
23000
  });
22999
23001
  const computedClassSelect = computed$2(() => {
23000
23002
  const list = [];
23001
- list.push(functions.getGroupClass(props, windowWidth.value));
23002
- const layout = functions.geRealLayout(props, cleekOptions2);
23003
+ list.push(hooks8.getGroupClass(props, windowWidth.value));
23004
+ const layout = hooks8.geRealLayout(props, cleekOptions2);
23003
23005
  if (layout)
23004
23006
  list.push(layout);
23005
23007
  if (isClearBtnVisible.value)
23006
23008
  list.push("clear-able");
23007
- const borderColor = functions.geRealBorderColor(props, cleekOptions2);
23008
- if (borderColor && functions.isColorTemplateVariable(borderColor)) {
23009
- list.push(`ck-input--border-color__${props.borderColor}`);
23009
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
23010
+ if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
23011
+ list.push(`ck-component__border-color--${borderColor}`);
23010
23012
  }
23011
23013
  return list;
23012
23014
  });
23013
23015
  const computedStyleSelect = computed$2(() => {
23014
23016
  const list = [];
23015
- const borderColor = functions.geRealBorderColor(props, cleekOptions2);
23016
- if (borderColor && functions.isColorTemplateVariable(borderColor)) {
23017
- list.push(`ck-input--border-color__${props.borderColor}`);
23018
- }
23019
- if (props.borderColor && !functions.isColorTemplateVariable(props.borderColor)) {
23020
- list.push({ "border-color": props.borderColor });
23017
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
23018
+ if (borderColor && !hooks8.isColorTemplateVariable(borderColor)) {
23019
+ list.push({ "border-color": borderColor });
23021
23020
  }
23022
23021
  return list;
23023
23022
  });
@@ -23025,7 +23024,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23025
23024
  const list = [];
23026
23025
  let isWidthDefined = false;
23027
23026
  if (props.widthBreaks) {
23028
- const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
23027
+ const width = hooks8.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
23029
23028
  if (width) {
23030
23029
  list.push({ width });
23031
23030
  isWidthDefined = true;
@@ -23100,9 +23099,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23100
23099
  function setFocus() {
23101
23100
  }
23102
23101
  onMounted(() => {
23103
- cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
23102
+ cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
23104
23103
  });
23105
- functions.preventUnusedError([
23104
+ hooks8.preventUnusedError([
23106
23105
  computedStyle,
23107
23106
  computedClassSelect,
23108
23107
  getOptionValue,
@@ -23153,7 +23152,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23153
23152
  };
23154
23153
  }
23155
23154
  });
23156
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-cbfee918"]]);
23155
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f4a6925c"]]);
23157
23156
  var ckSidebar_vue_vue_type_style_index_0_scoped_true_lang = "";
23158
23157
  const _hoisted_1$5 = {
23159
23158
  key: 1,
@@ -23358,7 +23357,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
23358
23357
  });
23359
23358
  const computedClass = computed$2(() => {
23360
23359
  const list = [];
23361
- list.push(functions.getGroupClass(props, windowWidth.value));
23360
+ list.push(hooks8.getGroupClass(props, windowWidth.value));
23362
23361
  return list;
23363
23362
  });
23364
23363
  const computedItemStyle = computed$2(() => {
@@ -23375,7 +23374,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
23375
23374
  }
23376
23375
  return defaultReduceFunction(option);
23377
23376
  }
23378
- functions.preventUnusedError([
23377
+ hooks8.preventUnusedError([
23379
23378
  getOptionValue
23380
23379
  ]);
23381
23380
  return (_ctx, _cache) => {
@@ -23412,11 +23411,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23412
23411
  props: {
23413
23412
  modelValue: null,
23414
23413
  label: null,
23415
- labelAlign: null
23414
+ labelAlign: null,
23415
+ layout: null,
23416
+ borderColor: null
23416
23417
  },
23417
23418
  emits: ["update:modelValue"],
23418
23419
  setup(__props, { emit: emits }) {
23419
23420
  const props = __props;
23421
+ let cleekOptions2;
23420
23422
  const value = computed$2({
23421
23423
  get() {
23422
23424
  return props.modelValue;
@@ -23425,6 +23427,30 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23425
23427
  emits("update:modelValue", val);
23426
23428
  }
23427
23429
  });
23430
+ const computedClassTextarea = computed$2(() => {
23431
+ const list = [];
23432
+ const layout = hooks8.geRealLayout(props, cleekOptions2);
23433
+ if (layout)
23434
+ list.push(layout);
23435
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
23436
+ console.log("textarea", borderColor);
23437
+ console.log("cleekOptions", cleekOptions2);
23438
+ if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
23439
+ list.push(`ck-component__border-color--${borderColor}`);
23440
+ }
23441
+ return list;
23442
+ });
23443
+ const computedStyleTextarea = computed$2(() => {
23444
+ const list = [];
23445
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
23446
+ if (borderColor && !hooks8.isColorTemplateVariable(borderColor)) {
23447
+ list.push({ "border-color": borderColor });
23448
+ }
23449
+ return list;
23450
+ });
23451
+ onMounted(() => {
23452
+ cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
23453
+ });
23428
23454
  return (_ctx, _cache) => {
23429
23455
  return openBlock(), createElementBlock("div", _hoisted_1$2, [
23430
23456
  __props.label ? (openBlock(), createBlock(CkLabel, {
@@ -23437,15 +23463,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23437
23463
  _: 1
23438
23464
  }, 8, ["label-align"])) : createCommentVNode("", true),
23439
23465
  withDirectives(createElementVNode("textarea", {
23440
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null)
23441
- }, null, 512), [
23466
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
23467
+ class: normalizeClass(unref$1(computedClassTextarea)),
23468
+ style: normalizeStyle(unref$1(computedStyleTextarea))
23469
+ }, null, 6), [
23442
23470
  [vModelText, unref$1(value)]
23443
23471
  ])
23444
23472
  ]);
23445
23473
  };
23446
23474
  }
23447
23475
  });
23448
- var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-373450fe"]]);
23476
+ var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-c450e42e"]]);
23449
23477
  var CkConfirm_vue_vue_type_style_index_0_scoped_true_lang = "";
23450
23478
  const _withScopeId = (n) => (pushScopeId("data-v-bc51fc7a"), n = n(), popScopeId(), n);
23451
23479
  const _hoisted_1$1 = { class: "ck-confirm--background" };