@telefonica/mistica 15.18.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.
Files changed (44) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/button.css-mistica.js +61 -52
  3. package/dist/button.css.d.ts +33 -17
  4. package/dist/button.d.ts +9 -46
  5. package/dist/button.js +188 -237
  6. package/dist/logo-blau.d.ts +4 -0
  7. package/dist/logo-blau.js +74 -0
  8. package/dist/logo-common.d.ts +9 -0
  9. package/dist/logo-common.js +21 -0
  10. package/dist/logo-movistar.d.ts +4 -0
  11. package/dist/logo-movistar.js +99 -0
  12. package/dist/logo-o2-new.d.ts +4 -0
  13. package/dist/logo-o2-new.js +29 -0
  14. package/dist/logo-o2.d.ts +4 -0
  15. package/dist/logo-o2.js +29 -0
  16. package/dist/logo-telefonica.d.ts +4 -0
  17. package/dist/logo-telefonica.js +197 -0
  18. package/dist/logo-tu.d.ts +4 -0
  19. package/dist/logo-tu.js +28 -0
  20. package/dist/logo-vivo.d.ts +4 -0
  21. package/dist/logo-vivo.js +81 -0
  22. package/dist/logo.d.ts +10 -10
  23. package/dist/logo.js +174 -534
  24. package/dist/navigation-bar.d.ts +7 -0
  25. package/dist/navigation-bar.js +99 -91
  26. package/dist/package-version.js +1 -1
  27. package/dist/text.d.ts +1 -0
  28. package/dist/text.js +133 -109
  29. package/dist-es/button.css-mistica.js +36 -18
  30. package/dist-es/button.js +219 -268
  31. package/dist-es/logo-blau.js +65 -0
  32. package/dist-es/logo-common.js +12 -0
  33. package/dist-es/logo-movistar.js +90 -0
  34. package/dist-es/logo-o2-new.js +20 -0
  35. package/dist-es/logo-o2.js +20 -0
  36. package/dist-es/logo-telefonica.js +188 -0
  37. package/dist-es/logo-tu.js +19 -0
  38. package/dist-es/logo-vivo.js +72 -0
  39. package/dist-es/logo.js +132 -533
  40. package/dist-es/navigation-bar.js +163 -155
  41. package/dist-es/package-version.js +1 -1
  42. package/dist-es/style.css +1 -1
  43. package/dist-es/text.js +143 -119
  44. package/package.json +1 -1
