@telefonica/mistica 15.5.0 → 15.6.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.
package/dist-es/text.js CHANGED
@@ -78,7 +78,7 @@ function _object_without_properties_loose(source, excluded) {
78
78
  }
79
79
  return target;
80
80
  }
81
- import { jsx as r, Fragment as w, jsxs as v } from "react/jsx-runtime";
81
+ import { jsx as n, Fragment as w, jsxs as v } from "react/jsx-runtime";
82
82
  import * as g from "react";
83
83
  import B from "classnames";
84
84
  import { useIsInverseVariant as K } from "./theme-variant-context.js";
@@ -96,110 +96,111 @@ const Z = {
96
96
  bold: 700
97
97
  }, $ = (e)=>e === !0 ? 1 : e || "initial", u = "Ħ", ee = /* @__PURE__ */ v(w, {
98
98
  children: [
99
- /* @__PURE__ */ r("span", {
99
+ /* @__PURE__ */ n("span", {
100
100
  "aria-hidden": !0,
101
101
  children: u
102
102
  }),
103
- /* @__PURE__ */ r(Y, {
104
- children: /* @__PURE__ */ r("span", {
103
+ /* @__PURE__ */ n(Y, {
104
+ children: /* @__PURE__ */ n("span", {
105
105
  children: "Vivo"
106
106
  })
107
107
  })
108
108
  ]
109
- }), te = (e)=>g.Children.map(e, (t)=>typeof t != "string" || !t.includes(u) ? t : /* @__PURE__ */ r(w, {
110
- children: t.split(u).map((i, n)=>/* @__PURE__ */ v(g.Fragment, {
109
+ }), te = (e)=>g.Children.map(e, (t)=>typeof t != "string" || !t.includes(u) ? t : /* @__PURE__ */ n(w, {
110
+ children: t.split(u).map((i, r)=>/* @__PURE__ */ v(g.Fragment, {
111
111
  children: [
112
- n > 0 && ee,
112
+ r > 0 && ee,
113
113
  i
114
114
  ]
115
- }, n))
115
+ }, r))
116
116
  })), o = (param)=>{
117
- let { weight: e, color: t = a.colors.textPrimary, decoration: i, truncate: n, transform: c, wordBreak: d = !0, hyphens: b = "auto", as: A = "span", children: p, size: T, mobileSize: f = T, desktopSize: S = T, lineHeight: k, mobileLineHeight: H = k, desktopLineHeight: L = k, letterSpacing: V, textAlign: y, textShadow: I, id: P, role: C, "aria-level": W, dataAttributes: R } = param;
118
- const { skinName: N } = m(), F = K(), O = $(n), _ = {
117
+ let { weight: e, color: t = a.colors.textPrimary, decoration: i, truncate: r, transform: h, wordBreak: d = !0, hyphens: b = "auto", as: A = "span", children: p, size: T, mobileSize: f = T, desktopSize: S = T, lineHeight: k, mobileLineHeight: H = k, desktopLineHeight: L = k, letterSpacing: I, textAlign: V, textShadow: y, id: P, role: C, "aria-level": W, dataAttributes: R } = param;
118
+ const { skinName: N } = m(), E = K(), F = $(r), O = {
119
119
  [a.colors.textPrimary]: a.colors.textPrimaryInverse,
120
120
  [a.colors.textSecondary]: a.colors.textSecondaryInverse,
121
- [a.colors.textLink]: a.colors.textLinkInverse
121
+ [a.colors.textLink]: a.colors.textLinkInverse,
122
+ [a.colors.textError]: a.colors.textErrorInverse
122
123
  };
123
124
  if (!p && p !== 0) return null;
124
- const j = B(q, d ? G : J, {
125
- [Q]: n,
126
- [U]: n === 1 || n === !0
127
- }), D = z({
125
+ const _ = B(q, d ? G : J, {
126
+ [Q]: r,
127
+ [U]: r === 1 || r === !0
128
+ }), j = z({
128
129
  [x.mobileSize]: f ? l(f) : "inherit",
129
130
  [x.mobileLineHeight]: H ? l(H) : "inherit",
130
131
  [x.desktopSize]: S ? l(S) : "inherit",
131
132
  [x.desktopLineHeight]: L ? l(L) : "inherit"
132
- }), E = n ? z({
133
- [x.lineClamp]: String(O)
133
+ }), D = r ? z({
134
+ [x.lineClamp]: String(F)
134
135
  }) : {};
135
- var __t;
136
+ var _O_t;
136
137
  return /*#__PURE__*/ g.createElement(A, _object_spread_props(_object_spread({
137
- className: j,
138
+ className: _,
138
139
  id: P,
139
140
  role: C,
140
141
  "aria-level": W
141
142
  }, M(R, "Text")), {
142
- style: _object_spread_props(_object_spread({}, D, E), {
143
+ style: _object_spread_props(_object_spread({}, j, D), {
143
144
  hyphens: b,
144
145
  WebkitHyphens: b,
145
- letterSpacing: V,
146
+ letterSpacing: I,
146
147
  fontWeight: e ? Z[e] : "inherit",
147
- textTransform: c || "inherit",
148
+ textTransform: h || "inherit",
148
149
  textDecoration: i !== null && i !== void 0 ? i : "inherit",
149
150
  overflowWrap: d ? "anywhere" : "inherit",
150
- color: F ? (__t = _[t]) !== null && __t !== void 0 ? __t : t : t,
151
- textAlign: y,
152
- textShadow: I
151
+ color: E ? (_O_t = O[t]) !== null && _O_t !== void 0 ? _O_t : t : t,
152
+ textAlign: V,
153
+ textShadow: y
153
154
  })
154
155
  }), N === X ? te(p) : p);
155
- }, h = (e)=>{
156
+ }, c = (e)=>{
156
157
  if (e.light) return "light";
157
158
  if (e.regular) return "regular";
158
159
  if (e.medium) return "medium";
159
160
  if (e.weight) return e.weight;
160
161
  }, s = (param)=>{
161
- let { forceMobileSizes: e, mobileSize: t, mobileLineHeight: i, desktopSize: n, desktopLineHeight: c } = param;
162
+ let { forceMobileSizes: e, mobileSize: t, mobileLineHeight: i, desktopSize: r, desktopLineHeight: h } = param;
162
163
  return e ? {
163
164
  size: t,
164
165
  lineHeight: i
165
166
  } : {
166
167
  mobileSize: t,
167
168
  mobileLineHeight: i,
168
- desktopSize: n,
169
- desktopLineHeight: c
169
+ desktopSize: r,
170
+ desktopLineHeight: h
170
171
  };
171
- }, he = (_param)=>{
172
+ }, ce = (_param)=>{
172
173
  var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
173
174
  "dataAttributes",
174
175
  "forceMobileSizes"
175
176
  ]);
176
- const { textPresets: n } = m();
177
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
177
+ const { textPresets: r } = m();
178
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
178
179
  forceMobileSizes: t,
179
180
  mobileSize: 48,
180
181
  mobileLineHeight: "56px",
181
182
  desktopSize: 64,
182
183
  desktopLineHeight: "72px"
183
184
  })), {
184
- weight: n.text10.weight,
185
+ weight: r.text10.weight,
185
186
  dataAttributes: _object_spread({
186
187
  "component-name": "Text10"
187
188
  }, e)
188
189
  }), i));
189
- }, ce = (_param)=>{
190
+ }, he = (_param)=>{
190
191
  var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
191
192
  "dataAttributes",
192
193
  "forceMobileSizes"
193
194
  ]);
194
- const { textPresets: n } = m();
195
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
195
+ const { textPresets: r } = m();
196
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
196
197
  forceMobileSizes: t,
197
198
  mobileSize: 40,
198
199
  mobileLineHeight: "48px",
199
200
  desktopSize: 56,
200
201
  desktopLineHeight: "64px"
201
202
  })), {
202
- weight: n.text9.weight,
203
+ weight: r.text9.weight,
203
204
  dataAttributes: _object_spread({
204
205
  "component-name": "Text9"
205
206
  }, e)
@@ -209,15 +210,15 @@ const Z = {
209
210
  "dataAttributes",
210
211
  "forceMobileSizes"
211
212
  ]);
