@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
@@ -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/light/light.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($light, '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
+ }
@@ -19,8 +19,12 @@ import DEPTH from "@sproutsocial/seeds-depth";
19
19
  import MOTION from "@sproutsocial/seeds-motion";
20
20
  import BORDER from "@sproutsocial/seeds-border";
21
21
 
22
+ import interact from "../utils/interact";
23
+
22
24
  export const breakpoints = ["900px", "1200px", "1500px", "1800px"];
23
25
 
26
+ const MODE = "light";
27
+
24
28
  const colors = {
25
29
  app: {
26
30
  background: {
@@ -46,6 +50,9 @@ const colors = {
46
50
  neutral: neutral.background,
47
51
  },
48
52
  selected: COLORS.COLOR_NEUTRAL_800,
53
+ positive_sentiment: COLORS.COLOR_BLUE_500,
54
+ negative_sentiment: COLORS.COLOR_RED_500,
55
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_300,
49
56
  },
50
57
  border: {
51
58
  base: COLORS.COLOR_NEUTRAL_200,
@@ -171,6 +178,9 @@ const colors = {
171
178
  danger: red.foreground,
172
179
  info: blue.foreground,
173
180
  opportunity: purple.foreground,
181
+ positive_sentiment: COLORS.COLOR_BLUE_700,
182
+ negative_sentiment: COLORS.COLOR_RED_600,
183
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_600,
174
184
  },
175
185
  form: {
176
186
  background: {
@@ -194,6 +204,9 @@ const colors = {
194
204
  selected: COLORS.COLOR_NEUTRAL_800,
195
205
  },
196
206
  },
207
+ elevation: {
208
+ base: `${COLORS.COLOR_NEUTRAL_900}3D`,
209
+ },
197
210
  network: {
198
211
  twitter: NETWORKCOLORS.NETWORK_COLOR_TWITTER,
199
212
  twitter_like: NETWORKCOLORS.NETWORK_COLOR_TWITTER_LIKE,
@@ -223,6 +236,10 @@ const colors = {
223
236
  whatsapp: NETWORKCOLORS.NETWORK_COLOR_WHATSAPP,
224
237
  tiktok: NETWORKCOLORS.NETWORK_COLOR_TIKTOK,
225
238
  },
239
+ dataviz: {
240
+ map: datavizPalette.DATAVIZ_COLORS_MAP,
241
+ list: datavizPalette.DATAVIZ_COLORS_LIST,
242
+ },
226
243
  ...literalColors,
227
244
  ...datavizPalette,
228
245
  };
@@ -296,10 +313,9 @@ export const borderWidths = {
296
313
  };
297
314
 
298
315
  export const shadows = {
299
- "100": DEPTH.ELEVATION_LEVEL_100,
300
- "200": DEPTH.ELEVATION_LEVEL_200,
301
- "300": DEPTH.ELEVATION_LEVEL_300,
302
- "400": DEPTH.ELEVATION_LEVEL_400,
316
+ low: `${DEPTH.ELEVATION_LEVEL_100} ${COLORS.COLOR_NEUTRAL_900}3D`,
317
+ medium: `${DEPTH.ELEVATION_LEVEL_300} ${COLORS.COLOR_NEUTRAL_900}3D`,
318
+ high: `${DEPTH.ELEVATION_LEVEL_400} ${COLORS.COLOR_NEUTRAL_900}3D`,
303
319
  };
304
320
 
305
321
  export const easing = {
@@ -315,6 +331,9 @@ export const duration = {
315
331
  };
316
332
 
317
333
  const theme = {
334
+ utils: {
335
+ interact: interact(MODE),
336
+ },
318
337
  breakpoints,
319
338
  colors,
320
339
  typography: {
@@ -338,12 +357,10 @@ const theme = {
338
357
  },
339
358
  borders,
340
359
  borderWidths,
341
- shadows: {
342
- ...shadows,
343
- shadows,
344
- },
360
+ shadows,
345
361
  easing,
346
362
  duration,
363
+ mode: MODE,
347
364
  };
348
365
 
349
366
  export default theme;
@@ -0,0 +1,12 @@
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;
@@ -67,7 +67,6 @@ export type TypeSystemCommonProps = $ReadOnly<{|
67
67
  ...TypeSpaceProps,
68
68
  cursor?: TypeResponsiveBase<>,
69
69
  |}>;
70
-
71
70
  export type TypeSystemBorderProps = $ReadOnly<{|
72
71
  border?: TypeResponsiveBase<>,
73
72
  borderWidth?: TypeResponsiveBase<>,
@@ -85,7 +84,7 @@ export type TypeSystemBorderProps = $ReadOnly<{|
85
84
  borderX?: TypeResponsiveBase<>,
86
85
  borderY?: TypeResponsiveBase<>,
87
86
  boxShadow?: TypeResponsiveBase<>,
88
- textShadow?: TypeResponsiveBase<>,
87
+ textShadow?: TypeResponsiveBase<>
89
88
  |}>;
90
89
 
91
90
  type TypeResponsiveTypeographySize = TypeResponsiveString<TypeTypography>;
@@ -1,6 +1,6 @@
1
1
  // @flow strict-local
2
2
 
3
- import literalColors from "../themes/default/literal-colors";
3
+ import literalColors from "../themes/light/literal-colors";
4
4
 
5
5
  type TypeAppColors = {|
6
6
  app: {
@@ -30,6 +30,9 @@ type TypeContainerColors = {|
30
30
  neutral: string,
31
31
  },
32
32
  selected: string,
33
+ positive_sentiment: string,
34
+ negative_sentiment: string,
35
+ neutral_sentiment: string,
33
36
  },
34
37
  border: {
35
38
  base: string,
@@ -167,6 +170,9 @@ type TypeIconColors = {|
167
170
  danger: string,
168
171
  info: string,
169
172
  opportunity: string,
173
+ positive_sentiment: string,
174
+ negative_sentiment: string,
175
+ neutral_sentiment: string,
170
176
  },
171
177
  |};
172
178
 
@@ -10,9 +10,9 @@ import {
10
10
  space,
11
11
  easing,
12
12
  duration,
13
- } from "../themes/default/theme";
13
+ } from "../themes/light/theme";
14
14
  import type { TypeColors } from "./theme.colors.flow.js";
15
- import type { TypeFontFamilyString } from "../themes/default/theme";
15
+ import type { TypeFontFamilyString } from "../themes/light/theme";
16
16
 
17
17
  export type TypeBreakpoint = typeof breakpoints;
18
18
  export type TypeTypography = typeof typography;
@@ -1,6 +1,6 @@
1
1
  // @flow strict-local
2
2
  import { css } from "styled-components";
3
- import theme from "../themes/default/theme";
3
+ import theme from "../themes/light/theme";
4
4
  import { transparentize } from "polished";
5
5
 
6
6
  export const svgToDataURL = (svgStr: string) => {
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import theme from "../../themes/default/theme";
2
+ import theme from "../../themes/light/theme";
3
3
 
4
4
  import type { TypeResponsive } from "../../types/system-props.flow";
5
5
 
@@ -10,7 +10,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
10
10
  var Nav = _styledComponents.default.nav.withConfig({
11
11
  displayName: "styles__Nav",
12
12
  componentId: "sc-1ub1apc-0"
13
- })(["ol{", ";margin:0;font-family:", ";padding:0;display:flex;}li{margin-right:", ";display:flex;}a,button{", ";max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&:not(.overflow--menu){margin:0;padding:0;}}ol > div + li::before{content:\"/\";margin-right:", ";}li:last-child a,li:last-child button{color:", ";font-weight:bold;}li:not(:last-child) a,li:not(:last-child) button{font-weight:normal;}li:not(:last-child)::after{content:\"/\";color:", ";margin-left:", ";}"], function (props) {
13
+ })(["ol{", ";margin:0;font-family:", ";padding:0;display:flex;}li{margin-right:", ";display:flex;}a,button{", ";max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&:not(.overflow--menu){margin:0;padding:0;}}ol > div + li::before{content:\"/\";margin-right:", ";}li:last-child a,li:last-child button{color:", ";font-weight:bold;}li:not(:last-child)::after{content:\"/\";color:", ";margin-left:", ";}"], function (props) {
14
14
  return props.theme.typography[200];
15
15
  }, function (props) {
16
16
  return props.theme.fontFamily;
@@ -47,7 +47,7 @@ var Container = _styledComponents.default.button.withConfig({
47
47
  }, function (props) {
48
48
  return props.theme.colors.button[props.appearance].background.hover;
49
49
  }, function (props) {
50
- return props.appearance === "placeholder" ? props.theme.shadows[100] : "none";
50
+ return props.appearance === "placeholder" ? props.theme.shadows.low : "none";
51
51
  }, function (props) {
52
52
  return props.theme.colors.button[props.appearance].text.hover;
53
53
  }, function (props) {
@@ -57,7 +57,7 @@ var Container = _styledComponents.default.button.withConfig({
57
57
  }, function (props) {
58
58
  return props.disabled && _mixins.disabled;
59
59
  }, function (props) {
60
- return props.appearance === "pill" && (0, _styledComponents.css)(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode ? "screen" : "multiply", _mixins.pill);
60
+ return props.appearance === "pill" && (0, _styledComponents.css)(["display:inline-flex;align-items:center;justify-content:center;mix-blend-mode:", ";", ""], props.theme.mode === "dark" ? "screen" : "multiply", _mixins.pill);
61
61
  }, _styles.default, _systemProps.LAYOUT, _systemProps.COMMON);
62
62
 
63
63
  var _default = Container; //${props.theme.mode === "dark" ? "screen" : "multiply"}
@@ -19,7 +19,7 @@ var Container = (0, _styledComponents.default)(_Box.default).withConfig({
19
19
  }, function (props) {
20
20
  return props.theme.radii[500];
21
21
  }, function (props) {
22
- return props.theme.shadows[100];
22
+ return props.theme.shadows.low;
23
23
  }, function (props) {
24
24
  return props.theme.duration.medium;
25
25
  }, function (props) {
@@ -40,7 +40,7 @@ var InputWrapper = (0, _styledComponents.default)(_Box.default).withConfig({
40
40
  return props.theme.duration.fast;
41
41
  }, function (props) {
42
42
  return props.theme.easing.ease_inout;
43
- }, props.theme.mode ? "screen" : "multiply", _mixins.pill, props.theme.colors.app.background.base, PillInput, _mixins.pill);
43
+ }, props.theme.mode === "dark" ? "screen" : "multiply", _mixins.pill, props.theme.colors.app.background.base, PillInput, _mixins.pill);
44
44
  });
45
45
  exports.InputWrapper = InputWrapper;
46
46
  InputWrapper.displayName = "InputWrapper";
@@ -29,7 +29,7 @@ var Container = _styledComponents.default.div.withConfig({
29
29
  }, function (props) {
30
30
  return props.theme.colors.container.background.base;
31
31
  }, function (props) {
32
- return props.theme.shadows[400];
32
+ return props.theme.shadows.high;
33
33
  }, function (props) {
34
34
  return (0, _styledComponents.css)(["", ":", "px;"], props.direction, props.offset);
35
35
  }, _systemProps.COMMON);
@@ -21,7 +21,7 @@ var Container = _styledComponents.default.div.withConfig({
21
21
  }, function (props) {
22
22
  return props.theme.radii[500];
23
23
  }, function (props) {
24
- return props.theme.shadows[100];
24
+ return props.theme.shadows.low;
25
25
  }, function (props) {
26
26
  return props.theme.space[200];
27
27
  }, _systemProps.COMMON);
@@ -277,7 +277,9 @@ var MenuGroup = function MenuGroup(_ref2) {
277
277
  mt: 350,
278
278
  color: "text.headline",
279
279
  _css: isDisabled && _mixins.disabled
280
- }, title)), /*#__PURE__*/React.createElement(_styles.MenuGroupContainer, _extends({}, props, {
280
+ }, title)), /*#__PURE__*/React.createElement(_Box.default, _extends({}, props, {
281
+ m: 300,
282
+ p: 300,
281
283
  role: "group"
282
284
  }), children));
283
285
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports.MenuItemsContainer = exports.MenuGroupContainer = exports.MenuItemContainer = void 0;
4
+ exports.MenuItemsContainer = exports.MenuItemContainer = void 0;
5
5
 
6
6
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
7
7
 
@@ -56,21 +56,8 @@ var MenuItemContainer = (0, _styledComponents.default)(_Box.default).withConfig(
56
56
  return props.disabled && _mixins.disabled;
57
57
  });
58
58
  exports.MenuItemContainer = MenuItemContainer;
59
- var MenuGroupContainer = (0, _styledComponents.default)(_Box.default).withConfig({
60
- displayName: "styles__MenuGroupContainer",
61
- componentId: "fjvae4-1"
62
- })(["", ";"], function (props) {
63
- return props.appearance === "flush" ? (0, _styledComponents.css)(["margin:0 -", ";"], function (props) {
64
- return props.theme.space[300];
65
- }) : (0, _styledComponents.css)(["padding:", ";"], function (props) {
66
- return props.theme.space[300];
67
- });
68
- });
69
- exports.MenuGroupContainer = MenuGroupContainer;
70
59
  var MenuItemsContainer = (0, _styledComponents.default)(_Box.default).withConfig({
71
60
  displayName: "styles__MenuItemsContainer",
72
- componentId: "fjvae4-2"
61
+ componentId: "fjvae4-1"
73
62
  })(["list-style-type:none;outline:0;"]);
74
- exports.MenuItemsContainer = MenuItemsContainer;
75
- var _default = MenuGroupContainer;
76
- exports.default = _default;
63
+ exports.MenuItemsContainer = MenuItemsContainer;
@@ -72,7 +72,7 @@ var Container = (0, _styledComponents.default)(ReactModalAdapter).withConfig({
72
72
  }, function (props) {
73
73
  return props.theme.radii[500];
74
74
  }, function (props) {
75
- return props.theme.shadows[300];
75
+ return props.theme.shadows.medium;
76
76
  }, function (props) {
77
77
  return props.theme.colors.text.body;
78
78
  }, BODY_PADDING, BODY_PADDING, BODY_PADDING, _styledSystem.width, _systemProps.COMMON);
@@ -290,7 +290,7 @@ Popout.Content = function (_ref4) {
290
290
  border: 500,
291
291
  borderColor: "container.border.base",
292
292
  borderRadius: "outer",
293
- boxShadow: 300,
293
+ boxShadow: "medium",
294
294
  p: 400,
295
295
  m: 300
296
296
  }, rest), children);
@@ -7,7 +7,7 @@ var React = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _styledComponents = require("styled-components");
9
9
 
10
- var _theme = _interopRequireDefault(require("../themes/default/theme"));
10
+ var _theme = _interopRequireDefault(require("../themes/light/theme"));
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
@@ -33,14 +33,17 @@ var Token = function Token(_ref) {
33
33
  valid = _ref$valid === void 0 ? true : _ref$valid,
34
34
  _ref$disabled = _ref.disabled,
35
35
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
36
- rest = _objectWithoutPropertiesLoose(_ref, ["children", "closeable", "onClick", "qa", "valid", "disabled"]);
36
+ _ref$palette = _ref.palette,
37
+ palette = _ref$palette === void 0 ? "neutral" : _ref$palette,
38
+ rest = _objectWithoutPropertiesLoose(_ref, ["children", "closeable", "onClick", "qa", "valid", "disabled", "palette"]);
37
39
 
38
40
  var textContainer = (0, _hooks.useTextContent)("");
39
41
  return /*#__PURE__*/React.createElement(_styles.default, _extends({
40
42
  ref: textContainer,
41
43
  valid: valid,
42
- as: closeable || onClick ? "button" : "div",
44
+ palette: palette,
43
45
  type: closeable || onClick ? "button" : undefined,
46
+ as: closeable || onClick ? "button" : "div",
44
47
  closeable: closeable || onClick,
45
48
  disabled: disabled,
46
49
  onClick: onClick,
@@ -16,56 +16,25 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
16
16
  var Container = _styledComponents.default.button.withConfig({
17
17
  displayName: "styles__Container",
18
18
  componentId: "nyn5zy-0"
19
- })(["font-family:", ";", ";position:relative;display:inline-block;padding:", " ", ";margin:0;color:", ";background:", ";border:1px solid ", ";font-weight:", ";line-height:1;vertical-align:middle;border-radius:", ";outline:none;transition:all ", " ", ";&:focus{", "}", " ", " ", " ", ""], function (props) {
20
- return props.theme.fontFamily;
21
- }, function (props) {
22
- return props.theme.typography[200];
23
- }, function (props) {
24
- return props.theme.space[200];
25
- }, function (props) {
26
- return props.theme.space[300];
27
- }, function (props) {
28
- return props.theme.colors.text.body;
29
- }, function (props) {
30
- return props.theme.colors.container.background.base;
31
- }, function (props) {
32
- return props.theme.colors.container.border.base;
33
- }, function (props) {
34
- return props.theme.fontWeights.normal;
35
- }, function (props) {
36
- return props.theme.radii[500];
37
- }, function (props) {
38
- return props.theme.duration.fast;
39
- }, function (props) {
40
- return props.theme.easing.ease_inout;
41
- }, _mixins.focusRing, function (props) {
42
- return props.closeable && (0, _styledComponents.css)(["cursor:pointer;&:hover,&:active{color:", ";border:1px solid ", ";background-color:", ";}"], function (props) {
43
- return props.theme.colors.text.body;
44
- }, function (props) {
45
- return props.theme.colors.container.border.decorative.neutral;
46
- }, function (props) {
47
- return props.theme.colors.container.background.decorative.neutral;
48
- });
49
- }, function (props) {
50
- return props.disabled && (0, _styledComponents.css)(["opacity:0.4;cursor:not-allowed;&:hover,&:active{background:", ";border:1px solid ", ";}"], function (props) {
51
- return props.theme.colors.container.background.base;
52
- }, function (props) {
53
- return props.theme.colors.container.border.base;
54
- });
55
- }, function (props) {
56
- return !props.valid && (0, _styledComponents.css)(["color:", ";border-color:", ";background:", ";&:hover{color:", ";border:1px solid ", ";background-color:", ";}"], function (props) {
57
- return props.theme.colors.text.body;
58
- }, function (props) {
59
- return props.theme.colors.container.border.error;
60
- }, function (props) {
61
- return props.theme.colors.container.background.error;
62
- }, function (props) {
63
- return props.theme.colors.text.body;
64
- }, function (props) {
65
- return props.theme.colors.container.border.error;
66
- }, function (props) {
67
- return props.theme.colors.container.background.error;
68
- });
19
+ })(["position:relative;display:inline-block;margin:0;line-height:1;vertical-align:middle;outline:none;", " &:focus{", "}", " ", " ", " ", " ", ""], function (_ref) {
20
+ var theme = _ref.theme;
21
+ return (0, _styledComponents.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);
22
+ }, _mixins.focusRing, function (_ref2) {
23
+ var theme = _ref2.theme,
24
+ palette = _ref2.palette;
25
+ return palette === "blue" && (0, _styledComponents.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));
26
+ }, function (_ref3) {
27
+ var closeable = _ref3.closeable,
28
+ theme = _ref3.theme;
29
+ return closeable && (0, _styledComponents.css)(["cursor:pointer;&:hover,&:active{box-shadow:", ";border:1px solid ", ";}"], theme.shadows.low, theme.utils.interact(theme.colors.container.border.base));
30
+ }, function (_ref4) {
31
+ var disabled = _ref4.disabled,
32
+ theme = _ref4.theme;
33
+ return disabled && (0, _styledComponents.css)(["opacity:0.4;cursor:not-allowed;&:hover,&:active{box-shadow:none;border:1px solid ", ";}"], theme.colors.container.border.base);
34
+ }, function (_ref5) {
35
+ var valid = _ref5.valid,
36
+ theme = _ref5.theme;
37
+ return !valid && (0, _styledComponents.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));
69
38
  }, _systemProps.COMMON);
70
39
 
71
40
  var _default = Container;
@@ -132,7 +132,7 @@ var Content = function Content(_ref2) {
132
132
  m: 200,
133
133
  color: "text.body",
134
134
  bg: "container.background.base",
135
- boxShadow: 300,
135
+ boxShadow: "medium",
136
136
  border: 500,
137
137
  borderColor: "container.border.base" // $FlowIssue - upgrade v0.112.0
138
138
 
package/commonjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.VisuallyHidden = exports.DateRangePicker = exports.SingleDatePicker = exports.ListboxButton = exports.MenuItemContainer = exports.MenuButtonContext = exports.MenuButton = exports.toast = exports.OverflowList = exports.Listbox = exports.Menu = exports.ToastContainer = exports.Skeleton = exports.Breadcrumb = exports.Avatar = exports.Stack = exports.Message = exports.Fieldset = exports.FormField = exports.EmptyState = exports.SegmentedControl = exports.Collapsible = exports.Numeral = exports.LoaderButton = exports.Drawer = exports.Tooltip = exports.CustomThemeProvider = exports.ThemeProvider = exports.Popout = exports.Modal = exports.Tabs = exports.TokenInput = exports.Token = exports.Switch = exports.Link = exports.Button = exports.Select = exports.Input = exports.Label = exports.Box = exports.TableRowAccordion = exports.TableHeaderCell = exports.TableCell = exports.Table = exports.ChartLegend = exports.KeyboardKey = exports.Image = exports.Text = exports.Loader = exports.ToggleHint = exports.Textarea = exports.Radio = exports.Checkbox = exports.CharacterCounter = exports.Card = exports.Indicator = exports.Badge = exports.Banner = exports.Alert = exports.Icon = exports.darkTheme = exports.theme = exports.useTextContent = exports.useMultiselect = exports.useSelect = exports.disabled = exports.focusRing = exports.visuallyHidden = void 0;
4
+ exports.VisuallyHidden = exports.DateRangePicker = exports.SingleDatePicker = exports.ListboxButton = exports.MenuItemContainer = exports.MenuButtonContext = exports.MenuButton = exports.toast = exports.OverflowList = exports.Listbox = exports.Menu = exports.ToastContainer = exports.Skeleton = exports.Breadcrumb = exports.Avatar = exports.Stack = exports.Message = exports.Fieldset = exports.FormField = exports.EmptyState = exports.SegmentedControl = exports.Collapsible = exports.Numeral = exports.LoaderButton = exports.Drawer = exports.Tooltip = exports.ThemeProvider = exports.Popout = exports.Modal = exports.Tabs = exports.TokenInput = exports.Token = exports.Switch = exports.Link = exports.Button = exports.Select = exports.Input = exports.Label = exports.Box = exports.TableRowAccordion = exports.TableHeaderCell = exports.TableCell = exports.Table = exports.ChartLegend = exports.KeyboardKey = exports.Image = exports.Text = exports.Loader = exports.ToggleHint = exports.Textarea = exports.Radio = exports.Checkbox = exports.CharacterCounter = exports.Card = exports.Indicator = exports.Badge = exports.Banner = exports.Alert = exports.Icon = exports.darkTheme = exports.theme = exports.useTextContent = exports.useMultiselect = exports.useSelect = exports.disabled = exports.focusRing = exports.visuallyHidden = void 0;
5
5
 
6
6
  var _mixins = require("./utils/mixins");
7
7
 
@@ -15,7 +15,7 @@ exports.useSelect = _hooks.useSelect;
15
15
  exports.useMultiselect = _hooks.useMultiselect;
16
16
  exports.useTextContent = _hooks.useTextContent;
17
17
 
18
- var _theme = _interopRequireDefault(require("./themes/default/theme"));
18
+ var _theme = _interopRequireDefault(require("./themes/light/theme"));
19
19
 
20
20
  exports.theme = _theme.default;
21
21
 
@@ -152,10 +152,6 @@ var _ThemeProvider = _interopRequireDefault(require("./ThemeProvider"));
152
152
 
153
153
  exports.ThemeProvider = _ThemeProvider.default;
154
154
 
155
- var _CustomThemeProvider = _interopRequireDefault(require("./CustomThemeProvider"));
156
-
157
- exports.CustomThemeProvider = _CustomThemeProvider.default;
158
-
159
155
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
160
156
 
161
157
  exports.Tooltip = _Tooltip.default;