@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,6 +1,9 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
4
7
  exports.default = void 0;
5
8
  var React = _interopRequireWildcard(require("react"));
6
9
  var _styles = _interopRequireWildcard(require("./styles"));
@@ -9,22 +12,35 @@ var _TableCell = _interopRequireDefault(require("../TableCell"));
9
12
  var _excluded = ["id", "cells", "detail", "onToggle", "isExpanded"];
10
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
16
  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); }
17
+ 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; }
14
18
  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; }
15
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
19
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
20
+ 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); } }
21
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
22
+ 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); }
16
23
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
24
+ 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); }; }
25
+ 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); }
26
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
+ 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; } }
28
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
+ 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; }
17
30
  /**
18
31
  * The table row accordion component allows for rendering a row of tabular data along with a addtional content to be rendered inside of an accordion drawer. This component is meant to be used with the table components rowRender mentod.
19
- */var TableRowAccordion = /*#__PURE__*/function (_React$Component) {
20
- _inheritsLoose(TableRowAccordion, _React$Component);
32
+ */
33
+ var TableRowAccordion = /*#__PURE__*/function (_React$Component) {
34
+ _inherits(TableRowAccordion, _React$Component);
35
+ var _super = _createSuper(TableRowAccordion);
21
36
  function TableRowAccordion() {
22
37
  var _this;
38
+ _classCallCheck(this, TableRowAccordion);
23
39
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
24
40
  args[_key] = arguments[_key];
25
41
  }
26
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
27
- _this.handleToggle = function (e) {
42
+ _this = _super.call.apply(_super, [this].concat(args));
43
+ _defineProperty(_assertThisInitialized(_this), "handleToggle", function (e) {
28
44
  var _this$props = _this.props,
29
45
  onToggle = _this$props.onToggle,
30
46
  id = _this$props.id;
@@ -32,46 +48,48 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Objec
32
48
  if (onToggle) {
33
49
  onToggle(id);
34
50
  }
35
- };
51
+ });
36
52
  return _this;
37
53
  }
38
- var _proto = TableRowAccordion.prototype;
39
- _proto.render = function render() {
40
- var _this$props2 = this.props,
41
- id = _this$props2.id,
42
- cells = _this$props2.cells,
43
- detail = _this$props2.detail,
44
- onToggle = _this$props2.onToggle,
45
- isExpanded = _this$props2.isExpanded,
46
- rest = _objectWithoutPropertiesLoose(_this$props2, _excluded);
47
- return /*#__PURE__*/React.createElement(_styles.default, _extends({}, rest, {
48
- "data-qa-table-row-accordion": isExpanded,
49
- key: id
50
- }), /*#__PURE__*/React.createElement("tr", {
51
- "data-tablerowaccordion-summary": true,
52
- onClick: this.handleToggle
53
- }, cells.map(function (td) {
54
- return /*#__PURE__*/React.createElement(_TableCell.default, _extends({}, td, {
55
- key: td.id
56
- }));
57
- }), /*#__PURE__*/React.createElement(_TableCell.default, {
58
- id: "tableRowAccordion_trigger",
59
- content: /*#__PURE__*/React.createElement(_styles.Trigger, {
60
- "data-tablerowaccordion-trigger": true,
61
- onClick: this.handleToggle,
62
- role: "button"
63
- }, /*#__PURE__*/React.createElement(_Icon.default, {
64
- name: isExpanded ? 'chevron-up' : 'chevron-down'
65
- }))
66
- })), /*#__PURE__*/React.createElement(_styles.Detail, {
67
- isExpanded: isExpanded,
68
- "data-tablerowaccordion-detail": true
69
- }, /*#__PURE__*/React.createElement(_TableCell.default, {
70
- id: "tableRowAccordion_detail",
71
- colSpan: 100,
72
- content: detail
73
- })));
74
- };
54
+ _createClass(TableRowAccordion, [{
55
+ key: "render",
56
+ value: function render() {
57
+ var _this$props2 = this.props,
58
+ id = _this$props2.id,
59
+ cells = _this$props2.cells,
60
+ detail = _this$props2.detail,
61
+ onToggle = _this$props2.onToggle,
62
+ isExpanded = _this$props2.isExpanded,
63
+ rest = _objectWithoutProperties(_this$props2, _excluded);
64
+ return /*#__PURE__*/React.createElement(_styles.default, _extends({}, rest, {
65
+ "data-qa-table-row-accordion": isExpanded,
66
+ key: id
67
+ }), /*#__PURE__*/React.createElement("tr", {
68
+ "data-tablerowaccordion-summary": true,
69
+ onClick: this.handleToggle
70
+ }, cells.map(function (td) {
71
+ return /*#__PURE__*/React.createElement(_TableCell.default, _extends({}, td, {
72
+ key: td.id
73
+ }));
74
+ }), /*#__PURE__*/React.createElement(_TableCell.default, {
75
+ id: "tableRowAccordion_trigger",
76
+ content: /*#__PURE__*/React.createElement(_styles.Trigger, {
77
+ "data-tablerowaccordion-trigger": true,
78
+ onClick: this.handleToggle,
79
+ role: "button"
80
+ }, /*#__PURE__*/React.createElement(_Icon.default, {
81
+ name: isExpanded ? 'chevron-up' : 'chevron-down'
82
+ }))
83
+ })), /*#__PURE__*/React.createElement(_styles.Detail, {
84
+ isExpanded: isExpanded,
85
+ "data-tablerowaccordion-detail": true
86
+ }, /*#__PURE__*/React.createElement(_TableCell.default, {
87
+ id: "tableRowAccordion_detail",
88
+ colSpan: 100,
89
+ content: detail
90
+ })));
91
+ }
92
+ }]);
75
93
  return TableRowAccordion;
76
94
  }(React.Component);
