cleek 2.4.3 → 2.4.4

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
@@ -23459,10 +23459,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23459
23459
  const title = ref("");
23460
23460
  const text2 = ref("");
23461
23461
  const color = ref("");
23462
+ const duration = ref(0);
23463
+ const closeCallback = ref(() => {
23464
+ });
23462
23465
  expose({
23463
23466
  title,
23464
23467
  text: text2,
23465
- color
23468
+ color,
23469
+ duration,
23470
+ closeCallback
23471
+ });
23472
+ onMounted(() => {
23473
+ setTimeout(() => {
23474
+ closeCallback.value();
23475
+ }, duration.value);
23466
23476
  });
23467
23477
  return (_ctx, _cache) => {
23468
23478
  return isActive.value ? (openBlock(), createBlock(Teleport, {
@@ -23473,7 +23483,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23473
23483
  createElementVNode("div", {
23474
23484
  class: "ck-notify",
23475
23485
  style: normalizeStyle({ "background-color": color.value }),
23476
- onClick: _cache[0] || (_cache[0] = ($event) => isActive.value = false)
23486
+ onClick: _cache[0] || (_cache[0] = ($event) => {
23487
+ isActive.value = false;
23488
+ closeCallback.value();
23489
+ })
23477
23490
  }, [
23478
23491
  createElementVNode("div", _hoisted_2, [
23479
23492
  createElementVNode("div", _hoisted_3, [
@@ -23488,7 +23501,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23488
23501
  };
23489
23502
  }
23490
23503
  });
23491
- var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4ee137ee"]]);
23504
+ var CkNotifyComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-667c806b"]]);
23492
23505
  const defaultDuration = 2e3;
23493
23506
  var ckNotify = {
23494
23507
  confirm({
@@ -23523,11 +23536,10 @@ var ckNotify = {
23523
23536
  instance.title = title;
23524
23537
  instance.text = text2;
23525
23538
  instance.color = color;
23526
- console.log("duration", duration);
23527
- setTimeout(() => {
23528
- console.log("cierro");
23539
+ instance.duration = duration;
23540
+ instance.closeCallback = () => {
23529
23541
  instance.$el.remove();
23530
- }, duration);
23542
+ };
23531
23543
  },
23532
23544
  notifySuccess(text2 = "", title = "\xC9xito") {
23533
23545
  this.notify({ text: text2, title, color: "#66CC00" });