@sproutsocial/racine 9.1.1-theme-extension.0 → 10.0.0-dar97-beta.1

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 (100) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/__flow__/Box/index.stories.js +1 -1
  3. package/__flow__/Breadcrumb/styles.js +0 -5
  4. package/__flow__/Button/styles.js +1 -1
  5. package/__flow__/Card/index.stories.js +0 -1
  6. package/__flow__/Card/styles.js +1 -1
  7. package/__flow__/Drawer/index.stories.js +3 -3
  8. package/__flow__/Drawer/styles.js +1 -1
  9. package/__flow__/KeyboardKey/styles.js +1 -1
  10. package/__flow__/Listbox/__snapshots__/index.test.js.snap +40 -34
  11. package/__flow__/Menu/__snapshots__/index.test.js.snap +15 -12
  12. package/__flow__/Menu/index.js +3 -7
  13. package/__flow__/Menu/index.stories.js +1 -1
  14. package/__flow__/Menu/styles.js +1 -18
  15. package/__flow__/Modal/index.test.js +0 -16
  16. package/__flow__/Modal/styles.js +1 -1
  17. package/__flow__/Popout/index.js +1 -1
  18. package/__flow__/Stack/index.js +1 -1
  19. package/__flow__/ThemeProvider/index.js +4 -4
  20. package/__flow__/Token/index.js +4 -1
  21. package/__flow__/Token/index.stories.js +11 -0
  22. package/__flow__/Token/styles.js +43 -33
  23. package/__flow__/Tooltip/index.js +1 -1
  24. package/__flow__/index.js +1 -2
  25. package/__flow__/themes/dark/_themes.scss +132 -0
  26. package/__flow__/themes/dark/theme.js +181 -157
  27. package/__flow__/themes/light/_themes.scss +132 -0
  28. package/__flow__/themes/{default → light}/dataviz-palette.js +0 -0
  29. package/__flow__/themes/{default → light}/decorative-palettes.js +0 -0
  30. package/__flow__/themes/{default → light}/literal-colors.js +0 -0
  31. package/__flow__/themes/{default → light}/theme.js +19 -8
  32. package/__flow__/themes/utils/interact.js +12 -0
  33. package/__flow__/types/system-props.flow.js +1 -2
  34. package/__flow__/types/theme.colors.flow.js +1 -1
  35. package/__flow__/types/theme.flow.js +2 -2
  36. package/__flow__/utils/mixins.js +1 -1
  37. package/__flow__/utils/responsiveProps/index.js +1 -1
  38. package/commonjs/Breadcrumb/styles.js +1 -1
  39. package/commonjs/Button/styles.js +1 -1
  40. package/commonjs/Card/styles.js +1 -1
  41. package/commonjs/Drawer/styles.js +1 -1
  42. package/commonjs/KeyboardKey/styles.js +1 -1
  43. package/commonjs/Menu/index.js +3 -1
  44. package/commonjs/Menu/styles.js +3 -16
  45. package/commonjs/Modal/styles.js +1 -1
  46. package/commonjs/Popout/index.js +1 -1
  47. package/commonjs/ThemeProvider/index.js +1 -1
  48. package/commonjs/Token/index.js +5 -2
  49. package/commonjs/Token/styles.js +19 -50
  50. package/commonjs/Tooltip/index.js +1 -1
  51. package/commonjs/index.js +2 -6
  52. package/commonjs/themes/dark/theme.js +180 -155
  53. package/commonjs/themes/{default → light}/dataviz-palette.js +0 -0
  54. package/commonjs/themes/{default → light}/decorative-palettes.js +0 -0
  55. package/commonjs/themes/{default → light}/literal-colors.js +0 -0
  56. package/commonjs/themes/{default → light}/theme.js +19 -8
  57. package/commonjs/themes/utils/interact.js +19 -0
  58. package/commonjs/types/theme.colors.flow.js +1 -1
  59. package/commonjs/types/theme.flow.js +1 -1
  60. package/commonjs/utils/mixins.js +1 -1
  61. package/commonjs/utils/responsiveProps/index.js +1 -1
  62. package/dist/themes/dark/_themes.scss +132 -0
  63. package/dist/themes/dark/dark.scss +601 -0
  64. package/dist/themes/light/_themes.scss +132 -0
  65. package/dist/themes/light/light.scss +692 -0
  66. package/lib/Breadcrumb/styles.js +1 -1
  67. package/lib/Button/styles.js +1 -1
  68. package/lib/Card/styles.js +1 -1
  69. package/lib/Drawer/styles.js +1 -1
  70. package/lib/KeyboardKey/styles.js +1 -1
  71. package/lib/Menu/index.js +4 -2
  72. package/lib/Menu/styles.js +2 -13
  73. package/lib/Modal/styles.js +1 -1
  74. package/lib/Popout/index.js +1 -1
  75. package/lib/ThemeProvider/index.js +1 -1
  76. package/lib/Token/index.js +5 -2
  77. package/lib/Token/styles.js +19 -50
  78. package/lib/Tooltip/index.js +1 -1
  79. package/lib/index.js +1 -2
  80. package/lib/themes/dark/theme.js +175 -154
  81. package/lib/themes/{default → light}/dataviz-palette.js +0 -0
  82. package/lib/themes/{default → light}/decorative-palettes.js +0 -0
  83. package/lib/themes/{default → light}/literal-colors.js +0 -0
  84. package/lib/themes/{default → light}/theme.js +18 -8
  85. package/lib/themes/utils/interact.js +13 -0
  86. package/lib/types/theme.colors.flow.js +1 -1
  87. package/lib/types/theme.flow.js +1 -1
  88. package/lib/utils/mixins.js +1 -1
  89. package/lib/utils/responsiveProps/index.js +1 -1
  90. package/package.json +7 -10
  91. package/__flow__/CustomThemeProvider/index.js +0 -16
  92. package/__flow__/Modal/__snapshots__/index.test.js.snap +0 -80
  93. package/__flow__/themes/sprout/theme.js +0 -22
  94. package/__flow__/utils/extendTheme.js +0 -17
  95. package/commonjs/CustomThemeProvider/index.js +0 -23
  96. package/commonjs/themes/sprout/theme.js +0 -29
  97. package/commonjs/utils/extendTheme.js +0 -22
  98. package/lib/CustomThemeProvider/index.js +0 -12
  99. package/lib/themes/sprout/theme.js +0 -19
  100. package/lib/utils/extendTheme.js +0 -12
