@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
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -10,17 +11,31 @@ function _export(target, all) {
10
11
  }
11
12
  _export(exports, {
12
13
  BaseIconButton: function() {
14
+ return re;
15
+ },
16
+ IconButton: function() {
17
+ return U;
18
+ },
19
+ InternalIconButton: function() {
20
+ return X;
21
+ },
22
+ RawDeprecatedIconButton: function() {
13
23
  return B;
14
24
  },
25
+ RawIconButton: function() {
26
+ return R;
27
+ },
15
28
  default: function() {
16
- return w;
29
+ return le;
17
30
  }
18
31
  });
19
32
  const _jsxruntime = require("react/jsx-runtime");
20
33
  const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
21
- const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
22
34
  const _touchable = require("./touchable.js");
23
35
  const _iconbuttoncssmistica = require("./icon-button.css-mistica.js");
36
+ const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
37
+ const _spinner = /*#__PURE__*/ _interop_require_default(require("./spinner.js"));
38
+ const _themevariantcontext = require("./theme-variant-context.js");
24
39
  function _interop_require_default(obj) {
25
40
  return obj && obj.__esModule ? obj : {
26
41
  default: obj
@@ -119,22 +134,50 @@ function _object_spread_props(target, source) {
119
134
  }
120
135
  return target;
121
136
  }
122
- const s = 24, b = (e, t, a, n, l)=>{
123
- const m = n ? `${n}px ${n}px` : "100% 100%";
137
+ function _object_without_properties(source, excluded) {
138
+ if (source == null) return {};
139
+ var target = _object_without_properties_loose(source, excluded);
140
+ var key, i;
141
+ if (Object.getOwnPropertySymbols) {
142
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
143
+ for(i = 0; i < sourceSymbolKeys.length; i++){
144
+ key = sourceSymbolKeys[i];
145
+ if (excluded.indexOf(key) >= 0) continue;
146
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
147
+ target[key] = source[key];
148
+ }
149
+ }
150
+ return target;
151
+ }
152
+ function _object_without_properties_loose(source, excluded) {
153
+ if (source == null) return {};
154
+ var target = {};
155
+ var sourceKeys = Object.keys(source);
156
+ var key, i;
157
+ for(i = 0; i < sourceKeys.length; i++){
158
+ key = sourceKeys[i];
159
+ if (excluded.indexOf(key) >= 0) continue;
160
+ target[key] = source[key];
161
+ }
162
+ return target;
163
+ }
164
+ const y = 24, Q = (e, t, r, a, o)=>{
165
+ const s = a ? `${a}px ${a}px` : "100% 100%";
124
166
  return {
125
167
  padding: 0,
126
- backgroundColor: a,
168
+ backgroundColor: r,
127
169
  backgroundImage: e ? `url(${e})` : "initial",
128
- backgroundSize: m,
129
- cursor: l ? "default" : "pointer",
170
+ backgroundSize: s,
171
+ cursor: o ? "default" : "pointer",
130
172
  height: t,
131
173
  width: t,
132
174
  verticalAlign: "middle",
133
175
  textAlign: "center"
134
176
  };
135
- }, u = (e)=>{
136
- const { icon: t, children: a } = e, n = {
177
+ }, B = /*#__PURE__*/ _react.forwardRef((e, t)=>{
178
+ const { icon: r, children: a } = e, o = {
137
179
  className: e.className || "",
180
+ ref: t,
138
181
  disabled: e.disabled,
139
182
  style: e.style,
140
183
  trackingEvent: e.trackingEvent,
@@ -143,43 +186,138 @@ const s = 24, b = (e, t, a, n, l)=>{
143
186
  "component-name": "IconButton"
144
187
  }, e.dataAttributes)
145
188
  };
146
- return e.href ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, n), {
189
+ return e.href ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, o), {
147
190
  href: e.href,
148
191
  newTab: e.newTab,
149
192
  "aria-label": e["aria-label"],
150
- children: !t && _react.Children.only(a)
151
- })) : e.to ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, n), {
193
+ children: !r && _react.Children.only(a)
194
+ })) : e.to ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, o), {
152
195
  to: e.to,
153
196
  fullPageOnWebView: e.fullPageOnWebView,
154
197
  replace: e.replace,
155
198
  "aria-label": e["aria-label"],
156
- children: !t && _react.Children.only(a)
157
- })) : e.onPress ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, n), {
158
- onPress: (l)=>{
159
- l.stopPropagation(), e.onPress(l);
199
+ children: !r && _react.Children.only(a)
200
+ })) : e.onPress ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, o), {
201
+ onPress: (s)=>{
202
+ s.stopPropagation(), e.onPress(s);
160
203
  },
161
204
  "aria-label": e["aria-label"],
162
- children: !t && _react.Children.only(a)
163
- })) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, n), {
205
+ children: !r && _react.Children.only(a)
206
+ })) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, o), {
207
+ maybe: !0,
208
+ children: !r && _react.Children.only(a)
209
+ }));
210
+ }), R = /*#__PURE__*/ _react.forwardRef((_param, A)=>{
211
+ var { disabled: e, trackingEvent: t, dataAttributes: r, type: a = "neutral", backgroundType: o = "transparent", isOverMedia: s, "aria-label": S, small: N, Icon: C, bleedLeft: T, bleedRight: x, bleedY: z } = _param, i = _object_without_properties(_param, [
212
+ "disabled",
213
+ "trackingEvent",
214
+ "dataAttributes",
215
+ "type",
216
+ "backgroundType",
217
+ "isOverMedia",
218
+ "aria-label",
219
+ "small",
220
+ "Icon",
221
+ "bleedLeft",
222
+ "bleedRight",
223
+ "bleedY"
224
+ ]);
225
+ const O = (0, _themevariantcontext.useThemeVariant)(), [k, g] = _react.useState(!1), c = i.showSpinner || k, [f, w] = _react.useState(!!c);
226
+ _react.useEffect(()=>{
227
+ c && !f && w(!0);
228
+ }, [
229
+ c,
230
+ f
231
+ ]);
232
+ const u = N ? "small" : "default", V = s ? `${a}-media` : `${a}-${o}-${O}`, m = {
233
+ disabled: e || c,
234
+ ref: A,
235
+ trackingEvent: t,
236
+ "aria-label": S,
237
+ role: i.onPress || i.to || i.href ? "button" : void 0,
238
+ dataAttributes: _object_spread({
239
+ "component-name": "IconButton"
240
+ }, r),
241
+ className: (0, _classnames.default)(_iconbuttoncssmistica.buttonContainer[u], _iconbuttoncssmistica.iconButtonTokens[V], {
242
+ [_iconbuttoncssmistica.disabled]: e,
243
+ [_iconbuttoncssmistica.overlayContainer]: !e && !c,
244
+ [_iconbuttoncssmistica.bleedLeft[u]]: T,
245
+ [_iconbuttoncssmistica.bleedRight[u]]: x,
246
+ [_iconbuttoncssmistica.bleedY[u]]: z
247
+ })
248
+ }, h = /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
249
+ className: (0, _classnames.default)(_iconbuttoncssmistica.iconContainer[u], {
250
+ [_iconbuttoncssmistica.isLoading]: c
251
+ }),
252
+ children: [
253
+ /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
254
+ className: _iconbuttoncssmistica.overlay
255
+ }),
256
+ /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
257
+ "aria-hidden": c ? !0 : void 0,
258
+ className: _iconbuttoncssmistica.icon,
259
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(C, {
260
+ size: _iconbuttoncssmistica.iconSize[u],
261
+ color: "currentColor"
262
+ })
263
+ }),
264
+ /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
265
+ "aria-hidden": c ? void 0 : !0,
266
+ className: _iconbuttoncssmistica.spinner,
267
+ onTransitionEnd: ()=>{
268
+ c !== f && w(c);
269
+ },
270
+ children: f && /* @__PURE__ */ (0, _jsxruntime.jsx)(_spinner.default, {
271
+ size: _iconbuttoncssmistica.iconSize[u],
272
+ color: "currentColor",
273
+ delay: "0s"
274
+ })
275
+ })
276
+ ]
277
+ });
278
+ return i.href ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, m), {
279
+ href: i.href,
280
+ newTab: i.newTab,
281
+ children: h
282
+ })) : i.to ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, m), {
283
+ to: i.to,
284
+ fullPageOnWebView: i.fullPageOnWebView,
285
+ replace: i.replace,
286
+ children: h
287
+ })) : i.onPress ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, m), {
288
+ onPress: ($)=>{
289
+ const P = i.onPress($);
290
+ P && (g(!0), P.finally(()=>g(!1)));
291
+ },
292
+ children: h
293
+ })) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, m), {
164
294
  maybe: !0,
165
- children: !t && _react.Children.only(a)
295
+ children: h
166
296
  }));
