cleek 2.4.16 → 2.4.17

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
@@ -18807,22 +18807,6 @@ var hooks8 = {
18807
18807
  classList2.push(`ck-component__group-vertical--${groupVertical}`);
18808
18808
  return classList2;
18809
18809
  },
18810
- geRealBorderColor(props, cleekOptions2) {
18811
- var _a;
18812
- if (props.borderColor)
18813
- return props.borderColor;
18814
- if ((_a = cleekOptions2 == null ? void 0 : cleekOptions2.styles) == null ? void 0 : _a.borderColor)
18815
- return cleekOptions2.styles.borderColor;
18816
- return "";
18817
- },
18818
- geRealLayout(props, cleekOptions2) {
18819
- var _a;
18820
- if (props.layout)
18821
- return props.layout;
18822
- if ((_a = cleekOptions2 == null ? void 0 : cleekOptions2.styles) == null ? void 0 : _a.layout)
18823
- return cleekOptions2.styles.layout;
18824
- return "";
18825
- },
18826
18810
  getWidthByWidthBreaks(widthBreaks, windowWidth) {
18827
18811
  if (widthBreaks) {
18828
18812
  let realWidthBreaks = [...widthBreaks];
@@ -20903,15 +20887,16 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20903
20887
  const defaultButtonType = "outlined";
20904
20888
  const defaultColor = "primary";
20905
20889
  const defaultAlign = "left";
20906
- let cleekOptions2;
20890
+ let cleekOptions2 = ref();
20907
20891
  const realButtonType = computed$2(() => {
20908
20892
  if (props.type)
20909
20893
  return props.type;
20910
- if (cleekOptions2)
20911
- return cleekOptions2.button.type;
20894
+ if (cleekOptions2.value)
20895
+ return cleekOptions2.value.button.type;
20912
20896
  return defaultButtonType;
20913
20897
  });
20914
20898
  const computedClass = computed$2(() => {
20899
+ var _a;
20915
20900
  const list = [];
20916
20901
  list.push(hooks8.getGroupClass(props, windowWidth.value));
20917
20902
  const color = props.color || defaultColor;
@@ -20926,7 +20911,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20926
20911
  if (align === "center" || align === "right") {
20927
20912
  list.push(`ck-button__align--${props.align}`);
20928
20913
  }
20929
- const layout = hooks8.geRealLayout(props, cleekOptions2);
20914
+ const layout = props.layout || ((_a = cleekOptions2.value) == null ? void 0 : _a.styles.layout);
20930
20915
  if (layout)
20931
20916
  list.push(layout);
20932
20917
  list.push(`type-${realButtonType.value}`);
@@ -20952,7 +20937,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20952
20937
  emits("click", event);
20953
20938
  }
20954
20939
  onMounted(() => {
20955
- cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
20940
+ cleekOptions2.value = hooks8.getCleekOptions(getCurrentInstance);
20956
20941
  });
20957
20942
  hooks8.preventUnusedError([
20958
20943
  onClick2,
@@ -20986,7 +20971,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20986
20971
  };
20987
20972
  }
20988
20973
  });
20989
- var CkButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-591130bc"]]);
20974
+ var CkButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-177f5b94"]]);
20990
20975
  var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
20991
20976
  const _hoisted_1$h = ["for"];
20992
20977
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
@@ -21048,7 +21033,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21048
21033
  setup(__props, { expose, emit: emits }) {
21049
21034
  const props = __props;
21050
21035
  expose({ setFocus, setSelect });
21051
- let cleekOptions2;
21036
+ let cleekOptions2 = ref();
21052
21037
  const defaultType = "text";
21053
21038
  const defaultDelayChangeTime = 300;
21054
21039
  const realInput = ref(null);
@@ -21082,6 +21067,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21082
21067
  emits("change", event);
21083
21068
  };
21084
21069
  const computedClassInput = computed$2(() => {
21070
+ var _a, _b;
21085
21071
  const list = [];
21086
21072
  list.push(hooks8.getGroupClass(props, windowWidth.value));
21087
21073
  if (props.icon)
@@ -21092,20 +21078,21 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21092
21078
  list.push(`align--${props.align}`);
21093
21079
  if (props.hideBorder)
21094
21080
  list.push("no-border");
21095
- const layout = hooks8.geRealLayout(props, cleekOptions2);
21081
+ const layout = props.layout || ((_a = cleekOptions2.value) == null ? void 0 : _a.styles.layout);
21096
21082
  if (layout)
21097
21083
  list.push(layout);
21098
21084
  if (props.size)
21099
21085
  list.push(`ck-input-size__${props.size}`);
21100
- const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
21086
+ const borderColor = props.borderColor || ((_b = cleekOptions2.value) == null ? void 0 : _b.styles.borderColor);
21101
21087
  if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
21102
21088
  list.push(`ck-component__border-color--${borderColor}`);
21103
21089
  }
21104
21090
  return list;
21105
21091
  });
