cleek 2.4.12 → 2.4.13

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,21 +21092,21 @@ 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
- const borderColor = functions.geRealBorderColor(props, cleekOptions2);
21101
- if (borderColor && functions.isColorTemplateVariable(borderColor)) {
21100
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
21101
+ if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
21102
21102
  list.push(`ck-component__border-color--${borderColor}`);
21103
21103
  }
21104
21104
  return list;
21105
21105
  });
21106
21106
  const computedStyleInput = computed$2(() => {
21107
21107
  const list = [];
21108
- const borderColor = functions.geRealBorderColor(props, cleekOptions2);
21109
- if (borderColor && !functions.isColorTemplateVariable(borderColor)) {
21108
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
21109
+ if (borderColor && !hooks8.isColorTemplateVariable(borderColor)) {
21110
21110
  list.push({ "border-color": borderColor });
21111
21111
  }
21112
21112
  return list;
@@ -21115,7 +21115,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21115
21115
  const list = [];
21116
21116
  list.push({ width: props.width });
21117
21117
  if (props.widthBreaks) {
21118
- const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
21118
+ const width = hooks8.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
21119
21119
  if (width)
21120
21120
  list.push({ width });
21121
21121
  }
@@ -21136,7 +21136,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21136
21136
  }
21137
21137
  }, props.delayChangeTime || defaultDelayChangeTime);
21138
21138
  }
