adverich-kun-ui 0.1.132 → 0.1.133
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,102 @@
|
|
|
1
|
+
import { watch as h, computed as g, createElementBlock as n, openBlock as r, normalizeClass as x, Fragment as v, renderList as b, unref as M, createBlock as y } from "vue";
|
|
2
|
+
import k from "./KunModalFooter.vue.js";
|
|
3
|
+
import { useKunModalFooter as V } from "../composables/useKunModalFooter.js";
|
|
4
|
+
const _ = {
|
|
5
|
+
__name: "KunMultipleModalFooter",
|
|
6
|
+
props: {
|
|
7
|
+
messages: {
|
|
8
|
+
type: Array,
|
|
9
|
+
default: () => []
|
|
10
|
+
},
|
|
11
|
+
position: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "bottom-right"
|
|
14
|
+
},
|
|
15
|
+
stackDirection: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "bottom-to-top"
|
|
18
|
+
// bottom-to-top, top-to-bottom
|
|
19
|
+
},
|
|
20
|
+
width: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "300px"
|
|
23
|
+
},
|
|
24
|
+
height: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "auto"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: ["update:messages", "removeMessage"],
|
|
30
|
+
setup(i, { emit: d }) {
|
|
31
|
+
const { useMessages: a, useAddMessage: c } = V(), l = i, s = d;
|
|
32
|
+
h(() => l.messages, (o) => {
|
|
33
|
+
o.forEach((e) => {
|
|
34
|
+
c(
|
|
35
|
+
e.text,
|
|
36
|
+
e.id,
|
|
37
|
+
e.color,
|
|
38
|
+
5e3,
|
|
39
|
+
(t) => {
|
|
40
|
+
u(t);
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
}, { deep: !0 });
|
|
45
|
+
function u(o) {
|
|
46
|
+
a.value = a.value.filter((e) => e.id !== o), s("update:messages", a.value.map((e) => ({
|
|
47
|
+
id: e.id,
|
|
48
|
+
text: e.text,
|
|
49
|
+
color: e.color
|
|
50
|
+
})));
|
|
51
|
+
}
|
|
52
|
+
function m(o) {
|
|
53
|
+
const e = a.value.findIndex((t) => t.id === o);
|
|
54
|
+
e !== -1 && (a.value.splice(e, 1), s("update:messages", a.value.map((t) => ({
|
|
55
|
+
id: t.id,
|
|
56
|
+
text: t.text,
|
|
57
|
+
color: t.color
|
|
58
|
+
}))));
|
|
59
|
+
}
|
|
60
|
+
const p = g(() => {
|
|
61
|
+
const o = {
|
|
62
|
+
"bottom-left": "bottom-4 left-4",
|
|
63
|
+
"bottom-right": "bottom-4 right-4",
|
|
64
|
+
"bottom-center": "bottom-4 left-1/2 transform -translate-x-1/2",
|
|
65
|
+
"top-left": "top-4 left-4",
|
|
66
|
+
"top-right": "top-4 right-4",
|
|
67
|
+
"top-center": "top-4 left-1/2 transform -translate-x-1/2"
|
|
68
|
+
}, e = l.stackDirection === "bottom-to-top" ? "flex-col-reverse" : "flex-col";
|
|
69
|
+
return [
|
|
70
|
+
"fixed z-[9999]",
|
|
71
|
+
// Posicionamiento fijo y z-index alto
|
|
72
|
+
o[l.position] || "bottom-4 right-4",
|
|
73
|
+
// Posición predeterminada
|
|
74
|
+
"flex",
|
|
75
|
+
// Contenedor flexbox
|
|
76
|
+
e,
|
|
77
|
+
// Dirección del apilamiento
|
|
78
|
+
"gap-3"
|
|
79
|
+
// Espacio entre los mensajes
|
|
80
|
+
];
|
|
81
|
+
});
|
|
82
|
+
return (o, e) => (r(), n("div", {
|
|
83
|
+
class: x(p.value)
|
|
84
|
+
}, [
|
|
85
|
+
(r(!0), n(v, null, b(M(a), (t) => (r(), y(k, {
|
|
86
|
+
key: t.id,
|
|
87
|
+
modelValue: t.modelValue,
|
|
88
|
+
"onUpdate:modelValue": (f) => t.modelValue = f,
|
|
89
|
+
message: t.text,
|
|
90
|
+
color: t.color,
|
|
91
|
+
id: t.id,
|
|
92
|
+
width: i.width,
|
|
93
|
+
height: i.height,
|
|
94
|
+
isFixed: !1,
|
|
95
|
+
onRemoveMessage: m
|
|
96
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "message", "color", "id", "width", "height"]))), 128))
|
|
97
|
+
], 2));
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
export {
|
|
101
|
+
_ as default
|
|
102
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ref as c } from "vue";
|
|
2
|
+
function m() {
|
|
3
|
+
const e = c([]);
|
|
4
|
+
function n(s, u, i = "blue", a = 5e3, o) {
|
|
5
|
+
if (e.value.some((f) => f.id === u)) return;
|
|
6
|
+
const t = u ?? Date.now(), l = { id: t, text: s, color: i, modelValue: !0 };
|
|
7
|
+
e.value.push(l), setTimeout(() => {
|
|
8
|
+
r(t), o && o(t);
|
|
9
|
+
}, a);
|
|
10
|
+
}
|
|
11
|
+
function r(s) {
|
|
12
|
+
e.value = e.value.filter((u) => u.id !== s);
|
|
13
|
+
}
|
|
14
|
+
return { useMessages: e, useAddMessage: n };
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
m as useKunModalFooter
|
|
18
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import o from "./components/KunAlert/src/components/KunAlert.vue.js";
|
|
3
|
+
import i from "./components/KunAppbar/src/components/KunAppbar.vue.js";
|
|
4
4
|
import t from "./components/KunAppbarTitle/src/components/KunAppbarTitle.vue.js";
|
|
5
5
|
import a from "./components/KunAutocomplete/src/components/KunAutocomplete.vue.js";
|
|
6
6
|
import s from "./components/KunAvatar/src/components/KunAvatar.vue.js";
|
|
@@ -11,39 +11,40 @@ import _ from "./components/KunCardActions/src/components/KunCardActions.vue.js"
|
|
|
11
11
|
import e from "./components/KunCardItem/src/components/KunCardItem.vue.js";
|
|
12
12
|
import p from "./components/KunCardSubtitle/src/components/KunCardSubtitle.vue.js";
|
|
13
13
|
import c from "./components/KunCardText/src/components/KunCardText.vue.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
14
|
+
import l from "./components/KunCardTitle/src/components/KunCardTitle.vue.js";
|
|
15
|
+
import $ from "./components/KunChip/src/components/KunChip.vue.js";
|
|
16
16
|
import d from "./components/KunCol/src/components/KunCol.vue.js";
|
|
17
17
|
import L from "./components/KunContainer/src/components/KunContainer.vue.js";
|
|
18
18
|
import C from "./components/KunCurrency/src/components/KunCurrency.vue.js";
|
|
19
19
|
import I from "./components/KunDivider/src/components/KunDivider.vue.js";
|
|
20
20
|
import b from "./components/KunForm/src/components/KunForm.vue.js";
|
|
21
|
-
import
|
|
22
|
-
import
|
|
21
|
+
import A from "./components/KunIcon/src/components/KunIcon.vue.js";
|
|
22
|
+
import T from "./components/KunList/src/components/KunList.vue.js";
|
|
23
23
|
import S from "./components/KunListGroup/src/components/KunListGroup.vue.js";
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
24
|
+
import F from "./components/KunListImg/src/components/KunListImg.vue.js";
|
|
25
|
+
import x from "./components/KunListItem/src/components/KunListItem.vue.js";
|
|
26
|
+
import M from "./components/KunListItemAction/src/components/KunListItemAction.vue.js";
|
|
27
|
+
import h from "./components/KunListItemAvatar/src/components/KunListItemAvatar.vue.js";
|
|
28
|
+
import v from "./components/KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
|
|
29
|
+
import g from "./components/KunListItemTitle/src/components/KunListItemTitle.vue.js";
|
|
30
|
+
import w from "./components/KunListItemText/src/components/KunListItemText.vue.js";
|
|
31
|
+
import B from "./components/KunListSubheader/src/components/KunListSubheader.vue.js";
|
|
32
|
+
import y from "./components/kunMenu/src/components/kunMenu.vue.js";
|
|
33
33
|
import D from "./components/KunModalFooter/src/components/KunModalFooter.vue.js";
|
|
34
|
-
import G from "./components/
|
|
35
|
-
import R from "./components/
|
|
36
|
-
import j from "./components/
|
|
37
|
-
import k from "./components/
|
|
38
|
-
import q from "./components/
|
|
39
|
-
import z from "./components/
|
|
40
|
-
import N from "./components/
|
|
41
|
-
import E from "./components/
|
|
42
|
-
import H from "./components/
|
|
43
|
-
import J from "./components/
|
|
34
|
+
import G from "./components/KunModalFooter/src/components/KunMultipleModalFooter.vue.js";
|
|
35
|
+
import R from "./components/KunNumberField/src/components/KunNumberField.vue.js";
|
|
36
|
+
import j from "./components/KunLoaderCircular/src/components/KunLoaderCircular.vue.js";
|
|
37
|
+
import k from "./components/KunRow/src/components/KunRow.vue.js";
|
|
38
|
+
import q from "./components/KunSlider/src/components/KunSlider.vue.js";
|
|
39
|
+
import z from "./components/KunSpacer/src/components/KunSpacer.vue.js";
|
|
40
|
+
import N from "./components/KunSwitch/src/components/KunSwitch.vue.js";
|
|
41
|
+
import E from "./components/KunTable/src/components/KunTable.vue.js";
|
|
42
|
+
import H from "./components/KunTextField/src/components/KunTextField.vue.js";
|
|
43
|
+
import J from "./components/KunToolbar/src/components/KunToolbar.vue.js";
|
|
44
|
+
import O from "./components/KunTooltip/src/components/KunTooltip.vue.js";
|
|
44
45
|
const n = {
|
|
45
|
-
KunAlert:
|
|
46
|
-
KunAppbar:
|
|
46
|
+
KunAlert: o,
|
|
47
|
+
KunAppbar: i,
|
|
47
48
|
KunAppbarTitle: t,
|
|
48
49
|
KunAutocomplete: a,
|
|
49
50
|
KunAvatar: s,
|
|
@@ -53,45 +54,46 @@ const n = {
|
|
|
53
54
|
KunCardActions: _,
|
|
54
55
|
KunCardItem: e,
|
|
55
56
|
KunCardSubtitle: p,
|
|
56
|
-
KunListItemTitle:
|
|
57
|
+
KunListItemTitle: g,
|
|
57
58
|
KunCardText: c,
|
|
58
|
-
KunCardTitle:
|
|
59
|
-
KunChip:
|
|
59
|
+
KunCardTitle: l,
|
|
60
|
+
KunChip: $,
|
|
60
61
|
KunCol: d,
|
|
61
62
|
KunContainer: L,
|
|
62
63
|
KunCurrency: C,
|
|
63
64
|
KunDivider: I,
|
|
64
65
|
KunForm: b,
|
|
65
|
-
KunIcon:
|
|
66
|
-
KunList:
|
|
66
|
+
KunIcon: A,
|
|
67
|
+
KunList: T,
|
|
67
68
|
KunListGroup: S,
|
|
68
|
-
KunListImg:
|
|
69
|
-
KunListItem:
|
|
70
|
-
KunListItemAction:
|
|
71
|
-
KunListItemAvatar:
|
|
72
|
-
KunListItemSubtitle:
|
|
73
|
-
KunListItemText:
|
|
74
|
-
KunListSubheader:
|
|
75
|
-
KunMenu:
|
|
69
|
+
KunListImg: F,
|
|
70
|
+
KunListItem: x,
|
|
71
|
+
KunListItemAction: M,
|
|
72
|
+
KunListItemAvatar: h,
|
|
73
|
+
KunListItemSubtitle: v,
|
|
74
|
+
KunListItemText: w,
|
|
75
|
+
KunListSubheader: B,
|
|
76
|
+
KunMenu: y,
|
|
76
77
|
KunModalFooter: D,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
KunMultipleModalFooter: G,
|
|
79
|
+
KunNumberField: R,
|
|
80
|
+
KunLoaderCircular: j,
|
|
81
|
+
KunRow: k,
|
|
82
|
+
KunSlider: q,
|
|
83
|
+
KunSpacer: z,
|
|
84
|
+
KunSwitch: N,
|
|
85
|
+
KunTable: E,
|
|
86
|
+
KunTextField: H,
|
|
87
|
+
KunToolbar: J,
|
|
88
|
+
KunTooltip: O
|
|
87
89
|
};
|
|
88
|
-
function
|
|
90
|
+
function Rm(r) {
|
|
89
91
|
for (const m in n)
|
|
90
92
|
r.component(m, n[m]);
|
|
91
93
|
}
|
|
92
94
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
o as KunAlert,
|
|
96
|
+
i as KunAppbar,
|
|
95
97
|
t as KunAppbarTitle,
|
|
96
98
|
a as KunAutocomplete,
|
|
97
99
|
s as KunAvatar,
|
|
@@ -102,34 +104,35 @@ export {
|
|
|
102
104
|
e as KunCardItem,
|
|
103
105
|
p as KunCardSubtitle,
|
|
104
106
|
c as KunCardText,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
l as KunCardTitle,
|
|
108
|
+
$ as KunChip,
|
|
107
109
|
d as KunCol,
|
|
108
110
|
L as KunContainer,
|
|
109
111
|
C as KunCurrency,
|
|
110
112
|
I as KunDivider,
|
|
111
113
|
b as KunForm,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
A as KunIcon,
|
|
115
|
+
T as KunList,
|
|
114
116
|
S as KunListGroup,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
F as KunListImg,
|
|
118
|
+
x as KunListItem,
|
|
119
|
+
M as KunListItemAction,
|
|
120
|
+
h as KunListItemAvatar,
|
|
121
|
+
v as KunListItemSubtitle,
|
|
122
|
+
w as KunListItemText,
|
|
123
|
+
g as KunListItemTitle,
|
|
124
|
+
B as KunListSubheader,
|
|
125
|
+
j as KunLoaderCircular,
|
|
126
|
+
y as KunMenu,
|
|
125
127
|
D as KunModalFooter,
|
|
126
|
-
|
|
127
|
-
k as
|
|
128
|
-
q as
|
|
129
|
-
z as
|
|
130
|
-
N as
|
|
131
|
-
E as
|
|
132
|
-
H as
|
|
133
|
-
J as
|
|
134
|
-
|
|
128
|
+
G as KunMultipleModalFooter,
|
|
129
|
+
k as KunRow,
|
|
130
|
+
q as KunSlider,
|
|
131
|
+
z as KunSpacer,
|
|
132
|
+
N as KunSwitch,
|
|
133
|
+
E as KunTable,
|
|
134
|
+
H as KunTextField,
|
|
135
|
+
J as KunToolbar,
|
|
136
|
+
O as KunTooltip,
|
|
137
|
+
Rm as install
|
|
135
138
|
};
|