@sproutsocial/racine 14.2.0 → 15.0.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 (339) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/__flow__/Card/Card.flow.js +1 -17
  3. package/__flow__/Card/CardTypes.flow.js +66 -0
  4. package/__flow__/Card/index.flow.js +2 -1
  5. package/__flow__/EnumIconNames.flow.js +1 -1
  6. package/__flow__/Icon/Icon.flow.js +3 -1
  7. package/__flow__/IconViewBoxes.js +2 -0
  8. package/__flow__/PartnerLogo/PartnerLogo.flow.js +3 -3
  9. package/__flow__/index.flow.js +1 -1
  10. package/__flow__/systemProps/{background.js → background.flow.js} +1 -1
  11. package/__flow__/systemProps/{border.js → border.flow.js} +1 -1
  12. package/__flow__/systemProps/{color.js → color.flow.js} +2 -2
  13. package/__flow__/systemProps/{custom.js → custom.flow.js} +1 -1
  14. package/__flow__/systemProps/{flexbox.js → flexbox.flow.js} +1 -1
  15. package/__flow__/systemProps/{grid.js → grid.flow.js} +1 -1
  16. package/__flow__/systemProps/index.flow.js +16 -0
  17. package/__flow__/systemProps/{layout.js → layout.flow.js} +1 -1
  18. package/__flow__/systemProps/{position.js → position.flow.js} +1 -1
  19. package/__flow__/systemProps/{shadow.js → shadow.flow.js} +1 -1
  20. package/__flow__/systemProps/{space.js → space.flow.js} +1 -1
  21. package/__flow__/systemProps/{systemProps.js → systemProps.flow.js} +13 -13
  22. package/__flow__/systemProps/{typography.js → typography.flow.js} +1 -1
  23. package/__flow__/systemProps/{variant.js → variant.flow.js} +1 -1
  24. package/__flow__/types/shared.flow.js +5 -1
  25. package/commonjs/Badge/Badge.js +2 -1
  26. package/commonjs/Banner/Banner.js +2 -1
  27. package/commonjs/Breadcrumb/Breadcrumb.js +2 -1
  28. package/commonjs/Card/Card.js +71 -26
  29. package/commonjs/Card/CardTypes.flow.js +6 -0
  30. package/commonjs/Card/index.flow.js +11 -0
  31. package/commonjs/Card/styles.js +102 -22
  32. package/commonjs/Card/subComponents.js +48 -0
  33. package/commonjs/Card/utils.js +56 -0
  34. package/commonjs/Checkbox/styles.js +6 -5
  35. package/commonjs/DatePicker/common.js +2 -1
  36. package/commonjs/Drawer/Drawer.js +9 -4
  37. package/commonjs/Icon/Icon.js +33 -10
  38. package/commonjs/IconViewBoxes.js +2 -0
  39. package/commonjs/IllustrationViewBoxes.d.js +5 -0
  40. package/commonjs/Indicator/Indicator.js +2 -1
  41. package/commonjs/Input/Input.js +2 -1
  42. package/commonjs/Listbox/Listbox.js +2 -1
  43. package/commonjs/Loader/styles.js +17 -12
  44. package/commonjs/LogoViewBoxes.d.js +5 -0
  45. package/commonjs/PartnerLogo/PartnerLogo.js +14 -13
  46. package/commonjs/PartnerLogo/PartnerLogoTypes.js +12 -1
  47. package/commonjs/PartnerLogo/index.js +0 -12
  48. package/commonjs/PartnerLogo/styles.js +1 -1
  49. package/commonjs/Select/Select.js +2 -1
  50. package/commonjs/Switch/Switch.js +1 -0
  51. package/commonjs/TableHeaderCell/TableHeaderCell.js +2 -1
  52. package/commonjs/TableRowAccordion/TableRowAccordion.js +6 -2
  53. package/commonjs/Toast/Toast.js +40 -34
  54. package/commonjs/ToggleHint/ToggleHint.js +4 -2
  55. package/commonjs/Token/Token.js +16 -2
  56. package/commonjs/Token/styles.js +1 -1
  57. package/commonjs/TokenInput/TokenInput.js +3 -1
  58. package/commonjs/index.flow.js +125 -125
  59. package/commonjs/systemProps/index.flow.js +159 -0
  60. package/commonjs/systemProps/{systemProps.js → systemProps.flow.js} +12 -12
  61. package/commonjs/themes/dark/theme.js +1 -1
  62. package/commonjs/themes/light/theme.js +1 -1
  63. package/commonjs/types/shared.flow.js +6 -1
  64. package/commonjs/utils/index.js +27 -2
  65. package/dist/icon.svg +1 -1
  66. package/dist/iconList.js +1 -1
  67. package/dist/themes/dark/theme.scss +1 -1
  68. package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +1 -1
  69. package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +1 -1
  70. package/dist/themes/light/theme.scss +1 -1
  71. package/dist/types/Avatar/Avatar.d.ts +2 -2
  72. package/dist/types/Avatar/Avatar.d.ts.map +1 -1
  73. package/dist/types/Badge/Badge.d.ts +2 -1
  74. package/dist/types/Badge/Badge.d.ts.map +1 -1
  75. package/dist/types/Banner/Banner.d.ts +2 -1
  76. package/dist/types/Banner/Banner.d.ts.map +1 -1
  77. package/dist/types/Banner/styles.d.ts +3 -2
  78. package/dist/types/Banner/styles.d.ts.map +1 -1
  79. package/dist/types/Box/Box.d.ts +1 -1
  80. package/dist/types/Box/Box.d.ts.map +1 -1
  81. package/dist/types/Breadcrumb/Breadcrumb.d.ts +3 -2
  82. package/dist/types/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  83. package/dist/types/Button/Button.d.ts +2 -1
  84. package/dist/types/Button/Button.d.ts.map +1 -1
  85. package/dist/types/Card/Card.d.ts +16 -2
  86. package/dist/types/Card/Card.d.ts.map +1 -1
  87. package/dist/types/Card/CardTypes.d.ts +48 -11
  88. package/dist/types/Card/CardTypes.d.ts.map +1 -1
  89. package/dist/types/Card/__tests__/CardTypes.d.ts +2 -0
  90. package/dist/types/Card/__tests__/CardTypes.d.ts.map +1 -0
  91. package/dist/types/Card/styles.d.ts +13 -6
  92. package/dist/types/Card/styles.d.ts.map +1 -1
  93. package/dist/types/Card/subComponents.d.ts +17 -0
  94. package/dist/types/Card/subComponents.d.ts.map +1 -0
  95. package/dist/types/Card/utils.d.ts +16 -0
  96. package/dist/types/Card/utils.d.ts.map +1 -0
  97. package/dist/types/CharacterCounter/CharacterCounter.d.ts +1 -1
  98. package/dist/types/ChartLegend/ChartLegend.d.ts +2 -1
  99. package/dist/types/ChartLegend/ChartLegend.d.ts.map +1 -1
  100. package/dist/types/Checkbox/Checkbox.d.ts +1 -1
  101. package/dist/types/Checkbox/styles.d.ts +7 -5
  102. package/dist/types/Checkbox/styles.d.ts.map +1 -1
  103. package/dist/types/Collapsible/Collapsible.d.ts +4 -3
  104. package/dist/types/Collapsible/Collapsible.d.ts.map +1 -1
  105. package/dist/types/Collapsible/styles.d.ts +1 -1
  106. package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts +2 -1
  107. package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  108. package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts +2 -1
  109. package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts.map +1 -1
  110. package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts +2 -1
  111. package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts.map +1 -1
  112. package/dist/types/DatePicker/common.d.ts +2 -1
  113. package/dist/types/DatePicker/common.d.ts.map +1 -1
  114. package/dist/types/DatePicker/styles.d.ts +1 -1
  115. package/dist/types/Drawer/Drawer.d.ts +3 -3
  116. package/dist/types/Drawer/Drawer.d.ts.map +1 -1
  117. package/dist/types/Drawer/SlideTransition.d.ts +1 -1
  118. package/dist/types/Drawer/SlideTransition.d.ts.map +1 -1
  119. package/dist/types/Drawer/styles.d.ts +1 -1
  120. package/dist/types/Drawer/styles.d.ts.map +1 -1
  121. package/dist/types/EmptyState/EmptyState.d.ts +2 -1
  122. package/dist/types/EmptyState/EmptyState.d.ts.map +1 -1
  123. package/dist/types/EnumIconNames.d.ts +1 -1
  124. package/dist/types/EnumIconNames.d.ts.map +1 -1
  125. package/dist/types/Fieldset/Fieldset.d.ts +4 -3
  126. package/dist/types/Fieldset/Fieldset.d.ts.map +1 -1
  127. package/dist/types/Fieldset/styles.d.ts +1 -1
  128. package/dist/types/Fieldset/styles.d.ts.map +1 -1
  129. package/dist/types/FormField/FormField.d.ts +2 -1
  130. package/dist/types/FormField/FormField.d.ts.map +1 -1
  131. package/dist/types/Icon/Icon.d.ts +4 -2
  132. package/dist/types/Icon/Icon.d.ts.map +1 -1
  133. package/dist/types/Icon/IconTypes.d.ts +3 -2
  134. package/dist/types/Icon/IconTypes.d.ts.map +1 -1
  135. package/dist/types/Image/Image.d.ts +1 -1
  136. package/dist/types/Indicator/Indicator.d.ts +1 -1
  137. package/dist/types/Input/Input.d.ts +2 -2
  138. package/dist/types/KeyboardKey/KeyboardKey.d.ts +1 -1
  139. package/dist/types/Label/Label.d.ts +1 -1
  140. package/dist/types/Link/Link.d.ts +2 -1
  141. package/dist/types/Link/Link.d.ts.map +1 -1
  142. package/dist/types/Link/styles.d.ts +2 -1
  143. package/dist/types/Link/styles.d.ts.map +1 -1
  144. package/dist/types/Listbox/Listbox.d.ts +11 -10
  145. package/dist/types/Listbox/Listbox.d.ts.map +1 -1
  146. package/dist/types/Listbox/ListboxTypes.d.ts +1 -1
  147. package/dist/types/Listbox/ListboxTypes.d.ts.map +1 -1
  148. package/dist/types/Loader/Loader.d.ts +1 -1
  149. package/dist/types/Loader/styles.d.ts.map +1 -1
  150. package/dist/types/LoaderButton/LoaderButton.d.ts +2 -1
  151. package/dist/types/LoaderButton/LoaderButton.d.ts.map +1 -1
  152. package/dist/types/Menu/Menu.d.ts +14 -13
  153. package/dist/types/Menu/Menu.d.ts.map +1 -1
  154. package/dist/types/Menu/MenuTypes.d.ts +1 -1
  155. package/dist/types/Menu/MenuTypes.d.ts.map +1 -1
  156. package/dist/types/Menu/styles.d.ts +2 -2
  157. package/dist/types/Menu/styles.d.ts.map +1 -1
  158. package/dist/types/Menu/utils/descendants.d.ts +1 -1
  159. package/dist/types/Menu/utils/descendants.d.ts.map +1 -1
  160. package/dist/types/Message/Message.d.ts +8 -8
  161. package/dist/types/Message/styles.d.ts +5 -5
  162. package/dist/types/Message/styles.d.ts.map +1 -1
  163. package/dist/types/Modal/Modal.d.ts +5 -5
  164. package/dist/types/Modal/styles.d.ts +5 -5
  165. package/dist/types/Modal/styles.d.ts.map +1 -1
  166. package/dist/types/Numeral/Numeral.d.ts +2 -1
  167. package/dist/types/Numeral/Numeral.d.ts.map +1 -1
  168. package/dist/types/Numeral/styles.d.ts +3 -2
  169. package/dist/types/Numeral/styles.d.ts.map +1 -1
  170. package/dist/types/OverflowList/OverflowList.d.ts +2 -1
  171. package/dist/types/OverflowList/OverflowList.d.ts.map +1 -1
  172. package/dist/types/OverflowList/styles.d.ts +2 -1
  173. package/dist/types/OverflowList/styles.d.ts.map +1 -1
  174. package/dist/types/PartnerLogo/PartnerLogo.d.ts +2 -1
  175. package/dist/types/PartnerLogo/PartnerLogo.d.ts.map +1 -1
  176. package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +12 -3
  177. package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts.map +1 -1
  178. package/dist/types/PartnerLogo/index.d.ts +0 -1
  179. package/dist/types/PartnerLogo/index.d.ts.map +1 -1
  180. package/dist/types/Popout/Popout.d.ts +3 -2
  181. package/dist/types/Popout/Popout.d.ts.map +1 -1
  182. package/dist/types/Popout/PopoutTypes.d.ts +1 -1
  183. package/dist/types/Popout/PopoutTypes.d.ts.map +1 -1
  184. package/dist/types/Radio/Radio.d.ts +1 -1
  185. package/dist/types/Radio/styles.d.ts +2 -1
  186. package/dist/types/Radio/styles.d.ts.map +1 -1
  187. package/dist/types/SegmentedControl/SegmentedControl.d.ts +3 -2
  188. package/dist/types/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  189. package/dist/types/SegmentedControl/styles.d.ts +3 -3
  190. package/dist/types/SegmentedControl/styles.d.ts.map +1 -1
  191. package/dist/types/Select/Select.d.ts +1 -1
  192. package/dist/types/Select/Select.d.ts.map +1 -1
  193. package/dist/types/Skeleton/Skeleton.d.ts +1 -1
  194. package/dist/types/Skeleton/Skeleton.d.ts.map +1 -1
  195. package/dist/types/SpotIllustration/SpotIllustration.d.ts +2 -1
  196. package/dist/types/SpotIllustration/SpotIllustration.d.ts.map +1 -1
  197. package/dist/types/Stack/Stack.d.ts +2 -1
  198. package/dist/types/Stack/Stack.d.ts.map +1 -1
  199. package/dist/types/Switch/Switch.d.ts +1 -1
  200. package/dist/types/Table/Table.d.ts +8 -7
  201. package/dist/types/Table/Table.d.ts.map +1 -1
  202. package/dist/types/TableCell/TableCell.d.ts +1 -1
  203. package/dist/types/TableCell/TableCellTypes.d.ts +1 -1
  204. package/dist/types/TableCell/TableCellTypes.d.ts.map +1 -1
  205. package/dist/types/TableHeaderCell/TableHeaderCell.d.ts +2 -2
  206. package/dist/types/TableHeaderCell/TableHeaderCell.d.ts.map +1 -1
  207. package/dist/types/TableRowAccordion/TableRowAccordion.d.ts +1 -1
  208. package/dist/types/TableRowAccordion/TableRowAccordion.d.ts.map +1 -1
  209. package/dist/types/Tabs/Tabs.d.ts +2 -2
  210. package/dist/types/Tabs/styles.d.ts +2 -1
  211. package/dist/types/Tabs/styles.d.ts.map +1 -1
  212. package/dist/types/Text/Text.d.ts +2 -1
  213. package/dist/types/Text/Text.d.ts.map +1 -1
  214. package/dist/types/Textarea/Textarea.d.ts +1 -1
  215. package/dist/types/ThemeProvider/index.d.ts +1 -1
  216. package/dist/types/ThemeProvider/index.d.ts.map +1 -1
  217. package/dist/types/Toast/Toast.d.ts +2 -1
  218. package/dist/types/Toast/Toast.d.ts.map +1 -1
  219. package/dist/types/Toast/styles.d.ts +3 -3
  220. package/dist/types/Toast/styles.d.ts.map +1 -1
  221. package/dist/types/ToggleHint/ToggleHint.d.ts +2 -2
  222. package/dist/types/ToggleHint/ToggleHint.d.ts.map +1 -1
  223. package/dist/types/Token/Token.d.ts +2 -1
  224. package/dist/types/Token/Token.d.ts.map +1 -1
  225. package/dist/types/TokenInput/TokenInput.d.ts +1 -1
  226. package/dist/types/TokenInput/TokenInput.d.ts.map +1 -1
  227. package/dist/types/Tooltip/Tooltip.d.ts +2 -1
  228. package/dist/types/Tooltip/Tooltip.d.ts.map +1 -1
  229. package/dist/types/Tooltip/TooltipTypes.d.ts +1 -1
  230. package/dist/types/Tooltip/TooltipTypes.d.ts.map +1 -1
  231. package/dist/types/Tooltip/styles.d.ts +1 -1
  232. package/dist/types/Tooltip/styles.d.ts.map +1 -1
  233. package/dist/types/systemProps/index.d.ts +3 -79
  234. package/dist/types/systemProps/index.d.ts.map +1 -1
  235. package/dist/types/types/styled-components.d.ts +3 -3
  236. package/dist/types/types/styled-components.d.ts.map +1 -1
  237. package/dist/types/utils/index.d.ts +7 -0
  238. package/dist/types/utils/index.d.ts.map +1 -1
  239. package/dist/types/utils/innerText.d.ts.map +1 -1
  240. package/icons/advocacy-outline.svg +2 -2
  241. package/icons/comment-ai-outline.svg +2 -2
  242. package/icons/comment-ai.svg +1 -1
  243. package/icons/dropbox.svg +2 -2
  244. package/icons/facebook-groups.svg +2 -2
  245. package/icons/facebook.svg +2 -2
  246. package/icons/feedly.svg +2 -2
  247. package/icons/flat-negative-sentiment-outline.svg +1 -1
  248. package/icons/flat-neutral-sentiment-outline.svg +1 -1
  249. package/icons/flat-positive-sentiment-outline.svg +1 -1
  250. package/icons/glassdoor.svg +2 -2
  251. package/icons/hand-sparkle-outline.svg +6 -0
  252. package/icons/hand-sparkle.svg +3 -0
  253. package/icons/instagram.svg +2 -2
  254. package/icons/linkedin.svg +2 -2
  255. package/icons/messenger.svg +2 -2
  256. package/icons/pinterest.svg +2 -2
  257. package/icons/reddit-alien.svg +2 -2
  258. package/icons/reddit.svg +2 -2
  259. package/icons/reels-outline.svg +1 -1
  260. package/icons/salesforce.svg +2 -2
  261. package/icons/send-again-outline.svg +1 -1
  262. package/icons/send-again.svg +1 -1
  263. package/icons/tasks-check.svg +1 -1
  264. package/icons/tumblr.svg +2 -2
  265. package/icons/twitter.svg +2 -2
  266. package/icons/youtube.svg +2 -2
  267. package/icons/zendesk.svg +2 -2
  268. package/lib/Badge/Badge.js +2 -1
  269. package/lib/Banner/Banner.js +2 -1
  270. package/lib/Breadcrumb/Breadcrumb.js +2 -1
  271. package/lib/Card/Card.js +73 -28
  272. package/lib/Card/CardTypes.flow.js +1 -0
  273. package/lib/Card/index.flow.js +2 -1
  274. package/lib/Card/styles.js +96 -20
  275. package/lib/Card/subComponents.js +37 -0
  276. package/lib/Card/utils.js +46 -0
  277. package/lib/Checkbox/styles.js +6 -5
  278. package/lib/DatePicker/common.js +2 -1
  279. package/lib/Drawer/Drawer.js +9 -4
  280. package/lib/Icon/Icon.js +33 -10
  281. package/lib/IconViewBoxes.js +2 -0
  282. package/lib/IllustrationViewBoxes.d.js +1 -0
  283. package/lib/Indicator/Indicator.js +2 -1
  284. package/lib/Input/Input.js +2 -1
  285. package/lib/Listbox/Listbox.js +2 -1
  286. package/lib/Loader/styles.js +17 -12
  287. package/lib/LogoViewBoxes.d.js +1 -0
  288. package/lib/PartnerLogo/PartnerLogo.js +14 -13
  289. package/lib/PartnerLogo/PartnerLogoTypes.js +8 -1
  290. package/lib/PartnerLogo/index.js +1 -2
  291. package/lib/PartnerLogo/styles.js +1 -1
  292. package/lib/Select/Select.js +2 -1
  293. package/lib/Switch/Switch.js +1 -0
  294. package/lib/TableHeaderCell/TableHeaderCell.js +2 -1
  295. package/lib/TableRowAccordion/TableRowAccordion.js +6 -2
  296. package/lib/Toast/Toast.js +40 -34
  297. package/lib/ToggleHint/ToggleHint.js +4 -2
  298. package/lib/Token/Token.js +16 -2
  299. package/lib/Token/styles.js +1 -1
  300. package/lib/TokenInput/TokenInput.js +3 -1
  301. package/lib/index.flow.js +1 -1
  302. package/lib/systemProps/index.flow.js +14 -0
  303. package/lib/systemProps/index.js +1 -45
  304. package/lib/systemProps/systemProps.flow.js +14 -0
  305. package/lib/themes/dark/theme.js +1 -1
  306. package/lib/themes/light/theme.js +1 -1
  307. package/lib/types/shared.flow.js +1 -0
  308. package/lib/utils/index.js +22 -1
  309. package/package.json +16 -12
  310. package/__flow__/systemProps/index.js +0 -16
  311. package/dist/types/PartnerLogo/TypePartnerNames.d.ts +0 -2
  312. package/dist/types/PartnerLogo/TypePartnerNames.d.ts.map +0 -1
  313. package/lib/systemProps/systemProps.js +0 -14
  314. /package/commonjs/{PartnerLogo/TypePartnerNames.js → IconViewBoxes.d.js} +0 -0
  315. /package/commonjs/systemProps/{background.js → background.flow.js} +0 -0
  316. /package/commonjs/systemProps/{border.js → border.flow.js} +0 -0
  317. /package/commonjs/systemProps/{color.js → color.flow.js} +0 -0
  318. /package/commonjs/systemProps/{custom.js → custom.flow.js} +0 -0
  319. /package/commonjs/systemProps/{flexbox.js → flexbox.flow.js} +0 -0
  320. /package/commonjs/systemProps/{grid.js → grid.flow.js} +0 -0
  321. /package/commonjs/systemProps/{layout.js → layout.flow.js} +0 -0
  322. /package/commonjs/systemProps/{position.js → position.flow.js} +0 -0
  323. /package/commonjs/systemProps/{shadow.js → shadow.flow.js} +0 -0
  324. /package/commonjs/systemProps/{space.js → space.flow.js} +0 -0
  325. /package/commonjs/systemProps/{typography.js → typography.flow.js} +0 -0
  326. /package/commonjs/systemProps/{variant.js → variant.flow.js} +0 -0
  327. /package/lib/{PartnerLogo/TypePartnerNames.js → IconViewBoxes.d.js} +0 -0
  328. /package/lib/systemProps/{background.js → background.flow.js} +0 -0
  329. /package/lib/systemProps/{border.js → border.flow.js} +0 -0
  330. /package/lib/systemProps/{color.js → color.flow.js} +0 -0
  331. /package/lib/systemProps/{custom.js → custom.flow.js} +0 -0
  332. /package/lib/systemProps/{flexbox.js → flexbox.flow.js} +0 -0
  333. /package/lib/systemProps/{grid.js → grid.flow.js} +0 -0
  334. /package/lib/systemProps/{layout.js → layout.flow.js} +0 -0
  335. /package/lib/systemProps/{position.js → position.flow.js} +0 -0
  336. /package/lib/systemProps/{shadow.js → shadow.flow.js} +0 -0
  337. /package/lib/systemProps/{space.js → space.flow.js} +0 -0
  338. /package/lib/systemProps/{typography.js → typography.flow.js} +0 -0
  339. /package/lib/systemProps/{variant.js → variant.flow.js} +0 -0
