@telefonica/mistica 16.4.0 → 16.5.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 (42) hide show
  1. package/css/mistica.css +1 -1
  2. package/css/vivo-new.css +11 -11
  3. package/dist/accordion.css-mistica.js +16 -13
  4. package/dist/accordion.css.d.ts +1 -0
  5. package/dist/accordion.d.ts +4 -0
  6. package/dist/accordion.js +110 -93
  7. package/dist/mosaic.d.ts +6 -2
  8. package/dist/mosaic.js +50 -48
  9. package/dist/navigation-bar.css-mistica.js +96 -37
  10. package/dist/navigation-bar.css.d.ts +27 -1
  11. package/dist/navigation-bar.d.ts +65 -30
  12. package/dist/navigation-bar.js +818 -193
  13. package/dist/package-version.js +1 -1
  14. package/dist/skins/blau.js +94 -94
  15. package/dist/skins/movistar.js +94 -94
  16. package/dist/skins/o2-new.js +94 -94
  17. package/dist/skins/o2.js +94 -94
  18. package/dist/skins/telefonica.js +94 -94
  19. package/dist/skins/tu.js +94 -94
  20. package/dist/skins/vivo-new.js +98 -98
  21. package/dist/skins/vivo.js +94 -94
  22. package/dist/text-tokens.d.ts +4 -0
  23. package/dist/text-tokens.js +101 -85
  24. package/dist/theme.js +20 -17
  25. package/dist-es/accordion.css-mistica.js +7 -7
  26. package/dist-es/accordion.js +140 -123
  27. package/dist-es/mosaic.js +73 -71
  28. package/dist-es/navigation-bar.css-mistica.js +14 -15
  29. package/dist-es/navigation-bar.js +864 -240
  30. package/dist-es/package-version.js +1 -1
  31. package/dist-es/skins/blau.js +94 -94
  32. package/dist-es/skins/movistar.js +94 -94
  33. package/dist-es/skins/o2-new.js +94 -94
  34. package/dist-es/skins/o2.js +94 -94
  35. package/dist-es/skins/telefonica.js +94 -94
  36. package/dist-es/skins/tu.js +94 -94
  37. package/dist-es/skins/vivo-new.js +98 -98
  38. package/dist-es/skins/vivo.js +94 -94
  39. package/dist-es/style.css +1 -1
  40. package/dist-es/text-tokens.js +53 -43
  41. package/dist-es/theme.js +20 -20
  42. package/package.json +1 -1
