cleek 2.3.38 → 2.3.41

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.
@@ -0,0 +1,6 @@
1
+ .ck-inputs--container
2
+ display flex
3
+ align-items flex-end
4
+ flex-wrap wrap
5
+ .ck-inputs--item
6
+ margin-bottom .5rem
package/dist/cleek.es.js CHANGED
@@ -95,7 +95,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
95
95
  };
96
96
  }
97
97
  });
98
- var ckDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-2120e680"]]);
98
+ var ckDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-7e4fff5e"]]);
99
99
  var ckNavbar_vue_vue_type_style_index_0_scoped_true_lang = "";
100
100
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
101
101
  props: {
@@ -16336,20 +16336,10 @@ defineComponent({
16336
16336
  }
16337
16337
  });
16338
16338
  var functions = {
16339
- getGroupClass({ group = "", groupVertical = "", lineBreak = "" } = {}) {
16340
- const classList2 = [];
16341
- if (group)
16342
- classList2.push(`ck-component__group--${group}`);
16343
- if (groupVertical)
16344
- classList2.push(`ck-component__group-vertical--${groupVertical}`);
16345
- if (lineBreak) {
16346
- if (lineBreak === "s") {
16347
- classList2.push(`ck-component__line-break--${lineBreak}`);
16348
- }
16349
- }
16350
- return classList2;
16339
+ getCleekOptions(getCurrentInstance2) {
16340
+ return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
16351
16341
  },
16352
- getGroupClass2({ group = "", groupVertical = "", widthBreaks = [] } = {}, windowWidth) {
16342
+ getGroupClass({ group = "", groupVertical = "", widthBreaks = [] } = {}, windowWidth) {
16353
16343
  const componentWidth = this.getWidthByWidthBreaks(widthBreaks, windowWidth);
16354
16344
  const classList2 = [];
16355
16345
  if (group && componentWidth !== "100%")
@@ -16358,31 +16348,6 @@ var functions = {
16358
16348
  classList2.push(`ck-component__group-vertical--${groupVertical}`);
16359
16349
  return classList2;
16360
16350
  },
16361
- getGroupClassContainer({ lineBreak = "" } = "") {
16362
- const classList2 = [];
16363
- if (lineBreak) {
16364
- if (lineBreak === "s") {
16365
- classList2.push(`ck-component__line-break-container--${lineBreak}`);
16366
- }
16367
- }
16368
- return classList2;
16369
- },
16370
- getlineBreakStyleContainer({ lineBreak } = {}, windowWidth) {
16371
- if (windowWidth <= lineBreak) {
16372
- return [
16373
- { width: "100%" }
16374
- ];
16375
- }
16376
- },
16377
- getlineBreakStyle({ lineBreak } = {}, windowWidth) {
16378
- if (windowWidth <= lineBreak) {
16379
- return [
16380
- { width: "100%" },
16381
- { borderRadius: "4px !important" },
16382
- { border: "1px solid #DAE1E7 !important" }
16383
- ];
16384
- }
16385
- },
16386
16351
  getWidthByWidthBreaks(widthBreaks, windowWidth) {
16387
16352
  if (widthBreaks) {
16388
16353
  let realWidthBreaks = [...widthBreaks];
@@ -16425,9 +16390,6 @@ var functions = {
16425
16390
  return false;
16426
16391
  }
16427
16392
  return true;
16428
- },
16429
- getCleekOptions(getCurrentInstance2) {
16430
- return getCurrentInstance2().appContext.app.config.globalProperties.$cleekOptions;
16431
16393
  }
16432
16394
  };
16433
16395
  var ckIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
@@ -16778,7 +16740,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
16778
16740
  label: { type: String, default: void 0 },
16779
16741
  labelAlign: { type: String, default: void 0 },
16780
16742
  group: { type: String, default: void 0, validator: validators.group },
16781
- lineBreak: { type: [String, Number], default: "" },
16743
+ widthBreaks: { type: Array, default: void 0 },
16782
16744
  groupVertical: { type: String, default: void 0, validator: validators.groupVertical }
16783
16745
  },
16784
16746
  emits: ["click"],
@@ -16798,32 +16760,39 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
16798
16760
  return defaultButtonType;
16799
16761
  });
16800
16762
  const computedClass = computed$2(() => {
16801
- const classList2 = [];
16802
- classList2.push(functions.getGroupClass(props));
16763
+ const list = [];
16764
+ list.push(functions.getGroupClass(props, windowWidth.value));
16803
16765
  if (props.color !== "primary") {
16804
16766
  if (realButtonType.value === "filled") {
16805
- classList2.push(`ck-component__bg-color--${props.color}`);
16767
+ list.push(`ck-component__bg-color--${props.color}`);
16806
16768
  } else {
16807
- classList2.push(`ck-component__border-color--${props.color}`);
16769
+ list.push(`ck-component__border-color--${props.color}`);
16808
16770
  }
16809
16771
  }
16810
16772
  if (props.align === "center" || props.align === "right") {
16811
- classList2.push(`ck-button__align--${props.align}`);
16773
+ list.push(`ck-button__align--${props.align}`);
16812
16774
  }
16813
16775
  if (props.rounded)
16814
16776
  console.log("rounded");
16815
16777
  if (props.rounded)
16816
- classList2.push("rounded");
16817
- classList2.push(`type-${realButtonType.value}`);
16778
+ list.push("rounded");
16779
+ list.push(`type-${realButtonType.value}`);
16818
16780
  if (props.size)
16819
- classList2.push(`ck-button-size__${props.size}`);
16820
- return classList2;
16781
+ list.push(`ck-button-size__${props.size}`);
16782
+ return list;
16821
16783
  });
16822
16784
  const computedStyle = computed$2(() => {
16823
16785
  const list = [];
16824
- if (props.width && !props.lineBreak)
16786
+ let isWidthDefined = false;
16787
+ if (props.widthBreaks) {
16788
+ const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
16789
+ if (width) {
16790
+ isWidthDefined = true;
16791
+ list.push({ width });
16792
+ }
16793
+ }
16794
+ if (props.width && !isWidthDefined)
16825
16795
  list.push({ width: props.width });
16826
- list.push(functions.getlineBreakStyle(props, windowWidth.value));
16827
16796
  return list;
16828
16797
  });
16829
16798
  function onClick(event) {
@@ -16860,7 +16829,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
16860
16829
  };
16861
16830
  }
