@sproutsocial/racine 9.1.0-token-beta.0 → 9.1.1-theme-extension.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 (64) hide show
  1. package/CHANGELOG.md +0 -28
  2. package/__flow__/Breadcrumb/styles.js +5 -0
  3. package/__flow__/Button/styles.js +1 -1
  4. package/__flow__/Card/index.stories.js +1 -0
  5. package/__flow__/Card/styles.js +1 -1
  6. package/__flow__/CustomThemeProvider/index.js +16 -0
  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__/Menu/index.stories.js +1 -1
  11. package/__flow__/Modal/__snapshots__/index.test.js.snap +1 -1
  12. package/__flow__/Modal/styles.js +1 -1
  13. package/__flow__/Popout/index.js +1 -1
  14. package/__flow__/ThemeProvider/index.js +2 -2
  15. package/__flow__/Token/index.js +1 -4
  16. package/__flow__/Token/index.stories.js +0 -11
  17. package/__flow__/Token/styles.js +33 -43
  18. package/__flow__/Tooltip/index.js +1 -1
  19. package/__flow__/index.js +1 -0
  20. package/__flow__/themes/dark/theme.js +156 -180
  21. package/__flow__/themes/default/theme.js +8 -19
  22. package/__flow__/themes/sprout/theme.js +22 -0
  23. package/__flow__/types/system-props.flow.js +2 -1
  24. package/__flow__/utils/extendTheme.js +17 -0
  25. package/commonjs/Breadcrumb/styles.js +1 -1
  26. package/commonjs/Button/styles.js +1 -1
  27. package/commonjs/Card/styles.js +1 -1
  28. package/commonjs/CustomThemeProvider/index.js +23 -0
  29. package/commonjs/Drawer/styles.js +1 -1
  30. package/commonjs/KeyboardKey/styles.js +1 -1
  31. package/commonjs/Modal/styles.js +1 -1
  32. package/commonjs/Popout/index.js +1 -1
  33. package/commonjs/Token/index.js +2 -5
  34. package/commonjs/Token/styles.js +50 -19
  35. package/commonjs/Tooltip/index.js +1 -1
  36. package/commonjs/index.js +5 -1
  37. package/commonjs/themes/dark/theme.js +154 -179
  38. package/commonjs/themes/default/theme.js +8 -19
  39. package/commonjs/themes/sprout/theme.js +29 -0
  40. package/commonjs/utils/extendTheme.js +22 -0
  41. package/lib/Breadcrumb/styles.js +1 -1
  42. package/lib/Button/styles.js +1 -1
  43. package/lib/Card/styles.js +1 -1
  44. package/lib/CustomThemeProvider/index.js +12 -0
  45. package/lib/Drawer/styles.js +1 -1
  46. package/lib/KeyboardKey/styles.js +1 -1
  47. package/lib/Modal/styles.js +1 -1
  48. package/lib/Popout/index.js +1 -1
  49. package/lib/Token/index.js +2 -5
  50. package/lib/Token/styles.js +50 -19
  51. package/lib/Tooltip/index.js +1 -1
  52. package/lib/index.js +1 -0
  53. package/lib/themes/dark/theme.js +153 -174
  54. package/lib/themes/default/theme.js +8 -18
  55. package/lib/themes/sprout/theme.js +19 -0
  56. package/lib/utils/extendTheme.js +12 -0
  57. package/package.json +9 -6
  58. package/__flow__/themes/_themes.scss +0 -138
  59. package/__flow__/themes/utils/interact.js +0 -12
  60. package/commonjs/themes/utils/interact.js +0 -19
  61. package/dist/themes/_themes.scss +0 -138
  62. package/dist/themes/dark.scss +0 -601
  63. package/dist/themes/default.scss +0 -692
  64. package/lib/themes/utils/interact.js +0 -13
@@ -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.high;
16
+ return props.theme.shadows[400];
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.low;
15
+ return props.theme.shadows[100];
16
16
  }, function (props) {
17
17
  return props.theme.space[200];
18
18
  }, COMMON);
@@ -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.medium;
56
+ return props.theme.shadows[300];
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: "medium",
270
+ boxShadow: 300,
271
271
  p: 400,
272
272
  m: 300
273
273
  }, rest), children);
@@ -18,17 +18,14 @@ 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
- _ref$palette = _ref.palette,
22
- palette = _ref$palette === void 0 ? "neutral" : _ref$palette,
23
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "closeable", "onClick", "qa", "valid", "disabled", "palette"]);
21
+ rest = _objectWithoutPropertiesLoose(_ref, ["children", "closeable", "onClick", "qa", "valid", "disabled"]);
24
22
 
25
23
  var textContainer = useTextContent("");
