@telefonica/mistica 14.43.0 → 14.45.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.
Files changed (57) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/avatar.js +14 -13
  3. package/dist/badge.css-mistica.js +9 -6
  4. package/dist/badge.css.d.ts +1 -0
  5. package/dist/badge.d.ts +2 -2
  6. package/dist/badge.js +23 -20
  7. package/dist/checkbox.css.d.ts +1 -1
  8. package/dist/feedback.css-mistica.js +11 -14
  9. package/dist/feedback.css.d.ts +0 -1
  10. package/dist/feedback.js +10 -11
  11. package/dist/highlighted-card.d.ts +2 -2
  12. package/dist/icon-button.css-mistica.js +98 -5
  13. package/dist/icon-button.css.d.ts +17 -1
  14. package/dist/icon-button.d.ts +70 -27
  15. package/dist/icon-button.js +168 -30
  16. package/dist/image.css-mistica.js +13 -4
  17. package/dist/image.css.d.ts +3 -1
  18. package/dist/image.d.ts +1 -0
  19. package/dist/image.js +47 -48
  20. package/dist/index.d.ts +4 -2
  21. package/dist/index.js +13 -0
  22. package/dist/logo.d.ts +1 -0
  23. package/dist/logo.js +110 -68
  24. package/dist/package-version.js +1 -1
  25. package/dist/skins/constants.d.ts +1 -0
  26. package/dist/skins/constants.js +4 -1
  27. package/dist/skins/tu.d.ts +47 -0
  28. package/dist/skins/tu.js +362 -0
  29. package/dist/skins/types/index.d.ts +1 -1
  30. package/dist/skins/utils.js +7 -4
  31. package/dist/tag.css-mistica.js +1 -1
  32. package/dist/tag.d.ts +1 -0
  33. package/dist/tag.js +34 -21
  34. package/dist/utils/css.d.ts +0 -1
  35. package/dist/utils/css.js +5 -15
  36. package/dist/video.js +40 -39
  37. package/dist-es/avatar.js +19 -18
  38. package/dist-es/badge.css-mistica.js +2 -2
  39. package/dist-es/badge.js +35 -32
  40. package/dist-es/feedback.css-mistica.js +2 -2
  41. package/dist-es/feedback.js +24 -25
  42. package/dist-es/icon-button.css-mistica.js +51 -2
  43. package/dist-es/icon-button.js +160 -34
  44. package/dist-es/image.css-mistica.js +2 -2
  45. package/dist-es/image.js +70 -71
  46. package/dist-es/index.js +1742 -1741
  47. package/dist-es/logo.js +128 -89
  48. package/dist-es/package-version.js +1 -1
  49. package/dist-es/skins/constants.js +2 -2
  50. package/dist-es/skins/tu.js +345 -0
  51. package/dist-es/skins/utils.js +21 -18
  52. package/dist-es/style.css +1 -1
  53. package/dist-es/tag.css-mistica.js +1 -1
  54. package/dist-es/tag.js +49 -36
  55. package/dist-es/utils/css.js +8 -15
  56. package/dist-es/video.js +43 -47
  57. package/package.json +1 -1
