cleek 2.4.4 → 2.4.7

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
@@ -2889,16 +2889,22 @@ const plugin = {
2889
2889
  install: install$1,
2890
2890
  options: config$2
2891
2891
  };
2892
- var defaultCleekOptions = {
2892
+ const cleekOptions = {
2893
2893
  colors: {
2894
2894
  primary: "#559933",
2895
2895
  secondary: "#559933"
2896
2896
  },
2897
2897
  button: {
2898
- type: "outlined"
2898
+ type: "outlined",
2899
+ rounded: false
2899
2900
  },
2900
2901
  img: {
2901
2902
  basePath: ""
2903
+ },
2904
+ styles: {
2905
+ type: "outlined",
2906
+ rounded: false,
2907
+ borderColor: "#dae1e7"
2902
2908
  }
2903
2909
  };
2904
2910
  /*!
@@ -18786,6 +18792,15 @@ var ckTr_vue_vue_type_style_index_0_scoped_true_lang = "";
18786
18792
  const _sfc_main$o = {};
18787
18793
  var CkTr = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", render2], ["__scopeId", "data-v-519cf874"]]);
18788
18794
  var functions = {
18795
+ getBorderColorValue(propBorderColor, cleekOptions2) {
18796
+ var _a;
18797
+ if (typeof propBorderColor !== "undefined")
18798
+ return propBorderColor;
18799
+ if (typeof ((_a = cleekOptions2 == null ? void 0 : cleekOptions2.styles) == null ? void 0 : _a.borderColor) !== "undefined") {
18800
+ return cleekOptions2.styles.borderColor;
18801
+ }
18802
+ return "";
18803
+ },
18789
18804
  getCleekOptions(getCurrentInstance2) {
18790
18805
  return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
18791
18806
  },
@@ -18802,6 +18817,17 @@ var functions = {
18802
18817
  classList2.push(`ck-component__group-vertical--${groupVertical}`);
18803
18818
  return classList2;
18804
18819
  },
18820
+ getRoundedValue(propIsRounded, cleekOptions2) {
18821
+ var _a;
18822
+ console.log("propIsRounded", propIsRounded);
18823
+ if (typeof propIsRounded !== "undefined")
18824
+ return propIsRounded;
18825
+ if (typeof ((_a = cleekOptions2 == null ? void 0 : cleekOptions2.styles) == null ? void 0 : _a.rounded) !== "undefined") {
18826
+ console.log("cleekOptions.styles.rounded", cleekOptions2.styles.rounded);
18827
+ return cleekOptions2.styles.rounded;
18828
+ }
18829
+ return false;
18830
+ },
18805
18831
  getWidthByWidthBreaks(widthBreaks, windowWidth) {
18806
18832
  if (widthBreaks) {
18807
18833
  let realWidthBreaks = [...widthBreaks];
@@ -20882,15 +20908,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20882
20908
  const defaultButtonType = "outlined";
20883
20909
  const defaultColor = "primary";
20884
20910
  const defaultAlign = "left";
20885
- let $cleekOptions;
20886
- const isMounted = ref(false);
20911
+ let cleekOptions2;
20887
20912
  const realButtonType = computed$2(() => {
20888
20913
  if (props.type)
20889
20914
  return props.type;
20890
- if (isMounted.value) {
20891
- if ($cleekOptions)
20892
- return $cleekOptions.button.type;
20893
- }
20915
+ if (cleekOptions2)
20916
+ return cleekOptions2.button.type;
20894
20917
  return defaultButtonType;
20895
20918
  });
20896
20919
  const computedClass = computed$2(() => {
@@ -20908,9 +20931,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20908
20931
  if (align === "center" || align === "right") {
20909
20932
  list.push(`ck-button__align--${props.align}`);
20910
20933
  }
20911
- if (props.rounded)
20912
- console.log("rounded");
20913
- if (props.rounded)
20934
+ if (functions.getRoundedValue(props.rounded, cleekOptions2))
20914
20935
  list.push("rounded");
20915
20936
  list.push(`type-${realButtonType.value}`);
20916
20937
  if (props.size)
@@ -20935,8 +20956,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20935
20956
  emits("click", event);
20936
20957
  }
20937
20958
  onMounted(() => {
20938
- $cleekOptions = functions.getCleekOptions(getCurrentInstance);
20939
- isMounted.value = true;
20959
+ cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
20940
20960
  });
20941
20961
  functions.preventUnusedError([
20942
20962
  onClick2,
@@ -20970,7 +20990,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20970
20990
  };
20971
20991
  }
20972
20992
  });
20973
- var CkButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-debd87be"]]);
20993
+ var CkButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-39c8f698"]]);
20974
20994
  var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
20975
20995
  const _hoisted_1$h = ["for"];
20976
20996
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
@@ -21024,6 +21044,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21024
21044
  width: null,
21025
21045
  align: null,
21026
21046
  rounded: { type: Boolean },
21047
+ borderColor: null,
21027
21048
  autoSelect: { type: Boolean },
21028
21049
  delayChangeTime: null
21029
21050
  },
@@ -21031,6 +21052,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21031
21052
  setup(__props, { expose, emit: emits }) {
21032
21053
  const props = __props;
21033
21054
  expose({ setFocus, setSelect });
21055
+ let cleekOptions2;
21034
21056
  const defaultType = "text";
21035
21057
  const defaultDelayChangeTime = 300;
21036
21058
  const realInput = ref(null);
@@ -21074,10 +21096,20 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21074
21096
  list.push(`align--${props.align}`);
21075
21097
  if (props.hideBorder)
21076
21098
  list.push("no-border");
21077
- if (props.rounded)
21099
+ if (functions.getRoundedValue(props.rounded, cleekOptions2))
21078
21100
  list.push("rounded");
21079
21101
  if (props.size)
21080
21102
  list.push(`ck-input-size__${props.size}`);
21103
+ if (props.borderColor && functions.isColorTemplateVariable(props.borderColor)) {
21104
+ list.push(`ck-input--border-color__${props.borderColor}`);
21105
+ }
21106
+ return list;
21107
+ });
21108
+ const computedStyleInput = computed$2(() => {
21109
+ const list = [];
21110
+ if (props.borderColor && !functions.isColorTemplateVariable(props.borderColor)) {
21111
+ list.push({ "border-color": props.borderColor });
21112
+ }
21081
21113
  return list;
21082
21114
  });
21083
21115
  const computedStyle = computed$2(() => {
@@ -21114,6 +21146,9 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21114
21146
  onInput,
21115
21147
  onClick2
21116
21148
  ]);
21149
+ onMounted(() => {
21150
+ cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
21151
+ });
21117
21152
  return (_ctx, _cache) => {
21118
21153
  return openBlock(), createElementBlock("div", {
21119
21154
  class: "ck-input",
@@ -21145,11 +21180,12 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21145
21180
  type: __props.type || defaultType,
21146
21181
  placeholder: __props.placeholder,
21147
21182
  class: normalizeClass(unref$1(computedClassInput)),
21183
+ style: normalizeStyle(unref$1(computedStyleInput)),
21148
21184
  disabled: __props.disabled,
21149
21185
  onChange: _cache[1] || (_cache[1] = ($event) => onChange2($event)),
21150
21186
  onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
21151
21187
  onClick: _cache[3] || (_cache[3] = ($event) => onClick2($event))
21152
- }, null, 42, _hoisted_1$g), [
21188
+ }, null, 46, _hoisted_1$g), [
21153
21189
  [vModelDynamic, unref$1(value)]
21154
21190
  ]),
21155
21191
  __props.iconRight ? (openBlock(), createBlock(CkIcon, {
@@ -21163,7 +21199,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
21163
21199
  };
21164
21200
  }
21165
21201
  });
21166
- var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-30f54a2c"]]);
21202
+ var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-076ee92e"]]);
21167
21203
  var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
21168
21204
  const _hoisted_1$f = { class: "ck-table__header-items" };
21169
21205
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
@@ -22419,7 +22455,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
22419
22455
  };
22420
22456
  }
22421
22457
  });
22422
- var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-2d6fd542"]]);
22458
+ var TableColumnsManager = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-31e8c81c"]]);
22423
22459
  var ckTable_vue_vue_type_style_index_0_lang = "";
22424
22460
  var ckTable_vue_vue_type_style_index_1_scoped_true_lang = "";
22425
22461
  const _hoisted_1$a = { class: "ck-table" };
@@ -22915,6 +22951,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22915
22951
  searchable: { type: [Boolean, String] },
22916
22952
  minWidth: null,
22917
22953
  noBorder: { type: Boolean },
22954
+ rounded: { type: Boolean },
22955
+ borderColor: null,
22918
22956
  bgTransparent: { type: Boolean },
22919
22957
  disabled: { type: Boolean },
22920
22958
  group: null,
@@ -22926,6 +22964,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22926
22964
  emits: ["update:modelValue", "click", "change"],
22927
22965
  setup(__props, { expose, emit: emits }) {
22928
22966
  const props = __props;
22967
+ let cleekOptions2;
22929
22968
  expose({
22930
22969
  setFocus
22931
22970
  });
@@ -22963,8 +23002,25 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
22963
23002
  const computedClassSelect = computed$2(() => {
22964
23003
  const list = [];
22965
23004
  list.push(functions.getGroupClass(props, windowWidth.value));
23005
+ if (functions.getRoundedValue(props.rounded, cleekOptions2))
23006
+ list.push("rounded");
22966
23007
  if (isClearBtnVisible.value)
22967
23008
  list.push("clear-able");
23009
+ const borderColor = functions.getBorderColorValue(props.borderColor, cleekOptions2);
23010
+ if (borderColor && functions.isColorTemplateVariable(borderColor)) {
23011
+ list.push(`ck-input--border-color__${props.borderColor}`);
23012
+ }
23013
+ return list;
23014
+ });
23015
+ const computedStyleSelect = computed$2(() => {
23016
+ const list = [];
23017
+ const borderColor = functions.getBorderColorValue(props.borderColor, cleekOptions2);
23018
+ if (borderColor && functions.isColorTemplateVariable(borderColor)) {
23019
+ list.push(`ck-input--border-color__${props.borderColor}`);
23020
+ }
23021
+ if (props.borderColor && !functions.isColorTemplateVariable(props.borderColor)) {
23022
+ list.push({ "border-color": props.borderColor });
23023
+ }
22968
23024
  return list;
22969
23025
  });
22970
23026
  const computedStyle = computed$2(() => {
@@ -23045,6 +23101,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23045
23101
  }
23046
23102
  function setFocus() {
23047
23103
  }
23104
+ onMounted(() => {
23105
+ cleekOptions2 = functions.getCleekOptions(getCurrentInstance);
23106
+ });
23048
23107
  functions.preventUnusedError([
23049
23108
  computedStyle,
23050
23109
  computedClassSelect,
@@ -23078,6 +23137,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23078
23137
  withDirectives(createElementVNode("select", {
23079
23138
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef$1(value) ? value.value = $event : null),
23080
23139
  class: normalizeClass(unref$1(computedClassSelect)),
23140
+ style: normalizeStyle(unref$1(computedStyleSelect)),
23081
23141
  disabled: __props.disabled,
23082
23142
  onClick: _cache[2] || (_cache[2] = ($event) => onClick2($event)),
23083
23143
  onChange: _cache[3] || (_cache[3] = ($event) => onChange2($event))
@@ -23088,14 +23148,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
23088
23148
  key: option
23089
23149
  }, toDisplayString(getOptionName(option)), 9, _hoisted_2$4);
23090
23150
  }), 128))
23091
- ], 42, _hoisted_1$6), [
23151
+ ], 46, _hoisted_1$6), [
23092
23152
  [vModelSelect, unref$1(value)]
23093
23153
  ])
23094
23154
  ], 4);
23095
23155
  };
23096
23156
  }
23097
23157
  });
23098
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-37612997"]]);
23158
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-67207918"]]);
23099
23159
  var ckSidebar_vue_vue_type_style_index_0_scoped_true_lang = "";
23100
23160
  const _hoisted_1$5 = {
23101
23161
  key: 1,
@@ -23588,8 +23648,8 @@ function setRootColors(colors) {
23588
23648
  }
23589
23649
  }
23590
23650
  function getCleekOptions(userOptions) {
23591
- const options = defaultCleekOptions;
23592
- for (const category in defaultCleekOptions) {
23651
+ const options = cleekOptions;
23652
+ for (const category in cleekOptions) {
23593
23653
  if (userOptions[category]) {
23594
23654
  for (const key in userOptions[category]) {
23595
23655
  const value = userOptions[category][key];
@@ -23599,6 +23659,7 @@ function getCleekOptions(userOptions) {
23599
23659
  }
23600
23660
  }
23601
23661
  setRootColors(options.colors);
23662
+ console.log("finalOptions", options);
23602
23663
  return options;
23603
23664
  }
23604
23665
  const install = function installCleek(app, options) {