@sproutsocial/racine 12.18.0 → 12.20.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 (51) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/__flow__/EnumLogoNames.js +1 -1
  3. package/__flow__/Icon/index.stories.js +33 -0
  4. package/__flow__/Icon/styles.js +0 -11
  5. package/__flow__/LoaderButton/index.js +22 -4
  6. package/__flow__/LoaderButton/index.stories.js +28 -0
  7. package/__flow__/LogoViewBoxes.js +1 -1
  8. package/__flow__/Menu/__snapshots__/index.test.js.snap +0 -9
  9. package/__flow__/PartnerLogo/TypePartnerNames.js +2 -1
  10. package/__flow__/PartnerLogo/index.js +1 -7
  11. package/__flow__/PartnerLogo/index.stories.js +1 -0
  12. package/__flow__/PartnerLogo/partnerLogos/bigcommerce-dark.svg +5 -3
  13. package/__flow__/PartnerLogo/partnerLogos/bigcommerce-lockup-dark.svg +14 -0
  14. package/__flow__/PartnerLogo/partnerLogos/bigcommerce-lockup.svg +14 -0
  15. package/__flow__/PartnerLogo/partnerLogos/bigcommerce.svg +5 -3
  16. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-dark.svg +7 -0
  17. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-lockup-dark.svg +19 -0
  18. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-lockup.svg +19 -0
  19. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-wordmark-dark.svg +14 -0
  20. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-wordmark.svg +14 -0
  21. package/__flow__/PartnerLogo/partnerLogos/sproutsocial.svg +7 -0
  22. package/__flow__/PartnerLogo/styles.js +0 -12
  23. package/__flow__/themes/dark/theme.js +2 -2
  24. package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.js +16 -1
  25. package/__flow__/themes/extendedThemes/sproutTheme/light/theme.js +12 -0
  26. package/__flow__/themes/light/theme.js +2 -2
  27. package/commonjs/Icon/styles.js +1 -3
  28. package/commonjs/LoaderButton/index.js +31 -4
  29. package/commonjs/LogoViewBoxes.js +10 -2
  30. package/commonjs/PartnerLogo/index.js +3 -4
  31. package/commonjs/PartnerLogo/styles.js +1 -3
  32. package/commonjs/themes/dark/theme.js +2 -2
  33. package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +16 -1
  34. package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +12 -0
  35. package/commonjs/themes/light/theme.js +2 -2
  36. package/dist/logo.svg +1 -1
  37. package/dist/logoList.js +1 -1
  38. package/dist/themes/dark/theme.scss +2 -2
  39. package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +28 -4
  40. package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +26 -2
  41. package/dist/themes/light/theme.scss +2 -2
  42. package/lib/Icon/styles.js +1 -3
  43. package/lib/LoaderButton/index.js +32 -4
  44. package/lib/LogoViewBoxes.js +10 -2
  45. package/lib/PartnerLogo/index.js +3 -4
  46. package/lib/PartnerLogo/styles.js +1 -3
  47. package/lib/themes/dark/theme.js +2 -2
  48. package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +16 -1
  49. package/lib/themes/extendedThemes/sproutTheme/light/theme.js +12 -0
  50. package/lib/themes/light/theme.js +2 -2
  51. package/package.json +1 -1
