@sproutsocial/racine 11.0.2-dependencies.0 → 11.0.2-dependencies.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 +7 -0
- package/__flow__/Breadcrumb/index.js +2 -0
- package/__flow__/Collapsible/index.js +3 -0
- package/__flow__/Drawer/index.js +4 -0
- package/__flow__/EnumIconNames.js +1 -1
- package/__flow__/Fieldset/index.js +8 -2
- package/__flow__/Icon/index.js +5 -1
- package/__flow__/IconViewBoxes.js +1 -1
- package/__flow__/Menu/index.js +7 -0
- package/__flow__/Message/index.js +7 -0
- package/__flow__/Modal/index.js +5 -0
- package/__flow__/Popout/index.js +4 -1
- package/__flow__/SegmentedControl/index.js +2 -0
- package/__flow__/Table/index.js +6 -0
- package/__flow__/Text/index.js +8 -0
- package/__flow__/index.js +1 -0
- package/__flow__/systemProps/background.js +28 -0
- package/__flow__/systemProps/border.js +76 -0
- package/__flow__/systemProps/color.js +25 -0
- package/__flow__/systemProps/custom.js +23 -0
- package/__flow__/systemProps/flexbox.js +42 -0
- package/__flow__/systemProps/grid.js +43 -0
- package/__flow__/systemProps/index.js +17 -0
- package/__flow__/systemProps/layout.js +43 -0
- package/__flow__/systemProps/position.js +29 -0
- package/__flow__/systemProps/shadow.js +18 -0
- package/__flow__/systemProps/space.js +83 -0
- package/__flow__/systemProps/systemProps.js +55 -0
- package/__flow__/systemProps/tests/__snapshots__/background.test.js.snap +96 -0
- package/__flow__/systemProps/tests/__snapshots__/border.test.js.snap +469 -0
- package/__flow__/systemProps/tests/__snapshots__/color.test.js.snap +55 -0
- package/__flow__/systemProps/tests/__snapshots__/custom.test.js.snap +36 -0
- package/__flow__/systemProps/tests/__snapshots__/flexbox.test.js.snap +239 -0
- package/__flow__/systemProps/tests/__snapshots__/grid.test.js.snap +166 -0
- package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +218 -0
- package/__flow__/systemProps/tests/__snapshots__/position.test.js.snap +115 -0
- package/__flow__/systemProps/tests/__snapshots__/shadow.test.js.snap +25 -0
- package/__flow__/systemProps/tests/__snapshots__/space.test.js.snap +39 -0
- package/__flow__/systemProps/tests/__snapshots__/typography.test.js.snap +166 -0
- package/__flow__/systemProps/tests/__snapshots__/variant.test.js.snap +17 -0
- package/__flow__/systemProps/tests/background.test.js +90 -0
- package/__flow__/systemProps/tests/border.test.js +299 -0
- package/__flow__/systemProps/tests/color.test.js +49 -0
- package/__flow__/systemProps/tests/custom.test.js +38 -0
- package/__flow__/systemProps/tests/flexbox.test.js +150 -0
- package/__flow__/systemProps/tests/grid.test.js +123 -0
- package/__flow__/systemProps/tests/layout.test.js +135 -0
- package/__flow__/systemProps/tests/position.test.js +78 -0
- package/__flow__/systemProps/tests/shadow.test.js +30 -0
- package/__flow__/systemProps/tests/space.test.js +32 -0
- package/__flow__/systemProps/tests/types.flow.js +55 -0
- package/__flow__/systemProps/tests/typography.test.js +93 -0
- package/__flow__/systemProps/tests/variant.test.js +25 -0
- package/__flow__/systemProps/types.flow.js +20 -0
- package/__flow__/systemProps/typography.js +34 -0
- package/__flow__/systemProps/variant.js +18 -0
- package/__flow__/themes/dark/theme.js +1 -0
- package/__flow__/themes/light/theme.js +1 -0
- package/bin/buildNpm.js +58 -0
- package/commonjs/Breadcrumb/index.js +1 -0
- package/commonjs/Collapsible/index.js +2 -0
- package/commonjs/Drawer/index.js +3 -0
- package/commonjs/Fieldset/index.js +6 -2
- package/commonjs/Icon/index.js +3 -1
- package/commonjs/IconViewBoxes.js +2 -0
- package/commonjs/Menu/index.js +6 -0
- package/commonjs/Message/index.js +13 -0
- package/commonjs/Modal/index.js +4 -0
- package/commonjs/Popout/index.js +5 -2
- package/commonjs/SegmentedControl/index.js +1 -0
- package/commonjs/Table/index.js +5 -0
- package/commonjs/Text/index.js +7 -0
- package/commonjs/include-icons.js +1 -1
- package/commonjs/index.js +78 -0
- package/commonjs/systemProps/background.js +9 -0
- package/commonjs/systemProps/border.js +9 -0
- package/commonjs/systemProps/color.js +9 -0
- package/commonjs/systemProps/custom.js +12 -0
- package/commonjs/systemProps/flexbox.js +9 -0
- package/commonjs/systemProps/grid.js +9 -0
- package/commonjs/systemProps/index.js +115 -0
- package/commonjs/systemProps/layout.js +9 -0
- package/commonjs/systemProps/position.js +9 -0
- package/commonjs/systemProps/shadow.js +9 -0
- package/commonjs/systemProps/space.js +10 -0
- package/commonjs/systemProps/systemProps.js +33 -0
- package/commonjs/systemProps/tests/types.flow.js +46 -0
- package/commonjs/systemProps/types.flow.js +1 -0
- package/commonjs/systemProps/typography.js +9 -0
- package/commonjs/systemProps/variant.js +12 -0
- package/commonjs/themes/dark/theme.js +1 -0
- package/commonjs/themes/light/theme.js +1 -0
- package/dist/iconList.js +1 -1
- package/dist/icons.svg +1 -1
- package/dist/themes/dark/dark.scss +1 -0
- package/dist/themes/light/light.scss +1 -0
- package/icons/address-card-outline.svg +3 -0
- package/icons/deconstructed-negative-sentiment.svg +1 -1
- package/icons/deconstructed-neutral-sentiment.svg +1 -1
- package/icons/deconstructed-positive-sentiment.svg +1 -1
- package/icons/magic-wand.svg +3 -0
- package/icons/whatsapp.svg +5 -5
- package/includeIcons.js +1 -1
- package/lib/Breadcrumb/index.js +1 -0
- package/lib/Collapsible/index.js +2 -0
- package/lib/Drawer/index.js +3 -0
- package/lib/Fieldset/index.js +6 -2
- package/lib/Icon/index.js +3 -1
- package/lib/IconViewBoxes.js +2 -0
- package/lib/Menu/index.js +6 -0
- package/lib/Message/index.js +13 -0
- package/lib/Modal/index.js +4 -0
- package/lib/Popout/index.js +5 -2
- package/lib/SegmentedControl/index.js +1 -0
- package/lib/Table/index.js +5 -0
- package/lib/Text/index.js +7 -0
- package/lib/include-icons.js +1 -1
- package/lib/index.js +1 -0
- package/lib/systemProps/background.js +2 -0
- package/lib/systemProps/border.js +2 -0
- package/lib/systemProps/color.js +2 -0
- package/lib/systemProps/custom.js +5 -0
- package/lib/systemProps/flexbox.js +2 -0
- package/lib/systemProps/grid.js +2 -0
- package/lib/systemProps/index.js +14 -0
- package/lib/systemProps/layout.js +2 -0
- package/lib/systemProps/position.js +2 -0
- package/lib/systemProps/shadow.js +2 -0
- package/lib/systemProps/space.js +3 -0
- package/lib/systemProps/systemProps.js +14 -0
- package/lib/systemProps/tests/types.flow.js +44 -0
- package/lib/systemProps/types.flow.js +0 -0
- package/lib/systemProps/typography.js +2 -0
- package/lib/systemProps/variant.js +5 -0
- package/lib/themes/dark/theme.js +1 -0
- package/lib/themes/light/theme.js +1 -0
- package/package.json +15 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`shadow system props boxShadow 1`] = `
|
|
4
|
+
.c0 {
|
|
5
|
+
box-shadow: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
<div>
|
|
9
|
+
<div
|
|
10
|
+
class="c0"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
exports[`shadow system props textShadow 1`] = `
|
|
16
|
+
.c0 {
|
|
17
|
+
text-shadow: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
<div>
|
|
21
|
+
<div
|
|
22
|
+
class="c0"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`space system props margin 1`] = `
|
|
4
|
+
.c0 {
|
|
5
|
+
margin: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.c1 {
|
|
9
|
+
margin: 1px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
<div>
|
|
13
|
+
<div
|
|
14
|
+
class="c0"
|
|
15
|
+
/>
|
|
16
|
+
<div
|
|
17
|
+
class="c1"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
exports[`space system props padding 1`] = `
|
|
23
|
+
.c0 {
|
|
24
|
+
padding: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.c1 {
|
|
28
|
+
padding: 1px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
<div>
|
|
32
|
+
<div
|
|
33
|
+
class="c0"
|
|
34
|
+
/>
|
|
35
|
+
<div
|
|
36
|
+
class="c1"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
`;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`typography system props fontFamily 1`] = `
|
|
4
|
+
.c0 {
|
|
5
|
+
font-family: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
<div>
|
|
9
|
+
<div
|
|
10
|
+
class="c0"
|
|
11
|
+
font-family="string"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
exports[`typography system props fontSize 1`] = `
|
|
17
|
+
.c0 {
|
|
18
|
+
font-size: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.c1 {
|
|
22
|
+
font-size: 100px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
<div>
|
|
26
|
+
<div
|
|
27
|
+
class="c0"
|
|
28
|
+
font-size="string"
|
|
29
|
+
/>
|
|
30
|
+
<div
|
|
31
|
+
class="c1"
|
|
32
|
+
font-size="100"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
exports[`typography system props fontStyle 1`] = `
|
|
38
|
+
.c0 {
|
|
39
|
+
font-style: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
<div>
|
|
43
|
+
<div
|
|
44
|
+
class="c0"
|
|
45
|
+
font-style="string"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
`;
|
|
49
|
+
|
|
50
|
+
exports[`typography system props fontWeight 1`] = `
|
|
51
|
+
.c0 {
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.c1 {
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.c2 {
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.c3 {
|
|
64
|
+
font-weight: 800;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.c4 {
|
|
68
|
+
font-weight: 100;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.c5 {
|
|
72
|
+
font-weight: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
<div>
|
|
76
|
+
<div
|
|
77
|
+
class="c0"
|
|
78
|
+
font-weight="normal"
|
|
79
|
+
/>
|
|
80
|
+
<div
|
|
81
|
+
class="c1"
|
|
82
|
+
font-weight="semibold"
|
|
83
|
+
/>
|
|
84
|
+
<div
|
|
85
|
+
class="c2"
|
|
86
|
+
font-weight="bold"
|
|
87
|
+
/>
|
|
88
|
+
<div
|
|
89
|
+
class="c3"
|
|
90
|
+
font-weight="extrabold"
|
|
91
|
+
/>
|
|
92
|
+
<div
|
|
93
|
+
class="c4"
|
|
94
|
+
font-weight="100"
|
|
95
|
+
/>
|
|
96
|
+
<div
|
|
97
|
+
class="c5"
|
|
98
|
+
font-weight="string"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
exports[`typography system props letterSpacing 1`] = `
|
|
104
|
+
.c0 {
|
|
105
|
+
-webkit-letter-spacing: string;
|
|
106
|
+
-moz-letter-spacing: string;
|
|
107
|
+
-ms-letter-spacing: string;
|
|
108
|
+
letter-spacing: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.c1 {
|
|
112
|
+
-webkit-letter-spacing: 1px;
|
|
113
|
+
-moz-letter-spacing: 1px;
|
|
114
|
+
-ms-letter-spacing: 1px;
|
|
115
|
+
letter-spacing: 1px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
<div>
|
|
119
|
+
<div
|
|
120
|
+
class="c0"
|
|
121
|
+
letter-spacing="string"
|
|
122
|
+
/>
|
|
123
|
+
<div
|
|
124
|
+
class="c1"
|
|
125
|
+
letter-spacing="1"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
`;
|
|
129
|
+
|
|
130
|
+
exports[`typography system props lineHeight 1`] = `
|
|
131
|
+
.c0 {
|
|
132
|
+
line-height: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.c1 {
|
|
136
|
+
line-height: 1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
<div>
|
|
140
|
+
<div
|
|
141
|
+
class="c0"
|
|
142
|
+
/>
|
|
143
|
+
<div
|
|
144
|
+
class="c1"
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
`;
|
|
148
|
+
|
|
149
|
+
exports[`typography system props textAlign 1`] = `
|
|
150
|
+
.c0 {
|
|
151
|
+
text-align: center;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.c1 {
|
|
155
|
+
text-align: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
<div>
|
|
159
|
+
<div
|
|
160
|
+
class="c0"
|
|
161
|
+
/>
|
|
162
|
+
<div
|
|
163
|
+
class="c1"
|
|
164
|
+
/>
|
|
165
|
+
</div>
|
|
166
|
+
`;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { render } from "../../utils/react-testing-library";
|
|
5
|
+
import type { TypeTheme } from "../../types/theme.flow";
|
|
6
|
+
import {
|
|
7
|
+
backgroundSystemProps,
|
|
8
|
+
type TypeBackgroundSystemProps,
|
|
9
|
+
} from "../background";
|
|
10
|
+
|
|
11
|
+
describe("background system props", () => {
|
|
12
|
+
const Component = styled<TypeBackgroundSystemProps, TypeTheme, "div">("div")`
|
|
13
|
+
${backgroundSystemProps}
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
test("background", () => {
|
|
17
|
+
const { container } = render(
|
|
18
|
+
<>
|
|
19
|
+
<Component background="string" />
|
|
20
|
+
<Component
|
|
21
|
+
background={
|
|
22
|
+
// $FlowExpectedError
|
|
23
|
+
1
|
|
24
|
+
}
|
|
25
|
+
/>
|
|
26
|
+
</>
|
|
27
|
+
);
|
|
28
|
+
expect(container).toMatchSnapshot();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test("backgroundImage", () => {
|
|
32
|
+
const { container } = render(
|
|
33
|
+
<>
|
|
34
|
+
<Component backgroundImage="string" />
|
|
35
|
+
<Component
|
|
36
|
+
backgroundImage={
|
|
37
|
+
// $FlowExpectedError
|
|
38
|
+
1
|
|
39
|
+
}
|
|
40
|
+
/>
|
|
41
|
+
</>
|
|
42
|
+
);
|
|
43
|
+
expect(container).toMatchSnapshot();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test("backgroundSize", () => {
|
|
47
|
+
const { container } = render(
|
|
48
|
+
<>
|
|
49
|
+
<Component backgroundSize="string" />
|
|
50
|
+
<Component
|
|
51
|
+
backgroundSize={
|
|
52
|
+
// $FlowExpectedError
|
|
53
|
+
1
|
|
54
|
+
}
|
|
55
|
+
/>
|
|
56
|
+
</>
|
|
57
|
+
);
|
|
58
|
+
expect(container).toMatchSnapshot();
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
test("backgroundPosition", () => {
|
|
62
|
+
const { container } = render(
|
|
63
|
+
<>
|
|
64
|
+
<Component backgroundPosition="string" />
|
|
65
|
+
<Component
|
|
66
|
+
backgroundPosition={
|
|
67
|
+
// $FlowExpectedError
|
|
68
|
+
1
|
|
69
|
+
}
|
|
70
|
+
/>
|
|
71
|
+
</>
|
|
72
|
+
);
|
|
73
|
+
expect(container).toMatchSnapshot();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test("backgroundRepeat", () => {
|
|
77
|
+
const { container } = render(
|
|
78
|
+
<>
|
|
79
|
+
<Component backgroundRepeat="string" />
|
|
80
|
+
<Component
|
|
81
|
+
backgroundRepeat={
|
|
82
|
+
// $FlowExpectedError
|
|
83
|
+
1
|
|
84
|
+
}
|
|
85
|
+
/>
|
|
86
|
+
</>
|
|
87
|
+
);
|
|
88
|
+
expect(container).toMatchSnapshot();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { render } from "../../utils/react-testing-library";
|
|
5
|
+
import type { TypeTheme } from "../../types/theme.flow";
|
|
6
|
+
import { borderSystemProps, type TypeBorderSystemProps } from "../border";
|
|
7
|
+
|
|
8
|
+
describe("border system props", () => {
|
|
9
|
+
const Component = styled<TypeBorderSystemProps, TypeTheme, "div">("div")`
|
|
10
|
+
${borderSystemProps}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
test("border", () => {
|
|
14
|
+
const { container } = render(
|
|
15
|
+
<>
|
|
16
|
+
<Component border="string" />
|
|
17
|
+
<Component border={1} />
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
20
|
+
expect(container).toMatchSnapshot();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test("borderBottom", () => {
|
|
24
|
+
const { container } = render(
|
|
25
|
+
<>
|
|
26
|
+
<Component borderBottom="string" />
|
|
27
|
+
<Component borderBottom={1} />
|
|
28
|
+
</>
|
|
29
|
+
);
|
|
30
|
+
expect(container).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test("borderBottomColor", () => {
|
|
34
|
+
const { container } = render(
|
|
35
|
+
<>
|
|
36
|
+
<Component borderBottomColor="string" />
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
expect(container).toMatchSnapshot();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test("borderBottomLeftRadius", () => {
|
|
43
|
+
const { container } = render(
|
|
44
|
+
<>
|
|
45
|
+
<Component borderBottomLeftRadius="string" />
|
|
46
|
+
<Component borderBottomLeftRadius={1} />
|
|
47
|
+
</>
|
|
48
|
+
);
|
|
49
|
+
expect(container).toMatchSnapshot();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test("borderBottomRightRadius", () => {
|
|
53
|
+
const { container } = render(
|
|
54
|
+
<>
|
|
55
|
+
<Component borderBottomRightRadius="string" />
|
|
56
|
+
<Component borderBottomRightRadius={1} />
|
|
57
|
+
</>
|
|
58
|
+
);
|
|
59
|
+
expect(container).toMatchSnapshot();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test("borderBottomStyle", () => {
|
|
63
|
+
const { container } = render(
|
|
64
|
+
<>
|
|
65
|
+
<Component borderBottomStyle="dashed" />
|
|
66
|
+
<Component
|
|
67
|
+
// $FlowExpectedError
|
|
68
|
+
borderBottomStyle="string"
|
|
69
|
+
/>
|
|
70
|
+
</>
|
|
71
|
+
);
|
|
72
|
+
expect(container).toMatchSnapshot();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test("borderBottomWidth", () => {
|
|
76
|
+
const { container } = render(
|
|
77
|
+
<>
|
|
78
|
+
<Component borderBottomWidth="thick" />
|
|
79
|
+
<Component borderBottomWidth={1} />
|
|
80
|
+
<Component
|
|
81
|
+
// $FlowExpectedError
|
|
82
|
+
borderBottomWidth="string"
|
|
83
|
+
/>
|
|
84
|
+
</>
|
|
85
|
+
);
|
|
86
|
+
expect(container).toMatchSnapshot();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
test("borderColor", () => {
|
|
90
|
+
const { container } = render(
|
|
91
|
+
<>
|
|
92
|
+
<Component borderColor="string" />
|
|
93
|
+
</>
|
|
94
|
+
);
|
|
95
|
+
expect(container).toMatchSnapshot();
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test("borderLeft", () => {
|
|
99
|
+
const { container } = render(
|
|
100
|
+
<>
|
|
101
|
+
<Component borderLeft="string" />
|
|
102
|
+
<Component borderLeft={1} />
|
|
103
|
+
</>
|
|
104
|
+
);
|
|
105
|
+
expect(container).toMatchSnapshot();
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test("borderLeftColor", () => {
|
|
109
|
+
const { container } = render(
|
|
110
|
+
<>
|
|
111
|
+
<Component borderLeftColor="string" />
|
|
112
|
+
</>
|
|
113
|
+
);
|
|
114
|
+
expect(container).toMatchSnapshot();
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test("borderLeftStyle", () => {
|
|
118
|
+
const { container } = render(
|
|
119
|
+
<>
|
|
120
|
+
<Component borderLeftStyle="dashed" />
|
|
121
|
+
<Component
|
|
122
|
+
// $FlowExpectedError
|
|
123
|
+
borderLeftStyle="string"
|
|
124
|
+
/>
|
|
125
|
+
</>
|
|
126
|
+
);
|
|
127
|
+
expect(container).toMatchSnapshot();
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
test("borderLeftWidth", () => {
|
|
131
|
+
const { container } = render(
|
|
132
|
+
<>
|
|
133
|
+
<Component borderLeftWidth="thick" />
|
|
134
|
+
<Component borderLeftWidth={1} />
|
|
135
|
+
<Component
|
|
136
|
+
// $FlowExpectedError
|
|
137
|
+
borderLeftWidth="string"
|
|
138
|
+
/>
|
|
139
|
+
</>
|
|
140
|
+
);
|
|
141
|
+
expect(container).toMatchSnapshot();
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
test("borderRadius", () => {
|
|
145
|
+
const { container } = render(
|
|
146
|
+
<>
|
|
147
|
+
<Component borderRadius="string" />
|
|
148
|
+
</>
|
|
149
|
+
);
|
|
150
|
+
expect(container).toMatchSnapshot();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
test("borderRight", () => {
|
|
154
|
+
const { container } = render(
|
|
155
|
+
<>
|
|
156
|
+
<Component borderRight="string" />
|
|
157
|
+
</>
|
|
158
|
+
);
|
|
159
|
+
expect(container).toMatchSnapshot();
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
test("borderRightColor", () => {
|
|
163
|
+
const { container } = render(
|
|
164
|
+
<>
|
|
165
|
+
<Component borderRightColor="string" />
|
|
166
|
+
</>
|
|
167
|
+
);
|
|
168
|
+
expect(container).toMatchSnapshot();
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
test("borderRightStyle", () => {
|
|
172
|
+
const { container } = render(
|
|
173
|
+
<>
|
|
174
|
+
<Component borderRightStyle="dashed" />
|
|
175
|
+
<Component
|
|
176
|
+
// $FlowExpectedError
|
|
177
|
+
borderRightStyle="string"
|
|
178
|
+
/>
|
|
179
|
+
</>
|
|
180
|
+
);
|
|
181
|
+
expect(container).toMatchSnapshot();
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
test("borderRightWidth", () => {
|
|
185
|
+
const { container } = render(
|
|
186
|
+
<>
|
|
187
|
+
<Component borderRightWidth="thick" />
|
|
188
|
+
<Component borderRightWidth={1} />
|
|
189
|
+
<Component
|
|
190
|
+
// $FlowExpectedError
|
|
191
|
+
borderRightWidth="string"
|
|
192
|
+
/>
|
|
193
|
+
</>
|
|
194
|
+
);
|
|
195
|
+
expect(container).toMatchSnapshot();
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
test("borderStyle", () => {
|
|
199
|
+
const { container } = render(
|
|
200
|
+
<>
|
|
201
|
+
<Component borderStyle="string" />
|
|
202
|
+
</>
|
|
203
|
+
);
|
|
204
|
+
expect(container).toMatchSnapshot();
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
test("borderTop", () => {
|
|
208
|
+
const { container } = render(
|
|
209
|
+
<>
|
|
210
|
+
<Component borderTop="string" />
|
|
211
|
+
</>
|
|
212
|
+
);
|
|
213
|
+
expect(container).toMatchSnapshot();
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
test("borderTopColor", () => {
|
|
217
|
+
const { container } = render(
|
|
218
|
+
<>
|
|
219
|
+
<Component borderTopColor="string" />
|
|
220
|
+
</>
|
|
221
|
+
);
|
|
222
|
+
expect(container).toMatchSnapshot();
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
test("borderTopLeftRadius", () => {
|
|
226
|
+
const { container } = render(
|
|
227
|
+
<>
|
|
228
|
+
<Component borderTopLeftRadius="string" />
|
|
229
|
+
</>
|
|
230
|
+
);
|
|
231
|
+
expect(container).toMatchSnapshot();
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
test("borderTopRightRadius", () => {
|
|
235
|
+
const { container } = render(
|
|
236
|
+
<>
|
|
237
|
+
<Component borderTopRightRadius="string" />
|
|
238
|
+
</>
|
|
239
|
+
);
|
|
240
|
+
expect(container).toMatchSnapshot();
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
test("borderTopStyle", () => {
|
|
244
|
+
const { container } = render(
|
|
245
|
+
<>
|
|
246
|
+
<Component borderTopStyle="dashed" />
|
|
247
|
+
<Component
|
|
248
|
+
// $FlowExpectedError
|
|
249
|
+
borderTopStyle="string"
|
|
250
|
+
/>
|
|
251
|
+
</>
|
|
252
|
+
);
|
|
253
|
+
expect(container).toMatchSnapshot();
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
test("borderTopWidth", () => {
|
|
257
|
+
const { container } = render(
|
|
258
|
+
<>
|
|
259
|
+
<Component borderTopWidth="thick" />
|
|
260
|
+
<Component borderTopWidth={1} />
|
|
261
|
+
<Component
|
|
262
|
+
// $FlowExpectedError
|
|
263
|
+
borderTopWidth="string"
|
|
264
|
+
/>
|
|
265
|
+
</>
|
|
266
|
+
);
|
|
267
|
+
expect(container).toMatchSnapshot();
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
test("borderWidth", () => {
|
|
271
|
+
const { container } = render(
|
|
272
|
+
<>
|
|
273
|
+
<Component borderWidth="string" />
|
|
274
|
+
<Component borderWidth={1} />
|
|
275
|
+
</>
|
|
276
|
+
);
|
|
277
|
+
expect(container).toMatchSnapshot();
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
test("borderX", () => {
|
|
281
|
+
const { container } = render(
|
|
282
|
+
<>
|
|
283
|
+
<Component borderX="string" />
|
|
284
|
+
<Component borderX={1} />
|
|
285
|
+
</>
|
|
286
|
+
);
|
|
287
|
+
expect(container).toMatchSnapshot();
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
test("borderY", () => {
|
|
291
|
+
const { container } = render(
|
|
292
|
+
<>
|
|
293
|
+
<Component borderY="string" />
|
|
294
|
+
<Component borderY={1} />
|
|
295
|
+
</>
|
|
296
|
+
);
|
|
297
|
+
expect(container).toMatchSnapshot();
|
|
298
|
+
});
|
|
299
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// @flow strict-local
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { render } from "../../utils/react-testing-library";
|
|
5
|
+
import type { TypeTheme } from "../../types/theme.flow";
|
|
6
|
+
import { colorSystemProps, type TypeColorSystemProps } from "../color";
|
|
7
|
+
|
|
8
|
+
describe("color system props", () => {
|
|
9
|
+
const Component = styled<TypeColorSystemProps, TypeTheme, "div">("div")`
|
|
10
|
+
${colorSystemProps}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
test("backgroundColor", () => {
|
|
14
|
+
const { container } = render(
|
|
15
|
+
<>
|
|
16
|
+
<Component backgroundColor="string" />
|
|
17
|
+
</>
|
|
18
|
+
);
|
|
19
|
+
expect(container).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test("bg", () => {
|
|
23
|
+
const { container } = render(
|
|
24
|
+
<>
|
|
25
|
+
<Component bg="string" />
|
|
26
|
+
</>
|
|
27
|
+
);
|
|
28
|
+
expect(container).toMatchSnapshot();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test("color", () => {
|
|
32
|
+
const { container } = render(
|
|
33
|
+
<>
|
|
34
|
+
<Component color="string" />
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
expect(container).toMatchSnapshot();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test("opacity", () => {
|
|
41
|
+
const { container } = render(
|
|
42
|
+
<>
|
|
43
|
+
<Component opacity="0" />
|
|
44
|
+
<Component opacity={0} />
|
|
45
|
+
</>
|
|
46
|
+
);
|
|
47
|
+
expect(container).toMatchSnapshot();
|
|
48
|
+
});
|
|
49
|
+
});
|