@sproutsocial/racine 11.2.5-sproutTheme-beta.0 → 11.2.5-sproutTheme-beta.3

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 (45) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/__flow__/Button/index.stories.js +1 -0
  3. package/__flow__/Input/index.js +185 -66
  4. package/__flow__/Input/index.stories.js +65 -0
  5. package/__flow__/Input/index.test.js +230 -1
  6. package/__flow__/Input/styles.js +1 -1
  7. package/__flow__/ThemeProvider/index.js +5 -1
  8. package/__flow__/TokenInput/index.js +1 -1
  9. package/__flow__/index.js +1 -0
  10. package/__flow__/themes/dark/theme.js +3 -0
  11. package/__flow__/themes/extendedThemes/sproutTheme/NonColorThemeValues/index.js +17 -0
  12. package/__flow__/themes/extendedThemes/sproutTheme/dark/getDarkThemeColors.js +57 -0
  13. package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.js +17 -35
  14. package/__flow__/themes/extendedThemes/sproutTheme/index.js +2 -0
  15. package/__flow__/themes/extendedThemes/sproutTheme/light/getLightThemeColors.js +53 -0
  16. package/__flow__/themes/extendedThemes/sproutTheme/light/theme.js +16 -35
  17. package/__flow__/themes/extendedThemes/sproutTheme/sproutThemeType.flow.js +36 -0
  18. package/__flow__/themes/light/theme.js +3 -0
  19. package/__flow__/types/theme.colors.flow.js +3 -0
  20. package/__flow__/types/theme.flow.js +15 -0
  21. package/commonjs/Input/index.js +124 -30
  22. package/commonjs/Input/styles.js +1 -1
  23. package/commonjs/TokenInput/index.js +1 -1
  24. package/commonjs/themes/dark/theme.js +4 -1
  25. package/commonjs/themes/extendedThemes/sproutTheme/NonColorThemeValues/index.js +15 -0
  26. package/commonjs/themes/extendedThemes/sproutTheme/dark/getDarkThemeColors.js +57 -0
  27. package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +16 -35
  28. package/commonjs/themes/extendedThemes/sproutTheme/light/getLightThemeColors.js +53 -0
  29. package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +16 -35
  30. package/commonjs/themes/extendedThemes/sproutTheme/sproutThemeType.flow.js +1 -0
  31. package/commonjs/themes/light/theme.js +4 -1
  32. package/dist/themes/dark/dark.scss +4 -1
  33. package/dist/themes/light/light.scss +4 -1
  34. package/lib/Input/index.js +117 -30
  35. package/lib/Input/styles.js +1 -1
  36. package/lib/TokenInput/index.js +1 -1
  37. package/lib/themes/dark/theme.js +4 -1
  38. package/lib/themes/extendedThemes/sproutTheme/NonColorThemeValues/index.js +10 -0
  39. package/lib/themes/extendedThemes/sproutTheme/dark/getDarkThemeColors.js +52 -0
  40. package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +13 -35
  41. package/lib/themes/extendedThemes/sproutTheme/light/getLightThemeColors.js +48 -0
  42. package/lib/themes/extendedThemes/sproutTheme/light/theme.js +13 -35
  43. package/lib/themes/extendedThemes/sproutTheme/sproutThemeType.flow.js +0 -0
  44. package/lib/themes/light/theme.js +4 -1
  45. package/package.json +1 -1
@@ -0,0 +1,48 @@
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
+ export function getLightThemeColors(themeColors) {
4
+ return _extends({}, themeColors, {
5
+ navigation: {
6
+ main: {
7
+ background: {
8
+ base: themeColors.neutral[900],
9
+ overflowGradient: themeColors.neutral[1000]
10
+ }
11
+ },
12
+ secondary: {
13
+ background: {
14
+ base: themeColors.neutral[800]
15
+ }
16
+ },
17
+ text: {
18
+ base: themeColors.neutral[0],
19
+ hover: themeColors.neutral[0]
20
+ },
21
+ icon: {
22
+ base: themeColors.neutral[0],
23
+ hover: themeColors.neutral[0]
24
+ },
25
+ listItem: {
26
+ background: {
27
+ base: themeColors.neutral[800],
28
+ hover: themeColors.neutral[1000],
29
+ selected: themeColors.neutral[700]
30
+ }
31
+ }
32
+ },
33
+ container: _extends({}, themeColors.container, {
34
+ background: _extends({}, themeColors.container.background, {
35
+ positive_sentiment: themeColors.blue[500],
36
+ negative_sentiment: themeColors.red[500],
37
+ neutral_sentiment: themeColors.neutral[300]
38
+ })
39
+ }),
40
+ icon: _extends({}, themeColors.icon, {
41
+ sentiment: {
42
+ positive_sentiment: themeColors.blue[500],
43
+ negative_sentiment: themeColors.red[500],
44
+ neutral_sentiment: themeColors.neutral[300]
45
+ }
46
+ })
47
+ });
48
+ }
@@ -1,40 +1,18 @@
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
+
1
3
  import clone from "just-clone";
4
+ import baseLightTheme from "../../../light/theme";
5
+ import { getLightThemeColors } from "./getLightThemeColors";
6
+ import { getNonColorThemeValues } from "../NonColorThemeValues";
7
+
8
+ var lightTheme = function lightTheme(baseLightTheme) {
9
+ // clone base theme. (we don't want to mutate the base theme)
10
+ var themeClone = clone(baseLightTheme); // get non color theme values
11
+
12
+ var nonColorThemeValues = getNonColorThemeValues(themeClone); // get sprout specific light theme colors
2
13
 
3
- var lightTheme = function lightTheme(theme) {
4
- var sproutLightTheme = clone(theme);
5
- sproutLightTheme.sprout = {
6
- colors: {
7
- navigation: {
8
- main: {
9
- background: {
10
- base: theme.colors.neutral[900],
11
- gradient: theme.colors.neutral[1000]
12
- }
13
- },
14
- secondary: {
15
- background: {
16
- base: theme.colors.neutral[800]
17
- }
18
- },
19
- text: {
20
- base: theme.colors.neutral[0],
21
- hover: theme.colors.neutral[0]
22
- },
23
- icon: {
24
- base: theme.colors.neutral[0],
25
- hover: theme.colors.neutral[0]
26
- },
27
- item: {
28
- background: {
29
- base: theme.colors.neutral[800],
30
- hover: theme.colors.neutral[1000],
31
- active: theme.colors.neutral[700]
32
- }
33
- }
34
- }
35
- }
36
- };
37
- return sproutLightTheme;
14
+ var lightThemeColors = getLightThemeColors(themeClone.colors);
15
+ return _extends({}, themeClone, nonColorThemeValues, lightThemeColors);
38
16
  };
39
17
 
40
18
  export default lightTheme;
@@ -157,7 +157,10 @@ var colors = _extends({
157
157
  subtext: COLORS.COLOR_NEUTRAL_700,
158
158
  body: COLORS.COLOR_NEUTRAL_800,
159
159
  inverse: COLORS.COLOR_NEUTRAL_0,
160
- error: COLORS.COLOR_RED_800
160
+ error: COLORS.COLOR_RED_800,
161
+ background: {
162
+ highlight: COLORS.COLOR_YELLOW_200
163
+ }
161
164
  },
162
165
  icon: {
163
166
  base: COLORS.COLOR_NEUTRAL_800,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "11.2.5-sproutTheme-beta.0",
3
+ "version": "11.2.5-sproutTheme-beta.3",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",