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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/__flow__/Box/index.stories.js +1 -1
  3. package/__flow__/Breadcrumb/styles.js +0 -5
  4. package/__flow__/Button/styles.js +2 -2
  5. package/__flow__/Card/index.stories.js +0 -1
  6. package/__flow__/Card/styles.js +1 -1
  7. package/__flow__/Checkbox/styles.js +1 -1
  8. package/__flow__/Drawer/index.stories.js +3 -3
  9. package/__flow__/Drawer/styles.js +1 -1
  10. package/__flow__/KeyboardKey/styles.js +1 -1
  11. package/__flow__/Listbox/__snapshots__/index.test.js.snap +40 -34
  12. package/__flow__/Menu/__snapshots__/index.test.js.snap +15 -12
  13. package/__flow__/Menu/index.js +3 -7
  14. package/__flow__/Menu/index.stories.js +1 -1
  15. package/__flow__/Menu/styles.js +1 -18
  16. package/__flow__/Modal/index.test.js +0 -16
  17. package/__flow__/Modal/styles.js +1 -1
  18. package/__flow__/Popout/index.js +1 -1
  19. package/__flow__/Stack/index.js +1 -1
  20. package/__flow__/ThemeProvider/index.js +4 -4
  21. package/__flow__/Token/index.js +4 -1
  22. package/__flow__/Token/index.stories.js +11 -0
  23. package/__flow__/Token/styles.js +43 -33
  24. package/__flow__/Tooltip/index.js +1 -1
  25. package/__flow__/index.js +1 -2
  26. package/__flow__/themes/dark/_themed.scss +133 -0
  27. package/__flow__/themes/dark/theme.js +187 -157
  28. package/__flow__/themes/light/_themed.scss +133 -0
  29. package/__flow__/themes/{default → light}/dataviz-palette.js +0 -0
  30. package/__flow__/themes/{default → light}/decorative-palettes.js +0 -0
  31. package/__flow__/themes/{default → light}/literal-colors.js +0 -0
  32. package/__flow__/themes/{default → light}/theme.js +25 -8
  33. package/__flow__/themes/utils/interact.js +12 -0
  34. package/__flow__/types/system-props.flow.js +1 -2
  35. package/__flow__/types/theme.colors.flow.js +7 -1
  36. package/__flow__/types/theme.flow.js +2 -2
  37. package/__flow__/utils/mixins.js +1 -1
  38. package/__flow__/utils/responsiveProps/index.js +1 -1
  39. package/commonjs/Breadcrumb/styles.js +1 -1
  40. package/commonjs/Button/styles.js +2 -2
  41. package/commonjs/Card/styles.js +1 -1
  42. package/commonjs/Checkbox/styles.js +1 -1
  43. package/commonjs/Drawer/styles.js +1 -1
  44. package/commonjs/KeyboardKey/styles.js +1 -1
  45. package/commonjs/Menu/index.js +3 -1
  46. package/commonjs/Menu/styles.js +3 -16
  47. package/commonjs/Modal/styles.js +1 -1
  48. package/commonjs/Popout/index.js +1 -1
  49. package/commonjs/ThemeProvider/index.js +1 -1
  50. package/commonjs/Token/index.js +5 -2
  51. package/commonjs/Token/styles.js +19 -50
  52. package/commonjs/Tooltip/index.js +1 -1
  53. package/commonjs/index.js +2 -6
  54. package/commonjs/themes/dark/theme.js +186 -155
  55. package/commonjs/themes/{default → light}/dataviz-palette.js +0 -0
  56. package/commonjs/themes/{default → light}/decorative-palettes.js +0 -0
  57. package/commonjs/themes/{default → light}/literal-colors.js +0 -0
  58. package/commonjs/themes/{default → light}/theme.js +27 -10
  59. package/commonjs/themes/utils/interact.js +19 -0
  60. package/commonjs/types/theme.colors.flow.js +1 -1
  61. package/commonjs/types/theme.flow.js +1 -1
  62. package/commonjs/utils/mixins.js +1 -1
  63. package/commonjs/utils/responsiveProps/index.js +1 -1
  64. package/dist/themes/dark/_themed.scss +133 -0
  65. package/dist/themes/dark/dark.scss +607 -0
  66. package/dist/themes/light/_themed.scss +133 -0
  67. package/dist/themes/light/light.scss +698 -0
  68. package/lib/Breadcrumb/styles.js +1 -1
  69. package/lib/Button/styles.js +2 -2
  70. package/lib/Card/styles.js +1 -1
  71. package/lib/Checkbox/styles.js +1 -1
  72. package/lib/Drawer/styles.js +1 -1
  73. package/lib/KeyboardKey/styles.js +1 -1
  74. package/lib/Menu/index.js +4 -2
  75. package/lib/Menu/styles.js +2 -13
  76. package/lib/Modal/styles.js +1 -1
  77. package/lib/Popout/index.js +1 -1
  78. package/lib/ThemeProvider/index.js +1 -1
  79. package/lib/Token/index.js +5 -2
  80. package/lib/Token/styles.js +19 -50
  81. package/lib/Tooltip/index.js +1 -1
  82. package/lib/index.js +1 -2
  83. package/lib/themes/dark/theme.js +181 -154
  84. package/lib/themes/{default → light}/dataviz-palette.js +0 -0
  85. package/lib/themes/{default → light}/decorative-palettes.js +0 -0
  86. package/lib/themes/{default → light}/literal-colors.js +0 -0
  87. package/lib/themes/{default → light}/theme.js +26 -10
  88. package/lib/themes/utils/interact.js +13 -0
  89. package/lib/types/theme.colors.flow.js +1 -1
  90. package/lib/types/theme.flow.js +1 -1
  91. package/lib/utils/mixins.js +1 -1
  92. package/lib/utils/responsiveProps/index.js +1 -1
  93. package/package.json +7 -10
  94. package/__flow__/CustomThemeProvider/index.js +0 -16
  95. package/__flow__/Modal/__snapshots__/index.test.js.snap +0 -80
  96. package/__flow__/themes/sprout/theme.js +0 -22
  97. package/__flow__/utils/extendTheme.js +0 -17
  98. package/commonjs/CustomThemeProvider/index.js +0 -23
  99. package/commonjs/themes/sprout/theme.js +0 -29
  100. package/commonjs/utils/extendTheme.js +0 -22
  101. package/lib/CustomThemeProvider/index.js +0 -12
  102. package/lib/themes/sprout/theme.js +0 -19
  103. package/lib/utils/extendTheme.js +0 -12
