@telefonica/mistica 16.2.0 → 16.3.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/card.css-mistica.js +33 -21
- package/dist/card.css.d.ts +4 -0
- package/dist/card.js +235 -263
- package/dist/chip.css-mistica.js +19 -7
- package/dist/chip.css.d.ts +2 -0
- package/dist/chip.js +33 -49
- package/dist/community/advanced-data-card.css-mistica.js +24 -24
- package/dist/community/advanced-data-card.css.d.ts +1 -1
- package/dist/community/advanced-data-card.js +45 -48
- package/dist/empty-state-card.js +12 -11
- package/dist/hero.js +25 -19
- package/dist/highlighted-card.js +15 -14
- package/dist/list.css-mistica.js +21 -15
- package/dist/list.css.d.ts +2 -0
- package/dist/list.js +97 -96
- package/dist/menu.css-mistica.js +9 -9
- package/dist/menu.js +9 -10
- package/dist/package-version.js +1 -1
- package/dist/sheet-common.js +3 -2
- package/dist/table.js +52 -51
- package/dist/tag.css-mistica.js +1 -1
- package/dist/tag.js +9 -10
- package/dist/text-props.d.ts +60 -0
- package/dist/text-props.js +93 -0
- package/dist/text.d.ts +0 -62
- package/dist/text.js +156 -219
- package/dist/title.js +10 -9
- package/dist-es/card.css-mistica.js +4 -4
- package/dist-es/card.js +343 -371
- package/dist-es/chip.css-mistica.js +10 -4
- package/dist-es/chip.js +44 -60
- package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
- package/dist-es/community/advanced-data-card.js +74 -77
- package/dist-es/empty-state-card.js +17 -16
- package/dist-es/hero.js +53 -47
- package/dist-es/highlighted-card.js +19 -18
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/list.js +141 -140
- package/dist-es/menu.css-mistica.js +3 -3
- package/dist-es/menu.js +21 -22
- package/dist-es/package-version.js +1 -1
- package/dist-es/sheet-common.js +12 -11
- package/dist-es/style.css +1 -1
- package/dist-es/table.js +89 -88
- package/dist-es/tag.css-mistica.js +1 -1
- package/dist-es/tag.js +14 -15
- package/dist-es/text-props.js +52 -0
- package/dist-es/text.js +171 -231
- package/dist-es/title.js +14 -13
- package/package.json +3 -3
package/dist-es/text.js
CHANGED
|
@@ -78,319 +78,259 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as
|
|
81
|
+
import { jsx as i, Fragment as C, jsxs as R } from "react/jsx-runtime";
|
|
82
82
|
import * as T from "react";
|
|
83
83
|
import K from "classnames";
|
|
84
|
-
import { useIsInverseOrMediaVariant as
|
|
85
|
-
import { applyCssVars as
|
|
86
|
-
import { getPrefixedDataAttributes as
|
|
84
|
+
import { useIsInverseOrMediaVariant as L } from "./theme-variant-context.js";
|
|
85
|
+
import { applyCssVars as P, pxToRem as g } from "./utils/css.js";
|
|
86
|
+
import { getPrefixedDataAttributes as q } 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
|
-
|
|
88
|
+
import { vars as a } from "./skins/skin-contract.css-mistica.js";
|
|
89
|
+
import { text as G, withWordBreak as J, withoutWordBreak as Q, truncate as U, truncateToOneLine as X, vars as l } from "./text.css-mistica.js";
|
|
90
|
+
import { VIVO_NEW_SKIN as Y } from "./skins/constants.js";
|
|
91
|
+
import Z from "./screen-reader-only.js";
|
|
92
|
+
import { text10 as $, text9 as tt, text8 as et, text7 as rt, text6 as nt, text5 as it, text4 as ot, text3 as st, text2 as at, text1 as mt } from "./text-props.js";
|
|
93
|
+
const xt = {
|
|
93
94
|
light: 300,
|
|
94
95
|
regular: 400,
|
|
95
96
|
medium: 500,
|
|
96
97
|
bold: 700
|
|
97
|
-
},
|
|
98
|
+
}, ct = (t)=>t === !0 ? 1 : t || "initial", h = "Ħ", ut = /* @__PURE__ */ R(C, {
|
|
98
99
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ i("span", {
|
|
100
101
|
"aria-hidden": !0,
|
|
101
|
-
children:
|
|
102
|
+
children: h
|
|
102
103
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
children: /* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ i(Z, {
|
|
105
|
+
children: /* @__PURE__ */ i("span", {
|
|
105
106
|
children: "Vivo"
|
|
106
107
|
})
|
|
107
108
|
})
|
|
108
109
|
]
|
|
109
|
-
}),
|
|
110
|
-
let { children:
|
|
111
|
-
return typeof
|
|
110
|
+
}), lt = (param)=>{
|
|
111
|
+
let { children: t, ariaLabel: r, as: e } = param;
|
|
112
|
+
return typeof e == "string" && [
|
|
112
113
|
"h1",
|
|
113
114
|
"h2",
|
|
114
115
|
"h3",
|
|
115
116
|
"h4",
|
|
116
117
|
"h5",
|
|
117
118
|
"h6"
|
|
118
|
-
].includes(
|
|
119
|
-
ariaLabel:
|
|
120
|
-
children: /* @__PURE__ */
|
|
119
|
+
].includes(e) && typeof t == "string" && t.includes(h) ? {
|
|
120
|
+
ariaLabel: t.replace(new RegExp(h, "g"), "Vivo"),
|
|
121
|
+
children: /* @__PURE__ */ i("span", {
|
|
121
122
|
"aria-hidden": !0,
|
|
122
|
-
children:
|
|
123
|
+
children: t
|
|
123
124
|
})
|
|
124
125
|
} : {
|
|
125
|
-
children: T.Children.map(
|
|
126
|
-
children:
|
|
126
|
+
children: T.Children.map(t, (n)=>typeof n != "string" || !n.includes(h) ? n : /* @__PURE__ */ i(C, {
|
|
127
|
+
children: n.split(h).map((x, c)=>/* @__PURE__ */ R(T.Fragment, {
|
|
127
128
|
children: [
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
c > 0 && ut,
|
|
130
|
+
x
|
|
130
131
|
]
|
|
131
|
-
},
|
|
132
|
+
}, c))
|
|
132
133
|
})),
|
|
133
|
-
ariaLabel:
|
|
134
|
+
ariaLabel: r
|
|
134
135
|
};
|
|
135
136
|
}, o = (param)=>{
|
|
136
|
-
let { weight:
|
|
137
|
-
const { skinName:
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
137
|
+
let { weight: t, color: r = a.colors.textPrimary, decoration: e, truncate: n, transform: x, wordBreak: c = !0, hyphens: w = "auto", as: p = "span", children: u, size: v, mobileSize: b = v, desktopSize: y = v, lineHeight: A, mobileLineHeight: V = A, desktopLineHeight: I = A, letterSpacing: S, textAlign: W, textShadow: k, id: E, role: N, "aria-level": O, "aria-label": d, dataAttributes: F } = param;
|
|
138
|
+
const { skinName: _ } = m(), j = L(), D = ct(n), H = {
|
|
139
|
+
[a.colors.textPrimary]: a.colors.textPrimaryInverse,
|
|
140
|
+
[a.colors.textSecondary]: a.colors.textSecondaryInverse,
|
|
141
|
+
[a.colors.textLink]: a.colors.textLinkInverse,
|
|
142
|
+
[a.colors.textError]: a.colors.textErrorInverse
|
|
142
143
|
};
|
|
143
|
-
if (!
|
|
144
|
-
const
|
|
145
|
-
[
|
|
146
|
-
[
|
|
147
|
-
}),
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
152
|
-
}), B =
|
|
153
|
-
[
|
|
144
|
+
if (!u && u !== 0) return null;
|
|
145
|
+
const M = K(G, c ? J : Q, {
|
|
146
|
+
[U]: n,
|
|
147
|
+
[X]: n === 1 || n === !0
|
|
148
|
+
}), z = P({
|
|
149
|
+
[l.mobileSize]: b ? g(b) : "inherit",
|
|
150
|
+
[l.mobileLineHeight]: V ? g(V) : "inherit",
|
|
151
|
+
[l.desktopSize]: y ? g(y) : "inherit",
|
|
152
|
+
[l.desktopLineHeight]: I ? g(I) : "inherit"
|
|
153
|
+
}), B = n ? P({
|
|
154
|
+
[l.lineClamp]: String(D)
|
|
154
155
|
}) : {};
|
|
155
|
-
var
|
|
156
|
-
return
|
|
157
|
-
children:
|
|
158
|
-
ariaLabel:
|
|
159
|
-
as:
|
|
160
|
-
})), /*#__PURE__*/ T.createElement(
|
|
161
|
-
className:
|
|
162
|
-
id:
|
|
163
|
-
role:
|
|
164
|
-
"aria-level":
|
|
165
|
-
"aria-label":
|
|
166
|
-
},
|
|
167
|
-
style: _object_spread_props(_object_spread({},
|
|
168
|
-
hyphens:
|
|
169
|
-
WebkitHyphens:
|
|
170
|
-
letterSpacing:
|
|
171
|
-
fontWeight:
|
|
172
|
-
textTransform:
|
|
173
|
-
textDecoration:
|
|
174
|
-
overflowWrap:
|
|
175
|
-
color:
|
|
176
|
-
textAlign:
|
|
177
|
-
textShadow:
|
|
156
|
+
var _H_r;
|
|
157
|
+
return _ === Y && ({ ariaLabel: d, children: u } = lt({
|
|
158
|
+
children: u,
|
|
159
|
+
ariaLabel: d,
|
|
160
|
+
as: p
|
|
161
|
+
})), /*#__PURE__*/ T.createElement(p, _object_spread_props(_object_spread({
|
|
162
|
+
className: M,
|
|
163
|
+
id: E,
|
|
164
|
+
role: N,
|
|
165
|
+
"aria-level": O,
|
|
166
|
+
"aria-label": d
|
|
167
|
+
}, q(F, "Text")), {
|
|
168
|
+
style: _object_spread_props(_object_spread({}, z, B), {
|
|
169
|
+
hyphens: w,
|
|
170
|
+
WebkitHyphens: w,
|
|
171
|
+
letterSpacing: S,
|
|
172
|
+
fontWeight: t ? xt[t] : "inherit",
|
|
173
|
+
textTransform: x || "inherit",
|
|
174
|
+
textDecoration: e !== null && e !== void 0 ? e : "inherit",
|
|
175
|
+
overflowWrap: c ? "anywhere" : "inherit",
|
|
176
|
+
color: j ? (_H_r = H[r]) !== null && _H_r !== void 0 ? _H_r : r : r,
|
|
177
|
+
textAlign: W,
|
|
178
|
+
textShadow: k,
|
|
178
179
|
// When rendering as <pre/>, spaces are preserved and we don't want to remove them
|
|
179
|
-
whiteSpace:
|
|
180
|
+
whiteSpace: p === "pre" ? void 0 : "pre-line"
|
|
180
181
|
})
|
|
181
|
-
}),
|
|
182
|
-
},
|
|
183
|
-
if (
|
|
184
|
-
if (
|
|
185
|
-
if (
|
|
186
|
-
if (
|
|
182
|
+
}), u);
|
|
183
|
+
}, f = (t)=>{
|
|
184
|
+
if (t.light) return "light";
|
|
185
|
+
if (t.regular) return "regular";
|
|
186
|
+
if (t.medium) return "medium";
|
|
187
|
+
if (t.weight) return t.weight;
|
|
187
188
|
}, s = (param)=>{
|
|
188
|
-
let { forceMobileSizes:
|
|
189
|
-
return
|
|
190
|
-
size:
|
|
191
|
-
lineHeight:
|
|
189
|
+
let { forceMobileSizes: t, mobileSize: r, mobileLineHeight: e, desktopSize: n, desktopLineHeight: x } = param;
|
|
190
|
+
return t ? {
|
|
191
|
+
size: r,
|
|
192
|
+
lineHeight: e
|
|
192
193
|
} : {
|
|
193
|
-
mobileSize:
|
|
194
|
-
mobileLineHeight:
|
|
195
|
-
desktopSize:
|
|
196
|
-
desktopLineHeight:
|
|
194
|
+
mobileSize: r,
|
|
195
|
+
mobileLineHeight: e,
|
|
196
|
+
desktopSize: n,
|
|
197
|
+
desktopLineHeight: x
|
|
197
198
|
};
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
mobileSize: 12,
|
|
201
|
-
mobileLineHeight: "16px",
|
|
202
|
-
desktopSize: 14,
|
|
203
|
-
desktopLineHeight: "20px"
|
|
204
|
-
},
|
|
205
|
-
text2: {
|
|
206
|
-
mobileSize: 14,
|
|
207
|
-
mobileLineHeight: "20px",
|
|
208
|
-
desktopSize: 16,
|
|
209
|
-
desktopLineHeight: "24px"
|
|
210
|
-
},
|
|
211
|
-
text3: {
|
|
212
|
-
mobileSize: 16,
|
|
213
|
-
mobileLineHeight: "24px",
|
|
214
|
-
desktopSize: 18,
|
|
215
|
-
desktopLineHeight: "24px"
|
|
216
|
-
},
|
|
217
|
-
text4: {
|
|
218
|
-
mobileSize: 18,
|
|
219
|
-
mobileLineHeight: "24px",
|
|
220
|
-
desktopSize: 20,
|
|
221
|
-
desktopLineHeight: "28px"
|
|
222
|
-
},
|
|
223
|
-
text5: {
|
|
224
|
-
mobileSize: 20,
|
|
225
|
-
mobileLineHeight: "24px",
|
|
226
|
-
desktopSize: 28,
|
|
227
|
-
desktopLineHeight: "32px"
|
|
228
|
-
},
|
|
229
|
-
text6: {
|
|
230
|
-
mobileSize: 24,
|
|
231
|
-
mobileLineHeight: "32px",
|
|
232
|
-
desktopSize: 32,
|
|
233
|
-
desktopLineHeight: "40px"
|
|
234
|
-
},
|
|
235
|
-
text7: {
|
|
236
|
-
mobileSize: 28,
|
|
237
|
-
mobileLineHeight: "32px",
|
|
238
|
-
desktopSize: 40,
|
|
239
|
-
desktopLineHeight: "48px"
|
|
240
|
-
},
|
|
241
|
-
text8: {
|
|
242
|
-
mobileSize: 32,
|
|
243
|
-
mobileLineHeight: "40px",
|
|
244
|
-
desktopSize: 48,
|
|
245
|
-
desktopLineHeight: "56px"
|
|
246
|
-
},
|
|
247
|
-
text9: {
|
|
248
|
-
mobileSize: 40,
|
|
249
|
-
mobileLineHeight: "48px",
|
|
250
|
-
desktopSize: 56,
|
|
251
|
-
desktopLineHeight: "64px"
|
|
252
|
-
},
|
|
253
|
-
text10: {
|
|
254
|
-
mobileSize: 48,
|
|
255
|
-
mobileLineHeight: "56px",
|
|
256
|
-
desktopSize: 64,
|
|
257
|
-
desktopLineHeight: "72px"
|
|
258
|
-
}
|
|
259
|
-
}, ge = (_param)=>{
|
|
260
|
-
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
199
|
+
}, Vt = (_param)=>{
|
|
200
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
261
201
|
"dataAttributes",
|
|
262
202
|
"forceMobileSizes"
|
|
263
203
|
]);
|
|
264
|
-
const { textPresets:
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
-
forceMobileSizes:
|
|
267
|
-
},
|
|
268
|
-
weight:
|
|
204
|
+
const { textPresets: n } = m();
|
|
205
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
206
|
+
forceMobileSizes: r
|
|
207
|
+
}, $))), {
|
|
208
|
+
weight: n.text10.weight,
|
|
269
209
|
dataAttributes: _object_spread({
|
|
270
210
|
"component-name": "Text10"
|
|
271
|
-
},
|
|
272
|
-
}),
|
|
273
|
-
},
|
|
274
|
-
var { dataAttributes:
|
|
211
|
+
}, t)
|
|
212
|
+
}), e));
|
|
213
|
+
}, It = (_param)=>{
|
|
214
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
275
215
|
"dataAttributes",
|
|
276
216
|
"forceMobileSizes"
|
|
277
217
|
]);
|
|
278
|
-
const { textPresets:
|
|
279
|
-
return /* @__PURE__ */
|
|
280
|
-
forceMobileSizes:
|
|
281
|
-
},
|
|
282
|
-
weight:
|
|
218
|
+
const { textPresets: n } = m();
|
|
219
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
220
|
+
forceMobileSizes: r
|
|
221
|
+
}, tt))), {
|
|
222
|
+
weight: n.text9.weight,
|
|
283
223
|
dataAttributes: _object_spread({
|
|
284
224
|
"component-name": "Text9"
|
|
285
|
-
},
|
|
286
|
-
}),
|
|
287
|
-
},
|
|
288
|
-
var { dataAttributes:
|
|
225
|
+
}, t)
|
|
226
|
+
}), e));
|
|
227
|
+
}, Pt = (_param)=>{
|
|
228
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
289
229
|
"dataAttributes",
|
|
290
230
|
"forceMobileSizes"
|
|
291
231
|
]);
|
|
292
|
-
const { textPresets:
|
|
293
|
-
return /* @__PURE__ */
|
|
294
|
-
forceMobileSizes:
|
|
295
|
-
},
|
|
296
|
-
weight:
|
|
232
|
+
const { textPresets: n } = m();
|
|
233
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
234
|
+
forceMobileSizes: r
|
|
235
|
+
}, et))), {
|
|
236
|
+
weight: n.text8.weight,
|
|
297
237
|
dataAttributes: _object_spread({
|
|
298
238
|
"component-name": "Text8"
|
|
299
|
-
},
|
|
300
|
-
}),
|
|
301
|
-
},
|
|
302
|
-
var { dataAttributes:
|
|
239
|
+
}, t)
|
|
240
|
+
}), e));
|
|
241
|
+
}, Ct = (_param)=>{
|
|
242
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
303
243
|
"dataAttributes",
|
|
304
244
|
"forceMobileSizes"
|
|
305
245
|
]);
|
|
306
|
-
const { textPresets:
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
forceMobileSizes:
|
|
309
|
-
},
|
|
310
|
-
weight:
|
|
246
|
+
const { textPresets: n } = m();
|
|
247
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
248
|
+
forceMobileSizes: r
|
|
249
|
+
}, rt))), {
|
|
250
|
+
weight: n.text7.weight,
|
|
311
251
|
dataAttributes: _object_spread({
|
|
312
252
|
"component-name": "Text7"
|
|
313
|
-
},
|
|
314
|
-
}),
|
|
315
|
-
},
|
|
316
|
-
var { dataAttributes:
|
|
253
|
+
}, t)
|
|
254
|
+
}), e));
|
|
255
|
+
}, Rt = (_param)=>{
|
|
256
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
317
257
|
"dataAttributes",
|
|
318
258
|
"forceMobileSizes"
|
|
319
259
|
]);
|
|
320
|
-
const { textPresets:
|
|
321
|
-
return /* @__PURE__ */
|
|
322
|
-
forceMobileSizes:
|
|
323
|
-
},
|
|
324
|
-
weight:
|
|
260
|
+
const { textPresets: n } = m();
|
|
261
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
262
|
+
forceMobileSizes: r
|
|
263
|
+
}, nt))), {
|
|
264
|
+
weight: n.text6.weight,
|
|
325
265
|
dataAttributes: _object_spread({
|
|
326
266
|
"component-name": "Text6"
|
|
327
|
-
},
|
|
328
|
-
}),
|
|
329
|
-
},
|
|
330
|
-
var { dataAttributes:
|
|
267
|
+
}, t)
|
|
268
|
+
}), e));
|
|
269
|
+
}, St = (_param)=>{
|
|
270
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
331
271
|
"dataAttributes",
|
|
332
272
|
"forceMobileSizes"
|
|
333
273
|
]);
|
|
334
|
-
const { textPresets:
|
|
335
|
-
return /* @__PURE__ */
|
|
336
|
-
forceMobileSizes:
|
|
337
|
-
},
|
|
338
|
-
weight:
|
|
274
|
+
const { textPresets: n } = m();
|
|
275
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
276
|
+
forceMobileSizes: r
|
|
277
|
+
}, it))), {
|
|
278
|
+
weight: n.text5.weight,
|
|
339
279
|
dataAttributes: _object_spread({
|
|
340
280
|
"component-name": "Text5"
|
|
341
|
-
},
|
|
342
|
-
}),
|
|
343
|
-
},
|
|
344
|
-
var { dataAttributes:
|
|
281
|
+
}, t)
|
|
282
|
+
}), e));
|
|
283
|
+
}, Wt = (_param)=>{
|
|
284
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
345
285
|
"dataAttributes",
|
|
346
286
|
"forceMobileSizes"
|
|
347
287
|
]);
|
|
348
|
-
return /* @__PURE__ */
|
|
349
|
-
forceMobileSizes:
|
|
350
|
-
},
|
|
351
|
-
weight:
|
|
288
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
289
|
+
forceMobileSizes: r
|
|
290
|
+
}, ot))), {
|
|
291
|
+
weight: f(e),
|
|
352
292
|
dataAttributes: _object_spread({
|
|
353
293
|
"component-name": "Text4"
|
|
354
|
-
},
|
|
355
|
-
}),
|
|
356
|
-
},
|
|
357
|
-
var { dataAttributes:
|
|
294
|
+
}, t)
|
|
295
|
+
}), e));
|
|
296
|
+
}, kt = (_param)=>{
|
|
297
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
358
298
|
"dataAttributes",
|
|
359
299
|
"forceMobileSizes"
|
|
360
300
|
]);
|
|
361
|
-
return /* @__PURE__ */
|
|
362
|
-
forceMobileSizes:
|
|
363
|
-
},
|
|
364
|
-
weight:
|
|
301
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
302
|
+
forceMobileSizes: r
|
|
303
|
+
}, st))), {
|
|
304
|
+
weight: f(e),
|
|
365
305
|
dataAttributes: _object_spread({
|
|
366
306
|
"component-name": "Text3"
|
|
367
|
-
},
|
|
368
|
-
}),
|
|
369
|
-
},
|
|
370
|
-
var { dataAttributes:
|
|
307
|
+
}, t)
|
|
308
|
+
}), e));
|
|
309
|
+
}, Et = (_param)=>{
|
|
310
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
371
311
|
"dataAttributes",
|
|
372
312
|
"forceMobileSizes"
|
|
373
313
|
]);
|
|
374
|
-
return /* @__PURE__ */
|
|
375
|
-
forceMobileSizes:
|
|
376
|
-
},
|
|
377
|
-
weight:
|
|
314
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
315
|
+
forceMobileSizes: r
|
|
316
|
+
}, at))), {
|
|
317
|
+
weight: f(e),
|
|
378
318
|
dataAttributes: _object_spread({
|
|
379
319
|
"component-name": "Text2"
|
|
380
|
-
},
|
|
381
|
-
}),
|
|
382
|
-
},
|
|
383
|
-
var { dataAttributes:
|
|
320
|
+
}, t)
|
|
321
|
+
}), e));
|
|
322
|
+
}, Nt = (_param)=>{
|
|
323
|
+
var { dataAttributes: t, forceMobileSizes: r } = _param, e = _object_without_properties(_param, [
|
|
384
324
|
"dataAttributes",
|
|
385
325
|
"forceMobileSizes"
|
|
386
326
|
]);
|
|
387
|
-
return /* @__PURE__ */
|
|
388
|
-
forceMobileSizes:
|
|
389
|
-
},
|
|
390
|
-
weight:
|
|
327
|
+
return /* @__PURE__ */ i(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
|
|
328
|
+
forceMobileSizes: r
|
|
329
|
+
}, mt))), {
|
|
330
|
+
weight: f(e),
|
|
391
331
|
dataAttributes: _object_spread({
|
|
392
332
|
"component-name": "Text1"
|
|
393
|
-
},
|
|
394
|
-
}),
|
|
395
|
-
},
|
|
396
|
-
export { o as Text,
|
|
333
|
+
}, t)
|
|
334
|
+
}), e));
|
|
335
|
+
}, Ot = o;
|
|
336
|
+
export { o as Text, Nt as Text1, Vt as Text10, Et as Text2, kt as Text3, Wt as Text4, St as Text5, Rt as Text6, Ct as Text7, Pt as Text8, It as Text9, Ot as default, xt as mapToWeight };
|
package/dist-es/title.js
CHANGED
|
@@ -52,12 +52,13 @@ function _object_spread_props(target, source) {
|
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
54
|
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
55
|
-
import a, { Text1 as p,
|
|
55
|
+
import a, { Text1 as p, Text6 as h, Text2 as d } from "./text.js";
|
|
56
|
+
import { text3 as x } from "./text-props.js";
|
|
56
57
|
import T from "./inline.js";
|
|
57
58
|
import g from "./box.js";
|
|
58
|
-
import { vars as
|
|
59
|
+
import { vars as f } from "./skins/skin-contract.css-mistica.js";
|
|
59
60
|
import { useTheme as l } from "./hooks.js";
|
|
60
|
-
import { getPrefixedDataAttributes as
|
|
61
|
+
import { getPrefixedDataAttributes as u } from "./utils/dom.js";
|
|
61
62
|
const m = (param)=>{
|
|
62
63
|
let { title: e, right: i, dataAttributes: o } = param;
|
|
63
64
|
const { textPresets: r } = l();
|
|
@@ -69,21 +70,21 @@ const m = (param)=>{
|
|
|
69
70
|
e,
|
|
70
71
|
/* @__PURE__ */ t(g, {
|
|
71
72
|
paddingLeft: 16,
|
|
72
|
-
children: /* @__PURE__ */ t(
|
|
73
|
+
children: /* @__PURE__ */ t(d, {
|
|
73
74
|
weight: r.link.weight,
|
|
74
75
|
children: i
|
|
75
76
|
})
|
|
76
77
|
})
|
|
77
78
|
]
|
|
78
|
-
}) : /* @__PURE__ */ t("div", _object_spread_props(_object_spread({},
|
|
79
|
+
}) : /* @__PURE__ */ t("div", _object_spread_props(_object_spread({}, u(o)), {
|
|
79
80
|
children: e
|
|
80
81
|
}));
|
|
81
|
-
},
|
|
82
|
+
}, S = (param)=>{
|
|
82
83
|
let { children: e, as: i = "h3", id: o, right: r, dataAttributes: s } = param;
|
|
83
84
|
const { textPresets: n } = l();
|
|
84
85
|
return /* @__PURE__ */ t(m, {
|
|
85
86
|
title: /* @__PURE__ */ t(p, {
|
|
86
|
-
color:
|
|
87
|
+
color: f.colors.textSecondary,
|
|
87
88
|
transform: "uppercase",
|
|
88
89
|
weight: n.title1.weight,
|
|
89
90
|
as: i,
|
|
@@ -96,14 +97,14 @@ const m = (param)=>{
|
|
|
96
97
|
"component-name": "Title1"
|
|
97
98
|
}, s)
|
|
98
99
|
});
|
|
99
|
-
},
|
|
100
|
+
}, j = (param)=>{
|
|
100
101
|
let { children: e, as: i = "h3", id: o, right: r, dataAttributes: s } = param;
|
|
101
102
|
const { textPresets: n } = l();
|
|
102
103
|
return /* @__PURE__ */ t(m, {
|
|
103
104
|
title: /* @__PURE__ */ t(a, _object_spread_props(_object_spread({
|
|
104
105
|
as: i,
|
|
105
106
|
id: o
|
|
106
|
-
},
|
|
107
|
+
}, x), {
|
|
107
108
|
weight: n.title2.weight,
|
|
108
109
|
children: e
|
|
109
110
|
})),
|
|
@@ -112,7 +113,7 @@ const m = (param)=>{
|
|
|
112
113
|
"component-name": "Title2"
|
|
113
114
|
}, s)
|
|
114
115
|
});
|
|
115
|
-
},
|
|
116
|
+
}, v = (param)=>{
|
|
116
117
|
let { children: e, as: i = "h3", id: o, right: r, dataAttributes: s } = param;
|
|
117
118
|
const { textPresets: n } = l();
|
|
118
119
|
return /* @__PURE__ */ t(m, {
|
|
@@ -131,10 +132,10 @@ const m = (param)=>{
|
|
|
131
132
|
"component-name": "Title3"
|
|
132
133
|
}, s)
|
|
133
134
|
});
|
|
134
|
-
},
|
|
135
|
+
}, y = (param)=>{
|
|
135
136
|
let { children: e, as: i = "h3", id: o, right: r, dataAttributes: s } = param;
|
|
136
137
|
return /* @__PURE__ */ t(m, {
|
|
137
|
-
title: /* @__PURE__ */ t(
|
|
138
|
+
title: /* @__PURE__ */ t(h, {
|
|
138
139
|
as: i,
|
|
139
140
|
id: o,
|
|
140
141
|
children: e
|
|
@@ -145,4 +146,4 @@ const m = (param)=>{
|
|
|
145
146
|
}, s)
|
|
146
147
|
});
|
|
147
148
|
};
|
|
148
|
-
export {
|
|
149
|
+
export { S as Title1, j as Title2, v as Title3, y as Title4 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telefonica/mistica",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@swc/cli": "^0.1.62",
|
|
80
80
|
"@swc/core": "^1.3.95",
|
|
81
81
|
"@swc/jest": "^0.2.29",
|
|
82
|
-
"@telefonica/acceptance-testing": "5.
|
|
82
|
+
"@telefonica/acceptance-testing": "5.1.0",
|
|
83
83
|
"@telefonica/eslint-config": "^2.2.0",
|
|
84
84
|
"@telefonica/prettier-config": "^2.0.0",
|
|
85
85
|
"@testing-library/dom": "^10.2.0",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"lodash": "^4.17.21",
|
|
124
124
|
"mini-css-extract-plugin": "^1.6.2",
|
|
125
125
|
"node-fetch": "^2.6.7",
|
|
126
|
-
"playroom": "^0.
|
|
126
|
+
"playroom": "^0.39.0",
|
|
127
127
|
"postcss": "^8.4.18",
|
|
128
128
|
"postcss-loader": "^4.2.0",
|
|
129
129
|
"prettier": "^3.3.2",
|