@telefonica/mistica 10.17.0 → 10.21.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 (70) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/button-layout.js +28 -17
  3. package/dist/button.js +24 -8
  4. package/dist/card.d.ts +10 -1
  5. package/dist/card.js +29 -29
  6. package/dist/card.js.flow +16 -1
  7. package/dist/header.d.ts +2 -0
  8. package/dist/header.js.flow +5 -0
  9. package/dist/icons/icon-success.js +14 -6
  10. package/dist/image.d.ts +25 -4
  11. package/dist/image.js +67 -9
  12. package/dist/image.js.flow +33 -4
  13. package/dist/index.d.ts +2 -0
  14. package/dist/index.js +7 -0
  15. package/dist/index.js.flow +2 -0
  16. package/dist/package-version.js +1 -1
  17. package/dist/section-title.d.ts +1 -3
  18. package/dist/section-title.js.flow +1 -2
  19. package/dist/skins/blau.d.ts +6 -3
  20. package/dist/skins/blau.js +34 -5
  21. package/dist/skins/blau.js.flow +6 -3
  22. package/dist/skins/movistar.d.ts +21 -11
  23. package/dist/skins/movistar.js +76 -40
  24. package/dist/skins/movistar.js.flow +21 -11
  25. package/dist/skins/o2-classic.d.ts +21 -9
  26. package/dist/skins/o2-classic.js +64 -26
  27. package/dist/skins/o2-classic.js.flow +21 -9
  28. package/dist/skins/o2.d.ts +19 -17
  29. package/dist/skins/o2.js +68 -40
  30. package/dist/skins/o2.js.flow +19 -17
  31. package/dist/skins/telefonica.d.ts +18 -13
  32. package/dist/skins/telefonica.js +76 -45
  33. package/dist/skins/telefonica.js.flow +18 -13
  34. package/dist/skins/types.d.ts +12 -0
  35. package/dist/skins/types.js.flow +12 -0
  36. package/dist/skins/vivo.d.ts +9 -4
  37. package/dist/skins/vivo.js +37 -6
  38. package/dist/skins/vivo.js.flow +9 -4
  39. package/dist/tag.d.ts +6 -1
  40. package/dist/tag.js +133 -24
  41. package/dist/tag.js.flow +15 -1
  42. package/dist/text.d.ts +4 -0
  43. package/dist/text.js +13 -6
  44. package/dist/text.js.flow +10 -0
  45. package/dist/theme-context-provider.js +8 -2
  46. package/dist/theme.d.ts +2 -0
  47. package/dist/theme.js.flow +2 -0
  48. package/dist/touchable.js +3 -2
  49. package/dist/video.d.ts +32 -0
  50. package/dist/video.js +161 -0
  51. package/dist/video.js.flow +50 -0
  52. package/dist-es/button-layout.js +28 -17
  53. package/dist-es/button.js +24 -8
  54. package/dist-es/card.js +30 -30
  55. package/dist-es/icons/icon-success.js +14 -6
  56. package/dist-es/image.js +41 -8
  57. package/dist-es/index.js +1 -0
  58. package/dist-es/package-version.js +1 -1
  59. package/dist-es/skins/blau.js +36 -5
  60. package/dist-es/skins/movistar.js +78 -40
  61. package/dist-es/skins/o2-classic.js +66 -26
  62. package/dist-es/skins/o2.js +70 -40
  63. package/dist-es/skins/telefonica.js +78 -45
  64. package/dist-es/skins/vivo.js +39 -6
  65. package/dist-es/tag.js +130 -26
  66. package/dist-es/text.js +13 -6
  67. package/dist-es/theme-context-provider.js +8 -2
  68. package/dist-es/touchable.js +3 -2
  69. package/dist-es/video.js +123 -0
  70. package/package.json +1 -1
@@ -1,14 +1,18 @@
1
1
  import { applyAlpha } from '../utils/color';
2
2
  import { O2_CLASSIC_SKIN } from './constants';
