cleek 2.7.4 → 2.7.6

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,7 @@ const _sfc_main$n = defineComponent$2({
82917
82919
  autocomplete: { type: Boolean },
82918
82920
  disabled: { type: Boolean },
82919
82921
  placeholder: {},
82922
+ plusMinusButtons: { type: Boolean },
82920
82923
  label: {},
82921
82924
  labelAlign: {},
82922
82925
  icon: {},
@@ -82966,6 +82969,8 @@ const _sfc_main$n = defineComponent$2({
82966
82969
  return props.labelAlign;
82967
82970
  if (props.align)
82968
82971
  return props.align;
82972
+ if (props.plusMinusButtons)
82973
+ return plusMinusButtonsDefaultAlign;
82969
82974
  return "left";
82970
82975
  });
82971
82976
  const onClick = (event) => {
@@ -82988,8 +82993,11 @@ const _sfc_main$n = defineComponent$2({
82988
82993
  list.push("has-icon-left");
82989
82994
  if (props.iconRight)
82990
82995
  list.push("has-icon-right");
82991
- if (props.align)
82992
- list.push(`align--${props.align}`);
82996
+ let align = props.align;
82997
+ if (props.plusMinusButtons)
82998
+ align = plusMinusButtonsDefaultAlign;
82999
+ if (align)
83000
+ list.push(`align--${align}`);
82993
83001
  if (props.hideBorder)
82994
83002
  list.push("no-border");
82995
83003
  const layout = props.layout || ((_a = cleekOptions2.value) == null ? void 0 : _a.styles.layout);
@@ -83033,11 +83041,17 @@ const _sfc_main$n = defineComponent$2({
83033
83041
  });
83034
83042
  const computedStyle = computed$3(() => {
83035
83043
  const list = [];
83036
- list.push({ width: props.width });
83044
+ let width = "";
83045
+ if (props.width)
83046
+ width = props.width;
83047
+ if (props.plusMinusButtons)
83048
+ width = plusMinusButtonsDefaultWithInput;
83049
+ if (width)
83050
+ list.push({ width });
83037
83051
  if (props.widthBreaks) {
83038
- const width = hooks9.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
83039
- if (width)
83040
- list.push({ width });
83052
+ const width2 = hooks9.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
83053
+ if (width2)
83054
+ list.push({ width: width2 });
83041
83055
  }
83042
83056
  return list;
83043
83057
  });
@@ -83063,6 +83077,7 @@ const _sfc_main$n = defineComponent$2({
83063
83077
  });
83064
83078
  return (_ctx, _cache) => {
83065
83079
  var _a;
83080
+ const _component_ck_button = resolveComponent$2("ck-button");
83066
83081
  return openBlock$2(), createElementBlock$2("div", {
83067
83082
  class: "ck-input",
83068
83083
  style: normalizeStyle$2(computedStyle.value)
@@ -83083,11 +83098,21 @@ const _sfc_main$n = defineComponent$2({
83083
83098
  class: "ck-input__icon-left",
83084
83099
  color: _ctx.iconColor ? _ctx.iconColor : "lightgrey",
83085
83100
  icon: _ctx.icon,
83086
- "icon-pack": _ctx.iconPack
83101
+ "icon-pack": _ctx.iconPack,
83102
+ size: "s"
83087
83103
  }, null, 8, ["color", "icon", "icon-pack"])) : createCommentVNode$2("", true),
83088
- isShowingPassword.value ? withDirectives$1((openBlock$2(), createElementBlock$2("input", {
83104
+ _ctx.plusMinusButtons ? (openBlock$2(), createBlock$2(_component_ck_button, {
83089
83105
  key: 2,
83090
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
83106
+ size: "s",
83107
+ icon: "minus",
83108
+ group: "left",
83109
+ type: "filled",
83110
+ class: "ck-input-plus-minus-buttons",
83111
+ onClick: _cache[0] || (_cache[0] = ($event) => value.value = +value.value - 1)
83112
+ })) : createCommentVNode$2("", true),
83113
+ isShowingPassword.value ? withDirectives$1((openBlock$2(), createElementBlock$2("input", {
83114
+ key: 3,
83115
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => value.value = $event),
83091
83116
  ref_key: "realInput",
83092
83117
  ref: realInput,
83093
83118
  type: "text",
@@ -83096,16 +83121,16 @@ const _sfc_main$n = defineComponent$2({
83096
83121
  class: normalizeClass$2(computedClassInput.value),
83097
83122
  style: normalizeStyle$2(computedStyleInput.value),
83098
83123
  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))
83124
+ onChange: _cache[2] || (_cache[2] = ($event) => onChange2($event)),
83125
+ onInput: _cache[3] || (_cache[3] = ($event) => onInput($event)),
83126
+ onClick: _cache[4] || (_cache[4] = ($event) => onClick($event)),
83127
+ onFocus: _cache[5] || (_cache[5] = ($event) => emits("focus", $event)),
83128
+ onBlur: _cache[6] || (_cache[6] = ($event) => emits("blur", $event))
83104
83129
  }, null, 46, _hoisted_1$i)), [
83105
83130
  [vModelText, value.value]
83106
83131
  ]) : withDirectives$1((openBlock$2(), createElementBlock$2("input", {
83107
- key: 3,
83108
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => value.value = $event),
83132
+ key: 4,
83133
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => value.value = $event),
83109
83134
  ref_key: "realInput",
83110
83135
  ref: realInput,
83111
83136
  autocomplete: _ctx.autocomplete ? "on" : "off",
@@ -83114,35 +83139,44 @@ const _sfc_main$n = defineComponent$2({
83114
83139
  class: normalizeClass$2(computedClassInput.value),
83115
83140
  style: normalizeStyle$2(computedStyleInput.value),
83116
83141
  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))
83142
+ onChange: _cache[8] || (_cache[8] = ($event) => onChange2($event)),
83143
+ onInput: _cache[9] || (_cache[9] = ($event) => onInput($event)),
83144
+ onClick: _cache[10] || (_cache[10] = ($event) => onClick($event)),
83145
+ onFocus: _cache[11] || (_cache[11] = ($event) => emits("focus", $event)),
83146
+ onBlur: _cache[12] || (_cache[12] = ($event) => emits("blur", $event))
83122
83147
  }, null, 46, _hoisted_2$c)), [
83123
83148
  [vModelDynamic, value.value]
83124
83149
  ]),
83125
83150
  _ctx.type === "password" ? (openBlock$2(), createElementBlock$2("div", {
83126
- key: 4,
83151
+ key: 5,
83127
83152
  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)
83153
+ onClick: _cache[13] || (_cache[13] = ($event) => isShowingPassword.value = !isShowingPassword.value)
83129
83154
  }, [
83130
83155
  createVNode$2(CkIcon, {
83131
83156
  icon: isShowingPassword.value ? "eye-slash" : "eye"
83132
83157
  }, null, 8, ["icon"])
83133
83158
  ], 2)) : createCommentVNode$2("", true),
83134
83159
  _ctx.iconRight && _ctx.type !== "password" ? (openBlock$2(), createBlock$2(CkIcon, {
83135
- key: 5,
83160
+ key: 6,
83136
83161
  class: "ck-input__icon-right",
83137
83162
  color: _ctx.iconColor ? _ctx.iconColor : "lightgrey",
83138
83163
  icon: _ctx.iconRight,
83139
83164
  "icon-pack": _ctx.iconPack
83140
- }, null, 8, ["color", "icon", "icon-pack"])) : createCommentVNode$2("", true)
83165
+ }, null, 8, ["color", "icon", "icon-pack"])) : createCommentVNode$2("", true),
83166
+ _ctx.plusMinusButtons ? (openBlock$2(), createBlock$2(_component_ck_button, {
83167
+ key: 7,
83168
+ size: "s",
83169
+ icon: "plus",
83170
+ group: "right",
83171
+ type: "filled",
83172
+ class: "ck-input-plus-minus-buttons",
83173
+ onClick: _cache[14] || (_cache[14] = ($event) => value.value = +value.value + 1)
83174
+ })) : createCommentVNode$2("", true)
83141
83175
  ], 4);
83142
83176
  };
83143
83177
  }