167
- }, h = (e)=>{
168
- const { icon: t, backgroundColor: a = "transparent", iconSize: n, size: l = s } = e;
169
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(u, _object_spread_props(_object_spread({}, e), {
170
- className: (0, _classnames.default)(_iconbuttoncssmistica.base, e.className),
171
- style: _object_spread({}, b(t, l, a, n, e.disabled), e.style)
297
+ }), X = /*#__PURE__*/ _react.forwardRef((e, t)=>{
298
+ if (e.Icon) return /* @__PURE__ */ (0, _jsxruntime.jsx)(R, _object_spread({
299
+ ref: t
300
+ }, e));
301
+ const { icon: r, backgroundColor: a = "transparent", iconSize: o, size: s = y } = e;
302
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(B, _object_spread_props(_object_spread({
303
+ ref: t
304
+ }, e), {
305
+ className: (0, _classnames.default)(_iconbuttoncssmistica.deprecatedIconButtonBase, e.className),
306
+ style: _object_spread({}, Q(r, s, a, o, e.disabled), e.style)
172
307
  }));
173
- }, B = (e)=>{
174
- const { size: t = s, disabled: a } = e;
175
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(u, _object_spread_props(_object_spread({}, e), {
176
- className: (0, _classnames.default)(_iconbuttoncssmistica.base, e.className),
308
+ }), U = /*#__PURE__*/ _react.forwardRef((e, t)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(X, _object_spread({
309
+ ref: t
310
+ }, e))), re = (e)=>{
311
+ if (e.Icon) return /* @__PURE__ */ (0, _jsxruntime.jsx)(R, _object_spread({}, e));
312
+ const { size: t = y, disabled: r } = e;
313
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(B, _object_spread_props(_object_spread({}, e), {
314
+ className: (0, _classnames.default)(_iconbuttoncssmistica.deprecatedIconButtonBase, e.className),
177
315
  style: {
178
316
  height: t,
179
317
  width: t,
180
- cursor: a ? "default" : "pointer",
318
+ cursor: r ? "default" : "pointer",
181
319
  verticalAlign: "middle",
182
320
  textAlign: "center"
183
321
  }
184
322
  }));
185
- }, w = h;
323
+ }, le = U;
@@ -10,20 +10,29 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  FADE_IN_DURATION_MS: function() {
13
+ return v;
14
+ },
15
+ circularBorderRadius: function() {
13
16
  return _;
14
17
  },
18
+ defaultBorderRadius: function() {
19
+ return t;
20
+ },
15
21
  image: function() {
16
- return a;
22
+ return i;
17
23
  },
18
24
  imageWithBorder: function() {
19
- return t;
25
+ return d;
26
+ },
27
+ noBorderRadius: function() {
28
+ return e;
20
29
  },
21
30
  vars: function() {
22
- return y;
31
+ return f;
23
32
  }
24
33
  });
25
34
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
26
35
  require("./image.css.ts.vanilla.css-mistica.js");
27
- var _ = 300, a = "_17tt25r3 _1y2v1nfjp _1y2v1nfk4 _1y2v1nfgk _1y2v1nfh5 _1y2v1nfhm _1y2v1nfld _1y2v1nfix _1y2v1nfiy _1y2v1nfj9", t = "_17tt25r1", y = {
36
+ var v = 300, _ = "_17tt25r5", t = "_17tt25r6", i = "_17tt25r3 _1y2v1nfjp _1y2v1nfk4 _1y2v1nfgk _1y2v1nfh5 _1y2v1nfhm _1y2v1nfld _1y2v1nfix _1y2v1nfiy _1y2v1nfj9", d = "_17tt25r1", e = "_17tt25r4", f = {
28
37
  mediaBorderRadius: "var(--_17tt25r0)"
29
38
  };
@@ -4,4 +4,6 @@ export declare const vars: {
4
4
  };
5
5
  export declare const imageWithBorder: string;
6
6
  export declare const image: string;
7
- export declare const noBorder: string;
7
+ export declare const noBorderRadius: string;
8
+ export declare const circularBorderRadius: string;
9
+ export declare const defaultBorderRadius: string;
package/dist/image.d.ts CHANGED
@@ -4,6 +4,7 @@ import type { DataAttributes } from './utils/types';
4
4
  type ImageErrorProps = {
5
5
  withIcon?: boolean;
6
6
  borderRadius?: string | number;
7
+ className?: string;
7
8
  border?: boolean;
8
9
  };
9
10
  export declare const ImageError: React.ForwardRefExoticComponent<ImageErrorProps & React.RefAttributes<HTMLDivElement>>;
package/dist/image.js CHANGED
@@ -11,13 +11,13 @@ function _export(target, all) {
11
11
  }
12
12
  _export(exports, {
13
13
  ImageContent: function() {
14
- return X;
14
+ return p;
15
15
  },
16
16
  ImageError: function() {
17
- return Q;
17
+ return Y;
18
18
  },
19
19
  RATIO: function() {
20
- return x;
20
+ return S;
21
21
  },
22
22
  default: function() {
23
23
  return f1;
@@ -38,7 +38,6 @@ const _skincontractcssmistica = require("./skins/skin-contract.css-mistica.js");
38
38
  const _common = require("./utils/common.js");
39
39
  const _skeletonbase = /*#__PURE__*/ _interop_require_default(require("./skeleton-base.js"));
40
40
  const _environment = require("./utils/environment.js");
41
- const _css = require("./utils/css.js");
42
41
  function _interop_require_default(obj) {
43
42
  return obj && obj.__esModule ? obj : {
44
43
  default: obj
@@ -164,23 +163,23 @@ function _object_without_properties_loose(source, excluded) {
164
163
  }
165
164
  return target;
166
165
  }
167
- const J = (param)=>{
168
- let { style: t } = param;
166
+ const X = (param)=>{
167
+ let { style: e } = param;
169
168
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("svg", {
170
169
  width: "48",
171
170
  height: "48",
172
171
  viewBox: "0 0 48 48",
173
172
  fill: "none",
174
- style: t,
173
+ style: e,
175
174
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("path", {
176
175
  d: "M24.021 35.7235C24.8145 35.7694 25.0467 36.1913 25.3157 36.5138C25.586 36.8362 29.515 41.551 29.7823 41.8569C30.0475 42.1662 30.7822 42.7329 31.5901 42.8405C32.3967 42.9473 33.282 42.7842 33.8484 42.3748C34.4135 41.965 35.1313 41.4073 35.3833 41.0356C35.6337 40.6638 36.061 40.1302 35.9823 39.2534C35.9028 38.3783 35.7112 37.9204 35.0268 37.1691C34.3433 36.4185 30.2992 31.6657 29.5382 30.7537C29.5382 30.7537 28.8467 29.9423 28.9469 28.7956C29.0476 27.6468 29.567 27.1343 30.6608 26.8487C31.7534 26.5647 36.0267 25.5306 36.0267 25.5306C36.0267 25.5306 38.4728 24.3723 37.9182 22.0776L37.5997 20.904C37.5997 20.904 37.0672 18.2264 33.5519 19.0556C30.0344 19.8869 28.0803 20.377 28.0803 20.377C28.0803 20.377 26.9602 20.4838 26.7999 19.744C26.6417 19.0038 26.8494 18.6218 27.3443 18.4156C27.8387 18.209 30.9611 16.7175 31.3617 12.6853C31.7652 8.65158 28.3882 5.06573 24.0091 5.08104C19.6288 5.0976 16.4594 8.39988 16.4725 11.8185C16.4856 15.2387 18.7033 17.5144 20.4079 18.3638C21.3752 18.8453 21.0656 19.7122 21.0656 19.7122C21.0656 19.7122 20.8334 20.5554 19.8153 20.3311C18.7972 20.1025 13.8657 18.9736 13.8657 18.9736C13.8657 18.9736 10.8914 18.4226 10.1732 21.359C9.4541 24.2978 11.1261 25.4143 12.3532 25.6908C13.5798 25.9669 17.7296 26.9716 17.7296 26.9716C17.7296 26.9716 18.9643 27.581 19.0125 28.8308C19.0425 29.5697 19.0438 30.1824 18.266 31.2832C17.4894 32.3835 12.6598 38.0148 12.6598 38.0148C12.6598 38.0148 10.9997 39.9862 13.4051 41.763C15.8106 43.5401 17.1641 43.1262 18.5921 41.4889C20.0188 39.852 22.8383 36.4243 22.8383 36.4243C22.8383 36.4243 23.2275 35.6788 24.021 35.7235Z",
177
176
  stroke: _skincontractcssmistica.vars.colors.brand,
178
177
  strokeWidth: "2"
179
178
  })
180
179
  });
181
- }, Q = /*#__PURE__*/ _react.forwardRef((param, m)=>{
182
- let { borderRadius: t, withIcon: a = !0, border: d } = param;
183
- const n = (0, _themevariantcontext.useIsInverseVariant)(), { skinName: s } = (0, _hooks.useTheme)();
180
+ }, Y = /*#__PURE__*/ _react.forwardRef((param, c)=>{
181
+ let { borderRadius: e, withIcon: s = !0, border: d, className: m } = param;
182
+ const o = (0, _themevariantcontext.useIsInverseVariant)(), { skinName: a } = (0, _hooks.useTheme)();
184
183
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
185
184
  style: {
186
185
  height: "100%",
@@ -188,13 +187,14 @@ const J = (param)=>{
188
187
  display: "flex",
189
188
  alignItems: "center",
190
189
  justifyContent: "center",
191
- backgroundColor: n ? _skincontractcssmistica.vars.colors.backgroundSkeletonInverse : _skincontractcssmistica.vars.colors.backgroundSkeleton,
190
+ backgroundColor: o ? _skincontractcssmistica.vars.colors.backgroundSkeletonInverse : _skincontractcssmistica.vars.colors.backgroundSkeleton,
192
191
  boxSizing: "border-box",
193
192
  border: d ? `1px solid ${_skincontractcssmistica.vars.colors.borderLow}` : "none",
194
- borderRadius: t
193
+ borderRadius: e
195
194
  },
196
- ref: m,
197
- children: a ? s === _constants.VIVO_SKIN ? /* @__PURE__ */ (0, _jsxruntime.jsx)(J, {
195
+ ref: c,
196
+ className: m,
197
+ children: s ? a === _constants.VIVO_SKIN ? /* @__PURE__ */ (0, _jsxruntime.jsx)(X, {
198
198
  style: {
199
199
  width: "10%",
200
200
  minWidth: 24,
@@ -209,18 +209,18 @@ const J = (param)=>{
209
209
  maxWidth: 48
210
210
  },
211
211
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("path", {
212
- fill: n ? _skincontractcssmistica.vars.colors.inverse : _skincontractcssmistica.vars.colors.neutralMedium,
212
+ fill: o ? _skincontractcssmistica.vars.colors.inverse : _skincontractcssmistica.vars.colors.neutralMedium,
213
213
  d: "M20.25 4.622c.832 0 1.591.664 1.591 1.393v11.98c0 .728-.76 1.392-1.591 1.392H3.746c-.863 0-1.591-.639-1.591-1.392V6.015c0-.754.728-1.393 1.59-1.393H20.25zm0 13.558c.193 0 .367-.146.39-.207l-.003-11.956a.555.555 0 00-.384-.182H3.746c-.21 0-.364.132-.387.19v11.973c.014.044.171.182.387.182H20.25zM6.152 9.068c0 .554.451 1.005 1.003 1.005a1.006 1.006 0 000-2.01c-.552 0-1.003.45-1.003 1.005zm1.003 2.215a2.216 2.216 0 010-4.43c1.218 0 2.207.993 2.207 2.215a2.213 2.213 0 01-2.207 2.215zm12.42 1.337l-3.18-2.44a.605.605 0 00-.742.005l-3.636 2.9-.879-.83a.6.6 0 00-.798-.025l-5.168 4.317a.607.607 0 00.386 1.07.59.59 0 00.384-.14l4.759-3.975 3.308 3.123c.241.23.625.221.852-.025a.605.605 0 00-.026-.854l-1.932-1.824 3.131-2.496 2.807 2.154a.603.603 0 00.846-.112.609.609 0 00-.112-.848z"
214
214
  })
215
215
  }) : void 0
216
216
  });
217
- }), x = {
217
+ }), S = {
218
218
  "1:1": 1,
219
219
  "16:9": 16 / 9,
220
220
  "7:10": 7 / 10,
221
221
  "4:3": 4 / 3
222
- }, S = "1:1", X = /*#__PURE__*/ _react.forwardRef((_param, H)=>{
223
- var { aspectRatio: t = S, alt: a = "", dataAttributes: d, noBorderRadius: m, src: n, onError: s, onLoad: c, loadingFallback: A = !0, errorFallback: E = !0 } = _param, i = _object_without_properties(_param, [
222
+ }, x = "1:1", p = /*#__PURE__*/ _react.forwardRef((_param, E)=>{
223
+ var { aspectRatio: e = x, alt: s = "", dataAttributes: d, noBorderRadius: m, src: c, onError: o, onLoad: a, loadingFallback: A = !0, errorFallback: B = !0 } = _param, i = _object_without_properties(_param, [
224
224
  "aspectRatio",
225
225
  "alt",
226
226
  "dataAttributes",
@@ -231,13 +231,13 @@ const J = (param)=>{
231
231
  "loadingFallback",
232
232
  "errorFallback"
233
233
  ]);
234
- var I;
235
- const h = (0, _hooks.useAriaId)(), l = _react.useRef(), u = i.circular ? "50%" : m ? "0px" : (0, _css.fallbackStyles)(_imagecssmistica.vars.mediaBorderRadius, _skincontractcssmistica.vars.borderRadii.container), [b, v] = _react.useState(!n), [T, w] = _react.useState(!1), g = i.width && i.height ? void 0 : i.circular ? 1 : typeof t == "number" ? t : x[t], f = A && !!(g !== 0 || i.width && i.height), _ = E && !!(g !== 0 || i.width && i.height), C = _react.useCallback(()=>{
236
- v(!1), l.current && (l.current.style.opacity = "1"), setTimeout(()=>{
237
- w(!0);
238
- }, _imagecssmistica.FADE_IN_DURATION_MS), c == null || c();
234
+ var v;
235
+ const h = (0, _hooks.useAriaId)(), l = _react.useRef(), u = i.circular ? _imagecssmistica.circularBorderRadius : m ? _imagecssmistica.noBorderRadius : _imagecssmistica.defaultBorderRadius, [b, w] = _react.useState(!c), [H, I] = _react.useState(!1), g = i.width && i.height ? void 0 : i.circular ? 1 : typeof e == "number" ? e : S[e], f = A && !!(g !== 0 || i.width && i.height), T = B && !!(g !== 0 || i.width && i.height), C = _react.useCallback(()=>{
236
+ w(!1), l.current && (l.current.style.opacity = "1"), setTimeout(()=>{
237
+ I(!0);
238
+ }, _imagecssmistica.FADE_IN_DURATION_MS), a == null || a();
239
239
  }, [
240
- c
240
+ a
241
241
  ]);
242
242
  _react.useEffect(()=>{
243
243
  var y;
@@ -245,25 +245,24 @@ const J = (param)=>{
245
245
  }, [
246
246
  C
247
247
  ]);
248
- const z = (0, _environment.isServerSide)() || !((I = document.getElementById(h)) != null && I.complete), B = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
248
+ const _ = (0, _environment.isServerSide)() || !((v = document.getElementById(h)) != null && v.complete), z = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
249
249
  children: [
250
250
  /* @__PURE__ */ (0, _jsxruntime.jsx)("img", {
251
251
  suppressHydrationWarning: !0,
252
252
  id: h,
253
253
  style: {
254
- opacity: z && f ? 0 : 1,
255
- borderRadius: u
254
+ opacity: _ && f ? 0 : 1
256
255
  },
257
- ref: (0, _common.combineRefs)(l, H),
258
- src: n,
259
- className: (0, _classnames.default)(_imagecssmistica.image, {
256
+ ref: (0, _common.combineRefs)(l, E),
257
+ src: c,
258
+ className: (0, _classnames.default)(u, _imagecssmistica.image, {
260
259
  [_imagecssmistica.imageWithBorder]: i.border
261
260
  }, (0, _sprinklescssmistica.sprinkles)({
262
261
  position: g !== 0 ? "absolute" : "static"
263
262
  })),
264
- alt: a,
263
+ alt: s,
265
264
  onError: ()=>{
266
- v(!0), w(!0), s == null || s();
265
+ w(!0), I(!0), o == null || o();
267
266
  },
268
267
  onLoad: C
269
268
  }),
@@ -277,7 +276,7 @@ const J = (param)=>{
277
276
  var _i_height, _i_width;
278
277
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
279
278
  children: [
280
- f && !T && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
279
+ f && !H && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
281
280
  style: {
282
281
  position: "absolute",
283
282
  width: "100%",
@@ -289,38 +288,38 @@ const J = (param)=>{
289
288
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_skeletonbase.default, {
290
289
  height: "100%",
291
290
  width: "100%",
292
- radius: u
291
+ className: u
293
292
  })
294
293
  })
295
294
  }),
296
- b && _ && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
295
+ b && T && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
297
296
  style: {
298
297
  position: "absolute",
299
298
  width: "100%",
300
299
  height: "100%",
301
300
  zIndex: 1
302
301
  },
303
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(Q, {
304
- borderRadius: u,
305
- border: i.border
302
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(Y, {
303
+ border: i.border,
304
+ className: u
306
305
  })
307
306
  }),
308
- !b && B
307
+ !b && z
309
308
  ]
310
309
  });
311
- }), Y = /*#__PURE__*/ _react.forwardRef((t, a)=>{
312
- var _t_aspectRatio;
313
- const d = t.width && t.height ? void 0 : t.circular ? 1 : typeof t.aspectRatio == "number" ? t.aspectRatio : x[(_t_aspectRatio = t.aspectRatio) !== null && _t_aspectRatio !== void 0 ? _t_aspectRatio : S];
310
+ }), e1 = /*#__PURE__*/ _react.forwardRef((e, s)=>{
311
+ var _e_aspectRatio;
312
+ const d = e.width && e.height ? void 0 : e.circular ? 1 : typeof e.aspectRatio == "number" ? e.aspectRatio : S[(_e_aspectRatio = e.aspectRatio) !== null && _e_aspectRatio !== void 0 ? _e_aspectRatio : x];
314
313
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_aspectratiosupport.AspectRatioContainer, {
315
314
  style: {
316
315
  position: "relative"
317
316
  },
318
317
  aspectRatio: d,
319
- width: t.width,
320
- height: t.height,
321
- dataAttributes: (0, _dom.getPrefixedDataAttributes)(t.dataAttributes, "Image"),
322
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(X, _object_spread_props(_object_spread({}, t), {
323
- ref: a
318
+ width: e.width,
319
+ height: e.height,
320
+ dataAttributes: (0, _dom.getPrefixedDataAttributes)(e.dataAttributes, "Image"),
321
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(p, _object_spread_props(_object_spread({}, e), {
322
+ ref: s
324
323
  }))
325
324
  });
326
- }), f1 = Y;
325
+ }), f1 = e1;
package/dist/index.d.ts CHANGED
@@ -71,7 +71,7 @@ export {
71
71
  /**
72
72
  * @deprecated This component is deprecated, please use Logo instead
73
73
  */
74
- Logo as NavigationBarLogo, Logo, MovistarLogo, VivoLogo, O2Logo, TelefonicaLogo, BlauLogo, } from './logo';
74
+ Logo as NavigationBarLogo, Logo, MovistarLogo, VivoLogo, O2Logo, TelefonicaLogo, BlauLogo, TuLogo, } from './logo';
75
75
  export { default as Image } from './image';
76
76
  export { default as Chip } from './chip';
77
77
  export { default as Video } from './video';
@@ -123,7 +123,7 @@ export { TrackingConfig, useTrackingConfig } from './utils/analytics';
123
123
  export { useDocumentVisibility } from './utils/document-visibility';
124
124
  export { ThemeVariant, useIsInverseVariant, useThemeVariant } from './theme-variant-context';
125
125
  export type { Skin, KnownSkinName, SkinName } from './skins/types';
126
- export { VIVO_SKIN, VIVO_NEW_SKIN, O2_CLASSIC_SKIN, O2_SKIN, MOVISTAR_SKIN, TELEFONICA_SKIN, BLAU_SKIN, } from './skins/constants';
126
+ export { VIVO_SKIN, VIVO_NEW_SKIN, O2_CLASSIC_SKIN, O2_SKIN, MOVISTAR_SKIN, TELEFONICA_SKIN, BLAU_SKIN, TU_SKIN, } from './skins/constants';
127
127
  export { getSkinByName } from './skins/utils';
128
128
  export { getVivoSkin } from './skins/vivo';
129
129
  export { getVivoNewSkin } from './skins/vivo-new';
@@ -133,12 +133,14 @@ export { getO2Skin } from './skins/o2';
133
133
  export { getO2ClassicSkin } from './skins/o2-classic';
134
134
  export { getTelefonicaSkin } from './skins/telefonica';
135
135
  export { getBlauSkin } from './skins/blau';
136
+ export { getTuSkin } from './skins/tu';
136
137
  export { palette as vivoPalette } from './skins/vivo';
137
138
  export { palette as movistarPalette } from './skins/movistar';
138
139
  export { palette as o2Palette } from './skins/o2';
139
140
  export { palette as o2ClassicPalette } from './skins/o2-classic';
140
141
  export { palette as telefonicaPalette } from './skins/telefonica';
141
142
  export { palette as blauPalette } from './skins/blau';
143
+ export { palette as tuPalette } from './skins/tu';
142
144
  export type { Locale } from './utils/locale';
143
145
  export type { TrackingEvent, IconProps } from './utils/types';
144
146
  export type { RegionCode } from './utils/region-code';
package/dist/index.js CHANGED
@@ -5508,6 +5508,9 @@ _export(exports, {
5508
5508
  TELEFONICA_SKIN: function() {
5509
5509
  return _constants.TELEFONICA_SKIN;
5510
5510
  },
5511
+ TU_SKIN: function() {
5512
+ return _constants.TU_SKIN;
5513
+ },
5511
5514
  Tabs: function() {
5512
5515
  return _tabs.default;
5513
5516
  },
@@ -5589,6 +5592,9 @@ _export(exports, {
5589
5592
  TrackingConfig: function() {
5590
5593
  return _analytics.TrackingConfig;
5591
5594
  },
5595
+ TuLogo: function() {
5596
+ return _logo.TuLogo;
5597
+ },
5592
5598
  VIVO_NEW_SKIN: function() {
5593
5599
  return _constants.VIVO_NEW_SKIN;
5594
5600
  },
@@ -5646,6 +5652,9 @@ _export(exports, {
5646
5652
  getTelefonicaSkin: function() {
5647
5653
  return _telefonica.getTelefonicaSkin;
5648
5654
  },
5655
+ getTuSkin: function() {
5656
+ return _tu.getTuSkin;
5657
+ },
5649
5658
  getVivoNewSkin: function() {
5650
5659
  return _vivonew.getVivoNewSkin;
5651
5660
  },
@@ -5676,6 +5685,9 @@ _export(exports, {
5676
5685
  telefonicaPalette: function() {
5677
5686
  return _telefonica.palette;
5678
5687
  },
5688
+ tuPalette: function() {
5689
+ return _tu.palette;
5690
+ },
5679
5691
  useAriaId: function() {
5680
5692
  return _hooks.useAriaId;
5681
5693
  },
@@ -5855,6 +5867,7 @@ const _o2 = require("./skins/o2.js");
5855
5867
  const _o2classic = require("./skins/o2-classic.js");
5856
5868
  const _telefonica = require("./skins/telefonica.js");
5857
5869
  const _blau = require("./skins/blau.js");
5870
+ const _tu = require("./skins/tu.js");
5858
5871
  const _examplecomponent = /*#__PURE__*/ _interop_require_default(require("./community/example-component.js"));
5859
5872
  const _advanceddatacard = /*#__PURE__*/ _interop_require_default(require("./community/advanced-data-card.js"));
5860
5873
  const _blocks = require("./community/blocks.js");
package/dist/logo.d.ts CHANGED
@@ -33,4 +33,5 @@ export declare const VivoLogo: React.FC<LogoProps>;
33
33
  export declare const O2Logo: React.FC<LogoProps>;
34
34
  export declare const TelefonicaLogo: React.FC<LogoProps>;
35
35
  export declare const BlauLogo: React.FC<LogoProps>;
36
+ export declare const TuLogo: React.FC<LogoProps>;
36
37
  export {};