cleek 2.7.5 → 2.7.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
@@ -82908,6 +82908,8 @@ var ckInput_vue_vue_type_style_index_0_scoped_true_lang = "";
82908
82908
  const _hoisted_1$i = ["autocomplete", "placeholder", "disabled"];
82909
82909
  const _hoisted_2$c = ["autocomplete", "type", "placeholder", "disabled"];
82910
82910
  const defaultType = "text";
82911
+ const plusMinusButtonsDefaultWithInput = "120px";
82912
+ const plusMinusButtonsDefaultAlign = "center";
82911
82913
  const defaultDelayChangeTime$1 = 300;
82912
82914
  const _sfc_main$n = defineComponent$2({
82913
82915
  __name: "ck-input",
@@ -82917,6 +82919,9 @@ const _sfc_main$n = defineComponent$2({
82917
82919
  autocomplete: { type: Boolean },
82918
82920
  disabled: { type: Boolean },
82919
82921
  placeholder: {},
82922
+ plusMinusButtons: { type: Boolean },
82923
+ min: {},
82924
+ max: {},
82920
82925
  label: {},
82921
82926
  labelAlign: {},
82922
82927
  icon: {},
@@ -82957,6 +82962,10 @@ const _sfc_main$n = defineComponent$2({
82957
82962
  val = qmStr.capitalize(`${val}`);
82958
82963
  if (props.justInteger)
82959
82964
  val = parseInt(`${+val}`);
82965
+ if (props.min && +val < +props.min)
82966
+ val = +props.min;
82967
+ if (props.max && +val > +props.max)
82968
+ val = +props.max;
82960
82969
  emits("update:modelValue", val);
82961
82970
  checkSearchTime(val);
82962
82971
  }
@@ -82966,6 +82975,8 @@ const _sfc_main$n = defineComponent$2({
82966
82975
  return props.labelAlign;
82967
82976
  if (props.align)
82968
82977
  return props.align;
82978
+ if (props.plusMinusButtons)
82979
+ return plusMinusButtonsDefaultAlign;
82969
82980
  return "left";
82970
82981
  });
82971
82982
  const onClick = (event) => {
@@ -82988,8 +82999,11 @@ const _sfc_main$n = defineComponent$2({
82988
82999
  list.push("has-icon-left");
82989
83000
  if (props.iconRight)
82990
83001
  list.push("has-icon-right");
82991
- if (props.align)
82992
- list.push(`align--${props.align}`);
83002
+ let align = props.align;
83003
+ if (props.plusMinusButtons)
83004
+ align = plusMinusButtonsDefaultAlign;
83005
+ if (align)
83006
+ list.push(`align--${align}`);
82993
83007
  if (props.hideBorder)
82994
83008
  list.push("no-border");
82995
83009
  const layout = props.layout || ((_a = cleekOptions2.value) == null ? void 0 : _a.styles.layout);
@@ -83033,11 +83047,17 @@ const _sfc_main$n = defineComponent$2({
83033
83047
  });
83034
83048
  const computedStyle = computed$3(() => {
83035
83049
  const list = [];
83036
- list.push({ width: props.width });
83050
+ let width = "";
83051
+ if (props.width)
83052
+ width = props.width;
83053
+ if (props.plusMinusButtons)
83054
+ width = plusMinusButtonsDefaultWithInput;
83055
+ if (width)
83056
+ list.push({ width });
83037
83057
  if (props.widthBreaks) {
83038
- const width = hooks9.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
83039
- if (width)
83040
- list.push({ width });
83058
+ const width2 = hooks9.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
83059
+ if (width2)
83060
+ list.push({ width: width2 });
83041
83061
  }
83042
83062
  return list;
83043
83063
  });
@@ -83063,6 +83083,7 @@ const _sfc_main$n = defineComponent$2({
83063
83083
  });
83064
83084
  return (_ctx, _cache) => {
83065
83085
  var _a;
83086
+ const _component_ck_button = resolveComponent$2("ck-button");
83066
83087
  return openBlock$2(), createElementBlock$2("div", {
83067
83088
  class: "ck-input",
83068
83089
  style: normalizeStyle$2(computedStyle.value)
@@ -83083,11 +83104,21 @@ const _sfc_main$n = defineComponent$2({
83083
83104
  class: "ck-input__icon-left",
83084
83105
  color: _ctx.iconColor ? _ctx.iconColor : "lightgrey",
83085
83106
  icon: _ctx.icon,
83086
- "icon-pack": _ctx.iconPack
83107
+ "icon-pack": _ctx.iconPack,
83108
+ size: "s"
83087
83109
  }, null, 8, ["color", "icon", "icon-pack"])) : createCommentVNode$2("", true),
83088
- isShowingPassword.value ? withDirectives$1((openBlock$2(), createElementBlock$2("input", {
83110
+ _ctx.plusMinusButtons ? (openBlock$2(), createBlock$2(_component_ck_button, {
83089
83111
  key: 2,
83090
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
83112
+ size: "s",
83113
+ icon: "minus",
83114
+ group: "left",
83115
+ type: "filled",
83116
+ class: "ck-input-plus-minus-buttons",
83117
+ onClick: _cache[0] || (_cache[0] = ($event) => value.value = +value.value - 1)
83118
+ })) : createCommentVNode$2("", true),
83119
+ isShowingPassword.value ? withDirectives$1((openBlock$2(), createElementBlock$2("input", {
83120
+ key: 3,
83121
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event),
83091
83122
  ref_key: "realInput",
83092
83123
  ref: realInput,
83093
83124
  type: "text",
@@ -83096,16 +83127,16 @@ const _sfc_main$n = defineComponent$2({
83096
83127
  class: normalizeClass$2(computedClassInput.value),
83097
83128
  style: normalizeStyle$2(computedStyleInput.value),
83098
83129
  disabled: _ctx.disabled,
83099
- onChange: _cache[1] || (_cache[1] = ($event) => onChange2($event)),
83100
- onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
83101
- onClick: _cache[3] || (_cache[3] = ($event) => onClick($event)),
83102
- onFocus: _cache[4] || (_cache[4] = ($event) => emits("focus", $event)),
83103
- onBlur: _cache[5] || (_cache[5] = ($event) => emits("blur", $event))
83130
+ onChange: _cache[2] || (_cache[2] = ($event) => onChange2($event)),
83131
+ onInput: _cache[3] || (_cache[3] = ($event) => onInput($event)),
83132
+ onClick: _cache[4] || (_cache[4] = ($event) => onClick($event)),
83133
+ onFocus: _cache[5] || (_cache[5] = ($event) => emits("focus", $event)),
83134
+ onBlur: _cache[6] || (_cache[6] = ($event) => emits("blur", $event))
83104
83135
  }, null, 46, _hoisted_1$i)), [
83105
83136
  [vModelText, value.value]
83106
83137
  ]) : withDirectives$1((openBlock$2(), createElementBlock$2("input", {
83107
- key: 3,
83108
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => value.value = $event),
83138
+ key: 4,
83139
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => value.value = $event),
83109
83140
  ref_key: "realInput",
83110
83141
  ref: realInput,
83111
83142
  autocomplete: _ctx.autocomplete ? "on" : "off",
@@ -83114,35 +83145,44 @@ const _sfc_main$n = defineComponent$2({
83114
83145
  class: normalizeClass$2(computedClassInput.value),
83115
83146
  style: normalizeStyle$2(computedStyleInput.value),
83116
83147
  disabled: _ctx.disabled,
83117
- onChange: _cache[7] || (_cache[7] = ($event) => onChange2($event)),
83118
- onInput: _cache[8] || (_cache[8] = ($event) => onInput($event)),
83119
- onClick: _cache[9] || (_cache[9] = ($event) => onClick($event)),
83120
- onFocus: _cache[10] || (_cache[10] = ($event) => emits("focus", $event)),
83121
- onBlur: _cache[11] || (_cache[11] = ($event) => emits("blur", $event))
83148
+ onChange: _cache[8] || (_cache[8] = ($event) => onChange2($event)),
83149
+ onInput: _cache[9] || (_cache[9] = ($event) => onInput($event)),
83150
+ onClick: _cache[10] || (_cache[10] = ($event) => onClick($event)),
83151
+ onFocus: _cache[11] || (_cache[11] = ($event) => emits("focus", $event)),
83152
+ onBlur: _cache[12] || (_cache[12] = ($event) => emits("blur", $event))
83122
83153
  }, null, 46, _hoisted_2$c)), [
83123
83154
  [vModelDynamic, value.value]
83124
83155
  ]),
83125
83156
  _ctx.type === "password" ? (openBlock$2(), createElementBlock$2("div", {
83126
- key: 4,
83157
+ key: 5,
83127
83158
  class: normalizeClass$2(["show-password", _ctx.layout || ((_a = unref$3(cleekOptions2)) == null ? void 0 : _a.styles.layout)]),
83128
- onClick: _cache[12] || (_cache[12] = ($event) => isShowingPassword.value = !isShowingPassword.value)
83159
+ onClick: _cache[13] || (_cache[13] = ($event) => isShowingPassword.value = !isShowingPassword.value)
83129
83160
  }, [
83130
83161
  createVNode$2(CkIcon, {
83131
83162
  icon: isShowingPassword.value ? "eye-slash" : "eye"
83132
83163
  }, null, 8, ["icon"])
83133
83164
  ], 2)) : createCommentVNode$2("", true),
83134
83165
  _ctx.iconRight && _ctx.type !== "password" ? (openBlock$2(), createBlock$2(CkIcon, {
83135
- key: 5,
83166
+ key: 6,
83136
83167
  class: "ck-input__icon-right",
83137
83168
  color: _ctx.iconColor ? _ctx.iconColor : "lightgrey",
83138
83169
  icon: _ctx.iconRight,
83139
83170
  "icon-pack": _ctx.iconPack
83140
- }, null, 8, ["color", "icon", "icon-pack"])) : createCommentVNode$2("", true)
83171
+ }, null, 8, ["color", "icon", "icon-pack"])) : createCommentVNode$2("", true),
83172
+ _ctx.plusMinusButtons ? (openBlock$2(), createBlock$2(_component_ck_button, {
83173
+ key: 7,
83174
+ size: "s",
83175
+ icon: "plus",
83176
+ group: "right",
83177
+ type: "filled",
83178
+ class: "ck-input-plus-minus-buttons",
83179
+ onClick: _cache[14] || (_cache[14] = ($event) => value.value = +value.value + 1)
83180
+ })) : createCommentVNode$2("", true)
83141
83181
  ], 4);
83142
83182
  };
83143
83183
  }
83144
83184
  });
83145
- var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-4fa8d186"]]);
83185
+ var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-b58d67ca"]]);
83146
83186
  var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
83147
83187
  const _sfc_main$m = defineComponent$2({
83148
83188
  __name: "ck-table__header-items",