@sproutsocial/racine 24.2.0 → 25.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 (509) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/codemods/__tests__/icon-library.test.js +5 -11
  3. package/commonjs/Avatar/Avatar.js +3 -2
  4. package/commonjs/Duration/Duration.js +3 -30
  5. package/commonjs/Duration/utils.js +36 -2
  6. package/dist/types/Avatar/Avatar.d.ts.map +1 -1
  7. package/dist/types/Duration/Duration.d.ts.map +1 -1
  8. package/dist/types/Duration/utils.d.ts +8 -0
  9. package/dist/types/Duration/utils.d.ts.map +1 -1
  10. package/lib/Avatar/Avatar.js +3 -2
  11. package/lib/Duration/Duration.js +2 -29
  12. package/lib/Duration/utils.js +36 -2
  13. package/package.json +2 -9
  14. package/__flow__/Avatar/Avatar.flow.js +0 -17
  15. package/__flow__/Avatar/constants.flow.js +0 -11
  16. package/__flow__/Avatar/index.flow.js +0 -3
  17. package/__flow__/Badge/Badge.flow.js +0 -21
  18. package/__flow__/Badge/constants.flow.js +0 -28
  19. package/__flow__/Badge/index.flow.js +0 -3
  20. package/__flow__/Banner/Banner.flow.js +0 -22
  21. package/__flow__/Banner/index.flow.js +0 -2
  22. package/__flow__/Box/Box.flow.js +0 -22
  23. package/__flow__/Box/index.flow.js +0 -2
  24. package/__flow__/Breadcrumb/Breadcrumb.flow.js +0 -22
  25. package/__flow__/Breadcrumb/index.flow.js +0 -2
  26. package/__flow__/Button/Button.flow.js +0 -36
  27. package/__flow__/Button/index.flow.js +0 -2
  28. package/__flow__/Card/Card.flow.js +0 -9
  29. package/__flow__/Card/CardTypes.flow.js +0 -73
  30. package/__flow__/Card/index.flow.js +0 -3
  31. package/__flow__/CharacterCounter/CharacterCounter.flow.js +0 -12
  32. package/__flow__/CharacterCounter/index.flow.js +0 -2
  33. package/__flow__/ChartLegend/ChartLegend.flow.js +0 -18
  34. package/__flow__/ChartLegend/index.flow.js +0 -2
  35. package/__flow__/Checkbox/Checkbox.flow.js +0 -24
  36. package/__flow__/Checkbox/index.flow.js +0 -2
  37. package/__flow__/Collapsible/Collapsible.flow.js +0 -19
  38. package/__flow__/Collapsible/index.flow.js +0 -2
  39. package/__flow__/DatePicker/DateRangePicker/DateRangePicker.flow.js +0 -19
  40. package/__flow__/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +0 -11
  41. package/__flow__/DatePicker/DateRangePicker/index.flow.js +0 -3
  42. package/__flow__/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +0 -17
  43. package/__flow__/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +0 -9
  44. package/__flow__/DatePicker/SingleDatePicker/index.flow.js +0 -3
  45. package/__flow__/DatePicker/common.flow.js +0 -21
  46. package/__flow__/DatePicker/index.flow.js +0 -6
  47. package/__flow__/Drawer/Drawer.flow.js +0 -49
  48. package/__flow__/Drawer/index.flow.js +0 -2
  49. package/__flow__/EmptyState/EmptyState.flow.js +0 -17
  50. package/__flow__/EmptyState/index.flow.js +0 -2
  51. package/__flow__/Fieldset/Fieldset.flow.js +0 -16
  52. package/__flow__/Fieldset/index.flow.js +0 -2
  53. package/__flow__/FormField/FormField.flow.js +0 -32
  54. package/__flow__/FormField/index.flow.js +0 -2
  55. package/__flow__/Icon/Icon.flow.js +0 -50
  56. package/__flow__/Icon/index.flow.js +0 -4
  57. package/__flow__/Image/Image.flow.js +0 -25
  58. package/__flow__/Image/index.flow.js +0 -2
  59. package/__flow__/Indicator/Indicator.flow.js +0 -11
  60. package/__flow__/Indicator/index.flow.js +0 -2
  61. package/__flow__/Input/Input.flow.js +0 -65
  62. package/__flow__/Input/index.flow.js +0 -2
  63. package/__flow__/KeyboardKey/KeyboardKey.flow.js +0 -9
  64. package/__flow__/KeyboardKey/index.flow.js +0 -2
  65. package/__flow__/Label/Label.flow.js +0 -16
  66. package/__flow__/Label/index.flow.js +0 -2
  67. package/__flow__/Link/Link.flow.js +0 -20
  68. package/__flow__/Link/index.flow.js +0 -2
  69. package/__flow__/Listbox/Listbox.flow.js +0 -33
  70. package/__flow__/Listbox/index.flow.js +0 -2
  71. package/__flow__/Loader/Loader.flow.js +0 -14
  72. package/__flow__/Loader/index.flow.js +0 -2
  73. package/__flow__/LoaderButton/LoaderButton.flow.js +0 -11
  74. package/__flow__/LoaderButton/index.flow.js +0 -2
  75. package/__flow__/Menu/Menu.flow.js +0 -142
  76. package/__flow__/Menu/index.flow.js +0 -3
  77. package/__flow__/Menu/utils/constants.flow.js +0 -16
  78. package/__flow__/Message/Message.flow.js +0 -48
  79. package/__flow__/Message/index.flow.js +0 -2
  80. package/__flow__/Modal/Modal.flow.js +0 -59
  81. package/__flow__/Modal/index.flow.js +0 -2
  82. package/__flow__/Numeral/Numeral.flow.js +0 -23
  83. package/__flow__/Numeral/index.flow.js +0 -2
  84. package/__flow__/PartnerLogo/PartnerLogo.flow.js +0 -27
  85. package/__flow__/PartnerLogo/index.flow.js +0 -2
  86. package/__flow__/Popout/Popout.flow.js +0 -103
  87. package/__flow__/Popout/index.flow.js +0 -2
  88. package/__flow__/Portal/Portal.flow.js +0 -17
  89. package/__flow__/Portal/index.flow.js +0 -2
  90. package/__flow__/Radio/Radio.flow.js +0 -21
  91. package/__flow__/Radio/index.flow.js +0 -2
  92. package/__flow__/SegmentedControl/SegmentedControl.flow.js +0 -27
  93. package/__flow__/SegmentedControl/index.flow.js +0 -2
  94. package/__flow__/Select/Select.flow.js +0 -27
  95. package/__flow__/Select/index.flow.js +0 -2
  96. package/__flow__/Skeleton/Skeleton.flow.js +0 -6
  97. package/__flow__/Skeleton/index.flow.js +0 -2
  98. package/__flow__/SpotIllustration/SpotIllustration.flow.js +0 -12
  99. package/__flow__/SpotIllustration/index.flow.js +0 -2
  100. package/__flow__/Stack/Stack.flow.js +0 -26
  101. package/__flow__/Stack/index.flow.js +0 -2
  102. package/__flow__/Switch/Switch.flow.js +0 -5
  103. package/__flow__/Switch/SwitchTypes.flow.js +0 -16
  104. package/__flow__/Switch/index.flow.js +0 -3
  105. package/__flow__/Table/Table.flow.js +0 -48
  106. package/__flow__/Table/index.flow.js +0 -2
  107. package/__flow__/TableCell/TableCell.flow.js +0 -28
  108. package/__flow__/TableCell/index.flow.js +0 -2
  109. package/__flow__/TableHeaderCell/TableHeaderCell.flow.js +0 -30
  110. package/__flow__/TableHeaderCell/index.flow.js +0 -2
  111. package/__flow__/TableRowAccordion/TableRowAccordion.flow.js +0 -15
  112. package/__flow__/TableRowAccordion/index.flow.js +0 -2
  113. package/__flow__/Tabs/Tabs.flow.js +0 -26
  114. package/__flow__/Tabs/index.flow.js +0 -2
  115. package/__flow__/Text/Text.flow.js +0 -27
  116. package/__flow__/Text/index.flow.js +0 -2
  117. package/__flow__/Textarea/Textarea.flow.js +0 -59
  118. package/__flow__/Textarea/index.flow.js +0 -2
  119. package/__flow__/ThemeProvider/index.flow.js +0 -12
  120. package/__flow__/Toast/Toast.flow.js +0 -27
  121. package/__flow__/Toast/index.flow.js +0 -2
  122. package/__flow__/ToggleHint/ToggleHint.flow.js +0 -21
  123. package/__flow__/ToggleHint/index.flow.js +0 -2
  124. package/__flow__/Token/Token.flow.js +0 -17
  125. package/__flow__/Token/index.flow.js +0 -2
  126. package/__flow__/TokenInput/TokenInput.flow.js +0 -79
  127. package/__flow__/TokenInput/TokenScreenReaderStatus.js +0 -32
  128. package/__flow__/TokenInput/index.flow.js +0 -2
  129. package/__flow__/Tooltip/Tooltip.flow.js +0 -24
  130. package/__flow__/Tooltip/index.flow.js +0 -2
  131. package/__flow__/VisuallyHidden/VisuallyHidden.flow.js +0 -3
  132. package/__flow__/VisuallyHidden/index.flow.js +0 -2
  133. package/__flow__/index.flow.js +0 -136
  134. package/__flow__/index.js +0 -2
  135. package/__flow__/systemProps/background.flow.js +0 -17
  136. package/__flow__/systemProps/border.flow.js +0 -46
  137. package/__flow__/systemProps/color.flow.js +0 -16
  138. package/__flow__/systemProps/custom.flow.js +0 -16
  139. package/__flow__/systemProps/flexbox.flow.js +0 -28
  140. package/__flow__/systemProps/grid.flow.js +0 -26
  141. package/__flow__/systemProps/index.flow.js +0 -16
  142. package/__flow__/systemProps/layout.flow.js +0 -25
  143. package/__flow__/systemProps/position.flow.js +0 -17
  144. package/__flow__/systemProps/shadow.flow.js +0 -13
  145. package/__flow__/systemProps/space.flow.js +0 -71
  146. package/__flow__/systemProps/systemProps.flow.js +0 -30
  147. package/__flow__/systemProps/tests/types.flow.js +0 -51
  148. package/__flow__/systemProps/types.flow.js +0 -12
  149. package/__flow__/systemProps/typography.flow.js +0 -21
  150. package/__flow__/systemProps/variant.flow.js +0 -14
  151. package/__flow__/themes/dark/dataviz-palette.flow.js +0 -3
  152. package/__flow__/themes/dark/decorative-palettes.flow.js +0 -13
  153. package/__flow__/themes/dark/theme.flow.js +0 -5
  154. package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.flow.js +0 -10
  155. package/__flow__/themes/extendedThemes/sproutTheme/index.flow.js +0 -3
  156. package/__flow__/themes/extendedThemes/sproutTheme/light/theme.flow.js +0 -10
  157. package/__flow__/themes/light/dataviz-palette.flow.js +0 -29
  158. package/__flow__/themes/light/decorative-palettes.flow.js +0 -17
  159. package/__flow__/themes/light/literal-colors.flow.js +0 -31
  160. package/__flow__/themes/light/theme.flow.js +0 -16
  161. package/__flow__/types/index.flow.js +0 -7
  162. package/__flow__/types/shared.flow.js +0 -9
  163. package/__flow__/types/styled-components.flow.js +0 -8
  164. package/__flow__/types/system-props.flow.js +0 -136
  165. package/__flow__/types/theme.colors.flow.js +0 -364
  166. package/__flow__/types/theme.flow.js +0 -373
  167. package/__flow__/utils/a11yTest.flow.js +0 -5
  168. package/__flow__/utils/chartColors.flow.js +0 -11
  169. package/__flow__/utils/constants.flow.js +0 -3
  170. package/__flow__/utils/dataQaLabelQueries.flow.js +0 -20
  171. package/__flow__/utils/hooks.flow.js +0 -66
  172. package/__flow__/utils/index.flow.js +0 -11
  173. package/__flow__/utils/innerText.flow.js +0 -4
  174. package/__flow__/utils/mixins.flow.js +0 -7
  175. package/__flow__/utils/react-testing-library.flow.js +0 -14
  176. package/__flow__/utils/responsiveProps/index.flow.js +0 -3
  177. package/__flow__/utils/responsiveProps/index.test.flow.js +0 -22
  178. package/__flow__/utils/system-props.flow.js +0 -9
  179. package/__flow__/utils/useInteractiveColor.flow.js +0 -3
  180. package/commonjs/Avatar/Avatar.flow.js +0 -6
  181. package/commonjs/Avatar/constants.flow.js +0 -16
  182. package/commonjs/Avatar/index.flow.js +0 -27
  183. package/commonjs/Badge/Badge.flow.js +0 -7
  184. package/commonjs/Badge/constants.flow.js +0 -19
  185. package/commonjs/Badge/index.flow.js +0 -27
  186. package/commonjs/Banner/Banner.flow.js +0 -6
  187. package/commonjs/Banner/index.flow.js +0 -16
  188. package/commonjs/Box/Box.flow.js +0 -6
  189. package/commonjs/Box/index.flow.js +0 -16
  190. package/commonjs/Breadcrumb/Breadcrumb.flow.js +0 -6
  191. package/commonjs/Breadcrumb/index.flow.js +0 -16
  192. package/commonjs/Button/Button.flow.js +0 -6
  193. package/commonjs/Button/index.flow.js +0 -16
  194. package/commonjs/Card/Card.flow.js +0 -6
  195. package/commonjs/Card/CardTypes.flow.js +0 -6
  196. package/commonjs/Card/index.flow.js +0 -27
  197. package/commonjs/CharacterCounter/CharacterCounter.flow.js +0 -6
  198. package/commonjs/CharacterCounter/index.flow.js +0 -16
  199. package/commonjs/ChartLegend/ChartLegend.flow.js +0 -6
  200. package/commonjs/ChartLegend/index.flow.js +0 -16
  201. package/commonjs/Checkbox/Checkbox.flow.js +0 -6
  202. package/commonjs/Checkbox/index.flow.js +0 -16
  203. package/commonjs/Collapsible/Collapsible.flow.js +0 -6
  204. package/commonjs/Collapsible/index.flow.js +0 -16
  205. package/commonjs/DatePicker/DateRangePicker/DateRangePicker.flow.js +0 -6
  206. package/commonjs/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +0 -6
  207. package/commonjs/DatePicker/DateRangePicker/index.flow.js +0 -27
  208. package/commonjs/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +0 -6
  209. package/commonjs/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +0 -6
  210. package/commonjs/DatePicker/SingleDatePicker/index.flow.js +0 -27
  211. package/commonjs/DatePicker/common.flow.js +0 -1
  212. package/commonjs/DatePicker/index.flow.js +0 -60
  213. package/commonjs/Drawer/Drawer.flow.js +0 -6
  214. package/commonjs/Drawer/index.flow.js +0 -16
  215. package/commonjs/EmptyState/EmptyState.flow.js +0 -6
  216. package/commonjs/EmptyState/index.flow.js +0 -16
  217. package/commonjs/Fieldset/Fieldset.flow.js +0 -6
  218. package/commonjs/Fieldset/index.flow.js +0 -16
  219. package/commonjs/FormField/FormField.flow.js +0 -6
  220. package/commonjs/FormField/index.flow.js +0 -16
  221. package/commonjs/Icon/Icon.flow.js +0 -6
  222. package/commonjs/Icon/index.flow.js +0 -29
  223. package/commonjs/Image/Image.flow.js +0 -6
  224. package/commonjs/Image/index.flow.js +0 -16
  225. package/commonjs/Indicator/Indicator.flow.js +0 -6
  226. package/commonjs/Indicator/index.flow.js +0 -16
  227. package/commonjs/Input/Input.flow.js +0 -6
  228. package/commonjs/Input/index.flow.js +0 -16
  229. package/commonjs/KeyboardKey/KeyboardKey.flow.js +0 -6
  230. package/commonjs/KeyboardKey/index.flow.js +0 -16
  231. package/commonjs/Label/Label.flow.js +0 -8
  232. package/commonjs/Label/index.flow.js +0 -16
  233. package/commonjs/Link/Link.flow.js +0 -6
  234. package/commonjs/Link/index.flow.js +0 -16
  235. package/commonjs/Listbox/Listbox.flow.js +0 -10
  236. package/commonjs/Listbox/index.flow.js +0 -16
  237. package/commonjs/Loader/Loader.flow.js +0 -6
  238. package/commonjs/Loader/index.flow.js +0 -16
  239. package/commonjs/LoaderButton/LoaderButton.flow.js +0 -6
  240. package/commonjs/LoaderButton/index.flow.js +0 -16
  241. package/commonjs/Menu/Menu.flow.js +0 -11
  242. package/commonjs/Menu/index.flow.js +0 -27
  243. package/commonjs/Menu/utils/constants.flow.js +0 -18
  244. package/commonjs/Message/Message.flow.js +0 -20
  245. package/commonjs/Message/index.flow.js +0 -16
  246. package/commonjs/Modal/Modal.flow.js +0 -8
  247. package/commonjs/Modal/index.flow.js +0 -16
  248. package/commonjs/Numeral/Numeral.flow.js +0 -6
  249. package/commonjs/Numeral/index.flow.js +0 -16
  250. package/commonjs/PartnerLogo/PartnerLogo.flow.js +0 -6
  251. package/commonjs/PartnerLogo/index.flow.js +0 -16
  252. package/commonjs/Popout/Popout.flow.js +0 -6
  253. package/commonjs/Popout/index.flow.js +0 -16
  254. package/commonjs/Portal/Portal.flow.js +0 -6
  255. package/commonjs/Portal/index.flow.js +0 -16
  256. package/commonjs/Radio/Radio.flow.js +0 -6
  257. package/commonjs/Radio/index.flow.js +0 -16
  258. package/commonjs/SegmentedControl/SegmentedControl.flow.js +0 -6
  259. package/commonjs/SegmentedControl/index.flow.js +0 -16
  260. package/commonjs/Select/Select.flow.js +0 -6
  261. package/commonjs/Select/index.flow.js +0 -16
  262. package/commonjs/Skeleton/Skeleton.flow.js +0 -4
  263. package/commonjs/Skeleton/index.flow.js +0 -16
  264. package/commonjs/SpotIllustration/SpotIllustration.flow.js +0 -6
  265. package/commonjs/SpotIllustration/index.flow.js +0 -16
  266. package/commonjs/Stack/Stack.flow.js +0 -6
  267. package/commonjs/Stack/index.flow.js +0 -16
  268. package/commonjs/Switch/Switch.flow.js +0 -6
  269. package/commonjs/Switch/SwitchTypes.flow.js +0 -1
  270. package/commonjs/Switch/index.flow.js +0 -27
  271. package/commonjs/Table/Table.flow.js +0 -9
  272. package/commonjs/Table/index.flow.js +0 -16
  273. package/commonjs/TableCell/TableCell.flow.js +0 -6
  274. package/commonjs/TableCell/index.flow.js +0 -16
  275. package/commonjs/TableHeaderCell/TableHeaderCell.flow.js +0 -14
  276. package/commonjs/TableHeaderCell/index.flow.js +0 -16
  277. package/commonjs/TableRowAccordion/TableRowAccordion.flow.js +0 -6
  278. package/commonjs/TableRowAccordion/index.flow.js +0 -16
  279. package/commonjs/Tabs/Tabs.flow.js +0 -6
  280. package/commonjs/Tabs/index.flow.js +0 -16
  281. package/commonjs/Text/Text.flow.js +0 -6
  282. package/commonjs/Text/index.flow.js +0 -16
  283. package/commonjs/Textarea/Textarea.flow.js +0 -6
  284. package/commonjs/Textarea/index.flow.js +0 -16
  285. package/commonjs/ThemeProvider/index.flow.js +0 -6
  286. package/commonjs/Toast/Toast.flow.js +0 -6
  287. package/commonjs/Toast/index.flow.js +0 -16
  288. package/commonjs/ToggleHint/ToggleHint.flow.js +0 -6
  289. package/commonjs/ToggleHint/index.flow.js +0 -16
  290. package/commonjs/Token/Token.flow.js +0 -6
  291. package/commonjs/Token/index.flow.js +0 -16
  292. package/commonjs/TokenInput/TokenInput.flow.js +0 -6
  293. package/commonjs/TokenInput/index.flow.js +0 -16
  294. package/commonjs/Tooltip/Tooltip.flow.js +0 -6
  295. package/commonjs/Tooltip/index.flow.js +0 -16
  296. package/commonjs/VisuallyHidden/VisuallyHidden.flow.js +0 -6
  297. package/commonjs/VisuallyHidden/index.flow.js +0 -16
  298. package/commonjs/index.flow.js +0 -594
  299. package/commonjs/index.js.flow +0 -2
  300. package/commonjs/systemProps/background.flow.js +0 -9
  301. package/commonjs/systemProps/border.flow.js +0 -9
  302. package/commonjs/systemProps/color.flow.js +0 -9
  303. package/commonjs/systemProps/custom.flow.js +0 -12
  304. package/commonjs/systemProps/flexbox.flow.js +0 -9
  305. package/commonjs/systemProps/grid.flow.js +0 -9
  306. package/commonjs/systemProps/index.flow.js +0 -159
  307. package/commonjs/systemProps/layout.flow.js +0 -9
  308. package/commonjs/systemProps/position.flow.js +0 -9
  309. package/commonjs/systemProps/shadow.flow.js +0 -9
  310. package/commonjs/systemProps/space.flow.js +0 -23
  311. package/commonjs/systemProps/systemProps.flow.js +0 -20
  312. package/commonjs/systemProps/tests/types.flow.js +0 -48
  313. package/commonjs/systemProps/types.flow.js +0 -1
  314. package/commonjs/systemProps/typography.flow.js +0 -9
  315. package/commonjs/systemProps/variant.flow.js +0 -12
  316. package/commonjs/themes/dark/dataviz-palette.flow.js +0 -1
  317. package/commonjs/themes/dark/decorative-palettes.flow.js +0 -1
  318. package/commonjs/themes/dark/theme.flow.js +0 -1
  319. package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.flow.js +0 -7
  320. package/commonjs/themes/extendedThemes/sproutTheme/index.flow.js +0 -20
  321. package/commonjs/themes/extendedThemes/sproutTheme/light/theme.flow.js +0 -1
  322. package/commonjs/themes/light/dataviz-palette.flow.js +0 -1
  323. package/commonjs/themes/light/decorative-palettes.flow.js +0 -1
  324. package/commonjs/themes/light/literal-colors.flow.js +0 -1
  325. package/commonjs/themes/light/theme.flow.js +0 -1
  326. package/commonjs/types/index.flow.js +0 -60
  327. package/commonjs/types/shared.flow.js +0 -6
  328. package/commonjs/types/styled-components.flow.js +0 -6
  329. package/commonjs/types/system-props.flow.js +0 -2
  330. package/commonjs/types/theme.colors.flow.js +0 -1
  331. package/commonjs/types/theme.flow.js +0 -1
  332. package/commonjs/utils/a11yTest.flow.js +0 -1
  333. package/commonjs/utils/chartColors.flow.js +0 -1
  334. package/commonjs/utils/constants.flow.js +0 -1
  335. package/commonjs/utils/dataQaLabelQueries.flow.js +0 -1
  336. package/commonjs/utils/hooks.flow.js +0 -28
  337. package/commonjs/utils/index.flow.js +0 -1
  338. package/commonjs/utils/innerText.flow.js +0 -6
  339. package/commonjs/utils/mixins.flow.js +0 -1
  340. package/commonjs/utils/react-testing-library.flow.js +0 -9
  341. package/commonjs/utils/responsiveProps/index.flow.js +0 -1
  342. package/commonjs/utils/responsiveProps/index.test.flow.js +0 -23
  343. package/commonjs/utils/system-props.flow.js +0 -1
  344. package/commonjs/utils/useInteractiveColor.flow.js +0 -1
  345. package/lib/Avatar/Avatar.flow.js +0 -1
  346. package/lib/Avatar/constants.flow.js +0 -10
  347. package/lib/Avatar/index.flow.js +0 -2
  348. package/lib/Badge/Badge.flow.js +0 -2
  349. package/lib/Badge/constants.flow.js +0 -13
  350. package/lib/Badge/index.flow.js +0 -2
  351. package/lib/Banner/Banner.flow.js +0 -1
  352. package/lib/Banner/index.flow.js +0 -1
  353. package/lib/Box/Box.flow.js +0 -1
  354. package/lib/Box/index.flow.js +0 -1
  355. package/lib/Breadcrumb/Breadcrumb.flow.js +0 -1
  356. package/lib/Breadcrumb/index.flow.js +0 -1
  357. package/lib/Button/Button.flow.js +0 -1
  358. package/lib/Button/index.flow.js +0 -1
  359. package/lib/Card/Card.flow.js +0 -1
  360. package/lib/Card/CardTypes.flow.js +0 -1
  361. package/lib/Card/index.flow.js +0 -2
  362. package/lib/CharacterCounter/CharacterCounter.flow.js +0 -1
  363. package/lib/CharacterCounter/index.flow.js +0 -1
  364. package/lib/ChartLegend/ChartLegend.flow.js +0 -1
  365. package/lib/ChartLegend/index.flow.js +0 -1
  366. package/lib/Checkbox/Checkbox.flow.js +0 -1
  367. package/lib/Checkbox/index.flow.js +0 -1
  368. package/lib/Collapsible/Collapsible.flow.js +0 -1
  369. package/lib/Collapsible/index.flow.js +0 -1
  370. package/lib/DatePicker/DateRangePicker/DateRangePicker.flow.js +0 -1
  371. package/lib/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +0 -1
  372. package/lib/DatePicker/DateRangePicker/index.flow.js +0 -2
  373. package/lib/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +0 -1
  374. package/lib/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +0 -1
  375. package/lib/DatePicker/SingleDatePicker/index.flow.js +0 -2
  376. package/lib/DatePicker/common.flow.js +0 -0
  377. package/lib/DatePicker/index.flow.js +0 -5
  378. package/lib/Drawer/Drawer.flow.js +0 -1
  379. package/lib/Drawer/index.flow.js +0 -1
  380. package/lib/EmptyState/EmptyState.flow.js +0 -1
  381. package/lib/EmptyState/index.flow.js +0 -1
  382. package/lib/Fieldset/Fieldset.flow.js +0 -1
  383. package/lib/Fieldset/index.flow.js +0 -1
  384. package/lib/FormField/FormField.flow.js +0 -1
  385. package/lib/FormField/index.flow.js +0 -1
  386. package/lib/Icon/Icon.flow.js +0 -3
  387. package/lib/Icon/index.flow.js +0 -3
  388. package/lib/Image/Image.flow.js +0 -2
  389. package/lib/Image/index.flow.js +0 -1
  390. package/lib/Indicator/Indicator.flow.js +0 -1
  391. package/lib/Indicator/index.flow.js +0 -1
  392. package/lib/Input/Input.flow.js +0 -1
  393. package/lib/Input/index.flow.js +0 -1
  394. package/lib/KeyboardKey/KeyboardKey.flow.js +0 -1
  395. package/lib/KeyboardKey/index.flow.js +0 -1
  396. package/lib/Label/Label.flow.js +0 -2
  397. package/lib/Label/index.flow.js +0 -1
  398. package/lib/Link/Link.flow.js +0 -1
  399. package/lib/Link/index.flow.js +0 -1
  400. package/lib/Listbox/Listbox.flow.js +0 -4
  401. package/lib/Listbox/index.flow.js +0 -1
  402. package/lib/Loader/Loader.flow.js +0 -1
  403. package/lib/Loader/index.flow.js +0 -1
  404. package/lib/LoaderButton/LoaderButton.flow.js +0 -1
  405. package/lib/LoaderButton/index.flow.js +0 -1
  406. package/lib/Menu/Menu.flow.js +0 -5
  407. package/lib/Menu/index.flow.js +0 -2
  408. package/lib/Menu/utils/constants.flow.js +0 -12
  409. package/lib/Message/Message.flow.js +0 -11
  410. package/lib/Message/index.flow.js +0 -1
  411. package/lib/Modal/Modal.flow.js +0 -2
  412. package/lib/Modal/index.flow.js +0 -1
  413. package/lib/Numeral/Numeral.flow.js +0 -1
  414. package/lib/Numeral/index.flow.js +0 -1
  415. package/lib/PartnerLogo/PartnerLogo.flow.js +0 -5
  416. package/lib/PartnerLogo/index.flow.js +0 -1
  417. package/lib/Popout/Popout.flow.js +0 -3
  418. package/lib/Popout/index.flow.js +0 -1
  419. package/lib/Portal/Portal.flow.js +0 -1
  420. package/lib/Portal/index.flow.js +0 -1
  421. package/lib/Radio/Radio.flow.js +0 -1
  422. package/lib/Radio/index.flow.js +0 -1
  423. package/lib/SegmentedControl/SegmentedControl.flow.js +0 -1
  424. package/lib/SegmentedControl/index.flow.js +0 -1
  425. package/lib/Select/Select.flow.js +0 -1
  426. package/lib/Select/index.flow.js +0 -1
  427. package/lib/Skeleton/Skeleton.flow.js +0 -1
  428. package/lib/Skeleton/index.flow.js +0 -1
  429. package/lib/SpotIllustration/SpotIllustration.flow.js +0 -1
  430. package/lib/SpotIllustration/index.flow.js +0 -1
  431. package/lib/Stack/Stack.flow.js +0 -1
  432. package/lib/Stack/index.flow.js +0 -1
  433. package/lib/Switch/Switch.flow.js +0 -1
  434. package/lib/Switch/SwitchTypes.flow.js +0 -0
  435. package/lib/Switch/index.flow.js +0 -2
  436. package/lib/Table/Table.flow.js +0 -3
  437. package/lib/Table/index.flow.js +0 -1
  438. package/lib/TableCell/TableCell.flow.js +0 -5
  439. package/lib/TableCell/index.flow.js +0 -1
  440. package/lib/TableHeaderCell/TableHeaderCell.flow.js +0 -5
  441. package/lib/TableHeaderCell/index.flow.js +0 -1
  442. package/lib/TableRowAccordion/TableRowAccordion.flow.js +0 -1
  443. package/lib/TableRowAccordion/index.flow.js +0 -1
  444. package/lib/Tabs/Tabs.flow.js +0 -1
  445. package/lib/Tabs/index.flow.js +0 -1
  446. package/lib/Text/Text.flow.js +0 -1
  447. package/lib/Text/index.flow.js +0 -1
  448. package/lib/Textarea/Textarea.flow.js +0 -1
  449. package/lib/Textarea/index.flow.js +0 -1
  450. package/lib/ThemeProvider/index.flow.js +0 -3
  451. package/lib/Toast/Toast.flow.js +0 -1
  452. package/lib/Toast/index.flow.js +0 -1
  453. package/lib/ToggleHint/ToggleHint.flow.js +0 -1
  454. package/lib/ToggleHint/index.flow.js +0 -1
  455. package/lib/Token/Token.flow.js +0 -1
  456. package/lib/Token/index.flow.js +0 -1
  457. package/lib/TokenInput/TokenInput.flow.js +0 -1
  458. package/lib/TokenInput/index.flow.js +0 -1
  459. package/lib/Tooltip/Tooltip.flow.js +0 -1
  460. package/lib/Tooltip/index.flow.js +0 -1
  461. package/lib/VisuallyHidden/VisuallyHidden.flow.js +0 -1
  462. package/lib/VisuallyHidden/index.flow.js +0 -1
  463. package/lib/index.flow.js +0 -79
  464. package/lib/index.js.flow +0 -2
  465. package/lib/systemProps/background.flow.js +0 -5
  466. package/lib/systemProps/border.flow.js +0 -5
  467. package/lib/systemProps/color.flow.js +0 -5
  468. package/lib/systemProps/custom.flow.js +0 -8
  469. package/lib/systemProps/flexbox.flow.js +0 -5
  470. package/lib/systemProps/grid.flow.js +0 -5
  471. package/lib/systemProps/index.flow.js +0 -14
  472. package/lib/systemProps/layout.flow.js +0 -5
  473. package/lib/systemProps/position.flow.js +0 -5
  474. package/lib/systemProps/shadow.flow.js +0 -5
  475. package/lib/systemProps/space.flow.js +0 -32
  476. package/lib/systemProps/systemProps.flow.js +0 -14
  477. package/lib/systemProps/tests/types.flow.js +0 -46
  478. package/lib/systemProps/types.flow.js +0 -0
  479. package/lib/systemProps/typography.flow.js +0 -5
  480. package/lib/systemProps/variant.flow.js +0 -8
  481. package/lib/themes/dark/dataviz-palette.flow.js +0 -0
  482. package/lib/themes/dark/decorative-palettes.flow.js +0 -0
  483. package/lib/themes/dark/theme.flow.js +0 -0
  484. package/lib/themes/extendedThemes/sproutTheme/dark/theme.flow.js +0 -1
  485. package/lib/themes/extendedThemes/sproutTheme/index.flow.js +0 -2
  486. package/lib/themes/extendedThemes/sproutTheme/light/theme.flow.js +0 -0
  487. package/lib/themes/light/dataviz-palette.flow.js +0 -0
  488. package/lib/themes/light/decorative-palettes.flow.js +0 -0
  489. package/lib/themes/light/literal-colors.flow.js +0 -0
  490. package/lib/themes/light/theme.flow.js +0 -0
  491. package/lib/types/index.flow.js +0 -5
  492. package/lib/types/shared.flow.js +0 -1
  493. package/lib/types/styled-components.flow.js +0 -1
  494. package/lib/types/system-props.flow.js +0 -1
  495. package/lib/types/theme.colors.flow.js +0 -0
  496. package/lib/types/theme.flow.js +0 -0
  497. package/lib/utils/a11yTest.flow.js +0 -0
  498. package/lib/utils/chartColors.flow.js +0 -0
  499. package/lib/utils/constants.flow.js +0 -0
  500. package/lib/utils/dataQaLabelQueries.flow.js +0 -0
  501. package/lib/utils/hooks.flow.js +0 -27
  502. package/lib/utils/index.flow.js +0 -0
  503. package/lib/utils/innerText.flow.js +0 -1
  504. package/lib/utils/mixins.flow.js +0 -0
  505. package/lib/utils/react-testing-library.flow.js +0 -3
  506. package/lib/utils/responsiveProps/index.flow.js +0 -0
  507. package/lib/utils/responsiveProps/index.test.flow.js +0 -21
  508. package/lib/utils/system-props.flow.js +0 -0
  509. package/lib/utils/useInteractiveColor.flow.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Change Log
