mediacube-ui-v2 0.0.268 → 0.0.269
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,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Sizes as
|
|
3
|
-
import { Directions as
|
|
4
|
-
import { adaptiveAdditionalProps as
|
|
5
|
-
import { useHelper as
|
|
6
|
-
import { useTheme as
|
|
7
|
-
import { SPRITE_IDS as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as v, computed as r, openBlock as h, createElementBlock as y, normalizeStyle as $, normalizeClass as z, createElementVNode as I } from "vue";
|
|
2
|
+
import { Sizes as w } from "../../../types/styles/Sizes.js";
|
|
3
|
+
import { Directions as A } from "../../../enums/ui/Directions2.js";
|
|
4
|
+
import { adaptiveAdditionalProps as N, adaptivePropsParams as P, adaptivePropsSizes as k } from "../../../utils/mcSvgIconAdaptiveProps2.js";
|
|
5
|
+
import { useHelper as E } from "../../../composables/useHelper2.js";
|
|
6
|
+
import { useTheme as G } from "../../../composables/useTheme2.js";
|
|
7
|
+
import { SPRITE_IDS as s } from "../../../consts/iconsSpriteIds.js";
|
|
8
|
+
const x = ["xlink:href"], M = /* @__PURE__ */ v({
|
|
9
9
|
__name: "McSvgIcon",
|
|
10
10
|
props: {
|
|
11
|
-
...
|
|
11
|
+
...N,
|
|
12
12
|
/**
|
|
13
13
|
* Имя иконки
|
|
14
14
|
*/
|
|
@@ -21,7 +21,7 @@ const k = ["xlink:href"], M = /* @__PURE__ */ u({
|
|
|
21
21
|
*/
|
|
22
22
|
spriteId: {
|
|
23
23
|
type: String,
|
|
24
|
-
default: () =>
|
|
24
|
+
default: () => s.MAIN
|
|
25
25
|
},
|
|
26
26
|
/**
|
|
27
27
|
* Цвет иконки
|
|
@@ -57,34 +57,53 @@ const k = ["xlink:href"], M = /* @__PURE__ */ u({
|
|
|
57
57
|
},
|
|
58
58
|
dir: {
|
|
59
59
|
type: String,
|
|
60
|
-
default:
|
|
60
|
+
default: A.Ltr
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
setup(n) {
|
|
64
|
-
const c =
|
|
64
|
+
const c = E(), e = n, l = G(), p = [
|
|
65
|
+
"card_mir_colored",
|
|
66
|
+
"clickup",
|
|
67
|
+
"instagram_colored",
|
|
68
|
+
"mc_pay_mobile_app",
|
|
69
|
+
"mc_vidwide",
|
|
70
|
+
"messenger_colored",
|
|
71
|
+
"payoneer_colored",
|
|
72
|
+
"personal_email_colored",
|
|
73
|
+
"steam_colored",
|
|
74
|
+
"telegram_colored"
|
|
75
|
+
], m = new Set(p), d = [
|
|
76
|
+
"flag_ar",
|
|
77
|
+
"flag_en",
|
|
78
|
+
"flag_es",
|
|
79
|
+
"flag_pt",
|
|
80
|
+
"flag_ru",
|
|
81
|
+
"flag_th",
|
|
82
|
+
"flag_vi"
|
|
83
|
+
], u = new Set(d), f = r(() => {
|
|
65
84
|
const t = {};
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
t[`mc-svg-icon--${
|
|
85
|
+
return P.forEach((o) => {
|
|
86
|
+
k.forEach((i) => {
|
|
87
|
+
const a = e[`${o}${c.upperFirst(i)}`];
|
|
88
|
+
t[`mc-svg-icon--${o}-${i}-${a}`] = !!a;
|
|
70
89
|
});
|
|
71
90
|
}), t;
|
|
72
|
-
}),
|
|
91
|
+
}), g = r(() => ({
|
|
73
92
|
"mc-svg-icon": !0,
|
|
74
93
|
[`mc-svg-icon--dir-${e.dir}`]: !!e.dir,
|
|
75
|
-
...
|
|
76
|
-
})),
|
|
77
|
-
"--mc-svg-icon-size":
|
|
94
|
+
...f.value
|
|
95
|
+
})), _ = r(() => ({
|
|
96
|
+
"--mc-svg-icon-size": w[e.size],
|
|
78
97
|
"--mc-svg-icon-weight": String(e.weight)?.replace(".", "")?.split("")?.join("."),
|
|
79
98
|
"--mc-svg-icon-color": e.color && l.colors[e.color]
|
|
80
|
-
}));
|
|
81
|
-
return (t,
|
|
82
|
-
class:
|
|
83
|
-
style:
|
|
99
|
+
})), S = r(() => m.has(e.name) ? s.GRADS : u.has(e.name) ? s.FLAGS : e.spriteId);
|
|
100
|
+
return (t, o) => (h(), y("svg", {
|
|
101
|
+
class: z(g.value),
|
|
102
|
+
style: $(_.value)
|
|
84
103
|
}, [
|
|
85
|
-
|
|
86
|
-
"xlink:href": `#${
|
|
87
|
-
}, null, 8,
|
|
104
|
+
I("use", {
|
|
105
|
+
"xlink:href": `#${S.value}-${e.name}`
|
|
106
|
+
}, null, 8, x)
|
|
88
107
|
], 6));
|
|
89
108
|
}
|
|
90
109
|
});
|