212
- const { textPresets: n } = m();
213
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
213
+ const { textPresets: r } = m();
214
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
214
215
  forceMobileSizes: t,
215
216
  mobileSize: 32,
216
217
  mobileLineHeight: "40px",
217
218
  desktopSize: 48,
218
219
  desktopLineHeight: "56px"
219
220
  })), {
220
- weight: n.text8.weight,
221
+ weight: r.text8.weight,
221
222
  dataAttributes: _object_spread({
222
223
  "component-name": "Text8"
223
224
  }, e)
@@ -227,15 +228,15 @@ const Z = {
227
228
  "dataAttributes",
228
229
  "forceMobileSizes"
229
230
  ]);
230
- const { textPresets: n } = m();
231
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
231
+ const { textPresets: r } = m();
232
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
232
233
  forceMobileSizes: t,
233
234
  mobileSize: 28,
234
235
  mobileLineHeight: "32px",
235
236
  desktopSize: 40,
236
237
  desktopLineHeight: "48px"
237
238
  })), {
238
- weight: n.text7.weight,
239
+ weight: r.text7.weight,
239
240
  dataAttributes: _object_spread({
240
241
  "component-name": "Text7"
241
242
  }, e)
@@ -245,15 +246,15 @@ const Z = {
245
246
  "dataAttributes",
246
247
  "forceMobileSizes"
247
248
  ]);
