@sproutsocial/racine 12.22.0 → 12.23.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 (333) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -0
  3. package/__flow__/Avatar/__tests__/features.test.js +98 -0
  4. package/__flow__/Banner/index.js +2 -1
  5. package/__flow__/CharacterCounter/index.test.js +1 -1
  6. package/__flow__/Collapsible/index.js +2 -2
  7. package/__flow__/Drawer/index.js +11 -0
  8. package/__flow__/Drawer/index.stories.js +2 -1
  9. package/__flow__/EmptyState/index.test.js +1 -1
  10. package/__flow__/EnumIllustrationNames.js +1 -1
  11. package/__flow__/Fieldset/index.js +1 -1
  12. package/__flow__/IllustrationViewBoxes.js +1 -1
  13. package/__flow__/Indicator/index.js +1 -1
  14. package/__flow__/Input/index.js +2 -1
  15. package/__flow__/Link/index.js +2 -1
  16. package/__flow__/Link/index.test.js +2 -0
  17. package/__flow__/Listbox/index.stories.js +1 -0
  18. package/__flow__/Loader/index.js +1 -1
  19. package/__flow__/Modal/index.stories.js +1 -1
  20. package/__flow__/Numeral/tests/testNumeral.js +1 -0
  21. package/__flow__/Popout/index.js +1 -1
  22. package/__flow__/Portal/index.stories.js +7 -7
  23. package/__flow__/SegmentedControl/index.js +1 -1
  24. package/__flow__/SpotIllustration/illustrationNames.js +1 -0
  25. package/__flow__/SpotIllustration/spotIllustrations/campaign-tag.svg +6 -0
  26. package/__flow__/SpotIllustration/spotIllustrations/tag.svg +4 -4
  27. package/__flow__/Table/index.js +4 -4
  28. package/__flow__/TableCell/index.js +1 -1
  29. package/__flow__/TableHeaderCell/index.js +1 -1
  30. package/__flow__/Tabs/index.js +1 -1
  31. package/__flow__/Textarea/index.js +1 -1
  32. package/__flow__/Toast/index.js +1 -1
  33. package/__flow__/Toast/styles.js +1 -1
  34. package/__flow__/TokenInput/index.stories.js +4 -4
  35. package/__flow__/TokenInput/tests/default/pasting.test.js +6 -2
  36. package/__flow__/code-guidelines.mdx +244 -0
  37. package/__flow__/setupTests.js +1 -0
  38. package/__flow__/utils/a11yTest.js +1 -0
  39. package/__flow__/utils/system-props.js +1 -0
  40. package/commonjs/Avatar/index.js +19 -10
  41. package/commonjs/Badge/constants.js +3 -1
  42. package/commonjs/Badge/index.js +7 -3
  43. package/commonjs/Badge/styles.js +4 -2
  44. package/commonjs/Banner/index.js +9 -4
  45. package/commonjs/Banner/styles.js +5 -2
  46. package/commonjs/Box/index.js +5 -2
  47. package/commonjs/Box/styles.js +3 -1
  48. package/commonjs/Breadcrumb/index.js +12 -5
  49. package/commonjs/Breadcrumb/styles.js +3 -1
  50. package/commonjs/Button/index.js +7 -3
  51. package/commonjs/Button/styles.js +6 -3
  52. package/commonjs/Card/index.js +7 -3
  53. package/commonjs/Card/styles.js +3 -1
  54. package/commonjs/CharacterCounter/index.js +39 -22
  55. package/commonjs/CharacterCounter/styles.js +5 -2
  56. package/commonjs/ChartLegend/index.js +7 -3
  57. package/commonjs/ChartLegend/styles.js +5 -2
  58. package/commonjs/Checkbox/index.js +117 -97
  59. package/commonjs/Checkbox/styles.js +5 -2
  60. package/commonjs/Collapsible/index.js +27 -12
  61. package/commonjs/Collapsible/styles.js +4 -2
  62. package/commonjs/DatePicker/DateRangePicker.js +7 -3
  63. package/commonjs/DatePicker/SingleDatePicker.js +7 -3
  64. package/commonjs/DatePicker/StatefulDateRangePicker.js +19 -7
  65. package/commonjs/DatePicker/StatefulSingleDatePicker.js +16 -5
  66. package/commonjs/DatePicker/common.js +4 -2
  67. package/commonjs/DatePicker/index.js +15 -3
  68. package/commonjs/DatePicker/styles.js +5 -2
  69. package/commonjs/Drawer/SlideTransition.js +9 -5
  70. package/commonjs/Drawer/index.js +15 -7
  71. package/commonjs/Drawer/styles.js +5 -2
  72. package/commonjs/EmptyState/index.js +7 -3
  73. package/commonjs/Fieldset/index.js +10 -6
  74. package/commonjs/Fieldset/styles.js +5 -2
  75. package/commonjs/FormField/index.js +17 -6
  76. package/commonjs/Icon/deprecatedIcons.js +3 -1
  77. package/commonjs/Icon/index.js +9 -5
  78. package/commonjs/Icon/styles.js +6 -3
  79. package/commonjs/IllustrationViewBoxes.js +2 -1
  80. package/commonjs/Image/index.js +78 -58
  81. package/commonjs/Image/styles.js +5 -2
  82. package/commonjs/Indicator/index.js +40 -23
  83. package/commonjs/Indicator/styles.js +4 -2
  84. package/commonjs/Input/index.js +156 -132
  85. package/commonjs/Input/styles.js +5 -2
  86. package/commonjs/KeyboardKey/index.js +30 -14
  87. package/commonjs/KeyboardKey/styles.js +3 -1
  88. package/commonjs/Label/index.js +32 -16
  89. package/commonjs/Link/constants.js +3 -1
  90. package/commonjs/Link/index.js +9 -4
  91. package/commonjs/Link/styles.js +5 -2
  92. package/commonjs/Listbox/index.js +15 -8
  93. package/commonjs/Loader/index.js +43 -26
  94. package/commonjs/Loader/styles.js +5 -2
  95. package/commonjs/LoaderButton/index.js +7 -3
  96. package/commonjs/Menu/constants.js +3 -1
  97. package/commonjs/Menu/descendants.js +35 -20
  98. package/commonjs/Menu/hooks.js +8 -8
  99. package/commonjs/Menu/index.flow.js +2 -1
  100. package/commonjs/Menu/index.js +44 -27
  101. package/commonjs/Menu/names.js +3 -1
  102. package/commonjs/Menu/styles.js +6 -3
  103. package/commonjs/Message/index.js +7 -3
  104. package/commonjs/Message/styles.js +4 -2
  105. package/commonjs/Modal/index.js +9 -5
  106. package/commonjs/Modal/styles.js +9 -5
  107. package/commonjs/Numeral/constants.js +3 -1
  108. package/commonjs/Numeral/index.js +16 -5
  109. package/commonjs/Numeral/styles.js +3 -1
  110. package/commonjs/Numeral/tests/testNumeral.js +16 -11
  111. package/commonjs/OverflowList/index.flow.js +2 -1
  112. package/commonjs/OverflowList/index.js +6 -3
  113. package/commonjs/OverflowList/styles.js +5 -2
  114. package/commonjs/PartnerLogo/index.js +9 -6
  115. package/commonjs/PartnerLogo/styles.js +5 -2
  116. package/commonjs/Popout/index.js +28 -13
  117. package/commonjs/Popout/styles.js +3 -1
  118. package/commonjs/Portal/index.js +50 -30
  119. package/commonjs/Radio/index.js +73 -56
  120. package/commonjs/Radio/styles.js +5 -2
  121. package/commonjs/SegmentedControl/index.js +21 -9
  122. package/commonjs/SegmentedControl/styles.js +5 -2
  123. package/commonjs/Select/index.js +78 -61
  124. package/commonjs/Select/styles.js +8 -5
  125. package/commonjs/Skeleton/index.js +4 -2
  126. package/commonjs/SpotIllustration/illustrationNames.js +4 -2
  127. package/commonjs/SpotIllustration/index.js +5 -3
  128. package/commonjs/Stack/index.js +7 -3
  129. package/commonjs/Switch/index.js +52 -35
  130. package/commonjs/Switch/styles.js +6 -3
  131. package/commonjs/Table/index.js +14 -10
  132. package/commonjs/Table/styles.js +3 -1
  133. package/commonjs/TableCell/index.js +39 -23
  134. package/commonjs/TableCell/styles.js +3 -1
  135. package/commonjs/TableHeaderCell/index.js +54 -37
  136. package/commonjs/TableHeaderCell/styles.js +5 -2
  137. package/commonjs/TableRowAccordion/index.js +61 -44
  138. package/commonjs/TableRowAccordion/styles.js +5 -2
  139. package/commonjs/Tabs/index.js +116 -90
  140. package/commonjs/Tabs/styles.js +8 -5
  141. package/commonjs/Text/index.js +7 -3
  142. package/commonjs/Text/styles.js +5 -2
  143. package/commonjs/Textarea/index.js +104 -87
  144. package/commonjs/Textarea/styles.js +5 -2
  145. package/commonjs/ThemeProvider/index.js +5 -2
  146. package/commonjs/Toast/index.js +7 -8
  147. package/commonjs/Toast/styles.js +5 -2
  148. package/commonjs/ToggleHint/index.js +43 -26
  149. package/commonjs/ToggleHint/styles.js +6 -3
  150. package/commonjs/Token/index.js +7 -3
  151. package/commonjs/Token/styles.js +5 -2
  152. package/commonjs/TokenInput/index.js +221 -192
  153. package/commonjs/TokenInput/styles.js +5 -2
  154. package/commonjs/TokenInput/util.js +5 -3
  155. package/commonjs/Tooltip/index.js +30 -14
  156. package/commonjs/Tooltip/styles.js +3 -1
  157. package/commonjs/VisuallyHidden/index.js +3 -1
  158. package/commonjs/dataviz/index.js +3 -1
  159. package/commonjs/index.js +451 -84
  160. package/commonjs/systemProps/background.js +3 -1
  161. package/commonjs/systemProps/border.js +3 -1
  162. package/commonjs/systemProps/color.js +3 -1
  163. package/commonjs/systemProps/custom.js +3 -1
  164. package/commonjs/systemProps/flexbox.js +3 -1
  165. package/commonjs/systemProps/grid.js +3 -1
  166. package/commonjs/systemProps/index.js +87 -15
  167. package/commonjs/systemProps/layout.js +3 -1
  168. package/commonjs/systemProps/position.js +3 -1
  169. package/commonjs/systemProps/shadow.js +3 -1
  170. package/commonjs/systemProps/space.js +3 -1
  171. package/commonjs/systemProps/systemProps.js +3 -1
  172. package/commonjs/systemProps/typography.js +3 -1
  173. package/commonjs/systemProps/variant.js +3 -1
  174. package/commonjs/themes/dark/dataviz-palette.js +3 -1
  175. package/commonjs/themes/dark/decorative-palettes.js +3 -1
  176. package/commonjs/themes/dark/theme.js +11 -7
  177. package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +9 -5
  178. package/commonjs/themes/extendedThemes/sproutTheme/index.js +15 -4
  179. package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +8 -4
  180. package/commonjs/themes/light/dataviz-palette.js +3 -1
  181. package/commonjs/themes/light/decorative-palettes.js +3 -1
  182. package/commonjs/themes/light/literal-colors.js +3 -1
  183. package/commonjs/themes/light/theme.js +17 -13
  184. package/commonjs/utils/a11yTest.js +5 -2
  185. package/commonjs/utils/chartColors.js +3 -1
  186. package/commonjs/utils/constants.js +3 -1
  187. package/commonjs/utils/dataQaLabelQueries.js +26 -16
  188. package/commonjs/utils/hooks.js +39 -26
  189. package/commonjs/utils/index.js +18 -8
  190. package/commonjs/utils/innerText.js +4 -2
  191. package/commonjs/utils/mixins.js +3 -1
  192. package/commonjs/utils/react-testing-library.js +74 -18
  193. package/commonjs/utils/responsiveProps/index.js +16 -8
  194. package/commonjs/utils/system-props.js +6 -2
  195. package/commonjs/utils/useInteractiveColor.js +3 -1
  196. package/dist/illustration.svg +1 -1
  197. package/dist/illustrationList.js +1 -1
  198. package/dist/themes/dark/theme.scss +0 -1
  199. package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +0 -1
  200. package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +0 -1
  201. package/dist/themes/light/theme.scss +0 -1
  202. package/lib/Avatar/index.js +17 -11
  203. package/lib/Badge/index.js +5 -4
  204. package/lib/Badge/styles.js +3 -3
  205. package/lib/Banner/index.js +7 -5
  206. package/lib/Banner/styles.js +1 -1
  207. package/lib/Box/index.js +1 -1
  208. package/lib/Box/styles.js +1 -1
  209. package/lib/Breadcrumb/index.js +11 -7
  210. package/lib/Button/index.js +3 -2
  211. package/lib/Button/styles.js +4 -4
  212. package/lib/Card/index.js +3 -2
  213. package/lib/Card/styles.js +2 -2
  214. package/lib/CharacterCounter/index.js +36 -21
  215. package/lib/CharacterCounter/styles.js +1 -1
  216. package/lib/ChartLegend/index.js +5 -4
  217. package/lib/ChartLegend/styles.js +1 -1
  218. package/lib/Checkbox/index.js +114 -96
  219. package/lib/Checkbox/styles.js +5 -5
  220. package/lib/Collapsible/index.js +24 -12
  221. package/lib/Collapsible/styles.js +2 -2
  222. package/lib/DatePicker/DateRangePicker.js +4 -3
  223. package/lib/DatePicker/SingleDatePicker.js +4 -3
  224. package/lib/DatePicker/StatefulDateRangePicker.js +15 -6
  225. package/lib/DatePicker/StatefulSingleDatePicker.js +12 -4
  226. package/lib/DatePicker/common.js +3 -3
  227. package/lib/DatePicker/index.js +2 -2
  228. package/lib/DatePicker/styles.js +2 -2
  229. package/lib/Drawer/SlideTransition.js +4 -3
  230. package/lib/Drawer/index.js +17 -12
  231. package/lib/Drawer/styles.js +2 -2
  232. package/lib/EmptyState/index.js +4 -3
  233. package/lib/Fieldset/index.js +8 -7
  234. package/lib/Fieldset/styles.js +1 -1
  235. package/lib/FormField/index.js +17 -9
  236. package/lib/Icon/index.js +8 -7
  237. package/lib/Icon/styles.js +2 -2
  238. package/lib/IllustrationViewBoxes.js +2 -1
  239. package/lib/Image/index.js +75 -57
  240. package/lib/Image/styles.js +1 -1
  241. package/lib/Indicator/index.js +38 -23
  242. package/lib/Indicator/styles.js +3 -3
  243. package/lib/Input/index.js +157 -135
  244. package/lib/Input/styles.js +2 -2
  245. package/lib/KeyboardKey/index.js +28 -14
  246. package/lib/KeyboardKey/styles.js +1 -1
  247. package/lib/Label/index.js +29 -15
  248. package/lib/Link/index.js +5 -3
  249. package/lib/Link/styles.js +3 -3
  250. package/lib/Listbox/index.js +14 -10
  251. package/lib/Loader/index.js +40 -25
  252. package/lib/Loader/styles.js +2 -2
  253. package/lib/LoaderButton/index.js +5 -4
  254. package/lib/Menu/descendants.js +30 -18
  255. package/lib/Menu/hooks.js +7 -9
  256. package/lib/Menu/index.flow.js +4 -4
  257. package/lib/Menu/index.js +54 -40
  258. package/lib/Menu/styles.js +3 -3
  259. package/lib/Message/index.js +6 -5
  260. package/lib/Message/styles.js +4 -4
  261. package/lib/Modal/index.js +9 -8
  262. package/lib/Modal/styles.js +6 -5
  263. package/lib/Numeral/index.js +15 -7
  264. package/lib/Numeral/styles.js +1 -1
  265. package/lib/Numeral/tests/testNumeral.js +15 -11
  266. package/lib/OverflowList/index.js +3 -3
  267. package/lib/OverflowList/styles.js +1 -1
  268. package/lib/PartnerLogo/index.js +8 -7
  269. package/lib/PartnerLogo/styles.js +1 -1
  270. package/lib/Popout/index.js +27 -15
  271. package/lib/Popout/styles.js +1 -1
  272. package/lib/Portal/index.js +47 -29
  273. package/lib/Radio/index.js +70 -55
  274. package/lib/Radio/styles.js +3 -3
  275. package/lib/SegmentedControl/index.js +18 -9
  276. package/lib/SegmentedControl/styles.js +3 -3
  277. package/lib/Select/index.js +76 -61
  278. package/lib/Select/styles.js +5 -5
  279. package/lib/Skeleton/index.js +2 -2
  280. package/lib/SpotIllustration/illustrationNames.js +1 -1
  281. package/lib/SpotIllustration/index.js +3 -3
  282. package/lib/Stack/index.js +4 -3
  283. package/lib/Switch/index.js +51 -36
  284. package/lib/Switch/styles.js +4 -4
  285. package/lib/Table/index.js +12 -11
  286. package/lib/Table/styles.js +1 -1
  287. package/lib/TableCell/index.js +36 -22
  288. package/lib/TableCell/styles.js +1 -1
  289. package/lib/TableHeaderCell/index.js +52 -37
  290. package/lib/TableHeaderCell/styles.js +1 -1
  291. package/lib/TableRowAccordion/index.js +60 -45
  292. package/lib/TableRowAccordion/styles.js +1 -1
  293. package/lib/Tabs/index.js +113 -89
  294. package/lib/Tabs/styles.js +5 -5
  295. package/lib/Text/index.js +3 -2
  296. package/lib/Text/styles.js +1 -1
  297. package/lib/Textarea/index.js +101 -86
  298. package/lib/Textarea/styles.js +2 -2
  299. package/lib/ThemeProvider/index.js +1 -1
  300. package/lib/Toast/index.js +6 -10
  301. package/lib/Toast/styles.js +4 -3
  302. package/lib/ToggleHint/index.js +41 -26
  303. package/lib/ToggleHint/styles.js +3 -3
  304. package/lib/Token/index.js +6 -5
  305. package/lib/Token/styles.js +3 -3
  306. package/lib/TokenInput/index.js +223 -196
  307. package/lib/TokenInput/styles.js +2 -2
  308. package/lib/TokenInput/util.js +2 -2
  309. package/lib/Tooltip/index.js +28 -14
  310. package/lib/Tooltip/styles.js +1 -1
  311. package/lib/VisuallyHidden/index.js +1 -1
  312. package/lib/dataviz/index.js +1 -1
  313. package/lib/index.js +64 -64
  314. package/lib/systemProps/index.js +14 -14
  315. package/lib/systemProps/systemProps.js +12 -12
  316. package/lib/themes/dark/theme.js +11 -9
  317. package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +7 -5
  318. package/lib/themes/extendedThemes/sproutTheme/index.js +2 -2
  319. package/lib/themes/extendedThemes/sproutTheme/light/theme.js +6 -4
  320. package/lib/themes/light/theme.js +17 -15
  321. package/lib/types/theme.colors.flow.js +2 -2
  322. package/lib/types/theme.flow.js +2 -2
  323. package/lib/utils/a11yTest.js +3 -1
  324. package/lib/utils/dataQaLabelQueries.js +23 -15
  325. package/lib/utils/hooks.js +37 -26
  326. package/lib/utils/index.js +15 -7
  327. package/lib/utils/innerText.js +1 -1
  328. package/lib/utils/mixins.js +1 -1
  329. package/lib/utils/react-testing-library.js +11 -8
  330. package/lib/utils/responsiveProps/index.js +14 -8
  331. package/lib/utils/system-props.js +1 -0
  332. package/package.json +16 -27
  333. package/__flow__/Avatar/index.test.js +0 -23