2
2
 
3
+ ## 25.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 8f63add: Discontinuation of Flow Type System
8
+
9
+ We have officially discontinued the use of the Flow type system in `@sproutsocial/racine`. All Flow types have been removed from the codebase as part of this major release.
10
+
11
+ To continue using `@sproutsocial/racine`, please ensure your projects have migrated away from Flow and are now using TypeScript.
12
+
13
+ ### Patch Changes
14
+
15
+ - bd717d0: # Allows overrides to Avatar border prop
16
+ - Before this change, Avatar component accepted a `border` prop as one of its system props, however it did not have any effect due to a default border style in the component.
17
+ - With this change, Avatar now allows `border` prop overrides.
18
+ - The `border` prop accepts system values `500`, `600`, and `700` for `1px solid`, `2px solid`, and `3px solid`, respectively. Valid strings such as `'1px dashed'` or `'4px solid'` are also accepted.
19
+ - 63beb74: Update displayUnits prop on Duration component to account for partial durations with missing display units
20
+ - Updated dependencies [8f63add]
21
+ - Updated dependencies [15009dd]
22
+ - @sproutsocial/seeds-react-system-props@3.0.0
23
+ - @sproutsocial/seeds-react-utilities@4.0.0
24
+ - @sproutsocial/seeds-react-mixins@3.0.0
25
+ - @sproutsocial/seeds-react-hooks@3.0.0
26
+ - @sproutsocial/seeds-react-theme@2.0.0
27
+ - @sproutsocial/seeds-border@1.6.1
28
+
3
29
  ## 24.2.0