@@ -91,7 +91,8 @@ export var ListboxButton = function ListboxButton(_ref2) {
91
91
  size: restProps.size
92
92
  }, /*#__PURE__*/React.createElement(Icon, {
93
93
  name: "chevron-down",
94
- fixedWidth: true
94
+ fixedWidth: true,
95
+ "aria-hidden": true
95
96
  })));
96
97
  };
97
98
  Listbox.Option = Listbox.Item = Menu.Item;
@@ -1,28 +1,33 @@
1
- import { rgba } from 'polished';
2
1
  import styled, { css, keyframes } from 'styled-components';
3
2
  import { visuallyHidden } from "../utils/mixins";
4
3
  import { COMMON } from "../utils/system-props";
5
4
  var getSize = function getSize(size) {
6
- var spinnerSize = Math.ceil(size * 0.9);
7
- var borderWidth = Math.ceil(size * 0.1);
8
- return css(["width:", "px;height:", "px;&:after{width:", "px;height:", "px;box-sizing:border-box;border-width:", "px;}.no-cssanimations &::after{background-size:", "px;}"], size, size, spinnerSize, spinnerSize, borderWidth, spinnerSize);
9
- };
10
- var getColor = function getColor(color) {
11
- return css(["&:after{border-color:", " ", " ", " ", ";}"], rgba(color, 0.3), rgba(color, 0.3), rgba(color, 0.7), rgba(color, 0.7));
5
+ var spinnerSize = Math.round(size * 1);
6
+ var borderWidth = Math.round(size * 0.1);
7
+ return css(["width:", "px;height:", "px;&:after{width:", "px;height:", "px;box-sizing:border-box;border-width:", "px;box-shadow:", ";}.no-cssanimations &::after{background-size:", "px;}"], size, size, spinnerSize, spinnerSize, borderWidth, function (_ref) {
8
+ var theme = _ref.theme;
9
+ return "inset 0 0 0 2px ".concat(theme.colors.neutral[600]);
10
+ }, spinnerSize);
12
11
  };
