@occmundial/occ-atomic 2.0.0-beta.1 → 2.0.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (284) hide show
  1. package/.prettierrc +6 -0
  2. package/.whitesource +12 -0
  3. package/CHANGELOG.md +1276 -584
  4. package/CONTRIBUTING.md +24 -0
  5. package/README.md +21 -21
  6. package/build/Autocomplete/Autocomplete.js +217 -117
  7. package/build/Autocomplete/Autocomplete.test.js +90 -74
  8. package/build/Autocomplete/__snapshots__/Autocomplete.test.js.snap +20 -0
  9. package/build/Autocomplete/index.js +6 -1
  10. package/build/Autocomplete/styles.js +2 -5
  11. package/build/Avatar/Avatar.js +66 -28
  12. package/build/Avatar/Avatar.test.js +36 -13
  13. package/build/Avatar/AvatarContent/AvatarContent.js +11 -14
  14. package/build/Avatar/AvatarContent/AvatarContent.test.js +55 -50
  15. package/build/Avatar/AvatarContent/__snapshots__/AvatarContent.test.js.snap +41 -0
  16. package/build/Avatar/AvatarContent/index.js +6 -1
  17. package/build/Avatar/AvatarContent/styles.js +12 -11
  18. package/build/Avatar/__snapshots__/Avatar.test.js.snap +17 -0
  19. package/build/Avatar/index.js +22 -1
  20. package/build/Avatar/styles.js +2 -6
  21. package/build/Banner/Banner.js +76 -0
  22. package/build/Banner/Banner.test.js +40 -0
  23. package/build/Banner/__snapshots__/Banner.test.js.snap +33 -0
  24. package/build/Banner/index.js +18 -0
  25. package/build/Banner/styles.js +41 -0
  26. package/build/Button/Button.js +123 -62
  27. package/build/Button/Button.test.js +67 -18
  28. package/build/Button/Loading.js +89 -0
  29. package/build/Button/__snapshots__/Button.test.js.snap +334 -0
  30. package/build/Button/index.js +22 -1
  31. package/build/Button/styles.js +176 -160
  32. package/build/ButtonAlign/ButtonAlign.js +20 -16
  33. package/build/ButtonAlign/ButtonAlign.test.js +3 -3
  34. package/build/ButtonAlign/__snapshots__/ButtonAlign.test.js.snap +19 -0
  35. package/build/Card/Card.js +4 -5
  36. package/build/Card/Card.test.js +40 -35
  37. package/build/Card/__snapshots__/Card.test.js.snap +46 -0
  38. package/build/Card/index.js +22 -1
  39. package/build/Card/styles.js +2 -4
  40. package/build/Check/Check.js +18 -14
  41. package/build/Check/Check.test.js +7 -7
  42. package/build/Check/__snapshots__/Check.test.js.snap +92 -0
  43. package/build/Check/styles.js +2 -2
  44. package/build/Checkbox/Checkbox.js +106 -60
  45. package/build/Checkbox/Checkbox.test.js +58 -42
  46. package/build/Checkbox/__snapshots__/Checkbox.test.js.snap +92 -0
  47. package/build/Checkbox/index.js +4 -2
  48. package/build/Checkbox/styles.js +2 -5
  49. package/build/Column/Column.js +1 -1
  50. package/build/Column/Column.test.js +3 -3
  51. package/build/Column/__snapshots__/Column.test.js.snap +647 -0
  52. package/build/Container/Container.js +1 -1
  53. package/build/Container/Container.test.js +4 -4
  54. package/build/Container/__snapshots__/Container.test.js.snap +43 -0
  55. package/build/Droplist/Droplist.js +474 -227
  56. package/build/Droplist/Droplist.test.js +111 -87
  57. package/build/Droplist/__snapshots__/Droplist.test.js.snap +65 -0
  58. package/build/Droplist/functions.js +9 -2
  59. package/build/Droplist/index.js +22 -1
  60. package/build/Droplist/styles.js +41 -15
  61. package/build/Flexbox/Flexbox.js +64 -29
  62. package/build/Flexbox/Flexbox.test.js +32 -14
  63. package/build/Flexbox/__snapshots__/Flexbox.test.js.snap +106 -0
  64. package/build/Flexbox/index.js +22 -1
  65. package/build/Flexbox/styles.js +2 -6
  66. package/build/Footer/Footer.js +42 -30
  67. package/build/Footer/Footer.test.js +2 -2
  68. package/build/Footer/List/List.js +32 -25
  69. package/build/Footer/__snapshots__/Footer.test.js.snap +90 -0
  70. package/build/Footer/styles.js +5 -0
  71. package/build/Grid/Col/Col.js +15 -22
  72. package/build/Grid/Col/Col.test.js +33 -13
  73. package/build/Grid/Col/__snapshots__/Col.test.js.snap +963 -0
  74. package/build/Grid/Col/index.js +22 -1
  75. package/build/Grid/Col/styles.js +97 -116
  76. package/build/Grid/Grid.js +18 -12
  77. package/build/Grid/Row/Row.js +1 -1
  78. package/build/Grid/Row/Row.test.js +2 -2
  79. package/build/Grid/Row/__snapshots__/Row.test.js.snap +22 -0
  80. package/build/Grid/Row/index.js +4 -2
  81. package/build/Grid/index.js +4 -2
  82. package/build/Header/Header.js +35 -31
  83. package/build/Header/Header.test.js +8 -8
  84. package/build/Header/Menu/Menu.js +23 -19
  85. package/build/Header/Menu/Menu.test.js +7 -7
  86. package/build/Header/Menu/__snapshots__/Menu.test.js.snap +113 -0
  87. package/build/Header/Nav/Nav.js +19 -15
  88. package/build/Header/Nav/Nav.test.js +5 -5
  89. package/build/Header/Nav/__snapshots__/Nav.test.js.snap +101 -0
  90. package/build/Header/__snapshots__/Header.test.js.snap +79 -0
  91. package/build/Hidden/Hidden.js +17 -13
  92. package/build/Hidden/Hidden.test.js +6 -6
  93. package/build/Hidden/__snapshots__/Hidden.test.js.snap +3 -0
  94. package/build/Hidden/index.js +4 -2
  95. package/build/Icon/Icon.js +65 -21
  96. package/build/Icon/Icon.test.js +47 -56
  97. package/build/Icon/__snapshots__/Icon.test.js.snap +26 -0
  98. package/build/Icon/index.js +22 -1
  99. package/build/Icon/styles.js +2 -5
  100. package/build/Input/Input.js +29 -25
  101. package/build/Input/Input.test.js +21 -21
  102. package/build/Input/__snapshots__/Input.test.js.snap +194 -0
  103. package/build/Input/index.js +17 -13
  104. package/build/Label/Label.js +17 -13
  105. package/build/Label/Label.test.js +6 -6
  106. package/build/Label/__snapshots__/Label.test.js.snap +82 -0
  107. package/build/LayerApp/LayerApp.js +22 -18
  108. package/build/LayerApp/LayerApp.test.js +4 -4
  109. package/build/LayerApp/__snapshots__/LayerApp.test.js.snap +37 -0
  110. package/build/Modal/Modal.js +55 -37
  111. package/build/Modal/Modal.test.js +10 -10
  112. package/build/Modal/__snapshots__/Modal.test.js.snap +208 -0
  113. package/build/Modal/index.js +19 -13
  114. package/build/Modal/styles.js +43 -31
  115. package/build/NavAside/NavAside.js +22 -18
  116. package/build/NavAside/NavAside.test.js +12 -12
  117. package/build/NavAside/__snapshots__/NavAside.test.js.snap +116 -0
  118. package/build/NavAside/index.js +16 -12
  119. package/build/NavIcon/NavIcon.js +31 -19
  120. package/build/NavItem/NavItem.js +29 -16
  121. package/build/NavTab/NavTab.js +36 -29
  122. package/build/NavTop/NavTop.js +20 -16
  123. package/build/OrderBy/OrderBy.js +23 -19
  124. package/build/OrderBy/OrderBy.test.js +6 -6
  125. package/build/OrderBy/__snapshots__/OrderBy.test.js.snap +54 -0
  126. package/build/Pager/Break/Break.js +1 -1
  127. package/build/Pager/Break/Break.test.js +4 -4
  128. package/build/Pager/Break/__snapshots__/Break.test.js.snap +13 -0
  129. package/build/Pager/Page/Page.js +1 -1
  130. package/build/Pager/Page/Page.test.js +5 -5
  131. package/build/Pager/Page/__snapshots__/Page.test.js.snap +27 -0
  132. package/build/Pager/Pager.js +21 -17
  133. package/build/Pager/Pager.test.js +12 -12
  134. package/build/Pager/__snapshots__/Pager.test.js.snap +50 -0
  135. package/build/Pager/styles.js +1 -1
  136. package/build/Pill/Choice/Choice.js +23 -18
  137. package/build/Pill/Choice/styles.js +8 -3
  138. package/build/Pill/Group/Group.js +7 -4
  139. package/build/Pill/Group/styles.js +7 -4
  140. package/build/Pill/Pill.js +36 -23
  141. package/build/Pill/Pill.test.js +12 -12
  142. package/build/Pill/Stack/Stack.js +10 -7
  143. package/build/Pill/Stack/styles.js +4 -1
  144. package/build/Pill/__snapshots__/Pill.test.js.snap +62 -0
  145. package/build/Pill/styles.js +6 -2
  146. package/build/Placeholder/Placeholder.js +2 -2
  147. package/build/Placeholder/Placeholder.test.js +3 -3
  148. package/build/Placeholder/__snapshots__/Placeholder.test.js.snap +130 -0
  149. package/build/Placeholder/styles.js +23 -16
  150. package/build/Radio/Radio.js +29 -15
  151. package/build/Radio/Radio.test.js +6 -6
  152. package/build/Radio/__snapshots__/Radio.test.js.snap +83 -0
  153. package/build/RangeCounter/RangeCounter.js +17 -13
  154. package/build/RangeCounter/RangeCounter.test.js +3 -3
  155. package/build/RangeCounter/__snapshots__/RangeCounter.test.js.snap +20 -0
  156. package/build/RangeCounter/styles.js +1 -1
  157. package/build/Row/Row.js +1 -1
  158. package/build/Row/Row.test.js +2 -2
  159. package/build/Row/__snapshots__/Row.test.js.snap +22 -0
  160. package/build/SightLogo/SightLogo.js +2 -2
  161. package/build/SightLogo/SightLogo.test.js +2 -2
  162. package/build/SightLogo/__snapshots__/SightLogo.test.js.snap +24 -0
  163. package/build/SlideDown/SlideDown.js +37 -26
  164. package/build/SlideDown/SlideDown.test.js +9 -9
  165. package/build/SlideDown/__snapshots__/SlideDown.test.js.snap +42 -0
  166. package/build/SlideToggle/SlideToggle.js +31 -17
  167. package/build/SlideToggle/SlideToggle.test.js +7 -7
  168. package/build/SlideToggle/__snapshots__/SlideToggle.test.js.snap +62 -0
  169. package/build/SubHeader/SubHeader.js +20 -16
  170. package/build/SubHeader/SubHeader.test.js +7 -7
  171. package/build/SubHeader/__snapshots__/SubHeader.test.js.snap +50 -0
  172. package/build/SwitchGroup/SwitchGroup.js +17 -13
  173. package/build/SwitchGroup/SwitchGroup.test.js +6 -6
  174. package/build/SwitchGroup/__snapshots__/SwitchGroup.test.js.snap +52 -0
  175. package/build/SwitchGroup/styles.js +1 -1
  176. package/build/Tag/Tag.js +27 -10
  177. package/build/Tag/Tag.test.js +8 -8
  178. package/build/Tag/__snapshots__/Tag.test.js.snap +137 -0
  179. package/build/Tag/styles.js +72 -27
  180. package/build/Text/Text.js +30 -15
  181. package/build/Text/Text.test.js +8 -8
  182. package/build/Text/__snapshots__/Text.test.js.snap +158 -0
  183. package/build/Text/styles.js +32 -23
  184. package/build/TextField/TextField.js +455 -302
  185. package/build/TextField/TextField.test.js +138 -146
  186. package/build/TextField/__snapshots__/TextField.test.js.snap +258 -0
  187. package/build/TextField/index.js +6 -1
  188. package/build/TextField/styles.js +99 -33
  189. package/build/Tip/Tip.js +91 -27
  190. package/build/Tip/Tip.test.js +5 -5
  191. package/build/Tip/__snapshots__/Tip.test.js.snap +49 -0
  192. package/build/Tip/styles.js +32 -12
  193. package/build/Title/Title.js +16 -12
  194. package/build/Title/Title.test.js +3 -3
  195. package/build/Title/__snapshots__/Title.test.js.snap +31 -0
  196. package/build/Toaster/Toast/Toast.js +11 -11
  197. package/build/Toaster/Toaster.js +27 -23
  198. package/build/Toaster/Toaster.test.js +6 -6
  199. package/build/Toaster/__snapshots__/Toaster.test.js.snap +5 -0
  200. package/build/Tooltip/Tooltip.js +210 -0
  201. package/build/Tooltip/Tooltip.test.js +35 -0
  202. package/build/Tooltip/__snapshots__/Tooltip.test.js.snap +33 -0
  203. package/build/Tooltip/hooks.js +132 -0
  204. package/build/Tooltip/index.js +18 -0
  205. package/build/Tooltip/styles.js +44 -0
  206. package/build/TourTip/TourTip.js +15 -11
  207. package/build/TourTip/TourTip.test.js +2 -2
  208. package/build/TourTip/__snapshots__/TourTip.test.js.snap +74 -0
  209. package/build/Visible/Visible.js +16 -12
  210. package/build/Visible/Visible.test.js +4 -4
  211. package/build/Visible/__snapshots__/Visible.test.js.snap +3 -0
  212. package/build/WindowSize/WindowSize.js +17 -11
  213. package/build/WindowSize/WindowSize.test.js +4 -4
  214. package/build/WindowSize/__snapshots__/WindowSize.test.js.snap +3 -0
  215. package/build/index.js +79 -8
  216. package/build/plugin/babel.js +59 -0
  217. package/build/subatomic/colors.js +8 -3
  218. package/build/subatomic/fonts.js +1 -1
  219. package/build/subatomic/icons/attachment.js +23 -0
  220. package/build/subatomic/icons/attachmentSolid.js +23 -0
  221. package/build/subatomic/icons/avatarSmile.js +23 -0
  222. package/build/subatomic/icons/book.js +23 -0
  223. package/build/subatomic/icons/cash.js +23 -0
  224. package/build/subatomic/icons/copy.js +23 -0
  225. package/build/subatomic/icons/copySolid.js +23 -0
  226. package/build/subatomic/icons/crossSolid.js +23 -0
  227. package/build/subatomic/icons/dislike.js +1 -1
  228. package/build/subatomic/icons/dislikeSolid.js +23 -0
  229. package/build/subatomic/icons/energy.js +23 -0
  230. package/build/subatomic/icons/energySolid.js +23 -0
  231. package/build/subatomic/icons/eye.js +1 -1
  232. package/build/subatomic/icons/eyeClosed.js +1 -1
  233. package/build/subatomic/icons/eyeClosedSolid.js +23 -0
  234. package/build/subatomic/icons/eyeSolid.js +23 -0
  235. package/build/subatomic/icons/hourGlass.js +23 -0
  236. package/build/subatomic/icons/like.js +1 -1
  237. package/build/subatomic/icons/likeSolid.js +23 -0
  238. package/build/subatomic/icons/location.js +23 -0
  239. package/build/subatomic/icons/locationSolid.js +23 -0
  240. package/build/subatomic/icons/matchJob.js +23 -0
  241. package/build/subatomic/icons/messages.js +1 -1
  242. package/build/subatomic/icons/messagesSolid.js +1 -1
  243. package/build/subatomic/icons/moreOptionsHorizontal.js +23 -0
  244. package/build/subatomic/icons/noMessages.js +23 -0
  245. package/build/subatomic/icons/noMessagesSolid.js +23 -0
  246. package/build/subatomic/icons/occDart.js +23 -8
  247. package/build/subatomic/icons/occHorizontal.js +23 -8
  248. package/build/subatomic/icons/occLogo.js +63 -0
  249. package/build/subatomic/icons/occVertical.js +23 -8
  250. package/build/subatomic/icons/profile.js +23 -0
  251. package/build/subatomic/icons/profileSolid.js +23 -0
  252. package/build/subatomic/icons/profileView.js +23 -0
  253. package/build/subatomic/icons/refresh.js +23 -0
  254. package/build/subatomic/icons/refreshSolid.js +23 -0
  255. package/build/subatomic/icons/sendMessage.js +23 -0
  256. package/build/subatomic/icons/sendMessageSolid.js +23 -0
  257. package/build/subatomic/icons/starsSolid.js +23 -0
  258. package/build/subatomic/icons/suitcase.js +23 -0
  259. package/build/subatomic/icons/suitcaseSolid.js +23 -0
  260. package/build/subatomic/icons/tag.js +1 -1
  261. package/build/subatomic/icons/tagSolid.js +23 -0
  262. package/build/subatomic/icons/trash.js +1 -1
  263. package/build/subatomic/icons/trashSolid.js +1 -1
  264. package/build/subatomic/icons/warning.js +23 -0
  265. package/build/subatomic/icons/warningSolid.js +23 -0
  266. package/build/subatomic/icons/webSite.js +23 -0
  267. package/build/subatomic/icons/webSiteSolid.js +23 -0
  268. package/build/subatomic/icons.js +230 -112
  269. package/build/tokens/borderRadius.json +8 -0
  270. package/build/tokens/colors.json +567 -0
  271. package/build/tokens/fonts.json +231 -0
  272. package/build/tokens/index.js +47 -0
  273. package/build/tokens/shadows.json +13 -0
  274. package/build/tokens/spacing.json +16 -0
  275. package/commitlint.config.js +6 -0
  276. package/package.json +124 -113
  277. package/playroom/FrameComponent.js +31 -0
  278. package/playroom/styles.js +14 -0
  279. package/playroom.config.js +7 -7
  280. package/build/Grid/Grid.test.js +0 -22
  281. package/build/Grid/Row/Rowdsd.js +0 -39
  282. package/build/hooks/useEventListener.js +0 -23
  283. package/build/hooks/usePrevious.js +0 -19
  284. package/yarn-error.log +0 -10737
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useOpenTooltipState = useOpenTooltipState;
7
+ exports.useThrottle = useThrottle;
8
+
9
+ var _react = require("react");
10
+
11
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+
13
+ 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."); }
14
+
15
+ 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); }
16
+
17
+ 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; }
18
+
19
+ 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; }
20
+
21
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
+
23
+ function useOpenTooltipState(openExternal, setOpenExternal, closeDelay) {
24
+ var _useThrottle = useThrottle({
25
+ trailing: true,
26
+ leading: false
27
+ }),
28
+ throttle = _useThrottle.throttle,
29
+ cancel = _useThrottle.cancel;
30
+
31
+ var _useState = (0, _react.useState)(false),
32
+ _useState2 = _slicedToArray(_useState, 2),
33
+ openInternal = _useState2[0],
34
+ setOpenInternal = _useState2[1];
35
+
36
+ var open = (0, _react.useMemo)(function () {
37
+ return openExternal !== null && openExternal !== void 0 ? openExternal : openInternal;
38
+ }, [openExternal, openInternal]);
39
+ var setOpenSource = (0, _react.useMemo)(function () {
40
+ return openExternal !== undefined ? setOpenExternal !== null && setOpenExternal !== void 0 ? setOpenExternal : function () {} : setOpenInternal;
41
+ }, [openExternal, setOpenExternal, setOpenInternal]);
42
+ var setOpenSourceDelay = (0, _react.useCallback)(function (show) {
43
+ throttle({
44
+ throttleTime: closeDelay,
45
+ callback: function callback() {
46
+ return setOpenSource(show);
47
+ }
48
+ });
49
+ }, [closeDelay, setOpenSource, throttle]);
50
+
51
+ function setOpen(openValue) {
52
+ if (openValue) {
53
+ if (open) cancel();
54
+ setOpenSource(true);
55
+ } else {
56
+ closeDelay > 0 ? setOpenSourceDelay(false) : setOpenSource(false);
57
+ }
58
+ }
59
+
60
+ (0, _react.useEffect)(function () {
61
+ if (closeDelay <= 0) return;
62
+
63
+ if (openExternal === false) {
64
+ cancel();
65
+ } else {
66
+ setOpenSourceDelay(false);
67
+ }
68
+ }, [openExternal, setOpenSourceDelay, setOpenSource, closeDelay, cancel]);
69
+ return [open, setOpen];
70
+ }
71
+
72
+ function useThrottle() {
73
+ var defaults = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
74
+ var timeout = (0, _react.useRef)(null);
75
+ var lastCallback = (0, _react.useRef)(null);
76
+ var date = (0, _react.useRef)(null);
77
+ var cancel = (0, _react.useCallback)(function () {
78
+ if (!timeout.current) return;
79
+ window.clearTimeout(timeout.current);
80
+ timeout.current = null;
81
+ date.current = null;
82
+ }, []);
83
+ var flush = (0, _react.useCallback)(function () {
84
+ if (!lastCallback.current) return;
85
+ lastCallback.current();
86
+ lastCallback.current = null;
87
+ date.current = null;
88
+ cancel();
89
+ }, [cancel]);
90
+ var throttle = (0, _react.useCallback)(function (_ref) {
91
+ var _ref4;
92
+
93
+ var callback = _ref.callback,
94
+ throttleTime = _ref.throttleTime,
95
+ leading = _ref.leading,
96
+ trailing = _ref.trailing;
97
+
98
+ if (timeout.current) {
99
+ var _ref2;
100
+
101
+ return lastCallback.current = (_ref2 = callback !== null && callback !== void 0 ? callback : defaults.callback) !== null && _ref2 !== void 0 ? _ref2 : null;
102
+ } else {
103
+ var _ref3, _defaults$leading;
104
+
105
+ date.current = new Date();
106
+
107
+ if ((_ref3 = (_defaults$leading = defaults === null || defaults === void 0 ? void 0 : defaults.leading) !== null && _defaults$leading !== void 0 ? _defaults$leading : leading) !== null && _ref3 !== void 0 ? _ref3 : true) {
108
+ callback();
109
+ } else {
110
+ lastCallback.current = callback;
111
+ }
112
+ }
113
+
114
+ timeout.current = window.setTimeout(function () {
115
+ var _defaults$trailing;
116
+
117
+ ((_defaults$trailing = defaults === null || defaults === void 0 ? void 0 : defaults.trailing) !== null && _defaults$trailing !== void 0 ? _defaults$trailing : trailing) ? flush() : cancel();
118
+ }, (_ref4 = throttleTime !== null && throttleTime !== void 0 ? throttleTime : defaults.throttleTime) !== null && _ref4 !== void 0 ? _ref4 : 1000);
119
+ }, [cancel, defaults.callback, defaults === null || defaults === void 0 ? void 0 : defaults.leading, defaults.throttleTime, defaults === null || defaults === void 0 ? void 0 : defaults.trailing, flush]);
120
+ (0, _react.useEffect)(function () {
121
+ return cancel;
122
+ }, [cancel]);
123
+ return {
124
+ throttle: throttle,
125
+ flush: flush,
126
+ cancel: cancel,
127
+ isActive: function isActive() {
128
+ return !!date.current;
129
+ },
130
+ date: date
131
+ };
132
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _reactJss = _interopRequireDefault(require("react-jss"));
9
+
10
+ var _Tooltip = _interopRequireDefault(require("./Tooltip"));
11
+
12
+ var _styles = _interopRequireDefault(require("./styles"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ var _default = (0, _reactJss["default"])(_styles["default"])(_Tooltip["default"]);
17
+
18
+ exports["default"] = _default;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _colors = _interopRequireDefault(require("../subatomic/colors"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ var infoLight = _colors["default"].infoLight,
13
+ infoText = _colors["default"].infoText,
14
+ info = _colors["default"].info,
15
+ white = _colors["default"].white,
16
+ grey900 = _colors["default"].grey900;
17
+ var _default = {
18
+ activator: {
19
+ display: 'inline-block'
20
+ },
21
+ tooltip: {
22
+ padding: '16px',
23
+ borderRadius: '4px',
24
+ fontSize: '14px',
25
+ lineHeight: 1.5
26
+ },
27
+ info: {
28
+ background: infoLight,
29
+ color: infoText
30
+ },
31
+ dark: {
32
+ background: grey900,
33
+ color: white
34
+ },
35
+ light: {
36
+ background: white,
37
+ color: info
38
+ },
39
+ purple: {
40
+ background: info,
41
+ color: white
42
+ }
43
+ };
44
+ exports["default"] = _default;
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -15,36 +17,38 @@ var _jquery = _interopRequireDefault(require("jquery"));
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
19
 
18
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
19
-
20
20
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
21
 
22
22
  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); } }
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
25
25
 
26
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
26
+ 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
+
28
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
29
 
28
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
30
+ 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); }; }
31
+
32
+ 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); }
29
33
 
