@sproutsocial/racine 9.1.1-theme-extension.0 → 10.0.0-dar97-beta.1
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 +36 -0
- package/__flow__/Box/index.stories.js +1 -1
- package/__flow__/Breadcrumb/styles.js +0 -5
- package/__flow__/Button/styles.js +1 -1
- package/__flow__/Card/index.stories.js +0 -1
- package/__flow__/Card/styles.js +1 -1
- package/__flow__/Drawer/index.stories.js +3 -3
- package/__flow__/Drawer/styles.js +1 -1
- package/__flow__/KeyboardKey/styles.js +1 -1
- package/__flow__/Listbox/__snapshots__/index.test.js.snap +40 -34
- package/__flow__/Menu/__snapshots__/index.test.js.snap +15 -12
- package/__flow__/Menu/index.js +3 -7
- package/__flow__/Menu/index.stories.js +1 -1
- package/__flow__/Menu/styles.js +1 -18
- package/__flow__/Modal/index.test.js +0 -16
- package/__flow__/Modal/styles.js +1 -1
- package/__flow__/Popout/index.js +1 -1
- package/__flow__/Stack/index.js +1 -1
- package/__flow__/ThemeProvider/index.js +4 -4
- package/__flow__/Token/index.js +4 -1
- package/__flow__/Token/index.stories.js +11 -0
- package/__flow__/Token/styles.js +43 -33
- package/__flow__/Tooltip/index.js +1 -1
- package/__flow__/index.js +1 -2
- package/__flow__/themes/dark/_themes.scss +132 -0
- package/__flow__/themes/dark/theme.js +181 -157
- package/__flow__/themes/light/_themes.scss +132 -0
- package/__flow__/themes/{default → light}/dataviz-palette.js +0 -0
- package/__flow__/themes/{default → light}/decorative-palettes.js +0 -0
- package/__flow__/themes/{default → light}/literal-colors.js +0 -0
- package/__flow__/themes/{default → light}/theme.js +19 -8
- package/__flow__/themes/utils/interact.js +12 -0
- package/__flow__/types/system-props.flow.js +1 -2
- package/__flow__/types/theme.colors.flow.js +1 -1
- package/__flow__/types/theme.flow.js +2 -2
- package/__flow__/utils/mixins.js +1 -1
- package/__flow__/utils/responsiveProps/index.js +1 -1
- package/commonjs/Breadcrumb/styles.js +1 -1
- package/commonjs/Button/styles.js +1 -1
- package/commonjs/Card/styles.js +1 -1
- package/commonjs/Drawer/styles.js +1 -1
- package/commonjs/KeyboardKey/styles.js +1 -1
- package/commonjs/Menu/index.js +3 -1
- package/commonjs/Menu/styles.js +3 -16
- package/commonjs/Modal/styles.js +1 -1
- package/commonjs/Popout/index.js +1 -1
- package/commonjs/ThemeProvider/index.js +1 -1
- package/commonjs/Token/index.js +5 -2
- package/commonjs/Token/styles.js +19 -50
- package/commonjs/Tooltip/index.js +1 -1
- package/commonjs/index.js +2 -6
- package/commonjs/themes/dark/theme.js +180 -155
- package/commonjs/themes/{default → light}/dataviz-palette.js +0 -0
- package/commonjs/themes/{default → light}/decorative-palettes.js +0 -0
- package/commonjs/themes/{default → light}/literal-colors.js +0 -0
- package/commonjs/themes/{default → light}/theme.js +19 -8
- package/commonjs/themes/utils/interact.js +19 -0
- package/commonjs/types/theme.colors.flow.js +1 -1
- package/commonjs/types/theme.flow.js +1 -1
- package/commonjs/utils/mixins.js +1 -1
- package/commonjs/utils/responsiveProps/index.js +1 -1
- package/dist/themes/dark/_themes.scss +132 -0
- package/dist/themes/dark/dark.scss +601 -0
- package/dist/themes/light/_themes.scss +132 -0
- package/dist/themes/light/light.scss +692 -0
- package/lib/Breadcrumb/styles.js +1 -1
- package/lib/Button/styles.js +1 -1
- package/lib/Card/styles.js +1 -1
- package/lib/Drawer/styles.js +1 -1
- package/lib/KeyboardKey/styles.js +1 -1
- package/lib/Menu/index.js +4 -2
- package/lib/Menu/styles.js +2 -13
- package/lib/Modal/styles.js +1 -1
- package/lib/Popout/index.js +1 -1
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/Token/index.js +5 -2
- package/lib/Token/styles.js +19 -50
- package/lib/Tooltip/index.js +1 -1
- package/lib/index.js +1 -2
- package/lib/themes/dark/theme.js +175 -154
- package/lib/themes/{default → light}/dataviz-palette.js +0 -0
- package/lib/themes/{default → light}/decorative-palettes.js +0 -0
- package/lib/themes/{default → light}/literal-colors.js +0 -0
- package/lib/themes/{default → light}/theme.js +18 -8
- package/lib/themes/utils/interact.js +13 -0
- package/lib/types/theme.colors.flow.js +1 -1
- package/lib/types/theme.flow.js +1 -1
- package/lib/utils/mixins.js +1 -1
- package/lib/utils/responsiveProps/index.js +1 -1
- package/package.json +7 -10
- package/__flow__/CustomThemeProvider/index.js +0 -16
- package/__flow__/Modal/__snapshots__/index.test.js.snap +0 -80
- package/__flow__/themes/sprout/theme.js +0 -22
- package/__flow__/utils/extendTheme.js +0 -17
- package/commonjs/CustomThemeProvider/index.js +0 -23
- package/commonjs/themes/sprout/theme.js +0 -29
- package/commonjs/utils/extendTheme.js +0 -22
- package/lib/CustomThemeProvider/index.js +0 -12
- package/lib/themes/sprout/theme.js +0 -19
- package/lib/utils/extendTheme.js +0 -12
|
@@ -1,196 +1,221 @@
|
|
|
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
|
|
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
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
var MODE = "default-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
|
+
},
|
|
59
|
+
border: {
|
|
60
|
+
base: _seedsColor.default.COLOR_NEUTRAL_1100,
|
|
61
|
+
success: _decorativePalettes.green.highlight,
|
|
62
|
+
warning: _decorativePalettes.yellow.highlight,
|
|
63
|
+
error: _decorativePalettes.red.highlight,
|
|
64
|
+
danger: _decorativePalettes.red.highlight,
|
|
65
|
+
info: _decorativePalettes.blue.highlight,
|
|
66
|
+
opportunity: _decorativePalettes.purple.highlight,
|
|
67
|
+
decorative: {
|
|
68
|
+
green: _decorativePalettes.green.highlight,
|
|
69
|
+
blue: _decorativePalettes.blue.highlight,
|
|
70
|
+
purple: _decorativePalettes.purple.highlight,
|
|
71
|
+
yellow: _decorativePalettes.yellow.highlight,
|
|
72
|
+
orange: _decorativePalettes.orange.highlight,
|
|
73
|
+
red: _decorativePalettes.red.highlight,
|
|
74
|
+
neutral: _decorativePalettes.neutral.highlight
|
|
75
|
+
},
|
|
76
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_0
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
button: {
|
|
80
|
+
primary: {
|
|
21
81
|
background: {
|
|
22
|
-
base: _seedsColor.default.
|
|
82
|
+
base: _seedsColor.default.COLOR_BLUE_400,
|
|
83
|
+
hover: _seedsColor.default.COLOR_BLUE_300,
|
|
84
|
+
active: _seedsColor.default.COLOR_BLUE_200
|
|
85
|
+
},
|
|
86
|
+
border: {
|
|
87
|
+
base: "transparent"
|
|
88
|
+
},
|
|
89
|
+
text: {
|
|
90
|
+
base: _seedsColor.default.COLOR_NEUTRAL_900,
|
|
91
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_1000
|
|
23
92
|
}
|
|
24
93
|
},
|
|
25
|
-
|
|
94
|
+
secondary: {
|
|
26
95
|
background: {
|
|
27
|
-
base:
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
96
|
+
base: "transparent",
|
|
97
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_100,
|
|
98
|
+
active: _seedsColor.default.COLOR_NEUTRAL_0
|
|
44
99
|
},
|
|
45
100
|
border: {
|
|
46
|
-
base: _seedsColor.default.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
101
|
+
base: _seedsColor.default.COLOR_NEUTRAL_0
|
|
102
|
+
},
|
|
103
|
+
text: {
|
|
104
|
+
base: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
105
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_800
|
|
63
106
|
}
|
|
64
107
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
}
|
|
108
|
+
pill: {
|
|
109
|
+
background: {
|
|
110
|
+
base: "transparent",
|
|
111
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_1000,
|
|
112
|
+
active: _seedsColor.default.COLOR_NEUTRAL_900
|
|
93
113
|
},
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
}
|
|
114
|
+
border: {
|
|
115
|
+
base: "transparent"
|
|
107
116
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
base: _seedsColor.default.COLOR_NEUTRAL_900,
|
|
119
|
-
hover: _seedsColor.default.COLOR_NEUTRAL_1000
|
|
120
|
-
}
|
|
117
|
+
text: {
|
|
118
|
+
base: _seedsColor.default.COLOR_NEUTRAL_100,
|
|
119
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_0
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
destructive: {
|
|
123
|
+
background: {
|
|
124
|
+
base: _seedsColor.default.COLOR_RED_400,
|
|
125
|
+
hover: _seedsColor.default.COLOR_RED_300,
|
|
126
|
+
active: _seedsColor.default.COLOR_RED_200
|
|
121
127
|
},
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
}
|
|
128
|
+
border: {
|
|
129
|
+
base: "transparent"
|
|
135
130
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
border: {
|
|
141
|
-
base: "transparent"
|
|
142
|
-
},
|
|
143
|
-
text: {
|
|
144
|
-
base: _seedsColor.default.COLOR_NEUTRAL_300,
|
|
145
|
-
hover: _seedsColor.default.COLOR_NEUTRAL_200
|
|
146
|
-
}
|
|
131
|
+
text: {
|
|
132
|
+
base: _seedsColor.default.COLOR_NEUTRAL_900,
|
|
133
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_1000
|
|
147
134
|
}
|
|
148
135
|
},
|
|
149
|
-
|
|
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: {
|
|
136
|
+
placeholder: {
|
|
171
137
|
background: {
|
|
172
|
-
base:
|
|
173
|
-
|
|
138
|
+
base: "transparent",
|
|
139
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_1100,
|
|
140
|
+
active: _seedsColor.default.COLOR_NEUTRAL_1100
|
|
174
141
|
},
|
|
175
142
|
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
143
|
base: _seedsColor.default.COLOR_NEUTRAL_500
|
|
144
|
+
},
|
|
145
|
+
text: {
|
|
146
|
+
base: _seedsColor.default.COLOR_BLUE_400,
|
|
147
|
+
hover: _seedsColor.default.COLOR_BLUE_300
|
|
183
148
|
}
|
|
184
149
|
},
|
|
185
|
-
|
|
150
|
+
unstyled: {
|
|
186
151
|
background: {
|
|
187
|
-
base: "transparent"
|
|
188
|
-
|
|
189
|
-
|
|
152
|
+
base: "transparent"
|
|
153
|
+
},
|
|
154
|
+
border: {
|
|
155
|
+
base: "transparent"
|
|
156
|
+
},
|
|
157
|
+
text: {
|
|
158
|
+
base: _seedsColor.default.COLOR_NEUTRAL_300,
|
|
159
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_200
|
|
190
160
|
}
|
|
191
161
|
}
|
|
192
|
-
},
|
|
193
|
-
|
|
162
|
+
},
|
|
163
|
+
link: {
|
|
164
|
+
base: _seedsColor.default.COLOR_BLUE_400,
|
|
165
|
+
hover: _seedsColor.default.COLOR_BLUE_300
|
|
166
|
+
},
|
|
167
|
+
text: {
|
|
168
|
+
headline: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
169
|
+
subtext: _seedsColor.default.COLOR_NEUTRAL_300,
|
|
170
|
+
body: _seedsColor.default.COLOR_NEUTRAL_100,
|
|
171
|
+
inverse: _seedsColor.default.COLOR_NEUTRAL_900,
|
|
172
|
+
error: _seedsColor.default.COLOR_RED_400
|
|
173
|
+
},
|
|
174
|
+
icon: {
|
|
175
|
+
base: _seedsColor.default.COLOR_NEUTRAL_100,
|
|
176
|
+
inverse: _seedsColor.default.COLOR_NEUTRAL_900,
|
|
177
|
+
success: _decorativePalettes.green.foreground,
|
|
178
|
+
warning: _decorativePalettes.yellow.foreground,
|
|
179
|
+
error: _decorativePalettes.red.foreground,
|
|
180
|
+
danger: _decorativePalettes.red.foreground,
|
|
181
|
+
info: _decorativePalettes.blue.foreground,
|
|
182
|
+
opportunity: _decorativePalettes.purple.foreground
|
|
183
|
+
},
|
|
184
|
+
form: {
|
|
185
|
+
background: {
|
|
186
|
+
base: _seedsColor.default.COLOR_NEUTRAL_900,
|
|
187
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_0
|
|
188
|
+
},
|
|
189
|
+
border: {
|
|
190
|
+
base: _seedsColor.default.COLOR_NEUTRAL_500,
|
|
191
|
+
error: _decorativePalettes.red.highlight,
|
|
192
|
+
warning: _decorativePalettes.yellow.highlight,
|
|
193
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_0
|
|
194
|
+
},
|
|
195
|
+
placeholder: {
|
|
196
|
+
base: _seedsColor.default.COLOR_NEUTRAL_500
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
listItem: {
|
|
200
|
+
background: {
|
|
201
|
+
base: "transparent",
|
|
202
|
+
hover: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
203
|
+
selected: _seedsColor.default.COLOR_NEUTRAL_0
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
elevation: {
|
|
207
|
+
base: _seedsColor.default.COLOR_NEUTRAL_1100
|
|
208
|
+
},
|
|
209
|
+
dataviz: {
|
|
210
|
+
map: _datavizPalette.datavizPalette.DATAVIZ_COLORS_MAP,
|
|
211
|
+
list: _datavizPalette.datavizPalette.DATAVIZ_COLORS_LIST
|
|
212
|
+
}
|
|
213
|
+
}, _datavizPalette.datavizPalette);
|
|
214
|
+
|
|
215
|
+
var darkTheme = _extends({}, _theme.default, {
|
|
216
|
+
colors: colors,
|
|
217
|
+
shadows: shadows,
|
|
218
|
+
mode: MODE
|
|
194
219
|
});
|
|
195
220
|
|
|
196
221
|
var _default = darkTheme;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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 = "default-light";
|
|
32
35
|
|
|
33
36
|
var colors = _extends({
|
|
34
37
|
app: {
|
|
@@ -203,6 +206,9 @@ var colors = _extends({
|
|
|
203
206
|
selected: _seedsColor.default.COLOR_NEUTRAL_800
|
|
204
207
|
}
|
|
205
208
|
},
|
|
209
|
+
elevation: {
|
|
210
|
+
base: _seedsColor.default.COLOR_NEUTRAL_900 + "3D"
|
|
211
|
+
},
|
|
206
212
|
network: {
|
|
207
213
|
twitter: _seedsNetworkcolor.default.NETWORK_COLOR_TWITTER,
|
|
208
214
|
twitter_like: _seedsNetworkcolor.default.NETWORK_COLOR_TWITTER_LIKE,
|
|
@@ -229,6 +235,10 @@ var colors = _extends({
|
|
|
229
235
|
yelp: _seedsNetworkcolor.default.NETWORK_COLOR_YELP,
|
|
230
236
|
whatsapp: _seedsNetworkcolor.default.NETWORK_COLOR_WHATSAPP,
|
|
231
237
|
tiktok: _seedsNetworkcolor.default.NETWORK_COLOR_TIKTOK
|
|
238
|
+
},
|
|
239
|
+
dataviz: {
|
|
240
|
+
map: _datavizPalette.datavizPalette.DATAVIZ_COLORS_MAP,
|
|
241
|
+
list: _datavizPalette.datavizPalette.DATAVIZ_COLORS_LIST
|
|
232
242
|
}
|
|
233
243
|
}, _literalColors.default, _datavizPalette.datavizPalette);
|
|
234
244
|
|
|
@@ -287,10 +297,9 @@ var borderWidths = {
|
|
|
287
297
|
};
|
|
288
298
|
exports.borderWidths = borderWidths;
|
|
289
299
|
var shadows = {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
"400": _seedsDepth.default.ELEVATION_LEVEL_400
|
|
300
|
+
low: _seedsDepth.default.ELEVATION_LEVEL_100 + " " + _seedsColor.default.COLOR_NEUTRAL_900 + "3D",
|
|
301
|
+
medium: _seedsDepth.default.ELEVATION_LEVEL_300 + " " + _seedsColor.default.COLOR_NEUTRAL_900 + "3D",
|
|
302
|
+
high: _seedsDepth.default.ELEVATION_LEVEL_400 + " " + _seedsColor.default.COLOR_NEUTRAL_900 + "3D"
|
|
294
303
|
};
|
|
295
304
|
exports.shadows = shadows;
|
|
296
305
|
var easing = {
|
|
@@ -306,6 +315,9 @@ var duration = {
|
|
|
306
315
|
};
|
|
307
316
|
exports.duration = duration;
|
|
308
317
|
var theme = {
|
|
318
|
+
utils: {
|
|
319
|
+
interact: (0, _interact.default)(MODE)
|
|
320
|
+
},
|
|
309
321
|
breakpoints: breakpoints,
|
|
310
322
|
colors: colors,
|
|
311
323
|
typography: _extends({}, typography, {
|
|
@@ -326,11 +338,10 @@ var theme = {
|
|
|
326
338
|
}),
|
|
327
339
|
borders: borders,
|
|
328
340
|
borderWidths: borderWidths,
|
|
329
|
-
shadows:
|
|
330
|
-
shadows: shadows
|
|
331
|
-
}),
|
|
341
|
+
shadows: shadows,
|
|
332
342
|
easing: easing,
|
|
333
|
-
duration: duration
|
|
343
|
+
duration: duration,
|
|
344
|
+
mode: MODE
|
|
334
345
|
};
|
|
335
346
|
var _default = theme;
|
|
336
347
|
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 === "default-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/
|
|
3
|
+
var _literalColors = _interopRequireDefault(require("../themes/light/literal-colors"));
|
|
4
4
|
|
|
5
5
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/commonjs/utils/mixins.js
CHANGED
|
@@ -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/
|
|
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/
|
|
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,132 @@
|
|
|
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
|
+
// These files are auto-generated based on JS theme files, ensuring our SCSS theme variables stay in sync.
|
|
6
|
+
@import "../../../dist/themes/dark/dark.scss";
|
|
7
|
+
|
|
8
|
+
// In the JS theme files, 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
|
+
@mixin themed() {
|
|
15
|
+
& {
|
|
16
|
+
$theme-map: () !global;
|
|
17
|
+
@each $key, $submap in $theme {
|
|
18
|
+
$value: map-get($theme, "#{$key}");
|
|
19
|
+
$theme-map: map-merge($theme-map, ($key: $value)) !global;
|
|
20
|
+
}
|
|
21
|
+
@content;
|
|
22
|
+
$theme-map: null !global;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// FUNCTIONS
|
|
27
|
+
// This function will allow you to get any value from the theme.
|
|
28
|
+
// @param {string} $key - the period-separated path to the value in the theme object. e.g., "colors.text.body"
|
|
29
|
+
@function t($key) {
|
|
30
|
+
$keys: _str-split($key, ".");
|
|
31
|
+
@return _map-deep-get($theme-map, $keys);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// The rest of the functions are convenience methods to get theme values for subsets of the theme.
|
|
35
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "colors." omitted. e.g., "text.body"
|
|
36
|
+
@function colors($key) {
|
|
37
|
+
$keys: _str-split($key, ".");
|
|
38
|
+
@return _map-deep-get($theme-map, join("colors", $keys));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "typography." omitted. e.g., "100.fontSize"
|
|
42
|
+
@function typography($key) {
|
|
43
|
+
$keys: _str-split($key, ".");
|
|
44
|
+
@return _map-deep-get($theme-map, join("typography", $keys));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "fontWeights." omitted. e.g., "normal"
|
|
48
|
+
@function fontWeights($key) {
|
|
49
|
+
$keys: _str-split($key, ".");
|
|
50
|
+
@return _map-deep-get($theme-map, join("fontWeights", $keys));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "space." omitted. e.g., "100"
|
|
54
|
+
@function space($key) {
|
|
55
|
+
$keys: _str-split($key, ".");
|
|
56
|
+
@return _map-deep-get($theme-map, join("space", $keys));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "radii." omitted. e.g., "inner"
|
|
60
|
+
@function radii($key) {
|
|
61
|
+
$keys: _str-split($key, ".");
|
|
62
|
+
@return _map-deep-get($theme-map, join("radii", $keys));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borders." omitted. e.g., "500"
|
|
66
|
+
@function borders($key) {
|
|
67
|
+
$keys: _str-split($key, ".");
|
|
68
|
+
@return _map-deep-get($theme-map, join("borders", $keys));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "borderWidths." omitted. e.g., "500"
|
|
72
|
+
@function borderWidths($key) {
|
|
73
|
+
$keys: _str-split($key, ".");
|
|
74
|
+
@return _map-deep-get($theme-map, join("borderWidths", $keys));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "shadows." omitted. e.g., "low"
|
|
78
|
+
@function shadows($key) {
|
|
79
|
+
$keys: _str-split($key, ".");
|
|
80
|
+
@return _map-deep-get($theme-map, join("shadows", $keys));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "easing." omitted. e.g., "ease_in"
|
|
84
|
+
@function easing($key) {
|
|
85
|
+
$keys: _str-split($key, ".");
|
|
86
|
+
@return _map-deep-get($theme-map, join("easing", $keys));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// @param {string} $key - the period-separated path to the value in the theme object, with "duration." omitted. e.g., "fast"
|
|
90
|
+
@function duration($key) {
|
|
91
|
+
$keys: _str-split($key, ".");
|
|
92
|
+
@return _map-deep-get($theme-map, join("duration", $keys));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// UTILITIES
|
|
96
|
+
// Helper functions that power the functions above. Not relevant to the theme.
|
|
97
|
+
// If you import this file with @use, these functions will be excluded because they are private.
|
|
98
|
+
|
|
99
|
+
// Via https://stackoverflow.com/a/42295154
|
|
100
|
+
// Used to split period-separated object keys, e.g. "colors.text.body" => ["colors", "text", "body"]
|
|
101
|
+
// Only works with a single-character separator.
|
|
102
|
+
@function _str-split($string, $separator) {
|
|
103
|
+
// empty array/list
|
|
104
|
+
$split-arr: ();
|
|
105
|
+
// first index of separator in string
|
|
106
|
+
$index : str-index($string, $separator);
|
|
107
|
+
// loop through string
|
|
108
|
+
@while $index != null {
|
|
109
|
+
// get the substring from the first character to the separator
|
|
110
|
+
$item: str-slice($string, 1, $index - 1);
|
|
111
|
+
// push item to array
|
|
112
|
+
$split-arr: append($split-arr, $item);
|
|
113
|
+
// remove item and separator from string
|
|
114
|
+
$string: str-slice($string, $index + 1);
|
|
115
|
+
// find new index of separator
|
|
116
|
+
$index : str-index($string, $separator);
|
|
117
|
+
}
|
|
118
|
+
// add the remaining string to list (the last item)
|
|
119
|
+
$split-arr: append($split-arr, $string);
|
|
120
|
+
|
|
121
|
+
@return $split-arr;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Adapted from https://css-tricks.com/snippets/sass/deep-getset-maps/
|
|
125
|
+
// Iterates over a list of keys to read multi-level maps.
|
|
126
|
+
// e.g., _map-deep-get((colors: (text: (body: "#364141"))), ["colors", "text", "body"]) => "#364141"
|
|
127
|
+
@function _map-deep-get($map, $keys) {
|
|
128
|
+
@each $key in $keys {
|
|
129
|
+
$map: map-get($map, $key);
|
|
130
|
+
}
|
|
131
|
+
@return $map;
|
|
132
|
+
}
|