adverich-kun-ui 0.1.258 → 0.1.259

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.
@@ -1,10 +1,11 @@
1
- import { defineComponent as x, watch as C, onMounted as f, onBeforeUnmount as S, onUnmounted as k, createBlock as u, openBlock as o, Teleport as P, createVNode as a, Transition as m, withCtx as n, createElementBlock as B, createCommentVNode as y, mergeProps as V, renderSlot as E } from "vue";
1
+ import { defineComponent as C, watch as x, onMounted as u, onBeforeUnmount as S, onUnmounted as k, createBlock as f, openBlock as o, Teleport as B, createVNode as a, Transition as m, withCtx as n, createElementBlock as P, createCommentVNode as y, mergeProps as V, renderSlot as E } from "vue";
2
2
  import W from "./KunDialogOverlay.vue.js";
3
3
  import $ from "./KunDialogContent.vue.js";
4
- const D = "fixed inset-0 z-250 flex", T = /* @__PURE__ */ x({
4
+ const D = "fixed inset-0 z-250 flex", N = /* @__PURE__ */ C({
5
5
  __name: "KunDialog",
6
6
  props: {
7
7
  modelValue: Boolean,
8
+ teleport: { type: Boolean, default: !0 },
8
9
  overlay: { type: Boolean, default: !0 },
9
10
  fullscreen: { type: Boolean, default: !1 },
10
11
  scrollable: { type: Boolean, default: !1 },
@@ -32,18 +33,18 @@ const D = "fixed inset-0 z-250 flex", T = /* @__PURE__ */ x({
32
33
  },
33
34
  emits: ["update:modelValue"],
34
35
  setup(e, { emit: h }) {
35
- const t = e, i = h, g = "justify-" + t.xPosition, p = "items-" + t.yPosition, w = t.yPosition === "top" ? "pt-15" : t.yPosition === "bottom" ? "pb-15" : "", b = [D, t.dialogClass, g, p, w], s = () => {
36
+ const t = e, i = h, g = "justify-" + t.xPosition, p = "items-" + t.yPosition, w = t.yPosition === "top" ? "pt-15" : t.yPosition === "bottom" ? "pb-15" : "", v = [D, t.dialogClass, g, p, w], s = () => {
36
37
  t.persistent || i("update:modelValue", !1);
37
- }, v = () => {
38
+ }, b = () => {
38
39
  s();
39
40
  }, r = () => {
40
41
  document.body.style.overflow = "hidden";
41
42
  }, d = () => {
42
43
  document.body.style.overflow = "";
43
44
  };
44
- C(() => t.modelValue, (l) => {
45
+ x(() => t.modelValue, (l) => {
45
46
  l && !t.fullscreen ? r() : d();
46
- }), f(() => {
47
+ }), u(() => {
47
48
  t.modelValue && !t.fullscreen && r();
48
49
  }), S(() => {
49
50
  d();
@@ -51,24 +52,27 @@ const D = "fixed inset-0 z-250 flex", T = /* @__PURE__ */ x({
51
52
  function c(l) {
52
53
  l.stopPropagation(), l.key === "Escape" && (t.persistent || i("update:modelValue", !1));
53
54
  }
54
- return f(() => {
55
+ return u(() => {
55
56
  window.addEventListener("keydown", c);
56
57
  }), k(() => {
57
58
  window.removeEventListener("keydown", c);
58
- }), (l, H) => (o(), u(P, { to: "body" }, [
59
+ }), (l, T) => (o(), f(B, {
60
+ is: e.teleport ? l.Teleport : "div",
61
+ to: e.teleport ? "body" : void 0
62
+ }, [
59
63
  a(m, {
60
64
  name: "fade",
61
65
  appear: ""
62
66
  }, {
63
67
  default: n(() => [
64
- e.modelValue ? (o(), B("div", V({
68
+ e.modelValue ? (o(), P("div", V({
65
69
  key: 0,
66
- class: b
70
+ class: v
67
71
  }, l.$attrs), [
68
- e.overlay ? (o(), u(W, {
72
+ e.overlay ? (o(), f(W, {
69
73
  key: 0,
70
74
  persistent: e.persistent,
71
- onClick: v
75
+ onClick: b
72
76
  }, null, 8, ["persistent"])) : y("", !0),
73
77
  a(m, {
74
78
  name: "scale",
@@ -104,9 +108,9 @@ const D = "fixed inset-0 z-250 flex", T = /* @__PURE__ */ x({
104
108
  ]),
105
109
  _: 3
106
110
  })
107
- ]));
111
+ ], 8, ["is", "to"]));
108
112
  }
109
113
  });
110
114
  export {
111
- T as default
115
+ N as default
112
116
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.258",
3
+ "version": "0.1.259",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",