@sproutsocial/racine 12.23.0 → 13.0.2

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 (854) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/__flow__/Avatar/index.flow.js +16 -0
  3. package/__flow__/Avatar/index.js +33 -77
  4. package/__flow__/Badge/constants.js +9 -15
  5. package/__flow__/Badge/index.flow.js +17 -0
  6. package/__flow__/Badge/index.js +12 -53
  7. package/__flow__/Badge/styles.js +17 -27
  8. package/__flow__/Banner/index.flow.js +9 -0
  9. package/__flow__/Banner/index.js +16 -42
  10. package/__flow__/Banner/styles.js +8 -14
  11. package/__flow__/Box/index.flow.js +7 -0
  12. package/__flow__/Box/index.js +7 -9
  13. package/__flow__/Box/styles.js +9 -25
  14. package/__flow__/Breadcrumb/index.flow.js +15 -0
  15. package/__flow__/Breadcrumb/index.js +35 -60
  16. package/__flow__/Breadcrumb/styles.js +11 -14
  17. package/__flow__/Button/index.flow.js +26 -0
  18. package/__flow__/Button/index.js +9 -75
  19. package/__flow__/Button/styles.js +27 -47
  20. package/__flow__/Card/index.flow.js +19 -0
  21. package/__flow__/Card/index.js +8 -37
  22. package/__flow__/Card/styles.js +8 -11
  23. package/__flow__/CharacterCounter/index.flow.js +10 -0
  24. package/__flow__/CharacterCounter/index.js +13 -15
  25. package/__flow__/CharacterCounter/styles.js +9 -17
  26. package/__flow__/ChartLegend/index.flow.js +14 -0
  27. package/__flow__/ChartLegend/index.js +16 -31
  28. package/__flow__/ChartLegend/styles.js +10 -18
  29. package/__flow__/Checkbox/index.flow.js +22 -0
  30. package/__flow__/Checkbox/index.js +16 -93
  31. package/__flow__/Checkbox/styles.js +48 -101
  32. package/__flow__/Collapsible/index.flow.js +11 -0
  33. package/__flow__/Collapsible/index.js +45 -72
  34. package/__flow__/Collapsible/styles.js +11 -12
  35. package/__flow__/DatePicker/DateRangePicker.flow.js +15 -0
  36. package/__flow__/DatePicker/DateRangePicker.js +17 -32
  37. package/__flow__/DatePicker/SingleDatePicker.flow.js +12 -0
  38. package/__flow__/DatePicker/SingleDatePicker.js +17 -26
  39. package/__flow__/DatePicker/StatefulDateRangePicker.js +19 -33
  40. package/__flow__/DatePicker/StatefulSingleDatePicker.js +10 -16
  41. package/__flow__/DatePicker/common.flow.js +20 -0
  42. package/__flow__/DatePicker/common.js +19 -41
  43. package/__flow__/DatePicker/index.js +3 -4
  44. package/__flow__/DatePicker/styles.js +87 -72
  45. package/__flow__/Drawer/SlideTransition.js +22 -14
  46. package/__flow__/Drawer/index.flow.js +38 -0
  47. package/__flow__/Drawer/index.js +72 -184
  48. package/__flow__/Drawer/styles.js +9 -13
  49. package/__flow__/EmptyState/index.flow.js +15 -0
  50. package/__flow__/EmptyState/index.js +18 -46
  51. package/__flow__/EnumIconNames.js +1 -1
  52. package/__flow__/EnumIllustrationNames.js +1 -1
  53. package/__flow__/EnumLogoNames.js +1 -1
  54. package/__flow__/Fieldset/index.flow.js +10 -0
  55. package/__flow__/Fieldset/index.js +23 -54
  56. package/__flow__/Fieldset/styles.js +6 -12
  57. package/__flow__/FormField/index.flow.js +28 -0
  58. package/__flow__/FormField/index.js +28 -72
  59. package/__flow__/Icon/deprecatedIcons.js +4 -3
  60. package/__flow__/Icon/index.flow.js +34 -0
  61. package/__flow__/Icon/index.js +21 -80
  62. package/__flow__/Icon/styles.js +9 -15
  63. package/__flow__/IconViewBoxes.js +375 -1
  64. package/__flow__/IllustrationViewBoxes.js +121 -1
  65. package/__flow__/Image/index.flow.js +15 -0
  66. package/__flow__/Image/index.js +24 -52
  67. package/__flow__/Image/styles.js +6 -11
  68. package/__flow__/Indicator/index.flow.js +6 -0
  69. package/__flow__/Indicator/index.js +16 -20
  70. package/__flow__/Indicator/styles.js +9 -12
  71. package/__flow__/Input/index.flow.js +60 -0
  72. package/__flow__/Input/index.js +50 -188
  73. package/__flow__/Input/styles.js +49 -70
  74. package/__flow__/KeyboardKey/index.flow.js +7 -0
  75. package/__flow__/KeyboardKey/index.js +14 -14
  76. package/__flow__/KeyboardKey/styles.js +10 -13
  77. package/__flow__/Label/index.flow.js +14 -0
  78. package/__flow__/Label/index.js +12 -30
  79. package/__flow__/Link/constants.js +4 -7
  80. package/__flow__/Link/index.flow.js +18 -0
  81. package/__flow__/Link/index.js +11 -44
  82. package/__flow__/Link/styles.js +15 -22
  83. package/__flow__/Listbox/index.flow.js +20 -0
  84. package/__flow__/Listbox/index.js +51 -70
  85. package/__flow__/Loader/index.flow.js +12 -0
  86. package/__flow__/Loader/index.js +19 -26
  87. package/__flow__/Loader/styles.js +13 -28
  88. package/__flow__/LoaderButton/index.flow.js +7 -0
  89. package/__flow__/LoaderButton/index.js +19 -47
  90. package/__flow__/LogoViewBoxes.js +90 -1
  91. package/__flow__/Menu/constants.js +3 -4
  92. package/__flow__/Menu/descendants.js +140 -240
  93. package/__flow__/Menu/hooks.js +86 -115
  94. package/__flow__/Menu/index.flow.js +23 -31
  95. package/__flow__/Menu/index.js +146 -340
  96. package/__flow__/Menu/names.js +1 -4947
  97. package/__flow__/Menu/styles.js +31 -51
  98. package/__flow__/Message/constants.js +9 -0
  99. package/__flow__/Message/index.flow.js +17 -0
  100. package/__flow__/Message/index.js +69 -115
  101. package/__flow__/Message/styles.js +62 -76
  102. package/__flow__/Modal/index.flow.js +46 -0
  103. package/__flow__/Modal/index.js +55 -129
  104. package/__flow__/Modal/styles.js +39 -62
  105. package/__flow__/Numeral/constants.js +3 -3
  106. package/__flow__/Numeral/index.flow.js +19 -0
  107. package/__flow__/Numeral/index.js +53 -71
  108. package/__flow__/Numeral/styles.js +4 -7
  109. package/__flow__/Numeral/tests/testNumeral.js +20 -24
  110. package/__flow__/OverflowList/index.flow.js +6 -8
  111. package/__flow__/OverflowList/index.js +52 -89
  112. package/__flow__/OverflowList/styles.js +8 -18
  113. package/__flow__/PartnerLogo/TypePartnerNames.js +1 -38
  114. package/__flow__/PartnerLogo/index.flow.js +19 -0
  115. package/__flow__/PartnerLogo/index.js +18 -37
  116. package/__flow__/PartnerLogo/styles.js +8 -12
  117. package/__flow__/Popout/index.flow.js +89 -0
  118. package/__flow__/Popout/index.js +114 -274
  119. package/__flow__/Popout/styles.js +4 -6
  120. package/__flow__/Portal/index.flow.js +10 -0
  121. package/__flow__/Portal/index.js +18 -25
  122. package/__flow__/Radio/index.flow.js +19 -0
  123. package/__flow__/Radio/index.js +10 -42
  124. package/__flow__/Radio/styles.js +27 -43
  125. package/__flow__/SegmentedControl/index.flow.js +20 -0
  126. package/__flow__/SegmentedControl/index.js +24 -73
  127. package/__flow__/SegmentedControl/styles.js +26 -36
  128. package/__flow__/Select/index.flow.js +25 -0
  129. package/__flow__/Select/index.js +14 -55
  130. package/__flow__/Select/styles.js +53 -62
  131. package/__flow__/Skeleton/index.js +6 -10
  132. package/__flow__/SpotIllustration/illustrationNames.js +1 -121
  133. package/__flow__/SpotIllustration/index.flow.js +9 -0
  134. package/__flow__/SpotIllustration/index.js +24 -41
  135. package/__flow__/Stack/index.flow.js +24 -0
  136. package/__flow__/Stack/index.js +57 -81
  137. package/__flow__/Switch/index.flow.js +16 -0
  138. package/__flow__/Switch/index.js +21 -34
  139. package/__flow__/Switch/styles.js +28 -34
  140. package/__flow__/Table/index.flow.js +30 -0
  141. package/__flow__/Table/index.js +44 -85
  142. package/__flow__/Table/styles.js +5 -8
  143. package/__flow__/TableCell/index.flow.js +19 -0
  144. package/__flow__/TableCell/index.js +18 -31
  145. package/__flow__/TableCell/styles.js +11 -12
  146. package/__flow__/TableHeaderCell/constants.js +6 -0
  147. package/__flow__/TableHeaderCell/index.flow.js +24 -0
  148. package/__flow__/TableHeaderCell/index.js +31 -59
  149. package/__flow__/TableHeaderCell/styles.js +10 -16
  150. package/__flow__/TableRowAccordion/index.flow.js +13 -0
  151. package/__flow__/TableRowAccordion/index.js +26 -44
  152. package/__flow__/TableRowAccordion/styles.js +9 -17
  153. package/__flow__/Tabs/index.flow.js +20 -0
  154. package/__flow__/Tabs/index.js +48 -78
  155. package/__flow__/Tabs/styles.js +21 -40
  156. package/__flow__/Text/index.flow.js +13 -0
  157. package/__flow__/Text/index.js +38 -65
  158. package/__flow__/Text/styles.js +8 -15
  159. package/__flow__/Textarea/index.flow.js +48 -0
  160. package/__flow__/Textarea/index.js +12 -96
  161. package/__flow__/Textarea/styles.js +27 -46
  162. package/__flow__/ThemeProvider/index.js +5 -11
  163. package/__flow__/Toast/index.flow.js +20 -0
  164. package/__flow__/Toast/index.js +45 -99
  165. package/__flow__/Toast/styles.js +14 -20
  166. package/__flow__/ToggleHint/index.flow.js +13 -0
  167. package/__flow__/ToggleHint/index.js +17 -31
  168. package/__flow__/ToggleHint/styles.js +10 -18
  169. package/__flow__/Token/index.flow.js +15 -0
  170. package/__flow__/Token/index.js +15 -44
  171. package/__flow__/Token/styles.js +25 -22
  172. package/__flow__/TokenInput/index.flow.js +67 -2
  173. package/__flow__/TokenInput/index.js +108 -221
  174. package/__flow__/TokenInput/styles.js +36 -54
  175. package/__flow__/TokenInput/util.js +6 -11
  176. package/__flow__/Tooltip/index.flow.js +22 -0
  177. package/__flow__/Tooltip/index.js +38 -126
  178. package/__flow__/Tooltip/styles.js +6 -8
  179. package/__flow__/VisuallyHidden/index.js +4 -6
  180. package/__flow__/dataviz/index.js +6 -9
  181. package/__flow__/index.js +152 -76
  182. package/__flow__/systemProps/background.js +4 -15
  183. package/__flow__/systemProps/border.js +4 -35
  184. package/__flow__/systemProps/color.js +5 -15
  185. package/__flow__/systemProps/custom.js +7 -14
  186. package/__flow__/systemProps/flexbox.js +4 -21
  187. package/__flow__/systemProps/grid.js +4 -22
  188. package/__flow__/systemProps/index.js +14 -15
  189. package/__flow__/systemProps/layout.js +4 -22
  190. package/__flow__/systemProps/position.js +4 -16
  191. package/__flow__/systemProps/shadow.js +4 -9
  192. package/__flow__/systemProps/space.js +4 -25
  193. package/__flow__/systemProps/systemProps.js +15 -40
  194. package/__flow__/systemProps/tests/types.flow.js +2 -6
  195. package/__flow__/systemProps/types.flow.js +6 -14
  196. package/__flow__/systemProps/typography.js +5 -18
  197. package/__flow__/systemProps/variant.js +8 -12
  198. package/__flow__/themes/dark/dataviz-palette.js +4 -26
  199. package/__flow__/themes/dark/decorative-palettes.js +12 -23
  200. package/__flow__/themes/dark/theme.js +60 -74
  201. package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.js +65 -70
  202. package/__flow__/themes/extendedThemes/sproutTheme/index.js +2 -2
  203. package/__flow__/themes/extendedThemes/sproutTheme/light/theme.js +65 -70
  204. package/__flow__/themes/light/dataviz-palette.js +4 -26
  205. package/__flow__/themes/light/decorative-palettes.js +12 -23
  206. package/__flow__/themes/light/literal-colors.js +13 -15
  207. package/__flow__/themes/light/theme.js +71 -107
  208. package/__flow__/types/styled-components.flow.js +1 -1
  209. package/__flow__/types/system-props.flow.js +5 -25
  210. package/__flow__/types/theme.colors.flow.js +32 -46
  211. package/__flow__/types/theme.flow.js +7 -25
  212. package/__flow__/utils/a11yTest.js +2 -3
  213. package/__flow__/utils/chartColors.js +6 -71
  214. package/__flow__/utils/constants.js +1 -1
  215. package/__flow__/utils/dataQaLabelQueries.js +14 -37
  216. package/__flow__/utils/hooks.js +77 -114
  217. package/__flow__/utils/index.js +6 -12
  218. package/__flow__/utils/innerText.js +3 -15
  219. package/__flow__/utils/mixins.js +5 -14
  220. package/__flow__/utils/react-testing-library.js +8 -40
  221. package/__flow__/utils/responsiveProps/index.js +6 -19
  222. package/__flow__/utils/system-props.js +11 -77
  223. package/__flow__/utils/useInteractiveColor.js +4 -7
  224. package/commonjs/{Stack/TypeSpaceLiterals.js → Avatar/index.flow.js} +0 -0
  225. package/commonjs/Avatar/index.js +31 -28
  226. package/commonjs/Badge/index.flow.js +6 -0
  227. package/commonjs/Badge/index.js +1 -1
  228. package/commonjs/Badge/styles.js +1 -1
  229. package/commonjs/Banner/index.flow.js +6 -0
  230. package/commonjs/Banner/index.js +15 -17
  231. package/commonjs/Box/index.flow.js +8 -0
  232. package/commonjs/Breadcrumb/index.flow.js +8 -0
  233. package/commonjs/Breadcrumb/index.js +21 -19
  234. package/commonjs/Button/index.flow.js +6 -0
  235. package/commonjs/Button/index.js +1 -7
  236. package/commonjs/Button/styles.js +1 -1
  237. package/commonjs/Card/index.flow.js +7 -0
  238. package/commonjs/Card/styles.js +1 -1
  239. package/commonjs/CharacterCounter/index.flow.js +1 -0
  240. package/commonjs/ChartLegend/index.flow.js +1 -0
  241. package/commonjs/ChartLegend/index.js +10 -6
  242. package/commonjs/Checkbox/index.flow.js +1 -0
  243. package/commonjs/Checkbox/index.js +27 -24
  244. package/commonjs/Checkbox/styles.js +1 -1
  245. package/commonjs/Collapsible/index.flow.js +6 -0
  246. package/commonjs/Collapsible/index.js +1 -1
  247. package/commonjs/DatePicker/DateRangePicker.flow.js +1 -0
  248. package/commonjs/DatePicker/SingleDatePicker.flow.js +1 -0
  249. package/commonjs/DatePicker/StatefulDateRangePicker.js +10 -7
  250. package/commonjs/DatePicker/StatefulSingleDatePicker.js +7 -4
  251. package/commonjs/DatePicker/common.flow.js +1 -0
  252. package/commonjs/DatePicker/common.js +1 -1
  253. package/commonjs/DatePicker/styles.js +1 -1
  254. package/commonjs/Drawer/index.flow.js +6 -0
  255. package/commonjs/Drawer/index.js +24 -20
  256. package/commonjs/EmptyState/index.flow.js +6 -0
  257. package/commonjs/EmptyState/index.js +1 -1
  258. package/commonjs/Fieldset/index.flow.js +6 -0
  259. package/commonjs/FormField/index.flow.js +9 -0
  260. package/commonjs/FormField/index.js +1 -1
  261. package/commonjs/Icon/deprecatedIcons.js +2 -2
  262. package/commonjs/Icon/index.flow.js +4 -0
  263. package/commonjs/Icon/index.js +19 -15
  264. package/commonjs/Icon/styles.js +1 -1
  265. package/commonjs/IllustrationViewBoxes.js +2 -2
  266. package/commonjs/Image/index.flow.js +1 -0
  267. package/commonjs/Image/index.js +18 -14
  268. package/commonjs/Indicator/index.flow.js +1 -0
  269. package/commonjs/Indicator/index.js +12 -9
  270. package/commonjs/Indicator/styles.js +1 -1
  271. package/commonjs/Input/index.flow.js +6 -0
  272. package/commonjs/Input/index.js +52 -49
  273. package/commonjs/Input/styles.js +1 -1
  274. package/commonjs/KeyboardKey/index.flow.js +1 -0
  275. package/commonjs/Label/index.flow.js +8 -0
  276. package/commonjs/Label/index.js +9 -6
  277. package/commonjs/Link/index.flow.js +6 -0
  278. package/commonjs/Link/styles.js +1 -1
  279. package/commonjs/Listbox/index.flow.js +9 -0
  280. package/commonjs/Listbox/index.js +2 -2
  281. package/commonjs/Loader/index.flow.js +1 -0
  282. package/commonjs/Loader/index.js +13 -9
  283. package/commonjs/Loader/styles.js +2 -2
  284. package/commonjs/LoaderButton/index.flow.js +1 -0
  285. package/commonjs/LoaderButton/index.js +2 -6
  286. package/commonjs/Menu/index.js +28 -29
  287. package/commonjs/Menu/styles.js +1 -1
  288. package/commonjs/Message/constants.js +15 -0
  289. package/commonjs/Message/index.flow.js +7 -0
  290. package/commonjs/Message/index.js +12 -17
  291. package/commonjs/Message/styles.js +14 -14
  292. package/commonjs/Modal/index.flow.js +8 -0
  293. package/commonjs/Modal/index.js +31 -29
  294. package/commonjs/Modal/styles.js +9 -6
  295. package/commonjs/Numeral/index.flow.js +1 -0
  296. package/commonjs/Numeral/index.js +9 -10
  297. package/commonjs/Numeral/tests/testNumeral.js +4 -4
  298. package/commonjs/OverflowList/index.js +2 -2
  299. package/commonjs/OverflowList/styles.js +1 -1
  300. package/commonjs/PartnerLogo/index.flow.js +1 -0
  301. package/commonjs/PartnerLogo/index.js +18 -15
  302. package/commonjs/PartnerLogo/styles.js +1 -1
  303. package/commonjs/Popout/index.flow.js +6 -0
  304. package/commonjs/Popout/index.js +25 -23
  305. package/commonjs/Portal/index.flow.js +6 -0
  306. package/commonjs/Radio/index.flow.js +1 -0
  307. package/commonjs/Radio/styles.js +2 -2
  308. package/commonjs/SegmentedControl/index.flow.js +6 -0
  309. package/commonjs/SegmentedControl/index.js +21 -19
  310. package/commonjs/SegmentedControl/styles.js +1 -1
  311. package/commonjs/Select/index.flow.js +6 -0
  312. package/commonjs/Select/index.js +1 -1
  313. package/commonjs/Select/styles.js +1 -1
  314. package/commonjs/Skeleton/index.js +1 -1
  315. package/commonjs/SpotIllustration/illustrationNames.js +1 -1
  316. package/commonjs/SpotIllustration/index.flow.js +1 -0
  317. package/commonjs/SpotIllustration/index.js +1 -1
  318. package/commonjs/Stack/index.flow.js +6 -0
  319. package/commonjs/Stack/index.js +1 -1
  320. package/commonjs/Switch/index.flow.js +1 -0
  321. package/commonjs/Switch/index.js +19 -15
  322. package/commonjs/Switch/styles.js +1 -1
  323. package/commonjs/Table/index.flow.js +6 -0
  324. package/commonjs/TableCell/index.flow.js +6 -0
  325. package/commonjs/TableHeaderCell/constants.js +12 -0
  326. package/commonjs/TableHeaderCell/index.flow.js +3 -0
  327. package/commonjs/TableHeaderCell/index.js +5 -9
  328. package/commonjs/TableRowAccordion/index.flow.js +6 -0
  329. package/commonjs/TableRowAccordion/index.js +1 -1
  330. package/commonjs/Tabs/index.flow.js +6 -0
  331. package/commonjs/Tabs/index.js +1 -2
  332. package/commonjs/Text/index.flow.js +6 -0
  333. package/commonjs/Text/index.js +1 -1
  334. package/commonjs/Textarea/index.flow.js +6 -0
  335. package/commonjs/Textarea/index.js +42 -38
  336. package/commonjs/Textarea/styles.js +1 -1
  337. package/commonjs/Toast/index.flow.js +6 -0
  338. package/commonjs/Toast/index.js +2 -2
  339. package/commonjs/Toast/styles.js +2 -1
  340. package/commonjs/ToggleHint/index.flow.js +1 -0
  341. package/commonjs/ToggleHint/index.js +8 -5
  342. package/commonjs/ToggleHint/styles.js +1 -1
  343. package/commonjs/Token/index.flow.js +6 -0
  344. package/commonjs/Token/index.js +28 -24
  345. package/commonjs/Token/styles.js +1 -1
  346. package/commonjs/TokenInput/index.flow.js +6 -1
  347. package/commonjs/TokenInput/index.js +42 -39
  348. package/commonjs/TokenInput/styles.js +1 -1
  349. package/commonjs/Tooltip/index.flow.js +6 -0
  350. package/commonjs/Tooltip/index.js +19 -15
  351. package/commonjs/VisuallyHidden/index.js +1 -1
  352. package/commonjs/dataviz/index.js +1 -1
  353. package/commonjs/index.js +113 -97
  354. package/commonjs/themes/dark/theme.js +1 -1
  355. package/commonjs/themes/light/theme.js +4 -9
  356. package/commonjs/utils/hooks.js +2 -2
  357. package/commonjs/utils/mixins.js +1 -1
  358. package/commonjs/utils/react-testing-library.js +1 -1
  359. package/dist/illustration.svg +1 -1
  360. package/dist/illustrationList.js +1 -1
  361. package/lib/{Stack/TypeSpaceLiterals.js → Avatar/index.flow.js} +0 -0
  362. package/lib/Avatar/index.js +31 -28
  363. package/lib/Badge/index.flow.js +2 -0
  364. package/lib/Badge/index.js +1 -1
  365. package/lib/Badge/styles.js +1 -1
  366. package/lib/Banner/index.flow.js +2 -0
  367. package/lib/Banner/index.js +15 -23
  368. package/lib/Box/index.flow.js +3 -0
  369. package/lib/Breadcrumb/index.flow.js +3 -0
  370. package/lib/Breadcrumb/index.js +22 -21
  371. package/lib/Button/index.flow.js +2 -0
  372. package/lib/Button/index.js +1 -13
  373. package/lib/Button/styles.js +1 -1
  374. package/lib/Card/index.flow.js +3 -0
  375. package/lib/Card/styles.js +1 -1
  376. package/lib/CharacterCounter/index.flow.js +0 -0
  377. package/lib/ChartLegend/index.flow.js +0 -0
  378. package/lib/ChartLegend/index.js +10 -6
  379. package/lib/Checkbox/index.flow.js +0 -0
  380. package/lib/Checkbox/index.js +27 -24
  381. package/lib/Checkbox/styles.js +1 -1
  382. package/lib/Collapsible/index.flow.js +2 -0
  383. package/lib/Collapsible/index.js +1 -1
  384. package/lib/DatePicker/DateRangePicker.flow.js +0 -0
  385. package/lib/DatePicker/SingleDatePicker.flow.js +0 -0
  386. package/lib/DatePicker/StatefulDateRangePicker.js +10 -7
  387. package/lib/DatePicker/StatefulSingleDatePicker.js +7 -4
  388. package/lib/DatePicker/common.flow.js +0 -0
  389. package/lib/DatePicker/common.js +1 -1
  390. package/lib/DatePicker/styles.js +2 -1
  391. package/lib/Drawer/index.flow.js +2 -0
  392. package/lib/Drawer/index.js +24 -21
  393. package/lib/EmptyState/index.flow.js +2 -0
  394. package/lib/EmptyState/index.js +1 -1
  395. package/lib/Fieldset/index.flow.js +2 -0
  396. package/lib/FormField/index.flow.js +4 -0
  397. package/lib/FormField/index.js +1 -3
  398. package/lib/Icon/deprecatedIcons.js +3 -2
  399. package/lib/Icon/index.flow.js +3 -0
  400. package/lib/Icon/index.js +19 -15
  401. package/lib/Icon/styles.js +1 -1
  402. package/lib/IllustrationViewBoxes.js +2 -2
  403. package/lib/Image/index.flow.js +0 -0
  404. package/lib/Image/index.js +18 -14
  405. package/lib/Indicator/index.flow.js +0 -0
  406. package/lib/Indicator/index.js +12 -9
  407. package/lib/Indicator/styles.js +1 -1
  408. package/lib/Input/index.flow.js +2 -0
  409. package/lib/Input/index.js +52 -49
  410. package/lib/Input/styles.js +1 -1
  411. package/lib/KeyboardKey/index.flow.js +0 -0
  412. package/lib/Label/index.flow.js +3 -0
  413. package/lib/Label/index.js +9 -6
  414. package/lib/Link/index.flow.js +2 -0
  415. package/lib/Link/styles.js +1 -1
  416. package/lib/Listbox/index.flow.js +4 -0
  417. package/lib/Listbox/index.js +2 -2
  418. package/lib/Loader/index.flow.js +0 -0
  419. package/lib/Loader/index.js +13 -9
  420. package/lib/Loader/styles.js +2 -2
  421. package/lib/LoaderButton/index.flow.js +0 -0
  422. package/lib/LoaderButton/index.js +3 -8
  423. package/lib/Menu/index.js +29 -30
  424. package/lib/Menu/styles.js +1 -1
  425. package/lib/Message/constants.js +9 -0
  426. package/lib/Message/index.flow.js +3 -0
  427. package/lib/Message/index.js +5 -10
  428. package/lib/Message/styles.js +2 -2
  429. package/lib/Modal/index.flow.js +3 -0
  430. package/lib/Modal/index.js +31 -29
  431. package/lib/Modal/styles.js +9 -6
  432. package/lib/Numeral/constants.js +1 -0
  433. package/lib/Numeral/index.flow.js +0 -0
  434. package/lib/Numeral/index.js +2 -3
  435. package/lib/Numeral/tests/testNumeral.js +2 -2
  436. package/lib/OverflowList/index.js +1 -1
  437. package/lib/OverflowList/styles.js +1 -1
  438. package/lib/PartnerLogo/index.flow.js +0 -0
  439. package/lib/PartnerLogo/index.js +18 -15
  440. package/lib/PartnerLogo/styles.js +1 -1
  441. package/lib/Popout/index.flow.js +2 -0
  442. package/lib/Popout/index.js +25 -24
  443. package/lib/Portal/index.flow.js +2 -0
  444. package/lib/Radio/index.flow.js +0 -0
  445. package/lib/Radio/styles.js +2 -2
  446. package/lib/SegmentedControl/index.flow.js +2 -0
  447. package/lib/SegmentedControl/index.js +21 -19
  448. package/lib/SegmentedControl/styles.js +1 -1
  449. package/lib/Select/index.flow.js +2 -0
  450. package/lib/Select/index.js +1 -1
  451. package/lib/Select/styles.js +1 -1
  452. package/lib/Skeleton/index.js +1 -1
  453. package/lib/SpotIllustration/illustrationNames.js +1 -1
  454. package/lib/SpotIllustration/index.flow.js +0 -0
  455. package/lib/SpotIllustration/index.js +1 -1
  456. package/lib/Stack/index.flow.js +2 -0
  457. package/lib/Stack/index.js +1 -1
  458. package/lib/Switch/index.flow.js +0 -0
  459. package/lib/Switch/index.js +19 -15
  460. package/lib/Switch/styles.js +1 -1
  461. package/lib/Table/index.flow.js +2 -0
  462. package/lib/TableCell/index.flow.js +2 -0
  463. package/lib/TableHeaderCell/constants.js +6 -0
  464. package/lib/TableHeaderCell/index.flow.js +3 -0
  465. package/lib/TableHeaderCell/index.js +2 -5
  466. package/lib/TableRowAccordion/index.flow.js +2 -0
  467. package/lib/TableRowAccordion/index.js +1 -1
  468. package/lib/Tabs/index.flow.js +2 -0
  469. package/lib/Tabs/index.js +1 -2
  470. package/lib/Text/index.flow.js +2 -0
  471. package/lib/Text/index.js +1 -1
  472. package/lib/Textarea/index.flow.js +2 -0
  473. package/lib/Textarea/index.js +42 -38
  474. package/lib/Textarea/styles.js +1 -1
  475. package/lib/Toast/index.flow.js +2 -0
  476. package/lib/Toast/index.js +2 -2
  477. package/lib/Toast/styles.js +2 -3
  478. package/lib/ToggleHint/index.flow.js +0 -0
  479. package/lib/ToggleHint/index.js +8 -5
  480. package/lib/ToggleHint/styles.js +1 -1
  481. package/lib/Token/index.flow.js +2 -0
  482. package/lib/Token/index.js +28 -24
  483. package/lib/Token/styles.js +1 -1
  484. package/lib/TokenInput/index.flow.js +2 -0
  485. package/lib/TokenInput/index.js +41 -39
  486. package/lib/TokenInput/styles.js +1 -1
  487. package/lib/Tooltip/index.flow.js +2 -0
  488. package/lib/Tooltip/index.js +19 -15
  489. package/lib/VisuallyHidden/index.js +1 -1
  490. package/lib/dataviz/index.js +1 -1
  491. package/lib/index.js +74 -47
  492. package/lib/themes/dark/theme.js +4 -2
  493. package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +3 -0
  494. package/lib/themes/extendedThemes/sproutTheme/light/theme.js +3 -0
  495. package/lib/themes/light/theme.js +4 -10
  496. package/lib/utils/hooks.js +1 -1
  497. package/lib/utils/mixins.js +1 -1
  498. package/lib/utils/react-testing-library.js +1 -1
  499. package/package.json +11 -5
  500. package/__flow__/Avatar/__tests__/features.test.js +0 -98
  501. package/__flow__/Avatar/index.stories.js +0 -62
  502. package/__flow__/Badge/index.stories.js +0 -49
  503. package/__flow__/Badge/index.test.js +0 -67
  504. package/__flow__/Banner/index.stories.js +0 -108
  505. package/__flow__/Banner/index.test.js +0 -68
  506. package/__flow__/Box/index.stories.js +0 -135
  507. package/__flow__/Box/index.test.js +0 -12
  508. package/__flow__/Breadcrumb/index.stories.js +0 -76
  509. package/__flow__/Breadcrumb/index.test.js +0 -62
  510. package/__flow__/Button/index.stories.js +0 -153
  511. package/__flow__/Card/index.stories.js +0 -67
  512. package/__flow__/CharacterCounter/index.stories.js +0 -42
  513. package/__flow__/CharacterCounter/index.test.js +0 -24
  514. package/__flow__/ChartLegend/index.stories.js +0 -66
  515. package/__flow__/ChartLegend/index.test.js +0 -55
  516. package/__flow__/Checkbox/index.stories.js +0 -137
  517. package/__flow__/Checkbox/index.test.js +0 -91
  518. package/__flow__/Collapsible/index.stories.js +0 -182
  519. package/__flow__/Collapsible/index.test.js +0 -68
  520. package/__flow__/DatePicker/DateRangePicker.stories.js +0 -101
  521. package/__flow__/DatePicker/DateRangePicker.test.js +0 -123
  522. package/__flow__/DatePicker/SingleDatePicker.stories.js +0 -64
  523. package/__flow__/DatePicker/SingleDatePicker.test.js +0 -89
  524. package/__flow__/Drawer/index.stories.js +0 -336
  525. package/__flow__/Drawer/index.test.js +0 -158
  526. package/__flow__/EmptyState/index.stories.js +0 -108
  527. package/__flow__/EmptyState/index.test.js +0 -124
  528. package/__flow__/Fieldset/index.stories.js +0 -135
  529. package/__flow__/Fieldset/index.test.js +0 -34
  530. package/__flow__/FormField/index.stories.js +0 -116
  531. package/__flow__/FormField/index.test.js +0 -71
  532. package/__flow__/Icon/index.stories.js +0 -175
  533. package/__flow__/Icon/index.test.js +0 -25
  534. package/__flow__/Image/index.stories.js +0 -30
  535. package/__flow__/Image/index.test.js +0 -86
  536. package/__flow__/Indicator/index.stories.js +0 -16
  537. package/__flow__/Indicator/index.test.js +0 -11
  538. package/__flow__/Input/index.stories.js +0 -216
  539. package/__flow__/Input/index.test.js +0 -405
  540. package/__flow__/KeyboardKey/index.stories.js +0 -25
  541. package/__flow__/KeyboardKey/index.test.js +0 -12
  542. package/__flow__/Label/index.stories.js +0 -15
  543. package/__flow__/Label/index.test.js +0 -16
  544. package/__flow__/Link/index.stories.js +0 -115
  545. package/__flow__/Link/index.test.js +0 -110
  546. package/__flow__/Listbox/index.stories.js +0 -238
  547. package/__flow__/Listbox/index.test.js +0 -291
  548. package/__flow__/Loader/index.stories.js +0 -40
  549. package/__flow__/Loader/index.test.js +0 -26
  550. package/__flow__/LoaderButton/index.stories.js +0 -84
  551. package/__flow__/LoaderButton/index.test.js +0 -35
  552. package/__flow__/Menu/__snapshots__/index.test.js.snap +0 -115
  553. package/__flow__/Menu/index.stories.js +0 -261
  554. package/__flow__/Menu/index.test.js +0 -103
  555. package/__flow__/Message/index.stories.js +0 -73
  556. package/__flow__/Message/index.test.js +0 -12
  557. package/__flow__/Modal/index.stories.js +0 -409
  558. package/__flow__/Modal/index.test.js +0 -129
  559. package/__flow__/Numeral/index.stories.js +0 -183
  560. package/__flow__/Numeral/tests/A11y.test.js +0 -12
  561. package/__flow__/Numeral/tests/abbreviate.test.js +0 -72
  562. package/__flow__/Numeral/tests/currency.test.js +0 -40
  563. package/__flow__/Numeral/tests/defaults.test.js +0 -33
  564. package/__flow__/Numeral/tests/invalid.test.js +0 -12
  565. package/__flow__/Numeral/tests/locale.test.js +0 -83
  566. package/__flow__/Numeral/tests/precision.test.js +0 -126
  567. package/__flow__/Numeral/tests/zero.test.js +0 -11
  568. package/__flow__/OverflowList/index.stories.js +0 -69
  569. package/__flow__/OverflowList/index.test.js +0 -79
  570. package/__flow__/PartnerLogo/index.stories.js +0 -124
  571. package/__flow__/PartnerLogo/partnerLogos/bigcommerce-dark.svg +0 -5
  572. package/__flow__/PartnerLogo/partnerLogos/bigcommerce-lockup-dark.svg +0 -14
  573. package/__flow__/PartnerLogo/partnerLogos/bigcommerce-lockup.svg +0 -14
  574. package/__flow__/PartnerLogo/partnerLogos/bigcommerce.svg +0 -5
  575. package/__flow__/PartnerLogo/partnerLogos/bitly-dark.svg +0 -1
  576. package/__flow__/PartnerLogo/partnerLogos/bitly.svg +0 -1
  577. package/__flow__/PartnerLogo/partnerLogos/canva-dark.svg +0 -1
  578. package/__flow__/PartnerLogo/partnerLogos/canva.svg +0 -1
  579. package/__flow__/PartnerLogo/partnerLogos/dropbox-dark.svg +0 -1
  580. package/__flow__/PartnerLogo/partnerLogos/dropbox-lockup-dark.svg +0 -7
  581. package/__flow__/PartnerLogo/partnerLogos/dropbox-lockup.svg +0 -7
  582. package/__flow__/PartnerLogo/partnerLogos/dropbox-wordmark-dark.svg +0 -3
  583. package/__flow__/PartnerLogo/partnerLogos/dropbox-wordmark.svg +0 -3
  584. package/__flow__/PartnerLogo/partnerLogos/dropbox.svg +0 -1
  585. package/__flow__/PartnerLogo/partnerLogos/facebook-audience-network-dark.svg +0 -3
  586. package/__flow__/PartnerLogo/partnerLogos/facebook-audience-network.svg +0 -3
  587. package/__flow__/PartnerLogo/partnerLogos/facebook-dark.svg +0 -1
  588. package/__flow__/PartnerLogo/partnerLogos/facebook-groups-dark.svg +0 -3
  589. package/__flow__/PartnerLogo/partnerLogos/facebook-groups.svg +0 -3
  590. package/__flow__/PartnerLogo/partnerLogos/facebook-shops-dark.svg +0 -1
  591. package/__flow__/PartnerLogo/partnerLogos/facebook-shops.svg +0 -1
  592. package/__flow__/PartnerLogo/partnerLogos/facebook.svg +0 -1
  593. package/__flow__/PartnerLogo/partnerLogos/feedly-dark.svg +0 -3
  594. package/__flow__/PartnerLogo/partnerLogos/feedly.svg +0 -3
  595. package/__flow__/PartnerLogo/partnerLogos/glassdoor-dark.svg +0 -1
  596. package/__flow__/PartnerLogo/partnerLogos/glassdoor.svg +0 -1
  597. package/__flow__/PartnerLogo/partnerLogos/google-analytics-dark.svg +0 -1
  598. package/__flow__/PartnerLogo/partnerLogos/google-analytics.svg +0 -1
  599. package/__flow__/PartnerLogo/partnerLogos/google-business-messages-dark.svg +0 -1
  600. package/__flow__/PartnerLogo/partnerLogos/google-business-messages.svg +0 -1
  601. package/__flow__/PartnerLogo/partnerLogos/google-drive-dark.svg +0 -1
  602. package/__flow__/PartnerLogo/partnerLogos/google-drive.svg +0 -1
  603. package/__flow__/PartnerLogo/partnerLogos/google-my-business-dark.svg +0 -1
  604. package/__flow__/PartnerLogo/partnerLogos/google-my-business.svg +0 -1
  605. package/__flow__/PartnerLogo/partnerLogos/hubspot-dark.svg +0 -1
  606. package/__flow__/PartnerLogo/partnerLogos/hubspot.svg +0 -1
  607. package/__flow__/PartnerLogo/partnerLogos/instagram-dark.svg +0 -1
  608. package/__flow__/PartnerLogo/partnerLogos/instagram.svg +0 -1
  609. package/__flow__/PartnerLogo/partnerLogos/linkedin-audience-network-dark.svg +0 -3
  610. package/__flow__/PartnerLogo/partnerLogos/linkedin-audience-network.svg +0 -3
  611. package/__flow__/PartnerLogo/partnerLogos/linkedin-dark.svg +0 -1
  612. package/__flow__/PartnerLogo/partnerLogos/linkedin.svg +0 -1
  613. package/__flow__/PartnerLogo/partnerLogos/marketo-dark.svg +0 -1
  614. package/__flow__/PartnerLogo/partnerLogos/marketo.svg +0 -1
  615. package/__flow__/PartnerLogo/partnerLogos/messenger-dark.svg +0 -1
  616. package/__flow__/PartnerLogo/partnerLogos/messenger.svg +0 -1
  617. package/__flow__/PartnerLogo/partnerLogos/microsoft-dynamics-dark.svg +0 -1
  618. package/__flow__/PartnerLogo/partnerLogos/microsoft-dynamics.svg +0 -1
  619. package/__flow__/PartnerLogo/partnerLogos/pinterest-dark.svg +0 -1
  620. package/__flow__/PartnerLogo/partnerLogos/pinterest.svg +0 -1
  621. package/__flow__/PartnerLogo/partnerLogos/reddit-dark.svg +0 -1
  622. package/__flow__/PartnerLogo/partnerLogos/reddit.svg +0 -1
  623. package/__flow__/PartnerLogo/partnerLogos/salesforce-dark.svg +0 -1
  624. package/__flow__/PartnerLogo/partnerLogos/salesforce.svg +0 -1
  625. package/__flow__/PartnerLogo/partnerLogos/shopify-dark.svg +0 -1
  626. package/__flow__/PartnerLogo/partnerLogos/shopify.svg +0 -1
  627. package/__flow__/PartnerLogo/partnerLogos/slack-dark.svg +0 -1
  628. package/__flow__/PartnerLogo/partnerLogos/slack.svg +0 -1
  629. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-dark.svg +0 -7
  630. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-lockup-dark.svg +0 -19
  631. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-lockup.svg +0 -19
  632. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-wordmark-dark.svg +0 -14
  633. package/__flow__/PartnerLogo/partnerLogos/sproutsocial-wordmark.svg +0 -14
  634. package/__flow__/PartnerLogo/partnerLogos/sproutsocial.svg +0 -7
  635. package/__flow__/PartnerLogo/partnerLogos/tiktok-dark.svg +0 -1
  636. package/__flow__/PartnerLogo/partnerLogos/tiktok.svg +0 -1
  637. package/__flow__/PartnerLogo/partnerLogos/tripadvisor-dark.svg +0 -1
  638. package/__flow__/PartnerLogo/partnerLogos/tripadvisor.svg +0 -1
  639. package/__flow__/PartnerLogo/partnerLogos/tumblr-dark.svg +0 -1
  640. package/__flow__/PartnerLogo/partnerLogos/tumblr.svg +0 -1
  641. package/__flow__/PartnerLogo/partnerLogos/twitter-audience-network-dark.svg +0 -3
  642. package/__flow__/PartnerLogo/partnerLogos/twitter-audience-network.svg +0 -3
  643. package/__flow__/PartnerLogo/partnerLogos/twitter-dark.svg +0 -1
  644. package/__flow__/PartnerLogo/partnerLogos/twitter.svg +0 -1
  645. package/__flow__/PartnerLogo/partnerLogos/whatsapp-dark.svg +0 -1
  646. package/__flow__/PartnerLogo/partnerLogos/whatsapp.svg +0 -1
  647. package/__flow__/PartnerLogo/partnerLogos/woocommerce-dark.svg +0 -1
  648. package/__flow__/PartnerLogo/partnerLogos/woocommerce.svg +0 -1
  649. package/__flow__/PartnerLogo/partnerLogos/yelp-dark.svg +0 -1
  650. package/__flow__/PartnerLogo/partnerLogos/yelp.svg +0 -1
  651. package/__flow__/PartnerLogo/partnerLogos/youtube-dark.svg +0 -1
  652. package/__flow__/PartnerLogo/partnerLogos/youtube.svg +0 -1
  653. package/__flow__/PartnerLogo/partnerLogos/zendesk-dark.svg +0 -1
  654. package/__flow__/PartnerLogo/partnerLogos/zendesk-lockup-dark.svg +0 -28
  655. package/__flow__/PartnerLogo/partnerLogos/zendesk-lockup.svg +0 -28
  656. package/__flow__/PartnerLogo/partnerLogos/zendesk-wordmark-dark.svg +0 -9
  657. package/__flow__/PartnerLogo/partnerLogos/zendesk-wordmark.svg +0 -9
  658. package/__flow__/PartnerLogo/partnerLogos/zendesk.svg +0 -1
  659. package/__flow__/Popout/__snapshots__/index.test.js.snap +0 -121
  660. package/__flow__/Popout/index.stories.js +0 -471
  661. package/__flow__/Popout/index.test.js +0 -179
  662. package/__flow__/Portal/index.stories.js +0 -42
  663. package/__flow__/Radio/index.stories.js +0 -75
  664. package/__flow__/Radio/index.test.js +0 -47
  665. package/__flow__/SegmentedControl/index.stories.js +0 -44
  666. package/__flow__/SegmentedControl/index.test.js +0 -74
  667. package/__flow__/Select/index.stories.js +0 -42
  668. package/__flow__/Select/index.test.js +0 -44
  669. package/__flow__/Skeleton/index.stories.js +0 -31
  670. package/__flow__/SpotIllustration/index.stories.js +0 -134
  671. package/__flow__/SpotIllustration/spotIllustrations/abacus.svg +0 -21
  672. package/__flow__/SpotIllustration/spotIllustrations/analytics-offering.svg +0 -11
  673. package/__flow__/SpotIllustration/spotIllustrations/asset-cards.svg +0 -16
  674. package/__flow__/SpotIllustration/spotIllustrations/astronaut.svg +0 -15
  675. package/__flow__/SpotIllustration/spotIllustrations/binoculars.svg +0 -11
  676. package/__flow__/SpotIllustration/spotIllustrations/brand-keyword.svg +0 -10
  677. package/__flow__/SpotIllustration/spotIllustrations/browser-doc.svg +0 -10
  678. package/__flow__/SpotIllustration/spotIllustrations/business.svg +0 -23
  679. package/__flow__/SpotIllustration/spotIllustrations/calendar-event.svg +0 -11
  680. package/__flow__/SpotIllustration/spotIllustrations/calendar-reporting.svg +0 -13
  681. package/__flow__/SpotIllustration/spotIllustrations/campaign-tag.svg +0 -6
  682. package/__flow__/SpotIllustration/spotIllustrations/cat-error.svg +0 -4
  683. package/__flow__/SpotIllustration/spotIllustrations/cat-no-access.svg +0 -13
  684. package/__flow__/SpotIllustration/spotIllustrations/cat.svg +0 -4
  685. package/__flow__/SpotIllustration/spotIllustrations/checkbox-alert.svg +0 -11
  686. package/__flow__/SpotIllustration/spotIllustrations/coffee-cup.svg +0 -11
  687. package/__flow__/SpotIllustration/spotIllustrations/competitors.svg +0 -29
  688. package/__flow__/SpotIllustration/spotIllustrations/compose-window.svg +0 -21
  689. package/__flow__/SpotIllustration/spotIllustrations/compose.svg +0 -5
  690. package/__flow__/SpotIllustration/spotIllustrations/computer-error.svg +0 -15
  691. package/__flow__/SpotIllustration/spotIllustrations/connect.svg +0 -11
  692. package/__flow__/SpotIllustration/spotIllustrations/contact.svg +0 -87
  693. package/__flow__/SpotIllustration/spotIllustrations/conversation.svg +0 -15
  694. package/__flow__/SpotIllustration/spotIllustrations/custom-branding.svg +0 -7
  695. package/__flow__/SpotIllustration/spotIllustrations/customer-service.svg +0 -13
  696. package/__flow__/SpotIllustration/spotIllustrations/dashboard.svg +0 -13
  697. package/__flow__/SpotIllustration/spotIllustrations/exclamation-mark.svg +0 -11
  698. package/__flow__/SpotIllustration/spotIllustrations/face-happy.svg +0 -10
  699. package/__flow__/SpotIllustration/spotIllustrations/find-bookmark.svg +0 -12
  700. package/__flow__/SpotIllustration/spotIllustrations/flask.svg +0 -10
  701. package/__flow__/SpotIllustration/spotIllustrations/general-topic.svg +0 -9
  702. package/__flow__/SpotIllustration/spotIllustrations/global-features.svg +0 -17
  703. package/__flow__/SpotIllustration/spotIllustrations/global-trend.svg +0 -5
  704. package/__flow__/SpotIllustration/spotIllustrations/grow-large.svg +0 -12
  705. package/__flow__/SpotIllustration/spotIllustrations/grow.svg +0 -5
  706. package/__flow__/SpotIllustration/spotIllustrations/hands-raised.svg +0 -8
  707. package/__flow__/SpotIllustration/spotIllustrations/headset.svg +0 -8
  708. package/__flow__/SpotIllustration/spotIllustrations/heartbeat-connection.svg +0 -14
  709. package/__flow__/SpotIllustration/spotIllustrations/instagram-links.svg +0 -28
  710. package/__flow__/SpotIllustration/spotIllustrations/invoice.svg +0 -13
  711. package/__flow__/SpotIllustration/spotIllustrations/jewel.svg +0 -11
  712. package/__flow__/SpotIllustration/spotIllustrations/keyword-tracking.svg +0 -26
  713. package/__flow__/SpotIllustration/spotIllustrations/lightbulb-alt.svg +0 -5
  714. package/__flow__/SpotIllustration/spotIllustrations/lightbulb.svg +0 -4
  715. package/__flow__/SpotIllustration/spotIllustrations/like-conversation.svg +0 -11
  716. package/__flow__/SpotIllustration/spotIllustrations/link-broken.svg +0 -18
  717. package/__flow__/SpotIllustration/spotIllustrations/link-messages.svg +0 -10
  718. package/__flow__/SpotIllustration/spotIllustrations/link-sections.svg +0 -13
  719. package/__flow__/SpotIllustration/spotIllustrations/link-upload.svg +0 -12
  720. package/__flow__/SpotIllustration/spotIllustrations/listening-pendo.svg +0 -14
  721. package/__flow__/SpotIllustration/spotIllustrations/listening-sentiment.svg +0 -27
  722. package/__flow__/SpotIllustration/spotIllustrations/listening-topic-templates.svg +0 -26
  723. package/__flow__/SpotIllustration/spotIllustrations/listening-tour.svg +0 -18
  724. package/__flow__/SpotIllustration/spotIllustrations/listening.svg +0 -9
  725. package/__flow__/SpotIllustration/spotIllustrations/loading.svg +0 -4
  726. package/__flow__/SpotIllustration/spotIllustrations/mailbox-empty.svg +0 -18
  727. package/__flow__/SpotIllustration/spotIllustrations/mailbox-full.svg +0 -8
  728. package/__flow__/SpotIllustration/spotIllustrations/message.svg +0 -6
  729. package/__flow__/SpotIllustration/spotIllustrations/molecule.svg +0 -14
  730. package/__flow__/SpotIllustration/spotIllustrations/network-data.svg +0 -25
  731. package/__flow__/SpotIllustration/spotIllustrations/no-messages-found.svg +0 -20
  732. package/__flow__/SpotIllustration/spotIllustrations/no-notifications.svg +0 -4
  733. package/__flow__/SpotIllustration/spotIllustrations/note.svg +0 -6
  734. package/__flow__/SpotIllustration/spotIllustrations/notification.svg +0 -10
  735. package/__flow__/SpotIllustration/spotIllustrations/notifications-onboarding.svg +0 -23
  736. package/__flow__/SpotIllustration/spotIllustrations/organize-message.svg +0 -64
  737. package/__flow__/SpotIllustration/spotIllustrations/outbox-queue.svg +0 -12
  738. package/__flow__/SpotIllustration/spotIllustrations/outbox-reviews.svg +0 -10
  739. package/__flow__/SpotIllustration/spotIllustrations/pdf.svg +0 -5
  740. package/__flow__/SpotIllustration/spotIllustrations/planning.svg +0 -28
  741. package/__flow__/SpotIllustration/spotIllustrations/podium.svg +0 -13
  742. package/__flow__/SpotIllustration/spotIllustrations/pointer.svg +0 -4
  743. package/__flow__/SpotIllustration/spotIllustrations/publish-assets.svg +0 -15
  744. package/__flow__/SpotIllustration/spotIllustrations/publish-links.svg +0 -11
  745. package/__flow__/SpotIllustration/spotIllustrations/publishing.svg +0 -29
  746. package/__flow__/SpotIllustration/spotIllustrations/puzzle-piece.svg +0 -4
  747. package/__flow__/SpotIllustration/spotIllustrations/question-mark.svg +0 -11
  748. package/__flow__/SpotIllustration/spotIllustrations/reporting-folder.svg +0 -13
  749. package/__flow__/SpotIllustration/spotIllustrations/reporting.svg +0 -12
  750. package/__flow__/SpotIllustration/spotIllustrations/review-location.svg +0 -11
  751. package/__flow__/SpotIllustration/spotIllustrations/review.svg +0 -10
  752. package/__flow__/SpotIllustration/spotIllustrations/robot-assembly.svg +0 -12
  753. package/__flow__/SpotIllustration/spotIllustrations/robot-error.svg +0 -19
  754. package/__flow__/SpotIllustration/spotIllustrations/robot-happy.svg +0 -13
  755. package/__flow__/SpotIllustration/spotIllustrations/rocket.svg +0 -9
  756. package/__flow__/SpotIllustration/spotIllustrations/schedule-date.svg +0 -11
  757. package/__flow__/SpotIllustration/spotIllustrations/schedule-messages.svg +0 -10
  758. package/__flow__/SpotIllustration/spotIllustrations/search-keywords.svg +0 -9
  759. package/__flow__/SpotIllustration/spotIllustrations/search-success.svg +0 -8
  760. package/__flow__/SpotIllustration/spotIllustrations/search-trends.svg +0 -23
  761. package/__flow__/SpotIllustration/spotIllustrations/search.svg +0 -86
  762. package/__flow__/SpotIllustration/spotIllustrations/security.svg +0 -12
  763. package/__flow__/SpotIllustration/spotIllustrations/sentiment.svg +0 -12
  764. package/__flow__/SpotIllustration/spotIllustrations/shopping-bag.svg +0 -4
  765. package/__flow__/SpotIllustration/spotIllustrations/spark-line.svg +0 -11
  766. package/__flow__/SpotIllustration/spotIllustrations/stamp.svg +0 -9
  767. package/__flow__/SpotIllustration/spotIllustrations/storefront.svg +0 -10
  768. package/__flow__/SpotIllustration/spotIllustrations/success.svg +0 -9
  769. package/__flow__/SpotIllustration/spotIllustrations/tag-message.svg +0 -15
  770. package/__flow__/SpotIllustration/spotIllustrations/tag.svg +0 -5
  771. package/__flow__/SpotIllustration/spotIllustrations/team-roles.svg +0 -17
  772. package/__flow__/SpotIllustration/spotIllustrations/team.svg +0 -16
  773. package/__flow__/SpotIllustration/spotIllustrations/telescope.svg +0 -15
  774. package/__flow__/SpotIllustration/spotIllustrations/tha-mel.svg +0 -15
  775. package/__flow__/SpotIllustration/spotIllustrations/thumbs-up.svg +0 -11
  776. package/__flow__/SpotIllustration/spotIllustrations/toggle-switch.svg +0 -11
  777. package/__flow__/SpotIllustration/spotIllustrations/toolset-strength.svg +0 -13
  778. package/__flow__/SpotIllustration/spotIllustrations/tracking-time.svg +0 -6
  779. package/__flow__/SpotIllustration/spotIllustrations/twitter-messages.svg +0 -11
  780. package/__flow__/SpotIllustration/spotIllustrations/twitter-profiles.svg +0 -12
  781. package/__flow__/SpotIllustration/spotIllustrations/under-construction.svg +0 -12
  782. package/__flow__/SpotIllustration/spotIllustrations/unsubscribe.svg +0 -10
  783. package/__flow__/SpotIllustration/spotIllustrations/upward-trend.svg +0 -4
  784. package/__flow__/SpotIllustration/spotIllustrations/user-task.svg +0 -58
  785. package/__flow__/SpotIllustration/spotIllustrations/view-connections.svg +0 -13
  786. package/__flow__/SpotIllustration/spotIllustrations/vip-list.svg +0 -13
  787. package/__flow__/SpotIllustration/spotIllustrations/warning.svg +0 -4
  788. package/__flow__/SpotIllustration/spotIllustrations/wifi.svg +0 -6
  789. package/__flow__/SpotIllustration/spotIllustrations/workflow-steps.svg +0 -28
  790. package/__flow__/Stack/TypeSpaceLiterals.js +0 -13
  791. package/__flow__/Stack/index.stories.js +0 -91
  792. package/__flow__/Stack/index.test.js +0 -22
  793. package/__flow__/Switch/index.stories.js +0 -42
  794. package/__flow__/Switch/index.test.js +0 -44
  795. package/__flow__/Table/index.stories.js +0 -293
  796. package/__flow__/Table/index.test.js +0 -91
  797. package/__flow__/TableCell/index.stories.js +0 -33
  798. package/__flow__/TableCell/index.test.js +0 -20
  799. package/__flow__/TableHeaderCell/index.stories.js +0 -54
  800. package/__flow__/TableHeaderCell/index.test.js +0 -28
  801. package/__flow__/TableRowAccordion/index.stories.js +0 -129
  802. package/__flow__/TableRowAccordion/index.test.js +0 -82
  803. package/__flow__/Tabs/index.stories.js +0 -84
  804. package/__flow__/Tabs/index.test.js +0 -242
  805. package/__flow__/Text/index.stories.js +0 -132
  806. package/__flow__/Text/index.test.js +0 -49
  807. package/__flow__/Textarea/index.stories.js +0 -90
  808. package/__flow__/Textarea/index.test.js +0 -86
  809. package/__flow__/Toast/index.stories.js +0 -118
  810. package/__flow__/ToggleHint/index.test.js +0 -16
  811. package/__flow__/Token/index.stories.js +0 -89
  812. package/__flow__/Token/index.test.js +0 -75
  813. package/__flow__/TokenInput/index.stories.js +0 -242
  814. package/__flow__/TokenInput/tests/default/clicking.test.js +0 -38
  815. package/__flow__/TokenInput/tests/default/deleting.test.js +0 -101
  816. package/__flow__/TokenInput/tests/default/focusing.test.js +0 -39
  817. package/__flow__/TokenInput/tests/default/inputting.test.js +0 -57
  818. package/__flow__/TokenInput/tests/default/pasting.test.js +0 -216
  819. package/__flow__/TokenInput/tests/default/rendering.test.js +0 -140
  820. package/__flow__/Tooltip/index.stories.js +0 -175
  821. package/__flow__/Tooltip/index.test.js +0 -182
  822. package/__flow__/building-stories.stories.mdx +0 -121
  823. package/__flow__/code-guidelines.mdx +0 -244
  824. package/__flow__/dataviz/dataviz.stories.js +0 -13
  825. package/__flow__/overview.stories.js +0 -60
  826. package/__flow__/setupTests.js +0 -22
  827. package/__flow__/systemProps/tests/__snapshots__/background.test.js.snap +0 -96
  828. package/__flow__/systemProps/tests/__snapshots__/border.test.js.snap +0 -469
  829. package/__flow__/systemProps/tests/__snapshots__/color.test.js.snap +0 -55
  830. package/__flow__/systemProps/tests/__snapshots__/custom.test.js.snap +0 -36
  831. package/__flow__/systemProps/tests/__snapshots__/flexbox.test.js.snap +0 -239
  832. package/__flow__/systemProps/tests/__snapshots__/grid.test.js.snap +0 -166
  833. package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +0 -204
  834. package/__flow__/systemProps/tests/__snapshots__/position.test.js.snap +0 -115
  835. package/__flow__/systemProps/tests/__snapshots__/shadow.test.js.snap +0 -25
  836. package/__flow__/systemProps/tests/__snapshots__/space.test.js.snap +0 -39
  837. package/__flow__/systemProps/tests/__snapshots__/typography.test.js.snap +0 -166
  838. package/__flow__/systemProps/tests/__snapshots__/variant.test.js.snap +0 -17
  839. package/__flow__/systemProps/tests/background.test.js +0 -90
  840. package/__flow__/systemProps/tests/border.test.js +0 -299
  841. package/__flow__/systemProps/tests/color.test.js +0 -49
  842. package/__flow__/systemProps/tests/custom.test.js +0 -38
  843. package/__flow__/systemProps/tests/flexbox.test.js +0 -150
  844. package/__flow__/systemProps/tests/grid.test.js +0 -123
  845. package/__flow__/systemProps/tests/layout.test.js +0 -126
  846. package/__flow__/systemProps/tests/position.test.js +0 -78
  847. package/__flow__/systemProps/tests/shadow.test.js +0 -30
  848. package/__flow__/systemProps/tests/space.test.js +0 -32
  849. package/__flow__/systemProps/tests/typography.test.js +0 -93
  850. package/__flow__/systemProps/tests/variant.test.js +0 -25
  851. package/__flow__/themes/extendedThemes/README.md +0 -6
  852. package/__flow__/themes/utils/_themed.scss +0 -119
  853. package/__flow__/utils/responsiveProps/index.test.js +0 -31
  854. package/__flow__/writing-good-stories.stories.mdx +0 -3