@@ -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[100];
15
+ return props.theme.shadows.low;
16
16
  }, function (props) {
17
17
  return props.theme.space[200];
18
18
  }, COMMON);
package/lib/Menu/index.js CHANGED
@@ -8,7 +8,7 @@ import * as React from "react";
8
8
  import styled from "styled-components";
9
9
  import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
10
10
  import uniqueId from "lodash.uniqueid";
11
- import { MenuGroupContainer, MenuItemContainer, MenuItemsContainer } from "./styles";
11
+ import { MenuItemContainer, MenuItemsContainer } from "./styles";
12
12
  import { MENU_ITEM_ROLES, MENU_ROLES } from "./constants";
13
13
  import Box from "../Box";
14
14
  import Button from "../Button";
@@ -244,7 +244,9 @@ export var MenuGroup = function MenuGroup(_ref2) {
244
244
  mt: 350,
245
245
  color: "text.headline",
246
246
  _css: isDisabled && disabled
247
- }, title)), /*#__PURE__*/React.createElement(MenuGroupContainer, _extends({}, props, {
247
+ }, title)), /*#__PURE__*/React.createElement(Box, _extends({}, props, {
248
+ m: 300,
249
+ p: 300,
248
250
  role: "group"
249
251
  }), children));
250
252
  };
@@ -41,18 +41,7 @@ export var MenuItemContainer = styled(Box).withConfig({
41
41
  }, function (props) {
42
42
  return props.disabled && disabled;
43
43
  });
