adverich-kun-ui 0.1.133 → 0.1.134
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,4 +1,4 @@
|
|
|
1
|
-
import { computed as l, createElementBlock as
|
|
1
|
+
import { computed as l, createElementBlock as m, createCommentVNode as c, openBlock as p, mergeProps as f, createElementVNode as t, toDisplayString as h } from "vue";
|
|
2
2
|
const b = { class: "flex items-center justify-between" }, w = { class: "text-sm font-medium" }, v = {
|
|
3
3
|
__name: "KunModalFooter",
|
|
4
4
|
props: {
|
|
@@ -36,11 +36,11 @@ const b = { class: "flex items-center justify-between" }, w = { class: "text-sm
|
|
|
36
36
|
},
|
|
37
37
|
emits: ["update:modelValue", "removeMessage"],
|
|
38
38
|
setup(o, { emit: n }) {
|
|
39
|
-
const e = o,
|
|
40
|
-
function
|
|
41
|
-
|
|
39
|
+
const e = o, s = n;
|
|
40
|
+
function d() {
|
|
41
|
+
s("removeMessage", e.message.id), s("update:modelValue", !1);
|
|
42
42
|
}
|
|
43
|
-
const i = l(() => e.width ? `w-[${e.width}]` : "max-w-[300px]"),
|
|
43
|
+
const i = l(() => e.width ? `w-[${e.width}]` : "max-w-[300px]"), u = l(() => e.height === "auto" ? "" : `h-[${e.height}]`), g = l(() => ({
|
|
44
44
|
blue: "bg-blue-700",
|
|
45
45
|
green: "bg-green-700",
|
|
46
46
|
red: "bg-red-700",
|
|
@@ -48,23 +48,23 @@ const b = { class: "flex items-center justify-between" }, w = { class: "text-sm
|
|
|
48
48
|
gray: "bg-gray-700",
|
|
49
49
|
orange: "bg-amber-700"
|
|
50
50
|
})[e.color] || "bg-blue-700");
|
|
51
|
-
return (
|
|
51
|
+
return (a, r) => o.modelValue ? (p(), m("div", f({
|
|
52
52
|
key: 0,
|
|
53
|
-
class:
|
|
53
|
+
class: [
|
|
54
54
|
o.isFixed ? "fixed" : "",
|
|
55
|
-
"z-[9999] rounded-md shadow-lg
|
|
55
|
+
"z-[9999] rounded-md shadow-lg p-2 transition-all duration-300",
|
|
56
56
|
i.value,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
]
|
|
60
|
-
}, [
|
|
57
|
+
u.value,
|
|
58
|
+
g.value
|
|
59
|
+
]
|
|
60
|
+
}, a.$attrs), [
|
|
61
61
|
t("div", b, [
|
|
62
62
|
t("p", w, h(o.message), 1),
|
|
63
63
|
t("button", {
|
|
64
64
|
type: "button",
|
|
65
|
-
class: "ml-
|
|
66
|
-
onClick:
|
|
67
|
-
},
|
|
65
|
+
class: "ml-2 inline-flex rounded-md p-1 hover:bg-opacity-75 focus:outline-none",
|
|
66
|
+
onClick: d
|
|
67
|
+
}, r[0] || (r[0] = [
|
|
68
68
|
t("svg", {
|
|
69
69
|
xmlns: "http://www.w3.org/2000/svg",
|
|
70
70
|
class: "h-5 w-5",
|
|
@@ -79,7 +79,7 @@ const b = { class: "flex items-center justify-between" }, w = { class: "text-sm
|
|
|
79
79
|
], -1)
|
|
80
80
|
]))
|
|
81
81
|
])
|
|
82
|
-
],
|
|
82
|
+
], 16)) : c("", !0);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { watch as h, computed as g, createElementBlock as n, openBlock as
|
|
1
|
+
import { watch as h, computed as g, createElementBlock as n, openBlock as l, mergeProps as x, Fragment as v, renderList as b, unref as M, createBlock as y } from "vue";
|
|
2
2
|
import k from "./KunModalFooter.vue.js";
|
|
3
3
|
import { useKunModalFooter as V } from "../composables/useKunModalFooter.js";
|
|
4
|
-
const
|
|
4
|
+
const B = {
|
|
5
5
|
__name: "KunMultipleModalFooter",
|
|
6
6
|
props: {
|
|
7
7
|
messages: {
|
|
@@ -27,9 +27,9 @@ const _ = {
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
emits: ["update:messages", "removeMessage"],
|
|
30
|
-
setup(
|
|
31
|
-
const { useMessages: a, useAddMessage: c } = V(),
|
|
32
|
-
h(() =>
|
|
30
|
+
setup(r, { emit: d }) {
|
|
31
|
+
const { useMessages: a, useAddMessage: c } = V(), i = r, s = d;
|
|
32
|
+
h(() => i.messages, (o) => {
|
|
33
33
|
o.forEach((e) => {
|
|
34
34
|
c(
|
|
35
35
|
e.text,
|
|
@@ -49,7 +49,7 @@ const _ = {
|
|
|
49
49
|
color: e.color
|
|
50
50
|
})));
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function p(o) {
|
|
53
53
|
const e = a.value.findIndex((t) => t.id === o);
|
|
54
54
|
e !== -1 && (a.value.splice(e, 1), s("update:messages", a.value.map((t) => ({
|
|
55
55
|
id: t.id,
|
|
@@ -57,7 +57,7 @@ const _ = {
|
|
|
57
57
|
color: t.color
|
|
58
58
|
}))));
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const m = g(() => {
|
|
61
61
|
const o = {
|
|
62
62
|
"bottom-left": "bottom-4 left-4",
|
|
63
63
|
"bottom-right": "bottom-4 right-4",
|
|
@@ -65,11 +65,11 @@ const _ = {
|
|
|
65
65
|
"top-left": "top-4 left-4",
|
|
66
66
|
"top-right": "top-4 right-4",
|
|
67
67
|
"top-center": "top-4 left-1/2 transform -translate-x-1/2"
|
|
68
|
-
}, e =
|
|
68
|
+
}, e = i.stackDirection === "bottom-to-top" ? "flex-col-reverse" : "flex-col";
|
|
69
69
|
return [
|
|
70
70
|
"fixed z-[9999]",
|
|
71
71
|
// Posicionamiento fijo y z-index alto
|
|
72
|
-
o[
|
|
72
|
+
o[i.position] || "bottom-4 right-4",
|
|
73
73
|
// Posición predeterminada
|
|
74
74
|
"flex",
|
|
75
75
|
// Contenedor flexbox
|
|
@@ -79,24 +79,22 @@ const _ = {
|
|
|
79
79
|
// Espacio entre los mensajes
|
|
80
80
|
];
|
|
81
81
|
});
|
|
82
|
-
return (o, e) => (
|
|
83
|
-
|
|
84
|
-
}, [
|
|
85
|
-
(r(!0), n(v, null, b(M(a), (t) => (r(), y(k, {
|
|
82
|
+
return (o, e) => (l(), n("div", x({ class: m.value }, o.$attrs), [
|
|
83
|
+
(l(!0), n(v, null, b(M(a), (t) => (l(), y(k, {
|
|
86
84
|
key: t.id,
|
|
87
85
|
modelValue: t.modelValue,
|
|
88
86
|
"onUpdate:modelValue": (f) => t.modelValue = f,
|
|
89
87
|
message: t.text,
|
|
90
88
|
color: t.color,
|
|
91
89
|
id: t.id,
|
|
92
|
-
width:
|
|
93
|
-
height:
|
|
90
|
+
width: r.width,
|
|
91
|
+
height: r.height,
|
|
94
92
|
isFixed: !1,
|
|
95
|
-
onRemoveMessage:
|
|
93
|
+
onRemoveMessage: p
|
|
96
94
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "message", "color", "id", "width", "height"]))), 128))
|
|
97
|
-
],
|
|
95
|
+
], 16));
|
|
98
96
|
}
|
|
99
97
|
};
|
|
100
98
|
export {
|
|
101
|
-
|
|
99
|
+
B as default
|
|
102
100
|
};
|