@@ -1,214 +1,146 @@
1
1
  // @flow
2
-
3
2
  import * as React from 'react';
4
- import Container from './styles';
5
- import {asTokenSpec, delimitersAsRegExp} from './util';
6
- import {Accessory} from '../Input/styles';
7
- import type {EnumIconNames} from '../EnumIconNames';
8
- import Box from '../Box';
9
- import Icon from '../Icon';
10
- import Token from '../Token';
11
-
12
- import type {TypeTokenSpec} from './index.flow';
13
-
14
- export type {TypeTokenSpec};
15
-
16
- export type TypeProps = {
17
- /** ID of the form element, should match the "for" value of the associated label */
18
- id: string,
19
- name: string,
20
- iconName?: EnumIconNames,
21
-
22
- /** Array of delimiter key names */
23
- delimiters?: string[],
24
- /** Current input text. Required when controlling the input text */
25
- value?: string,
26
- /** Current focus state. Required when controlling the focus via onFocus and onBlur */
27
- hasFocus?: boolean,
28
- /** Id of the currently selected token */
29
- activeToken?: string,
30
- /** Array of current tokens */
31
- tokens?: TypeTokenSpec[],
32
- /** Standard control of changing tokens. For fine-grain control use onAddToken and onRemoveToken, instead */
33
- onChangeTokens?: (tokens: TypeTokenSpec[]) => void,
34
- /** Fine-grained control of adding tokens. Use with onRemoveToken instead of onChangeTokens */
35
- onAddToken?: (tokenSpec: TypeTokenSpec) => void,
36
- /** Fine-grained control of removing tokens. Use with onAddToken instead of onChangeTokens */
37
- onRemoveToken?: (tokenId: string) => void,
38
- /** Controls clicking on a token. When absent, clicking a token removes itself */
39
- onClickToken?: (
40
- e: SyntheticEvent<HTMLButtonElement>,
41
- tokenId: string
42
- ) => void,
43
- /** Fine-grained control of the input text used to create tokens */
44
- onChange?: (e: SyntheticInputEvent<HTMLInputElement>, value: string) => void,
45
- /** Fine-grained control of pasted text */
46
- onPaste?: (
47
- e: SyntheticClipboardEvent<HTMLInputElement>,
48
- value: string
49
- ) => void,
50
-
51
- onBlur?: (e: SyntheticFocusEvent<HTMLInputElement>) => void,
52
- onFocus?: (e: SyntheticFocusEvent<HTMLInputElement>) => void,
53
- onKeyDown?: (
54
- e: SyntheticKeyboardEvent<HTMLInputElement>,
55
- value: string
56
- ) => void,
57
- onKeyUp?: (
58
- e: SyntheticKeyboardEvent<HTMLInputElement>,
59
- value: string
60
- ) => void,
61
- /** Attribute used to associate other elements that describe the Input, like an error */
62
- ariaDescribedby?: string,
63
- /** Label used to describe the input if not used with an accompanying visual label */
64
- ariaLabel?: string,
65
- /** Placeholder text for when value is undefined or empty */
66
- placeholder?: string,
67
- /** Will autofocus the element when mounted to the DOM */
68
- autoFocus?: boolean,
69
- /** HTML disabled attribute */
70
- disabled?: boolean,
71
- /** Whether or not the current contents of the input are invalid */
72
- isInvalid?: boolean,
73
- /** Whether or not the current contents of the input has any warnings */
74
- hasWarning?: boolean,
75
- /** HTML required attribute */
76
- required?: boolean,
77
- /** 16x16 element, such as an icon */
78
- elemBefore?: React.Node,
79
- /** 16x16 element, such as an icon */
80
- elemAfter?: React.Node,
81
- /** Max input text length */
82
- maxLength?: number,
83
- /** Max length of the token */
84
- tokenMaxLength?: number,
85
- /** Props to spread onto the underlying input element */
86
- inputProps?: any,
87
- /** Used to get a reference to the underlying element */
88
- innerRef?: React.Ref<'input'>,
89
- qa?: Object,
90
- /** Browser autocomplete support */
91
- autocomplete?: string,
92
- };
93
-
3
+ import { Accessory } from "../Input/styles";
4
+ import Box from "../Box";
5
+ import Icon from "../Icon";
6
+ import Token from "../Token";
7
+ import Container from "./styles";
8
+ import { asTokenSpec, delimitersAsRegExp } from "./util";
9
+ import type { TypeTokenInputProps, TypeTokenSpec as TypeTokenSpec2 } from "./index.flow";
10
+
11
+ /**
12
+ * @deprecated Use TypeTokenSpec from root instead
13
+ */
14
+ export type TypeTokenSpec = TypeTokenSpec2;
15
+
16
+ /**
17
+ * @deprecated Use TypeTokenInputProps from root instead
18
+ */
19
+ export type TypeProps = TypeTokenInputProps;
94
20
  type TypeState = {
95
- prevProps: TypeProps,
21
+ prevProps: TypeTokenInputProps,
96
22
  hasFocus: boolean,
97
23
  activeToken: ?string,
98
24
  value: string,
25
+ ...
99
26
  };