44
- export var MenuGroupContainer = styled(Box).withConfig({
45
- displayName: "styles__MenuGroupContainer",
46
- componentId: "fjvae4-1"
47
- })(["", ";"], function (props) {
48
- return props.appearance === "flush" ? css(["margin:0 -", ";"], function (props) {
49
- return props.theme.space[300];
50
- }) : css(["padding:", ";"], function (props) {
51
- return props.theme.space[300];
52
- });
53
- });
54
44
  export var MenuItemsContainer = styled(Box).withConfig({
55
45
  displayName: "styles__MenuItemsContainer",
56
- componentId: "fjvae4-2"
57
- })(["list-style-type:none;outline:0;"]);
58
- export default MenuGroupContainer;
46
+ componentId: "fjvae4-1"
47
+ })(["list-style-type:none;outline:0;"]);
@@ -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[300];
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);
@@ -267,7 +267,7 @@ Popout.Content = function (_ref4) {
267
267
  border: 500,
268
268
  borderColor: "container.border.base",
269
269
  borderRadius: "outer",
270
- boxShadow: 300,
270
+ boxShadow: "medium",
271
271
  p: 400,
272
272
  m: 300
273
273
  }, rest), children);
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
2
2
 
3
3
  import * as React from "react";
4
4
  import { ThemeProvider as BaseThemeProvider } from "styled-components";
5
- import theme from "../themes/default/theme";
5
+ import theme from "../themes/light/theme";
6
6
 