13
12
  var spin = keyframes(["from{transform:translate(-50%,-50%) rotate(0deg);}to{transform:translate(-50%,-50%) rotate(360deg);}"]);
14
- var delay = keyframes(["0%{opacity:0;}80%{opacity:0;}100%{opacity:1;}"]);
13
+ var delayAnimation = keyframes(["0%{opacity:0;}80%{opacity:0;}100%{opacity:1;}"]);
15
14
  var Container = styled.div.attrs({
16
15
  className: 'Loader'
17
16
  }).withConfig({
18
17
  displayName: "styles__Container",
19
18
  componentId: "sc-1edimrk-0"
20
- })(["position:relative;margin:0 auto;overflow:hidden;&:after{position:absolute;top:50%;left:50%;border-style:solid;border-radius:50%;content:'';transition:opacity 250ms;animation:", ";}", " ", " ", ""], function (props) {
21
- return props.delay ? css(["", " 2.25s infinite linear,", " 2s 1"], spin, delay) : css(["", " 2.25s infinite linear"], spin);
19
+ })(["position:relative;margin:0 auto;padding:0;overflow:hidden;border-radius:100%;box-shadow:", ";animation:", ";&:after{position:absolute;top:50%;left:50%;background:transparent;border-style:solid;border-radius:100%;content:'';transition:opacity 250ms;border-color:", ";animation:", ";}", " ", ""], function (_ref2) {
20
+ var theme = _ref2.theme;
21
+ return "0 0 0 2px ".concat(theme.colors.neutral[600]);
22
22
  }, function (props) {
23
- return props.small ? getSize(20) : getSize(40);
23
+ return props.delay ? css(["", " 2s 1;"], delayAnimation) : 'none';
24
+ }, function (_ref3) {
25
+ var theme = _ref3.theme;
26
+ return "".concat(theme.colors.neutral[0], " ").concat(theme.colors.neutral[0], " ").concat(theme.colors.neutral[600], " ").concat(theme.colors.neutral[600]);
24
27
  }, function (props) {
25
- return props.dark ? getColor(props.theme.colors.neutral[400]) : getColor(props.theme.colors.neutral[0]);
28
+ return props.delay ? css(["", " 2.25s infinite linear,", " 2s 1"], spin, delayAnimation) : css(["", " 2.25s infinite linear"], spin);
29
+ }, function (props) {
30
+ return props.small ? getSize(20) : getSize(40);
26
31
  }, COMMON);