77
95
  exports.default = TableRowAccordion;
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
4
7
  exports.default = exports.Trigger = exports.Detail = void 0;
5
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
6
9
  var _systemProps = require("../utils/system-props");
7
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
8
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9
12
 
10
13
  var Container = _styledComponents.default.tbody.withConfig({
11
14
  displayName: "styles__Container",
@@ -1,98 +1,123 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
4
7
  exports.default = void 0;
5
8
  var React = _interopRequireWildcard(require("react"));
6
9
  var _styles = _interopRequireWildcard(require("./styles"));
7
10
  var _excluded = ["children", "id"],
8
11
  _excluded2 = ["children", "qa"];
9
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
14
  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); }
15
+ 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; }
12
16
  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; }
13
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
17
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18
+ 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); } }
19
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
20
+ 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); }
14
21
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
+ 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); }; }
23
+ 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); }
24
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
25
+ 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; } }
26
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
27
+ 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; }
15
28
  var TabButtonContext = /*#__PURE__*/React.createContext({});
16
29
  var TabItemButton = /*#__PURE__*/function (_React$Component) {
17
- _inheritsLoose(TabItemButton, _React$Component);
30
+ _inherits(TabItemButton, _React$Component);
31
+ var _super = _createSuper(TabItemButton);
18
32
  function TabItemButton() {
19
33
  var _this;
34
+ _classCallCheck(this, TabItemButton);
20
35
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
21
36
  args[_key] = arguments[_key];
22
37
  }
23
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
24
- _this.context = void 0;
25
- _this.buttonRef = /*#__PURE__*/React.createRef();
38
+ _this = _super.call.apply(_super, [this].concat(args));
39
+ _defineProperty(_assertThisInitialized(_this), "buttonRef", /*#__PURE__*/React.createRef());
26
40
  return _this;
27
41
  }