26
24
  return /*#__PURE__*/React.createElement(Container, _extends({
27
25
  ref: textContainer,
28
26
  valid: valid,
29
- palette: palette,
30
- type: closeable || onClick ? "button" : undefined,
31
27
  as: closeable || onClick ? "button" : "div",
28
+ type: closeable || onClick ? "button" : undefined,
32
29
  closeable: closeable || onClick,
33
30
  disabled: disabled,
34
31
  onClick: onClick,
@@ -4,24 +4,55 @@ import { focusRing } from "../utils/mixins";
4
4
  var Container = styled.button.withConfig({
5
5
  displayName: "styles__Container",
6
6
  componentId: "nyn5zy-0"
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));
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
+ });
26
57
  }, COMMON);
27
58
  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: "medium",
121
+ boxShadow: 300,
122
122
  border: 500,
123
123
  borderColor: "container.border.base" // $FlowIssue - upgrade v0.112.0
124
124
 
package/lib/index.js CHANGED
@@ -36,6 +36,7 @@ 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";
39
40
  export { default as Tooltip } from "./Tooltip";
40
41
  export { default as Drawer } from "./Drawer";
41
42
  export { default as LoaderButton } from "./LoaderButton";
@@ -1,207 +1,186 @@
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";
5
4
  import defaultTheme from "../default/theme";
6
5
  import { datavizPalette } from "./dataviz-palette";
7
6
  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
- };
15
7
 
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: {
8
+ var darkTheme = _extends({}, defaultTheme, {
9
+ colors: _extends({}, defaultTheme.colors, {
10
+ app: {
67
11
  background: {
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
12
+ base: COLORS.COLOR_NEUTRAL_1000
78
13
  }
79
14
  },
80
- secondary: {
15
+ container: {
81
16
  background: {
82
- base: "transparent",
83
- hover: COLORS.COLOR_NEUTRAL_100,
84
- active: COLORS.COLOR_NEUTRAL_0
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
85
34
  },
86
35
  border: {
87
- base: COLORS.COLOR_NEUTRAL_0
88
- },
89
- text: {
90
- base: COLORS.COLOR_NEUTRAL_0,
91
- hover: COLORS.COLOR_NEUTRAL_800
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
92
53
  }
93
54
  },
94
- pill: {
95
- background: {
96
- base: "transparent",
97
- hover: COLORS.COLOR_NEUTRAL_1000,
98
- active: COLORS.COLOR_NEUTRAL_900
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
+ }
99
69
  },
100
- border: {
101
- base: "transparent"
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
+ }
102
83
  },
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
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
+ }
113
97
  },
114
- border: {
115
- base: "transparent"
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
+ }
116
111
  },
117
- text: {
118
- base: COLORS.COLOR_NEUTRAL_900,
119
- hover: COLORS.COLOR_NEUTRAL_1000
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
+ }
125
+ },
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
+ }
120
137
  }
121
138
  },
122
- placeholder: {
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: {
123
161
  background: {
124
- base: "transparent",
125
- hover: COLORS.COLOR_NEUTRAL_1100,
126
- active: COLORS.COLOR_NEUTRAL_1100
162
+ base: COLORS.COLOR_NEUTRAL_900,
163
+ selected: COLORS.COLOR_NEUTRAL_0
127
164
  },
128
165
  border: {
129
- base: COLORS.COLOR_NEUTRAL_500
166
+ base: COLORS.COLOR_NEUTRAL_500,
167
+ error: red.highlight,
168
+ warning: yellow.highlight,
169
+ selected: COLORS.COLOR_NEUTRAL_0
130
170
  },
131
- text: {
132
- base: COLORS.COLOR_BLUE_400,
133
- hover: COLORS.COLOR_BLUE_300
171
+ placeholder: {
172
+ base: COLORS.COLOR_NEUTRAL_500
134
173
  }
135
174
  },
136
- unstyled: {
175
+ listItem: {
137
176
  background: {
138
- base: "transparent"
139
- },
140
- border: {
141
- base: "transparent"
142
- },
143
- text: {
144
- base: COLORS.COLOR_NEUTRAL_300,
145
- hover: COLORS.COLOR_NEUTRAL_200
177
+ base: "transparent",
178
+ hover: COLORS.COLOR_NEUTRAL_800,
179
+ selected: COLORS.COLOR_NEUTRAL_0
146
180
  }
147
181
  }
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
182
+ }, datavizPalette),
183
+ mode: "dark"
205
184
  });
206
185
 
207
186
  export default darkTheme;
@@ -10,9 +10,7 @@ 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";
14
13
  export var breakpoints = ["900px", "1200px", "1500px", "1800px"];
15
- var MODE = "default-light";
16
14
 
