@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
@@ -13,77 +13,109 @@ var _icons = _interopRequireDefault(require("../subatomic/icons"));
13
13
 
14
14
  var _spacing = _interopRequireDefault(require("../subatomic/spacing"));
15
15
 
16
+ var _iconSizes = _interopRequireDefault(require("../subatomic/iconSizes"));
17
+
16
18
  var _hexRgba = _interopRequireDefault(require("hex-rgba"));
17
19
 
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
21
 
20
- var info = _colors["default"].info,
22
+ var infoLight = _colors["default"].infoLight,
21
23
  infoText = _colors["default"].infoText,
22
- success = _colors["default"].success,
24
+ successLight = _colors["default"].successLight,
23
25
  successText = _colors["default"].successText,
24
- warning = _colors["default"].warning,
26
+ warningLight = _colors["default"].warningLight,
25
27
  warningText = _colors["default"].warningText,
26
- error = _colors["default"].error,
28
+ errorLight = _colors["default"].errorLight,
27
29
  errorText = _colors["default"].errorText,
28
30
  grey900 = _colors["default"].grey900,
29
31
  grey100 = _colors["default"].grey100,
30
- textLink = _colors["default"].textLink;
32
+ textLink = _colors["default"].textLink,
33
+ bgWhite = _colors["default"].bgWhite;
31
34
  var xTiny = _spacing["default"].xTiny,
32
35
  tiny = _spacing["default"].tiny,
33
36
  small = _spacing["default"].small,
34
- gutter = _spacing["default"].gutter;
35
- var iconHeight = 13;
37
+ gutter = _spacing["default"].gutter,
38
+ medium = _spacing["default"].medium;
39
+ var smallIcon = _iconSizes["default"].small;
40
+ var paddingStandardTag = [1, tiny, 3, tiny],
41
+ paddingMediumTag = [5, gutter, 7, gutter],
42
+ paddingBigTag = [tiny, small],
43
+ tagTextLineHeight = 1.5,
44
+ tagTextStandardSize = 10,
45
+ tagTextMediumSize = 16,
46
+ tagTextBigSize = 16,
47
+ bigTagHeight = 40;
36
48
  var _default = {
37
49
  tag: {
38
50
  boxSizing: 'border-box',
39
51
  lineHeight: '12px',
40
52
  textAlign: 'center',
41
53
  borderRadius: small,
42
- paddingRight: tiny,
43
- paddingLeft: tiny,
44
- height: small,
45
54
  position: 'relative',
46
55
  overflow: 'hidden',
47
- display: 'inline-block',
48
- paddingTop: 1,
49
- paddingBottom: 2
56
+ display: 'inline-block'
57
+ },
58
+ standard: {
59
+ padding: paddingStandardTag,
60
+ height: small
61
+ },
62
+ medium: {
63
+ padding: paddingMediumTag,
64
+ height: medium
65
+ },
66
+ big: {
67
+ padding: paddingBigTag,
68
+ height: bigTagHeight,
69
+ borderRadius: medium
50
70
  },
51
71
  tagText: {
52
72
  boxSizing: 'border-box',
53
73
  fontFamily: _fonts["default"].body,
54
- fontWeight: '600',
74
+ fontWeight: '400',
55
75
  fontStyle: 'normal',
56
76
  fontStretch: 'normal',
57
- lineHeight: "".concat(iconHeight, "px"),
58
77
  letterSpacing: 'normal',
59
78
  textAlign: 'center',
60
79
  position: 'relative',
61
80
  overflow: 'hidden',
62
81
  display: 'inline-block',
63
- fontSize: 10,
82
+ lineHeight: tagTextLineHeight,
64
83
  paddingRight: function paddingRight(props) {
65
84
  return props.iconName ? xTiny : 0;
66
85
  }
67
86
  },
87
+ standardTagText: {
88
+ fontSize: tagTextStandardSize
89
+ },
90
+ mediumTagText: {
91
+ fontSize: tagTextMediumSize
92
+ },
93
+ bigTagText: {
94
+ fontSize: tagTextBigSize
95
+ },
68
96
  "default": {
69
97
  color: grey900,
70
98
  background: grey100
71
99
  },
100
+ basic: {
101
+ color: grey900,
102
+ background: bgWhite
103
+ },
72
104
  info: {
73
105
  color: infoText,
74
- backgroundColor: (0, _hexRgba["default"])(info, 10)
106
+ backgroundColor: infoLight
75
107
  },
76
108
  success: {
77
109
  color: successText,
78
- background: (0, _hexRgba["default"])(success, 10)
110
+ background: successLight
79
111
  },
80
112
  warning: {
81
113
  color: warningText,
82
- background: (0, _hexRgba["default"])(warning, 10)
114
+ background: warningLight
83
115
  },
84
116
  error: {
85
117
  color: errorText,
86
- background: (0, _hexRgba["default"])(error, 10)
118
+ background: errorLight
87
119
  },
88
120
  link: {
89
121
  color: textLink,
@@ -95,27 +127,40 @@ var _default = {
95
127
  display: 'inline-block',
96
128
  marginRight: xTiny,
97
129
  content: '""',
98
- width: gutter,
99
- height: iconHeight,
100
130
  paddingBottom: 0,
101
- position: 'relative',
102
- top: 0,
103
131
  left: 0,
104
132
  backgroundRepeat: 'no-repeat'
105
133
  },
134
+ standardIcon: {
135
+ width: gutter,
136
+ height: gutter
137
+ },
138
+ mediumIcon: {
139
+ width: smallIcon,
140
+ height: smallIcon
141
+ },
142
+ bigIcon: {
143
+ width: smallIcon,
144
+ height: smallIcon
145
+ },
106
146
  defaultIcon: {
107
147
  background: function background(props) {
108
148
  return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([grey900])) : '';
109
149
  }
110
150
  },
151
+ basicIcon: {
152
+ background: function background(props) {
153
+ return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([grey900])) : '';
154
+ }
155
+ },
111
156
  infoIcon: {
112
157
  background: function background(props) {
113
- return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([info])) : '';
158
+ return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([infoText])) : '';
114
159
  }