4
30
 
5
31
  ### Minor Changes
@@ -4,13 +4,7 @@ const transform = require("../icon-library");
4
4
 
5
5
  describe("icon-library codemod", () => {
6
6
  function createTest(testName, input, output, options = {}) {
7
- return defineInlineTest(
8
- transform,
9
- { parser: "flow", ...options },
10
- input,
11
- output,
12
- testName
13
- );
7
+ return defineInlineTest(transform, { ...options }, input, output, testName);
14
8
  }
15
9
 
16
10
  createTest(
@@ -173,11 +167,11 @@ const iconType = typeof Icon;
173
167
 
174
168
  createTest(
175
169
  "Retain first comments when Icon import is removed",
176
- `// @flow
170
+ `
177
171
  import { Icon } from '@sproutsocial/racine';
178
172
 
179
173
  <Icon name={iconName} />`,
180
- `// @flow
174
+ `
181
175
  import { IconShim } from 'script/core/react/IconShim';
182
176
 
183
177
  <IconShim name={iconName} />
@@ -190,7 +184,7 @@ import { IconShim } from 'script/core/react/IconShim';
190
184
 
191
185
  createTest(
192
186
  "Retain first comments and add new comments",
193
- `// @flow
187
+ `//
194
188
  import { Badge, Icon } from '@sproutsocial/racine';
195
189
 
196
190
  <>
@@ -198,7 +192,7 @@ import { Badge, Icon } from '@sproutsocial/racine';
198
192
  <Icon name='not-a-real-name' />
199
193
  <Badge iconName={iconName} />
200
194
  </>`,
201
- `// @flow
195
+ `//
202
196
  /*TODO (icon-library codemod): Please manually migrate icon names passed to 2 component(s) in this file.
203
197
  Look for usages of these components: Icon, Badge*/
204
198
  import { Badge, Icon } from '@sproutsocial/racine';
@@ -11,6 +11,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
11
  var _Box = _interopRequireDefault(require("../Box"));
12
12
  var _Image = _interopRequireDefault(require("../Image"));
13
13
  var _Text = _interopRequireDefault(require("../Text"));
14
+ var _seedsReactSystemProps = require("@sproutsocial/seeds-react-system-props");
14
15
  var _jsxRuntime = require("react/jsx-runtime");
15
16
  var _excluded = ["fontSize"],
16
17
  _excluded2 = ["appearance", "name", "src", "type", "size", "bg", "color", "initials"];
@@ -51,14 +52,14 @@ var AvatarText = (0, _styledComponents.default)(function (_ref) {
51
52
  var Container = (0, _styledComponents.default)(_Box.default).withConfig({
52
53
  displayName: "Avatar__Container",
53
54
  componentId: "sc-1ffu253-1"
54
- })(["", ""], function (_ref3) {
55
+ })(["", " ", ""], function (_ref3) {
55
56
  var theme = _ref3.theme,
56
57
  $type = _ref3.$type,
57
58
  bg = _ref3.bg,
58
59
  borderColor = _ref3.borderColor,
59
60
  $displayFallback = _ref3.$displayFallback;
60
61
  return (0, _styledComponents.css)(["background:", ";border:", ";border-color:", ";color:", ";"], $displayFallback ? bg ? bg : theme.colors.container.background.decorative[$type] : "none", $displayFallback ? "1px solid" : "none", borderColor ? borderColor : theme.colors.container.border.decorative[$type], theme.colors.text.decorative[$type]);
61
- });
62
+ }, _seedsReactSystemProps.BORDER);
62
63
  var getInitials = function getInitials(name) {
63
64
  var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "?";
64
65
  if (!name || typeof name !== "string") return fallback;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -16,38 +15,12 @@ var _jsxRuntime = require("react/jsx-runtime");
16
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
19
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
20
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21
21
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
22
22
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
23
23
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
25
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
26
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
27
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
28
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
29
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
30
- var getLowestUnit = function getLowestUnit(displayUnits) {
31
- return _toConsumableArray(_constants2.ORDERED_UNITS).reverse().find(function (unit) {
32
- return displayUnits[unit];
33
- }) || _constants2.UNITS.milliseconds;
34
- };
35
- var splitMillisecondsIntoUnits = function splitMillisecondsIntoUnits(milliseconds, displayUnits) {
36
- var lowestUnit = getLowestUnit(displayUnits);
37
- var remainder = milliseconds % _constants2.MILLISECONDS_IN[lowestUnit];
38
- if (2 * remainder >= _constants2.MILLISECONDS_IN[lowestUnit]) {
39
- // if the remainder is large, add enough seconds to increse the lowest unit
40
- milliseconds += _constants2.MILLISECONDS_IN[lowestUnit] - remainder;
41
- }
42
- var units = {};
43
- _constants2.ORDERED_UNITS.forEach(function (unit) {
44
- if (displayUnits[unit]) {
45
- units[unit] = Math.floor(milliseconds / _constants2.MILLISECONDS_IN[unit]);
46
- milliseconds -= units[unit] * _constants2.MILLISECONDS_IN[unit];
47
- }
48
- });
49
- return units;
50
- };
51
24
  var _createDurationFormatter = function _createDurationFormatter(locale, unitDisplay, displayUnits) {
52
25
  var timeUnitFormatter = function timeUnitFormatter(locale, unit, unitDisplay) {
53
26
  return Intl.NumberFormat(locale, {
@@ -62,13 +35,13 @@ var _createDurationFormatter = function _createDurationFormatter(locale, unitDis
62
35
  type: "unit"
63
36
  });
64
37
  return function (value) {
65
- var lowestUnit = getLowestUnit(displayUnits);
38
+ var lowestUnit = (0, _utils.getLowestUnit)(displayUnits);
66
39
 
67
40
  // if the value is zero or negative, we just want to return 0 for the lowest unit (ex "0 minutes")
68
41
  if (value <= 0) {
69
42
  return formatterByUnit[lowestUnit](0);
70
43
  }
71
- var millisecondsByUnit = splitMillisecondsIntoUnits(value, displayUnits);
44
+ var millisecondsByUnit = (0, _utils.splitMillisecondsIntoUnits)(value, displayUnits);
72
45
  var list = [];
73
46
  _constants2.ORDERED_UNITS.forEach(function (unit) {
74
47
  if (unit in millisecondsByUnit) {
@@ -3,11 +3,36 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.isValidNumber = exports.getDurationMaxDisplayUnits = void 0;
6
+ exports.splitMillisecondsIntoUnits = exports.isValidNumber = exports.getLowestUnit = exports.getDurationMaxDisplayUnits = void 0;
7
7
  var _constants = require("./constants");
8
8
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
9
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
10
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
11
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
13
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
14
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
15
+ var getLowestUnit = exports.getLowestUnit = function getLowestUnit(displayUnits) {
16
+ return _toConsumableArray(_constants.ORDERED_UNITS).reverse().find(function (unit) {
17
+ return displayUnits[unit];
18
+ }) || _constants.UNITS.milliseconds;
19
+ };
20
+ var splitMillisecondsIntoUnits = exports.splitMillisecondsIntoUnits = function splitMillisecondsIntoUnits(milliseconds, displayUnits) {
21
+ var lowestUnit = getLowestUnit(displayUnits);
22
+ var remainder = milliseconds % _constants.MILLISECONDS_IN[lowestUnit];
23
+ if (2 * remainder >= _constants.MILLISECONDS_IN[lowestUnit]) {
24
+ // if the remainder is large, add enough seconds to increse the lowest unit
25
+ milliseconds += _constants.MILLISECONDS_IN[lowestUnit] - remainder;
26
+ }
27
+ var units = {};
28
+ _constants.ORDERED_UNITS.forEach(function (unit) {
29
+ if (displayUnits[unit]) {
30
+ units[unit] = Math.floor(milliseconds / _constants.MILLISECONDS_IN[unit]);
31
+ milliseconds -= units[unit] * _constants.MILLISECONDS_IN[unit];
32
+ }
33
+ });
34
+ return units;
35
+ };
11
36
  var isValidNumber = exports.isValidNumber = function isValidNumber(value) {
12
37
  return typeof value === "number" && isFinite(value);
13
38
  };
@@ -29,7 +54,16 @@ var getDurationMaxDisplayUnits = exports.getDurationMaxDisplayUnits = function g
29
54
  }
30
55
 
31
56
  // @ts-expect-error - stupid typescript isn't smart enough to check the isValidNumber check above ¯\_(ツ)_/¯
32
- if (milliseconds > _constants.MILLISECONDS_IN[unit]) {
57
+ var millisecondsByUnit = splitMillisecondsIntoUnits(milliseconds, {
58
+ days: true,
59
+ hours: true,
60
+ minutes: true,
61
+ seconds: true,
62
+ milliseconds: true
63
+ });
64
+
65
+ // @ts-expect-error - stupid typescript isn't smart enough to check the isValidNumber check above ¯\_(ツ)_/¯
66
+ if (milliseconds > _constants.MILLISECONDS_IN[unit] && millisecondsByUnit[unit] > 0) {
33
67
  displayUnits[unit] = true;
34
68
  }
35
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EACf,MAAM,eAAe,CAAC;AAoCvB,eAAO,MAAM,cAAc,SACnB,MAAM,QACN,cAAc,KACnB,cAuBF,CAAC;AAEF,eAAO,MAAM,MAAM,wEAUhB,eAAe,4CAqDjB,CAAC;wHArDC,eAAe;AAsDlB,wBAA4B"}
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EACf,MAAM,eAAe,CAAC;AAwCvB,eAAO,MAAM,cAAc,SACnB,MAAM,QACN,cAAc,KACnB,cAuBF,CAAC;AAEF,eAAO,MAAM,MAAM,wEAUhB,eAAe,4CAqDjB,CAAC;wHArDC,eAAe;AAsDlB,wBAA4B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Duration.d.ts","sourceRoot":"","sources":["../../../src/Duration/Duration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,KAAK,EACV,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAmJzB,eAAO,MAAM,cAAc,UAAW,iBAAiB,KAAG,MAEzD,CAAC;AAEF,QAAA,MAAM,QAAQ,UAAW,iBAAiB,oBAEzC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Duration.d.ts","sourceRoot":"","sources":["../../../src/Duration/Duration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EACV,iBAAiB,EAIlB,MAAM,iBAAiB,CAAC;AAqHzB,eAAO,MAAM,cAAc,UAAW,iBAAiB,KAAG,MAEzD,CAAC;AAEF,QAAA,MAAM,QAAQ,UAAW,iBAAiB,oBAEzC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,4 +1,12 @@
1
1
  import type { TypeDurationDisplayUnits, TypeDurationMilliseconds } from "./DurationTypes";
2
+ export declare const getLowestUnit: (displayUnits: TypeDurationDisplayUnits) => string;
3
+ export declare const splitMillisecondsIntoUnits: (milliseconds: number, displayUnits: TypeDurationDisplayUnits) => {
4
+ days?: number;
5
+ hours?: number;
6
+ minutes?: number;
7
+ seconds?: number;
8
+ milliseconds?: number;
9
+ };
2
10
  export declare const isValidNumber: (value: unknown) => boolean;
3
11
  export interface TypeGetDurationMaxDisplayUnitsProps {
4
12
  milliseconds: TypeDurationMilliseconds;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/Duration/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,aAAa,UAAW,OAAO,KAAG,OACD,CAAC;AAE/C,MAAM,WAAW,mCAAmC;IAClD,YAAY,EAAE,wBAAwB,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,0BAA0B,uCAGpC,mCAAmC,KAAG,wBAmBxC,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/Duration/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,aAAa,iBAAkB,wBAAwB,WAEhD,CAAC;AAErB,eAAO,MAAM,0BAA0B,iBACvB,MAAM,gBACN,wBAAwB,KACrC;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CAoBvB,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,OAAO,KAAG,OACD,CAAC;AAE/C,MAAM,WAAW,mCAAmC;IAClD,YAAY,EAAE,wBAAwB,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,0BAA0B,uCAGpC,mCAAmC,KAAG,wBA4BxC,CAAC"}
@@ -20,6 +20,7 @@ import styled, { css } from "styled-components";
20
20
  import Box from "../Box";
21
21
  import Image from "../Image";
22
22
  import Text from "../Text";
23
+ import { BORDER } from "@sproutsocial/seeds-react-system-props";
23
24
  import { jsx as _jsx } from "react/jsx-runtime";
24
25
  var defaultType = "neutral";
25
26
 
@@ -42,14 +43,14 @@ var AvatarText = styled(function (_ref) {
42
43
  var Container = styled(Box).withConfig({
43
44
  displayName: "Avatar__Container",
44
45
  componentId: "sc-1ffu253-1"
45
- })(["", ""], function (_ref3) {
46
+ })(["", " ", ""], function (_ref3) {
46
47
  var theme = _ref3.theme,
47
48
  $type = _ref3.$type,
48
49
  bg = _ref3.bg,
49
50
  borderColor = _ref3.borderColor,
50
51
  $displayFallback = _ref3.$displayFallback;
51
52
  return css(["background:", ";border:", ";border-color:", ";color:", ";"], $displayFallback ? bg ? bg : theme.colors.container.background.decorative[$type] : "none", $displayFallback ? "1px solid" : "none", borderColor ? borderColor : theme.colors.container.border.decorative[$type], theme.colors.text.decorative[$type]);
52
- });
53
+ }, BORDER);
53
54
  var getInitials = function getInitials(name) {
54
55
  var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "?";
55
56
  if (!name || typeof name !== "string") return fallback;
@@ -4,43 +4,16 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
7
  import * as React from "react";
14
8
  import memoize from "lru-memoize";
15
9
  import { EM_DASH } from "../utils/constants";
16
10
  import { VisuallyHidden } from "../VisuallyHidden";
17
- import { COMPARE_OBJECTS, DEFAULT_DISPLAY, DEFAULT_DISPLAY_UNITS, DEFAULT_LOCALE, DEFAULT_MILLISECONDS, MEMO_CACHE_SIZE, MILLISECONDS_IN, ORDERED_UNITS, UNITS } from "./constants";
11
+ import { COMPARE_OBJECTS, DEFAULT_DISPLAY, DEFAULT_DISPLAY_UNITS, DEFAULT_LOCALE, DEFAULT_MILLISECONDS, MEMO_CACHE_SIZE, ORDERED_UNITS, UNITS } from "./constants";
18
12
  import { Container } from "./styles";
19
- import { isValidNumber } from "./utils";
13
+ import { isValidNumber, getLowestUnit, splitMillisecondsIntoUnits } from "./utils";
20
14
  import { jsx as _jsx } from "react/jsx-runtime";
21
15
  import { Fragment as _Fragment } from "react/jsx-runtime";
22
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
23
- var getLowestUnit = function getLowestUnit(displayUnits) {
24
- return _toConsumableArray(ORDERED_UNITS).reverse().find(function (unit) {
25
- return displayUnits[unit];
26
- }) || UNITS.milliseconds;
27
- };
28
- var splitMillisecondsIntoUnits = function splitMillisecondsIntoUnits(milliseconds, displayUnits) {
29
- var lowestUnit = getLowestUnit(displayUnits);
30
- var remainder = milliseconds % MILLISECONDS_IN[lowestUnit];
31
- if (2 * remainder >= MILLISECONDS_IN[lowestUnit]) {
32
- // if the remainder is large, add enough seconds to increse the lowest unit
33
- milliseconds += MILLISECONDS_IN[lowestUnit] - remainder;
34
- }
35
- var units = {};
36
- ORDERED_UNITS.forEach(function (unit) {
37
- if (displayUnits[unit]) {
38
- units[unit] = Math.floor(milliseconds / MILLISECONDS_IN[unit]);
39
- milliseconds -= units[unit] * MILLISECONDS_IN[unit];
40
- }
41
- });
42
- return units;
43
- };
44
17
  var _createDurationFormatter = function _createDurationFormatter(locale, unitDisplay, displayUnits) {
45
18
  var timeUnitFormatter = function timeUnitFormatter(locale, unit, unitDisplay) {
46
19
  return Intl.NumberFormat(locale, {
@@ -1,7 +1,32 @@
1
1
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
3
7
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
- import { MILLISECONDS_IN, ORDERED_UNITS } from "./constants";
8
+ import { MILLISECONDS_IN, ORDERED_UNITS, UNITS } from "./constants";
9
+ export var getLowestUnit = function getLowestUnit(displayUnits) {
10
+ return _toConsumableArray(ORDERED_UNITS).reverse().find(function (unit) {
11
+ return displayUnits[unit];
12
+ }) || UNITS.milliseconds;
13
+ };
14
+ export var splitMillisecondsIntoUnits = function splitMillisecondsIntoUnits(milliseconds, displayUnits) {
15
+ var lowestUnit = getLowestUnit(displayUnits);
16
+ var remainder = milliseconds % MILLISECONDS_IN[lowestUnit];
17
+ if (2 * remainder >= MILLISECONDS_IN[lowestUnit]) {
18
+ // if the remainder is large, add enough seconds to increse the lowest unit
19
+ milliseconds += MILLISECONDS_IN[lowestUnit] - remainder;
20
+ }
21
+ var units = {};
22
+ ORDERED_UNITS.forEach(function (unit) {
23
+ if (displayUnits[unit]) {
24
+ units[unit] = Math.floor(milliseconds / MILLISECONDS_IN[unit]);
25
+ milliseconds -= units[unit] * MILLISECONDS_IN[unit];
26
+ }
27
+ });
28
+ return units;
29
+ };
5
30
  export var isValidNumber = function isValidNumber(value) {
6
31
  return typeof value === "number" && isFinite(value);
7
32
  };
@@ -23,7 +48,16 @@ export var getDurationMaxDisplayUnits = function getDurationMaxDisplayUnits(_ref
23
48
  }
24
49
 
25
50
  // @ts-expect-error - stupid typescript isn't smart enough to check the isValidNumber check above ¯\_(ツ)_/¯
26
- if (milliseconds > MILLISECONDS_IN[unit]) {
51
+ var millisecondsByUnit = splitMillisecondsIntoUnits(milliseconds, {
52
+ days: true,
53
+ hours: true,
54
+ minutes: true,
55
+ seconds: true,
56
+ milliseconds: true
57
+ });
58
+
59
+ // @ts-expect-error - stupid typescript isn't smart enough to check the isValidNumber check above ¯\_(ツ)_/¯
60
+ if (milliseconds > MILLISECONDS_IN[unit] && millisecondsByUnit[unit] > 0) {
27
61
  displayUnits[unit] = true;
28
62
  }
29
63
  }
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "24.2.0",
3
+ "version": "25.0.0",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": ">=18"
7
7
  },
8
8
  "readme": "README.NPM.md",
9
9
  "files": [
10
- "__flow__",
11
10
  "commonjs",
12
11
  "dist",
13
12
  "lib",
@@ -55,8 +54,7 @@
55
54
  "release": "yarn build && yarn test && yarn changeset publish",
56
55
  "storybook": "rm -rf node_modules/.cache/storybook && storybook dev -c .storybook -p 9999",
57
56
  "build-storybook": "storybook build --quiet -c .storybook -o .storybook-dist",
58
- "build-chromatic": "storybook build --quiet -c .storybook -o .storybook-dist",
59
- "ts-to-flow": "flowgen $FILE -o $OUTPUT --add-flow-header --no-module-exports"
57
+ "build-chromatic": "storybook build --quiet -c .storybook -o .storybook-dist"
60
58
  },
61
59
  "dependencies": {
62
60
  "@react-spring/web": "^9.0.0",
@@ -98,13 +96,10 @@
98
96
  "@babel/cli": "^7.22.10",
99
97
  "@babel/core": "^7.22.10",
100
98
  "@babel/eslint-parser": "^7.22.10",
101
- "@babel/plugin-syntax-flow": "^7.22.5",
102
99
  "@babel/plugin-syntax-jsx": "^7.22.5",
103
100
  "@babel/preset-env": "^7.22.10",
104
- "@babel/preset-flow": "^7.0.0",
105
101
  "@babel/preset-react": "^7.22.5",
106
102
  "@babel/preset-typescript": "^7.22.5",
107
- "@khanacademy/flow-to-ts": "^0.5.2",
108
103
  "@sproutsocial/eslint-config-seeds": "*",
109
104
  "@sproutsocial/seeds-border": "*",
110
105
  "@sproutsocial/seeds-color": "*",
@@ -161,8 +156,6 @@
161
156
  "eslint-import-resolver-babel-module": "^5.3.2",
162
157
  "eslint-import-resolver-typescript": "^3.6.1",
163
158
  "eslint-plugin-jest": "^27.6.3",
164
- "flow-bin": "0.131.0",
165
- "flowgen": "^1.21.0",
166
159
  "glob": "^7.1.6",
167
160
  "identity-obj-proxy": "^3.0.0",
168
161
  "inquirer": "^6.4.1",
@@ -1,17 +0,0 @@
1
- // @flow
2
- import * as React from "react";
3
- export type TypeAvatarProps = {
4
- /** Circles are used for social profile avatars, leaf is for internal Sprout user avatars */
5
- appearance?: "circle" | "leaf",
6
- /** The name of the user that the avatar represents */
7
- name?: string,
8
- /** URL of the avatar image. If a URL is not provided, the component will fall back to showing the user's initials */
9
- src?: string,
10
- type?: "neutral" | "purple" | "green" | "blue" | "yellow" | "red" | "orange",
11
- bg?: string,
12
- color?: string,
13
- size?: string,
14
- ...
15
- };
16
- declare var Avatar: React.StatelessFunctionalComponent<TypeAvatarProps>;
17
- declare export default typeof Avatar;
@@ -1,11 +0,0 @@
1
- // @flow
2
- export const AvatarColorOptions = Object.freeze({
3
- auto: "auto",
4
- neutral: "neutral",
5
- purple: "purple",
6
- green: "green",
7
- blue: "blue",
8
- yellow: "yellow",
9
- red: "red",
10
- orange: "orange"
11
- });
@@ -1,3 +0,0 @@
1
- // @flow
2
- export * from "./Avatar.flow";
3
- export { AvatarColorOptions } from "./constants.flow";
@@ -1,21 +0,0 @@
1
- // @flow
2
- import * as React from "react";
3
- import type { TypeIconName } from "../Icon/index.flow";
4
- import { badgeColors } from "./constants.flow";
5
- export type TypeBadgeColor = $Keys<typeof badgeColors>;
6
- export type TypeBadgeProps = {
7
- children?: React.Node,
8
- /** DEPRECATED: Use children instead of text */
9
- text?: React.Node,
10
- /** Size default is deprecated in favor of small and large */
11
- size?: "small" | "large" | "default",
12
- badgeColor?: TypeBadgeColor,
13
- iconName?: TypeIconName,
14
- /** DEPRECATED: Possibly only used for testing. Refrain from using at all if possible. (optional) */
15
- tip?: React.Node,
16
- /** DEPRECATED: The legacy method of choosing a theme. Use badgeColor instead. (optional) */
17
- type?: string,
18
- ...
19
- };
20
- declare var Badge: React.StatelessFunctionalComponent<TypeBadgeProps>;
21
- declare export default typeof Badge;
@@ -1,28 +0,0 @@
1
- // @flow
2
-
3
- type TypeLegacyBadgeColor = {|
4
- color: string,
5
- background: string,
6
- |};
7
- declare export var legacyBadgeColors: {|
8
- primary: TypeLegacyBadgeColor,
9
- secondary: TypeLegacyBadgeColor,
10
- passive: TypeLegacyBadgeColor,
11
- common: TypeLegacyBadgeColor,
12
- approval: TypeLegacyBadgeColor,
13
- default: TypeLegacyBadgeColor,
14
- suggestion: TypeLegacyBadgeColor,
15
- |};
16
- export const badgeColors = Object.freeze({
17
- green: "green",
18
- blue: "blue",
19
- purple: "purple",
20
- yellow: "yellow",
21
- orange: "orange",
22
- red: "red",
23
- neutral: "neutral",
24
- magenta: "magenta",
25
- pink: "pink",
26
- aqua: "aqua",
27
- teal: "teal"
28
- });
@@ -1,3 +0,0 @@
1
- // @flow
2
- export * from "./Badge.flow";
3
- export * from "./constants.flow";
@@ -1,22 +0,0 @@
1
- // @flow
2
- import * as React from "react";
3
- import type { TypeIconProps } from "../Icon/index.flow";
4
- export type EnumBannerType = "success" | "info" | "error" | "warning" | "opportunity";
5
- export type TypeBannerProps = {
6
- text: React.Node,
7
- /** Type of banner. */
8
- type?: EnumBannerType,
9
- /** Show the close icon in the banner with an action when clicked */
10
- onClose?: () => void,
11
- /** Close icon aria label */
12
- closeButtonLabel?: string,
13
- /** Icon props that can be passed to the Type specific Icon */
14
- typeIconProps?: {
15
- ...TypeIconProps,
16
- name?: void,
17
- ...
18
- },
19
- ...
20
- };
21
- declare var Banner: React.StatelessFunctionalComponent<TypeBannerProps>;
22
- declare export default typeof Banner;
@@ -1,2 +0,0 @@
1
- // @flow
2
- export * from "./Banner.flow";
@@ -1,22 +0,0 @@
1
- // @flow
2
- import * as React from "react";
3
- import type { StyledComponent } from "styled-components";
4
- import type { TypeStyledComponentsCommonProps } from "../types/styled-components.flow";
5
- import type { TypeSystemCommonProps, TypeSystemBorderProps, TypeSystemLayoutProps, TypeSystemPositionProps, TypeSystemFlexboxProps, TypeSystemGridProps } from "../types/system-props.flow";
6
- import type { TypeTheme } from "../types/theme.flow";
7
- export type TypeContainerProps = $ReadOnly<{|
8
- ...TypeStyledComponentsCommonProps,
9
- ...TypeSystemCommonProps,
10
- ...TypeSystemBorderProps,
11
- ...TypeSystemLayoutProps,
12
- ...TypeSystemPositionProps,
13
- ...TypeSystemFlexboxProps,
14
- ...TypeSystemGridProps,
15
- |}>;
16
- type TypeBoxContainer = StyledComponent<TypeContainerProps, TypeTheme, *>;
17
- export type TypeBoxProps = {
18
- ...React.ElementConfig<TypeBoxContainer>,
19
- ...
20
- };
21
- declare var Box: React.AbstractComponent<TypeBoxProps, *>;
22
- declare export default typeof Box;
@@ -1,2 +0,0 @@
1
- // @flow
2
- export * from "./Box.flow";
@@ -1,22 +0,0 @@
1
- // @flow
2
- import * as React from "react";
3
- import type { TypeLinkProps } from "../Link/index.flow";
4
- import type { TypeWithDisplayName } from "../types/shared.flow";
5
- export type TypeBreadcrumbProps = {
6
- children: React.Node,
7
- /** Description of the type of navigation being provided by the breadcrumb (i.e. "Asset library breadcrumb") */
8
- ariaLabel: string,
9
- /** optional */
10
- overflow?: {
11
- label: string,
12
- menu: React.Node,
13
- ...
14
- },
15
- ...
16
- };
17
- export type TypeBreadcrumbItemProps = TypeLinkProps;
18
- declare var BreadcrumbItem: TypeWithDisplayName<React.StatelessFunctionalComponent<TypeBreadcrumbItemProps>>;
19
- declare class Breadcrumb extends React.Component<TypeBreadcrumbProps> {
20
- static Item: typeof BreadcrumbItem
21
- }
22
- declare export default typeof Breadcrumb;
@@ -1,2 +0,0 @@
1
- // @flow
2
- export * from "./Breadcrumb.flow";