@@ -9,89 +9,148 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- burgerIconContainer: function() {
12
+ BURGER_MENU_ANIMATION_DURATION_MS: function() {
13
+ return _;
14
+ },
15
+ DESKTOP_MENU_ANIMATION_DURATION_MS: function() {
13
16
  return y;
14
17
  },
18
+ DESKTOP_SMALL_MENU_WIDTH: function() {
19
+ return e;
20
+ },
21
+ burgerIconContainer: function() {
22
+ return r;
23
+ },
15
24
  burgerMenu: function() {
16
- return _;
25
+ return a;
17
26
  },
18
27
  burgerMenuButton: function() {
19
- return r;
28
+ return f;
29
+ },
30
+ burgerMenuContainer: function() {
31
+ return i;
32
+ },
33
+ burgerMenuContentContainer: function() {
34
+ return t;
20
35
  },
21
36
  burgerMenuTransition: function() {
22
- return e;
37
+ return o;
38
+ },
39
+ desktopMenu: function() {
40
+ return d;
41
+ },
42
+ desktopMenuBackgroundContainer: function() {
43
+ return c;
44
+ },
45
+ desktopMenuColumnItem: function() {
46
+ return z;
47
+ },
48
+ desktopMenuContainer: function() {
49
+ return h;
50
+ },
51
+ desktopMenuContentFadeIn: function() {
52
+ return p;
53
+ },
54
+ desktopMenuFirstSection: function() {
55
+ return u;
56
+ },
57
+ desktopMenuLastSection: function() {
58
+ return s;
59
+ },
60
+ desktopMenuSectionArrow: function() {
61
+ return k;
62
+ },
63
+ desktopMenuSectionArrowContainer: function() {
64
+ return M;
65
+ },
66
+ desktopMenuSectionContainer: function() {
67
+ return l;
68
+ },
69
+ desktopMenuSectionWithArrowWrapper: function() {
70
+ return g;
71
+ },
72
+ desktopMenuWrapper: function() {
73
+ return b;
23
74
  },
24
75
  desktopOnly: function() {
25
- return a;
76
+ return C;
77
+ },
78
+ desktopSmallMenuContainer: function() {
79
+ return S;
26
80
  },
27
81
  iconCloseHidden: function() {
28
- return d;
82
+ return A;
29
83
  },
30
84
  iconCloseOpen: function() {
31
- return c;
85
+ return j;
32
86
  },
33
87
  iconMenuHidden: function() {
34
- return i;
88
+ return B;
35
89
  },
36
90
  iconMenuOpen: function() {
37
- return f;
91
+ return N;
38
92
  },
39
93
  lineHeightFix: function() {
40
- return o;
94
+ return m;
41
95
  },
42
96
  logoContainer: function() {
43
- return t;
97
+ return x;
44
98
  },
45
- mainNavbarContent: function() {
46
- return z;
99
+ mainNavBarSectionsContainer: function() {
100
+ return I;
101
+ },
102
+ mainNavigationBarContentWrapper: function() {
103
+ return O;
47
104
  },
48
105
  navbarBorderColorVariants: function() {
49
- return h;
106
+ return T;
50
107
  },
51
108
  navigationBarAction: function() {
52
- return u;
109
+ return E;
53
110
  },
54
111
  navigationBarContent: function() {
55
- return g;
112
+ return R;
56
113
  },
57
114
  navigationBarContentRight: function() {
58
- return l;
115
+ return U;
116
+ },
117
+ navigationBarContentRightExpanded: function() {
118
+ return W;
59
119
  },
60
120
  section: function() {
61
- return p;
121
+ return D;
62
122
  },
63
123
  selectedSectionVariantes: function() {
64
- return b;
124
+ return q;
65
125
  },
66
126
  spacer: function() {
67
- return s;
127
+ return F;
68
128
  },
69
129
  spacerLarge: function() {
70
- return j;
130
+ return H;
71
131
  },
72
132
  textWrapperVariants: function() {
73
- return k;
133
+ return L;
74
134
  },
75
135
  topFixed: function() {
76
- return x;
136
+ return w;
77
137
  }
78
138
  });
79
139
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
80
140
  require("./navigation-bar.css.ts.vanilla.css-mistica.js");
