@sproutsocial/racine 10.0.0-dar97-beta.2 → 10.0.2-menuCSS.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 +24 -0
- package/__flow__/Button/styles.js +1 -1
- package/__flow__/Checkbox/styles.js +1 -1
- package/__flow__/Listbox/index.test.js +0 -18
- package/__flow__/Menu/__snapshots__/index.test.js.snap +4 -273
- package/__flow__/Menu/index.test.js +0 -4
- package/__flow__/Menu/styles.js +10 -2
- package/__flow__/Modal/styles.js +1 -3
- package/__flow__/themes/dark/_themed.scss +4 -3
- package/__flow__/themes/dark/theme.js +24 -4
- package/__flow__/themes/light/_themed.scss +12 -11
- package/__flow__/themes/light/theme.js +21 -1
- package/__flow__/themes/utils/interact.js +1 -1
- package/__flow__/types/theme.colors.flow.js +6 -0
- package/commonjs/Button/styles.js +1 -1
- package/commonjs/Checkbox/styles.js +1 -1
- package/commonjs/Menu/styles.js +1 -1
- package/commonjs/Modal/styles.js +1 -3
- package/commonjs/themes/dark/theme.js +24 -4
- package/commonjs/themes/light/theme.js +22 -3
- package/commonjs/themes/utils/interact.js +1 -1
- package/dist/themes/dark/_themed.scss +4 -3
- package/dist/themes/dark/dark.scss +20 -3
- package/dist/themes/light/_themed.scss +12 -11
- package/dist/themes/light/light.scss +20 -3
- package/lib/Button/styles.js +1 -1
- package/lib/Checkbox/styles.js +1 -1
- package/lib/Menu/styles.js +2 -2
- package/lib/Modal/styles.js +1 -2
- package/lib/themes/dark/theme.js +25 -7
- package/lib/themes/light/theme.js +21 -3
- package/lib/themes/utils/interact.js +1 -1
- package/package.json +1 -1
- package/__flow__/Listbox/__snapshots__/index.test.js.snap +0 -1316
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 10.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 98f063a: Make theme names consistent by removing references to "default-light" and "default-dark"
|
|
8
|
+
- We no longer refer to the "light" theme as "default-light" in the theme object.
|
|
9
|
+
- We no longer refer to the "dark" theme as "default-dark" in the theme object.
|
|
10
|
+
- 98f063a: Change "themed" SCSS mixin setup
|
|
11
|
+
- A parent theme classname of 'theme--light' or 'theme--dark' is no longer required to use the mixin.
|
|
12
|
+
- A separate mixin is offered per theme, instead of a single mixin for all themes.
|
|
13
|
+
- 98f063a: Rename "default" theme to "light"
|
|
14
|
+
|
|
15
|
+
## 9.0.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- a9a06a6: Added aliases for sentiment colors
|
|
20
|
+
|
|
21
|
+
## 9.0.2
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 3215099: bug fix for mix blend mode
|
|
26
|
+
|
|
3
27
|
## 9.0.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -87,7 +87,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
|
|
|
87
87
|
align-items: center;
|
|
88
88
|
justify-content: center;
|
|
89
89
|
/* This solution is temporary. DS-1095 */
|
|
90
|
-
mix-blend-mode: ${props.theme.mode ? "screen" : "multiply"};
|
|
90
|
+
mix-blend-mode: ${props.theme.mode === "dark" ? "screen" : "multiply"};
|
|
91
91
|
|
|
92
92
|
${pill}
|
|
93
93
|
`}
|
|
@@ -35,7 +35,7 @@ export const InputWrapper = styled<typeof Box, TypeTheme, any>(Box)`
|
|
|
35
35
|
transition: all ${(props) => props.theme.duration.fast}
|
|
36
36
|
${(props) => props.theme.easing.ease_inout};
|
|
37
37
|
/* This solution is temporary. DS-1095 */
|
|
38
|
-
mix-blend-mode: ${props.theme.mode ? "screen" : "multiply"};
|
|
38
|
+
mix-blend-mode: ${props.theme.mode === "dark" ? "screen" : "multiply"};
|
|
39
39
|
${pill}
|
|
40
40
|
|
|
41
41
|
&:hover {
|
|
@@ -165,10 +165,6 @@ describe("Listbox", () => {
|
|
|
165
165
|
});
|
|
166
166
|
|
|
167
167
|
describe("AsListbox", () => {
|
|
168
|
-
it("should match snapshot", () => {
|
|
169
|
-
expect(render(<AsListbox />).baseElement).toMatchSnapshot();
|
|
170
|
-
});
|
|
171
|
-
|
|
172
168
|
it("should render items with option role", async () => {
|
|
173
169
|
const { findByText, queryByLabelText, queryByRole } = render(
|
|
174
170
|
<AsListbox />
|
|
@@ -211,10 +207,6 @@ describe("Listbox", () => {
|
|
|
211
207
|
});
|
|
212
208
|
|
|
213
209
|
describe("AsListbox multiselect", () => {
|
|
214
|
-
it("should match snapshot", () => {
|
|
215
|
-
expect(render(<AsListboxMultiselect />).baseElement).toMatchSnapshot();
|
|
216
|
-
});
|
|
217
|
-
|
|
218
210
|
it("should render items with option role", async () => {
|
|
219
211
|
const { queryByLabelText, queryByText, queryByRole } = render(
|
|
220
212
|
<AsListboxMultiselect />
|
|
@@ -244,10 +236,6 @@ describe("Listbox", () => {
|
|
|
244
236
|
});
|
|
245
237
|
|
|
246
238
|
describe("AsListbox with checkboxes", () => {
|
|
247
|
-
it("should match snapshot", () => {
|
|
248
|
-
expect(render(<AsListboxWithCheckboxes />).baseElement).toMatchSnapshot();
|
|
249
|
-
});
|
|
250
|
-
|
|
251
239
|
it("should render items with checkbox role", async () => {
|
|
252
240
|
const { queryByRole } = render(<AsListboxWithCheckboxes />);
|
|
253
241
|
const firstItem = queryByRole(MENU_ITEM_ROLES.CHECKBOX, {
|
|
@@ -267,12 +255,6 @@ describe("Listbox", () => {
|
|
|
267
255
|
});
|
|
268
256
|
|
|
269
257
|
describe("AsListbox with filter input", () => {
|
|
270
|
-
it("should match snapshot", () => {
|
|
271
|
-
expect(
|
|
272
|
-
render(<AsListboxWithFilterInput />).baseElement
|
|
273
|
-
).toMatchSnapshot();
|
|
274
|
-
});
|
|
275
|
-
|
|
276
258
|
it("should allow filtering", async () => {
|
|
277
259
|
const { queryByLabelText, queryAllByRole } = render(
|
|
278
260
|
<AsListboxWithFilterInput />
|
|
@@ -1,277 +1,7 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Menu AsMenu should match snapshot 1`] = `
|
|
4
|
-
.c0 {
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
|
|
7
|
-
margin: 0px;
|
|
8
|
-
padding: 0px;
|
|
9
|
-
width: 200px;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.c2 {
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
|
|
16
|
-
padding-left: 16px;
|
|
17
|
-
margin-top: -1px;
|
|
18
|
-
border-top: 1px solid;
|
|
19
|
-
border-color: #dee1e1;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.c4 {
|
|
23
|
-
box-sizing: border-box;
|
|
24
|
-
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
|
|
25
|
-
margin: 8px;
|
|
26
|
-
padding: 8px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.c5 {
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.c7 {
|
|
35
|
-
display: block;
|
|
36
|
-
width: 100%;
|
|
37
|
-
border-radius: 6px;
|
|
38
|
-
background-color: transparent;
|
|
39
|
-
border: none;
|
|
40
|
-
text-align: left;
|
|
41
|
-
color: #364141;
|
|
42
|
-
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
|
|
43
|
-
font-weight: 400;
|
|
44
|
-
padding: 6px 8px;
|
|
45
|
-
list-style-type: none;
|
|
46
|
-
outline: 0;
|
|
47
|
-
font-size: 13px;
|
|
48
|
-
line-height: 21.333333333333332px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.c7:focus,
|
|
52
|
-
.c7:hover {
|
|
53
|
-
color: #364141;
|
|
54
|
-
background-color: #f3f4f4;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.c7:focus .Icon-svg,
|
|
58
|
-
.c7:hover .Icon-svg {
|
|
59
|
-
color: unset;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.c7:hover {
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.c6 {
|
|
67
|
-
display: block;
|
|
68
|
-
width: 100%;
|
|
69
|
-
border-radius: 6px;
|
|
70
|
-
background-color: transparent;
|
|
71
|
-
border: none;
|
|
72
|
-
text-align: left;
|
|
73
|
-
color: #364141;
|
|
74
|
-
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
|
|
75
|
-
font-weight: 400;
|
|
76
|
-
padding: 6px 8px;
|
|
77
|
-
list-style-type: none;
|
|
78
|
-
outline: 0;
|
|
79
|
-
font-size: 13px;
|
|
80
|
-
line-height: 21.333333333333332px;
|
|
81
|
-
color: #FFFFFF;
|
|
82
|
-
background-color: #364141;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.c6 .Icon-svg {
|
|
86
|
-
color: #FFFFFF;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.c6:focus,
|
|
90
|
-
.c6:hover {
|
|
91
|
-
color: #364141;
|
|
92
|
-
background-color: #f3f4f4;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.c6:focus .Icon-svg,
|
|
96
|
-
.c6:hover .Icon-svg {
|
|
97
|
-
color: unset;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.c6:hover {
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.c1 {
|
|
105
|
-
list-style-type: none;
|
|
106
|
-
outline: 0;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.c3 {
|
|
110
|
-
margin: 0;
|
|
111
|
-
padding-left: 0;
|
|
112
|
-
padding-right: 0;
|
|
113
|
-
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
|
|
114
|
-
margin-top: 12px;
|
|
115
|
-
color: #273333;
|
|
116
|
-
font-size: 13px;
|
|
117
|
-
line-height: 21.333333333333332px;
|
|
118
|
-
font-weight: 600;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
<body>
|
|
122
|
-
<div>
|
|
123
|
-
<ul
|
|
124
|
-
aria-activedescendant="MenuItem-1"
|
|
125
|
-
class="c0 c1"
|
|
126
|
-
overflow="hidden"
|
|
127
|
-
role="menu"
|
|
128
|
-
tabindex="0"
|
|
129
|
-
width="200px"
|
|
130
|
-
>
|
|
131
|
-
<div
|
|
132
|
-
class="c2"
|
|
133
|
-
>
|
|
134
|
-
<div
|
|
135
|
-
class="c3 "
|
|
136
|
-
color="text.headline"
|
|
137
|
-
data-qa-text="Fruit"
|
|
138
|
-
font-weight="600"
|
|
139
|
-
>
|
|
140
|
-
Fruit
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
<div
|
|
144
|
-
class="c4"
|
|
145
|
-
role="group"
|
|
146
|
-
>
|
|
147
|
-
<li
|
|
148
|
-
class="c5 c6"
|
|
149
|
-
data-qa-menu-item="Apple"
|
|
150
|
-
id="MenuItem-1"
|
|
151
|
-
role="menuitem"
|
|
152
|
-
tabindex="-1"
|
|
153
|
-
>
|
|
154
|
-
<div
|
|
155
|
-
style="display: flex; align-items: center; justify-content: space-between;"
|
|
156
|
-
>
|
|
157
|
-
<div
|
|
158
|
-
style="flex-grow: 1; word-break: break-word; min-width: 0;"
|
|
159
|
-
>
|
|
160
|
-
Apple
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
</li>
|
|
164
|
-
<li
|
|
165
|
-
class="c5 c7"
|
|
166
|
-
data-qa-menu-item="Banana"
|
|
167
|
-
id="MenuItem-2"
|
|
168
|
-
role="menuitem"
|
|
169
|
-
tabindex="-1"
|
|
170
|
-
>
|
|
171
|
-
<div
|
|
172
|
-
style="display: flex; align-items: center; justify-content: space-between;"
|
|
173
|
-
>
|
|
174
|
-
<div
|
|
175
|
-
style="flex-grow: 1; word-break: break-word; min-width: 0;"
|
|
176
|
-
>
|
|
177
|
-
Banana
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
</li>
|
|
181
|
-
<li
|
|
182
|
-
class="c5 c7"
|
|
183
|
-
data-qa-menu-item="Orange"
|
|
184
|
-
id="MenuItem-3"
|
|
185
|
-
role="menuitem"
|
|
186
|
-
tabindex="-1"
|
|
187
|
-
>
|
|
188
|
-
<div
|
|
189
|
-
style="display: flex; align-items: center; justify-content: space-between;"
|
|
190
|
-
>
|
|
191
|
-
<div
|
|
192
|
-
style="flex-grow: 1; word-break: break-word; min-width: 0;"
|
|
193
|
-
>
|
|
194
|
-
Orange
|
|
195
|
-
</div>
|
|
196
|
-
</div>
|
|
197
|
-
</li>
|
|
198
|
-
</div>
|
|
199
|
-
<div
|
|
200
|
-
class="c2"
|
|
201
|
-
>
|
|
202
|
-
<div
|
|
203
|
-
class="c3 "
|
|
204
|
-
color="text.headline"
|
|
205
|
-
data-qa-text="Maybe Fruit"
|
|
206
|
-
font-weight="600"
|
|
207
|
-
>
|
|
208
|
-
Maybe Fruit
|
|
209
|
-
</div>
|
|
210
|
-
</div>
|
|
211
|
-
<div
|
|
212
|
-
class="c4"
|
|
213
|
-
role="group"
|
|
214
|
-
>
|
|
215
|
-
<li
|
|
216
|
-
class="c5 c7"
|
|
217
|
-
data-qa-menu-item="Tomato"
|
|
218
|
-
id="MenuItem-4"
|
|
219
|
-
role="menuitem"
|
|
220
|
-
tabindex="-1"
|
|
221
|
-
>
|
|
222
|
-
<div
|
|
223
|
-
style="display: flex; align-items: center; justify-content: space-between;"
|
|
224
|
-
>
|
|
225
|
-
<div
|
|
226
|
-
style="flex-grow: 1; word-break: break-word; min-width: 0;"
|
|
227
|
-
>
|
|
228
|
-
Tomato
|
|
229
|
-
</div>
|
|
230
|
-
</div>
|
|
231
|
-
</li>
|
|
232
|
-
<li
|
|
233
|
-
class="c5 c7"
|
|
234
|
-
data-qa-menu-item="Cucumber"
|
|
235
|
-
id="MenuItem-5"
|
|
236
|
-
role="menuitem"
|
|
237
|
-
tabindex="-1"
|
|
238
|
-
>
|
|
239
|
-
<div
|
|
240
|
-
style="display: flex; align-items: center; justify-content: space-between;"
|
|
241
|
-
>
|
|
242
|
-
<div
|
|
243
|
-
style="flex-grow: 1; word-break: break-word; min-width: 0;"
|
|
244
|
-
>
|
|
245
|
-
Cucumber
|
|
246
|
-
</div>
|
|
247
|
-
</div>
|
|
248
|
-
</li>
|
|
249
|
-
<li
|
|
250
|
-
class="c5 c7"
|
|
251
|
-
data-qa-menu-item="Squash"
|
|
252
|
-
id="MenuItem-6"
|
|
253
|
-
role="menuitem"
|
|
254
|
-
tabindex="-1"
|
|
255
|
-
>
|
|
256
|
-
<div
|
|
257
|
-
style="display: flex; align-items: center; justify-content: space-between;"
|
|
258
|
-
>
|
|
259
|
-
<div
|
|
260
|
-
style="flex-grow: 1; word-break: break-word; min-width: 0;"
|
|
261
|
-
>
|
|
262
|
-
Squash
|
|
263
|
-
</div>
|
|
264
|
-
</div>
|
|
265
|
-
</li>
|
|
266
|
-
</div>
|
|
267
|
-
</ul>
|
|
268
|
-
</div>
|
|
269
|
-
</body>
|
|
270
|
-
`;
|
|
271
|
-
|
|
272
3
|
exports[`Menu AsMenuButton should match snapshot 1`] = `
|
|
273
|
-
|
|
274
|
-
.c3 {
|
|
4
|
+
.c3 {
|
|
275
5
|
display: inline-block;
|
|
276
6
|
color: inherit;
|
|
277
7
|
vertical-align: middle;
|
|
@@ -357,7 +87,8 @@ html .c3 {
|
|
|
357
87
|
display: inline-block;
|
|
358
88
|
}
|
|
359
89
|
|
|
360
|
-
<
|
|
90
|
+
<body>
|
|
91
|
+
<div>
|
|
361
92
|
<div
|
|
362
93
|
class="c0"
|
|
363
94
|
>
|
|
@@ -368,7 +99,7 @@ html .c3 {
|
|
|
368
99
|
class="c1"
|
|
369
100
|
data-qa-button=""
|
|
370
101
|
data-qa-button-isdisabled="false"
|
|
371
|
-
id="MenuButton-
|
|
102
|
+
id="MenuButton-7"
|
|
372
103
|
type="button"
|
|
373
104
|
>
|
|
374
105
|
<span
|
|
@@ -54,10 +54,6 @@ describe("Menu", () => {
|
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
describe("AsMenu", () => {
|
|
57
|
-
it("should match snapshot", () => {
|
|
58
|
-
expect(render(<AsMenu />).baseElement).toMatchSnapshot();
|
|
59
|
-
});
|
|
60
|
-
|
|
61
57
|
it("should render items with menuitem role", () => {
|
|
62
58
|
const { queryByRole, queryByDataQaLabel } = render(<AsMenu />);
|
|
63
59
|
const firstItem = queryByRole(MENU_ITEM_ROLES.MENUITEM, {
|
package/__flow__/Menu/styles.js
CHANGED
|
@@ -3,7 +3,7 @@ import styled, { css } from "styled-components";
|
|
|
3
3
|
import Box from "../Box";
|
|
4
4
|
import type { TypeMenuItemProps } from "./index.flow";
|
|
5
5
|
import type { TypeTheme } from "../types/theme.flow";
|
|
6
|
-
import { disabled } from "../utils/mixins";
|
|
6
|
+
import { disabled, focusRing } from "../utils/mixins";
|
|
7
7
|
|
|
8
8
|
export const MenuItemContainer = styled<
|
|
9
9
|
typeof Box,
|
|
@@ -86,5 +86,13 @@ export const MenuItemContainer = styled<
|
|
|
86
86
|
|
|
87
87
|
export const MenuItemsContainer = styled<typeof Box, TypeTheme>(Box)`
|
|
88
88
|
list-style-type: none;
|
|
89
|
-
|
|
89
|
+
&:focus {
|
|
90
|
+
${focusRing}
|
|
91
|
+
}
|
|
92
|
+
&:not(:focus) {
|
|
93
|
+
& li:not(:hover) {
|
|
94
|
+
color: #364141;
|
|
95
|
+
background-color: transparent;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
90
98
|
`;
|
package/__flow__/Modal/styles.js
CHANGED
|
@@ -6,7 +6,6 @@ import styled, {
|
|
|
6
6
|
} from "styled-components";
|
|
7
7
|
import { width, zIndex } from "styled-system";
|
|
8
8
|
import ReactModal from "react-modal";
|
|
9
|
-
import { transparentize } from "polished";
|
|
10
9
|
import Box from "../Box";
|
|
11
10
|
import { COMMON } from "../utils/system-props";
|
|
12
11
|
|
|
@@ -62,8 +61,7 @@ export const Container: StyledComponent<any, TypeTheme, *> = styled(ReactModalAd
|
|
|
62
61
|
display: flex;
|
|
63
62
|
align-items: center;
|
|
64
63
|
justify-content: center;
|
|
65
|
-
background-color: ${(props) =>
|
|
66
|
-
transparentize(0.32, props.theme.colors.neutral[1000])};
|
|
64
|
+
background-color: ${(props) => props.theme.colors.overlay.background.base};
|
|
67
65
|
opacity: 0;
|
|
68
66
|
will-change: opacity;
|
|
69
67
|
transition: opacity ${(props) => props.theme.duration.medium}
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
// This file is excluded from stylelint, because stylelint is only set up to lint styled-components at the moment.
|
|
3
3
|
|
|
4
4
|
// SET-UP
|
|
5
|
-
//
|
|
5
|
+
// This file is auto-generated based on the JS theme file, ensuring our SCSS theme variables stay in sync.
|
|
6
6
|
@import "../../../dist/themes/dark/dark.scss";
|
|
7
7
|
|
|
8
|
-
// In the JS theme
|
|
8
|
+
// In the JS theme file, the theme object is exported as "default" (i.e., using "export default"),
|
|
9
9
|
// so we need to map-get "default" to access it.
|
|
10
10
|
$theme: map-get($dark, 'default');
|
|
11
11
|
|
|
12
12
|
// MIXIN
|
|
13
|
-
// CSS properties that are theme-dependent must be wrapped in this mixin
|
|
13
|
+
// CSS properties that are theme-dependent must be wrapped in this mixin.
|
|
14
|
+
// It will convert semantic tokens to the appropriate theme-dependent CSS property.
|
|
14
15
|
@mixin themed() {
|
|
15
16
|
& {
|
|
16
17
|
$theme-map: () !global;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import COLORS from "@sproutsocial/seeds-color";
|
|
4
4
|
import DEPTH from "@sproutsocial/seeds-depth";
|
|
5
|
-
import
|
|
5
|
+
import lightTheme from "../light/theme";
|
|
6
6
|
import { datavizPalette } from "./dataviz-palette";
|
|
7
7
|
import {
|
|
8
8
|
green,
|
|
@@ -13,10 +13,11 @@ import {
|
|
|
13
13
|
red,
|
|
14
14
|
neutral,
|
|
15
15
|
} from "./decorative-palettes";
|
|
16
|
+
import { transparentize } from "polished";
|
|
16
17
|
|
|
17
18
|
import interact from "../utils/interact";
|
|
18
19
|
|
|
19
|
-
const MODE = "
|
|
20
|
+
const MODE = "dark";
|
|
20
21
|
|
|
21
22
|
export const shadows = {
|
|
22
23
|
low: `${DEPTH.ELEVATION_LEVEL_100} ${COLORS.COLOR_NEUTRAL_1100}FF`,
|
|
@@ -24,8 +25,10 @@ export const shadows = {
|
|
|
24
25
|
high: `${DEPTH.ELEVATION_LEVEL_400} ${COLORS.COLOR_NEUTRAL_1100}FF`,
|
|
25
26
|
};
|
|
26
27
|
|
|
28
|
+
// If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
|
|
29
|
+
|
|
27
30
|
const colors = {
|
|
28
|
-
...
|
|
31
|
+
...lightTheme.colors,
|
|
29
32
|
utils: {
|
|
30
33
|
interact: interact(MODE),
|
|
31
34
|
},
|
|
@@ -53,6 +56,9 @@ const colors = {
|
|
|
53
56
|
neutral: neutral.background,
|
|
54
57
|
},
|
|
55
58
|
selected: COLORS.COLOR_NEUTRAL_0,
|
|
59
|
+
positive_sentiment: COLORS.COLOR_BLUE_500,
|
|
60
|
+
negative_sentiment: COLORS.COLOR_RED_500,
|
|
61
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_300,
|
|
56
62
|
},
|
|
57
63
|
border: {
|
|
58
64
|
base: COLORS.COLOR_NEUTRAL_1100,
|
|
@@ -178,6 +184,9 @@ const colors = {
|
|
|
178
184
|
danger: red.foreground,
|
|
179
185
|
info: blue.foreground,
|
|
180
186
|
opportunity: purple.foreground,
|
|
187
|
+
positive_sentiment: COLORS.COLOR_BLUE_700,
|
|
188
|
+
negative_sentiment: COLORS.COLOR_RED_600,
|
|
189
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_600,
|
|
181
190
|
},
|
|
182
191
|
form: {
|
|
183
192
|
background: {
|
|
@@ -201,6 +210,17 @@ const colors = {
|
|
|
201
210
|
selected: COLORS.COLOR_NEUTRAL_0,
|
|
202
211
|
},
|
|
203
212
|
},
|
|
213
|
+
overlay: {
|
|
214
|
+
background: {
|
|
215
|
+
base: transparentize(0.28, COLORS.COLOR_NEUTRAL_1000),
|
|
216
|
+
},
|
|
217
|
+
text: {
|
|
218
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
219
|
+
},
|
|
220
|
+
icon: {
|
|
221
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
222
|
+
},
|
|
223
|
+
},
|
|
204
224
|
elevation: {
|
|
205
225
|
base: COLORS.COLOR_NEUTRAL_1100,
|
|
206
226
|
},
|
|
@@ -212,7 +232,7 @@ const colors = {
|
|
|
212
232
|
};
|
|
213
233
|
|
|
214
234
|
const darkTheme = {
|
|
215
|
-
...
|
|
235
|
+
...lightTheme,
|
|
216
236
|
colors,
|
|
217
237
|
shadows,
|
|
218
238
|
mode: MODE,
|
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
// This file is excluded from stylelint, because stylelint is only set up to lint styled-components at the moment.
|
|
3
3
|
|
|
4
4
|
// SET-UP
|
|
5
|
-
//
|
|
5
|
+
// This file is auto-generated based on the JS theme file, ensuring our SCSS theme variables stay in sync.
|
|
6
6
|
@import "../../../dist/themes/light/light.scss";
|
|
7
7
|
|
|
8
|
-
// In the JS theme
|
|
8
|
+
// In the JS theme file, the theme object is exported as "default" (i.e., using "export default"),
|
|
9
9
|
// so we need to map-get "default" to access it.
|
|
10
10
|
$theme: map-get($light, 'default');
|
|
11
11
|
|
|
12
12
|
// MIXIN
|
|
13
|
-
// CSS properties that are theme-dependent must be wrapped in this mixin
|
|
13
|
+
// CSS properties that are theme-dependent must be wrapped in this mixin.
|
|
14
|
+
// It will convert semantic tokens to the appropriate theme-dependent CSS property.
|
|
14
15
|
@mixin themed() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
& {
|
|
17
|
+
$theme-map: () !global;
|
|
18
|
+
@each $key, $submap in $theme {
|
|
19
|
+
$value: map-get($theme, "#{$key}");
|
|
20
|
+
$theme-map: map-merge($theme-map, ($key: $value)) !global;
|
|
21
|
+
}
|
|
22
|
+
@content;
|
|
23
|
+
$theme-map: null !global;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -18,12 +18,15 @@ import SPACE from "@sproutsocial/seeds-space";
|
|
|
18
18
|
import DEPTH from "@sproutsocial/seeds-depth";
|
|
19
19
|
import MOTION from "@sproutsocial/seeds-motion";
|
|
20
20
|
import BORDER from "@sproutsocial/seeds-border";
|
|
21
|
+
import { transparentize } from "polished";
|
|
21
22
|
|
|
22
23
|
import interact from "../utils/interact";
|
|
23
24
|
|
|
24
25
|
export const breakpoints = ["900px", "1200px", "1500px", "1800px"];
|
|
25
26
|
|
|
26
|
-
const MODE = "
|
|
27
|
+
const MODE = "light";
|
|
28
|
+
|
|
29
|
+
// If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
|
|
27
30
|
|
|
28
31
|
const colors = {
|
|
29
32
|
app: {
|
|
@@ -50,6 +53,9 @@ const colors = {
|
|
|
50
53
|
neutral: neutral.background,
|
|
51
54
|
},
|
|
52
55
|
selected: COLORS.COLOR_NEUTRAL_800,
|
|
56
|
+
positive_sentiment: COLORS.COLOR_BLUE_500,
|
|
57
|
+
negative_sentiment: COLORS.COLOR_RED_500,
|
|
58
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_300,
|
|
53
59
|
},
|
|
54
60
|
border: {
|
|
55
61
|
base: COLORS.COLOR_NEUTRAL_200,
|
|
@@ -175,6 +181,9 @@ const colors = {
|
|
|
175
181
|
danger: red.foreground,
|
|
176
182
|
info: blue.foreground,
|
|
177
183
|
opportunity: purple.foreground,
|
|
184
|
+
positive_sentiment: COLORS.COLOR_BLUE_700,
|
|
185
|
+
negative_sentiment: COLORS.COLOR_RED_600,
|
|
186
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_600,
|
|
178
187
|
},
|
|
179
188
|
form: {
|
|
180
189
|
background: {
|
|
@@ -198,6 +207,17 @@ const colors = {
|
|
|
198
207
|
selected: COLORS.COLOR_NEUTRAL_800,
|
|
199
208
|
},
|
|
200
209
|
},
|
|
210
|
+
overlay: {
|
|
211
|
+
background: {
|
|
212
|
+
base: transparentize(0.44, COLORS.COLOR_NEUTRAL_1000),
|
|
213
|
+
},
|
|
214
|
+
text: {
|
|
215
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
216
|
+
},
|
|
217
|
+
icon: {
|
|
218
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
219
|
+
},
|
|
220
|
+
},
|
|
201
221
|
elevation: {
|
|
202
222
|
base: `${COLORS.COLOR_NEUTRAL_900}3D`,
|
|
203
223
|
},
|
|
@@ -30,6 +30,9 @@ type TypeContainerColors = {|
|
|
|
30
30
|
neutral: string,
|
|
31
31
|
},
|
|
32
32
|
selected: string,
|
|
33
|
+
positive_sentiment: string,
|
|
34
|
+
negative_sentiment: string,
|
|
35
|
+
neutral_sentiment: string,
|
|
33
36
|
},
|
|
34
37
|
border: {
|
|
35
38
|
base: string,
|
|
@@ -167,6 +170,9 @@ type TypeIconColors = {|
|
|
|
167
170
|
danger: string,
|
|
168
171
|
info: string,
|
|
169
172
|
opportunity: string,
|
|
173
|
+
positive_sentiment: string,
|
|
174
|
+
negative_sentiment: string,
|
|
175
|
+
neutral_sentiment: string,
|
|
170
176
|
},
|
|
171
177
|
|};
|
|
172
178
|
|
|
@@ -57,7 +57,7 @@ var Container = _styledComponents.default.button.withConfig({
|
|
|
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:", ";", ""], props.theme.mode ? "screen" : "multiply", _mixins.pill);
|
|
60
|
+
return props.appearance === "pill" && (0, _styledComponents.css)(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode === "dark" ? "screen" : "multiply", _mixins.pill);
|
|
61
61
|
}, _styles.default, _systemProps.LAYOUT, _systemProps.COMMON);
|
|
62
62
|
|
|
63
63
|
var _default = Container; //${props.theme.mode === "dark" ? "screen" : "multiply"}
|
|
@@ -40,7 +40,7 @@ var InputWrapper = (0, _styledComponents.default)(_Box.default).withConfig({
|
|
|
40
40
|
return props.theme.duration.fast;
|
|
41
41
|
}, function (props) {
|
|
42
42
|
return props.theme.easing.ease_inout;
|
|
43
|
-
}, props.theme.mode ? "screen" : "multiply", _mixins.pill, props.theme.colors.app.background.base, PillInput, _mixins.pill);
|
|
43
|
+
}, props.theme.mode === "dark" ? "screen" : "multiply", _mixins.pill, props.theme.colors.app.background.base, PillInput, _mixins.pill);
|
|
44
44
|
});
|
|
45
45
|
exports.InputWrapper = InputWrapper;
|
|
46
46
|
InputWrapper.displayName = "InputWrapper";
|