@sproutsocial/racine 12.19.0 → 12.20.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 +13 -0
- package/__flow__/Icon/index.stories.js +33 -0
- package/__flow__/Icon/styles.js +0 -11
- package/__flow__/LoaderButton/index.js +22 -4
- package/__flow__/LoaderButton/index.stories.js +28 -0
- package/__flow__/Menu/__snapshots__/index.test.js.snap +0 -9
- package/__flow__/PartnerLogo/index.js +1 -7
- package/__flow__/PartnerLogo/styles.js +0 -12
- package/__flow__/themes/dark/theme.js +2 -2
- package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.js +12 -0
- package/__flow__/themes/extendedThemes/sproutTheme/light/theme.js +12 -0
- package/__flow__/themes/light/theme.js +2 -2
- package/commonjs/Icon/styles.js +1 -3
- package/commonjs/LoaderButton/index.js +31 -4
- package/commonjs/PartnerLogo/index.js +3 -4
- package/commonjs/PartnerLogo/styles.js +1 -3
- package/commonjs/themes/dark/theme.js +2 -2
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +12 -0
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +12 -0
- package/commonjs/themes/light/theme.js +2 -2
- package/dist/themes/dark/theme.scss +2 -2
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +26 -2
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +26 -2
- package/dist/themes/light/theme.scss +2 -2
- package/lib/Icon/styles.js +1 -3
- package/lib/LoaderButton/index.js +32 -4
- package/lib/PartnerLogo/index.js +3 -4
- package/lib/PartnerLogo/styles.js +1 -3
- package/lib/themes/dark/theme.js +2 -2
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +12 -0
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +12 -0
- package/lib/themes/light/theme.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 12.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- cd9d6a5: Added feature demo colors to growth extended theme
|
|
8
|
+
- 99c6adb: Updated the Loader Button component to support dark mode
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 38f240c: Removed legacy PDF and IE11 icon style hacks
|
|
13
|
+
- 84797d6: Adjusted the values of icon sentiment colors to work more consistently and with better contrast across both light and dark modes
|
|
14
|
+
- f97c4e1: Remove spread property from SVG in PartnerLogo component
|
|
15
|
+
|
|
3
16
|
## 12.19.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -80,6 +80,39 @@ defaultFixedWidth.story = {
|
|
|
80
80
|
name: "Fixed Width (16 x 16)",
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
// testing for color usage via the theme
|
|
84
|
+
export const sentimentIcons = () => (
|
|
85
|
+
<Box p={24}>
|
|
86
|
+
<Icon
|
|
87
|
+
name="flat-positive-sentiment"
|
|
88
|
+
size="large"
|
|
89
|
+
color="icon.positive_sentiment"
|
|
90
|
+
mr={400}
|
|
91
|
+
/>
|
|
92
|
+
<Icon
|
|
93
|
+
name="flat-negative-sentiment"
|
|
94
|
+
size="large"
|
|
95
|
+
color="icon.negative_sentiment"
|
|
96
|
+
mr={400}
|
|
97
|
+
/>
|
|
98
|
+
<Icon
|
|
99
|
+
name="flat-neutral-sentiment"
|
|
100
|
+
size="large"
|
|
101
|
+
color="icon.neutral_sentiment"
|
|
102
|
+
mr={400}
|
|
103
|
+
/>
|
|
104
|
+
<Icon
|
|
105
|
+
name="flat-neutral-sentiment-outline"
|
|
106
|
+
size="large"
|
|
107
|
+
color="icon.base"
|
|
108
|
+
/>
|
|
109
|
+
</Box>
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
sentimentIcons.story = {
|
|
113
|
+
name: "Sentiment usage",
|
|
114
|
+
};
|
|
115
|
+
|
|
83
116
|
export const Toggle = () => {
|
|
84
117
|
const [state, setState] = useState([false, false, false, false]);
|
|
85
118
|
const toggle = (index) => {
|
package/__flow__/Icon/styles.js
CHANGED
|
@@ -31,17 +31,6 @@ const stylesForSize = (iconSize, fixedWidth) => css`
|
|
|
31
31
|
width: ${iconSize}
|
|
32
32
|
}
|
|
33
33
|
`}
|
|
34
|
-
|
|
35
|
-
/* IE 11 hack, do not remove */
|
|
36
|
-
/* stylelint-disable */
|
|
37
|
-
_:-ms-fullscreen &, html & {
|
|
38
|
-
width: ${iconSize};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
${"" /* PDF hack, do not remove */}
|
|
42
|
-
.pdf-page & {
|
|
43
|
-
width: ${iconSize};
|
|
44
|
-
}
|
|
45
34
|
`;
|
|
46
35
|
|
|
47
36
|
const Container: StyledComponent<{ ... }, TypeTheme, *> = styled.span.attrs({
|
|
@@ -4,6 +4,7 @@ import styled, { css } from "styled-components";
|
|
|
4
4
|
import Box from "../Box";
|
|
5
5
|
import Button, { type TypeProps as TypeButtonProps } from "../Button";
|
|
6
6
|
import Loader from "../Loader";
|
|
7
|
+
import { useTheme } from "styled-components";
|
|
7
8
|
import { rgba } from "polished";
|
|
8
9
|
import { COLOR_NEUTRAL_0, COLOR_NEUTRAL_1000 } from "@sproutsocial/seeds-color";
|
|
9
10
|
|
|
@@ -12,14 +13,29 @@ type TypeLoaderButtonProps = TypeButtonProps & {
|
|
|
12
13
|
loaderLabel: string,
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
// TODO: This is a temporary solution to get the loader button to work with dark mode
|
|
17
|
+
const getColor = (appearance, themeColorMode) => {
|
|
18
|
+
const selectColorBasedOnMode = themeColorMode === "dark" ? "light" : "dark";
|
|
16
19
|
switch (appearance) {
|
|
17
20
|
/** "default" is @deprecated in favour of unstyled */
|
|
18
21
|
case "default":
|
|
22
|
+
return selectColorBasedOnMode;
|
|
19
23
|
case "unstyled":
|
|
20
|
-
|
|
24
|
+
return selectColorBasedOnMode;
|
|
25
|
+
case "primary":
|
|
26
|
+
return "light";
|
|
21
27
|
case "secondary":
|
|
22
|
-
return
|
|
28
|
+
return selectColorBasedOnMode;
|
|
29
|
+
case "destructive":
|
|
30
|
+
return "light";
|
|
31
|
+
case "placeholder":
|
|
32
|
+
return selectColorBasedOnMode;
|
|
33
|
+
case "pill":
|
|
34
|
+
return selectColorBasedOnMode;
|
|
35
|
+
case "outline":
|
|
36
|
+
// This case doesn't even make sense.... There's no outline button
|
|
37
|
+
// TODO: investigate if this is even used anywhere
|
|
38
|
+
return "light";
|
|
23
39
|
default:
|
|
24
40
|
return "light";
|
|
25
41
|
}
|
|
@@ -54,6 +70,8 @@ export const LoaderButton = ({
|
|
|
54
70
|
...rest
|
|
55
71
|
}: TypeLoaderButtonProps) => {
|
|
56
72
|
const isLoading = Boolean(_isLoading);
|
|
73
|
+
const { mode: themeColorMode } = useTheme();
|
|
74
|
+
|
|
57
75
|
return (
|
|
58
76
|
<Button
|
|
59
77
|
disabled={disabled || isLoading}
|
|
@@ -72,7 +90,7 @@ export const LoaderButton = ({
|
|
|
72
90
|
text={loaderLabel}
|
|
73
91
|
size="small"
|
|
74
92
|
delay={false}
|
|
75
|
-
color={getColor(appearance)}
|
|
93
|
+
color={getColor(appearance, themeColorMode)}
|
|
76
94
|
/>
|
|
77
95
|
</Box>
|
|
78
96
|
)}
|
|
@@ -54,3 +54,31 @@ export const secondary = () => (
|
|
|
54
54
|
secondary.story = {
|
|
55
55
|
name: "Secondary",
|
|
56
56
|
};
|
|
57
|
+
|
|
58
|
+
export const allLoaderButtons = () => (
|
|
59
|
+
<Box display="flex" justifyContent="space-around">
|
|
60
|
+
<LoaderButton isLoading loaderLabel="Loading...">
|
|
61
|
+
Loading Button
|
|
62
|
+
</LoaderButton>
|
|
63
|
+
|
|
64
|
+
<LoaderButton appearance="primary" isLoading loaderLabel="Loading...">
|
|
65
|
+
Loading Button
|
|
66
|
+
</LoaderButton>
|
|
67
|
+
|
|
68
|
+
<LoaderButton appearance="secondary" isLoading loaderLabel="Loading...">
|
|
69
|
+
Loading Button
|
|
70
|
+
</LoaderButton>
|
|
71
|
+
|
|
72
|
+
<LoaderButton appearance="destructive" isLoading loaderLabel="Loading...">
|
|
73
|
+
Loading Button
|
|
74
|
+
</LoaderButton>
|
|
75
|
+
|
|
76
|
+
<LoaderButton appearance="placeholder" isLoading loaderLabel="Loading...">
|
|
77
|
+
Loading Button
|
|
78
|
+
</LoaderButton>
|
|
79
|
+
|
|
80
|
+
<LoaderButton appearance="pill" isLoading loaderLabel="Loading...">
|
|
81
|
+
Loading Button
|
|
82
|
+
</LoaderButton>
|
|
83
|
+
</Box>
|
|
84
|
+
);
|
|
@@ -14,15 +14,6 @@ exports[`Menu AsMenuButton should match snapshot 1`] = `
|
|
|
14
14
|
fill: currentColor;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
_:-ms-fullscreen .c2,
|
|
18
|
-
html .c3 {
|
|
19
|
-
width: 16px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.pdf-page .c2 {
|
|
23
|
-
width: 16px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
17
|
.c1 {
|
|
27
18
|
display: inline-block;
|
|
28
19
|
box-sizing: border-box;
|
|
@@ -57,13 +57,7 @@ const PartnerLogo = ({
|
|
|
57
57
|
// $FlowIssue - upgrade v0.112.0
|
|
58
58
|
{...rest}
|
|
59
59
|
>
|
|
60
|
-
<svg
|
|
61
|
-
className="logo-svg"
|
|
62
|
-
viewBox={logoViewBox}
|
|
63
|
-
focusable={false}
|
|
64
|
-
// $FlowIssue - upgrade v0.112.0
|
|
65
|
-
{...rest}
|
|
66
|
-
>
|
|
60
|
+
<svg className="logo-svg" viewBox={logoViewBox} focusable={false}>
|
|
67
61
|
<use
|
|
68
62
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
69
63
|
xlinkHref={`#sslogosvg-${whichLogo(backgroundType)}`}
|
|
@@ -20,18 +20,6 @@ const stylesForSize = (height, width, logoSize) => css`
|
|
|
20
20
|
height: ${logoSize ? logoSize : height};
|
|
21
21
|
width: ${logoSize ? logoSize : ""};
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
/* IE 11 hack, do not remove */
|
|
25
|
-
/* stylelint-disable */
|
|
26
|
-
_:-ms-fullscreen &,
|
|
27
|
-
html & {
|
|
28
|
-
width: ${logoSize ? logoSize : width};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
${"" /* PDF hack, do not remove */}
|
|
32
|
-
.pdf-page & {
|
|
33
|
-
width: ${logoSize ? logoSize : width};
|
|
34
|
-
}
|
|
35
23
|
`;
|
|
36
24
|
|
|
37
25
|
const Container: StyledComponent<{ ... }, TypeTheme, *> = styled.span.attrs({
|
|
@@ -200,9 +200,9 @@ const colors = {
|
|
|
200
200
|
info: blue.foreground,
|
|
201
201
|
opportunity: purple.foreground,
|
|
202
202
|
applied: COLORS.COLOR_BLUE_400,
|
|
203
|
-
positive_sentiment: COLORS.
|
|
203
|
+
positive_sentiment: COLORS.COLOR_BLUE_600,
|
|
204
204
|
negative_sentiment: COLORS.COLOR_RED_600,
|
|
205
|
-
neutral_sentiment: COLORS.
|
|
205
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_500,
|
|
206
206
|
},
|
|
207
207
|
form: {
|
|
208
208
|
background: {
|
|
@@ -144,6 +144,18 @@ export const growth = {
|
|
|
144
144
|
purple: baseDarkTheme.colors.purple[700],
|
|
145
145
|
},
|
|
146
146
|
},
|
|
147
|
+
featuredDemo: {
|
|
148
|
+
background: {
|
|
149
|
+
primary: {
|
|
150
|
+
base: baseDarkTheme.colors.blue[400],
|
|
151
|
+
hover: baseDarkTheme.colors.blue[100],
|
|
152
|
+
},
|
|
153
|
+
secondary: {
|
|
154
|
+
base: baseDarkTheme.colors.purple[500],
|
|
155
|
+
hover: baseDarkTheme.colors.purple[100],
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
147
159
|
darkModal: {
|
|
148
160
|
background: {
|
|
149
161
|
base: baseDarkTheme.colors.aqua[1100],
|
|
@@ -141,6 +141,18 @@ export const growth = {
|
|
|
141
141
|
purple: baseLightTheme.colors.purple[700],
|
|
142
142
|
},
|
|
143
143
|
},
|
|
144
|
+
featuredDemo: {
|
|
145
|
+
background: {
|
|
146
|
+
primary: {
|
|
147
|
+
base: baseLightTheme.colors.blue[700],
|
|
148
|
+
hover: baseLightTheme.colors.blue[900],
|
|
149
|
+
},
|
|
150
|
+
secondary: {
|
|
151
|
+
base: baseLightTheme.colors.purple[800],
|
|
152
|
+
hover: baseLightTheme.colors.purple[800],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
144
156
|
darkModal: {
|
|
145
157
|
background: {
|
|
146
158
|
base: baseLightTheme.colors.aqua[1100],
|
|
@@ -200,9 +200,9 @@ const colors = {
|
|
|
200
200
|
info: blue.foreground,
|
|
201
201
|
opportunity: purple.foreground,
|
|
202
202
|
applied: COLORS.COLOR_BLUE_700,
|
|
203
|
-
positive_sentiment: COLORS.
|
|
203
|
+
positive_sentiment: COLORS.COLOR_BLUE_600,
|
|
204
204
|
negative_sentiment: COLORS.COLOR_RED_600,
|
|
205
|
-
neutral_sentiment: COLORS.
|
|
205
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_500,
|
|
206
206
|
},
|
|
207
207
|
form: {
|
|
208
208
|
background: {
|
package/commonjs/Icon/styles.js
CHANGED
|
@@ -25,9 +25,7 @@ var sizes = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
var stylesForSize = function stylesForSize(iconSize, fixedWidth) {
|
|
28
|
-
return (0, _styledComponents.css)(["line-height:", ";&,.Icon-svg{height:", ";fill:currentColor;}", "
|
|
29
|
-
/* PDF hack, do not remove */
|
|
30
|
-
, iconSize);
|
|
28
|
+
return (0, _styledComponents.css)(["line-height:", ";&,.Icon-svg{height:", ";fill:currentColor;}", ""], iconSize, iconSize, fixedWidth && "\n &,\n & .Icon-svg {\n width: " + iconSize + "\n }\n ");
|
|
31
29
|
};
|
|
32
30
|
|
|
33
31
|
var Container = _styledComponents.default.span.attrs({
|
|
@@ -29,14 +29,37 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
29
29
|
|
|
30
30
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
// TODO: This is a temporary solution to get the loader button to work with dark mode
|
|
33
|
+
var getColor = function getColor(appearance, themeColorMode) {
|
|
34
|
+
var selectColorBasedOnMode = themeColorMode === "dark" ? "light" : "dark";
|
|
35
|
+
|
|
33
36
|
switch (appearance) {
|
|
34
37
|
/** "default" is @deprecated in favour of unstyled */
|
|
35
38
|
case "default":
|
|
39
|
+
return selectColorBasedOnMode;
|
|
40
|
+
|
|
36
41
|
case "unstyled":
|
|
37
|
-
|
|
42
|
+
return selectColorBasedOnMode;
|
|
43
|
+
|
|
44
|
+
case "primary":
|
|
45
|
+
return "light";
|
|
46
|
+
|
|
38
47
|
case "secondary":
|
|
39
|
-
return
|
|
48
|
+
return selectColorBasedOnMode;
|
|
49
|
+
|
|
50
|
+
case "destructive":
|
|
51
|
+
return "light";
|
|
52
|
+
|
|
53
|
+
case "placeholder":
|
|
54
|
+
return selectColorBasedOnMode;
|
|
55
|
+
|
|
56
|
+
case "pill":
|
|
57
|
+
return selectColorBasedOnMode;
|
|
58
|
+
|
|
59
|
+
case "outline":
|
|
60
|
+
// This case doesn't even make sense.... There's no outline button
|
|
61
|
+
// TODO: investigate if this is even used anywhere
|
|
62
|
+
return "light";
|
|
40
63
|
|
|
41
64
|
default:
|
|
42
65
|
return "light";
|
|
@@ -63,6 +86,10 @@ var LoaderButton = function LoaderButton(_ref) {
|
|
|
63
86
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
64
87
|
|
|
65
88
|
var isLoading = Boolean(_isLoading);
|
|
89
|
+
|
|
90
|
+
var _useTheme = (0, _styledComponents.useTheme)(),
|
|
91
|
+
themeColorMode = _useTheme.mode;
|
|
92
|
+
|
|
66
93
|
return /*#__PURE__*/React.createElement(_Button.default, _extends({
|
|
67
94
|
disabled: disabled || isLoading,
|
|
68
95
|
appearance: appearance,
|
|
@@ -83,7 +110,7 @@ var LoaderButton = function LoaderButton(_ref) {
|
|
|
83
110
|
text: loaderLabel,
|
|
84
111
|
size: "small",
|
|
85
112
|
delay: false,
|
|
86
|
-
color: getColor(appearance)
|
|
113
|
+
color: getColor(appearance, themeColorMode)
|
|
87
114
|
}))));
|
|
88
115
|
};
|
|
89
116
|
|
|
@@ -56,12 +56,11 @@ var PartnerLogo = function PartnerLogo(_ref) {
|
|
|
56
56
|
width: width ? width : defaultWidth + "px",
|
|
57
57
|
logoSize: size // $FlowIssue - upgrade v0.112.0
|
|
58
58
|
|
|
59
|
-
}, rest), /*#__PURE__*/_react.default.createElement("svg",
|
|
59
|
+
}, rest), /*#__PURE__*/_react.default.createElement("svg", {
|
|
60
60
|
className: "logo-svg",
|
|
61
61
|
viewBox: logoViewBox,
|
|
62
|
-
focusable: false
|
|
63
|
-
|
|
64
|
-
}, rest), /*#__PURE__*/_react.default.createElement("use", {
|
|
62
|
+
focusable: false
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement("use", {
|
|
65
64
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
66
65
|
xlinkHref: "#sslogosvg-" + whichLogo(backgroundType)
|
|
67
66
|
})));
|
|
@@ -22,9 +22,7 @@ var sizes = {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
var stylesForSize = function stylesForSize(height, width, logoSize) {
|
|
25
|
-
return (0, _styledComponents.css)(["line-height:", ";&,.logo-svg{height:", ";width:", ";}
|
|
26
|
-
/* PDF hack, do not remove */
|
|
27
|
-
, logoSize ? logoSize : width);
|
|
25
|
+
return (0, _styledComponents.css)(["line-height:", ";&,.logo-svg{height:", ";width:", ";}"], logoSize ? logoSize : height, logoSize ? logoSize : height, logoSize ? logoSize : "");
|
|
28
26
|
};
|
|
29
27
|
|
|
30
28
|
var Container = _styledComponents.default.span.attrs({
|
|
@@ -201,9 +201,9 @@ var colors = _extends({}, _theme.default.colors, {
|
|
|
201
201
|
info: _decorativePalettes.blue.foreground,
|
|
202
202
|
opportunity: _decorativePalettes.purple.foreground,
|
|
203
203
|
applied: _seedsColor.default.COLOR_BLUE_400,
|
|
204
|
-
positive_sentiment: _seedsColor.default.
|
|
204
|
+
positive_sentiment: _seedsColor.default.COLOR_BLUE_600,
|
|
205
205
|
negative_sentiment: _seedsColor.default.COLOR_RED_600,
|
|
206
|
-
neutral_sentiment: _seedsColor.default.
|
|
206
|
+
neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_500
|
|
207
207
|
},
|
|
208
208
|
form: {
|
|
209
209
|
background: {
|
|
@@ -152,6 +152,18 @@ var growth = {
|
|
|
152
152
|
purple: _theme.default.colors.purple[700]
|
|
153
153
|
}
|
|
154
154
|
},
|
|
155
|
+
featuredDemo: {
|
|
156
|
+
background: {
|
|
157
|
+
primary: {
|
|
158
|
+
base: _theme.default.colors.blue[400],
|
|
159
|
+
hover: _theme.default.colors.blue[100]
|
|
160
|
+
},
|
|
161
|
+
secondary: {
|
|
162
|
+
base: _theme.default.colors.purple[500],
|
|
163
|
+
hover: _theme.default.colors.purple[100]
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
155
167
|
darkModal: {
|
|
156
168
|
background: {
|
|
157
169
|
base: _theme.default.colors.aqua[1100]
|
|
@@ -149,6 +149,18 @@ var growth = {
|
|
|
149
149
|
purple: _theme.default.colors.purple[700]
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
|
+
featuredDemo: {
|
|
153
|
+
background: {
|
|
154
|
+
primary: {
|
|
155
|
+
base: _theme.default.colors.blue[700],
|
|
156
|
+
hover: _theme.default.colors.blue[900]
|
|
157
|
+
},
|
|
158
|
+
secondary: {
|
|
159
|
+
base: _theme.default.colors.purple[800],
|
|
160
|
+
hover: _theme.default.colors.purple[800]
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
152
164
|
darkModal: {
|
|
153
165
|
background: {
|
|
154
166
|
base: _theme.default.colors.aqua[1100]
|
|
@@ -205,9 +205,9 @@ var colors = _extends({
|
|
|
205
205
|
info: _decorativePalettes.blue.foreground,
|
|
206
206
|
opportunity: _decorativePalettes.purple.foreground,
|
|
207
207
|
applied: _seedsColor.default.COLOR_BLUE_700,
|
|
208
|
-
positive_sentiment: _seedsColor.default.
|
|
208
|
+
positive_sentiment: _seedsColor.default.COLOR_BLUE_600,
|
|
209
209
|
negative_sentiment: _seedsColor.default.COLOR_RED_600,
|
|
210
|
-
neutral_sentiment: _seedsColor.default.
|
|
210
|
+
neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_500
|
|
211
211
|
},
|
|
212
212
|
form: {
|
|
213
213
|
background: {
|
|
@@ -169,9 +169,9 @@ $theme: (
|
|
|
169
169
|
"info": #dcf2ff,
|
|
170
170
|
"opportunity": #eaeaf9,
|
|
171
171
|
"applied": #56adf5,
|
|
172
|
-
"positive_sentiment": #
|
|
172
|
+
"positive_sentiment": #2b87d3,
|
|
173
173
|
"negative_sentiment": #ed4c42,
|
|
174
|
-
"neutral_sentiment": #
|
|
174
|
+
"neutral_sentiment": #929a9b
|
|
175
175
|
),
|
|
176
176
|
"form": (
|
|
177
177
|
"background": (
|
|
@@ -201,9 +201,9 @@ $theme: (
|
|
|
201
201
|
"info": #dcf2ff,
|
|
202
202
|
"opportunity": #eaeaf9,
|
|
203
203
|
"applied": #56adf5,
|
|
204
|
-
"positive_sentiment": #
|
|
204
|
+
"positive_sentiment": #2b87d3,
|
|
205
205
|
"negative_sentiment": #ed4c42,
|
|
206
|
-
"neutral_sentiment": #
|
|
206
|
+
"neutral_sentiment": #929a9b
|
|
207
207
|
),
|
|
208
208
|
"form": (
|
|
209
209
|
"background": (
|
|
@@ -607,6 +607,18 @@ $theme: (
|
|
|
607
607
|
"purple": #6f5ed3
|
|
608
608
|
)
|
|
609
609
|
),
|
|
610
|
+
"featuredDemo": (
|
|
611
|
+
"background": (
|
|
612
|
+
"primary": (
|
|
613
|
+
"base": #56adf5,
|
|
614
|
+
"hover": #dcf2ff
|
|
615
|
+
),
|
|
616
|
+
"secondary": (
|
|
617
|
+
"base": #9180f4,
|
|
618
|
+
"hover": #eaeaf9
|
|
619
|
+
)
|
|
620
|
+
)
|
|
621
|
+
),
|
|
610
622
|
"darkModal": (
|
|
611
623
|
"background": (
|
|
612
624
|
"base": #002838
|
|
@@ -866,6 +878,18 @@ $theme: (
|
|
|
866
878
|
"purple": #6f5ed3
|
|
867
879
|
)
|
|
868
880
|
),
|
|
881
|
+
"featuredDemo": (
|
|
882
|
+
"background": (
|
|
883
|
+
"primary": (
|
|
884
|
+
"base": #56adf5,
|
|
885
|
+
"hover": #dcf2ff
|
|
886
|
+
),
|
|
887
|
+
"secondary": (
|
|
888
|
+
"base": #9180f4,
|
|
889
|
+
"hover": #eaeaf9
|
|
890
|
+
)
|
|
891
|
+
)
|
|
892
|
+
),
|
|
869
893
|
"darkModal": (
|
|
870
894
|
"background": (
|
|
871
895
|
"base": #002838
|
|
@@ -200,9 +200,9 @@ $theme: (
|
|
|
200
200
|
"info": #0c5689,
|
|
201
201
|
"opportunity": #5e4eba,
|
|
202
202
|
"applied": #2079c3,
|
|
203
|
-
"positive_sentiment": #
|
|
203
|
+
"positive_sentiment": #2b87d3,
|
|
204
204
|
"negative_sentiment": #ed4c42,
|
|
205
|
-
"neutral_sentiment": #
|
|
205
|
+
"neutral_sentiment": #929a9b
|
|
206
206
|
),
|
|
207
207
|
"form": (
|
|
208
208
|
"background": (
|
|
@@ -606,6 +606,18 @@ $theme: (
|
|
|
606
606
|
"purple": #6f5ed3
|
|
607
607
|
)
|
|
608
608
|
),
|
|
609
|
+
"featuredDemo": (
|
|
610
|
+
"background": (
|
|
611
|
+
"primary": (
|
|
612
|
+
"base": #2079c3,
|
|
613
|
+
"hover": #0c5689
|
|
614
|
+
),
|
|
615
|
+
"secondary": (
|
|
616
|
+
"base": #5e4eba,
|
|
617
|
+
"hover": #5e4eba
|
|
618
|
+
)
|
|
619
|
+
)
|
|
620
|
+
),
|
|
609
621
|
"darkModal": (
|
|
610
622
|
"background": (
|
|
611
623
|
"base": #002838
|
|
@@ -865,6 +877,18 @@ $theme: (
|
|
|
865
877
|
"purple": #6f5ed3
|
|
866
878
|
)
|
|
867
879
|
),
|
|
880
|
+
"featuredDemo": (
|
|
881
|
+
"background": (
|
|
882
|
+
"primary": (
|
|
883
|
+
"base": #2079c3,
|
|
884
|
+
"hover": #0c5689
|
|
885
|
+
),
|
|
886
|
+
"secondary": (
|
|
887
|
+
"base": #5e4eba,
|
|
888
|
+
"hover": #5e4eba
|
|
889
|
+
)
|
|
890
|
+
)
|
|
891
|
+
),
|
|
868
892
|
"darkModal": (
|
|
869
893
|
"background": (
|
|
870
894
|
"base": #002838
|
|
@@ -175,9 +175,9 @@ $theme: (
|
|
|
175
175
|
"info": #0c5689,
|
|
176
176
|
"opportunity": #5e4eba,
|
|
177
177
|
"applied": #2079c3,
|
|
178
|
-
"positive_sentiment": #
|
|
178
|
+
"positive_sentiment": #2b87d3,
|
|
179
179
|
"negative_sentiment": #ed4c42,
|
|
180
|
-
"neutral_sentiment": #
|
|
180
|
+
"neutral_sentiment": #929a9b
|
|
181
181
|
),
|
|
182
182
|
"form": (
|
|
183
183
|
"background": (
|
package/lib/Icon/styles.js
CHANGED
|
@@ -13,9 +13,7 @@ var sizes = {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
var stylesForSize = function stylesForSize(iconSize, fixedWidth) {
|
|
16
|
-
return css(["line-height:", ";&,.Icon-svg{height:", ";fill:currentColor;}", "
|
|
17
|
-
/* PDF hack, do not remove */
|
|
18
|
-
, iconSize);
|
|
16
|
+
return css(["line-height:", ";&,.Icon-svg{height:", ";fill:currentColor;}", ""], iconSize, iconSize, fixedWidth && "\n &,\n & .Icon-svg {\n width: " + iconSize + "\n }\n ");
|
|
19
17
|
};
|
|
20
18
|
|
|
21
19
|
var Container = styled.span.attrs({
|
|
@@ -9,17 +9,41 @@ import styled, { css } from "styled-components";
|
|
|
9
9
|
import Box from "../Box";
|
|
10
10
|
import Button from "../Button";
|
|
11
11
|
import Loader from "../Loader";
|
|
12
|
+
import { useTheme } from "styled-components";
|
|
12
13
|
import { rgba } from "polished";
|
|
13
14
|
import { COLOR_NEUTRAL_0, COLOR_NEUTRAL_1000 } from "@sproutsocial/seeds-color";
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
// TODO: This is a temporary solution to get the loader button to work with dark mode
|
|
17
|
+
var getColor = function getColor(appearance, themeColorMode) {
|
|
18
|
+
var selectColorBasedOnMode = themeColorMode === "dark" ? "light" : "dark";
|
|
19
|
+
|
|
16
20
|
switch (appearance) {
|
|
17
21
|
/** "default" is @deprecated in favour of unstyled */
|
|
18
22
|
case "default":
|
|
23
|
+
return selectColorBasedOnMode;
|
|
24
|
+
|
|
19
25
|
case "unstyled":
|
|
20
|
-
|
|
26
|
+
return selectColorBasedOnMode;
|
|
27
|
+
|
|
28
|
+
case "primary":
|
|
29
|
+
return "light";
|
|
30
|
+
|
|
21
31
|
case "secondary":
|
|
22
|
-
return
|
|
32
|
+
return selectColorBasedOnMode;
|
|
33
|
+
|
|
34
|
+
case "destructive":
|
|
35
|
+
return "light";
|
|
36
|
+
|
|
37
|
+
case "placeholder":
|
|
38
|
+
return selectColorBasedOnMode;
|
|
39
|
+
|
|
40
|
+
case "pill":
|
|
41
|
+
return selectColorBasedOnMode;
|
|
42
|
+
|
|
43
|
+
case "outline":
|
|
44
|
+
// This case doesn't even make sense.... There's no outline button
|
|
45
|
+
// TODO: investigate if this is even used anywhere
|
|
46
|
+
return "light";
|
|
23
47
|
|
|
24
48
|
default:
|
|
25
49
|
return "light";
|
|
@@ -45,6 +69,10 @@ export var LoaderButton = function LoaderButton(_ref) {
|
|
|
45
69
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
46
70
|
|
|
47
71
|
var isLoading = Boolean(_isLoading);
|
|
72
|
+
|
|
73
|
+
var _useTheme = useTheme(),
|
|
74
|
+
themeColorMode = _useTheme.mode;
|
|
75
|
+
|
|
48
76
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
49
77
|
disabled: disabled || isLoading,
|
|
50
78
|
appearance: appearance,
|
|
@@ -65,7 +93,7 @@ export var LoaderButton = function LoaderButton(_ref) {
|
|
|
65
93
|
text: loaderLabel,
|
|
66
94
|
size: "small",
|
|
67
95
|
delay: false,
|
|
68
|
-
color: getColor(appearance)
|
|
96
|
+
color: getColor(appearance, themeColorMode)
|
|
69
97
|
}))));
|
|
70
98
|
};
|
|
71
99
|
export default LoaderButton;
|
package/lib/PartnerLogo/index.js
CHANGED
|
@@ -45,12 +45,11 @@ var PartnerLogo = function PartnerLogo(_ref) {
|
|
|
45
45
|
width: width ? width : defaultWidth + "px",
|
|
46
46
|
logoSize: size // $FlowIssue - upgrade v0.112.0
|
|
47
47
|
|
|
48
|
-
}, rest), /*#__PURE__*/React.createElement("svg",
|
|
48
|
+
}, rest), /*#__PURE__*/React.createElement("svg", {
|
|
49
49
|
className: "logo-svg",
|
|
50
50
|
viewBox: logoViewBox,
|
|
51
|
-
focusable: false
|
|
52
|
-
|
|
53
|
-
}, rest), /*#__PURE__*/React.createElement("use", {
|
|
51
|
+
focusable: false
|
|
52
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
54
53
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
55
54
|
xlinkHref: "#sslogosvg-" + whichLogo(backgroundType)
|
|
56
55
|
})));
|
|
@@ -10,9 +10,7 @@ var sizes = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
var stylesForSize = function stylesForSize(height, width, logoSize) {
|
|
13
|
-
return css(["line-height:", ";&,.logo-svg{height:", ";width:", ";}
|
|
14
|
-
/* PDF hack, do not remove */
|
|
15
|
-
, logoSize ? logoSize : width);
|
|
13
|
+
return css(["line-height:", ";&,.logo-svg{height:", ";width:", ";}"], logoSize ? logoSize : height, logoSize ? logoSize : height, logoSize ? logoSize : "");
|
|
16
14
|
};
|
|
17
15
|
|
|
18
16
|
var Container = styled.span.attrs({
|
package/lib/themes/dark/theme.js
CHANGED
|
@@ -186,9 +186,9 @@ var colors = _extends({}, lightTheme.colors, {
|
|
|
186
186
|
info: blue.foreground,
|
|
187
187
|
opportunity: purple.foreground,
|
|
188
188
|
applied: COLORS.COLOR_BLUE_400,
|
|
189
|
-
positive_sentiment: COLORS.
|
|
189
|
+
positive_sentiment: COLORS.COLOR_BLUE_600,
|
|
190
190
|
negative_sentiment: COLORS.COLOR_RED_600,
|
|
191
|
-
neutral_sentiment: COLORS.
|
|
191
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_500
|
|
192
192
|
},
|
|
193
193
|
form: {
|
|
194
194
|
background: {
|
|
@@ -139,6 +139,18 @@ export var growth = {
|
|
|
139
139
|
purple: baseDarkTheme.colors.purple[700]
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
|
+
featuredDemo: {
|
|
143
|
+
background: {
|
|
144
|
+
primary: {
|
|
145
|
+
base: baseDarkTheme.colors.blue[400],
|
|
146
|
+
hover: baseDarkTheme.colors.blue[100]
|
|
147
|
+
},
|
|
148
|
+
secondary: {
|
|
149
|
+
base: baseDarkTheme.colors.purple[500],
|
|
150
|
+
hover: baseDarkTheme.colors.purple[100]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
142
154
|
darkModal: {
|
|
143
155
|
background: {
|
|
144
156
|
base: baseDarkTheme.colors.aqua[1100]
|
|
@@ -136,6 +136,18 @@ export var growth = {
|
|
|
136
136
|
purple: baseLightTheme.colors.purple[700]
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
|
+
featuredDemo: {
|
|
140
|
+
background: {
|
|
141
|
+
primary: {
|
|
142
|
+
base: baseLightTheme.colors.blue[700],
|
|
143
|
+
hover: baseLightTheme.colors.blue[900]
|
|
144
|
+
},
|
|
145
|
+
secondary: {
|
|
146
|
+
base: baseLightTheme.colors.purple[800],
|
|
147
|
+
hover: baseLightTheme.colors.purple[800]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
139
151
|
darkModal: {
|
|
140
152
|
background: {
|
|
141
153
|
base: baseLightTheme.colors.aqua[1100]
|
|
@@ -186,9 +186,9 @@ var colors = _extends({
|
|
|
186
186
|
info: blue.foreground,
|
|
187
187
|
opportunity: purple.foreground,
|
|
188
188
|
applied: COLORS.COLOR_BLUE_700,
|
|
189
|
-
positive_sentiment: COLORS.
|
|
189
|
+
positive_sentiment: COLORS.COLOR_BLUE_600,
|
|
190
190
|
negative_sentiment: COLORS.COLOR_RED_600,
|
|
191
|
-
neutral_sentiment: COLORS.
|
|
191
|
+
neutral_sentiment: COLORS.COLOR_NEUTRAL_500
|
|
192
192
|
},
|
|
193
193
|
form: {
|
|
194
194
|
background: {
|