@@ -0,0 +1,362 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ getTuSkin: function() {
13
+ return d;
14
+ },
15
+ palette: function() {
16
+ return e;
17
+ }
18
+ });
19
+ const _constants = require("./constants.js");
20
+ const _color = require("../utils/color.js");
21
+ const e = {
22
+ primary: "#2B3447",
23
+ primary10: "#EAEBED",
24
+ primary15: "#D5D6DA",
25
+ primary45: "#555D6C",
26
+ primary65: "#202735",
27
+ primary80: "#161A24",
28
+ blue: "#4343FF",
29
+ blue10: "#ECECFF",
30
+ blue20: "#C7C7FF",
31
+ blue30: "#A1A1FF",
32
+ blue70: "#3232B9",
33
+ orange: "#EFE384",
34
+ orange20: "#FAF7DA",
35
+ orange55: "#D5C77D",
36
+ orange65: "#BBAF6F",
37
+ orange70: "#958946",
38
+ red: "#CB4D3A",
39
+ red10: "#FAEDEB",
40
+ red40: "#DB8275",
41
+ red55: "#BB4736",
42
+ red70: "#8E3629",
43
+ red80: "#5B231A",
44
+ purple: "#7274E7",
45
+ purple10: "#F1F1FD",
46
+ purple40: "#9C9EEE",
47
+ purple70: "#5051A2",
48
+ green: "#00D19D",
49
+ green10: "#E5FAF5",
50
+ green40: "#A1DFCF",
51
+ green75: "#007D5E",
52
+ grey1: "#F2F4FF",
53
+ grey2: "#D1D5E4",
54
+ grey3: "#B0B6CA",
55
+ grey4: "#8F97AF",
56
+ grey5: "#6E7894",
57
+ grey6: "#58617A",
58
+ grey7: "#414B61",
59
+ grey8: "#2B3447",
60
+ grey9: "#031A34",
61
+ white: "#FFFFFF",
62
+ darkModeBlack: "#161A24",
63
+ darkModeGrey: "#202735",
64
+ darkModeGrey6: "#2B3447"
65
+ }, d = ()=>({
66
+ name: _constants.TU_SKIN,
67
+ colors: {
68
+ appBarBackground: e.white,
69
+ background: e.white,
70
+ backgroundContainer: e.white,
71
+ backgroundContainerHover: (0, _color.applyAlpha)(e.grey9, 0.03),
72
+ backgroundContainerPressed: (0, _color.applyAlpha)(e.grey9, 0.05),
73
+ backgroundContainerBrand: e.primary,
74
+ backgroundContainerBrandHover: (0, _color.applyAlpha)(e.grey9, 0.2),
75
+ backgroundContainerBrandPressed: (0, _color.applyAlpha)(e.grey9, 0.4),
76
+ backgroundContainerBrandOverInverse: e.primary80,
77
+ backgroundContainerAlternative: e.grey1,
78
+ backgroundBrand: e.primary,
79
+ backgroundBrandSecondary: e.blue,
80
+ backgroundOverlay: (0, _color.applyAlpha)(e.primary, 0.8),
81
+ backgroundSkeleton: e.grey2,
82
+ backgroundSkeletonInverse: e.primary65,
83
+ navigationBarBackground: e.primary,
84
+ backgroundAlternative: e.grey1,
85
+ backgroundFeedbackBottom: e.primary,
86
+ skeletonWave: e.grey2,
87
+ borderLow: e.grey1,
88
+ border: e.grey2,
89
+ borderHigh: e.grey5,
90
+ borderSelected: e.blue,
91
+ coverBackgroundHover: (0, _color.applyAlpha)(e.grey9, 0.25),
92
+ coverBackgroundPressed: (0, _color.applyAlpha)(e.grey9, 0.35),
93
+ buttonDangerBackground: e.red,
94
+ buttonDangerBackgroundSelected: e.red55,
95
+ buttonDangerBackgroundHover: e.red55,
96
+ buttonLinkDangerBackgroundSelected: e.red10,
97
+ buttonLinkDangerBackgroundInverse: e.white,
98
+ buttonLinkDangerBackgroundInverseSelected: e.red10,
99
+ buttonLinkBackgroundSelected: e.blue10,
100
+ buttonLinkBackgroundInverseSelected: (0, _color.applyAlpha)(e.white, 0.08),
101
+ buttonPrimaryBackground: e.primary,
102
+ buttonPrimaryBackgroundInverse: e.white,
103
+ buttonPrimaryBackgroundSelected: e.primary45,
104
+ buttonPrimaryBackgroundHover: e.primary45,
105
+ buttonPrimaryBackgroundInverseSelected: (0, _color.applyAlpha)(e.white, 0.8),
106
+ buttonSecondaryBorder: e.blue,
107
+ buttonSecondaryBorderSelected: e.blue70,
108
+ buttonSecondaryBackgroundHover: e.blue10,
109
+ buttonSecondaryBackgroundSelected: e.blue10,
110
+ buttonSecondaryBorderInverse: e.white,
111
+ buttonSecondaryBorderInverseSelected: e.white,
112
+ buttonSecondaryBackgroundInverseHover: (0, _color.applyAlpha)(e.white, 0.1),
113
+ buttonSecondaryBackgroundInverseSelected: (0, _color.applyAlpha)(e.white, 0.1),
114
+ textButtonPrimary: e.white,
115
+ textButtonPrimaryInverse: e.primary,
116
+ textButtonPrimaryInverseSelected: e.primary,
117
+ textButtonSecondary: e.blue,
118
+ textButtonSecondarySelected: e.blue70,
119
+ textButtonSecondaryInverse: e.white,
120
+ textButtonSecondaryInverseSelected: e.white,
121
+ textLink: e.blue,
122
+ textLinkInverse: e.white,
123
+ textLinkDanger: e.red,
124
+ textLinkSnackbar: e.white,
125
+ control: e.grey5,
126
+ controlActivated: e.primary,
127
+ controlInverse: e.white,
128
+ controlActivatedInverse: e.white,
129
+ controlError: e.red,
130
+ barTrack: e.grey2,
131
+ loadingBar: e.green40,
132
+ loadingBarBackground: e.green,
133
+ toggleAndroidInactive: e.grey2,
134
+ toggleAndroidBackgroundActive: e.primary15,
135
+ iosControlKnob: e.white,
136
+ divider: e.grey2,
137
+ dividerInverse: (0, _color.applyAlpha)(e.white, 0.2),
138
+ navigationBarDivider: e.grey2,
139
+ badge: e.blue,
140
+ feedbackErrorBackground: e.red,
141
+ feedbackInfoBackground: e.primary,
142
+ brand: e.blue,
143
+ brandHigh: e.blue70,
144
+ brandLow: e.blue10,
145
+ inverse: e.white,
146
+ neutralHigh: e.grey9,
147
+ neutralMedium: e.grey5,
148
+ neutralMediumInverse: e.grey5,
149
+ neutralLow: e.grey1,
150
+ neutralLowAlternative: e.grey2,
151
+ textPrimary: e.grey9,
152
+ textPrimaryInverse: e.white,
153
+ textSecondary: e.grey6,
154
+ textSecondaryInverse: e.grey3,
155
+ error: e.red,
156
+ success: e.green,
157
+ warning: e.orange,
158
+ promo: e.blue,
159
+ highlight: e.red40,
160
+ successLow: e.green10,
161
+ warningLow: e.orange20,
162
+ errorLow: e.red10,
163
+ promoLow: e.blue10,
164
+ successHigh: e.green75,
165
+ warningHigh: e.orange70,
166
+ errorHigh: e.red70,
167
+ promoHigh: e.blue,
168
+ successHighInverse: e.green75,
169
+ warningHighInverse: e.orange70,
170
+ errorHighInverse: e.red70,
171
+ promoHighInverse: e.blue,
172
+ textNavigationBarPrimary: e.white,
173
+ textNavigationBarSecondary: e.grey1,
174
+ textNavigationSearchBarHint: e.grey1,
175
+ textNavigationSearchBarText: e.white,
176
+ textAppBar: e.grey6,
177
+ textAppBarSelected: e.primary,
178
+ customTabsBackground: e.white
179
+ },
180
+ darkModeColors: {
181
+ background: e.darkModeBlack,
182
+ backgroundAlternative: e.darkModeBlack,
183
+ backgroundBrand: e.darkModeBlack,
184
+ backgroundBrandSecondary: e.darkModeBlack,
185
+ backgroundContainer: e.darkModeGrey,
186
+ backgroundContainerHover: (0, _color.applyAlpha)(e.white, 0.03),
187
+ backgroundContainerPressed: (0, _color.applyAlpha)(e.white, 0.05),
188
+ backgroundContainerBrand: e.darkModeGrey,
189
+ backgroundContainerBrandHover: (0, _color.applyAlpha)(e.white, 0.03),
190
+ backgroundContainerBrandPressed: (0, _color.applyAlpha)(e.white, 0.05),
191
+ backgroundContainerBrandOverInverse: e.darkModeGrey,
192
+ backgroundContainerAlternative: e.darkModeGrey,
193
+ backgroundOverlay: (0, _color.applyAlpha)(e.darkModeGrey, 0.8),
194
+ backgroundSkeleton: e.darkModeGrey6,
195
+ backgroundSkeletonInverse: e.darkModeGrey6,
196
+ backgroundFeedbackBottom: e.darkModeBlack,
197
+ appBarBackground: e.darkModeGrey,
198
+ navigationBarBackground: e.darkModeBlack,
199
+ skeletonWave: e.grey5,
200
+ borderLow: e.darkModeBlack,
201
+ border: e.darkModeGrey,
202
+ borderHigh: e.grey5,
203
+ borderSelected: e.blue30,
204
+ coverBackgroundHover: (0, _color.applyAlpha)(e.darkModeBlack, 0.25),
205
+ coverBackgroundPressed: (0, _color.applyAlpha)(e.darkModeBlack, 0.35),
206
+ buttonDangerBackground: e.red,
207
+ buttonDangerBackgroundSelected: e.red80,
208
+ buttonDangerBackgroundHover: e.red80,
209
+ buttonLinkBackgroundSelected: (0, _color.applyAlpha)(e.white, 0.08),
210
+ buttonLinkBackgroundInverseSelected: (0, _color.applyAlpha)(e.white, 0.08),
211
+ buttonPrimaryBackground: e.grey2,
212
+ buttonPrimaryBackgroundInverse: e.grey2,
213
+ buttonPrimaryBackgroundSelected: e.grey3,
214
+ buttonPrimaryBackgroundHover: e.grey3,
215
+ buttonPrimaryBackgroundInverseSelected: e.blue70,
216
+ buttonSecondaryBackgroundSelected: (0, _color.applyAlpha)(e.grey2, 0.15),
217
+ buttonSecondaryBorder: e.grey2,
218
+ buttonSecondaryBackgroundHover: (0, _color.applyAlpha)(e.grey2, 0.15),
219
+ buttonSecondaryBorderSelected: e.grey2,
220
+ buttonSecondaryBorderInverse: e.grey2,
221
+ buttonSecondaryBorderInverseSelected: e.grey2,
222
+ buttonSecondaryBackgroundInverseHover: (0, _color.applyAlpha)(e.grey2, 0.15),
223
+ buttonSecondaryBackgroundInverseSelected: (0, _color.applyAlpha)(e.grey2, 0.15),
224
+ textButtonPrimary: e.primary,
225
+ textButtonPrimaryInverse: e.primary,
226
+ textButtonPrimaryInverseSelected: e.primary,
227
+ textButtonSecondary: e.grey2,
228
+ textButtonSecondarySelected: e.grey2,
229
+ textButtonSecondaryInverse: e.grey2,
230
+ textButtonSecondaryInverseSelected: e.grey2,
231
+ textLink: e.blue30,
232
+ textLinkInverse: e.blue30,
233
+ textLinkDanger: e.red,
234
+ textLinkSnackbar: e.blue30,
235
+ control: e.darkModeGrey6,
236
+ controlActivated: e.blue30,
237
+ controlInverse: e.darkModeGrey6,
238
+ controlActivatedInverse: e.blue30,
239
+ controlError: e.red,
240
+ loadingBar: e.blue,
241
+ loadingBarBackground: e.blue20,
242
+ toggleAndroidInactive: e.grey4,
243
+ toggleAndroidBackgroundActive: e.blue20,
244
+ iosControlKnob: e.grey2,
245
+ divider: (0, _color.applyAlpha)(e.white, 0.05),
246
+ dividerInverse: (0, _color.applyAlpha)(e.white, 0.05),
247
+ navigationBarDivider: e.darkModeBlack,
248
+ badge: e.red70,
249
+ feedbackErrorBackground: e.red,
250
+ feedbackInfoBackground: e.darkModeGrey,
251
+ brand: e.blue30,
252
+ brandHigh: (0, _color.applyAlpha)(e.white, 0.05),
253
+ inverse: e.grey2,
254
+ neutralHigh: e.grey2,
255
+ neutralMedium: e.grey5,
256
+ neutralMediumInverse: e.grey5,
257
+ neutralLow: e.darkModeGrey6,
258
+ neutralLowAlternative: e.darkModeGrey6,
259
+ textPrimary: e.grey2,
260
+ textPrimaryInverse: e.grey2,
261
+ textSecondary: e.grey4,
262
+ textSecondaryInverse: e.grey4,
263
+ error: e.red,
264
+ success: e.green,
265
+ warning: e.orange,
266
+ promo: e.blue,
267
+ highlight: e.red40,
268
+ successLow: e.darkModeGrey6,
269
+ warningLow: e.darkModeGrey6,
270
+ errorLow: e.darkModeGrey6,
271
+ promoLow: e.darkModeGrey6,
272
+ brandLow: e.darkModeGrey6,
273
+ successHigh: e.green40,
274
+ warningHigh: e.orange55,
275
+ errorHigh: e.red40,
276
+ promoHigh: e.blue30,
277
+ successHighInverse: e.green75,
278
+ warningHighInverse: e.orange70,
279
+ errorHighInverse: e.red70,
280
+ promoHighInverse: e.blue70,
281
+ textNavigationBarPrimary: e.grey2,
282
+ textNavigationBarSecondary: e.grey4,
283
+ textNavigationSearchBarHint: e.grey4,
284
+ textNavigationSearchBarText: e.grey2,
285
+ textAppBar: e.grey5,
286
+ textAppBarSelected: e.grey2,
287
+ customTabsBackground: e.darkModeBlack
288
+ },
289
+ borderRadii: {
290
+ avatar: "50%",
291
+ bar: "999px",
292
+ button: "999px",
293
+ checkbox: "2px",
294
+ container: "16px",
295
+ indicator: "999px",
296
+ input: "12px",
297
+ legacyDisplay: "16px",
298
+ popup: "8px",
299
+ sheet: "16px",
300
+ mediaSmall: "8px"
301
+ },
302
+ textPresets: {
303
+ cardTitle: {
304
+ weight: "medium"
305
+ },
306
+ button: {
307
+ weight: "medium"
308
+ },
309
+ tabsLabel: {
310
+ weight: "medium",
311
+ size: {
312
+ mobile: 16,
313
+ desktop: 18
314
+ },
315
+ lineHeight: {
316
+ mobile: 24,
317
+ desktop: 24
318
+ }
319
+ },
320
+ link: {
321
+ weight: "medium"
322
+ },
323
+ title1: {
324
+ weight: "medium"
325
+ },
326
+ title2: {
327
+ weight: "medium",
328
+ size: {
329
+ mobile: 20,
330
+ desktop: 28
331
+ },
332
+ lineHeight: {
333
+ mobile: 24,
334
+ desktop: 32
335
+ }
336
+ },
337
+ indicator: {
338
+ weight: "medium"
339
+ },
340
+ navigationBar: {
341
+ weight: "medium"
342
+ },
343
+ text5: {
344
+ weight: "medium"
345
+ },
346
+ text6: {
347
+ weight: "medium"
348
+ },
349
+ text7: {
350
+ weight: "medium"
351
+ },
352
+ text8: {
353
+ weight: "medium"
354
+ },
355
+ text9: {
356
+ weight: "medium"
357
+ },
358
+ text10: {
359
+ weight: "medium"
360
+ }
361
+ }
362
+ });
@@ -1,7 +1,7 @@
1
1
  import type { Colors } from './colors';
