@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.
- package/CHANGELOG.md +36 -0
- package/dist/button-layout.js +28 -17
- package/dist/button.js +24 -8
- package/dist/card.d.ts +10 -1
- package/dist/card.js +29 -29
- package/dist/card.js.flow +16 -1
- package/dist/header.d.ts +2 -0
- package/dist/header.js.flow +5 -0
- package/dist/icons/icon-success.js +14 -6
- package/dist/image.d.ts +25 -4
- package/dist/image.js +67 -9
- package/dist/image.js.flow +33 -4
- 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/section-title.d.ts +1 -3
- package/dist/section-title.js.flow +1 -2
- 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/video.d.ts +32 -0
- package/dist/video.js +161 -0
- package/dist/video.js.flow +50 -0
- package/dist-es/button-layout.js +28 -17
- package/dist-es/button.js +24 -8
- package/dist-es/card.js +30 -30
- package/dist-es/icons/icon-success.js +14 -6
- package/dist-es/image.js +41 -8
- 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/dist-es/video.js +123 -0
- package/package.json +1 -1
package/dist/skins/telefonica.js
CHANGED
|
@@ -7,23 +7,27 @@ var _color = require("../utils/color");
|
|
|
7
7
|
var _constants = require("./constants");
|
|
8
8
|
var palette = {
|
|
9
9
|
telefonicaBlue: '#0066FF',
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
telefonicaBlue10: '#E5F0FF',
|
|
11
|
+
telefonicaBlue20: '#B2D1FF',
|
|
12
|
+
telefonicaBlue30: '#80B3FF',
|
|
13
|
+
telefonicaBlue70: '#0356C9',
|
|
14
14
|
ambar: '#EAC344',
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
ambar10: '#FDF9EC',
|
|
16
|
+
ambar40: '#F0D57C',
|
|
17
|
+
ambar70: '#69581F',
|
|
17
18
|
coral: '#E66C64',
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
coral10: '#FDF0EF',
|
|
20
|
+
coral40: '#E3A19A',
|
|
21
|
+
coral70: '#D50000',
|
|
22
|
+
coral80: '#912C31',
|
|
20
23
|
orchid: '#C466EF',
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
orchid10: '#F9F0FD',
|
|
25
|
+
orchid40: '#D694F4',
|
|
26
|
+
orchid70: '#8947A7',
|
|
23
27
|
turquoise: '#59C2C9',
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
turquoise10: '#EEF9FA',
|
|
29
|
+
turquoise40: '#8BD4D9',
|
|
30
|
+
turquoise70: '#3E888D',
|
|
27
31
|
grey1: '#F2F4FF',
|
|
28
32
|
grey2: '#D1D5E4',
|
|
29
33
|
grey3: '#B0B6CA',
|
|
@@ -33,6 +37,7 @@ var palette = {
|
|
|
33
37
|
grey7: '#414B61',
|
|
34
38
|
grey8: '#2B3447',
|
|
35
39
|
grey9: '#031A34',
|
|
40
|
+
white: '#FFFFFF',
|
|
36
41
|
// specific for dark mode:
|
|
37
42
|
darkModeBlack: '#191919',
|
|
38
43
|
darkModeGrey: '#242424'
|
|
@@ -49,7 +54,7 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
49
54
|
backgroundBrand: palette.telefonicaBlue,
|
|
50
55
|
backgroundOverlay: (0, _color).applyAlpha(palette.grey6, 0.6),
|
|
51
56
|
backgroundSkeleton: palette.grey1,
|
|
52
|
-
backgroundSkeletonInverse: palette.
|
|
57
|
+
backgroundSkeletonInverse: palette.telefonicaBlue70,
|
|
53
58
|
navigationBarBackground: palette.telefonicaBlue,
|
|
54
59
|
backgroundAlternative: palette.grey1,
|
|
55
60
|
backgroundFeedbackBottom: palette.telefonicaBlue,
|
|
@@ -62,48 +67,48 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
62
67
|
// BUTTONS
|
|
63
68
|
buttonDangerBackground: palette.coral,
|
|
64
69
|
buttonDangerBackgroundDisabled: palette.grey2,
|
|
65
|
-
buttonDangerBackgroundSelected: palette.
|
|
66
|
-
buttonDangerBackgroundHover: palette.
|
|
70
|
+
buttonDangerBackgroundSelected: palette.coral80,
|
|
71
|
+
buttonDangerBackgroundHover: palette.coral80,
|
|
67
72
|
buttonLinkBackgroundSelected: palette.grey1,
|
|
68
73
|
buttonLinkBackgroundSelectedInverse: (0, _color).applyAlpha(palette.white, 0.2),
|
|
69
74
|
buttonPrimaryBackground: palette.telefonicaBlue,
|
|
70
75
|
buttonPrimaryBackgroundDisabled: palette.grey2,
|
|
71
|
-
buttonPrimaryBackgroundDisabledInverse: palette.
|
|
76
|
+
buttonPrimaryBackgroundDisabledInverse: palette.telefonicaBlue30,
|
|
72
77
|
buttonPrimaryBackgroundInverse: palette.white,
|
|
73
|
-
buttonPrimaryBackgroundSelected: palette.
|
|
74
|
-
buttonPrimaryBackgroundHover: palette.
|
|
75
|
-
buttonPrimaryBackgroundSelectedInverse: palette.
|
|
78
|
+
buttonPrimaryBackgroundSelected: palette.telefonicaBlue70,
|
|
79
|
+
buttonPrimaryBackgroundHover: palette.telefonicaBlue70,
|
|
80
|
+
buttonPrimaryBackgroundSelectedInverse: palette.telefonicaBlue30,
|
|
76
81
|
buttonSecondaryBackground: palette.telefonicaBlue,
|
|
77
82
|
buttonSecondaryBackgroundDisabled: palette.grey2,
|
|
78
|
-
buttonSecondaryBackgroundSelected: palette.
|
|
79
|
-
buttonSecondaryBorderDisabledInverse: palette.
|
|
83
|
+
buttonSecondaryBackgroundSelected: palette.telefonicaBlue70,
|
|
84
|
+
buttonSecondaryBorderDisabledInverse: palette.telefonicaBlue30,
|
|
80
85
|
buttonSecondaryBorderInverse: palette.white,
|
|
81
|
-
buttonSecondaryBorderSelectedInverse: palette.
|
|
86
|
+
buttonSecondaryBorderSelectedInverse: palette.telefonicaBlue30,
|
|
82
87
|
textButtonPrimary: palette.white,
|
|
83
88
|
textButtonPrimaryDisabled: palette.white,
|
|
84
89
|
textButtonPrimaryInverse: palette.telefonicaBlue,
|
|
85
|
-
textButtonPrimaryInverseDisabled: palette.
|
|
90
|
+
textButtonPrimaryInverseDisabled: palette.telefonicaBlue20,
|
|
86
91
|
textButtonPrimaryInverseSelected: palette.telefonicaBlue,
|
|
87
92
|
textButtonSecondary: palette.telefonicaBlue,
|
|
88
93
|
textButtonSecondaryDisabled: palette.grey2,
|
|
89
|
-
textButtonSecondarySelected: palette.
|
|
94
|
+
textButtonSecondarySelected: palette.telefonicaBlue70,
|
|
90
95
|
textButtonSecondaryInverse: palette.white,
|
|
91
|
-
textButtonSecondaryInverseDisabled: palette.
|
|
92
|
-
textButtonSecondaryInverseSelected: palette.
|
|
96
|
+
textButtonSecondaryInverseDisabled: palette.telefonicaBlue30,
|
|
97
|
+
textButtonSecondaryInverseSelected: palette.telefonicaBlue30,
|
|
93
98
|
textLink: palette.telefonicaBlue,
|
|
94
99
|
textLinkInverse: palette.white,
|
|
95
100
|
textLinkDanger: palette.coral,
|
|
96
101
|
textLinkDangerDisabled: palette.grey2,
|
|
97
102
|
textLinkDisabled: palette.grey2,
|
|
98
|
-
textLinkSnackbar: palette.
|
|
103
|
+
textLinkSnackbar: palette.telefonicaBlue30,
|
|
99
104
|
// CONTROLS
|
|
100
105
|
control: palette.grey3,
|
|
101
106
|
controlActivated: palette.telefonicaBlue,
|
|
102
107
|
controlError: palette.coral,
|
|
103
|
-
loadingBar: palette.
|
|
104
|
-
loadingBarBackground: palette.
|
|
105
|
-
loadingBarBackgroundInverse: palette.
|
|
106
|
-
loadingBarInverse: palette.
|
|
108
|
+
loadingBar: palette.telefonicaBlue30,
|
|
109
|
+
loadingBarBackground: palette.telefonicaBlue70,
|
|
110
|
+
loadingBarBackgroundInverse: palette.telefonicaBlue70,
|
|
111
|
+
loadingBarInverse: palette.telefonicaBlue30,
|
|
107
112
|
toggleAndroidInactive: palette.grey2,
|
|
108
113
|
toggleAndroidBackgroundActive: palette.grey2,
|
|
109
114
|
iosControlKnob: palette.white,
|
|
@@ -112,18 +117,18 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
112
117
|
dividerInverse: (0, _color).applyAlpha(palette.white, 0.2),
|
|
113
118
|
navigationBarDivider: palette.telefonicaBlue,
|
|
114
119
|
// FEEDBACKS
|
|
115
|
-
badge: palette.
|
|
120
|
+
badge: palette.coral80,
|
|
116
121
|
feedbackErrorBackground: palette.coral,
|
|
117
122
|
feedbackInfoBackground: palette.grey9,
|
|
118
123
|
// GLOBAL
|
|
119
124
|
brand: palette.telefonicaBlue,
|
|
120
|
-
brandDark: palette.
|
|
125
|
+
brandDark: palette.telefonicaBlue70,
|
|
121
126
|
inverse: palette.white,
|
|
122
127
|
neutralHigh: palette.grey9,
|
|
123
128
|
neutralMedium: palette.grey5,
|
|
124
129
|
neutralLow: palette.grey1,
|
|
125
130
|
promo: palette.orchid,
|
|
126
|
-
highlight: palette.
|
|
131
|
+
highlight: palette.coral40,
|
|
127
132
|
textPrimary: palette.grey9,
|
|
128
133
|
textPrimaryInverse: palette.white,
|
|
129
134
|
textSecondary: palette.grey5,
|
|
@@ -140,7 +145,20 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
140
145
|
textNavigationSearchBarHint: palette.grey1,
|
|
141
146
|
textNavigationSearchBarText: palette.white,
|
|
142
147
|
textAppBar: palette.grey4,
|
|
143
|
-
textAppBarSelected: palette.telefonicaBlue
|
|
148
|
+
textAppBarSelected: palette.telefonicaBlue,
|
|
149
|
+
// TAGS
|
|
150
|
+
tagBackgroundSuccess: palette.turquoise10,
|
|
151
|
+
tagBackgroundWarning: palette.ambar10,
|
|
152
|
+
tagBackgroundError: palette.coral10,
|
|
153
|
+
tagBackgroundPromo: palette.orchid10,
|
|
154
|
+
tagBackgroundActive: palette.grey1,
|
|
155
|
+
tagBackgroundInactive: palette.grey1,
|
|
156
|
+
textTagSuccess: palette.turquoise70,
|
|
157
|
+
textTagWarning: palette.ambar70,
|
|
158
|
+
textTagError: palette.coral70,
|
|
159
|
+
textTagPromo: palette.orchid70,
|
|
160
|
+
textTagActive: palette.telefonicaBlue,
|
|
161
|
+
textTagInactive: palette.grey6
|
|
144
162
|
},
|
|
145
163
|
darkModeColors: {
|
|
146
164
|
appBarBackground: palette.darkModeGrey,
|
|
@@ -163,15 +181,15 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
163
181
|
buttonPrimaryBackgroundDisabled: (0, _color).applyAlpha(palette.white, 0.05),
|
|
164
182
|
buttonPrimaryBackgroundDisabledInverse: (0, _color).applyAlpha(palette.white, 0.05),
|
|
165
183
|
buttonPrimaryBackgroundInverse: palette.telefonicaBlue,
|
|
166
|
-
buttonPrimaryBackgroundSelected: palette.
|
|
167
|
-
buttonPrimaryBackgroundHover: palette.
|
|
168
|
-
buttonPrimaryBackgroundSelectedInverse: palette.
|
|
184
|
+
buttonPrimaryBackgroundSelected: palette.telefonicaBlue70,
|
|
185
|
+
buttonPrimaryBackgroundHover: palette.telefonicaBlue70,
|
|
186
|
+
buttonPrimaryBackgroundSelectedInverse: palette.telefonicaBlue70,
|
|
169
187
|
buttonSecondaryBackground: palette.telefonicaBlue,
|
|
170
188
|
buttonSecondaryBackgroundDisabled: (0, _color).applyAlpha(palette.white, 0.05),
|
|
171
|
-
buttonSecondaryBackgroundSelected: palette.
|
|
189
|
+
buttonSecondaryBackgroundSelected: palette.telefonicaBlue70,
|
|
172
190
|
buttonSecondaryBorderDisabledInverse: (0, _color).applyAlpha(palette.white, 0.05),
|
|
173
191
|
buttonSecondaryBorderInverse: palette.telefonicaBlue,
|
|
174
|
-
buttonSecondaryBorderSelectedInverse: palette.
|
|
192
|
+
buttonSecondaryBorderSelectedInverse: palette.telefonicaBlue70,
|
|
175
193
|
textButtonPrimary: palette.grey2,
|
|
176
194
|
textButtonPrimaryDisabled: palette.grey7,
|
|
177
195
|
textButtonPrimaryInverse: palette.grey2,
|
|
@@ -190,8 +208,8 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
190
208
|
controlActivated: palette.telefonicaBlue,
|
|
191
209
|
loadingBar: palette.telefonicaBlue,
|
|
192
210
|
loadingBarBackground: (0, _color).applyAlpha(palette.white, 0.05),
|
|
193
|
-
loadingBarBackgroundInverse: palette.
|
|
194
|
-
loadingBarInverse: palette.
|
|
211
|
+
loadingBarBackgroundInverse: palette.telefonicaBlue70,
|
|
212
|
+
loadingBarInverse: palette.telefonicaBlue30,
|
|
195
213
|
toggleAndroidInactive: palette.grey4,
|
|
196
214
|
toggleAndroidBackgroundActive: palette.grey1,
|
|
197
215
|
iosControlKnob: palette.grey2,
|
|
@@ -209,13 +227,26 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
|
|
|
209
227
|
textSecondary: palette.grey4,
|
|
210
228
|
textSecondaryInverse: palette.grey4,
|
|
211
229
|
textDisabled: palette.grey5,
|
|
212
|
-
textAmount: palette.
|
|
230
|
+
textAmount: palette.telefonicaBlue30,
|
|
213
231
|
textNavigationBarPrimary: palette.grey2,
|
|
214
232
|
textNavigationBarSecondary: palette.grey4,
|
|
215
233
|
textNavigationSearchBarHint: palette.grey4,
|
|
216
234
|
textNavigationSearchBarText: palette.grey2,
|
|
217
235
|
textAppBar: palette.grey5,
|
|
218
|
-
textAppBarSelected: palette.grey2
|
|
236
|
+
textAppBarSelected: palette.grey2,
|
|
237
|
+
// TAGS
|
|
238
|
+
tagBackgroundSuccess: (0, _color).applyAlpha(palette.white, 0.05),
|
|
239
|
+
tagBackgroundWarning: (0, _color).applyAlpha(palette.white, 0.05),
|
|
240
|
+
tagBackgroundError: (0, _color).applyAlpha(palette.white, 0.05),
|
|
241
|
+
tagBackgroundPromo: (0, _color).applyAlpha(palette.white, 0.05),
|
|
242
|
+
tagBackgroundActive: (0, _color).applyAlpha(palette.white, 0.05),
|
|
243
|
+
tagBackgroundInactive: (0, _color).applyAlpha(palette.white, 0.05),
|
|
244
|
+
textTagSuccess: palette.turquoise40,
|
|
245
|
+
textTagWarning: palette.ambar40,
|
|
246
|
+
textTagError: palette.coral40,
|
|
247
|
+
textTagPromo: palette.orchid40,
|
|
248
|
+
textTagActive: palette.telefonicaBlue30,
|
|
249
|
+
textTagInactive: palette.grey4
|
|
219
250
|
}
|
|
220
251
|
};
|
|
221
252
|
};
|
|
@@ -3,23 +3,27 @@
|
|
|
3
3
|
import type { GetSkin } from "./types";
|
|
4
4
|
declare export var palette: {
|
|
5
5
|
+telefonicaBlue: "#0066FF",
|
|
6
|
-
+
|
|
7
|
-
+
|
|
8
|
-
+
|
|
9
|
-
+
|
|
6
|
+
+telefonicaBlue10: "#E5F0FF",
|
|
7
|
+
+telefonicaBlue20: "#B2D1FF",
|
|
8
|
+
+telefonicaBlue30: "#80B3FF",
|
|
9
|
+
+telefonicaBlue70: "#0356C9",
|
|
10
10
|
+ambar: "#EAC344",
|
|
11
|
-
+
|
|
12
|
-
+
|
|
11
|
+
+ambar10: "#FDF9EC",
|
|
12
|
+
+ambar40: "#F0D57C",
|
|
13
|
+
+ambar70: "#69581F",
|
|
13
14
|
+coral: "#E66C64",
|
|
14
|
-
+
|
|
15
|
-
+
|
|
15
|
+
+coral10: "#FDF0EF",
|
|
16
|
+
+coral40: "#E3A19A",
|
|
17
|
+
+coral70: "#D50000",
|
|
18
|
+
+coral80: "#912C31",
|
|
16
19
|
+orchid: "#C466EF",
|
|
17
|
-
+
|
|
18
|
-
+
|
|
20
|
+
+orchid10: "#F9F0FD",
|
|
21
|
+
+orchid40: "#D694F4",
|
|
22
|
+
+orchid70: "#8947A7",
|
|
19
23
|
+turquoise: "#59C2C9",
|
|
20
|
-
+
|
|
21
|
-
+
|
|
22
|
-
+
|
|
24
|
+
+turquoise10: "#EEF9FA",
|
|
25
|
+
+turquoise40: "#8BD4D9",
|
|
26
|
+
+turquoise70: "#3E888D",
|
|
23
27
|
+grey1: "#F2F4FF",
|
|
24
28
|
+grey2: "#D1D5E4",
|
|
25
29
|
+grey3: "#B0B6CA",
|
|
@@ -29,6 +33,7 @@ declare export var palette: {
|
|
|
29
33
|
+grey7: "#414B61",
|
|
30
34
|
+grey8: "#2B3447",
|
|
31
35
|
+grey9: "#031A34",
|
|
36
|
+
+white: "#FFFFFF",
|
|
32
37
|
+darkModeBlack: "#191919",
|
|
33
38
|
+darkModeGrey: "#242424",
|
|
34
39
|
};
|
package/dist/skins/types.d.ts
CHANGED
|
@@ -83,4 +83,16 @@ export declare type Colors = {
|
|
|
83
83
|
textNavigationSearchBarText: string;
|
|
84
84
|
textAppBar: string;
|
|
85
85
|
textAppBarSelected: string;
|
|
86
|
+
tagBackgroundSuccess: string;
|
|
87
|
+
tagBackgroundWarning: string;
|
|
88
|
+
tagBackgroundError: string;
|
|
89
|
+
tagBackgroundPromo: string;
|
|
90
|
+
tagBackgroundActive: string;
|
|
91
|
+
tagBackgroundInactive: string;
|
|
92
|
+
textTagSuccess: string;
|
|
93
|
+
textTagWarning: string;
|
|
94
|
+
textTagError: string;
|
|
95
|
+
textTagPromo: string;
|
|
96
|
+
textTagActive: string;
|
|
97
|
+
textTagInactive: string;
|
|
86
98
|
};
|
package/dist/skins/types.js.flow
CHANGED
|
@@ -91,4 +91,16 @@ export type Colors = {
|
|
|
91
91
|
textNavigationSearchBarText: string,
|
|
92
92
|
textAppBar: string,
|
|
93
93
|
textAppBarSelected: string,
|
|
94
|
+
tagBackgroundSuccess: string,
|
|
95
|
+
tagBackgroundWarning: string,
|
|
96
|
+
tagBackgroundError: string,
|
|
97
|
+
tagBackgroundPromo: string,
|
|
98
|
+
tagBackgroundActive: string,
|
|
99
|
+
tagBackgroundInactive: string,
|
|
100
|
+
textTagSuccess: string,
|
|
101
|
+
textTagWarning: string,
|
|
102
|
+
textTagError: string,
|
|
103
|
+
textTagPromo: string,
|
|
104
|
+
textTagActive: string,
|
|
105
|
+
textTagInactive: string,
|
|
94
106
|
};
|
package/dist/skins/vivo.d.ts
CHANGED
|
@@ -8,16 +8,21 @@ export declare const palette: {
|
|
|
8
8
|
readonly vivoPurpleLight20: "#E0CCEB";
|
|
9
9
|
readonly vivoPurpleLight10: "#EFE5F4";
|
|
10
10
|
readonly vivoGreen: "#99CC33";
|
|
11
|
-
readonly vivoGreenDark: "#
|
|
12
|
-
readonly
|
|
11
|
+
readonly vivoGreenDark: "#225C3D";
|
|
12
|
+
readonly vivoGreenLight30: "#91AE9E";
|
|
13
|
+
readonly vivoGreenLight10: "#EDF8E8";
|
|
13
14
|
readonly vivoBlue: "#00ABDB";
|
|
14
15
|
readonly orange: "#FF9900";
|
|
15
|
-
readonly orangeDark: "#
|
|
16
|
-
readonly
|
|
16
|
+
readonly orangeDark: "#972A1D";
|
|
17
|
+
readonly orangeLight10: "#FFEFE1";
|
|
18
|
+
readonly orangeLight40: "#FFB84C";
|
|
17
19
|
readonly pink: "#EB3D7D";
|
|
18
20
|
readonly pepper: "#CC1F59";
|
|
19
21
|
readonly pepperDark: "#B71D63";
|
|
22
|
+
readonly pepperDark80: "#8F2052";
|
|
23
|
+
readonly pepperLight40: "#DB628B";
|
|
20
24
|
readonly pepperLight30: "#F7B1CB";
|
|
25
|
+
readonly pepperLight10: "#FCE4EF";
|
|
21
26
|
readonly grey1: "#F6F6F6";
|
|
22
27
|
readonly grey2: "#EEEEEE";
|
|
23
28
|
readonly grey3: "#DDDDDD";
|
package/dist/skins/vivo.js
CHANGED
|
@@ -14,16 +14,21 @@ var palette = {
|
|
|
14
14
|
vivoPurpleLight20: '#E0CCEB',
|
|
15
15
|
vivoPurpleLight10: '#EFE5F4',
|
|
16
16
|
vivoGreen: '#99CC33',
|
|
17
|
-
vivoGreenDark: '#
|
|
18
|
-
|
|
17
|
+
vivoGreenDark: '#225C3D',
|
|
18
|
+
vivoGreenLight30: '#91AE9E',
|
|
19
|
+
vivoGreenLight10: '#EDF8E8',
|
|
19
20
|
vivoBlue: '#00ABDB',
|
|
20
21
|
orange: '#FF9900',
|
|
21
|
-
orangeDark: '#
|
|
22
|
-
|
|
22
|
+
orangeDark: '#972A1D',
|
|
23
|
+
orangeLight10: '#FFEFE1',
|
|
24
|
+
orangeLight40: '#FFB84C',
|
|
23
25
|
pink: '#EB3D7D',
|
|
24
26
|
pepper: '#CC1F59',
|
|
25
27
|
pepperDark: '#B71D63',
|
|
28
|
+
pepperDark80: '#8F2052',
|
|
29
|
+
pepperLight40: '#DB628B',
|
|
26
30
|
pepperLight30: '#F7B1CB',
|
|
31
|
+
pepperLight10: '#FCE4EF',
|
|
27
32
|
grey1: '#F6F6F6',
|
|
28
33
|
grey2: '#EEEEEE',
|
|
29
34
|
grey3: '#DDDDDD',
|
|
@@ -127,7 +132,20 @@ var getVivoSkin = function getVivoSkin() {
|
|
|
127
132
|
textNavigationSearchBarHint: palette.vivoPurpleLight50,
|
|
128
133
|
textNavigationSearchBarText: palette.white,
|
|
129
134
|
textAppBar: palette.grey4,
|
|
130
|
-
textAppBarSelected: palette.vivoPurple
|
|
135
|
+
textAppBarSelected: palette.vivoPurple,
|
|
136
|
+
// TAGS
|
|
137
|
+
tagBackgroundSuccess: palette.vivoGreenLight10,
|
|
138
|
+
tagBackgroundWarning: palette.orangeLight10,
|
|
139
|
+
tagBackgroundError: palette.pepperLight10,
|
|
140
|
+
tagBackgroundPromo: palette.vivoPurpleLight10,
|
|
141
|
+
tagBackgroundActive: palette.vivoPurpleLight10,
|
|
142
|
+
tagBackgroundInactive: palette.grey1,
|
|
143
|
+
textTagSuccess: palette.vivoGreenDark,
|
|
144
|
+
textTagWarning: palette.orangeDark,
|
|
145
|
+
textTagError: palette.pepperDark80,
|
|
146
|
+
textTagPromo: palette.vivoPurple,
|
|
147
|
+
textTagActive: palette.vivoPurple,
|
|
148
|
+
textTagInactive: palette.grey5
|
|
131
149
|
},
|
|
132
150
|
darkModeColors: {
|
|
133
151
|
appBarBackground: palette.darkModeGrey,
|
|
@@ -195,7 +213,20 @@ var getVivoSkin = function getVivoSkin() {
|
|
|
195
213
|
textNavigationSearchBarHint: palette.grey4,
|
|
196
214
|
textNavigationSearchBarText: palette.grey2,
|
|
197
215
|
textAppBar: palette.grey5,
|
|
198
|
-
textAppBarSelected: palette.grey2
|
|
216
|
+
textAppBarSelected: palette.grey2,
|
|
217
|
+
// TAGS
|
|
218
|
+
tagBackgroundSuccess: (0, _color).applyAlpha(palette.white, 0.05),
|
|
219
|
+
tagBackgroundWarning: (0, _color).applyAlpha(palette.white, 0.05),
|
|
220
|
+
tagBackgroundError: (0, _color).applyAlpha(palette.white, 0.05),
|
|
221
|
+
tagBackgroundPromo: (0, _color).applyAlpha(palette.white, 0.05),
|
|
222
|
+
tagBackgroundActive: (0, _color).applyAlpha(palette.white, 0.05),
|
|
223
|
+
tagBackgroundInactive: (0, _color).applyAlpha(palette.white, 0.05),
|
|
224
|
+
textTagSuccess: palette.vivoGreenLight30,
|
|
225
|
+
textTagWarning: palette.orangeLight40,
|
|
226
|
+
textTagError: palette.pepperLight40,
|
|
227
|
+
textTagPromo: palette.vivoPurpleLight50,
|
|
228
|
+
textTagActive: palette.vivoPurpleLight50,
|
|
229
|
+
textTagInactive: palette.grey4
|
|
199
230
|
}
|
|
200
231
|
};
|
|
201
232
|
};
|
package/dist/skins/vivo.js.flow
CHANGED
|
@@ -10,16 +10,21 @@ declare export var palette: {
|
|
|
10
10
|
+vivoPurpleLight20: "#E0CCEB",
|
|
11
11
|
+vivoPurpleLight10: "#EFE5F4",
|
|
12
12
|
+vivoGreen: "#99CC33",
|
|
13
|
-
+vivoGreenDark: "#
|
|
14
|
-
+
|
|
13
|
+
+vivoGreenDark: "#225C3D",
|
|
14
|
+
+vivoGreenLight30: "#91AE9E",
|
|
15
|
+
+vivoGreenLight10: "#EDF8E8",
|
|
15
16
|
+vivoBlue: "#00ABDB",
|
|
16
17
|
+orange: "#FF9900",
|
|
17
|
-
+orangeDark: "#
|
|
18
|
-
+
|
|
18
|
+
+orangeDark: "#972A1D",
|
|
19
|
+
+orangeLight10: "#FFEFE1",
|
|
20
|
+
+orangeLight40: "#FFB84C",
|
|
19
21
|
+pink: "#EB3D7D",
|
|
20
22
|
+pepper: "#CC1F59",
|
|
21
23
|
+pepperDark: "#B71D63",
|
|
24
|
+
+pepperDark80: "#8F2052",
|
|
25
|
+
+pepperLight40: "#DB628B",
|
|
22
26
|
+pepperLight30: "#F7B1CB",
|
|
27
|
+
+pepperLight10: "#FCE4EF",
|
|
23
28
|
+grey1: "#F6F6F6",
|
|
24
29
|
+grey2: "#EEEEEE",
|
|
25
30
|
+grey3: "#DDDDDD",
|
package/dist/tag.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { IconProps } from './utils/types';
|
|
3
|
+
export declare type TagType = 'promo' | 'active' | 'inactive' | 'success' | 'warning' | 'error';
|
|
2
4
|
export declare type TagProps = {
|
|
5
|
+
type?: 'promo' | 'active' | 'inactive' | 'success' | 'warning' | 'error';
|
|
3
6
|
children: string;
|
|
4
|
-
|
|
7
|
+
Icon?: React.FC<IconProps>;
|
|
8
|
+
/** @deprecated use type prop */
|
|
9
|
+
color?: string;
|
|
5
10
|
};
|
|
6
11
|
declare const Tag: React.FC<TagProps>;
|
|
7
12
|
export default Tag;
|
package/dist/tag.js
CHANGED
|
@@ -4,48 +4,157 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
exports.default = void 0;
|
|
6
6
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
var _box = _interopRequireDefault(require("./box"));
|
|
7
8
|
var _hooks = require("./hooks");
|
|
8
9
|
var _jss = require("./jss");
|
|
9
10
|
var _text = require("./text");
|
|
10
11
|
var _themeVariantContext = require("./theme-variant-context");
|
|
12
|
+
var _css = require("./utils/css");
|
|
13
|
+
function _interopRequireDefault(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function _arrayWithHoles(arr) {
|
|
19
|
+
if (Array.isArray(arr)) return arr;
|
|
20
|
+
}
|
|
21
|
+
function _iterableToArrayLimit(arr, i) {
|
|
22
|
+
var _arr = [];
|
|
23
|
+
var _n = true;
|
|
24
|
+
var _d = false;
|
|
25
|
+
var _e = undefined;
|
|
26
|
+
try {
|
|
27
|
+
for(var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true){
|
|
28
|
+
_arr.push(_s.value);
|
|
29
|
+
if (i && _arr.length === i) break;
|
|
30
|
+
}
|
|
31
|
+
} catch (err) {
|
|
32
|
+
_d = true;
|
|
33
|
+
_e = err;
|
|
34
|
+
} finally{
|
|
35
|
+
try {
|
|
36
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
37
|
+
} finally{
|
|
38
|
+
if (_d) throw _e;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return _arr;
|
|
42
|
+
}
|
|
43
|
+
function _nonIterableRest() {
|
|
44
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
45
|
+
}
|
|
46
|
+
function _slicedToArray(arr, i) {
|
|
47
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
48
|
+
}
|
|
11
49
|
var useStyles = (0, _jss).createUseStyles(function() {
|
|
12
50
|
return {
|
|
13
51
|
tag: {
|
|
14
|
-
backgroundColor: function backgroundColor(param) {
|
|
15
|
-
var color = param.color;
|
|
16
|
-
return color;
|
|
17
|
-
},
|
|
18
|
-
padding: '2px 8px',
|
|
19
|
-
borderRadius: 2,
|
|
20
|
-
minWidth: 48,
|
|
21
52
|
display: 'inline-flex',
|
|
53
|
+
flexDirection: 'row',
|
|
22
54
|
alignItems: 'center',
|
|
23
|
-
|
|
55
|
+
borderRadius: 50,
|
|
56
|
+
justifyContent: 'center',
|
|
57
|
+
minWidth: 56,
|
|
58
|
+
padding: function padding(param) {
|
|
59
|
+
var hasIcon = param.hasIcon;
|
|
60
|
+
return "4px 12px 4px ".concat(hasIcon ? 8 : 12, "px");
|
|
61
|
+
},
|
|
62
|
+
// FIXME: remove this style and use an inline style for the icon once WEB-338 gets merged
|
|
63
|
+
'& svg': {
|
|
64
|
+
display: 'block'
|
|
65
|
+
}
|
|
24
66
|
}
|
|
25
67
|
};
|
|
26
68
|
});
|
|
27
69
|
var Tag = function Tag(param) {
|
|
28
|
-
var children = param.children, color = param.color;
|
|
70
|
+
var Icon = param.Icon, children = param.children, _type = param.type, type = _type === void 0 ? 'promo' : _type, color = param.color;
|
|
29
71
|
var classes = useStyles({
|
|
30
|
-
|
|
72
|
+
hasIcon: !!Icon
|
|
31
73
|
});
|
|
32
74
|
var ref = (0, _hooks).useTheme(), colors = ref.colors, isDarkMode = ref.isDarkMode;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
75
|
+
var isInverse = (0, _themeVariantContext).useIsInverseVariant();
|
|
76
|
+
if (!children) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Legacy implementation
|
|
81
|
+
*
|
|
82
|
+
* @deprecated to be removed in the next major version
|
|
83
|
+
*/ if (color) {
|
|
84
|
+
// Hardcode black text in darkmode because there isn't a black text color constant that we can use in dark mode
|
|
85
|
+
var blackText = isDarkMode ? '#313235' : colors.textPrimary;
|
|
86
|
+
var textColor = color === colors.inverse ? blackText : colors.textPrimaryInverse;
|
|
87
|
+
return(/*#__PURE__*/ (0, _jsxRuntime).jsx(_themeVariantContext.ThemeVariant, {
|
|
39
88
|
isInverse: false,
|
|
40
|
-
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
89
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx("span", {
|
|
90
|
+
className: classes.tag,
|
|
91
|
+
style: {
|
|
92
|
+
background: color
|
|
93
|
+
},
|
|
94
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text, {
|
|
95
|
+
color: textColor,
|
|
96
|
+
size: 14,
|
|
97
|
+
lineHeight: 20,
|
|
98
|
+
weight: "medium",
|
|
99
|
+
truncate: true,
|
|
100
|
+
children: children
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
var tagTypeToColors = {
|
|
106
|
+
promo: [
|
|
107
|
+
colors.textTagPromo,
|
|
108
|
+
colors.tagBackgroundPromo
|
|
109
|
+
],
|
|
110
|
+
active: [
|
|
111
|
+
colors.textTagActive,
|
|
112
|
+
colors.tagBackgroundActive
|
|
113
|
+
],
|
|
114
|
+
inactive: [
|
|
115
|
+
colors.textTagInactive,
|
|
116
|
+
colors.tagBackgroundInactive
|
|
117
|
+
],
|
|
118
|
+
success: [
|
|
119
|
+
colors.textTagSuccess,
|
|
120
|
+
colors.tagBackgroundSuccess
|
|
121
|
+
],
|
|
122
|
+
warning: [
|
|
123
|
+
colors.textTagWarning,
|
|
124
|
+
colors.tagBackgroundWarning
|
|
125
|
+
],
|
|
126
|
+
error: [
|
|
127
|
+
colors.textTagError,
|
|
128
|
+
colors.tagBackgroundError
|
|
129
|
+
]
|
|
130
|
+
};
|
|
131
|
+
var _type1 = _slicedToArray(tagTypeToColors[type], 2), textColor = _type1[0], backgroundColor = _type1[1];
|
|
132
|
+
var shouldUseInverseBackground = isInverse && !isDarkMode;
|
|
133
|
+
return(/*#__PURE__*/ (0, _jsxRuntime).jsxs("span", {
|
|
134
|
+
className: classes.tag,
|
|
135
|
+
style: {
|
|
136
|
+
background: shouldUseInverseBackground ? colors.inverse : backgroundColor
|
|
137
|
+
},
|
|
138
|
+
children: [
|
|
139
|
+
Icon && /*#__PURE__*/ (0, _jsxRuntime).jsx(_box.default, {
|
|
140
|
+
paddingRight: 4,
|
|
141
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(Icon, {
|
|
142
|
+
color: textColor,
|
|
143
|
+
size: (0, _css).pxToRem(16)
|
|
144
|
+
})
|
|
145
|
+
}),
|
|
146
|
+
/*#__PURE__*/ (0, _jsxRuntime).jsx(_themeVariantContext.ThemeVariant, {
|
|
147
|
+
isInverse: false,
|
|
148
|
+
children: /*#__PURE__*/ (0, _jsxRuntime).jsx(_text.Text, {
|
|
149
|
+
color: textColor,
|
|
150
|
+
size: 14,
|
|
151
|
+
lineHeight: 20,
|
|
152
|
+
weight: "medium",
|
|
153
|
+
truncate: true,
|
|
154
|
+
children: children
|
|
155
|
+
})
|
|
47
156
|
})
|
|
48
|
-
|
|
157
|
+
]
|
|
49
158
|
}));
|
|
50
159
|
};
|
|
51
160
|
var _default = Tag;
|
package/dist/tag.js.flow
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import type { IconProps } from "./utils/types";
|
|
5
|
+
export type TagType =
|
|
6
|
+
| "promo"
|
|
7
|
+
| "active"
|
|
8
|
+
| "inactive"
|
|
9
|
+
| "success"
|
|
10
|
+
| "warning"
|
|
11
|
+
| "error";
|
|
4
12
|
export type TagProps = {
|
|
13
|
+
type?: "promo" | "active" | "inactive" | "success" | "warning" | "error",
|
|
5
14
|
children: string,
|
|
6
|
-
|
|
15
|
+
Icon?: React.ComponentType<IconProps>,
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated use type prop
|
|
19
|
+
*/
|
|
20
|
+
color?: string,
|
|
7
21
|
};
|
|
8
22
|
declare var Tag: React.ComponentType<TagProps>;
|
|
9
23
|
declare export default typeof Tag;
|