@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Change Log
2
2
 
3
+ ## 11.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 81f95bc: Add flow support for newer colors in theme
8
+
9
+ ## 11.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 17cfdda: New Icon: power-up-outline
14
+
15
+ ## 11.1.0
16
+
17
+ ### Minor Changes
18
+
19
+ - 03d1f1a: Export system props
20
+
3
21
  ## 11.0.2
4
22
 
5
23
  ### Patch Changes
@@ -0,0 +1,48 @@
1
+ //@flow
2
+
3
+ const defaultPurple = {
4
+ color: "colors.text.body",
5
+ background: "colors.container.background.decorative.purple",
6
+ };
7
+
8
+ const suggestion = {
9
+ color: "colors.text.body",
10
+ background: "colors.container.background.decorative.blue",
11
+ };
12
+
13
+ const passive = {
14
+ color: "colors.text.body",
15
+ background: "colors.container.background.decorative.neutral",
16
+ };
17
+
18
+ const primary = {
19
+ color: "colors.text.body",
20
+ background: "colors.container.background.decorative.blue",
21
+ };
22
+
23
+ const secondary = {
24
+ color: "colors.text.body",
25
+ background: "colors.container.background.decorative.yellow",
26
+ };
27
+
28
+ const common = {
29
+ color: "colors.text.inverse",
30
+ background: "colors.aqua.600",
31
+ };
32
+
33
+ const approval = {
34
+ color: "colors.text.body",
35
+ background: "colors.container.background.decorative.orange",
36
+ };
37
+
38
+ //Deprecated former "types"
39
+
40
+ export const legacyBadgeColors = {
41
+ primary,
42
+ secondary,
43
+ passive,
44
+ common,
45
+ approval,
46
+ default: defaultPurple,
47
+ suggestion,
48
+ };
@@ -1,43 +1,69 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
+ import Icon from "../Icon";
3
4
  import Container from "./styles";
5
+ import Box from "../Box";
4
6
 
5
7
  type TypeProps = {
8
+ children: React.Node,
9
+ /** DEPRECATED: Use children instead of text */
6
10
  text: React.Node,
7
- type:
8
- | "primary"
9
- | "secondary"
10
- | "passive"
11
- | "common"
12
- | "approval"
13
- | "default"
14
- | "suggestion",
15
- size: "default" | "small",
11
+ size?: "small" | "large",
12
+ badgeColor?:
13
+ | "green"
14
+ | "blue"
15
+ | "purple"
16
+ | "yellow"
17
+ | "orange"
18
+ | "red"
19
+ | "neutral",
20
+ iconName?: string,
21
+ /** DEPRECATED: Possibly only used for testing. Refrain from using at all if possible. (optional) */
16
22
  tip?: React.Node,
23
+ /** DEPRECATED: The legacy method of choosing a theme. Use badgeColor instead. (optional) */
24
+ type?: string,
17
25
  };
18
26
 