2
2
  export type { Colors } from './colors';
3
3
  export type SkinVariant = 'prominent';
4
- export type KnownSkinName = 'Movistar' | 'O2' | 'O2-classic' | 'Vivo' | 'Vivo-new' | 'Telefonica' | 'Blau';
4
+ export type KnownSkinName = 'Movistar' | 'O2' | 'O2-classic' | 'Vivo' | 'Vivo-new' | 'Telefonica' | 'Blau' | 'Tu';
5
5
  export type SkinName = KnownSkinName | string;
6
6
  export type GetKnownSkin = (variant?: SkinVariant) => KnownSkin;
7
7
  export type FontWeight = 'light' | 'regular' | 'medium' | 'bold';
@@ -10,10 +10,10 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  flattenChildren: function() {
13
- return O;
13
+ return A;
14
14
  },
15
15
  getSkinByName: function() {
16
- return C;
16
+ return d;
17
17
  }
18
18
  });
19
19
  const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
@@ -25,6 +25,7 @@ const _vivonew = require("./vivo-new.js");
25
25
  const _o2 = require("./o2.js");
26
26
  const _o2classic = require("./o2-classic.js");
27
27
  const _movistar = require("./movistar.js");
28
+ const _tu = require("./tu.js");
28
29
  function _getRequireWildcardCache(nodeInterop) {
29
30
  if (typeof WeakMap !== "function") return null;
30
31
  var cacheBabelInterop = new WeakMap();
@@ -66,7 +67,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
66
67
  }