16862
16831
  });
16863
- var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-4a61847a"]]);
16832
+ var ckButton = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-6555a0e0"]]);
16864
16833
  var ckLabel_vue_vue_type_style_index_0_scoped_true_lang = "";
16865
16834
  const _hoisted_1$f = ["for"];
16866
16835
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
@@ -16908,7 +16877,6 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
16908
16877
  group: { type: String, default: void 0 },
16909
16878
  groupVertical: { type: String, default: void 0 },
16910
16879
  widthBreaks: { type: Array, default: void 0 },
16911
- lineBreak: { type: [String, Number], default: "" },
16912
16880
  size: { type: String, default: "m", validator: validators.size },
16913
16881
  hideBorder: { type: Boolean, default: false },
16914
16882
  width: { type: String, default: void 0 },
@@ -16948,14 +16916,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
16948
16916
  const onChange2 = (event) => {
16949
16917
  emits("change", event);
16950
16918
  };
16951
- const computedClass = computed$2(() => {
16952
- const list = [];
16953
- list.push(functions.getGroupClassContainer(props));
16954
- return list;
16955
- });
16956
16919
  const computedClassInput = computed$2(() => {
16957
16920
  const list = [];
16958
- list.push(functions.getGroupClass2(props, windowWidth.value));
16921
+ list.push(functions.getGroupClass(props, windowWidth.value));
16959
16922
  if (props.icon)
16960
16923
  list.push("has-icon-left");
16961
16924
  if (props.iconRight)
@@ -16972,6 +16935,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
16972
16935
  });
16973
16936
  const computedStyle = computed$2(() => {
16974
16937
  const list = [];
16938
+ list.push({ width: props.width });
16975
16939
  if (props.widthBreaks) {
16976
16940
  const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
16977
16941
  if (width)
@@ -16979,13 +16943,6 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
16979
16943
  }
16980
16944
  return list;
16981
16945
  });
16982
- const computedStyleInput = computed$2(() => {
16983
- const list = [];
16984
- if (props.width || !props.lineBreak)
16985
- list.push({ width: props.width });
16986
- list.push(functions.getlineBreakStyle(props, windowWidth.value));
16987
- return list;
16988
- });
16989
16946
  function setFocus() {
16990
16947
  realInput.value.focus();
16991
16948
  }
@@ -16994,7 +16951,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
16994
16951
  }