package/dist/logoList.js CHANGED
@@ -1 +1 @@
1
- module.exports = ["bigcommerce-dark","bigcommerce","bitly-dark","bitly","canva-dark","canva","dropbox-dark","dropbox-lockup-dark","dropbox-lockup","dropbox-wordmark-dark","dropbox-wordmark","dropbox","facebook-audience-network-dark","facebook-audience-network","facebook-dark","facebook-groups-dark","facebook-groups","facebook-shops-dark","facebook-shops","facebook","feedly-dark","feedly","glassdoor-dark","glassdoor","google-analytics-dark","google-analytics","google-business-messages-dark","google-business-messages","google-drive-dark","google-drive","google-my-business-dark","google-my-business","hubspot-dark","hubspot","instagram-dark","instagram","linkedin-audience-network-dark","linkedin-audience-network","linkedin-dark","linkedin","marketo-dark","marketo","messenger-dark","messenger","microsoft-dynamics-dark","microsoft-dynamics","pinterest-dark","pinterest","reddit-dark","reddit","salesforce-dark","salesforce","shopify-dark","shopify","slack-dark","slack","tiktok-dark","tiktok","tripadvisor-dark","tripadvisor","tumblr-dark","tumblr","twitter-audience-network-dark","twitter-audience-network","twitter-dark","twitter","whatsapp-dark","whatsapp","woocommerce-dark","woocommerce","yelp-dark","yelp","youtube-dark","youtube","zendesk-dark","zendesk-lockup-dark","zendesk-lockup","zendesk-wordmark-dark","zendesk-wordmark","zendesk"];
1
+ module.exports = ["bigcommerce-dark","bigcommerce-lockup-dark","bigcommerce-lockup","bigcommerce","bitly-dark","bitly","canva-dark","canva","dropbox-dark","dropbox-lockup-dark","dropbox-lockup","dropbox-wordmark-dark","dropbox-wordmark","dropbox","facebook-audience-network-dark","facebook-audience-network","facebook-dark","facebook-groups-dark","facebook-groups","facebook-shops-dark","facebook-shops","facebook","feedly-dark","feedly","glassdoor-dark","glassdoor","google-analytics-dark","google-analytics","google-business-messages-dark","google-business-messages","google-drive-dark","google-drive","google-my-business-dark","google-my-business","hubspot-dark","hubspot","instagram-dark","instagram","linkedin-audience-network-dark","linkedin-audience-network","linkedin-dark","linkedin","marketo-dark","marketo","messenger-dark","messenger","microsoft-dynamics-dark","microsoft-dynamics","pinterest-dark","pinterest","reddit-dark","reddit","salesforce-dark","salesforce","shopify-dark","shopify","slack-dark","slack","sproutsocial-dark","sproutsocial-lockup-dark","sproutsocial-lockup","sproutsocial-wordmark-dark","sproutsocial-wordmark","sproutsocial","tiktok-dark","tiktok","tripadvisor-dark","tripadvisor","tumblr-dark","tumblr","twitter-audience-network-dark","twitter-audience-network","twitter-dark","twitter","whatsapp-dark","whatsapp","woocommerce-dark","woocommerce","yelp-dark","yelp","youtube-dark","youtube","zendesk-dark","zendesk-lockup-dark","zendesk-lockup","zendesk-wordmark-dark","zendesk-wordmark","zendesk"];
@@ -169,9 +169,9 @@ $theme: (
169
169
  "info": #dcf2ff,
170
170
  "opportunity": #eaeaf9,
171
171
  "applied": #56adf5,
172
- "positive_sentiment": #2079c3,
172
+ "positive_sentiment": #2b87d3,
173
173
  "negative_sentiment": #ed4c42,
174
- "neutral_sentiment": #6e797a
174
+ "neutral_sentiment": #929a9b
175
175
  ),