21106
21092
  const computedStyleInput = computed$2(() => {
21093
+ var _a;
21107
21094
  const list = [];
21108
- const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
21095
+ const borderColor = props.borderColor || ((_a = cleekOptions2.value) == null ? void 0 : _a.styles.borderColor);
21109
21096
  if (borderColor && !hooks8.isColorTemplateVariable(borderColor)) {
21110
21097
  list.push({ "border-color": borderColor });
21111
21098
  }
@@ -21146,7 +21133,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21146
21133
  onClick2
21147
21134
  ]);
21148
21135
  onMounted(() => {
21149
- cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
21136
+ cleekOptions2.value = hooks8.getCleekOptions(getCurrentInstance);
21150
21137
  });
21151
21138
  return (_ctx, _cache) => {
21152
21139
  return openBlock(), createElementBlock("div", {
@@ -21198,7 +21185,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21198
21185
  };
21199
21186
  }
21200
21187
  });
21201
- var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-d0ed260a"]]);
21188
+ var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-110a76c1"]]);
21202
21189
  var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
21203
21190
  const _hoisted_1$f = { class: "ck-table__header-items" };
21204
21191
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
@@ -22764,7 +22751,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
22764
22751
  },
22765
22752
  setup(__props) {
22766
22753
  const props = __props;
22767
- let $cleekOptions;
22754
+ let cleekOptions2 = ref();
22768
22755
  const altNeeded = ref(false);
22769
22756
  const isMounted = ref(false);
22770
22757
  const isFullPath = computed$2(() => {
@@ -22828,14 +22815,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
22828
22815
  ;
22829
22816
  }
22830
22817
  function getImg(src) {
22831
- let path = "";
22832
- if ($cleekOptions) {
22833
- path = $cleekOptions.img.basePath;
22834
- }
22818
+ var _a;
22819
+ let path = ((_a = cleekOptions2.value) == null ? void 0 : _a.img.basePath) || "";
22835
22820
  return `${path}${src}`;
22836
22821
  }
22837
22822
  onMounted(() => {
22838
- $cleekOptions = hooks8.getCleekOptions(getCurrentInstance);
22823
+ cleekOptions2.value = hooks8.getCleekOptions(getCurrentInstance);
22839
22824
  isMounted.value = true;
22840
22825
  });
22841
22826
  hooks8.preventUnusedError([
@@ -22860,7 +22845,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
22860
22845
  };
22861
22846
  }
22862
22847
  });
22863
- var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-4d100c3a"]]);
22848
+ var ckImg = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-7cd9662b"]]);
22864
22849
  var ckRadio_vue_vue_type_style_index_0_scoped_true_lang = "";
22865
22850
  const _withScopeId$2 = (n) => (pushScopeId("data-v-2e09b238"), n = n(), popScopeId(), n);
22866
22851
  const _hoisted_1$7 = ["onKeyup"];
@@ -22966,7 +22951,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22966
22951
  expose({
22967
22952
  setFocus
22968
22953
  });
22969
- let cleekOptions2;
22954
+ let cleekOptions2 = ref();
22970
22955
  const defaultMinWidth = "180px";
22971
22956
  const defaultClearValue = "auto";
22972
22957
  const defaultReduceNameProp = "name";