21139
- functions.preventUnusedError([
21139
+ hooks8.preventUnusedError([
21140
21140
  computedStyle,
21141
21141
  computedClassInput,
21142
21142
  realLabelAlign,
@@ -21146,7 +21146,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21146
21146
  onClick2
21147
21147
  ]);
21148
21148
  onMounted(() => {
21149
- cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
21149
+ cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
21150
21150
  });
21151
21151
  return (_ctx, _cache) => {
21152
21152
  return openBlock(), createElementBlock("div", {
@@ -21259,7 +21259,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
21259
21259
  emits("refreshList", false);
21260
21260
  }, 1e3);
21261
21261
  }
21262
- functions.preventUnusedError([
21262
+ hooks8.preventUnusedError([
21263
21263
  searchGroupValue,
21264
21264
  checkRefresh
21265
21265
  ]);
@@ -21374,7 +21374,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
21374
21374
  return;
21375
21375
  updateCurrentPage(val);
21376
21376
  }
21377
- functions.preventUnusedError([
21377
+ hooks8.preventUnusedError([
21378
21378
  validateInputNumber
21379
21379
  ]);
21380
21380
  return (_ctx, _cache) => {
@@ -22416,7 +22416,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
22416
22416
  list.push({
22417
22417
  name: col.name,
22418
22418
  title: col.title,
22419
- value: functions.isColumnDisplayed(col)
22419
+ value: hooks8.isColumnDisplayed(col)
22420
22420
  });
22421
22421
  }
22422
22422
  });
@@ -22522,7 +22522,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22522
22522
  return newList;
22523
22523
  });
22524
22524
  const filteredColumnsList = computed$2(() => {
22525
- return columnsArray.value.filter(functions.isColumnDisplayed);
22525
+ return columnsArray.value.filter(hooks8.isColumnDisplayed);
22526
22526
  });
22527
22527
  const searchLocal = computed$2({
22528
22528
  get() {
@@ -22563,7 +22563,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
22563
22563
  list.push("not-full-width");
22564
22564
  return list;
22565
22565
  });
22566
- functions.preventUnusedError([
22566
+ hooks8.preventUnusedError([
22567
22567
  computedClassTable,
22568
22568
  defaultNoResultsText,
22569
22569
  isMobileVisible,
@@ -22722,7 +22722,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
22722
22722
  const computedStyle = computed$2(() => {
22723
22723
  const list = [];
22724
22724
  if (props.widthBreaks) {
22725
- const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
22725
+ const width = hooks8.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
22726
22726
  if (width)
22727
22727
  list.push({ width });
22728
22728
  }
@@ -22785,7 +22785,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
22785
22785
  classList2.push("is-rounded");
22786
22786
  if (props.hasBorder) {
22787
22787
  classList2.push("ck-img__has-border");
22788
- if (functions.isColorTemplateVariable(realBorderColor.value)) {
22788
+ if (hooks8.isColorTemplateVariable(realBorderColor.value)) {
22789
22789
  classList2.push(`ck-component__border-color--${realBorderColor.value}`);
22790
22790
  }
22791
22791
  }
@@ -22802,7 +22802,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
22802
22802
  if (props.radius)
22803
22803
  styleList.push({ "border-radius": props.radius });
22804
22804
  if (props.hasBorder) {
22805
- if (!functions.isColorTemplateVariable(realBorderColor.value)) {
22805
+ if (!hooks8.isColorTemplateVariable(realBorderColor.value)) {
22806
22806
  styleList.push({ "border-color": realBorderColor.value });
22807
22807
  }
22808
22808
  }
@@ -22835,10 +22835,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
22835
22835
  return `${path}${src}`;
22836
22836
  }
22837
22837
  onMounted(() => {
22838
- $cleekOptions = functions.getCleekOptions(getCurrentInstance);
22838
+ $cleekOptions = hooks8.getCleekOptions(getCurrentInstance);
22839
22839
  isMounted.value = true;
22840
22840
  });
22841
- functions.preventUnusedError([
22841
+ hooks8.preventUnusedError([
22842
22842
  computedImgStyle,
22843
22843
  computedStyle,
22844
22844
  computedClass,
@@ -22963,10 +22963,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22963
22963
  emits: ["update:modelValue", "click", "change"],
22964
22964
  setup(__props, { expose, emit: emits }) {
22965
22965
  const props = __props;
22966
- let cleekOptions2;
22967
22966
  expose({
22968
22967
  setFocus
22969
22968
  });
22969
+ let cleekOptions2;
22970
22970
  const defaultMinWidth = "180px";
22971
22971
  const defaultClearValue = "auto";
22972
22972
  const defaultReduceNameProp = "name";
@@ -23000,22 +23000,22 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23000
23000
  });
23001
23001
  const computedClassSelect = computed$2(() => {
23002
23002
  const list = [];
23003
- list.push(functions.getGroupClass(props, windowWidth.value));
23004
- const layout = functions.geRealLayout(props, cleekOptions2);
23003
+ list.push(hooks8.getGroupClass(props, windowWidth.value));
23004
+ const layout = hooks8.geRealLayout(props, cleekOptions2);
23005
23005
  if (layout)
23006
23006
  list.push(layout);
23007
23007
  if (isClearBtnVisible.value)
23008
23008
  list.push("clear-able");
23009
- const borderColor = functions.geRealBorderColor(props, cleekOptions2);
23010
- if (borderColor && functions.isColorTemplateVariable(borderColor)) {
23009
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
23010
+ if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
23011
23011
  list.push(`ck-component__border-color--${borderColor}`);
23012
23012
  }
23013
23013
  return list;
23014
23014
  });
23015
23015
  const computedStyleSelect = computed$2(() => {
23016
23016
  const list = [];
23017
- const borderColor = functions.geRealBorderColor(props, cleekOptions2);
23018
- if (borderColor && !functions.isColorTemplateVariable(borderColor)) {
23017
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
23018
+ if (borderColor && !hooks8.isColorTemplateVariable(borderColor)) {
23019
23019
  list.push({ "border-color": borderColor });
23020
23020
  }
23021
23021
  return list;
@@ -23024,7 +23024,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23024
23024
  const list = [];
23025
23025
  let isWidthDefined = false;
23026
23026
  if (props.widthBreaks) {
23027
- const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
23027
+ const width = hooks8.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
23028
23028
  if (width) {
23029
23029
  list.push({ width });
23030
23030
  isWidthDefined = true;
@@ -23099,9 +23099,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23099
23099
  function setFocus() {
23100
23100
  }
23101
23101
  onMounted(() => {
23102
- cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
23102
+ cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
23103
23103
  });
23104
- functions.preventUnusedError([
23104
+ hooks8.preventUnusedError([
23105
23105
  computedStyle,
23106
23106
  computedClassSelect,
23107
23107
  getOptionValue,
@@ -23152,7 +23152,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23152
23152
  };
23153
23153
  }
23154
23154
  });
23155
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-12f0b952"]]);
23155
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f4a6925c"]]);
23156
23156
  var ckSidebar_vue_vue_type_style_index_0_scoped_true_lang = "";
23157
23157
  const _hoisted_1$5 = {
23158
23158
  key: 1,
@@ -23357,7 +23357,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
23357
23357
  });
23358
23358
  const computedClass = computed$2(() => {
23359
23359
  const list = [];
23360
- list.push(functions.getGroupClass(props, windowWidth.value));
23360
+ list.push(hooks8.getGroupClass(props, windowWidth.value));
23361
23361
  return list;
23362
23362
  });
23363
23363
  const computedItemStyle = computed$2(() => {
@@ -23374,7 +23374,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
23374
23374
  }
23375
23375
  return defaultReduceFunction(option);
23376
23376
  }
23377
- functions.preventUnusedError([
23377
+ hooks8.preventUnusedError([
23378
23378
  getOptionValue
23379
23379
  ]);
23380
23380
  return (_ctx, _cache) => {
@@ -23411,11 +23411,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23411
23411
  props: {
23412
23412
  modelValue: null,
23413
23413
  label: null,
23414
- labelAlign: null
23414
+ labelAlign: null,
23415
+ layout: null,
23416
+ borderColor: null
23415
23417
  },
23416
23418
  emits: ["update:modelValue"],
23417
23419
  setup(__props, { emit: emits }) {
23418
23420
  const props = __props;
23421
+ let cleekOptions2;
23419
23422
  const value = computed$2({
23420
23423
  get() {
23421
23424
  return props.modelValue;
@@ -23424,6 +23427,28 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23424
23427
  emits("update:modelValue", val);
23425
23428
  }
23426
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
+ if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
23437
+ list.push(`ck-component__border-color--${borderColor}`);
23438
+ }
23439
+ return list;
23440
+ });
23441
+ const computedStyleTextarea = computed$2(() => {
23442
+ const list = [];
23443
+ const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
23444
+ if (borderColor && !hooks8.isColorTemplateVariable(borderColor)) {
23445
+ list.push({ "border-color": borderColor });
23446
+ }
23447
+ return list;
23448
+ });
23449
+ onMounted(() => {
23450
+ cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
23451
+ });
23427
23452
  return (_ctx, _cache) => {
23428
23453
  return openBlock(), createElementBlock("div", _hoisted_1$2, [
23429
23454
  __props.label ? (openBlock(), createBlock(CkLabel, {
@@ -23436,15 +23461,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23436
23461
  _: 1
23437
23462
  }, 8, ["label-align"])) : createCommentVNode("", true),
23438
23463
  withDirectives(createElementVNode("textarea", {
23439
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null)
23440
- }, null, 512), [
23464
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
23465
+ class: normalizeClass(unref$1(computedClassTextarea)),
23466
+ style: normalizeStyle(unref$1(computedStyleTextarea))
23467
+ }, null, 6), [
23441
23468
  [vModelText, unref$1(value)]
23442
23469
  ])
23443
23470
  ]);
23444
23471
  };
23445
23472
  }
23446
23473
  });
23447
- var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-373450fe"]]);
23474
+ var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-1ba68b2e"]]);
23448
23475
  var CkConfirm_vue_vue_type_style_index_0_scoped_true_lang = "";
23449
23476
  const _withScopeId = (n) => (pushScopeId("data-v-bc51fc7a"), n = n(), popScopeId(), n);
23450
23477
  const _hoisted_1$1 = { class: "ck-confirm--background" };