@sproutsocial/racine 11.6.1-theme-type.0 → 11.6.2-themed-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.
- package/CHANGELOG.md +19 -0
- package/__flow__/themes/dark/theme.js +3 -3
- package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.js +44 -13
- package/__flow__/themes/extendedThemes/sproutTheme/light/theme.js +44 -13
- package/__flow__/themes/utils/_themed.scss +119 -0
- package/__flow__/types/theme.colors.flow.js +8 -1
- package/__flow__/types/theme.flow.js +8 -43
- package/commonjs/themes/dark/theme.js +3 -3
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +48 -15
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +48 -15
- package/commonjs/types/theme.flow.js +3 -1
- package/dist/themes/dark/_themed.scss +4 -3
- package/dist/themes/dark/{dark.scss → theme.scss} +1 -4
- package/dist/themes/extendedThemes/sproutTheme/dark/_themed.scss +119 -0
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +692 -0
- package/dist/themes/extendedThemes/sproutTheme/light/_themed.scss +119 -0
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +692 -0
- package/dist/themes/light/_themed.scss +4 -3
- package/dist/themes/light/{light.scss → theme.scss} +1 -1
- package/lib/themes/dark/theme.js +3 -3
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +44 -10
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +44 -10
- package/lib/types/theme.flow.js +2 -1
- package/package.json +2 -3
- package/__flow__/themes/extendedThemes/sproutTheme/NonColorThemeValues/index.js +0 -17
- package/__flow__/themes/extendedThemes/sproutTheme/dark/getDarkThemeColors.js +0 -36
- package/__flow__/themes/extendedThemes/sproutTheme/light/getLightThemeColors.js +0 -36
- package/commonjs/themes/extendedThemes/sproutTheme/NonColorThemeValues/index.js +0 -16
- package/commonjs/themes/extendedThemes/sproutTheme/dark/getDarkThemeColors.js +0 -39
- package/commonjs/themes/extendedThemes/sproutTheme/light/getLightThemeColors.js +0 -39
- package/lib/themes/extendedThemes/sproutTheme/NonColorThemeValues/index.js +0 -12
- package/lib/themes/extendedThemes/sproutTheme/dark/getDarkThemeColors.js +0 -34
- package/lib/themes/extendedThemes/sproutTheme/light/getLightThemeColors.js +0 -34
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 11.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 560c463: Added a new extended theme for the compare to period for the date picker.
|
|
8
|
+
|
|
9
|
+
## 11.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- eb27d01: Fix interact util in dark mode themes
|
|
14
|
+
- The `interact` util was located at a different location in the light and dark mode base theme objects. It was at the base level of the light theme and nested inside of `colors` for the dark theme.
|
|
15
|
+
- `interact` was seemingly available at the base level of the theme in both modes, because we spread the light theme as the basis of the dark theme. However, the `interact` util accessible at the base level of the theme would behave like light mode in either mode.
|
|
16
|
+
- The `interact` util located inside the `colors` object inside the dark mode theme object was not usable, due to only being defined in that location for dark mode, and has been removed.
|
|
17
|
+
- eb27d01: Remove 'just-clone' dependency
|
|
18
|
+
- eb27d01: Fix "navigation" colors in SproutTheme
|
|
19
|
+
- The "navigation" colors were not available in the theme due to being spread in incorrectly.
|
|
20
|
+
- eb27d01: Improve theme types to be more accurate
|
|
21
|
+
|
|
3
22
|
## 11.6.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -29,9 +29,6 @@ export const shadows = {
|
|
|
29
29
|
|
|
30
30
|
const colors = {
|
|
31
31
|
...lightTheme.colors,
|
|
32
|
-
utils: {
|
|
33
|
-
interact: interact(MODE),
|
|
34
|
-
},
|
|
35
32
|
app: {
|
|
36
33
|
background: {
|
|
37
34
|
base: COLORS.COLOR_NEUTRAL_1000,
|
|
@@ -238,6 +235,9 @@ const colors = {
|
|
|
238
235
|
|
|
239
236
|
const darkTheme = {
|
|
240
237
|
...lightTheme,
|
|
238
|
+
utils: {
|
|
239
|
+
interact: interact(MODE),
|
|
240
|
+
},
|
|
241
241
|
colors,
|
|
242
242
|
shadows,
|
|
243
243
|
mode: MODE,
|
|
@@ -1,23 +1,54 @@
|
|
|
1
1
|
// @flow strict-local
|
|
2
|
-
import clone from "just-clone";
|
|
3
2
|
import baseDarkTheme from "../../../dark/theme";
|
|
4
|
-
import { getDarkThemeColors } from "./getDarkThemeColors";
|
|
5
|
-
import { getNonColorThemeValues } from "../NonColorThemeValues";
|
|
6
3
|
import type { TypeSproutTheme } from "../../../../types/theme.flow";
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
export const navigation = {
|
|
6
|
+
main: {
|
|
7
|
+
background: {
|
|
8
|
+
base: baseDarkTheme.colors.neutral[1000],
|
|
9
|
+
overflowGradient: baseDarkTheme.colors.neutral[1100],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
secondary: {
|
|
13
|
+
background: {
|
|
14
|
+
base: baseDarkTheme.colors.neutral[900],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
text: {
|
|
18
|
+
base: baseDarkTheme.colors.neutral[0],
|
|
19
|
+
hover: baseDarkTheme.colors.neutral[0],
|
|
20
|
+
},
|
|
21
|
+
icon: {
|
|
22
|
+
base: baseDarkTheme.colors.neutral[0],
|
|
23
|
+
hover: baseDarkTheme.colors.neutral[0],
|
|
24
|
+
},
|
|
25
|
+
listItem: {
|
|
26
|
+
background: {
|
|
27
|
+
base: baseDarkTheme.colors.neutral[1000],
|
|
28
|
+
hover: baseDarkTheme.colors.neutral[1100],
|
|
29
|
+
selected: baseDarkTheme.colors.neutral[700],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
13
33
|
|
|
14
|
-
|
|
15
|
-
|
|
34
|
+
export const datePicker = {
|
|
35
|
+
comparison: {
|
|
36
|
+
background: {
|
|
37
|
+
base: baseDarkTheme.colors.neutral[400],
|
|
38
|
+
},
|
|
39
|
+
text: {
|
|
40
|
+
base: baseDarkTheme.colors.neutral[800],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
16
44
|
|
|
17
45
|
const darkTheme: TypeSproutTheme = {
|
|
18
|
-
...
|
|
19
|
-
|
|
20
|
-
|
|
46
|
+
...baseDarkTheme,
|
|
47
|
+
colors: {
|
|
48
|
+
...baseDarkTheme.colors,
|
|
49
|
+
navigation,
|
|
50
|
+
datePicker,
|
|
51
|
+
},
|
|
21
52
|
};
|
|
22
53
|
|
|
23
54
|
export default darkTheme;
|
|
@@ -1,23 +1,54 @@
|
|
|
1
1
|
// @flow strict-local
|
|
2
|
-
import clone from "just-clone";
|
|
3
2
|
import baseLightTheme from "../../../light/theme";
|
|
4
|
-
import { getLightThemeColors } from "./getLightThemeColors";
|
|
5
|
-
import { getNonColorThemeValues } from "../NonColorThemeValues";
|
|
6
3
|
import type { TypeSproutTheme } from "../../../../types/theme.flow";
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
export const navigation = {
|
|
6
|
+
main: {
|
|
7
|
+
background: {
|
|
8
|
+
base: baseLightTheme.colors.neutral[900],
|
|
9
|
+
overflowGradient: baseLightTheme.colors.neutral[1000],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
secondary: {
|
|
13
|
+
background: {
|
|
14
|
+
base: baseLightTheme.colors.neutral[800],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
text: {
|
|
18
|
+
base: baseLightTheme.colors.neutral[0],
|
|
19
|
+
hover: baseLightTheme.colors.neutral[0],
|
|
20
|
+
},
|
|
21
|
+
icon: {
|
|
22
|
+
base: baseLightTheme.colors.neutral[0],
|
|
23
|
+
hover: baseLightTheme.colors.neutral[0],
|
|
24
|
+
},
|
|
25
|
+
listItem: {
|
|
26
|
+
background: {
|
|
27
|
+
base: baseLightTheme.colors.neutral[800],
|
|
28
|
+
hover: baseLightTheme.colors.neutral[1000],
|
|
29
|
+
selected: baseLightTheme.colors.neutral[700],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
13
33
|
|
|
14
|
-
|
|
15
|
-
|
|
34
|
+
export const datePicker = {
|
|
35
|
+
comparison: {
|
|
36
|
+
background: {
|
|
37
|
+
base: baseLightTheme.colors.neutral[400],
|
|
38
|
+
},
|
|
39
|
+
text: {
|
|
40
|
+
base: baseLightTheme.colors.neutral[800],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
16
44
|
|
|
17
45
|
const lightTheme: TypeSproutTheme = {
|
|
18
|
-
...
|
|
19
|
-
|
|
20
|
-
|
|
46
|
+
...baseLightTheme,
|
|
47
|
+
colors: {
|
|
48
|
+
...baseLightTheme.colors,
|
|
49
|
+
navigation,
|
|
50
|
+
datePicker,
|
|
51
|
+
},
|
|
21
52
|
};
|
|
22
53
|
|
|
23
54
|
export default lightTheme;
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
// theme.scss is auto-generated based on the JS theme file, ensuring our SCSS theme variables stay in sync.
|
|
6
|
+
// _themed.scss will be copied to each theme folder in /dist, where the theme.scss file for that theme will be.
|
|
7
|
+
@import "./theme.scss";
|
|
8
|
+
|
|
9
|
+
// In the JS theme file, the theme object is exported as "default" (i.e., using "export default"),
|
|
10
|
+
// so we need to map-get "default" to access it.
|
|
11
|
+
$theme: map-get($theme, "default");
|
|
12
|
+
|
|
13
|
+
// FUNCTIONS
|
|
14
|
+
// This function will allow you to get any value from the theme.
|
|
15
|
+
// @param {string} $key - the period-separated path to the value in the theme object. e.g., "colors.text.body"
|
|
16
|
+
@function t($key) {
|
|
17
|
+
$keys: _str-split($key, ".");
|
|
18
|
+
@return _map-deep-get($theme, $keys);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// The rest of the functions are convenience methods to get theme values for subsets of the theme.
|
|
22
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "colors." omitted. e.g., "text.body"
|
|
23
|
+
@function colors($key) {
|
|
24
|
+
$keys: _str-split($key, ".");
|
|
25
|
+
@return _map-deep-get($theme, join("colors", $keys));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "typography." omitted. e.g., "100.fontSize"
|
|
29
|
+
@function typography($key) {
|
|
30
|
+
$keys: _str-split($key, ".");
|
|
31
|
+
@return _map-deep-get($theme, join("typography", $keys));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "fontWeights." omitted. e.g., "normal"
|
|
35
|
+
@function fontWeights($key) {
|
|
36
|
+
$keys: _str-split($key, ".");
|
|
37
|
+
@return _map-deep-get($theme, join("fontWeights", $keys));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "space." omitted. e.g., "100"
|
|
41
|
+
@function space($key) {
|
|
42
|
+
$keys: _str-split($key, ".");
|
|
43
|
+
@return _map-deep-get($theme, join("space", $keys));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "radii." omitted. e.g., "inner"
|
|
47
|
+
@function radii($key) {
|
|
48
|
+
$keys: _str-split($key, ".");
|
|
49
|
+
@return _map-deep-get($theme, join("radii", $keys));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borders." omitted. e.g., "500"
|
|
53
|
+
@function borders($key) {
|
|
54
|
+
$keys: _str-split($key, ".");
|
|
55
|
+
@return _map-deep-get($theme, join("borders", $keys));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borderWidths." omitted. e.g., "500"
|
|
59
|
+
@function borderWidths($key) {
|
|
60
|
+
$keys: _str-split($key, ".");
|
|
61
|
+
@return _map-deep-get($theme, join("borderWidths", $keys));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "shadows." omitted. e.g., "low"
|
|
65
|
+
@function shadows($key) {
|
|
66
|
+
$keys: _str-split($key, ".");
|
|
67
|
+
@return _map-deep-get($theme, join("shadows", $keys));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "easing." omitted. e.g., "ease_in"
|
|
71
|
+
@function easing($key) {
|
|
72
|
+
$keys: _str-split($key, ".");
|
|
73
|
+
@return _map-deep-get($theme, join("easing", $keys));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "duration." omitted. e.g., "fast"
|
|
77
|
+
@function duration($key) {
|
|
78
|
+
$keys: _str-split($key, ".");
|
|
79
|
+
@return _map-deep-get($theme, join("duration", $keys));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// UTILITIES
|
|
83
|
+
// Helper functions that power the functions above. Not relevant to the theme.
|
|
84
|
+
// If you import this file with @use, these functions will be excluded because they are private.
|
|
85
|
+
|
|
86
|
+
// Via https://stackoverflow.com/a/42295154
|
|
87
|
+
// Used to split period-separated object keys, e.g. "colors.text.body" => ["colors", "text", "body"]
|
|
88
|
+
// Only works with a single-character separator.
|
|
89
|
+
@function _str-split($string, $separator) {
|
|
90
|
+
// empty array/list
|
|
91
|
+
$split-arr: ();
|
|
92
|
+
// first index of separator in string
|
|
93
|
+
$index: str-index($string, $separator);
|
|
94
|
+
// loop through string
|
|
95
|
+
@while $index != null {
|
|
96
|
+
// get the substring from the first character to the separator
|
|
97
|
+
$item: str-slice($string, 1, $index - 1);
|
|
98
|
+
// push item to array
|
|
99
|
+
$split-arr: append($split-arr, $item);
|
|
100
|
+
// remove item and separator from string
|
|
101
|
+
$string: str-slice($string, $index + 1);
|
|
102
|
+
// find new index of separator
|
|
103
|
+
$index: str-index($string, $separator);
|
|
104
|
+
}
|
|
105
|
+
// add the remaining string to list (the last item)
|
|
106
|
+
$split-arr: append($split-arr, $string);
|
|
107
|
+
|
|
108
|
+
@return $split-arr;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Adapted from https://css-tricks.com/snippets/sass/deep-getset-maps/
|
|
112
|
+
// Iterates over a list of keys to read multi-level maps.
|
|
113
|
+
// e.g., _map-deep-get((colors: (text: (body: "#364141"))), ["colors", "text", "body"]) => "#364141"
|
|
114
|
+
@function _map-deep-get($map, $keys) {
|
|
115
|
+
@each $key in $keys {
|
|
116
|
+
$map: map-get($map, $key);
|
|
117
|
+
}
|
|
118
|
+
@return $map;
|
|
119
|
+
}
|
|
@@ -229,7 +229,14 @@ type TypeElevationColors = {|
|
|
|
229
229
|
},
|
|
230
230
|
|};
|
|
231
231
|
|
|
232
|
-
type TypeDatavizColors =
|
|
232
|
+
type TypeDatavizColors = {|
|
|
233
|
+
DATAVIZ_COLORS_MAP: typeof datavizPalette.DATAVIZ_COLORS_MAP,
|
|
234
|
+
DATAVIZ_COLORS_LIST: typeof datavizPalette.DATAVIZ_COLORS_LIST,
|
|
235
|
+
dataviz: {
|
|
236
|
+
map: typeof datavizPalette.DATAVIZ_COLORS_MAP,
|
|
237
|
+
list: typeof datavizPalette.DATAVIZ_COLORS_LIST,
|
|
238
|
+
},
|
|
239
|
+
|};
|
|
233
240
|
|
|
234
241
|
type TypeNetworkColors = {|
|
|
235
242
|
network: {
|
|
@@ -13,7 +13,12 @@ import {
|
|
|
13
13
|
} from "../themes/light/theme";
|
|
14
14
|
import type { TypeColors } from "./theme.colors.flow.js";
|
|
15
15
|
import type { TypeFontFamilyString } from "../themes/light/theme";
|
|
16
|
+
import {
|
|
17
|
+
datePicker,
|
|
18
|
+
navigation,
|
|
19
|
+
} from "../themes/extendedThemes/sproutTheme/light/theme";
|
|
16
20
|
|
|
21
|
+
export type TypeThemeUtils = {| interact: (color: string) => string |};
|
|
17
22
|
export type TypeThemeMode = "light" | "dark";
|
|
18
23
|
export type TypeBreakpoint = typeof breakpoints;
|
|
19
24
|
export type TypeTypography = typeof typography;
|
|
@@ -30,6 +35,7 @@ export type TypeDuration = typeof duration;
|
|
|
30
35
|
|
|
31
36
|
export type TypeTheme = {
|
|
32
37
|
mode: TypeThemeMode,
|
|
38
|
+
utils: TypeThemeUtils,
|
|
33
39
|
breakpoints: TypeBreakpoint,
|
|
34
40
|
colors: TypeColor,
|
|
35
41
|
typography: TypeTypography,
|
|
@@ -44,53 +50,12 @@ export type TypeTheme = {
|
|
|
44
50
|
duration: TypeDuration,
|
|
45
51
|
};
|
|
46
52
|
|
|
47
|
-
export type TypeNonColorThemeValues = {
|
|
48
|
-
mode: TypeThemeMode,
|
|
49
|
-
breakpoints: TypeBreakpoint,
|
|
50
|
-
typography: TypeTypography,
|
|
51
|
-
fontWeights: TypeFontWeight,
|
|
52
|
-
fontFamily: TypeFontFamily,
|
|
53
|
-
space: TypeSpace,
|
|
54
|
-
radii: TypeRadii,
|
|
55
|
-
borders: TypeBorder,
|
|
56
|
-
borderWidths: TypeBorderWidth,
|
|
57
|
-
shadows: TypeShadow,
|
|
58
|
-
easing: TypeEasing,
|
|
59
|
-
duration: TypeDuration,
|
|
60
|
-
};
|
|
61
|
-
|
|
62
53
|
// Extended themes
|
|
63
54
|
export type TypeSproutTheme = {
|
|
64
55
|
...$Exact<TypeTheme>,
|
|
65
56
|
colors: {|
|
|
66
57
|
...$Exact<TypeColor>,
|
|
67
|
-
navigation:
|
|
68
|
-
|
|
69
|
-
background: {|
|
|
70
|
-
base: string,
|
|
71
|
-
gradient: string,
|
|
72
|
-
|},
|
|
73
|
-
|},
|
|
74
|
-
secondary: {|
|
|
75
|
-
background: {|
|
|
76
|
-
base: string,
|
|
77
|
-
|},
|
|
78
|
-
|},
|
|
79
|
-
text: {|
|
|
80
|
-
base: string,
|
|
81
|
-
hover: string,
|
|
82
|
-
|},
|
|
83
|
-
icon: {|
|
|
84
|
-
base: string,
|
|
85
|
-
hover: string,
|
|
86
|
-
|},
|
|
87
|
-
listItem: {|
|
|
88
|
-
background: {|
|
|
89
|
-
base: string,
|
|
90
|
-
hover: string,
|
|
91
|
-
active: string,
|
|
92
|
-
|},
|
|
93
|
-
|},
|
|
94
|
-
|},
|
|
58
|
+
navigation: typeof navigation,
|
|
59
|
+
datePicker: typeof datePicker,
|
|
95
60
|
|},
|
|
96
61
|
};
|
|
@@ -31,9 +31,6 @@ var shadows = {
|
|
|
31
31
|
exports.shadows = shadows;
|
|
32
32
|
|
|
33
33
|
var colors = _extends({}, _theme.default.colors, {
|
|
34
|
-
utils: {
|
|
35
|
-
interact: (0, _interact.default)(MODE)
|
|
36
|
-
},
|
|
37
34
|
app: {
|
|
38
35
|
background: {
|
|
39
36
|
base: _seedsColor.default.COLOR_NEUTRAL_1000
|
|
@@ -237,6 +234,9 @@ var colors = _extends({}, _theme.default.colors, {
|
|
|
237
234
|
}, _datavizPalette.datavizPalette);
|
|
238
235
|
|
|
239
236
|
var darkTheme = _extends({}, _theme.default, {
|
|
237
|
+
utils: {
|
|
238
|
+
interact: (0, _interact.default)(MODE)
|
|
239
|
+
},
|
|
240
240
|
colors: colors,
|
|
241
241
|
shadows: shadows,
|
|
242
242
|
mode: MODE
|
|
@@ -1,28 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
|
|
6
|
-
var _justClone = _interopRequireDefault(require("just-clone"));
|
|
4
|
+
exports.navigation = exports.default = exports.datePicker = void 0;
|
|
7
5
|
|
|
8
6
|
var _theme = _interopRequireDefault(require("../../../dark/theme"));
|
|
9
7
|
|
|
10
|
-
var _getDarkThemeColors = require("./getDarkThemeColors");
|
|
11
|
-
|
|
12
|
-
var _NonColorThemeValues = require("../NonColorThemeValues");
|
|
13
|
-
|
|
14
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
9
|
|
|
16
10
|
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
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
var navigation = {
|
|
13
|
+
main: {
|
|
14
|
+
background: {
|
|
15
|
+
base: _theme.default.colors.neutral[1000],
|
|
16
|
+
overflowGradient: _theme.default.colors.neutral[1100]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
secondary: {
|
|
20
|
+
background: {
|
|
21
|
+
base: _theme.default.colors.neutral[900]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
text: {
|
|
25
|
+
base: _theme.default.colors.neutral[0],
|
|
26
|
+
hover: _theme.default.colors.neutral[0]
|
|
27
|
+
},
|
|
28
|
+
icon: {
|
|
29
|
+
base: _theme.default.colors.neutral[0],
|
|
30
|
+
hover: _theme.default.colors.neutral[0]
|
|
31
|
+
},
|
|
32
|
+
listItem: {
|
|
33
|
+
background: {
|
|
34
|
+
base: _theme.default.colors.neutral[1000],
|
|
35
|
+
hover: _theme.default.colors.neutral[1100],
|
|
36
|
+
selected: _theme.default.colors.neutral[700]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.navigation = navigation;
|
|
41
|
+
var datePicker = {
|
|
42
|
+
comparison: {
|
|
43
|
+
background: {
|
|
44
|
+
base: _theme.default.colors.neutral[400]
|
|
45
|
+
},
|
|
46
|
+
text: {
|
|
47
|
+
base: _theme.default.colors.neutral[800]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.datePicker = datePicker;
|
|
52
|
+
|
|
53
|
+
var darkTheme = _extends({}, _theme.default, {
|
|
54
|
+
colors: _extends({}, _theme.default.colors, {
|
|
55
|
+
navigation: navigation,
|
|
56
|
+
datePicker: datePicker
|
|
57
|
+
})
|
|
58
|
+
});
|
|
26
59
|
|
|
27
60
|
var _default = darkTheme;
|
|
28
61
|
exports.default = _default;
|
|
@@ -1,28 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
|
|
6
|
-
var _justClone = _interopRequireDefault(require("just-clone"));
|
|
4
|
+
exports.navigation = exports.default = exports.datePicker = void 0;
|
|
7
5
|
|
|
8
6
|
var _theme = _interopRequireDefault(require("../../../light/theme"));
|
|
9
7
|
|
|
10
|
-
var _getLightThemeColors = require("./getLightThemeColors");
|
|
11
|
-
|
|
12
|
-
var _NonColorThemeValues = require("../NonColorThemeValues");
|
|
13
|
-
|
|
14
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
9
|
|
|
16
10
|
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
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
var navigation = {
|
|
13
|
+
main: {
|
|
14
|
+
background: {
|
|
15
|
+
base: _theme.default.colors.neutral[900],
|
|
16
|
+
overflowGradient: _theme.default.colors.neutral[1000]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
secondary: {
|
|
20
|
+
background: {
|
|
21
|
+
base: _theme.default.colors.neutral[800]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
text: {
|
|
25
|
+
base: _theme.default.colors.neutral[0],
|
|
26
|
+
hover: _theme.default.colors.neutral[0]
|
|
27
|
+
},
|
|
28
|
+
icon: {
|
|
29
|
+
base: _theme.default.colors.neutral[0],
|
|
30
|
+
hover: _theme.default.colors.neutral[0]
|
|
31
|
+
},
|
|
32
|
+
listItem: {
|
|
33
|
+
background: {
|
|
34
|
+
base: _theme.default.colors.neutral[800],
|
|
35
|
+
hover: _theme.default.colors.neutral[1000],
|
|
36
|
+
selected: _theme.default.colors.neutral[700]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.navigation = navigation;
|
|
41
|
+
var datePicker = {
|
|
42
|
+
comparison: {
|
|
43
|
+
background: {
|
|
44
|
+
base: _theme.default.colors.neutral[400]
|
|
45
|
+
},
|
|
46
|
+
text: {
|
|
47
|
+
base: _theme.default.colors.neutral[800]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.datePicker = datePicker;
|
|
52
|
+
|
|
53
|
+
var lightTheme = _extends({}, _theme.default, {
|
|
54
|
+
colors: _extends({}, _theme.default.colors, {
|
|
55
|
+
navigation: navigation,
|
|
56
|
+
datePicker: datePicker
|
|
57
|
+
})
|
|
58
|
+
});
|
|
26
59
|
|
|
27
60
|
var _default = lightTheme;
|
|
28
61
|
exports.default = _default;
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// This file is excluded from stylelint, because stylelint is only set up to lint styled-components at the moment.
|
|
3
3
|
|
|
4
4
|
// SET-UP
|
|
5
|
-
//
|
|
6
|
-
|
|
5
|
+
// theme.scss is auto-generated based on the JS theme file, ensuring our SCSS theme variables stay in sync.
|
|
6
|
+
// _themed.scss will be copied to each theme folder in /dist, where the theme.scss file for that theme will be.
|
|
7
|
+
@import "./theme.scss";
|
|
7
8
|
|
|
8
9
|
// In the JS theme file, the theme object is exported as "default" (i.e., using "export default"),
|
|
9
10
|
// so we need to map-get "default" to access it.
|
|
10
|
-
$theme: map-get($
|
|
11
|
+
$theme: map-get($theme, "default");
|
|
11
12
|
|
|
12
13
|
// FUNCTIONS
|
|
13
14
|
// This function will allow you to get any value from the theme.
|