19
- export default class Badge extends React.Component<TypeProps> {
20
- static defaultProps = {
21
- type: "primary",
22
- size: "default",
23
- };
24
-
25
- render() {
26
- const { size, type, tip, text, ...rest } = this.props;
27
-
28
- return (
29
- <Container
30
- type={type}
31
- small={size === "small"}
32
- data-tip={tip}
33
- data-qa-badge={text || ""}
34
- data-qa-badge-type={type}
35
- data-qa-badge-tip={tip || ""}
36
- // $FlowIssue - upgrade v0.112.0
37
- {...rest}
38
- >
39
- {text}
40
- </Container>
27
+ const Badge = ({
28
+ children,
29
+ text,
30
+ iconName,
31
+ type,
32
+ tip,
33
+ size = "small",
34
+ badgeColor = "blue",
35
+ ...rest
36
+ }: TypeProps) => {
37
+ if (children && text) {
38
+ throw new Error(
39
+ "can't use both `children` and `text` props. Text is deprecated, consider using children."
41
40
  );
42
41
  }
43
- }
42
+
43
+ return (
44
+ <Container
45
+ {...rest}
46
+ // size previously included default, which currently maps to small. Once consumers have updated this can be simplified.
47
+ size={size === "default" ? "large" : size}
48
+ badgeColor={badgeColor}
49
+ data-tip={tip}
50
+ data-qa-badge={text || ""}
51
+ data-qa-badge-type={type}
52
+ data-qa-badge-tip={tip || ""}
53
+ type={type && type}
54
+ >
55
+ <Box display="flex" alignItems="center" JustifyContent="center">
56
+ {iconName ? (
57
+ <Icon
58
+ mr={200}
59
+ name={iconName}
60
+ size={size === "small" ? "mini" : "default"}
61
+ />
62
+ ) : null}
63
+ {children || text}
64
+ </Box>
65
+ </Container>
66
+ );
67
+ };
68
+
69
+ export default Badge;
@@ -1,53 +1,40 @@
1
1
  import React from "react";
2
- import { text } from "@storybook/addon-knobs";
3
2
  import Badge from "./index";
3
+ import Box from "../Box";
4
+ import Numeral from "../Numeral";
5
+ import Text from "../Text";
6
+ import Stack from "../Stack";
4
7
 
5
8
  export default {
6
9
  title: "Badge",
7
10
  };
8
11
 
9
12
  export const permutations = () => (
10
- <>
11
- <Badge
12
- text={text("text", "Test")}
13
- type="default"
14
- size={text("size", "small")}
15
- />
16
- <Badge text={text("text", "Test")} size={text("size", "small")} />
17
- <Badge
18
- text={text("text", "Test")}
19
- type="secondary"
20
- size={text("size", "small")}
21
- />
22
- <Badge
23
- text={text("text", "Test")}
24
- type="passive"
25
- size={text("size", "small")}
26
- />
27
- <Badge
28
- text={text("text", "Test")}
29
- type="common"
30
- size={text("size", "small")}
31
- />
32
- <Badge
33
- text={text("text", "Test")}
34
- type="approval"
35
- size={text("size", "small")}
36
- />
37
- <Badge
38
- text={text("text", "Test")}
39
- type="suggestion"
40
- size={text("size", "small")}
41
- />
42
-
43
- <Badge text={text("text", "Test")} type="default" />
44
- <Badge text={text("text", "Test")} />
45
- <Badge text={text("text", "Test")} type="secondary" />
46
- <Badge text={text("text", "Test")} type="passive" />
47
- <Badge text={text("text", "Test")} type="common" />
48
- <Badge text={text("text", "Test")} type="approval" />
49
- <Badge text={text("text", "Test")} type="suggestion" />
50
- </>
13
+ <Stack space={450}>
14
+ <Box display="flex" alignItems="center">
15
+ <Badge badgeColor="green">Badge</Badge>
16
+ <Badge>Badge</Badge>
17
+ <Badge badgeColor="purple">Badge</Badge>
18
+ <Badge badgeColor="yellow">Badge</Badge>
19
+ <Badge badgeColor="orange">Badge</Badge>
20
+ <Badge badgeColor="red">Badge</Badge>
21
+ <Badge badgeColor="neutral" iconName="atom">
22
+ Badge
23
+ </Badge>
24
+ <Badge bg="chartreuse" color="crimson">
25
+ Radical overrides!
26
+ </Badge>
27
+ </Box>
28
+ <Box display="flex" alignItems="center">
29
+ <Badge size="large" type="secondary" iconName="sparkles">
30
+ Supports legacy types
31
+ </Badge>
32
+ <Badge size="large">
33
+ <Numeral fontWeight="bold" number={1569241} />
34
+ <Text ml={200}>and children!</Text>
35
+ </Badge>
36
+ </Box>
37
+ </Stack>
51
38
  );
52
39
 
53
40
  permutations.story = {
@@ -3,48 +3,50 @@ import Badge from "./";
3
3
  import { render } from "../utils/react-testing-library";
4
4
  import "jest-styled-components";
5
5
 
6
- describe("Racine Badge", () => {
7
- it("should render with default props", () => {
8
- const { getByText, getByDataQaLabel } = render(<Badge text="Test" />);
6
+ describe("Badge...", () => {
7
+ it("...should render with default props", () => {
8
+ const { getByText } = render(<Badge>Test</Badge>);
9
9
  expect(getByText("Test")).toBeTruthy();
10
- expect(getByDataQaLabel({ "badge-type": "primary" })).toBeTruthy();
10
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
11
+ "padding",
12
+ "0px 4px"
13
+ );
14
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
15
+ "background",
16
+ "#dcf2ff"
17
+ );
11
18
  });
12
19
 
13
- it("should render with correct size styling", () => {
14
- const { getByText } = render(<Badge text="Test" size="small" />);
15
- expect(getByText("Test")).toHaveStyleRule("padding", "4px 8px");
20
+ it("...should render with correct size styling", () => {
21
+ const { getByText } = render(<Badge size="large">Test</Badge>);
22
+ expect(getByText("Test").closest("span")).toHaveStyleRule("padding", "8px");
16
23
  });
17
24
 
18
- it("should render with secondary type", () => {
19
- const { getByText, getByDataQaLabel } = render(
20
- <Badge text="Test" type="secondary" />
21
- );
25
+ it("...should render with legacy type", () => {
26
+ const { getByText } = render(<Badge type="secondary">Test</Badge>);
22
27
  expect(getByText("Test")).toBeTruthy();
23
- expect(getByDataQaLabel({ "badge-type": "secondary" })).toBeTruthy();
24
- });
25
-
26
- it("should render with passive type", () => {
27
- const { getByText, getByDataQaLabel } = render(
28
- <Badge text="Test" type="passive" />
28
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
29
+ "color",
30
+ "#364141"
31
+ );
32
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
33
+ "background",
34
+ "#fdefcd"
29
35
  );
30
- expect(getByText("Test")).toBeTruthy();
31
- expect(getByDataQaLabel({ "badge-type": "passive" })).toBeTruthy();
32
36
  });
33
37
 
34
- it("should render with common type", () => {
35
- const { getByText, getByDataQaLabel } = render(
36
- <Badge text="Test" type="common" />
37
- );
38
+ it("...should render with a badge color", () => {
39
+ const { getByText } = render(<Badge badgeColor="purple">Test</Badge>);
38
40
  expect(getByText("Test")).toBeTruthy();
39
- expect(getByDataQaLabel({ "badge-type": "common" })).toBeTruthy();
41
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
42
+ "background",
43
+ "#eaeaf9"
44
+ );
40
45
  });
41
46
 
42
- it("should render with approval type", () => {
43
- const { getByText, getByDataQaLabel } = render(
44
- <Badge text="Test" type="approval" />
45
- );
46
- expect(getByText("Test")).toBeTruthy();
47
- expect(getByDataQaLabel({ "badge-type": "approval" })).toBeTruthy();
47
+ it("...should render with an icon", () => {
48
+ const { container } = render(<Badge iconName="sparkles">Test</Badge>);
49
+ expect(container.querySelector("svg")).toBeTruthy();
48
50
  });
49
51
  it("should render with suggestion type", () => {
50
52
  const { getByText, getByDataQaLabel } = render(
@@ -54,9 +56,9 @@ describe("Racine Badge", () => {
54
56
  expect(getByDataQaLabel({ "badge-type": "suggestion" })).toBeTruthy();
55
57
  });
56
58
 
57
- it("should render with tooltip class", () => {
59
+ it("...should render with tooltip class", () => {
58
60
  const { getByText, getByDataQaLabel } = render(
59
- <Badge text="Test" tip="test tip" />
61
+ <Badge tip="test tip">Test</Badge>
60
62
  );
61
63
  expect(getByText("Test")).toBeTruthy();
62
64
  expect(getByDataQaLabel({ "badge-tip": "test tip" })).toBeTruthy();
@@ -1,51 +1,31 @@
1
1
  //@flow
2
- import styled, { css, type StyledComponent } from "styled-components";
2
+ import styled, { type StyledComponent } from "styled-components";
3
3
  import { COMMON } from "../utils/system-props";
4
- import { themeGet } from "@styled-system/theme-get";
5
-
6
4
  import type { TypeTheme } from "../types/theme.flow";
7
-
8
- const colors = {
9
- primary: "colors.neutral.0",
10
- secondary: "colors.neutral.800",
11
- passive: "colors.neutral.800",
12
- common: "colors.neutral.0",
13
- approval: "colors.neutral.800",
14
- default: "colors.neutral.0",
15
- suggestion: "colors.neutral.900",
16
- };
17
-
18
- const backgroundColors = {
19
- primary: "colors.blue.700",
20
- secondary: "colors.yellow.500",
21
- passive: "colors.neutral.200",
22
- common: "colors.aqua.600",
23
- approval: "colors.orange.300",
24
- default: "colors.purple.700",
25
- suggestion: "colors.blue.300",
26
- };
5
+ import { themeGet } from "@styled-system/theme-get";
6
+ import { legacyBadgeColors } from "./constants";
27
7
 
28
8
  // eslint-disable-next-line prettier/prettier
29
- const Container: StyledComponent<{type: "primary" | "secondary" | "passive" | "common" | "approval" | "default" | "suggestion", small: boolean, ...}, TypeTheme, *> = styled.span`
9
+ const Container: StyledComponent<{type: ?string, badgeColor: string, size: string, ...}, TypeTheme, *> = styled.span`
10
+ font-family: ${(p) => p.theme.fontFamily};
11
+ ${(p) =>
12
+ p.size === "small" ? p.theme.typography[100] : p.theme.typography[200]};
13
+ border-radius: 9999px;
14
+ line-height: 16px;
30
15
  display: inline-block;
31
- text-align: center;
32
- border-radius: 50px;
33
- font-family: ${(props) => props.theme.fontFamily};
34
-
35
- padding: ${(props) =>
36
- props.small
37
- ? `${props.theme.space[200]} ${props.theme.space[300]}`
38
- : `${props.theme.space[300]} ${props.theme.space[350]}`};
39
-
40
- ${(props) =>
41
- props.small ? props.theme.typography[100] : props.theme.typography[200]}
42
-
43
- ${(props) => css`
44
- color: ${themeGet(colors[props.type])(props)};
45
- background: ${themeGet(backgroundColors[props.type])(props)};
46
- `}
47
-
48
- ${COMMON}
16
+ color: ${(p) =>
17
+ p.type
18
+ ? themeGet(legacyBadgeColors[p.type].color)
19
+ : p.theme.colors.text.body};
20
+ background: ${(p) =>
21
+ p.type
22
+ ? themeGet(legacyBadgeColors[p.type].background)
23
+ : p.theme.colors.container.background.decorative[p.badgeColor]};
24
+ padding: ${(p) =>
25
+ p.size === "small"
26
+ ? `${p.theme.space[0]} ${p.theme.space[200]}`
27
+ : `${p.theme.space[300]}`};
28
+ ${COMMON};
49
29
  `;
50
30
 
51
31
  export default Container;
@@ -1,2 +1,2 @@
1
1
  // @flow
2
- export type EnumIconNames = "active-listener" | "add-item" | "add-keyword" | "add-team-member" | "add-variable" | "address-card-outline" | "address-card-solid" | "adobe-experience-manager" | "ads" | "android" | "apple" | "approval-indicator-outline" | "approval-indicator" | "archive" | "arrow-down-line" | "arrow-down" | "arrow-left-line" | "arrow-left" | "arrow-right-line" | "arrow-right" | "arrow-up-line" | "arrow-up" | "arrows" | "asset-library-outline" | "asset-library" | "assign" | "atom" | "audio" | "back-to-top" | "bambu-icon-outline" | "bambu-icon" | "barcode" | "basketball" | "bell-outline" | "bigcommerce" | "bitly" | "bold" | "book" | "bot" | "browser" | "business" | "calendar-outline" | "calendar" | "camera-outline" | "camera-story" | "camera" | "campaign" | "canva" | "carousel" | "cart-plus-outline" | "cart-plus" | "check" | "chevron-down-filled" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up-down-filled" | "chevron-up-filled" | "chevron-up" | "circle-check-outline" | "circle-check" | "circle" | "circle+" | "circles" | "circlex" | "click-to-view" | "clicks" | "clipboard-outline" | "clipboard" | "clock" | "closed-captioning" | "cloud" | "code" | "columns" | "comment-alt-outline" | "comment-alt" | "comment-lines-alt-outline" | "comment" | "compact-density" | "compact-indicator" | "comparison" | "competitor" | "compose" | "content-suggestions" | "credit-card" | "crop" | "crown" | "dashboard" | "deconstructed-negative-sentiment" | "deconstructed-neutral-sentiment" | "deconstructed-positive-sentiment" | "discovery" | "dislike-outline" | "dislike" | "dm-link-outline" | "dm-link" | "dotdotdot" | "download" | "drafts-outline" | "drafts" | "dropbox" | "duplicate-outline" | "duplicate" | "emoji-outline" | "emoji" | "empty-image" | "engagement-per-post" | "engagements" | "error" | "exchange-alt" | "expanded-indicator" | "export" | "extended-circles" | "external-link-alt" | "external-link" | "extreme-negative-sentiment" | "eye-outline" | "eye-slash-outline" | "eye-slash" | "eye" | "facebook-audience-network" | "facebook-branded-content-outline" | "facebook-branded-content" | "facebook-groups" | "facebook" | "fb-reactions-angry" | "fb-reactions-haha" | "fb-reactions-like" | "fb-reactions-love" | "fb-reactions-sad" | "fb-reactions-wow" | "feedly" | "feeds" | "female" | "file-chart-line" | "file-edit" | "file-times-solid" | "filter" | "flag-outline" | "flag" | "flat-negative-sentiment-outline" | "flat-negative-sentiment" | "flat-neutral-sentiment-outline" | "flat-neutral-sentiment" | "flat-positive-sentiment-outline" | "flat-positive-sentiment" | "folder-open" | "folder" | "follow-outline" | "follow" | "follower-increase" | "following" | "font" | "full-access" | "gear" | "gears" | "glassdoor" | "glasses" | "globe" | "google-analytics-color" | "google-business-messages" | "google-drive" | "google-my-business" | "grip" | "h1" | "h2" | "hamburger" | "hashtag" | "headset" | "heart-outline" | "heart" | "heartbeat" | "help" | "hiking" | "history" | "home" | "hourglass" | "hubspot" | "image-caption" | "image" | "images" | "impressions-per-post" | "impressions" | "inactive-listener" | "inbox-action" | "inbox-views" | "inbox" | "indicator" | "industry" | "info" | "instagram" | "internal-activity-outline" | "internal-activity" | "italic" | "key" | "keyboard" | "laptop-phone" | "large-density" | "lift" | "like-outline" | "like" | "link" | "linkedin-audience-network" | "linkedin" | "list-ol" | "listening" | "lists" | "location-outline" | "location" | "lock" | "magic-wand" | "male" | "marketo" | "mention" | "message-preview-outline" | "message-preview" | "message" | "messages-outline" | "messages" | "messenger" | "metric-table" | "microsoft-dynamics" | "minus" | "mobile" | "monitor" | "moon" | "negative-sentiment" | "neutral-positive-sentiment" | "neutral-sentiment" | "new-trend" | "newspaper" | "no-access" | "notepad" | "notifications-publishing-outline" | "notifications-publishing" | "notifications" | "offline" | "online" | "paid-promotion-outline" | "paid-promotion" | "paid" | "paint" | "palette" | "paperclip" | "pause" | "pencil-outline" | "pencil" | "person" | "phone" | "pinterest-boards-outline" | "pinterest-boards" | "pinterest" | "play-circle" | "play" | "plus" | "positive-sentiment" | "power-up" | "profile-connect" | "profile-disconnect" | "publishing-outline" | "publishing" | "puzzle-piece" | "qr-code" | "queue" | "recommendation" | "reddit-alien" | "reddit" | "referrals" | "refresh" | "rejected" | "reply-outline" | "reply" | "reporting-period" | "reporting" | "reports-home" | "reports" | "retweet" | "rss" | "sales" | "salesforce" | "save-assets" | "saved-messages" | "saved-reply-outline" | "saved-reply" | "search" | "sent-message-outline" | "sent-message" | "share" | "shopify" | "show-navigation" | "slack" | "small-density" | "smiley" | "some-access" | "sparkles" | "spike-alert" | "star-half-alt-solid" | "star-of-life" | "star-outline" | "star" | "sticky-note-outline" | "sticky-note" | "stories" | "story" | "suggestions" | "sun" | "tag-outline" | "tag" | "targeting-outline" | "targeting" | "tasks-outline" | "tasks" | "team-conversation-outline" | "team-conversation" | "team" | "text-asset" | "text" | "tiktok" | "times" | "trash-can-outline" | "trash-can" | "trend-down" | "trend-neutral" | "trend-up" | "trends" | "triangle-black" | "triangle" | "tripadvisor-circle-outline" | "tripadvisor-circle" | "tripadvisor" | "trophy-outline" | "tumblr" | "twitter-audience-network" | "twitter" | "unfollow-outline" | "unfollow" | "unlink" | "unlock" | "upload" | "user-circle" | "users" | "verified" | "video-camera-story" | "video-camera" | "vip" | "weight" | "whatsapp" | "window-maximize" | "window-minimize" | "window-regular" | "window-restore" | "woocommerce" | "x" | "yelp-full-star" | "yelp-half-star" | "yelp" | "youtube" | "zendesk";
2
+ export type EnumIconNames = "active-listener" | "add-item" | "add-keyword" | "add-team-member" | "add-variable" | "address-card-outline" | "address-card-solid" | "adobe-experience-manager" | "ads" | "android" | "apple" | "approval-indicator-outline" | "approval-indicator" | "archive" | "arrow-down-line" | "arrow-down" | "arrow-left-line" | "arrow-left" | "arrow-right-line" | "arrow-right" | "arrow-up-line" | "arrow-up" | "arrows" | "asset-library-outline" | "asset-library" | "assign" | "atom" | "audio" | "back-to-top" | "bambu-icon-outline" | "bambu-icon" | "barcode" | "basketball" | "bell-outline" | "bigcommerce" | "bitly" | "bold" | "book" | "bot" | "browser" | "business" | "calendar-outline" | "calendar" | "camera-outline" | "camera-story" | "camera" | "campaign" | "canva" | "carousel" | "cart-plus-outline" | "cart-plus" | "check" | "chevron-down-filled" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up-down-filled" | "chevron-up-filled" | "chevron-up" | "circle-check-outline" | "circle-check" | "circle" | "circle+" | "circles" | "circlex" | "click-to-view" | "clicks" | "clipboard-outline" | "clipboard" | "clock" | "closed-captioning" | "cloud" | "code" | "columns" | "comment-alt-outline" | "comment-alt" | "comment-lines-alt-outline" | "comment" | "compact-density" | "compact-indicator" | "comparison" | "competitor" | "compose" | "content-suggestions" | "credit-card" | "crop" | "crown" | "dashboard" | "deconstructed-negative-sentiment" | "deconstructed-neutral-sentiment" | "deconstructed-positive-sentiment" | "discovery" | "dislike-outline" | "dislike" | "dm-link-outline" | "dm-link" | "dotdotdot" | "download" | "drafts-outline" | "drafts" | "dropbox" | "duplicate-outline" | "duplicate" | "emoji-outline" | "emoji" | "empty-image" | "engagement-per-post" | "engagements" | "error" | "exchange-alt" | "expanded-indicator" | "export" | "extended-circles" | "external-link-alt" | "external-link" | "extreme-negative-sentiment" | "eye-outline" | "eye-slash-outline" | "eye-slash" | "eye" | "facebook-audience-network" | "facebook-branded-content-outline" | "facebook-branded-content" | "facebook-groups" | "facebook" | "fb-reactions-angry" | "fb-reactions-haha" | "fb-reactions-like" | "fb-reactions-love" | "fb-reactions-sad" | "fb-reactions-wow" | "feedly" | "feeds" | "female" | "file-chart-line" | "file-edit" | "file-times-solid" | "filter" | "flag-outline" | "flag" | "flat-negative-sentiment-outline" | "flat-negative-sentiment" | "flat-neutral-sentiment-outline" | "flat-neutral-sentiment" | "flat-positive-sentiment-outline" | "flat-positive-sentiment" | "folder-open" | "folder" | "follow-outline" | "follow" | "follower-increase" | "following" | "font" | "full-access" | "gear" | "gears" | "glassdoor" | "glasses" | "globe" | "google-analytics-color" | "google-business-messages" | "google-drive" | "google-my-business" | "grip" | "h1" | "h2" | "hamburger" | "hashtag" | "headset" | "heart-outline" | "heart" | "heartbeat" | "help" | "hiking" | "history" | "home" | "hourglass" | "hubspot" | "image-caption" | "image" | "images" | "impressions-per-post" | "impressions" | "inactive-listener" | "inbox-action" | "inbox-views" | "inbox" | "indicator" | "industry" | "info" | "instagram" | "internal-activity-outline" | "internal-activity" | "italic" | "key" | "keyboard" | "laptop-phone" | "large-density" | "lift" | "like-outline" | "like" | "link" | "linkedin-audience-network" | "linkedin" | "list-ol" | "listening" | "lists" | "location-outline" | "location" | "lock" | "magic-wand" | "male" | "marketo" | "mention" | "message-preview-outline" | "message-preview" | "message" | "messages-outline" | "messages" | "messenger" | "metric-table" | "microsoft-dynamics" | "minus" | "mobile" | "monitor" | "moon" | "negative-sentiment" | "neutral-positive-sentiment" | "neutral-sentiment" | "new-trend" | "newspaper" | "no-access" | "notepad" | "notifications-publishing-outline" | "notifications-publishing" | "notifications" | "offline" | "online" | "paid-promotion-outline" | "paid-promotion" | "paid" | "paint" | "palette" | "paperclip" | "pause" | "pencil-outline" | "pencil" | "person" | "phone" | "pinterest-boards-outline" | "pinterest-boards" | "pinterest" | "play-circle" | "play" | "plus" | "positive-sentiment" | "power-up-outline" | "power-up" | "profile-connect" | "profile-disconnect" | "publishing-outline" | "publishing" | "puzzle-piece" | "qr-code" | "queue" | "recommendation" | "reddit-alien" | "reddit" | "referrals" | "refresh" | "rejected" | "reply-outline" | "reply" | "reporting-period" | "reporting" | "reports-home" | "reports" | "retweet" | "rss" | "sales" | "salesforce" | "save-assets" | "saved-messages" | "saved-reply-outline" | "saved-reply" | "search" | "sent-message-outline" | "sent-message" | "share" | "shopify" | "show-navigation" | "slack" | "small-density" | "smiley" | "some-access" | "sparkles" | "spike-alert" | "star-half-alt-solid" | "star-of-life" | "star-outline" | "star" | "sticky-note-outline" | "sticky-note" | "stories" | "story" | "suggestions" | "sun" | "tag-outline" | "tag" | "targeting-outline" | "targeting" | "tasks-outline" | "tasks" | "team-conversation-outline" | "team-conversation" | "team" | "text-asset" | "text" | "tiktok" | "times" | "trash-can-outline" | "trash-can" | "trend-down" | "trend-neutral" | "trend-up" | "trends" | "triangle-black" | "triangle" | "tripadvisor-circle-outline" | "tripadvisor-circle" | "tripadvisor" | "trophy-outline" | "tumblr" | "twitter-audience-network" | "twitter" | "unfollow-outline" | "unfollow" | "unlink" | "unlock" | "upload" | "user-circle" | "users" | "verified" | "video-camera-story" | "video-camera" | "vip" | "weight" | "whatsapp" | "window-maximize" | "window-minimize" | "window-regular" | "window-restore" | "woocommerce" | "x" | "yelp-full-star" | "yelp-half-star" | "yelp" | "youtube" | "zendesk";
@@ -1 +1 @@
1
- module.exports = {"active-listener":"0 0 16 16","add-item":"0 0 16 16","add-keyword":"0 0 16 16","add-team-member":"0 0 18 13","add-variable":"0 0 18 14","address-card-outline":"0 0 16 16","address-card-solid":"0 0 18 16","adobe-experience-manager":"0 0 16 18","ads":"0 0 9 16","android":"0 0 14 16","apple":"0 0 14 16","approval-indicator-outline":"0 0 14 16","approval-indicator":"0 0 14 16","archive":"0 0 16 16","arrow-down-line":"0 0 14 16","arrow-down":"0 0 16 16","arrow-left-line":"0 0 16 18","arrow-left":"0 0 16 16","arrow-right-line":"0 0 16 18","arrow-right":"0 0 16 16","arrow-up-line":"0 0 14 16","arrow-up":"0 0 16 16","arrows":"0 0 16 16","asset-library-outline":"0 0 16 16","asset-library":"0 0 16 16","assign":"0 0 18 15","atom":"0 0 14 16","audio":"0 0 16 14","back-to-top":"0 0 15 16","bambu-icon-outline":"0 0 16 16","bambu-icon":"0 0 16 16","barcode":"0 0 18 16","basketball":"0 0 16 16","bell-outline":"0 0 14 16","bigcommerce":"0 0 16 16","bitly":"0 0 16 16","bold":"0 0 16 16","book":"0 0 14 16","bot":"0 0 16 16","browser":"0 0 16 16","business":"0 0 16 16","calendar-outline":"0 0 14 16","calendar":"0 0 14 16","camera-outline":"0 0 18 16","camera-story":"0 0 18 16","camera":"0 0 18 16","campaign":"0 0 16 14","canva":"0 0 16 18","carousel":"0 0 16 18","cart-plus-outline":"0 0 17 15","cart-plus":"0 0 17 15","check":"0 0 16 16","chevron-down-filled":"0 0 16 21","chevron-down":"0 0 16 18","chevron-left":"0 0 10 16","chevron-right":"0 0 10 17","chevron-up-down-filled":"0 0 12 20","chevron-up-filled":"0 0 16 21","chevron-up":"0 0 16 18","circle-check-outline":"0 0 16 16","circle-check":"0 0 16 16","circle":"0 0 16 16","circle+":"0 0 16 16","circles":"0 0 16 16","circlex":"0 0 16 16","click-to-view":"0 0 12 16","clicks":"0 0 10 16","clipboard-outline":"0 0 12 16","clipboard":"0 0 12 16","clock":"0 0 16 16","closed-captioning":"0 0 16 16","cloud":"0 0 16 13","code":"0 0 18 16","columns":"0 0 16 16","comment-alt-outline":"0 0 16 15","comment-alt":"0 0 16 15","comment-lines-alt-outline":"0 0 16 16","comment":"0 0 16 13","compact-density":"0 0 16 16","compact-indicator":"0 0 16 16","comparison":"0 0 16 14","competitor":"0 0 14 16","compose":"0 0 16 16","content-suggestions":"0 0 16 16","credit-card":"0 0 16 14","crop":"0 0 16 16","crown":"0 0 16 16","dashboard":"0 0 16 14","deconstructed-negative-sentiment":"0 0 18 18","deconstructed-neutral-sentiment":"0 0 18 18","deconstructed-positive-sentiment":"0 0 18 18","discovery":"0 0 16 16","dislike-outline":"0 0 15 16","dislike":"0 0 16 16","dm-link-outline":"0 0 16 16","dm-link":"0 0 16 16","dotdotdot":"0 0 16 16","download":"0 0 16 16","drafts-outline":"0 0 12 16","drafts":"0 0 12 16","dropbox":"0 0 18 16","duplicate-outline":"0 0 14 16","duplicate":"0 0 14 16","emoji-outline":"0 0 16 16","emoji":"0 0 16 16","empty-image":"0 0 16 18","engagement-per-post":"0 0 16 16","engagements":"0 0 16 15","error":"0 0 16 16","exchange-alt":"0 0 16 16","expanded-indicator":"0 0 16 16","export":"0 0 14 17","extended-circles":"0 0 16 16","external-link-alt":"0 0 16 16","external-link":"0 0 16 16","extreme-negative-sentiment":"0 0 16 16","eye-outline":"0 0 18 16","eye-slash-outline":"0 0 20 16","eye-slash":"0 0 20 16","eye":"0 0 18 16","facebook-audience-network":"0 0 16 16","facebook-branded-content-outline":"0 0 18 15","facebook-branded-content":"0 0 18 15","facebook-groups":"0 0 16 16","facebook":"0 0 16 16","fb-reactions-angry":"0 0 16 16","fb-reactions-haha":"0 0 16 16","fb-reactions-like":"0 0 16 16","fb-reactions-love":"0 0 16 16","fb-reactions-sad":"0 0 16 16","fb-reactions-wow":"0 0 16 16","feedly":"0 0 16 15","feeds":"0 0 16 15","female":"0 0 11 18","file-chart-line":"0 0 12 16","file-edit":"0 0 12 16","file-times-solid":"0 0 12 16","filter":"0 0 16 16","flag-outline":"0 0 16 16","flag":"0 0 16 16","flat-negative-sentiment-outline":"0 0 18 18","flat-negative-sentiment":"0 0 18 18","flat-neutral-sentiment-outline":"0 0 18 18","flat-neutral-sentiment":"0 0 18 18","flat-positive-sentiment-outline":"0 0 18 18","flat-positive-sentiment":"0 0 18 18","folder-open":"0 0 16 15","folder":"0 0 16 16","follow-outline":"0 0 20 16","follow":"0 0 20 16","follower-increase":"0 0 19 16","following":"0 0 20 16","font":"0 0 18 16","full-access":"0 0 16 16","gear":"0 0 16 16","gears":"0 0 16 16","glassdoor":"0 0 16 16","glasses":"0 0 18 14","globe":"0 0 16 16","google-analytics-color":"0 0 14 18","google-business-messages":"0 0 16 16","google-drive":"0 0 16 14","google-my-business":"0 0 16 14","grip":"0 0 8 18","h1":"0 0 16 16","h2":"0 0 16 16","hamburger":"0 0 16 18","hashtag":"0 0 16 16","headset":"0 0 16 16","heart-outline":"0 0 16 16","heart":"0 0 16 16","heartbeat":"0 0 18 16","help":"0 0 16 16","hiking":"0 0 16 16","history":"0 0 16 16","home":"0 0 16 15","hourglass":"0 0 12 16","hubspot":"0 0 16 16","image-caption":"0 0 16 14","image":"0 0 16 16","images":"0 0 16 15","impressions-per-post":"0 0 16 16","impressions":"0 0 18 16","inactive-listener":"0 0 16 12","inbox-action":"0 0 16 16","inbox-views":"0 0 16 13","inbox":"0 0 16 14","indicator":"0 0 16 16","industry":"0 0 14 16","info":"0 0 16 16","instagram":"0 0 16 16","internal-activity-outline":"0 0 16 16","internal-activity":"0 0 16 16","italic":"0 0 16 16","key":"0 0 16 16","keyboard":"0 0 18 16","laptop-phone":"0 0 16 16","large-density":"0 0 16 16","lift":"0 0 23 16","like-outline":"0 0 15 16","like":"0 0 16 16","link":"0 0 16 16","linkedin-audience-network":"0 0 16 16","linkedin":"0 0 16 16","list-ol":"0 0 16 16","listening":"0 0 14 16","lists":"0 0 16 16","location-outline":"0 0 12 16","location":"0 0 12 16","lock":"0 0 14 16","magic-wand":"0 0 17 16","male":"0 0 16 20","marketo":"0 0 16 18","mention":"0 0 16 16","message-preview-outline":"0 0 18 16","message-preview":"0 0 18 16","message":"0 0 16 16","messages-outline":"0 0 16 16","messages":"0 0 16 16","messenger":"0 0 16 16","metric-table":"0 0 16 16","microsoft-dynamics":"0 0 16 16","minus":"0 0 16 16","mobile":"0 0 10 16","monitor":"0 0 12 16","moon":"0 0 15 16","negative-sentiment":"0 0 16 16","neutral-positive-sentiment":"0 0 16 16","neutral-sentiment":"0 0 16 16","new-trend":"0 0 12 16","newspaper":"0 0 16 16","no-access":"0 0 16 16","notepad":"0 0 12 16","notifications-publishing-outline":"0 0 16 16","notifications-publishing":"0 0 16 16","notifications":"0 0 14 16","offline":"0 0 18 15","online":"0 0 18 15","paid-promotion-outline":"0 0 16 16","paid-promotion":"0 0 16 16","paid":"0 0 14 16","paint":"0 0 18 16","palette":"0 0 16 16","paperclip":"0 0 14 16","pause":"0 0 16 18","pencil-outline":"0 0 16 16","pencil":"0 0 16 16","person":"0 0 14 16","phone":"0 0 16 16","pinterest-boards-outline":"0 0 14 16","pinterest-boards":"0 0 14 16","pinterest":"0 0 16 16","play-circle":"0 0 16 16","play":"0 0 14 16","plus":"0 0 16 18","positive-sentiment":"0 0 16 16","power-up":"0 0 10 16","profile-connect":"0 0 16 16","profile-disconnect":"0 0 16 16","publishing-outline":"0 0 16 16","publishing":"0 0 16 16","puzzle-piece":"0 0 18 16","qr-code":"0 0 16 16","queue":"0 0 16 16","recommendation":"0 0 16 16","reddit-alien":"0 0 16 16","reddit":"0 0 16 16","referrals":"0 0 16 16","refresh":"0 0 16 16","rejected":"0 0 16 16","reply-outline":"0 0 16 16","reply":"0 0 16 16","reporting-period":"0 0 14 16","reporting":"0 0 16 16","reports-home":"0 0 16 16","reports":"0 0 16 15","retweet":"0 0 18 16","rss":"0 0 16 16","sales":"0 0 9 16","salesforce":"0 0 20 16","save-assets":"0 0 16 16","saved-messages":"0 0 16 16","saved-reply-outline":"0 0 16 12","saved-reply":"0 0 16 12","search":"0 0 16 16","sent-message-outline":"0 0 16 14","sent-message":"0 0 16 14","share":"0 0 16 14","shopify":"0 0 16 18","show-navigation":"0 0 18 14","slack":"0 0 16 16","small-density":"0 0 16 16","smiley":"0 0 16 16","some-access":"0 0 16 16","sparkles":"0 0 16 16","spike-alert":"0 0 16 16","star-half-alt-solid":"0 0 18 16","star-of-life":"0 0 16 16","star-outline":"0 0 18 16","star":"0 0 18 16","sticky-note-outline":"0 0 16 16","sticky-note":"0 0 16 16","stories":"0 0 16 17","story":"0 0 16 16","suggestions":"0 0 11 16","sun":"0 0 16 16","tag-outline":"0 0 16 16","tag":"0 0 16 16","targeting-outline":"0 0 16 16","targeting":"0 0 16 16","tasks-outline":"0 0 12 16","tasks":"0 0 12 16","team-conversation-outline":"0 0 16 18","team-conversation":"0 0 16 18","team":"0 0 18 16","text-asset":"0 0 16 16","text":"0 0 8 16","tiktok":"0 0 16 18","times":"0 0 16 22","trash-can-outline":"0 0 14 16","trash-can":"0 0 14 16","trend-down":"0 0 18 18","trend-neutral":"0 0 20 18","trend-up":"0 0 18 18","trends":"0 0 16 17","triangle-black":"0 0 16 16","triangle":"0 0 16 16","tripadvisor-circle-outline":"0 0 16 16","tripadvisor-circle":"0 0 16 16","tripadvisor":"0 0 16 16","trophy-outline":"0 0 18 16","tumblr":"0 0 16 16","twitter-audience-network":"0 0 17 16","twitter":"0 0 17 16","unfollow-outline":"0 0 20 16","unfollow":"0 0 20 16","unlink":"0 0 16 16","unlock":"0 0 14 16","upload":"0 0 16 17","user-circle":"0 0 16 16","users":"0 0 18 16","verified":"0 0 16 16","video-camera-story":"0 0 18 15","video-camera":"0 0 18 16","vip":"0 0 16 16","weight":"0 0 16 16","whatsapp":"0 0 16 16","window-maximize":"0 0 16 16","window-minimize":"0 0 16 16","window-regular":"0 0 16 16","window-restore":"0 0 16 16","woocommerce":"0 0 18 16","x":"0 0 16 18","yelp-full-star":"0 0 16 16","yelp-half-star":"0 0 16 16","yelp":"0 0 14 16","youtube":"0 0 16 15","zendesk":"0 0 16 16"};
1
+ module.exports = {"active-listener":"0 0 16 16","add-item":"0 0 16 16","add-keyword":"0 0 16 16","add-team-member":"0 0 18 13","add-variable":"0 0 18 14","address-card-outline":"0 0 16 16","address-card-solid":"0 0 18 16","adobe-experience-manager":"0 0 16 18","ads":"0 0 9 16","android":"0 0 14 16","apple":"0 0 14 16","approval-indicator-outline":"0 0 14 16","approval-indicator":"0 0 14 16","archive":"0 0 16 16","arrow-down-line":"0 0 14 16","arrow-down":"0 0 16 16","arrow-left-line":"0 0 16 18","arrow-left":"0 0 16 16","arrow-right-line":"0 0 16 18","arrow-right":"0 0 16 16","arrow-up-line":"0 0 14 16","arrow-up":"0 0 16 16","arrows":"0 0 16 16","asset-library-outline":"0 0 16 16","asset-library":"0 0 16 16","assign":"0 0 18 15","atom":"0 0 14 16","audio":"0 0 16 14","back-to-top":"0 0 15 16","bambu-icon-outline":"0 0 16 16","bambu-icon":"0 0 16 16","barcode":"0 0 18 16","basketball":"0 0 16 16","bell-outline":"0 0 14 16","bigcommerce":"0 0 16 16","bitly":"0 0 16 16","bold":"0 0 16 16","book":"0 0 14 16","bot":"0 0 16 16","browser":"0 0 16 16","business":"0 0 16 16","calendar-outline":"0 0 14 16","calendar":"0 0 14 16","camera-outline":"0 0 18 16","camera-story":"0 0 18 16","camera":"0 0 18 16","campaign":"0 0 16 14","canva":"0 0 16 18","carousel":"0 0 16 18","cart-plus-outline":"0 0 17 15","cart-plus":"0 0 17 15","check":"0 0 16 16","chevron-down-filled":"0 0 16 21","chevron-down":"0 0 16 18","chevron-left":"0 0 10 16","chevron-right":"0 0 10 17","chevron-up-down-filled":"0 0 12 20","chevron-up-filled":"0 0 16 21","chevron-up":"0 0 16 18","circle-check-outline":"0 0 16 16","circle-check":"0 0 16 16","circle":"0 0 16 16","circle+":"0 0 16 16","circles":"0 0 16 16","circlex":"0 0 16 16","click-to-view":"0 0 12 16","clicks":"0 0 10 16","clipboard-outline":"0 0 12 16","clipboard":"0 0 12 16","clock":"0 0 16 16","closed-captioning":"0 0 16 16","cloud":"0 0 16 13","code":"0 0 18 16","columns":"0 0 16 16","comment-alt-outline":"0 0 16 15","comment-alt":"0 0 16 15","comment-lines-alt-outline":"0 0 16 16","comment":"0 0 16 13","compact-density":"0 0 16 16","compact-indicator":"0 0 16 16","comparison":"0 0 16 14","competitor":"0 0 14 16","compose":"0 0 16 16","content-suggestions":"0 0 16 16","credit-card":"0 0 16 14","crop":"0 0 16 16","crown":"0 0 16 16","dashboard":"0 0 16 14","deconstructed-negative-sentiment":"0 0 18 18","deconstructed-neutral-sentiment":"0 0 18 18","deconstructed-positive-sentiment":"0 0 18 18","discovery":"0 0 16 16","dislike-outline":"0 0 15 16","dislike":"0 0 16 16","dm-link-outline":"0 0 16 16","dm-link":"0 0 16 16","dotdotdot":"0 0 16 16","download":"0 0 16 16","drafts-outline":"0 0 12 16","drafts":"0 0 12 16","dropbox":"0 0 18 16","duplicate-outline":"0 0 14 16","duplicate":"0 0 14 16","emoji-outline":"0 0 16 16","emoji":"0 0 16 16","empty-image":"0 0 16 18","engagement-per-post":"0 0 16 16","engagements":"0 0 16 15","error":"0 0 16 16","exchange-alt":"0 0 16 16","expanded-indicator":"0 0 16 16","export":"0 0 14 17","extended-circles":"0 0 16 16","external-link-alt":"0 0 16 16","external-link":"0 0 16 16","extreme-negative-sentiment":"0 0 16 16","eye-outline":"0 0 18 16","eye-slash-outline":"0 0 20 16","eye-slash":"0 0 20 16","eye":"0 0 18 16","facebook-audience-network":"0 0 16 16","facebook-branded-content-outline":"0 0 18 15","facebook-branded-content":"0 0 18 15","facebook-groups":"0 0 16 16","facebook":"0 0 16 16","fb-reactions-angry":"0 0 16 16","fb-reactions-haha":"0 0 16 16","fb-reactions-like":"0 0 16 16","fb-reactions-love":"0 0 16 16","fb-reactions-sad":"0 0 16 16","fb-reactions-wow":"0 0 16 16","feedly":"0 0 16 15","feeds":"0 0 16 15","female":"0 0 11 18","file-chart-line":"0 0 12 16","file-edit":"0 0 12 16","file-times-solid":"0 0 12 16","filter":"0 0 16 16","flag-outline":"0 0 16 16","flag":"0 0 16 16","flat-negative-sentiment-outline":"0 0 18 18","flat-negative-sentiment":"0 0 18 18","flat-neutral-sentiment-outline":"0 0 18 18","flat-neutral-sentiment":"0 0 18 18","flat-positive-sentiment-outline":"0 0 18 18","flat-positive-sentiment":"0 0 18 18","folder-open":"0 0 16 15","folder":"0 0 16 16","follow-outline":"0 0 20 16","follow":"0 0 20 16","follower-increase":"0 0 19 16","following":"0 0 20 16","font":"0 0 18 16","full-access":"0 0 16 16","gear":"0 0 16 16","gears":"0 0 16 16","glassdoor":"0 0 16 16","glasses":"0 0 18 14","globe":"0 0 16 16","google-analytics-color":"0 0 14 18","google-business-messages":"0 0 16 16","google-drive":"0 0 16 14","google-my-business":"0 0 16 14","grip":"0 0 8 18","h1":"0 0 16 16","h2":"0 0 16 16","hamburger":"0 0 16 18","hashtag":"0 0 16 16","headset":"0 0 16 16","heart-outline":"0 0 16 16","heart":"0 0 16 16","heartbeat":"0 0 18 16","help":"0 0 16 16","hiking":"0 0 16 16","history":"0 0 16 16","home":"0 0 16 15","hourglass":"0 0 12 16","hubspot":"0 0 16 16","image-caption":"0 0 16 14","image":"0 0 16 16","images":"0 0 16 15","impressions-per-post":"0 0 16 16","impressions":"0 0 18 16","inactive-listener":"0 0 16 12","inbox-action":"0 0 16 16","inbox-views":"0 0 16 13","inbox":"0 0 16 14","indicator":"0 0 16 16","industry":"0 0 14 16","info":"0 0 16 16","instagram":"0 0 16 16","internal-activity-outline":"0 0 16 16","internal-activity":"0 0 16 16","italic":"0 0 16 16","key":"0 0 16 16","keyboard":"0 0 18 16","laptop-phone":"0 0 16 16","large-density":"0 0 16 16","lift":"0 0 23 16","like-outline":"0 0 15 16","like":"0 0 16 16","link":"0 0 16 16","linkedin-audience-network":"0 0 16 16","linkedin":"0 0 16 16","list-ol":"0 0 16 16","listening":"0 0 14 16","lists":"0 0 16 16","location-outline":"0 0 12 16","location":"0 0 12 16","lock":"0 0 14 16","magic-wand":"0 0 17 16","male":"0 0 16 20","marketo":"0 0 16 18","mention":"0 0 16 16","message-preview-outline":"0 0 18 16","message-preview":"0 0 18 16","message":"0 0 16 16","messages-outline":"0 0 16 16","messages":"0 0 16 16","messenger":"0 0 16 16","metric-table":"0 0 16 16","microsoft-dynamics":"0 0 16 16","minus":"0 0 16 16","mobile":"0 0 10 16","monitor":"0 0 12 16","moon":"0 0 15 16","negative-sentiment":"0 0 16 16","neutral-positive-sentiment":"0 0 16 16","neutral-sentiment":"0 0 16 16","new-trend":"0 0 12 16","newspaper":"0 0 16 16","no-access":"0 0 16 16","notepad":"0 0 12 16","notifications-publishing-outline":"0 0 16 16","notifications-publishing":"0 0 16 16","notifications":"0 0 14 16","offline":"0 0 18 15","online":"0 0 18 15","paid-promotion-outline":"0 0 16 16","paid-promotion":"0 0 16 16","paid":"0 0 14 16","paint":"0 0 18 16","palette":"0 0 16 16","paperclip":"0 0 14 16","pause":"0 0 16 18","pencil-outline":"0 0 16 16","pencil":"0 0 16 16","person":"0 0 14 16","phone":"0 0 16 16","pinterest-boards-outline":"0 0 14 16","pinterest-boards":"0 0 14 16","pinterest":"0 0 16 16","play-circle":"0 0 16 16","play":"0 0 14 16","plus":"0 0 16 18","positive-sentiment":"0 0 16 16","power-up-outline":"0 0 12 16","power-up":"0 0 10 16","profile-connect":"0 0 16 16","profile-disconnect":"0 0 16 16","publishing-outline":"0 0 16 16","publishing":"0 0 16 16","puzzle-piece":"0 0 18 16","qr-code":"0 0 16 16","queue":"0 0 16 16","recommendation":"0 0 16 16","reddit-alien":"0 0 16 16","reddit":"0 0 16 16","referrals":"0 0 16 16","refresh":"0 0 16 16","rejected":"0 0 16 16","reply-outline":"0 0 16 16","reply":"0 0 16 16","reporting-period":"0 0 14 16","reporting":"0 0 16 16","reports-home":"0 0 16 16","reports":"0 0 16 15","retweet":"0 0 18 16","rss":"0 0 16 16","sales":"0 0 9 16","salesforce":"0 0 20 16","save-assets":"0 0 16 16","saved-messages":"0 0 16 16","saved-reply-outline":"0 0 16 12","saved-reply":"0 0 16 12","search":"0 0 16 16","sent-message-outline":"0 0 16 14","sent-message":"0 0 16 14","share":"0 0 16 14","shopify":"0 0 16 18","show-navigation":"0 0 18 14","slack":"0 0 16 16","small-density":"0 0 16 16","smiley":"0 0 16 16","some-access":"0 0 16 16","sparkles":"0 0 16 16","spike-alert":"0 0 16 16","star-half-alt-solid":"0 0 18 16","star-of-life":"0 0 16 16","star-outline":"0 0 18 16","star":"0 0 18 16","sticky-note-outline":"0 0 16 16","sticky-note":"0 0 16 16","stories":"0 0 16 17","story":"0 0 16 16","suggestions":"0 0 11 16","sun":"0 0 16 16","tag-outline":"0 0 16 16","tag":"0 0 16 16","targeting-outline":"0 0 16 16","targeting":"0 0 16 16","tasks-outline":"0 0 12 16","tasks":"0 0 12 16","team-conversation-outline":"0 0 16 18","team-conversation":"0 0 16 18","team":"0 0 18 16","text-asset":"0 0 16 16","text":"0 0 8 16","tiktok":"0 0 16 18","times":"0 0 16 22","trash-can-outline":"0 0 14 16","trash-can":"0 0 14 16","trend-down":"0 0 18 18","trend-neutral":"0 0 20 18","trend-up":"0 0 18 18","trends":"0 0 16 17","triangle-black":"0 0 16 16","triangle":"0 0 16 16","tripadvisor-circle-outline":"0 0 16 16","tripadvisor-circle":"0 0 16 16","tripadvisor":"0 0 16 16","trophy-outline":"0 0 18 16","tumblr":"0 0 16 16","twitter-audience-network":"0 0 17 16","twitter":"0 0 17 16","unfollow-outline":"0 0 20 16","unfollow":"0 0 20 16","unlink":"0 0 16 16","unlock":"0 0 14 16","upload":"0 0 16 17","user-circle":"0 0 16 16","users":"0 0 18 16","verified":"0 0 16 16","video-camera-story":"0 0 18 15","video-camera":"0 0 18 16","vip":"0 0 16 16","weight":"0 0 16 16","whatsapp":"0 0 16 16","window-maximize":"0 0 16 16","window-minimize":"0 0 16 16","window-regular":"0 0 16 16","window-restore":"0 0 16 16","woocommerce":"0 0 18 16","x":"0 0 16 18","yelp-full-star":"0 0 16 16","yelp-half-star":"0 0 16 16","yelp":"0 0 14 16","youtube":"0 0 16 15","zendesk":"0 0 16 16"};
package/__flow__/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // @flow
2
2
  export type { EnumIconNames } from "./EnumIconNames";
3
3
  export type { TypeTheme } from "./types/theme.flow";
4
+ export * from "./systemProps";
4
5
  export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
5
6
  export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
6
7
  export { default as theme } from "./themes/light/theme";
@@ -0,0 +1,28 @@
1
+ // @flow strict-local
2
+
3
+ import { background } from "styled-system";
4
+ import type {
5
+ BackgroundImageProperty,
6
+ BackgroundPositionProperty,
7
+ BackgroundProperty,
8
+ BackgroundRepeatProperty,
9
+ BackgroundSizeProperty,
10
+ } from "csstype";
11
+
12
+ import type {
13
+ StyledSystemStyleFn,
14
+ TypeResponsiveBaseSystemProp,
15
+ } from "./types.flow.js";
16
+
17
+ // https://styled-system.com/table#background
18
+
19
+ export type TypeBackgroundSystemProps = $ReadOnly<{|
20
+ background?: TypeResponsiveBaseSystemProp<BackgroundProperty<void>>,
21
+ backgroundImage?: TypeResponsiveBaseSystemProp<BackgroundImageProperty>,
22
+ backgroundSize?: TypeResponsiveBaseSystemProp<BackgroundSizeProperty<void>>,
23
+ // eslint-disable-next-line prettier/prettier
24
+ backgroundPosition?: TypeResponsiveBaseSystemProp<BackgroundPositionProperty<void>>,
25
+ backgroundRepeat?: TypeResponsiveBaseSystemProp<BackgroundRepeatProperty>,
26
+ |}>;
27
+
28
+ export const backgroundSystemProps: StyledSystemStyleFn = background;