@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
@@ -80,3 +80,14 @@ export const staticWithIcon = () => (
80
80
  staticWithIcon.story = {
81
81
  name: "Static with icon",
82
82
  };
83
+
84
+ export const bluePalette = () => (
85
+ <Token palette="blue" closeable={boolean("closeable", false)}>
86
+ <Icon size="mini" name="twitter" pr={300} />
87
+ <span>I'm blue</span>
88
+ </Token>
89
+ );
90
+
91
+ bluePalette.story = {
92
+ name: "Palette Variation",
93
+ };
@@ -6,68 +6,78 @@ import { focusRing } from "../utils/mixins";
6
6
  import type { TypeTheme } from "../types/theme.flow";
7
7
 
8
8
  const Container: StyledComponent<any, TypeTheme, *> = styled.button`
9
- font-family: ${(props) => props.theme.fontFamily};
10
- ${(props) => props.theme.typography[200]};
11
9
  position: relative;
12
10
  display: inline-block;
13
- padding: ${(props) => props.theme.space[200]}
14
- ${(props) => props.theme.space[300]};
15
11
  margin: 0;
16
- color: ${(props) => props.theme.colors.text.body};
17
- background: ${(props) => props.theme.colors.container.background.base};
18
- border: 1px solid ${(props) => props.theme.colors.container.border.base};
19
- font-weight: ${(props) => props.theme.fontWeights.normal};
20
12
  line-height: 1;
21
13
  vertical-align: middle;
22
- border-radius: ${(props) => props.theme.radii[500]};
23
14
  outline: none;
24
- transition: all ${(props) => props.theme.duration.fast}
25
- ${(props) => props.theme.easing.ease_inout};
15
+ /* Theme Properties */
16
+ ${({ theme }) => css`
17
+ ${theme.typography[200]}
18
+ font-family: ${theme.fontFamily};
19
+ font-weight: ${theme.fontWeights.normal};
20
+ border: 1px solid ${theme.colors.container.border.base};
21
+ border-radius: ${theme.radii[500]};
22
+ color: ${theme.colors.text.body};
23
+ background: ${theme.colors.container.background.base};
24
+ padding: ${theme.space[200]} ${theme.space[300]};
25
+ transition: all ${theme.duration.fast} ${theme.easing.ease_inout};
26
+ `}
26
27
 
27
28
  &:focus {
28
29
  ${focusRing}
29
30
  }
30
31
 
31
- ${(props) =>
32
- props.closeable &&
32
+ ${({ theme, palette }) =>
33
+ palette === "blue" &&
33
34
  css`
34
- cursor: pointer;
35
+ color: ${theme.colors.text.body};
36
+ background: ${theme.colors.container.background.decorative.blue};
37
+ border: 1px solid ${theme.colors.container.border.decorative.blue};
38
+ &:hover,
39
+ &:active {
40
+ cursor: pointer;
41
+ box-shadow: ${theme.shadows.low};
42
+ border: 1px solid
43
+ ${theme.utils.interact(theme.colors.container.border.decorative.blue)};
44
+ }
45
+ `}
35
46
 
47
+ ${({ closeable, theme }) =>
48
+ closeable &&
49
+ css`
50
+ cursor: pointer;
36
51
  &:hover,
37
52
  &:active {
38
- color: ${(props) => props.theme.colors.text.body};
53
+ box-shadow: ${theme.shadows.low};
39
54
  border: 1px solid
40
- ${(props) => props.theme.colors.container.border.decorative.neutral};
41
- background-color: ${(props) =>
42
- props.theme.colors.container.background.decorative.neutral};
55
+ ${theme.utils.interact(theme.colors.container.border.base)};
43
56
  }
44
57
  `}
45
58
 
46
- ${(props) =>
47
- props.disabled &&
59
+ ${({ disabled, theme }) =>
60
+ disabled &&
48
61
  css`
49
62
  opacity: 0.4;
50
63
  cursor: not-allowed;
51
64
  &:hover,
52
65
  &:active {
53
- background: ${(props) => props.theme.colors.container.background.base};
54
- border: 1px solid ${(props) => props.theme.colors.container.border.base};
66
+ box-shadow: none;
67
+ border: 1px solid ${theme.colors.container.border.base};
55
68
  }
56
69
  `}
57
-
58
- ${(props) =>
59
- !props.valid &&
70
+
71
+ ${({ valid, theme }) =>
72
+ !valid &&
60
73
  css`
61
- color: ${(props) => props.theme.colors.text.body};
62
- border-color: ${(props) => props.theme.colors.container.border.error};
63
- background: ${(props) => props.theme.colors.container.background.error};
64
-
74
+ color: ${theme.colors.text.error};
75
+ background: ${theme.colors.container.background.error};
76
+ border: 1px solid ${theme.colors.container.border.error};
65
77
  &:hover {
66
- color: ${(props) => props.theme.colors.text.body};
78
+ box-shadow: ${theme.shadows.low};
67
79
  border: 1px solid
68
- ${(props) => props.theme.colors.container.border.error};
69
- background-color: ${(props) =>
70
- props.theme.colors.container.background.error};
80
+ ${theme.utils.interact(theme.colors.container.border.error)};
71
81
  }
72
82
  `}
73
83
 
@@ -159,7 +159,7 @@ const Content = ({
159
159
  m={200}
160
160
  color="text.body"
161
161
  bg="container.background.base"
162
- boxShadow={300}
162
+ boxShadow="medium"
163
163
  border={500}
164
164
  borderColor="container.border.base"
165
165
  // $FlowIssue - upgrade v0.112.0
package/__flow__/index.js CHANGED
@@ -3,7 +3,7 @@ export type { EnumIconNames } from "./EnumIconNames";
3
3
  export type { TypeTheme } from "./types/theme.flow";
4
4
  export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
5
5
  export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
6
- export { default as theme } from "./themes/default/theme";
6
+ export { default as theme } from "./themes/light/theme";
7
7
  export { default as darkTheme } from "./themes/dark/theme";
8
8
  export { default as Icon } from "./Icon";
9
9
  // DEPRECATED: Alert has been renamed to Banner
@@ -43,7 +43,6 @@ export { default as Modal } from "./Modal";
43
43
  export { default as Popout } from "./Popout";
44
44
  export type { EnumPlacements } from "./Popout";
45
45
  export { default as ThemeProvider } from "./ThemeProvider";
46
- export { default as CustomThemeProvider } from "./CustomThemeProvider";
47
46
  export { default as Tooltip } from "./Tooltip";
48
47
  export { default as Drawer } from "./Drawer";
49
48
  export { default as LoaderButton } from "./LoaderButton";
@@ -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
+ }
@@ -1,7 +1,8 @@
1
1
  // @flow strict-local
2
2
 
3
3
  import COLORS from "@sproutsocial/seeds-color";
4
- import defaultTheme from "../default/theme";
4
+ import DEPTH from "@sproutsocial/seeds-depth";
5
+ import lightTheme from "../light/theme";
5
6
  import { datavizPalette } from "./dataviz-palette";
6
7
  import {
7
8
  green,
@@ -13,185 +14,214 @@ import {
13
14
  neutral,
14
15
  } from "./decorative-palettes";
15
16
 
16
- const darkTheme = {
17
- ...defaultTheme,
18
- colors: {
19
- ...defaultTheme.colors,
20
- app: {
21
- background: {
22
- base: COLORS.COLOR_NEUTRAL_1000,
17
+ import interact from "../utils/interact";
18
+
19
+ const MODE = "dark";
20
+
21
+ export const shadows = {
22
+ low: `${DEPTH.ELEVATION_LEVEL_100} ${COLORS.COLOR_NEUTRAL_1100}FF`,
23
+ medium: `${DEPTH.ELEVATION_LEVEL_300} ${COLORS.COLOR_NEUTRAL_1100}FF`,
24
+ high: `${DEPTH.ELEVATION_LEVEL_400} ${COLORS.COLOR_NEUTRAL_1100}FF`,
25
+ };
26
+
27
+ const colors = {
28
+ ...lightTheme.colors,
29
+ utils: {
30
+ interact: interact(MODE),
31
+ },
32
+ app: {
33
+ background: {
34
+ base: COLORS.COLOR_NEUTRAL_1000,
35
+ },
36
+ },
37
+ container: {
38
+ background: {
39
+ base: COLORS.COLOR_NEUTRAL_900,
40
+ success: green.background,
41
+ warning: yellow.background,
42
+ error: red.background,
43
+ info: blue.background,
44
+ opportunity: purple.background,
45
+ danger: red.background,
46
+ decorative: {
47
+ green: green.background,
48
+ blue: blue.background,
49
+ purple: purple.background,
50
+ yellow: yellow.background,
51
+ orange: orange.background,
52
+ red: red.background,
53
+ neutral: neutral.background,
54
+ },
55
+ selected: COLORS.COLOR_NEUTRAL_0,
56
+ positive_sentiment: COLORS.COLOR_BLUE_500,
57
+ negative_sentiment: COLORS.COLOR_RED_500,
58
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_300,
59
+ },
60
+ border: {
61
+ base: COLORS.COLOR_NEUTRAL_1100,
62
+ success: green.highlight,
63
+ warning: yellow.highlight,
64
+ error: red.highlight,
65
+ danger: red.highlight,
66
+ info: blue.highlight,
67
+ opportunity: purple.highlight,
68
+ decorative: {
69
+ green: green.highlight,
70
+ blue: blue.highlight,
71
+ purple: purple.highlight,
72
+ yellow: yellow.highlight,
73
+ orange: orange.highlight,
74
+ red: red.highlight,
75
+ neutral: neutral.highlight,
23
76
  },
77
+ selected: COLORS.COLOR_NEUTRAL_0,
24
78
  },
25
- container: {
79
+ },
80
+ button: {
81
+ primary: {
26
82
  background: {
27
- base: COLORS.COLOR_NEUTRAL_900,
28
- success: green.background,
29
- warning: yellow.background,
30
- error: red.background,
31
- info: blue.background,
32
- opportunity: purple.background,
33
- danger: red.background,
34
- decorative: {
35
- green: green.background,
36
- blue: blue.background,
37
- purple: purple.background,
38
- yellow: yellow.background,
39
- orange: orange.background,
40
- red: red.background,
41
- neutral: neutral.background,
42
- },
43
- selected: COLORS.COLOR_NEUTRAL_0,
83
+ base: COLORS.COLOR_BLUE_400,
84
+ hover: COLORS.COLOR_BLUE_300,
85
+ active: COLORS.COLOR_BLUE_200,
44
86
  },
45
87
  border: {
46
- base: COLORS.COLOR_NEUTRAL_1100,
47
- success: green.highlight,
48
- warning: yellow.highlight,
49
- error: red.highlight,
50
- danger: red.highlight,
51
- info: blue.highlight,
52
- opportunity: purple.highlight,
53
- decorative: {
54
- green: green.highlight,
55
- blue: blue.highlight,
56
- purple: purple.highlight,
57
- yellow: yellow.highlight,
58
- orange: orange.highlight,
59
- red: red.highlight,
60
- neutral: neutral.highlight,
61
- },
62
- selected: COLORS.COLOR_NEUTRAL_0,
88
+ base: "transparent",
63
89
  },
64
- },
65
- button: {
66
- primary: {
67
- background: {
68
- base: COLORS.COLOR_BLUE_400,
69
- hover: COLORS.COLOR_BLUE_300,
70
- active: COLORS.COLOR_BLUE_200,
71
- },
72
- border: {
73
- base: "transparent",
74
- },
75
- text: {
76
- base: COLORS.COLOR_NEUTRAL_900,
77
- hover: COLORS.COLOR_NEUTRAL_1000,
78
- },
79
- },
80
- secondary: {
81
- background: {
82
- base: "transparent",
83
- hover: COLORS.COLOR_NEUTRAL_100,
84
- active: COLORS.COLOR_NEUTRAL_0,
85
- },
86
- border: {
87
- base: COLORS.COLOR_NEUTRAL_0,
88
- },
89
- text: {
90
- base: COLORS.COLOR_NEUTRAL_0,
91
- hover: COLORS.COLOR_NEUTRAL_800,
92
- },
93
- },
94
- pill: {
95
- background: {
96
- base: "transparent",
97
- hover: COLORS.COLOR_NEUTRAL_1000,
98
- active: COLORS.COLOR_NEUTRAL_900,
99
- },
100
- border: {
101
- base: "transparent",
102
- },
103
- text: {
104
- base: COLORS.COLOR_NEUTRAL_100,
105
- hover: COLORS.COLOR_NEUTRAL_0,
106
- },
107
- },
108
- destructive: {
109
- background: {
110
- base: COLORS.COLOR_RED_400,
111
- hover: COLORS.COLOR_RED_300,
112
- active: COLORS.COLOR_RED_200,
113
- },
114
- border: {
115
- base: "transparent",
116
- },
117
- text: {
118
- base: COLORS.COLOR_NEUTRAL_900,
119
- hover: COLORS.COLOR_NEUTRAL_1000,
120
- },
121
- },
122
- placeholder: {
123
- background: {
124
- base: "transparent",
125
- hover: COLORS.COLOR_NEUTRAL_1100,
126
- active: COLORS.COLOR_NEUTRAL_1100,
127
- },
128
- border: {
129
- base: COLORS.COLOR_NEUTRAL_500,
130
- },
131
- text: {
132
- base: COLORS.COLOR_BLUE_400,
133
- hover: COLORS.COLOR_BLUE_300,
134
- },
135
- },
136
- unstyled: {
137
- background: {
138
- base: "transparent",
139
- },
140
- border: {
141
- base: "transparent",
142
- },
143
- text: {
144
- base: COLORS.COLOR_NEUTRAL_300,
145
- hover: COLORS.COLOR_NEUTRAL_200,
146
- },
90
+ text: {
91
+ base: COLORS.COLOR_NEUTRAL_900,
92
+ hover: COLORS.COLOR_NEUTRAL_1000,
147
93
  },
148
94
  },
149
- link: {
150
- base: COLORS.COLOR_BLUE_400,
151
- hover: COLORS.COLOR_BLUE_300,
152
- },
153
- text: {
154
- headline: COLORS.COLOR_NEUTRAL_0,
155
- subtext: COLORS.COLOR_NEUTRAL_300,
156
- body: COLORS.COLOR_NEUTRAL_100,
157
- inverse: COLORS.COLOR_NEUTRAL_900,
158
- error: COLORS.COLOR_RED_400,
95
+ secondary: {
96
+ background: {
97
+ base: "transparent",
98
+ hover: COLORS.COLOR_NEUTRAL_100,
99
+ active: COLORS.COLOR_NEUTRAL_0,
100
+ },
101
+ border: {
102
+ base: COLORS.COLOR_NEUTRAL_0,
103
+ },
104
+ text: {
105
+ base: COLORS.COLOR_NEUTRAL_0,
106
+ hover: COLORS.COLOR_NEUTRAL_800,
107
+ },
159
108
  },
160
- icon: {
161
- base: COLORS.COLOR_NEUTRAL_100,
162
- inverse: COLORS.COLOR_NEUTRAL_900,
163
- success: green.foreground,
164
- warning: yellow.foreground,
165
- error: red.foreground,
166
- danger: red.foreground,
167
- info: blue.foreground,
168
- opportunity: purple.foreground,
109
+ pill: {
110
+ background: {
111
+ base: "transparent",
112
+ hover: COLORS.COLOR_NEUTRAL_1000,
113
+ active: COLORS.COLOR_NEUTRAL_900,
114
+ },
115
+ border: {
116
+ base: "transparent",
117
+ },
118
+ text: {
119
+ base: COLORS.COLOR_NEUTRAL_100,
120
+ hover: COLORS.COLOR_NEUTRAL_0,
121
+ },
169
122
  },
170
- form: {
123
+ destructive: {
171
124
  background: {
125
+ base: COLORS.COLOR_RED_400,
126
+ hover: COLORS.COLOR_RED_300,
127
+ active: COLORS.COLOR_RED_200,
128
+ },
129
+ border: {
130
+ base: "transparent",
131
+ },
132
+ text: {
172
133
  base: COLORS.COLOR_NEUTRAL_900,
173
- selected: COLORS.COLOR_NEUTRAL_0,
134
+ hover: COLORS.COLOR_NEUTRAL_1000,
135
+ },
136
+ },
137
+ placeholder: {
138
+ background: {
139
+ base: "transparent",
140
+ hover: COLORS.COLOR_NEUTRAL_1100,
141
+ active: COLORS.COLOR_NEUTRAL_1100,
174
142
  },
175
143
  border: {
176
144
  base: COLORS.COLOR_NEUTRAL_500,
177
- error: red.highlight,
178
- warning: yellow.highlight,
179
- selected: COLORS.COLOR_NEUTRAL_0,
180
145
  },
181
- placeholder: {
182
- base: COLORS.COLOR_NEUTRAL_500,
146
+ text: {
147
+ base: COLORS.COLOR_BLUE_400,
148
+ hover: COLORS.COLOR_BLUE_300,
183
149
  },
184
150
  },
185
- listItem: {
151
+ unstyled: {
186
152
  background: {
187
153
  base: "transparent",
188
- hover: COLORS.COLOR_NEUTRAL_800,
189
- selected: COLORS.COLOR_NEUTRAL_0,
154
+ },
155
+ border: {
156
+ base: "transparent",
157
+ },
158
+ text: {
159
+ base: COLORS.COLOR_NEUTRAL_300,
160
+ hover: COLORS.COLOR_NEUTRAL_200,
190
161
  },
191
162
  },
192
- ...datavizPalette,
193
163
  },
194
- mode: "dark",
164
+ link: {
165
+ base: COLORS.COLOR_BLUE_400,
166
+ hover: COLORS.COLOR_BLUE_300,
167
+ },
168
+ text: {
169
+ headline: COLORS.COLOR_NEUTRAL_0,
170
+ subtext: COLORS.COLOR_NEUTRAL_300,
171
+ body: COLORS.COLOR_NEUTRAL_100,
172
+ inverse: COLORS.COLOR_NEUTRAL_900,
173
+ error: COLORS.COLOR_RED_400,
174
+ },
175
+ icon: {
176
+ base: COLORS.COLOR_NEUTRAL_100,
177
+ inverse: COLORS.COLOR_NEUTRAL_900,
178
+ success: green.foreground,
179
+ warning: yellow.foreground,
180
+ error: red.foreground,
181
+ danger: red.foreground,
182
+ info: blue.foreground,
183
+ opportunity: purple.foreground,
184
+ positive_sentiment: COLORS.COLOR_BLUE_700,
185
+ negative_sentiment: COLORS.COLOR_RED_600,
186
+ neutral_sentiment: COLORS.COLOR_NEUTRAL_600,
187
+ },
188
+ form: {
189
+ background: {
190
+ base: COLORS.COLOR_NEUTRAL_900,
191
+ selected: COLORS.COLOR_NEUTRAL_0,
192
+ },
193
+ border: {
194
+ base: COLORS.COLOR_NEUTRAL_500,
195
+ error: red.highlight,
196
+ warning: yellow.highlight,
197
+ selected: COLORS.COLOR_NEUTRAL_0,
198
+ },
199
+ placeholder: {
200
+ base: COLORS.COLOR_NEUTRAL_500,
201
+ },
202
+ },
203
+ listItem: {
204
+ background: {
205
+ base: "transparent",
206
+ hover: COLORS.COLOR_NEUTRAL_800,
207
+ selected: COLORS.COLOR_NEUTRAL_0,
208
+ },
209
+ },
210
+ elevation: {
211
+ base: COLORS.COLOR_NEUTRAL_1100,
212
+ },
213
+ dataviz: {
214
+ map: datavizPalette.DATAVIZ_COLORS_MAP,
215
+ list: datavizPalette.DATAVIZ_COLORS_LIST,
216
+ },
217
+ ...datavizPalette,
218
+ };
219
+
220
+ const darkTheme = {
221
+ ...lightTheme,
222
+ colors,
223
+ shadows,
224
+ mode: MODE,
195
225
  };
196
226
 
197
227
  export default darkTheme;