@@ -9,83 +9,92 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- CHEVRON_MARGIN_LEFT_LINK: function() {
13
- return _;
14
- },
15
- ICON_MARGIN_PX: function() {
16
- return y;
12
+ borderSize: function() {
13
+ return r;
17
14
  },
18
- ICON_SIZE: function() {
15
+ buttonMinWidth: function() {
19
16
  return f;
20
17
  },
21
- PADDING_X_LINK: function() {
22
- return r;
23
- },
24
- PADDING_Y_LINK: function() {
25
- return a;
18
+ buttonPaddingX: function() {
19
+ return y;
26
20
  },
27
- SMALL_ICON_SIZE: function() {
28
- return b;
21
+ buttonPaddingY: function() {
22
+ return _;
29
23
  },
30
- SMALL_SPINNER_SIZE: function() {
31
- return k;
24
+ buttonVariants: function() {
25
+ return a;
32
26
  },
33
- SPINNER_SIZE: function() {
34
- return e;
27
+ buttonVars: function() {
28
+ return p;
35
29
  },
36
- X_PADDING_PX: function() {
37
- return h;
30
+ chevronMarginLeft: function() {
31
+ return b;
38
32
  },
39
- X_SMALL_PADDING_PX: function() {
40
- return p;
33
+ iconMargin: function() {
34
+ return l;
41
35
  },
42
- buttonVariants: function() {
36
+ iconSize: function() {
43
37
  return i;
44
38
  },
45
39
  inverseButtonVariants: function() {
46
- return l;
47
- },
48
- inverseLinkVariants: function() {
49
- return t;
40
+ return e;
50
41
  },
51
42
  isLoading: function() {
52
- return o;
43
+ return h;
53
44
  },
54
- linkVariants: function() {
55
- return d;
45
+ linkMinWidth: function() {
46
+ return k;
56
47
  },
57
48
  loadingContent: function() {
58
- return g;
49
+ return d;
59
50
  },
60
51
  loadingFiller: function() {
61
- return I;
52
+ return t;
62
53
  },
63
54
  small: function() {
64
- return N;
55
+ return o;
65
56
  },
66
- textContent: function() {
57
+ spinnerSize: function() {
67
58
  return m;
68
59
  },
69
- textContentLink: function() {
70
- return L;
60
+ textContent: function() {
61
+ return c;
71
62
  }
72
63
  });
73
64
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
74
65
  require("./button.css.ts.vanilla.css-mistica.js");
75
- var _ = 2, y = 8, f = 24, r = 12, a = 6, b = 20, k = 16, e = 20, h = 14.5, p = 10.5, i = {
76
- primary: "rrbrpno rrbrpn2 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2c _1y2v1nf4l",
77
- secondary: "rrbrpnp rrbrpn2 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2f _1y2v1nf7c",
78
- danger: "rrbrpnq rrbrpn2 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2c _1y2v1nf4d"
79
- }, l = {
80
- primary: "rrbrpnr rrbrpn2 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2d _1y2v1nf4m",
81
- secondary: "rrbrpns rrbrpn2 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2h _1y2v1nf7c",
82
- danger: "rrbrpnt rrbrpn2 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2c _1y2v1nf4d"
83
- }, t = {
84
- default: "rrbrpnx rrbrpng _1y2v1nfa7 _1y2v1nfbg _1y2v1nfho _1y2v1nfi8 _1y2v1nfhe _1y2v1nfk9 _1y2v1nfk2 _1y2v1nfkl _1y2v1nfje _1y2v1nf2k _1y2v1nf7c",
85
- danger: "rrbrpny rrbrpng _1y2v1nfa7 _1y2v1nfbg _1y2v1nfho _1y2v1nfi8 _1y2v1nfhe _1y2v1nfk9 _1y2v1nfk2 _1y2v1nfkl _1y2v1nfje _1y2v1nf2l _1y2v1nf4h",
86
- dangerDark: "rrbrpnz rrbrpng _1y2v1nfa7 _1y2v1nfbg _1y2v1nfho _1y2v1nfi8 _1y2v1nfhe _1y2v1nfk9 _1y2v1nfk2 _1y2v1nfkl _1y2v1nfje _1y2v1nf2l _1y2v1nf7c"
87
- }, o = "rrbrpn0", d = {
88
- default: "rrbrpnu rrbrpng _1y2v1nfa7 _1y2v1nfbg _1y2v1nfho _1y2v1nfi8 _1y2v1nfhe _1y2v1nfk9 _1y2v1nfk2 _1y2v1nfkl _1y2v1nfje _1y2v1nf2j _1y2v1nf7c",
89
- danger: "rrbrpnv rrbrpng _1y2v1nfa7 _1y2v1nfbg _1y2v1nfho _1y2v1nfi8 _1y2v1nfhe _1y2v1nfk9 _1y2v1nfk2 _1y2v1nfkl _1y2v1nfje _1y2v1nf2l _1y2v1nf7c",
90
- dangerDark: "rrbrpnw rrbrpng _1y2v1nfa7 _1y2v1nfbg _1y2v1nfho _1y2v1nfi8 _1y2v1nfhe _1y2v1nfk9 _1y2v1nfk2 _1y2v1nfkl _1y2v1nfje _1y2v1nf2l _1y2v1nf7c"
91
- }, g = "rrbrpn7 _1y2v1nfhl _1y2v1nfhf _1y2v1nfkr _1y2v1nfm0 _1y2v1nfht _1y2v1nfhz", I = "rrbrpn4 _1y2v1nfhm _1y2v1nfip _1y2v1nfkl", N = "rrbrpn5", m = "rrbrpn9 _1y2v1nfhk _1y2v1nfhz _1y2v1nfht", L = "rrbrpni _1y2v1nfhk _1y2v1nfhz _1y2v1nfht";
66
+ var r = "1.5px", f = {
67
+ default: "104px",
68
+ small: "80px"
69
+ }, y = {
70
+ default: "calc(16px - 1.5px)",
71
+ small: "calc(12px - 1.5px)"
72
+ }, _ = {
73
+ default: "calc(12px - 1.5px)",
74
+ small: "calc(6px - 1.5px)"
75
+ }, a = {
76
+ primary: "rrbrpnm rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2c _1y2v1nf4l",
77
+ secondary: "rrbrpnn rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2f _1y2v1nf7c",
78
+ danger: "rrbrpno rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2c _1y2v1nf4d",
79
+ link: "rrbrpnp rrbrpn4 rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2j _1y2v1nf7c",
80
+ linkDanger: "rrbrpnq rrbrpn4 rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2l _1y2v1nf7c",
81
+ linkDangerDark: "rrbrpnr rrbrpn4 rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2l _1y2v1nf7c"
82
+ }, p = {
83
+ minWidth: "var(--rrbrpn0)"
84
+ }, b = "2px", l = "8px", i = {
85
+ default: "1.500rem",
86
+ small: "1.250rem"
87
+ }, e = {
88
+ primary: "rrbrpns rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2d _1y2v1nf4m",
89
+ secondary: "rrbrpnt rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2h _1y2v1nf7c",
90
+ danger: "rrbrpnu rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2c _1y2v1nf4d",
91
+ link: "rrbrpnv rrbrpn4 rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2k _1y2v1nf7c",
92
+ linkDanger: "rrbrpnw rrbrpn4 rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2l _1y2v1nf4h",
93
+ linkDangerDark: "rrbrpnx rrbrpn4 rrbrpn3 _1y2v1nf7d _1y2v1nf8m _1y2v1nf9v _1y2v1nfb4 _1y2v1nfho _1y2v1nfhe _1y2v1nfi8 _1y2v1nfk9 _1y2v1nfkl _1y2v1nf2l _1y2v1nf7c"
94
+ }, h = "rrbrpn1", k = {
95
+ default: "40px",
96
+ small: "40px"
97
+ }, d = "rrbrpn9 _1y2v1nfhl _1y2v1nfhf _1y2v1nfkr _1y2v1nfm0 _1y2v1nfht _1y2v1nfhz", t = "rrbrpn7 _1y2v1nfhm _1y2v1nfip _1y2v1nfkl", o = "rrbrpn5", m = {
98
+ default: "1.250rem",
99
+ small: "1.000rem"
100
+ }, c = "rrbrpnb _1y2v1nfhk _1y2v1nfhz _1y2v1nfht";
@@ -1,24 +1,40 @@
1
1
  import type { ComplexStyleRule } from '@vanilla-extract/css';
2
- export declare const BUTTON_MIN_WIDTH = 104;
3
- export declare const ICON_MARGIN_PX = 8;
4
- export declare const X_PADDING_PX: number;
5
- export declare const X_SMALL_PADDING_PX: number;
6
- export declare const ICON_SIZE = 24;
7
- export declare const SMALL_ICON_SIZE = 20;
8
- export declare const SPINNER_SIZE = 20;
9
- export declare const SMALL_SPINNER_SIZE = 16;
10
- export declare const PADDING_Y_LINK = 6;
11
- export declare const PADDING_X_LINK = 12;
12
- export declare const CHEVRON_MARGIN_LEFT_LINK = 2;
2
+ export declare const buttonVars: {
3
+ minWidth: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
4
+ };
5
+ export declare const buttonMinWidth: {
6
+ default: string;
7
+ small: string;
8
+ };
9
+ export declare const linkMinWidth: {
10
+ default: string;
11
+ small: string;
12
+ };
13
+ export declare const borderSize = "1.5px";
14
+ export declare const iconMargin = "8px";
15
+ export declare const chevronMarginLeft = "2px";
16
+ export declare const iconSize: {
17
+ default: string;
18
+ small: string;
19
+ };
20
+ export declare const spinnerSize: {
21
+ default: string;
22
+ small: string;
23
+ };
24
+ export declare const buttonPaddingX: {
25
+ default: string;
26
+ small: string;
27
+ };
28
+ export declare const buttonPaddingY: {
29
+ default: string;
30
+ small: string;
31
+ };
13
32
  export declare const isLoading: string;
14
- export declare const loadingFiller: string;
15
33
  export declare const small: string;
34
+ export declare const loadingFiller: string;
16
35
  export declare const loadingContent: string;
17
36
  export declare const textContent: string;
18
- export declare const textContentLink: string;
19
37
  export declare const defaultLink: ComplexStyleRule;
20
38
  export declare const defaultLinkInverse: ComplexStyleRule;
21
- export declare const buttonVariants: Record<"danger" | "primary" | "secondary", string>;
22
- export declare const inverseButtonVariants: Record<"danger" | "primary" | "secondary", string>;
23
- export declare const linkVariants: Record<"default" | "danger" | "dangerDark", string>;
24
- export declare const inverseLinkVariants: Record<"default" | "danger" | "dangerDark", string>;
39
+ export declare const buttonVariants: Record<"link" | "danger" | "primary" | "secondary" | "linkDanger" | "linkDangerDark", string>;
40
+ export declare const inverseButtonVariants: Record<"link" | "danger" | "primary" | "secondary" | "linkDanger" | "linkDangerDark", string>;
package/dist/button.d.ts CHANGED
@@ -25,71 +25,34 @@ interface CommonProps {
25
25
  /** IMPORTANT: try to avoid using role="link" with onPress and first consider other alternatives like to/href + onNavigate */
26
26
  role?: string;
27
27
  }
28
- export interface ToButtonProps extends CommonProps {
28
+ interface ToButtonProps extends CommonProps {
29
29
  to: string | Location;
30
30
  newTab?: boolean;
31
31
  fullPageOnWebView?: boolean;
32
32
  onNavigate?: () => void | Promise<void>;
33
33
  }
34
- export interface OnPressButtonProps extends CommonProps {
34
+ interface OnPressButtonProps extends CommonProps {
35
35
  onPress: (event: React.MouseEvent<HTMLElement>) => void | undefined | Promise<void>;
36
36
  }
37
- export interface HrefButtonProps extends CommonProps {
37
+ interface HrefButtonProps extends CommonProps {
38
38
  href: string;
39
39
  newTab?: boolean;
40
40
  loadOnTop?: boolean;
41
41
  onNavigate?: () => void | Promise<void>;
42
42
  }
43
- export interface FakeButtonProps extends CommonProps {
43
+ interface FakeButtonProps extends CommonProps {
44
44
  fake: true;
45
45
  }
46
- export interface SubmitButtonProps extends CommonProps {
46
+ interface SubmitButtonProps extends CommonProps {
47
47
  submit: true;
48
48
  }
49
- export type ButtonProps = ExclusifyUnion<FakeButtonProps | SubmitButtonProps | ToButtonProps | OnPressButtonProps | HrefButtonProps>;
50
- interface ButtonLinkCommonProps {
51
- children: React.ReactNode;
52
- disabled?: boolean;
53
- trackingEvent?: TrackingEvent | ReadonlyArray<TrackingEvent>;
54
- trackEvent?: boolean;
55
- /** "data-" prefix is automatically added. For example, use "testid" instead of "data-testid" */
56
- dataAttributes?: DataAttributes;
57
- showSpinner?: boolean;
58
- loadingText?: string;
59
- StartIcon?: React.FC<IconProps>;
60
- EndIcon?: React.FC<IconProps>;
49
+ type ButtonProps = ExclusifyUnion<FakeButtonProps | SubmitButtonProps | ToButtonProps | OnPressButtonProps | HrefButtonProps>;
50
+ type ButtonLinkProps = ExclusifyUnion<ToButtonProps | OnPressButtonProps | HrefButtonProps> & {
61
51
  bleedLeft?: boolean;
62
52
  bleedRight?: boolean;
63
53
  bleedY?: boolean;
64
- 'aria-label'?: string;
65
- 'aria-controls'?: string;
66
- 'aria-expanded'?: 'true' | 'false' | boolean;
67
- 'aria-haspopup'?: 'true' | 'false' | 'menu' | 'dialog' | boolean;
68
- /** IMPORTANT: try to avoid using role="link" with onPress and first consider other alternatives like to/href + onNavigate */
69
- role?: string;
70
- }
71
- interface ButtonLinkOnPressProps extends ButtonLinkCommonProps {
72
- onPress: (event: React.MouseEvent<HTMLElement>) => void | undefined | Promise<void>;
73
- to?: undefined;
74
- href?: undefined;
75
- onNavigate?: undefined;
76
- }
77
- interface ButtonLinkHrefProps extends ButtonLinkCommonProps {
78
- href: string;
79
- newTab?: boolean;
80
- onPress?: undefined;
81
- to?: undefined;
82
- onNavigate?: () => void | Promise<void>;
83
- }
84
- interface ButtonLinkToProps extends ButtonLinkCommonProps {
85
- to: string;
86
- newTab?: boolean;
87
- fullPageOnWebView?: boolean;
88
- onPress?: undefined;
89
- href?: undefined;
90
- onNavigate?: () => void | Promise<void>;
91
- }
92
- export type ButtonLinkProps = ButtonLinkOnPressProps | ButtonLinkHrefProps | ButtonLinkToProps;
54
+ small?: true;
55
+ };
93
56
  export declare const ButtonLink: React.ForwardRefExoticComponent<(ButtonLinkProps & {
94
57
  withChevron?: boolean | undefined;
95
58
  }) & React.RefAttributes<TouchableElement>>;