67
68
  return newObj;
68
69
  }
69
- const C = (r, o)=>{
70
+ const d = (r, o)=>{
70
71
  switch(r){
71
72
  case _constants.BLAU_SKIN:
72
73
  return (0, _blau.getBlauSkin)();
@@ -82,7 +83,9 @@ const C = (r, o)=>{
82
83
  return (0, _o2classic.getO2ClassicSkin)();
83
84
  case _constants.MOVISTAR_SKIN:
84
85
  return (0, _movistar.getMovistarSkin)();
86
+ case _constants.TU_SKIN:
87
+ return (0, _tu.getTuSkin)();
85
88
  default:
86
89
  throw Error("Unknown skin name: " + r);
87
90
  }
88
- }, O = (r)=>_react.Children.toArray(r).reduce((t, e)=>e.type === _react.Fragment ? t.concat(O(e.props.children)) : (t.push(e), t), []);
91
+ }, A = (r)=>_react.Children.toArray(r).reduce((t, e)=>e.type === _react.Fragment ? t.concat(A(e.props.children)) : (t.push(e), t), []);
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "tag", {
10
10
  });
11
11
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
12
12
  require("./tag.css.ts.vanilla.css-mistica.js");
13
- var y = "_1wy08671 _1y2v1nf6h _1y2v1nf7q _1y2v1nfgj _1y2v1nfgn _1y2v1nfgx _1y2v1nfgr _1y2v1nfie _1y2v1nfae";
13
+ var y = "_1wy08671 _1y2v1nf6h _1y2v1nf7q _1y2v1nfgj _1y2v1nfgn _1y2v1nfgx _1y2v1nfgr _1y2v1nfie";
package/dist/tag.d.ts CHANGED
@@ -6,6 +6,7 @@ export type TagProps = {
6
6
  children: string;
7
7
  Icon?: React.FC<IconProps>;
8
8
  dataAttributes?: DataAttributes;
9
+ badge?: boolean | number;
9
10
  };