83144
83178
  });
83145
- var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-4fa8d186"]]);
83179
+ var CkInput = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-2c7bddb9"]]);
83146
83180
  var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
83147
83181
  const _sfc_main$m = defineComponent$2({
83148
83182
  __name: "ck-table__header-items",
@@ -90465,7 +90499,6 @@ const _sfc_main$7 = defineComponent$2({
90465
90499
  class: normalizeClass$2(["ck-select", computedClass.value]),
90466
90500
  style: normalizeStyle$2(computedStyle.value)
90467
90501
  }, [
90468
- createTextVNode$2(" valueIsDefault " + toDisplayString$1(valueIsDefault.value) + " ", 1),
90469
90502
  _ctx.icon ? (openBlock$2(), createBlock$2(CkIcon, {
90470
90503
  key: 0,
90471
90504
  class: "ck-select__icon-left",
@@ -90519,7 +90552,7 @@ const _sfc_main$7 = defineComponent$2({
90519
90552
  };
90520
90553
  }
90521
90554
  });
90522
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-1b63c4b8"]]);
90555
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-2d01c17a"]]);
90523
90556
  var ckSidebar_vue_vue_type_style_index_0_scoped_true_lang = "";
90524
90557
  const _hoisted_1$6 = {
90525
90558
  key: 0,