@sproutsocial/racine 12.21.2 → 12.22.1

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 (324) hide show
  1. package/CHANGELOG.md +20 -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 +3 -3
  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__/Fieldset/index.js +1 -1
  11. package/__flow__/Indicator/index.js +1 -1
  12. package/__flow__/Input/index.js +2 -1
  13. package/__flow__/Input/styles.js +1 -1
  14. package/__flow__/Link/index.js +2 -1
  15. package/__flow__/Link/index.test.js +2 -0
  16. package/__flow__/Listbox/index.stories.js +1 -0
  17. package/__flow__/Loader/index.js +1 -1
  18. package/__flow__/Modal/index.stories.js +1 -1
  19. package/__flow__/Numeral/tests/testNumeral.js +1 -0
  20. package/__flow__/Popout/index.js +1 -1
  21. package/__flow__/Portal/index.stories.js +7 -7
  22. package/__flow__/SegmentedControl/index.js +1 -1
  23. package/__flow__/Table/index.js +4 -4
  24. package/__flow__/TableCell/index.js +1 -1
  25. package/__flow__/TableHeaderCell/index.js +1 -1
  26. package/__flow__/Tabs/index.js +1 -1
  27. package/__flow__/Textarea/index.js +1 -1
  28. package/__flow__/Toast/index.js +1 -1
  29. package/__flow__/Toast/styles.js +1 -1
  30. package/__flow__/TokenInput/index.stories.js +4 -4
  31. package/__flow__/TokenInput/tests/default/pasting.test.js +6 -2
  32. package/__flow__/code-guidelines.mdx +244 -0
  33. package/__flow__/setupTests.js +1 -0
  34. package/__flow__/utils/a11yTest.js +1 -0
  35. package/__flow__/utils/system-props.js +1 -0
  36. package/commonjs/Avatar/index.js +19 -10
  37. package/commonjs/Badge/constants.js +3 -1
  38. package/commonjs/Badge/index.js +7 -3
  39. package/commonjs/Badge/styles.js +4 -2
  40. package/commonjs/Banner/index.js +9 -4
  41. package/commonjs/Banner/styles.js +5 -2
  42. package/commonjs/Box/index.js +5 -2
  43. package/commonjs/Box/styles.js +3 -1
  44. package/commonjs/Breadcrumb/index.js +12 -5
  45. package/commonjs/Breadcrumb/styles.js +3 -1
  46. package/commonjs/Button/index.js +7 -3
  47. package/commonjs/Button/styles.js +6 -3
  48. package/commonjs/Card/index.js +7 -3
  49. package/commonjs/Card/styles.js +3 -1
  50. package/commonjs/CharacterCounter/index.js +39 -22
  51. package/commonjs/CharacterCounter/styles.js +5 -2
  52. package/commonjs/ChartLegend/index.js +7 -3
  53. package/commonjs/ChartLegend/styles.js +5 -2
  54. package/commonjs/Checkbox/index.js +117 -97
  55. package/commonjs/Checkbox/styles.js +5 -2
  56. package/commonjs/Collapsible/index.js +28 -13
  57. package/commonjs/Collapsible/styles.js +4 -2
  58. package/commonjs/DatePicker/DateRangePicker.js +7 -3
  59. package/commonjs/DatePicker/SingleDatePicker.js +7 -3
  60. package/commonjs/DatePicker/StatefulDateRangePicker.js +19 -7
  61. package/commonjs/DatePicker/StatefulSingleDatePicker.js +16 -5
  62. package/commonjs/DatePicker/common.js +4 -2
  63. package/commonjs/DatePicker/index.js +15 -3
  64. package/commonjs/DatePicker/styles.js +5 -2
  65. package/commonjs/Drawer/SlideTransition.js +9 -5
  66. package/commonjs/Drawer/index.js +15 -7
  67. package/commonjs/Drawer/styles.js +5 -2
  68. package/commonjs/EmptyState/index.js +7 -3
  69. package/commonjs/Fieldset/index.js +10 -6
  70. package/commonjs/Fieldset/styles.js +5 -2
  71. package/commonjs/FormField/index.js +17 -6
  72. package/commonjs/Icon/deprecatedIcons.js +3 -1
  73. package/commonjs/Icon/index.js +9 -5
  74. package/commonjs/Icon/styles.js +6 -3
  75. package/commonjs/Image/index.js +78 -58
  76. package/commonjs/Image/styles.js +5 -2
  77. package/commonjs/Indicator/index.js +40 -23
  78. package/commonjs/Indicator/styles.js +4 -2
  79. package/commonjs/Input/index.js +156 -132
  80. package/commonjs/Input/styles.js +6 -3
  81. package/commonjs/KeyboardKey/index.js +30 -14
  82. package/commonjs/KeyboardKey/styles.js +3 -1
  83. package/commonjs/Label/index.js +32 -16
  84. package/commonjs/Link/constants.js +3 -1
  85. package/commonjs/Link/index.js +9 -4
  86. package/commonjs/Link/styles.js +5 -2
  87. package/commonjs/Listbox/index.js +15 -8
  88. package/commonjs/Loader/index.js +43 -26
  89. package/commonjs/Loader/styles.js +5 -2
  90. package/commonjs/LoaderButton/index.js +7 -3
  91. package/commonjs/Menu/constants.js +3 -1
  92. package/commonjs/Menu/descendants.js +35 -20
  93. package/commonjs/Menu/hooks.js +8 -8
  94. package/commonjs/Menu/index.flow.js +2 -1
  95. package/commonjs/Menu/index.js +44 -27
  96. package/commonjs/Menu/names.js +3 -1
  97. package/commonjs/Menu/styles.js +6 -3
  98. package/commonjs/Message/index.js +7 -3
  99. package/commonjs/Message/styles.js +4 -2
  100. package/commonjs/Modal/index.js +9 -5
  101. package/commonjs/Modal/styles.js +9 -5
  102. package/commonjs/Numeral/constants.js +3 -1
  103. package/commonjs/Numeral/index.js +16 -5
  104. package/commonjs/Numeral/styles.js +3 -1
  105. package/commonjs/Numeral/tests/testNumeral.js +16 -11
  106. package/commonjs/OverflowList/index.flow.js +2 -1
  107. package/commonjs/OverflowList/index.js +6 -3
  108. package/commonjs/OverflowList/styles.js +5 -2
  109. package/commonjs/PartnerLogo/index.js +9 -6
  110. package/commonjs/PartnerLogo/styles.js +5 -2
  111. package/commonjs/Popout/index.js +28 -13
  112. package/commonjs/Popout/styles.js +3 -1
  113. package/commonjs/Portal/index.js +50 -30
  114. package/commonjs/Radio/index.js +75 -57
  115. package/commonjs/Radio/styles.js +5 -2
  116. package/commonjs/SegmentedControl/index.js +21 -9
  117. package/commonjs/SegmentedControl/styles.js +5 -2
  118. package/commonjs/Select/index.js +78 -61
  119. package/commonjs/Select/styles.js +8 -5
  120. package/commonjs/Skeleton/index.js +4 -2
  121. package/commonjs/SpotIllustration/illustrationNames.js +3 -1
  122. package/commonjs/SpotIllustration/index.js +5 -3
  123. package/commonjs/Stack/index.js +7 -3
  124. package/commonjs/Switch/index.js +54 -36
  125. package/commonjs/Switch/styles.js +6 -3
  126. package/commonjs/Table/index.js +14 -10
  127. package/commonjs/Table/styles.js +3 -1
  128. package/commonjs/TableCell/index.js +41 -24
  129. package/commonjs/TableCell/styles.js +3 -1
  130. package/commonjs/TableHeaderCell/index.js +56 -38
  131. package/commonjs/TableHeaderCell/styles.js +5 -2
  132. package/commonjs/TableRowAccordion/index.js +63 -45
  133. package/commonjs/TableRowAccordion/styles.js +5 -2
  134. package/commonjs/Tabs/index.js +118 -91
  135. package/commonjs/Tabs/styles.js +8 -5
  136. package/commonjs/Text/index.js +7 -3
  137. package/commonjs/Text/styles.js +5 -2
  138. package/commonjs/Textarea/index.js +104 -87
  139. package/commonjs/Textarea/styles.js +5 -2
  140. package/commonjs/ThemeProvider/index.js +5 -2
  141. package/commonjs/Toast/index.js +7 -8
  142. package/commonjs/Toast/styles.js +5 -2
  143. package/commonjs/ToggleHint/index.js +45 -27
  144. package/commonjs/ToggleHint/styles.js +6 -3
  145. package/commonjs/Token/index.js +7 -3
  146. package/commonjs/Token/styles.js +5 -2
  147. package/commonjs/TokenInput/index.js +221 -192
  148. package/commonjs/TokenInput/styles.js +5 -2
  149. package/commonjs/TokenInput/util.js +5 -3
  150. package/commonjs/Tooltip/index.js +30 -14
  151. package/commonjs/Tooltip/styles.js +3 -1
  152. package/commonjs/VisuallyHidden/index.js +3 -1
  153. package/commonjs/dataviz/index.js +3 -1
  154. package/commonjs/index.js +451 -84
  155. package/commonjs/systemProps/background.js +3 -1
  156. package/commonjs/systemProps/border.js +3 -1
  157. package/commonjs/systemProps/color.js +3 -1
  158. package/commonjs/systemProps/custom.js +3 -1
  159. package/commonjs/systemProps/flexbox.js +3 -1
  160. package/commonjs/systemProps/grid.js +3 -1
  161. package/commonjs/systemProps/index.js +87 -15
  162. package/commonjs/systemProps/layout.js +3 -1
  163. package/commonjs/systemProps/position.js +3 -1
  164. package/commonjs/systemProps/shadow.js +3 -1
  165. package/commonjs/systemProps/space.js +3 -1
  166. package/commonjs/systemProps/systemProps.js +3 -1
  167. package/commonjs/systemProps/typography.js +3 -1
  168. package/commonjs/systemProps/variant.js +3 -1
  169. package/commonjs/themes/dark/dataviz-palette.js +3 -1
  170. package/commonjs/themes/dark/decorative-palettes.js +3 -1
  171. package/commonjs/themes/dark/theme.js +11 -7
  172. package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +9 -5
  173. package/commonjs/themes/extendedThemes/sproutTheme/index.js +15 -4
  174. package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +8 -4
  175. package/commonjs/themes/light/dataviz-palette.js +3 -1
  176. package/commonjs/themes/light/decorative-palettes.js +3 -1
  177. package/commonjs/themes/light/literal-colors.js +3 -1
  178. package/commonjs/themes/light/theme.js +17 -13
  179. package/commonjs/utils/a11yTest.js +5 -2
  180. package/commonjs/utils/chartColors.js +3 -1
  181. package/commonjs/utils/constants.js +3 -1
  182. package/commonjs/utils/dataQaLabelQueries.js +26 -16
  183. package/commonjs/utils/hooks.js +39 -26
  184. package/commonjs/utils/index.js +18 -8
  185. package/commonjs/utils/innerText.js +4 -2
  186. package/commonjs/utils/mixins.js +3 -1
  187. package/commonjs/utils/react-testing-library.js +74 -18
  188. package/commonjs/utils/responsiveProps/index.js +16 -8
  189. package/commonjs/utils/system-props.js +6 -2
  190. package/commonjs/utils/useInteractiveColor.js +3 -1
  191. package/dist/themes/dark/theme.scss +0 -1
  192. package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +0 -1
  193. package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +0 -1
  194. package/dist/themes/light/theme.scss +0 -1
  195. package/lib/Avatar/index.js +17 -11
  196. package/lib/Badge/index.js +5 -4
  197. package/lib/Badge/styles.js +3 -3
  198. package/lib/Banner/index.js +7 -5
  199. package/lib/Banner/styles.js +1 -1
  200. package/lib/Box/index.js +1 -1
  201. package/lib/Box/styles.js +1 -1
  202. package/lib/Breadcrumb/index.js +11 -7
  203. package/lib/Button/index.js +3 -2
  204. package/lib/Button/styles.js +4 -4
  205. package/lib/Card/index.js +3 -2
  206. package/lib/Card/styles.js +2 -2
  207. package/lib/CharacterCounter/index.js +36 -21
  208. package/lib/CharacterCounter/styles.js +1 -1
  209. package/lib/ChartLegend/index.js +5 -4
  210. package/lib/ChartLegend/styles.js +1 -1
  211. package/lib/Checkbox/index.js +114 -96
  212. package/lib/Checkbox/styles.js +5 -5
  213. package/lib/Collapsible/index.js +25 -13
  214. package/lib/Collapsible/styles.js +2 -2
  215. package/lib/DatePicker/DateRangePicker.js +4 -3
  216. package/lib/DatePicker/SingleDatePicker.js +4 -3
  217. package/lib/DatePicker/StatefulDateRangePicker.js +15 -6
  218. package/lib/DatePicker/StatefulSingleDatePicker.js +12 -4
  219. package/lib/DatePicker/common.js +3 -3
  220. package/lib/DatePicker/index.js +2 -2
  221. package/lib/DatePicker/styles.js +2 -2
  222. package/lib/Drawer/SlideTransition.js +4 -3
  223. package/lib/Drawer/index.js +17 -12
  224. package/lib/Drawer/styles.js +2 -2
  225. package/lib/EmptyState/index.js +4 -3
  226. package/lib/Fieldset/index.js +8 -7
  227. package/lib/Fieldset/styles.js +1 -1
  228. package/lib/FormField/index.js +17 -9
  229. package/lib/Icon/index.js +8 -7
  230. package/lib/Icon/styles.js +2 -2
  231. package/lib/Image/index.js +75 -57
  232. package/lib/Image/styles.js +1 -1
  233. package/lib/Indicator/index.js +38 -23
  234. package/lib/Indicator/styles.js +3 -3
  235. package/lib/Input/index.js +157 -135
  236. package/lib/Input/styles.js +3 -3
  237. package/lib/KeyboardKey/index.js +28 -14
  238. package/lib/KeyboardKey/styles.js +1 -1
  239. package/lib/Label/index.js +29 -15
  240. package/lib/Link/index.js +5 -3
  241. package/lib/Link/styles.js +3 -3
  242. package/lib/Listbox/index.js +14 -10
  243. package/lib/Loader/index.js +40 -25
  244. package/lib/Loader/styles.js +2 -2
  245. package/lib/LoaderButton/index.js +5 -4
  246. package/lib/Menu/descendants.js +30 -18
  247. package/lib/Menu/hooks.js +7 -9
  248. package/lib/Menu/index.flow.js +4 -4
  249. package/lib/Menu/index.js +54 -40
  250. package/lib/Menu/styles.js +3 -3
  251. package/lib/Message/index.js +6 -5
  252. package/lib/Message/styles.js +4 -4
  253. package/lib/Modal/index.js +9 -8
  254. package/lib/Modal/styles.js +6 -5
  255. package/lib/Numeral/index.js +15 -7
  256. package/lib/Numeral/styles.js +1 -1
  257. package/lib/Numeral/tests/testNumeral.js +15 -11
  258. package/lib/OverflowList/index.js +3 -3
  259. package/lib/OverflowList/styles.js +1 -1
  260. package/lib/PartnerLogo/index.js +8 -7
  261. package/lib/PartnerLogo/styles.js +1 -1
  262. package/lib/Popout/index.js +27 -15
  263. package/lib/Popout/styles.js +1 -1
  264. package/lib/Portal/index.js +47 -29
  265. package/lib/Radio/index.js +72 -56
  266. package/lib/Radio/styles.js +3 -3
  267. package/lib/SegmentedControl/index.js +18 -9
  268. package/lib/SegmentedControl/styles.js +3 -3
  269. package/lib/Select/index.js +76 -61
  270. package/lib/Select/styles.js +5 -5
  271. package/lib/Skeleton/index.js +2 -2
  272. package/lib/SpotIllustration/index.js +3 -3
  273. package/lib/Stack/index.js +4 -3
  274. package/lib/Switch/index.js +53 -37
  275. package/lib/Switch/styles.js +4 -4
  276. package/lib/Table/index.js +12 -11
  277. package/lib/Table/styles.js +1 -1
  278. package/lib/TableCell/index.js +38 -23
  279. package/lib/TableCell/styles.js +1 -1
  280. package/lib/TableHeaderCell/index.js +54 -38
  281. package/lib/TableHeaderCell/styles.js +1 -1
  282. package/lib/TableRowAccordion/index.js +62 -46
  283. package/lib/TableRowAccordion/styles.js +1 -1
  284. package/lib/Tabs/index.js +115 -90
  285. package/lib/Tabs/styles.js +5 -5
  286. package/lib/Text/index.js +3 -2
  287. package/lib/Text/styles.js +1 -1
  288. package/lib/Textarea/index.js +101 -86
  289. package/lib/Textarea/styles.js +2 -2
  290. package/lib/ThemeProvider/index.js +1 -1
  291. package/lib/Toast/index.js +6 -10
  292. package/lib/Toast/styles.js +4 -3
  293. package/lib/ToggleHint/index.js +43 -27
  294. package/lib/ToggleHint/styles.js +3 -3
  295. package/lib/Token/index.js +6 -5
  296. package/lib/Token/styles.js +3 -3
  297. package/lib/TokenInput/index.js +223 -196
  298. package/lib/TokenInput/styles.js +2 -2
  299. package/lib/TokenInput/util.js +2 -2
  300. package/lib/Tooltip/index.js +28 -14
  301. package/lib/Tooltip/styles.js +1 -1
  302. package/lib/VisuallyHidden/index.js +1 -1
  303. package/lib/dataviz/index.js +1 -1
  304. package/lib/index.js +64 -64
  305. package/lib/systemProps/index.js +14 -14
  306. package/lib/systemProps/systemProps.js +12 -12
  307. package/lib/themes/dark/theme.js +11 -9
  308. package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +7 -5
  309. package/lib/themes/extendedThemes/sproutTheme/index.js +2 -2
  310. package/lib/themes/extendedThemes/sproutTheme/light/theme.js +6 -4
  311. package/lib/themes/light/theme.js +17 -15
  312. package/lib/types/theme.colors.flow.js +2 -2
  313. package/lib/types/theme.flow.js +2 -2
  314. package/lib/utils/a11yTest.js +3 -1
  315. package/lib/utils/dataQaLabelQueries.js +23 -15
  316. package/lib/utils/hooks.js +37 -26
  317. package/lib/utils/index.js +15 -7
  318. package/lib/utils/innerText.js +1 -1
  319. package/lib/utils/mixins.js +1 -1
  320. package/lib/utils/react-testing-library.js +11 -8
  321. package/lib/utils/responsiveProps/index.js +14 -8
  322. package/lib/utils/system-props.js +1 -0
  323. package/package.json +21 -35
  324. package/__flow__/Avatar/index.test.js +0 -23