10
11
  declare const Tag: React.FC<TagProps>;
11
12
  export default Tag;
package/dist/tag.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function() {
9
- return D;
9
+ return F;
10
10
  }
11
11
  });
12
12
  const _jsxruntime = require("react/jsx-runtime");
@@ -20,6 +20,7 @@ const _sprinklescssmistica = require("./sprinkles.css-mistica.js");
20
20
  const _skincontractcssmistica = require("./skins/skin-contract.css-mistica.js");
21
21
  const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
22
22
  const _hooks = require("./hooks.js");
23
+ const _badge = /*#__PURE__*/ _interop_require_default(require("./badge.js"));
23
24
  function _interop_require_default(obj) {
24
25
  return obj && obj.__esModule ? obj : {
25
26
  default: obj
@@ -77,11 +78,11 @@ function _object_spread_props(target, source) {
77
78
  }
78
79
  return target;
79
80
  }
80
- const { colors: r } = _skincontractcssmistica.vars, k = (param)=>{
81
- let { Icon: o, children: s, dataAttributes: c, type: g = "promo" } = param;
82
- const { textPresets: l } = (0, _hooks.useTheme)(), i = (0, _themevariantcontext.useThemeVariant)(), t = i === "inverse";
83
- if (!s) return null;
84
- const p = {
81
+ const { colors: r } = _skincontractcssmistica.vars, y = (param)=>{
82
+ let { Icon: o, children: n, dataAttributes: d, type: u = "promo", badge: a } = param;
83
+ const { textPresets: h } = (0, _hooks.useTheme)(), m = (0, _themevariantcontext.useThemeVariant)(), i = m === "inverse", t = a === !0 ? void 0 : a || 0;
84
+ if (!n) return null;
85
+ const f = {
85
86
  // [textColor, inverseTextColor, backgroundColor]
86
87
  promo: [
87
88
  r.promoHigh,
@@ -96,7 +97,7 @@ const { colors: r } = _skincontractcssmistica.vars, k = (param)=>{
96
97
  inactive: [
97
98
  r.neutralMedium,
98
99
  r.neutralMediumInverse,
99
- i === "alternative" ? r.neutralLowAlternative : r.neutralLow
100
+ m === "alternative" ? r.neutralLowAlternative : r.neutralLow
100
101
  ],
101
102
  success: [
102
103
  r.successHigh,
@@ -113,34 +114,46 @@ const { colors: r } = _skincontractcssmistica.vars, k = (param)=>{
113
114
  r.errorHighInverse,
114
115
  r.errorLow
115
116
  ]
116
- }, [n, a, u] = p[g];
117
- return /* @__PURE__ */ (0, _jsxruntime.jsxs)("span", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(c, "Tag")), {
117
+ }, [l, c, v] = f[u];
118
+ return /* @__PURE__ */ (0, _jsxruntime.jsxs)("span", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(d, "Tag")), {
118
119
  className: (0, _classnames.default)(_tagcssmistica.tag, (0, _sprinklescssmistica.sprinkles)({
119
120
  paddingLeft: o ? 8 : 12,
120
- background: t ? r.inverse : u
121
+ paddingRight: t !== 0 ? 8 : 12,
122
+ background: i ? r.inverse : v
121
123
  })),
122
124
  children: [
123
125
  o && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
124
126
  paddingRight: 4,
125
127
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(o, {
126
- color: t ? a : n,
128
+ color: i ? c : l,
127
129
  size: (0, _css.pxToRem)(16),
128
130
  className: (0, _sprinklescssmistica.sprinkles)({
129
131
  display: "block"
130
132
  })
131
133
  })
132
134
  }),
133
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_themevariantcontext.ThemeVariant, {
135
+ /* @__PURE__ */ (0, _jsxruntime.jsxs)(_themevariantcontext.ThemeVariant, {
134
136
  isInverse: !1,
135
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
136
- color: t ? a : n,
137
- size: 14,
138
- lineHeight: 20,
139
- weight: l.indicator.weight,
140
- truncate: !0,
141
- children: s
142
- })
137
+ children: [
138
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
139
+ color: i ? c : l,
140
+ size: 14,
141
+ lineHeight: 20,
142
+ weight: h.indicator.weight,
143
+ truncate: !0,
144
+ children: n
145
+ }),
146
+ t !== 0 && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
147
+ paddingLeft: 4,
148
+ className: (0, _sprinklescssmistica.sprinkles)({
149
+ display: "inline-flex"
150
+ }),
151
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {
152
+ value: t
153
+ })
154
+ })
155
+ ]
143
156
  })
144
157
  ]
