@sproutsocial/racine 7.6.0 → 8.0.0-beta-dark-mode.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/__flow__/Badge/styles.js +3 -1
- package/__flow__/Banner/index.js +2 -1
- package/__flow__/Banner/styles.js +9 -6
- package/__flow__/Box/index.stories.js +3 -3
- package/__flow__/Box/styles.js +4 -4
- package/__flow__/Button/__snapshots__/index.test.js.snap +4 -4
- package/__flow__/Button/index.js +7 -2
- package/__flow__/Button/index.stories.js +6 -1
- package/__flow__/Button/styles.js +17 -12
- package/__flow__/Card/index.js +2 -2
- package/__flow__/CharacterCounter/styles.js +1 -1
- package/__flow__/Checkbox/styles.js +18 -16
- package/__flow__/Collapsible/index.stories.js +11 -5
- package/__flow__/DatePicker/styles.js +14 -12
- package/__flow__/Drawer/styles.js +1 -1
- package/__flow__/FormField/index.js +1 -1
- package/__flow__/Icon/index.stories.js +24 -6
- package/__flow__/Input/styles.js +6 -6
- package/__flow__/KeyboardKey/styles.js +2 -2
- package/__flow__/Link/styles.js +3 -5
- package/__flow__/Listbox/__snapshots__/index.test.js.snap +8 -2
- package/__flow__/Listbox/index.js +4 -4
- package/__flow__/Menu/__snapshots__/index.test.js.snap +5 -2
- package/__flow__/Menu/index.js +7 -2
- package/__flow__/Menu/styles.js +6 -3
- package/__flow__/Message/index.js +2 -2
- package/__flow__/Message/index.stories.js +1 -1
- package/__flow__/Modal/index.js +1 -1
- package/__flow__/Modal/index.stories.js +14 -8
- package/__flow__/Modal/styles.js +2 -2
- package/__flow__/Numeral/styles.js +2 -1
- package/__flow__/OverflowList/index.stories.js +15 -8
- package/__flow__/Popout/index.js +3 -3
- package/__flow__/Radio/styles.js +8 -8
- package/__flow__/SegmentedControl/styles.js +9 -5
- package/__flow__/Select/styles.js +5 -5
- package/__flow__/Skeleton/index.js +4 -4
- package/__flow__/Skeleton/index.stories.js +1 -1
- package/__flow__/Stack/index.stories.js +3 -1
- package/__flow__/Switch/styles.js +13 -11
- package/__flow__/Table/styles.js +2 -1
- package/__flow__/TableCell/index.stories.js +2 -0
- package/__flow__/TableHeaderCell/index.stories.js +3 -0
- package/__flow__/TableRowAccordion/styles.js +2 -1
- package/__flow__/Tabs/styles.js +5 -5
- package/__flow__/Textarea/styles.js +5 -5
- package/__flow__/ThemeProvider/index.js +2 -2
- package/__flow__/Toast/index.js +1 -1
- package/__flow__/Toast/styles.js +3 -3
- package/__flow__/Token/styles.js +19 -10
- package/__flow__/TokenInput/index.js +2 -1
- package/__flow__/TokenInput/styles.js +14 -6
- package/__flow__/Tooltip/index.js +2 -2
- package/__flow__/index.js +2 -2
- package/__flow__/themes/dark/decorative-palettes.js +43 -0
- package/__flow__/themes/dark/theme.js +195 -0
- package/__flow__/themes/default/decorative-palettes.js +43 -0
- package/__flow__/themes/default/literal-colors.js +160 -0
- package/__flow__/themes/default/theme.js +332 -0
- package/__flow__/types/system-props.flow.js +2 -2
- package/__flow__/types/theme.colors.flow.js +239 -0
- package/__flow__/types/theme.flow.js +38 -213
- package/__flow__/utils/mixins.js +4 -3
- package/__flow__/utils/responsiveProps/index.js +1 -1
- package/commonjs/Badge/styles.js +2 -1
- package/commonjs/Banner/index.js +3 -2
- package/commonjs/Banner/styles.js +1 -1
- package/commonjs/Button/index.js +5 -3
- package/commonjs/Button/styles.js +12 -11
- package/commonjs/Card/index.js +2 -2
- package/commonjs/CharacterCounter/styles.js +1 -1
- package/commonjs/Checkbox/styles.js +7 -7
- package/commonjs/DatePicker/styles.js +13 -11
- package/commonjs/Drawer/styles.js +1 -1
- package/commonjs/FormField/index.js +1 -1
- package/commonjs/Input/styles.js +6 -6
- package/commonjs/KeyboardKey/styles.js +2 -2
- package/commonjs/Link/styles.js +4 -8
- package/commonjs/Listbox/index.js +4 -4
- package/commonjs/Menu/index.js +2 -2
- package/commonjs/Menu/styles.js +10 -4
- package/commonjs/Message/index.js +2 -2
- package/commonjs/Modal/index.js +1 -1
- package/commonjs/Modal/styles.js +2 -2
- package/commonjs/Numeral/styles.js +1 -1
- package/commonjs/Popout/index.js +2 -2
- package/commonjs/Radio/styles.js +4 -4
- package/commonjs/SegmentedControl/styles.js +5 -5
- package/commonjs/Select/styles.js +5 -5
- package/commonjs/Skeleton/index.js +2 -2
- package/commonjs/Switch/styles.js +7 -7
- package/commonjs/Table/styles.js +1 -1
- package/commonjs/TableRowAccordion/styles.js +1 -1
- package/commonjs/Tabs/styles.js +5 -5
- package/commonjs/Textarea/styles.js +5 -5
- package/commonjs/ThemeProvider/index.js +1 -1
- package/commonjs/Toast/index.js +1 -1
- package/commonjs/Toast/styles.js +3 -3
- package/commonjs/Token/styles.js +16 -12
- package/commonjs/TokenInput/index.js +38 -35
- package/commonjs/TokenInput/styles.js +9 -7
- package/commonjs/Tooltip/index.js +2 -2
- package/commonjs/index.js +3 -3
- package/commonjs/themes/dark/decorative-palettes.js +51 -0
- package/commonjs/themes/dark/theme.js +195 -0
- package/commonjs/themes/default/decorative-palettes.js +51 -0
- package/commonjs/themes/default/literal-colors.js +165 -0
- package/commonjs/themes/default/theme.js +333 -0
- package/commonjs/types/theme.colors.flow.js +1 -0
- package/commonjs/types/theme.flow.js +1 -5
- package/commonjs/utils/mixins.js +2 -2
- package/commonjs/utils/responsiveProps/index.js +1 -1
- package/lib/Badge/styles.js +2 -1
- package/lib/Banner/index.js +3 -2
- package/lib/Banner/styles.js +1 -1
- package/lib/Button/index.js +5 -3
- package/lib/Button/styles.js +11 -11
- package/lib/Card/index.js +2 -2
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/Checkbox/styles.js +7 -7
- package/lib/DatePicker/styles.js +12 -11
- package/lib/Drawer/styles.js +1 -1
- package/lib/FormField/index.js +1 -1
- package/lib/Input/styles.js +6 -6
- package/lib/KeyboardKey/styles.js +2 -2
- package/lib/Link/styles.js +4 -8
- package/lib/Listbox/index.js +4 -4
- package/lib/Menu/index.js +2 -2
- package/lib/Menu/styles.js +10 -4
- package/lib/Message/index.js +2 -2
- package/lib/Modal/index.js +1 -1
- package/lib/Modal/styles.js +2 -2
- package/lib/Numeral/styles.js +1 -1
- package/lib/Popout/index.js +2 -2
- package/lib/Radio/styles.js +4 -4
- package/lib/SegmentedControl/styles.js +5 -5
- package/lib/Select/styles.js +5 -5
- package/lib/Skeleton/index.js +2 -2
- package/lib/Switch/styles.js +7 -7
- package/lib/Table/styles.js +1 -1
- package/lib/TableRowAccordion/styles.js +1 -1
- package/lib/Tabs/styles.js +5 -5
- package/lib/Textarea/styles.js +5 -5
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/Toast/index.js +1 -1
- package/lib/Toast/styles.js +3 -3
- package/lib/Token/styles.js +16 -12
- package/lib/TokenInput/index.js +38 -35
- package/lib/TokenInput/styles.js +9 -7
- package/lib/Tooltip/index.js +2 -2
- package/lib/index.js +2 -2
- package/lib/themes/dark/decorative-palettes.js +36 -0
- package/lib/themes/dark/theme.js +185 -0
- package/lib/themes/default/decorative-palettes.js +36 -0
- package/lib/themes/default/literal-colors.js +156 -0
- package/lib/themes/default/theme.js +305 -0
- package/lib/types/theme.colors.flow.js +0 -0
- package/lib/types/theme.flow.js +1 -1
- package/lib/utils/mixins.js +2 -2
- package/lib/utils/responsiveProps/index.js +1 -1
- package/package.json +1 -1
- package/__flow__/themes/dark.js +0 -133
- package/__flow__/themes/light.js +0 -7
- package/__flow__/utils/theme.js +0 -422
- package/commonjs/themes/dark.js +0 -140
- package/commonjs/themes/light.js +0 -14
- package/commonjs/utils/theme.js +0 -421
- package/lib/themes/dark.js +0 -131
- package/lib/themes/light.js +0 -5
- package/lib/utils/theme.js +0 -402
package/__flow__/Badge/styles.js
CHANGED
|
@@ -15,8 +15,10 @@ const colors = {
|
|
|
15
15
|
suggestion: "colors.neutral.900",
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
console.log(themeGet(colors["secondary"]));
|
|
19
|
+
|
|
18
20
|
const backgroundColors = {
|
|
19
|
-
primary: "colors.
|
|
21
|
+
primary: "colors.blue.700",
|
|
20
22
|
secondary: "colors.yellow.500",
|
|
21
23
|
passive: "colors.neutral.200",
|
|
22
24
|
common: "colors.aqua.600",
|
package/__flow__/Banner/index.js
CHANGED
|
@@ -45,7 +45,8 @@ export default class Banner extends React.Component<TypeProps> {
|
|
|
45
45
|
const { type, text, ...rest } = this.props;
|
|
46
46
|
return (
|
|
47
47
|
<Container
|
|
48
|
-
|
|
48
|
+
// danger needs to be properly deprecated and removed DS-1094
|
|
49
|
+
type={type === "danger" ? "error" : type}
|
|
49
50
|
data-qa-alert={""}
|
|
50
51
|
data-qa-alert-type={type}
|
|
51
52
|
data-qa-alert-text={text}
|
|
@@ -15,28 +15,31 @@ const Container: StyledComponent<TypeProps, TypeTheme, *> = styled.div(
|
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
align-items: center;
|
|
17
17
|
justify-content: space-between;
|
|
18
|
-
color: ${props.theme.colors.text.
|
|
18
|
+
color: ${props.theme.colors.text.body};
|
|
19
19
|
border-radius: ${props.theme.radii.outer};
|
|
20
20
|
font-family: ${props.theme.fontFamily};
|
|
21
21
|
${props.theme.typography[200]}
|
|
22
22
|
padding: ${props.theme.space[300]};
|
|
23
|
-
border: 1px solid ${props.theme.colors[props.type]
|
|
24
|
-
background-color: ${props.theme.colors[props.type]
|
|
23
|
+
border: 1px solid ${props.theme.colors.container.border[props.type]};
|
|
24
|
+
background-color: ${props.theme.colors.container.background[props.type]};
|
|
25
25
|
|
|
26
26
|
.Icon {
|
|
27
27
|
align-self: flex-start;
|
|
28
28
|
margin-top: 3px;
|
|
29
29
|
margin-right: ${props.theme.space[400]};
|
|
30
30
|
min-width: 16px;
|
|
31
|
-
color: ${props.theme.colors[props.type]
|
|
31
|
+
color: ${props.theme.colors.icon[props.type]};
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
a,
|
|
35
35
|
button {
|
|
36
36
|
font-weight: ${props.theme.fontWeights.semibold};
|
|
37
|
-
color: ${props.theme.colors.text.
|
|
37
|
+
color: ${props.theme.colors.text.body};
|
|
38
38
|
font-size: inherit;
|
|
39
|
-
|
|
39
|
+
&:hover {
|
|
40
|
+
color: ${props.theme.colors.text.body};
|
|
41
|
+
text-decoration: underline;
|
|
42
|
+
}
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
> span:not(.Icon) {
|
|
@@ -3,7 +3,7 @@ import { css } from "styled-components";
|
|
|
3
3
|
import { text } from "@storybook/addon-knobs";
|
|
4
4
|
import Box from "./index";
|
|
5
5
|
import useMeasure from "use-measure";
|
|
6
|
-
import theme from "../
|
|
6
|
+
import theme from "../themes/default/theme";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
title: "Box",
|
|
@@ -67,7 +67,7 @@ export const Responsive = () => {
|
|
|
67
67
|
top: 0;
|
|
68
68
|
bottom: 0;
|
|
69
69
|
width: 324px;
|
|
70
|
-
background: ${(p) => p.theme.colors.background.
|
|
70
|
+
background: ${(p) => p.theme.colors.container.background.base};
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
&:after {
|
|
@@ -78,7 +78,7 @@ export const Responsive = () => {
|
|
|
78
78
|
bottom: 0;
|
|
79
79
|
width: 64px;
|
|
80
80
|
background: white;
|
|
81
|
-
border: 1px solid ${(p) => p.theme.colors.border};
|
|
81
|
+
border: 1px solid ${(p) => p.theme.colors.container.border.base};
|
|
82
82
|
}
|
|
83
83
|
`}
|
|
84
84
|
>
|
package/__flow__/Box/styles.js
CHANGED
|
@@ -23,7 +23,7 @@ exports[`Racine Button should render in active state 1`] = `
|
|
|
23
23
|
padding: 8px;
|
|
24
24
|
font-size: 13px;
|
|
25
25
|
color: #FFFFFF !important;
|
|
26
|
-
background: #
|
|
26
|
+
background: #273333 !important;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.c0:visited {
|
|
@@ -40,7 +40,7 @@ exports[`Racine Button should render in active state 1`] = `
|
|
|
40
40
|
|
|
41
41
|
.c0:active {
|
|
42
42
|
color: #FFFFFF;
|
|
43
|
-
background: #
|
|
43
|
+
background: #273333;
|
|
44
44
|
-webkit-transform: translateY(1px);
|
|
45
45
|
-ms-transform: translateY(1px);
|
|
46
46
|
transform: translateY(1px);
|
|
@@ -257,7 +257,7 @@ exports[`Racine Button should render in large size 1`] = `
|
|
|
257
257
|
|
|
258
258
|
.c0:active {
|
|
259
259
|
color: #FFFFFF;
|
|
260
|
-
background: #
|
|
260
|
+
background: #273333;
|
|
261
261
|
-webkit-transform: translateY(1px);
|
|
262
262
|
-ms-transform: translateY(1px);
|
|
263
263
|
transform: translateY(1px);
|
|
@@ -475,7 +475,7 @@ exports[`Racine Button should render in secondary style 1`] = `
|
|
|
475
475
|
|
|
476
476
|
.c0:active {
|
|
477
477
|
color: #FFFFFF;
|
|
478
|
-
background: #
|
|
478
|
+
background: #273333;
|
|
479
479
|
-webkit-transform: translateY(1px);
|
|
480
480
|
-ms-transform: translateY(1px);
|
|
481
481
|
transform: translateY(1px);
|
package/__flow__/Button/index.js
CHANGED
|
@@ -6,12 +6,14 @@ export type TypeProps = {
|
|
|
6
6
|
/** If the button is being used as an anchor, this prop will cause the link to open in a new tab. */
|
|
7
7
|
external?: boolean,
|
|
8
8
|
size?: "large" | "default",
|
|
9
|
+
/** What the button looks like. "default" is deprecated in favor of "unstyled" */
|
|
9
10
|
appearance?:
|
|
10
11
|
| "primary"
|
|
11
12
|
| "secondary"
|
|
12
13
|
| "pill"
|
|
13
14
|
| "destructive"
|
|
14
15
|
| "default"
|
|
16
|
+
| "unstyled"
|
|
15
17
|
| "placeholder",
|
|
16
18
|
/** Set the button to display in its active state */
|
|
17
19
|
active?: boolean,
|
|
@@ -33,7 +35,7 @@ export type TypeProps = {
|
|
|
33
35
|
|
|
34
36
|
const Button = ({
|
|
35
37
|
href,
|
|
36
|
-
appearance = "
|
|
38
|
+
appearance = "unstyled",
|
|
37
39
|
active = false,
|
|
38
40
|
disabled,
|
|
39
41
|
external,
|
|
@@ -53,6 +55,9 @@ const Button = ({
|
|
|
53
55
|
);
|
|
54
56
|
}
|
|
55
57
|
|
|
58
|
+
// plans to properly deprecate captured in DS-1096
|
|
59
|
+
const appearanceCheck = appearance === "default" ? "unstyled" : appearance;
|
|
60
|
+
|
|
56
61
|
return (
|
|
57
62
|
<Container
|
|
58
63
|
title={title}
|
|
@@ -65,7 +70,7 @@ const Button = ({
|
|
|
65
70
|
aria-disabled={disabled ? disabled : undefined}
|
|
66
71
|
disabled={disabled}
|
|
67
72
|
buttonSize={size}
|
|
68
|
-
appearance={
|
|
73
|
+
appearance={appearanceCheck}
|
|
69
74
|
ref={innerRef}
|
|
70
75
|
onClick={onClick}
|
|
71
76
|
data-qa-button={title || ""}
|
|
@@ -9,7 +9,12 @@ export default {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export const defaultStory = () => (
|
|
12
|
-
<Button
|
|
12
|
+
<Button
|
|
13
|
+
appearance={text("appearance", "default")}
|
|
14
|
+
onClick={() => alert("Testing...")}
|
|
15
|
+
>
|
|
16
|
+
Default
|
|
17
|
+
</Button>
|
|
13
18
|
);
|
|
14
19
|
|
|
15
20
|
defaultStory.story = {
|
|
@@ -12,12 +12,13 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
|
|
|
12
12
|
text-align: center;
|
|
13
13
|
font-family: ${(props) => props.theme.fontFamily};
|
|
14
14
|
border: 1px solid
|
|
15
|
-
${(props) => props.theme.colors.
|
|
15
|
+
${(props) => props.theme.colors.button[props.appearance].border.base};
|
|
16
16
|
border-radius: ${(props) => props.theme.radii[500]};
|
|
17
17
|
border-style: ${(props) =>
|
|
18
18
|
props.appearance === "placeholder" ? "dashed" : "solid"};
|
|
19
|
-
background: ${(props) =>
|
|
20
|
-
|
|
19
|
+
background: ${(props) =>
|
|
20
|
+
props.theme.colors.button[props.appearance].background.base};
|
|
21
|
+
color: ${(props) => props.theme.colors.button[props.appearance].text.base};
|
|
21
22
|
cursor: pointer;
|
|
22
23
|
text-decoration: none;
|
|
23
24
|
/**
|
|
@@ -41,22 +42,22 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
|
|
|
41
42
|
: props.theme.typography[300].fontSize};
|
|
42
43
|
|
|
43
44
|
&:visited {
|
|
44
|
-
color: ${(props) => props.theme.colors.
|
|
45
|
+
color: ${(props) => props.theme.colors.button[props.appearance].text.base};
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
&:hover {
|
|
48
|
-
color: ${(props) => props.theme.colors.
|
|
49
|
+
color: ${(props) => props.theme.colors.button[props.appearance].text.hover};
|
|
49
50
|
background: ${(props) =>
|
|
50
|
-
props.theme.colors.
|
|
51
|
+
props.theme.colors.button[props.appearance].background.hover};
|
|
51
52
|
text-decoration: none;
|
|
52
53
|
box-shadow: ${(props) =>
|
|
53
54
|
props.appearance === "placeholder" ? props.theme.shadows[100] : "none"};
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
&:active {
|
|
57
|
-
color: ${(props) => props.theme.colors.
|
|
58
|
+
color: ${(props) => props.theme.colors.button[props.appearance].text.hover};
|
|
58
59
|
background: ${(props) =>
|
|
59
|
-
props.theme.colors.
|
|
60
|
+
props.theme.colors.button[props.appearance].background.active};
|
|
60
61
|
transform: translateY(1px);
|
|
61
62
|
}
|
|
62
63
|
|
|
@@ -71,9 +72,10 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
|
|
|
71
72
|
${(props) =>
|
|
72
73
|
props.active &&
|
|
73
74
|
css`
|
|
74
|
-
color: ${props.theme.colors.
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
color: ${props.theme.colors.button[props.appearance].text
|
|
76
|
+
.hover} !important;
|
|
77
|
+
background: ${props.theme.colors.button[props.appearance].background
|
|
78
|
+
.active} !important;
|
|
77
79
|
`}
|
|
78
80
|
|
|
79
81
|
${(props) => props.disabled && disabled}
|
|
@@ -84,7 +86,8 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
|
|
|
84
86
|
display: inline-flex;
|
|
85
87
|
align-items: center;
|
|
86
88
|
justify-content: center;
|
|
87
|
-
|
|
89
|
+
/* This solution is temporary. DS-1095 */
|
|
90
|
+
mix-blend-mode: ${props.theme.mode ? "screen" : "multiply"};
|
|
88
91
|
|
|
89
92
|
${pill}
|
|
90
93
|
`}
|
|
@@ -98,3 +101,5 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.button`
|
|
|
98
101
|
`;
|
|
99
102
|
|
|
100
103
|
export default Container;
|
|
104
|
+
|
|
105
|
+
//${props.theme.mode === "dark" ? "screen" : "multiply"}
|
package/__flow__/Card/index.js
CHANGED
|
@@ -26,9 +26,9 @@ const Card = ({
|
|
|
26
26
|
ariaLabel,
|
|
27
27
|
buttonProps = {},
|
|
28
28
|
border = 500,
|
|
29
|
-
borderColor = "border",
|
|
29
|
+
borderColor = "container.border.base",
|
|
30
30
|
color = "text.body",
|
|
31
|
-
bg = "background.
|
|
31
|
+
bg = "container.background.base",
|
|
32
32
|
...rest
|
|
33
33
|
}: TypeProps) => {
|
|
34
34
|
return (
|
|
@@ -12,7 +12,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
12
12
|
font-variant-numeric: tabular-nums;
|
|
13
13
|
color: ${(props) =>
|
|
14
14
|
props.overlimit
|
|
15
|
-
? props.theme.colors.error
|
|
15
|
+
? props.theme.colors.text.error
|
|
16
16
|
: props.theme.colors.text.subtext};
|
|
17
17
|
|
|
18
18
|
${(p) =>
|
|
@@ -34,11 +34,12 @@ export const InputWrapper = styled<typeof Box, TypeTheme, any>(Box)`
|
|
|
34
34
|
background-color: transparent;
|
|
35
35
|
transition: all ${(props) => props.theme.duration.fast}
|
|
36
36
|
${(props) => props.theme.easing.ease_inout};
|
|
37
|
-
|
|
37
|
+
/* This solution is temporary. DS-1095 */
|
|
38
|
+
mix-blend-mode: ${props.theme.mode ? "screen" : "multiply"};
|
|
38
39
|
${pill}
|
|
39
40
|
|
|
40
41
|
&:hover {
|
|
41
|
-
background-color: ${props.theme.colors.background.
|
|
42
|
+
background-color: ${props.theme.colors.app.background.base};
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
${PillInput} {
|
|
@@ -54,9 +55,9 @@ export const CheckboxBox: StyledComponent<{ ... }, TypeTheme, *> = styled.div`
|
|
|
54
55
|
position: relative;
|
|
55
56
|
width: ${(props) => props.theme.space[400]};
|
|
56
57
|
height: ${(props) => props.theme.space[400]};
|
|
57
|
-
border: 1px solid ${(props) => props.theme.colors.
|
|
58
|
+
border: 1px solid ${(props) => props.theme.colors.form.border.base};
|
|
58
59
|
border-radius: 4px;
|
|
59
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
60
|
+
background-color: ${(props) => props.theme.colors.form.background.base};
|
|
60
61
|
transition: border-color ${(props) => props.theme.duration.fast}
|
|
61
62
|
${(props) => props.theme.easing.ease_in},
|
|
62
63
|
background-color ${(props) => props.theme.duration.fast}
|
|
@@ -116,7 +117,7 @@ export const PillInput: StyledComponent<any, TypeTheme, *> = styled.input`
|
|
|
116
117
|
&:focus {
|
|
117
118
|
~ ${CheckboxBox} ${CheckIcon} {
|
|
118
119
|
opacity: ${(props) => (props.disabled ? 0 : 1)};
|
|
119
|
-
color: ${props.theme.colors.
|
|
120
|
+
color: ${props.theme.colors.form.border.base};
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
`}
|
|
@@ -125,8 +126,8 @@ export const PillInput: StyledComponent<any, TypeTheme, *> = styled.input`
|
|
|
125
126
|
props.checked &&
|
|
126
127
|
css`
|
|
127
128
|
~ ${CheckboxBox} {
|
|
128
|
-
border-color: ${props.theme.colors.
|
|
129
|
-
background-color: ${props.theme.colors.
|
|
129
|
+
border-color: ${props.theme.colors.form.border.selected};
|
|
130
|
+
background-color: ${props.theme.colors.form.background.selected};
|
|
130
131
|
}
|
|
131
132
|
~ ${CheckboxBox} ${CheckIcon} {
|
|
132
133
|
opacity: 1;
|
|
@@ -195,8 +196,8 @@ export const CheckboxContainer: StyledComponent<any, TypeTheme, *> = styled.span
|
|
|
195
196
|
props.indeterminate ? "indeterminate" : "check",
|
|
196
197
|
|
|
197
198
|
props.checked
|
|
198
|
-
? props.theme.colors.background.
|
|
199
|
-
: props.theme.colors.
|
|
199
|
+
? props.theme.colors.form.background.base
|
|
200
|
+
: props.theme.colors.form.border.base
|
|
200
201
|
)}");
|
|
201
202
|
opacity: ${props.checked ? 1 : 0};
|
|
202
203
|
position: absolute;
|
|
@@ -227,9 +228,9 @@ export const CheckboxContainer: StyledComponent<any, TypeTheme, *> = styled.span
|
|
|
227
228
|
padding: 0;
|
|
228
229
|
width: ${props.theme.space[400]};
|
|
229
230
|
height: ${props.theme.space[400]};
|
|
230
|
-
border: 1px solid ${props.theme.colors.
|
|
231
|
+
border: 1px solid ${props.theme.colors.form.border.base};
|
|
231
232
|
border-radius: 4px;
|
|
232
|
-
background-color: ${props.theme.colors.background.
|
|
233
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
233
234
|
transition: all ${props.theme.duration.fast}
|
|
234
235
|
${props.theme.easing.ease_in};
|
|
235
236
|
cursor: ${props.disabled ? "not-allowed" : "pointer"};
|
|
@@ -240,20 +241,21 @@ export const CheckboxContainer: StyledComponent<any, TypeTheme, *> = styled.span
|
|
|
240
241
|
css`
|
|
241
242
|
border-color: ${props.theme.colors
|
|
242
243
|
.neutral[300]} !important; /* We don't want the focus ring to remove the border */
|
|
243
|
-
background-color: ${props.theme.colors.background.
|
|
244
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
244
245
|
`}
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
&:checked {
|
|
248
|
-
border-color: ${props.theme.colors.
|
|
249
|
-
background-color: ${props.theme.colors.
|
|
249
|
+
border-color: ${props.theme.colors.form.border.selected};
|
|
250
|
+
background-color: ${props.theme.colors.form.background.selected};
|
|
250
251
|
}
|
|
251
252
|
|
|
252
253
|
${props.indeterminate &&
|
|
253
254
|
props.checked &&
|
|
254
255
|
css`
|
|
255
|
-
border-color: ${props.theme.colors.
|
|
256
|
-
background-color: ${props.theme.colors.
|
|
256
|
+
border-color: ${props.theme.colors.form.border.selected} !important;
|
|
257
|
+
background-color: ${props.theme.colors.form.background
|
|
258
|
+
.selected} !important;
|
|
257
259
|
`}
|
|
258
260
|
|
|
259
261
|
&:focus {
|
|
@@ -26,7 +26,7 @@ export default {
|
|
|
26
26
|
|
|
27
27
|
export const defaultStory = () => (
|
|
28
28
|
<StatefulCollapse>
|
|
29
|
-
<Box width="100%" height="200px" bg="
|
|
29
|
+
<Box width="100%" height="200px" bg="container.background.base" p={400}>
|
|
30
30
|
<Button appearance="secondary">A button</Button>
|
|
31
31
|
</Box>
|
|
32
32
|
</StatefulCollapse>
|
|
@@ -38,7 +38,7 @@ defaultStory.story = {
|
|
|
38
38
|
|
|
39
39
|
export const initialIsOpen = () => (
|
|
40
40
|
<StatefulCollapse initialIsOpen>
|
|
41
|
-
<Box width="100%" height="200px" bg="
|
|
41
|
+
<Box width="100%" height="200px" bg="container.background.base" p={400}>
|
|
42
42
|
<Button appearance="secondary">A button</Button>
|
|
43
43
|
</Box>
|
|
44
44
|
</StatefulCollapse>
|
|
@@ -50,7 +50,13 @@ initialIsOpen.story = {
|
|
|
50
50
|
|
|
51
51
|
export const withOffset = () => (
|
|
52
52
|
<StatefulCollapse offset={100}>
|
|
53
|
-
<Box
|
|
53
|
+
<Box
|
|
54
|
+
width="100%"
|
|
55
|
+
height="200px"
|
|
56
|
+
bg="container.background.base"
|
|
57
|
+
p={400}
|
|
58
|
+
mt="100px"
|
|
59
|
+
>
|
|
54
60
|
<Button appearance="secondary">A button</Button>
|
|
55
61
|
</Box>
|
|
56
62
|
</StatefulCollapse>
|
|
@@ -62,7 +68,7 @@ withOffset.story = {
|
|
|
62
68
|
|
|
63
69
|
export const withShortContent = () => (
|
|
64
70
|
<StatefulCollapse>
|
|
65
|
-
<Box width="15%" height="50px" bg="
|
|
71
|
+
<Box width="15%" height="50px" bg="container.background.base" p={400}>
|
|
66
72
|
Hello.
|
|
67
73
|
</Box>
|
|
68
74
|
</StatefulCollapse>
|
|
@@ -74,7 +80,7 @@ withShortContent.story = {
|
|
|
74
80
|
|
|
75
81
|
export const withTallContent = () => (
|
|
76
82
|
<StatefulCollapse>
|
|
77
|
-
<Box width="15%" height="200vh" bg="
|
|
83
|
+
<Box width="15%" height="200vh" bg="container.background.base" p={400}>
|
|
78
84
|
Hello.
|
|
79
85
|
</Box>
|
|
80
86
|
</StatefulCollapse>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import styled, { createGlobalStyle, css } from "styled-components";
|
|
3
3
|
import moment from "moment";
|
|
4
4
|
import Box from "../Box";
|
|
5
|
+
import { disabled } from "../utils/mixins";
|
|
5
6
|
import type { TypeTheme } from "../types/theme.flow";
|
|
6
7
|
|
|
7
8
|
/*
|
|
@@ -61,8 +62,8 @@ export const CalendarDay = styled<typeof Box, TypeTheme, *>(Box)`
|
|
|
61
62
|
${({ modifiers, day, theme }) => {
|
|
62
63
|
if (isSelected(modifiers)) {
|
|
63
64
|
return css`
|
|
64
|
-
background-color: ${theme.colors.
|
|
65
|
-
color: ${theme.colors.
|
|
65
|
+
background-color: ${theme.colors.container.background.selected};
|
|
66
|
+
color: ${theme.colors.text.inverse};
|
|
66
67
|
margin-left: ${shouldHaveLeftPill(modifiers, day) && theme.space[200]};
|
|
67
68
|
margin-right: ${shouldHaveRightPill(modifiers, day) &&
|
|
68
69
|
theme.space[200]};
|
|
@@ -81,11 +82,12 @@ export const CalendarDay = styled<typeof Box, TypeTheme, *>(Box)`
|
|
|
81
82
|
return css`
|
|
82
83
|
margin: 0 ${theme.space[200]};
|
|
83
84
|
border-radius: ${theme.radii.pill};
|
|
84
|
-
border: 1px solid ${theme.colors.
|
|
85
|
+
border: 1px solid ${theme.colors.container.border.selected};
|
|
85
86
|
`;
|
|
86
87
|
} else if (isOutOfRange(modifiers)) {
|
|
87
88
|
return css`
|
|
88
|
-
color: ${theme.colors.
|
|
89
|
+
color: ${theme.colors.text.subtext};
|
|
90
|
+
${disabled};
|
|
89
91
|
`;
|
|
90
92
|
}
|
|
91
93
|
}};
|
|
@@ -107,7 +109,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
|
|
|
107
109
|
|
|
108
110
|
&_weekHeader {
|
|
109
111
|
color: ${({ theme }) => theme.colors.text.headline};
|
|
110
|
-
border-bottom: 1px solid ${({ theme }) => theme.colors.border};
|
|
112
|
+
border-bottom: 1px solid ${({ theme }) => theme.colors.container.border.base};
|
|
111
113
|
|
|
112
114
|
/* Magic number to match position of .CalendarMonth_caption */
|
|
113
115
|
top: 26px;
|
|
@@ -134,7 +136,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
|
|
|
134
136
|
|
|
135
137
|
&__horizontal {
|
|
136
138
|
box-shadow: none;
|
|
137
|
-
background: ${({ theme }) => theme.colors.background.
|
|
139
|
+
background: ${({ theme }) => theme.colors.container.background.base};
|
|
138
140
|
}
|
|
139
141
|
}
|
|
140
142
|
|
|
@@ -157,7 +159,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
|
|
|
157
159
|
|
|
158
160
|
.CalendarMonth {
|
|
159
161
|
${({ theme }) => theme.typography[200]}
|
|
160
|
-
background: ${({ theme }) => theme.colors.background.
|
|
162
|
+
background: ${({ theme }) => theme.colors.container.background.base};
|
|
161
163
|
|
|
162
164
|
/* spacing between visible months and months off canvas */
|
|
163
165
|
padding: 0 15px;
|
|
@@ -166,7 +168,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
|
|
|
166
168
|
${({ theme }) => theme.typography[200]}
|
|
167
169
|
color: ${({ theme }) => theme.colors.text.headline};
|
|
168
170
|
padding-top: 0;
|
|
169
|
-
background: ${({ theme }) => theme.colors.background.
|
|
171
|
+
background: ${({ theme }) => theme.colors.container.background.base};
|
|
170
172
|
|
|
171
173
|
strong {
|
|
172
174
|
font-weight: ${({ theme }) => theme.fontWeights.semibold};
|
|
@@ -186,19 +188,19 @@ export const ReactDatesCssOverrides = createGlobalStyle`
|
|
|
186
188
|
}
|
|
187
189
|
|
|
188
190
|
.CalendarMonthGrid {
|
|
189
|
-
background: ${({ theme }) => theme.colors.background.
|
|
191
|
+
background: ${({ theme }) => theme.colors.container.background.base};
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
/* Left and Right Arrow Buttons to navigate months */
|
|
193
195
|
.DayPickerNavigation_button__horizontal {
|
|
194
|
-
color: ${({ theme }) => theme.colors.
|
|
196
|
+
color: ${({ theme }) => theme.colors.button.pill.text.base};
|
|
195
197
|
top: -4px;
|
|
196
198
|
padding: 7px 8px;
|
|
197
199
|
position: absolute;
|
|
198
200
|
line-height: 0.78;
|
|
199
201
|
border-radius: 9999px;
|
|
200
202
|
border: none;
|
|
201
|
-
background: ${({ theme }) => theme.colors.
|
|
203
|
+
background: ${({ theme }) => theme.colors.button.pill.background.base};
|
|
202
204
|
|
|
203
205
|
&:nth-child(1) {
|
|
204
206
|
left: 22px;
|
|
@@ -208,7 +210,7 @@ export const ReactDatesCssOverrides = createGlobalStyle`
|
|
|
208
210
|
}
|
|
209
211
|
|
|
210
212
|
&:hover {
|
|
211
|
-
background: ${({ theme }) => theme.colors.
|
|
213
|
+
background: ${({ theme }) => theme.colors.button.pill.background.hover};
|
|
212
214
|
}
|
|
213
215
|
}
|
|
214
216
|
`;
|
|
@@ -16,7 +16,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
16
16
|
top: 0;
|
|
17
17
|
height: 100%;
|
|
18
18
|
width: ${(props) => props.width}px;
|
|
19
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
19
|
+
background-color: ${(props) => props.theme.colors.container.background.base};
|
|
20
20
|
box-shadow: ${(props) => props.theme.shadows[400]};
|
|
21
21
|
filter: blur(0);
|
|
22
22
|
|
|
@@ -11,21 +11,31 @@ export default {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const mini12X12 = () => (
|
|
14
|
-
<Icon
|
|
14
|
+
<Icon
|
|
15
|
+
color="icon.base"
|
|
16
|
+
name={text("name", "dashboard")}
|
|
17
|
+
size={text("size", "mini")}
|
|
18
|
+
/>
|
|
15
19
|
);
|
|
16
20
|
|
|
17
21
|
mini12X12.story = {
|
|
18
22
|
name: "Mini (12 x 12)",
|
|
19
23
|
};
|
|
20
24
|
|
|
21
|
-
export const default16X16 = () =>
|
|
25
|
+
export const default16X16 = () => (
|
|
26
|
+
<Icon color="icon.base" name={text("name", "dashboard")} />
|
|
27
|
+
);
|
|
22
28
|
|
|
23
29
|
default16X16.story = {
|
|
24
30
|
name: "Default (16 x 16)",
|
|
25
31
|
};
|
|
26
32
|
|
|
27
33
|
export const medium24X24 = () => (
|
|
28
|
-
<Icon
|
|
34
|
+
<Icon
|
|
35
|
+
color="icon.base"
|
|
36
|
+
name={text("name", "dashboard")}
|
|
37
|
+
size={text("size", "medium")}
|
|
38
|
+
/>
|
|
29
39
|
);
|
|
30
40
|
|
|
31
41
|
medium24X24.story = {
|
|
@@ -33,7 +43,11 @@ medium24X24.story = {
|
|
|
33
43
|
};
|
|
34
44
|
|
|
35
45
|
export const large32X32 = () => (
|
|
36
|
-
<Icon
|
|
46
|
+
<Icon
|
|
47
|
+
color="icon.base"
|
|
48
|
+
name={text("name", "dashboard")}
|
|
49
|
+
size={text("size", "large")}
|
|
50
|
+
/>
|
|
37
51
|
);
|
|
38
52
|
|
|
39
53
|
large32X32.story = {
|
|
@@ -41,7 +55,11 @@ large32X32.story = {
|
|
|
41
55
|
};
|
|
42
56
|
|
|
43
57
|
export const jumbo64X64 = () => (
|
|
44
|
-
<Icon
|
|
58
|
+
<Icon
|
|
59
|
+
color="icon.base"
|
|
60
|
+
name={text("name", "dashboard")}
|
|
61
|
+
size={text("size", "jumbo")}
|
|
62
|
+
/>
|
|
45
63
|
);
|
|
46
64
|
|
|
47
65
|
jumbo64X64.story = {
|
|
@@ -49,7 +67,7 @@ jumbo64X64.story = {
|
|
|
49
67
|
};
|
|
50
68
|
|
|
51
69
|
export const defaultFixedWidth = () => (
|
|
52
|
-
<Icon name={text("name", "dashboard")} fixedWidth />
|
|
70
|
+
<Icon color="icon.success" name={text("name", "dashboard")} fixedWidth />
|
|
53
71
|
);
|
|
54
72
|
|
|
55
73
|
defaultFixedWidth.story = {
|