@sproutsocial/racine 7.5.0 → 8.0.0-beta-dark-mode.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__/Badge/styles.js +1 -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 -8
- 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 +334 -0
- package/__flow__/types/system-props.flow.js +2 -2
- package/__flow__/types/theme.colors.flow.js +244 -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 +1 -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 +18 -10
- 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 +5 -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 +1 -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 +18 -10
- 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 +1 -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__/Input/styles.js
CHANGED
|
@@ -14,7 +14,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
14
14
|
width: 100%;
|
|
15
15
|
border: 1px solid transparent;
|
|
16
16
|
border-radius: ${(props) => props.theme.radii[500]};
|
|
17
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
17
|
+
background-color: ${(props) => props.theme.colors.form.background.base};
|
|
18
18
|
color: ${(props) => props.theme.colors.text.body};
|
|
19
19
|
outline: none;
|
|
20
20
|
transition: border-color ${(props) => props.theme.duration.fast}
|
|
@@ -70,7 +70,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&:placeholder {
|
|
73
|
-
color: ${(props) => props.theme.colors.
|
|
73
|
+
color: ${(props) => props.theme.colors.form.placeholder.base};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
${(props) =>
|
|
@@ -100,7 +100,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
100
100
|
props.appearance === "primary" &&
|
|
101
101
|
css`
|
|
102
102
|
input {
|
|
103
|
-
border: 1px solid ${(props) => props.theme.colors.
|
|
103
|
+
border: 1px solid ${(props) => props.theme.colors.form.border.base};
|
|
104
104
|
}
|
|
105
105
|
`}
|
|
106
106
|
|
|
@@ -108,7 +108,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
108
108
|
props.invalid &&
|
|
109
109
|
css`
|
|
110
110
|
input {
|
|
111
|
-
border-color: ${(props) => props.theme.colors.error
|
|
111
|
+
border-color: ${(props) => props.theme.colors.form.border.error};
|
|
112
112
|
}
|
|
113
113
|
`}
|
|
114
114
|
|
|
@@ -116,7 +116,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
116
116
|
props.warning &&
|
|
117
117
|
css`
|
|
118
118
|
input {
|
|
119
|
-
border-color: ${(props) => props.theme.colors.warning
|
|
119
|
+
border-color: ${(props) => props.theme.colors.form.border.warning};
|
|
120
120
|
}
|
|
121
121
|
`}
|
|
122
122
|
|
|
@@ -127,7 +127,7 @@ export const Accessory: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
127
127
|
position: absolute;
|
|
128
128
|
top: 50%;
|
|
129
129
|
transform: translateY(-50%);
|
|
130
|
-
color: ${(props) => props.theme.colors.icon.
|
|
130
|
+
color: ${(props) => props.theme.colors.icon.base};
|
|
131
131
|
display: flex;
|
|
132
132
|
align-items: center;
|
|
133
133
|
|
|
@@ -7,8 +7,8 @@ import type { TypeTheme } from "../types/theme.flow";
|
|
|
7
7
|
const Container: StyledComponent<{ ... }, TypeTheme, *> = styled.div`
|
|
8
8
|
display: inline-flex;
|
|
9
9
|
color: ${(props) => props.theme.colors.text.body};
|
|
10
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
11
|
-
border: 1px solid ${(props) => props.theme.colors.border};
|
|
10
|
+
background-color: ${(props) => props.theme.colors.container.background.base};
|
|
11
|
+
border: 1px solid ${(props) => props.theme.colors.container.border.base};
|
|
12
12
|
border-radius: ${(props) => props.theme.radii[500]};
|
|
13
13
|
box-shadow: ${(props) => props.theme.shadows[100]};
|
|
14
14
|
padding: 0 ${(props) => props.theme.space[200]};
|
package/__flow__/Link/styles.js
CHANGED
|
@@ -9,8 +9,6 @@ import type { TypeTheme } from "../types/theme.flow";
|
|
|
9
9
|
const Container = styled<typeof Text, TypeTheme, any>(Text)`
|
|
10
10
|
border: 0;
|
|
11
11
|
font-family: ${(props) => props.theme.fontFamily};
|
|
12
|
-
transition: all ${(props) => props.theme.duration.fast}
|
|
13
|
-
${(props) => props.theme.easing.ease_inout};
|
|
14
12
|
text-decoration: ${(props) => (props.underline ? "underline" : "none")};
|
|
15
13
|
appearance: none;
|
|
16
14
|
cursor: pointer;
|
|
@@ -21,15 +19,15 @@ const Container = styled<typeof Text, TypeTheme, any>(Text)`
|
|
|
21
19
|
cursor: not-allowed;
|
|
22
20
|
`}
|
|
23
21
|
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
24
|
-
color: ${(props) => props.theme.colors.
|
|
22
|
+
color: ${(props) => props.theme.colors.link.base};
|
|
25
23
|
|
|
26
24
|
&:hover {
|
|
27
|
-
color: ${(props) => props.theme.colors.
|
|
25
|
+
color: ${(props) => props.theme.colors.link.hover};
|
|
28
26
|
text-decoration: underline;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
&:active {
|
|
32
|
-
color: ${(props) => props.theme.colors.
|
|
30
|
+
color: ${(props) => props.theme.colors.link.hover};
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
&:focus {
|
|
@@ -409,6 +409,7 @@ exports[`Listbox AsListbox with checkboxes should match snapshot 1`] = `
|
|
|
409
409
|
|
|
410
410
|
.c6:focus,
|
|
411
411
|
.c6:hover {
|
|
412
|
+
color: #364141;
|
|
412
413
|
background-color: #f3f4f4;
|
|
413
414
|
}
|
|
414
415
|
|
|
@@ -431,11 +432,13 @@ exports[`Listbox AsListbox with checkboxes should match snapshot 1`] = `
|
|
|
431
432
|
outline: 0;
|
|
432
433
|
font-size: 13px;
|
|
433
434
|
line-height: 21.333333333333332px;
|
|
434
|
-
|
|
435
|
+
color: #FFFFFF;
|
|
436
|
+
background-color: #364141;
|
|
435
437
|
}
|
|
436
438
|
|
|
437
439
|
.c4:focus,
|
|
438
440
|
.c4:hover {
|
|
441
|
+
color: #364141;
|
|
439
442
|
background-color: #f3f4f4;
|
|
440
443
|
}
|
|
441
444
|
|
|
@@ -687,6 +690,7 @@ exports[`Listbox AsListbox with filter input should match snapshot 1`] = `
|
|
|
687
690
|
|
|
688
691
|
.c7:focus,
|
|
689
692
|
.c7:hover {
|
|
693
|
+
color: #364141;
|
|
690
694
|
background-color: #f3f4f4;
|
|
691
695
|
}
|
|
692
696
|
|
|
@@ -709,11 +713,13 @@ exports[`Listbox AsListbox with filter input should match snapshot 1`] = `
|
|
|
709
713
|
outline: 0;
|
|
710
714
|
font-size: 13px;
|
|
711
715
|
line-height: 21.333333333333332px;
|
|
712
|
-
|
|
716
|
+
color: #FFFFFF;
|
|
717
|
+
background-color: #364141;
|
|
713
718
|
}
|
|
714
719
|
|
|
715
720
|
.c5:focus,
|
|
716
721
|
.c5:hover {
|
|
722
|
+
color: #364141;
|
|
717
723
|
background-color: #f3f4f4;
|
|
718
724
|
}
|
|
719
725
|
|
|
@@ -33,9 +33,9 @@ export const ListboxButtonContainer = styled<typeof MenuButton, TypeTheme, *>(
|
|
|
33
33
|
)`
|
|
34
34
|
position: relative;
|
|
35
35
|
width: 100%;
|
|
36
|
-
border: 1px solid ${(props) => props.theme.colors.
|
|
36
|
+
border: 1px solid ${(props) => props.theme.colors.form.border.base};
|
|
37
37
|
border-radius: ${(props) => props.theme.radii[500]};
|
|
38
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
38
|
+
background-color: ${(props) => props.theme.colors.form.background.base};
|
|
39
39
|
color: ${(props) => props.theme.colors.text.body};
|
|
40
40
|
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
|
|
41
41
|
outline: none;
|
|
@@ -77,9 +77,9 @@ export const ListboxButtonContainer = styled<typeof MenuButton, TypeTheme, *>(
|
|
|
77
77
|
${(props) =>
|
|
78
78
|
props.invalid &&
|
|
79
79
|
css`
|
|
80
|
-
border-color: ${(props) => props.theme.colors.
|
|
80
|
+
border-color: ${(props) => props.theme.colors.form.border.error};
|
|
81
81
|
${Arrow} {
|
|
82
|
-
color: ${(props) => props.theme.colors.error
|
|
82
|
+
color: ${(props) => props.theme.colors.icon.error};
|
|
83
83
|
}
|
|
84
84
|
`}
|
|
85
85
|
`;
|
|
@@ -43,6 +43,7 @@ exports[`Menu AsMenu should match snapshot 1`] = `
|
|
|
43
43
|
|
|
44
44
|
.c7:focus,
|
|
45
45
|
.c7:hover {
|
|
46
|
+
color: #364141;
|
|
46
47
|
background-color: #f3f4f4;
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -65,11 +66,13 @@ exports[`Menu AsMenu should match snapshot 1`] = `
|
|
|
65
66
|
outline: 0;
|
|
66
67
|
font-size: 13px;
|
|
67
68
|
line-height: 21.333333333333332px;
|
|
68
|
-
|
|
69
|
+
color: #FFFFFF;
|
|
70
|
+
background-color: #364141;
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
.c6:focus,
|
|
72
74
|
.c6:hover {
|
|
75
|
+
color: #364141;
|
|
73
76
|
background-color: #f3f4f4;
|
|
74
77
|
}
|
|
75
78
|
|
|
@@ -310,7 +313,7 @@ html .c3 {
|
|
|
310
313
|
|
|
311
314
|
.c1:active {
|
|
312
315
|
color: #FFFFFF;
|
|
313
|
-
background: #
|
|
316
|
+
background: #273333;
|
|
314
317
|
-webkit-transform: translateY(1px);
|
|
315
318
|
-ms-transform: translateY(1px);
|
|
316
319
|
transform: translateY(1px);
|
package/__flow__/Menu/index.js
CHANGED
|
@@ -273,7 +273,12 @@ export const MenuGroup = ({
|
|
|
273
273
|
}: TypeMenuGroupProps) => (
|
|
274
274
|
<>
|
|
275
275
|
{title && (
|
|
276
|
-
<Box
|
|
276
|
+
<Box
|
|
277
|
+
pl={400}
|
|
278
|
+
borderTop="1px solid"
|
|
279
|
+
borderColor="container.border.base"
|
|
280
|
+
mt="-1px"
|
|
281
|
+
>
|
|
277
282
|
<Text
|
|
278
283
|
forwardedAs={titleAs || "div"}
|
|
279
284
|
fontSize={200}
|
|
@@ -297,7 +302,7 @@ export const MenuDivider = (props: any) => (
|
|
|
297
302
|
as="li"
|
|
298
303
|
role="separator"
|
|
299
304
|
borderTop="1px solid"
|
|
300
|
-
borderColor="border"
|
|
305
|
+
borderColor="container.border.base"
|
|
301
306
|
{...props}
|
|
302
307
|
/>
|
|
303
308
|
);
|
package/__flow__/Menu/styles.js
CHANGED
|
@@ -22,7 +22,7 @@ export const MenuItemContainer = styled<
|
|
|
22
22
|
`};
|
|
23
23
|
width: 100%;
|
|
24
24
|
border-radius: ${(props) => props.theme.radii[500]};
|
|
25
|
-
background-color:
|
|
25
|
+
background-color: ${(props) => props.theme.colors.listItem.background.base};
|
|
26
26
|
border: none;
|
|
27
27
|
text-align: left;
|
|
28
28
|
color: ${(props) => props.theme.colors.text.body};
|
|
@@ -39,7 +39,8 @@ export const MenuItemContainer = styled<
|
|
|
39
39
|
props.active &&
|
|
40
40
|
!props.disabled &&
|
|
41
41
|
css`
|
|
42
|
-
|
|
42
|
+
color: ${(props) => props.theme.colors.text.inverse};
|
|
43
|
+
background-color: ${props.theme.colors.listItem.background.selected};
|
|
43
44
|
`}
|
|
44
45
|
|
|
45
46
|
${(props) =>
|
|
@@ -54,7 +55,9 @@ export const MenuItemContainer = styled<
|
|
|
54
55
|
css`
|
|
55
56
|
&:focus,
|
|
56
57
|
&:hover {
|
|
57
|
-
|
|
58
|
+
color: ${(props) => props.theme.colors.text.body};
|
|
59
|
+
background-color: ${(props) =>
|
|
60
|
+
props.theme.colors.listItem.background.hover};
|
|
58
61
|
}
|
|
59
62
|
`}
|
|
60
63
|
|
|
@@ -47,7 +47,7 @@ export type TypeProps = {
|
|
|
47
47
|
// $FlowIssue Upgrade 0.111.1
|
|
48
48
|
const MessageContext = React.createContext({
|
|
49
49
|
density: MESSAGE_DENSITIES.SMALL,
|
|
50
|
-
borderColor: "border",
|
|
50
|
+
borderColor: "container.border.base",
|
|
51
51
|
bg: "background.container",
|
|
52
52
|
indentContent: true,
|
|
53
53
|
});
|
|
@@ -55,7 +55,7 @@ const MessageContext = React.createContext({
|
|
|
55
55
|
const Message = ({
|
|
56
56
|
children,
|
|
57
57
|
density = MESSAGE_DENSITIES.SMALL,
|
|
58
|
-
borderColor = "border",
|
|
58
|
+
borderColor = "container.border.base",
|
|
59
59
|
bg = "background.container",
|
|
60
60
|
indentContent = true,
|
|
61
61
|
innerRef,
|
package/__flow__/Modal/index.js
CHANGED
|
@@ -74,7 +74,7 @@ type TypeModalFooterProps = {
|
|
|
74
74
|
|
|
75
75
|
const ModalFooter = (props: TypeModalFooterProps) => (
|
|
76
76
|
// $FlowIssue - upgrade v0.112.0
|
|
77
|
-
<Footer borderTop={500} borderColor="border" {...props} />
|
|
77
|
+
<Footer borderTop={500} borderColor="container.border.base" {...props} />
|
|
78
78
|
);
|
|
79
79
|
|
|
80
80
|
ModalFooter.defaultProps = {
|
|
@@ -3,9 +3,9 @@ import Component from "@reach/component-component";
|
|
|
3
3
|
import Modal from "./";
|
|
4
4
|
import Box from "../Box";
|
|
5
5
|
import Button from "../Button";
|
|
6
|
-
import Label from "../Label";
|
|
7
6
|
import Input from "../Input";
|
|
8
7
|
import Text from "../Text";
|
|
8
|
+
import FormField from "../FormField";
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
title: "Modal",
|
|
@@ -335,12 +335,18 @@ export const withForm = () => (
|
|
|
335
335
|
subtitle="Anyone with this link will be able to view its contents."
|
|
336
336
|
/>
|
|
337
337
|
<Modal.Content>
|
|
338
|
-
<
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
338
|
+
<FormField
|
|
339
|
+
label="Label"
|
|
340
|
+
helperText="This is some helpful helper text"
|
|
341
|
+
>
|
|
342
|
+
{(props) => (
|
|
343
|
+
<Input
|
|
344
|
+
placeholder="Type the things..."
|
|
345
|
+
name="title"
|
|
346
|
+
id="title"
|
|
347
|
+
/>
|
|
348
|
+
)}
|
|
349
|
+
</FormField>
|
|
344
350
|
</Modal.Content>
|
|
345
351
|
<Modal.Footer>
|
|
346
352
|
<Box display="flex" justifyContent="flex-end">
|
|
@@ -366,7 +372,7 @@ export const customBackgroundColor = () => (
|
|
|
366
372
|
Open Modal
|
|
367
373
|
</button>
|
|
368
374
|
<Modal
|
|
369
|
-
bg="purple
|
|
375
|
+
bg="container.background.decorative.purple"
|
|
370
376
|
width="500px"
|
|
371
377
|
appElementSelector="#root"
|
|
372
378
|
isOpen={state.isOpen}
|
package/__flow__/Modal/styles.js
CHANGED
|
@@ -82,7 +82,7 @@ export const Container: StyledComponent<any, TypeTheme, *> = styled(ReactModalAd
|
|
|
82
82
|
&__Content {
|
|
83
83
|
display: flex;
|
|
84
84
|
flex-direction: column;
|
|
85
|
-
background: ${(props) => props.theme.colors.background.
|
|
85
|
+
background: ${(props) => props.theme.colors.container.background.base};
|
|
86
86
|
border-radius: ${(props) => props.theme.radii[500]};
|
|
87
87
|
box-shadow: ${(props) => props.theme.shadows[300]};
|
|
88
88
|
filter: blur(0);
|
|
@@ -133,7 +133,7 @@ export const Header = styled<typeof HeaderContainer, TypeTheme, any>(HeaderConta
|
|
|
133
133
|
flex: 0 0 auto;
|
|
134
134
|
border-bottom-width: ${(props) => props.theme.borderWidths[500]};
|
|
135
135
|
border-bottom-color: ${(props) =>
|
|
136
|
-
props.bordered ? props.theme.colors.border : "transparent"};
|
|
136
|
+
props.bordered ? props.theme.colors.container.border.base : "transparent"};
|
|
137
137
|
border-bottom-style: solid;
|
|
138
138
|
`;
|
|
139
139
|
|
|
@@ -10,5 +10,6 @@ export const Container = styled<typeof Text, TypeTheme>(Text)`
|
|
|
10
10
|
|
|
11
11
|
export const AbbrContainer = styled<typeof Text, TypeTheme>(Text)`
|
|
12
12
|
font-variant-numeric: tabular-nums;
|
|
13
|
-
border-bottom: 1px dotted
|
|
13
|
+
border-bottom: 1px dotted
|
|
14
|
+
${(props) => props.theme.colors.container.border.base};
|
|
14
15
|
`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import OverflowList from "./index";
|
|
3
3
|
import Box from "../Box";
|
|
4
|
+
import Text from "../Text";
|
|
4
5
|
import { names } from "../Menu/names";
|
|
5
6
|
|
|
6
7
|
export default {
|
|
@@ -10,7 +11,9 @@ export default {
|
|
|
10
11
|
export const defaultStory = () => (
|
|
11
12
|
<OverflowList height={300} width={200}>
|
|
12
13
|
{names.map((name) => (
|
|
13
|
-
<Box key={name}>
|
|
14
|
+
<Box key={name}>
|
|
15
|
+
<Text color="text.body">{name}</Text>
|
|
16
|
+
</Box>
|
|
14
17
|
))}
|
|
15
18
|
</OverflowList>
|
|
16
19
|
);
|
|
@@ -26,7 +29,11 @@ export const PropGetters = () => {
|
|
|
26
29
|
width={200}
|
|
27
30
|
items={names}
|
|
28
31
|
getItemProps={({ item }) => ({ key: item, item })}
|
|
29
|
-
ItemComponent={({ item }) =>
|
|
32
|
+
ItemComponent={({ item }) => (
|
|
33
|
+
<Box>
|
|
34
|
+
<Text color="text.body">{item}</Text>
|
|
35
|
+
</Box>
|
|
36
|
+
)}
|
|
30
37
|
/>
|
|
31
38
|
);
|
|
32
39
|
};
|
|
@@ -38,23 +45,23 @@ export const FlexBox = () => {
|
|
|
38
45
|
width="100%"
|
|
39
46
|
display="flex"
|
|
40
47
|
border="1px solid"
|
|
41
|
-
borderColor="border"
|
|
48
|
+
borderColor="container.border.base"
|
|
42
49
|
flexDirection="column"
|
|
43
50
|
>
|
|
44
|
-
<Box p={300} borderBottom="1px solid" borderColor="border">
|
|
45
|
-
item 1
|
|
51
|
+
<Box p={300} borderBottom="1px solid" borderColor="container.border.base">
|
|
52
|
+
<Text color="text.body">item 1</Text>
|
|
46
53
|
</Box>
|
|
47
54
|
<Box flex="1">
|
|
48
55
|
<OverflowList height="100%" width="100%" containerProps={{ p: 300 }}>
|
|
49
56
|
{names.map((name) => (
|
|
50
57
|
<Box key={name} py={200}>
|
|
51
|
-
{name}
|
|
58
|
+
<Text color="text.body">{name}</Text>
|
|
52
59
|
</Box>
|
|
53
60
|
))}
|
|
54
61
|
</OverflowList>
|
|
55
62
|
</Box>
|
|
56
|
-
<Box p={300} borderTop="1px solid" borderColor="border">
|
|
57
|
-
item 2
|
|
63
|
+
<Box p={300} borderTop="1px solid" borderColor="container.border.base">
|
|
64
|
+
<Text color="text.body">item 2</Text>
|
|
58
65
|
</Box>
|
|
59
66
|
</Box>
|
|
60
67
|
);
|
package/__flow__/Popout/index.js
CHANGED
|
@@ -390,11 +390,11 @@ export default function Popout({
|
|
|
390
390
|
type TypePopoutContentProps = React.ElementConfig<typeof Box>;
|
|
391
391
|
Popout.Content = ({ children, ...rest }: TypePopoutContentProps) => (
|
|
392
392
|
<Box
|
|
393
|
-
bg="background.
|
|
393
|
+
bg="container.background.base"
|
|
394
394
|
color="text.body"
|
|
395
395
|
border={500}
|
|
396
|
-
borderColor=
|
|
397
|
-
borderRadius=
|
|
396
|
+
borderColor="container.border.base"
|
|
397
|
+
borderRadius="outer"
|
|
398
398
|
boxShadow={300}
|
|
399
399
|
p={400}
|
|
400
400
|
m={300}
|
package/__flow__/Radio/styles.js
CHANGED
|
@@ -26,9 +26,9 @@ export const Input: StyledComponent<any, TypeTheme, *> = styled.input`
|
|
|
26
26
|
margin: 0;
|
|
27
27
|
appearance: none;
|
|
28
28
|
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
|
|
29
|
-
border: 1px solid ${(props) => props.theme.colors.
|
|
29
|
+
border: 1px solid ${(props) => props.theme.colors.form.border.base};
|
|
30
30
|
border-radius: 50%;
|
|
31
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
31
|
+
background-color: ${(props) => props.theme.colors.form.background.base};
|
|
32
32
|
transition: border-color ${(props) => props.theme.duration.fast}
|
|
33
33
|
${(props) => props.theme.easing.ease_in},
|
|
34
34
|
background-color ${(props) => props.theme.duration.fast}
|
|
@@ -72,13 +72,13 @@ export const InputWrapper: StyledComponent<any, TypeTheme, *> = styled.span`
|
|
|
72
72
|
&:hover,
|
|
73
73
|
&:focus {
|
|
74
74
|
${Input} {
|
|
75
|
-
border-color: ${props.theme.colors.
|
|
76
|
-
background-color: ${props.theme.colors.background.
|
|
75
|
+
border-color: ${props.theme.colors.form.border.base};
|
|
76
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
&:before {
|
|
80
80
|
opacity: ${props.disabled ? 0 : 1};
|
|
81
|
-
background-color: ${props.theme.colors.
|
|
81
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
`}
|
|
@@ -87,13 +87,13 @@ export const InputWrapper: StyledComponent<any, TypeTheme, *> = styled.span`
|
|
|
87
87
|
props.checked &&
|
|
88
88
|
css`
|
|
89
89
|
${Input} {
|
|
90
|
-
border-color: ${props.theme.colors.
|
|
91
|
-
background-color: ${props.theme.colors.
|
|
90
|
+
border-color: ${props.theme.colors.form.border.selected};
|
|
91
|
+
background-color: ${props.theme.colors.form.background.selected};
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
&:before {
|
|
95
95
|
opacity: 1;
|
|
96
|
-
background-color: ${props.theme.colors.background.
|
|
96
|
+
background-color: ${props.theme.colors.form.background.base};
|
|
97
97
|
}
|
|
98
98
|
`}
|
|
99
99
|
`;
|
|
@@ -8,7 +8,8 @@ import type { TypeTheme } from "../types/theme.flow";
|
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line prettier/prettier
|
|
10
10
|
export const SegmentedControlContainer = styled<typeof Box, TypeTheme, {disabled?: boolean, ...}>(Box)`
|
|
11
|
-
border: 1px solid
|
|
11
|
+
border: 1px solid
|
|
12
|
+
${(props) => props.theme.colors.button.secondary.border.base};
|
|
12
13
|
border-radius: ${(props) => props.theme.radii.outer};
|
|
13
14
|
padding: ${(props) => props.theme.space[100]};
|
|
14
15
|
|
|
@@ -61,17 +62,20 @@ export const SegmentedControlLabel = styled<typeof Text, TypeTheme, any>(Text)`
|
|
|
61
62
|
transition: all ${(props) => props.theme.duration.fast};
|
|
62
63
|
|
|
63
64
|
&:hover {
|
|
64
|
-
background-color: ${(props) =>
|
|
65
|
+
background-color: ${(props) =>
|
|
66
|
+
props.theme.colors.listItem.background.hover};
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
${(props) =>
|
|
68
70
|
props.isActive &&
|
|
69
71
|
css`
|
|
70
|
-
color: ${(props) => props.theme.colors.
|
|
71
|
-
background-color: ${(props) =>
|
|
72
|
+
color: ${(props) => props.theme.colors.text.inverse};
|
|
73
|
+
background-color: ${(props) =>
|
|
74
|
+
props.theme.colors.listItem.background.selected};
|
|
72
75
|
|
|
73
76
|
&:hover {
|
|
74
|
-
background-color: ${(props) =>
|
|
77
|
+
background-color: ${(props) =>
|
|
78
|
+
props.theme.colors.listItem.background.selected};
|
|
75
79
|
}
|
|
76
80
|
`}
|
|
77
81
|
`;
|
|
@@ -12,9 +12,9 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
12
12
|
select {
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
width: 100%;
|
|
15
|
-
border: 1px solid ${(props) => props.theme.colors.
|
|
15
|
+
border: 1px solid ${(props) => props.theme.colors.form.border.base};
|
|
16
16
|
border-radius: ${(props) => props.theme.radii[500]};
|
|
17
|
-
background-color: ${(props) => props.theme.colors.background.
|
|
17
|
+
background-color: ${(props) => props.theme.colors.form.background.base};
|
|
18
18
|
color: ${(props) => props.theme.colors.text.body};
|
|
19
19
|
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
|
|
20
20
|
outline: none;
|
|
@@ -85,11 +85,11 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
|
|
|
85
85
|
props.invalid &&
|
|
86
86
|
css`
|
|
87
87
|
select {
|
|
88
|
-
border-color: ${(props) => props.theme.colors.error
|
|
88
|
+
border-color: ${(props) => props.theme.colors.form.border.error};
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
${Arrow} {
|
|
92
|
-
color: ${(props) => props.theme.colors.error
|
|
92
|
+
color: ${(props) => props.theme.colors.icon.error};
|
|
93
93
|
}
|
|
94
94
|
`}
|
|
95
95
|
|
|
@@ -111,7 +111,7 @@ export const Arrow: StyledComponent<any, TypeTheme, *> = styled.span`
|
|
|
111
111
|
}
|
|
112
112
|
}};
|
|
113
113
|
transform: translateY(-50%);
|
|
114
|
-
color: ${(props) => props.theme.colors.icon.
|
|
114
|
+
color: ${(props) => props.theme.colors.icon.base};
|
|
115
115
|
pointer-events: none;
|
|
116
116
|
`;
|
|
117
117
|
|
|
@@ -6,13 +6,13 @@ import { transparentize } from "polished";
|
|
|
6
6
|
import type { TypeTheme } from "../types/theme.flow";
|
|
7
7
|
|
|
8
8
|
const Skeleton = styled<typeof Box, TypeTheme>(Box)`
|
|
9
|
-
background: ${(p) => p.theme.colors.background.
|
|
9
|
+
background: ${(p) => p.theme.colors.app.background.base};
|
|
10
10
|
background-image: ${(props) =>
|
|
11
11
|
`linear-gradient(
|
|
12
12
|
288deg,
|
|
13
|
-
${transparentize(0.7, props.theme.colors.border)} 32%,
|
|
14
|
-
${transparentize(0.05, props.theme.colors.border)},
|
|
15
|
-
${transparentize(0.7, props.theme.colors.border)} 68%
|
|
13
|
+
${transparentize(0.7, props.theme.colors.container.border.base)} 32%,
|
|
14
|
+
${transparentize(0.05, props.theme.colors.container.border.base)},
|
|
15
|
+
${transparentize(0.7, props.theme.colors.container.border.base)} 68%
|
|
16
16
|
);`};
|
|
17
17
|
background-size: 400%;
|
|
18
18
|
background-repeat: no-repeat;
|
|
@@ -13,7 +13,7 @@ const CardExample = () => {
|
|
|
13
13
|
p={400}
|
|
14
14
|
borderRadius="outer"
|
|
15
15
|
border={500}
|
|
16
|
-
borderColor="border"
|
|
16
|
+
borderColor="container.border.base"
|
|
17
17
|
>
|
|
18
18
|
<Skeleton borderRadius="pill" height={48} width={48} mb={400} />
|
|
19
19
|
<Skeleton borderRadius="inner" height={16} width="100%" mb={400} />
|
|
@@ -3,7 +3,9 @@ import Stack from "./index";
|
|
|
3
3
|
import Text from "../Text";
|
|
4
4
|
import { select } from "@storybook/addon-knobs";
|
|
5
5
|
|
|
6
|
-
const Item = (props) =>
|
|
6
|
+
const Item = (props) => (
|
|
7
|
+
<Text as="div" color="text.body" bg="container.background.base" {...props} />
|
|
8
|
+
);
|
|
7
9
|
|
|
8
10
|
const alignmentOptions = ["left", "center", "right", "stretch"];
|
|
9
11
|
const directionOptions = ["horizontal", "vertical"];
|