81
- var y = "_1vcy5dz1 _1y2v1nfhi _1y2v1nfik _1y2v1nfj0", _ = "_1vcy5dz13 _1y2v1nfhk _1y2v1nfl6 _1y2v1nfla _1y2v1nflp _1y2v1nf3r", r = "_1vcy5dz11", e = {
82
- entering: "_1vcy5dzt",
83
- entered: "_1vcy5dzu",
84
- exiting: "_1vcy5dzv",
85
- exited: "_1vcy5dzw",
86
- unmounted: "_1vcy5dzx"
87
- }, a = "_1vcy5dzn", d = "_1vcy5dz5 _1vcy5dz3 _1y2v1nfhj", c = "_1vcy5dz4 _1vcy5dz3 _1y2v1nfhj", i = "_1vcy5dz7 _1vcy5dz3 _1y2v1nfhj", f = "_1vcy5dz6 _1vcy5dz3 _1y2v1nfhj", o = "_1vcy5dz18", t = "_1vcy5dz10 _1y2v1nfho _1y2v1nfhx", z = "_1vcy5dzy", h = {
141
+ var _ = 300, y = 400, e = 184, r = "_1vcy5dz1 _1y2v1nfhi _1y2v1nfik _1y2v1nfj0", a = "_1y2v1nfhk _1y2v1nfl6 _1y2v1nfla _1y2v1nflp _1y2v1nfm4 _1y2v1nf3r", f = "_1vcy5dz1f", i = "_1y2v1nfis _1y2v1nfhi", t = "_1vcy5dz1j _1y2v1nfku _1y2v1nfib _1y2v1nfis _1y2v1nfhj _1y2v1nfkv", o = {
142
+ enter: "_1vcy5dz16",
143
+ enterActive: "_1vcy5dz17",
144
+ exit: "_1vcy5dz18",
145
+ exitActive: "_1vcy5dz19"
146
+ }, d = "_1vcy5dz1z _1y2v1nf88 _1y2v1nf9h _1y2v1nfhi", c = "_1vcy5dz1v _1y2v1nf3s _1y2v1nfhj _1y2v1nfla _1y2v1nflp", z = "_1vcy5dz21", h = "_1vcy5dz1t _1y2v1nfhk _1y2v1nfla _1y2v1nflp", p = "_1vcy5dz20", u = "_1vcy5dzf", s = "_1vcy5dzg", k = "_1vcy5dzn _1y2v1nf7h _1y2v1nf8q _1y2v1nf9z _1y2v1nfb8 _1y2v1nfk6 _1y2v1nf7g", M = "_1vcy5dzl _1y2v1nfhj _1y2v1nfkv _1y2v1nfm4 _1y2v1nfho _1y2v1nfi3", l = "_1vcy5dzi _1y2v1nfhi _1y2v1nfho", g = "_1y2v1nfhi", b = "_1y2v1nfhj _1y2v1nfla _1y2v1nflp", C = "_1vcy5dzx", S = "_1vcy5dz1x _1y2v1nfak _1y2v1nfbt _1y2v1nf88 _1y2v1nf9h _1y2v1nf3s _1y2v1nfhk _1y2v1nfku", A = "_1vcy5dz5 _1vcy5dz3 _1y2v1nfhj", j = "_1vcy5dz4 _1vcy5dz3 _1y2v1nfhj", B = "_1vcy5dz7 _1vcy5dz3 _1y2v1nfhj", N = "_1vcy5dz6 _1vcy5dz3 _1y2v1nfhj", m = "_1vcy5dz1o", x = "_1vcy5dz1e _1y2v1nfho _1y2v1nfhx", I = "_1vcy5dz1c _1y2v1nfho _1y2v1nfia", O = "_1vcy5dz1q _1y2v1nfib", T = {
88
147
  default: "_1vcy5dzc _1vcy5dzb _1y2v1nfho _1y2v1nfi3 _1y2v1nfib",
89
148
  noBorder: "_1vcy5dzd _1vcy5dzb _1y2v1nfho _1y2v1nfi3 _1y2v1nfib",
90
149
  menuOpen: "_1vcy5dze _1vcy5dzb _1y2v1nfho _1y2v1nfi3 _1y2v1nfib"
91
- }, u = "_1y2v1nf7h _1y2v1nf8q _1y2v1nf9z _1y2v1nfb8 _1y2v1nfk6 _1y2v1nf7g", g = "_1vcy5dzl", l = "_1vcy5dzo", p = "_1vcy5dzg _1y2v1nfa8 _1y2v1nfbh _1y2v1nfj7 _1y2v1nfho _1y2v1nfi3 _1y2v1nfk6 _1y2v1nf7g", b = {
92
- default: "_1vcy5dzh",
93
- inverse: "_1vcy5dzi"
94
- }, s = "_1y2v1nfj7 _1vcy5dzp", j = "_1vcy5dzs _1vcy5dzp", k = {
95
- default: "_1vcy5dzj",
96
- inverse: "_1vcy5dzk"
97
- }, x = "_1vcy5dz9 _1y2v1nfhk _1y2v1nfkv _1y2v1nfla _1y2v1nflp";
150
+ }, E = "_1y2v1nf7h _1y2v1nf8q _1y2v1nf9z _1y2v1nfb8 _1y2v1nfk6 _1y2v1nf7g", R = "_1vcy5dzv _1y2v1nfi3 _1y2v1nfib _1y2v1nfho", U = "_1vcy5dzz _1y2v1nfho _1y2v1nfi3 _1y2v1nfhy", W = "_1vcy5dz11 _1vcy5dzz _1y2v1nfho _1y2v1nfi3 _1y2v1nfhy _1y2v1nfia", D = "_1vcy5dzp _1y2v1nfa8 _1y2v1nfbh _1y2v1nfj7 _1y2v1nfho _1y2v1nfi3 _1y2v1nfk6 _1y2v1nf7g _1y2v1nfhi", q = {
151
+ default: "_1vcy5dzq",
152
+ inverse: "_1vcy5dzr"
153
+ }, F = "_1y2v1nfj7 _1vcy5dz12", H = "_1vcy5dz15 _1vcy5dz12", L = {
154
+ default: "_1vcy5dzs",
155
+ inverse: "_1vcy5dzt"
156
+ }, w = "_1vcy5dz9 _1y2v1nfhk _1y2v1nfkv _1y2v1nfla _1y2v1nflp";
@@ -1,3 +1,6 @@
1
+ export declare const DESKTOP_SMALL_MENU_WIDTH = 184;
2
+ export declare const BURGER_MENU_ANIMATION_DURATION_MS = 300;
3
+ export declare const DESKTOP_MENU_ANIMATION_DURATION_MS = 400;
1
4
  export declare const burgerIconContainer: string;