27
32
  export var Text = styled.div.withConfig({
28
33
  displayName: "styles__Text",
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- var _excluded = ["partnerName", "backgroundType", "logoType", "height", "width", "size", "color"];
1
+ var _excluded = ["partnerName", "backgroundType", "logoType", "height", "width", "size", "aria-label", "svgProps"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -10,16 +10,18 @@ import Container from "./styles";
10
10
  var PartnerLogo = function PartnerLogo(_ref) {
11
11
  var partnerName = _ref.partnerName,
12
12
  backgroundType = _ref.backgroundType,
13
- logoType = _ref.logoType,
13
+ _ref$logoType = _ref.logoType,
14
+ logoType = _ref$logoType === void 0 ? 'symbol' : _ref$logoType,
14
15
  height = _ref.height,
15
16
  width = _ref.width,
16
17
  size = _ref.size,
17
- color = _ref.color,
18
+ ariaLabel = _ref['aria-label'],
19
+ svgProps = _ref.svgProps,
18
20
  rest = _objectWithoutProperties(_ref, _excluded);
19
21
  var _useTheme = useTheme(),
20
22
  mode = _useTheme.mode;
21
23
  var whichLogo = function whichLogo(type) {
22
- var logo = logoType ? partnerName + '-' + logoType : partnerName;
24
+ var logo = logoType && logoType !== 'symbol' ? partnerName + '-' + logoType : partnerName;
23
25
  if (type && type === 'dark') {
24
26
  return "".concat(logo, "-dark");
25
27
  } else if (type && type === 'light') {
@@ -39,17 +41,16 @@ var PartnerLogo = function PartnerLogo(_ref) {
39
41
  height: height ? height : defaultHeight + 'px',
40
42
  width: width ? width : defaultWidth + 'px',
41
43
  logoSize: size,
42
- className: "logo"
43
- // TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.
44
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
45
- // @ts-ignore
46
- ,
47
- color: color
48
- }, rest), /*#__PURE__*/React.createElement("svg", {
44
+ className: "logo",
45
+ role: "img",
46
+ "aria-label": ariaLabel,
47
+ "data-qa-logo": partnerName
48
+ }, rest), /*#__PURE__*/React.createElement("svg", _extends({
49
49
  className: "logo-svg",
50
50
  viewBox: logoViewBox,
51
- focusable: false
52
- }, /*#__PURE__*/React.createElement("use", {
51
+ focusable: false,
52
+ "data-qa-logo-svg": "".concat(partnerName, "-svg")
53
+ }, svgProps), /*#__PURE__*/React.createElement("use", {
53
54
  xmlnsXlink: "http://www.w3.org/1999/xlink",
54
55
  xlinkHref: "#sslogosvg-".concat(whichLogo(backgroundType))
55
56
  })));
@@ -1 +1,8 @@
1
- export {};
1
+ export var PartnerNames = ['apple-app-store', 'bigcommerce', 'bitly', 'bynder', 'canva', 'dropbox', 'facebook', 'facebook-audience-network', 'facebook-groups', 'facebook-shops', 'feedly', 'glassdoor', 'google-analytics', 'google-business-messages', 'google-drive', 'google-my-business', 'google-play-store', 'hubspot', 'instagram', 'linkedin', 'linkedin-audience-network', 'marketo', 'messenger', 'microsoft-dynamics', 'pinterest', 'reddit', 'salesforce', 'shopify', 'slack', 'sproutsocial', 'tiktok', 'tripadvisor', 'tumblr', 'twitter', 'twitter-audience-network', 'whatsapp', 'woocommerce', 'yelp', 'youtube', 'zendesk'];
2
+ export var PartnerLogoSizes = {
3
+ mini: '12px',
4
+ small: '16px',
5
+ medium: '24px',
6
+ large: '32px',
7
+ jumbo: '64px'
8
+ };
@@ -1,5 +1,4 @@
1
1
  import PartnerLogo from "./PartnerLogo";
2
2
  export default PartnerLogo;
3
3
  export { PartnerLogo };
4
- export * from "./PartnerLogoTypes";
5
- export * from "./TypePartnerNames";
4
+ export * from "./PartnerLogoTypes";
@@ -11,7 +11,7 @@ var sizes = {
11
11
 
12
12
  // TODO: remove width from stylesForSize
13
13
  var stylesForSize = function stylesForSize(height, width, logoSize) {
14
- return css(["line-height:", ";&,.logo-svg{height:", ";width:", ";}"], logoSize ? logoSize : height, logoSize ? logoSize : height, logoSize ? logoSize : '');
14
+ return css(["height:", ";line-height:", ";.logo-svg{height:", ";width:", ";}"], logoSize ? logoSize : height, logoSize ? logoSize : height, logoSize ? logoSize : height, logoSize ? logoSize : '');
15
15
  };
16
16
  var Container = styled('span').withConfig({
17
17
  displayName: "styles__Container",
@@ -83,7 +83,8 @@ var Select = /*#__PURE__*/function (_React$Component) {
83
83
  }, /*#__PURE__*/React.createElement(Icon, {
84
84
  name: "chevron-down",
85
85
  fixedWidth: true,
86
- size: this.props.size === 'small' ? 'mini' : 'default'
86
+ size: this.props.size === 'small' ? 'mini' : 'default',
87
+ "aria-hidden": true
87
88
  })));
88
89
  }
89
90
  }]);
@@ -65,6 +65,7 @@ var Switch = /*#__PURE__*/function (_React$Component) {
65
65
  "data-qa-switch-isdisabled": disabled === true,
66
66
  checked: checked
67
67
  }, qa, rest), /*#__PURE__*/React.createElement(VisuallyHidden, null, checked ? a11yLabels.on : a11yLabels.off), checked ? /*#__PURE__*/React.createElement(Icon, {
68
+ "aria-hidden": true,
68
69
  size: "mini",
69
70
  name: "check"
70
71
  }) : null);