7
7
  var ThemeProvider = function ThemeProvider(props) {
8
8
  return /*#__PURE__*/React.createElement(BaseThemeProvider, _extends({}, props, {
@@ -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
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "closeable", "onClick", "qa", "valid", "disabled"]);
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
- as: closeable || onClick ? "button" : "div",
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,
@@ -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
- })(["font-family:", ";", ";position:relative;display:inline-block;padding:", " ", ";margin:0;color:", ";background:", ";border:1px solid ", ";font-weight:", ";line-height:1;vertical-align:middle;border-radius:", ";outline:none;transition:all ", " ", ";&:focus{", "}", " ", " ", " ", ""], function (props) {
8
- return props.theme.fontFamily;
9
- }, function (props) {
10
- return props.theme.typography[200];
11
- }, function (props) {
12
- return props.theme.space[200];
13
- }, function (props) {
14
- return props.theme.space[300];
15
- }, function (props) {
16
- return props.theme.colors.text.body;
17
- }, function (props) {
18
- return props.theme.colors.container.background.base;
19
- }, function (props) {
20
- return props.theme.colors.container.border.base;
21
- }, function (props) {
22
- return props.theme.fontWeights.normal;
23
- }, function (props) {
24
- return props.theme.radii[500];
25
- }, function (props) {
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;
@@ -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: 300,
121
+ boxShadow: "medium",
122
122
  border: 500,
123
123
  borderColor: "container.border.base" // $FlowIssue - upgrade v0.112.0
124
124
 
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
2
2
  export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
3
- export { default as theme } from "./themes/default/theme";
3
+ export { default as theme } from "./themes/light/theme";
4
4
  export { default as darkTheme } from "./themes/dark/theme";
5
5
  export { default as Icon } from "./Icon"; // DEPRECATED: Alert has been renamed to Banner
6
6
 
@@ -36,7 +36,6 @@ export { default as Tabs } from "./Tabs";
36
36
  export { default as Modal } from "./Modal";
37
37
  export { default as Popout } from "./Popout";
38
38
  export { default as ThemeProvider } from "./ThemeProvider";
39
- export { default as CustomThemeProvider } from "./CustomThemeProvider";
40
39
  export { default as Tooltip } from "./Tooltip";
41
40
  export { default as Drawer } from "./Drawer";
42
41
  export { default as LoaderButton } from "./LoaderButton";
@@ -1,186 +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 defaultTheme from "../default/theme";
4
+ import DEPTH from "@sproutsocial/seeds-depth";
5
+ import defaultTheme from "../light/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 darkTheme = _extends({}, defaultTheme, {
9
- colors: _extends({}, defaultTheme.colors, {
10
- app: {
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.COLOR_NEUTRAL_1000
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
- container: {
80
+ secondary: {
16
81
  background: {
17
- base: COLORS.COLOR_NEUTRAL_900,
18
- success: green.background,
19
- warning: yellow.background,
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.COLOR_NEUTRAL_1100,
37
- success: green.highlight,
38
- warning: yellow.highlight,
39
- error: red.highlight,
40
- danger: red.highlight,
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
- button: {
56
- primary: {
57
- background: {
58
- base: COLORS.COLOR_BLUE_400,
59
- hover: COLORS.COLOR_BLUE_300,
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
- pill: {
85
- background: {
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
- destructive: {
99
- background: {
100
- base: COLORS.COLOR_RED_400,
101
- hover: COLORS.COLOR_RED_300,
102
- active: COLORS.COLOR_RED_200
103
- },
104
- border: {
105
- base: "transparent"
106
- },
107
- text: {
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
- placeholder: {
113
- background: {
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
- unstyled: {
127
- background: {
128
- base: "transparent"
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
- link: {
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: COLORS.COLOR_NEUTRAL_900,
163
- selected: COLORS.COLOR_NEUTRAL_0
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
- listItem: {
136
+ unstyled: {
176
137
  background: {
177
- base: "transparent",
178
- hover: COLORS.COLOR_NEUTRAL_800,
179
- selected: COLORS.COLOR_NEUTRAL_0
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
  }
181
147
  }
182
- }, datavizPalette),
183
- mode: "dark"
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
174
+ },
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
190
+ }
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
184
205
  });
185
206
 
186
207
  export default darkTheme;
File without changes
File without changes
@@ -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,
@@ -211,6 +216,10 @@ var colors = _extends({
211
216
  yelp: NETWORKCOLORS.NETWORK_COLOR_YELP,
212
217
  whatsapp: NETWORKCOLORS.NETWORK_COLOR_WHATSAPP,
213
218
  tiktok: NETWORKCOLORS.NETWORK_COLOR_TIKTOK
219
+ },
220
+ dataviz: {
221
+ map: datavizPalette.DATAVIZ_COLORS_MAP,
222
+ list: datavizPalette.DATAVIZ_COLORS_LIST
214
223
  }
215
224
  }, literalColors, datavizPalette);
216
225
 
@@ -262,10 +271,9 @@ export var borderWidths = {
262
271
  "500": BORDER.BORDER_WIDTH_500
263
272
  };
264
273
  export var shadows = {
265
- "100": DEPTH.ELEVATION_LEVEL_100,
266
- "200": DEPTH.ELEVATION_LEVEL_200,
267
- "300": DEPTH.ELEVATION_LEVEL_300,
268
- "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"
269
277
  };
270
278
  export var easing = {
271
279
  ease_in: MOTION.MOTION_EASE_IN,
@@ -278,6 +286,9 @@ export var duration = {
278
286
  slow: MOTION.MOTION_DURATION_SLOW
279
287
  };
280
288
  var theme = {
289
+ utils: {
290
+ interact: interact(MODE)
291
+ },
281
292
  breakpoints: breakpoints,
282
293
  colors: colors,
283
294
  typography: _extends({}, typography, {
@@ -298,10 +309,9 @@ var theme = {
298
309
  }),
299
310
  borders: borders,
300
311
  borderWidths: borderWidths,
301
- shadows: _extends({}, shadows, {
302
- shadows: shadows
303
- }),
312
+ shadows: shadows,
304
313
  easing: easing,
305
- duration: duration
314
+ duration: duration,
315
+ mode: MODE
306
316
  };
307
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;
@@ -1 +1 @@
1
- import literalColors from "../themes/default/literal-colors";
1
+ import literalColors from "../themes/light/literal-colors";
@@ -1 +1 @@
1
- import { breakpoints, typography, fontWeights, radii, borders, borderWidths, shadows, space, easing, duration } from "../themes/default/theme";
1
+ import { breakpoints, typography, fontWeights, radii, borders, borderWidths, shadows, space, easing, duration } from "../themes/light/theme";