115
160
  },
116
161
  successIcon: {
117
162
  background: function background(props) {
118
- return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([success])) : '';
163
+ return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([successText])) : '';
119
164
  }
120
165
  },
121
166
  warningIcon: {
@@ -125,7 +170,7 @@ var _default = {
125
170
  },
126
171
  errorIcon: {
127
172
  background: function background(props) {
128
- return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([error])) : '';
173
+ return props.iconName ? _icons["default"].base(_icons["default"][props.iconName].icon([errorText])) : '';
129
174
  }
130
175
  },
131
176
  linkIcon: {
@@ -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 _propTypes = _interopRequireDefault(require("prop-types"));
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
21
 
@@ -21,25 +23,29 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
21
23
 
22
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
23
25
 
24
- 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); }
25
27
 
26
- 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); }
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); }; }
29
31
 
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); }
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); }
31
33
 
32
- 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); }
33
39
 
34
- var Text =
35
- /*#__PURE__*/
36
- function (_Component) {
40
+ var Text = /*#__PURE__*/function (_Component) {
37
41
  _inherits(Text, _Component);
38
42
 
43
+ var _super = _createSuper(Text);
44
+
39
45
  function Text() {
40
46
  _classCallCheck(this, Text);
41
47
 
42
- return _possibleConstructorReturn(this, _getPrototypeOf(Text).apply(this, arguments));
48
+ return _super.apply(this, arguments);
43
49
  }
44
50
 
45
51
  _createClass(Text, [{
@@ -59,6 +65,7 @@ function (_Component) {
59
65
  headline = _this$props.headline,
60
66
  heading = _this$props.heading,
61
67
  subheading = _this$props.subheading,
68
+ extraLarge = _this$props.extraLarge,
62
69
  large = _this$props.large,
63
70
  standard = _this$props.standard,
64
71
  small = _this$props.small,
@@ -71,6 +78,8 @@ function (_Component) {
71
78
  heading: heading
72
79
  }, {
73
80
  subheading: subheading
81
+ }, {
82
+ extraLarge: extraLarge
74
83
  }, {
75
84
  large: large
76
85
  }, {
@@ -266,7 +275,8 @@ function (_Component) {
266
275
  tag = _this$props8.tag,
267
276
  className = _this$props8.className,
268
277
  style = _this$props8.style,
269
- id = _this$props8.id;
278
+ id = _this$props8.id,
279
+ testId = _this$props8.testId;
270
280
  var TextType = tag;
271
281
  var size = this.getSize();
272
282
  var color = this.getColor();
@@ -275,10 +285,11 @@ function (_Component) {
275
285
  var topSpacing = this.getTopSpacing();
276
286
  var bottomSpacing = this.getBottomSpacing();
277
287
  var strong = this.getWeight();
278
- return _react["default"].createElement(TextType, {
288
+ return /*#__PURE__*/_react["default"].createElement(TextType, {
279
289
  className: "".concat(classes.text, " ").concat(size, " ").concat(color ? color : emphasis).concat(topSpacing).concat(bottomSpacing).concat(align ? " ".concat(align) : '').concat(strong ? " ".concat(strong) : '').concat(className ? " ".concat(className) : ''),
280
290
  style: style,
281
- id: id
291
+ id: id,
292
+ "data-testid": testId
282
293
  }, children);
283
294
  }
284
295
  }]);
@@ -302,6 +313,9 @@ Text.propTypes = {
302
313
  /** Subheading size style. */
303
314
  subheading: _propTypes["default"].bool,
304
315
 
316
+ /** Extra-large size style. */
317
+ extraLarge: _propTypes["default"].bool,
318
+
305
319
  /** Large size style. */
306
320
  large: _propTypes["default"].bool,
307
321
 
@@ -405,7 +419,8 @@ Text.propTypes = {
405
419
  tag: _propTypes["default"].string.isRequired,
406
420
  className: _propTypes["default"].string,
407
421
  style: _propTypes["default"].object,
408
- id: _propTypes["default"].string
422
+ id: _propTypes["default"].string,
423
+ testId: _propTypes["default"].string
409
424
  };
410
425
  Text.defaultProps = {
411
426
  tag: 'p'
@@ -21,40 +21,40 @@ var reduceClasses = function reduceClasses(prev, curr) {
21
21
  var classes = Object.keys(_styles["default"]).reduce(reduceClasses, {});
22
22
  describe("Text", function () {
23
23
  it('matches the snapshot', function () {
24
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Text["default"], {
24
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Text["default"], {
25
25
  classes: classes
26
26
  }, "Text"));
27
27
  expect(wrapper).toMatchSnapshot();
28
28
  });
29
29
  it('has the correct size style', function () {
30
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Text["default"], {
30
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Text["default"], {
31
31
  hero: true,
32
32
  classes: classes
33
33
  }, "Text"));
34
34
  expect(wrapper.find('.hero').length).toBe(1);
35
35
  });
36
36
  it('has a default color style', function () {
37
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Text["default"], {
37
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Text["default"], {
38
38
  classes: classes
39
39
  }, "Text"));
40
40
  expect(wrapper.find('.highEmphasis').length).toBe(1);
41
41
  });
42
42
  it('has the correct color style', function () {
43
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Text["default"], {
43
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Text["default"], {
44
44
  primary: true,
45
45
  classes: classes
46
46
  }, "Text"));
47
47
  expect(wrapper.find('.primary').length).toBe(1);
48
48
  });
49
49
  it('has the correct align style', function () {
50
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Text["default"], {
50
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Text["default"], {
51
51
  center: true,
52
52
  classes: classes
53
53
  }, "Text"));
54
54
  expect(wrapper.find('.center').length).toBe(1);
55
55
  });
56
56
  it('has the correct spacing style', function () {
57
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Text["default"], {
57
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Text["default"], {
58
58
  topTiny: true,
59
59
  bottomLarge: true,
60
60
  classes: classes
@@ -63,7 +63,7 @@ describe("Text", function () {
63
63
  expect(wrapper.find('.bottomLarge').length).toBe(1);
64
64
  });
65
65
  it('has the correct html tag', function () {
66
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_Text["default"], {
66
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_Text["default"], {
67
67
  tag: "h3",
68
68
  classes: classes
69
69
  }, "Text"));
@@ -72,7 +72,7 @@ describe("Text", function () {
72
72
  });
73
73
  describe("TextJSS", function () {
74
74
  it('matches the snapshot', function () {
75
- var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_index["default"], null, "Text"));
75
+ var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_index["default"], null, "Text"));
76
76
  expect(wrapper).toMatchSnapshot();
77
77
  });
78
78
  });
@@ -0,0 +1,158 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Text matches the snapshot 1`] = `ShallowWrapper {}`;
4
+
5
+ exports[`Text styles matches the snapshot 1`] = `
6
+ Object {
7
+ "bottomBase": Object {
8
+ "marginBottom": 24,
9
+ },
10
+ "bottomLarge": Object {
11
+ "marginBottom": 48,
12
+ },
13
+ "bottomMedium": Object {
14
+ "marginBottom": 32,
15
+ },
16
+ "bottomSmall": Object {
17
+ "marginBottom": 16,
18
+ },
19
+ "bottomTiny": Object {
20
+ "marginBottom": 8,
21
+ },
22
+ "bottomXLarge": Object {
23
+ "marginBottom": 64,
24
+ },
25
+ "bottomXTiny": Object {
26
+ "marginBottom": 4,
27
+ },
28
+ "center": Object {
29
+ "textAlign": "center",
30
+ },
31
+ "disabled": Object {
32
+ "color": "#dddddd",
33
+ },
34
+ "error": Object {
35
+ "color": "#db3737",
36
+ },
37
+ "extraLarge": Object {
38
+ "fontSize": 20,
39
+ "lineHeight": 1.5,
40
+ },
41
+ "heading": Object {
42
+ "fontSize": 24,
43
+ "fontWeight": 400,
44
+ "lineHeight": 1.1,
45
+ },
46
+ "headline": Object {
47
+ "@media screen and (min-width:768px)": Object {
48
+ "fontSize": 40,
49
+ },
50
+ "fontSize": 28,
51
+ "fontWeight": 400,
52
+ "lineHeight": 1.1,
53
+ },
54
+ "hero": Object {
55
+ "@media screen and (min-width:768px)": Object {
56
+ "fontSize": 48,
57
+ "letterSpacing": -0.96,
58
+ },
59
+ "fontSize": 32,
60
+ "fontWeight": 400,
61
+ "letterSpacing": -0.64,
62
+ "lineHeight": 1.1,
63
+ },
64
+ "highEmphasis": Object {
65
+ "color": "#222222",
66
+ },
67
+ "info": Object {
68
+ "color": "#5736ab",
69
+ },
70
+ "large": Object {
71
+ "fontSize": 18,
72
+ "lineHeight": 1.5,
73
+ },
74
+ "left": Object {
75
+ "textAlign": "left",
76
+ },
77
+ "link": Object {
78
+ "color": "#0946CB",
79
+ },
80
+ "lowEmphasis": Object {
81
+ "color": "#aaaaaa",
82
+ },
83
+ "micro": Object {
84
+ "fontSize": 12,
85
+ "lineHeight": 1.5,
86
+ },
87
+ "midEmphasis": Object {
88
+ "color": "#777777",
89
+ },
90
+ "primary": Object {
91
+ "color": "#083cae",
92
+ },
93
+ "right": Object {
94
+ "textAlign": "right",
95
+ },
96
+ "secondary": Object {
97
+ "color": "#f13465",
98
+ },
99
+ "small": Object {
100
+ "fontSize": 14,
101
+ "lineHeight": 1.5,
102
+ },
103
+ "standard": Object {
104
+ "fontSize": 16,
105
+ "lineHeight": 1.5,
106
+ },
107
+ "strong": Object {
108
+ "fontWeight": 400,
109
+ },
110
+ "subheading": Object {
111
+ "fontSize": 18,
112
+ "fontWeight": 400,
113
+ "lineHeight": 1.1,
114
+ },
115
+ "success": Object {
116
+ "color": "#009537",
117
+ },
118
+ "text": Object {
119
+ "fontFamily": "'OccText', sans-serif",
120
+ "fontStyle": "normal",
121
+ "fontWeight": 300,
122
+ "letterSpacing": 0,
123
+ "margin": 0,
124
+ },
125
+ "titleCase": Object {
126
+ "textTransform": "capitalize",
127
+ },
128
+ "topBase": Object {
129
+ "marginTop": 24,
130
+ },
131
+ "topLarge": Object {
132
+ "marginTop": 48,
133
+ },
134
+ "topMedium": Object {
135
+ "marginTop": 32,
136
+ },
137
+ "topSmall": Object {
138
+ "marginTop": 16,
139
+ },
140
+ "topTiny": Object {
141
+ "marginTop": 8,
142
+ },
143
+ "topXLarge": Object {
144
+ "marginTop": 64,
145
+ },
146
+ "topXTiny": Object {
147
+ "marginTop": 4,
148
+ },
149
+ "warning": Object {
150
+ "color": "#e69000",
151
+ },
152
+ "white": Object {
153
+ "color": "#ffffff",
154
+ },
155
+ }
156
+ `;
157
+
158
+ exports[`TextJSS matches the snapshot 1`] = `ShallowWrapper {}`;
@@ -21,54 +21,60 @@ var _default = {
21
21
  text: {
22
22
  letterSpacing: 0,
23
23
  fontFamily: _fonts["default"].body,
24
- fontWeight: 400,
24
+ fontWeight: 300,
25
25
  fontStyle: 'normal',
26
26
  margin: 0
27
27
  },
28
28
  // Sizes
29
29
  hero: _defineProperty({
30
- fontSize: 28,
31
- lineHeight: '32px'
30
+ fontSize: 32,
31
+ lineHeight: 1.1,
32
+ fontWeight: 400,
33
+ letterSpacing: -0.64
32
34
  }, "@media screen and (min-width:".concat(_grid["default"].sm, "px)"), {
33
- fontSize: 57,
34
- lineHeight: '72px'
35
+ fontSize: 48,
36
+ letterSpacing: -0.96
35
37
  }),
36
38
  headline: _defineProperty({
37
39
  fontSize: 28,
38
- lineHeight: '32px'
40
+ lineHeight: 1.1,
41
+ fontWeight: 400
39
42
  }, "@media screen and (min-width:".concat(_grid["default"].sm, "px)"), {
40
- fontSize: 36,
41
- lineHeight: '48px'
43
+ fontSize: 40
42
44
  }),
43
45
  heading: {
44
- fontSize: 22,
45
- lineHeight: '32px',
46
- fontWeight: 600
46
+ fontSize: 24,
47
+ lineHeight: 1.1,
48
+ fontWeight: 400
47
49
  },
48
50
  subheading: {
49
- fontSize: 16,
50
- lineHeight: '24px',
51
- fontWeight: 600
51
+ fontSize: 18,
52
+ lineHeight: 1.1,
53
+ fontWeight: 400
54
+ },
55
+ extraLarge: {
56
+ fontSize: 20,
57
+ lineHeight: 1.5
52
58
  },
53
59
  large: {
54
- fontSize: 16,
55
- lineHeight: '24px'
60
+ fontSize: 18,
61
+ lineHeight: 1.5
56
62
  },
57
63
  standard: {
58
- fontSize: 14,
59
- lineHeight: '24px'
64
+ fontSize: 16,
65
+ lineHeight: 1.5
60
66
  },
61
67
  small: {
62
- fontSize: 12,
63
- lineHeight: '16px'
68
+ fontSize: 14,
69
+ lineHeight: 1.5
64
70
  },
65
71
  micro: {
66
- fontSize: 10,
67
- lineHeight: '16px'
72
+ fontSize: 12,
73
+ lineHeight: 1.5
68
74
  },
69
75
  // Weight
70
76
  strong: {
71
- fontWeight: 600
77
+ fontWeight: 400
72
78
  },
73
79
  // Colors
74
80
  primary: {
@@ -160,6 +166,9 @@ var _default = {
160
166
  },
161
167
  bottomXLarge: {
162
168
  marginBottom: _spacing["default"].xLarge
169
+ },
170
+ titleCase: {
171
+ textTransform: 'capitalize'
163
172
  }
164
173
  };
165
174
  exports["default"] = _default;