100
-
101
27
  const DefaultDelimiters = [',', 'Enter'];
102
-
103
28
  const ControlledPropNames = ['value', 'hasFocus', 'activeToken'];
104
- export default class TokenInput extends React.Component<TypeProps, TypeState> {
29
+ export default class TokenInput extends React.Component<TypeTokenInputProps, TypeState> {
105
30
  delimiterMatcher: RegExp;
106
-
107
- constructor(props: TypeProps) {
31
+ constructor(props: TypeTokenInputProps) {
108
32
  super(props);
109
-
110
- const {hasFocus, activeToken, value, delimiters} = props;
111
-
33
+ const {
34
+ hasFocus,
35
+ activeToken,
36
+ value,
37
+ delimiters
38
+ } = props;
112
39
  this.delimiterMatcher = delimitersAsRegExp(delimiters || DefaultDelimiters);
113
-
114
40
  this.state = {
115
41
  prevProps: props,
116
42
  hasFocus: hasFocus || false,
117
43
  activeToken: activeToken,
118
- value: value || '',
44
+ value: value || ''
119
45
  };
120
46
  }
121
-
122
- static getDerivedStateFromProps(props: TypeProps, state: TypeState) {
123
- const {prevProps} = state;
47
+ static getDerivedStateFromProps(props: TypeTokenInputProps, state: TypeState) {
48
+ const {
49
+ prevProps
50
+ } = state;
124
51
  const modifiedState = {};
125
-
126
- ControlledPropNames.forEach((propName) => {
52
+ ControlledPropNames.forEach(propName => {
127
53
  const currentProp = props[propName];
128
54
  if (currentProp !== prevProps[propName]) {
129
55
  modifiedState[propName] = currentProp;
130
56
  }
131
57
  });
132
-
133
58
  modifiedState.prevProps = props;
134
59
  return modifiedState;
135
60
  }
136
-
137
61
  isDelimiter(keyName: string) {
138
- const {delimiters = DefaultDelimiters} = this.props;
139
-
62
+ const {
63
+ delimiters = DefaultDelimiters
64
+ } = this.props;
140
65
  return delimiters.includes(keyName);
141
66
  }
142
-
143
67
  spawnNewTokens(texts: string[]) {
144
68
  const {
145
69
  onAddToken,
146
70
  onChangeTokens,
147
71
  tokenMaxLength: max = Infinity,
148
- tokens = [],
72
+ tokens = []
149
73
  } = this.props;
150
- const tokenSpecs = texts.map((text) => asTokenSpec(text.slice(0, max)));
151
-
74
+ const tokenSpecs = texts.map(text => asTokenSpec(text.slice(0, max)));
152
75
  if (onAddToken) {
153
76
  tokenSpecs.forEach(onAddToken);
154
77
  } else if (onChangeTokens) {
155
78
  onChangeTokens(tokens.concat(tokenSpecs));
156
79
  }
157
-
158
- this.setState({value: ''});
80
+ this.setState({
81
+ value: ''
82
+ });
159
83
  }
160
-
161
84
  deleteToken(tokenId?: string) {
162
- const {onRemoveToken, onChangeTokens, tokens = []} = this.props;
85
+ const {
86
+ onRemoveToken,
87
+ onChangeTokens,
88
+ tokens = []
89
+ } = this.props;
163
90
  const count = tokens.length;
164
-
165
91
  if (count === 0) return;
166
-
167
92
  const id = tokenId ?? tokens[count - 1].id;
168
-
169
93
  if (onRemoveToken) {
170
94
  onRemoveToken(id);
171
95
  } else if (onChangeTokens) {
172
- onChangeTokens(tokens.filter((tokenSpec) => tokenSpec.id !== id));
96
+ onChangeTokens(tokens.filter(tokenSpec => tokenSpec.id !== id));
173
97
  }
174
-
175
- this.setState({value: ''});
98
+ this.setState({
99
+ value: ''
100
+ });
176
101
  }
177
-
178
102
  handleChangeText = (e: SyntheticInputEvent<HTMLInputElement>) => {
179
- const {value} = e.currentTarget;
180
- const {onChange} = this.props;
181
-
182
- this.setState({value});
183
-
103
+ const {
104
+ value
105
+ } = e.currentTarget;
106
+ const {
107
+ onChange
108
+ } = this.props;
109
+ this.setState({
110
+ value
111
+ });
184
112
  onChange?.(e, value);
185
113
  };
186
-
187
114
  handleFocus = (e: SyntheticFocusEvent<HTMLInputElement>) => {
188
- const {onFocus} = this.props;
189
-
190
- this.setState({hasFocus: true});
191
-
115
+ const {
116
+ onFocus
117
+ } = this.props;
118
+ this.setState({
119
+ hasFocus: true
120
+ });
192
121
  onFocus?.(e);
193
122
  };
194
-
195
123
  handleBlur = (e: SyntheticFocusEvent<HTMLInputElement>) => {
196
- const {onBlur} = this.props;
197
-
124
+ const {
125
+ onBlur
126
+ } = this.props;
198
127
  if (onBlur) onBlur(e);
199
-
200
- this.setState({hasFocus: false});
128
+ this.setState({
129
+ hasFocus: false
130
+ });
201
131
  };
202
-
203
132
  handleKeyUp = (e: SyntheticKeyboardEvent<HTMLInputElement>) => {
204
133
  this.props.onKeyUp?.(e, e.currentTarget.value);
205
134
  };
206
-
207
135
  handleKeyDown = (e: SyntheticKeyboardEvent<HTMLInputElement>) => {
208
- const {onKeyDown} = this.props;
209
- const {key, currentTarget} = e;
136
+ const {
137
+ onKeyDown
138
+ } = this.props;
139
+ const {
140
+ key,
141
+ currentTarget
142
+ } = e;
210
143
  const text = currentTarget.value;
211
-
212
144
  if (onKeyDown) onKeyDown(e, text);
213
145
 
214
146
  // keyPress event runs before change
@@ -225,66 +157,55 @@ export default class TokenInput extends React.Component<TypeProps, TypeState> {
225
157
  }
226
158
  }
227
159
  };
228
-
229
160
  handlePaste = (e: SyntheticClipboardEvent<HTMLInputElement>) => {
230
161
  const text = e.clipboardData.getData('text');
231
- const {onPaste} = this.props;
232
-
162
+ const {
163
+ onPaste
164
+ } = this.props;
233
165
  if (onPaste) onPaste(e, text);
234
-
235
166
  const subtexts = text.split(this.delimiterMatcher);
236
- const texts = subtexts.filter((subtext) => subtext.length);
237
-
167
+ const texts = subtexts.filter(subtext => subtext.length);
238
168
  if (texts.length > 1) {
239
169
  this.spawnNewTokens(texts);
240
170
  e.preventDefault();
241
171
  }
242
172
  };
243
-
244
- handleClickToken = (
245
- e: SyntheticEvent<HTMLButtonElement>,
246
- token: TypeTokenSpec
247
- ) => {
248
- const {onClickToken, disabled} = this.props;
249
-
173
+ handleClickToken = (e: SyntheticEvent<HTMLButtonElement>, token: TypeTokenSpec) => {
174
+ const {
175
+ onClickToken,
176
+ disabled
177
+ } = this.props;
250
178
  if (onClickToken) onClickToken(e, token.id);
251
-
252
179
  if (!disabled) {
253
180
  this.deleteToken(token.id);
254
181
  }
255
182
  };
256
-
257
183
  renderToken(token: TypeTokenSpec): React.Node {
258
- const {iconName: defaultIconName, disabled} = this.props;
184
+ const {
185
+ iconName: defaultIconName,
186
+ disabled
187
+ } = this.props;
259
188
  const activeId = this.state.activeToken;
260
- const {id, iconName: tokenIconName, value, valid} = token;
189
+ const {
190
+ id,
191
+ iconName: tokenIconName,
192
+ value,
193
+ valid
194
+ } = token;
261
195
  const iconName = tokenIconName || defaultIconName;
262
196
  const isActive = activeId === id;
263
-
264
- return (
265
- <Token
266
- id={id}
267
- onClick={(e) => this.handleClickToken(e, token)}
268
- valid={valid}
269
- active={isActive}
270
- disabled={disabled}
271
- >
197
+ return <Token id={id} onClick={e => this.handleClickToken(e, token)} valid={valid} active={isActive} disabled={disabled}>
272
198
  <Box display="flex" alignItems="center">
273
199
  {iconName && <Icon name={iconName} size="mini" pr={300} />}
274
200
  {value}
275
201
  </Box>
276
- </Token>
277
- );
202
+ </Token>;
278
203
  }
279
-
280
204
  renderTokens(tokens: TypeTokenSpec[]): React.Node {
281
- return tokens.map<React.Node>((token) => (
282
- <div key={token.id} className="TokenInput-token">
205
+ return tokens.map<React.Node>(token => <div key={token.id} className="TokenInput-token">
283
206
  {this.renderToken(token)}
284
- </div>
285
- ));
207
+ </div>);
286
208
  }
287
-
288
209
  render() {
289
210
  const {
290
211
  autoFocus,
@@ -318,54 +239,20 @@ export default class TokenInput extends React.Component<TypeProps, TypeState> {
318
239
  tokens,
319
240
  ...rest
320
241
  } = this.props;
321
-
322
- const {state} = this;
323
-
242
+ const {
243
+ state
244
+ } = this;
324
245
  return (
325
- <Container
326
- hasBeforeElement={!!elemBefore}
327
- hasAfterElement={!!elemAfter}
328
- disabled={disabled}
329
- invalid={!!isInvalid}
330
- warning={hasWarning}
331
- focused={state.hasFocus}
332
- // $FlowIssue - upgrade v0.112.0
333
- {...rest}
334
- >
246
+ // $FlowIssue - upgrade v0.112.0
247
+ <Container hasBeforeElement={!!elemBefore} hasAfterElement={!!elemAfter} disabled={disabled} invalid={!!isInvalid} warning={hasWarning} focused={state.hasFocus} {...rest}>
335
248
  {elemBefore && <Accessory before>{elemBefore}</Accessory>}
336
249
 
337
250
  {tokens && this.renderTokens(tokens)}
338
251
 
339
- <input
340
- aria-describedby={ariaDescribedby}
341
- aria-invalid={!!isInvalid}
342
- aria-label={ariaLabel}
343
- autoFocus={autoFocus}
344
- autoComplete={autocomplete}
345
- disabled={disabled}
346
- id={id}
347
- name={name}
348
- placeholder={placeholder}
349
- type="text"
350
- required={required}
351
- value={state.value}
352
- maxLength={maxLength}
353
- onBlur={this.handleBlur}
354
- onChange={this.handleChangeText}
355
- onFocus={this.handleFocus}
356
- onKeyDown={this.handleKeyDown}
357
- onKeyUp={this.handleKeyUp}
358
- onPaste={this.handlePaste}
359
- ref={innerRef}
360
- data-qa-input={name || ''}
361
- data-qa-input-isdisabled={!!disabled}
362
- data-qa-input-isrequired={!!required}
363
- {...qa}
364
- {...inputProps}
365
- />
252
+ <input aria-describedby={ariaDescribedby} aria-invalid={!!isInvalid} aria-label={ariaLabel} autoFocus={autoFocus} autoComplete={autocomplete} disabled={disabled} id={id} name={name} placeholder={placeholder} type="text" required={required} value={state.value} maxLength={maxLength} onBlur={this.handleBlur} onChange={this.handleChangeText} onFocus={this.handleFocus} onKeyDown={this.handleKeyDown} onKeyUp={this.handleKeyUp} onPaste={this.handlePaste} ref={innerRef} data-qa-input={name || ''} data-qa-input-isdisabled={!!disabled} data-qa-input-isrequired={!!required} {...qa} {...inputProps} />
366
253
 
367
254
  {elemAfter && <Accessory after>{elemAfter}</Accessory>}
368
255
  </Container>
369
256
  );
370
257
  }
371
- }
258
+ }
@@ -1,10 +1,8 @@
1
1
  //@flow
2
- import styled, {css, type StyledComponent} from 'styled-components';
3
- import {COMMON} from '../utils/system-props';
4
- import {focusRing} from '../utils/mixins';
5
-
6
- import type {TypeTheme} from '../types/theme.flow';
7
-
2
+ import styled, { css, type StyledComponent } from 'styled-components';
3
+ import { focusRing } from "../utils/mixins";
4
+ import { COMMON } from "../utils/system-props";
5
+ import type { TypeTheme } from "../types/theme.flow";
8
6
  const Container: StyledComponent<any, TypeTheme, *> = styled.div`
9
7
  box-sizing: border-box;
10
8
  position: relative;
@@ -14,39 +12,39 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
14
12
  align-content: center;
15
13
  cursor: text;
16
14
  width: 100%;
17
- border: 1px solid ${(props) => props.theme.colors.form.border.base};
18
- border-radius: ${(props) => props.theme.radii[500]};
15
+ border: 1px solid ${props => props.theme.colors.form.border.base};
16
+ border-radius: ${props => props.theme.radii[500]};
19
17
  margin: 0;
20
- padding: ${(props) => props.theme.space[300]};
21
- padding-top: ${(props) => props.theme.space[200]};
22
- background-color: ${(props) => props.theme.colors.form.background.base};
23
- color: ${(props) => props.theme.colors.text.body};
24
- transition: border-color ${(props) => props.theme.duration.fast}
25
- ${(props) => props.theme.easing.ease_in},
26
- box-shadow ${(props) => props.theme.duration.fast}
27
- ${(props) => props.theme.easing.ease_in};
28
- ${(props) => props.theme.typography[200]};
29
- font-family: ${(props) => props.theme.fontFamily};
30
- font-weight: ${(props) => props.theme.fontWeights.normal};
18
+ padding: ${props => props.theme.space[300]};
19
+ padding-top: ${props => props.theme.space[200]};
20
+ background-color: ${props => props.theme.colors.form.background.base};
21
+ color: ${props => props.theme.colors.text.body};
22
+ transition: border-color ${props => props.theme.duration.fast}
23
+ ${props => props.theme.easing.ease_in},
24
+ box-shadow ${props => props.theme.duration.fast}
25
+ ${props => props.theme.easing.ease_in};
26
+ ${props => props.theme.typography[200]};
27
+ font-family: ${props => props.theme.fontFamily};
28
+ font-weight: ${props => props.theme.fontWeights.normal};
31
29
  appearance: none;
32
30
 
33
31
  button {
34
- margin: ${(props) => props.theme.space[200]}
35
- ${(props) => props.theme.space[200]} 0 0;
32
+ margin: ${props => props.theme.space[200]}
33
+ ${props => props.theme.space[200]} 0 0;
36
34
  }
37
35
 
38
36
  input {
39
- ${(props) => props.theme.typography[200]};
37
+ ${props => props.theme.typography[200]};
40
38
  outline: none;
41
39
  border: none;
42
40
  flex: 1;
43
41
  padding: 0;
44
- padding-top: ${(props) => props.theme.space[100]};
45
- margin: ${(props) => props.theme.space[200]}
46
- ${(props) => props.theme.space[300]} ${(props) => props.theme.space[100]}
42
+ padding-top: ${props => props.theme.space[100]};
43
+ margin: ${props => props.theme.space[200]}
44
+ ${props => props.theme.space[300]} ${props => props.theme.space[100]}
47
45
  0;
48
- color: ${(props) => props.theme.colors.text.body};
49
- background-color: ${(props) => props.theme.colors.form.background.base};
46
+ color: ${props => props.theme.colors.text.body};
47
+ background-color: ${props => props.theme.colors.form.background.base};
50
48
  /** This matches the height of the token so size does not change as tokens are added */
51
49
  min-height: 20px;
52
50
 
@@ -69,9 +67,7 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
69
67
  box-shadow: none;
70
68
  }
71
69
 
72
- ${(props) =>
73
- props.disabled &&
74
- css`
70
+ ${props => props.disabled && css`
75
71
  opacity: 0.4;
76
72
 
77
73
  cursor: not-allowed;
@@ -79,51 +75,37 @@ const Container: StyledComponent<any, TypeTheme, *> = styled.div`
79
75
  }
80
76
 
81
77
  &:placeholder {
82
- color: ${(props) => props.theme.colors.form.placeholder.base};
78
+ color: ${props => props.theme.colors.form.placeholder.base};
83
79
  }
84
80
 
85
- ${(props) =>
86
- props.hasBeforeElement &&
87
- css`
81
+ ${props => props.hasBeforeElement && css`
88
82
  padding-left: 40px;
89
83
  `}
90
84
 
91
- ${(props) =>
92
- props.hasAfterElement &&
93
- css`
85
+ ${props => props.hasAfterElement && css`
94
86
  padding-right: 40px;
95
87
  `}
96
88
 
97
89
 
98
- ${(props) =>
99
- props.disabled &&
100
- css`
90
+ ${props => props.disabled && css`
101
91
  opacity: 0.4;
102
92
 
103
93
  cursor: not-allowed;
104
94
  `}
105
95
 
106
- ${(props) =>
107
- props.focused &&
108
- css`
96
+ ${props => props.focused && css`
109
97
  ${focusRing}
110
98
  `}
111
99
 
112
- ${(props) =>
113
- props.invalid &&
114
- css`
115
- border-color: ${(props) => props.theme.colors.form.border.error};
100
+ ${props => props.invalid && css`
101
+ border-color: ${props => props.theme.colors.form.border.error};
116
102
  `}
117
103
 
118
- ${(props) =>
119
- props.warning &&
120
- css`
121
- border-color: ${(props) => props.theme.colors.form.border.warning};
104
+ ${props => props.warning && css`
105
+ border-color: ${props => props.theme.colors.form.border.warning};
122
106
  `}
123
107
 
124
108
  ${COMMON}
125
109
  `;
126
-
127
110
  Container.displayName = 'TokenInputContainer';
128
-
129
- export default Container;
111
+ export default Container;
@@ -1,21 +1,16 @@
1
1
  // @flow
2
2
 
3
3
  import uniqueId from 'lodash.uniqueid';
4
-
5
- import type {TypeTokenSpec} from './index.flow';
6
-
4
+ import type { TypeTokenSpec } from "./index.flow";
7
5
  export const asTokenSpec = (text: string): TypeTokenSpec => ({
8
6
  id: uniqueId(`${text}-`),
9
- value: text.trim(),
7
+ value: text.trim()
10
8
  });
11
-
12
9
  const KeyNameToRegExpChar = {
13
- Enter: '\\n',
10
+ Enter: '\\n'
14
11
  };
15
-
16
- export const delimitersAsRegExp = (delimiters: ?(string[])) => {
12
+ export const delimitersAsRegExp = (delimiters: ?string[]) => {
17
13
  if (!delimiters) return /[,\n]/;
18
-
19
- let chars = delimiters.map((key) => KeyNameToRegExpChar[key] || key).join('');
14
+ let chars = delimiters.map(key => KeyNameToRegExpChar[key] || key).join('');
20
15
  return RegExp(`[${chars}]`);
21
- };
16
+ };
@@ -0,0 +1,22 @@
1
+ // @flow
2
+ import * as React from 'react';
3
+ import type { EnumPlacements } from "../Popout/index.flow";
4
+ export type TypeTooltipProps = {
5
+ /** The content that the tooltip should be attached to. Hovering or focusing this element will cause the tooltip to appear */
6
+ children: React.Node,
7
+ /** The content to be displayed within the tooltip. If there is no content, just the children are rendered */
8
+ content: React.Node,
9
+ /** The placement of the tooltip in relation to the children */
10
+ placement?: EnumPlacements,
11
+ /** The time (in ms) that a user has to be hovered/focused before the tooltip will appear */
12
+ enterDelay?: number,
13
+ /** Used to override the appearance of the Tooltip content. By default, strings will have the 'pill' appearance, and more complex content will have the 'box' appearance. You can change those defaults by setting this prop. */
14
+ appearance?: 'pill' | 'box',
15
+ qa?: Object,
16
+ zIndex?: number,
17
+ /** Props to be spread onto the underlying Popout component */
18
+ popoutProps?: Object,
19
+ /** Truncates text into a single line with ellipsis */
20
+ truncated?: boolean,
21
+ ...
22
+ };