@sproutsocial/racine 10.0.0-dar97-beta.1 → 10.0.1-dependencies.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/__flow__/Avatar/index.test.js +0 -5
  3. package/__flow__/Badge/index.test.js +0 -5
  4. package/__flow__/Button/index.stories.js +51 -67
  5. package/__flow__/Button/styles.js +1 -1
  6. package/__flow__/CharacterCounter/index.test.js +0 -8
  7. package/__flow__/ChartLegend/index.test.js +0 -37
  8. package/__flow__/Checkbox/styles.js +1 -1
  9. package/__flow__/EmptyState/index.test.js +1 -3
  10. package/__flow__/Link/index.test.js +0 -10
  11. package/__flow__/Listbox/__snapshots__/index.test.js.snap +13 -13
  12. package/__flow__/Loader/index.test.js +0 -14
  13. package/__flow__/Menu/__snapshots__/index.test.js.snap +5 -5
  14. package/__flow__/Modal/index.test.js +0 -19
  15. package/__flow__/Modal/styles.js +1 -3
  16. package/__flow__/Text/index.test.js +0 -39
  17. package/__flow__/themes/dark/{_themes.scss → _themed.scss} +4 -3
  18. package/__flow__/themes/dark/theme.js +24 -4
  19. package/__flow__/themes/light/{_themes.scss → _themed.scss} +12 -11
  20. package/__flow__/themes/light/theme.js +21 -1
  21. package/__flow__/themes/utils/interact.js +1 -1
  22. package/__flow__/types/theme.colors.flow.js +6 -0
  23. package/commonjs/Button/styles.js +1 -1
  24. package/commonjs/Checkbox/styles.js +1 -1
  25. package/commonjs/Modal/styles.js +1 -3
  26. package/commonjs/themes/dark/theme.js +24 -4
  27. package/commonjs/themes/light/theme.js +22 -3
  28. package/commonjs/themes/utils/interact.js +1 -1
  29. package/dist/themes/dark/{_themes.scss → _themed.scss} +4 -3
  30. package/dist/themes/dark/dark.scss +20 -3
  31. package/dist/themes/light/{_themes.scss → _themed.scss} +12 -11
  32. package/dist/themes/light/light.scss +20 -3
  33. package/lib/Button/styles.js +1 -1
  34. package/lib/Checkbox/styles.js +1 -1
  35. package/lib/Modal/styles.js +1 -2
  36. package/lib/themes/dark/theme.js +25 -7
  37. package/lib/themes/light/theme.js +21 -3
  38. package/lib/themes/utils/interact.js +1 -1
  39. package/package.json +18 -15
@@ -2,7 +2,7 @@
2
2
 
3
3
  import COLORS from "@sproutsocial/seeds-color";
4
4
  import DEPTH from "@sproutsocial/seeds-depth";
5
- import defaultTheme from "../light/theme";
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 = "default-dark";
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
- ...defaultTheme.colors,
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
- ...defaultTheme,
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
- // These files are auto-generated based on JS theme files, ensuring our SCSS theme variables stay in sync.
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 files, the theme object is exported as "default" (i.e., using "export default"),
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
- $theme-map: () !global;
17
- @each $key, $submap in $theme {
18
- $value: map-get($theme, "#{$key}");
19
- $theme-map: map-merge($theme-map, ($key: $value)) !global;
20
- }
21
- @content;
22
- $theme-map: null !global;
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 = "default-light";
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
  },
@@ -2,7 +2,7 @@
2
2
  import { darken, lighten } from "polished";
3
3
 
