mediacube-ui-v2 0.0.322 → 0.0.324
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,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const E = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as w, useId as x, ref as o, computed as H, onMounted as C, nextTick as S, watch as v, openBlock as B, createBlock as $, resolveDynamicComponent as M, unref as b, normalizeClass as D, withCtx as T, renderSlot as z } from "vue";
|
|
2
|
+
const E = /* @__PURE__ */ w({
|
|
3
3
|
__name: "McSlideUpDown",
|
|
4
4
|
props: {
|
|
5
5
|
/*
|
|
@@ -38,7 +38,7 @@ const E = /* @__PURE__ */ k({
|
|
|
38
38
|
},
|
|
39
39
|
emits: ["slide-open-start", "slide-close-start", "slide-open-end", "slide-close-end"],
|
|
40
40
|
setup(f, { emit: p }) {
|
|
41
|
-
const i = p,
|
|
41
|
+
const i = p, s = f, h = x(), t = o(s.active), u = o(!1), r = o(!1), n = o(null), a = o(), m = H(() => ({
|
|
42
42
|
"mc-slide-up-down": !0,
|
|
43
43
|
"mc-slide-up-down--server-open": !u.value && t.value,
|
|
44
44
|
"mc-slide-up-down--server-close": !u.value && !t.value
|
|
@@ -46,11 +46,11 @@ const E = /* @__PURE__ */ k({
|
|
|
46
46
|
const l = getComputedStyle(e).height;
|
|
47
47
|
return l === "auto" || l === "" ? e.offsetHeight : parseFloat(l) || 0;
|
|
48
48
|
}, g = () => {
|
|
49
|
-
if (!
|
|
50
|
-
const e =
|
|
49
|
+
if (!a.value) return;
|
|
50
|
+
const e = a.value;
|
|
51
51
|
t.value ? e.style.height = "auto" : e.style.height = "0";
|
|
52
52
|
}, _ = (e) => {
|
|
53
|
-
const l =
|
|
53
|
+
const l = a.value;
|
|
54
54
|
if (!l) {
|
|
55
55
|
t.value = e;
|
|
56
56
|
return;
|
|
@@ -61,13 +61,14 @@ const E = /* @__PURE__ */ k({
|
|
|
61
61
|
t.value = e, r.value = !1, l.style.height = e ? "auto" : "0";
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
|
-
r.value = !0, i(e ? "slide-open-start" : "slide-close-start", t.value), n.value = l.animate(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
r.value = !0, i(e ? "slide-open-start" : "slide-close-start", t.value), n.value = l.animate([{ height: `${d}px` }, { height: `${c}px` }], {
|
|
65
|
+
duration: s.duration,
|
|
66
|
+
easing: s.type,
|
|
67
|
+
fill: "none"
|
|
68
|
+
}), n.value.onfinish = () => {
|
|
69
|
+
if (t.value = e, r.value = !1, a.value) {
|
|
70
|
+
const k = a.value;
|
|
71
|
+
k.style.height = t.value ? "auto" : "0";
|
|
71
72
|
}
|
|
72
73
|
i(e ? "slide-open-end" : "slide-close-end", t.value);
|
|
73
74
|
};
|
|
@@ -77,18 +78,18 @@ const E = /* @__PURE__ */ k({
|
|
|
77
78
|
u.value = !0;
|
|
78
79
|
});
|
|
79
80
|
}), v(
|
|
80
|
-
() =>
|
|
81
|
+
() => s.active,
|
|
81
82
|
() => {
|
|
82
|
-
_(
|
|
83
|
+
_(s.active);
|
|
83
84
|
}
|
|
84
85
|
), v(
|
|
85
|
-
() =>
|
|
86
|
+
() => a.value,
|
|
86
87
|
() => {
|
|
87
88
|
g();
|
|
88
89
|
}
|
|
89
|
-
), (e, l) => (B(), $(M(
|
|
90
|
+
), (e, l) => (B(), $(M(s.tag), {
|
|
90
91
|
ref_key: "container",
|
|
91
|
-
ref:
|
|
92
|
+
ref: a,
|
|
92
93
|
class: D(m.value),
|
|
93
94
|
key: `mc-slide-up-down-key-${b(h)}`
|
|
94
95
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, defineAsyncComponent as a, computed as
|
|
1
|
+
import { defineComponent as x, defineAsyncComponent as a, computed as c, onMounted as V, openBlock as s, createElementBlock as k, unref as e, normalizeStyle as $, normalizeClass as A, createVNode as i, createSlots as C, withCtx as o, createTextVNode as p, toDisplayString as d, Fragment as P, renderList as E, createBlock as S, withModifiers as h, createCommentVNode as L } from "vue";
|
|
2
2
|
import { ToastPositions as j } from "../../../enums/Toast2.js";
|
|
3
3
|
import { useTimer as D } from "../../../composables/useTimer2.js";
|
|
4
4
|
import { ButtonSize as F } from "../../../enums/ui/Button2.js";
|
|
@@ -68,32 +68,32 @@ const R = /* @__PURE__ */ x({
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
emits: ["closed"],
|
|
71
|
-
setup(
|
|
72
|
-
const
|
|
71
|
+
setup(z, { emit: B }) {
|
|
72
|
+
const M = a(() => import("../../patterns/McPreview/McPreview.vue.js")), l = a(() => import("../../elements/McSvgIcon/McSvgIcon.vue.js")), f = a(() => import("../../elements/McTitle/McTitle.vue.js")), y = a(() => import("../../elements/McButton/McButton.vue.js")), b = B, t = z, v = W("toast"), g = c(() => t.variation || v.component.variation), m = D(t.toast.timeEnd, t.duration), _ = c(() => ({
|
|
73
73
|
"mc-toast": !0,
|
|
74
74
|
[`mc-toast--variation-${g.value}`]: !0
|
|
75
|
-
})),
|
|
75
|
+
})), w = c(() => ({
|
|
76
76
|
"--mc-toast-background-color": v.colors[g.value]
|
|
77
|
-
})),
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
77
|
+
})), N = () => {
|
|
78
|
+
b("closed", t.toast);
|
|
79
|
+
}, T = (u) => {
|
|
80
|
+
u && u(), t.toast.destroy();
|
|
81
81
|
};
|
|
82
82
|
return V(() => {
|
|
83
|
-
|
|
84
|
-
}), (
|
|
85
|
-
class: A(
|
|
86
|
-
style: $(
|
|
87
|
-
onMouseenter:
|
|
88
|
-
onMouseleave:
|
|
83
|
+
m.start();
|
|
84
|
+
}), (u, r) => (s(), k("div", {
|
|
85
|
+
class: A(_.value),
|
|
86
|
+
style: $(w.value),
|
|
87
|
+
onMouseenter: r[0] || (r[0] = (n) => e(m).pause()),
|
|
88
|
+
onMouseleave: r[1] || (r[1] = (n) => e(m).start())
|
|
89
89
|
}, [
|
|
90
|
-
|
|
90
|
+
i(e(M), {
|
|
91
91
|
size: e(I).L
|
|
92
92
|
}, C({ _: 2 }, [
|
|
93
93
|
t.icon ? {
|
|
94
94
|
name: "left",
|
|
95
95
|
fn: o(() => [
|
|
96
|
-
|
|
96
|
+
i(e(l), {
|
|
97
97
|
name: t.icon,
|
|
98
98
|
size: "300"
|
|
99
99
|
}, null, 8, ["name"])
|
|
@@ -103,9 +103,9 @@ const R = /* @__PURE__ */ x({
|
|
|
103
103
|
t.title ? {
|
|
104
104
|
name: "top",
|
|
105
105
|
fn: o(() => [
|
|
106
|
-
|
|
106
|
+
i(e(f), null, {
|
|
107
107
|
default: o(() => [
|
|
108
|
-
|
|
108
|
+
p(d(t.title), 1)
|
|
109
109
|
]),
|
|
110
110
|
_: 1
|
|
111
111
|
})
|
|
@@ -115,9 +115,9 @@ const R = /* @__PURE__ */ x({
|
|
|
115
115
|
t.description ? {
|
|
116
116
|
name: "bottom",
|
|
117
117
|
fn: o(() => [
|
|
118
|
-
|
|
118
|
+
i(e(f), null, {
|
|
119
119
|
default: o(() => [
|
|
120
|
-
|
|
120
|
+
p(d(t.description), 1)
|
|
121
121
|
]),
|
|
122
122
|
_: 1
|
|
123
123
|
})
|
|
@@ -132,17 +132,17 @@ const R = /* @__PURE__ */ x({
|
|
|
132
132
|
size: e(F).Xs,
|
|
133
133
|
variation: n.variation || "gray-outline",
|
|
134
134
|
weight: e(O).Normal,
|
|
135
|
-
onClick:
|
|
135
|
+
onClick: h(() => T(n.handler), ["stop"])
|
|
136
136
|
}, C({
|
|
137
137
|
default: o(() => [
|
|
138
|
-
|
|
138
|
+
p(" " + d(n.title), 1)
|
|
139
139
|
]),
|
|
140
140
|
_: 2
|
|
141
141
|
}, [
|
|
142
142
|
n.icon ? {
|
|
143
143
|
name: "icon-prepend",
|
|
144
144
|
fn: o(() => [
|
|
145
|
-
|
|
145
|
+
i(e(l), {
|
|
146
146
|
name: n.icon
|
|
147
147
|
}, null, 8, ["name"])
|
|
148
148
|
]),
|
|
@@ -151,14 +151,11 @@ const R = /* @__PURE__ */ x({
|
|
|
151
151
|
]), 1032, ["size", "variation", "weight", "onClick"]))), 128)),
|
|
152
152
|
t.closable ? (s(), S(e(y), {
|
|
153
153
|
key: 0,
|
|
154
|
-
onClick:
|
|
154
|
+
onClick: h(N, ["stop"]),
|
|
155
155
|
variation: "gray-link"
|
|
156
156
|
}, {
|
|
157
157
|
"icon-append": o(() => [
|
|
158
|
-
|
|
159
|
-
]),
|
|
160
|
-
default: o(() => [
|
|
161
|
-
i[2] || (i[2] = l(" a ", -1))
|
|
158
|
+
i(e(l), { name: "close" })
|
|
162
159
|
]),
|
|
163
160
|
_: 1
|
|
164
161
|
})) : L("", !0)
|