2
5
  export declare const iconCloseOpen: string;
3
6
  export declare const iconCloseHidden: string;
@@ -5,6 +8,12 @@ export declare const iconMenuOpen: string;
5
8
  export declare const iconMenuHidden: string;
6
9
  export declare const topFixed: string;
7
10
  export declare const navbarBorderColorVariants: Record<"default" | "noBorder" | "menuOpen", string>;
11
+ export declare const desktopMenuFirstSection: string;
12
+ export declare const desktopMenuLastSection: string;
13
+ export declare const desktopMenuSectionContainer: string;
14
+ export declare const desktopMenuSectionWithArrowWrapper: string;
15
+ export declare const desktopMenuSectionArrowContainer: string;
16
+ export declare const desktopMenuSectionArrow: string;
8
17
  export declare const section: string;
9
18
  export declare const selectedSectionVariantes: Record<"inverse" | "default", string>;
10
19
  export declare const textWrapperVariants: Record<"inverse" | "default", string>;
@@ -12,12 +21,29 @@ export declare const navigationBarContent: string;
12
21
  export declare const navigationBarAction: string;
13
22
  export declare const desktopOnly: string;
14
23
  export declare const navigationBarContentRight: string;
24
+ export declare const navigationBarContentRightExpanded: string;
15
25
  export declare const spacer: string;
16
26
  export declare const spacerLarge: string;
17
- export declare const burgerMenuTransition: Record<"entering" | "entered" | "exiting" | "exited" | "unmounted", string>;
27
+ export declare const burgerMenuTransition: {
28
+ enter: string;
29
+ enterActive: string;
30
+ exit: string;
31
+ exitActive: string;
32
+ };
18
33
  export declare const mainNavbarContent: string;
34
+ export declare const mainNavBarSectionsContainer: string;
19
35
  export declare const logoContainer: string;
20
36
  export declare const burgerMenuButton: string;
21
37
  export declare const burgerMenu: string;
38
+ export declare const burgerMenuContainer: string;
39
+ export declare const burgerMenuContentContainer: string;
22
40
  export declare const iconButtonVariants: Record<"inverse" | "default", string>;
23
41
  export declare const lineHeightFix: string;
42
+ export declare const mainNavigationBarContentWrapper: string;
43
+ export declare const desktopMenuWrapper: string;
44
+ export declare const desktopMenuContainer: string;
45
+ export declare const desktopMenuBackgroundContainer: string;
46
+ export declare const desktopSmallMenuContainer: string;
47
+ export declare const desktopMenu: string;
48
+ export declare const desktopMenuContentFadeIn: string;
49
+ export declare const desktopMenuColumnItem: string;
@@ -1,37 +1,8 @@
1
1
  import * as React from 'react';
2
+ import type { ExclusifyUnion } from './utils/utility-types';
2
3
  import type { Variant } from './theme-variant-context';
3
4
  import type { TouchableProps } from './touchable';
4
5
  import type { HeadingType } from './utils/types';
