@telefonica/mistica 10.19.0 → 10.22.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/CHANGELOG.md +34 -0
- package/dist/button-layout.js +30 -17
- package/dist/button.js +24 -8
- package/dist/card.js +25 -28
- package/dist/chip.d.ts +9 -0
- package/dist/chip.js +111 -0
- package/dist/chip.js.flow +11 -0
- package/dist/form.js +1 -1
- package/dist/header.d.ts +2 -0
- package/dist/header.js.flow +5 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/dist/index.js.flow +2 -0
- package/dist/package-version.js +1 -1
- package/dist/skins/blau.d.ts +6 -3
- package/dist/skins/blau.js +34 -5
- package/dist/skins/blau.js.flow +6 -3
- package/dist/skins/movistar.d.ts +21 -11
- package/dist/skins/movistar.js +76 -40
- package/dist/skins/movistar.js.flow +21 -11
- package/dist/skins/o2-classic.d.ts +21 -9
- package/dist/skins/o2-classic.js +64 -26
- package/dist/skins/o2-classic.js.flow +21 -9
- package/dist/skins/o2.d.ts +19 -17
- package/dist/skins/o2.js +68 -40
- package/dist/skins/o2.js.flow +19 -17
- package/dist/skins/telefonica.d.ts +18 -13
- package/dist/skins/telefonica.js +76 -45
- package/dist/skins/telefonica.js.flow +18 -13
- package/dist/skins/types.d.ts +12 -0
- package/dist/skins/types.js.flow +12 -0
- package/dist/skins/vivo.d.ts +9 -4
- package/dist/skins/vivo.js +37 -6
- package/dist/skins/vivo.js.flow +9 -4
- package/dist/tag.d.ts +6 -1
- package/dist/tag.js +133 -24
- package/dist/tag.js.flow +15 -1
- package/dist/text.d.ts +4 -0
- package/dist/text.js +13 -6
- package/dist/text.js.flow +10 -0
- package/dist/theme-context-provider.js +8 -2
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js.flow +2 -0
- package/dist/touchable.js +3 -2
- package/dist-es/button-layout.js +30 -17
- package/dist-es/button.js +24 -8
- package/dist-es/card.js +26 -29
- package/dist-es/chip.js +100 -0
- package/dist-es/form.js +1 -1
- package/dist-es/index.js +1 -0
- package/dist-es/package-version.js +1 -1
- package/dist-es/skins/blau.js +36 -5
- package/dist-es/skins/movistar.js +78 -40
- package/dist-es/skins/o2-classic.js +66 -26
- package/dist-es/skins/o2.js +70 -40
- package/dist-es/skins/telefonica.js +78 -45
- package/dist-es/skins/vivo.js +39 -6
- package/dist-es/tag.js +130 -26
- package/dist-es/text.js +13 -6
- package/dist-es/theme-context-provider.js +8 -2
- package/dist-es/touchable.js +3 -2
- 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
|
-
|
|
6
|
-
|
|
7
|
+
o2Blue10: '#E6EAEE',
|
|
8
|
+
o2Blue30: '#8195AC',
|
|
9
|
+
o2Blue45: '#6C8BAF',
|
|
10
|
+
o2Blue55: '#04264E',
|
|
7
11
|
o2SkyBlue: '#0090D0',
|
|
8
|
-
|
|
12
|
+
o2SkyBlue55: '#057DB2',
|
|
9
13
|
o2SkyBlueLight: '#65B4E4',
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
23
|
+
o2Green10: '#F3F8E7',
|
|
24
|
+
o2Green40: '#A9CB57',
|
|
25
|
+
o2Green75: '#4D621D',
|
|
20
26
|
pepper: '#FF374A',
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
pepper10: '#FFEBED',
|
|
28
|
+
pepper20: '#FFC3C8',
|
|
29
|
+
pepper40: '#FF7380',
|
|
30
|
+
pepper55: '#D73241',
|
|
31
|
+
pepper70: '#B22634',
|
|
23
32
|
orange: '#FF7F41',
|
|
24
|
-
|
|
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.
|
|
67
|
-
buttonDangerBackgroundHover: palette.
|
|
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.
|
|
73
|
-
buttonPrimaryBackgroundHover: palette.
|
|
74
|
-
buttonPrimaryBackgroundSelectedInverse: palette.
|
|
86
|
+
buttonPrimaryBackgroundSelected: palette.o2SkyBlue55,
|
|
87
|
+
buttonPrimaryBackgroundHover: palette.o2SkyBlue55,
|
|
88
|
+
buttonPrimaryBackgroundSelectedInverse: palette.o2SkyBlueLight45,
|
|
75
89
|
buttonSecondaryBackground: palette.o2SkyBlue,
|
|
76
|
-
buttonSecondaryBackgroundSelected: palette.
|
|
90
|
+
buttonSecondaryBackgroundSelected: palette.o2SkyBlue55,
|
|
77
91
|
buttonSecondaryBorderInverse: palette.white,
|
|
78
|
-
buttonSecondaryBorderSelectedInverse: palette.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
130
|
-
textNavigationSearchBarHint: palette.
|
|
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.
|
|
181
|
+
buttonPrimaryBackgroundSelectedInverse: palette.o2SkyBlue55,
|
|
155
182
|
buttonSecondaryBorderInverse: palette.o2SkyBlue,
|
|
156
|
-
buttonSecondaryBorderSelectedInverse: palette.
|
|
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.
|
|
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
|
};
|
package/dist-es/skins/o2.js
CHANGED
|
@@ -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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
16
|
+
o2Green10: '#F4FAE7',
|
|
17
|
+
o2Green40: '#B2D956',
|
|
18
|
+
o2Green80: '#415A06',
|
|
19
19
|
o2Yellow: '#FEDB00',
|
|
20
|
-
o2YellowLight: '#FEF6C3',
|
|
21
20
|
o2Orange: '#FF7F41',
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
28
|
-
|
|
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.
|
|
67
|
-
buttonDangerBackgroundHover: palette.
|
|
68
|
-
buttonLinkBackgroundSelected: palette.
|
|
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.
|
|
73
|
-
buttonPrimaryBackgroundHover: palette.
|
|
74
|
-
buttonPrimaryBackgroundSelectedInverse: palette.
|
|
76
|
+
buttonPrimaryBackgroundSelected: palette.o2BluePrimary70,
|
|
77
|
+
buttonPrimaryBackgroundHover: palette.o2BluePrimary70,
|
|
78
|
+
buttonPrimaryBackgroundSelectedInverse: palette.o2BluePrimary30,
|
|
75
79
|
buttonSecondaryBackground: palette.o2BluePrimary,
|
|
76
|
-
buttonSecondaryBackgroundSelected: palette.
|
|
80
|
+
buttonSecondaryBackgroundSelected: palette.o2BluePrimary70,
|
|
77
81
|
buttonSecondaryBorderInverse: palette.white,
|
|
78
|
-
buttonSecondaryBorderSelectedInverse: palette.
|
|
82
|
+
buttonSecondaryBorderSelectedInverse: palette.o2BluePrimary30,
|
|
79
83
|
textButtonPrimary: palette.white,
|
|
80
84
|
textButtonPrimaryInverse: palette.o2BluePrimary,
|
|
81
|
-
textButtonPrimaryInverseSelected: palette.
|
|
85
|
+
textButtonPrimaryInverseSelected: palette.o2BluePrimary70,
|
|
82
86
|
textButtonSecondary: palette.o2BluePrimary,
|
|
83
|
-
textButtonSecondarySelected: palette.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
130
|
-
textNavigationSearchBarHint: palette.
|
|
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.
|
|
170
|
-
textLinkInverse: palette.
|
|
186
|
+
textLink: palette.o2BluePrimary30,
|
|
187
|
+
textLinkInverse: palette.o2BluePrimary30,
|
|
171
188
|
control: palette.darkModeGrey6,
|
|
172
|
-
controlActivated: palette.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
telefonicaBlue10: '#E5F0FF',
|
|
8
|
+
telefonicaBlue20: '#B2D1FF',
|
|
9
|
+
telefonicaBlue30: '#80B3FF',
|
|
10
|
+
telefonicaBlue70: '#0356C9',
|
|
9
11
|
ambar: '#EAC344',
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
ambar10: '#FDF9EC',
|
|
13
|
+
ambar40: '#F0D57C',
|
|
14
|
+
ambar70: '#69581F',
|
|
12
15
|
coral: '#E66C64',
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
coral10: '#FDF0EF',
|
|
17
|
+
coral40: '#E3A19A',
|
|
18
|
+
coral70: '#D50000',
|
|
19
|
+
coral80: '#912C31',
|
|
15
20
|
orchid: '#C466EF',
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
orchid10: '#F9F0FD',
|
|
22
|
+
orchid40: '#D694F4',
|
|
23
|
+
orchid70: '#8947A7',
|
|
18
24
|
turquoise: '#59C2C9',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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.
|
|
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.
|
|
60
|
-
buttonDangerBackgroundHover: palette.
|
|
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.
|
|
72
|
+
buttonPrimaryBackgroundDisabledInverse: palette.telefonicaBlue30,
|
|
66
73
|
buttonPrimaryBackgroundInverse: palette.white,
|
|
67
|
-
buttonPrimaryBackgroundSelected: palette.
|
|
68
|
-
buttonPrimaryBackgroundHover: palette.
|
|
69
|
-
buttonPrimaryBackgroundSelectedInverse: palette.
|
|
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.
|
|
73
|
-
buttonSecondaryBorderDisabledInverse: palette.
|
|
79
|
+
buttonSecondaryBackgroundSelected: palette.telefonicaBlue70,
|
|
80
|
+
buttonSecondaryBorderDisabledInverse: palette.telefonicaBlue30,
|
|
74
81
|
buttonSecondaryBorderInverse: palette.white,
|
|
75
|
-
buttonSecondaryBorderSelectedInverse: palette.
|
|
82
|
+
buttonSecondaryBorderSelectedInverse: palette.telefonicaBlue30,
|
|
76
83
|
textButtonPrimary: palette.white,
|
|
77
84
|
textButtonPrimaryDisabled: palette.white,
|
|
78
85
|
textButtonPrimaryInverse: palette.telefonicaBlue,
|
|
79
|
-
textButtonPrimaryInverseDisabled: palette.
|
|
86
|
+
textButtonPrimaryInverseDisabled: palette.telefonicaBlue20,
|
|
80
87
|
textButtonPrimaryInverseSelected: palette.telefonicaBlue,
|
|
81
88
|
textButtonSecondary: palette.telefonicaBlue,
|
|
82
89
|
textButtonSecondaryDisabled: palette.grey2,
|
|
83
|
-
textButtonSecondarySelected: palette.
|
|
90
|
+
textButtonSecondarySelected: palette.telefonicaBlue70,
|
|
84
91
|
textButtonSecondaryInverse: palette.white,
|
|
85
|
-
textButtonSecondaryInverseDisabled: palette.
|
|
86
|
-
textButtonSecondaryInverseSelected: palette.
|
|
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.
|
|
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.
|
|
98
|
-
loadingBarBackground: palette.
|
|
99
|
-
loadingBarBackgroundInverse: palette.
|
|
100
|
-
loadingBarInverse: palette.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
161
|
-
buttonPrimaryBackgroundHover: palette.
|
|
162
|
-
buttonPrimaryBackgroundSelectedInverse: palette.
|
|
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.
|
|
185
|
+
buttonSecondaryBackgroundSelected: palette.telefonicaBlue70,
|
|
166
186
|
buttonSecondaryBorderDisabledInverse: applyAlpha(palette.white, 0.05),
|
|
167
187
|
buttonSecondaryBorderInverse: palette.telefonicaBlue,
|
|
168
|
-
buttonSecondaryBorderSelectedInverse: palette.
|
|
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.
|
|
188
|
-
loadingBarInverse: palette.
|
|
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.
|
|
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
|
};
|