176
176
  "form": (
177
177
  "background": (
@@ -201,9 +201,9 @@ $theme: (
201
201
  "info": #dcf2ff,
202
202
  "opportunity": #eaeaf9,
203
203
  "applied": #56adf5,
204
- "positive_sentiment": #2079c3,
204
+ "positive_sentiment": #2b87d3,
205
205
  "negative_sentiment": #ed4c42,
206
- "neutral_sentiment": #6e797a
206
+ "neutral_sentiment": #929a9b
207
207
  ),
208
208
  "form": (
209
209
  "background": (
@@ -495,7 +495,7 @@ $theme: (
495
495
  ),
496
496
  "accordion": (
497
497
  "background": (
498
- "base": #162020
498
+ "base": #162020A3
499
499
  )
500
500
  )
501
501
  ),
@@ -607,6 +607,18 @@ $theme: (
607
607
  "purple": #6f5ed3
608
608
  )
609
609
  ),
610
+ "featuredDemo": (
611
+ "background": (
612
+ "primary": (
613
+ "base": #56adf5,
614
+ "hover": #dcf2ff
615
+ ),
616
+ "secondary": (
617
+ "base": #9180f4,
618
+ "hover": #eaeaf9
619
+ )
620
+ )
621
+ ),
610
622
  "darkModal": (
611
623
  "background": (
612
624
  "base": #002838
@@ -866,6 +878,18 @@ $theme: (
866
878
  "purple": #6f5ed3
867
879
  )
868
880
  ),
881
+ "featuredDemo": (
882
+ "background": (
883
+ "primary": (
884
+ "base": #56adf5,
885
+ "hover": #dcf2ff
886
+ ),
887
+ "secondary": (
888
+ "base": #9180f4,
889
+ "hover": #eaeaf9
890
+ )
891
+ )
892
+ ),
869
893
  "darkModal": (
870
894
  "background": (
871
895
  "base": #002838
@@ -937,7 +961,7 @@ $theme: (
937
961
  ),
938
962
  "accordion": (
939
963
  "background": (
940
- "base": #162020
964
+ "base": #162020A3
941
965
  )
942
966
  )
943
967
  ),
@@ -200,9 +200,9 @@ $theme: (
200
200
  "info": #0c5689,
201
201
  "opportunity": #5e4eba,
202
202
  "applied": #2079c3,
203
- "positive_sentiment": #2079c3,
203
+ "positive_sentiment": #2b87d3,
204
204
  "negative_sentiment": #ed4c42,
205
- "neutral_sentiment": #6e797a
205
+ "neutral_sentiment": #929a9b
206
206
  ),
207
207
  "form": (
208
208
  "background": (
@@ -606,6 +606,18 @@ $theme: (
606
606
  "purple": #6f5ed3
607
607
  )
608
608
  ),
609
+ "featuredDemo": (
610
+ "background": (
611
+ "primary": (
612
+ "base": #2079c3,
613
+ "hover": #0c5689
614
+ ),
615
+ "secondary": (
616
+ "base": #5e4eba,
617
+ "hover": #5e4eba
618
+ )
619
+ )
620
+ ),
609
621
  "darkModal": (
610
622
  "background": (
611
623
  "base": #002838
@@ -865,6 +877,18 @@ $theme: (
865
877
  "purple": #6f5ed3
866
878
  )
867
879
  ),
880
+ "featuredDemo": (
881
+ "background": (
882
+ "primary": (
883
+ "base": #2079c3,
884
+ "hover": #0c5689
885
+ ),
886
+ "secondary": (
887
+ "base": #5e4eba,
888
+ "hover": #5e4eba
889
+ )
890
+ )
891
+ ),
868
892
  "darkModal": (
869
893
  "background": (
870
894
  "base": #002838
@@ -175,9 +175,9 @@ $theme: (
175
175
  "info": #0c5689,
176
176
  "opportunity": #5e4eba,
177
177
  "applied": #2079c3,
178
- "positive_sentiment": #2079c3,
178
+ "positive_sentiment": #2b87d3,
179
179
  "negative_sentiment": #ed4c42,
180
- "neutral_sentiment": #6e797a
180
+ "neutral_sentiment": #929a9b
181
181
  ),
182
182
  "form": (
183
183
  "background": (
@@ -13,9 +13,7 @@ var sizes = {
13
13
  };
14
14
 
15
15
  var stylesForSize = function stylesForSize(iconSize, fixedWidth) {
16
- return css(["line-height:", ";&,.Icon-svg{height:", ";fill:currentColor;}", " _:-ms-fullscreen &,html &{width:", ";}", " .pdf-page &{width:", ";}"], iconSize, iconSize, fixedWidth && "\n &,\n & .Icon-svg {\n width: " + iconSize + "\n }\n ", iconSize, ""
17
- /* PDF hack, do not remove */
18
- , iconSize);
16
+ return css(["line-height:", ";&,.Icon-svg{height:", ";fill:currentColor;}", ""], iconSize, iconSize, fixedWidth && "\n &,\n & .Icon-svg {\n width: " + iconSize + "\n }\n ");
19
17
  };
20
18
 
21
19
  var Container = styled.span.attrs({
@@ -9,17 +9,41 @@ import styled, { css } from "styled-components";
9
9
  import Box from "../Box";
10
10
  import Button from "../Button";
11
11
  import Loader from "../Loader";
12
+ import { useTheme } from "styled-components";
12
13
  import { rgba } from "polished";
13
14
  import { COLOR_NEUTRAL_0, COLOR_NEUTRAL_1000 } from "@sproutsocial/seeds-color";
14
15
 
15
- var getColor = function getColor(appearance) {
16
+ // TODO: This is a temporary solution to get the loader button to work with dark mode
17
+ var getColor = function getColor(appearance, themeColorMode) {
18
+ var selectColorBasedOnMode = themeColorMode === "dark" ? "light" : "dark";
19
+
16
20
  switch (appearance) {
17
21
  /** "default" is @deprecated in favour of unstyled */
18
22
  case "default":
23
+ return selectColorBasedOnMode;
24
+
19
25
  case "unstyled":
20
- case "outline":
26
+ return selectColorBasedOnMode;
27
+
28
+ case "primary":
29
+ return "light";
30
+
21
31
  case "secondary":
22
- return "dark";
32
+ return selectColorBasedOnMode;
33
+
34
+ case "destructive":
35
+ return "light";
36
+
37
+ case "placeholder":
38
+ return selectColorBasedOnMode;
39
+
40
+ case "pill":
41
+ return selectColorBasedOnMode;
42
+
43
+ case "outline":
44
+ // This case doesn't even make sense.... There's no outline button
45
+ // TODO: investigate if this is even used anywhere
46
+ return "light";
23
47
 
24
48
  default:
25
49
  return "light";
@@ -45,6 +69,10 @@ export var LoaderButton = function LoaderButton(_ref) {
45
69
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
46
70
 
47
71
  var isLoading = Boolean(_isLoading);
72
+
73
+ var _useTheme = useTheme(),
74
+ themeColorMode = _useTheme.mode;
75
+
48
76
  return /*#__PURE__*/React.createElement(Button, _extends({
49
77
  disabled: disabled || isLoading,
50
78
  appearance: appearance,
@@ -65,7 +93,7 @@ export var LoaderButton = function LoaderButton(_ref) {
65
93
  text: loaderLabel,
66
94
  size: "small",
67
95
  delay: false,
68
- color: getColor(appearance)
96
+ color: getColor(appearance, themeColorMode)
69
97
  }))));
70
98
  };
71
99
  export default LoaderButton;
@@ -1,6 +1,8 @@
1
1
  module.exports = {
2
- "bigcommerce-dark": "0 0 16 16",
3
- "bigcommerce": "0 0 16 16",
2
+ "bigcommerce-dark": "0 0 140 140",
3
+ "bigcommerce-lockup-dark": "0 0 291 66",
4
+ "bigcommerce-lockup": "0 0 291 66",
5
+ "bigcommerce": "0 0 140 140",
4
6
  "bitly-dark": "0 0 140 64",
5
7
  "bitly": "0 0 140 64",
6
8
  "canva-dark": "0 0 140 140",
@@ -55,6 +57,12 @@ module.exports = {
55
57
  "shopify": "0 0 140 159",
56
58
  "slack-dark": "0 0 140 140",
57
59
  "slack": "0 0 140 140",
60
+ "sproutsocial-dark": "0 0 140 174",
61
+ "sproutsocial-lockup-dark": "0 0 291 58",
62
+ "sproutsocial-lockup": "0 0 291 58",
63
+ "sproutsocial-wordmark-dark": "0 0 320 52",
64
+ "sproutsocial-wordmark": "0 0 320 52",
65
+ "sproutsocial": "0 0 140 174",
58
66
  "tiktok-dark": "0 0 140 159",
59
67
  "tiktok": "0 0 140 159",
60
68
  "tripadvisor-dark": "0 0 140 140",
@@ -45,12 +45,11 @@ var PartnerLogo = function PartnerLogo(_ref) {
45
45
  width: width ? width : defaultWidth + "px",
46
46
  logoSize: size // $FlowIssue - upgrade v0.112.0
47
47
 
48
- }, rest), /*#__PURE__*/React.createElement("svg", _extends({
48
+ }, rest), /*#__PURE__*/React.createElement("svg", {
49
49
  className: "logo-svg",
50
50
  viewBox: logoViewBox,
51
- focusable: false // $FlowIssue - upgrade v0.112.0
52
-
53
- }, rest), /*#__PURE__*/React.createElement("use", {
51
+ focusable: false
52
+ }, /*#__PURE__*/React.createElement("use", {
54
53
  xmlnsXlink: "http://www.w3.org/1999/xlink",
55
54
  xlinkHref: "#sslogosvg-" + whichLogo(backgroundType)
56
55
  })));
@@ -10,9 +10,7 @@ var sizes = {
10
10
  };
11
11
 
12
12
  var stylesForSize = function stylesForSize(height, width, logoSize) {
13
- return css(["line-height:", ";&,.logo-svg{height:", ";width:", ";}_:-ms-fullscreen &,html &{width:", ";}", " .pdf-page &{width:", ";}"], logoSize ? logoSize : height, logoSize ? logoSize : height, logoSize ? logoSize : "", logoSize ? logoSize : width, ""
14
- /* PDF hack, do not remove */
15
- , logoSize ? logoSize : width);
13
+ return css(["line-height:", ";&,.logo-svg{height:", ";width:", ";}"], logoSize ? logoSize : height, logoSize ? logoSize : height, logoSize ? logoSize : "");
16
14
  };
17
15
 
18
16
  var Container = styled.span.attrs({
@@ -186,9 +186,9 @@ var colors = _extends({}, lightTheme.colors, {
186
186
  info: blue.foreground,
187
187
  opportunity: purple.foreground,
188
188
  applied: COLORS.COLOR_BLUE_400,
189
- positive_sentiment: COLORS.COLOR_BLUE_700,
189
+ positive_sentiment: COLORS.COLOR_BLUE_600,
190
190
  negative_sentiment: COLORS.COLOR_RED_600,
191
- neutral_sentiment: COLORS.COLOR_NEUTRAL_600
191
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_500
192
192
  },
193
193
  form: {
194
194
  background: {
@@ -23,7 +23,10 @@ export var navigation = {
23
23
  },
24
24
  accordion: {
25
25
  background: {
26
- base: baseDarkTheme.colors.neutral[1000]
26
+ // Uses hexicimal to change the opacity of the color
27
+ // Adding 'A3' at end to make this color have a 64% opacity
28
+ // Reference https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
29
+ base: baseDarkTheme.colors.neutral[1000] + "A3"
27
30
  }
28
31
  }
29
32
  },
@@ -136,6 +139,18 @@ export var growth = {
136
139
  purple: baseDarkTheme.colors.purple[700]
137
140
  }
138
141
  },
142
+ featuredDemo: {
143
+ background: {
144
+ primary: {
145
+ base: baseDarkTheme.colors.blue[400],
146
+ hover: baseDarkTheme.colors.blue[100]
147
+ },
148
+ secondary: {
149
+ base: baseDarkTheme.colors.purple[500],
150
+ hover: baseDarkTheme.colors.purple[100]
151
+ }
152
+ }
153
+ },
139
154
  darkModal: {
140
155
  background: {
141
156
  base: baseDarkTheme.colors.aqua[1100]
@@ -136,6 +136,18 @@ export var growth = {
136
136
  purple: baseLightTheme.colors.purple[700]
137
137
  }
138
138
  },
139
+ featuredDemo: {
140
+ background: {
141
+ primary: {
142
+ base: baseLightTheme.colors.blue[700],
143
+ hover: baseLightTheme.colors.blue[900]
144
+ },
145
+ secondary: {
146
+ base: baseLightTheme.colors.purple[800],
147
+ hover: baseLightTheme.colors.purple[800]
148
+ }
149
+ }
150
+ },
139
151
  darkModal: {
140
152
  background: {
141
153
  base: baseLightTheme.colors.aqua[1100]
@@ -186,9 +186,9 @@ var colors = _extends({
186
186
  info: blue.foreground,
187
187
  opportunity: purple.foreground,
188
188
  applied: COLORS.COLOR_BLUE_700,
189
- positive_sentiment: COLORS.COLOR_BLUE_700,
189
+ positive_sentiment: COLORS.COLOR_BLUE_600,
190
190
  negative_sentiment: COLORS.COLOR_RED_600,
191
- neutral_sentiment: COLORS.COLOR_NEUTRAL_600
191
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_500
192
192
  },
193
193
  form: {
194
194
  background: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "12.18.0",
3
+ "version": "12.20.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",