@telefonica/mistica 15.17.0 → 15.19.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/css/mistica.css +1 -1
- package/dist/button.css-mistica.js +61 -52
- package/dist/button.css.d.ts +33 -17
- package/dist/button.d.ts +9 -46
- package/dist/button.js +188 -237
- package/dist/callout.d.ts +1 -0
- package/dist/callout.js +10 -10
- package/dist/card.d.ts +6 -1
- package/dist/card.js +375 -365
- package/dist/chip.d.ts +1 -0
- package/dist/chip.js +15 -15
- package/dist/dialog.d.ts +1 -0
- package/dist/dialog.js +18 -17
- package/dist/feedback.js +58 -52
- package/dist/inline.css-mistica.js +11 -8
- package/dist/inline.css.d.ts +1 -0
- package/dist/inline.js +12 -12
- package/dist/logo-blau.d.ts +4 -0
- package/dist/logo-blau.js +74 -0
- package/dist/logo-common.d.ts +9 -0
- package/dist/logo-common.js +21 -0
- package/dist/logo-movistar.d.ts +4 -0
- package/dist/logo-movistar.js +99 -0
- package/dist/logo-o2-new.d.ts +4 -0
- package/dist/logo-o2-new.js +29 -0
- package/dist/logo-o2.d.ts +4 -0
- package/dist/logo-o2.js +29 -0
- package/dist/logo-telefonica.d.ts +4 -0
- package/dist/logo-telefonica.js +197 -0
- package/dist/logo-tu.d.ts +4 -0
- package/dist/logo-tu.js +28 -0
- package/dist/logo-vivo.d.ts +4 -0
- package/dist/logo-vivo.js +81 -0
- package/dist/logo.d.ts +10 -10
- package/dist/logo.js +174 -534
- package/dist/navigation-bar.d.ts +7 -0
- package/dist/navigation-bar.js +99 -91
- package/dist/package-version.js +1 -1
- package/dist/popover.d.ts +1 -0
- package/dist/popover.js +9 -7
- package/dist/snackbar-context.js +23 -22
- package/dist/snackbar.d.ts +1 -0
- package/dist/snackbar.js +51 -47
- package/dist/text.d.ts +1 -0
- package/dist/text.js +133 -109
- package/dist/tooltip.d.ts +1 -0
- package/dist/tooltip.js +110 -110
- package/dist-es/button.css-mistica.js +36 -18
- package/dist-es/button.js +219 -268
- package/dist-es/callout.js +38 -38
- package/dist-es/card.js +492 -482
- package/dist-es/chip.js +25 -25
- package/dist-es/dialog.js +22 -21
- package/dist-es/feedback.js +96 -89
- package/dist-es/inline.css-mistica.js +3 -3
- package/dist-es/inline.js +23 -23
- package/dist-es/logo-blau.js +65 -0
- package/dist-es/logo-common.js +12 -0
- package/dist-es/logo-movistar.js +90 -0
- package/dist-es/logo-o2-new.js +20 -0
- package/dist-es/logo-o2.js +20 -0
- package/dist-es/logo-telefonica.js +188 -0
- package/dist-es/logo-tu.js +19 -0
- package/dist-es/logo-vivo.js +72 -0
- package/dist-es/logo.js +132 -533
- package/dist-es/navigation-bar.js +163 -155
- package/dist-es/package-version.js +1 -1
- package/dist-es/popover.js +26 -24
- package/dist-es/snackbar-context.js +25 -24
- package/dist-es/snackbar.js +81 -77
- package/dist-es/style.css +1 -1
- package/dist-es/text.js +143 -119
- package/dist-es/tooltip.js +149 -149
- package/package.json +1 -1
package/dist-es/text.js
CHANGED
|
@@ -78,100 +78,124 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as n, Fragment as A, jsxs as
|
|
82
|
-
import * as
|
|
83
|
-
import
|
|
84
|
-
import { useIsInverseVariant as
|
|
85
|
-
import { applyCssVars as
|
|
86
|
-
import { getPrefixedDataAttributes as
|
|
81
|
+
import { jsx as n, Fragment as A, jsxs as V } from "react/jsx-runtime";
|
|
82
|
+
import * as T from "react";
|
|
83
|
+
import M from "classnames";
|
|
84
|
+
import { useIsInverseVariant as q } from "./theme-variant-context.js";
|
|
85
|
+
import { applyCssVars as y, pxToRem as u } from "./utils/css.js";
|
|
86
|
+
import { getPrefixedDataAttributes as G } from "./utils/dom.js";
|
|
87
87
|
import { useTheme as m } from "./hooks.js";
|
|
88
|
-
import { vars as
|
|
89
|
-
import { text as
|
|
90
|
-
import { VIVO_NEW_SKIN as
|
|
91
|
-
import
|
|
92
|
-
const
|
|
88
|
+
import { vars as x } from "./skins/skin-contract.css-mistica.js";
|
|
89
|
+
import { text as J, withWordBreak as Q, withoutWordBreak as U, truncate as X, truncateToOneLine as Y, vars as c } from "./text.css-mistica.js";
|
|
90
|
+
import { VIVO_NEW_SKIN as Z } from "./skins/constants.js";
|
|
91
|
+
import $ from "./screen-reader-only.js";
|
|
92
|
+
const ee = {
|
|
93
93
|
light: 300,
|
|
94
94
|
regular: 400,
|
|
95
95
|
medium: 500,
|
|
96
96
|
bold: 700
|
|
97
|
-
},
|
|
97
|
+
}, te = (e)=>e === !0 ? 1 : e || "initial", g = "Ħ", ie = /* @__PURE__ */ V(A, {
|
|
98
98
|
children: [
|
|
99
99
|
/* @__PURE__ */ n("span", {
|
|
100
100
|
"aria-hidden": !0,
|
|
101
|
-
children:
|
|
101
|
+
children: g
|
|
102
102
|
}),
|
|
103
|
-
/* @__PURE__ */ n(
|
|
103
|
+
/* @__PURE__ */ n($, {
|
|
104
104
|
children: /* @__PURE__ */ n("span", {
|
|
105
105
|
children: "Vivo"
|
|
106
106
|
})
|
|
107
107
|
})
|
|
108
108
|
]
|
|
109
|
-
}),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
109
|
+
}), re = (param)=>{
|
|
110
|
+
let { children: e, ariaLabel: i, as: t } = param;
|
|
111
|
+
return typeof t == "string" && [
|
|
112
|
+
"h1",
|
|
113
|
+
"h2",
|
|
114
|
+
"h3",
|
|
115
|
+
"h4",
|
|
116
|
+
"h5",
|
|
117
|
+
"h6"
|
|
118
|
+
].includes(t) && typeof e == "string" && e.includes(g) ? {
|
|
119
|
+
ariaLabel: e.replace(new RegExp(g, "g"), "Vivo"),
|
|
120
|
+
children: /* @__PURE__ */ n("span", {
|
|
121
|
+
"aria-hidden": !0,
|
|
122
|
+
children: e
|
|
123
|
+
})
|
|
124
|
+
} : {
|
|
125
|
+
children: T.Children.map(e, (r)=>typeof r != "string" || !r.includes(g) ? r : /* @__PURE__ */ n(A, {
|
|
126
|
+
children: r.split(g).map((p, l)=>/* @__PURE__ */ V(T.Fragment, {
|
|
127
|
+
children: [
|
|
128
|
+
l > 0 && ie,
|
|
129
|
+
p
|
|
130
|
+
]
|
|
131
|
+
}, l))
|
|
132
|
+
})),
|
|
133
|
+
ariaLabel: i
|
|
134
|
+
};
|
|
135
|
+
}, o = (param)=>{
|
|
136
|
+
let { weight: e, color: i = x.colors.textPrimary, decoration: t, truncate: r, transform: p, wordBreak: l = !0, hyphens: S = "auto", as: b = "span", children: h, size: k, mobileSize: w = k, desktopSize: H = k, lineHeight: z, mobileLineHeight: L = z, desktopLineHeight: v = z, letterSpacing: I, textAlign: P, textShadow: C, id: R, role: W, "aria-level": E, "aria-label": f, dataAttributes: N } = param;
|
|
137
|
+
const { skinName: F } = m(), O = q(), _ = te(r), j = {
|
|
138
|
+
[x.colors.textPrimary]: x.colors.textPrimaryInverse,
|
|
139
|
+
[x.colors.textSecondary]: x.colors.textSecondaryInverse,
|
|
140
|
+
[x.colors.textLink]: x.colors.textLinkInverse,
|
|
141
|
+
[x.colors.textError]: x.colors.textErrorInverse
|
|
123
142
|
};
|
|
124
|
-
if (!
|
|
125
|
-
const
|
|
126
|
-
[
|
|
127
|
-
[
|
|
128
|
-
}),
|
|
129
|
-
[
|
|
130
|
-
[
|
|
131
|
-
[
|
|
132
|
-
[
|
|
133
|
-
}),
|
|
134
|
-
[
|
|
143
|
+
if (!h && h !== 0) return null;
|
|
144
|
+
const D = M(J, l ? Q : U, {
|
|
145
|
+
[X]: r,
|
|
146
|
+
[Y]: r === 1 || r === !0
|
|
147
|
+
}), B = y({
|
|
148
|
+
[c.mobileSize]: w ? u(w) : "inherit",
|
|
149
|
+
[c.mobileLineHeight]: L ? u(L) : "inherit",
|
|
150
|
+
[c.desktopSize]: H ? u(H) : "inherit",
|
|
151
|
+
[c.desktopLineHeight]: v ? u(v) : "inherit"
|
|
152
|
+
}), K = r ? y({
|
|
153
|
+
[c.lineClamp]: String(_)
|
|
135
154
|
}) : {};
|
|
136
|
-
var
|
|
137
|
-
return
|
|
138
|
-
|
|
139
|
-
|
|
155
|
+
var _j_i;
|
|
156
|
+
return F === Z && ({ ariaLabel: f, children: h } = re({
|
|
157
|
+
children: h,
|
|
158
|
+
ariaLabel: f,
|
|
159
|
+
as: b
|
|
160
|
+
})), /*#__PURE__*/ T.createElement(b, _object_spread_props(_object_spread({
|
|
161
|
+
className: D,
|
|
162
|
+
id: R,
|
|
140
163
|
role: W,
|
|
141
|
-
"aria-level":
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
164
|
+
"aria-level": E,
|
|
165
|
+
"aria-label": f
|
|
166
|
+
}, G(N, "Text")), {
|
|
167
|
+
style: _object_spread_props(_object_spread({}, B, K), {
|
|
168
|
+
hyphens: S,
|
|
169
|
+
WebkitHyphens: S,
|
|
170
|
+
letterSpacing: I,
|
|
171
|
+
fontWeight: e ? ee[e] : "inherit",
|
|
172
|
+
textTransform: p || "inherit",
|
|
173
|
+
textDecoration: t !== null && t !== void 0 ? t : "inherit",
|
|
174
|
+
overflowWrap: l ? "anywhere" : "inherit",
|
|
175
|
+
color: O ? (_j_i = j[i]) !== null && _j_i !== void 0 ? _j_i : i : i,
|
|
176
|
+
textAlign: P,
|
|
177
|
+
textShadow: C,
|
|
154
178
|
// When rendering as <pre/>, spaces are preserved and we don't want to remove them
|
|
155
|
-
whiteSpace:
|
|
179
|
+
whiteSpace: b === "pre" ? void 0 : "pre-line"
|
|
156
180
|
})
|
|
157
|
-
}),
|
|
158
|
-
},
|
|
181
|
+
}), h);
|
|
182
|
+
}, d = (e)=>{
|
|
159
183
|
if (e.light) return "light";
|
|
160
184
|
if (e.regular) return "regular";
|
|
161
185
|
if (e.medium) return "medium";
|
|
162
186
|
if (e.weight) return e.weight;
|
|
163
187
|
}, s = (param)=>{
|
|
164
|
-
let { forceMobileSizes: e, mobileSize:
|
|
188
|
+
let { forceMobileSizes: e, mobileSize: i, mobileLineHeight: t, desktopSize: r, desktopLineHeight: p } = param;
|
|
165
189
|
return e ? {
|
|
166
|
-
size:
|
|
167
|
-
lineHeight:
|
|
190
|
+
size: i,
|
|
191
|
+
lineHeight: t
|
|
168
192
|
} : {
|
|
169
|
-
mobileSize:
|
|
170
|
-
mobileLineHeight:
|
|
193
|
+
mobileSize: i,
|
|
194
|
+
mobileLineHeight: t,
|
|
171
195
|
desktopSize: r,
|
|
172
|
-
desktopLineHeight:
|
|
196
|
+
desktopLineHeight: p
|
|
173
197
|
};
|
|
174
|
-
},
|
|
198
|
+
}, a = {
|
|
175
199
|
text1: {
|
|
176
200
|
mobileSize: 12,
|
|
177
201
|
mobileLineHeight: "16px",
|
|
@@ -232,141 +256,141 @@ const $ = {
|
|
|
232
256
|
desktopSize: 64,
|
|
233
257
|
desktopLineHeight: "72px"
|
|
234
258
|
}
|
|
235
|
-
},
|
|
236
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
259
|
+
}, ge = (_param)=>{
|
|
260
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
237
261
|
"dataAttributes",
|
|
238
262
|
"forceMobileSizes"
|
|
239
263
|
]);
|
|
240
264
|
const { textPresets: r } = m();
|
|
241
265
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
242
|
-
forceMobileSizes:
|
|
243
|
-
},
|
|
266
|
+
forceMobileSizes: i
|
|
267
|
+
}, a.text10))), {
|
|
244
268
|
weight: r.text10.weight,
|
|
245
269
|
dataAttributes: _object_spread({
|
|
246
270
|
"component-name": "Text10"
|
|
247
271
|
}, e)
|
|
248
|
-
}),
|
|
249
|
-
},
|
|
250
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
272
|
+
}), t));
|
|
273
|
+
}, ue = (_param)=>{
|
|
274
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
251
275
|
"dataAttributes",
|
|
252
276
|
"forceMobileSizes"
|
|
253
277
|
]);
|
|
254
278
|
const { textPresets: r } = m();
|
|
255
279
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
256
|
-
forceMobileSizes:
|
|
257
|
-
},
|
|
280
|
+
forceMobileSizes: i
|
|
281
|
+
}, a.text9))), {
|
|
258
282
|
weight: r.text9.weight,
|
|
259
283
|
dataAttributes: _object_spread({
|
|
260
284
|
"component-name": "Text9"
|
|
261
285
|
}, e)
|
|
262
|
-
}),
|
|
263
|
-
},
|
|
264
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
286
|
+
}), t));
|
|
287
|
+
}, de = (_param)=>{
|
|
288
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
265
289
|
"dataAttributes",
|
|
266
290
|
"forceMobileSizes"
|
|
267
291
|
]);
|
|
268
292
|
const { textPresets: r } = m();
|
|
269
293
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
270
|
-
forceMobileSizes:
|
|
271
|
-
},
|
|
294
|
+
forceMobileSizes: i
|
|
295
|
+
}, a.text8))), {
|
|
272
296
|
weight: r.text8.weight,
|
|
273
297
|
dataAttributes: _object_spread({
|
|
274
298
|
"component-name": "Text8"
|
|
275
299
|
}, e)
|
|
276
|
-
}),
|
|
277
|
-
},
|
|
278
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
300
|
+
}), t));
|
|
301
|
+
}, be = (_param)=>{
|
|
302
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
279
303
|
"dataAttributes",
|
|
280
304
|
"forceMobileSizes"
|
|
281
305
|
]);
|
|
282
306
|
const { textPresets: r } = m();
|
|
283
307
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
284
|
-
forceMobileSizes:
|
|
285
|
-
},
|
|
308
|
+
forceMobileSizes: i
|
|
309
|
+
}, a.text7))), {
|
|
286
310
|
weight: r.text7.weight,
|
|
287
311
|
dataAttributes: _object_spread({
|
|
288
312
|
"component-name": "Text7"
|
|
289
313
|
}, e)
|
|
290
|
-
}),
|
|
291
|
-
},
|
|
292
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
314
|
+
}), t));
|
|
315
|
+
}, fe = (_param)=>{
|
|
316
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
293
317
|
"dataAttributes",
|
|
294
318
|
"forceMobileSizes"
|
|
295
319
|
]);
|
|
296
320
|
const { textPresets: r } = m();
|
|
297
321
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
298
|
-
forceMobileSizes:
|
|
299
|
-
},
|
|
322
|
+
forceMobileSizes: i
|
|
323
|
+
}, a.text6))), {
|
|
300
324
|
weight: r.text6.weight,
|
|
301
325
|
dataAttributes: _object_spread({
|
|
302
326
|
"component-name": "Text6"
|
|
303
327
|
}, e)
|
|
304
|
-
}),
|
|
328
|
+
}), t));
|
|
305
329
|
}, Te = (_param)=>{
|
|
306
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
330
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
307
331
|
"dataAttributes",
|
|
308
332
|
"forceMobileSizes"
|
|
309
333
|
]);
|
|
310
334
|
const { textPresets: r } = m();
|
|
311
335
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
312
|
-
forceMobileSizes:
|
|
313
|
-
},
|
|
336
|
+
forceMobileSizes: i
|
|
337
|
+
}, a.text5))), {
|
|
314
338
|
weight: r.text5.weight,
|
|
315
339
|
dataAttributes: _object_spread({
|
|
316
340
|
"component-name": "Text5"
|
|
317
341
|
}, e)
|
|
318
|
-
}),
|
|
342
|
+
}), t));
|
|
319
343
|
}, Se = (_param)=>{
|
|
320
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
344
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
321
345
|
"dataAttributes",
|
|
322
346
|
"forceMobileSizes"
|
|
323
347
|
]);
|
|
324
348
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
325
|
-
forceMobileSizes:
|
|
326
|
-
},
|
|
327
|
-
weight:
|
|
349
|
+
forceMobileSizes: i
|
|
350
|
+
}, a.text4))), {
|
|
351
|
+
weight: d(t),
|
|
328
352
|
dataAttributes: _object_spread({
|
|
329
353
|
"component-name": "Text4"
|
|
330
354
|
}, e)
|
|
331
|
-
}),
|
|
332
|
-
},
|
|
333
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
355
|
+
}), t));
|
|
356
|
+
}, ke = (_param)=>{
|
|
357
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
334
358
|
"dataAttributes",
|
|
335
359
|
"forceMobileSizes"
|
|
336
360
|
]);
|
|
337
361
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
338
|
-
forceMobileSizes:
|
|
339
|
-
},
|
|
340
|
-
weight:
|
|
362
|
+
forceMobileSizes: i
|
|
363
|
+
}, a.text3))), {
|
|
364
|
+
weight: d(t),
|
|
341
365
|
dataAttributes: _object_spread({
|
|
342
366
|
"component-name": "Text3"
|
|
343
367
|
}, e)
|
|
344
|
-
}),
|
|
345
|
-
},
|
|
346
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
368
|
+
}), t));
|
|
369
|
+
}, we = (_param)=>{
|
|
370
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
347
371
|
"dataAttributes",
|
|
348
372
|
"forceMobileSizes"
|
|
349
373
|
]);
|
|
350
374
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
351
|
-
forceMobileSizes:
|
|
352
|
-
},
|
|
353
|
-
weight:
|
|
375
|
+
forceMobileSizes: i
|
|
376
|
+
}, a.text2))), {
|
|
377
|
+
weight: d(t),
|
|
354
378
|
dataAttributes: _object_spread({
|
|
355
379
|
"component-name": "Text2"
|
|
356
380
|
}, e)
|
|
357
|
-
}),
|
|
381
|
+
}), t));
|
|
358
382
|
}, He = (_param)=>{
|
|
359
|
-
var { dataAttributes: e, forceMobileSizes:
|
|
383
|
+
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
360
384
|
"dataAttributes",
|
|
361
385
|
"forceMobileSizes"
|
|
362
386
|
]);
|
|
363
387
|
return /* @__PURE__ */ n(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
364
|
-
forceMobileSizes:
|
|
365
|
-
},
|
|
366
|
-
weight:
|
|
388
|
+
forceMobileSizes: i
|
|
389
|
+
}, a.text1))), {
|
|
390
|
+
weight: d(t),
|
|
367
391
|
dataAttributes: _object_spread({
|
|
368
392
|
"component-name": "Text1"
|
|
369
393
|
}, e)
|
|
370
|
-
}),
|
|
371
|
-
},
|
|
372
|
-
export { o as Text, He as Text1,
|
|
394
|
+
}), t));
|
|
395
|
+
}, ze = o;
|
|
396
|
+
export { o as Text, He as Text1, ge as Text10, we as Text2, ke as Text3, Se as Text4, Te as Text5, fe as Text6, be as Text7, de as Text8, ue as Text9, ze as default, ee as mapToWeight, a as textProps };
|