@sproutsocial/racine 11.0.2 → 11.1.2-badge-update.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.
Files changed (274) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/__flow__/Badge/constants.js +48 -0
  3. package/__flow__/Badge/index.js +58 -32
  4. package/__flow__/Badge/index.stories.js +29 -42
  5. package/__flow__/Badge/index.test.js +34 -32
  6. package/__flow__/Badge/styles.js +22 -42
  7. package/__flow__/EnumIconNames.js +1 -1
  8. package/__flow__/IconViewBoxes.js +1 -1
  9. package/__flow__/index.js +1 -0
  10. package/__flow__/systemProps/background.js +28 -0
  11. package/__flow__/systemProps/border.js +76 -0
  12. package/__flow__/systemProps/color.js +25 -0
  13. package/__flow__/systemProps/custom.js +23 -0
  14. package/__flow__/systemProps/flexbox.js +42 -0
  15. package/__flow__/systemProps/grid.js +43 -0
  16. package/__flow__/systemProps/index.js +17 -0
  17. package/__flow__/systemProps/layout.js +43 -0
  18. package/__flow__/systemProps/position.js +29 -0
  19. package/__flow__/systemProps/shadow.js +18 -0
  20. package/__flow__/systemProps/space.js +83 -0
  21. package/__flow__/systemProps/systemProps.js +55 -0
  22. package/__flow__/systemProps/tests/__snapshots__/background.test.js.snap +96 -0
  23. package/__flow__/systemProps/tests/__snapshots__/border.test.js.snap +469 -0
  24. package/__flow__/systemProps/tests/__snapshots__/color.test.js.snap +55 -0
  25. package/__flow__/systemProps/tests/__snapshots__/custom.test.js.snap +36 -0
  26. package/__flow__/systemProps/tests/__snapshots__/flexbox.test.js.snap +239 -0
  27. package/__flow__/systemProps/tests/__snapshots__/grid.test.js.snap +166 -0
  28. package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +218 -0
  29. package/__flow__/systemProps/tests/__snapshots__/position.test.js.snap +115 -0
  30. package/__flow__/systemProps/tests/__snapshots__/shadow.test.js.snap +25 -0
  31. package/__flow__/systemProps/tests/__snapshots__/space.test.js.snap +39 -0
  32. package/__flow__/systemProps/tests/__snapshots__/typography.test.js.snap +166 -0
  33. package/__flow__/systemProps/tests/__snapshots__/variant.test.js.snap +17 -0
  34. package/__flow__/systemProps/tests/background.test.js +90 -0
  35. package/__flow__/systemProps/tests/border.test.js +299 -0
  36. package/__flow__/systemProps/tests/color.test.js +49 -0
  37. package/__flow__/systemProps/tests/custom.test.js +38 -0
  38. package/__flow__/systemProps/tests/flexbox.test.js +150 -0
  39. package/__flow__/systemProps/tests/grid.test.js +123 -0
  40. package/__flow__/systemProps/tests/layout.test.js +135 -0
  41. package/__flow__/systemProps/tests/position.test.js +78 -0
  42. package/__flow__/systemProps/tests/shadow.test.js +30 -0
  43. package/__flow__/systemProps/tests/space.test.js +32 -0
  44. package/__flow__/systemProps/tests/types.flow.js +55 -0
  45. package/__flow__/systemProps/tests/typography.test.js +93 -0
  46. package/__flow__/systemProps/tests/variant.test.js +25 -0
  47. package/__flow__/systemProps/types.flow.js +20 -0
  48. package/__flow__/systemProps/typography.js +34 -0
  49. package/__flow__/systemProps/variant.js +18 -0
  50. package/__flow__/themes/dark/theme.js +1 -0
  51. package/__flow__/themes/light/literal-colors.js +2 -0
  52. package/__flow__/themes/light/theme.js +1 -0
  53. package/__flow__/types/theme.colors.flow.js +27 -0
  54. package/bin/buildNpm.js +58 -0
  55. package/commonjs/Avatar/index.js +7 -4
  56. package/commonjs/Badge/constants.js +43 -0
  57. package/commonjs/Badge/index.js +42 -38
  58. package/commonjs/Badge/styles.js +16 -32
  59. package/commonjs/Banner/index.js +3 -1
  60. package/commonjs/Banner/styles.js +1 -1
  61. package/commonjs/Box/styles.js +1 -1
  62. package/commonjs/Breadcrumb/index.js +5 -2
  63. package/commonjs/Button/index.js +3 -1
  64. package/commonjs/Card/index.js +3 -1
  65. package/commonjs/Card/styles.js +3 -3
  66. package/commonjs/CharacterCounter/index.js +3 -1
  67. package/commonjs/CharacterCounter/styles.js +1 -1
  68. package/commonjs/ChartLegend/index.js +3 -1
  69. package/commonjs/ChartLegend/styles.js +3 -3
  70. package/commonjs/Checkbox/index.js +3 -1
  71. package/commonjs/Checkbox/styles.js +1 -1
  72. package/commonjs/Collapsible/index.js +5 -2
  73. package/commonjs/DatePicker/DateRangePicker.js +3 -1
  74. package/commonjs/DatePicker/SingleDatePicker.js +3 -1
  75. package/commonjs/DatePicker/StatefulDateRangePicker.js +3 -1
  76. package/commonjs/DatePicker/StatefulSingleDatePicker.js +3 -1
  77. package/commonjs/DatePicker/common.js +1 -1
  78. package/commonjs/DatePicker/styles.js +2 -6
  79. package/commonjs/Drawer/SlideTransition.js +3 -1
  80. package/commonjs/Drawer/index.js +9 -4
  81. package/commonjs/Drawer/styles.js +2 -2
  82. package/commonjs/EmptyState/index.js +3 -1
  83. package/commonjs/Fieldset/index.js +7 -3
  84. package/commonjs/FormField/index.js +3 -1
  85. package/commonjs/Icon/index.js +5 -2
  86. package/commonjs/Icon/styles.js +1 -1
  87. package/commonjs/IconViewBoxes.js +1 -0
  88. package/commonjs/Image/index.js +3 -1
  89. package/commonjs/Image/styles.js +1 -1
  90. package/commonjs/Indicator/index.js +3 -1
  91. package/commonjs/Input/index.js +3 -1
  92. package/commonjs/Input/styles.js +2 -2
  93. package/commonjs/KeyboardKey/index.js +3 -1
  94. package/commonjs/Label/index.js +4 -2
  95. package/commonjs/Link/index.js +3 -1
  96. package/commonjs/Link/styles.js +1 -1
  97. package/commonjs/Listbox/index.js +7 -4
  98. package/commonjs/Loader/index.js +3 -1
  99. package/commonjs/Loader/styles.js +2 -2
  100. package/commonjs/LoaderButton/index.js +3 -1
  101. package/commonjs/Menu/constants.js +1 -1
  102. package/commonjs/Menu/descendants.js +10 -7
  103. package/commonjs/Menu/hooks.js +1 -1
  104. package/commonjs/Menu/index.js +22 -16
  105. package/commonjs/Menu/styles.js +2 -2
  106. package/commonjs/Message/index.js +3 -1
  107. package/commonjs/Message/styles.js +1 -1
  108. package/commonjs/Modal/index.js +7 -3
  109. package/commonjs/Modal/styles.js +4 -6
  110. package/commonjs/Numeral/constants.js +1 -1
  111. package/commonjs/Numeral/index.js +3 -1
  112. package/commonjs/Numeral/styles.js +3 -3
  113. package/commonjs/OverflowList/styles.js +1 -1
  114. package/commonjs/Popout/index.js +7 -3
  115. package/commonjs/Popout/styles.js +1 -1
  116. package/commonjs/Radio/index.js +3 -1
  117. package/commonjs/Radio/styles.js +4 -4
  118. package/commonjs/SegmentedControl/index.js +5 -2
  119. package/commonjs/Select/index.js +3 -1
  120. package/commonjs/Stack/index.js +3 -1
  121. package/commonjs/Switch/index.js +3 -1
  122. package/commonjs/Switch/styles.js +1 -1
  123. package/commonjs/Table/index.js +10 -5
  124. package/commonjs/TableCell/index.js +3 -1
  125. package/commonjs/TableHeaderCell/index.js +3 -1
  126. package/commonjs/TableRowAccordion/index.js +3 -1
  127. package/commonjs/Tabs/index.js +5 -2
  128. package/commonjs/Tabs/styles.js +4 -4
  129. package/commonjs/Text/index.js +3 -1
  130. package/commonjs/Text/styles.js +1 -1
  131. package/commonjs/Textarea/index.js +3 -1
  132. package/commonjs/Toast/index.js +15 -15
  133. package/commonjs/Toast/styles.js +4 -7
  134. package/commonjs/ToggleHint/index.js +3 -1
  135. package/commonjs/Token/index.js +3 -1
  136. package/commonjs/Token/styles.js +1 -1
  137. package/commonjs/TokenInput/index.js +3 -1
  138. package/commonjs/Tooltip/index.js +5 -2
  139. package/commonjs/Tooltip/styles.js +1 -1
  140. package/commonjs/VisuallyHidden/index.js +1 -1
  141. package/commonjs/include-icons.js +1 -1
  142. package/commonjs/index.js +79 -1
  143. package/commonjs/systemProps/background.js +9 -0
  144. package/commonjs/systemProps/border.js +9 -0
  145. package/commonjs/systemProps/color.js +9 -0
  146. package/commonjs/systemProps/custom.js +12 -0
  147. package/commonjs/systemProps/flexbox.js +9 -0
  148. package/commonjs/systemProps/grid.js +9 -0
  149. package/commonjs/systemProps/index.js +115 -0
  150. package/commonjs/systemProps/layout.js +9 -0
  151. package/commonjs/systemProps/position.js +9 -0
  152. package/commonjs/systemProps/shadow.js +9 -0
  153. package/commonjs/systemProps/space.js +10 -0
  154. package/commonjs/systemProps/systemProps.js +33 -0
  155. package/commonjs/systemProps/tests/types.flow.js +46 -0
  156. package/commonjs/systemProps/types.flow.js +1 -0
  157. package/commonjs/systemProps/typography.js +9 -0
  158. package/commonjs/systemProps/variant.js +12 -0
  159. package/commonjs/themes/dark/decorative-palettes.js +1 -1
  160. package/commonjs/themes/dark/theme.js +1 -1
  161. package/commonjs/themes/light/decorative-palettes.js +1 -1
  162. package/commonjs/themes/light/literal-colors.js +4 -2
  163. package/commonjs/themes/light/theme.js +1 -1
  164. package/commonjs/types/theme.colors.flow.js +2 -0
  165. package/commonjs/utils/hooks.js +3 -2
  166. package/commonjs/utils/mixins.js +1 -1
  167. package/commonjs/utils/system-props.js +1 -1
  168. package/dist/iconList.js +1 -1
  169. package/dist/icons.svg +1 -1
  170. package/dist/themes/dark/dark.scss +9 -7
  171. package/dist/themes/light/light.scss +99 -97
  172. package/icons/power-up-outline.svg +3 -0
  173. package/includeIcons.js +1 -1
  174. package/lib/Avatar/index.js +7 -4
  175. package/lib/Badge/constants.js +38 -0
  176. package/lib/Badge/index.js +39 -38
  177. package/lib/Badge/styles.js +13 -28
  178. package/lib/Banner/index.js +3 -1
  179. package/lib/Banner/styles.js +1 -1
  180. package/lib/Box/styles.js +1 -1
  181. package/lib/Breadcrumb/index.js +5 -2
  182. package/lib/Button/index.js +3 -1
  183. package/lib/Card/index.js +3 -1
  184. package/lib/Card/styles.js +2 -2
  185. package/lib/CharacterCounter/index.js +3 -1
  186. package/lib/CharacterCounter/styles.js +1 -1
  187. package/lib/ChartLegend/index.js +3 -1
  188. package/lib/ChartLegend/styles.js +3 -3
  189. package/lib/Checkbox/index.js +3 -1
  190. package/lib/Collapsible/index.js +5 -2
  191. package/lib/DatePicker/DateRangePicker.js +3 -1
  192. package/lib/DatePicker/SingleDatePicker.js +3 -1
  193. package/lib/DatePicker/StatefulDateRangePicker.js +3 -1
  194. package/lib/DatePicker/StatefulSingleDatePicker.js +3 -1
  195. package/lib/DatePicker/styles.js +2 -6
  196. package/lib/Drawer/SlideTransition.js +3 -1
  197. package/lib/Drawer/index.js +9 -4
  198. package/lib/Drawer/styles.js +2 -2
  199. package/lib/EmptyState/index.js +3 -1
  200. package/lib/Fieldset/index.js +7 -3
  201. package/lib/FormField/index.js +3 -1
  202. package/lib/Icon/index.js +5 -2
  203. package/lib/Icon/styles.js +1 -1
  204. package/lib/IconViewBoxes.js +1 -0
  205. package/lib/Image/index.js +3 -1
  206. package/lib/Image/styles.js +1 -1
  207. package/lib/Indicator/index.js +3 -1
  208. package/lib/Input/index.js +3 -1
  209. package/lib/Input/styles.js +2 -2
  210. package/lib/KeyboardKey/index.js +3 -1
  211. package/lib/Label/index.js +4 -2
  212. package/lib/Link/index.js +3 -1
  213. package/lib/Link/styles.js +1 -1
  214. package/lib/Listbox/index.js +6 -3
  215. package/lib/Loader/index.js +3 -1
  216. package/lib/Loader/styles.js +2 -2
  217. package/lib/LoaderButton/index.js +3 -1
  218. package/lib/Menu/descendants.js +5 -2
  219. package/lib/Menu/index.js +20 -16
  220. package/lib/Menu/styles.js +2 -2
  221. package/lib/Message/index.js +3 -1
  222. package/lib/Modal/index.js +7 -3
  223. package/lib/Modal/styles.js +3 -5
  224. package/lib/Numeral/index.js +3 -1
  225. package/lib/Numeral/styles.js +2 -2
  226. package/lib/OverflowList/styles.js +1 -1
  227. package/lib/Popout/index.js +7 -3
  228. package/lib/Popout/styles.js +1 -1
  229. package/lib/Radio/index.js +3 -1
  230. package/lib/Radio/styles.js +4 -4
  231. package/lib/SegmentedControl/index.js +5 -2
  232. package/lib/Select/index.js +3 -1
  233. package/lib/Stack/index.js +3 -1
  234. package/lib/Switch/index.js +3 -1
  235. package/lib/Switch/styles.js +1 -1
  236. package/lib/Table/index.js +9 -4
  237. package/lib/TableCell/index.js +3 -1
  238. package/lib/TableHeaderCell/index.js +3 -1
  239. package/lib/TableRowAccordion/index.js +3 -1
  240. package/lib/Tabs/index.js +5 -2
  241. package/lib/Tabs/styles.js +3 -3
  242. package/lib/Text/index.js +3 -1
  243. package/lib/Text/styles.js +1 -1
  244. package/lib/Textarea/index.js +3 -1
  245. package/lib/Toast/index.js +14 -14
  246. package/lib/Toast/styles.js +3 -7
  247. package/lib/ToggleHint/index.js +3 -1
  248. package/lib/Token/index.js +3 -1
  249. package/lib/Token/styles.js +1 -1
  250. package/lib/TokenInput/index.js +3 -1
  251. package/lib/Tooltip/index.js +5 -2
  252. package/lib/Tooltip/styles.js +1 -1
  253. package/lib/VisuallyHidden/index.js +1 -1
  254. package/lib/include-icons.js +1 -1
  255. package/lib/index.js +1 -0
  256. package/lib/systemProps/background.js +2 -0
  257. package/lib/systemProps/border.js +2 -0
  258. package/lib/systemProps/color.js +2 -0
  259. package/lib/systemProps/custom.js +5 -0
  260. package/lib/systemProps/flexbox.js +2 -0
  261. package/lib/systemProps/grid.js +2 -0
  262. package/lib/systemProps/index.js +14 -0
  263. package/lib/systemProps/layout.js +2 -0
  264. package/lib/systemProps/position.js +2 -0
  265. package/lib/systemProps/shadow.js +2 -0
  266. package/lib/systemProps/space.js +3 -0
  267. package/lib/systemProps/systemProps.js +14 -0
  268. package/lib/systemProps/tests/types.flow.js +44 -0
  269. package/lib/systemProps/types.flow.js +0 -0
  270. package/lib/systemProps/typography.js +2 -0
  271. package/lib/systemProps/variant.js +5 -0
  272. package/lib/themes/light/literal-colors.js +4 -2
  273. package/lib/types/theme.colors.flow.js +2 -1
  274. 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,17 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`variant system props typeScale 1`] = `
4
+ .c0 {
5
+ font-size: 11px;
6
+ line-height: 18.666666666666668px;
7
+ }
8
+
9
+ <div>
10
+ <div
11
+ class="c0"
12
+ />
13
+ <div
14
+ class="c0"
15
+ />
16
+ </div>
17
+ `;
@@ -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
+ });