16995
16952
  return (_ctx, _cache) => {
16996
16953
  return openBlock(), createElementBlock("div", {
16997
- class: normalizeClass(["ck-input", unref$1(computedClass)]),
16954
+ class: "ck-input",
16998
16955
  style: normalizeStyle(unref$1(computedStyle))
16999
16956
  }, [
17000
16957
  __props.label ? (openBlock(), createBlock(ckLabel, {
@@ -17023,12 +16980,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
17023
16980
  type: __props.type,
17024
16981
  placeholder: __props.placeholder,
17025
16982
  class: normalizeClass(unref$1(computedClassInput)),
17026
- style: normalizeStyle(unref$1(computedStyleInput)),
17027
16983
  disabled: __props.disabled,
17028
16984
  onChange: _cache[1] || (_cache[1] = ($event) => onChange2($event)),
17029
16985
  onInput: _cache[2] || (_cache[2] = ($event) => onInput($event)),
17030
16986
  onClick: _cache[3] || (_cache[3] = ($event) => onClick($event))
17031
- }, null, 46, _hoisted_1$e), [
16987
+ }, null, 42, _hoisted_1$e), [
17032
16988
  [vModelDynamic, unref$1(value)]
17033
16989
  ]),
17034
16990
  __props.iconRight ? (openBlock(), createBlock(ckIcon, {
@@ -17038,11 +16994,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
17038
16994
  icon: __props.iconRight,
17039
16995
  "icon-pack": __props.iconPack
17040
16996
  }, null, 8, ["icon", "icon-pack"])) : createCommentVNode("", true)
17041
- ], 6);
16997
+ ], 4);
17042
16998
  };
17043
16999
  }
17044
17000
  });
17045
- var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-7c0f3064"]]);
17001
+ var ckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-35324670"]]);
17046
17002
  var ckTable__headerItems_vue_vue_type_style_index_0_scoped_true_lang = "";
17047
17003
  const _hoisted_1$d = { class: "ck-table__header-items" };
17048
17004
  const _sfc_main$e = /* @__PURE__ */ defineComponent({
@@ -18138,7 +18094,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
18138
18094
  notClose: { type: Boolean, default: false },
18139
18095
  notCloseBtn: { type: Boolean, default: false },
18140
18096
  notCloseByBg: { type: Boolean, default: false },
18141
- preventCloseOnCancel: { type: Boolean, default: false }
18097
+ preventCloseOnCancel: { type: Boolean, default: false },
18098
+ maxWidth: { type: String, default: void 0 }
18142
18099
  },
18143
18100
  emits: ["update:modelValue", "cancel", "accept"],
18144
18101
  setup(__props, { emit: emits }) {
@@ -18151,6 +18108,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
18151
18108
  emits("update:modelValue", val);
18152
18109
  }
18153
18110
  });
18111
+ const computedStyleContent = computed$2(() => {
18112
+ const list = [];
18113
+ if (props.maxWidth)
18114
+ list.push({ maxWidth: props.maxWidth });
18115
+ return list;
18116
+ });
18154
18117
  function onCancel() {
18155
18118
  emits("cancel");
18156
18119
  if (!props.preventCloseOnCancel)
@@ -18174,7 +18137,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
18174
18137
  createElementVNode("div", {
18175
18138
  class: "ck-popup__content",
18176
18139
  onClick: _cache[3] || (_cache[3] = withModifiers(() => {
18177
- }, ["stop"]))
18140
+ }, ["stop"])),
18141
+ style: normalizeStyle(unref$1(computedStyleContent))
18178
18142
  }, [
18179
18143
  createElementVNode("div", _hoisted_3$3, [
18180
18144
  __props.title ? (openBlock(), createElementBlock("h3", _hoisted_4$3, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
@@ -18213,7 +18177,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
18213
18177
  })
18214
18178
  ])) : createCommentVNode("", true)
18215
18179
  ])) : createCommentVNode("", true)
18216
- ])
18180
+ ], 4)
18217
18181
  ])
18218
18182
  ])) : createCommentVNode("", true);
18219
18183
  };
@@ -18797,6 +18761,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
18797
18761
  }
18798
18762
  });
18799
18763
  var ckChip = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-1e92de86"]]);
18764
+ var ckDiv_vue_vue_type_style_index_0_lang = "";
18800
18765
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
18801
18766
  props: {
18802
18767
  widthBreaks: { type: Array, default: void 0 }
@@ -19030,7 +18995,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19030
18995
  bgTransparent: { type: Boolean, default: false },
19031
18996
  disabled: { type: [Boolean, Number], default: false },
19032
18997
  group: { type: String, default: "" },
19033
- lineBreak: { type: [String, Number], default: "" },
18998
+ widthBreaks: { type: Array, default: void 0 },
19034
18999
  groupVertical: { type: String, default: "" },
19035
19000
  label: { type: String, default: "" },
19036
19001
  labelAlign: { type: String, default: "" }
@@ -19063,25 +19028,23 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19063
19028
  return list;
19064
19029
  });
19065
19030
  const computedClassSelect = computed$2(() => {
19066
- const classList2 = [];
19067
- classList2.push(functions.getGroupClass(props));
19068
- return classList2;
19069
- });
19070
- const computedStyleSelect = computed$2(() => {
19071
19031
  const list = [];
19072
- list.push(functions.getlineBreakStyle(props, windowWidth.value));
19032
+ list.push(functions.getGroupClass(props, windowWidth.value));
19073
19033
  return list;
19074
19034
  });
