@occmundial/occ-atomic 2.0.0-beta.0 → 2.0.0-beta.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. package/.prettierrc +6 -0
  2. package/.whitesource +12 -0
  3. package/CHANGELOG.md +1354 -581
  4. package/CONTRIBUTING.md +24 -0
  5. package/README.md +21 -21
  6. package/build/Autocomplete/Autocomplete.js +35 -23
  7. package/build/Autocomplete/Autocomplete.test.js +14 -14
  8. package/build/Autocomplete/__snapshots__/Autocomplete.test.js.snap +20 -0
  9. package/build/Avatar/Avatar.js +21 -17
  10. package/build/Avatar/Avatar.test.js +2 -2
  11. package/build/Avatar/AvatarContent/AvatarContent.js +5 -5
  12. package/build/Avatar/AvatarContent/AvatarContent.test.js +6 -6
  13. package/build/Avatar/AvatarContent/__snapshots__/AvatarContent.test.js.snap +41 -0
  14. package/build/Avatar/AvatarContent/styles.js +10 -6
  15. package/build/Avatar/__snapshots__/Avatar.test.js.snap +17 -0
  16. package/build/Avatar/index.js +4 -2
  17. package/build/Banner/Banner.js +76 -0
  18. package/build/Banner/Banner.test.js +40 -0
  19. package/build/Banner/__snapshots__/Banner.test.js.snap +33 -0
  20. package/build/Banner/index.js +18 -0
  21. package/build/Banner/styles.js +41 -0
  22. package/build/Button/Button.js +66 -33
  23. package/build/Button/Button.test.js +23 -28
  24. package/build/Button/Loading.js +82 -0
  25. package/build/Button/__snapshots__/Button.test.js.snap +322 -0
  26. package/build/Button/index.js +4 -2
  27. package/build/Button/styles.js +185 -173
  28. package/build/ButtonAlign/ButtonAlign.js +86 -0
  29. package/build/ButtonAlign/ButtonAlign.test.js +50 -0
  30. package/build/ButtonAlign/__snapshots__/ButtonAlign.test.js.snap +19 -0
  31. package/build/ButtonAlign/index.js +18 -0
  32. package/build/ButtonAlign/styles.js +18 -0
  33. package/build/Card/Card.js +1 -1
  34. package/build/Card/Card.test.js +4 -4
  35. package/build/Card/__snapshots__/Card.test.js.snap +46 -0
  36. package/build/Card/index.js +4 -2
  37. package/build/Check/Check.js +151 -0
  38. package/build/Check/Check.test.js +85 -0
  39. package/build/Check/__snapshots__/Check.test.js.snap +92 -0
  40. package/build/Check/index.js +18 -0
  41. package/build/Check/styles.js +100 -0
  42. package/build/Checkbox/Checkbox.js +29 -16
  43. package/build/Checkbox/Checkbox.test.js +8 -8
  44. package/build/Checkbox/__snapshots__/Checkbox.test.js.snap +92 -0
  45. package/build/Checkbox/index.js +4 -2
  46. package/build/Column/Column.js +67 -0
  47. package/build/Column/Column.test.js +59 -0
  48. package/build/Column/__snapshots__/Column.test.js.snap +647 -0
  49. package/build/Column/index.js +18 -0
  50. package/build/Column/styles.js +93 -0
  51. package/build/Container/Container.js +50 -0
  52. package/build/Container/Container.test.js +53 -0
  53. package/build/Container/__snapshots__/Container.test.js.snap +43 -0
  54. package/build/Container/index.js +18 -0
  55. package/build/Container/styles.js +49 -0
  56. package/build/Droplist/Droplist.js +82 -33
  57. package/build/Droplist/Droplist.test.js +50 -11
  58. package/build/Droplist/__snapshots__/Droplist.test.js.snap +65 -0
  59. package/build/Droplist/functions.js +9 -2
  60. package/build/Droplist/index.js +4 -2
  61. package/build/Droplist/styles.js +39 -10
  62. package/build/Flexbox/Flexbox.js +16 -12
  63. package/build/Flexbox/Flexbox.test.js +3 -3
  64. package/build/Flexbox/__snapshots__/Flexbox.test.js.snap +106 -0
  65. package/build/Flexbox/index.js +4 -2
  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 +1 -1
  72. package/build/Grid/Col/Col.test.js +3 -3
  73. package/build/Grid/Col/__snapshots__/Col.test.js.snap +963 -0
  74. package/build/Grid/Col/index.js +4 -2
  75. package/build/Grid/Grid.js +18 -12
  76. package/build/Grid/Row/Row.js +1 -1
  77. package/build/Grid/Row/Row.test.js +2 -2
  78. package/build/Grid/Row/__snapshots__/Row.test.js.snap +22 -0
  79. package/build/Grid/Row/index.js +4 -2
  80. package/build/Grid/index.js +4 -2
  81. package/build/Header/Header.js +163 -0
  82. package/build/Header/Header.test.js +118 -0
  83. package/build/Header/Menu/Menu.js +135 -0
  84. package/build/Header/Menu/Menu.test.js +107 -0
  85. package/build/Header/Menu/__snapshots__/Menu.test.js.snap +113 -0
  86. package/build/Header/Menu/index.js +18 -0
  87. package/build/Header/Menu/styles.js +123 -0
  88. package/build/Header/Nav/Nav.js +95 -0
  89. package/build/Header/Nav/Nav.test.js +81 -0
  90. package/build/Header/Nav/__snapshots__/Nav.test.js.snap +101 -0
  91. package/build/Header/Nav/index.js +18 -0
  92. package/build/Header/Nav/styles.js +110 -0
  93. package/build/Header/__snapshots__/Header.test.js.snap +79 -0
  94. package/build/Header/index.js +18 -0
  95. package/build/Header/styles.js +94 -0
  96. package/build/Hidden/Hidden.js +17 -13
  97. package/build/Hidden/Hidden.test.js +6 -6
  98. package/build/Hidden/__snapshots__/Hidden.test.js.snap +3 -0
  99. package/build/Hidden/index.js +4 -2
  100. package/build/Icon/Icon.js +85 -42
  101. package/build/Icon/Icon.test.js +15 -13
  102. package/build/Icon/__snapshots__/Icon.test.js.snap +32 -0
  103. package/build/Icon/index.js +4 -2
  104. package/build/Icon/styles.js +14 -4
  105. package/build/Input/Input.js +442 -0
  106. package/build/Input/Input.test.js +258 -0
  107. package/build/Input/__snapshots__/Input.test.js.snap +194 -0
  108. package/build/Input/index.js +78 -0
  109. package/build/Input/styles.js +202 -0
  110. package/build/Input/stylesFlat.js +74 -0
  111. package/build/Label/Label.js +98 -0
  112. package/build/Label/Label.test.js +73 -0
  113. package/build/Label/__snapshots__/Label.test.js.snap +82 -0
  114. package/build/Label/index.js +18 -0
  115. package/build/Label/styles.js +90 -0
  116. package/build/LayerApp/LayerApp.js +113 -0
  117. package/build/LayerApp/LayerApp.test.js +56 -0
  118. package/build/LayerApp/__snapshots__/LayerApp.test.js.snap +37 -0
  119. package/build/LayerApp/index.js +18 -0
  120. package/build/LayerApp/styles.js +43 -0
  121. package/build/Modal/Modal.js +55 -37
  122. package/build/Modal/Modal.test.js +15 -12
  123. package/build/Modal/__snapshots__/Modal.test.js.snap +208 -0
  124. package/build/Modal/index.js +19 -13
  125. package/build/Modal/styles.js +43 -31
  126. package/build/NavAside/NavAside.js +24 -19
  127. package/build/NavAside/NavAside.test.js +15 -13
  128. package/build/NavAside/__snapshots__/NavAside.test.js.snap +116 -0
  129. package/build/NavAside/index.js +16 -12
  130. package/build/NavIcon/NavIcon.js +41 -20
  131. package/build/NavIcon/styles.js +6 -16
  132. package/build/NavItem/NavItem.js +29 -16
  133. package/build/NavTab/NavTab.js +38 -29
  134. package/build/NavTop/NavTop.js +20 -16
  135. package/build/OrderBy/OrderBy.js +23 -19
  136. package/build/OrderBy/OrderBy.test.js +6 -6
  137. package/build/OrderBy/__snapshots__/OrderBy.test.js.snap +54 -0
  138. package/build/Pager/Break/Break.js +1 -1
  139. package/build/Pager/Break/Break.test.js +4 -4
  140. package/build/Pager/Break/__snapshots__/Break.test.js.snap +13 -0
  141. package/build/Pager/Page/Page.js +1 -1
  142. package/build/Pager/Page/Page.test.js +5 -5
  143. package/build/Pager/Page/__snapshots__/Page.test.js.snap +27 -0
  144. package/build/Pager/Pager.js +21 -17
  145. package/build/Pager/Pager.test.js +10 -10
  146. package/build/Pager/__snapshots__/Pager.test.js.snap +50 -0
  147. package/build/Pager/styles.js +1 -1
  148. package/build/Pill/Choice/Choice.js +23 -18
  149. package/build/Pill/Choice/styles.js +8 -3
  150. package/build/Pill/Group/Group.js +7 -4
  151. package/build/Pill/Group/styles.js +7 -4
  152. package/build/Pill/Pill.js +36 -23
  153. package/build/Pill/Pill.test.js +12 -12
  154. package/build/Pill/Stack/Stack.js +10 -7
  155. package/build/Pill/Stack/styles.js +4 -1
  156. package/build/Pill/__snapshots__/Pill.test.js.snap +62 -0
  157. package/build/Pill/styles.js +6 -2
  158. package/build/Placeholder/Placeholder.js +2 -2
  159. package/build/Placeholder/Placeholder.test.js +3 -3
  160. package/build/Placeholder/__snapshots__/Placeholder.test.js.snap +130 -0
  161. package/build/Placeholder/styles.js +23 -16
  162. package/build/Provider/Provider.js +89 -0
  163. package/build/Provider/index.js +13 -0
  164. package/build/Provider/useAtomic.js +17 -0
  165. package/build/Provider/usePrevious.js +19 -0
  166. package/build/Radio/Radio.js +29 -15
  167. package/build/Radio/Radio.test.js +6 -6
  168. package/build/Radio/__snapshots__/Radio.test.js.snap +83 -0
  169. package/build/RangeCounter/RangeCounter.js +110 -0
  170. package/build/RangeCounter/RangeCounter.test.js +57 -0
  171. package/build/RangeCounter/__snapshots__/RangeCounter.test.js.snap +20 -0
  172. package/build/RangeCounter/index.js +18 -0
  173. package/build/RangeCounter/styles.js +26 -0
  174. package/build/Row/Row.js +41 -0
  175. package/build/Row/Row.test.js +40 -0
  176. package/build/Row/__snapshots__/Row.test.js.snap +22 -0
  177. package/build/Row/index.js +18 -0
  178. package/build/Row/styles.js +21 -0
  179. package/build/SightLogo/SightLogo.js +41 -0
  180. package/build/SightLogo/SightLogo.test.js +40 -0
  181. package/build/SightLogo/__snapshots__/SightLogo.test.js.snap +24 -0
  182. package/build/SightLogo/index.js +18 -0
  183. package/build/SightLogo/styles.js +28 -0
  184. package/build/SlideDown/SlideDown.js +41 -27
  185. package/build/SlideDown/SlideDown.test.js +22 -16
  186. package/build/SlideDown/__snapshots__/SlideDown.test.js.snap +42 -0
  187. package/build/SlideToggle/SlideToggle.js +31 -17
  188. package/build/SlideToggle/SlideToggle.test.js +7 -7
  189. package/build/SlideToggle/__snapshots__/SlideToggle.test.js.snap +62 -0
  190. package/build/SubHeader/SubHeader.js +113 -0
  191. package/build/SubHeader/SubHeader.test.js +81 -0
  192. package/build/SubHeader/__snapshots__/SubHeader.test.js.snap +50 -0
  193. package/build/SubHeader/index.js +18 -0
  194. package/build/SubHeader/styles.js +59 -0
  195. package/build/SwitchGroup/SwitchGroup.js +114 -0
  196. package/build/SwitchGroup/SwitchGroup.test.js +91 -0
  197. package/build/SwitchGroup/__snapshots__/SwitchGroup.test.js.snap +52 -0
  198. package/build/SwitchGroup/index.js +18 -0
  199. package/build/SwitchGroup/styles.js +58 -0
  200. package/build/Tag/Tag.js +27 -10
  201. package/build/Tag/Tag.test.js +8 -8
  202. package/build/Tag/__snapshots__/Tag.test.js.snap +137 -0
  203. package/build/Tag/styles.js +72 -27
  204. package/build/Text/Text.js +454 -122
  205. package/build/Text/Text.test.js +13 -13
  206. package/build/Text/__snapshots__/Text.test.js.snap +216 -0
  207. package/build/Text/styles.js +171 -78
  208. package/build/TextField/TextField.js +151 -92
  209. package/build/TextField/TextField.test.js +27 -19
  210. package/build/TextField/__snapshots__/TextField.test.js.snap +258 -0
  211. package/build/TextField/styles.js +74 -17
  212. package/build/Tip/Tip.js +91 -27
  213. package/build/Tip/Tip.test.js +8 -8
  214. package/build/Tip/__snapshots__/Tip.test.js.snap +49 -0
  215. package/build/Tip/styles.js +32 -12
  216. package/build/Title/Title.js +89 -0
  217. package/build/Title/Title.test.js +50 -0
  218. package/build/Title/__snapshots__/Title.test.js.snap +31 -0
  219. package/build/Title/index.js +18 -0
  220. package/build/Title/styles.js +37 -0
  221. package/build/Toaster/Toast/Toast.js +11 -11
  222. package/build/Toaster/Toaster.js +27 -23
  223. package/build/Toaster/Toaster.test.js +6 -6
  224. package/build/Toaster/__snapshots__/Toaster.test.js.snap +5 -0
  225. package/build/Tooltip/Tooltip.js +210 -0
  226. package/build/Tooltip/Tooltip.test.js +35 -0
  227. package/build/Tooltip/__snapshots__/Tooltip.test.js.snap +33 -0
  228. package/build/Tooltip/hooks.js +132 -0
  229. package/build/Tooltip/index.js +18 -0
  230. package/build/Tooltip/styles.js +44 -0
  231. package/build/TourTip/TourTip.js +152 -0
  232. package/build/TourTip/TourTip.test.js +45 -0
  233. package/build/TourTip/__snapshots__/TourTip.test.js.snap +74 -0
  234. package/build/TourTip/index.js +18 -0
  235. package/build/TourTip/styles.js +82 -0
  236. package/build/Visible/Visible.js +119 -0
  237. package/build/Visible/Visible.test.js +31 -0
  238. package/build/Visible/__snapshots__/Visible.test.js.snap +3 -0
  239. package/build/Visible/index.js +13 -0
  240. package/build/WindowSize/WindowSize.js +17 -11
  241. package/build/WindowSize/WindowSize.test.js +4 -4
  242. package/build/WindowSize/__snapshots__/WindowSize.test.js.snap +3 -0
  243. package/build/index.js +82 -8
  244. package/build/plugin/babel.js +61 -0
  245. package/build/subatomic/colors.js +8 -3
  246. package/build/subatomic/fonts.js +1 -1
  247. package/build/subatomic/icons/attachment.js +23 -0
  248. package/build/subatomic/icons/attachmentSolid.js +23 -0
  249. package/build/subatomic/icons/avatarSmile.js +23 -0
  250. package/build/subatomic/icons/book.js +23 -0
  251. package/build/subatomic/icons/cash.js +23 -0
  252. package/build/subatomic/icons/copy.js +23 -0
  253. package/build/subatomic/icons/copySolid.js +23 -0
  254. package/build/subatomic/icons/crossSolid.js +23 -0
  255. package/build/subatomic/icons/dislike.js +1 -1
  256. package/build/subatomic/icons/dislikeSolid.js +23 -0
  257. package/build/subatomic/icons/energy.js +23 -0
  258. package/build/subatomic/icons/energySolid.js +23 -0
  259. package/build/subatomic/icons/eye.js +1 -1
  260. package/build/subatomic/icons/eyeClosed.js +1 -1
  261. package/build/subatomic/icons/eyeClosedSolid.js +23 -0
  262. package/build/subatomic/icons/eyeSolid.js +23 -0
  263. package/build/subatomic/icons/hourGlass.js +23 -0
  264. package/build/subatomic/icons/like.js +1 -1
  265. package/build/subatomic/icons/likeSolid.js +23 -0
  266. package/build/subatomic/icons/location.js +23 -0
  267. package/build/subatomic/icons/locationSolid.js +23 -0
  268. package/build/subatomic/icons/matchJob.js +23 -0
  269. package/build/subatomic/icons/messages.js +1 -1
  270. package/build/subatomic/icons/messagesSolid.js +1 -1
  271. package/build/subatomic/icons/moreOptionsHorizontal.js +23 -0
  272. package/build/subatomic/icons/noMessages.js +23 -0
  273. package/build/subatomic/icons/noMessagesSolid.js +23 -0
  274. package/build/subatomic/icons/occDart.js +25 -8
  275. package/build/subatomic/icons/occHorizontal.js +25 -8
  276. package/build/subatomic/icons/occLogo.js +65 -0
  277. package/build/subatomic/icons/occVertical.js +25 -8
  278. package/build/subatomic/icons/profile.js +23 -0
  279. package/build/subatomic/icons/profileSolid.js +23 -0
  280. package/build/subatomic/icons/profileView.js +23 -0
  281. package/build/subatomic/icons/refresh.js +23 -0
  282. package/build/subatomic/icons/refreshSolid.js +23 -0
  283. package/build/subatomic/icons/sendMessage.js +23 -0
  284. package/build/subatomic/icons/sendMessageSolid.js +23 -0
  285. package/build/subatomic/icons/starsSolid.js +23 -0
  286. package/build/subatomic/icons/suitcase.js +23 -0
  287. package/build/subatomic/icons/suitcaseSolid.js +23 -0
  288. package/build/subatomic/icons/tag.js +1 -1
  289. package/build/subatomic/icons/tagSolid.js +23 -0
  290. package/build/subatomic/icons/trash.js +1 -1
  291. package/build/subatomic/icons/trashSolid.js +1 -1
  292. package/build/subatomic/icons/warning.js +23 -0
  293. package/build/subatomic/icons/warningSolid.js +23 -0
  294. package/build/subatomic/icons/webSite.js +23 -0
  295. package/build/subatomic/icons/webSiteSolid.js +23 -0
  296. package/build/subatomic/icons.js +230 -112
  297. package/build/subatomic/mappedIcons.js +171 -0
  298. package/build/tokens/borderRadius.json +8 -0
  299. package/build/tokens/colors.json +567 -0
  300. package/build/tokens/fonts.json +231 -0
  301. package/build/tokens/index.js +47 -0
  302. package/build/tokens/shadows.json +13 -0
  303. package/build/tokens/spacing.json +16 -0
  304. package/commitlint.config.js +6 -0
  305. package/package.json +124 -111
  306. package/playroom/FrameComponent.js +31 -22
  307. package/playroom/styles.js +14 -14
  308. package/playroom.config.js +7 -7
  309. package/yarn-error.log +0 -10737