3
+ // https://github.com/Telefonica/mistica-design/blob/production/tokens/classicO2-constants.json
4
+ // https://github.com/Telefonica/mistica-design/blob/production/tokens/classicO2-skin-schema.json
3
5
  export var palette = {
4
6
  o2Blue: '#032B5A',
5
- o2BlueDark: '#04264E',
6
- o2BlueLight60: '#6C8BAF',
7
+ o2Blue10: '#E6EAEE',
8
+ o2Blue30: '#8195AC',
9
+ o2Blue45: '#6C8BAF',
10
+ o2Blue55: '#04264E',
7
11
  o2SkyBlue: '#0090D0',
8
- o2SkyBlueDark: '#057DB2',
12
+ o2SkyBlue55: '#057DB2',
9
13
  o2SkyBlueLight: '#65B4E4',
10
- o2SkyBlueLight50: '#80C7E7',
11
- o2SkyBlueLight30: '#D0E8F6',
14
+ o2SkyBlueLight45: '#80C7E7',
15
+ o2SkyBlueLight20: '#D0E8F6',
12
16
  o2SkyBlueLight10: '#E9F5FB',
13
17
  o2DeepSkyBlue: '#7FD4FE',
14
18
  o2Gem: '#01B7B4',
@@ -16,14 +20,24 @@ export var palette = {
16
20
  o2GemLight30: '#99E2E1',
17
21
  o2Yellow: '#FFCC00',
18
22
  o2Green: '#84B50F',
19
- o2GreenLight: '#DAE8B7',
23
+ o2Green10: '#F3F8E7',
24
+ o2Green40: '#A9CB57',
25
+ o2Green75: '#4D621D',
20
26
  pepper: '#FF374A',
21
- pepperDark: '#D73241',
22
- pepperLight30: '#FFC3C8',
27
+ pepper10: '#FFEBED',
28
+ pepper20: '#FFC3C8',
29
+ pepper40: '#FF7380',
30
+ pepper55: '#D73241',
31
+ pepper70: '#B22634',
23
32
  orange: '#FF7F41',
24
- orangeLight: '#FFD6C2',
33
+ orange10: '#FFF2EC',
34
+ orange40: '#FFA57A',
35
+ orange80: '#73391D',
25
36
  coral: '#FF706E',
26
37
  pink: '#EB3C7D',
38
+ pink10: '#FDEBF2',
39
+ pink40: '#F59DBE',
40
+ pink60: '#BC3064',
27
41
  o2GradientFirst: '#102550',
28
42
  o2GradientSecond: '#0B4680',
29
43
  o2GradientThird: '#0D71AD',
@@ -63,24 +77,24 @@ export var getO2ClassicSkin = function() {
63
77
  borderSelected: palette.o2Gem,
64
78
  // BUTTONS
65
79
  buttonDangerBackground: palette.pepper,
66
- buttonDangerBackgroundSelected: palette.pepperDark,
67
- buttonDangerBackgroundHover: palette.pepperDark,
80
+ buttonDangerBackgroundSelected: palette.pepper55,
81
+ buttonDangerBackgroundHover: palette.pepper55,
68
82
  buttonLinkBackgroundSelected: palette.o2SkyBlueLight10,
69
83
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.2),
70
84
  buttonPrimaryBackground: palette.o2SkyBlue,
71
85
  buttonPrimaryBackgroundInverse: palette.white,
72
- buttonPrimaryBackgroundSelected: palette.o2SkyBlueDark,
73
- buttonPrimaryBackgroundHover: palette.o2SkyBlueDark,
74
- buttonPrimaryBackgroundSelectedInverse: palette.o2SkyBlueLight50,
86
+ buttonPrimaryBackgroundSelected: palette.o2SkyBlue55,
87
+ buttonPrimaryBackgroundHover: palette.o2SkyBlue55,
88
+ buttonPrimaryBackgroundSelectedInverse: palette.o2SkyBlueLight45,
75
89
  buttonSecondaryBackground: palette.o2SkyBlue,
76
- buttonSecondaryBackgroundSelected: palette.o2SkyBlueDark,
90
+ buttonSecondaryBackgroundSelected: palette.o2SkyBlue55,
77
91
  buttonSecondaryBorderInverse: palette.white,
78
- buttonSecondaryBorderSelectedInverse: palette.o2SkyBlueLight50,
92
+ buttonSecondaryBorderSelectedInverse: palette.o2SkyBlueLight45,
79
93
  textButtonPrimary: palette.white,
80
94
  textButtonPrimaryInverse: palette.o2SkyBlue,
81
95
  textButtonPrimaryInverseSelected: palette.o2SkyBlue,
82
96
  textButtonSecondary: palette.o2SkyBlue,
83
- textButtonSecondarySelected: palette.o2SkyBlueDark,
97
+ textButtonSecondarySelected: palette.o2SkyBlue55,
84
98
  textButtonSecondaryInverse: palette.white,
85
99
  textButtonSecondaryInverseSelected: palette.white,
86
100
  textLink: palette.o2SkyBlue,
@@ -103,12 +117,12 @@ export var getO2ClassicSkin = function() {
103
117
  dividerInverse: applyAlpha(palette.white, 0.2),
104
118
  navigationBarDivider: palette.o2Blue,
105
119
  // FEEDBACKS
106
- badge: palette.pepperDark,
120
+ badge: palette.pepper55,
107
121
  feedbackErrorBackground: palette.pepper,
108
122
  feedbackInfoBackground: palette.grey6,
109
123
  // GLOBAL
110
124
  brand: palette.o2Blue,
111
- brandDark: palette.o2BlueDark,
125
+ brandDark: palette.o2Blue55,
112
126
  inverse: palette.white,
113
127
  neutralHigh: palette.grey6,
114
128
  neutralLow: palette.grey3,
@@ -126,11 +140,24 @@ export var getO2ClassicSkin = function() {
126
140
  warning: palette.orange,
127
141
  // BARS TEXTS
128
142
  textNavigationBarPrimary: palette.white,
129
- textNavigationBarSecondary: palette.o2BlueLight60,
130
- textNavigationSearchBarHint: palette.o2BlueLight60,
143
+ textNavigationBarSecondary: palette.o2Blue45,
144
+ textNavigationSearchBarHint: palette.o2Blue45,
131
145
  textNavigationSearchBarText: palette.white,
132
146
  textAppBar: palette.grey4,
133
- textAppBarSelected: palette.o2Blue
147
+ textAppBarSelected: palette.o2Blue,
148
+ // TAGS
149
+ tagBackgroundSuccess: palette.o2Green10,
150
+ tagBackgroundWarning: palette.orange10,
151
+ tagBackgroundError: palette.pepper10,
152
+ tagBackgroundPromo: palette.pink10,
153
+ tagBackgroundActive: palette.o2Blue10,
154
+ tagBackgroundInactive: palette.grey1,
155
+ textTagSuccess: palette.o2Green75,
156
+ textTagWarning: palette.orange80,
157
+ textTagError: palette.pepper70,
158
+ textTagPromo: palette.pink60,
159
+ textTagActive: palette.o2Blue,
160
+ textTagInactive: palette.grey5
134
161
  },
135
162
  darkModeColors: {
136
163
  appBarBackground: palette.darkModeGrey,
@@ -151,9 +178,9 @@ export var getO2ClassicSkin = function() {
151
178
  buttonLinkBackgroundSelected: applyAlpha(palette.white, 0.05),
152
179
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.05),
153
180
  buttonPrimaryBackgroundInverse: palette.o2SkyBlue,
154
- buttonPrimaryBackgroundSelectedInverse: palette.o2SkyBlueDark,
181
+ buttonPrimaryBackgroundSelectedInverse: palette.o2SkyBlue55,
155
182
  buttonSecondaryBorderInverse: palette.o2SkyBlue,
156
- buttonSecondaryBorderSelectedInverse: palette.o2SkyBlueDark,
183
+ buttonSecondaryBorderSelectedInverse: palette.o2SkyBlue55,
157
184
  textButtonPrimary: palette.grey2,
158
185
  textButtonPrimaryInverse: palette.grey2,
159
186
  textButtonPrimaryInverseSelected: palette.grey2,
@@ -187,13 +214,26 @@ export var getO2ClassicSkin = function() {
187
214
  textPrimaryInverse: palette.grey2,
188
215
  textSecondary: palette.grey4,
189
216
  textSecondaryInverse: palette.grey4,
190
- textAmount: palette.o2SkyBlueLight50,
217
+ textAmount: palette.o2SkyBlueLight45,
191
218
  textNavigationBarPrimary: palette.grey2,
192
219
  textNavigationBarSecondary: palette.grey4,
193
220
  textNavigationSearchBarHint: palette.grey4,
194
221
  textNavigationSearchBarText: palette.grey2,
195
222
  textAppBar: palette.grey5,
196
- textAppBarSelected: palette.grey2
223
+ textAppBarSelected: palette.grey2,
224
+ // TAGS
225
+ tagBackgroundSuccess: applyAlpha(palette.white, 0.05),
226
+ tagBackgroundWarning: applyAlpha(palette.white, 0.05),
227
+ tagBackgroundError: applyAlpha(palette.white, 0.05),
228
+ tagBackgroundPromo: applyAlpha(palette.white, 0.05),
229
+ tagBackgroundActive: applyAlpha(palette.white, 0.05),
230
+ tagBackgroundInactive: applyAlpha(palette.white, 0.05),
231
+ textTagSuccess: palette.o2Green40,
232
+ textTagWarning: palette.orange40,
233
+ textTagError: palette.pepper40,
234
+ textTagPromo: palette.pink40,
235
+ textTagActive: palette.o2Blue30,
236
+ textTagInactive: palette.grey4
197
237
  }
198
238
  };
199
239
  };
@@ -1,31 +1,35 @@
1
1
  import { applyAlpha } from '../utils/color';
2
2
  import { O2_SKIN } from './constants';
3
+ // https://github.com/Telefonica/mistica-design/blob/production/tokens/o2-constants.json
4
+ // https://github.com/Telefonica/mistica-design/blob/production/tokens/o2-skin-schema.json
3
5
  export var palette = {
4
6
  o2BluePrimary: '#0019A5',
5
- o2BluePrimaryDark: '#000066',
6
- o2BluePrimaryLight50: '#808CD2',
7
- o2BluePrimaryLight10: '#CCD1ED',
8
- o2BlueMid: '#007BB2',
9
- o2BlueMidDark: '#006795',
7
+ o2BluePrimary70: '#000066',
8
+ o2BluePrimary30: '#808CD2',
9
+ o2BluePrimary15: '#CCD1ED',
10
+ o2BluePrimary10: '#E5E8F6',
11
+ o2BlueMid: '#0090D0',
10
12
  o2BlueLight: '#41B6E6',
11
- o2BlueLight60: '#8DD3F0',
12
13
  o2BlueLight30: '#C6E9F7',
13
- o2BlueLight10: '#ECF7FC',
14
14
  o2Teal: '#01B7B4',
15
- o2TealDark: '#099E9B',
16
- o2TealLight: '#B1E4E3',
17
15
  o2Green: '#91C90E',
18
- o2GreenLight: '#DEEEB7',
16
+ o2Green10: '#F4FAE7',
17
+ o2Green40: '#B2D956',
18
+ o2Green80: '#415A06',
19
19
  o2Yellow: '#FEDB00',
20
- o2YellowLight: '#FEF6C3',
21
20
  o2Orange: '#FF7F41',
22
- o2OrangeLight: '#FFD6C2',
23
- o2Coral: '#FF706E',
24
- o2Pink: '#CB31A0',
25
- o2Purple: '#953698',
21
+ o2Orange10: '#FFF2EC',
22
+ o2Orange40: '#FFA57A',
23
+ o2Orange75: '#A6522A',
24
+ o2Pink: '#E45DBF',
25
+ o2Purple: '#952D98',
26
+ o2Purple10: '#F4EAF5',
27
+ o2Purple30: '#CA9ACB',
26
28
  pepper: '#FF374A',
27
- pepperDark: '#D73241',
28
- pepperLight30: '#FFC3C8',
29
+ pepper10: '#FEEBED',
30
+ pepper20: '#FCC3C9',
31
+ pepper40: '#FF7380',
32
+ pepper60: '#C32B3D',
29
33
  grey1: '#F6F6F6',
30
34
  grey2: '#EEEEEE',
31
35
  grey3: '#DDDDDD',
@@ -63,30 +67,30 @@ export var getO2Skin = function() {
63
67
  borderSelected: palette.o2BluePrimary,
64
68
  // BUTTONS
65
69
  buttonDangerBackground: palette.pepper,
66
- buttonDangerBackgroundSelected: palette.pepperDark,
67
- buttonDangerBackgroundHover: palette.pepperDark,
68
- buttonLinkBackgroundSelected: palette.o2BluePrimaryLight10,
70
+ buttonDangerBackgroundSelected: palette.pepper60,
71
+ buttonDangerBackgroundHover: palette.pepper60,
72
+ buttonLinkBackgroundSelected: palette.o2BluePrimary15,
69
73
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.2),
70
74
  buttonPrimaryBackground: palette.o2BluePrimary,
71
75
  buttonPrimaryBackgroundInverse: palette.white,
72
- buttonPrimaryBackgroundSelected: palette.o2BluePrimaryDark,
73
- buttonPrimaryBackgroundHover: palette.o2BluePrimaryDark,
74
- buttonPrimaryBackgroundSelectedInverse: palette.o2BluePrimaryLight50,
76
+ buttonPrimaryBackgroundSelected: palette.o2BluePrimary70,
77
+ buttonPrimaryBackgroundHover: palette.o2BluePrimary70,
78
+ buttonPrimaryBackgroundSelectedInverse: palette.o2BluePrimary30,
75
79
  buttonSecondaryBackground: palette.o2BluePrimary,
76
- buttonSecondaryBackgroundSelected: palette.o2BluePrimaryDark,
80
+ buttonSecondaryBackgroundSelected: palette.o2BluePrimary70,
77
81
  buttonSecondaryBorderInverse: palette.white,
78
- buttonSecondaryBorderSelectedInverse: palette.o2BluePrimaryLight50,
82
+ buttonSecondaryBorderSelectedInverse: palette.o2BluePrimary30,
79
83
  textButtonPrimary: palette.white,
80
84
  textButtonPrimaryInverse: palette.o2BluePrimary,
81
- textButtonPrimaryInverseSelected: palette.o2BluePrimaryDark,
85
+ textButtonPrimaryInverseSelected: palette.o2BluePrimary70,
82
86
  textButtonSecondary: palette.o2BluePrimary,
83
- textButtonSecondarySelected: palette.o2BluePrimaryDark,
87
+ textButtonSecondarySelected: palette.o2BluePrimary70,
84
88
  textButtonSecondaryInverse: palette.white,
85
89
  textButtonSecondaryInverseSelected: palette.white,
86
90
  textLink: palette.o2BluePrimary,
87
91
  textLinkInverse: palette.white,
88
92
  textLinkDanger: palette.pepper,
89
- textLinkSnackbar: palette.o2BluePrimaryLight50,
93
+ textLinkSnackbar: palette.o2BluePrimary30,
90
94
  // CONTROLS
91
95
  control: palette.grey3,
92
96
  controlActivated: palette.o2BluePrimary,
@@ -96,19 +100,19 @@ export var getO2Skin = function() {
96
100
  loadingBarBackgroundInverse: palette.grey1,
97
101
  loadingBarInverse: palette.o2BluePrimary,
98
102
  toggleAndroidInactive: palette.grey2,
99
- toggleAndroidBackgroundActive: palette.o2BluePrimaryLight10,
103
+ toggleAndroidBackgroundActive: palette.o2BluePrimary15,
100
104
  iosControlKnob: palette.white,
101
105
  // DIVIDERS
102
106
  divider: palette.grey2,
103
107
  dividerInverse: applyAlpha(palette.white, 0.2),
104
108
  navigationBarDivider: palette.o2BluePrimary,
105
109
  // FEEDBACKS
106
- badge: palette.pepperDark,
110
+ badge: palette.pepper60,
107
111
  feedbackErrorBackground: palette.pepper,
108
112
  feedbackInfoBackground: palette.grey6,
109
113
  // GLOBAL
110
114
  brand: palette.o2BluePrimary,
111
- brandDark: palette.o2BluePrimaryDark,
115
+ brandDark: palette.o2BluePrimary70,
112
116
  inverse: palette.white,
113
117
  neutralHigh: palette.grey6,
114
118
  neutralMedium: palette.grey5,
@@ -126,11 +130,24 @@ export var getO2Skin = function() {
126
130
  warning: palette.o2Orange,
127
131
  // BARS TEXTS
128
132
  textNavigationBarPrimary: palette.white,
129
- textNavigationBarSecondary: palette.o2BluePrimaryLight50,
130
- textNavigationSearchBarHint: palette.o2BluePrimaryLight50,
133
+ textNavigationBarSecondary: palette.o2BluePrimary30,
134
+ textNavigationSearchBarHint: palette.o2BluePrimary30,
131
135
  textNavigationSearchBarText: palette.white,
132
136
  textAppBar: palette.grey4,
133
- textAppBarSelected: palette.o2BluePrimary
137
+ textAppBarSelected: palette.o2BluePrimary,
138
+ // TAGS
139
+ tagBackgroundSuccess: palette.o2Green10,
140
+ tagBackgroundWarning: palette.o2Orange10,
141
+ tagBackgroundError: palette.pepper10,
142
+ tagBackgroundPromo: palette.o2Purple10,
143
+ tagBackgroundActive: palette.o2BluePrimary10,
144
+ tagBackgroundInactive: palette.grey1,
145
+ textTagSuccess: palette.o2Green80,
146
+ textTagWarning: palette.o2Orange75,
147
+ textTagError: palette.pepper60,
148
+ textTagPromo: palette.o2Purple,
149
+ textTagActive: palette.o2BluePrimary,
150
+ textTagInactive: palette.grey5
134
151
  },
135
152
  darkModeColors: {
136
153
  appBarBackground: palette.darkModeGrey,
@@ -166,10 +183,10 @@ export var getO2Skin = function() {
166
183
  textButtonSecondarySelected: palette.grey4,
167
184
  textButtonSecondaryInverse: palette.grey2,
168
185
  textButtonSecondaryInverseSelected: palette.grey4,
169
- textLink: palette.o2BluePrimaryLight50,
170
- textLinkInverse: palette.o2BluePrimaryLight50,
186
+ textLink: palette.o2BluePrimary30,
187
+ textLinkInverse: palette.o2BluePrimary30,
171
188
  control: palette.darkModeGrey6,
172
- controlActivated: palette.o2BluePrimaryLight50,
189
+ controlActivated: palette.o2BluePrimary30,
173
190
  loadingBar: palette.darkModeO2BluePrimary,
174
191
  loadingBarBackground: palette.darkModeGrey6,
175
192
  loadingBarBackgroundInverse: palette.grey1,
@@ -181,7 +198,7 @@ export var getO2Skin = function() {
181
198
  dividerInverse: applyAlpha(palette.white, 0.05),
182
199
  navigationBarDivider: palette.darkModeBlack,
183
200
  feedbackInfoBackground: palette.darkModeGrey6,
184
- brand: palette.o2BluePrimaryLight50,
201
+ brand: palette.o2BluePrimary30,
185
202
  brandDark: palette.darkModeGrey6,
186
203
  inverse: palette.grey2,
187
204
  neutralHigh: palette.grey2,
@@ -191,13 +208,26 @@ export var getO2Skin = function() {
191
208
  textPrimaryInverse: palette.grey2,
192
209
  textSecondary: palette.grey4,
193
210
  textSecondaryInverse: palette.grey4,
194
- textAmount: palette.o2BluePrimaryLight10,
211
+ textAmount: palette.o2BluePrimary15,
195
212
  textNavigationBarPrimary: palette.grey2,
196
213
  textNavigationBarSecondary: palette.grey4,
197
214
  textNavigationSearchBarHint: palette.grey4,
198
215
  textNavigationSearchBarText: palette.grey2,
199
216
  textAppBar: palette.grey5,
200
- textAppBarSelected: palette.grey2
217
+ textAppBarSelected: palette.grey2,
218
+ // TAGS
219
+ tagBackgroundSuccess: applyAlpha(palette.white, 0.05),
220
+ tagBackgroundWarning: applyAlpha(palette.white, 0.05),
221
+ tagBackgroundError: applyAlpha(palette.white, 0.05),
222
+ tagBackgroundPromo: applyAlpha(palette.white, 0.05),
223
+ tagBackgroundActive: applyAlpha(palette.white, 0.05),
224
+ tagBackgroundInactive: applyAlpha(palette.white, 0.05),
225
+ textTagSuccess: palette.o2Green40,
226
+ textTagWarning: palette.o2Orange40,
227
+ textTagError: palette.pepper40,
228
+ textTagPromo: palette.o2Purple30,
229
+ textTagActive: palette.o2BluePrimary15,
230
+ textTagInactive: palette.grey4
201
231
  }
202
232
  };
203
233
  };
@@ -1,24 +1,30 @@
1
1
  import { applyAlpha } from '../utils/color';
2
2
  import { TELEFONICA_SKIN } from './constants';
3
+ // https://github.com/Telefonica/mistica-design/blob/production/tokens/telefonica-skin-schema.json
4
+ // https://github.com/Telefonica/mistica-design/blob/production/tokens/telefonica-constants.json
3
5
  export var palette = {
4
6
  telefonicaBlue: '#0066FF',
5
- telefonicaBlueDark: '#0356C9',
6
- telefonicaBlueLight50: '#80B2FF',
7
- telefonicaBlueLight30: '#B3D1FF',
8
- telefonicaBlueLight20: '#EBF3FF',
7
+ telefonicaBlue10: '#E5F0FF',
8
+ telefonicaBlue20: '#B2D1FF',
9
+ telefonicaBlue30: '#80B3FF',
10
+ telefonicaBlue70: '#0356C9',
9
11
  ambar: '#EAC344',
10
- ambarLight: '#F5E98A',
11
- ambarDark: '#AD842D',
12
+ ambar10: '#FDF9EC',
13
+ ambar40: '#F0D57C',
14
+ ambar70: '#69581F',
12
15
  coral: '#E66C64',
13
- coralLight: '#E3A19A',
14
- coralDark: '#912C31',
16
+ coral10: '#FDF0EF',
17
+ coral40: '#E3A19A',
18
+ coral70: '#D50000',
19
+ coral80: '#912C31',
15
20
  orchid: '#C466EF',
16
- orchidDark: '#8A1A93',
17
- orchidLight: '#E7C2F8',
21
+ orchid10: '#F9F0FD',
22
+ orchid40: '#D694F4',
23
+ orchid70: '#8947A7',
18
24
  turquoise: '#59C2C9',
19
- turquoiseLight: '#67E0E5',
20
- turquoiseDark: '#3E8A8A',
21
- white: '#FFFFFF',
25
+ turquoise10: '#EEF9FA',
26
+ turquoise40: '#8BD4D9',
27
+ turquoise70: '#3E888D',
22
28
  grey1: '#F2F4FF',
23
29
  grey2: '#D1D5E4',
24
30
  grey3: '#B0B6CA',
@@ -28,6 +34,7 @@ export var palette = {
28
34
  grey7: '#414B61',
29
35
  grey8: '#2B3447',
30
36
  grey9: '#031A34',
37
+ white: '#FFFFFF',
31
38
  // specific for dark mode:
32
39
  darkModeBlack: '#191919',
33
40
  darkModeGrey: '#242424'
@@ -43,7 +50,7 @@ export var getTelefonicaSkin = function() {
43
50
  backgroundBrand: palette.telefonicaBlue,
44
51
  backgroundOverlay: applyAlpha(palette.grey6, 0.6),
45
52
  backgroundSkeleton: palette.grey1,
46
- backgroundSkeletonInverse: palette.telefonicaBlueDark,
53
+ backgroundSkeletonInverse: palette.telefonicaBlue70,
47
54
  navigationBarBackground: palette.telefonicaBlue,
48
55
  backgroundAlternative: palette.grey1,
49
56
  backgroundFeedbackBottom: palette.telefonicaBlue,
@@ -56,48 +63,48 @@ export var getTelefonicaSkin = function() {
56
63
  // BUTTONS
57
64
  buttonDangerBackground: palette.coral,
58
65
  buttonDangerBackgroundDisabled: palette.grey2,
59
- buttonDangerBackgroundSelected: palette.coralDark,
60
- buttonDangerBackgroundHover: palette.coralDark,
66
+ buttonDangerBackgroundSelected: palette.coral80,
67
+ buttonDangerBackgroundHover: palette.coral80,
61
68
  buttonLinkBackgroundSelected: palette.grey1,
62
69
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.2),
63
70
  buttonPrimaryBackground: palette.telefonicaBlue,
64
71
  buttonPrimaryBackgroundDisabled: palette.grey2,
65
- buttonPrimaryBackgroundDisabledInverse: palette.telefonicaBlueLight50,
72
+ buttonPrimaryBackgroundDisabledInverse: palette.telefonicaBlue30,
66
73
  buttonPrimaryBackgroundInverse: palette.white,
67
- buttonPrimaryBackgroundSelected: palette.telefonicaBlueDark,
68
- buttonPrimaryBackgroundHover: palette.telefonicaBlueDark,
69
- buttonPrimaryBackgroundSelectedInverse: palette.telefonicaBlueLight50,
74
+ buttonPrimaryBackgroundSelected: palette.telefonicaBlue70,
75
+ buttonPrimaryBackgroundHover: palette.telefonicaBlue70,
76
+ buttonPrimaryBackgroundSelectedInverse: palette.telefonicaBlue30,
70
77
  buttonSecondaryBackground: palette.telefonicaBlue,
71
78
  buttonSecondaryBackgroundDisabled: palette.grey2,
72
- buttonSecondaryBackgroundSelected: palette.telefonicaBlueDark,
73
- buttonSecondaryBorderDisabledInverse: palette.telefonicaBlueLight50,
79
+ buttonSecondaryBackgroundSelected: palette.telefonicaBlue70,
80
+ buttonSecondaryBorderDisabledInverse: palette.telefonicaBlue30,
74
81
  buttonSecondaryBorderInverse: palette.white,
75
- buttonSecondaryBorderSelectedInverse: palette.telefonicaBlueLight50,
82
+ buttonSecondaryBorderSelectedInverse: palette.telefonicaBlue30,
76
83
  textButtonPrimary: palette.white,
77
84
  textButtonPrimaryDisabled: palette.white,
78
85
  textButtonPrimaryInverse: palette.telefonicaBlue,
79
- textButtonPrimaryInverseDisabled: palette.telefonicaBlueLight30,
86
+ textButtonPrimaryInverseDisabled: palette.telefonicaBlue20,
80
87
  textButtonPrimaryInverseSelected: palette.telefonicaBlue,
81
88
  textButtonSecondary: palette.telefonicaBlue,
82
89
  textButtonSecondaryDisabled: palette.grey2,
83
- textButtonSecondarySelected: palette.telefonicaBlueDark,
90
+ textButtonSecondarySelected: palette.telefonicaBlue70,
84
91
  textButtonSecondaryInverse: palette.white,
85
- textButtonSecondaryInverseDisabled: palette.telefonicaBlueLight50,
86
- textButtonSecondaryInverseSelected: palette.telefonicaBlueLight50,
92
+ textButtonSecondaryInverseDisabled: palette.telefonicaBlue30,
93
+ textButtonSecondaryInverseSelected: palette.telefonicaBlue30,
87
94
  textLink: palette.telefonicaBlue,
88
95
  textLinkInverse: palette.white,
89
96
  textLinkDanger: palette.coral,
90
97
  textLinkDangerDisabled: palette.grey2,
91
98
  textLinkDisabled: palette.grey2,
92
- textLinkSnackbar: palette.telefonicaBlueLight50,
99
+ textLinkSnackbar: palette.telefonicaBlue30,
93
100
  // CONTROLS
94
101
  control: palette.grey3,
95
102
  controlActivated: palette.telefonicaBlue,
96
103
  controlError: palette.coral,
97
- loadingBar: palette.telefonicaBlueLight50,
98
- loadingBarBackground: palette.telefonicaBlueDark,
99
- loadingBarBackgroundInverse: palette.telefonicaBlueDark,
100
- loadingBarInverse: palette.telefonicaBlueLight50,
104
+ loadingBar: palette.telefonicaBlue30,
105
+ loadingBarBackground: palette.telefonicaBlue70,
106
+ loadingBarBackgroundInverse: palette.telefonicaBlue70,
107
+ loadingBarInverse: palette.telefonicaBlue30,
101
108
  toggleAndroidInactive: palette.grey2,
102
109
  toggleAndroidBackgroundActive: palette.grey2,
103
110
  iosControlKnob: palette.white,
@@ -106,18 +113,18 @@ export var getTelefonicaSkin = function() {
106
113
  dividerInverse: applyAlpha(palette.white, 0.2),
107
114
  navigationBarDivider: palette.telefonicaBlue,
108
115
  // FEEDBACKS
109
- badge: palette.coralDark,
116
+ badge: palette.coral80,
110
117
  feedbackErrorBackground: palette.coral,
111
118
  feedbackInfoBackground: palette.grey9,
112
119
  // GLOBAL
113
120
  brand: palette.telefonicaBlue,
114
- brandDark: palette.telefonicaBlueDark,
121
+ brandDark: palette.telefonicaBlue70,
115
122
  inverse: palette.white,
116
123
  neutralHigh: palette.grey9,
117
124
  neutralMedium: palette.grey5,
118
125
  neutralLow: palette.grey1,
119
126
  promo: palette.orchid,
120
- highlight: palette.coralLight,
127
+ highlight: palette.coral40,
121
128
  textPrimary: palette.grey9,
122
129
  textPrimaryInverse: palette.white,
123
130
  textSecondary: palette.grey5,
@@ -134,7 +141,20 @@ export var getTelefonicaSkin = function() {
134
141
  textNavigationSearchBarHint: palette.grey1,
135
142
  textNavigationSearchBarText: palette.white,
136
143
  textAppBar: palette.grey4,
137
- textAppBarSelected: palette.telefonicaBlue
144
+ textAppBarSelected: palette.telefonicaBlue,
145
+ // TAGS
146
+ tagBackgroundSuccess: palette.turquoise10,
147
+ tagBackgroundWarning: palette.ambar10,
148
+ tagBackgroundError: palette.coral10,
149
+ tagBackgroundPromo: palette.orchid10,
150
+ tagBackgroundActive: palette.grey1,
151
+ tagBackgroundInactive: palette.grey1,
152
+ textTagSuccess: palette.turquoise70,
153
+ textTagWarning: palette.ambar70,
154
+ textTagError: palette.coral70,
155
+ textTagPromo: palette.orchid70,
156
+ textTagActive: palette.telefonicaBlue,
157
+ textTagInactive: palette.grey6
138
158
  },
139
159
  darkModeColors: {
140
160
  appBarBackground: palette.darkModeGrey,
@@ -157,15 +177,15 @@ export var getTelefonicaSkin = function() {
157
177
  buttonPrimaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
158
178
  buttonPrimaryBackgroundDisabledInverse: applyAlpha(palette.white, 0.05),
159
179
  buttonPrimaryBackgroundInverse: palette.telefonicaBlue,
160
- buttonPrimaryBackgroundSelected: palette.telefonicaBlueDark,
161
- buttonPrimaryBackgroundHover: palette.telefonicaBlueDark,
162
- buttonPrimaryBackgroundSelectedInverse: palette.telefonicaBlueDark,
180
+ buttonPrimaryBackgroundSelected: palette.telefonicaBlue70,
181
+ buttonPrimaryBackgroundHover: palette.telefonicaBlue70,
182
+ buttonPrimaryBackgroundSelectedInverse: palette.telefonicaBlue70,
163
183
  buttonSecondaryBackground: palette.telefonicaBlue,
164
184
  buttonSecondaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
165
- buttonSecondaryBackgroundSelected: palette.telefonicaBlueDark,
185
+ buttonSecondaryBackgroundSelected: palette.telefonicaBlue70,
166
186
  buttonSecondaryBorderDisabledInverse: applyAlpha(palette.white, 0.05),
167
187
  buttonSecondaryBorderInverse: palette.telefonicaBlue,
168
- buttonSecondaryBorderSelectedInverse: palette.telefonicaBlueDark,
188
+ buttonSecondaryBorderSelectedInverse: palette.telefonicaBlue70,
169
189
  textButtonPrimary: palette.grey2,
170
190
  textButtonPrimaryDisabled: palette.grey7,
171
191
  textButtonPrimaryInverse: palette.grey2,
@@ -184,8 +204,8 @@ export var getTelefonicaSkin = function() {
184
204
  controlActivated: palette.telefonicaBlue,
185
205
  loadingBar: palette.telefonicaBlue,
186
206
  loadingBarBackground: applyAlpha(palette.white, 0.05),
187
- loadingBarBackgroundInverse: palette.telefonicaBlueDark,
188
- loadingBarInverse: palette.telefonicaBlueLight50,
207
+ loadingBarBackgroundInverse: palette.telefonicaBlue70,
208
+ loadingBarInverse: palette.telefonicaBlue30,
189
209
  toggleAndroidInactive: palette.grey4,
190
210
  toggleAndroidBackgroundActive: palette.grey1,
191
211
  iosControlKnob: palette.grey2,
@@ -203,13 +223,26 @@ export var getTelefonicaSkin = function() {
203
223
  textSecondary: palette.grey4,
204
224
  textSecondaryInverse: palette.grey4,
205
225
  textDisabled: palette.grey5,
206
- textAmount: palette.telefonicaBlueLight50,
226
+ textAmount: palette.telefonicaBlue30,
207
227
  textNavigationBarPrimary: palette.grey2,
208
228
  textNavigationBarSecondary: palette.grey4,
209
229
  textNavigationSearchBarHint: palette.grey4,
210
230
  textNavigationSearchBarText: palette.grey2,
211
231
  textAppBar: palette.grey5,
212
- textAppBarSelected: palette.grey2
232
+ textAppBarSelected: palette.grey2,
233
+ // TAGS
234
+ tagBackgroundSuccess: applyAlpha(palette.white, 0.05),
235
+ tagBackgroundWarning: applyAlpha(palette.white, 0.05),
236
+ tagBackgroundError: applyAlpha(palette.white, 0.05),
237
+ tagBackgroundPromo: applyAlpha(palette.white, 0.05),
238
+ tagBackgroundActive: applyAlpha(palette.white, 0.05),
239
+ tagBackgroundInactive: applyAlpha(palette.white, 0.05),
240
+ textTagSuccess: palette.turquoise40,
241
+ textTagWarning: palette.ambar40,
242
+ textTagError: palette.coral40,
243
+ textTagPromo: palette.orchid40,
244
+ textTagActive: palette.telefonicaBlue30,
245
+ textTagInactive: palette.grey4
213
246
  }
214
247
  };
215
248
  };