@sproutsocial/racine 7.5.0 → 8.0.0-beta-dark-mode.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 +6 -0
- package/__flow__/Badge/styles.js +1 -1
- package/__flow__/Banner/index.js +2 -1
- package/__flow__/Banner/styles.js +9 -6
- package/__flow__/Box/index.stories.js +3 -3
- package/__flow__/Box/styles.js +4 -4
- package/__flow__/Button/__snapshots__/index.test.js.snap +4 -4
- package/__flow__/Button/index.js +7 -2
- package/__flow__/Button/index.stories.js +6 -1
- package/__flow__/Button/styles.js +17 -12
- package/__flow__/Card/index.js +2 -2
- package/__flow__/CharacterCounter/styles.js +1 -1
- package/__flow__/Checkbox/styles.js +18 -16
- package/__flow__/Collapsible/index.stories.js +11 -5
- package/__flow__/DatePicker/styles.js +14 -12
- package/__flow__/Drawer/styles.js +1 -1
- package/__flow__/FormField/index.js +1 -1
- package/__flow__/Icon/index.stories.js +24 -6
- package/__flow__/Input/styles.js +6 -6
- package/__flow__/KeyboardKey/styles.js +2 -2
- package/__flow__/Link/styles.js +3 -5
- package/__flow__/Listbox/__snapshots__/index.test.js.snap +8 -2
- package/__flow__/Listbox/index.js +4 -4
- package/__flow__/Menu/__snapshots__/index.test.js.snap +5 -2
- package/__flow__/Menu/index.js +7 -2
- package/__flow__/Menu/styles.js +6 -3
- package/__flow__/Message/index.js +2 -2
- package/__flow__/Message/index.stories.js +1 -1
- package/__flow__/Modal/index.js +1 -1
- package/__flow__/Modal/index.stories.js +14 -8
- package/__flow__/Modal/styles.js +2 -2
- package/__flow__/Numeral/styles.js +2 -1
- package/__flow__/OverflowList/index.stories.js +15 -8
- package/__flow__/Popout/index.js +3 -3
- package/__flow__/Radio/styles.js +8 -8
- package/__flow__/SegmentedControl/styles.js +9 -5
- package/__flow__/Select/styles.js +5 -5
- package/__flow__/Skeleton/index.js +4 -4
- package/__flow__/Skeleton/index.stories.js +1 -1
- package/__flow__/Stack/index.stories.js +3 -1
- package/__flow__/Switch/styles.js +13 -11
- package/__flow__/Table/styles.js +2 -1
- package/__flow__/TableCell/index.stories.js +2 -0
- package/__flow__/TableHeaderCell/index.stories.js +3 -0
- package/__flow__/TableRowAccordion/styles.js +2 -1
- package/__flow__/Tabs/styles.js +5 -5
- package/__flow__/Textarea/styles.js +5 -5
- package/__flow__/ThemeProvider/index.js +2 -2
- package/__flow__/Toast/index.js +1 -1
- package/__flow__/Toast/styles.js +3 -3
- package/__flow__/Token/styles.js +19 -8
- package/__flow__/TokenInput/index.js +2 -1
- package/__flow__/TokenInput/styles.js +14 -6
- package/__flow__/Tooltip/index.js +2 -2
- package/__flow__/index.js +2 -2
- package/__flow__/themes/dark/decorative-palettes.js +43 -0
- package/__flow__/themes/dark/theme.js +195 -0
- package/__flow__/themes/default/decorative-palettes.js +43 -0
- package/__flow__/themes/default/literal-colors.js +160 -0
- package/__flow__/themes/default/theme.js +334 -0
- package/__flow__/types/system-props.flow.js +2 -2
- package/__flow__/types/theme.colors.flow.js +244 -0
- package/__flow__/types/theme.flow.js +38 -213
- package/__flow__/utils/mixins.js +4 -3
- package/__flow__/utils/responsiveProps/index.js +1 -1
- package/commonjs/Badge/styles.js +1 -1
- package/commonjs/Banner/index.js +3 -2
- package/commonjs/Banner/styles.js +1 -1
- package/commonjs/Button/index.js +5 -3
- package/commonjs/Button/styles.js +12 -11
- package/commonjs/Card/index.js +2 -2
- package/commonjs/CharacterCounter/styles.js +1 -1
- package/commonjs/Checkbox/styles.js +7 -7
- package/commonjs/DatePicker/styles.js +13 -11
- package/commonjs/Drawer/styles.js +1 -1
- package/commonjs/FormField/index.js +1 -1
- package/commonjs/Input/styles.js +6 -6
- package/commonjs/KeyboardKey/styles.js +2 -2
- package/commonjs/Link/styles.js +4 -8
- package/commonjs/Listbox/index.js +4 -4
- package/commonjs/Menu/index.js +2 -2
- package/commonjs/Menu/styles.js +10 -4
- package/commonjs/Message/index.js +2 -2
- package/commonjs/Modal/index.js +1 -1
- package/commonjs/Modal/styles.js +2 -2
- package/commonjs/Numeral/styles.js +1 -1
- package/commonjs/Popout/index.js +2 -2
- package/commonjs/Radio/styles.js +4 -4
- package/commonjs/SegmentedControl/styles.js +5 -5
- package/commonjs/Select/styles.js +5 -5
- package/commonjs/Skeleton/index.js +2 -2
- package/commonjs/Switch/styles.js +7 -7
- package/commonjs/Table/styles.js +1 -1
- package/commonjs/TableRowAccordion/styles.js +1 -1
- package/commonjs/Tabs/styles.js +5 -5
- package/commonjs/Textarea/styles.js +5 -5
- package/commonjs/ThemeProvider/index.js +1 -1
- package/commonjs/Toast/index.js +1 -1
- package/commonjs/Toast/styles.js +3 -3
- package/commonjs/Token/styles.js +18 -10
- package/commonjs/TokenInput/index.js +38 -35
- package/commonjs/TokenInput/styles.js +9 -7
- package/commonjs/Tooltip/index.js +2 -2
- package/commonjs/index.js +3 -3
- package/commonjs/themes/dark/decorative-palettes.js +51 -0
- package/commonjs/themes/dark/theme.js +195 -0
- package/commonjs/themes/default/decorative-palettes.js +51 -0
- package/commonjs/themes/default/literal-colors.js +165 -0
- package/commonjs/themes/default/theme.js +333 -0
- package/commonjs/types/theme.colors.flow.js +5 -0
- package/commonjs/types/theme.flow.js +1 -5
- package/commonjs/utils/mixins.js +2 -2
- package/commonjs/utils/responsiveProps/index.js +1 -1
- package/lib/Badge/styles.js +1 -1
- package/lib/Banner/index.js +3 -2
- package/lib/Banner/styles.js +1 -1
- package/lib/Button/index.js +5 -3
- package/lib/Button/styles.js +11 -11
- package/lib/Card/index.js +2 -2
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/Checkbox/styles.js +7 -7
- package/lib/DatePicker/styles.js +12 -11
- package/lib/Drawer/styles.js +1 -1
- package/lib/FormField/index.js +1 -1
- package/lib/Input/styles.js +6 -6
- package/lib/KeyboardKey/styles.js +2 -2
- package/lib/Link/styles.js +4 -8
- package/lib/Listbox/index.js +4 -4
- package/lib/Menu/index.js +2 -2
- package/lib/Menu/styles.js +10 -4
- package/lib/Message/index.js +2 -2
- package/lib/Modal/index.js +1 -1
- package/lib/Modal/styles.js +2 -2
- package/lib/Numeral/styles.js +1 -1
- package/lib/Popout/index.js +2 -2
- package/lib/Radio/styles.js +4 -4
- package/lib/SegmentedControl/styles.js +5 -5
- package/lib/Select/styles.js +5 -5
- package/lib/Skeleton/index.js +2 -2
- package/lib/Switch/styles.js +7 -7
- package/lib/Table/styles.js +1 -1
- package/lib/TableRowAccordion/styles.js +1 -1
- package/lib/Tabs/styles.js +5 -5
- package/lib/Textarea/styles.js +5 -5
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/Toast/index.js +1 -1
- package/lib/Toast/styles.js +3 -3
- package/lib/Token/styles.js +18 -10
- package/lib/TokenInput/index.js +38 -35
- package/lib/TokenInput/styles.js +9 -7
- package/lib/Tooltip/index.js +2 -2
- package/lib/index.js +2 -2
- package/lib/themes/dark/decorative-palettes.js +36 -0
- package/lib/themes/dark/theme.js +185 -0
- package/lib/themes/default/decorative-palettes.js +36 -0
- package/lib/themes/default/literal-colors.js +156 -0
- package/lib/themes/default/theme.js +305 -0
- package/lib/types/theme.colors.flow.js +1 -0
- package/lib/types/theme.flow.js +1 -1
- package/lib/utils/mixins.js +2 -2
- package/lib/utils/responsiveProps/index.js +1 -1
- package/package.json +1 -1
- package/__flow__/themes/dark.js +0 -133
- package/__flow__/themes/light.js +0 -7
- package/__flow__/utils/theme.js +0 -422
- package/commonjs/themes/dark.js +0 -140
- package/commonjs/themes/light.js +0 -14
- package/commonjs/utils/theme.js +0 -421
- package/lib/themes/dark.js +0 -131
- package/lib/themes/light.js +0 -5
- package/lib/utils/theme.js +0 -402
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
|
|
3
|
+
import literalColors from "../themes/default/literal-colors";
|
|
4
|
+
|
|
5
|
+
type TypeAppColors = {|
|
|
6
|
+
app: {
|
|
7
|
+
background: {
|
|
8
|
+
base: string,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
|};
|
|
12
|
+
|
|
13
|
+
type TypeContainerColors = {|
|
|
14
|
+
container: {
|
|
15
|
+
background: {
|
|
16
|
+
base: string,
|
|
17
|
+
success: string,
|
|
18
|
+
warning: string,
|
|
19
|
+
error: string,
|
|
20
|
+
info: string,
|
|
21
|
+
opportunity: string,
|
|
22
|
+
danger: string,
|
|
23
|
+
decorative: {
|
|
24
|
+
green: string,
|
|
25
|
+
blue: string,
|
|
26
|
+
purple: string,
|
|
27
|
+
yellow: string,
|
|
28
|
+
orange: string,
|
|
29
|
+
red: string,
|
|
30
|
+
neutral: string,
|
|
31
|
+
},
|
|
32
|
+
selected: string,
|
|
33
|
+
},
|
|
34
|
+
border: {
|
|
35
|
+
base: string,
|
|
36
|
+
success: string,
|
|
37
|
+
warning: string,
|
|
38
|
+
error: string,
|
|
39
|
+
danger: string,
|
|
40
|
+
info: string,
|
|
41
|
+
opportunity: string,
|
|
42
|
+
decorative: {
|
|
43
|
+
green: string,
|
|
44
|
+
blue: string,
|
|
45
|
+
purple: string,
|
|
46
|
+
yellow: string,
|
|
47
|
+
orange: string,
|
|
48
|
+
red: string,
|
|
49
|
+
neutral: string,
|
|
50
|
+
},
|
|
51
|
+
selected: string,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
|};
|
|
55
|
+
|
|
56
|
+
type TypeButtonColors = {|
|
|
57
|
+
button: {
|
|
58
|
+
primary: {
|
|
59
|
+
background: {
|
|
60
|
+
base: string,
|
|
61
|
+
hover: string,
|
|
62
|
+
active: string,
|
|
63
|
+
},
|
|
64
|
+
border: {
|
|
65
|
+
base: string,
|
|
66
|
+
},
|
|
67
|
+
text: {
|
|
68
|
+
base: string,
|
|
69
|
+
hover: string,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
secondary: {
|
|
73
|
+
background: {
|
|
74
|
+
base: string,
|
|
75
|
+
hover: string,
|
|
76
|
+
active: string,
|
|
77
|
+
},
|
|
78
|
+
border: {
|
|
79
|
+
base: string,
|
|
80
|
+
},
|
|
81
|
+
text: {
|
|
82
|
+
base: string,
|
|
83
|
+
hover: string,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
pill: {
|
|
87
|
+
background: {
|
|
88
|
+
base: string,
|
|
89
|
+
hover: string,
|
|
90
|
+
active: string,
|
|
91
|
+
},
|
|
92
|
+
border: {
|
|
93
|
+
base: string,
|
|
94
|
+
},
|
|
95
|
+
text: {
|
|
96
|
+
base: string,
|
|
97
|
+
hover: string,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
destructive: {
|
|
101
|
+
background: {
|
|
102
|
+
base: string,
|
|
103
|
+
hover: string,
|
|
104
|
+
active: string,
|
|
105
|
+
},
|
|
106
|
+
border: {
|
|
107
|
+
base: string,
|
|
108
|
+
},
|
|
109
|
+
text: {
|
|
110
|
+
base: string,
|
|
111
|
+
hover: string,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
placeholder: {
|
|
115
|
+
background: {
|
|
116
|
+
base: string,
|
|
117
|
+
hover: string,
|
|
118
|
+
active: string,
|
|
119
|
+
},
|
|
120
|
+
border: {
|
|
121
|
+
base: string,
|
|
122
|
+
},
|
|
123
|
+
text: {
|
|
124
|
+
base: string,
|
|
125
|
+
hover: string,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
unstyled: {
|
|
129
|
+
background: {
|
|
130
|
+
base: string,
|
|
131
|
+
},
|
|
132
|
+
border: {
|
|
133
|
+
base: string,
|
|
134
|
+
},
|
|
135
|
+
text: {
|
|
136
|
+
base: string,
|
|
137
|
+
hover: string,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
|};
|
|
142
|
+
|
|
143
|
+
type TypeLinkColors = {|
|
|
144
|
+
link: {
|
|
145
|
+
base: string,
|
|
146
|
+
hover: string,
|
|
147
|
+
},
|
|
148
|
+
|};
|
|
149
|
+
|
|
150
|
+
type TypeTextColors = {|
|
|
151
|
+
text: {
|
|
152
|
+
headline: string,
|
|
153
|
+
subtext: string,
|
|
154
|
+
body: string,
|
|
155
|
+
inverse: string,
|
|
156
|
+
error: string,
|
|
157
|
+
},
|
|
158
|
+
|};
|
|
159
|
+
|
|
160
|
+
type TypeIconColors = {|
|
|
161
|
+
icon: {
|
|
162
|
+
base: string,
|
|
163
|
+
inverse: string,
|
|
164
|
+
success: string,
|
|
165
|
+
warning: string,
|
|
166
|
+
error: string,
|
|
167
|
+
danger: string,
|
|
168
|
+
info: string,
|
|
169
|
+
opportunity: string,
|
|
170
|
+
},
|
|
171
|
+
|};
|
|
172
|
+
|
|
173
|
+
type TypeFormColors = {|
|
|
174
|
+
form: {
|
|
175
|
+
background: {
|
|
176
|
+
base: string,
|
|
177
|
+
selected: string,
|
|
178
|
+
},
|
|
179
|
+
border: {
|
|
180
|
+
base: string,
|
|
181
|
+
error: string,
|
|
182
|
+
warning: string,
|
|
183
|
+
selected: string,
|
|
184
|
+
},
|
|
185
|
+
placeholder: {
|
|
186
|
+
base: string,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
|};
|
|
190
|
+
|
|
191
|
+
type TypeListItemColors = {|
|
|
192
|
+
listItem: {
|
|
193
|
+
background: {
|
|
194
|
+
base: string,
|
|
195
|
+
hover: string,
|
|
196
|
+
selected: string,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
|};
|
|
200
|
+
|
|
201
|
+
type TypeNetworkColors = {|
|
|
202
|
+
network: {
|
|
203
|
+
twitter: string,
|
|
204
|
+
twitter_like: string,
|
|
205
|
+
facebook: string,
|
|
206
|
+
facebook_audience_network: string,
|
|
207
|
+
linkedin: string,
|
|
208
|
+
instagram: string,
|
|
209
|
+
feedly: string,
|
|
210
|
+
analytics: string,
|
|
211
|
+
youtube: string,
|
|
212
|
+
messenger: string,
|
|
213
|
+
snapchat: string,
|
|
214
|
+
pinterest: string,
|
|
215
|
+
tumblr: string,
|
|
216
|
+
reddit: string,
|
|
217
|
+
tripadvisor: string,
|
|
218
|
+
glassdoor: string,
|
|
219
|
+
google_my_business: string,
|
|
220
|
+
google_business_messages: string,
|
|
221
|
+
salesforce: string,
|
|
222
|
+
zendesk: string,
|
|
223
|
+
hubspot: string,
|
|
224
|
+
microsoft_dynamics: string,
|
|
225
|
+
yelp: string,
|
|
226
|
+
whatsapp: string,
|
|
227
|
+
},
|
|
228
|
+
|};
|
|
229
|
+
|
|
230
|
+
type TypeLiteralColors = typeof literalColors;
|
|
231
|
+
|
|
232
|
+
export type TypeColors = {
|
|
233
|
+
...TypeAppColors,
|
|
234
|
+
...TypeContainerColors,
|
|
235
|
+
...TypeButtonColors,
|
|
236
|
+
...TypeLinkColors,
|
|
237
|
+
...TypeLinkColors,
|
|
238
|
+
...TypeTextColors,
|
|
239
|
+
...TypeIconColors,
|
|
240
|
+
...TypeFormColors,
|
|
241
|
+
...TypeListItemColors,
|
|
242
|
+
...TypeNetworkColors,
|
|
243
|
+
...TypeLiteralColors,
|
|
244
|
+
};
|
|
@@ -1,218 +1,43 @@
|
|
|
1
1
|
// @flow strict-local
|
|
2
|
-
import
|
|
2
|
+
import {
|
|
3
3
|
breakpoints,
|
|
4
|
+
typography,
|
|
4
5
|
fontWeights,
|
|
6
|
+
space,
|
|
7
|
+
radii,
|
|
8
|
+
borders,
|
|
9
|
+
borderWidths,
|
|
10
|
+
shadows,
|
|
5
11
|
easing,
|
|
6
12
|
duration,
|
|
7
|
-
} from "../
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
export type
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
| "green.400"
|
|
39
|
-
| "green.500"
|
|
40
|
-
| "green.600"
|
|
41
|
-
| "green.700"
|
|
42
|
-
| "green.800"
|
|
43
|
-
| "green.900"
|
|
44
|
-
| "green.1000"
|
|
45
|
-
| "green.1100"
|
|
46
|
-
| "red.0"
|
|
47
|
-
| "red.100"
|
|
48
|
-
| "red.200"
|
|
49
|
-
| "red.300"
|
|
50
|
-
| "red.400"
|
|
51
|
-
| "red.500"
|
|
52
|
-
| "red.600"
|
|
53
|
-
| "red.700"
|
|
54
|
-
| "red.800"
|
|
55
|
-
| "red.900"
|
|
56
|
-
| "red.1000"
|
|
57
|
-
| "blue.0"
|
|
58
|
-
| "blue.100"
|
|
59
|
-
| "blue.200"
|
|
60
|
-
| "blue.300"
|
|
61
|
-
| "blue.400"
|
|
62
|
-
| "blue.500"
|
|
63
|
-
| "blue.600"
|
|
64
|
-
| "blue.700"
|
|
65
|
-
| "blue.800"
|
|
66
|
-
| "blue.900"
|
|
67
|
-
| "blue.1000"
|
|
68
|
-
| "blue.1100"
|
|
69
|
-
| "teal.0"
|
|
70
|
-
| "teal.100"
|
|
71
|
-
| "teal.200"
|
|
72
|
-
| "teal.300"
|
|
73
|
-
| "teal.400"
|
|
74
|
-
| "teal.500"
|
|
75
|
-
| "teal.600"
|
|
76
|
-
| "teal.700"
|
|
77
|
-
| "teal.800"
|
|
78
|
-
| "teal.900"
|
|
79
|
-
| "teal.1000"
|
|
80
|
-
| "teal.1100"
|
|
81
|
-
| "aqua.0"
|
|
82
|
-
| "aqua.100"
|
|
83
|
-
| "aqua.200"
|
|
84
|
-
| "aqua.300"
|
|
85
|
-
| "aqua.400"
|
|
86
|
-
| "aqua.500"
|
|
87
|
-
| "aqua.600"
|
|
88
|
-
| "aqua.700"
|
|
89
|
-
| "aqua.800"
|
|
90
|
-
| "aqua.900"
|
|
91
|
-
| "aqua.1000"
|
|
92
|
-
| "aqua.1100"
|
|
93
|
-
| "purple.0"
|
|
94
|
-
| "purple.100"
|
|
95
|
-
| "purple.200"
|
|
96
|
-
| "purple.300"
|
|
97
|
-
| "purple.400"
|
|
98
|
-
| "purple.500"
|
|
99
|
-
| "purple.600"
|
|
100
|
-
| "purple.700"
|
|
101
|
-
| "purple.800"
|
|
102
|
-
| "purple.900"
|
|
103
|
-
| "purple.1000"
|
|
104
|
-
| "purple.1100"
|
|
105
|
-
| "yellow.0"
|
|
106
|
-
| "yellow.100"
|
|
107
|
-
| "yellow.200"
|
|
108
|
-
| "yellow.300"
|
|
109
|
-
| "yellow.400"
|
|
110
|
-
| "yellow.500"
|
|
111
|
-
| "yellow.600"
|
|
112
|
-
| "yellow.700"
|
|
113
|
-
| "yellow.800"
|
|
114
|
-
| "yellow.900"
|
|
115
|
-
| "yellow.1000"
|
|
116
|
-
| "yellow.1100"
|
|
117
|
-
| "pink.0"
|
|
118
|
-
| "pink.100"
|
|
119
|
-
| "pink.200"
|
|
120
|
-
| "pink.300"
|
|
121
|
-
| "pink.400"
|
|
122
|
-
| "pink.500"
|
|
123
|
-
| "pink.600"
|
|
124
|
-
| "pink.700"
|
|
125
|
-
| "pink.800"
|
|
126
|
-
| "pink.900"
|
|
127
|
-
| "pink.1000"
|
|
128
|
-
| "pink.1100"
|
|
129
|
-
| "orange.0"
|
|
130
|
-
| "orange.100"
|
|
131
|
-
| "orange.200"
|
|
132
|
-
| "orange.300"
|
|
133
|
-
| "orange.400"
|
|
134
|
-
| "orange.500"
|
|
135
|
-
| "orange.600"
|
|
136
|
-
| "orange.700"
|
|
137
|
-
| "orange.800"
|
|
138
|
-
| "orange.900"
|
|
139
|
-
| "orange.1000"
|
|
140
|
-
| "orange.1100"
|
|
141
|
-
| "pink.0"
|
|
142
|
-
| "pink.100"
|
|
143
|
-
| "pink.200"
|
|
144
|
-
| "pink.300"
|
|
145
|
-
| "pink.400"
|
|
146
|
-
| "pink.500"
|
|
147
|
-
| "pink.600"
|
|
148
|
-
| "pink.700"
|
|
149
|
-
| "pink.800"
|
|
150
|
-
| "pink.900"
|
|
151
|
-
| "pink.1000"
|
|
152
|
-
| "pink.1100"
|
|
153
|
-
| "network.twitter"
|
|
154
|
-
| "network.twitter_like"
|
|
155
|
-
| "network.facebook"
|
|
156
|
-
| "network.facebook_audience_network"
|
|
157
|
-
| "network.linkedin"
|
|
158
|
-
| "network.instagram"
|
|
159
|
-
| "network.feedly"
|
|
160
|
-
| "network.analytics"
|
|
161
|
-
| "network.youtube"
|
|
162
|
-
| "network.messenger"
|
|
163
|
-
| "network.snapchat"
|
|
164
|
-
| "network.pinterest"
|
|
165
|
-
| "network.tumblr"
|
|
166
|
-
| "network.reddit"
|
|
167
|
-
| "network.tripadvisor"
|
|
168
|
-
| "network.google_my_business";
|
|
169
|
-
|
|
170
|
-
export type TypeTypographySize =
|
|
171
|
-
| 100
|
|
172
|
-
| 200
|
|
173
|
-
| 300
|
|
174
|
-
| 400
|
|
175
|
-
| 500
|
|
176
|
-
| 600
|
|
177
|
-
| 700
|
|
178
|
-
| 800
|
|
179
|
-
| 900
|
|
180
|
-
| 1000
|
|
181
|
-
| 1100
|
|
182
|
-
| 1200;
|
|
183
|
-
|
|
184
|
-
export type TypeFontWeight = $Keys<typeof fontWeights>;
|
|
185
|
-
|
|
186
|
-
export type TypeSpace =
|
|
187
|
-
| 0
|
|
188
|
-
| 100
|
|
189
|
-
| 200
|
|
190
|
-
| 300
|
|
191
|
-
| 350
|
|
192
|
-
| 400
|
|
193
|
-
| 450
|
|
194
|
-
| 500
|
|
195
|
-
| 600
|
|
196
|
-
| -100
|
|
197
|
-
| -200
|
|
198
|
-
| -300
|
|
199
|
-
| -350
|
|
200
|
-
| -400
|
|
201
|
-
| -450
|
|
202
|
-
| -500
|
|
203
|
-
| -600
|
|
204
|
-
| string;
|
|
205
|
-
|
|
206
|
-
export type TypeRadii = 400 | 500 | 600 | 1000 | "inner" | "outer" | "pill";
|
|
207
|
-
|
|
208
|
-
export type TypeBorder = 500;
|
|
209
|
-
|
|
210
|
-
export type TypeBorderWidth = 500;
|
|
211
|
-
|
|
212
|
-
export type TypeShadow = 100 | 200 | 300 | 400;
|
|
213
|
-
|
|
214
|
-
export type TypeEasing = $Keys<typeof easing>;
|
|
215
|
-
|
|
216
|
-
export type TypeDuration = $Keys<typeof duration>;
|
|
217
|
-
|
|
218
|
-
export type TypeSize = "default" | "large";
|
|
13
|
+
} from "../themes/default/theme";
|
|
14
|
+
import type { TypeColors } from "./theme.colors.flow.js";
|
|
15
|
+
import type { TypeFontFamilyString } from "../themes/default/theme";
|
|
16
|
+
|
|
17
|
+
export type TypeBreakpoint = typeof breakpoints;
|
|
18
|
+
export type TypeTypography = typeof typography;
|
|
19
|
+
export type TypeFontWeight = typeof fontWeights;
|
|
20
|
+
export type TypeFontFamily = TypeFontFamilyString;
|
|
21
|
+
export type TypeSpace = $Keys<typeof space>;
|
|
22
|
+
export type TypeColor = TypeColors;
|
|
23
|
+
export type TypeRadii = typeof radii;
|
|
24
|
+
export type TypeBorder = typeof borders;
|
|
25
|
+
export type TypeBorderWidth = typeof borderWidths;
|
|
26
|
+
export type TypeShadow = typeof shadows;
|
|
27
|
+
export type TypeEasing = typeof easing;
|
|
28
|
+
export type TypeDuration = typeof duration;
|
|
29
|
+
|
|
30
|
+
export type TypeTheme = {
|
|
31
|
+
breakpoints: TypeBreakpoint,
|
|
32
|
+
colors: TypeColor,
|
|
33
|
+
typography: TypeTypography,
|
|
34
|
+
fontWeights: TypeFontWeight,
|
|
35
|
+
fontFamily: TypeFontFamily,
|
|
36
|
+
space: TypeSpace,
|
|
37
|
+
radii: TypeRadii,
|
|
38
|
+
borders: TypeBorder,
|
|
39
|
+
borderWidths: TypeBorderWidth,
|
|
40
|
+
shadows: TypeShadow,
|
|
41
|
+
easing: TypeEasing,
|
|
42
|
+
duration: TypeDuration,
|
|
43
|
+
};
|
package/__flow__/utils/mixins.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @flow strict-local
|
|
2
2
|
import { css } from "styled-components";
|
|
3
|
-
import theme from "
|
|
3
|
+
import theme from "../themes/default/theme";
|
|
4
4
|
import { transparentize } from "polished";
|
|
5
5
|
|
|
6
6
|
export const svgToDataURL = (svgStr: string) => {
|
|
@@ -26,8 +26,9 @@ export const visuallyHidden = css`
|
|
|
26
26
|
`;
|
|
27
27
|
|
|
28
28
|
export const focusRing = css`
|
|
29
|
-
box-shadow: 0 0 0 1px ${theme.colors.
|
|
30
|
-
0 0px 0px 4px
|
|
29
|
+
box-shadow: 0 0 0 1px ${theme.colors.button.primary.background.base},
|
|
30
|
+
0 0px 0px 4px
|
|
31
|
+
${transparentize(0.7, theme.colors.button.primary.background.base)};
|
|
31
32
|
outline: none;
|
|
32
33
|
|
|
33
34
|
&::-moz-focus-inner {
|
package/commonjs/Badge/styles.js
CHANGED
package/commonjs/Banner/index.js
CHANGED
|
@@ -83,8 +83,9 @@ var Banner = /*#__PURE__*/function (_React$Component) {
|
|
|
83
83
|
text = _this$props.text,
|
|
84
84
|
rest = _objectWithoutPropertiesLoose(_this$props, ["type", "text"]);
|
|
85
85
|
|
|
86
|
-
return /*#__PURE__*/React.createElement(_styles.default
|
|
87
|
-
|
|
86
|
+
return /*#__PURE__*/React.createElement(_styles.default // danger needs to be properly deprecated and removed DS-1094
|
|
87
|
+
, _extends({
|
|
88
|
+
type: type === "danger" ? "error" : type,
|
|
88
89
|
"data-qa-alert": "",
|
|
89
90
|
"data-qa-alert-type": type,
|
|
90
91
|
"data-qa-alert-text": text // $FlowIssue - upgrade v0.112.0
|
|
@@ -15,7 +15,7 @@ var Container = _styledComponents.default.div.withConfig({
|
|
|
15
15
|
displayName: "styles__Container",
|
|
16
16
|
componentId: "q43dr4-0"
|
|
17
17
|
})(function (props) {
|
|
18
|
-
return (0, _styledComponents.css)(["display:flex;overflow:hidden;align-items:center;justify-content:space-between;color:", ";border-radius:", ";font-family:", ";", " padding:", ";border:1px solid ", ";background-color:", ";.Icon{align-self:flex-start;margin-top:3px;margin-right:", ";min-width:16px;color:", ";}a,button{font-weight:", ";color:", ";font-size:inherit;text-decoration:underline;}> span:not(.Icon){display:block;}", " ", ""], props.theme.colors.text.
|
|
18
|
+
return (0, _styledComponents.css)(["display:flex;overflow:hidden;align-items:center;justify-content:space-between;color:", ";border-radius:", ";font-family:", ";", " padding:", ";border:1px solid ", ";background-color:", ";.Icon{align-self:flex-start;margin-top:3px;margin-right:", ";min-width:16px;color:", ";}a,button{font-weight:", ";color:", ";font-size:inherit;&:hover{color:", ";text-decoration:underline;}}> span:not(.Icon){display:block;}", " ", ""], props.theme.colors.text.body, props.theme.radii.outer, props.theme.fontFamily, props.theme.typography[200], props.theme.space[300], props.theme.colors.container.border[props.type], props.theme.colors.container.background[props.type], props.theme.space[400], props.theme.colors.icon[props.type], props.theme.fontWeights.semibold, props.theme.colors.text.body, props.theme.colors.text.body, _systemProps.COMMON, _systemProps.LAYOUT);
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
var _default = Container;
|
package/commonjs/Button/index.js
CHANGED
|
@@ -20,7 +20,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
20
20
|
var Button = function Button(_ref) {
|
|
21
21
|
var href = _ref.href,
|
|
22
22
|
_ref$appearance = _ref.appearance,
|
|
23
|
-
appearance = _ref$appearance === void 0 ? "
|
|
23
|
+
appearance = _ref$appearance === void 0 ? "unstyled" : _ref$appearance,
|
|
24
24
|
_ref$active = _ref.active,
|
|
25
25
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
26
26
|
disabled = _ref.disabled,
|
|
@@ -39,8 +39,10 @@ var Button = function Button(_ref) {
|
|
|
39
39
|
|
|
40
40
|
if (!href && external) {
|
|
41
41
|
console.warn("Warning: external prop cannot be set without a href declaration");
|
|
42
|
-
}
|
|
42
|
+
} // plans to properly deprecate captured in DS-1096
|
|
43
43
|
|
|
44
|
+
|
|
45
|
+
var appearanceCheck = appearance === "default" ? "unstyled" : appearance;
|
|
44
46
|
return /*#__PURE__*/React.createElement(_styles.default, _extends({
|
|
45
47
|
title: title,
|
|
46
48
|
active: active,
|
|
@@ -52,7 +54,7 @@ var Button = function Button(_ref) {
|
|
|
52
54
|
"aria-disabled": disabled ? disabled : undefined,
|
|
53
55
|
disabled: disabled,
|
|
54
56
|
buttonSize: size,
|
|
55
|
-
appearance:
|
|
57
|
+
appearance: appearanceCheck,
|
|
56
58
|
ref: innerRef,
|
|
57
59
|
onClick: onClick,
|
|
58
60
|
"data-qa-button": title || "",
|
|
@@ -23,15 +23,15 @@ var Container = _styledComponents.default.button.withConfig({
|
|
|
23
23
|
})(["display:inline-block;box-sizing:border-box;text-align:center;font-family:", ";border:1px solid ", ";border-radius:", ";border-style:", ";background:", ";color:", ";cursor:pointer;text-decoration:none;line-height:16px;white-space:nowrap;font-weight:", ";transition:all ", " linear;margin:0;padding:", ";font-size:", ";&:visited{color:", ";}&:hover{color:", ";background:", ";text-decoration:none;box-shadow:", ";}&:active{color:", ";background:", ";transform:translateY(1px);}&:focus{", "}&:focus:active{box-shadow:none;}", " ", " ", " ", "{vertical-align:text-bottom;}", " ", ""], function (props) {
|
|
24
24
|
return props.theme.fontFamily;
|
|
25
25
|
}, function (props) {
|
|
26
|
-
return props.theme.colors.
|
|
26
|
+
return props.theme.colors.button[props.appearance].border.base;
|
|
27
27
|
}, function (props) {
|
|
28
28
|
return props.theme.radii[500];
|
|
29
29
|
}, function (props) {
|
|
30
30
|
return props.appearance === "placeholder" ? "dashed" : "solid";
|
|
31
31
|
}, function (props) {
|
|
32
|
-
return props.theme.colors.
|
|
32
|
+
return props.theme.colors.button[props.appearance].background.base;
|
|
33
33
|
}, function (props) {
|
|
34
|
-
return props.theme.colors.
|
|
34
|
+
return props.theme.colors.button[props.appearance].text.base;
|
|
35
35
|
}, function (props) {
|
|
36
36
|
return props.theme.fontWeights.bold;
|
|
37
37
|
}, function (props) {
|
|
@@ -41,24 +41,25 @@ var Container = _styledComponents.default.button.withConfig({
|
|
|
41
41
|
}, function (props) {
|
|
42
42
|
return props.buttonSize === "default" ? props.theme.typography[200].fontSize : props.theme.typography[300].fontSize;
|
|
43
43
|
}, function (props) {
|
|
44
|
-
return props.theme.colors.
|
|
44
|
+
return props.theme.colors.button[props.appearance].text.base;
|
|
45
45
|
}, function (props) {
|
|
46
|
-
return props.theme.colors.
|
|
46
|
+
return props.theme.colors.button[props.appearance].text.hover;
|
|
47
47
|
}, function (props) {
|
|
48
|
-
return props.theme.colors.
|
|
48
|
+
return props.theme.colors.button[props.appearance].background.hover;
|
|
49
49
|
}, function (props) {
|
|
50
50
|
return props.appearance === "placeholder" ? props.theme.shadows[100] : "none";
|
|
51
51
|
}, function (props) {
|
|
52
|
-
return props.theme.colors.
|
|
52
|
+
return props.theme.colors.button[props.appearance].text.hover;
|
|
53
53
|
}, function (props) {
|
|
54
|
-
return props.theme.colors.
|
|
54
|
+
return props.theme.colors.button[props.appearance].background.active;
|
|
55
55
|
}, _mixins.focusRing, function (props) {
|
|
56
|
-
return props.active && (0, _styledComponents.css)(["color:", " !important;background:", " !important;"], props.theme.colors.
|
|
56
|
+
return props.active && (0, _styledComponents.css)(["color:", " !important;background:", " !important;"], props.theme.colors.button[props.appearance].text.hover, props.theme.colors.button[props.appearance].background.active);
|
|
57
57
|
}, function (props) {
|
|
58
58
|
return props.disabled && _mixins.disabled;
|
|
59
59
|
}, function (props) {
|
|
60
|
-
return props.appearance === "pill" && (0, _styledComponents.css)(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:
|
|
60
|
+
return props.appearance === "pill" && (0, _styledComponents.css)(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode ? "screen" : "multiply", _mixins.pill);
|
|
61
61
|
}, _styles.default, _systemProps.LAYOUT, _systemProps.COMMON);
|
|
62
62
|
|
|
63
|
-
var _default = Container;
|
|
63
|
+
var _default = Container; //${props.theme.mode === "dark" ? "screen" : "multiply"}
|
|
64
|
+
|
|
64
65
|
exports.default = _default;
|
package/commonjs/Card/index.js
CHANGED
|
@@ -26,11 +26,11 @@ var Card = function Card(_ref) {
|
|
|
26
26
|
_ref$border = _ref.border,
|
|
27
27
|
border = _ref$border === void 0 ? 500 : _ref$border,
|
|
28
28
|
_ref$borderColor = _ref.borderColor,
|
|
29
|
-
borderColor = _ref$borderColor === void 0 ? "border" : _ref$borderColor,
|
|
29
|
+
borderColor = _ref$borderColor === void 0 ? "container.border.base" : _ref$borderColor,
|
|
30
30
|
_ref$color = _ref.color,
|
|
31
31
|
color = _ref$color === void 0 ? "text.body" : _ref$color,
|
|
32
32
|
_ref$bg = _ref.bg,
|
|
33
|
-
bg = _ref$bg === void 0 ? "background.
|
|
33
|
+
bg = _ref$bg === void 0 ? "container.background.base" : _ref$bg,
|
|
34
34
|
rest = _objectWithoutPropertiesLoose(_ref, ["onClick", "href", "children", "ariaLabel", "buttonProps", "border", "borderColor", "color", "bg"]);
|
|
35
35
|
|
|
36
36
|
return /*#__PURE__*/React.createElement(_styles.Container, _extends({}, rest, {
|
|
@@ -21,7 +21,7 @@ var Container = _styledComponents.default.div.withConfig({
|
|
|
21
21
|
}, function (props) {
|
|
22
22
|
return props.theme.fontWeights.semibold;
|
|
23
23
|
}, function (props) {
|
|
24
|
-
return props.overlimit ? props.theme.colors.error
|
|
24
|
+
return props.overlimit ? props.theme.colors.text.error : props.theme.colors.text.subtext;
|
|
25
25
|
}, function (p) {
|
|
26
26
|
return p.mini && (0, _styledComponents.css)(["", ""], p.theme.typography[100]);
|
|
27
27
|
}, _systemProps.COMMON);
|