19075
- const computedClass = computed$2(() => {
19076
- const classList2 = [];
19077
- classList2.push(functions.getGroupClassContainer(props));
19078
- return classList2;
19079
- });
19080
19035
  const computedStyle = computed$2(() => {
19081
19036
  const list = [];
19082
- if (props.minWidth)
19037
+ let isWidthDefined = false;
19038
+ if (props.widthBreaks) {
19039
+ const width = functions.getWidthByWidthBreaks(props.widthBreaks, windowWidth.value);
19040
+ if (width) {
19041
+ list.push({ width });
19042
+ isWidthDefined = true;
19043
+ }
19044
+ }
19045
+ if (!isWidthDefined && props.minWidth) {
19083
19046
  list.push({ "min-width": props.minWidth });
19084
- list.push(functions.getlineBreakStyleContainer(props, windowWidth.value));
19047
+ }
19085
19048
  return list;
19086
19049
  });
19087
19050
  computed$2(() => {
@@ -19146,7 +19109,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19146
19109
  }
19147
19110
  return (_ctx, _cache) => {
19148
19111
  return openBlock(), createElementBlock("div", {
19149
- class: normalizeClass(["ck-select", unref$1(computedClass)]),
19112
+ class: "ck-select",
19150
19113
  style: normalizeStyle(unref$1(computedStyle))
19151
19114
  }, [
19152
19115
  __props.label ? (openBlock(), createBlock(ckLabel, {
@@ -19162,7 +19125,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19162
19125
  withDirectives(createElementVNode("select", {
19163
19126
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(value) ? value.value = $event : null),
19164
19127
  class: normalizeClass(unref$1(computedClassSelect)),
19165
- style: normalizeStyle(unref$1(computedStyleSelect)),
19166
19128
  onClick: _cache[1] || (_cache[1] = ($event) => onClick($event)),
19167
19129
  onChange: _cache[2] || (_cache[2] = ($event) => onChange2($event))
19168
19130
  }, [
@@ -19172,14 +19134,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
19172
19134
  key: option
19173
19135
  }, toDisplayString(getOptionName(option)), 9, _hoisted_1$4);
19174
19136
  }), 128))
19175
- ], 38), [
19137
+ ], 34), [
19176
19138
  [vModelSelect, unref$1(value)]
19177
19139
  ])
19178
- ], 6);
19140
+ ], 4);
19179
19141
  };
19180
19142
  }
19181
19143
  });
19182
- var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-fa28183e"]]);
19144
+ var ckSelect = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-93db8c36"]]);
19183
19145
  var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
19184
19146
  const _withScopeId = (n) => (pushScopeId("data-v-7e2f20c4"), n = n(), popScopeId(), n);
19185
19147
  const _hoisted_1$3 = ["disabled"];
@@ -19294,13 +19256,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
19294
19256
  label: { type: String, default: "" },
19295
19257
  labelAlign: { type: String, default: "" },
19296
19258
  group: { type: String, default: "" },
19297
- lineBreak: { type: [String, Number], default: "" },
19259
+ widthBreaks: { type: Array, default: void 0 },
19298
19260
  groupVertical: { type: String, default: "" },
19299
19261
  sameWidthOptions: { type: Boolean, default: false }
19300
19262
  },
19301
19263
  emits: ["update:modelValue", "change"],
19302
19264
  setup(__props, { emit: emits }) {
19303
19265
  const props = __props;
19266
+ const { windowWidth } = useWindowWidth();
19304
19267
  const selectedOption = computed$2({
19305
19268
  get() {
19306
19269
  return props.modelValue;
@@ -19311,9 +19274,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
19311
19274
  }
19312
19275
  });
19313
19276
  const computedClass = computed$2(() => {
19314
- const classList2 = [];
19315
- classList2.push(functions.getGroupClass(props));
19316
- return classList2;
19277
+ const list = [];
19278
+ list.push(functions.getGroupClass(props, windowWidth.value));
19279
+ return list;
19317
19280
  });
19318
19281
  const computedItemStyle = computed$2(() => {
19319
19282
  const list = [];
@@ -19353,7 +19316,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
19353
19316
  };
19354
19317
  }
19355
19318
  });
19356
- var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-55ea866f"]]);
19319
+ var ckSwitchOptions = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f200edc8"]]);
19357
19320
  var ckTextarea_vue_vue_type_style_index_0_scoped_true_lang = "";
19358
19321
  const _hoisted_1$1 = { class: "ck-textarea" };
19359
19322
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({