5
- type MainNavigationBarSection = {
6
- href: string;
7
- to?: undefined;
8
- onPress?: undefined;
9
- title: string;
10
- } | {
11
- to: string;
12
- href?: undefined;
13
- onPress?: undefined;
14
- title: string;
15
- } | {
16
- onPress: () => void;
17
- to?: undefined;
18
- href?: undefined;
19
- title: string;
20
- };
21
- type MainNavigationBarPropsBase = {
22
- sections?: ReadonlyArray<MainNavigationBarSection>;
23
- selectedIndex?: number;
24
- right?: React.ReactElement;
25
- logo?: React.ReactElement;
26
- variant?: Variant;
27
- children?: undefined;
28
- topFixed?: boolean;
29
- withBorder?: boolean;
30
- burgerMenuExtra?: React.ReactNode;
31
- large?: boolean;
32
- };
33
- type MainNavigationBarProps = MainNavigationBarPropsBase;
34
- export declare const MainNavigationBar: ({ sections, selectedIndex, right, variant, topFixed, withBorder, burgerMenuExtra, logo, large, }: MainNavigationBarProps) => JSX.Element;
35
6
  interface NavigationBarCommonProps {
36
7
  variant?: Variant;
37
8
  onBack?: () => void;
@@ -51,6 +22,70 @@ interface NavigationBarNotFixedProps extends NavigationBarCommonProps {
51
22
  }
52
23
  type NavigationBarProps = NavigationBarTopFixedProps | NavigationBarNotFixedProps;
53
24
  export declare const NavigationBar: ({ onBack, title, titleAs, right, variant, topFixed, paddingX, withBorder, }: NavigationBarProps) => JSX.Element;
25
+ type InteractiveProps = ExclusifyUnion<{
26
+ href: string;
27
+ } | {
28
+ to: string;
29
+ } | {
30
+ onPress: () => void;
31
+ }>;
32
+ type MaybeInteractiveProps = ExclusifyUnion<{
33
+ href?: string;
34
+ } | {
35
+ to?: string;
36
+ } | {
37
+ onPress?: () => void;
38
+ }>;
39
+ type SectionItem = {
40
+ title: string;
41
+ } & InteractiveProps;
42
+ type SectionColumn = {
43
+ title: string;
44
+ items: ReadonlyArray<SectionItem>;
45
+ };
46
+ type SectionMenu = ExclusifyUnion<{
47
+ columns: ReadonlyArray<SectionColumn>;
48
+ } | {
49
+ content?: React.ReactElement | ((props: {
50
+ closeMenu: () => void;
51
+ }) => React.ReactElement);
52
+ }>;
53
+ type MainNavigationBarSection = {
54
+ title: string;
55
+ menu?: SectionMenu;
56
+ } & MaybeInteractiveProps;
57
+ type MainNavigationBarProps = {
58
+ sections?: ReadonlyArray<MainNavigationBarSection>;
59
+ selectedIndex?: number;
60
+ right?: React.ReactElement;
61
+ logo?: React.ReactElement;
62
+ variant?: Variant;
63
+ children?: undefined;
64
+ topFixed?: boolean;
65
+ withBorder?: boolean;
66
+ burgerMenuExtra?: React.ReactNode;
67
+ large?: boolean;
68
+ desktopLargeMenu?: boolean;
69
+ };
70
+ type MainNavigationBarMenuStatus = 'opening' | 'opened' | 'closing' | 'closed';
71
+ type MainNavigationBarDesktopMenuState = {
72
+ isMenuOpen: boolean;
73
+ openedSection: number;
74
+ menuHeight: string;
75
+ menuStatus: MainNavigationBarMenuStatus;
76
+ openSectionMenu: (index: number) => void;
77
+ closeMenu: () => void;
78
+ setMenuHeight: (height: string) => void;
79
+ setIsMenuHovered: (value: boolean) => void;
80
+ setFocusedItem: (item?: {
81
+ column: number;
82
+ index: number;
83
+ }) => void;
84
+ debouncedOpenSectionMenu: (index: number) => void;
85
+ cancelDebouncedOpenSectionMenu: (index: number) => void;
86
+ };
87
+ export declare const useMainNavigationBarDesktopMenuState: () => MainNavigationBarDesktopMenuState;
88
+ export declare const MainNavigationBar: ({ sections, selectedIndex, right, variant, topFixed, withBorder, burgerMenuExtra, logo, large, desktopLargeMenu, }: MainNavigationBarProps) => JSX.Element;
54
89
  type FunnelNavigationBarProps = {
55
90
  variant?: Variant;
56
91
  logo?: React.ReactElement;