@telefonica/mistica 15.16.4 → 15.18.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 (114) hide show
  1. package/css/mistica.css +1 -1
  2. package/css/roboto.css +102 -34
  3. package/dist/box.d.ts +1 -0
  4. package/dist/box.js +11 -10
  5. package/dist/callout.d.ts +1 -0
  6. package/dist/callout.js +10 -10
  7. package/dist/card.d.ts +6 -1
  8. package/dist/card.js +375 -365
  9. package/dist/chip.d.ts +1 -0
  10. package/dist/chip.js +25 -26
  11. package/dist/dialog.d.ts +1 -0
  12. package/dist/dialog.js +65 -62
  13. package/dist/feedback.js +58 -52
  14. package/dist/generated/mistica-icons/icon-box-star-filled.d.ts +4 -0
  15. package/dist/generated/mistica-icons/icon-box-star-filled.js +121 -0
  16. package/dist/generated/mistica-icons/icon-box-star-light.d.ts +4 -0
  17. package/dist/generated/mistica-icons/icon-box-star-light.js +117 -0
  18. package/dist/generated/mistica-icons/icon-box-star-regular.d.ts +4 -0
  19. package/dist/generated/mistica-icons/icon-box-star-regular.js +117 -0
  20. package/dist/generated/mistica-icons/icon-high-priority-filled.d.ts +4 -0
  21. package/dist/generated/mistica-icons/icon-high-priority-filled.js +111 -0
  22. package/dist/generated/mistica-icons/icon-high-priority-light.d.ts +4 -0
  23. package/dist/generated/mistica-icons/icon-high-priority-light.js +111 -0
  24. package/dist/generated/mistica-icons/icon-high-priority-regular.d.ts +4 -0
  25. package/dist/generated/mistica-icons/icon-high-priority-regular.js +111 -0
  26. package/dist/generated/mistica-icons/icon-mms-filled.d.ts +4 -0
  27. package/dist/generated/mistica-icons/icon-mms-filled.js +122 -0
  28. package/dist/generated/mistica-icons/icon-mms-light.d.ts +4 -0
  29. package/dist/generated/mistica-icons/icon-mms-light.js +134 -0
  30. package/dist/generated/mistica-icons/icon-mms-regular.d.ts +4 -0
  31. package/dist/generated/mistica-icons/icon-mms-regular.js +134 -0
  32. package/dist/generated/mistica-icons/icon-vivo-valoriza-filled.d.ts +4 -0
  33. package/dist/generated/mistica-icons/icon-vivo-valoriza-filled.js +111 -0
  34. package/dist/generated/mistica-icons/icon-vivo-valoriza-light.d.ts +4 -0
  35. package/dist/generated/mistica-icons/icon-vivo-valoriza-light.js +117 -0
  36. package/dist/generated/mistica-icons/icon-vivo-valoriza-regular.d.ts +4 -0
  37. package/dist/generated/mistica-icons/icon-vivo-valoriza-regular.js +117 -0
  38. package/dist/generated/mistica-icons/icons-keywords.js +31 -0
  39. package/dist/index.d.ts +12 -0
  40. package/dist/index.js +48 -0
  41. package/dist/inline.css-mistica.js +11 -8
  42. package/dist/inline.css.d.ts +1 -0
  43. package/dist/inline.js +12 -12
  44. package/dist/list.d.ts +1 -0
  45. package/dist/list.js +163 -157
  46. package/dist/package-version.js +1 -1
  47. package/dist/popover.d.ts +1 -0
  48. package/dist/popover.js +9 -7
  49. package/dist/select.js +103 -95
  50. package/dist/skins/blau.js +96 -8
  51. package/dist/skins/defaults.js +98 -10
  52. package/dist/skins/movistar.js +94 -6
  53. package/dist/skins/o2-new.js +95 -7
  54. package/dist/skins/o2.js +94 -6
  55. package/dist/skins/skin-contract.css-mistica.js +42 -10
  56. package/dist/skins/skin-contract.css.d.ts +32 -0
  57. package/dist/skins/telefonica.js +96 -8
  58. package/dist/skins/tu.js +94 -6
  59. package/dist/skins/types/index.d.ts +36 -28
  60. package/dist/skins/vivo-new.js +95 -7
  61. package/dist/skins/vivo.js +94 -6
  62. package/dist/snackbar-context.js +23 -22
  63. package/dist/snackbar.d.ts +1 -0
  64. package/dist/snackbar.js +63 -57
  65. package/dist/theme-context-provider.js +91 -63
  66. package/dist/theme-context.css-mistica.js +452 -0
  67. package/dist/theme-context.css.d.ts +432 -0
  68. package/dist/theme-context.css.ts.vanilla.css-mistica.js +11 -0
  69. package/dist/tooltip.d.ts +1 -0
  70. package/dist/tooltip.js +110 -110
  71. package/dist-es/box.js +17 -16
  72. package/dist-es/callout.js +38 -38
  73. package/dist-es/card.js +492 -482
  74. package/dist-es/chip.js +49 -50
  75. package/dist-es/dialog.js +78 -75
  76. package/dist-es/feedback.js +96 -89
  77. package/dist-es/generated/mistica-icons/icon-box-star-filled.js +112 -0
  78. package/dist-es/generated/mistica-icons/icon-box-star-light.js +108 -0
  79. package/dist-es/generated/mistica-icons/icon-box-star-regular.js +108 -0
  80. package/dist-es/generated/mistica-icons/icon-high-priority-filled.js +102 -0
  81. package/dist-es/generated/mistica-icons/icon-high-priority-light.js +102 -0
  82. package/dist-es/generated/mistica-icons/icon-high-priority-regular.js +102 -0
  83. package/dist-es/generated/mistica-icons/icon-mms-filled.js +113 -0
  84. package/dist-es/generated/mistica-icons/icon-mms-light.js +125 -0
  85. package/dist-es/generated/mistica-icons/icon-mms-regular.js +125 -0
  86. package/dist-es/generated/mistica-icons/icon-vivo-valoriza-filled.js +102 -0
  87. package/dist-es/generated/mistica-icons/icon-vivo-valoriza-light.js +108 -0
  88. package/dist-es/generated/mistica-icons/icon-vivo-valoriza-regular.js +108 -0
  89. package/dist-es/generated/mistica-icons/icons-keywords.js +31 -0
  90. package/dist-es/index.js +1563 -1551
  91. package/dist-es/inline.css-mistica.js +3 -3
  92. package/dist-es/inline.js +23 -23
  93. package/dist-es/list.js +225 -219
  94. package/dist-es/package-version.js +1 -1
  95. package/dist-es/popover.js +26 -24
  96. package/dist-es/select.js +146 -138
  97. package/dist-es/skins/blau.js +96 -8
  98. package/dist-es/skins/defaults.js +97 -9
  99. package/dist-es/skins/movistar.js +94 -6
  100. package/dist-es/skins/o2-new.js +95 -7
  101. package/dist-es/skins/o2.js +94 -6
  102. package/dist-es/skins/skin-contract.css-mistica.js +42 -10
  103. package/dist-es/skins/telefonica.js +98 -10
  104. package/dist-es/skins/tu.js +94 -6
  105. package/dist-es/skins/vivo-new.js +95 -7
  106. package/dist-es/skins/vivo.js +94 -6
  107. package/dist-es/snackbar-context.js +25 -24
  108. package/dist-es/snackbar.js +91 -85
  109. package/dist-es/style.css +1 -1
  110. package/dist-es/theme-context-provider.js +133 -105
  111. package/dist-es/theme-context.css-mistica.js +432 -0
  112. package/dist-es/theme-context.css.ts.vanilla.css-mistica.js +2 -0
  113. package/dist-es/tooltip.js +149 -149
  114. package/package.json +2 -3
