@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
@@ -1,196 +1,227 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = void 0;
4
+ exports.default = exports.shadows = void 0;
5
5
 
6
6
  var _seedsColor = _interopRequireDefault(require("@sproutsocial/seeds-color"));
7
7
 
8
- var _theme = _interopRequireDefault(require("../default/theme"));
8
+ var _seedsDepth = _interopRequireDefault(require("@sproutsocial/seeds-depth"));
9
+
10
+ var _theme = _interopRequireDefault(require("../light/theme"));
9
11
 
10
12
  var _datavizPalette = require("./dataviz-palette");
11
13
 
12
14
  var _decorativePalettes = require("./decorative-palettes");
13
15
 
16
+ var _interact = _interopRequireDefault(require("../utils/interact"));
17
+
14
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
19
 
16
20
  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); }
17
21
 
18
- var darkTheme = _extends({}, _theme.default, {
19
- colors: _extends({}, _theme.default.colors, {
20
- app: {
22
+ var MODE = "dark";
23
+ var shadows = {
24
+ low: _seedsDepth.default.ELEVATION_LEVEL_100 + " " + _seedsColor.default.COLOR_NEUTRAL_1100 + "FF",
25
+ medium: _seedsDepth.default.ELEVATION_LEVEL_300 + " " + _seedsColor.default.COLOR_NEUTRAL_1100 + "FF",
26
+ high: _seedsDepth.default.ELEVATION_LEVEL_400 + " " + _seedsColor.default.COLOR_NEUTRAL_1100 + "FF"
27
+ };
28
+ exports.shadows = shadows;
29
+
30
+ var colors = _extends({}, _theme.default.colors, {
31
+ utils: {
32
+ interact: (0, _interact.default)(MODE)
33
+ },
34
+ app: {
35
+ background: {
36
+ base: _seedsColor.default.COLOR_NEUTRAL_1000
37
+ }
38
+ },
39
+ container: {
40
+ background: {
41
+ base: _seedsColor.default.COLOR_NEUTRAL_900,
42
+ success: _decorativePalettes.green.background,
43
+ warning: _decorativePalettes.yellow.background,
44
+ error: _decorativePalettes.red.background,
45
+ info: _decorativePalettes.blue.background,
46
+ opportunity: _decorativePalettes.purple.background,
47
+ danger: _decorativePalettes.red.background,
48
+ decorative: {
49
+ green: _decorativePalettes.green.background,
50
+ blue: _decorativePalettes.blue.background,
51
+ purple: _decorativePalettes.purple.background,
52
+ yellow: _decorativePalettes.yellow.background,
53
+ orange: _decorativePalettes.orange.background,
54
+ red: _decorativePalettes.red.background,
55
+ neutral: _decorativePalettes.neutral.background
56
+ },
57
+ selected: _seedsColor.default.COLOR_NEUTRAL_0,
58
+ positive_sentiment: _seedsColor.default.COLOR_BLUE_500,
59
+ negative_sentiment: _seedsColor.default.COLOR_RED_500,
60
+ neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_300
61
+ },
62
+ border: {
63
+ base: _seedsColor.default.COLOR_NEUTRAL_1100,
64
+ success: _decorativePalettes.green.highlight,
65
+ warning: _decorativePalettes.yellow.highlight,
66
+ error: _decorativePalettes.red.highlight,
67
+ danger: _decorativePalettes.red.highlight,
68
+ info: _decorativePalettes.blue.highlight,
69
+ opportunity: _decorativePalettes.purple.highlight,
70
+ decorative: {
71
+ green: _decorativePalettes.green.highlight,
72
+ blue: _decorativePalettes.blue.highlight,
73
+ purple: _decorativePalettes.purple.highlight,
74
+ yellow: _decorativePalettes.yellow.highlight,
75
+ orange: _decorativePalettes.orange.highlight,
76
+ red: _decorativePalettes.red.highlight,
77
+ neutral: _decorativePalettes.neutral.highlight
78
+ },
79
+ selected: _seedsColor.default.COLOR_NEUTRAL_0
80
+ }
81
+ },
82
+ button: {
83
+ primary: {
21
84
  background: {
22
- base: _seedsColor.default.COLOR_NEUTRAL_1000
85
+ base: _seedsColor.default.COLOR_BLUE_400,
86
+ hover: _seedsColor.default.COLOR_BLUE_300,
87
+ active: _seedsColor.default.COLOR_BLUE_200
88
+ },
89
+ border: {
90
+ base: "transparent"
91
+ },
92
+ text: {
93
+ base: _seedsColor.default.COLOR_NEUTRAL_900,
94
+ hover: _seedsColor.default.COLOR_NEUTRAL_1000
23
95
  }
24
96
  },
25
- container: {
97
+ secondary: {
26
98
  background: {
27
- base: _seedsColor.default.COLOR_NEUTRAL_900,
28
- success: _decorativePalettes.green.background,
29
- warning: _decorativePalettes.yellow.background,
30
- error: _decorativePalettes.red.background,
31
- info: _decorativePalettes.blue.background,
32
- opportunity: _decorativePalettes.purple.background,
33
- danger: _decorativePalettes.red.background,
34
- decorative: {
35
- green: _decorativePalettes.green.background,
36
- blue: _decorativePalettes.blue.background,
37
- purple: _decorativePalettes.purple.background,
38
- yellow: _decorativePalettes.yellow.background,
39
- orange: _decorativePalettes.orange.background,
40
- red: _decorativePalettes.red.background,
41
- neutral: _decorativePalettes.neutral.background
42
- },
43
- selected: _seedsColor.default.COLOR_NEUTRAL_0
99
+ base: "transparent",
100
+ hover: _seedsColor.default.COLOR_NEUTRAL_100,
101
+ active: _seedsColor.default.COLOR_NEUTRAL_0
44
102
  },
45
103
  border: {
46
- base: _seedsColor.default.COLOR_NEUTRAL_1100,
47
- success: _decorativePalettes.green.highlight,
48
- warning: _decorativePalettes.yellow.highlight,
49
- error: _decorativePalettes.red.highlight,
50
- danger: _decorativePalettes.red.highlight,
51
- info: _decorativePalettes.blue.highlight,
52
- opportunity: _decorativePalettes.purple.highlight,
53
- decorative: {
54
- green: _decorativePalettes.green.highlight,
55
- blue: _decorativePalettes.blue.highlight,
56
- purple: _decorativePalettes.purple.highlight,
57
- yellow: _decorativePalettes.yellow.highlight,
58
- orange: _decorativePalettes.orange.highlight,
59
- red: _decorativePalettes.red.highlight,
60
- neutral: _decorativePalettes.neutral.highlight
61
- },
62
- selected: _seedsColor.default.COLOR_NEUTRAL_0
104
+ base: _seedsColor.default.COLOR_NEUTRAL_0
105
+ },
106
+ text: {
107
+ base: _seedsColor.default.COLOR_NEUTRAL_0,
108
+ hover: _seedsColor.default.COLOR_NEUTRAL_800
63
109
  }
64
110
  },
65
- button: {
66
- primary: {
67
- background: {
68
- base: _seedsColor.default.COLOR_BLUE_400,
69
- hover: _seedsColor.default.COLOR_BLUE_300,
70
- active: _seedsColor.default.COLOR_BLUE_200
71
- },
72
- border: {
73
- base: "transparent"
74
- },
75
- text: {
76
- base: _seedsColor.default.COLOR_NEUTRAL_900,
77
- hover: _seedsColor.default.COLOR_NEUTRAL_1000
78
- }
79
- },
80
- secondary: {
81
- background: {
82
- base: "transparent",
83
- hover: _seedsColor.default.COLOR_NEUTRAL_100,
84
- active: _seedsColor.default.COLOR_NEUTRAL_0
85
- },
86
- border: {
87
- base: _seedsColor.default.COLOR_NEUTRAL_0
88
- },
89
- text: {
90
- base: _seedsColor.default.COLOR_NEUTRAL_0,
91
- hover: _seedsColor.default.COLOR_NEUTRAL_800
92
- }
111
+ pill: {
112
+ background: {
113
+ base: "transparent",
114
+ hover: _seedsColor.default.COLOR_NEUTRAL_1000,
115
+ active: _seedsColor.default.COLOR_NEUTRAL_900
93
116
  },
94
- pill: {
95
- background: {
96
- base: "transparent",
97
- hover: _seedsColor.default.COLOR_NEUTRAL_1000,
98
- active: _seedsColor.default.COLOR_NEUTRAL_900
99
- },
100
- border: {
101
- base: "transparent"
102
- },
103
- text: {
104
- base: _seedsColor.default.COLOR_NEUTRAL_100,
105
- hover: _seedsColor.default.COLOR_NEUTRAL_0
106
- }
117
+ border: {
118
+ base: "transparent"
107
119
  },
108
- destructive: {
109
- background: {
110
- base: _seedsColor.default.COLOR_RED_400,
111
- hover: _seedsColor.default.COLOR_RED_300,
112
- active: _seedsColor.default.COLOR_RED_200
113
- },
114
- border: {
115
- base: "transparent"
116
- },
117
- text: {
118
- base: _seedsColor.default.COLOR_NEUTRAL_900,
119
- hover: _seedsColor.default.COLOR_NEUTRAL_1000
120
- }
120
+ text: {
121
+ base: _seedsColor.default.COLOR_NEUTRAL_100,
122
+ hover: _seedsColor.default.COLOR_NEUTRAL_0
123
+ }
124
+ },
125
+ destructive: {
126
+ background: {
127
+ base: _seedsColor.default.COLOR_RED_400,
128
+ hover: _seedsColor.default.COLOR_RED_300,
129
+ active: _seedsColor.default.COLOR_RED_200
121
130
  },
122
- placeholder: {
123
- background: {
124
- base: "transparent",
125
- hover: _seedsColor.default.COLOR_NEUTRAL_1100,
126
- active: _seedsColor.default.COLOR_NEUTRAL_1100
127
- },
128
- border: {
129
- base: _seedsColor.default.COLOR_NEUTRAL_500
130
- },
131
- text: {
132
- base: _seedsColor.default.COLOR_BLUE_400,
133
- hover: _seedsColor.default.COLOR_BLUE_300
134
- }
131
+ border: {
132
+ base: "transparent"
135
133
  },
136
- unstyled: {
137
- background: {
138
- base: "transparent"
139
- },
140
- border: {
141
- base: "transparent"
142
- },
143
- text: {
144
- base: _seedsColor.default.COLOR_NEUTRAL_300,
145
- hover: _seedsColor.default.COLOR_NEUTRAL_200
146
- }
134
+ text: {
135
+ base: _seedsColor.default.COLOR_NEUTRAL_900,
136
+ hover: _seedsColor.default.COLOR_NEUTRAL_1000
147
137
  }
148
138
  },
149
- link: {
150
- base: _seedsColor.default.COLOR_BLUE_400,
151
- hover: _seedsColor.default.COLOR_BLUE_300
152
- },
153
- text: {
154
- headline: _seedsColor.default.COLOR_NEUTRAL_0,
155
- subtext: _seedsColor.default.COLOR_NEUTRAL_300,
156
- body: _seedsColor.default.COLOR_NEUTRAL_100,
157
- inverse: _seedsColor.default.COLOR_NEUTRAL_900,
158
- error: _seedsColor.default.COLOR_RED_400
159
- },
160
- icon: {
161
- base: _seedsColor.default.COLOR_NEUTRAL_100,
162
- inverse: _seedsColor.default.COLOR_NEUTRAL_900,
163
- success: _decorativePalettes.green.foreground,
164
- warning: _decorativePalettes.yellow.foreground,
165
- error: _decorativePalettes.red.foreground,
166
- danger: _decorativePalettes.red.foreground,
167
- info: _decorativePalettes.blue.foreground,
168
- opportunity: _decorativePalettes.purple.foreground
169
- },
170
- form: {
139
+ placeholder: {
171
140
  background: {
172
- base: _seedsColor.default.COLOR_NEUTRAL_900,
173
- selected: _seedsColor.default.COLOR_NEUTRAL_0
141
+ base: "transparent",
142
+ hover: _seedsColor.default.COLOR_NEUTRAL_1100,
143
+ active: _seedsColor.default.COLOR_NEUTRAL_1100
174
144
  },
175
145
  border: {
176
- base: _seedsColor.default.COLOR_NEUTRAL_500,
177
- error: _decorativePalettes.red.highlight,
178
- warning: _decorativePalettes.yellow.highlight,
179
- selected: _seedsColor.default.COLOR_NEUTRAL_0
180
- },
181
- placeholder: {
182
146
  base: _seedsColor.default.COLOR_NEUTRAL_500
147
+ },
148
+ text: {
149
+ base: _seedsColor.default.COLOR_BLUE_400,
150
+ hover: _seedsColor.default.COLOR_BLUE_300
183
151
  }
184
152
  },
185
- listItem: {
153
+ unstyled: {
186
154
  background: {
187
- base: "transparent",
188
- hover: _seedsColor.default.COLOR_NEUTRAL_800,
189
- selected: _seedsColor.default.COLOR_NEUTRAL_0
155
+ base: "transparent"
156
+ },
157
+ border: {
158
+ base: "transparent"
159
+ },
160
+ text: {
161
+ base: _seedsColor.default.COLOR_NEUTRAL_300,
162
+ hover: _seedsColor.default.COLOR_NEUTRAL_200
190
163
  }
191
164
  }
192
- }, _datavizPalette.datavizPalette),
193
- mode: "dark"
165
+ },
166
+ link: {
167
+ base: _seedsColor.default.COLOR_BLUE_400,
168
+ hover: _seedsColor.default.COLOR_BLUE_300
169
+ },
170
+ text: {
171
+ headline: _seedsColor.default.COLOR_NEUTRAL_0,
172
+ subtext: _seedsColor.default.COLOR_NEUTRAL_300,
173
+ body: _seedsColor.default.COLOR_NEUTRAL_100,
174
+ inverse: _seedsColor.default.COLOR_NEUTRAL_900,
175
+ error: _seedsColor.default.COLOR_RED_400
176
+ },
177
+ icon: {
178
+ base: _seedsColor.default.COLOR_NEUTRAL_100,
179
+ inverse: _seedsColor.default.COLOR_NEUTRAL_900,
180
+ success: _decorativePalettes.green.foreground,
181
+ warning: _decorativePalettes.yellow.foreground,
182
+ error: _decorativePalettes.red.foreground,
183
+ danger: _decorativePalettes.red.foreground,
184
+ info: _decorativePalettes.blue.foreground,
185
+ opportunity: _decorativePalettes.purple.foreground,
186
+ positive_sentiment: _seedsColor.default.COLOR_BLUE_700,
187
+ negative_sentiment: _seedsColor.default.COLOR_RED_600,
188
+ neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_600
189
+ },
190
+ form: {
191
+ background: {
192
+ base: _seedsColor.default.COLOR_NEUTRAL_900,
193
+ selected: _seedsColor.default.COLOR_NEUTRAL_0
194
+ },
195
+ border: {
196
+ base: _seedsColor.default.COLOR_NEUTRAL_500,
197
+ error: _decorativePalettes.red.highlight,
198
+ warning: _decorativePalettes.yellow.highlight,
199
+ selected: _seedsColor.default.COLOR_NEUTRAL_0
200
+ },
201
+ placeholder: {
202
+ base: _seedsColor.default.COLOR_NEUTRAL_500
203
+ }
204
+ },
205
+ listItem: {
206
+ background: {
207
+ base: "transparent",
208
+ hover: _seedsColor.default.COLOR_NEUTRAL_800,
209
+ selected: _seedsColor.default.COLOR_NEUTRAL_0
210
+ }
211
+ },
212
+ elevation: {
213
+ base: _seedsColor.default.COLOR_NEUTRAL_1100
214
+ },
215
+ dataviz: {
216
+ map: _datavizPalette.datavizPalette.DATAVIZ_COLORS_MAP,
217
+ list: _datavizPalette.datavizPalette.DATAVIZ_COLORS_LIST
218
+ }
219
+ }, _datavizPalette.datavizPalette);
220
+
221
+ var darkTheme = _extends({}, _theme.default, {
222
+ colors: colors,
223
+ shadows: shadows,
224
+ mode: MODE
194
225
  });
195
226
 
196
227
  var _default = darkTheme;
@@ -23,12 +23,15 @@ var _seedsMotion = _interopRequireDefault(require("@sproutsocial/seeds-motion"))
23
23
 
24
24
  var _seedsBorder = _interopRequireDefault(require("@sproutsocial/seeds-border"));
25
25
 
26
+ var _interact = _interopRequireDefault(require("../utils/interact"));
27
+
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
29
 
28
30
  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); }
29
31
 
30
32
  var breakpoints = ["900px", "1200px", "1500px", "1800px"];
31
33
  exports.breakpoints = breakpoints;
34
+ var MODE = "light";
32
35
 
33
36
  var colors = _extends({
34
37
  app: {
@@ -54,7 +57,10 @@ var colors = _extends({
54
57
  red: _decorativePalettes.red.background,
55
58
  neutral: _decorativePalettes.neutral.background
56
59
  },
57
- selected: _seedsColor.default.COLOR_NEUTRAL_800
60
+ selected: _seedsColor.default.COLOR_NEUTRAL_800,
61
+ positive_sentiment: _seedsColor.default.COLOR_BLUE_500,
62
+ negative_sentiment: _seedsColor.default.COLOR_RED_500,
63
+ neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_300
58
64
  },
59
65
  border: {
60
66
  base: _seedsColor.default.COLOR_NEUTRAL_200,
@@ -179,7 +185,10 @@ var colors = _extends({
179
185
  error: _decorativePalettes.red.foreground,
180
186
  danger: _decorativePalettes.red.foreground,
181
187
  info: _decorativePalettes.blue.foreground,
182
- opportunity: _decorativePalettes.purple.foreground
188
+ opportunity: _decorativePalettes.purple.foreground,
189
+ positive_sentiment: _seedsColor.default.COLOR_BLUE_700,
190
+ negative_sentiment: _seedsColor.default.COLOR_RED_600,
191
+ neutral_sentiment: _seedsColor.default.COLOR_NEUTRAL_600
183
192
  },
184
193
  form: {
185
194
  background: {
@@ -203,6 +212,9 @@ var colors = _extends({
203
212
  selected: _seedsColor.default.COLOR_NEUTRAL_800
204
213
  }
205
214
  },
215
+ elevation: {
216
+ base: _seedsColor.default.COLOR_NEUTRAL_900 + "3D"
217
+ },
206
218
  network: {
207
219
  twitter: _seedsNetworkcolor.default.NETWORK_COLOR_TWITTER,
208
220
  twitter_like: _seedsNetworkcolor.default.NETWORK_COLOR_TWITTER_LIKE,
@@ -229,6 +241,10 @@ var colors = _extends({
229
241
  yelp: _seedsNetworkcolor.default.NETWORK_COLOR_YELP,
230
242
  whatsapp: _seedsNetworkcolor.default.NETWORK_COLOR_WHATSAPP,
231
243
  tiktok: _seedsNetworkcolor.default.NETWORK_COLOR_TIKTOK
244
+ },
245
+ dataviz: {
246
+ map: _datavizPalette.datavizPalette.DATAVIZ_COLORS_MAP,
247
+ list: _datavizPalette.datavizPalette.DATAVIZ_COLORS_LIST
232
248
  }
233
249
  }, _literalColors.default, _datavizPalette.datavizPalette);
234
250
 
@@ -287,10 +303,9 @@ var borderWidths = {
287
303
  };
288
304
  exports.borderWidths = borderWidths;
289
305
  var shadows = {
290
- "100": _seedsDepth.default.ELEVATION_LEVEL_100,
291
- "200": _seedsDepth.default.ELEVATION_LEVEL_200,
292
- "300": _seedsDepth.default.ELEVATION_LEVEL_300,
293
- "400": _seedsDepth.default.ELEVATION_LEVEL_400
306
+ low: _seedsDepth.default.ELEVATION_LEVEL_100 + " " + _seedsColor.default.COLOR_NEUTRAL_900 + "3D",
307
+ medium: _seedsDepth.default.ELEVATION_LEVEL_300 + " " + _seedsColor.default.COLOR_NEUTRAL_900 + "3D",
308
+ high: _seedsDepth.default.ELEVATION_LEVEL_400 + " " + _seedsColor.default.COLOR_NEUTRAL_900 + "3D"
294
309
  };
295
310
  exports.shadows = shadows;
296
311
  var easing = {
@@ -306,6 +321,9 @@ var duration = {
306
321
  };
307
322
  exports.duration = duration;
308
323
  var theme = {
324
+ utils: {
325
+ interact: (0, _interact.default)(MODE)
326
+ },
309
327
  breakpoints: breakpoints,
310
328
  colors: colors,
311
329
  typography: _extends({}, typography, {
@@ -326,11 +344,10 @@ var theme = {
326
344
  }),
327
345
  borders: borders,
328
346
  borderWidths: borderWidths,
329
- shadows: _extends({}, shadows, {
330
- shadows: shadows
331
- }),
347
+ shadows: shadows,
332
348
  easing: easing,
333
- duration: duration
349
+ duration: duration,
350
+ mode: MODE
334
351
  };
335
352
  var _default = theme;
336
353
  exports.default = _default;
@@ -0,0 +1,19 @@
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,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _literalColors = _interopRequireDefault(require("../themes/default/literal-colors"));
3
+ var _literalColors = _interopRequireDefault(require("../themes/light/literal-colors"));
4
4
 
5
5
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
 
3
- var _theme = require("../themes/default/theme");
3
+ var _theme = require("../themes/light/theme");
@@ -5,7 +5,7 @@ exports.disabled = exports.pill = exports.focusRing = exports.visuallyHidden = e
5
5
 
6
6
  var _styledComponents = require("styled-components");
7
7
 
8
- var _theme = _interopRequireDefault(require("../themes/default/theme"));
8
+ var _theme = _interopRequireDefault(require("../themes/light/theme"));
9
9
 
10
10
  var _polished = require("polished");
11
11
 
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.normalizeResponsiveProp = void 0;
5
5
 
6
- var _theme = _interopRequireDefault(require("../../themes/default/theme"));
6
+ var _theme = _interopRequireDefault(require("../../themes/light/theme"));
7
7
 
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
9
 
@@ -0,0 +1,133 @@
1
+ // Inspired by https://medium.com/@katiemctigue/how-to-create-a-dark-mode-in-sass-609f131a3995
2
+ // This file is excluded from stylelint, because stylelint is only set up to lint styled-components at the moment.
3
+
4
+ // SET-UP
5
+ // This file is auto-generated based on the JS theme file, ensuring our SCSS theme variables stay in sync.
6
+ @import "../../../dist/themes/dark/dark.scss";
7
+
8
+ // In the JS theme file, the theme object is exported as "default" (i.e., using "export default"),
9
+ // so we need to map-get "default" to access it.
10
+ $theme: map-get($dark, 'default');
11
+
12
+ // MIXIN
13
+ // CSS properties that are theme-dependent must be wrapped in this mixin.
14
+ // It will convert semantic tokens to the appropriate theme-dependent CSS property.
15
+ @mixin themed() {
16
+ & {
17
+ $theme-map: () !global;
18
+ @each $key, $submap in $theme {
19
+ $value: map-get($theme, "#{$key}");
20
+ $theme-map: map-merge($theme-map, ($key: $value)) !global;
21
+ }
22
+ @content;
23
+ $theme-map: null !global;
24
+ }
25
+ }
26
+
27
+ // FUNCTIONS
28
+ // This function will allow you to get any value from the theme.
29
+ // @param {string} $key - the period-separated path to the value in the theme object. e.g., "colors.text.body"
30
+ @function t($key) {
31
+ $keys: _str-split($key, ".");
32
+ @return _map-deep-get($theme-map, $keys);
33
+ }
34
+
35
+ // The rest of the functions are convenience methods to get theme values for subsets of the theme.
36
+ // @param {string} $key - the period-separated path to the value in the theme object, with "colors." omitted. e.g., "text.body"
37
+ @function colors($key) {
38
+ $keys: _str-split($key, ".");
39
+ @return _map-deep-get($theme-map, join("colors", $keys));
40
+ }
41
+
42
+ // @param {string} $key - the period-separated path to the value in the theme object, with "typography." omitted. e.g., "100.fontSize"
43
+ @function typography($key) {
44
+ $keys: _str-split($key, ".");
45
+ @return _map-deep-get($theme-map, join("typography", $keys));
46
+ }
47
+
48
+ // @param {string} $key - the period-separated path to the value in the theme object, with "fontWeights." omitted. e.g., "normal"
49
+ @function fontWeights($key) {
50
+ $keys: _str-split($key, ".");
51
+ @return _map-deep-get($theme-map, join("fontWeights", $keys));
52
+ }
53
+
54
+ // @param {string} $key - the period-separated path to the value in the theme object, with "space." omitted. e.g., "100"
55
+ @function space($key) {
56
+ $keys: _str-split($key, ".");
57
+ @return _map-deep-get($theme-map, join("space", $keys));
58
+ }
59
+
60
+ // @param {string} $key - the period-separated path to the value in the theme object, with "radii." omitted. e.g., "inner"
61
+ @function radii($key) {
62
+ $keys: _str-split($key, ".");
63
+ @return _map-deep-get($theme-map, join("radii", $keys));
64
+ }
65
+
66
+ // @param {string} $key - the period-separated path to the value in the theme object, with "borders." omitted. e.g., "500"
67
+ @function borders($key) {
68
+ $keys: _str-split($key, ".");
69
+ @return _map-deep-get($theme-map, join("borders", $keys));
70
+ }
71
+
72
+ // @param {string} $key - the period-separated path to the value in the theme object, with "borderWidths." omitted. e.g., "500"
73
+ @function borderWidths($key) {
74
+ $keys: _str-split($key, ".");
75
+ @return _map-deep-get($theme-map, join("borderWidths", $keys));
76
+ }
77
+
78
+ // @param {string} $key - the period-separated path to the value in the theme object, with "shadows." omitted. e.g., "low"
79
+ @function shadows($key) {
80
+ $keys: _str-split($key, ".");
81
+ @return _map-deep-get($theme-map, join("shadows", $keys));
82
+ }
83
+
84
+ // @param {string} $key - the period-separated path to the value in the theme object, with "easing." omitted. e.g., "ease_in"
85
+ @function easing($key) {
86
+ $keys: _str-split($key, ".");
87
+ @return _map-deep-get($theme-map, join("easing", $keys));
88
+ }
89
+
90
+ // @param {string} $key - the period-separated path to the value in the theme object, with "duration." omitted. e.g., "fast"
91
+ @function duration($key) {
92
+ $keys: _str-split($key, ".");
93
+ @return _map-deep-get($theme-map, join("duration", $keys));
94
+ }
95
+
96
+ // UTILITIES
97
+ // Helper functions that power the functions above. Not relevant to the theme.
98
+ // If you import this file with @use, these functions will be excluded because they are private.
99
+
100
+ // Via https://stackoverflow.com/a/42295154
101
+ // Used to split period-separated object keys, e.g. "colors.text.body" => ["colors", "text", "body"]
102
+ // Only works with a single-character separator.
103
+ @function _str-split($string, $separator) {
104
+ // empty array/list
105
+ $split-arr: ();
106
+ // first index of separator in string
107
+ $index : str-index($string, $separator);
108
+ // loop through string
109
+ @while $index != null {
110
+ // get the substring from the first character to the separator
111
+ $item: str-slice($string, 1, $index - 1);
112
+ // push item to array
113
+ $split-arr: append($split-arr, $item);
114
+ // remove item and separator from string
115
+ $string: str-slice($string, $index + 1);
116
+ // find new index of separator
117
+ $index : str-index($string, $separator);
118
+ }
119
+ // add the remaining string to list (the last item)
120
+ $split-arr: append($split-arr, $string);
121
+
122
+ @return $split-arr;
123
+ }
124
+
125
+ // Adapted from https://css-tricks.com/snippets/sass/deep-getset-maps/
126
+ // Iterates over a list of keys to read multi-level maps.
127
+ // e.g., _map-deep-get((colors: (text: (body: "#364141"))), ["colors", "text", "body"]) => "#364141"
128
+ @function _map-deep-get($map, $keys) {
129
+ @each $key in $keys {
130
+ $map: map-get($map, $key);
131
+ }
132
+ @return $map;
133
+ }