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 u, computed as o, openBlock as d, createElementBlock as f, normalizeStyle as g, normalizeClass as v, createElementVNode as S } from "vue";
2
- import { Sizes as h } from "../../../types/styles/Sizes.js";
3
- import { Directions as y } from "../../../enums/ui/Directions2.js";
4
- import { adaptiveAdditionalProps as _, adaptivePropsParams as $, adaptivePropsSizes as z } from "../../../utils/mcSvgIconAdaptiveProps2.js";
5
- import { useHelper as I } from "../../../composables/useHelper2.js";
6
- import { useTheme as P } from "../../../composables/useTheme2.js";
7
- import { SPRITE_IDS as E } from "../../../consts/iconsSpriteIds.js";
8
- const k = ["xlink:href"], M = /* @__PURE__ */ u({
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: () => E.MAIN
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: y.Ltr
60
+ default: A.Ltr
61
61
  }
62
62
  },
63
63
  setup(n) {
64
- const c = I(), e = n, l = P(), p = o(() => {
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 $.forEach((r) => {
67
- z.forEach((s) => {
68
- const i = e[`${r}${c.upperFirst(s)}`];
69
- t[`mc-svg-icon--${r}-${s}-${i}`] = !!i;
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
- }), a = o(() => ({
91
+ }), g = r(() => ({
73
92
  "mc-svg-icon": !0,
74
93
  [`mc-svg-icon--dir-${e.dir}`]: !!e.dir,
75
- ...p.value
76
- })), m = o(() => ({
77
- "--mc-svg-icon-size": h[e.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, r) => (d(), f("svg", {
82
- class: v(a.value),
83
- style: g(m.value)
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
- S("use", {
86
- "xlink:href": `#${e.spriteId}-${e.name}`
87
- }, null, 8, k)
104
+ I("use", {
105
+ "xlink:href": `#${S.value}-${e.name}`
106
+ }, null, 8, x)
88
107
  ], 6));
89
108
  }
90
109
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediacube-ui-v2",
3
- "version": "0.0.268",
3
+ "version": "0.0.269",
4
4
  "license": "MIT",
5
5
  "description": "Design system for Mediacube services",
6
6
  "sideEffects": [