@sproutsocial/racine 11.9.0 → 12.1.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 (35) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/__flow__/Input/index.js +2 -2
  3. package/__flow__/Token/styles.js +13 -12
  4. package/__flow__/index.js +1 -0
  5. package/__flow__/themes/dark/theme.js +0 -5
  6. package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.js +63 -0
  7. package/__flow__/themes/extendedThemes/sproutTheme/light/theme.js +63 -0
  8. package/__flow__/themes/light/theme.js +0 -5
  9. package/__flow__/types/theme.flow.js +2 -2
  10. package/__flow__/utils/useInteractiveColor.js +32 -0
  11. package/commonjs/Input/index.js +3 -1
  12. package/commonjs/Token/styles.js +9 -7
  13. package/commonjs/index.js +6 -1
  14. package/commonjs/themes/dark/theme.js +0 -5
  15. package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +65 -2
  16. package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +65 -2
  17. package/commonjs/themes/light/theme.js +0 -5
  18. package/commonjs/utils/useInteractiveColor.js +33 -0
  19. package/dist/themes/dark/theme.scss +0 -3
  20. package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +120 -3
  21. package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +120 -3
  22. package/dist/themes/light/theme.scss +0 -3
  23. package/lib/Input/index.js +2 -1
  24. package/lib/Token/styles.js +8 -7
  25. package/lib/index.js +1 -0
  26. package/lib/themes/dark/theme.js +0 -4
  27. package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +63 -1
  28. package/lib/themes/extendedThemes/sproutTheme/light/theme.js +63 -1
  29. package/lib/themes/light/theme.js +0 -4
  30. package/lib/types/theme.flow.js +1 -1
  31. package/lib/utils/useInteractiveColor.js +27 -0
  32. package/package.json +1 -1
  33. package/__flow__/themes/utils/interact.js +0 -12
  34. package/commonjs/themes/utils/interact.js +0 -19
  35. package/lib/themes/utils/interact.js +0 -13
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.useInteractiveColor = void 0;
5
+
6
+ var _polished = require("polished");
7
+
8
+ var _styledComponents = require("styled-components");
9
+
10
+ /**
11
+ * The useInteractiveColor hook has context of theme mode (light or dark)
12
+ * and can be used to lighten or darken a color dynamically
13
+ *
14
+ * note: colors are limited to our theme colors
15
+ */
16
+ var useInteractiveColor = function useInteractiveColor(themeColor) {
17
+ // Throw error if used outside of a ThemeProvider (styled-components)
18
+ if (!(0, _styledComponents.useTheme)()) {
19
+ throw new Error("useInteractiveColor() must be used within a Styled Components ThemeProvider");
20
+ } // Get the current theme mode ie. 'light' or 'dark'
21
+
22
+
23
+ var themeMode = (0, _styledComponents.useTheme)().mode; // If the theme mode is dark, return a lightened version of the themeValue
24
+
25
+ if (themeMode === "dark") {
26
+ return (0, _polished.lighten)(0.2, themeColor);
27
+ } else {
28
+ // If the theme mode is light, return a darkened version of the themeValue
29
+ return (0, _polished.darken)(0.2, themeColor);
30
+ }
31
+ };
32
+
33
+ exports.useInteractiveColor = useInteractiveColor;
@@ -1,9 +1,6 @@
1
1
  $theme: (
2
2
  __esModule: true,
3
3
  default: (
4
- utils: (
5
-
6
- ),
7
4
  breakpoints: (900px, 1200px, 1500px, 1800px),
8
5
  colors: (
9
6
  app: (
@@ -18,9 +18,6 @@ $theme: (
18
18
  )
19
19
  ),
20
20
  default: (
21
- utils: (
22
-
23
- ),
24
21
  breakpoints: (900px, 1200px, 1500px, 1800px),
25
22
  colors: (
26
23
  app: (
@@ -492,6 +489,66 @@ $theme: (
492
489
  neutral: #f3f4f4,
493
490
  negative: #f3f4f4
494
491
  )
492
+ ),
493
+ growth: (
494
+ education: (
495
+ decorative: (
496
+ aqua: #0797ae,
497
+ teal: #08c4b2
498
+ )
499
+ ),
500
+ opportunity: (
501
+ background: (
502
+ base: #6f5ed3
503
+ ),
504
+ button: (
505
+ primary: (
506
+ base: #a193f2,
507
+ hover: #c1c1f7
508
+ )
509
+ ),
510
+ badge: (
511
+ background: (
512
+ base: #6f5ed3,
513
+ active: #eaeaf9
514
+ ),
515
+ icon: (
516
+ base: #d8d7f9,
517
+ active: #5e4eba
518
+ ),
519
+ text: (
520
+ base: #d8d7f9
521
+ )
522
+ ),
523
+ decorative: (
524
+ green: #0ca750,
525
+ lightAqua: #0797ae,
526
+ darkAqua: #002838,
527
+ purple: #6f5ed3
528
+ )
529
+ ),
530
+ darkModal: (
531
+ background: (
532
+ base: #002838
533
+ ),
534
+ text: (
535
+ base: #FFFFFF
536
+ ),
537
+ cards: (
538
+ background: (
539
+ base: #FFFFFF,
540
+ hover: #eaeaf9
541
+ ),
542
+ text: (
543
+ base: #364141,
544
+ hover: #273333
545
+ ),
546
+ border: (
547
+ base: #FFFFFF,
548
+ hover: #6f5ed3
549
+ )
550
+ )
551
+ )
495
552
  )
496
553
  ),
497
554
  typography: (
@@ -675,6 +732,66 @@ $theme: (
675
732
  ),
676
733
  mode: dark
677
734
  ),
735
+ growth: (
736
+ education: (
737
+ decorative: (
738
+ aqua: #0797ae,
739
+ teal: #08c4b2
740
+ )
741
+ ),
742
+ opportunity: (
743
+ background: (
744
+ base: #6f5ed3
745
+ ),
746
+ button: (
747
+ primary: (
748
+ base: #a193f2,
749
+ hover: #c1c1f7
750
+ )
751
+ ),
752
+ badge: (
753
+ background: (
754
+ base: #6f5ed3,
755
+ active: #eaeaf9
756
+ ),
757
+ icon: (
758
+ base: #d8d7f9,
759
+ active: #5e4eba
760
+ ),
761
+ text: (
762
+ base: #d8d7f9
763
+ )
764
+ ),
765
+ decorative: (
766
+ green: #0ca750,
767
+ lightAqua: #0797ae,
768
+ darkAqua: #002838,
769
+ purple: #6f5ed3
770
+ )
771
+ ),
772
+ darkModal: (
773
+ background: (
774
+ base: #002838
775
+ ),
776
+ text: (
777
+ base: #FFFFFF
778
+ ),
779
+ cards: (
780
+ background: (
781
+ base: #FFFFFF,
782
+ hover: #eaeaf9
783
+ ),
784
+ text: (
785
+ base: #364141,
786
+ hover: #273333
787
+ ),
788
+ border: (
789
+ base: #FFFFFF,
790
+ hover: #6f5ed3
791
+ )
792
+ )
793
+ )
794
+ ),
678
795
  navigation: (
679
796
  main: (
680
797
  background: (
@@ -18,9 +18,6 @@ $theme: (
18
18
  )
19
19
  ),
20
20
  default: (
21
- utils: (
22
-
23
- ),
24
21
  breakpoints: (900px, 1200px, 1500px, 1800px),
25
22
  colors: (
26
23
  app: (
@@ -492,6 +489,66 @@ $theme: (
492
489
  neutral: #364141,
493
490
  negative: #364141
494
491
  )
492
+ ),
493
+ growth: (
494
+ education: (
495
+ decorative: (
496
+ aqua: #0797ae,
497
+ teal: #0b968f
498
+ )
499
+ ),
500
+ opportunity: (
501
+ background: (
502
+ base: #6f5ed3
503
+ ),
504
+ button: (
505
+ primary: (
506
+ base: #6f5ed3,
507
+ hover: #5e4eba
508
+ )
509
+ ),
510
+ badge: (
511
+ background: (
512
+ base: #d8d7f9,
513
+ active: #5e4eba
514
+ ),
515
+ icon: (
516
+ base: #6f5ed3,
517
+ active: #eaeaf9
518
+ ),
519
+ text: (
520
+ base: #6f5ed3
521
+ )
522
+ ),
523
+ decorative: (
524
+ green: #0ca750,
525
+ lightAqua: #0797ae,
526
+ darkAqua: #002838,
527
+ purple: #6f5ed3
528
+ )
529
+ ),
530
+ darkModal: (
531
+ background: (
532
+ base: #002838
533
+ ),
534
+ text: (
535
+ base: #FFFFFF
536
+ ),
537
+ cards: (
538
+ background: (
539
+ base: #FFFFFF,
540
+ hover: #eaeaf9
541
+ ),
542
+ text: (
543
+ base: #364141,
544
+ hover: #273333
545
+ ),
546
+ border: (
547
+ base: #FFFFFF,
548
+ hover: #6f5ed3
549
+ )
550
+ )
551
+ )
495
552
  )
496
553
  ),
497
554
  typography: (
@@ -675,6 +732,66 @@ $theme: (
675
732
  ),
676
733
  mode: light
677
734
  ),
735
+ growth: (
736
+ education: (
737
+ decorative: (
738
+ aqua: #0797ae,
739
+ teal: #0b968f
740
+ )
741
+ ),
742
+ opportunity: (
743
+ background: (
744
+ base: #6f5ed3
745
+ ),
746
+ button: (
747
+ primary: (
748
+ base: #6f5ed3,
749
+ hover: #5e4eba
750
+ )
751
+ ),
752
+ badge: (
753
+ background: (
754
+ base: #d8d7f9,
755
+ active: #5e4eba
756
+ ),
757
+ icon: (
758
+ base: #6f5ed3,
759
+ active: #eaeaf9
760
+ ),
761
+ text: (
762
+ base: #6f5ed3
763
+ )
764
+ ),
765
+ decorative: (
766
+ green: #0ca750,
767
+ lightAqua: #0797ae,
768
+ darkAqua: #002838,
769
+ purple: #6f5ed3
770
+ )
771
+ ),
772
+ darkModal: (
773
+ background: (
774
+ base: #002838
775
+ ),
776
+ text: (
777
+ base: #FFFFFF
778
+ ),
779
+ cards: (
780
+ background: (
781
+ base: #FFFFFF,
782
+ hover: #eaeaf9
783
+ ),
784
+ text: (
785
+ base: #364141,
786
+ hover: #273333
787
+ ),
788
+ border: (
789
+ base: #FFFFFF,
790
+ hover: #6f5ed3
791
+ )
792
+ )
793
+ )
794
+ ),
678
795
  navigation: (
679
796
  main: (
680
797
  background: (
@@ -8,9 +8,6 @@ $theme: (
8
8
  ),
9
9
  breakpoints: (900px, 1200px, 1500px, 1800px),
10
10
  default: (
11
- utils: (
12
-
13
- ),
14
11
  breakpoints: (900px, 1200px, 1500px, 1800px),
15
12
  colors: (
16
13
  app: (
@@ -14,12 +14,13 @@ import Button from "../Button";
14
14
  import Icon from "../Icon";
15
15
  import styled from "styled-components";
16
16
  import { mergeRefs } from "../utils";
17
+ import { useInteractiveColor } from "../utils/useInteractiveColor";
17
18
  var InputContext = /*#__PURE__*/React.createContext({});
18
19
  var StyledButton = styled(Button).withConfig({
19
20
  displayName: "Input__StyledButton",
20
21
  componentId: "sc-1ck1dnm-0"
21
22
  })(["&:hover,&:active{color:", ";}"], function (props) {
22
- return props.theme.utils.interact(props.theme.colors.icon.base);
23
+ return useInteractiveColor(props.theme.colors.icon.base);
23
24
  });
24
25
 
25
26
  var ClearButton = function ClearButton() {
@@ -1,6 +1,7 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { COMMON } from "../utils/system-props";
3
3
  import { focusRing } from "../utils/mixins";
4
+ import { useInteractiveColor } from "../utils/useInteractiveColor";
4
5
  var Container = styled.button.withConfig({
5
6
  displayName: "styles__Container",
6
7
  componentId: "sc-nyn5zy-0"
@@ -8,13 +9,13 @@ var Container = styled.button.withConfig({
8
9
  var theme = _ref.theme;
9
10
  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
11
  }, 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));
12
+ var closeable = _ref2.closeable,
13
+ theme = _ref2.theme;
14
+ return closeable && css(["cursor:pointer;&:hover,&:active{box-shadow:", ";border:1px solid ", ";}"], theme.shadows.low, useInteractiveColor(theme.colors.container.border.base));
14
15
  }, 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));
16
+ var theme = _ref3.theme,
17
+ palette = _ref3.palette;
18
+ 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, useInteractiveColor(theme.colors.container.border.decorative.blue));
18
19
  }, function (_ref4) {
19
20
  var disabled = _ref4.disabled,
20
21
  theme = _ref4.theme;
@@ -22,6 +23,6 @@ var Container = styled.button.withConfig({
22
23
  }, function (_ref5) {
23
24
  var valid = _ref5.valid,
24
25
  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));
26
+ 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, useInteractiveColor(theme.colors.container.border.error));
26
27
  }, COMMON);
27
28
  export default Container;
package/lib/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from "./systemProps";
2
2
  export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
3
3
  export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
4
+ export { useInteractiveColor } from "./utils/useInteractiveColor";
4
5
  export { default as theme } from "./themes/light/theme";
5
6
  export { default as darkTheme } from "./themes/dark/theme";
6
7
  export { sproutLightTheme, sproutDarkTheme } from "./themes/extendedThemes/sproutTheme";
@@ -6,7 +6,6 @@ import lightTheme from "../light/theme";
6
6
  import { datavizPalette } from "./dataviz-palette";
7
7
  import { green, blue, purple, yellow, orange, red, neutral } from "./decorative-palettes";
8
8
  import { transparentize } from "polished";
9
- import interact from "../utils/interact";
10
9
  var MODE = "dark";
11
10
  export var shadows = {
12
11
  low: DEPTH.ELEVATION_LEVEL_100 + " " + COLORS.COLOR_NEUTRAL_1100 + "FF",
@@ -218,9 +217,6 @@ var colors = _extends({}, lightTheme.colors, {
218
217
  }, datavizPalette);
219
218
 
220
219
  var darkTheme = _extends({}, lightTheme, {
221
- utils: {
222
- interact: interact(MODE)
223
- },
224
220
  colors: colors,
225
221
  shadows: shadows,
226
222
  mode: MODE
@@ -46,12 +46,74 @@ export var analytics = {
46
46
  negative: baseDarkTheme.colors.neutral[100]
47
47
  }
48
48
  };
49
+ export var growth = {
50
+ education: {
51
+ decorative: {
52
+ aqua: baseDarkTheme.colors.aqua[600],
53
+ teal: baseDarkTheme.colors.teal[500]
54
+ }
55
+ },
56
+ opportunity: {
57
+ background: {
58
+ base: baseDarkTheme.colors.purple[700]
59
+ },
60
+ button: {
61
+ primary: {
62
+ base: baseDarkTheme.colors.purple[400],
63
+ hover: baseDarkTheme.colors.purple[300]
64
+ }
65
+ },
66
+ badge: {
67
+ background: {
68
+ base: baseDarkTheme.colors.purple[700],
69
+ active: baseDarkTheme.colors.purple[100]
70
+ },
71
+ icon: {
72
+ base: baseDarkTheme.colors.purple[200],
73
+ active: baseDarkTheme.colors.purple[800]
74
+ },
75
+ text: {
76
+ base: baseDarkTheme.colors.purple[200]
77
+ }
78
+ },
79
+ decorative: {
80
+ // confetti
81
+ green: baseDarkTheme.colors.green[700],
82
+ lightAqua: baseDarkTheme.colors.aqua[600],
83
+ darkAqua: baseDarkTheme.colors.aqua[1100],
84
+ purple: baseDarkTheme.colors.purple[700]
85
+ }
86
+ },
87
+ darkModal: {
88
+ background: {
89
+ base: baseDarkTheme.colors.aqua[1100]
90
+ },
91
+ text: {
92
+ base: baseDarkTheme.colors.neutral[0]
93
+ },
94
+ cards: {
95
+ background: {
96
+ base: baseDarkTheme.colors.neutral[0],
97
+ hover: baseDarkTheme.colors.purple[100]
98
+ },
99
+ text: {
100
+ base: baseDarkTheme.colors.neutral[800],
101
+ hover: baseDarkTheme.colors.neutral[900]
102
+ },
103
+ border: {
104
+ base: baseDarkTheme.colors.neutral[0],
105
+ hover: baseDarkTheme.colors.purple[700]
106
+ }
107
+ }
108
+ }
109
+ };
49
110
 
50
111
  var darkTheme = _extends({}, baseDarkTheme, {
51
112
  colors: _extends({}, baseDarkTheme.colors, {
52
113
  navigation: navigation,
53
114
  datePicker: datePicker,
54
- analytics: analytics
115
+ analytics: analytics,
116
+ growth: growth
55
117
  })
56
118
  });
57
119
 
@@ -46,12 +46,74 @@ export var analytics = {
46
46
  negative: baseLightTheme.colors.neutral[800]
47
47
  }
48
48
  };
49
+ export var growth = {
50
+ education: {
51
+ decorative: {
52
+ aqua: baseLightTheme.colors.aqua[600],
53
+ teal: baseLightTheme.colors.teal[700]
54
+ }
55
+ },
56
+ opportunity: {
57
+ background: {
58
+ base: baseLightTheme.colors.purple[700]
59
+ },
60
+ button: {
61
+ primary: {
62
+ base: baseLightTheme.colors.purple[700],
63
+ hover: baseLightTheme.colors.purple[800]
64
+ }
65
+ },
66
+ badge: {
67
+ background: {
68
+ base: baseLightTheme.colors.purple[200],
69
+ active: baseLightTheme.colors.purple[800]
70
+ },
71
+ icon: {
72
+ base: baseLightTheme.colors.purple[700],
73
+ active: baseLightTheme.colors.purple[100]
74
+ },
75
+ text: {
76
+ base: baseLightTheme.colors.purple[700]
77
+ }
78
+ },
79
+ decorative: {
80
+ // confetti
81
+ green: baseLightTheme.colors.green[700],
82
+ lightAqua: baseLightTheme.colors.aqua[600],
83
+ darkAqua: baseLightTheme.colors.aqua[1100],
84
+ purple: baseLightTheme.colors.purple[700]
85
+ }
86
+ },
87
+ darkModal: {
88
+ background: {
89
+ base: baseLightTheme.colors.aqua[1100]
90
+ },
91
+ text: {
92
+ base: baseLightTheme.colors.neutral[0]
93
+ },
94
+ cards: {
95
+ background: {
96
+ base: baseLightTheme.colors.neutral[0],
97
+ hover: baseLightTheme.colors.purple[100]
98
+ },
99
+ text: {
100
+ base: baseLightTheme.colors.neutral[800],
101
+ hover: baseLightTheme.colors.neutral[900]
102
+ },
103
+ border: {
104
+ base: baseLightTheme.colors.neutral[0],
105
+ hover: baseLightTheme.colors.purple[700]
106
+ }
107
+ }
108
+ }
109
+ };
49
110
 
50
111
  var lightTheme = _extends({}, baseLightTheme, {
51
112
  colors: _extends({}, baseLightTheme.colors, {
52
113
  navigation: navigation,
53
114
  datePicker: datePicker,
54
- analytics: analytics
115
+ analytics: analytics,
116
+ growth: growth
55
117
  })
56
118
  });
57
119
 
@@ -11,7 +11,6 @@ import DEPTH from "@sproutsocial/seeds-depth";
11
11
  import MOTION from "@sproutsocial/seeds-motion";
12
12
  import BORDER from "@sproutsocial/seeds-border";
13
13
  import { transparentize } from "polished";
14
- import interact from "../utils/interact";
15
14
  export var breakpoints = ["900px", "1200px", "1500px", "1800px"];
16
15
  var MODE = "light"; // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
17
16
 
@@ -308,9 +307,6 @@ export var duration = {
308
307
  slow: MOTION.MOTION_DURATION_SLOW
309
308
  };
310
309
  var theme = {
311
- utils: {
312
- interact: interact(MODE)
313
- },
314
310
  breakpoints: breakpoints,
315
311
  colors: colors,
316
312
  typography: _extends({}, typography, {
@@ -1,2 +1,2 @@
1
1
  import { breakpoints, typography, fontWeights, radii, borders, borderWidths, shadows, space, easing, duration } from "../themes/light/theme";
2
- import { datePicker, navigation, analytics } from "../themes/extendedThemes/sproutTheme/light/theme";
2
+ import { datePicker, navigation, analytics, growth } from "../themes/extendedThemes/sproutTheme/light/theme";
@@ -0,0 +1,27 @@
1
+ import { darken, lighten } from "polished";
2
+ import { useTheme } from "styled-components";
3
+
4
+ /**
5
+ * The useInteractiveColor hook has context of theme mode (light or dark)
6
+ * and can be used to lighten or darken a color dynamically
7
+ *
8
+ * note: colors are limited to our theme colors
9
+ */
10
+ var useInteractiveColor = function useInteractiveColor(themeColor) {
11
+ // Throw error if used outside of a ThemeProvider (styled-components)
12
+ if (!useTheme()) {
13
+ throw new Error("useInteractiveColor() must be used within a Styled Components ThemeProvider");
14
+ } // Get the current theme mode ie. 'light' or 'dark'
15
+
16
+
17
+ var themeMode = useTheme().mode; // If the theme mode is dark, return a lightened version of the themeValue
18
+
19
+ if (themeMode === "dark") {
20
+ return lighten(0.2, themeColor);
21
+ } else {
22
+ // If the theme mode is light, return a darkened version of the themeValue
23
+ return darken(0.2, themeColor);
24
+ }
25
+ };
26
+
27
+ export { useInteractiveColor };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "11.9.0",
3
+ "version": "12.1.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",
@@ -1,12 +0,0 @@
1
- //@flow strict-local
2
- import { darken, lighten } from "polished";
3
-
4
- const interact = (mode: string) => (themeValue: string) => {
5
- if (mode === "dark") {
6
- return lighten(0.2, themeValue);
7
- } else {
8
- return darken(0.2, themeValue);
9
- }
10
- };
11
-
12
- export default interact;
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
-
6
- var _polished = require("polished");
7
-
8
- var interact = function interact(mode) {
9
- return function (themeValue) {
10
- if (mode === "dark") {
11
- return (0, _polished.lighten)(0.2, themeValue);
12
- } else {
13
- return (0, _polished.darken)(0.2, themeValue);
14
- }
15
- };
16
- };
17
-
18
- var _default = interact;
19
- exports.default = _default;
@@ -1,13 +0,0 @@
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;