@sproutsocial/racine 8.8.0-dar35-beta.0 → 9.1.0-token-beta.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 +16 -0
- package/__flow__/Button/styles.js +1 -1
- package/__flow__/Card/styles.js +1 -1
- package/__flow__/Drawer/index.stories.js +3 -3
- package/__flow__/Drawer/styles.js +1 -1
- package/__flow__/KeyboardKey/styles.js +1 -1
- package/__flow__/Menu/index.stories.js +1 -1
- package/__flow__/Modal/__snapshots__/index.test.js.snap +1 -1
- package/__flow__/Modal/styles.js +1 -1
- package/__flow__/Popout/index.js +1 -1
- package/__flow__/Token/index.js +4 -1
- package/__flow__/Token/index.stories.js +11 -0
- package/__flow__/Token/styles.js +43 -33
- package/__flow__/Tooltip/index.js +1 -1
- package/__flow__/themes/_themes.scss +23 -25
- package/__flow__/themes/dark/theme.js +179 -159
- package/__flow__/themes/default/theme.js +15 -8
- package/__flow__/themes/utils/interact.js +12 -0
- package/__flow__/types/system-props.flow.js +1 -2
- package/commonjs/Button/styles.js +1 -1
- package/commonjs/Card/styles.js +1 -1
- package/commonjs/Drawer/styles.js +1 -1
- package/commonjs/KeyboardKey/styles.js +1 -1
- package/commonjs/Modal/styles.js +1 -1
- package/commonjs/Popout/index.js +1 -1
- package/commonjs/Token/index.js +5 -2
- package/commonjs/Token/styles.js +19 -50
- package/commonjs/Tooltip/index.js +1 -1
- package/commonjs/themes/dark/theme.js +178 -157
- package/commonjs/themes/default/theme.js +15 -8
- package/commonjs/themes/utils/interact.js +19 -0
- package/dist/themes/_themes.scss +23 -25
- package/dist/themes/dark.scss +18 -11
- package/dist/themes/default.scss +14 -15
- package/lib/Button/styles.js +1 -1
- package/lib/Card/styles.js +1 -1
- package/lib/Drawer/styles.js +1 -1
- package/lib/KeyboardKey/styles.js +1 -1
- package/lib/Modal/styles.js +1 -1
- package/lib/Popout/index.js +1 -1
- package/lib/Token/index.js +5 -2
- package/lib/Token/styles.js +19 -50
- package/lib/Tooltip/index.js +1 -1
- package/lib/themes/dark/theme.js +173 -156
- package/lib/themes/default/theme.js +14 -8
- package/lib/themes/utils/interact.js +13 -0
- package/package.json +2 -2
package/dist/themes/default.scss
CHANGED
|
@@ -85,10 +85,9 @@ $default: (
|
|
|
85
85
|
500: 1px
|
|
86
86
|
),
|
|
87
87
|
shadows: (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
400: 0px 16px 32px rgba(39,51,51,.24)
|
|
88
|
+
low: 0px 2px 4px rgba(39,51,51,.24) #2733333D,
|
|
89
|
+
medium: 0px 8px 16px rgba(39,51,51,.24) #2733333D,
|
|
90
|
+
high: 0px 16px 32px rgba(39,51,51,.24) #2733333D
|
|
92
91
|
),
|
|
93
92
|
easing: (
|
|
94
93
|
ease_in: cubic-bezier(.4, 0, .7, .2),
|
|
@@ -101,6 +100,9 @@ $default: (
|
|
|
101
100
|
slow: .6s
|
|
102
101
|
),
|
|
103
102
|
default: (
|
|
103
|
+
utils: (
|
|
104
|
+
|
|
105
|
+
),
|
|
104
106
|
breakpoints: (900px, 1200px, 1500px, 1800px),
|
|
105
107
|
colors: (
|
|
106
108
|
app: (
|
|
@@ -275,6 +277,9 @@ $default: (
|
|
|
275
277
|
selected: #364141
|
|
276
278
|
)
|
|
277
279
|
),
|
|
280
|
+
elevation: (
|
|
281
|
+
base: #2733333D
|
|
282
|
+
),
|
|
278
283
|
network: (
|
|
279
284
|
twitter: #1da1f2,
|
|
280
285
|
twitter_like: #e0245e,
|
|
@@ -668,16 +673,9 @@ $default: (
|
|
|
668
673
|
500: 1px
|
|
669
674
|
),
|
|
670
675
|
shadows: (
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
400: 0px 16px 32px rgba(39,51,51,.24),
|
|
675
|
-
shadows: (
|
|
676
|
-
100: 0px 2px 4px rgba(39,51,51,.24),
|
|
677
|
-
200: 0px 4px 8px rgba(39,51,51,.24),
|
|
678
|
-
300: 0px 8px 16px rgba(39,51,51,.24),
|
|
679
|
-
400: 0px 16px 32px rgba(39,51,51,.24)
|
|
680
|
-
)
|
|
676
|
+
low: 0px 2px 4px rgba(39,51,51,.24) #2733333D,
|
|
677
|
+
medium: 0px 8px 16px rgba(39,51,51,.24) #2733333D,
|
|
678
|
+
high: 0px 16px 32px rgba(39,51,51,.24) #2733333D
|
|
681
679
|
),
|
|
682
680
|
easing: (
|
|
683
681
|
ease_in: cubic-bezier(.4, 0, .7, .2),
|
|
@@ -688,6 +686,7 @@ $default: (
|
|
|
688
686
|
fast: .15s,
|
|
689
687
|
medium: .3s,
|
|
690
688
|
slow: .6s
|
|
691
|
-
)
|
|
689
|
+
),
|
|
690
|
+
mode: default-light
|
|
692
691
|
)
|
|
693
692
|
);
|
package/lib/Button/styles.js
CHANGED
|
@@ -32,7 +32,7 @@ var Container = styled.button.withConfig({
|
|
|
32
32
|
}, function (props) {
|
|
33
33
|
return props.theme.colors.button[props.appearance].background.hover;
|
|
34
34
|
}, function (props) {
|
|
35
|
-
return props.appearance === "placeholder" ? props.theme.shadows
|
|
35
|
+
return props.appearance === "placeholder" ? props.theme.shadows.low : "none";
|
|
36
36
|
}, function (props) {
|
|
37
37
|
return props.theme.colors.button[props.appearance].text.hover;
|
|
38
38
|
}, function (props) {
|
package/lib/Card/styles.js
CHANGED
|
@@ -9,7 +9,7 @@ var Container = styled(Box).withConfig({
|
|
|
9
9
|
}, function (props) {
|
|
10
10
|
return props.theme.radii[500];
|
|
11
11
|
}, function (props) {
|
|
12
|
-
return props.theme.shadows
|
|
12
|
+
return props.theme.shadows.low;
|
|
13
13
|
}, function (props) {
|
|
14
14
|
return props.theme.duration.medium;
|
|
15
15
|
}, function (props) {
|
package/lib/Drawer/styles.js
CHANGED
|
@@ -13,7 +13,7 @@ var Container = styled.div.withConfig({
|
|
|
13
13
|
}, function (props) {
|
|
14
14
|
return props.theme.colors.container.background.base;
|
|
15
15
|
}, function (props) {
|
|
16
|
-
return props.theme.shadows
|
|
16
|
+
return props.theme.shadows.high;
|
|
17
17
|
}, function (props) {
|
|
18
18
|
return css(["", ":", "px;"], props.direction, props.offset);
|
|
19
19
|
}, COMMON);
|
|
@@ -12,7 +12,7 @@ var Container = styled.div.withConfig({
|
|
|
12
12
|
}, function (props) {
|
|
13
13
|
return props.theme.radii[500];
|
|
14
14
|
}, function (props) {
|
|
15
|
-
return props.theme.shadows
|
|
15
|
+
return props.theme.shadows.low;
|
|
16
16
|
}, function (props) {
|
|
17
17
|
return props.theme.space[200];
|
|
18
18
|
}, COMMON);
|
package/lib/Modal/styles.js
CHANGED
|
@@ -53,7 +53,7 @@ export var Container = styled(ReactModalAdapter).withConfig({
|
|
|
53
53
|
}, function (props) {
|
|
54
54
|
return props.theme.radii[500];
|
|
55
55
|
}, function (props) {
|
|
56
|
-
return props.theme.shadows
|
|
56
|
+
return props.theme.shadows.medium;
|
|
57
57
|
}, function (props) {
|
|
58
58
|
return props.theme.colors.text.body;
|
|
59
59
|
}, BODY_PADDING, BODY_PADDING, BODY_PADDING, width, COMMON);
|
package/lib/Popout/index.js
CHANGED
package/lib/Token/index.js
CHANGED
|
@@ -18,14 +18,17 @@ var Token = function Token(_ref) {
|
|
|
18
18
|
valid = _ref$valid === void 0 ? true : _ref$valid,
|
|
19
19
|
_ref$disabled = _ref.disabled,
|
|
20
20
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
21
|
-
|
|
21
|
+
_ref$palette = _ref.palette,
|
|
22
|
+
palette = _ref$palette === void 0 ? "neutral" : _ref$palette,
|
|
23
|
+
rest = _objectWithoutPropertiesLoose(_ref, ["children", "closeable", "onClick", "qa", "valid", "disabled", "palette"]);
|
|
22
24
|
|
|
23
25
|
var textContainer = useTextContent("");
|
|
24
26
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
25
27
|
ref: textContainer,
|
|
26
28
|
valid: valid,
|
|
27
|
-
|
|
29
|
+
palette: palette,
|
|
28
30
|
type: closeable || onClick ? "button" : undefined,
|
|
31
|
+
as: closeable || onClick ? "button" : "div",
|
|
29
32
|
closeable: closeable || onClick,
|
|
30
33
|
disabled: disabled,
|
|
31
34
|
onClick: onClick,
|
package/lib/Token/styles.js
CHANGED
|
@@ -4,55 +4,24 @@ import { focusRing } from "../utils/mixins";
|
|
|
4
4
|
var Container = styled.button.withConfig({
|
|
5
5
|
displayName: "styles__Container",
|
|
6
6
|
componentId: "nyn5zy-0"
|
|
7
|
-
})(["
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
return props.theme.duration.fast;
|
|
27
|
-
}, function (props) {
|
|
28
|
-
return props.theme.easing.ease_inout;
|
|
29
|
-
}, focusRing, function (props) {
|
|
30
|
-
return props.closeable && css(["cursor:pointer;&:hover,&:active{color:", ";border:1px solid ", ";background-color:", ";}"], function (props) {
|
|
31
|
-
return props.theme.colors.text.body;
|
|
32
|
-
}, function (props) {
|
|
33
|
-
return props.theme.colors.container.border.decorative.neutral;
|
|
34
|
-
}, function (props) {
|
|
35
|
-
return props.theme.colors.container.background.decorative.neutral;
|
|
36
|
-
});
|
|
37
|
-
}, function (props) {
|
|
38
|
-
return props.disabled && css(["opacity:0.4;cursor:not-allowed;&:hover,&:active{background:", ";border:1px solid ", ";}"], function (props) {
|
|
39
|
-
return props.theme.colors.container.background.base;
|
|
40
|
-
}, function (props) {
|
|
41
|
-
return props.theme.colors.container.border.base;
|
|
42
|
-
});
|
|
43
|
-
}, function (props) {
|
|
44
|
-
return !props.valid && css(["color:", ";border-color:", ";background:", ";&:hover{color:", ";border:1px solid ", ";background-color:", ";}"], function (props) {
|
|
45
|
-
return props.theme.colors.text.body;
|
|
46
|
-
}, function (props) {
|
|
47
|
-
return props.theme.colors.container.border.error;
|
|
48
|
-
}, function (props) {
|
|
49
|
-
return props.theme.colors.container.background.error;
|
|
50
|
-
}, function (props) {
|
|
51
|
-
return props.theme.colors.text.body;
|
|
52
|
-
}, function (props) {
|
|
53
|
-
return props.theme.colors.container.border.error;
|
|
54
|
-
}, function (props) {
|
|
55
|
-
return props.theme.colors.container.background.error;
|
|
56
|
-
});
|
|
7
|
+
})(["position:relative;display:inline-block;margin:0;line-height:1;vertical-align:middle;outline:none;", " &:focus{", "}", " ", " ", " ", " ", ""], function (_ref) {
|
|
8
|
+
var theme = _ref.theme;
|
|
9
|
+
return css(["", " font-family:", ";font-weight:", ";border:1px solid ", ";border-radius:", ";color:", ";background:", ";padding:", " ", ";transition:all ", " ", ";"], theme.typography[200], theme.fontFamily, theme.fontWeights.normal, theme.colors.container.border.base, theme.radii[500], theme.colors.text.body, theme.colors.container.background.base, theme.space[200], theme.space[300], theme.duration.fast, theme.easing.ease_inout);
|
|
10
|
+
}, focusRing, function (_ref2) {
|
|
11
|
+
var theme = _ref2.theme,
|
|
12
|
+
palette = _ref2.palette;
|
|
13
|
+
return palette === "blue" && css(["color:", ";background:", ";border:1px solid ", ";&:hover,&:active{cursor:pointer;box-shadow:", ";border:1px solid ", ";}"], theme.colors.text.body, theme.colors.container.background.decorative.blue, theme.colors.container.border.decorative.blue, theme.shadows.low, theme.utils.interact(theme.colors.container.border.decorative.blue));
|
|
14
|
+
}, function (_ref3) {
|
|
15
|
+
var closeable = _ref3.closeable,
|
|
16
|
+
theme = _ref3.theme;
|
|
17
|
+
return closeable && css(["cursor:pointer;&:hover,&:active{box-shadow:", ";border:1px solid ", ";}"], theme.shadows.low, theme.utils.interact(theme.colors.container.border.base));
|
|
18
|
+
}, function (_ref4) {
|
|
19
|
+
var disabled = _ref4.disabled,
|
|
20
|
+
theme = _ref4.theme;
|
|
21
|
+
return disabled && css(["opacity:0.4;cursor:not-allowed;&:hover,&:active{box-shadow:none;border:1px solid ", ";}"], theme.colors.container.border.base);
|
|
22
|
+
}, function (_ref5) {
|
|
23
|
+
var valid = _ref5.valid,
|
|
24
|
+
theme = _ref5.theme;
|
|
25
|
+
return !valid && css(["color:", ";background:", ";border:1px solid ", ";&:hover{box-shadow:", ";border:1px solid ", ";}"], theme.colors.text.error, theme.colors.container.background.error, theme.colors.container.border.error, theme.shadows.low, theme.utils.interact(theme.colors.container.border.error));
|
|
57
26
|
}, COMMON);
|
|
58
27
|
export default Container;
|
package/lib/Tooltip/index.js
CHANGED
|
@@ -118,7 +118,7 @@ var Content = function Content(_ref2) {
|
|
|
118
118
|
m: 200,
|
|
119
119
|
color: "text.body",
|
|
120
120
|
bg: "container.background.base",
|
|
121
|
-
boxShadow:
|
|
121
|
+
boxShadow: "medium",
|
|
122
122
|
border: 500,
|
|
123
123
|
borderColor: "container.border.base" // $FlowIssue - upgrade v0.112.0
|
|
124
124
|
|
package/lib/themes/dark/theme.js
CHANGED
|
@@ -1,190 +1,207 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import COLORS from "@sproutsocial/seeds-color";
|
|
4
|
+
import DEPTH from "@sproutsocial/seeds-depth";
|
|
4
5
|
import defaultTheme from "../default/theme";
|
|
5
6
|
import { datavizPalette } from "./dataviz-palette";
|
|
6
7
|
import { green, blue, purple, yellow, orange, red, neutral } from "./decorative-palettes";
|
|
8
|
+
import interact from "../utils/interact";
|
|
9
|
+
var MODE = "default-dark";
|
|
10
|
+
export var shadows = {
|
|
11
|
+
low: DEPTH.ELEVATION_LEVEL_100 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF",
|
|
12
|
+
medium: DEPTH.ELEVATION_LEVEL_300 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF",
|
|
13
|
+
high: DEPTH.ELEVATION_LEVEL_400 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF"
|
|
14
|
+
};
|
|
7
15
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
var colors = _extends({}, defaultTheme.colors, {
|
|
17
|
+
utils: {
|
|
18
|
+
interact: interact(MODE)
|
|
19
|
+
},
|
|
20
|
+
app: {
|
|
21
|
+
background: {
|
|
22
|
+
base: COLORS.COLOR_NEUTRAL_1000
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
container: {
|
|
26
|
+
background: {
|
|
27
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
28
|
+
success: green.background,
|
|
29
|
+
warning: yellow.background,
|
|
30
|
+
error: red.background,
|
|
31
|
+
info: blue.background,
|
|
32
|
+
opportunity: purple.background,
|
|
33
|
+
danger: red.background,
|
|
34
|
+
decorative: {
|
|
35
|
+
green: green.background,
|
|
36
|
+
blue: blue.background,
|
|
37
|
+
purple: purple.background,
|
|
38
|
+
yellow: yellow.background,
|
|
39
|
+
orange: orange.background,
|
|
40
|
+
red: red.background,
|
|
41
|
+
neutral: neutral.background
|
|
42
|
+
},
|
|
43
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
44
|
+
},
|
|
45
|
+
border: {
|
|
46
|
+
base: COLORS.COLOR_NEUTRAL_1100,
|
|
47
|
+
success: green.highlight,
|
|
48
|
+
warning: yellow.highlight,
|
|
49
|
+
error: red.highlight,
|
|
50
|
+
danger: red.highlight,
|
|
51
|
+
info: blue.highlight,
|
|
52
|
+
opportunity: purple.highlight,
|
|
53
|
+
decorative: {
|
|
54
|
+
green: green.highlight,
|
|
55
|
+
blue: blue.highlight,
|
|
56
|
+
purple: purple.highlight,
|
|
57
|
+
yellow: yellow.highlight,
|
|
58
|
+
orange: orange.highlight,
|
|
59
|
+
red: red.highlight,
|
|
60
|
+
neutral: neutral.highlight
|
|
61
|
+
},
|
|
62
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
button: {
|
|
66
|
+
primary: {
|
|
11
67
|
background: {
|
|
12
|
-
base: COLORS.
|
|
68
|
+
base: COLORS.COLOR_BLUE_400,
|
|
69
|
+
hover: COLORS.COLOR_BLUE_300,
|
|
70
|
+
active: COLORS.COLOR_BLUE_200
|
|
71
|
+
},
|
|
72
|
+
border: {
|
|
73
|
+
base: "transparent"
|
|
74
|
+
},
|
|
75
|
+
text: {
|
|
76
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
77
|
+
hover: COLORS.COLOR_NEUTRAL_1000
|
|
13
78
|
}
|
|
14
79
|
},
|
|
15
|
-
|
|
80
|
+
secondary: {
|
|
16
81
|
background: {
|
|
17
|
-
base:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
error: red.background,
|
|
21
|
-
info: blue.background,
|
|
22
|
-
opportunity: purple.background,
|
|
23
|
-
danger: red.background,
|
|
24
|
-
decorative: {
|
|
25
|
-
green: green.background,
|
|
26
|
-
blue: blue.background,
|
|
27
|
-
purple: purple.background,
|
|
28
|
-
yellow: yellow.background,
|
|
29
|
-
orange: orange.background,
|
|
30
|
-
red: red.background,
|
|
31
|
-
neutral: neutral.background
|
|
32
|
-
},
|
|
33
|
-
selected: COLORS.COLOR_NEUTRAL_0
|
|
82
|
+
base: "transparent",
|
|
83
|
+
hover: COLORS.COLOR_NEUTRAL_100,
|
|
84
|
+
active: COLORS.COLOR_NEUTRAL_0
|
|
34
85
|
},
|
|
35
86
|
border: {
|
|
36
|
-
base: COLORS.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
info: blue.highlight,
|
|
42
|
-
opportunity: purple.highlight,
|
|
43
|
-
decorative: {
|
|
44
|
-
green: green.highlight,
|
|
45
|
-
blue: blue.highlight,
|
|
46
|
-
purple: purple.highlight,
|
|
47
|
-
yellow: yellow.highlight,
|
|
48
|
-
orange: orange.highlight,
|
|
49
|
-
red: red.highlight,
|
|
50
|
-
neutral: neutral.highlight
|
|
51
|
-
},
|
|
52
|
-
selected: COLORS.COLOR_NEUTRAL_0
|
|
87
|
+
base: COLORS.COLOR_NEUTRAL_0
|
|
88
|
+
},
|
|
89
|
+
text: {
|
|
90
|
+
base: COLORS.COLOR_NEUTRAL_0,
|
|
91
|
+
hover: COLORS.COLOR_NEUTRAL_800
|
|
53
92
|
}
|
|
54
93
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
active: COLORS.COLOR_BLUE_200
|
|
61
|
-
},
|
|
62
|
-
border: {
|
|
63
|
-
base: "transparent"
|
|
64
|
-
},
|
|
65
|
-
text: {
|
|
66
|
-
base: COLORS.COLOR_NEUTRAL_900,
|
|
67
|
-
hover: COLORS.COLOR_NEUTRAL_1000
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
secondary: {
|
|
71
|
-
background: {
|
|
72
|
-
base: "transparent",
|
|
73
|
-
hover: COLORS.COLOR_NEUTRAL_100,
|
|
74
|
-
active: COLORS.COLOR_NEUTRAL_0
|
|
75
|
-
},
|
|
76
|
-
border: {
|
|
77
|
-
base: COLORS.COLOR_NEUTRAL_0
|
|
78
|
-
},
|
|
79
|
-
text: {
|
|
80
|
-
base: COLORS.COLOR_NEUTRAL_0,
|
|
81
|
-
hover: COLORS.COLOR_NEUTRAL_800
|
|
82
|
-
}
|
|
94
|
+
pill: {
|
|
95
|
+
background: {
|
|
96
|
+
base: "transparent",
|
|
97
|
+
hover: COLORS.COLOR_NEUTRAL_1000,
|
|
98
|
+
active: COLORS.COLOR_NEUTRAL_900
|
|
83
99
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
base: "transparent",
|
|
87
|
-
hover: COLORS.COLOR_NEUTRAL_1000,
|
|
88
|
-
active: COLORS.COLOR_NEUTRAL_900
|
|
89
|
-
},
|
|
90
|
-
border: {
|
|
91
|
-
base: "transparent"
|
|
92
|
-
},
|
|
93
|
-
text: {
|
|
94
|
-
base: COLORS.COLOR_NEUTRAL_100,
|
|
95
|
-
hover: COLORS.COLOR_NEUTRAL_0
|
|
96
|
-
}
|
|
100
|
+
border: {
|
|
101
|
+
base: "transparent"
|
|
97
102
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
base: COLORS.COLOR_NEUTRAL_900,
|
|
109
|
-
hover: COLORS.COLOR_NEUTRAL_1000
|
|
110
|
-
}
|
|
103
|
+
text: {
|
|
104
|
+
base: COLORS.COLOR_NEUTRAL_100,
|
|
105
|
+
hover: COLORS.COLOR_NEUTRAL_0
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
destructive: {
|
|
109
|
+
background: {
|
|
110
|
+
base: COLORS.COLOR_RED_400,
|
|
111
|
+
hover: COLORS.COLOR_RED_300,
|
|
112
|
+
active: COLORS.COLOR_RED_200
|
|
111
113
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
base: "transparent",
|
|
115
|
-
hover: COLORS.COLOR_NEUTRAL_1100,
|
|
116
|
-
active: COLORS.COLOR_NEUTRAL_1100
|
|
117
|
-
},
|
|
118
|
-
border: {
|
|
119
|
-
base: COLORS.COLOR_NEUTRAL_500
|
|
120
|
-
},
|
|
121
|
-
text: {
|
|
122
|
-
base: COLORS.COLOR_BLUE_400,
|
|
123
|
-
hover: COLORS.COLOR_BLUE_300
|
|
124
|
-
}
|
|
114
|
+
border: {
|
|
115
|
+
base: "transparent"
|
|
125
116
|
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
border: {
|
|
131
|
-
base: "transparent"
|
|
132
|
-
},
|
|
133
|
-
text: {
|
|
134
|
-
base: COLORS.COLOR_NEUTRAL_300,
|
|
135
|
-
hover: COLORS.COLOR_NEUTRAL_200
|
|
136
|
-
}
|
|
117
|
+
text: {
|
|
118
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
119
|
+
hover: COLORS.COLOR_NEUTRAL_1000
|
|
137
120
|
}
|
|
138
121
|
},
|
|
139
|
-
|
|
140
|
-
base: COLORS.COLOR_BLUE_400,
|
|
141
|
-
hover: COLORS.COLOR_BLUE_300
|
|
142
|
-
},
|
|
143
|
-
text: {
|
|
144
|
-
headline: COLORS.COLOR_NEUTRAL_0,
|
|
145
|
-
subtext: COLORS.COLOR_NEUTRAL_300,
|
|
146
|
-
body: COLORS.COLOR_NEUTRAL_100,
|
|
147
|
-
inverse: COLORS.COLOR_NEUTRAL_900,
|
|
148
|
-
error: COLORS.COLOR_RED_400
|
|
149
|
-
},
|
|
150
|
-
icon: {
|
|
151
|
-
base: COLORS.COLOR_NEUTRAL_100,
|
|
152
|
-
inverse: COLORS.COLOR_NEUTRAL_900,
|
|
153
|
-
success: green.foreground,
|
|
154
|
-
warning: yellow.foreground,
|
|
155
|
-
error: red.foreground,
|
|
156
|
-
danger: red.foreground,
|
|
157
|
-
info: blue.foreground,
|
|
158
|
-
opportunity: purple.foreground
|
|
159
|
-
},
|
|
160
|
-
form: {
|
|
122
|
+
placeholder: {
|
|
161
123
|
background: {
|
|
162
|
-
base:
|
|
163
|
-
|
|
124
|
+
base: "transparent",
|
|
125
|
+
hover: COLORS.COLOR_NEUTRAL_1100,
|
|
126
|
+
active: COLORS.COLOR_NEUTRAL_1100
|
|
164
127
|
},
|
|
165
128
|
border: {
|
|
166
|
-
base: COLORS.COLOR_NEUTRAL_500,
|
|
167
|
-
error: red.highlight,
|
|
168
|
-
warning: yellow.highlight,
|
|
169
|
-
selected: COLORS.COLOR_NEUTRAL_0
|
|
170
|
-
},
|
|
171
|
-
placeholder: {
|
|
172
129
|
base: COLORS.COLOR_NEUTRAL_500
|
|
130
|
+
},
|
|
131
|
+
text: {
|
|
132
|
+
base: COLORS.COLOR_BLUE_400,
|
|
133
|
+
hover: COLORS.COLOR_BLUE_300
|
|
173
134
|
}
|
|
174
135
|
},
|
|
175
|
-
|
|
136
|
+
unstyled: {
|
|
176
137
|
background: {
|
|
177
|
-
base: "transparent"
|
|
178
|
-
|
|
179
|
-
|
|
138
|
+
base: "transparent"
|
|
139
|
+
},
|
|
140
|
+
border: {
|
|
141
|
+
base: "transparent"
|
|
142
|
+
},
|
|
143
|
+
text: {
|
|
144
|
+
base: COLORS.COLOR_NEUTRAL_300,
|
|
145
|
+
hover: COLORS.COLOR_NEUTRAL_200
|
|
180
146
|
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
link: {
|
|
150
|
+
base: COLORS.COLOR_BLUE_400,
|
|
151
|
+
hover: COLORS.COLOR_BLUE_300
|
|
152
|
+
},
|
|
153
|
+
text: {
|
|
154
|
+
headline: COLORS.COLOR_NEUTRAL_0,
|
|
155
|
+
subtext: COLORS.COLOR_NEUTRAL_300,
|
|
156
|
+
body: COLORS.COLOR_NEUTRAL_100,
|
|
157
|
+
inverse: COLORS.COLOR_NEUTRAL_900,
|
|
158
|
+
error: COLORS.COLOR_RED_400
|
|
159
|
+
},
|
|
160
|
+
icon: {
|
|
161
|
+
base: COLORS.COLOR_NEUTRAL_100,
|
|
162
|
+
inverse: COLORS.COLOR_NEUTRAL_900,
|
|
163
|
+
success: green.foreground,
|
|
164
|
+
warning: yellow.foreground,
|
|
165
|
+
error: red.foreground,
|
|
166
|
+
danger: red.foreground,
|
|
167
|
+
info: blue.foreground,
|
|
168
|
+
opportunity: purple.foreground
|
|
169
|
+
},
|
|
170
|
+
form: {
|
|
171
|
+
background: {
|
|
172
|
+
base: COLORS.COLOR_NEUTRAL_900,
|
|
173
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
181
174
|
},
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
175
|
+
border: {
|
|
176
|
+
base: COLORS.COLOR_NEUTRAL_500,
|
|
177
|
+
error: red.highlight,
|
|
178
|
+
warning: yellow.highlight,
|
|
179
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
180
|
+
},
|
|
181
|
+
placeholder: {
|
|
182
|
+
base: COLORS.COLOR_NEUTRAL_500
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
listItem: {
|
|
186
|
+
background: {
|
|
187
|
+
base: "transparent",
|
|
188
|
+
hover: COLORS.COLOR_NEUTRAL_800,
|
|
189
|
+
selected: COLORS.COLOR_NEUTRAL_0
|
|
185
190
|
}
|
|
186
|
-
},
|
|
187
|
-
|
|
191
|
+
},
|
|
192
|
+
elevation: {
|
|
193
|
+
base: COLORS.COLOR_NEUTRAL_1100
|
|
194
|
+
},
|
|
195
|
+
dataviz: {
|
|
196
|
+
map: datavizPalette.DATAVIZ_COLORS_MAP,
|
|
197
|
+
list: datavizPalette.DATAVIZ_COLORS_LIST
|
|
198
|
+
}
|
|
199
|
+
}, datavizPalette);
|
|
200
|
+
|
|
201
|
+
var darkTheme = _extends({}, defaultTheme, {
|
|
202
|
+
colors: colors,
|
|
203
|
+
shadows: shadows,
|
|
204
|
+
mode: MODE
|
|
188
205
|
});
|
|
189
206
|
|
|
190
207
|
export default darkTheme;
|
|
@@ -10,7 +10,9 @@ import SPACE from "@sproutsocial/seeds-space";
|
|
|
10
10
|
import DEPTH from "@sproutsocial/seeds-depth";
|
|
11
11
|
import MOTION from "@sproutsocial/seeds-motion";
|
|
12
12
|
import BORDER from "@sproutsocial/seeds-border";
|
|
13
|
+
import interact from "../utils/interact";
|
|
13
14
|
export var breakpoints = ["900px", "1200px", "1500px", "1800px"];
|
|
15
|
+
var MODE = "default-light";
|
|
14
16
|
|
|
15
17
|
var colors = _extends({
|
|
16
18
|
app: {
|
|
@@ -185,6 +187,9 @@ var colors = _extends({
|
|
|
185
187
|
selected: COLORS.COLOR_NEUTRAL_800
|
|
186
188
|
}
|
|
187
189
|
},
|
|
190
|
+
elevation: {
|
|
191
|
+
base: COLORS.COLOR_NEUTRAL_900 + "3D"
|
|
192
|
+
},
|
|
188
193
|
network: {
|
|
189
194
|
twitter: NETWORKCOLORS.NETWORK_COLOR_TWITTER,
|
|
190
195
|
twitter_like: NETWORKCOLORS.NETWORK_COLOR_TWITTER_LIKE,
|
|
@@ -266,10 +271,9 @@ export var borderWidths = {
|
|
|
266
271
|
"500": BORDER.BORDER_WIDTH_500
|
|
267
272
|
};
|
|
268
273
|
export var shadows = {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
"400": DEPTH.ELEVATION_LEVEL_400
|
|
274
|
+
low: DEPTH.ELEVATION_LEVEL_100 + " " + COLORS.COLOR_NEUTRAL_900 + "3D",
|
|
275
|
+
medium: DEPTH.ELEVATION_LEVEL_300 + " " + COLORS.COLOR_NEUTRAL_900 + "3D",
|
|
276
|
+
high: DEPTH.ELEVATION_LEVEL_400 + " " + COLORS.COLOR_NEUTRAL_900 + "3D"
|
|
273
277
|
};
|
|
274
278
|
export var easing = {
|
|
275
279
|
ease_in: MOTION.MOTION_EASE_IN,
|
|
@@ -282,6 +286,9 @@ export var duration = {
|
|
|
282
286
|
slow: MOTION.MOTION_DURATION_SLOW
|
|
283
287
|
};
|
|
284
288
|
var theme = {
|
|
289
|
+
utils: {
|
|
290
|
+
interact: interact(MODE)
|
|
291
|
+
},
|
|
285
292
|
breakpoints: breakpoints,
|
|
286
293
|
colors: colors,
|
|
287
294
|
typography: _extends({}, typography, {
|
|
@@ -302,10 +309,9 @@ var theme = {
|
|
|
302
309
|
}),
|
|
303
310
|
borders: borders,
|
|
304
311
|
borderWidths: borderWidths,
|
|
305
|
-
shadows:
|
|
306
|
-
shadows: shadows
|
|
307
|
-
}),
|
|
312
|
+
shadows: shadows,
|
|
308
313
|
easing: easing,
|
|
309
|
-
duration: duration
|
|
314
|
+
duration: duration,
|
|
315
|
+
mode: MODE
|
|
310
316
|
};
|
|
311
317
|
export default theme;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { darken, lighten } from "polished";
|
|
2
|
+
|
|
3
|
+
var interact = function interact(mode) {
|
|
4
|
+
return function (themeValue) {
|
|
5
|
+
if (mode === "default-dark") {
|
|
6
|
+
return lighten(0.2, themeValue);
|
|
7
|
+
} else {
|
|
8
|
+
return darken(0.2, themeValue);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default interact;
|