145
158
  }));
146
- }, D = k;
159
+ }, F = y;
@@ -4,4 +4,3 @@ export declare const safeAreaInsetLeft: string;
4
4
  export declare const safeAreaInsetTop: string;
5
5
  export declare const safeAreaInsetBottom: string;
6
6
  export declare const safeAreaInsetRight: string;
7
- export declare const fallbackStyles: (...values: Array<string>) => string;
package/dist/utils/css.js CHANGED
@@ -10,16 +10,13 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  applyCssVars: function() {
13
- return p;
14
- },
15
- fallbackStyles: function() {
16
- return o;
13
+ return i;
17
14
  },
18
15
  pxToRem: function() {
19
- return f;
16
+ return o;
20
17
  },
21
18
  safeAreaInsetBottom: function() {
22
- return v;
19
+ return c;
23
20
  }
24
21
  });
25
22
  const _dynamic = require("@vanilla-extract/dynamic");
@@ -52,15 +49,8 @@ function _object_spread(target) {
52
49
  }
53
50
  return target;
54
51
  }
55
- const n = 16, f = (e)=>`${(parseFloat(e) / n).toFixed(3)}rem`, p = (e)=>_object_spread({}, (0, _dynamic.assignInlineVars)(e));
52
+ const s = 16, o = (a)=>`${(parseFloat(a) / s).toFixed(3)}rem`, i = (a)=>_object_spread({}, (0, _dynamic.assignInlineVars)(a));
56
53
  (0, _platform.isRunningAcceptanceTest)();
57
54
  (0, _platform.isRunningAcceptanceTest)();
58
- const v = (0, _platform.isRunningAcceptanceTest)() ? "max(env(safe-area-inset-bottom), var(--acceptance-test-override-safe-area-inset-bottom, 0px))" : "env(safe-area-inset-bottom)";
55
+ const c = (0, _platform.isRunningAcceptanceTest)() ? "max(env(safe-area-inset-bottom), var(--acceptance-test-override-safe-area-inset-bottom, 0px))" : "env(safe-area-inset-bottom)";
59
56
  (0, _platform.isRunningAcceptanceTest)();
60
- const o = function() {
61
- for(var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++){
62
- e[_key] = arguments[_key];
63
- }
64
- const [a, ...t] = e.filter(Boolean);
65
- return !(a != null && a.startsWith("var(")) || !t.length ? a !== null && a !== void 0 ? a : "" : a.replace(/\)$/, "") + ", " + (t.length > 1 ? o(...t) : t[0]) + ")";
66
- };