17
15
  var colors = _extends({
18
16
  app: {
@@ -187,9 +185,6 @@ var colors = _extends({
187
185
  selected: COLORS.COLOR_NEUTRAL_800
188
186
  }
189
187
  },
190
- elevation: {
191
- base: COLORS.COLOR_NEUTRAL_900 + "3D"
192
- },
193
188
  network: {
194
189
  twitter: NETWORKCOLORS.NETWORK_COLOR_TWITTER,
195
190
  twitter_like: NETWORKCOLORS.NETWORK_COLOR_TWITTER_LIKE,
@@ -216,10 +211,6 @@ var colors = _extends({
216
211
  yelp: NETWORKCOLORS.NETWORK_COLOR_YELP,
217
212
  whatsapp: NETWORKCOLORS.NETWORK_COLOR_WHATSAPP,
218
213
  tiktok: NETWORKCOLORS.NETWORK_COLOR_TIKTOK
219
- },
220
- dataviz: {
221
- map: datavizPalette.DATAVIZ_COLORS_MAP,
222
- list: datavizPalette.DATAVIZ_COLORS_LIST
223
214
  }
224
215
  }, literalColors, datavizPalette);
225
216
 
@@ -271,9 +262,10 @@ export var borderWidths = {
271
262
  "500": BORDER.BORDER_WIDTH_500
272
263
  };
273
264
  export var shadows = {
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"
265
+ "100": DEPTH.ELEVATION_LEVEL_100,
266
+ "200": DEPTH.ELEVATION_LEVEL_200,
267
+ "300": DEPTH.ELEVATION_LEVEL_300,
268
+ "400": DEPTH.ELEVATION_LEVEL_400
277
269
  };
278
270
  export var easing = {
279
271
  ease_in: MOTION.MOTION_EASE_IN,
@@ -286,9 +278,6 @@ export var duration = {
286
278
  slow: MOTION.MOTION_DURATION_SLOW
287
279
  };
288
280
  var theme = {
289
- utils: {
290
- interact: interact(MODE)
291
- },
292
281
  breakpoints: breakpoints,
293
282
  colors: colors,
294
283
  typography: _extends({}, typography, {
@@ -309,9 +298,10 @@ var theme = {
309
298
  }),
310
299
  borders: borders,
311
300
  borderWidths: borderWidths,
312
- shadows: shadows,
301
+ shadows: _extends({}, shadows, {
302
+ shadows: shadows
303
+ }),
313
304
  easing: easing,
314
- duration: duration,
315
- mode: MODE
305
+ duration: duration
316
306
  };
317
307
  export default theme;
@@ -0,0 +1,19 @@
1
+ import theme from "../default/theme";
2
+ import { COLOR_RED_800 } from "@sproutsocial/seeds-color";
3
+ var sproutTheme = {
4
+ container: {
5
+ background: {
6
+ error: {
7
+ hover: COLOR_RED_800
8
+ }
9
+ }
10
+ },
11
+ button: {
12
+ primary: {
13
+ background: {
14
+ base: "purple"
15
+ }
16
+ }
17
+ }
18
+ };
19
+ export default sproutTheme;
@@ -0,0 +1,12 @@
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
+
3
+ import * as merge from "deepmerge";
4
+ export function extendColorTheme(baseTheme, extension) {
5
+ var newColorTheme = merge(baseTheme.colors, extension);
6
+
7
+ var newTheme = _extends({}, baseTheme, {
8
+ colors: _extends({}, newColorTheme)
9
+ });
10
+
11
+ return newTheme;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "9.1.0-token-beta.0",
3
+ "version": "9.1.1-theme-extension.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",
@@ -52,18 +52,22 @@
52
52
  },
53
53
  "lint-staged": {
54
54
  "**/*.js": [
55
- "eslint --fix"
55
+ "eslint --fix",
56
+ "git add"
56
57
  ],
57
58
  "*.scss": [
58
- "stylelint --fix"
59
+ "stylelint --fix",
60
+ "git add"
59
61
  ],
60
62
  "icons/*.svg": [
61
- "yarn icon-lint write"
63
+ "yarn icon-lint write",
64
+ "git add"
62
65
  ]
63
66
  },
64
67
  "dependencies": {
65
68
  "@styled-system/theme-get": "^5.1.2",
66
69
  "classnames": "^2.2.6",
70
+ "deepmerge": "^4.2.2",
67
71
  "lodash.curry": "^4.1.1",
68
72
  "lodash.uniqueid": "^4.0.1",
69
73
  "lru-memoize": "^1.1.0",
@@ -92,7 +96,7 @@
92
96
  "@reach/component-component": "^0.1.3",
93
97
  "@sproutsocial/seeds-border": "^1.1.0",
94
98
  "@sproutsocial/seeds-color": "^1.5.3",
95
- "@sproutsocial/seeds-depth": "^3.0.0",
99
+ "@sproutsocial/seeds-depth": "^1.1.1",
96
100
  "@sproutsocial/seeds-motion": "^1.2.0",
97
101
  "@sproutsocial/seeds-networkcolor": "^2.9.0",
98
102
  "@sproutsocial/seeds-space": "^0.4.7",
@@ -140,7 +144,6 @@
140
144
  "jest-dom": "^3.5.0",
141
145
  "jest-styled-components": "7.0.0-beta.1",
142
146
  "jscodeshift": "^0.6.4",
143
- "json-to-scss": "^1.6.2",
144
147
  "lint-staged": "^10.2.11",
145
148
  "moment": "^2.29.1",
146
149
  "npm-run-all": "^4.1.2",