@@ -1 +1 @@
1
- module.exports = ["abacus","analytics-offering","asset-cards","astronaut","binoculars","brand-keyword","browser-doc","business","calendar-event","calendar-reporting","cat-error","cat-no-access","cat","checkbox-alert","coffee-cup","competitors","compose-window","compose","computer-error","connect","contact","conversation","custom-branding","customer-service","dashboard","exclamation-mark","face-happy","find-bookmark","flask","general-topic","global-features","global-trend","grow-large","grow","hands-raised","headset","heartbeat-connection","instagram-links","invoice","jewel","keyword-tracking","lightbulb-alt","lightbulb","like-conversation","link-broken","link-messages","link-sections","link-upload","listening-pendo","listening-sentiment","listening-topic-templates","listening-tour","listening","loading","mailbox-empty","mailbox-full","message","molecule","network-data","no-messages-found","no-notifications","note","notification","notifications-onboarding","organize-message","outbox-queue","outbox-reviews","pdf","planning","podium","pointer","publish-assets","publish-links","publishing","puzzle-piece","question-mark","reporting-folder","reporting","review-location","review","robot-assembly","robot-error","robot-happy","rocket","schedule-date","schedule-messages","search-keywords","search-success","search-trends","search","security","sentiment","shopping-bag","spark-line","stamp","storefront","success","tag-message","tag","team-roles","team","telescope","tha-mel","thumbs-up","toggle-switch","toolset-strength","tracking-time","twitter-messages","twitter-profiles","under-construction","unsubscribe","upward-trend","user-task","view-connections","vip-list","warning","wifi","workflow-steps"];
1
+ module.exports = ["abacus","analytics-offering","asset-cards","astronaut","binoculars","brand-keyword","browser-doc","business","calendar-event","calendar-reporting","campaign-tag","cat-error","cat-no-access","cat","checkbox-alert","coffee-cup","competitors","compose-window","compose","computer-error","connect","contact","conversation","custom-branding","customer-service","dashboard","exclamation-mark","face-happy","find-bookmark","flask","general-topic","global-features","global-trend","grow-large","grow","hands-raised","headset","heartbeat-connection","instagram-links","invoice","jewel","keyword-tracking","lightbulb-alt","lightbulb","like-conversation","link-broken","link-messages","link-sections","link-upload","listening-pendo","listening-sentiment","listening-topic-templates","listening-tour","listening","loading","mailbox-empty","mailbox-full","message","molecule","network-data","no-messages-found","no-notifications","note","notification","notifications-onboarding","organize-message","outbox-queue","outbox-reviews","pdf","planning","podium","pointer","publish-assets","publish-links","publishing","puzzle-piece","question-mark","reporting-folder","reporting","review-location","review","robot-assembly","robot-error","robot-happy","rocket","schedule-date","schedule-messages","search-keywords","search-success","search-trends","search","security","sentiment","shopping-bag","spark-line","stamp","storefront","success","tag-message","tag","team-roles","team","telescope","tha-mel","thumbs-up","toggle-switch","toolset-strength","tracking-time","twitter-messages","twitter-profiles","under-construction","unsubscribe","upward-trend","user-task","view-connections","vip-list","warning","wifi","workflow-steps"];
@@ -1,5 +1,4 @@
1
1
  $theme: (
2
- "__esModule": true,
3
2
  "default": (
4
3
  "breakpoints": (900px, 1200px, 1500px, 1800px),
5
4
  "colors": (
@@ -1,5 +1,4 @@
1
1
  $theme: (
2
- "__esModule": true,
3
2
  "analytics": (
4
3
  "trend": (
5
4
  "positive": #08c4b2,
@@ -1,5 +1,4 @@
1
1
  $theme: (
2
- "__esModule": true,
3
2
  "analytics": (
4
3
  "trend": (
5
4
  "positive": #067c7c,
@@ -1,5 +1,4 @@
1
1
  $theme: (
2
- "__esModule": true,
3
2
  "borderWidths": (
4
3
  "500": 1px
5
4
  ),
@@ -1,17 +1,24 @@
1
1
  var _excluded = ["fontSize"],
2
2
  _excluded2 = ["appearance", "name", "src", "variant", "type", "size", "bg", "color"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+ 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); }
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; }
8
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
9
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
10
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
11
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
12
  import * as React from 'react';
6
13
  import { useState, useCallback, useMemo, memo } from 'react';
7
14
  import styled, { css } from 'styled-components';
8
15
  import classnames from 'classnames';
9
- import Box from '../Box';
10
- import Image from '../Image';
11
- import Text from '../Text';
16
+ import Box from "../Box";
17
+ import Image from "../Image";
18
+ import Text from "../Text";
12
19
  var AvatarText = styled(function (_ref) {
13
20
  var fontSize = _ref.fontSize,
14
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
21
+ rest = _objectWithoutProperties(_ref, _excluded);
15
22
  return /*#__PURE__*/React.createElement(Text, rest);
16
23
  }).withConfig({
17
24
  displayName: "Avatar__AvatarText",
@@ -31,10 +38,8 @@ var Container = styled(Box).withConfig({
31
38
  bg = _ref2.bg;
32
39
  return css(["color:", ";background:", ";"], theme.colors[type][variant === 'dark' ? '200' : '900'], bg ? bg : theme.colors[type][variant === 'dark' ? '900' : '200']);
33
40
  });
34
- var getInitials = function getInitials(name, fallback) {
35
- if (fallback === void 0) {
36
- fallback = '?';
37
- }
41
+ var getInitials = function getInitials(name) {
42
+ var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '?';
38
43
  if (!name || typeof name !== 'string') return fallback;
39
44
  return name.replace(/\s+/, ' ').split(' ') // Repeated spaces results in empty strings
40
45
  .slice(0, 2).map(function (v) {
@@ -55,10 +60,11 @@ export var Avatar = function Avatar(_ref3) {
55
60
  size = _ref3$size === void 0 ? '40px' : _ref3$size,
56
61
  bg = _ref3.bg,
57
62
  color = _ref3.color,
58
- rest = _objectWithoutPropertiesLoose(_ref3, _excluded2);
63
+ rest = _objectWithoutProperties(_ref3, _excluded2);
59
64
  var _useState = useState(false),
60
- imageFailedLoading = _useState[0],
61
- setImageFailedLoading = _useState[1];
65
+ _useState2 = _slicedToArray(_useState, 2),
66
+ imageFailedLoading = _useState2[0],
67
+ setImageFailedLoading = _useState2[1];
62
68
  var initials = useMemo(function () {
63
69
  return getInitials(name);
64
70
  }, [name]);
@@ -1,10 +1,11 @@
1
1
  var _excluded = ["children", "text", "iconName", "type", "tip", "size", "badgeColor"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
5
  import * as React from 'react';
5
- import Icon from '../Icon';
6
- import Container from './styles';
7
- import Box from '../Box';
6
+ import Icon from "../Icon";
7
+ import Container from "./styles";
8
+ import Box from "../Box";
8
9
  var Badge = function Badge(_ref) {
9
10
  var children = _ref.children,
10
11
  text = _ref.text,
@@ -15,7 +16,7 @@ var Badge = function Badge(_ref) {
15
16
  size = _ref$size === void 0 ? 'small' : _ref$size,
16
17
  _ref$badgeColor = _ref.badgeColor,
17
18
  badgeColor = _ref$badgeColor === void 0 ? 'blue' : _ref$badgeColor,
18
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
19
+ rest = _objectWithoutProperties(_ref, _excluded);
19
20
  if (children && text) {
20
21
  throw new Error("can't use both `children` and `text` props. Text is deprecated, consider using children.");
21
22
  }
@@ -1,8 +1,8 @@
1
1
 
2
2
  import styled from 'styled-components';
3
- import { COMMON } from '../utils/system-props';
3
+ import { COMMON } from "../utils/system-props";
4
4
  import { themeGet } from '@styled-system/theme-get';
5
- import { legacyBadgeColors } from './constants';
5
+ import { legacyBadgeColors } from "./constants";
6
6
 
7
7
  // eslint-disable-next-line flowtype/generic-spacing
8
8
  var Container = styled.span.withConfig({
@@ -17,6 +17,6 @@ var Container = styled.span.withConfig({
17
17
  }, function (p) {
18
18
  return p.type ? themeGet(legacyBadgeColors[p.type].background) : p.theme.colors.container.background.decorative[p.badgeColor];
19
19
  }, function (p) {
20
- return p.size === 'small' ? p.theme.space[0] + " " + p.theme.space[200] : "" + p.theme.space[300];
20
+ return p.size === 'small' ? "".concat(p.theme.space[0], " ").concat(p.theme.space[200]) : "".concat(p.theme.space[300]);
21
21
  }, COMMON);
22
22
  export default Container;
@@ -1,10 +1,11 @@
1
1
  var _excluded = ["type", "text"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
5
  import * as React from 'react';
5
- import Icon from '../Icon';
6
- import Container from './styles';
7
- import Box from '../Box';
6
+ import Icon from "../Icon";
7
+ import Container from "./styles";
8
+ import Box from "../Box";
8
9
 
9
10
  /**
10
11
  * @deprecated
@@ -53,14 +54,15 @@ var Banner = function Banner(_ref) {
53
54
  var _ref$type = _ref.type,
54
55
  type = _ref$type === void 0 ? 'error' : _ref$type,
55
56
  text = _ref.text,
56
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
57
+ rest = _objectWithoutProperties(_ref, _excluded);
57
58
  var bannerType = type === 'danger' ? 'error' : type;
58
59
  if (type === 'danger') {
60
+ // eslint-disable-next-line no-console
59
61
  console.warn('Warning: The `danger` type has been deprecated on the Banner component. Please use `error` instead.');
60
62
  }
61
63
  return /*#__PURE__*/React.createElement(Container, _extends({
62
64
  type: type,
63
- "data-qa-alert": '',
65
+ "data-qa-alert": "",
64
66
  "data-qa-alert-type": type,
65
67
  "data-qa-alert-text": text
66
68
  // $FlowIssue - upgrade v0.112.0
@@ -1,6 +1,6 @@
1
1
 
2
2
  import styled, { css } from 'styled-components';
3
- import { COMMON, LAYOUT } from '../utils/system-props';
3
+ import { COMMON, LAYOUT } from "../utils/system-props";
4
4
  var Container = styled.div.withConfig({
5
5
  displayName: "styles__Container",
6
6
  componentId: "sc-q43dr4-0"
package/lib/Box/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
  import * as React from 'react';
3
- import Container from './styles';
3
+ import Container from "./styles";
4
4
  var Box = /*#__PURE__*/React.forwardRef(function (props, ref) {
5
5
  return /*#__PURE__*/React.createElement(Container, _extends({}, props, {
6
6
  ref: ref
package/lib/Box/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  import styled from 'styled-components';
3
- import { COMMON, BORDER, LAYOUT, POSITION, FLEXBOX, GRID } from '../utils/system-props';
3
+ import { COMMON, BORDER, LAYOUT, POSITION, FLEXBOX, GRID } from "../utils/system-props";
4
4
  var Container = styled.div.withConfig({
5
5
  displayName: "styles__Container",
6
6
  componentId: "sc-ma8yo6-0"
@@ -1,17 +1,21 @@
1
1
  var _excluded = ["children", "href"],
2
2
  _excluded2 = ["ariaLabel", "overflow", "children"];
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
6
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
7
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
8
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
9
  import * as React from 'react';
6
- import Link from '../Link';
7
- import Icon from '../Icon';
8
- import { MenuButton } from '../Menu';
10
+ import Link from "../Link";
11
+ import Icon from "../Icon";
12
+ import { MenuButton } from "../Menu";
9
13
  import { Children } from 'react';
10
- import Nav from './styles';
14
+ import Nav from "./styles";
11
15
  var BreadcrumbItem = function BreadcrumbItem(_ref) {
12
16
  var children = _ref.children,
13
17
  href = _ref.href,
14
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
18
+ rest = _objectWithoutProperties(_ref, _excluded);
15
19
  return /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Link, _extends({
16
20
  href: href
17
21
  // $FlowIssue - upgrade v0.112.0
@@ -21,7 +25,7 @@ var Breadcrumb = function Breadcrumb(_ref2) {
21
25
  var ariaLabel = _ref2.ariaLabel,
22
26
  overflow = _ref2.overflow,
23
27
  children = _ref2.children,
24
- rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
28
+ rest = _objectWithoutProperties(_ref2, _excluded2);
25
29
  var listItems = Children.toArray(children);
26
30
  var lastItem = listItems[listItems.length - 1];
27
31
  return /*#__PURE__*/React.createElement(Nav, _extends({
@@ -38,7 +42,7 @@ var Breadcrumb = function Breadcrumb(_ref2) {
38
42
  }, /*#__PURE__*/React.createElement(Icon, {
39
43
  name: "dotdotdot"
40
44
  }))), listItems.map(function (item, i) {
41
- return /*#__PURE__*/React.cloneElement(item, _extends({}, item.props, {
45
+ return /*#__PURE__*/React.cloneElement(item, _objectSpread(_objectSpread({}, item.props), {}, {
42
46
  'aria-current': listItems[i] === lastItem ? 'page' : undefined
43
47
  }));
44
48
  })));
@@ -1,8 +1,9 @@
1
1
  var _excluded = ["href", "appearance", "active", "disabled", "external", "children", "size", "innerRef", "onClick", "title", "qa", "as", "ariaLabel"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
5
  import * as React from 'react';
5
- import Container from './styles';
6
+ import Container from "./styles";
6
7
 
7
8
  /**
8
9
  * @deprecated
@@ -27,7 +28,7 @@ var Button = function Button(_ref) {
27
28
  qa = _ref$qa === void 0 ? {} : _ref$qa,
28
29
  as = _ref.as,
29
30
  ariaLabel = _ref.ariaLabel,
30
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
31
+ rest = _objectWithoutProperties(_ref, _excluded);
31
32
  if (!href && external) {
32
33
  console.warn('Warning: external prop cannot be set without a href declaration');
33
34
  }
@@ -1,8 +1,8 @@
1
1
 
2
2
  import styled, { css } from 'styled-components';
3
- import { COMMON, LAYOUT } from '../utils/system-props';
4
- import { focusRing, disabled, pill } from '../utils/mixins';
5
- import Icon from '../Icon/styles';
3
+ import { COMMON, LAYOUT } from "../utils/system-props";
4
+ import { focusRing, disabled, pill } from "../utils/mixins";
5
+ import Icon from "../Icon/styles";
6
6
  var Container = styled.button.withConfig({
7
7
  displayName: "styles__Container",
8
8
  componentId: "sc-1juy94s-0"
@@ -23,7 +23,7 @@ var Container = styled.button.withConfig({
23
23
  }, function (props) {
24
24
  return props.theme.duration.fast;
25
25
  }, function (props) {
26
- return props.buttonSize === 'default' ? "" + props.theme.space[300] : "" + props.theme.space[350];
26
+ return props.buttonSize === 'default' ? "".concat(props.theme.space[300]) : "".concat(props.theme.space[350]);
27
27
  }, function (props) {
28
28
  return props.buttonSize === 'default' ? props.theme.typography[200].fontSize : props.theme.typography[300].fontSize;
29
29
  }, function (props) {
package/lib/Card/index.js CHANGED
@@ -2,9 +2,10 @@
2
2
 
3
3
  var _excluded = ["onClick", "href", "children", "ariaLabel", "buttonProps", "border", "borderColor", "color", "bg"];
4
4
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5
6
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
7
  import * as React from 'react';
7
- import { Container, ClickableArea } from './styles';
8
+ import { Container, ClickableArea } from "./styles";
8
9
  var Card = function Card(_ref) {
9
10
  var onClick = _ref.onClick,
10
11
  href = _ref.href,
@@ -20,7 +21,7 @@ var Card = function Card(_ref) {
20
21
  color = _ref$color === void 0 ? 'text.body' : _ref$color,
21
22
  _ref$bg = _ref.bg,
22
23
  bg = _ref$bg === void 0 ? 'container.background.base' : _ref$bg,
23
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
24
+ rest = _objectWithoutProperties(_ref, _excluded);
24
25
  return /*#__PURE__*/React.createElement(Container, _extends({}, rest, {
25
26
  border: border,
26
27
  borderColor: borderColor,
@@ -1,7 +1,7 @@
1
1
 
2
2
  import styled from 'styled-components';
3
- import Button from '../Button';
4
- import Box from '../Box';
3
+ import Button from "../Button";
4
+ import Box from "../Box";
5
5
  var Container = styled(Box).withConfig({
6
6
  displayName: "styles__Container",
7
7
  componentId: "sc-p098yi-0"
@@ -1,33 +1,48 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
2
  var _excluded = ["size"];
2
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
6
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
9
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
5
10
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
11
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
13
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
15
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
16
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
17
  import * as React from 'react';
7
- import Container from './styles';
18
+ import Container from "./styles";
8
19
  var CharacterCounter = /*#__PURE__*/function (_React$Component) {
9
- _inheritsLoose(CharacterCounter, _React$Component);
20
+ _inherits(CharacterCounter, _React$Component);
21
+ var _super = _createSuper(CharacterCounter);
10
22
  function CharacterCounter() {
11
- return _React$Component.apply(this, arguments) || this;
23
+ _classCallCheck(this, CharacterCounter);
24
+ return _super.apply(this, arguments);
12
25
  }
13
- var _proto = CharacterCounter.prototype;
14
- _proto.render = function render() {
15
- var _this$props = this.props,
16
- size = _this$props.size,
17
- rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
18
- var remaining = this.props.maxValue - this.props.currentValue;
19
- return (
20
- /*#__PURE__*/
21
- // $FlowIssue - upgrade v0.112.0
22
- React.createElement(Container, _extends({
23
- mini: size === 'mini',
24
- overlimit: remaining <= 0
25
- }, rest), remaining)
26
- );
27
- };
26
+ _createClass(CharacterCounter, [{
27
+ key: "render",
28
+ value: function render() {
29
+ var _this$props = this.props,
30
+ size = _this$props.size,
31
+ rest = _objectWithoutProperties(_this$props, _excluded);
32
+ var remaining = this.props.maxValue - this.props.currentValue;
33
+ return (
34
+ /*#__PURE__*/
35
+ // $FlowIssue - upgrade v0.112.0
36
+ React.createElement(Container, _extends({
37
+ mini: size === 'mini',
38
+ overlimit: remaining <= 0
39
+ }, rest), remaining)
40
+ );
41
+ }
42
+ }]);
28
43
  return CharacterCounter;
29
44
  }(React.Component);
30
- CharacterCounter.defaultProps = {
45
+ _defineProperty(CharacterCounter, "defaultProps", {
31
46
  size: 'default'
32
- };
47
+ });
33
48
  export { CharacterCounter as default };
@@ -1,6 +1,6 @@
1
1
 
2
2
  import styled, { css } from 'styled-components';
3
- import { COMMON } from '../utils/system-props';
3
+ import { COMMON } from "../utils/system-props";
4
4
  var Container = styled.div.withConfig({
5
5
  displayName: "styles__Container",
6
6
  componentId: "sc-do9szx-0"
@@ -1,10 +1,11 @@
1
1
  var _excluded = ["legendLabels", "stacked", "theme"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
5
  import * as React from 'react';
5
- import Container, { Label, Swatch } from './styles';
6
- import Text from '../Text';
7
- import { THEME_MAP } from '../utils/chartColors';
6
+ import Container, { Label, Swatch } from "./styles";
7
+ import Text from "../Text";
8
+ import { THEME_MAP } from "../utils/chartColors";
8
9
  function getSwatchColor(theme, index) {
9
10
  return THEME_MAP[theme.toUpperCase()][index];
10
11
  }
@@ -28,7 +29,7 @@ var ChartLegend = function ChartLegend(props) {
28
29
  stacked = props.stacked,
29
30
  _props$theme = props.theme,
30
31
  theme = _props$theme === void 0 ? 'compare' : _props$theme,
31
- rest = _objectWithoutPropertiesLoose(props, _excluded);
32
+ rest = _objectWithoutProperties(props, _excluded);
32
33
  return /*#__PURE__*/React.createElement(Container, _extends({
33
34
  inline: !stacked,
34
35
  "data-qa-chartlegend": ""
@@ -1,6 +1,6 @@
1
1
 
2
2
  import styled, { css } from 'styled-components';
3
- import { COMMON, LAYOUT } from '../utils/system-props';
3
+ import { COMMON, LAYOUT } from "../utils/system-props";
4
4
  export var Label = styled.span.withConfig({
5
5
  displayName: "styles__Label",
6
6
  componentId: "sc-se0ijc-0"