@@ -0,0 +1,116 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`ModalPortal matches the snapshot 1`] = `ShallowWrapper {}`;
4
+
5
+ exports[`NavAside matches the snapshot 1`] = `ShallowWrapper {}`;
6
+
7
+ exports[`NavAside styles matches the snapshot 1`] = `
8
+ Object {
9
+ "@global": Object {
10
+ "body": Object {
11
+ "overflow": "hidden",
12
+ },
13
+ },
14
+ "@keyframes asideShow": Object {
15
+ "from": Object {
16
+ "left": [Function],
17
+ },
18
+ "to": Object {
19
+ "left": "0px",
20
+ },
21
+ },
22
+ "@keyframes asideShowRight": Object {
23
+ "from": Object {
24
+ "right": [Function],
25
+ },
26
+ "to": Object {
27
+ "right": "0px",
28
+ },
29
+ },
30
+ "@keyframes overlayFadeIn": Object {
31
+ "from": Object {
32
+ "opacity": 0,
33
+ },
34
+ "to": Object {
35
+ "opacity": 1,
36
+ },
37
+ },
38
+ "OpenElement": Object {
39
+ "animation": "0.3s asideShow ease-out",
40
+ "left": "0px !important",
41
+ },
42
+ "OpenElementRight": Object {
43
+ "animation": "0.3s asideShowRight ease-out",
44
+ "right": "0px !important",
45
+ },
46
+ "ShowElement": Object {
47
+ "backgroundColor": "#ffffff",
48
+ "height": "100%",
49
+ "left": "-320px",
50
+ "maxWidth": "calc(100% - 32px)",
51
+ "opacity": "1 !important",
52
+ "overflow": "hidden",
53
+ "position": "fixed",
54
+ "top": "0",
55
+ "transition": "0.4s all",
56
+ "width": "320px",
57
+ },
58
+ "card": Object {
59
+ "cursor": "auto",
60
+ "height": "100%",
61
+ "overflow": "auto",
62
+ "padding": 0,
63
+ },
64
+ "closeIcon": Object {
65
+ "alignItems": "center",
66
+ "display": "flex",
67
+ "height": 32,
68
+ },
69
+ "content": Object {
70
+ "@media screen and (min-width:768px)": Object {
71
+ "padding": 32,
72
+ },
73
+ "backgroundColor": "#ffffff",
74
+ "padding": 16,
75
+ },
76
+ "customeWidth": Object {
77
+ "left": [Function],
78
+ "width": [Function],
79
+ },
80
+ "customeWidthRight": Object {
81
+ "right": [Function],
82
+ "width": [Function],
83
+ },
84
+ "overlay": Object {
85
+ "background": "rgba(0, 0, 5, 0.85)",
86
+ "cursor": "pointer",
87
+ "height": "100%",
88
+ "left": 0,
89
+ "opacity": 0,
90
+ "position": "fixed",
91
+ "top": 0,
92
+ "transition": "0.3s opacity",
93
+ "transitionDelay": "0.2s",
94
+ "width": "100%",
95
+ "zIndex": 1000,
96
+ },
97
+ "overlayShow": Object {
98
+ "animation": "0.3s overlayFadeIn linear",
99
+ "opacity": 1,
100
+ },
101
+ "showRight": Object {
102
+ "left": "auto",
103
+ "right": "-320px",
104
+ },
105
+ "top": Object {
106
+ "@media screen and (min-width:768px)": Object {
107
+ "padding": 32,
108
+ },
109
+ "backgroundColor": "#f5f5f8",
110
+ "padding": 16,
111
+ },
112
+ "topContent": Object {
113
+ "minWidth": 0,
114
+ },
115
+ }
116
+ `;
@@ -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
  });