30
34
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
35
 
32
- 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
36
+ 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; } }
33
37
 
34
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
38
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
35
39
 
36
40
  /** This component displays a tooltip in a defined direction and alignment relative to a specified element. To make it work both, the target and the TourTip component, must be wrapped inside a 'relative' container. */
37
- var TourTip =
38
- /*#__PURE__*/
39
- function (_React$Component) {
41
+ var TourTip = /*#__PURE__*/function (_React$Component) {
40
42
  _inherits(TourTip, _React$Component);
41
43
 
44
+ var _super = _createSuper(TourTip);
45
+
42
46
  function TourTip(props) {
43
47
  var _this;
44
48
 
45
49
  _classCallCheck(this, TourTip);
46
50
 
47
- _this = _possibleConstructorReturn(this, _getPrototypeOf(TourTip).call(this, props));
51
+ _this = _super.call(this, props);
48
52
  _this.state = {
49
53
  position: {}
50
54
  };
@@ -111,7 +115,7 @@ function (_React$Component) {
111
115
  direction = _this$props2.direction,
112
116
  id = _this$props2.id,
113
117
  className = _this$props2.className;
114
- return _react["default"].createElement("div", {
118
+ return /*#__PURE__*/_react["default"].createElement("div", {
115
119
  ref: function ref(_ref) {
116
120
  _this3.self = _ref;
117
121
  },
@@ -21,7 +21,7 @@ var reduceClasses = function reduceClasses(prev, curr) {
21
21
  var classes = Object.keys(_styles["default"]).reduce(reduceClasses, {});
22
22
  describe("TourTip", function () {
23
23
  it('matches the snapshot', function () {
24
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_TourTip["default"], {
24
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_TourTip["default"], {
25
25
  classes: classes,
26
26
  direction: "down",
27
27
  target: "target"
@@ -31,7 +31,7 @@ describe("TourTip", function () {
31
31
  });
32
32
  describe("TourTipJSS", function () {
33
33
  it('matches the snapshot', function () {
34
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_index["default"], {
34
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], {
35
35
  direction: "down",
36
36
  target: "target"
37
37
  }));
@@ -0,0 +1,74 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`TourTip matches the snapshot 1`] = `ShallowWrapper {}`;
4
+
5
+ exports[`TourTip styles matches the snapshot 1`] = `
6
+ Object {
7
+ "down": Object {
8
+ "&:after": Object {
9
+ "borderBottom": "5px solid #1476fb",
10
+ "borderLeft": "5px solid transparent",
11
+ "borderRight": "5px solid transparent",
12
+ "bottom": "100%",
13
+ "left": "50%",
14
+ "transform": "translateX(-50%)",
15
+ },
16
+ },
17
+ "left": Object {
18
+ "&:after": Object {
19
+ "borderBottom": "5px solid transparent",
20
+ "borderLeft": "5px solid #1476fb",
21
+ "borderTop": "5px solid transparent",
22
+ "left": "100%",
23
+ "top": "50%",
24
+ "transform": "translateY(-50%)",
25
+ },
26
+ },
27
+ "right": Object {
28
+ "&:after": Object {
29
+ "borderBottom": "5px solid transparent",
30
+ "borderRight": "5px solid #1476fb",
31
+ "borderTop": "5px solid transparent",
32
+ "right": "100%",
33
+ "top": "50%",
34
+ "transform": "translateY(-50%)",
35
+ },
36
+ },
37
+ "tip": Object {
38
+ "&:after": Object {
39
+ "content": "\\"\\"",
40
+ "display": "block",
41
+ "position": "absolute",
42
+ },
43
+ "alignItems": "center",
44
+ "background": "#1476fb",
45
+ "borderRadius": "3px",
46
+ "boxShadow": "0 12px 9px -5px rgba(0,0,0,0.12), 0 10px 32px 0 rgba(0,29,124,0.12)",
47
+ "boxSizing": "border-box",
48
+ "color": "#ffffff",
49
+ "display": "flex",
50
+ "fontFamily": "'Nunito Sans', sans-serif",
51
+ "fontSize": "12px",
52
+ "height": "40px",
53
+ "left": "0",
54
+ "padding": "0 15px",
55
+ "position": "absolute",
56
+ "top": "0",
57
+ "transition": "0.3s all",
58
+ "whiteSpace": "nowrap",
59
+ "zIndex": "10",
60
+ },
61
+ "up": Object {
62
+ "&:after": Object {
63
+ "borderLeft": "5px solid transparent",
64
+ "borderRight": "5px solid transparent",
65
+ "borderTop": "5px solid #1476fb",
66
+ "left": "50%",
67
+ "top": "100%",
68
+ "transform": "translateX(-50%)",
69
+ },
70
+ },
71
+ }
72
+ `;
73
+
74
+ exports[`TourTipJSS matches the snapshot 1`] = `ShallowWrapper {}`;
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -13,36 +15,38 @@ var _grid = _interopRequireDefault(require("../subatomic/grid"));
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
 
16
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
17
-
18
18
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
19
 
20
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
21
 
22
22
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
23
23
 
24
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
24
+ 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
+
26
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
25
27
 
26
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
+ 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); }; }
29
+
30
+ 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); }
27
31
 
28
32
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
29
33
 
30
- 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
34
+ 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; } }
31
35
 
32
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
36
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
33
37
 
34
38
  /** Shows the content on the specified window size. */
35
- var Visible =
36
- /*#__PURE__*/
37
- function (_React$Component) {
39
+ var Visible = /*#__PURE__*/function (_React$Component) {
38
40
  _inherits(Visible, _React$Component);
39
41
 
42
+ var _super = _createSuper(Visible);
43
+
40
44
  function Visible(props) {
41
45
  var _this;
42
46
 
43
47
  _classCallCheck(this, Visible);
44
48
 
45
- _this = _possibleConstructorReturn(this, _getPrototypeOf(Visible).call(this, props));
49
+ _this = _super.call(this, props);
46
50
  _this.state = {
47
51
  width: 0
48
52
  };
@@ -86,9 +90,9 @@ function (_React$Component) {
86
90
  lg = _this$props.lg;
87
91
 
88
92
  if (width >= _grid["default"].xxs && width < _grid["default"].sm && xs || width >= _grid["default"].sm && width < _grid["default"].md && sm || width >= _grid["default"].md && width < _grid["default"].lg && md || width >= _grid["default"].lg && lg) {
89
- return _react["default"].createElement("span", null, children);
93
+ return /*#__PURE__*/_react["default"].createElement("span", null, children);
90
94
  } else {
91
- return _react["default"].createElement("span", null);
95
+ return /*#__PURE__*/_react["default"].createElement("span", null);
92
96
  }
93
97
  }
94
98
  }]);
@@ -10,15 +10,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
10
10
 
11
11
  describe("Visible", function () {
12
12
  it('matches the snapshot', function () {
13
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Visible["default"], {
13
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Visible["default"], {
14
14
  xs: true
15
- }, _react["default"].createElement("div", null, "Text")));
15
+ }, /*#__PURE__*/_react["default"].createElement("div", null, "Text")));
16
16
  expect(wrapper).toMatchSnapshot();
17
17
  });
18
18
  it('shows content in xs', function () {
19
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Visible["default"], {
19
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Visible["default"], {
20
20
  xs: true
21
- }, _react["default"].createElement("div", null, "Text")));
21
+ }, /*#__PURE__*/_react["default"].createElement("div", null, "Text")));
22
22
  wrapper.setState({
23
23
  width: 1200
24
24
  });
@@ -0,0 +1,3 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Visible matches the snapshot 1`] = `ShallowWrapper {}`;
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -11,9 +13,9 @@ var _grid = _interopRequireDefault(require("../subatomic/grid"));
11
13
 
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
15
 
14
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } }
16
+ 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); }
15
17
 
16
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
18
+ 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; }
17
19
 
18
20
  function _extends() { _extends = Object.assign || 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); }
19
21
 
@@ -23,28 +25,32 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
25
 
24
26
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
25
27
 
26
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
28
+ 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
29
 
28
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
30
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
+
32
+ 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); }; }
33
+
34
+ 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); }
29
35
 
30
36
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
37
 
32
- 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
38
+ 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; } }
33
39
 
34
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
40
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
35
41
 
36
42
  function _default(ComposedComponent) {
37
- var WindowSize =
38
- /*#__PURE__*/
39
- function (_Component) {
43
+ var WindowSize = /*#__PURE__*/function (_Component) {
40
44
  _inherits(WindowSize, _Component);
41
45
 
46
+ var _super = _createSuper(WindowSize);
47
+
42
48
  function WindowSize(props) {
43
49
  var _this;
44
50
 
45
51
  _classCallCheck(this, WindowSize);
46
52
 
47
- _this = _possibleConstructorReturn(this, _getPrototypeOf(WindowSize).call(this, props));
53
+ _this = _super.call(this, props);
48
54
  _this.state = {
49
55
  size: 'sm',
50
56
  winWidth: 0
@@ -79,7 +85,7 @@ function _default(ComposedComponent) {
79
85
  var _this$state = this.state,
80
86
  size = _this$state.size,
81
87
  winWidth = _this$state.winWidth;
82
- return _react["default"].createElement(ComposedComponent, _extends({}, this.props, {
88
+ return /*#__PURE__*/_react["default"].createElement(ComposedComponent, _extends({}, this.props, {
83
89
  size: size,
84
90
  winWidth: winWidth
85
91
  }));
@@ -12,13 +12,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
12
12
 
13
13
  describe("WindowSize", function () {
14
14
  it('matches the snapshot', function () {
15
- var Component = (0, _WindowSize["default"])(_react["default"].createElement(_Button["default"], null, "Button"));
16
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(Component, null));
15
+ var Component = (0, _WindowSize["default"])( /*#__PURE__*/_react["default"].createElement(_Button["default"], null, "Button"));
16
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, null));
17
17
  expect(wrapper).toMatchSnapshot();
18
18
  });
19
19
  it('sets the size as medium', function () {
20
- var Component = (0, _WindowSize["default"])(_react["default"].createElement(_Button["default"], null, "Button"));
21
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(Component, null));
20
+ var Component = (0, _WindowSize["default"])( /*#__PURE__*/_react["default"].createElement(_Button["default"], null, "Button"));
21
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(Component, null));
22
22
  expect(wrapper.prop('size')).toEqual('md');
23
23
  });
24
24
  });
@@ -0,0 +1,3 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`WindowSize matches the snapshot 1`] = `ShallowWrapper {}`;