@@ -40,7 +40,8 @@ export var TableHeaderCell = /*#__PURE__*/function (_React$Component) {
40
40
  }
41
41
  return /*#__PURE__*/React.createElement(SortIcon, null, /*#__PURE__*/React.createElement(Icon, {
42
42
  size: "mini",
43
- name: iconName
43
+ name: iconName,
44
+ "aria-hidden": true
44
45
  }));
45
46
  });
46
47
  _defineProperty(_assertThisInitialized(_this), "handleClick", function (e) {
@@ -72,12 +72,16 @@ var TableRowAccordion = /*#__PURE__*/function (_React$Component) {
72
72
  }));
73
73
  }), /*#__PURE__*/React.createElement(TableCell, {
74
74
  id: "tableRowAccordion_trigger",
75
- content: /*#__PURE__*/React.createElement(Trigger, {
75
+ content:
76
+ /*#__PURE__*/
77
+ // TODO: This trigger needs an accessible label passed in via props
78
+ React.createElement(Trigger, {
76
79
  "data-tablerowaccordion-trigger": true,
77
80
  onClick: this.handleToggle,
78
81
  role: "button"
79
82
  }, /*#__PURE__*/React.createElement(Icon, {
80
- name: isExpanded ? 'chevron-up' : 'chevron-down'
83
+ name: isExpanded ? 'chevron-up' : 'chevron-down',
84
+ "aria-hidden": true
81
85
  }))
82
86
  })), /*#__PURE__*/React.createElement(Detail, {
83
87
  isExpanded: isExpanded,
@@ -68,40 +68,46 @@ var Toast = function Toast(_ref) {
68
68
  theme = _ref.theme,
69
69
  color = _ref.color,
70
70
  icon = _ref.icon;
71
- return /*#__PURE__*/React.createElement(Container, {
72
- type: theme || 'info',
73
- customColor: color,
74
- borderLeft: "2px solid",
75
- "data-qa-toast": ""
76
- }, /*#__PURE__*/React.createElement(Box, {
77
- display: "flex",
78
- minHeight: "48px",
79
- maxHeight: "800px",
80
- p: 350,
81
- alignItems: "flex-start",
82
- m: "auto",
83
- width: 1
84
- }, /*#__PURE__*/React.createElement(IconBox, null, /*#__PURE__*/React.createElement(CustomIcon, {
85
- type: theme || 'info'
86
- // TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.
87
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
88
- // @ts-ignore
89
- ,
90
- color: color,
91
- customColor: color,
92
- name: theme ? themeIcon[theme] : icon || themeIcon['info'],
93
- fixedWidth: true
94
- })), /*#__PURE__*/React.createElement(_StyledBox2, {
95
- flex: 1
96
- }, /*#__PURE__*/React.createElement(Text, {
97
- as: "div",
98
- color: "text.body",
99
- "data-qa-toast-content": ""
100
- }, content)), /*#__PURE__*/React.createElement(IconBox, null, /*#__PURE__*/React.createElement(Icon, {
101
- name: "x",
102
- ml: 400,
103
- color: "icon.base"
104
- }))));
71
+ return (
72
+ /*#__PURE__*/
73
+ // TODO: if this closes when clicked, there should be a label saying "Click to close" that can be overriden
74
+ React.createElement(Container, {
75
+ type: theme || 'info',
76
+ customColor: color,
77
+ borderLeft: "2px solid",
78
+ "data-qa-toast": ""
79
+ }, /*#__PURE__*/React.createElement(Box, {
80
+ display: "flex",
81
+ minHeight: "48px",
82
+ maxHeight: "800px",
83
+ p: 350,
84
+ alignItems: "flex-start",
85
+ m: "auto",
86
+ width: 1
87
+ }, /*#__PURE__*/React.createElement(IconBox, null, /*#__PURE__*/React.createElement(CustomIcon, {
88
+ type: theme || 'info'
89
+ // TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.
90
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
91
+ // @ts-ignore
92
+ ,
93
+ color: color,
94
+ customColor: color,
95
+ name: theme ? themeIcon[theme] : icon || themeIcon['info'],
96
+ fixedWidth: true,
97
+ "aria-hidden": true
98
+ })), /*#__PURE__*/React.createElement(_StyledBox2, {
99
+ flex: 1
100
+ }, /*#__PURE__*/React.createElement(Text, {
101
+ as: "div",
102
+ color: "text.body",
103
+ "data-qa-toast-content": ""
104
+ }, content)), /*#__PURE__*/React.createElement(IconBox, null, /*#__PURE__*/React.createElement(Icon, {
105
+ name: "x",
106
+ ml: 400,
107
+ color: "icon.base",
108
+ "aria-hidden": true
109
+ }))))
110
+ );
105
111
  };
106
112
  export default ToastContainer;
107
113
  var _StyledBox = _styled(Box).withConfig({
@@ -35,11 +35,13 @@ var ToggleHint = /*#__PURE__*/function (_React$Component) {
35
35
  _defineProperty(_assertThisInitialized(_this), "getIcon", function () {
36
36
  if (_this.props.icon === 'chevron') {
37
37
  return /*#__PURE__*/React.createElement(Icon, {
38
- name: "chevron-down"
38
+ name: "chevron-down",
39
+ "aria-hidden": true
39
40
  });
40
41
  }
41
42
  return /*#__PURE__*/React.createElement(Icon, {
42
- name: _this.props.isOpen ? 'minus' : 'plus'
43
+ name: _this.props.isOpen ? 'minus' : 'plus',
44
+ "aria-hidden": true
43
45
  });
44
46
  });
45
47
  return _this;
@@ -6,6 +6,7 @@ import * as React from 'react';
6
6
  import { useTextContent } from "../utils/hooks";
7
7
  import Box from "../Box";
8
8
  import Icon from "../Icon";
9
+ import { VisuallyHidden } from "../VisuallyHidden";
9
10
  import Container from "./styles";
10
11
  var Token = function Token(_ref) {
11
12
  var children = _ref.children,
@@ -37,11 +38,24 @@ var Token = function Token(_ref) {
37
38
  "data-qa-token-iscloseable": closeable === true,
38
39
  "data-qa-token-isvalid": valid === true,
39
40
  "data-qa-token-isdisabled": disabled === true
40
- }, qa, rest), closeable ? /*#__PURE__*/React.createElement(Box, {
41
+ }, qa, rest), !valid && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(VisuallyHidden, {
42
+ as: "div",
43
+ role: "status"
44
+ }, "This is an invalid token"), /*#__PURE__*/React.createElement(Icon, {
45
+ "aria-hidden": true,
46
+ pr: 300,
47
+ name: "error",
48
+ size: "mini"
49
+ }), /*#__PURE__*/React.createElement(VisuallyHidden, null, "Invalid")), closeable ? /*#__PURE__*/React.createElement(Box, {
41
50
  display: "flex",
42
51
  alignItems: "center",
43
52
  justifyContent: "space-between"
44
- }, /*#__PURE__*/React.createElement("span", null, children), " ", /*#__PURE__*/React.createElement(Icon, {
53
+ }, /*#__PURE__*/React.createElement(Box, {
54
+ as: "span",
55
+ display: "flex",
56
+ alignItems: "center"
57
+ }, children), /*#__PURE__*/React.createElement(Icon, {
58
+ "aria-hidden": true,
45
59
  pl: 300,
46
60
  name: "x",
47
61
  size: "mini"
@@ -5,7 +5,7 @@ import { useInteractiveColor } from "../utils/useInteractiveColor";
5
5
  var Container = styled.button.withConfig({
6
6
  displayName: "styles__Container",
7
7
  componentId: "sc-1mt4sof-0"
8
- })(["position:relative;display:inline-block;margin:0;line-height:1;vertical-align:middle;outline:none;", " &:focus{", "}", " ", " ", " ", " ", ""], function (_ref) {
8
+ })(["position:relative;display:inline-flex;align-items:center;margin:0;line-height:1;outline:none;", " &:focus{", "}", " ", " ", " ", " ", ""], function (_ref) {
9
9
  var theme = _ref.theme;
10
10
  return css(["", " font-family:", ";font-weight:", ";border:1px solid ", ";border-radius:", ";color:", ";background:", ";padding:", " ", ";transition:all ", " ", ";"], theme.typography[200], theme.fontFamily, theme.fontWeights.normal, theme.colors.container.border.base, theme.radii[500], theme.colors.text.body, theme.colors.container.background.base, theme.space[200], theme.space[300], theme.duration.fast, theme.easing.ease_inout);
11
11
  }, focusRing, function (_ref2) {
@@ -192,7 +192,9 @@ var TokenInput = /*#__PURE__*/function (_React$Component) {
192
192
  }, /*#__PURE__*/React.createElement(Box, {
193
193
  display: "flex",
194
194
  alignItems: "center"
195
- }, iconName && /*#__PURE__*/React.createElement(Icon, {
195
+ },
196
+ // TODO: add the ability to take labels or aria props for accessibility
197
+ iconName && /*#__PURE__*/React.createElement(Icon, {
196
198
  name: iconName,
197
199
  size: "mini",
198
200
  pr: 300
package/lib/index.flow.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* Asset types */
2
2
  /* Theme and related types */
3
- export * from "./systemProps";
3
+ export * from "./systemProps/index.flow";
4
4
  export { default as theme } from "./themes/light/theme.flow";
5
5
  export { default as darkTheme } from "./themes/dark/theme.flow";
6
6
  export { sproutLightTheme, sproutDarkTheme } from "./themes/extendedThemes/sproutTheme/index.flow";
@@ -0,0 +1,14 @@
1
+ export * from "./types.flow";
2
+ export * from "./background.flow";
3
+ export * from "./border.flow";
4
+ export * from "./color.flow";
5
+ export * from "./custom.flow";
6
+ export * from "./flexbox.flow";
7
+ export * from "./grid.flow";
8
+ export * from "./layout.flow";
9
+ export * from "./position.flow";
10
+ export * from "./shadow.flow";
11
+ export * from "./space.flow";
12
+ export * from "./systemProps.flow";
13
+ export * from "./typography.flow";
14
+ export * from "./variant.flow";
@@ -17,48 +17,4 @@ export var variantSystemProps = compose(variant({
17
17
  export var systemProps = compose(customSystemProps, variantSystemProps, background, border, color, flexbox, grid, layout, position, shadow, space, typography);
18
18
 
19
19
  // including deprecated support for old type names in case they are needed for the intial TS release
20
- export {
21
- /**
22
- @deprecated: Use BackgroundProps from styled-system instead.
23
- */
24
-
25
- /**
26
- @deprecated: Use background from styled-system instead.
27
- */
28
- background as backgroundSystemProps,
29
- /**
30
- @deprecated: Use border from styled-system instead.
31
- */
32
- border as borderSystemProps,
33
- /**
34
- @deprecated: Use color from styled-system instead.
35
- */
36
- color as colorSystemProps,
37
- /**
38
- @deprecated: Use flexbox from styled-system instead.
39
- */
40
- flexbox as flexboxSystemProps,
41
- /**
42
- @deprecated: Use grid from styled-system instead.
43
- */
44
- grid as gridSystemProps,
45
- /**
46
- @deprecated: Use layout from styled-system instead.
47
- */
48
- layout as layoutSystemProps,
49
- /**
50
- @deprecated: Use position from styled-system instead.
51
- */
52
- position as positionSystemProps,
53
- /**
54
- @deprecated: Use shadow from styled-system instead.
55
- */
56
- shadow as shadowSystemProps,
57
- /**
58
- @deprecated: Use space from styled-system instead.
59
- */
60
- space as spaceSystemProps,
61
- /**
62
- @deprecated: Use typography from styled-system instead.
63
- */
64
- typography as typographySystemProps };
20
+ export { background as backgroundSystemProps, border as borderSystemProps, color as colorSystemProps, flexbox as flexboxSystemProps, grid as gridSystemProps, layout as layoutSystemProps, position as positionSystemProps, shadow as shadowSystemProps, space as spaceSystemProps, typography as typographySystemProps };
@@ -0,0 +1,14 @@
1
+ import { compose } from 'styled-system';
2
+ import { backgroundSystemProps } from "./background.flow";
3
+ import { borderSystemProps } from "./border.flow";
4
+ import { colorSystemProps } from "./color.flow";
5
+ import { customSystemProps } from "./custom.flow";
6
+ import { flexboxSystemProps } from "./flexbox.flow";
7
+ import { gridSystemProps } from "./grid.flow";
8
+ import { layoutSystemProps } from "./layout.flow";
9
+ import { positionSystemProps } from "./position.flow";
10
+ import { shadowSystemProps } from "./shadow.flow";
11
+ import { spaceSystemProps } from "./space.flow";
12
+ import { typographySystemProps } from "./typography.flow";
13
+ import { variantSystemProps } from "./variant.flow";
14
+ export var systemProps = compose(customSystemProps, variantSystemProps, backgroundSystemProps, borderSystemProps, colorSystemProps, flexboxSystemProps, gridSystemProps, layoutSystemProps, positionSystemProps, shadowSystemProps, spaceSystemProps, typographySystemProps);
@@ -176,7 +176,7 @@ var colors = _objectSpread(_objectSpread({}, lightTheme.colors), {}, {
176
176
  subtext: COLORS.COLOR_NEUTRAL_300,
177
177
  body: COLORS.COLOR_NEUTRAL_100,
178
178
  inverse: COLORS.COLOR_NEUTRAL_900,
179
- error: COLORS.COLOR_RED_400,
179
+ error: red.foreground,
180
180
  background: {
181
181
  highlight: COLORS.COLOR_YELLOW_900,
182
182
  selection: COLORS.COLOR_BLUE_800
@@ -177,7 +177,7 @@ var colors = _objectSpread(_objectSpread({
177
177
  subtext: COLORS.COLOR_NEUTRAL_700,
178
178
  body: COLORS.COLOR_NEUTRAL_800,
179
179
  inverse: COLORS.COLOR_NEUTRAL_0,
180
- error: COLORS.COLOR_RED_800,
180
+ error: red.foreground,
181
181
  background: {
182
182
  highlight: COLORS.COLOR_YELLOW_200,
183
183
  selection: COLORS.COLOR_BLUE_300
@@ -0,0 +1 @@
1
+ import * as React from 'react';
@@ -29,4 +29,25 @@ export var mergeRefs = function mergeRefs(refs) {
29
29
  _iterator.f();
30
30
  }
31
31
  };
32
- };
32
+ };
33
+
34
+ /**
35
+ * Type safe includes with narrowing
36
+ * https://fettblog.eu/typescript-array-includes/
37
+ */
38
+ export function includes(coll, el) {
39
+ return coll.includes(el);
40
+ }
41
+
42
+ // https://stackoverflow.com/questions/71193818/react-onclick-argument-of-type-eventtarget-is-not-assignable-to-parameter-of-t
43
+ export function assertIsNode(e) {
44
+ if (!e || !('nodeType' in e)) {
45
+ throw new Error("Node expected");
46
+ }
47
+ }
48
+ export function assertIsElement(e) {
49
+ assertIsNode(e);
50
+ if (e.nodeType !== 1) {
51
+ throw new Error("Element expected");
52
+ }
53
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "14.2.0",
3
+ "version": "15.0.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "__flow__",
@@ -33,8 +33,9 @@
33
33
  "build:typescript": "tsc --noEmit",
34
34
  "watch-app": "BABEL_ENV=es node ./bin/buildApp.js --watch",
35
35
  "start-package-only": "npm-run-all install-deps clean -p build-icons watch-package",
36
- "start": "npm-run-all install-deps clean -p build-icons watch-package watch-app",
36
+ "start": "npm-run-all clean -p build-icons watch-package watch-app",
37
37
  "build": "npm-run-all -s clean build-icons build:typescript build:ts-declarations build-package build-app",
38
+ "build:sync-icons": "npm-run-all -s clean build-icons build:typescript build:ts-declarations build-package",
38
39
  "lint-js": "eslint --max-warnings=0 --fix .",
39
40
  "lint-css": "stylelint 'src/**/*.js'",
40
41
  "lint-icons": "yarn icon-lint check 'icons/*.svg'",
@@ -42,14 +43,14 @@
42
43
  "jest:watch": "jest --watch",
43
44
  "test:flow": "flow check --max-warnings 0",
44
45
  "test:ts": "tsc --noEmit",
45
- "test:types": "yarn build-icons && yarn test:flow && yarn test:ts",
46
+ "test:types": "yarn test:flow && yarn test:ts",
46
47
  "test": "npm-run-all test:types lint-js lint-css lint-icons jest",
47
48
  "backstop-test": "yarn backstop test --config='backstop.config.js' --docker",
48
49
  "backstop-reference": "yarn backstop reference --config='backstop.config.js' --docker",
49
50
  "backstop-approve": "yarn backstop approve --config='backstop.config.js' --docker",
50
51
  "new": "node ./bin/scaffold.js",
51
52
  "playground": "node ./bin/scaffold-playground.js && yarn start",
52
- "release": "yarn test && yarn changeset publish",
53
+ "release": "yarn build && yarn test && yarn changeset publish",
53
54
  "storybook": "rm -rf node_modules/.cache/storybook && start-storybook -c .storybook -p 9999",
54
55
  "build-storybook": "build-storybook --quiet -c .storybook -o .storybook-dist",
55
56
  "build-chromatic": "yarn build-icons && build-storybook --quiet -c .storybook -o .storybook-dist",
@@ -72,6 +73,7 @@
72
73
  "dependencies": {
73
74
  "@styled-system/theme-get": "^5.1.2",
74
75
  "classnames": "^2.2.6",
76
+ "flowgen": "^1.21.0",
75
77
  "lodash.curry": "^4.1.1",
76
78
  "lodash.uniqueid": "^4.0.1",
77
79
  "lru-memoize": "~1.0.2",
@@ -119,12 +121,12 @@
119
121
  "@testing-library/jest-dom": "^5.16.4",
120
122
  "@testing-library/react": "^12.0.0",
121
123
  "@testing-library/user-event": "^13.0.0",
122
- "@types/jest": "^29.2.3",
124
+ "@types/jest": "^27.0.0",
123
125
  "@types/jest-axe": "^3.5.5",
124
- "@types/node": "^17.0.38",
125
- "@types/react": "^18.0.10",
126
+ "@types/node": "^16.15.0",
127
+ "@types/react": "^16.0.0",
126
128
  "@types/react-dates": "^21.8.3",
127
- "@types/react-dom": "^18.0.5",
129
+ "@types/react-dom": "^16.0.0",
128
130
  "@types/react-modal": "^3.13.1",
129
131
  "@types/react-virtualized": "9.18.*",
130
132
  "@types/styled-components": "^5.1.26",
@@ -164,8 +166,8 @@
164
166
  "identity-obj-proxy": "^3.0.0",
165
167
  "inquirer": "^6.4.1",
166
168
  "is-glob": "^4.0.1",
167
- "jest": "27.x.x",
168
- "jest-axe": "6.0.0",
169
+ "jest": "^27.0.0",
170
+ "jest-axe": "^6.0.0",
169
171
  "jest-styled-components": "7.0.0-beta.1",
170
172
  "jscodeshift": "^0.13.0",
171
173
  "json-to-scss": "^1.6.2",
@@ -176,9 +178,9 @@
176
178
  "pify": "^4.0.1",
177
179
  "prettier": "^2.7.1",
178
180
  "prop-types": "^15.6.1",
179
- "react": "16.12.0",
181
+ "react": "^16.12.0",
180
182
  "react-dates": "^21.8.0",
181
- "react-dom": "16.12.0",
183
+ "react-dom": "^16.12.0",
182
184
  "rimraf": "^2.6.3",
183
185
  "storybook-dark-mode": "^1.0.9",
184
186
  "styled-components": "^5.2.3",
@@ -209,6 +211,8 @@
209
211
  "styled-components": "^5.2.3"
210
212
  },
211
213
  "resolutions": {
214
+ "@types/react": "^16.0.0",
215
+ "@types/react-dom": "^16.0.0",
212
216
  "lodash": "^4.17.21",
213
217
  "react-popper/create-react-context": "^0.3.0",
214
218
  "glob-parent": "^5.1.2",
@@ -1,16 +0,0 @@
1
- // @flow strict-local
2
-
3
- export * from "./types.flow.js";
4
- export * from "./background";
5
- export * from "./border";
6
- export * from "./color";
7
- export * from "./custom";
8
- export * from "./flexbox";
9
- export * from "./grid";
10
- export * from "./layout";
11
- export * from "./position";
12
- export * from "./shadow";
13
- export * from "./space";
14
- export * from "./systemProps";
15
- export * from "./typography";
16
- export * from "./variant";
@@ -1,2 +0,0 @@
1
- export declare type TypePartnerNames = 'zendesk' | 'dropbox' | 'bigcommerce' | 'bitly' | 'canva' | 'twitter' | 'twitter-audience-network' | 'whatsapp' | 'yelp' | 'youtube' | 'shopify' | 'pinterest' | 'microsoft-dynamics' | 'marketo' | 'slack' | 'woocommerce' | 'tripadvisor' | 'tumblr' | 'google-business-messages' | 'reddit' | 'hubspot' | 'feedly' | 'facebook' | 'facebook-shops' | 'facebook-groups' | 'facebook-audience-network' | 'glassdoor' | 'salesforce' | 'instagram' | 'linkedin' | 'linkedin-audience-network' | 'google-analytics' | 'messenger' | 'google-my-business' | 'google-drive' | 'tiktok' | 'sproutsocial' | 'google-play-store' | 'apple-app-store';
2
- //# sourceMappingURL=TypePartnerNames.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TypePartnerNames.d.ts","sourceRoot":"","sources":["../../../src/PartnerLogo/TypePartnerNames.ts"],"names":[],"mappings":"AAEA,oBAAY,gBAAgB,GACxB,SAAS,GACT,SAAS,GACT,aAAa,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,0BAA0B,GAC1B,UAAU,GACV,MAAM,GACN,SAAS,GACT,SAAS,GACT,WAAW,GACX,oBAAoB,GACpB,SAAS,GACT,OAAO,GACP,aAAa,GACb,aAAa,GACb,QAAQ,GACR,0BAA0B,GAC1B,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,UAAU,GACV,gBAAgB,GAChB,iBAAiB,GACjB,2BAA2B,GAC3B,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV,2BAA2B,GAC3B,kBAAkB,GAClB,WAAW,GACX,oBAAoB,GACpB,cAAc,GACd,QAAQ,GACR,cAAc,GACd,mBAAmB,GACnB,iBAAiB,CAAC"}