@@ -17,8 +19,6 @@ var _styles = _interopRequireDefault(require("./styles"));
17
19
 
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
21
 
20
- 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); }
21
-
22
22
  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); }
23
23
 
24
24
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -27,29 +27,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
29
29
 
30
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
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); }
31
+
32
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
33
 
32
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
34
+ 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); }; }
35
+
36
+ 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); }
33
37
 
34
38
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
35
39
 
36
- 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); }
40
+ 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; } }
37
41
 
38
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
42
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
39
43
 
40
44
  var NavAside = (0, _reactJss["default"])(_styles["default"])(_NavAside["default"]);
41
45
 
42
- var NavAsidePortal =
43
- /*#__PURE__*/
44
- function (_React$Component) {
46
+ var NavAsidePortal = /*#__PURE__*/function (_React$Component) {
45
47
  _inherits(NavAsidePortal, _React$Component);
46
48
 
49
+ var _super = _createSuper(NavAsidePortal);
50
+
47
51
  function NavAsidePortal(props) {
48
52
  var _this;
49
53
 
50
54
  _classCallCheck(this, NavAsidePortal);
51
55
 
52
- _this = _possibleConstructorReturn(this, _getPrototypeOf(NavAsidePortal).call(this, props));
56
+ _this = _super.call(this, props);
53
57
  _this.state = {
54
58
  mount: false
55
59
  };
@@ -81,12 +85,12 @@ function (_React$Component) {
81
85
  container = _this$props.container,
82
86
  show = _this$props.show;
83
87
 
84
- var NavAsideComponent = _react["default"].createElement(NavAside, _extends({}, this.props, {
88
+ var NavAsideComponent = /*#__PURE__*/_react["default"].createElement(NavAside, _extends({}, this.props, {
85
89
  onTransitionEnd: !show && mount ? this.onTransitionEnd : null
86
90
  }));
87
91
 
88
92
  if (container) {
89
- return mount ? _reactDom["default"].createPortal(NavAsideComponent, container) : null;
93
+ return mount ? /*#__PURE__*/_reactDom["default"].createPortal(NavAsideComponent, container) : null;
90
94
  } else {
91
95
  return mount ? NavAsideComponent : null;
92
96
  }
@@ -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,9 +15,11 @@ var _Text = _interopRequireDefault(require("../Text"));
13
15
 
14
16
  var _Flexbox = _interopRequireDefault(require("../Flexbox"));
15
17
 
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
18
+ var _Icon = _interopRequireDefault(require("../Icon"));
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); }
20
+ var _colors = _interopRequireDefault(require("../subatomic/colors"));
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
23
 
20
24
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
25
 
@@ -23,25 +27,29 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
27
 
24
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
25
29
 
26
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
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); }
27
31
 
28
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
32
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
33
 
30
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
34
+ 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
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 _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); }
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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
+
40
+ 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; } }
35
41
 