28
- var _proto = TabItemButton.prototype;
29
- _proto.componentDidMount = function componentDidMount() {
30
- this.context.onTabMount(this.props.id, this.buttonRef);
31
- };
32
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
33
- if (prevProps.id !== this.props.id) {
34
- this.context.onTabUpdate(prevProps.id, this.props.id);
42
+ _createClass(TabItemButton, [{
43
+ key: "componentDidMount",
44
+ value: function componentDidMount() {
45
+ this.context.onTabMount(this.props.id, this.buttonRef);
35
46
  }
36
- };
37
- _proto.componentWillUnmount = function componentWillUnmount() {
38
- this.context.onTabUnmount(this.props.id);
39
- };
40
- _proto.render = function render() {
41
- var _this$props = this.props,
42
- children = _this$props.children,
43
- id = _this$props.id,
44
- rest = _objectWithoutPropertiesLoose(_this$props, _excluded);
45
- var _this$context = this.context,
46
- selectedId = _this$context.selectedId,
47
- onActivate = _this$context.onActivate,
48
- fullWidth = _this$context.fullWidth;
49
- var isSelected = selectedId === id;
50
- return /*#__PURE__*/React.createElement(_styles.TabItem, {
51
- key: id,
52
- fullWidth: fullWidth,
53
- isSelected: isSelected
54
- }, /*#__PURE__*/React.createElement(_styles.TabButton, _extends({
55
- innerRef: this.buttonRef,
56
- id: id,
57
- onClick: function onClick() {
58
- return onActivate(id);
59
- },
60
- isSelected: isSelected,
61
- tabIndex: isSelected ? 0 : -1,
62
- fullWidth: fullWidth,
63
- "data-qa-tab-button": id,
64
- "data-qa-tab-button-state": isSelected
65
- // $FlowIssue - upgrade v0.112.0
66
- }, rest), children));
67
- };
47
+ }, {
48
+ key: "componentDidUpdate",
49
+ value: function componentDidUpdate(prevProps) {
50
+ if (prevProps.id !== this.props.id) {
51
+ this.context.onTabUpdate(prevProps.id, this.props.id);
52
+ }
53
+ }
54
+ }, {
55
+ key: "componentWillUnmount",
56
+ value: function componentWillUnmount() {
57
+ this.context.onTabUnmount(this.props.id);
58
+ }
59
+ }, {
60
+ key: "render",
61
+ value: function render() {
62
+ var _this$props = this.props,
63
+ children = _this$props.children,
64
+ id = _this$props.id,
65
+ rest = _objectWithoutProperties(_this$props, _excluded);
66
+ var _this$context = this.context,
67
+ selectedId = _this$context.selectedId,
68
+ onActivate = _this$context.onActivate,
69
+ fullWidth = _this$context.fullWidth;
70
+ var isSelected = selectedId === id;
71
+ return /*#__PURE__*/React.createElement(_styles.TabItem, {
72
+ key: id,
73
+ fullWidth: fullWidth,
74
+ isSelected: isSelected
75
+ }, /*#__PURE__*/React.createElement(_styles.TabButton, _extends({
76
+ innerRef: this.buttonRef,
77
+ id: id,
78
+ onClick: function onClick() {
79
+ return onActivate(id);
80
+ },
81
+ isSelected: isSelected,
82
+ tabIndex: isSelected ? 0 : -1,
83
+ fullWidth: fullWidth,
84
+ "data-qa-tab-button": id,
85
+ "data-qa-tab-button-state": isSelected
86
+ // $FlowIssue - upgrade v0.112.0
87
+ }, rest), children));
88
+ }
89
+ }]);
68
90
  return TabItemButton;
69
91
  }(React.Component);
