@telefonica/mistica 15.5.0 → 15.6.1
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.d.ts +4 -0
- package/dist/chip.d.ts +5 -20
- package/dist/chip.js +44 -60
- package/dist/community/advanced-data-card.css-mistica.js +13 -16
- package/dist/community/advanced-data-card.css.d.ts +0 -1
- package/dist/community/advanced-data-card.js +25 -26
- package/dist/highlighted-card.d.ts +7 -40
- package/dist/highlighted-card.js +44 -48
- package/dist/icon-button.d.ts +190 -118
- package/dist/icon-button.js +87 -112
- package/dist/image.js +2 -1
- package/dist/list.d.ts +17 -20
- package/dist/list.js +188 -183
- package/dist/logo.d.ts +4 -23
- package/dist/logo.js +42 -67
- package/dist/package-version.js +1 -1
- package/dist/text-link.d.ts +2 -21
- package/dist/text-link.js +16 -15
- package/dist/text.js +45 -44
- package/dist/touchable.d.ts +18 -48
- package/dist-es/chip.js +68 -84
- package/dist-es/community/advanced-data-card.css-mistica.js +6 -6
- package/dist-es/community/advanced-data-card.js +69 -70
- package/dist-es/highlighted-card.js +61 -65
- package/dist-es/icon-button.js +97 -122
- package/dist-es/image.js +2 -1
- package/dist-es/list.js +248 -243
- package/dist-es/logo.js +80 -105
- package/dist-es/package-version.js +1 -1
- package/dist-es/style.css +1 -1
- package/dist-es/text-link.js +25 -24
- package/dist-es/text.js +59 -58
- package/package.json +1 -1
package/dist/text.js
CHANGED
|
@@ -17,7 +17,7 @@ _export(exports, {
|
|
|
17
17
|
return ke;
|
|
18
18
|
},
|
|
19
19
|
Text10: function() {
|
|
20
|
-
return
|
|
20
|
+
return ce;
|
|
21
21
|
},
|
|
22
22
|
Text2: function() {
|
|
23
23
|
return Se;
|
|
@@ -41,7 +41,7 @@ _export(exports, {
|
|
|
41
41
|
return ge;
|
|
42
42
|
},
|
|
43
43
|
Text9: function() {
|
|
44
|
-
return
|
|
44
|
+
return he;
|
|
45
45
|
},
|
|
46
46
|
default: function() {
|
|
47
47
|
return He;
|
|
@@ -201,73 +201,74 @@ const Z = {
|
|
|
201
201
|
})
|
|
202
202
|
]
|
|
203
203
|
}), te = (e)=>_react.Children.map(e, (t)=>typeof t != "string" || !t.includes(u) ? t : /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
204
|
-
children: t.split(u).map((i,
|
|
204
|
+
children: t.split(u).map((i, r)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_react.Fragment, {
|
|
205
205
|
children: [
|
|
206
|
-
|
|
206
|
+
r > 0 && ee,
|
|
207
207
|
i
|
|
208
208
|
]
|
|
209
|
-
},
|
|
209
|
+
}, r))
|
|
210
210
|
})), o = (param)=>{
|
|
211
|
-
let { weight: e, color: t = _skincontractcssmistica.vars.colors.textPrimary, decoration: i, truncate:
|
|
212
|
-
const { skinName: N } = (0, _hooks.useTheme)(),
|
|
211
|
+
let { weight: e, color: t = _skincontractcssmistica.vars.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;
|
|
212
|
+
const { skinName: N } = (0, _hooks.useTheme)(), E = (0, _themevariantcontext.useIsInverseVariant)(), F = $(r), O = {
|
|
213
213
|
[_skincontractcssmistica.vars.colors.textPrimary]: _skincontractcssmistica.vars.colors.textPrimaryInverse,
|
|
214
214
|
[_skincontractcssmistica.vars.colors.textSecondary]: _skincontractcssmistica.vars.colors.textSecondaryInverse,
|
|
215
|
-
[_skincontractcssmistica.vars.colors.textLink]: _skincontractcssmistica.vars.colors.textLinkInverse
|
|
215
|
+
[_skincontractcssmistica.vars.colors.textLink]: _skincontractcssmistica.vars.colors.textLinkInverse,
|
|
216
|
+
[_skincontractcssmistica.vars.colors.textError]: _skincontractcssmistica.vars.colors.textErrorInverse
|
|
216
217
|
};
|
|
217
218
|
if (!p && p !== 0) return null;
|
|
218
|
-
const
|
|
219
|
-
[_textcssmistica.truncate]:
|
|
220
|
-
[_textcssmistica.truncateToOneLine]:
|
|
221
|
-
}),
|
|
219
|
+
const _ = (0, _classnames.default)(_textcssmistica.text, d ? _textcssmistica.withWordBreak : _textcssmistica.withoutWordBreak, {
|
|
220
|
+
[_textcssmistica.truncate]: r,
|
|
221
|
+
[_textcssmistica.truncateToOneLine]: r === 1 || r === !0
|
|
222
|
+
}), j = (0, _css.applyCssVars)({
|
|
222
223
|
[_textcssmistica.vars.mobileSize]: f ? (0, _css.pxToRem)(f) : "inherit",
|
|
223
224
|
[_textcssmistica.vars.mobileLineHeight]: H ? (0, _css.pxToRem)(H) : "inherit",
|
|
224
225
|
[_textcssmistica.vars.desktopSize]: S ? (0, _css.pxToRem)(S) : "inherit",
|
|
225
226
|
[_textcssmistica.vars.desktopLineHeight]: L ? (0, _css.pxToRem)(L) : "inherit"
|
|
226
|
-
}),
|
|
227
|
-
[_textcssmistica.vars.lineClamp]: String(
|
|
227
|
+
}), D = r ? (0, _css.applyCssVars)({
|
|
228
|
+
[_textcssmistica.vars.lineClamp]: String(F)
|
|
228
229
|
}) : {};
|
|
229
|
-
var
|
|
230
|
+
var _O_t;
|
|
230
231
|
return /*#__PURE__*/ _react.createElement(A, _object_spread_props(_object_spread({
|
|
231
|
-
className:
|
|
232
|
+
className: _,
|
|
232
233
|
id: P,
|
|
233
234
|
role: C,
|
|
234
235
|
"aria-level": W
|
|
235
236
|
}, (0, _dom.getPrefixedDataAttributes)(R, "Text")), {
|
|
236
|
-
style: _object_spread_props(_object_spread({},
|
|
237
|
+
style: _object_spread_props(_object_spread({}, j, D), {
|
|
237
238
|
hyphens: b,
|
|
238
239
|
WebkitHyphens: b,
|
|
239
|
-
letterSpacing:
|
|
240
|
+
letterSpacing: I,
|
|
240
241
|
fontWeight: e ? Z[e] : "inherit",
|
|
241
|
-
textTransform:
|
|
242
|
+
textTransform: h || "inherit",
|
|
242
243
|
textDecoration: i !== null && i !== void 0 ? i : "inherit",
|
|
243
244
|
overflowWrap: d ? "anywhere" : "inherit",
|
|
244
|
-
color:
|
|
245
|
-
textAlign:
|
|
246
|
-
textShadow:
|
|
245
|
+
color: E ? (_O_t = O[t]) !== null && _O_t !== void 0 ? _O_t : t : t,
|
|
246
|
+
textAlign: V,
|
|
247
|
+
textShadow: y
|
|
247
248
|
})
|
|
248
249
|
}), N === _constants.VIVO_NEW_SKIN ? te(p) : p);
|
|
249
|
-
},
|
|
250
|
+
}, c = (e)=>{
|
|
250
251
|
if (e.light) return "light";
|
|
251
252
|
if (e.regular) return "regular";
|
|
252
253
|
if (e.medium) return "medium";
|
|
253
254
|
if (e.weight) return e.weight;
|
|
254
255
|
}, s = (param)=>{
|
|
255
|
-
let { forceMobileSizes: e, mobileSize: t, mobileLineHeight: i, desktopSize:
|
|
256
|
+
let { forceMobileSizes: e, mobileSize: t, mobileLineHeight: i, desktopSize: r, desktopLineHeight: h } = param;
|
|
256
257
|
return e ? {
|
|
257
258
|
size: t,
|
|
258
259
|
lineHeight: i
|
|
259
260
|
} : {
|
|
260
261
|
mobileSize: t,
|
|
261
262
|
mobileLineHeight: i,
|
|
262
|
-
desktopSize:
|
|
263
|
-
desktopLineHeight:
|
|
263
|
+
desktopSize: r,
|
|
264
|
+
desktopLineHeight: h
|
|
264
265
|
};
|
|
265
|
-
},
|
|
266
|
+
}, ce = (_param)=>{
|
|
266
267
|
var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
|
|
267
268
|
"dataAttributes",
|
|
268
269
|
"forceMobileSizes"
|
|
269
270
|
]);
|
|
270
|
-
const { textPresets:
|
|
271
|
+
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
271
272
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
272
273
|
forceMobileSizes: t,
|
|
273
274
|
mobileSize: 48,
|
|
@@ -275,17 +276,17 @@ const Z = {
|
|
|
275
276
|
desktopSize: 64,
|
|
276
277
|
desktopLineHeight: "72px"
|
|
277
278
|
})), {
|
|
278
|
-
weight:
|
|
279
|
+
weight: r.text10.weight,
|
|
279
280
|
dataAttributes: _object_spread({
|
|
280
281
|
"component-name": "Text10"
|
|
281
282
|
}, e)
|
|
282
283
|
}), i));
|
|
283
|
-
},
|
|
284
|
+
}, he = (_param)=>{
|
|
284
285
|
var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
|
|
285
286
|
"dataAttributes",
|
|
286
287
|
"forceMobileSizes"
|
|
287
288
|
]);
|
|
288
|
-
const { textPresets:
|
|
289
|
+
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
289
290
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
290
291
|
forceMobileSizes: t,
|
|
291
292
|
mobileSize: 40,
|
|
@@ -293,7 +294,7 @@ const Z = {
|
|
|
293
294
|
desktopSize: 56,
|
|
294
295
|
desktopLineHeight: "64px"
|
|
295
296
|
})), {
|
|
296
|
-
weight:
|
|
297
|
+
weight: r.text9.weight,
|
|
297
298
|
dataAttributes: _object_spread({
|
|
298
299
|
"component-name": "Text9"
|
|
299
300
|
}, e)
|
|
@@ -303,7 +304,7 @@ const Z = {
|
|
|
303
304
|
"dataAttributes",
|
|
304
305
|
"forceMobileSizes"
|
|
305
306
|
]);
|
|
306
|
-
const { textPresets:
|
|
307
|
+
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
307
308
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
308
309
|
forceMobileSizes: t,
|
|
309
310
|
mobileSize: 32,
|
|
@@ -311,7 +312,7 @@ const Z = {
|
|
|
311
312
|
desktopSize: 48,
|
|
312
313
|
desktopLineHeight: "56px"
|
|
313
314
|
})), {
|
|
314
|
-
weight:
|
|
315
|
+
weight: r.text8.weight,
|
|
315
316
|
dataAttributes: _object_spread({
|
|
316
317
|
"component-name": "Text8"
|
|
317
318
|
}, e)
|
|
@@ -321,7 +322,7 @@ const Z = {
|
|
|
321
322
|
"dataAttributes",
|
|
322
323
|
"forceMobileSizes"
|
|
323
324
|
]);
|
|
324
|
-
const { textPresets:
|
|
325
|
+
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
325
326
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
326
327
|
forceMobileSizes: t,
|
|
327
328
|
mobileSize: 28,
|
|
@@ -329,7 +330,7 @@ const Z = {
|
|
|
329
330
|
desktopSize: 40,
|
|
330
331
|
desktopLineHeight: "48px"
|
|
331
332
|
})), {
|
|
332
|
-
weight:
|
|
333
|
+
weight: r.text7.weight,
|
|
333
334
|
dataAttributes: _object_spread({
|
|
334
335
|
"component-name": "Text7"
|
|
335
336
|
}, e)
|
|
@@ -339,7 +340,7 @@ const Z = {
|
|
|
339
340
|
"dataAttributes",
|
|
340
341
|
"forceMobileSizes"
|
|
341
342
|
]);
|
|
342
|
-
const { textPresets:
|
|
343
|
+
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
343
344
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
344
345
|
forceMobileSizes: t,
|
|
345
346
|
mobileSize: 24,
|
|
@@ -347,7 +348,7 @@ const Z = {
|
|
|
347
348
|
desktopSize: 32,
|
|
348
349
|
desktopLineHeight: "40px"
|
|
349
350
|
})), {
|
|
350
|
-
weight:
|
|
351
|
+
weight: r.text6.weight,
|
|
351
352
|
dataAttributes: _object_spread({
|
|
352
353
|
"component-name": "Text6"
|
|
353
354
|
}, e)
|
|
@@ -357,7 +358,7 @@ const Z = {
|
|
|
357
358
|
"dataAttributes",
|
|
358
359
|
"forceMobileSizes"
|
|
359
360
|
]);
|
|
360
|
-
const { textPresets:
|
|
361
|
+
const { textPresets: r } = (0, _hooks.useTheme)();
|
|
361
362
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
362
363
|
forceMobileSizes: t,
|
|
363
364
|
mobileSize: 20,
|
|
@@ -365,7 +366,7 @@ const Z = {
|
|
|
365
366
|
desktopSize: 28,
|
|
366
367
|
desktopLineHeight: "32px"
|
|
367
368
|
})), {
|
|
368
|
-
weight:
|
|
369
|
+
weight: r.text5.weight,
|
|
369
370
|
dataAttributes: _object_spread({
|
|
370
371
|
"component-name": "Text5"
|
|
371
372
|
}, e)
|
|
@@ -382,7 +383,7 @@ const Z = {
|
|
|
382
383
|
desktopSize: 20,
|
|
383
384
|
desktopLineHeight: "28px"
|
|
384
385
|
})), {
|
|
385
|
-
weight:
|
|
386
|
+
weight: c(i),
|
|
386
387
|
dataAttributes: _object_spread({
|
|
387
388
|
"component-name": "Text4"
|
|
388
389
|
}, e)
|
|
@@ -399,7 +400,7 @@ const Z = {
|
|
|
399
400
|
desktopSize: 18,
|
|
400
401
|
desktopLineHeight: "24px"
|
|
401
402
|
})), {
|
|
402
|
-
weight:
|
|
403
|
+
weight: c(i),
|
|
403
404
|
dataAttributes: _object_spread({
|
|
404
405
|
"component-name": "Text3"
|
|
405
406
|
}, e)
|
|
@@ -416,7 +417,7 @@ const Z = {
|
|
|
416
417
|
desktopSize: 16,
|
|
417
418
|
desktopLineHeight: "24px"
|
|
418
419
|
})), {
|
|
419
|
-
weight:
|
|
420
|
+
weight: c(i),
|
|
420
421
|
dataAttributes: _object_spread({
|
|
421
422
|
"component-name": "Text2"
|
|
422
423
|
}, e)
|
|
@@ -433,7 +434,7 @@ const Z = {
|
|
|
433
434
|
desktopSize: 14,
|
|
434
435
|
desktopLineHeight: "20px"
|
|
435
436
|
})), {
|
|
436
|
-
weight:
|
|
437
|
+
weight: c(i),
|
|
437
438
|
dataAttributes: _object_spread({
|
|
438
439
|
"component-name": "Text1"
|
|
439
440
|
}, e)
|
package/dist/touchable.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { ExclusifyUnion } from './utils/utility-types';
|
|
2
3
|
import type { DataAttributes, TrackingEvent } from './utils/types';
|
|
3
4
|
import type { Location } from 'history';
|
|
4
|
-
export type PressHandler = (event: React.MouseEvent<HTMLElement>) => void
|
|
5
|
+
export type PressHandler = (event: React.MouseEvent<HTMLElement>) => void | undefined | Promise<void>;
|
|
5
6
|
interface CommonProps {
|
|
6
7
|
children: React.ReactNode;
|
|
7
8
|
className?: string;
|
|
@@ -26,63 +27,32 @@ interface CommonProps {
|
|
|
26
27
|
as?: 'a';
|
|
27
28
|
stopPropagation?: boolean;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
type OnPressProps = {
|
|
31
|
+
onPress: PressHandler;
|
|
32
|
+
};
|
|
33
|
+
type HrefProps = {
|
|
31
34
|
href: string;
|
|
32
35
|
newTab?: boolean;
|
|
33
36
|
loadOnTop?: boolean;
|
|
34
|
-
to?: undefined;
|
|
35
|
-
onPress?: undefined;
|
|
36
|
-
/** with "href", onNavigate will be executed before the navigation */
|
|
37
|
-
onNavigate?: () => void | Promise<void>;
|
|
38
|
-
}
|
|
39
|
-
interface PropsMaybeHref extends CommonProps {
|
|
40
|
-
maybe: true;
|
|
41
|
-
href?: string;
|
|
42
|
-
newTab?: boolean;
|
|
43
|
-
loadOnTop?: boolean;
|
|
44
|
-
to?: undefined;
|
|
45
|
-
onPress?: undefined;
|
|
46
|
-
/** with "href", onNavigate will be executed before the navigation */
|
|
47
37
|
onNavigate?: () => void | Promise<void>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
maybe?: undefined;
|
|
38
|
+
};
|
|
39
|
+
type ToProps = {
|
|
51
40
|
to: string | Location;
|
|
52
41
|
fullPageOnWebView?: boolean;
|
|
53
42
|
replace?: boolean;
|
|
54
|
-
href?: undefined;
|
|
55
|
-
onPress?: undefined;
|
|
56
|
-
/** with "to", onNavigate will be executed in parallel to the navigation */
|
|
57
43
|
onNavigate?: () => void | Promise<void>;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
to?: string | Location;
|
|
62
|
-
fullPageOnWebView?: boolean;
|
|
63
|
-
replace?: boolean;
|
|
64
|
-
href?: undefined;
|
|
65
|
-
onPress?: undefined;
|
|
66
|
-
/** with "to", onNavigate will be executed in parallel to the navigation */
|
|
67
|
-
onNavigate?: () => void | Promise<void>;
|
|
68
|
-
}
|
|
69
|
-
interface PropsOnPress extends CommonProps {
|
|
70
|
-
maybe?: undefined;
|
|
71
|
-
onPress: PressHandler;
|
|
72
|
-
href?: undefined;
|
|
73
|
-
to?: undefined;
|
|
44
|
+
};
|
|
45
|
+
type SubmitProps = {
|
|
46
|
+
type: 'submit';
|
|
74
47
|
formId?: string;
|
|
75
|
-
onNavigate?: undefined;
|
|
76
|
-
}
|
|
77
|
-
interface PropsMaybeOnPress extends CommonProps {
|
|
78
|
-
maybe: true;
|
|
79
48
|
onPress?: PressHandler;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
49
|
+
};
|
|
50
|
+
export type AlwaysTouchableComponentProps = ExclusifyUnion<OnPressProps | HrefProps | ToProps> & Pick<CommonProps, 'trackingEvent' | 'dataAttributes' | 'role' | 'aria-label'>;
|
|
51
|
+
export type TouchableComponentProps<Props> = ExclusifyUnion<Props | (OnPressProps & Props) | (HrefProps & Props) | (ToProps & Props)> & Pick<CommonProps, 'trackingEvent' | 'dataAttributes' | 'role' | 'aria-label'>;
|
|
52
|
+
type Maybe<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K> & {
|
|
53
|
+
maybe: true;
|
|
54
|
+
};
|
|
55
|
+
export type TouchableProps = ExclusifyUnion<OnPressProps | HrefProps | ToProps | Maybe<OnPressProps, 'onPress'> | Maybe<HrefProps, 'href'> | Maybe<ToProps, 'to'> | SubmitProps> & CommonProps;
|
|
86
56
|
export type TouchableElement = HTMLDivElement | HTMLAnchorElement | HTMLButtonElement;
|
|
87
57
|
declare const Touchable: React.ForwardRefExoticComponent<TouchableProps & React.RefAttributes<TouchableElement>>;
|
|
88
58
|
export declare const BaseTouchable: React.ForwardRefExoticComponent<(TouchableProps & {
|
package/dist-es/chip.js
CHANGED
|
@@ -51,124 +51,108 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
}
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
|
-
import { jsxs as
|
|
55
|
-
import
|
|
56
|
-
import { useTheme as
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import { Text2 as
|
|
60
|
-
import
|
|
61
|
-
import { pxToRem as
|
|
62
|
-
import { iconActive as
|
|
63
|
-
import { vars as
|
|
64
|
-
import { getPrefixedDataAttributes as
|
|
65
|
-
import { useThemeVariant as
|
|
66
|
-
import
|
|
67
|
-
const
|
|
68
|
-
const { Icon:
|
|
54
|
+
import { jsxs as g, Fragment as x, jsx as e } from "react/jsx-runtime";
|
|
55
|
+
import n from "classnames";
|
|
56
|
+
import { useTheme as D } from "./hooks.js";
|
|
57
|
+
import A from "./badge.js";
|
|
58
|
+
import i from "./box.js";
|
|
59
|
+
import { Text2 as V } from "./text.js";
|
|
60
|
+
import z from "./generated/mistica-icons/icon-close-regular.js";
|
|
61
|
+
import { pxToRem as a } from "./utils/css.js";
|
|
62
|
+
import { iconActive as L, icon as M, chipVariants as o, chipWrapper as s, button as F, wrappedContent as W, chipInteractiveVariants as $ } from "./chip.css-mistica.js";
|
|
63
|
+
import { vars as q } from "./skins/skin-contract.css-mistica.js";
|
|
64
|
+
import { getPrefixedDataAttributes as R } from "./utils/dom.js";
|
|
65
|
+
import { useThemeVariant as E } from "./theme-variant-context.js";
|
|
66
|
+
import G, { BaseTouchable as H } from "./touchable.js";
|
|
67
|
+
const J = (t)=>{
|
|
68
|
+
const { Icon: c, children: T, id: k, dataAttributes: l, active: d, badge: r, onClose: m } = t, { texts: I, isDarkMode: B, textPresets: N } = D(), h = E() === "alternative", p = c ? {
|
|
69
69
|
mobile: 16,
|
|
70
70
|
desktop: 8
|
|
71
71
|
} : {
|
|
72
72
|
mobile: 20,
|
|
73
73
|
desktop: 12
|
|
74
|
-
},
|
|
74
|
+
}, w = {
|
|
75
75
|
mobile: 20,
|
|
76
76
|
desktop: 12
|
|
77
|
-
},
|
|
77
|
+
}, b = {
|
|
78
78
|
mobile: 16,
|
|
79
79
|
desktop: 8
|
|
80
|
-
},
|
|
81
|
-
children:
|
|
82
|
-
value:
|
|
80
|
+
}, y = ()=>r ? /* @__PURE__ */ e(x, {
|
|
81
|
+
children: r === !0 ? /* @__PURE__ */ e(A, {}) : /* @__PURE__ */ e(A, {
|
|
82
|
+
value: r
|
|
83
83
|
})
|
|
84
|
-
}) : null,
|
|
84
|
+
}) : null, u = /* @__PURE__ */ g(x, {
|
|
85
85
|
children: [
|
|
86
|
-
|
|
86
|
+
c && /* @__PURE__ */ e(i, {
|
|
87
87
|
paddingRight: 4,
|
|
88
|
-
className:
|
|
89
|
-
children: /* @__PURE__ */
|
|
88
|
+
className: d ? L : M,
|
|
89
|
+
children: /* @__PURE__ */ e(c, {
|
|
90
90
|
color: "currentColor",
|
|
91
|
-
size:
|
|
91
|
+
size: a(16)
|
|
92
92
|
})
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
paddingRight:
|
|
96
|
-
children: /* @__PURE__ */
|
|
97
|
-
id:
|
|
98
|
-
weight:
|
|
94
|
+
/* @__PURE__ */ e(i, {
|
|
95
|
+
paddingRight: r ? 8 : m ? 4 : 0,
|
|
96
|
+
children: /* @__PURE__ */ e(V, {
|
|
97
|
+
id: k,
|
|
98
|
+
weight: N.indicator.weight,
|
|
99
99
|
truncate: 1,
|
|
100
100
|
color: "currentColor",
|
|
101
|
-
children:
|
|
101
|
+
children: T
|
|
102
102
|
})
|
|
103
103
|
})
|
|
104
104
|
]
|
|
105
105
|
});
|
|
106
|
-
if (
|
|
107
|
-
className:
|
|
108
|
-
paddingLeft:
|
|
109
|
-
paddingRight:
|
|
110
|
-
},
|
|
106
|
+
if (r) return /* @__PURE__ */ g(i, _object_spread_props(_object_spread({
|
|
107
|
+
className: n(h ? o.overAlternative : o.default, s),
|
|
108
|
+
paddingLeft: p,
|
|
109
|
+
paddingRight: b
|
|
110
|
+
}, R(l, "Chip")), {
|
|
111
111
|
children: [
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
u,
|
|
113
|
+
y()
|
|
114
114
|
]
|
|
115
115
|
}));
|
|
116
|
-
if (
|
|
117
|
-
className:
|
|
118
|
-
paddingLeft:
|
|
119
|
-
paddingRight:
|
|
120
|
-
},
|
|
116
|
+
if (m) return /* @__PURE__ */ g(i, _object_spread_props(_object_spread({
|
|
117
|
+
className: n(h ? o.overAlternative : o.default, s),
|
|
118
|
+
paddingLeft: p,
|
|
119
|
+
paddingRight: b
|
|
120
|
+
}, R(l, "Chip")), {
|
|
121
121
|
children: [
|
|
122
|
-
|
|
123
|
-
/* @__PURE__ */
|
|
122
|
+
u,
|
|
123
|
+
/* @__PURE__ */ e(G, {
|
|
124
124
|
style: {
|
|
125
125
|
display: "flex",
|
|
126
126
|
justifyContent: "center",
|
|
127
127
|
alignItems: "center",
|
|
128
|
-
width:
|
|
129
|
-
height:
|
|
128
|
+
width: a(24),
|
|
129
|
+
height: a(24)
|
|
130
130
|
},
|
|
131
|
-
"aria-label":
|
|
132
|
-
onPress: ()=>
|
|
133
|
-
children: /* @__PURE__ */
|
|
134
|
-
size:
|
|
135
|
-
color:
|
|
131
|
+
"aria-label": I.closeButtonLabel,
|
|
132
|
+
onPress: ()=>m(),
|
|
133
|
+
children: /* @__PURE__ */ e(z, {
|
|
134
|
+
size: a(16),
|
|
135
|
+
color: q.colors.neutralMedium
|
|
136
136
|
})
|
|
137
137
|
})
|
|
138
138
|
]
|
|
139
139
|
}));
|
|
140
|
-
const
|
|
140
|
+
const f = t.href || t.onPress || t.to, P = d !== void 0 || f, v = _object_spread({
|
|
141
141
|
"component-name": "Chip"
|
|
142
|
-
},
|
|
143
|
-
className:
|
|
144
|
-
|
|
145
|
-
[
|
|
142
|
+
}, l), C = (j)=>/* @__PURE__ */ e(i, {
|
|
143
|
+
className: n(o[d ? "active" : h ? "overAlternative" : "default"], // If the chip is wrapped inside a BaseTouchable, we set inline-flex to the Touchable instead
|
|
144
|
+
f ? W : s, {
|
|
145
|
+
[$[B ? "dark" : "light"]]: P
|
|
146
146
|
}),
|
|
147
|
-
paddingLeft:
|
|
148
|
-
paddingRight:
|
|
149
|
-
dataAttributes:
|
|
150
|
-
children:
|
|
147
|
+
paddingLeft: p,
|
|
148
|
+
paddingRight: w,
|
|
149
|
+
dataAttributes: j,
|
|
150
|
+
children: u
|
|
151
151
|
});
|
|
152
|
-
return
|
|
153
|
-
className:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
trackingEvent: e.trackingEvent,
|
|
160
|
-
to: e.to,
|
|
161
|
-
fullPageOnWebView: e.fullPageOnWebView,
|
|
162
|
-
dataAttributes: o,
|
|
163
|
-
className: r,
|
|
164
|
-
children: c()
|
|
165
|
-
}) : e.href ? /* @__PURE__ */ t(k, {
|
|
166
|
-
trackingEvent: e.trackingEvent,
|
|
167
|
-
href: e.href,
|
|
168
|
-
newTab: e.newTab,
|
|
169
|
-
dataAttributes: o,
|
|
170
|
-
className: r,
|
|
171
|
-
children: c()
|
|
172
|
-
}) : c(o);
|
|
173
|
-
}, ie = G;
|
|
174
|
-
export { ie as default };
|
|
152
|
+
return f ? /* @__PURE__ */ e(H, _object_spread_props(_object_spread({}, t), {
|
|
153
|
+
className: n(s, F),
|
|
154
|
+
dataAttributes: v,
|
|
155
|
+
children: C()
|
|
156
|
+
})) : C(v);
|
|
157
|
+
}, oe = J;
|
|
158
|
+
export { oe as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "../icon-button.css.ts.vanilla.css-mistica.js";
|
|
3
3
|
import "./advanced-data-card.css.ts.vanilla.css-mistica.js";
|
|
4
|
-
var
|
|
5
|
-
default: "
|
|
6
|
-
mobile: "
|
|
7
|
-
},
|
|
8
|
-
topActionsCount: "var(--
|
|
4
|
+
var n = "_1x00fru3 _1x00fru1 _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfhw _1y2v1nf97", v = {
|
|
5
|
+
default: "_1x00fruk",
|
|
6
|
+
mobile: "_1x00frul"
|
|
7
|
+
}, _ = "_1x00frur", t = "_1x00frun", u = "_1x00fruo _1x00frun", o = "_1x00fru9 _1x00fru1 _1y2v1nfaa _1y2v1nfbj _1y2v1nf7m _1y2v1nf97", i = "_1x00frud _1y2v1nfhe _1y2v1nfhk _1y2v1nfi6 _1y2v1nfhq _1y2v1nfi7 _1y2v1nfio _1x00frub", x = "_1x00frui", y = "_1x00fruq _1y2v1nfhk _1y2v1nfhp", e = "_1y2v1nfhk _1y2v1nfi6 _1y2v1nfhz _1y2v1nfjt", h = "_1x00frum", b = "_1x00frus", d = "_1x00frub", c = "_1x00fru1 _1y2v1nfaa _1y2v1nfbj", l = "_1x00fruu", m = "_1x00fru4", p = "_1x00fru7", s = "_1x00fru5", g = {
|
|
8
|
+
topActionsCount: "var(--_1x00frut)"
|
|
9
9
|
}, k = "_1x00frua";
|
|
10
|
-
export {
|
|
10
|
+
export { n as actions, v as actionsVariants, _ as adjustButtonLink, t as button, u as buttonMobile, o as cardContentStyle, i as dataCard, x as divider, y as footerDirection, e as footerText, h as marginRightAuto, b as marginRightButton, d as minHeight, c as paddingX, l as topActionsWithoutIcon, m as touchableArea, p as touchableCardOverlay, s as touchableContainer, g as vars, k as zindex };
|