36
- var NavIcon =
37
- /*#__PURE__*/
38
- function (_React$Component) {
42
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
43
+
44
+ var NavIcon = /*#__PURE__*/function (_React$Component) {
39
45
  _inherits(NavIcon, _React$Component);
40
46
 
47
+ var _super = _createSuper(NavIcon);
48
+
41
49
  function NavIcon() {
42
50
  _classCallCheck(this, NavIcon);
43
51
 
44
- return _possibleConstructorReturn(this, _getPrototypeOf(NavIcon).apply(this, arguments));
52
+ return _super.apply(this, arguments);
45
53
  }
46
54
 
47
55
  _createClass(NavIcon, [{
@@ -53,21 +61,29 @@ function (_React$Component) {
53
61
  label = _this$props.label,
54
62
  onClick = _this$props.onClick,
55
63
  direction = _this$props.direction,
56
- className = _this$props.className;
57
- return _react["default"].createElement("div", {
64
+ className = _this$props.className,
65
+ testId = _this$props.testId,
66
+ id = _this$props.id,
67
+ iconName = _this$props.iconName,
68
+ white = _this$props.white;
69
+ var iconColor = white ? _colors["default"].bgWhite : _colors["default"].grey600;
70
+ return /*#__PURE__*/_react["default"].createElement("div", {
58
71
  className: "".concat(classes.cont).concat(selected ? " ".concat(classes.selected) : '').concat(className ? " ".concat(className) : ''),
59
- onClick: onClick
60
- }, _react["default"].createElement(_Flexbox["default"], {
72
+ onClick: onClick,
73
+ "data-testid": testId,
74
+ id: id
75
+ }, /*#__PURE__*/_react["default"].createElement(_Flexbox["default"], {
61
76
  display: "flex",
62
77
  direction: direction,
63
78
  justifyContent: "center",
64
79
  alignItems: "center",
65
80
  className: classes.flex
66
- }, _react["default"].createElement("div", {
67
- className: classes.icon
68
- }), label && _react["default"].createElement(_Text["default"], {
81
+ }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
82
+ iconName: iconName,
83
+ colors: [iconColor]
84
+ }), label && /*#__PURE__*/_react["default"].createElement(_Text["default"], {
69
85
  micro: true
70
- }, _react["default"].createElement("span", {
86
+ }, /*#__PURE__*/_react["default"].createElement("span", {
71
87
  className: classes.text
72
88
  }, label))));
73
89
  }
@@ -85,7 +101,12 @@ NavIcon.propTypes = {
85
101
  width: _propTypes["default"].number,
86
102
  showBar: _propTypes["default"].bool,
87
103
  direction: _propTypes["default"].oneOf(['col', 'row']),
88
- className: _propTypes["default"].string
104
+ className: _propTypes["default"].string,
105
+
106
+ /** The testId property adds the data attribute data-testid to the main element and should be used for testing only. */
107
+ testId: _propTypes["default"].string,
108
+ id: _propTypes["default"].string,
109
+ white: _propTypes["default"].bool
89
110
  };
90
111
  var _default = NavIcon;
91
112
  exports["default"] = _default;
@@ -7,8 +7,6 @@ exports["default"] = void 0;
7
7
 
8
8
  var _spacing = _interopRequireDefault(require("../subatomic/spacing"));
9
9
 
10
- var _icons = _interopRequireDefault(require("../subatomic/icons"));
11
-
12
10
  var _colors = _interopRequireDefault(require("../subatomic/colors"));
13
11
 
14
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -22,9 +20,9 @@ var _default = {
22
20
  height: _spacing["default"].xLarge,
23
21
  cursor: 'pointer',
24
22
  position: 'relative',
25
- '&:hover $icon': {
26
- background: function background(props) {
27
- return _icons["default"].base(_icons["default"][props.iconName].icon([props.white ? _colors["default"].bgWhite : _colors["default"].grey900]));
23
+ '&:hover $svg': {
24
+ fill: function fill(props) {
25
+ return props.white ? _colors["default"].bgWhite : _colors["default"].grey900;
28
26
  },
29
27
  opacity: function opacity(props) {
30
28
  return props.white ? 0.6 : null;
@@ -53,9 +51,9 @@ var _default = {
53
51
  height: _spacing["default"].xLarge
54
52
  },
55
53
  selected: {
56
- '& $icon, &:hover $icon': {
57
- background: function background(props) {
58
- return _icons["default"].base(_icons["default"][props.iconName].icon([props.white ? _colors["default"].bgWhite : _colors["default"].prim]));
54
+ '& $svg, &:hover $svg': {
55
+ fill: function fill(props) {
56
+ return props.white ? _colors["default"].bgWhite : _colors["default"].prim;
59
57
  }
60
58
  },
61
59
  '& $text, &:hover $text': {
@@ -69,14 +67,6 @@ var _default = {
69
67
  }
70
68
  }
71
69
  },
72
- icon: {
73
- width: _spacing["default"].base,
74
- height: _spacing["default"].base,
75
- background: function background(props) {
76
- return _icons["default"].base(_icons["default"][props.iconName].icon([props.white ? _colors["default"].bgWhite : _colors["default"].grey600]));
77
- },
78
- transition: '0.3s all'
79
- },
80
70
  text: {
81
71
  color: function color(props) {
82
72
  return props.white ? _colors["default"].white : _colors["default"].inkLight;
@@ -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,8 +15,6 @@ var _Text = _interopRequireDefault(require("../Text"));
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 _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
19
 
20
20
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -23,26 +23,30 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
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
27
 
28
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
30
- 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
31
 
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); }
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); }
33
33
 
34
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
34
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
35
+
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; } }
37
+
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 is used inside the NavTab component. You can just pass a link and a text, wrap it or send a custom link component. */
37
- var NavItem =
38
- /*#__PURE__*/
39
- function (_React$Component) {
41
+ var NavItem = /*#__PURE__*/function (_React$Component) {
40
42
  _inherits(NavItem, _React$Component);
41
43
 
44
+ var _super = _createSuper(NavItem);
45
+
42
46
  function NavItem() {
43
47
  _classCallCheck(this, NavItem);
44
48
 
45
- return _possibleConstructorReturn(this, _getPrototypeOf(NavItem).apply(this, arguments));
49
+ return _super.apply(this, arguments);
46
50
  }
47
51
 
48
52
  _createClass(NavItem, [{
@@ -60,19 +64,24 @@ function (_React$Component) {
60
64
  notification = _this$props.notification,
61
65
  white = _this$props.white,
62
66
  small = _this$props.small,
63
- className = _this$props.className;
67
+ className = _this$props.className,
68
+ testId = _this$props.testId,
69
+ id = _this$props.id;
64
70
  var AnchorTag = customComponent ? customComponent : 'a';
65
- return _react["default"].createElement(AnchorTag, _extends({
71
+ return /*#__PURE__*/_react["default"].createElement(AnchorTag, _extends({
66
72
  className: "".concat(classes.link).concat(className ? " ".concat(className) : ''),
67
73
  href: !selected ? link : null,
68
74
  onClick: !selected ? onClick : null,
69
75
  target: target
70
- }, customComponent && customProps), _react["default"].createElement(_Text["default"], {
76
+ }, customComponent && customProps, {
77
+ "data-testid": testId,
78
+ id: id
79
+ }), /*#__PURE__*/_react["default"].createElement(_Text["default"], {
71
80
  tag: "span",
72
81
  white: white,
73
82
  small: small,
74
83
  className: "".concat(classes.text).concat(selected ? " ".concat(classes.selected) : '')
75
- }, children), notification && _react["default"].createElement("span", {
84
+ }, children), notification && /*#__PURE__*/_react["default"].createElement("span", {
76
85
  className: classes.notification
77
86
  }));
78
87
  }
@@ -111,7 +120,11 @@ NavItem.propTypes = {
111
120
 
112
121
  /** Custom properties to apply directly to the custom component. */
113
122
  customProps: _propTypes["default"].object,
114
- className: _propTypes["default"].string
123
+ className: _propTypes["default"].string,
124
+
125
+ /** The testId property adds the data attribute data-testid to the main element and should be used for testing only. */
126
+ testId: _propTypes["default"].string,
127
+ id: _propTypes["default"].string
115
128
  };
116
129
  var _default = NavItem;
117
130
  exports["default"] = _default;