package/dist/skins/tu.js CHANGED
@@ -379,23 +379,111 @@ const e = {
379
379
  navigationBar: {
380
380
  weight: "medium"
381
381
  },
382
+ text1: {
383
+ size: {
384
+ mobile: 12,
385
+ desktop: 14
386
+ },
387
+ lineHeight: {
388
+ mobile: 16,
389
+ desktop: 20
390
+ }
391
+ },
392
+ text2: {
393
+ size: {
394
+ mobile: 14,
395
+ desktop: 16
396
+ },
397
+ lineHeight: {
398
+ mobile: 20,
399
+ desktop: 24
400
+ }
401
+ },
402
+ text3: {
403
+ size: {
404
+ mobile: 16,
405
+ desktop: 18
406
+ },
407
+ lineHeight: {
408
+ mobile: 24,
409
+ desktop: 24
410
+ }
411
+ },
412
+ text4: {
413
+ size: {
414
+ mobile: 18,
415
+ desktop: 20
416
+ },
417
+ lineHeight: {
418
+ mobile: 24,
419
+ desktop: 28
420
+ }
421
+ },
382
422
  text5: {
383
- weight: "medium"
423
+ weight: "medium",
424
+ size: {
425
+ mobile: 20,
426
+ desktop: 28
427
+ },
428
+ lineHeight: {
429
+ mobile: 24,
430
+ desktop: 32
431
+ }
384
432
  },
385
433
  text6: {
386
- weight: "medium"
434
+ weight: "medium",
435
+ size: {
436
+ mobile: 24,
437
+ desktop: 32
438
+ },
439
+ lineHeight: {
440
+ mobile: 32,
441
+ desktop: 40
442
+ }
387
443
  },
388
444
  text7: {
389
- weight: "medium"
445
+ weight: "medium",
446
+ size: {
447
+ mobile: 28,
448
+ desktop: 40
449
+ },
450
+ lineHeight: {
451
+ mobile: 32,
452
+ desktop: 48
453
+ }
390
454
  },
391
455
  text8: {
392
- weight: "medium"
456
+ weight: "medium",
457
+ size: {
458
+ mobile: 32,
459
+ desktop: 48
460
+ },
461
+ lineHeight: {
462
+ mobile: 40,
463
+ desktop: 56
464
+ }
393
465
  },
394
466
  text9: {
395
- weight: "medium"
467
+ weight: "medium",
468
+ size: {
469
+ mobile: 40,
470
+ desktop: 56
471
+ },
472
+ lineHeight: {
473
+ mobile: 48,
474
+ desktop: 64
475
+ }
396
476
  },
397
477
  text10: {
398
- weight: "medium"
478
+ weight: "medium",
479
+ size: {
480
+ mobile: 48,
481
+ desktop: 64
482
+ },
483
+ lineHeight: {
484
+ mobile: 56,
485
+ desktop: 72
486
+ }
399
487
  }
400
488
  }