@@ -1,9 +1,9 @@
1
1
 
2
2
  import { memo } from 'react';
3
3
  import styled from 'styled-components';
4
- import Box from '../Box';
5
- import { focusRing } from '../utils/mixins';
6
- import Message from '../Message';
4
+ import Box from "../Box";
5
+ import { focusRing } from "../utils/mixins";
6
+ import Message from "../Message";
7
7
  var Container = styled(Box).withConfig({
8
8
  displayName: "styles__Container",
9
9
  componentId: "sc-1ju6d1v-0"
@@ -21,7 +21,7 @@ export var MessageHeader = /*#__PURE__*/memo(styled(Box).withConfig({
21
21
  displayName: "styles__MessageHeader",
22
22
  componentId: "sc-1ju6d1v-1"
23
23
  })(["padding:", ";display:flex;justify-content:space-between;align-items:center;border-bottom-width:", ";border-bottom-style:solid;border-radius:", " ", " 0 0;", ";"], function (props) {
24
- return props.density === Message.DENSITIES.CONDENSED ? "0 0 0 " + props.theme.space[100] : props.theme.space[300];
24
+ return props.density === Message.DENSITIES.CONDENSED ? "0 0 0 ".concat(props.theme.space[100]) : props.theme.space[300];
25
25
  }, function (props) {
26
26
  return props.density === Message.DENSITIES.CONDENSED ? 0 : props.theme.borderWidths[500];
27
27
  }, function (props) {
@@ -2,21 +2,22 @@ var _excluded = ["title", "subtitle", "children", "bordered"],
2
2
  _excluded2 = ["children"],
3
3
  _excluded3 = ["appElementSelector", "children", "isOpen", "label", "onClose", "closeButtonLabel", "width", "zIndex"];
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
8
  import { useContext } from 'react';
8
- import Box from '../Box';
9
- import Icon from '../Icon';
10
- import Button from '../Button';
11
- import Text from '../Text';
12
- import { Container, Content, Header, Footer, Body } from './styles';
9
+ import Box from "../Box";
10
+ import Icon from "../Icon";
11
+ import Button from "../Button";
12
+ import Text from "../Text";
13
+ import { Container, Content, Header, Footer, Body } from "./styles";
13
14
  var ModalContext = /*#__PURE__*/React.createContext({});
14
15
  var ModalHeader = function ModalHeader(props) {
15
16
  var title = props.title,
16
17
  subtitle = props.subtitle,
17
18
  children = props.children,
18
19
  bordered = props.bordered,
19
- rest = _objectWithoutPropertiesLoose(props, _excluded);
20
+ rest = _objectWithoutProperties(props, _excluded);
20
21
  return (
21
22
  /*#__PURE__*/
22
23
  // $FlowIssue - upgrade v0.112.0
@@ -67,7 +68,7 @@ var ModalContent = /*#__PURE__*/React.forwardRef(
67
68
  // $FlowIssue - upgrade v0.112.0
68
69
  function (_ref, ref) {
69
70
  var children = _ref.children,
70
- rest = _objectWithoutPropertiesLoose(_ref, _excluded2);
71
+ rest = _objectWithoutProperties(_ref, _excluded2);
71
72
  var _useContext2 = useContext(ModalContext),
72
73
  label = _useContext2.label;
73
74
  return /*#__PURE__*/React.createElement(Content, _extends({
@@ -88,7 +89,7 @@ var Modal = function Modal(props) {
88
89
  closeButtonLabel = props.closeButtonLabel,
89
90
  width = props.width,
90
91
  zIndex = props.zIndex,
91
- rest = _objectWithoutPropertiesLoose(props, _excluded3);
92
+ rest = _objectWithoutProperties(props, _excluded3);
92
93
  var isCloseable = Boolean(onClose);
93
94
  var appElement = appElementSelector && document ? document.querySelector(appElementSelector) : null;
94
95
  return /*#__PURE__*/React.createElement(Container, _extends({
@@ -1,25 +1,26 @@
1
1
  var _excluded = ["className"];
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 React from 'react';
5
6
  import styled, { createGlobalStyle } from 'styled-components';
6
7
  import { width, zIndex } from 'styled-system';
7
8
  import ReactModal from 'react-modal';
8
- import Box from '../Box';
9
- import { COMMON } from '../utils/system-props';
9
+ import Box from "../Box";
10
+ import { COMMON } from "../utils/system-props";
10
11
  // This is the max space allowed between the modal and the edge of the browser
11
12
  var BODY_PADDING = '64px';
12
13
  function ReactModalAdapter(_ref) {
13
14
  var className = _ref.className,
14
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
15
+ props = _objectWithoutProperties(_ref, _excluded);
15
16
  // We want to create *__Content and *__Overlay class names on the subcomponents.
16
17
  // Because `className` could be a space-separated list of class names, we make
17
18
  // sure that we append `__Content` and `__Overlay` to every class name.
18
19
  var contentClassName = (className || '').split(' ').map(function (className) {
19
- return className + " " + className + "__Content";
20
+ return "".concat(className, " ").concat(className, "__Content");
20
21
  }).join(' ');
21
22
  var overlayClassName = (className || '').split(' ').map(function (className) {
22
- return className + " " + className + "__Overlay";
23
+ return "".concat(className, " ").concat(className, "__Overlay");
23
24
  }).join(' ');
24
25
  return /*#__PURE__*/React.createElement(ReactModal, _extends({
25
26
  portalClassName: className,
@@ -1,12 +1,19 @@
1
1
  var _excluded = ["number", "locale", "format", "currency", "abbreviate", "precision", "qa"];
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+ 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."); }
5
+ 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); }
6
+ 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; }
7
+ 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; }
8
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
+ 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
10
  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
11
  import * as React from 'react';
5
12
  import memoize from 'lru-memoize';
6
- import { AbbrContainer, Container } from './styles';
7
- import Tooltip from '../Tooltip';
8
- import { DEFAULT_THRESHOLD, MEMO_CACHE_SIZE, COMPARE_OBJECTS, MAX_PRECISION, ABBREV_PRECISION, DefaultPrecisions } from './constants';
9
- import { EM_DASH } from '../utils/constants';
13
+ import { AbbrContainer, Container } from "./styles";
14
+ import Tooltip from "../Tooltip";
15
+ import { DEFAULT_THRESHOLD, MEMO_CACHE_SIZE, COMPARE_OBJECTS, MAX_PRECISION, ABBREV_PRECISION, DefaultPrecisions } from "./constants";
16
+ import { EM_DASH } from "../utils/constants";
10
17
  var _getNumberFormatters = function _getNumberFormatters(options) {
11
18
  var locale = options.locale,
12
19
  format = options.format,
@@ -72,11 +79,12 @@ var normalizeArgs = function normalizeArgs(props) {
72
79
  abbreviate = _props$abbreviate === void 0 ? true : _props$abbreviate,
73
80
  precision = props.precision,
74
81
  qa = props.qa,
75
- rest = _objectWithoutPropertiesLoose(props, _excluded);
82
+ rest = _objectWithoutProperties(props, _excluded);
76
83
  var threshold = getThreshold(abbreviate);
77
84
  var _getMinMaxPrecision = getMinMaxPrecision(precision, format),
78
- min = _getMinMaxPrecision[0],
79
- max = _getMinMaxPrecision[1];
85
+ _getMinMaxPrecision2 = _slicedToArray(_getMinMaxPrecision, 2),
86
+ min = _getMinMaxPrecision2[0],
87
+ max = _getMinMaxPrecision2[1];
80
88
  var _number = number || 0;
81
89
  var value = _number * (format === 'percent' ? 0.01 : 1);
82
90
  var canAbbreviate = _number >= threshold;
@@ -1,6 +1,6 @@
1
1
 
2
2
  import styled from 'styled-components';
3
- import Text from '../Text';
3
+ import Text from "../Text";
4
4
  export var Container = styled(Text).withConfig({
5
5
  displayName: "styles__Container",
6
6
  componentId: "sc-o79gt9-0"
@@ -1,25 +1,29 @@
1
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
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); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
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); }
2
4
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
3
5
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
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); }
6
+ 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; }
7
+ 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; }
8
+ 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; }
9
+ /* eslint-env jest, node */
5
10
  import React from 'react';
6
- import { render, fireEvent } from '../../utils/react-testing-library';
11
+ import { render, fireEvent } from "../../utils/react-testing-library";
7
12
  import 'jest-styled-components';
8
13
  import Numeral from '..';
9
- jest.mock('../constants', function () {
10
- return _extends({}, jest.requireActual('../constants'), {
14
+ jest.mock("../constants", function () {
15
+ return _objectSpread(_objectSpread({}, jest.requireActual("../constants")), {}, {
11
16
  MEMO_CACHE_SIZE: 0,
12
17
  COMPARE_OBJECTS: false
13
18
  });
14
19
  });
15
- var testNumeral = function testNumeral(value, options, texts) {
16
- if (options === void 0) {
17
- options = {};
18
- }
20
+ var testNumeral = function testNumeral(value) {
21
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
22
+ var texts = arguments.length > 2 ? arguments[2] : undefined;
19
23
  var mainText = texts.text,
20
24
  tooltipText = texts.tip;
21
25
  if (tooltipText) {
22
- test("Should display " + value + " abbreviated as -> " + mainText + " with tooltip -> " + tooltipText + " ", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
26
+ test("Should display ".concat(value, " abbreviated as -> ").concat(mainText, " with tooltip -> ").concat(tooltipText, " "), /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
23
27
  var _render, container, findByText, getByText, numeral, tooltip, content;
24
28
  return _regeneratorRuntime().wrap(function _callee$(_context) {
25
29
  while (1) {
@@ -46,7 +50,7 @@ var testNumeral = function testNumeral(value, options, texts) {
46
50
  }, _callee);
47
51
  })));
48
52
  } else {
49
- test("Should display " + value + " as -> " + mainText + " with no tooltip ", function () {
53
+ test("Should display ".concat(value, " as -> ").concat(mainText, " with no tooltip "), function () {
50
54
  var _render2 = render( /*#__PURE__*/React.createElement(Numeral, _extends({
51
55
  number: value
52
56
  }, options))),
@@ -1,8 +1,8 @@
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
- import List from './styles';
2
+ import List from "./styles";
3
3
  import React, { useCallback, useMemo } from 'react';
4
4
  import { AutoSizer, CellMeasurer, CellMeasurerCache } from 'react-virtualized';
5
- import Box from '../Box';
5
+ import Box from "../Box";
6
6
  var VirtualizedList = function VirtualizedList(_ref) {
7
7
  var items = _ref.items,
8
8
  ItemComponent = _ref.ItemComponent,
@@ -24,7 +24,7 @@ var VirtualizedList = function VirtualizedList(_ref) {
24
24
  return /*#__PURE__*/React.createElement(CellMeasurer, {
25
25
  columnIndex: 0,
26
26
  rowIndex: index,
27
- key: "CellMeasurer-" + key,
27
+ key: "CellMeasurer-".concat(key),
28
28
  cache: cache,
29
29
  parent: parent
30
30
  }, function (_ref3) {
@@ -1,7 +1,7 @@
1
1
 
2
2
  import * as React from 'react';
3
3
  import styled from 'styled-components';
4
- import { COMMON, BORDER, LAYOUT, POSITION, FLEXBOX, GRID } from '../utils/system-props';
4
+ import { COMMON, BORDER, LAYOUT, POSITION, FLEXBOX, GRID } from "../utils/system-props";
5
5
  import { List } from 'react-virtualized';
6
6
  var Container = styled(function (props) {
7
7
  return /*#__PURE__*/React.createElement(List, props);
@@ -1,10 +1,11 @@
1
1
  var _excluded = ["partnerName", "backgroundType", "logoType", "height", "width", "size"];
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 React from 'react';
5
- import logoViewBoxes from '../LogoViewBoxes';
6
+ import logoViewBoxes from "../LogoViewBoxes";
6
7
  import { useTheme } from 'styled-components';
7
- import Container from './styles';
8
+ import Container from "./styles";
8
9
  var PartnerLogo = function PartnerLogo(_ref) {
9
10
  var partnerName = _ref.partnerName,
10
11
  backgroundType = _ref.backgroundType,
@@ -12,23 +13,23 @@ var PartnerLogo = function PartnerLogo(_ref) {
12
13
  height = _ref.height,
13
14
  width = _ref.width,
14
15
  size = _ref.size,
15
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
16
+ rest = _objectWithoutProperties(_ref, _excluded);
16
17
  var _useTheme = useTheme(),
17
18
  mode = _useTheme.mode;
18
19
  var whichLogo = function whichLogo(type) {
19
20
  var logo = logoType ? partnerName + '-' + logoType : partnerName;
20
21
  if (type && type === 'dark') {
21
- return logo + "-dark";
22
+ return "".concat(logo, "-dark");
22
23
  } else if (type && type === 'light') {
23
24
  return logo;
24
25
  } else if (mode === 'dark') {
25
- return logo + "-dark";
26
+ return "".concat(logo, "-dark");
26
27
  } else {
27
28
  return logo;
28
29
  }
29
30
  };
30
31
  var logoViewBox = logoViewBoxes[whichLogo(backgroundType)];
31
- var viewBoxCoordinates = (logoViewBox == null ? void 0 : logoViewBox.split(' ')) || [];
32
+ var viewBoxCoordinates = (logoViewBox === null || logoViewBox === void 0 ? void 0 : logoViewBox.split(' ')) || [];
32
33
  var defaultWidth = viewBoxCoordinates[2];
33
34
  var defaultHeight = viewBoxCoordinates[3];
34
35
  return /*#__PURE__*/React.createElement(Container
@@ -44,7 +45,7 @@ var PartnerLogo = function PartnerLogo(_ref) {
44
45
  focusable: false
45
46
  }, /*#__PURE__*/React.createElement("use", {
46
47
  xmlnsXlink: "http://www.w3.org/1999/xlink",
47
- xlinkHref: "#sslogosvg-" + whichLogo(backgroundType)
48
+ xlinkHref: "#sslogosvg-".concat(whichLogo(backgroundType))
48
49
  })));
49
50
  };
50
51
  export default PartnerLogo;
@@ -1,6 +1,6 @@
1
1
 
2
2
  import styled, { css } from 'styled-components';
3
- import { COMMON, FLEXBOX } from '../utils/system-props';
3
+ import { COMMON, FLEXBOX } from "../utils/system-props";
4
4
  import { verticalAlign } from 'styled-system';
5
5
  var sizes = {
6
6
  mini: '12px',
@@ -2,16 +2,26 @@ var _excluded = ["isOpen", "setIsOpen", "content", "children", "placement", "ful
2
2
  _excluded2 = ["autoFocus", "returnFocus"],
3
3
  _excluded3 = ["children"];
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 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; }
6
+ 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; }
7
+ 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; }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ 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."); }
10
+ 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); }
11
+ 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; }
12
+ 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; }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ 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
15
  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
16
  import * as React from 'react';
7
17
  import { useState, useEffect, useRef, useCallback, useMemo } from 'react';
8
18
  import { useTransition, animated } from 'react-spring';
9
19
  import { MOTION_DURATION_FAST } from '@sproutsocial/seeds-motion/dist/seeds-motion-unitless';
10
- import { TargetWrapper } from './styles';
11
- import Portal from '../Portal';
12
- import Box from '../Box';
20
+ import { TargetWrapper } from "./styles";
21
+ import Portal from "../Portal";
22
+ import Box from "../Box";
13
23
  import { Popper } from 'react-popper';
14
- import { useMutationObserver } from '../utils/hooks';
24
+ import { useMutationObserver } from "../utils/hooks";
15
25
  import FocusLock from 'react-focus-lock';
16
26
  export var placements = {
17
27
  auto: 'auto',
@@ -73,11 +83,12 @@ export default function Popout(_ref) {
73
83
  appendToBody = _ref$appendToBody === void 0 ? true : _ref$appendToBody,
74
84
  _ref$focusLockProps = _ref.focusLockProps,
75
85
  focusLockProps = _ref$focusLockProps === void 0 ? {} : _ref$focusLockProps,
76
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
86
+ rest = _objectWithoutProperties(_ref, _excluded);
77
87
  var PopoutComponentWrapper = appendToBody ? Portal : React.Fragment;
78
88
  var _useState = useState(false),
79
- isInternalShown = _useState[0],
80
- setIsInternalShown = _useState[1];
89
+ _useState2 = _slicedToArray(_useState, 2),
90
+ isInternalShown = _useState2[0],
91
+ setIsInternalShown = _useState2[1];
81
92
  var isControlled = typeof isOpen === 'boolean';
82
93
  var isShown = isControlled ? isOpen : isInternalShown;
83
94
  var setIsShown = useMemo(function () {
@@ -99,7 +110,7 @@ export default function Popout(_ref) {
99
110
  autoFocus = _focusLockProps$autoF === void 0 ? true : _focusLockProps$autoF,
100
111
  _focusLockProps$retur = focusLockProps.returnFocus,
101
112
  returnFocus = _focusLockProps$retur === void 0 ? true : _focusLockProps$retur,
102
- restFocusLockProps = _objectWithoutPropertiesLoose(focusLockProps, _excluded2);
113
+ restFocusLockProps = _objectWithoutProperties(focusLockProps, _excluded2);
103
114
  var isInvalidContent = content === null || content === undefined;
104
115
 
105
116
  // Callbacks for showing, hiding, and toggling visibility of the popout
@@ -176,13 +187,14 @@ export default function Popout(_ref) {
176
187
  // to wait for the targetRef to receive a value before rendering the popout. Otherwise,
177
188
  // the Popout component renders, but doesn't know how to position itself due the
178
189
  // `refereElement` property being undefined.
179
- var _useState2 = useState(
190
+ var _useState3 = useState(
180
191
  // Only trigger this shouldRenderPopout logic when using a controlled component.
181
192
  // The reason for that is because controlled components may render the popout
182
193
  // immediately before the targetRef has a value set to it.
183
194
  !isControlled),
184
- shouldRenderPopout = _useState2[0],
185
- setShouldRenderPopout = _useState2[1];
195
+ _useState4 = _slicedToArray(_useState3, 2),
196
+ shouldRenderPopout = _useState4[0],
197
+ setShouldRenderPopout = _useState4[1];
186
198
  var childrenRef = function childrenRef(el) {
187
199
  targetRef.current = el;
188
200
  if (targetRef.current) {
@@ -197,7 +209,7 @@ export default function Popout(_ref) {
197
209
  ariaProps: ariaProps
198
210
  }) : /*#__PURE__*/React.createElement(TargetWrapper, _extends({}, qa, rest, {
199
211
  ref: childrenRef
200
- }), /*#__PURE__*/React.cloneElement(children, _extends({}, ariaProps, !isControlled ? {
212
+ }), /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, ariaProps), !isControlled ? {
201
213
  onClick: toggle
202
214
  } : undefined))), shouldRenderPopout && !isInvalidContent && transitions.map(function (_ref2) {
203
215
  var item = _ref2.item,
@@ -227,12 +239,12 @@ export default function Popout(_ref) {
227
239
  scheduleUpdateRef(scheduleUpdate);
228
240
  return /*#__PURE__*/React.createElement("div", _extends({
229
241
  ref: interceptRef,
230
- style: _extends({}, style, {
242
+ style: _objectSpread(_objectSpread({}, style), {}, {
231
243
  zIndex: zIndex,
232
244
  width: fullWidth && targetRef.current ? targetRef.current.offsetWidth : 'initial'
233
245
  }),
234
246
  "data-placement": placement,
235
- "data-qa-popout": '',
247
+ "data-qa-popout": "",
236
248
  "data-qa-popout-isopen": isOpen === true
237
249
  // $FlowIssue - upgrade v0.112.0
238
250
  }, rest), item && !outOfBoundaries && /*#__PURE__*/React.createElement(animated.div, {
@@ -249,7 +261,7 @@ export default function Popout(_ref) {
249
261
  }
250
262
  var PopoutContent = function PopoutContent(_ref4) {
251
263
  var children = _ref4.children,
252
- rest = _objectWithoutPropertiesLoose(_ref4, _excluded3);
264
+ rest = _objectWithoutProperties(_ref4, _excluded3);
253
265
  return /*#__PURE__*/React.createElement(Box, _extends({
254
266
  bg: "container.background.base",
255
267
  color: "text.body",
@@ -1,6 +1,6 @@
1
1
 
2
2
  import styled from 'styled-components';
3
- import { COMMON, LAYOUT } from '../utils/system-props';
3
+ import { COMMON, LAYOUT } from "../utils/system-props";
4
4
  export var TargetWrapper = styled.div.withConfig({
5
5
  displayName: "styles__TargetWrapper",
6
6
  componentId: "sc-qo3sn-0"
@@ -1,14 +1,26 @@
1
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
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); }
2
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
+ 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); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ 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); }
2
6
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
7
+ 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); }; }
8
+ 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); }
9
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
10
+ 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; } }
11
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
12
+ 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
13
  import * as React from 'react';
4
14
  import { createPortal } from 'react-dom';
5
- import { canUseDOM } from '../utils';
15
+ import { canUseDOM } from "../utils";
6
16
  var Portal = /*#__PURE__*/function (_React$Component) {
7
- _inheritsLoose(Portal, _React$Component);
17
+ _inherits(Portal, _React$Component);
18
+ var _super = _createSuper(Portal);
8
19
  function Portal(props) {
9
20
  var _this;
10
- _this = _React$Component.call(this, props) || this;
11
- _this.el = null;
21
+ _classCallCheck(this, Portal);
22
+ _this = _super.call(this, props);
23
+ _defineProperty(_assertThisInitialized(_this), "el", null);
12
24
  if (canUseDOM()) {
13
25
  var as = props.as,
14
26
  el = props.el,
@@ -22,37 +34,43 @@ var Portal = /*#__PURE__*/function (_React$Component) {
22
34
  }
23
35
  return _this;
24
36
  }
25
- var _proto = Portal.prototype;
26
- _proto.componentDidMount = function componentDidMount() {
27
- if (canUseDOM() && this.el) {
28
- var _this$props$container = this.props.container,
29
- container = _this$props$container === void 0 ? document.body : _this$props$container;
30
- if (container) {
31
- // for flow
32
- container.appendChild(this.el);
37
+ _createClass(Portal, [{
38
+ key: "componentDidMount",
39
+ value: function componentDidMount() {
40
+ if (canUseDOM() && this.el) {
41
+ var _this$props$container = this.props.container,
42
+ container = _this$props$container === void 0 ? document.body : _this$props$container;
43
+ if (container) {
44
+ // for flow
45
+ container.appendChild(this.el);
46
+ }
33
47
  }
34
48
  }
35
- };
36
- _proto.componentWillUnmount = function componentWillUnmount() {
37
- if (canUseDOM() && this.el) {
38
- var _this$props$container2 = this.props.container,
39
- container = _this$props$container2 === void 0 ? document.body : _this$props$container2;
40
- if (container) {
41
- // for flow
42
- container.removeChild(this.el);
49
+ }, {
50
+ key: "componentWillUnmount",
51
+ value: function componentWillUnmount() {
52
+ if (canUseDOM() && this.el) {
53
+ var _this$props$container2 = this.props.container,
54
+ container = _this$props$container2 === void 0 ? document.body : _this$props$container2;
55
+ if (container) {
56
+ // for flow
57
+ container.removeChild(this.el);
58
+ }
43
59
  }
44
60
  }
45
- };
46
- _proto.render = function render() {
47
- if (this.el) {
48
- return /*#__PURE__*/createPortal(this.props.children, this.el);
61
+ }, {
62
+ key: "render",
63
+ value: function render() {
64
+ if (this.el) {
65
+ return /*#__PURE__*/createPortal(this.props.children, this.el);
66
+ }
67
+ return this.props.children;
49
68
  }
50
- return this.props.children;
51
- };
69
+ }]);
52
70
  return Portal;
53
71
  }(React.Component);
54
- Portal.defaultProps = {
72
+ _defineProperty(Portal, "defaultProps", {
55
73
  as: 'div',
56
74
  id: ''
57
- };
75
+ });
58
76
  export { Portal as default };