@sproutsocial/racine 11.5.0 → 11.6.1-theme-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 +6 -0
- package/__flow__/Checkbox/styles.js +75 -75
- package/__flow__/Collapsible/index.js +3 -2
- package/__flow__/Image/index.js +10 -2
- package/__flow__/SegmentedControl/index.js +3 -2
- package/__flow__/TableCell/index.js +9 -2
- package/__flow__/ThemeProvider/index.js +5 -2
- package/__flow__/ToggleHint/index.js +9 -2
- package/__flow__/index.js +5 -1
- package/__flow__/systemProps/color.js +1 -2
- package/__flow__/themes/dark/theme.js +3 -3
- package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.js +42 -0
- package/__flow__/themes/extendedThemes/sproutTheme/index.js +3 -0
- package/__flow__/themes/extendedThemes/sproutTheme/light/theme.js +42 -0
- package/__flow__/types/theme.colors.flow.js +8 -1
- package/__flow__/types/theme.flow.js +14 -0
- package/__flow__/utils/responsiveProps/index.test.js +10 -2
- package/commonjs/index.js +8 -1
- package/commonjs/themes/dark/theme.js +3 -3
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +49 -0
- package/commonjs/themes/extendedThemes/sproutTheme/index.js +14 -0
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +49 -0
- package/commonjs/types/theme.flow.js +3 -1
- package/dist/themes/dark/dark.scss +0 -3
- package/lib/index.js +1 -0
- package/lib/themes/dark/theme.js +3 -3
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +39 -0
- package/lib/themes/extendedThemes/sproutTheme/index.js +2 -0
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +39 -0
- package/lib/types/theme.flow.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -182,90 +182,90 @@ const getIcon = (type, color) => {
|
|
|
182
182
|
|
|
183
183
|
// eslint-disable-next-line prettier/prettier
|
|
184
184
|
export const CheckboxContainer: StyledComponent<any, TypeTheme, *> = styled.span(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
185
|
+
(props) => css`
|
|
186
|
+
display: inline-flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
box-sizing: border-box;
|
|
189
|
+
position: relative;
|
|
190
|
+
transition: all ${props.theme.duration.fast} ${props.theme.easing.ease_in};
|
|
191
|
+
|
|
192
|
+
@supports (-webkit-appearance: none) {
|
|
193
|
+
&:before {
|
|
194
|
+
/* stylelint-disable */
|
|
195
|
+
content: url("data:image/svg+xml;utf8,${getIcon(
|
|
196
|
+
props.indeterminate ? "indeterminate" : "check",
|
|
197
|
+
|
|
198
|
+
props.checked
|
|
199
|
+
? props.theme.colors.form.background.base
|
|
200
|
+
: props.theme.colors.form.border.base
|
|
201
|
+
)}");
|
|
202
|
+
opacity: ${props.checked ? 1 : 0};
|
|
203
|
+
position: absolute;
|
|
204
|
+
width: ${props.theme.space[400]};
|
|
205
|
+
height: ${props.theme.space[400]};
|
|
206
|
+
text-align: center;
|
|
207
|
+
transform: translateY(1px);
|
|
208
|
+
line-height: 1;
|
|
209
|
+
margin: auto;
|
|
210
|
+
pointer-events: none;
|
|
211
|
+
transition: ${props.theme.duration.fast}
|
|
212
|
+
${props.theme.easing.ease_inout};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&:hover:before {
|
|
216
|
+
opacity: ${props.disabled && !props.checked ? 0 : 1};
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
${props.disabled &&
|
|
220
|
+
css`
|
|
221
|
+
opacity: 0.4;
|
|
222
|
+
`}
|
|
223
|
+
|
|
224
|
+
input[type='checkbox'] {
|
|
225
|
+
box-sizing: border-box;
|
|
226
|
+
appearance: none;
|
|
227
|
+
margin: 0;
|
|
228
|
+
padding: 0;
|
|
229
|
+
width: ${props.theme.space[400]};
|
|
230
|
+
height: ${props.theme.space[400]};
|
|
231
|
+
border: 1px solid ${props.theme.colors.form.border.base};
|
|
232
|
+
border-radius: 4px;
|
|
233
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
234
|
+
transition: all ${props.theme.duration.fast}
|
|
235
|
+
${props.theme.easing.ease_in};
|
|
236
|
+
cursor: ${props.disabled ? "not-allowed" : "pointer"};
|
|
237
|
+
flex-shrink: 0;
|
|
238
|
+
|
|
239
|
+
&:not(:checked) {
|
|
240
|
+
${!props.indeterminate &&
|
|
241
|
+
css`
|
|
242
|
+
border-color: ${props.theme.colors
|
|
243
|
+
.neutral[300]} !important; /* We don't want the focus ring to remove the border */
|
|
244
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
245
|
+
`}
|
|
213
246
|
}
|
|
214
247
|
|
|
215
|
-
&:
|
|
216
|
-
|
|
248
|
+
&:checked {
|
|
249
|
+
border-color: ${props.theme.colors.form.border.selected};
|
|
250
|
+
background-color: ${props.theme.colors.form.background.selected};
|
|
217
251
|
}
|
|
218
252
|
|
|
219
|
-
${props.
|
|
253
|
+
${props.indeterminate &&
|
|
254
|
+
props.checked &&
|
|
220
255
|
css`
|
|
221
|
-
|
|
256
|
+
border-color: ${props.theme.colors.form.border.selected} !important;
|
|
257
|
+
background-color: ${props.theme.colors.form.background
|
|
258
|
+
.selected} !important;
|
|
222
259
|
`}
|
|
223
260
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
appearance: none;
|
|
227
|
-
margin: 0;
|
|
228
|
-
padding: 0;
|
|
229
|
-
width: ${props.theme.space[400]};
|
|
230
|
-
height: ${props.theme.space[400]};
|
|
231
|
-
border: 1px solid ${props.theme.colors.form.border.base};
|
|
232
|
-
border-radius: 4px;
|
|
233
|
-
background-color: ${props.theme.colors.form.background.base};
|
|
234
|
-
transition: all ${props.theme.duration.fast}
|
|
235
|
-
${props.theme.easing.ease_in};
|
|
236
|
-
cursor: ${props.disabled ? "not-allowed" : "pointer"};
|
|
237
|
-
flex-shrink: 0;
|
|
238
|
-
|
|
239
|
-
&:not(:checked) {
|
|
240
|
-
${!props.indeterminate &&
|
|
241
|
-
css`
|
|
242
|
-
border-color: ${props.theme.colors
|
|
243
|
-
.neutral[300]} !important; /* We don't want the focus ring to remove the border */
|
|
244
|
-
background-color: ${props.theme.colors.form.background.base};
|
|
245
|
-
`}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
&:checked {
|
|
249
|
-
border-color: ${props.theme.colors.form.border.selected};
|
|
250
|
-
background-color: ${props.theme.colors.form.background.selected};
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
${props.indeterminate &&
|
|
254
|
-
props.checked &&
|
|
255
|
-
css`
|
|
256
|
-
border-color: ${props.theme.colors.form.border.selected} !important;
|
|
257
|
-
background-color: ${props.theme.colors.form.background
|
|
258
|
-
.selected} !important;
|
|
259
|
-
`}
|
|
260
|
-
|
|
261
|
-
&:focus {
|
|
262
|
-
${focusRing}
|
|
263
|
-
}
|
|
261
|
+
&:focus {
|
|
262
|
+
${focusRing}
|
|
264
263
|
}
|
|
265
264
|
}
|
|
265
|
+
}
|
|
266
266
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
${COMMON}
|
|
268
|
+
`
|
|
269
|
+
);
|
|
270
270
|
|
|
271
271
|
export default Container;
|
|
@@ -73,8 +73,9 @@ const Trigger = ({ children, ...rest }) => {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
const Panel = ({ children, ...rest }) => {
|
|
76
|
-
const { isOpen, id, offset, collapsedHeight, openHeight } =
|
|
77
|
-
|
|
76
|
+
const { isOpen, id, offset, collapsedHeight, openHeight } = useContext(
|
|
77
|
+
CollapsibleContext
|
|
78
|
+
);
|
|
78
79
|
const ref = useRef();
|
|
79
80
|
const measurement = useMeasure(ref);
|
|
80
81
|
const [isHidden, setIsHidden] = useState(undefined);
|
package/__flow__/Image/index.js
CHANGED
|
@@ -80,8 +80,16 @@ export default class Image extends React.Component<TypeProps, TypeState> {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
render() {
|
|
83
|
-
const {
|
|
84
|
-
|
|
83
|
+
const {
|
|
84
|
+
alt,
|
|
85
|
+
title,
|
|
86
|
+
onClick,
|
|
87
|
+
onError,
|
|
88
|
+
onLoad,
|
|
89
|
+
src,
|
|
90
|
+
qa,
|
|
91
|
+
...rest
|
|
92
|
+
} = this.props;
|
|
85
93
|
|
|
86
94
|
return (
|
|
87
95
|
<ImageContainer
|
|
@@ -17,8 +17,9 @@ type TypeSegmentedControlContext = {
|
|
|
17
17
|
onChange: (e: SyntheticInputEvent<HTMLInputElement>) => void,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
const SegmentedControlContext =
|
|
21
|
-
|
|
20
|
+
const SegmentedControlContext = React.createContext<?TypeSegmentedControlContext>(
|
|
21
|
+
null
|
|
22
|
+
);
|
|
22
23
|
|
|
23
24
|
type TypeSegmentedControlItemProps = {
|
|
24
25
|
/** The value of this item. Should be unique among sibling items. */
|
|
@@ -22,8 +22,15 @@ export type TypeTableCell = {
|
|
|
22
22
|
*/
|
|
23
23
|
export default class TableCell extends React.Component<TypeTableCell> {
|
|
24
24
|
render() {
|
|
25
|
-
const {
|
|
26
|
-
|
|
25
|
+
const {
|
|
26
|
+
id,
|
|
27
|
+
content,
|
|
28
|
+
colSpan,
|
|
29
|
+
width,
|
|
30
|
+
align,
|
|
31
|
+
children,
|
|
32
|
+
...rest
|
|
33
|
+
} = this.props;
|
|
27
34
|
|
|
28
35
|
return (
|
|
29
36
|
<Container
|
|
@@ -3,10 +3,13 @@ import * as React from "react";
|
|
|
3
3
|
import { ThemeProvider as BaseThemeProvider } from "styled-components";
|
|
4
4
|
import theme from "../themes/light/theme";
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import type { TypeTheme, TypeSproutTheme } from "../types/theme.flow";
|
|
7
|
+
|
|
8
|
+
// We can append additional themes types here
|
|
9
|
+
type TypeAllThemes = TypeTheme | TypeSproutTheme;
|
|
7
10
|
|
|
8
11
|
type TypeProps = $ReadOnly<{|
|
|
9
|
-
theme?:
|
|
12
|
+
theme?: TypeAllThemes,
|
|
10
13
|
children: React.Node,
|
|
11
14
|
|}>;
|
|
12
15
|
|
|
@@ -32,8 +32,15 @@ export default class ToggleHint extends React.Component<TypeProps> {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
render() {
|
|
35
|
-
const {
|
|
36
|
-
|
|
35
|
+
const {
|
|
36
|
+
icon,
|
|
37
|
+
isOpen,
|
|
38
|
+
openString,
|
|
39
|
+
closeString,
|
|
40
|
+
qa,
|
|
41
|
+
className,
|
|
42
|
+
...rest
|
|
43
|
+
} = this.props;
|
|
37
44
|
|
|
38
45
|
return (
|
|
39
46
|
<Container
|
package/__flow__/index.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
export type { EnumIconNames } from "./EnumIconNames";
|
|
3
|
-
export type { TypeTheme } from "./types/theme.flow";
|
|
3
|
+
export type { TypeTheme, TypeSproutTheme } from "./types/theme.flow";
|
|
4
4
|
export * from "./systemProps";
|
|
5
5
|
export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
|
|
6
6
|
export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
|
|
7
7
|
export { default as theme } from "./themes/light/theme";
|
|
8
8
|
export { default as darkTheme } from "./themes/dark/theme";
|
|
9
|
+
export {
|
|
10
|
+
sproutLightTheme,
|
|
11
|
+
sproutDarkTheme,
|
|
12
|
+
} from "./themes/extendedThemes/sproutTheme";
|
|
9
13
|
export { default as Icon } from "./Icon";
|
|
10
14
|
// DEPRECATED: Alert has been renamed to Banner
|
|
11
15
|
export { default as Alert } from "./Banner";
|
|
@@ -14,8 +14,7 @@ import type {
|
|
|
14
14
|
|
|
15
15
|
// https://styled-system.com/table#color
|
|
16
16
|
|
|
17
|
-
type TypeBackgroundColorSystemProp =
|
|
18
|
-
TypeResponsiveBaseSystemProp<BackgroundColorProperty>;
|
|
17
|
+
type TypeBackgroundColorSystemProp = TypeResponsiveBaseSystemProp<BackgroundColorProperty>;
|
|
19
18
|
export type TypeColorSystemProps = $ReadOnly<{|
|
|
20
19
|
backgroundColor?: TypeBackgroundColorSystemProp,
|
|
21
20
|
bg?: TypeBackgroundColorSystemProp,
|
|
@@ -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,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
import baseDarkTheme from "../../../dark/theme";
|
|
3
|
+
import type { TypeSproutTheme } from "../../../../types/theme.flow";
|
|
4
|
+
|
|
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
|
+
};
|
|
33
|
+
|
|
34
|
+
const darkTheme: TypeSproutTheme = {
|
|
35
|
+
...baseDarkTheme,
|
|
36
|
+
colors: {
|
|
37
|
+
...baseDarkTheme.colors,
|
|
38
|
+
navigation,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default darkTheme;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
import baseLightTheme from "../../../light/theme";
|
|
3
|
+
import type { TypeSproutTheme } from "../../../../types/theme.flow";
|
|
4
|
+
|
|
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
|
+
};
|
|
33
|
+
|
|
34
|
+
const lightTheme: TypeSproutTheme = {
|
|
35
|
+
...baseLightTheme,
|
|
36
|
+
colors: {
|
|
37
|
+
...baseLightTheme.colors,
|
|
38
|
+
navigation,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default lightTheme;
|
|
@@ -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,10 @@ 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 { navigation } from "../themes/extendedThemes/sproutTheme/light/theme";
|
|
16
17
|
|
|
18
|
+
export type TypeThemeUtils = {| interact: (color: string) => string |};
|
|
19
|
+
export type TypeThemeMode = "light" | "dark";
|
|
17
20
|
export type TypeBreakpoint = typeof breakpoints;
|
|
18
21
|
export type TypeTypography = typeof typography;
|
|
19
22
|
export type TypeFontWeight = typeof fontWeights;
|
|
@@ -28,6 +31,8 @@ export type TypeEasing = typeof easing;
|
|
|
28
31
|
export type TypeDuration = typeof duration;
|
|
29
32
|
|
|
30
33
|
export type TypeTheme = {
|
|
34
|
+
mode: TypeThemeMode,
|
|
35
|
+
utils: TypeThemeUtils,
|
|
31
36
|
breakpoints: TypeBreakpoint,
|
|
32
37
|
colors: TypeColor,
|
|
33
38
|
typography: TypeTypography,
|
|
@@ -41,3 +46,12 @@ export type TypeTheme = {
|
|
|
41
46
|
easing: TypeEasing,
|
|
42
47
|
duration: TypeDuration,
|
|
43
48
|
};
|
|
49
|
+
|
|
50
|
+
// Extended themes
|
|
51
|
+
export type TypeSproutTheme = {
|
|
52
|
+
...$Exact<TypeTheme>,
|
|
53
|
+
colors: {|
|
|
54
|
+
...$Exact<TypeColor>,
|
|
55
|
+
navigation: typeof navigation,
|
|
56
|
+
|},
|
|
57
|
+
};
|
|
@@ -19,13 +19,21 @@ describe("normalizeResponsiveProp", () => {
|
|
|
19
19
|
|
|
20
20
|
it("should handle arrays with 4 values", () => {
|
|
21
21
|
expect(normalizeResponsiveProp([0, 1, 2, 3])).toMatchObject([
|
|
22
|
-
0,
|
|
22
|
+
0,
|
|
23
|
+
1,
|
|
24
|
+
2,
|
|
25
|
+
3,
|
|
26
|
+
3,
|
|
23
27
|
]);
|
|
24
28
|
});
|
|
25
29
|
|
|
26
30
|
it("should handle arrays with 5 values", () => {
|
|
27
31
|
expect(normalizeResponsiveProp([0, 1, 2, 3, 4])).toMatchObject([
|
|
28
|
-
0,
|
|
32
|
+
0,
|
|
33
|
+
1,
|
|
34
|
+
2,
|
|
35
|
+
3,
|
|
36
|
+
4,
|
|
29
37
|
]);
|
|
30
38
|
});
|
|
31
39
|
});
|
package/commonjs/index.js
CHANGED
|
@@ -61,6 +61,8 @@ var _exportNames = {
|
|
|
61
61
|
Menu: true,
|
|
62
62
|
Listbox: true,
|
|
63
63
|
OverflowList: true,
|
|
64
|
+
sproutLightTheme: true,
|
|
65
|
+
sproutDarkTheme: true,
|
|
64
66
|
toast: true,
|
|
65
67
|
MenuButton: true,
|
|
66
68
|
MenuButtonContext: true,
|
|
@@ -70,7 +72,7 @@ var _exportNames = {
|
|
|
70
72
|
DateRangePicker: true,
|
|
71
73
|
VisuallyHidden: true
|
|
72
74
|
};
|
|
73
|
-
exports.visuallyHidden = exports.useTextContent = exports.useSelect = exports.useMultiselect = exports.toast = exports.theme = exports.focusRing = exports.disabled = exports.darkTheme = exports.VisuallyHidden = exports.Tooltip = exports.TokenInput = exports.Token = exports.ToggleHint = exports.ToastContainer = exports.ThemeProvider = exports.Textarea = exports.Text = exports.Tabs = exports.TableRowAccordion = exports.TableHeaderCell = exports.TableCell = exports.Table = exports.Switch = exports.Stack = exports.Skeleton = exports.SingleDatePicker = exports.Select = exports.SegmentedControl = exports.Radio = exports.Popout = exports.OverflowList = exports.Numeral = exports.Modal = exports.Message = exports.MenuItemContainer = exports.MenuButtonContext = exports.MenuButton = exports.Menu = exports.LoaderButton = exports.Loader = exports.ListboxButton = exports.Listbox = exports.Link = exports.Label = exports.KeyboardKey = exports.Input = exports.Indicator = exports.Image = exports.Icon = exports.FormField = exports.Fieldset = exports.EmptyState = exports.Drawer = exports.DateRangePicker = exports.Collapsible = exports.Checkbox = exports.ChartLegend = exports.CharacterCounter = exports.Card = exports.Button = exports.Breadcrumb = exports.Box = exports.Banner = exports.Badge = exports.Avatar = exports.Alert = void 0;
|
|
75
|
+
exports.visuallyHidden = exports.useTextContent = exports.useSelect = exports.useMultiselect = exports.toast = exports.theme = exports.sproutLightTheme = exports.sproutDarkTheme = exports.focusRing = exports.disabled = exports.darkTheme = exports.VisuallyHidden = exports.Tooltip = exports.TokenInput = exports.Token = exports.ToggleHint = exports.ToastContainer = exports.ThemeProvider = exports.Textarea = exports.Text = exports.Tabs = exports.TableRowAccordion = exports.TableHeaderCell = exports.TableCell = exports.Table = exports.Switch = exports.Stack = exports.Skeleton = exports.SingleDatePicker = exports.Select = exports.SegmentedControl = exports.Radio = exports.Popout = exports.OverflowList = exports.Numeral = exports.Modal = exports.Message = exports.MenuItemContainer = exports.MenuButtonContext = exports.MenuButton = exports.Menu = exports.LoaderButton = exports.Loader = exports.ListboxButton = exports.Listbox = exports.Link = exports.Label = exports.KeyboardKey = exports.Input = exports.Indicator = exports.Image = exports.Icon = exports.FormField = exports.Fieldset = exports.EmptyState = exports.Drawer = exports.DateRangePicker = exports.Collapsible = exports.Checkbox = exports.ChartLegend = exports.CharacterCounter = exports.Card = exports.Button = exports.Breadcrumb = exports.Box = exports.Banner = exports.Badge = exports.Avatar = exports.Alert = void 0;
|
|
74
76
|
|
|
75
77
|
var _systemProps = require("./systemProps");
|
|
76
78
|
|
|
@@ -101,6 +103,11 @@ var _theme2 = _interopRequireDefault(require("./themes/dark/theme"));
|
|
|
101
103
|
|
|
102
104
|
exports.darkTheme = _theme2.default;
|
|
103
105
|
|
|
106
|
+
var _sproutTheme = require("./themes/extendedThemes/sproutTheme");
|
|
107
|
+
|
|
108
|
+
exports.sproutLightTheme = _sproutTheme.sproutLightTheme;
|
|
109
|
+
exports.sproutDarkTheme = _sproutTheme.sproutDarkTheme;
|
|
110
|
+
|
|
104
111
|
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
105
112
|
|
|
106
113
|
exports.Icon = _Icon.default;
|
|
@@ -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
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.navigation = exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _theme = _interopRequireDefault(require("../../../dark/theme"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
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); }
|
|
11
|
+
|
|
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
|
+
|
|
42
|
+
var darkTheme = _extends({}, _theme.default, {
|
|
43
|
+
colors: _extends({}, _theme.default.colors, {
|
|
44
|
+
navigation: navigation
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
var _default = darkTheme;
|
|
49
|
+
exports.default = _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.sproutLightTheme = exports.sproutDarkTheme = void 0;
|
|
5
|
+
|
|
6
|
+
var _theme = _interopRequireDefault(require("./light/theme"));
|
|
7
|
+
|
|
8
|
+
exports.sproutLightTheme = _theme.default;
|
|
9
|
+
|
|
10
|
+
var _theme2 = _interopRequireDefault(require("./dark/theme"));
|
|
11
|
+
|
|
12
|
+
exports.sproutDarkTheme = _theme2.default;
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.navigation = exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _theme = _interopRequireDefault(require("../../../light/theme"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
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); }
|
|
11
|
+
|
|
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
|
+
|
|
42
|
+
var lightTheme = _extends({}, _theme.default, {
|
|
43
|
+
colors: _extends({}, _theme.default.colors, {
|
|
44
|
+
navigation: navigation
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
var _default = lightTheme;
|
|
49
|
+
exports.default = _default;
|
package/lib/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
|
|
|
3
3
|
export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
|
|
4
4
|
export { default as theme } from "./themes/light/theme";
|
|
5
5
|
export { default as darkTheme } from "./themes/dark/theme";
|
|
6
|
+
export { sproutLightTheme, sproutDarkTheme } from "./themes/extendedThemes/sproutTheme";
|
|
6
7
|
export { default as Icon } from "./Icon"; // DEPRECATED: Alert has been renamed to Banner
|
|
7
8
|
|
|
8
9
|
export { default as Alert } from "./Banner";
|
package/lib/themes/dark/theme.js
CHANGED
|
@@ -15,9 +15,6 @@ export var shadows = {
|
|
|
15
15
|
}; // If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
|
|
16
16
|
|
|
17
17
|
var colors = _extends({}, lightTheme.colors, {
|
|
18
|
-
utils: {
|
|
19
|
-
interact: interact(MODE)
|
|
20
|
-
},
|
|
21
18
|
app: {
|
|
22
19
|
background: {
|
|
23
20
|
base: COLORS.COLOR_NEUTRAL_1000
|
|
@@ -221,6 +218,9 @@ var colors = _extends({}, lightTheme.colors, {
|
|
|
221
218
|
}, datavizPalette);
|
|
222
219
|
|
|
223
220
|
var darkTheme = _extends({}, lightTheme, {
|
|
221
|
+
utils: {
|
|
222
|
+
interact: interact(MODE)
|
|
223
|
+
},
|
|
224
224
|
colors: colors,
|
|
225
225
|
shadows: shadows,
|
|
226
226
|
mode: MODE
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
import baseDarkTheme from "../../../dark/theme";
|
|
4
|
+
export var navigation = {
|
|
5
|
+
main: {
|
|
6
|
+
background: {
|
|
7
|
+
base: baseDarkTheme.colors.neutral[1000],
|
|
8
|
+
overflowGradient: baseDarkTheme.colors.neutral[1100]
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
secondary: {
|
|
12
|
+
background: {
|
|
13
|
+
base: baseDarkTheme.colors.neutral[900]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
text: {
|
|
17
|
+
base: baseDarkTheme.colors.neutral[0],
|
|
18
|
+
hover: baseDarkTheme.colors.neutral[0]
|
|
19
|
+
},
|
|
20
|
+
icon: {
|
|
21
|
+
base: baseDarkTheme.colors.neutral[0],
|
|
22
|
+
hover: baseDarkTheme.colors.neutral[0]
|
|
23
|
+
},
|
|
24
|
+
listItem: {
|
|
25
|
+
background: {
|
|
26
|
+
base: baseDarkTheme.colors.neutral[1000],
|
|
27
|
+
hover: baseDarkTheme.colors.neutral[1100],
|
|
28
|
+
selected: baseDarkTheme.colors.neutral[700]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var darkTheme = _extends({}, baseDarkTheme, {
|
|
34
|
+
colors: _extends({}, baseDarkTheme.colors, {
|
|
35
|
+
navigation: navigation
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export default darkTheme;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
import baseLightTheme from "../../../light/theme";
|
|
4
|
+
export var navigation = {
|
|
5
|
+
main: {
|
|
6
|
+
background: {
|
|
7
|
+
base: baseLightTheme.colors.neutral[900],
|
|
8
|
+
overflowGradient: baseLightTheme.colors.neutral[1000]
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
secondary: {
|
|
12
|
+
background: {
|
|
13
|
+
base: baseLightTheme.colors.neutral[800]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
text: {
|
|
17
|
+
base: baseLightTheme.colors.neutral[0],
|
|
18
|
+
hover: baseLightTheme.colors.neutral[0]
|
|
19
|
+
},
|
|
20
|
+
icon: {
|
|
21
|
+
base: baseLightTheme.colors.neutral[0],
|
|
22
|
+
hover: baseLightTheme.colors.neutral[0]
|
|
23
|
+
},
|
|
24
|
+
listItem: {
|
|
25
|
+
background: {
|
|
26
|
+
base: baseLightTheme.colors.neutral[800],
|
|
27
|
+
hover: baseLightTheme.colors.neutral[1000],
|
|
28
|
+
selected: baseLightTheme.colors.neutral[700]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var lightTheme = _extends({}, baseLightTheme, {
|
|
34
|
+
colors: _extends({}, baseLightTheme.colors, {
|
|
35
|
+
navigation: navigation
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export default lightTheme;
|
package/lib/types/theme.flow.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import { breakpoints, typography, fontWeights, radii, borders, borderWidths, shadows, space, easing, duration } from "../themes/light/theme";
|
|
1
|
+
import { breakpoints, typography, fontWeights, radii, borders, borderWidths, shadows, space, easing, duration } from "../themes/light/theme";
|
|
2
|
+
import { navigation } from "../themes/extendedThemes/sproutTheme/light/theme";
|