@@ -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 = "light";
14
16
 
15
17
  var colors = _extends({
16
18
  app: {
@@ -36,7 +38,10 @@ var colors = _extends({
36
38
  red: red.background,
37
39
  neutral: neutral.background
38
40
  },
39
- selected: COLORS.COLOR_NEUTRAL_800
41
+ selected: COLORS.COLOR_NEUTRAL_800,
42
+ positive_sentiment: COLORS.COLOR_BLUE_500,
43
+ negative_sentiment: COLORS.COLOR_RED_500,
44
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_300
40
45
  },
41
46
  border: {
42
47
  base: COLORS.COLOR_NEUTRAL_200,
@@ -161,7 +166,10 @@ var colors = _extends({
161
166
  error: red.foreground,
162
167
  danger: red.foreground,
163
168
  info: blue.foreground,
164
- opportunity: purple.foreground
169
+ opportunity: purple.foreground,
170
+ positive_sentiment: COLORS.COLOR_BLUE_700,
171
+ negative_sentiment: COLORS.COLOR_RED_600,
172
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_600
165
173
  },
166
174
  form: {
167
175
  background: {
@@ -185,6 +193,9 @@ var colors = _extends({
185
193
  selected: COLORS.COLOR_NEUTRAL_800
186
194
  }
187
195
  },
196
+ elevation: {
197
+ base: COLORS.COLOR_NEUTRAL_900 + "3D"
198
+ },
188
199
  network: {
189
200
  twitter: NETWORKCOLORS.NETWORK_COLOR_TWITTER,
190
201
  twitter_like: NETWORKCOLORS.NETWORK_COLOR_TWITTER_LIKE,
@@ -211,6 +222,10 @@ var colors = _extends({
211
222
  yelp: NETWORKCOLORS.NETWORK_COLOR_YELP,
212
223
  whatsapp: NETWORKCOLORS.NETWORK_COLOR_WHATSAPP,
213
224
  tiktok: NETWORKCOLORS.NETWORK_COLOR_TIKTOK
225
+ },
226
+ dataviz: {
227
+ map: datavizPalette.DATAVIZ_COLORS_MAP,
228
+ list: datavizPalette.DATAVIZ_COLORS_LIST
214
229
  }
215
230
  }, literalColors, datavizPalette);
216
231
 
@@ -262,10 +277,9 @@ export var borderWidths = {
262
277
  "500": BORDER.BORDER_WIDTH_500
263
278
  };
264
279
  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
280
+ low: DEPTH.ELEVATION_LEVEL_100 + " " + COLORS.COLOR_NEUTRAL_900 + "3D",
281
+ medium: DEPTH.ELEVATION_LEVEL_300 + " " + COLORS.COLOR_NEUTRAL_900 + "3D",
282
+ high: DEPTH.ELEVATION_LEVEL_400 + " " + COLORS.COLOR_NEUTRAL_900 + "3D"
269
283
  };
270
284
  export var easing = {
271
285
  ease_in: MOTION.MOTION_EASE_IN,
@@ -278,6 +292,9 @@ export var duration = {
278
292
  slow: MOTION.MOTION_DURATION_SLOW
279
293
  };
280
294
  var theme = {
295
+ utils: {
296
+ interact: interact(MODE)
297
+ },
281
298
  breakpoints: breakpoints,
282
299
  colors: colors,
283
300
  typography: _extends({}, typography, {
@@ -298,10 +315,9 @@ var theme = {
298
315
  }),
299
316
  borders: borders,
300
317
  borderWidths: borderWidths,
301
- shadows: _extends({}, shadows, {
302
- shadows: shadows
303
- }),
318
+ shadows: shadows,
304
319
  easing: easing,
305
- duration: duration
320
+ duration: duration,
321
+ mode: MODE
306
322
  };
307
323
  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 === "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";
@@ -1,5 +1,5 @@
1
1
  import { css } from "styled-components";
2
- import theme from "../themes/default/theme";
2
+ import theme from "../themes/light/theme";
3
3
  import { transparentize } from "polished";
4
4
  export var svgToDataURL = function svgToDataURL(svgStr) {
5
5
  var encoded = encodeURIComponent(svgStr).replace(/'/g, "%27").replace(/"/g, "%22");
@@ -1,4 +1,4 @@
1
- import theme from "../../themes/default/theme";
1
+ import theme from "../../themes/light/theme";
2
2
  var breakpoints = theme.breakpoints;
3
3
  var LENGTH = breakpoints.length + 1;
4
4
  export var normalizeResponsiveProp = function normalizeResponsiveProp(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "9.1.1-theme-extension.0",
3
+ "version": "10.0.0-dar105-beta.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",
@@ -52,22 +52,18 @@
52
52
  },
53
53
  "lint-staged": {
54
54
  "**/*.js": [
55
- "eslint --fix",
56
- "git add"
55
+ "eslint --fix"
57
56
  ],
58
57
  "*.scss": [
59
- "stylelint --fix",
60
- "git add"
58
+ "stylelint --fix"
61
59
  ],
62
60
  "icons/*.svg": [
63
- "yarn icon-lint write",
64
- "git add"
61
+ "yarn icon-lint write"
65
62
  ]
66
63
  },
67
64
  "dependencies": {
68
65
  "@styled-system/theme-get": "^5.1.2",
69
66
  "classnames": "^2.2.6",
70
- "deepmerge": "^4.2.2",
71
67
  "lodash.curry": "^4.1.1",
72
68
  "lodash.uniqueid": "^4.0.1",
73
69
  "lru-memoize": "^1.1.0",
@@ -96,7 +92,7 @@
96
92
  "@reach/component-component": "^0.1.3",
97
93
  "@sproutsocial/seeds-border": "^1.1.0",
98
94
  "@sproutsocial/seeds-color": "^1.5.3",
99
- "@sproutsocial/seeds-depth": "^1.1.1",
95
+ "@sproutsocial/seeds-depth": "^3.0.0",
100
96
  "@sproutsocial/seeds-motion": "^1.2.0",
101
97
  "@sproutsocial/seeds-networkcolor": "^2.9.0",
102
98
  "@sproutsocial/seeds-space": "^0.4.7",
@@ -107,7 +103,7 @@
107
103
  "@storybook/addon-storysource": "^6.1.11",
108
104
  "@storybook/addon-viewport": "^6.1.11",
109
105
  "@storybook/addons": "^6.1.11",
110
- "@storybook/react": "^6.1.11",
106
+ "@storybook/react": "^6.4.19",
111
107
  "@storybook/theming": "^6.1.11",
112
108
  "@testing-library/react": "^11.2.2",
113
109
  "@testing-library/user-event": "^13.0.0",
@@ -144,6 +140,7 @@
144
140
  "jest-dom": "^3.5.0",
145
141
  "jest-styled-components": "7.0.0-beta.1",
146
142
  "jscodeshift": "^0.6.4",
143
+ "json-to-scss": "^1.6.2",
147
144
  "lint-staged": "^10.2.11",
148
145
  "moment": "^2.29.1",
149
146
  "npm-run-all": "^4.1.2",
@@ -1,16 +0,0 @@
1
- // @flow strict-local
2
- import * as React from "react";
3
- import { ThemeProvider } from "styled-components";
4
-
5
- import typeof { default as TypeTheme } from "../themes/default/theme";
6
-
7
- type TypeProps = {|
8
- theme?: TypeTheme,
9
- children: React.Node,
10
- |};
11
-
12
- const CustomThemeProvider = (props: TypeProps) => (
13
- <ThemeProvider theme={props.theme} {...props} />
14
- );
15
-
16
- export default CustomThemeProvider;
@@ -1,80 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`Modal should render properly 1`] = `
4
- .c0__Overlay {
5
- position: fixed;
6
- top: 0px;
7
- left: 0px;
8
- right: 0px;
9
- bottom: 0px;
10
- display: -webkit-box;
11
- display: -webkit-flex;
12
- display: -ms-flexbox;
13
- display: flex;
14
- -webkit-align-items: center;
15
- -webkit-box-align: center;
16
- -ms-flex-align: center;
17
- align-items: center;
18
- -webkit-box-pack: center;
19
- -webkit-justify-content: center;
20
- -ms-flex-pack: center;
21
- justify-content: center;
22
- background-color: rgba(22,32,32,0.68);
23
- opacity: 0;
24
- will-change: opacity;
25
- -webkit-transition: opacity .3s cubic-bezier(.4,0,.2,1);
26
- transition: opacity .3s cubic-bezier(.4,0,.2,1);
27
- z-index: 6;
28
- }
29
-
30
- .c0__Overlay.ReactModal__Overlay--after-open {
31
- opacity: 1;
32
- }
33
-
34
- .c0__Overlay.ReactModal__Overlay--before-close {
35
- opacity: 0;
36
- }
37
-
38
- .c0__Content {
39
- display: -webkit-box;
40
- display: -webkit-flex;
41
- display: -ms-flexbox;
42
- display: flex;
43
- -webkit-flex-direction: column;
44
- -ms-flex-direction: column;
45
- flex-direction: column;
46
- background: #FFFFFF;
47
- border-radius: 6px;
48
- box-shadow: 0px 8px 16px rgba(39,51,51,.24);
49
- -webkit-filter: blur(0);
50
- filter: blur(0);
51
- color: #364141;
52
- outline: none;
53
- max-width: calc(100vw - 64px);
54
- max-height: calc(100vh - 64px);
55
- width: 800px;
56
- background-color: #c1c1f7;
57
- }
58
-
59
- @media screen and (-ms-high-contrast:active),(-ms-high-contrast:none) {
60
- .c0__Content {
61
- height: calc(100vh - 64px);
62
- }
63
- }
64
-
65
- <div
66
- class="ReactModal__Overlay ReactModal__Overlay--after-open styles__Container-sc-9lom4g-0__Overlay c0 c0__Overlay"
67
- >
68
- <div
69
- aria-label="Label"
70
- aria-modal="true"
71
- class="ReactModal__Content ReactModal__Content--after-open styles__Container-sc-9lom4g-0__Content c0 c0__Content"
72
- data-qa-modal=""
73
- data-qa-modal-isopen="true"
74
- role="dialog"
75
- tabindex="-1"
76
- >
77
- ajdsfljasdlfjlasdjf
78
- </div>
79
- </div>
80
- `;
@@ -1,22 +0,0 @@
1
- // @flow strict-local
2
- import theme from "../default/theme";
3
- import { COLOR_RED_800 } from "@sproutsocial/seeds-color";
4
-
5
- const sproutTheme = {
6
- container: {
7
- background: {
8
- error: {
9
- hover: COLOR_RED_800,
10
- },
11
- },
12
- },
13
- button: {
14
- primary: {
15
- background: {
16
- base: "purple",
17
- },
18
- },
19
- },
20
- };
21
-
22
- export default sproutTheme;
@@ -1,17 +0,0 @@
1
- //@flow strict-local
2
- import * as merge from "deepmerge";
3
-
4
- export function extendColorTheme(
5
- baseTheme: { colors: {} },
6
- extension: { [key: string]: string | {} }
7
- ) {
8
- const newColorTheme = merge(baseTheme.colors, extension);
9
- const newTheme = {
10
- ...baseTheme,
11
- colors: {
12
- ...newColorTheme,
13
- },
14
- };
15
-
16
- return newTheme;
17
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
-
6
- var React = _interopRequireWildcard(require("react"));
7
-
8
- var _styledComponents = require("styled-components");
9
-
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
-
12
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
-
14
- 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); }
15
-
16
- var CustomThemeProvider = function CustomThemeProvider(props) {
17
- return /*#__PURE__*/React.createElement(_styledComponents.ThemeProvider, _extends({
18
- theme: props.theme
19
- }, props));
20
- };
21
-
22
- var _default = CustomThemeProvider;
23
- exports.default = _default;
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
-
6
- var _theme = _interopRequireDefault(require("../default/theme"));
7
-
8
- var _seedsColor = require("@sproutsocial/seeds-color");
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- var sproutTheme = {
13
- container: {
14
- background: {
15
- error: {
16
- hover: _seedsColor.COLOR_RED_800
17
- }
18
- }
19
- },
20
- button: {
21
- primary: {
22
- background: {
23
- base: "purple"
24
- }
25
- }
26
- }
27
- };
28
- var _default = sproutTheme;
29
- exports.default = _default;
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.extendColorTheme = extendColorTheme;
5
-
6
- var merge = _interopRequireWildcard(require("deepmerge"));
7
-
8
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
-
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
-
12
- 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); }
13
-
14
- function extendColorTheme(baseTheme, extension) {
15
- var newColorTheme = merge(baseTheme.colors, extension);
16
-
17
- var newTheme = _extends({}, baseTheme, {
18
- colors: _extends({}, newColorTheme)
19
- });
20
-
21
- return newTheme;
22
- }
@@ -1,12 +0,0 @@
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 React from "react";
4
- import { ThemeProvider } from "styled-components";
5
-
6
- var CustomThemeProvider = function CustomThemeProvider(props) {
7
- return /*#__PURE__*/React.createElement(ThemeProvider, _extends({
8
- theme: props.theme
9
- }, props));
10
- };
11
-
12
- export default CustomThemeProvider;
@@ -1,19 +0,0 @@
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;
@@ -1,12 +0,0 @@
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
- }