lkt-toast 1.0.0
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/LICENSE +21 -0
- package/dist/build.css +1 -0
- package/dist/build.d.ts +7 -0
- package/dist/build.js +155 -0
- package/dist/classes/ToastController.d.ts +7 -0
- package/dist/functions/functions.d.ts +3 -0
- package/dist/index.d.ts +7 -0
- package/dist/lib-components/LktToast.vue.d.ts +3 -0
- package/dist/lib-components/LktToastCanvas.vue.d.ts +4 -0
- package/dist/settings/Settings.d.ts +5 -0
- package/dist/types/ValidCanvas.d.ts +2 -0
- package/package.json +49 -0
- package/src/lib-components/LktToast.vue +64 -0
- package/src/lib-components/LktToastCanvas.vue +80 -0
- package/theme/default.css +17 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 LKT VUE
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/build.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.lkt-toast-canvas{display:block;position:fixed;bottom:0;left:0;right:0;z-index:999}.lkt-toast-stack{display:flex;flex-direction:column-reverse;gap:var(--lkt-toast--stack--gap);position:absolute;bottom:0}.lkt-toast-stack.is-visible{padding-bottom:var(--lkt-toast--stack--padding)}.lkt-toast-stack.right-stack.is-visible{padding-right:var(--lkt-toast--stack--padding)}.lkt-toast-stack.left-stack.is-visible{padding-left:var(--lkt-toast--stack--padding)}.lkt-toast-stack.left-stack{left:0;align-items:flex-start}.lkt-toast-stack.center-stack{left:50%;transform:translate(-50%);align-items:center}.lkt-toast-stack.right-stack{right:0;align-items:flex-end}.lkt-toast{padding:var(--lkt-toast--toast--padding);border-radius:var(--lkt-toast--toast--border-radius);background:var(--lkt-toast--toast--bg);transition:var(--lkt-toast--toast--transition);width:var(--lkt-toast--toast--width);border:var(--lkt-toast--toast--border-width) var(--lkt-toast--toast--border-style) var(--lkt-toast--toast--border-color)}.lkt-toast.animation-left{transform:translate(-100%)}.lkt-toast.animation-right{transform:translate(100%)}.lkt-toast.animation-left.is-visible,.lkt-toast.animation-right.is-visible{transform:translate(0)}.lkt-toast.animation-center{transform:translateY(100%)}.lkt-toast.animation-center.is-visible{transform:translateY(0)}.lkt-toast-inner{display:flex;flex-direction:column;gap:var(--lkt-toast--toast--gap)}.lkt-toast-header{display:flex;align-items:center;justify-content:space-between;gap:var(--lkt-toast--toast--gap)}.lkt-toast .lkt-progress{--lkt-progress-bar-height: var(--lkt-toast--progress--height);--lkt-progress-min-height: var(--lkt-toast--progress--height);--lkt-progress-bar-percentage-color: var(--lkt-toast--progress--color)}
|
package/dist/build.d.ts
ADDED
package/dist/build.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { defineComponent as $, ref as m, computed as l, onMounted as B, resolveComponent as b, createElementBlock as v, openBlock as c, normalizeClass as C, createElementVNode as i, createVNode as N, createBlock as _, createCommentVNode as w, unref as E, getCurrentInstance as H, Fragment as L, renderList as M, mergeProps as R } from "vue";
|
|
2
|
+
import { extractI18nValue as U } from "lkt-vue-kernel";
|
|
3
|
+
const y = class y {
|
|
4
|
+
};
|
|
5
|
+
y.canvas = void 0, y.defaultCloseIcon = "";
|
|
6
|
+
let f = y;
|
|
7
|
+
const o = class o {
|
|
8
|
+
static open(n) {
|
|
9
|
+
o.components.push({ ...n, zIndex: o.zIndex }), ++o.zIndex;
|
|
10
|
+
}
|
|
11
|
+
static close(n) {
|
|
12
|
+
const s = o.components.findIndex((u) => u.zIndex === n);
|
|
13
|
+
s >= 0 && (o.components.splice(s, 1), o.components.length === 0 && (o.zIndex = 1e3));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
o.components = [], o.zIndex = 1e3;
|
|
17
|
+
let p = o;
|
|
18
|
+
const K = (t) => {
|
|
19
|
+
if (!f.canvas) {
|
|
20
|
+
console.warn("ToastCanvas not defined");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
p.open(t), f.canvas.refresh();
|
|
24
|
+
}, P = (t) => {
|
|
25
|
+
if (!f.canvas) {
|
|
26
|
+
console.warn("ToastCanvas not defined");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
p.close(t), f.canvas.refresh();
|
|
30
|
+
}, j = {
|
|
31
|
+
class: "lkt-toast-inner",
|
|
32
|
+
ref: "inner"
|
|
33
|
+
}, A = { class: "lkt-toast-header" }, D = ["innerHTML"], z = /* @__PURE__ */ $({
|
|
34
|
+
__name: "LktToast",
|
|
35
|
+
props: {
|
|
36
|
+
type: {},
|
|
37
|
+
text: {},
|
|
38
|
+
icon: {},
|
|
39
|
+
positionX: {},
|
|
40
|
+
duration: {},
|
|
41
|
+
buttonConfig: {},
|
|
42
|
+
zIndex: {}
|
|
43
|
+
},
|
|
44
|
+
setup(t) {
|
|
45
|
+
const n = t, s = m(100), u = n.duration ?? 1e4, d = m(null), k = m(!1), h = l(() => {
|
|
46
|
+
let r = [];
|
|
47
|
+
return k.value && r.push("is-visible"), n.positionX && r.push(`animation-${n.positionX}`), r.join(" ");
|
|
48
|
+
}), x = l(() => U(n.text)), g = () => {
|
|
49
|
+
P(n.zIndex);
|
|
50
|
+
}, I = () => {
|
|
51
|
+
d.value.pause();
|
|
52
|
+
}, T = () => {
|
|
53
|
+
d.value.start();
|
|
54
|
+
};
|
|
55
|
+
return B(() => {
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
k.value = !0;
|
|
58
|
+
}, 100);
|
|
59
|
+
}), (r, e) => {
|
|
60
|
+
const V = b("lkt-icon"), a = b("lkt-progress");
|
|
61
|
+
return c(), v("section", {
|
|
62
|
+
class: C(["lkt-toast", h.value]),
|
|
63
|
+
onMouseenter: I,
|
|
64
|
+
onMousemove: I,
|
|
65
|
+
onMouseleave: T
|
|
66
|
+
}, [
|
|
67
|
+
i("div", j, [
|
|
68
|
+
i("div", A, [
|
|
69
|
+
r.icon ? (c(), _(V, {
|
|
70
|
+
key: 0,
|
|
71
|
+
icon: r.icon
|
|
72
|
+
}, null, 8, ["icon"])) : w("", !0),
|
|
73
|
+
i("div", {
|
|
74
|
+
class: "lkt-toast-text",
|
|
75
|
+
innerHTML: x.value
|
|
76
|
+
}, null, 8, D),
|
|
77
|
+
i("div", {
|
|
78
|
+
class: "lkt-toast-close",
|
|
79
|
+
onClick: e[0] || (e[0] = (X) => E(P)(r.zIndex))
|
|
80
|
+
}, e[2] || (e[2] = [
|
|
81
|
+
i("i", { class: "lkt-icon-close" }, null, -1)
|
|
82
|
+
]))
|
|
83
|
+
]),
|
|
84
|
+
N(a, {
|
|
85
|
+
ref_key: "progressRef",
|
|
86
|
+
ref: d,
|
|
87
|
+
modelValue: s.value,
|
|
88
|
+
"onUpdate:modelValue": e[1] || (e[1] = (X) => s.value = X),
|
|
89
|
+
duration: E(u),
|
|
90
|
+
type: "decremental",
|
|
91
|
+
"value-format": "hidden",
|
|
92
|
+
"pause-on-hover": "",
|
|
93
|
+
onEnd: g
|
|
94
|
+
}, null, 8, ["modelValue", "duration"])
|
|
95
|
+
], 512)
|
|
96
|
+
], 34);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}), F = { class: "lkt-toast-canvas" }, q = /* @__PURE__ */ $({
|
|
100
|
+
__name: "LktToastCanvas",
|
|
101
|
+
setup(t, { expose: n }) {
|
|
102
|
+
const s = m(0), u = H(), d = m([]), k = () => {
|
|
103
|
+
s.value = s.value + 1, setTimeout(() => {
|
|
104
|
+
var e;
|
|
105
|
+
(e = u == null ? void 0 : u.proxy) == null || e.$forceUpdate();
|
|
106
|
+
}, 1);
|
|
107
|
+
}, h = l(() => (s.value, p.components.filter((e) => e.positionX === "left"))), x = l(() => (s.value, p.components.filter((e) => e.positionX === "center"))), g = l(() => (s.value, p.components.filter((e) => e.positionX === "right"))), I = l(() => h.value.length === 0 ? "" : "is-visible"), T = l(() => x.value.length === 0 ? "" : "is-visible"), r = l(() => g.value.length === 0 ? "" : "is-visible");
|
|
108
|
+
return n({
|
|
109
|
+
refresh: k
|
|
110
|
+
}), (e, V) => (c(), v("section", F, [
|
|
111
|
+
i("div", {
|
|
112
|
+
class: C(["lkt-toast-stack left-stack", I.value])
|
|
113
|
+
}, [
|
|
114
|
+
(c(!0), v(L, null, M(h.value, (a) => (c(), _(z, R({
|
|
115
|
+
ref_for: !0,
|
|
116
|
+
ref_key: "instanceReferences",
|
|
117
|
+
ref: d,
|
|
118
|
+
key: a.zIndex
|
|
119
|
+
}, a), null, 16))), 128))
|
|
120
|
+
], 2),
|
|
121
|
+
i("div", {
|
|
122
|
+
class: C(["lkt-toast-stack center-stack", T.value])
|
|
123
|
+
}, [
|
|
124
|
+
(c(!0), v(L, null, M(x.value, (a) => (c(), _(z, R({
|
|
125
|
+
ref_for: !0,
|
|
126
|
+
ref_key: "instanceReferences",
|
|
127
|
+
ref: d,
|
|
128
|
+
key: a.zIndex
|
|
129
|
+
}, a), null, 16))), 128))
|
|
130
|
+
], 2),
|
|
131
|
+
i("div", {
|
|
132
|
+
class: C(["lkt-toast-stack right-stack", r.value])
|
|
133
|
+
}, [
|
|
134
|
+
(c(!0), v(L, null, M(g.value, (a) => (c(), _(z, R({
|
|
135
|
+
ref_for: !0,
|
|
136
|
+
ref_key: "instanceReferences",
|
|
137
|
+
ref: d,
|
|
138
|
+
key: a.zIndex
|
|
139
|
+
}, a), null, 16))), 128))
|
|
140
|
+
], 2)
|
|
141
|
+
]));
|
|
142
|
+
}
|
|
143
|
+
}), O = {
|
|
144
|
+
install: (t) => {
|
|
145
|
+
t.component("lkt-toast-canvas") === void 0 && t.component("lkt-toast-canvas", q), t.component("lkt-toast") === void 0 && t.component("lkt-toast", z);
|
|
146
|
+
}
|
|
147
|
+
}, Q = (t) => {
|
|
148
|
+
f.canvas = t;
|
|
149
|
+
};
|
|
150
|
+
export {
|
|
151
|
+
P as closeToast,
|
|
152
|
+
O as default,
|
|
153
|
+
K as openToast,
|
|
154
|
+
Q as setToastCanvas
|
|
155
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import "./../lkt-toast.css";
|
|
3
|
+
import { ValidCanvas } from "./types/ValidCanvas";
|
|
4
|
+
export { closeToast, openToast } from './functions/functions';
|
|
5
|
+
declare const LktToast: Plugin;
|
|
6
|
+
export default LktToast;
|
|
7
|
+
export declare const setToastCanvas: (component: ValidCanvas) => void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ToastConfig } from "lkt-vue-kernel";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<ToastConfig, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ToastConfig> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
refresh: () => void;
|
|
3
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
export default _default;
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lkt-toast",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "./dist/build.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/build.js"
|
|
10
|
+
},
|
|
11
|
+
"./styles": "./dist/build.css",
|
|
12
|
+
"./theme": "./theme/default.css",
|
|
13
|
+
"./theme/default": "./theme/default.css"
|
|
14
|
+
},
|
|
15
|
+
"types": "./dist/build.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist/*",
|
|
18
|
+
"src/**/*.vue",
|
|
19
|
+
"theme/**/*.css"
|
|
20
|
+
],
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "vue-tsc --declaration --emitDeclarationOnly; vite build; tsc --project tsconfig.build.json; cp build/* dist/",
|
|
25
|
+
"rebuild": "rm -rf dist/*; vue-tsc --declaration --emitDeclarationOnly; vite build; tsc --project tsconfig.build.json; cp build/* dist/"
|
|
26
|
+
},
|
|
27
|
+
"author": "Antonio Ibáñez",
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@babel/types": "^7.23.6",
|
|
33
|
+
"@types/node": "^20.11.19",
|
|
34
|
+
"@types/rollup": "^0.54.0",
|
|
35
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
36
|
+
"rollup": "^4.34.8",
|
|
37
|
+
"typescript": "^5.7.3",
|
|
38
|
+
"vite": "^6.1.1",
|
|
39
|
+
"vue": "^3.3.0",
|
|
40
|
+
"vue-tsc": "^2.2.0"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"lkt-loader": "^1.0.1",
|
|
44
|
+
"lkt-vue-kernel": "^1.0.26"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"vue": "^3.3.0"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import {computed, onMounted, ref} from 'vue';
|
|
3
|
+
import {extractI18nValue, ToastConfig} from "lkt-vue-kernel";
|
|
4
|
+
import {closeToast} from "../functions/functions";
|
|
5
|
+
|
|
6
|
+
const props = withDefaults(defineProps<ToastConfig>(), {});
|
|
7
|
+
|
|
8
|
+
const progressPercentage = ref(100),
|
|
9
|
+
timeoutDuration = props.duration ?? 10000,
|
|
10
|
+
progressRef = ref(null),
|
|
11
|
+
addAnimationClass = ref(false);
|
|
12
|
+
|
|
13
|
+
const classes = computed(() => {
|
|
14
|
+
let r: string[] = [];
|
|
15
|
+
if (addAnimationClass.value) r.push('is-visible');
|
|
16
|
+
if (props.positionX) r.push(`animation-${props.positionX}`);
|
|
17
|
+
return r.join(' ');
|
|
18
|
+
}),
|
|
19
|
+
computedText = computed(() => extractI18nValue(props.text))
|
|
20
|
+
|
|
21
|
+
const onProgressEnd = () => {
|
|
22
|
+
closeToast(props.zIndex);
|
|
23
|
+
},
|
|
24
|
+
onProgressMouseEnter = () => {
|
|
25
|
+
progressRef.value.pause();
|
|
26
|
+
},
|
|
27
|
+
onProgressMouseLeave = () => {
|
|
28
|
+
progressRef.value.start();
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
onMounted(() => {
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
addAnimationClass.value = true;
|
|
34
|
+
}, 100);
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<section class="lkt-toast"
|
|
41
|
+
:class="classes"
|
|
42
|
+
@mouseenter="onProgressMouseEnter"
|
|
43
|
+
@mousemove="onProgressMouseEnter"
|
|
44
|
+
@mouseleave="onProgressMouseLeave">
|
|
45
|
+
<div class="lkt-toast-inner" ref="inner">
|
|
46
|
+
<div class="lkt-toast-header">
|
|
47
|
+
<lkt-icon v-if="icon" :icon="icon"/>
|
|
48
|
+
<div class="lkt-toast-text" v-html="computedText"></div>
|
|
49
|
+
<div class="lkt-toast-close" @click="closeToast(zIndex)">
|
|
50
|
+
<i class="lkt-icon-close"/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<lkt-progress
|
|
54
|
+
ref="progressRef"
|
|
55
|
+
v-model="progressPercentage"
|
|
56
|
+
:duration="timeoutDuration"
|
|
57
|
+
type="decremental"
|
|
58
|
+
value-format="hidden"
|
|
59
|
+
pause-on-hover
|
|
60
|
+
@end="onProgressEnd"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</section>
|
|
64
|
+
</template>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import {computed, getCurrentInstance, ref} from 'vue';
|
|
3
|
+
import LktToast from "../lib-components/LktToast.vue";
|
|
4
|
+
import {ToastConfig} from "lkt-vue-kernel";
|
|
5
|
+
import {ToastController} from "../classes/ToastController";
|
|
6
|
+
|
|
7
|
+
const refresher = ref(0);
|
|
8
|
+
const instance = getCurrentInstance();
|
|
9
|
+
const instanceReferences = ref([]);
|
|
10
|
+
|
|
11
|
+
const refresh = () => {
|
|
12
|
+
refresher.value = refresher.value + 1;
|
|
13
|
+
setTimeout(() => {
|
|
14
|
+
instance?.proxy?.$forceUpdate();
|
|
15
|
+
}, 1);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const componentsLeft = computed((): ToastConfig[] => {
|
|
19
|
+
refresher.value;
|
|
20
|
+
return ToastController.components.filter(x => x.positionX === 'left');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const componentsCenter = computed((): ToastConfig[] => {
|
|
24
|
+
refresher.value;
|
|
25
|
+
return ToastController.components.filter(x => x.positionX === 'center');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const componentsRight = computed((): ToastConfig[] => {
|
|
29
|
+
refresher.value;
|
|
30
|
+
return ToastController.components.filter(x => x.positionX === 'right');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const computedLeftStackClasses = computed(() => {
|
|
34
|
+
if (componentsLeft.value.length === 0) return '';
|
|
35
|
+
return 'is-visible';
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
const computedCenterStackClasses = computed(() => {
|
|
39
|
+
if (componentsCenter.value.length === 0) return '';
|
|
40
|
+
return 'is-visible';
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
const computedRightStackClasses = computed(() => {
|
|
44
|
+
if (componentsRight.value.length === 0) return '';
|
|
45
|
+
return 'is-visible';
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
defineExpose({
|
|
49
|
+
refresh,
|
|
50
|
+
});
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<section class="lkt-toast-canvas">
|
|
55
|
+
<div class="lkt-toast-stack left-stack" :class="computedLeftStackClasses">
|
|
56
|
+
<lkt-toast
|
|
57
|
+
v-for="info in componentsLeft"
|
|
58
|
+
ref="instanceReferences"
|
|
59
|
+
:key="info.zIndex"
|
|
60
|
+
v-bind="info"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="lkt-toast-stack center-stack" :class="computedCenterStackClasses">
|
|
64
|
+
<lkt-toast
|
|
65
|
+
v-for="info in componentsCenter"
|
|
66
|
+
ref="instanceReferences"
|
|
67
|
+
:key="info.zIndex"
|
|
68
|
+
v-bind="info"
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="lkt-toast-stack right-stack" :class="computedRightStackClasses">
|
|
72
|
+
<lkt-toast
|
|
73
|
+
v-for="info in componentsRight"
|
|
74
|
+
ref="instanceReferences"
|
|
75
|
+
:key="info.zIndex"
|
|
76
|
+
v-bind="info"
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
</section>
|
|
80
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--lkt-toast--stack--gap: 10px;
|
|
3
|
+
--lkt-toast--stack--padding: 10px;
|
|
4
|
+
|
|
5
|
+
--lkt-toast--toast--gap: 10px;
|
|
6
|
+
--lkt-toast--toast--padding: 15px;
|
|
7
|
+
--lkt-toast--toast--border-radius: 20px;
|
|
8
|
+
--lkt-toast--toast--bg: #ffffff;
|
|
9
|
+
--lkt-toast--toast--transition: 300ms;
|
|
10
|
+
--lkt-toast--toast--width: 250px;
|
|
11
|
+
--lkt-toast--toast--border-width: 1px;
|
|
12
|
+
--lkt-toast--toast--border-style: solid;
|
|
13
|
+
--lkt-toast--toast--border-color: #d4d4d4;
|
|
14
|
+
|
|
15
|
+
--lkt-toast--progress--height: 10px;
|
|
16
|
+
--lkt-toast--progress--color: #d4d4d4;
|
|
17
|
+
}
|