70
- TabItemButton.contextType = TabButtonContext;
92
+ _defineProperty(TabItemButton, "contextType", TabButtonContext);
71
93
  /**
72
94
  * Render a group of buttons in a tab-heading style
73
- */var Tabs = /*#__PURE__*/function (_React$Component2) {
74
- _inheritsLoose(Tabs, _React$Component2);
95
+ */
96
+ var Tabs = /*#__PURE__*/function (_React$Component2) {
97
+ _inherits(Tabs, _React$Component2);
98
+ var _super2 = _createSuper(Tabs);
75
99
  function Tabs() {
76
100
  var _this2;
101
+ _classCallCheck(this, Tabs);
77
102
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
78
103
  args[_key2] = arguments[_key2];
79
104
  }
80
- _this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
81
- _this2.buttonRefs = {};
82
- _this2.tabList = [];
83
- _this2.getSelectedId = function () {
105
+ _this2 = _super2.call.apply(_super2, [this].concat(args));
106
+ _defineProperty(_assertThisInitialized(_this2), "buttonRefs", {});
107
+ _defineProperty(_assertThisInitialized(_this2), "tabList", []);
108
+ _defineProperty(_assertThisInitialized(_this2), "getSelectedId", function () {
84
109
  return _this2.props.selectedId;
85
- };
86
- _this2.onActivate = function (id) {
110
+ });
111
+ _defineProperty(_assertThisInitialized(_this2), "onActivate", function (id) {
87
112
  return _this2.props.onSelect(id);
88
- };
89
- _this2.onTabMount = function (id, ref) {
113
+ });
114
+ _defineProperty(_assertThisInitialized(_this2), "onTabMount", function (id, ref) {
90
115
  if (!_this2.tabList.includes(id)) {
91
116
  _this2.tabList.push(id);
92
117
  _this2.buttonRefs[id] = ref;
93
118
  }
94
- };
95
- _this2.onTabUpdate = function (previousId, newId) {
119
+ });
120
+ _defineProperty(_assertThisInitialized(_this2), "onTabUpdate", function (previousId, newId) {
96
121
  if (_this2.tabList.includes(previousId)) {
97
122
  _this2.tabList = _this2.tabList.map(function (id) {
98
123
  return id === previousId ? newId : id;
@@ -100,21 +125,21 @@ TabItemButton.contextType = TabButtonContext;
100
125
  _this2.buttonRefs[newId] = _this2.buttonRefs[previousId];
101
126
  _this2.buttonRefs[previousId] = undefined;
102
127
  }
103
- };
104
- _this2.onTabUnmount = function (id) {
128
+ });
129
+ _defineProperty(_assertThisInitialized(_this2), "onTabUnmount", function (id) {
105
130
  if (_this2.tabList.includes(id)) {
106
131
  _this2.tabList = _this2.tabList.filter(function (currentId) {
107
132
  return currentId !== id;
108
133
  });
109
134
  _this2.buttonRefs[id] = undefined;
110
135
  }
111
- };
112
- _this2.selectNextTab = function (id) {
136
+ });
137
+ _defineProperty(_assertThisInitialized(_this2), "selectNextTab", function (id) {
113
138
  var buttonRef = _this2.buttonRefs[id];
114
139
  _this2.props.onSelect(id);
115
140
  buttonRef && buttonRef.current && buttonRef.current.focus && buttonRef.current.focus();
116
- };
117
- _this2.keyHandler = function (_ref) {
141
+ });
142
+ _defineProperty(_assertThisInitialized(_this2), "keyHandler", function (_ref) {
118
143
  var keyCode = _ref.keyCode;
119
144
  switch (keyCode) {
120
145
  // left arrow
@@ -142,34 +167,36 @@ TabItemButton.contextType = TabButtonContext;
142
167
  default:
143
168
  break;
144
169
  }
145
- };
170
+ });
146
171
  return _this2;
147
172
  }
148
- var _proto2 = Tabs.prototype;
149
- _proto2.render = function render() {
150
- var _this$props2 = this.props,
151
- children = _this$props2.children,
152
- qa = _this$props2.qa,
153
- rest = _objectWithoutPropertiesLoose(_this$props2, _excluded2);
154
- return (
155
- /*#__PURE__*/
156
- // $FlowIssue - upgrade v0.112.0
157
- React.createElement(_styles.default, _extends({
158
- "data-qa-tabs": '',
159
- onKeyUp: this.keyHandler
160
- }, qa, rest), /*#__PURE__*/React.createElement(TabButtonContext.Provider, {
161
- value: {
162
- selectedId: this.getSelectedId(),
163
- fullWidth: this.props.fullWidth,
164
- onActivate: this.onActivate,
165
- onTabMount: this.onTabMount,
166
- onTabUpdate: this.onTabUpdate,
167
- onTabUnmount: this.onTabUnmount
168
- }
169
- }, children))
170
- );
171
- };
173
+ _createClass(Tabs, [{
174
+ key: "render",
175
+ value: function render() {
176
+ var _this$props2 = this.props,
177
+ children = _this$props2.children,
178
+ qa = _this$props2.qa,
179
+ rest = _objectWithoutProperties(_this$props2, _excluded2);
180
+ return (
181
+ /*#__PURE__*/
182
+ // $FlowIssue - upgrade v0.112.0
183
+ React.createElement(_styles.default, _extends({
184
+ "data-qa-tabs": "",
185
+ onKeyUp: this.keyHandler
186
+ }, qa, rest), /*#__PURE__*/React.createElement(TabButtonContext.Provider, {
187
+ value: {
188
+ selectedId: this.getSelectedId(),
189
+ fullWidth: this.props.fullWidth,
190
+ onActivate: this.onActivate,
191
+ onTabMount: this.onTabMount,
192
+ onTabUpdate: this.onTabUpdate,
193
+ onTabUnmount: this.onTabUnmount
194
+ }
195
+ }, children))
196
+ );
197
+ }
198
+ }]);
172
199
  return Tabs;
173
200
  }(React.Component);
174
201
  exports.default = Tabs;
175
- Tabs.Button = TabItemButton;
202
+ _defineProperty(Tabs, "Button", TabItemButton);
@@ -1,13 +1,16 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
4
7
  exports.default = exports.TabItem = exports.TabButton = void 0;
5
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
6
9
  var _systemProps = require("../utils/system-props");
7
10
  var _Button = _interopRequireDefault(require("../Button"));
8
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
14
 
12
15
  var Container = _styledComponents.default.ul.withConfig({
13
16
  displayName: "styles__Container",
@@ -30,11 +33,11 @@ var TabItem = _styledComponents.default.li.withConfig({
30
33
  });
31
34
  }, function (props) {
32
35
  return props.isSelected && (0, _styledComponents.css)(["box-shadow:", ";"], function (props) {
33
- return "inset 0 -3px 0 0 " + props.theme.colors.button.primary.background.base;
36
+ return "inset 0 -3px 0 0 ".concat(props.theme.colors.button.primary.background.base);
34
37
  });
35
38
  }, function (props) {
36
39
  return props.isSelected && (0, _styledComponents.css)(["box-shadow:", ";"], function (props) {
37
- return "inset 0 -3px 0 0 " + props.theme.colors.button.primary.background.hover;
40
+ return "inset 0 -3px 0 0 ".concat(props.theme.colors.button.primary.background.hover);
38
41
  });
39
42
  });
40
43
  exports.TabItem = TabItem;
@@ -42,7 +45,7 @@ var TabButton = (0, _styledComponents.default)(_Button.default).withConfig({
42
45
  displayName: "styles__TabButton",
43
46
  componentId: "sc-vnjuiu-2"
44
47
  })(["padding:", ";color:", ";width:100%;", ";&:hover{", ";}&:active{transform:none;}"], function (props) {
45
- return props.theme.space[350] + " 0";
48
+ return "".concat(props.theme.space[350], " 0");
46
49
  }, function (props) {
47
50
  return props.theme.colors.text.headline;
48
51
  }, function (props) {
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
4
7
  exports.default = void 0;
5
8
  var React = _interopRequireWildcard(require("react"));
6
9
  var _styles = _interopRequireDefault(require("./styles"));
@@ -8,8 +11,9 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
11
  var _excluded = ["fontSize", "children", "qa"];
9
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
15
  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); }
16
+ 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; }
13
17
  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; }
14
18
  var Headline = (0, _styledComponents.default)(_styles.default).withConfig({
15
19
  displayName: "Text__Headline",
@@ -77,7 +81,7 @@ var Text = function Text(_ref) {
77
81
  var fontSize = _ref.fontSize,
78
82
  children = _ref.children,
79
83
  qa = _ref.qa,
80
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
84
+ rest = _objectWithoutProperties(_ref, _excluded);
81
85
  var qaText = typeof children === 'string' ? children : undefined;
82
86
  return (
83
87
  /*#__PURE__*/
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
4
7
  exports.default = void 0;
5
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
6
9
  var _systemProps = require("../utils/system-props");
7
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
8
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9
12
 
10
13
  var Container = _styledComponents.default.span.withConfig({
11
14
  displayName: "styles__Container",