@@ -22999,22 +22984,24 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22999
22984
  return true;
23000
22985
  });
23001
22986
  const computedClassSelect = computed$2(() => {
22987
+ var _a, _b;
23002
22988
  const list = [];
23003
22989
  list.push(hooks8.getGroupClass(props, windowWidth.value));
23004
- const layout = hooks8.geRealLayout(props, cleekOptions2);
22990
+ const layout = props.layout || ((_a = cleekOptions2.value) == null ? void 0 : _a.styles.layout);
23005
22991
  if (layout)
23006
22992
  list.push(layout);
23007
22993
  if (isClearBtnVisible.value)
23008
22994
  list.push("clear-able");
23009
- const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
22995
+ const borderColor = props.borderColor || ((_b = cleekOptions2.value) == null ? void 0 : _b.styles.borderColor);
23010
22996
  if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
23011
22997
  list.push(`ck-component__border-color--${borderColor}`);
23012
22998
  }
23013
22999
  return list;
23014
23000
  });
23015
23001
  const computedStyleSelect = computed$2(() => {
23002
+ var _a;
23016
23003
  const list = [];
23017
- const borderColor = hooks8.geRealBorderColor(props, cleekOptions2);
23004
+ const borderColor = props.borderColor || ((_a = cleekOptions2.value) == null ? void 0 : _a.styles.borderColor);
23018
23005
  if (borderColor && !hooks8.isColorTemplateVariable(borderColor)) {
23019
23006
  list.push({ "border-color": borderColor });
23020
23007
  }
@@ -23099,7 +23086,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23099
23086
  function setFocus() {
23100
23087
  }
23101
23088
  onMounted(() => {
23102
- cleekOptions2 = hooks8.getCleekOptions(getCurrentInstance);
23089
+ cleekOptions2.value = hooks8.getCleekOptions(getCurrentInstance);
23103
23090
  });
23104
23091
  hooks8.preventUnusedError([
23105
23092
  computedStyle,
@@ -23152,7 +23139,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23152
23139
  };
23153
23140
  }
23154
23141
  });
23155
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f4a6925c"]]);
23142
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-6e28e1de"]]);
23156
23143
  var ckSidebar_vue_vue_type_style_index_0_scoped_true_lang = "";
23157
23144
  const _hoisted_1$5 = {
23158
23145
  key: 1,
@@ -23428,14 +23415,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23428
23415
  }
23429
23416
  });
23430
23417
  const computedClassTextarea = computed$2(() => {
23431
- var _a, _b, _c, _d;
23418
+ var _a, _b;
23432
23419
  const list = [];
23433
- const layout = props.layout || ((_b = (_a = cleekOptions2.value) == null ? void 0 : _a.styles) == null ? void 0 : _b.layout);
23420
+ const layout = props.layout || ((_a = cleekOptions2.value) == null ? void 0 : _a.styles.layout);
23434
23421
  if (layout)
23435
23422
  list.push(layout);
23436
- const borderColor = props.borderColor || ((_d = (_c = cleekOptions2.value) == null ? void 0 : _c.styles) == null ? void 0 : _d.borderColor);
23437
- console.log("textarea", borderColor);
23438
- console.log("cleekOptions", cleekOptions2.value);
23423
+ const borderColor = props.borderColor || ((_b = cleekOptions2.value) == null ? void 0 : _b.styles.borderColor);
23439
23424
  if (borderColor && hooks8.isColorTemplateVariable(borderColor)) {
23440
23425
  list.push(`ck-component__border-color--${borderColor}`);
23441
23426
  }
@@ -23475,7 +23460,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
23475
23460
  };
23476
23461
  }
23477
23462
  });
23478
- var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-334a6158"]]);
23463
+ var ckTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-67887c28"]]);
23479
23464
  var CkConfirm_vue_vue_type_style_index_0_scoped_true_lang = "";
23480
23465
  const _withScopeId = (n) => (pushScopeId("data-v-bc51fc7a"), n = n(), popScopeId(), n);
23481
23466
  const _hoisted_1$1 = { class: "ck-confirm--background" };