401
489
  });
@@ -5,38 +5,46 @@ export type KnownSkinName = 'Movistar' | 'O2' | 'O2-new' | 'Vivo' | 'Vivo-new' |
5
5
  export type SkinName = KnownSkinName | string;
6
6
  export type GetKnownSkin = (variant?: SkinVariant) => KnownSkin;
7
7
  export type FontWeight = 'light' | 'regular' | 'medium' | 'bold';
8
- type TextTokenConfig<PossibleFontWeights = FontWeight> = {
8
+ type TextWeightTokenConfig<PossibleFontWeights = FontWeight> = {
9
9
  weight: PossibleFontWeights;
10
+ size?: never;
11
+ lineHeight?: never;
10
12
  };
11
- export type TextPresetsConfig = {
12
- cardTitle: TextTokenConfig;
13
- button: TextTokenConfig<'regular' | 'medium'>;
14
- link: TextTokenConfig<'regular' | 'medium'>;
15
- title1: TextTokenConfig<'regular' | 'medium'>;
16
- title2: {
17
- weight: FontWeight;
18
- size: {
19
- mobile: number;
20
- desktop: number;
21
- };
22
- lineHeight: {
23
- mobile: number;
24
- desktop: number;
25
- };
13
+ type TextSizeTokenConfig = {
14
+ weight?: never;
15
+ size: {
16
+ mobile: number;
17
+ desktop: number;
26
18
  };
27
- indicator: TextTokenConfig<'regular' | 'medium'>;
28
- tabsLabel: {
29
- weight: FontWeight;
30
- size: {
31
- mobile: number;
32
- desktop: number;
33
- };
34
- lineHeight: {
35
- mobile: number;
36
- desktop: number;
37
- };
19
+ lineHeight: {
20
+ mobile: number;
21
+ desktop: number;
38
22
  };
39
- navigationBar: TextTokenConfig;
23
+ };
24
+ type TextTokenConfig<PossibleFontWeights = FontWeight> = {
25
+ weight: PossibleFontWeights;
26
+ size: {
27
+ mobile: number;
28
+ desktop: number;
29
+ };
30
+ lineHeight: {
31
+ mobile: number;
32
+ desktop: number;
33
+ };
34
+ };
35
+ export type TextPresetsConfig = {
36
+ cardTitle: TextWeightTokenConfig;
37
+ button: TextWeightTokenConfig<'regular' | 'medium'>;
38
+ link: TextWeightTokenConfig<'regular' | 'medium'>;
39
+ title1: TextWeightTokenConfig<'regular' | 'medium'>;
40
+ title2: TextTokenConfig;
41
+ indicator: TextWeightTokenConfig<'regular' | 'medium'>;
42
+ tabsLabel: TextTokenConfig;
43
+ navigationBar: TextWeightTokenConfig;
44
+ text1: TextSizeTokenConfig;
45
+ text2: TextSizeTokenConfig;
46
+ text3: TextSizeTokenConfig;
47
+ text4: TextSizeTokenConfig;
40
48
  text5: TextTokenConfig;
41
49
  text6: TextTokenConfig;
42
50
  text7: TextTokenConfig;
@@ -171,7 +171,7 @@ const e = {
171
171
  textNavigationBarSecondary: e.vivoPurpleLight50,
172
172
  textNavigationSearchBarHint: e.vivoPurpleLight50,
173
173
  textNavigationSearchBarText: e.white,
174
- textAppBar: e.grey4,
174
+ textAppBar: e.grey5,
175
175
  textAppBarSelected: e.vivoPurple,
176
176
  customTabsBackground: e.white,
177
177
  tagTextPromo: e.vivoPurple,
@@ -374,23 +374,111 @@ const e = {
374
374
  navigationBar: {
375
375
  weight: "regular"
376
376
  },
377
+ text1: {
378
+ size: {
379
+ mobile: 12,
380
+ desktop: 14
381
+ },
382
+ lineHeight: {
383
+ mobile: 16,
384
+ desktop: 20
385
+ }
386
+ },
387
+ text2: {
388
+ size: {
389
+ mobile: 14,
390
+ desktop: 16
391
+ },
392
+ lineHeight: {
393
+ mobile: 20,
394
+ desktop: 24
395
+ }
396
+ },
397
+ text3: {
398
+ size: {
399
+ mobile: 16,
400
+ desktop: 18
401
+ },
402
+ lineHeight: {
403
+ mobile: 24,
404
+ desktop: 24
405
+ }
406
+ },
407
+ text4: {
408
+ size: {
409
+ mobile: 18,
410
+ desktop: 20
411
+ },
412
+ lineHeight: {
413
+ mobile: 24,
414
+ desktop: 28
415
+ }
416
+ },
377
417
  text5: {
378
- weight: "regular"
418
+ weight: "regular",
419
+ size: {
420
+ mobile: 20,
421
+ desktop: 28
422
+ },
423
+ lineHeight: {
424
+ mobile: 24,
425
+ desktop: 32
426
+ }
379
427
  },
380
428
  text6: {
381
- weight: "regular"
429
+ weight: "regular",
430
+ size: {
431
+ mobile: 24,
432
+ desktop: 32
433
+ },
434
+ lineHeight: {
435
+ mobile: 32,
436
+ desktop: 40
437
+ }
382
438
  },
383
439
  text7: {
384
- weight: "regular"
440
+ weight: "regular",
441
+ size: {
442
+ mobile: 28,
443
+ desktop: 40
444
+ },
445
+ lineHeight: {
446
+ mobile: 32,
447
+ desktop: 48
448
+ }
385
449
  },
386
450
  text8: {
387
- weight: "regular"
451
+ weight: "regular",
452
+ size: {
453
+ mobile: 32,
454
+ desktop: 48
455
+ },
456
+ lineHeight: {
457
+ mobile: 40,
458
+ desktop: 56
459
+ }
388
460
  },
389
461
  text9: {
390
- weight: "regular"
462
+ weight: "regular",
463
+ size: {
464
+ mobile: 40,
465
+ desktop: 56
466
+ },
467
+ lineHeight: {
468
+ mobile: 48,
469
+ desktop: 64
470
+ }
391
471
  },
392
472
  text10: {
393
- weight: "regular"
473
+ weight: "regular",
474
+ size: {
475
+ mobile: 48,
476
+ desktop: 64
477
+ },
478
+ lineHeight: {
479
+ mobile: 56,
480
+ desktop: 72
481
+ }
394
482
  }
395
483
  }
396
484
  });
@@ -374,23 +374,111 @@ const e = {
374
374
  navigationBar: {
375
375
  weight: "medium"
376
376
  },
377
+ text1: {
378
+ size: {
379
+ mobile: 12,
380
+ desktop: 14
381
+ },
382
+ lineHeight: {
383
+ mobile: 16,
384
+ desktop: 20
385
+ }
386
+ },
387
+ text2: {
388
+ size: {
389
+ mobile: 14,
390
+ desktop: 16
391
+ },
392
+ lineHeight: {
393
+ mobile: 20,
394
+ desktop: 24
395
+ }
396
+ },
397
+ text3: {
398
+ size: {
399
+ mobile: 16,
400
+ desktop: 18
401
+ },
402
+ lineHeight: {
403
+ mobile: 24,
404
+ desktop: 24
405
+ }
406
+ },
407
+ text4: {
408
+ size: {
409
+ mobile: 18,
410
+ desktop: 20
411
+ },
412
+ lineHeight: {
413
+ mobile: 24,
414
+ desktop: 28
415
+ }
416
+ },
377
417
  text5: {
378
- weight: "light"
418
+ weight: "light",
419
+ size: {
420
+ mobile: 20,
421
+ desktop: 28
422
+ },
423
+ lineHeight: {
424
+ mobile: 24,
425
+ desktop: 32
426
+ }
379
427
  },
380
428
  text6: {
381
- weight: "light"
429
+ weight: "light",
430
+ size: {
431
+ mobile: 24,
432
+ desktop: 32
433
+ },
434
+ lineHeight: {
435
+ mobile: 32,
436
+ desktop: 40
437
+ }
382
438
  },
383
439
  text7: {
384
- weight: "light"
440
+ weight: "light",
441
+ size: {
442
+ mobile: 28,
443
+ desktop: 40
444
+ },
445
+ lineHeight: {
446
+ mobile: 32,
447
+ desktop: 48
448
+ }
385
449
  },
386
450
  text8: {
387
- weight: "light"
451
+ weight: "light",
452
+ size: {
453
+ mobile: 32,
454
+ desktop: 48
455
+ },
456
+ lineHeight: {
457
+ mobile: 40,
458
+ desktop: 56
459
+ }
388
460
  },
389
461
  text9: {
390
- weight: "light"
462
+ weight: "light",
463
+ size: {
464
+ mobile: 40,
465
+ desktop: 56
466
+ },
467
+ lineHeight: {
468
+ mobile: 48,
469
+ desktop: 64
470
+ }
391
471
  },
392
472
  text10: {
393
- weight: "light"
473
+ weight: "light",
474
+ size: {
475
+ mobile: 48,
476
+ desktop: 64
477
+ },
478
+ lineHeight: {
479
+ mobile: 56,
480
+ desktop: 72
481
+ }
394
482
  }
395
483
  }
396
484
  });
@@ -118,60 +118,61 @@ const k = /*#__PURE__*/ _react.createContext({
118
118
  setSnackbars: ()=>{}
119
119
  }), p = /*#__PURE__*/ _react.lazy(()=>Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require(/* webpackChunkName: "snackbar" */ "./snackbar.js")))), R = (param)=>{
120
120
  let { children: l } = param;
121
- const [s, n] = _react.useState([]), o = _react.useRef(null), a = _react.useRef(!1), r = (0, _webviewbridge.isWebViewBridgeAvailable)();
121
+ const [t, n] = _react.useState([]), o = _react.useRef(null), a = _react.useRef(!1), r = (0, _webviewbridge.isWebViewBridgeAvailable)();
122
122
  _react.useEffect(()=>{
123
123
  var c;
124
- s.length > 1 && !a.current && (a.current = !0, r ? n((i)=>i.slice(1)) : (c = o.current) == null || c.close({
124
+ t.length > 1 && !a.current && (a.current = !0, r ? n((i)=>i.slice(1)) : (c = o.current) == null || c.close({
125
125
  action: "CONSECUTIVE"
126
126
  }));
127
127
  }, [
128
- s,
128
+ t,
129
129
  r
130
130
  ]);
131
- const S = (param)=>{
131
+ const d = (param)=>{
132
132
  let { action: c } = param;
133
133
  var i, b;
134
- a.current = !1, n(r && c === "CONSECUTIVE" ? (u)=>u.slice(0) : (u)=>u.slice(1)), (b = (i = s[0]).onClose) == null || b.call(i, {
134
+ a.current = !1, n(r && c === "CONSECUTIVE" ? (u)=>u.slice(0) : (u)=>u.slice(1)), (b = (i = t[0]).onClose) == null || b.call(i, {
135
135
  action: c
136
136
  });
137
- }, m = _react.useMemo(()=>({
138
- snackbars: s,
137
+ }, S = _react.useMemo(()=>({
138
+ snackbars: t,
139
139
  setSnackbars: n
140
140
  }), [
141
- s
142
- ]), t = s[0];
141
+ t
142
+ ]), s = t[0];
143
143
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(k.Provider, {
144
- value: m,
144
+ value: S,
145
145
  children: [
146
146
  l,
147
- !!t && /* @__PURE__ */ (0, _jsxruntime.jsx)(_react.Suspense, {
147
+ !!s && /* @__PURE__ */ (0, _jsxruntime.jsx)(_react.Suspense, {
148
148
  fallback: null,
149
149
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(p, {
150
150
  ref: o,
151
- message: t.message,
152
- buttonText: t.buttonText,
153
- buttonAccessibilityLabel: t.buttonAccessibilityLabel,
154
- duration: t.duration,
155
- type: t.type,
156
- withDismiss: t.withDismiss,
157
- onClose: S
158
- }, t.id)
151
+ message: s.message,
152
+ buttonText: s.buttonText,
153
+ buttonAccessibilityLabel: s.buttonAccessibilityLabel,
154
+ duration: s.duration,
155
+ type: s.type,
156
+ withDismiss: s.withDismiss,
157
+ dataAttributes: s.dataAttributes,
158
+ onClose: d
159
+ }, s.id)
159
160
  })
160
161
  ]
161
162
  });
162
163
  }, g = ()=>{
163
- const { snackbars: l, setSnackbars: s } = _react.useContext(k);
164
+ const { snackbars: l, setSnackbars: t } = _react.useContext(k);
164
165
  return {
165
166
  openSnackbar: _react.useCallback((o)=>{
166
167
  const a = Date.now() + "-" + Math.random();
167
- s((r)=>[
168
+ t((r)=>[
168
169
  ...r,
169
170
  _object_spread_props(_object_spread({}, o), {
170
171
  id: a
171
172
  })
172
173
  ]);
173
174
  }, [
174
- s
175
+ t
175
176
  ]),
176
177
  snackbars: l
177
178
  };
@@ -9,6 +9,7 @@ export type SnackbarCloseHandler = (result: {
9
9
  export type Props = {
10
10
  buttonText?: string;
11
11
  buttonAccessibilityLabel?: string;
12
+ closeButtonLabel?: string;
12
13
  duration?: number;
13
14
  message: string;
14
15
  onClose?: SnackbarCloseHandler;