4
4
  const interact = (mode: string) => (themeValue: string) => {
5
- if (mode === "default-dark") {
5
+ if (mode === "dark") {
6
6
  return lighten(0.2, themeValue);
7
7
  } else {
8
8
  return darken(0.2, themeValue);
@@ -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";
@@ -11,8 +11,6 @@ var _styledSystem = require("styled-system");
11
11
 
12
12
  var _reactModal = _interopRequireDefault(require("react-modal"));
13
13
 
14
- var _polished = require("polished");
15
-
16
14
  var _Box = _interopRequireDefault(require("../Box"));
17
15
 
18
16
  var _systemProps = require("../utils/system-props");
@@ -62,7 +60,7 @@ var Container = (0, _styledComponents.default)(ReactModalAdapter).withConfig({
62
60
  displayName: "styles__Container",
63
61
  componentId: "sc-9lom4g-0"
64
62
  })(["&__Overlay{position:fixed;top:0px;left:0px;right:0px;bottom:0px;display:flex;align-items:center;justify-content:center;background-color:", ";opacity:0;will-change:opacity;transition:opacity ", " ", ";", " &.ReactModal__Overlay--after-open{opacity:1;}&.ReactModal__Overlay--before-close{opacity:0;}}&__Content{display:flex;flex-direction:column;background:", ";border-radius:", ";box-shadow:", ";filter:blur(0);color:", ";outline:none;max-width:calc(100vw - ", ");max-height:calc(100vh - ", ");@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){height:calc(100vh - ", ");}", " ", "}"], function (props) {
65
- return (0, _polished.transparentize)(0.32, props.theme.colors.neutral[1000]);
63
+ return props.theme.colors.overlay.background.base;
66
64
  }, function (props) {
67
65
  return props.theme.duration.medium;
68
66
  }, function (props) {
@@ -13,18 +13,21 @@ var _datavizPalette = require("./dataviz-palette");
13
13
 
14
14
  var _decorativePalettes = require("./decorative-palettes");
15
15
 
16
+ var _polished = require("polished");
17
+
16
18
  var _interact = _interopRequireDefault(require("../utils/interact"));
17
19
 
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
21
 
20
22
  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); }
21
23
 
22
- var MODE = "default-dark";
24
+ var MODE = "dark";
23
25
  var shadows = {
24
26
  low: _seedsDepth.default.ELEVATION_LEVEL_100 + " " + _seedsColor.default.COLOR_NEUTRAL_1100 + "FF",
25
27
  medium: _seedsDepth.default.ELEVATION_LEVEL_300 + " " + _seedsColor.default.COLOR_NEUTRAL_1100 + "FF",
26
28
  high: _seedsDepth.default.ELEVATION_LEVEL_400 + " " + _seedsColor.default.COLOR_NEUTRAL_1100 + "FF"
27
- };
29
+ }; // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
30
+
28
31
  exports.shadows = shadows;
29
32
 
30
33
  var colors = _extends({}, _theme.default.colors, {
@@ -54,7 +57,10 @@ var colors = _extends({}, _theme.default.colors, {
54
57
  red: _decorativePalettes.red.background,
55
58
  neutral: _decorativePalettes.neutral.background
56
59
  },
57
- selected: _seedsColor.default.COLOR_NEUTRAL_0
60
+ selected: _seedsColor.default.COLOR_NEUTRAL_0,
61
+ positive_sentiment: _seedsColor.default.COLOR_BLUE_500,
62
+ negative_sentiment: _seedsColor.default.COLOR_RED_500,
63
+ neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_300
58
64
  },
59
65
  border: {
60
66
  base: _seedsColor.default.COLOR_NEUTRAL_1100,
@@ -179,7 +185,10 @@ var colors = _extends({}, _theme.default.colors, {
179
185
  error: _decorativePalettes.red.foreground,
180
186
  danger: _decorativePalettes.red.foreground,
181
187
  info: _decorativePalettes.blue.foreground,
182
- opportunity: _decorativePalettes.purple.foreground
188
+ opportunity: _decorativePalettes.purple.foreground,
189
+ positive_sentiment: _seedsColor.default.COLOR_BLUE_700,
190
+ negative_sentiment: _seedsColor.default.COLOR_RED_600,
191
+ neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_600
183
192
  },
184
193
  form: {
185
194
  background: {
@@ -203,6 +212,17 @@ var colors = _extends({}, _theme.default.colors, {
203
212
  selected: _seedsColor.default.COLOR_NEUTRAL_0
204
213
  }
205
214
  },
215
+ overlay: {
216
+ background: {
217
+ base: (0, _polished.transparentize)(0.28, _seedsColor.default.COLOR_NEUTRAL_1000)
218
+ },
219
+ text: {
220
+ base: _seedsColor.default.COLOR_NEUTRAL_0
221
+ },
222
+ icon: {
223
+ base: _seedsColor.default.COLOR_NEUTRAL_0
224
+ }
225
+ },
206
226
  elevation: {
207
227
  base: _seedsColor.default.COLOR_NEUTRAL_1100
208
228
  },
@@ -23,6 +23,8 @@ var _seedsMotion = _interopRequireDefault(require("@sproutsocial/seeds-motion"))
23
23
 
24
24
  var _seedsBorder = _interopRequireDefault(require("@sproutsocial/seeds-border"));
25
25
 
26
+ var _polished = require("polished");
27
+
26
28
  var _interact = _interopRequireDefault(require("../utils/interact"));
27
29
 
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -31,7 +33,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
31
33
 
32
34
  var breakpoints = ["900px", "1200px", "1500px", "1800px"];
33
35
  exports.breakpoints = breakpoints;
34
- var MODE = "default-light";
36
+ var MODE = "light"; // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
35
37
 
36
38
  var colors = _extends({
37
39
  app: {
@@ -57,7 +59,10 @@ var colors = _extends({
57
59
  red: _decorativePalettes.red.background,
58
60
  neutral: _decorativePalettes.neutral.background
59
61
  },
60
- selected: _seedsColor.default.COLOR_NEUTRAL_800
62
+ selected: _seedsColor.default.COLOR_NEUTRAL_800,
63
+ positive_sentiment: _seedsColor.default.COLOR_BLUE_500,
64
+ negative_sentiment: _seedsColor.default.COLOR_RED_500,
65
+ neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_300
61
66
  },
62
67
  border: {
63
68
  base: _seedsColor.default.COLOR_NEUTRAL_200,
@@ -182,7 +187,10 @@ var colors = _extends({
182
187
  error: _decorativePalettes.red.foreground,
183
188
  danger: _decorativePalettes.red.foreground,
184
189
  info: _decorativePalettes.blue.foreground,
185
- opportunity: _decorativePalettes.purple.foreground
190
+ opportunity: _decorativePalettes.purple.foreground,
191
+ positive_sentiment: _seedsColor.default.COLOR_BLUE_700,
192
+ negative_sentiment: _seedsColor.default.COLOR_RED_600,
193
+ neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_600
186
194
  },
187
195
  form: {
188
196
  background: {
@@ -206,6 +214,17 @@ var colors = _extends({
206
214
  selected: _seedsColor.default.COLOR_NEUTRAL_800
207
215
  }
208
216
  },
217
+ overlay: {
218
+ background: {
219
+ base: (0, _polished.transparentize)(0.44, _seedsColor.default.COLOR_NEUTRAL_1000)
220
+ },
221
+ text: {
222
+ base: _seedsColor.default.COLOR_NEUTRAL_0
223
+ },
224
+ icon: {
225
+ base: _seedsColor.default.COLOR_NEUTRAL_0
226
+ }
227
+ },
209
228
  elevation: {
210
229
  base: _seedsColor.default.COLOR_NEUTRAL_900 + "3D"
211
230
  },
@@ -7,7 +7,7 @@ var _polished = require("polished");
7
7
 
8
8
  var interact = function interact(mode) {
9
9
  return function (themeValue) {
10
- if (mode === "default-dark") {
10
+ if (mode === "dark") {
11
11
  return (0, _polished.lighten)(0.2, themeValue);
12
12
  } else {
13
13
  return (0, _polished.darken)(0.2, themeValue);
@@ -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
- // These files are auto-generated based on JS theme files, ensuring our SCSS theme variables stay in sync.
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 files, the theme object is exported as "default" (i.e., using "export default"),
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;
@@ -34,7 +34,10 @@ $dark: (
34
34
  red: #992222,
35
35
  neutral: #273333
36
36
  ),
37
- selected: #FFFFFF
37
+ selected: #FFFFFF,
38
+ positive_sentiment: #3896e3,
39
+ negative_sentiment: #f76054,
40
+ neutral_sentiment: #c8cccc
38
41
  ),
39
42
  border: (
40
43
  base: #040404,
@@ -159,7 +162,10 @@ $dark: (
159
162
  error: #ffd5d2,
160
163
  danger: #ffd5d2,
161
164
  info: #dcf2ff,
162
- opportunity: #eaeaf9
165
+ opportunity: #eaeaf9,
166
+ positive_sentiment: #2079c3,
167
+ negative_sentiment: #ed4c42,
168
+ neutral_sentiment: #6e797a
163
169
  ),
164
170
  form: (
165
171
  background: (
@@ -183,6 +189,17 @@ $dark: (
183
189
  selected: #FFFFFF
184
190
  )
185
191
  ),
192
+ overlay: (
193
+ background: (
194
+ base: rgba(22,32,32,0.72)
195
+ ),
196
+ text: (
197
+ base: #FFFFFF
198
+ ),
199
+ icon: (
200
+ base: #FFFFFF
201
+ )
202
+ ),
186
203
  elevation: (
187
204
  base: #040404
188
205
  ),
@@ -596,6 +613,6 @@ $dark: (
596
613
  medium: .3s,
597
614
  slow: .6s
598
615
  ),
599
- mode: default-dark
616
+ mode: dark
600
617
  )
601
618
  );
@@ -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
- // These files are auto-generated based on JS theme files, ensuring our SCSS theme variables stay in sync.
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 files, the theme object is exported as "default" (i.e., using "export default"),
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
- $theme-map: () !global;
17
- @each $key, $submap in $theme {
18
- $value: map-get($theme, "#{$key}");
19
- $theme-map: map-merge($theme-map, ($key: $value)) !global;
20
- }
21
- @content;
22
- $theme-map: null !global;
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
 
@@ -128,7 +128,10 @@ $light: (
128
128
  red: #ffd5d2,
129
129
  neutral: #f3f4f4
130
130
  ),
131
- selected: #364141
131
+ selected: #364141,
132
+ positive_sentiment: #3896e3,
133
+ negative_sentiment: #f76054,
134
+ neutral_sentiment: #c8cccc
132
135
  ),
133
136
  border: (
134
137
  base: #dee1e1,
@@ -253,7 +256,10 @@ $light: (
253
256
  error: #992222,
254
257
  danger: #992222,
255
258
  info: #0c5689,
256
- opportunity: #5e4eba
259
+ opportunity: #5e4eba,
260
+ positive_sentiment: #2079c3,
261
+ negative_sentiment: #ed4c42,
262
+ neutral_sentiment: #6e797a
257
263
  ),
258
264
  form: (
259
265
  background: (
@@ -277,6 +283,17 @@ $light: (
277
283
  selected: #364141
278
284
  )
279
285
  ),
286
+ overlay: (
287
+ background: (
288
+ base: rgba(22,32,32,0.56)
289
+ ),
290
+ text: (
291
+ base: #FFFFFF
292
+ ),
293
+ icon: (
294
+ base: #FFFFFF
295
+ )
296
+ ),
280
297
  elevation: (
281
298
  base: #2733333D
282
299
  ),
@@ -687,6 +704,6 @@ $light: (
687
704
  medium: .3s,
688
705
  slow: .6s
689
706
  ),
690
- mode: default-light
707
+ mode: light
691
708
  )
692
709
  );
@@ -42,6 +42,6 @@ var Container = styled.button.withConfig({
42
42
  }, function (props) {
43
43
  return props.disabled && disabled;
44
44
  }, function (props) {
45
- return props.appearance === "pill" && css(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode ? "screen" : "multiply", pill);
45
+ return props.appearance === "pill" && css(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode === "dark" ? "screen" : "multiply", pill);
46
46
  }, Icon, LAYOUT, COMMON);
47
47
  export default Container; //${props.theme.mode === "dark" ? "screen" : "multiply"}
@@ -22,7 +22,7 @@ export var InputWrapper = styled(Box).withConfig({
22
22
  return props.theme.duration.fast;
23
23
  }, function (props) {
24
24
  return props.theme.easing.ease_inout;
25
- }, props.theme.mode ? "screen" : "multiply", pill, props.theme.colors.app.background.base, PillInput, pill);
25
+ }, props.theme.mode === "dark" ? "screen" : "multiply", pill, props.theme.colors.app.background.base, PillInput, pill);
26
26
  });
27
27
  InputWrapper.displayName = "InputWrapper";
28
28
  export var CheckboxBox = styled.div.withConfig({
@@ -10,7 +10,6 @@ import React from "react";
10
10
  import styled, { createGlobalStyle } from "styled-components";
11
11
  import { width, zIndex } from "styled-system";
12
12
  import ReactModal from "react-modal";
13
- import { transparentize } from "polished";
14
13
  import Box from "../Box";
15
14
  import { COMMON } from "../utils/system-props";
16
15
  // This is the max space allowed between the modal and the edge of the browser
@@ -43,7 +42,7 @@ export var Container = styled(ReactModalAdapter).withConfig({
43
42
  displayName: "styles__Container",
44
43
  componentId: "sc-9lom4g-0"
45
44
  })(["&__Overlay{position:fixed;top:0px;left:0px;right:0px;bottom:0px;display:flex;align-items:center;justify-content:center;background-color:", ";opacity:0;will-change:opacity;transition:opacity ", " ", ";", " &.ReactModal__Overlay--after-open{opacity:1;}&.ReactModal__Overlay--before-close{opacity:0;}}&__Content{display:flex;flex-direction:column;background:", ";border-radius:", ";box-shadow:", ";filter:blur(0);color:", ";outline:none;max-width:calc(100vw - ", ");max-height:calc(100vh - ", ");@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){height:calc(100vh - ", ");}", " ", "}"], function (props) {
46
- return transparentize(0.32, props.theme.colors.neutral[1000]);
45
+ return props.theme.colors.overlay.background.base;
47
46
  }, function (props) {
48
47
  return props.theme.duration.medium;
49
48
  }, function (props) {
@@ -2,18 +2,19 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
2
2
 
3
3
  import COLORS from "@sproutsocial/seeds-color";
4
4
  import DEPTH from "@sproutsocial/seeds-depth";
5
- import defaultTheme from "../light/theme";
5
+ import lightTheme from "../light/theme";
6
6
  import { datavizPalette } from "./dataviz-palette";
7
7
  import { green, blue, purple, yellow, orange, red, neutral } from "./decorative-palettes";
8
+ import { transparentize } from "polished";
8
9
  import interact from "../utils/interact";
9
- var MODE = "default-dark";
10
+ var MODE = "dark";
10
11
  export var shadows = {
11
12
  low: DEPTH.ELEVATION_LEVEL_100 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF",
12
13
  medium: DEPTH.ELEVATION_LEVEL_300 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF",
13
14
  high: DEPTH.ELEVATION_LEVEL_400 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF"
14
- };
15
+ }; // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
15
16
 
16
- var colors = _extends({}, defaultTheme.colors, {
17
+ var colors = _extends({}, lightTheme.colors, {
17
18
  utils: {
18
19
  interact: interact(MODE)
19
20
  },
@@ -40,7 +41,10 @@ var colors = _extends({}, defaultTheme.colors, {
40
41
  red: red.background,
41
42
  neutral: neutral.background
42
43
  },
43
- selected: COLORS.COLOR_NEUTRAL_0
44
+ selected: COLORS.COLOR_NEUTRAL_0,
45
+ positive_sentiment: COLORS.COLOR_BLUE_500,
46
+ negative_sentiment: COLORS.COLOR_RED_500,
47
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_300
44
48
  },
45
49
  border: {
46
50
  base: COLORS.COLOR_NEUTRAL_1100,
@@ -165,7 +169,10 @@ var colors = _extends({}, defaultTheme.colors, {
165
169
  error: red.foreground,
166
170
  danger: red.foreground,
167
171
  info: blue.foreground,
168
- opportunity: purple.foreground
172
+ opportunity: purple.foreground,
173
+ positive_sentiment: COLORS.COLOR_BLUE_700,
174
+ negative_sentiment: COLORS.COLOR_RED_600,
175
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_600
169
176
  },
170
177
  form: {
171
178
  background: {
@@ -189,6 +196,17 @@ var colors = _extends({}, defaultTheme.colors, {
189
196
  selected: COLORS.COLOR_NEUTRAL_0
190
197
  }
191
198
  },
199
+ overlay: {
200
+ background: {
201
+ base: transparentize(0.28, COLORS.COLOR_NEUTRAL_1000)
202
+ },
203
+ text: {
204
+ base: COLORS.COLOR_NEUTRAL_0
205
+ },
206
+ icon: {
207
+ base: COLORS.COLOR_NEUTRAL_0
208
+ }
209
+ },
192
210
  elevation: {
193
211
  base: COLORS.COLOR_NEUTRAL_1100
194
212
  },
@@ -198,7 +216,7 @@ var colors = _extends({}, defaultTheme.colors, {
198
216
  }
199
217
  }, datavizPalette);
200
218
 
201
- var darkTheme = _extends({}, defaultTheme, {
219
+ var darkTheme = _extends({}, lightTheme, {
202
220
  colors: colors,
203
221
  shadows: shadows,
204
222
  mode: MODE