@sproutsocial/racine 7.6.0 → 8.0.0-beta-dark-mode.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/__flow__/Badge/styles.js +3 -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 -10
- 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 +332 -0
- package/__flow__/types/system-props.flow.js +2 -2
- package/__flow__/types/theme.colors.flow.js +239 -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 +2 -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 +16 -12
- 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 +1 -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 +2 -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 +16 -12
- 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 +0 -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
|
@@ -17,13 +17,13 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
|
|
|
17
17
|
${(props) => props.theme.space[200]};
|
|
18
18
|
vertical-align: middle;
|
|
19
19
|
appearance: none;
|
|
20
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
20
|
+
background-color: ${(props) => props.theme.colors.form.background.base};
|
|
21
21
|
border-radius: 11px;
|
|
22
22
|
outline: none;
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
transition: background-color ${(props) => props.theme.duration.fast}
|
|
25
25
|
${(props) => props.theme.easing.ease_inout};
|
|
26
|
-
border: 1px solid ${(props) => props.theme.colors.
|
|
26
|
+
border: 1px solid ${(props) => props.theme.colors.form.border.base};
|
|
27
27
|
white-space: nowrap;
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
|
|
@@ -33,7 +33,8 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
|
|
|
33
33
|
left: 0;
|
|
34
34
|
width: 14px;
|
|
35
35
|
height: 14px;
|
|
36
|
-
background-color: ${(props) => props.theme.colors.
|
|
36
|
+
background-color: ${(props) => props.theme.colors.icon.base};
|
|
37
|
+
opacity: 0.64;
|
|
37
38
|
border-radius: 50%;
|
|
38
39
|
content: "";
|
|
39
40
|
transition: transform ${(props) => props.theme.duration.fast}
|
|
@@ -48,13 +49,14 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
|
|
|
48
49
|
${(props) => {
|
|
49
50
|
if (props.checked) {
|
|
50
51
|
return css`
|
|
51
|
-
color: ${props.theme.colors.
|
|
52
|
+
color: ${props.theme.colors.text.body};
|
|
52
53
|
text-align: left;
|
|
53
|
-
border-color: ${props.theme.colors.
|
|
54
|
-
background-color: ${props.theme.colors.
|
|
54
|
+
border-color: ${props.theme.colors.form.border.selected};
|
|
55
|
+
background-color: ${props.theme.colors.form.background.selected};
|
|
55
56
|
|
|
56
57
|
&::after {
|
|
57
|
-
background-color: ${props.theme.colors.
|
|
58
|
+
background-color: ${props.theme.colors.icon.inverse};
|
|
59
|
+
opacity: 1;
|
|
58
60
|
transform: translate(17px, -50%);
|
|
59
61
|
}
|
|
60
62
|
|
|
@@ -63,15 +65,15 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
|
|
|
63
65
|
top: 50%;
|
|
64
66
|
left: 4px;
|
|
65
67
|
transform: translate(0, -50%);
|
|
66
|
-
color: ${props.theme.colors.
|
|
68
|
+
color: ${props.theme.colors.icon.inverse};
|
|
67
69
|
}
|
|
68
70
|
`;
|
|
69
71
|
} else {
|
|
70
72
|
return `
|
|
71
73
|
&:hover,
|
|
72
74
|
&:focus {
|
|
73
|
-
border-color: ${props.theme.colors.
|
|
74
|
-
background-color: ${props.theme.colors.background.
|
|
75
|
+
border-color: ${props.theme.colors.form.border.base};
|
|
76
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
75
77
|
}
|
|
76
78
|
&:hover {
|
|
77
79
|
&::after {
|
|
@@ -92,7 +94,7 @@ const Container: StyledComponent<{checked: boolean, disabled: boolean }, TypeThe
|
|
|
92
94
|
&:hover,
|
|
93
95
|
&:focus {
|
|
94
96
|
background-color: ${(props) =>
|
|
95
|
-
props.theme.colors.
|
|
97
|
+
props.theme.colors.container.background.selected};
|
|
96
98
|
}
|
|
97
99
|
}
|
|
98
100
|
`}
|
package/__flow__/Table/styles.js
CHANGED
|
@@ -14,7 +14,8 @@ const Container: StyledComponent<{ ... }, TypeTheme, *> = styled.table`
|
|
|
14
14
|
|
|
15
15
|
tr,
|
|
16
16
|
thead {
|
|
17
|
-
border-bottom: 1px solid
|
|
17
|
+
border-bottom: 1px solid
|
|
18
|
+
${(props) => props.theme.colors.container.border.base};
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
${COMMON}
|
|
@@ -11,6 +11,7 @@ export const defaultStory = () => (
|
|
|
11
11
|
<TableCell
|
|
12
12
|
content={text("content", "🍔 Bacon Smokehouse Burger")}
|
|
13
13
|
id={text("id", "bacon_smokehouse")}
|
|
14
|
+
color="text.body"
|
|
14
15
|
/>
|
|
15
16
|
);
|
|
16
17
|
|
|
@@ -25,6 +26,7 @@ export const additionalProps = () => (
|
|
|
25
26
|
width={number("width", 300)}
|
|
26
27
|
colSpan={number("colSpan", 2)}
|
|
27
28
|
align={text("align", "center")}
|
|
29
|
+
color="text.body"
|
|
28
30
|
/>
|
|
29
31
|
);
|
|
30
32
|
|
|
@@ -11,6 +11,7 @@ export const defaultStory = () => (
|
|
|
11
11
|
<TableHeaderCell
|
|
12
12
|
content={text("content", "Food Item")}
|
|
13
13
|
id={text("id", "1")}
|
|
14
|
+
color="text.headline"
|
|
14
15
|
/>
|
|
15
16
|
);
|
|
16
17
|
|
|
@@ -23,6 +24,7 @@ export const sortable = () => (
|
|
|
23
24
|
isSortable={boolean("isSortable", true)}
|
|
24
25
|
content={text("content", "Food Item")}
|
|
25
26
|
id={text("id", "1")}
|
|
27
|
+
color="text.headline"
|
|
26
28
|
/>
|
|
27
29
|
);
|
|
28
30
|
|
|
@@ -37,6 +39,7 @@ export const additionalProps = () => (
|
|
|
37
39
|
id={text("id", "2")}
|
|
38
40
|
align={text("align", "center")}
|
|
39
41
|
width={number("width", 100)}
|
|
42
|
+
color="text.headline"
|
|
40
43
|
/>
|
|
41
44
|
);
|
|
42
45
|
|
|
@@ -5,7 +5,8 @@ import { COMMON } from "../utils/system-props";
|
|
|
5
5
|
import type { TypeTheme } from "../types/theme.flow";
|
|
6
6
|
|
|
7
7
|
const Container: StyledComponent<{ ... }, TypeTheme, *> = styled.tbody`
|
|
8
|
-
border-bottom: 1px solid
|
|
8
|
+
border-bottom: 1px solid
|
|
9
|
+
${(props) => props.theme.colors.container.border.base};
|
|
9
10
|
|
|
10
11
|
${COMMON}
|
|
11
12
|
`;
|
package/__flow__/Tabs/styles.js
CHANGED
|
@@ -12,7 +12,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.ul`
|
|
|
12
12
|
padding: 0;
|
|
13
13
|
list-style: none;
|
|
14
14
|
border-bottom: ${(props) => props.theme.borders[500]}
|
|
15
|
-
${(props) => props.theme.colors.border};
|
|
15
|
+
${(props) => props.theme.colors.container.border.base};
|
|
16
16
|
|
|
17
17
|
${COMMON}
|
|
18
18
|
`;
|
|
@@ -37,7 +37,7 @@ export const TabItem: StyledComponent<any, TypeTheme, *> = styled.li`
|
|
|
37
37
|
props.isSelected &&
|
|
38
38
|
css`
|
|
39
39
|
box-shadow: ${(props) =>
|
|
40
|
-
`inset 0 -3px 0 0 ${props.theme.colors.
|
|
40
|
+
`inset 0 -3px 0 0 ${props.theme.colors.button.primary.background.base}`};
|
|
41
41
|
`};
|
|
42
42
|
|
|
43
43
|
&:hover {
|
|
@@ -45,7 +45,7 @@ export const TabItem: StyledComponent<any, TypeTheme, *> = styled.li`
|
|
|
45
45
|
props.isSelected &&
|
|
46
46
|
css`
|
|
47
47
|
box-shadow: ${(props) =>
|
|
48
|
-
`inset 0 -3px 0 0 ${props.theme.colors.
|
|
48
|
+
`inset 0 -3px 0 0 ${props.theme.colors.button.primary.background.hover}`};
|
|
49
49
|
`};
|
|
50
50
|
}
|
|
51
51
|
`;
|
|
@@ -59,14 +59,14 @@ export const TabButton: StyledComponent<{ ... }, TypeTheme, *> = styled(Button)`
|
|
|
59
59
|
${(props) =>
|
|
60
60
|
props.isSelected &&
|
|
61
61
|
css`
|
|
62
|
-
color: ${(props) => props.theme.colors.
|
|
62
|
+
color: ${(props) => props.theme.colors.link.base};
|
|
63
63
|
`};
|
|
64
64
|
|
|
65
65
|
&:hover {
|
|
66
66
|
${(props) =>
|
|
67
67
|
props.isSelected &&
|
|
68
68
|
css`
|
|
69
|
-
color: ${(props) => props.theme.colors.
|
|
69
|
+
color: ${(props) => props.theme.colors.link.hover};
|
|
70
70
|
`};
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -14,9 +14,9 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
14
14
|
display: block;
|
|
15
15
|
width: 100%;
|
|
16
16
|
padding: ${(props) => props.theme.space[300]};
|
|
17
|
-
border: 1px solid ${(props) => props.theme.colors.
|
|
17
|
+
border: 1px solid ${(props) => props.theme.colors.form.border.base};
|
|
18
18
|
border-radius: ${(props) => props.theme.radii[500]};
|
|
19
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
19
|
+
background-color: ${(props) => props.theme.colors.form.background.base};
|
|
20
20
|
color: ${(props) => props.theme.colors.text.body};
|
|
21
21
|
outline: none;
|
|
22
22
|
resize: none;
|
|
@@ -34,7 +34,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&:placeholder {
|
|
37
|
-
color: ${(props) => props.theme.colors.
|
|
37
|
+
color: ${(props) => props.theme.colors.form.placeholder.base};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
${(props) =>
|
|
@@ -70,7 +70,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
70
70
|
props.invalid &&
|
|
71
71
|
css`
|
|
72
72
|
textarea {
|
|
73
|
-
border-color: ${(props) => props.theme.colors.error
|
|
73
|
+
border-color: ${(props) => props.theme.colors.form.border.error};
|
|
74
74
|
}
|
|
75
75
|
`}
|
|
76
76
|
|
|
@@ -79,7 +79,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
79
79
|
|
|
80
80
|
export const Accessory: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
81
81
|
position: absolute;
|
|
82
|
-
color: ${(props) => props.theme.colors.icon.
|
|
82
|
+
color: ${(props) => props.theme.colors.icon.base};
|
|
83
83
|
|
|
84
84
|
${(props) =>
|
|
85
85
|
props.before &&
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @flow strict-local
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { ThemeProvider as BaseThemeProvider } from "styled-components";
|
|
4
|
-
import theme from "../
|
|
4
|
+
import theme from "../themes/default/theme";
|
|
5
5
|
|
|
6
|
-
import typeof { default as TypeTheme } from "../
|
|
6
|
+
import typeof { default as TypeTheme } from "../themes/default/theme";
|
|
7
7
|
|
|
8
8
|
type TypeProps = $ReadOnly<{|
|
|
9
9
|
theme?: TypeTheme,
|
package/__flow__/Toast/index.js
CHANGED
package/__flow__/Toast/styles.js
CHANGED
|
@@ -18,14 +18,14 @@ const Container = styled<typeof Box, TypeTheme, TypeProps>(Box)`
|
|
|
18
18
|
font-family: ${(p) => p.theme.fontFamily};
|
|
19
19
|
${(p) => p.theme.typography[200]}
|
|
20
20
|
position: relative;
|
|
21
|
-
background: ${(p) => p.theme.colors.background.
|
|
22
|
-
border-left: 2px solid ${(p) => p.theme.colors[p.type]
|
|
21
|
+
background: ${(p) => p.theme.colors.container.background.base};
|
|
22
|
+
border-left: 2px solid ${(p) => p.theme.colors.container.border[p.type]};
|
|
23
23
|
`;
|
|
24
24
|
|
|
25
25
|
export const CustomIcon = styled<typeof Icon, TypeTheme, TypeProps>(Icon)`
|
|
26
26
|
margin-right: ${(props) => props.theme.space[400]};
|
|
27
27
|
transform: translateY(4px);
|
|
28
|
-
color: ${(p) => (p.customColor ? undefined : p.theme.colors[p.type]
|
|
28
|
+
color: ${(p) => (p.customColor ? undefined : p.theme.colors.icon[p.type])};
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
31
|
export const GlobalToastStyles = createGlobalStyle`
|
package/__flow__/Token/styles.js
CHANGED
|
@@ -14,8 +14,8 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
|
|
|
14
14
|
${(props) => props.theme.space[300]};
|
|
15
15
|
margin: 0;
|
|
16
16
|
color: ${(props) => props.theme.colors.text.body};
|
|
17
|
-
background: ${(props) => props.theme.colors.background.
|
|
18
|
-
border: 1px solid ${(props) => props.theme.colors.
|
|
17
|
+
background: ${(props) => props.theme.colors.container.background.base};
|
|
18
|
+
border: 1px solid ${(props) => props.theme.colors.container.border.base};
|
|
19
19
|
font-weight: ${(props) => props.theme.fontWeights.normal};
|
|
20
20
|
line-height: 1;
|
|
21
21
|
vertical-align: middle;
|
|
@@ -36,8 +36,10 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
|
|
|
36
36
|
&:hover,
|
|
37
37
|
&:active {
|
|
38
38
|
color: ${(props) => props.theme.colors.text.body};
|
|
39
|
-
border: 1px solid
|
|
40
|
-
|
|
39
|
+
border: 1px solid
|
|
40
|
+
${(props) => props.theme.colors.container.border.decorative.neutral};
|
|
41
|
+
background-color: ${(props) =>
|
|
42
|
+
props.theme.colors.container.background.decorative.neutral};
|
|
41
43
|
}
|
|
42
44
|
`}
|
|
43
45
|
|
|
@@ -46,19 +48,26 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
|
|
|
46
48
|
css`
|
|
47
49
|
opacity: 0.4;
|
|
48
50
|
cursor: not-allowed;
|
|
51
|
+
&:hover,
|
|
52
|
+
&:active {
|
|
53
|
+
background: ${(props) => props.theme.colors.container.background.base};
|
|
54
|
+
border: 1px solid ${(props) => props.theme.colors.container.border.base};
|
|
55
|
+
}
|
|
49
56
|
`}
|
|
50
57
|
|
|
51
58
|
${(props) =>
|
|
52
59
|
!props.valid &&
|
|
53
60
|
css`
|
|
54
|
-
color: ${(props) => props.theme.colors.text.
|
|
55
|
-
border-color: ${(props) => props.theme.colors.error
|
|
56
|
-
background: ${(props) => props.theme.colors.error
|
|
61
|
+
color: ${(props) => props.theme.colors.text.body};
|
|
62
|
+
border-color: ${(props) => props.theme.colors.container.border.error};
|
|
63
|
+
background: ${(props) => props.theme.colors.container.background.error};
|
|
57
64
|
|
|
58
65
|
&:hover {
|
|
59
|
-
color: ${(props) => props.theme.colors.text.
|
|
60
|
-
border
|
|
61
|
-
|
|
66
|
+
color: ${(props) => props.theme.colors.text.body};
|
|
67
|
+
border: 1px solid
|
|
68
|
+
${(props) => props.theme.colors.container.border.error};
|
|
69
|
+
background-color: ${(props) =>
|
|
70
|
+
props.theme.colors.container.background.error};
|
|
62
71
|
}
|
|
63
72
|
`}
|
|
64
73
|
|
|
@@ -255,7 +255,7 @@ export default class TokenInput extends React.Component<TypeProps, TypeState> {
|
|
|
255
255
|
};
|
|
256
256
|
|
|
257
257
|
renderToken(token: TypeTokenSpec): React.Node {
|
|
258
|
-
const { iconName: defaultIconName } = this.props;
|
|
258
|
+
const { iconName: defaultIconName, disabled } = this.props;
|
|
259
259
|
const activeId = this.state.activeToken;
|
|
260
260
|
const { id, iconName: tokenIconName, value, valid } = token;
|
|
261
261
|
const iconName = tokenIconName || defaultIconName;
|
|
@@ -267,6 +267,7 @@ export default class TokenInput extends React.Component<TypeProps, TypeState> {
|
|
|
267
267
|
onClick={(e) => this.handleClickToken(e, token)}
|
|
268
268
|
valid={valid}
|
|
269
269
|
active={isActive}
|
|
270
|
+
disabled={disabled}
|
|
270
271
|
>
|
|
271
272
|
<Box display="flex" alignItems="center">
|
|
272
273
|
{iconName && <Icon name={iconName} size="mini" pr={300} />}
|
|
@@ -14,12 +14,12 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
14
14
|
align-content: center;
|
|
15
15
|
cursor: text;
|
|
16
16
|
width: 100%;
|
|
17
|
-
border: 1px solid ${(props) => props.theme.colors.
|
|
17
|
+
border: 1px solid ${(props) => props.theme.colors.form.border.base};
|
|
18
18
|
border-radius: ${(props) => props.theme.radii[500]};
|
|
19
19
|
margin: 0;
|
|
20
20
|
padding: ${(props) => props.theme.space[300]};
|
|
21
21
|
padding-top: ${(props) => props.theme.space[200]};
|
|
22
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
22
|
+
background-color: ${(props) => props.theme.colors.form.background.base};
|
|
23
23
|
color: ${(props) => props.theme.colors.text.body};
|
|
24
24
|
transition: border-color ${(props) => props.theme.duration.fast}
|
|
25
25
|
${(props) => props.theme.easing.ease_in},
|
|
@@ -46,7 +46,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
46
46
|
${(props) => props.theme.space[300]} ${(props) => props.theme.space[100]}
|
|
47
47
|
0;
|
|
48
48
|
color: ${(props) => props.theme.colors.text.body};
|
|
49
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
49
|
+
background-color: ${(props) => props.theme.colors.form.background.base};
|
|
50
50
|
/** This matches the height of the token so size does not change as tokens are added */
|
|
51
51
|
min-height: 20px;
|
|
52
52
|
|
|
@@ -68,10 +68,18 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
68
68
|
&:not(output):not(:focus):-moz-ui-invalid {
|
|
69
69
|
box-shadow: none;
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
${(props) =>
|
|
73
|
+
props.disabled &&
|
|
74
|
+
css`
|
|
75
|
+
opacity: 0.4;
|
|
76
|
+
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
`}
|
|
71
79
|
}
|
|
72
80
|
|
|
73
81
|
&:placeholder {
|
|
74
|
-
color: ${(props) => props.theme.colors.
|
|
82
|
+
color: ${(props) => props.theme.colors.form.placeholder.base};
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
${(props) =>
|
|
@@ -104,13 +112,13 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
104
112
|
${(props) =>
|
|
105
113
|
props.invalid &&
|
|
106
114
|
css`
|
|
107
|
-
border-color: ${(props) => props.theme.colors.error
|
|
115
|
+
border-color: ${(props) => props.theme.colors.form.border.error};
|
|
108
116
|
`}
|
|
109
117
|
|
|
110
118
|
${(props) =>
|
|
111
119
|
props.warning &&
|
|
112
120
|
css`
|
|
113
|
-
border-color: ${(props) => props.theme.colors.warning
|
|
121
|
+
border-color: ${(props) => props.theme.colors.form.border.warning};
|
|
114
122
|
`}
|
|
115
123
|
|
|
116
124
|
${COMMON}
|
|
@@ -158,10 +158,10 @@ const Content = ({
|
|
|
158
158
|
py={appearance === "box" ? 400 : 200}
|
|
159
159
|
m={200}
|
|
160
160
|
color="text.body"
|
|
161
|
-
bg="background.
|
|
161
|
+
bg="container.background.base"
|
|
162
162
|
boxShadow={300}
|
|
163
163
|
border={500}
|
|
164
|
-
borderColor="border"
|
|
164
|
+
borderColor="container.border.base"
|
|
165
165
|
// $FlowIssue - upgrade v0.112.0
|
|
166
166
|
{...rest}
|
|
167
167
|
>
|
package/__flow__/index.js
CHANGED
|
@@ -3,8 +3,8 @@ export type { EnumIconNames } from "./EnumIconNames";
|
|
|
3
3
|
export type { TypeTheme } from "./types/theme.flow";
|
|
4
4
|
export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
|
|
5
5
|
export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
|
|
6
|
-
export { default as theme } from "./
|
|
7
|
-
export { default as darkTheme } from "./themes/dark";
|
|
6
|
+
export { default as theme } from "./themes/default/theme";
|
|
7
|
+
export { default as darkTheme } from "./themes/dark/theme";
|
|
8
8
|
export { default as Icon } from "./Icon";
|
|
9
9
|
// DEPRECATED: Alert has been renamed to Banner
|
|
10
10
|
export { default as Alert } from "./Banner";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import COLORS from "@sproutsocial/seeds-color";
|
|
2
|
+
|
|
3
|
+
export const green = {
|
|
4
|
+
background: COLORS.COLOR_GREEN_900,
|
|
5
|
+
highlight: COLORS.COLOR_GREEN_500,
|
|
6
|
+
foreground: COLORS.COLOR_GREEN_100,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const blue = {
|
|
10
|
+
background: COLORS.COLOR_BLUE_900,
|
|
11
|
+
highlight: COLORS.COLOR_BLUE_600,
|
|
12
|
+
foreground: COLORS.COLOR_BLUE_100,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const purple = {
|
|
16
|
+
background: COLORS.COLOR_PURPLE_800,
|
|
17
|
+
highlight: COLORS.COLOR_PURPLE_500,
|
|
18
|
+
foreground: COLORS.COLOR_PURPLE_100,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const yellow = {
|
|
22
|
+
background: COLORS.COLOR_YELLOW_900,
|
|
23
|
+
highlight: COLORS.COLOR_YELLOW_600,
|
|
24
|
+
foreground: COLORS.COLOR_YELLOW_100,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const orange = {
|
|
28
|
+
background: COLORS.COLOR_ORANGE_900,
|
|
29
|
+
highlight: COLORS.COLOR_ORANGE_600,
|
|
30
|
+
foreground: COLORS.COLOR_ORANGE_100,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const red = {
|
|
34
|
+
background: COLORS.COLOR_RED_900,
|
|
35
|
+
highlight: COLORS.COLOR_RED_600,
|
|
36
|
+
foreground: COLORS.COLOR_RED_100,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const neutral = {
|
|
40
|
+
background: COLORS.COLOR_NEUTRAL_900,
|
|
41
|
+
highlight: COLORS.COLOR_NEUTRAL_500,
|
|
42
|
+
foreground: COLORS.COLOR_NEUTRAL_100,
|
|
43
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
|
|
3
|
+
import COLORS from "@sproutsocial/seeds-color";
|
|
4
|
+
import defaultTheme from "../default/theme";
|
|
5
|
+
import {
|
|
6
|
+
green,
|
|
7
|
+
blue,
|
|
8
|
+
purple,
|
|
9
|
+
yellow,
|
|
10
|
+
orange,
|
|
11
|
+
red,
|
|
12
|
+
neutral,
|
|
13
|
+
} from "./decorative-palettes";
|
|
14
|
+
|
|
15
|
+
const darkTheme = {
|
|
16
|
+
...defaultTheme,
|
|
17
|
+
colors: {
|
|
18
|
+
...defaultTheme.colors,
|
|
19
|
+
app: {
|
|
20
|
+
background: {
|
|
21
|
+
base: COLORS.COLOR_NEUTRAL_1000,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
container: {
|
|
25
|
+
background: {
|
|
26
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
27
|
+
success: green.background,
|
|
28
|
+
warning: yellow.background,
|
|
29
|
+
error: red.background,
|
|
30
|
+
info: blue.background,
|
|
31
|
+
opportunity: purple.background,
|
|
32
|
+
danger: red.background,
|
|
33
|
+
decorative: {
|
|
34
|
+
green: green.background,
|
|
35
|
+
blue: blue.background,
|
|
36
|
+
purple: purple.background,
|
|
37
|
+
yellow: yellow.background,
|
|
38
|
+
orange: orange.background,
|
|
39
|
+
red: red.background,
|
|
40
|
+
neutral: neutral.background,
|
|
41
|
+
},
|
|
42
|
+
selected: COLORS.COLOR_NEUTRAL_0,
|
|
43
|
+
},
|
|
44
|
+
border: {
|
|
45
|
+
base: COLORS.COLOR_NEUTRAL_1100,
|
|
46
|
+
success: green.highlight,
|
|
47
|
+
warning: yellow.highlight,
|
|
48
|
+
error: red.highlight,
|
|
49
|
+
danger: red.highlight,
|
|
50
|
+
info: blue.highlight,
|
|
51
|
+
opportunity: purple.highlight,
|
|
52
|
+
decorative: {
|
|
53
|
+
green: green.highlight,
|
|
54
|
+
blue: blue.highlight,
|
|
55
|
+
purple: purple.highlight,
|
|
56
|
+
yellow: yellow.highlight,
|
|
57
|
+
orange: orange.highlight,
|
|
58
|
+
red: red.highlight,
|
|
59
|
+
neutral: neutral.highlight,
|
|
60
|
+
},
|
|
61
|
+
selected: COLORS.COLOR_NEUTRAL_0,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
button: {
|
|
65
|
+
primary: {
|
|
66
|
+
background: {
|
|
67
|
+
base: COLORS.COLOR_BLUE_400,
|
|
68
|
+
hover: COLORS.COLOR_BLUE_300,
|
|
69
|
+
active: COLORS.COLOR_BLUE_200,
|
|
70
|
+
},
|
|
71
|
+
border: {
|
|
72
|
+
base: "transparent",
|
|
73
|
+
},
|
|
74
|
+
text: {
|
|
75
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
76
|
+
hover: COLORS.COLOR_NEUTRAL_1000,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
secondary: {
|
|
80
|
+
background: {
|
|
81
|
+
base: "transparent",
|
|
82
|
+
hover: COLORS.COLOR_NEUTRAL_100,
|
|
83
|
+
active: COLORS.COLOR_NEUTRAL_0,
|
|
84
|
+
},
|
|
85
|
+
border: {
|
|
86
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
87
|
+
},
|
|
88
|
+
text: {
|
|
89
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
90
|
+
hover: COLORS.COLOR_NEUTRAL_800,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
pill: {
|
|
94
|
+
background: {
|
|
95
|
+
base: "transparent",
|
|
96
|
+
hover: COLORS.COLOR_NEUTRAL_1000,
|
|
97
|
+
active: COLORS.COLOR_NEUTRAL_900,
|
|
98
|
+
},
|
|
99
|
+
border: {
|
|
100
|
+
base: "transparent",
|
|
101
|
+
},
|
|
102
|
+
text: {
|
|
103
|
+
base: COLORS.COLOR_NEUTRAL_100,
|
|
104
|
+
hover: COLORS.COLOR_NEUTRAL_0,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
destructive: {
|
|
108
|
+
background: {
|
|
109
|
+
base: COLORS.COLOR_RED_400,
|
|
110
|
+
hover: COLORS.COLOR_RED_300,
|
|
111
|
+
active: COLORS.COLOR_RED_200,
|
|
112
|
+
},
|
|
113
|
+
border: {
|
|
114
|
+
base: "transparent",
|
|
115
|
+
},
|
|
116
|
+
text: {
|
|
117
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
118
|
+
hover: COLORS.COLOR_NEUTRAL_1000,
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
placeholder: {
|
|
122
|
+
background: {
|
|
123
|
+
base: "transparent",
|
|
124
|
+
hover: COLORS.COLOR_NEUTRAL_1100,
|
|
125
|
+
active: COLORS.COLOR_NEUTRAL_1100,
|
|
126
|
+
},
|
|
127
|
+
border: {
|
|
128
|
+
base: COLORS.COLOR_NEUTRAL_500,
|
|
129
|
+
},
|
|
130
|
+
text: {
|
|
131
|
+
base: COLORS.COLOR_BLUE_400,
|
|
132
|
+
hover: COLORS.COLOR_BLUE_300,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
unstyled: {
|
|
136
|
+
background: {
|
|
137
|
+
base: "transparent",
|
|
138
|
+
},
|
|
139
|
+
border: {
|
|
140
|
+
base: "transparent",
|
|
141
|
+
},
|
|
142
|
+
text: {
|
|
143
|
+
base: COLORS.COLOR_NEUTRAL_300,
|
|
144
|
+
hover: COLORS.COLOR_NEUTRAL_200,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
link: {
|
|
149
|
+
base: COLORS.COLOR_BLUE_400,
|
|
150
|
+
hover: COLORS.COLOR_BLUE_300,
|
|
151
|
+
},
|
|
152
|
+
text: {
|
|
153
|
+
headline: COLORS.COLOR_NEUTRAL_0,
|
|
154
|
+
subtext: COLORS.COLOR_NEUTRAL_300,
|
|
155
|
+
body: COLORS.COLOR_NEUTRAL_100,
|
|
156
|
+
inverse: COLORS.COLOR_NEUTRAL_900,
|
|
157
|
+
error: COLORS.COLOR_RED_400,
|
|
158
|
+
},
|
|
159
|
+
icon: {
|
|
160
|
+
base: COLORS.COLOR_NEUTRAL_100,
|
|
161
|
+
inverse: COLORS.COLOR_NEUTRAL_900,
|
|
162
|
+
success: green.foreground,
|
|
163
|
+
warning: yellow.foreground,
|
|
164
|
+
error: red.foreground,
|
|
165
|
+
danger: red.foreground,
|
|
166
|
+
info: blue.foreground,
|
|
167
|
+
opportunity: purple.foreground,
|
|
168
|
+
},
|
|
169
|
+
form: {
|
|
170
|
+
background: {
|
|
171
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
172
|
+
selected: COLORS.COLOR_NEUTRAL_0,
|
|
173
|
+
},
|
|
174
|
+
border: {
|
|
175
|
+
base: COLORS.COLOR_NEUTRAL_500,
|
|
176
|
+
error: red.highlight,
|
|
177
|
+
warning: yellow.highlight,
|
|
178
|
+
selected: COLORS.COLOR_NEUTRAL_0,
|
|
179
|
+
},
|
|
180
|
+
placeholder: {
|
|
181
|
+
base: COLORS.COLOR_NEUTRAL_500,
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
listItem: {
|
|
185
|
+
background: {
|
|
186
|
+
base: "transparent",
|
|
187
|
+
hover: COLORS.COLOR_NEUTRAL_800,
|
|
188
|
+
selected: COLORS.COLOR_NEUTRAL_0,
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
mode: "dark",
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export default darkTheme;
|