248
- const { textPresets: n } = m();
249
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
249
+ const { textPresets: r } = m();
250
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
250
251
  forceMobileSizes: t,
251
252
  mobileSize: 24,
252
253
  mobileLineHeight: "32px",
253
254
  desktopSize: 32,
254
255
  desktopLineHeight: "40px"
255
256
  })), {
256
- weight: n.text6.weight,
257
+ weight: r.text6.weight,
257
258
  dataAttributes: _object_spread({
258
259
  "component-name": "Text6"
259
260
  }, e)
@@ -263,15 +264,15 @@ const Z = {
263
264
  "dataAttributes",
264
265
  "forceMobileSizes"
265
266
  ]);
266
- const { textPresets: n } = m();
267
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
267
+ const { textPresets: r } = m();
268
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
268
269
  forceMobileSizes: t,
269
270
  mobileSize: 20,
270
271
  mobileLineHeight: "24px",
271
272
  desktopSize: 28,
272
273
  desktopLineHeight: "32px"
273
274
  })), {
274
- weight: n.text5.weight,
275
+ weight: r.text5.weight,
275
276
  dataAttributes: _object_spread({
276
277
  "component-name": "Text5"
277
278
  }, e)
@@ -281,14 +282,14 @@ const Z = {
281
282
  "dataAttributes",
282
283
  "forceMobileSizes"
283
284
  ]);
284
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
285
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
285
286
  forceMobileSizes: t,
286
287
  mobileSize: 18,
287
288
  mobileLineHeight: "24px",
288
289
  desktopSize: 20,
289
290
  desktopLineHeight: "28px"
290
291
  })), {
291
- weight: h(i),
292
+ weight: c(i),
292
293
  dataAttributes: _object_spread({
293
294
  "component-name": "Text4"
294
295
  }, e)
@@ -298,14 +299,14 @@ const Z = {
298
299
  "dataAttributes",
299
300
  "forceMobileSizes"
300
301
  ]);
301
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
302
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
302
303
  forceMobileSizes: t,
303
304
  mobileSize: 16,
304
305
  mobileLineHeight: "24px",
305
306
  desktopSize: 18,
306
307
  desktopLineHeight: "24px"
307
308
  })), {
308
- weight: h(i),
309
+ weight: c(i),
309
310
  dataAttributes: _object_spread({
310
311
  "component-name": "Text3"
311
312
  }, e)
@@ -315,14 +316,14 @@ const Z = {
315
316
  "dataAttributes",
316
317
  "forceMobileSizes"
317
318
  ]);
318
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
319
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
319
320
  forceMobileSizes: t,
320
321
  mobileSize: 14,
321
322
  mobileLineHeight: "20px",
322
323
  desktopSize: 16,
323
324
  desktopLineHeight: "24px"
324
325
  })), {
325
- weight: h(i),
326
+ weight: c(i),
326
327
  dataAttributes: _object_spread({
327
328
  "component-name": "Text2"
328
329
  }, e)
@@ -332,17 +333,17 @@ const Z = {
332
333
  "dataAttributes",
333
334
  "forceMobileSizes"
334
335
  ]);
335
- return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
336
+ return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s({
336
337
  forceMobileSizes: t,
337
338
  mobileSize: 12,
338
339
  mobileLineHeight: "16px",
339
340
  desktopSize: 14,
340
341
  desktopLineHeight: "20px"
341
342
  })), {
342
- weight: h(i),
343
+ weight: c(i),
343
344
  dataAttributes: _object_spread({
344
345
  "component-name": "Text1"
345
346
  }, e)
346
347
  }), i));
347
348
  }, He = o;
348
- export { o as Text, ke as Text1, he as Text10, Se as Text2, fe as Text3, Te as Text4, be as Text5, de as Text6, ue as Text7, ge as Text8, ce as Text9, He as default };
349
+ export { o as Text, ke as Text1, ce as Text10, Se as Text2, fe as Text3, Te as Text4, be as Text5, de as Text6, ue as Text7, ge as Text8, he as Text9, He as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "15.5.0",
3
+ "version": "15.6.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",