cleek 2.6.53 → 2.6.55

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
@@ -89886,8 +89886,8 @@ const _sfc_main$6 = defineComponent$2({
89886
89886
  });
89887
89887
  var ckSidebar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-64161f5d"]]);
89888
89888
  var ckSwitch_vue_vue_type_style_index_0_scoped_true_lang = "";
89889
- const _withScopeId$1 = (n2) => (pushScopeId$2("data-v-1cdc490a"), n2 = n2(), popScopeId$2(), n2);
89890
- const _hoisted_1$5 = ["checked", "disabled"];
89889
+ const _withScopeId$1 = (n2) => (pushScopeId$2("data-v-87080f44"), n2 = n2(), popScopeId$2(), n2);
89890
+ const _hoisted_1$5 = ["disabled"];
89891
89891
  const _hoisted_2$4 = { class: "ck-switch__slider-container" };
89892
89892
  const _hoisted_3$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "ck-switch__slider" }, null, -1));
89893
89893
  const _hoisted_4$2 = {
@@ -89907,7 +89907,7 @@ const _sfc_main$5 = defineComponent$2({
89907
89907
  icon: {},
89908
89908
  iconPack: {}
89909
89909
  },
89910
- emits: ["update:modelValue"],
89910
+ emits: ["update:modelValue", "switchClick"],
89911
89911
  setup(__props, { emit: emits }) {
89912
89912
  const props = __props;
89913
89913
  const value = computed$3({
@@ -89918,7 +89918,6 @@ const _sfc_main$5 = defineComponent$2({
89918
89918
  emits("update:modelValue", val);
89919
89919
  }
89920
89920
  });
89921
- const internalValue = ref$1(false);
89922
89921
  const computedClass = computed$3(() => {
89923
89922
  const list = [];
89924
89923
  if (props.squared)
@@ -89942,23 +89941,30 @@ const _sfc_main$5 = defineComponent$2({
89942
89941
  }
89943
89942
  return list;
89944
89943
  });
89944
+ function handleSwitchClick(e4) {
89945
+ if (props.preventAutoUpdate) {
89946
+ e4.preventDefault();
89947
+ e4.stopPropagation();
89948
+ }
89949
+ emits("switchClick");
89950
+ }
89945
89951
  return (_ctx, _cache) => {
89946
89952
  return openBlock$2(), createElementBlock$2(Fragment$2, null, [
89947
- createTextVNode$2(toDisplayString$1(value.value) + " " + toDisplayString$1(internalValue.value), 1),
89953
+ createTextVNode$2(toDisplayString$1(value.value), 1),
89948
89954
  createElementVNode("label", mergeProps$2({ class: "ck-switch" }, computedAttributes.value, {
89949
89955
  class: computedClass.value,
89950
- onKeydown: _cache[1] || (_cache[1] = withKeys$2(withModifiers$1(() => {
89956
+ onKeydown: _cache[2] || (_cache[2] = withKeys$2(withModifiers$1(() => {
89951
89957
  }, ["prevent"]), ["space"]))
89952
89958
  }), [
89953
89959
  withDirectives$1(createElementVNode("input", {
89954
89960
  class: "ck-switch__input",
89955
89961
  type: "checkbox",
89956
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => internalValue.value = $event),
89957
- checked: value.value,
89962
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
89958
89963
  "aria-hidden": "true",
89959
- disabled: _ctx.disabled
89964
+ disabled: _ctx.disabled,
89965
+ onClick: _cache[1] || (_cache[1] = ($event) => handleSwitchClick($event))
89960
89966
  }, null, 8, _hoisted_1$5), [
89961
- [vModelCheckbox, internalValue.value]
89967
+ [vModelCheckbox, value.value]
89962
89968
  ]),
89963
89969
  createElementVNode("div", _hoisted_2$4, [
89964
89970
  _hoisted_3$2,
@@ -89983,7 +89989,7 @@ const _sfc_main$5 = defineComponent$2({
89983
89989
  };
89984
89990
  }
89985
89991
  });
89986
- var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-1cdc490a"]]);
89992
+ var ckSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-87080f44"]]);
89987
89993
  var ckSwitchOptions_vue_vue_type_style_index_0_scoped_true_lang = "";
89988
89994
  const _hoisted_1$4 = { class: "ck-switch-options__container-exterior" };
89989
89995
  const _hoisted_2$3 = ["onClick"];