@veracity/vui 1.9.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/dist/cjs/avatar/avatar.js +1 -1
  2. package/dist/cjs/badge/badge.d.ts +9 -0
  3. package/dist/cjs/badge/badge.d.ts.map +1 -0
  4. package/dist/cjs/badge/badge.js +35 -0
  5. package/dist/cjs/badge/badge.types.d.ts +17 -0
  6. package/dist/cjs/badge/badge.types.d.ts.map +1 -0
  7. package/dist/cjs/badge/badge.types.js +2 -0
  8. package/dist/cjs/badge/index.d.ts +3 -0
  9. package/dist/cjs/badge/index.d.ts.map +1 -0
  10. package/dist/cjs/badge/index.js +23 -0
  11. package/dist/cjs/badge/theme.d.ts +130 -0
  12. package/dist/cjs/badge/theme.d.ts.map +1 -0
  13. package/dist/cjs/badge/theme.js +135 -0
  14. package/dist/cjs/button/button.d.ts +1 -1
  15. package/dist/cjs/button/button.d.ts.map +1 -1
  16. package/dist/cjs/button/button.js +16 -23
  17. package/dist/cjs/button/button.types.d.ts +3 -4
  18. package/dist/cjs/button/button.types.d.ts.map +1 -1
  19. package/dist/cjs/button/buttons.js +8 -8
  20. package/dist/cjs/button/consts.js +3 -3
  21. package/dist/cjs/button/theme.d.ts +204 -44
  22. package/dist/cjs/button/theme.d.ts.map +1 -1
  23. package/dist/cjs/button/theme.js +220 -54
  24. package/dist/cjs/buttonGroup/buttonGroup.d.ts.map +1 -1
  25. package/dist/cjs/buttonGroup/buttonGroup.js +5 -5
  26. package/dist/cjs/buttonGroup/buttonGroup.types.d.ts +2 -3
  27. package/dist/cjs/buttonGroup/buttonGroup.types.d.ts.map +1 -1
  28. package/dist/cjs/buttonGroup/helpers.d.ts.map +1 -1
  29. package/dist/cjs/buttonGroup/helpers.js +2 -3
  30. package/dist/cjs/buttonToggleGroup/buttonToggleGroup.d.ts.map +1 -1
  31. package/dist/cjs/buttonToggleGroup/buttonToggleGroup.js +1 -1
  32. package/dist/cjs/checkbox/checkbox.js +1 -1
  33. package/dist/cjs/copyToClipboard/copyToClipboard.js +1 -1
  34. package/dist/cjs/core/vuiProvider/globalStyle.d.ts.map +1 -1
  35. package/dist/cjs/core/vuiProvider/globalStyle.js +55 -38
  36. package/dist/cjs/footer/footerTrademark.js +1 -1
  37. package/dist/cjs/heading/heading.d.ts.map +1 -1
  38. package/dist/cjs/heading/heading.js +7 -1
  39. package/dist/cjs/heading/heading.types.d.ts +1 -0
  40. package/dist/cjs/heading/heading.types.d.ts.map +1 -1
  41. package/dist/cjs/heading/theme.d.ts +67 -9
  42. package/dist/cjs/heading/theme.d.ts.map +1 -1
  43. package/dist/cjs/heading/theme.js +69 -11
  44. package/dist/cjs/icon/icon.types.d.ts +1 -1
  45. package/dist/cjs/icon/icon.types.d.ts.map +1 -1
  46. package/dist/cjs/icon/theme.d.ts +5 -0
  47. package/dist/cjs/icon/theme.d.ts.map +1 -1
  48. package/dist/cjs/icon/theme.js +5 -0
  49. package/dist/cjs/index.d.ts +1 -0
  50. package/dist/cjs/index.d.ts.map +1 -1
  51. package/dist/cjs/index.js +1 -0
  52. package/dist/cjs/input/input.js +1 -1
  53. package/dist/cjs/input/inputInput.js +1 -1
  54. package/dist/cjs/link/link.d.ts.map +1 -1
  55. package/dist/cjs/link/link.js +3 -3
  56. package/dist/cjs/link/link.types.d.ts +1 -1
  57. package/dist/cjs/link/link.types.d.ts.map +1 -1
  58. package/dist/cjs/link/theme.d.ts +21 -4
  59. package/dist/cjs/link/theme.d.ts.map +1 -1
  60. package/dist/cjs/link/theme.js +30 -17
  61. package/dist/cjs/list/listItem.d.ts.map +1 -1
  62. package/dist/cjs/list/listItem.js +6 -2
  63. package/dist/cjs/notification/consts.js +10 -10
  64. package/dist/cjs/notification/notification.d.ts.map +1 -1
  65. package/dist/cjs/notification/notification.js +10 -8
  66. package/dist/cjs/notification/notification.types.d.ts +2 -2
  67. package/dist/cjs/notification/notification.types.d.ts.map +1 -1
  68. package/dist/cjs/notification/notificationButton.d.ts.map +1 -1
  69. package/dist/cjs/notification/notificationButton.js +5 -1
  70. package/dist/cjs/notification/notificationIcon.d.ts.map +1 -1
  71. package/dist/cjs/notification/notificationIcon.js +3 -2
  72. package/dist/cjs/notification/notificationText.d.ts.map +1 -1
  73. package/dist/cjs/notification/notificationText.js +1 -1
  74. package/dist/cjs/notification/notificationTitle.d.ts +2 -2
  75. package/dist/cjs/notification/notificationTitle.d.ts.map +1 -1
  76. package/dist/cjs/notification/notificationTitle.js +2 -2
  77. package/dist/cjs/notification/theme.d.ts +31 -16
  78. package/dist/cjs/notification/theme.d.ts.map +1 -1
  79. package/dist/cjs/notification/theme.js +32 -26
  80. package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.d.ts +85 -0
  81. package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.d.ts.map +1 -0
  82. package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.js +88 -0
  83. package/dist/cjs/p/theme.d.ts +0 -8
  84. package/dist/cjs/p/theme.d.ts.map +1 -1
  85. package/dist/cjs/p/theme.js +3 -11
  86. package/dist/cjs/progress/progress.js +1 -1
  87. package/dist/cjs/select/selectButton.js +1 -1
  88. package/dist/cjs/sidemenu/sidemenu.js +1 -1
  89. package/dist/cjs/sidemenu/sidemenuItem.js +2 -2
  90. package/dist/cjs/t/theme.d.ts +10 -1
  91. package/dist/cjs/t/theme.d.ts.map +1 -1
  92. package/dist/cjs/t/theme.js +10 -1
  93. package/dist/cjs/table/tbody.d.ts.map +1 -1
  94. package/dist/cjs/table/tbody.js +4 -0
  95. package/dist/cjs/table/theme.d.ts +5 -0
  96. package/dist/cjs/table/theme.d.ts.map +1 -1
  97. package/dist/cjs/table/theme.js +6 -1
  98. package/dist/cjs/tabs/tabs.types.d.ts +2 -2
  99. package/dist/cjs/tabs/tabs.types.d.ts.map +1 -1
  100. package/dist/cjs/tabs/tabsNavBar.d.ts.map +1 -1
  101. package/dist/cjs/tabs/tabsNavBar.js +13 -5
  102. package/dist/cjs/tabs/theme.d.ts +40 -4
  103. package/dist/cjs/tabs/theme.d.ts.map +1 -1
  104. package/dist/cjs/tabs/theme.js +41 -4
  105. package/dist/cjs/tag/tag.js +9 -6
  106. package/dist/cjs/tag/tag.types.d.ts +4 -3
  107. package/dist/cjs/tag/tag.types.d.ts.map +1 -1
  108. package/dist/cjs/tag/tagButton.d.ts.map +1 -1
  109. package/dist/cjs/tag/tagButton.js +1 -1
  110. package/dist/cjs/tag/theme.d.ts +178 -32
  111. package/dist/cjs/tag/theme.d.ts.map +1 -1
  112. package/dist/cjs/tag/theme.js +182 -65
  113. package/dist/cjs/textarea/textarea.js +1 -1
  114. package/dist/cjs/theme/components.d.ts +624 -47
  115. package/dist/cjs/theme/components.d.ts.map +1 -1
  116. package/dist/cjs/theme/components.js +76 -74
  117. package/dist/cjs/theme/defaultTheme.d.ts +916 -48
  118. package/dist/cjs/theme/defaultTheme.d.ts.map +1 -1
  119. package/dist/cjs/theme/foundations/colors.d.ts +523 -0
  120. package/dist/cjs/theme/foundations/colors.d.ts.map +1 -1
  121. package/dist/cjs/theme/foundations/colors.js +389 -1
  122. package/dist/cjs/theme/foundations/fontWeights.d.ts +0 -1
  123. package/dist/cjs/theme/foundations/fontWeights.d.ts.map +1 -1
  124. package/dist/cjs/theme/foundations/fontWeights.js +1 -2
  125. package/dist/cjs/theme/foundations/index.d.ts +292 -1
  126. package/dist/cjs/theme/foundations/index.d.ts.map +1 -1
  127. package/dist/cjs/theme/foundations/radii.d.ts +5 -0
  128. package/dist/cjs/theme/foundations/radii.d.ts.map +1 -1
  129. package/dist/cjs/theme/foundations/radii.js +8 -3
  130. package/dist/cjs/toast/useToast.d.ts.map +1 -1
  131. package/dist/cjs/toast/useToast.js +1 -1
  132. package/dist/cjs/tutorial/tutorialCard.d.ts.map +1 -1
  133. package/dist/cjs/tutorial/tutorialCard.js +3 -3
  134. package/dist/esm/avatar/avatar.js +1 -1
  135. package/dist/esm/badge/badge.d.ts +9 -0
  136. package/dist/esm/badge/badge.d.ts.map +1 -0
  137. package/dist/esm/badge/badge.js +17 -0
  138. package/dist/esm/badge/badge.types.d.ts +17 -0
  139. package/dist/esm/badge/badge.types.d.ts.map +1 -0
  140. package/dist/esm/badge/badge.types.js +1 -0
  141. package/dist/esm/badge/index.d.ts +3 -0
  142. package/dist/esm/badge/index.d.ts.map +1 -0
  143. package/dist/esm/badge/index.js +2 -0
  144. package/dist/esm/badge/theme.d.ts +130 -0
  145. package/dist/esm/badge/theme.d.ts.map +1 -0
  146. package/dist/esm/badge/theme.js +133 -0
  147. package/dist/esm/button/button.d.ts +1 -1
  148. package/dist/esm/button/button.d.ts.map +1 -1
  149. package/dist/esm/button/button.js +16 -23
  150. package/dist/esm/button/button.types.d.ts +3 -4
  151. package/dist/esm/button/button.types.d.ts.map +1 -1
  152. package/dist/esm/button/buttons.js +8 -8
  153. package/dist/esm/button/consts.js +3 -3
  154. package/dist/esm/button/theme.d.ts +204 -44
  155. package/dist/esm/button/theme.d.ts.map +1 -1
  156. package/dist/esm/button/theme.js +220 -58
  157. package/dist/esm/buttonGroup/buttonGroup.d.ts.map +1 -1
  158. package/dist/esm/buttonGroup/buttonGroup.js +6 -6
  159. package/dist/esm/buttonGroup/buttonGroup.types.d.ts +2 -3
  160. package/dist/esm/buttonGroup/buttonGroup.types.d.ts.map +1 -1
  161. package/dist/esm/buttonGroup/helpers.d.ts.map +1 -1
  162. package/dist/esm/buttonGroup/helpers.js +2 -3
  163. package/dist/esm/buttonToggleGroup/buttonToggleGroup.d.ts.map +1 -1
  164. package/dist/esm/buttonToggleGroup/buttonToggleGroup.js +1 -1
  165. package/dist/esm/checkbox/checkbox.js +1 -1
  166. package/dist/esm/copyToClipboard/copyToClipboard.js +1 -1
  167. package/dist/esm/core/vuiProvider/globalStyle.d.ts.map +1 -1
  168. package/dist/esm/core/vuiProvider/globalStyle.js +55 -38
  169. package/dist/esm/footer/footerTrademark.js +1 -1
  170. package/dist/esm/heading/heading.d.ts.map +1 -1
  171. package/dist/esm/heading/heading.js +8 -2
  172. package/dist/esm/heading/heading.types.d.ts +1 -0
  173. package/dist/esm/heading/heading.types.d.ts.map +1 -1
  174. package/dist/esm/heading/theme.d.ts +67 -9
  175. package/dist/esm/heading/theme.d.ts.map +1 -1
  176. package/dist/esm/heading/theme.js +69 -11
  177. package/dist/esm/icon/icon.types.d.ts +1 -1
  178. package/dist/esm/icon/icon.types.d.ts.map +1 -1
  179. package/dist/esm/icon/theme.d.ts +5 -0
  180. package/dist/esm/icon/theme.d.ts.map +1 -1
  181. package/dist/esm/icon/theme.js +5 -0
  182. package/dist/esm/index.d.ts +1 -0
  183. package/dist/esm/index.d.ts.map +1 -1
  184. package/dist/esm/index.js +1 -0
  185. package/dist/esm/input/input.js +1 -1
  186. package/dist/esm/input/inputInput.js +1 -1
  187. package/dist/esm/link/link.d.ts.map +1 -1
  188. package/dist/esm/link/link.js +3 -3
  189. package/dist/esm/link/link.types.d.ts +1 -1
  190. package/dist/esm/link/link.types.d.ts.map +1 -1
  191. package/dist/esm/link/theme.d.ts +21 -4
  192. package/dist/esm/link/theme.d.ts.map +1 -1
  193. package/dist/esm/link/theme.js +30 -17
  194. package/dist/esm/list/listItem.d.ts.map +1 -1
  195. package/dist/esm/list/listItem.js +6 -2
  196. package/dist/esm/notification/consts.js +10 -10
  197. package/dist/esm/notification/notification.d.ts.map +1 -1
  198. package/dist/esm/notification/notification.js +11 -9
  199. package/dist/esm/notification/notification.types.d.ts +2 -2
  200. package/dist/esm/notification/notification.types.d.ts.map +1 -1
  201. package/dist/esm/notification/notificationButton.d.ts.map +1 -1
  202. package/dist/esm/notification/notificationButton.js +4 -1
  203. package/dist/esm/notification/notificationIcon.d.ts.map +1 -1
  204. package/dist/esm/notification/notificationIcon.js +3 -2
  205. package/dist/esm/notification/notificationText.d.ts.map +1 -1
  206. package/dist/esm/notification/notificationText.js +1 -1
  207. package/dist/esm/notification/notificationTitle.d.ts +2 -2
  208. package/dist/esm/notification/notificationTitle.d.ts.map +1 -1
  209. package/dist/esm/notification/notificationTitle.js +2 -2
  210. package/dist/esm/notification/theme.d.ts +31 -16
  211. package/dist/esm/notification/theme.d.ts.map +1 -1
  212. package/dist/esm/notification/theme.js +32 -26
  213. package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.d.ts +85 -0
  214. package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.d.ts.map +1 -0
  215. package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.js +84 -0
  216. package/dist/esm/p/theme.d.ts +0 -8
  217. package/dist/esm/p/theme.d.ts.map +1 -1
  218. package/dist/esm/p/theme.js +3 -11
  219. package/dist/esm/progress/progress.js +1 -1
  220. package/dist/esm/select/selectButton.js +1 -1
  221. package/dist/esm/sidemenu/sidemenu.js +1 -1
  222. package/dist/esm/sidemenu/sidemenuItem.js +2 -2
  223. package/dist/esm/t/theme.d.ts +10 -1
  224. package/dist/esm/t/theme.d.ts.map +1 -1
  225. package/dist/esm/t/theme.js +10 -1
  226. package/dist/esm/table/tbody.d.ts.map +1 -1
  227. package/dist/esm/table/tbody.js +4 -0
  228. package/dist/esm/table/theme.d.ts +5 -0
  229. package/dist/esm/table/theme.d.ts.map +1 -1
  230. package/dist/esm/table/theme.js +6 -1
  231. package/dist/esm/tabs/tabs.types.d.ts +2 -2
  232. package/dist/esm/tabs/tabs.types.d.ts.map +1 -1
  233. package/dist/esm/tabs/tabsNavBar.d.ts.map +1 -1
  234. package/dist/esm/tabs/tabsNavBar.js +12 -4
  235. package/dist/esm/tabs/theme.d.ts +40 -4
  236. package/dist/esm/tabs/theme.d.ts.map +1 -1
  237. package/dist/esm/tabs/theme.js +41 -4
  238. package/dist/esm/tag/tag.js +9 -6
  239. package/dist/esm/tag/tag.types.d.ts +4 -3
  240. package/dist/esm/tag/tag.types.d.ts.map +1 -1
  241. package/dist/esm/tag/tagButton.d.ts.map +1 -1
  242. package/dist/esm/tag/tagButton.js +1 -1
  243. package/dist/esm/tag/theme.d.ts +178 -32
  244. package/dist/esm/tag/theme.d.ts.map +1 -1
  245. package/dist/esm/tag/theme.js +182 -65
  246. package/dist/esm/textarea/textarea.js +1 -1
  247. package/dist/esm/theme/components.d.ts +624 -47
  248. package/dist/esm/theme/components.d.ts.map +1 -1
  249. package/dist/esm/theme/components.js +2 -0
  250. package/dist/esm/theme/defaultTheme.d.ts +916 -48
  251. package/dist/esm/theme/defaultTheme.d.ts.map +1 -1
  252. package/dist/esm/theme/foundations/colors.d.ts +523 -0
  253. package/dist/esm/theme/foundations/colors.d.ts.map +1 -1
  254. package/dist/esm/theme/foundations/colors.js +365 -0
  255. package/dist/esm/theme/foundations/fontWeights.d.ts +0 -1
  256. package/dist/esm/theme/foundations/fontWeights.d.ts.map +1 -1
  257. package/dist/esm/theme/foundations/fontWeights.js +1 -2
  258. package/dist/esm/theme/foundations/index.d.ts +292 -1
  259. package/dist/esm/theme/foundations/index.d.ts.map +1 -1
  260. package/dist/esm/theme/foundations/radii.d.ts +5 -0
  261. package/dist/esm/theme/foundations/radii.d.ts.map +1 -1
  262. package/dist/esm/theme/foundations/radii.js +8 -3
  263. package/dist/esm/toast/useToast.d.ts.map +1 -1
  264. package/dist/esm/toast/useToast.js +1 -1
  265. package/dist/esm/tutorial/tutorialCard.d.ts.map +1 -1
  266. package/dist/esm/tutorial/tutorialCard.js +3 -3
  267. package/package.json +1 -1
  268. package/src/avatar/avatar.tsx +1 -1
  269. package/src/badge/badge.tsx +36 -0
  270. package/src/badge/badge.types.ts +17 -0
  271. package/src/badge/index.ts +2 -0
  272. package/src/badge/theme.ts +140 -0
  273. package/src/button/button.tsx +19 -28
  274. package/src/button/button.types.ts +4 -8
  275. package/src/button/buttons.tsx +8 -8
  276. package/src/button/consts.ts +3 -3
  277. package/src/button/theme.ts +229 -71
  278. package/src/buttonGroup/buttonGroup.tsx +6 -9
  279. package/src/buttonGroup/buttonGroup.types.ts +2 -3
  280. package/src/buttonGroup/helpers.ts +2 -4
  281. package/src/buttonToggleGroup/buttonToggleGroup.tsx +0 -2
  282. package/src/checkbox/checkbox.tsx +1 -1
  283. package/src/copyToClipboard/copyToClipboard.tsx +1 -1
  284. package/src/core/vuiProvider/globalStyle.tsx +55 -38
  285. package/src/footer/footerTrademark.tsx +1 -1
  286. package/src/heading/heading.tsx +19 -2
  287. package/src/heading/heading.types.ts +2 -0
  288. package/src/heading/theme.ts +69 -11
  289. package/src/icon/icon.types.ts +1 -1
  290. package/src/icon/theme.ts +5 -0
  291. package/src/index.ts +1 -0
  292. package/src/input/input.tsx +1 -1
  293. package/src/input/inputInput.tsx +1 -1
  294. package/src/link/link.tsx +2 -3
  295. package/src/link/link.types.ts +1 -1
  296. package/src/link/theme.ts +30 -20
  297. package/src/list/listItem.tsx +6 -2
  298. package/src/notification/consts.ts +10 -10
  299. package/src/notification/notification.tsx +16 -11
  300. package/src/notification/notification.types.ts +2 -2
  301. package/src/notification/notificationButton.tsx +10 -5
  302. package/src/notification/notificationIcon.tsx +6 -3
  303. package/src/notification/notificationText.tsx +2 -1
  304. package/src/notification/notificationTitle.tsx +3 -9
  305. package/src/notification/theme.ts +32 -34
  306. package/src/onedesign-tokens/dist/js/es6/rem/button.js +85 -0
  307. package/src/p/theme.ts +3 -11
  308. package/src/progress/progress.tsx +1 -1
  309. package/src/select/selectButton.tsx +1 -1
  310. package/src/sidemenu/sidemenu.tsx +1 -1
  311. package/src/sidemenu/sidemenuItem.tsx +3 -3
  312. package/src/t/theme.ts +10 -1
  313. package/src/table/tbody.tsx +4 -0
  314. package/src/table/theme.ts +6 -1
  315. package/src/tabs/tabs.types.ts +2 -2
  316. package/src/tabs/tabsNavBar.tsx +23 -6
  317. package/src/tabs/theme.ts +41 -4
  318. package/src/tag/tag.tsx +11 -11
  319. package/src/tag/tag.types.ts +32 -31
  320. package/src/tag/tagButton.tsx +1 -2
  321. package/src/tag/theme.ts +183 -80
  322. package/src/textarea/textarea.tsx +1 -1
  323. package/src/theme/components.ts +2 -0
  324. package/src/theme/foundations/colors.ts +401 -0
  325. package/src/theme/foundations/fontWeights.ts +1 -2
  326. package/src/theme/foundations/radii.ts +8 -3
  327. package/src/toast/useToast.tsx +2 -1
  328. package/src/tutorial/tutorialCard.tsx +10 -3
@@ -16,63 +16,80 @@ type GlobalStyleProps = {
16
16
  * - CSS variables for each theme value
17
17
  */
18
18
  export default createGlobalStyle<GlobalStyleProps>`
19
- ${fontFaces}
19
+ ${fontFaces}
20
+ :root {
21
+ ${generateCSSVariables}
22
+ }
23
+
24
+ * {
25
+ --x-ring-color: var(--vui-colors-focusColor);
26
+ // Fixes a box-shadow issue between some parent and child components
27
+ --x-shadow: 0 0 0 0 transparent;
28
+ }
20
29
 
21
- :root {
22
- ${generateCSSVariables}
23
- }
30
+ button {
31
+ --x-ring-color: transparent;
32
+ }
24
33
 
25
- * {
26
- --x-ring-color: var(--vui-colors-blue-50);
27
- // Fixes a box-shadow issue between some parent and child components
28
- --x-shadow: 0 0 0 0 transparent;
29
- }
34
+ button:focus-visible, li:focus-visible {
35
+ --x-ring-color: var(--vui-colors-focusColor);
36
+ outline: var(--vui-colors-focusColor) solid 3px;
37
+ z-index: 1;
38
+ }
30
39
 
31
- ${p =>
40
+ ${p =>
32
41
  p.globalStyle &&
33
42
  css`
34
43
  body {
35
- color: prussian.80;
44
+ color: sandstone 0.1;
36
45
  font-family: avenir;
37
46
  font-size: md;
38
47
  }
48
+
49
+ h1,
50
+ h2,
51
+ h3,
52
+ h4,
53
+ h5 {
54
+ color: darkBlue 0.18;
55
+ }
39
56
  `}
40
57
 
41
- @keyframes vui-bounce {
42
- ${bounce}
43
- }
58
+ @keyframes vui-bounce {
59
+ ${bounce}
60
+ }
44
61
 
45
- @keyframes vui-fadeDown {
46
- ${fadeDown}
47
- }
62
+ @keyframes vui-fadeDown {
63
+ ${fadeDown}
64
+ }
48
65
 
49
- @keyframes vui-fadeIn {
50
- ${fadeIn}
51
- }
66
+ @keyframes vui-fadeIn {
67
+ ${fadeIn}
68
+ }
52
69
 
53
- @keyframes vui-fadeLeft {
54
- ${fadeLeft}
55
- }
70
+ @keyframes vui-fadeLeft {
71
+ ${fadeLeft}
72
+ }
56
73
 
57
- @keyframes vui-fadeOut {
58
- ${fadeOut}
59
- }
74
+ @keyframes vui-fadeOut {
75
+ ${fadeOut}
76
+ }
60
77
 
61
- @keyframes vui-fadeRight {
62
- ${fadeRight}
63
- }
78
+ @keyframes vui-fadeRight {
79
+ ${fadeRight}
80
+ }
64
81
 
65
- @keyframes vui-fadeUp {
66
- ${fadeUp}
67
- }
82
+ @keyframes vui-fadeUp {
83
+ ${fadeUp}
84
+ }
68
85
 
69
- @keyframes vui-pulse {
70
- ${pulse}
71
- }
86
+ @keyframes vui-pulse {
87
+ ${pulse}
88
+ }
72
89
 
73
- @keyframes vui-spin {
74
- ${spin}
75
- }
90
+ @keyframes vui-spin {
91
+ ${spin}
92
+ }
76
93
  `
77
94
 
78
95
  /** Recursively maps through all theme styles and generates a set of CSS properties. */
@@ -20,11 +20,11 @@ export const FooterTrademark = vui<'div', FooterTrademarkProps>((props, ref) =>
20
20
  <Box className={cs('vui-footerTrademark', className)} ref={ref} w="100%" wrap {...styles.trademark} {...rest}>
21
21
  <FooterColumn centerV flex={{ xs: '0 0 100%', md: '0 0 25%' }}>
22
22
  <Link
23
- colorScheme="white"
24
23
  fontWeight="demi"
25
24
  href={linkedIn ?? defaultLinkedInUrl}
26
25
  iconLeft={<Link.Icon mr={1} name="fabLinkedin" size="sm" />}
27
26
  isExternal
27
+ variant="white"
28
28
  >
29
29
  Follow us
30
30
  </Link>
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
 
3
- import { omitThemingProps, styled, useStyleConfig, vui } from '../core'
3
+ import { omitThemingProps, styled, useStyleConfig, useUp, vui } from '../core'
4
4
  import { cs, filterUndefined } from '../utils'
5
5
  import { HeadingProps } from './heading.types'
6
6
 
@@ -14,6 +14,8 @@ export const Heading = vui<'h2', HeadingProps>((props, ref) => {
14
14
  const { align, casing, children, className, decoration, text, weight, ...rest } = omitThemingProps(props)
15
15
  const styles = useStyleConfig('Heading', props)
16
16
 
17
+ const { fontSize, lineHeight, ...restStyles } = styles
18
+
17
19
  const hClassName = props.size ? `vui-${props.size}` : ''
18
20
 
19
21
  const aliasedProps = filterUndefined({
@@ -23,8 +25,23 @@ export const Heading = vui<'h2', HeadingProps>((props, ref) => {
23
25
  textTransform: casing
24
26
  })
25
27
 
28
+ const isDesktop = useUp(993)
29
+
30
+ const fontSizeDesktop = fontSize?.desktop || fontSize
31
+ const fontSizeMobile = fontSize?.mobile || fontSize
32
+ const lineHeightDesktop = lineHeight?.desktop || lineHeight
33
+ const lineHeightMobile = lineHeight?.mobile || lineHeight
34
+
26
35
  return (
27
- <HeadingBase className={cs('vui-heading', hClassName, className)} ref={ref} {...styles} {...aliasedProps} {...rest}>
36
+ <HeadingBase
37
+ className={cs('vui-heading', hClassName, className)}
38
+ fontSize={isDesktop ? fontSizeDesktop : fontSizeMobile}
39
+ lineHeight={isDesktop ? lineHeightDesktop : lineHeightMobile}
40
+ ref={ref}
41
+ {...restStyles}
42
+ {...aliasedProps}
43
+ {...rest}
44
+ >
28
45
  {children ?? text}
29
46
  </HeadingBase>
30
47
  )
@@ -16,3 +16,5 @@ export type HeadingProps = SystemProps &
16
16
  /** Alias for fontWeight prop. @deprecated */
17
17
  weight?: TypographyProps['fontWeight']
18
18
  }
19
+
20
+ export type HeadingSize = 'title' | 'lead' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'
@@ -1,39 +1,97 @@
1
- const baseStyle = {}
1
+ const baseStyle = {
2
+ color: 'darkBlue.18'
3
+ }
2
4
 
3
5
  const defaultProps = {
4
6
  size: 'h2'
5
7
  }
6
8
 
7
9
  const sizes = {
10
+ title: {
11
+ as: 'h1',
12
+ fontFamily: 'DNV Display',
13
+ fontSize: {
14
+ desktop: '64px',
15
+ mobile: '42px'
16
+ },
17
+ fontWeight: 'medium',
18
+ lineHeight: {
19
+ desktop: '74px',
20
+ mobile: '52px'
21
+ }
22
+ },
8
23
  h1: {
9
24
  as: 'h1',
10
- fontSize: '40px',
11
- lineHeight: '52px'
25
+ fontSize: {
26
+ desktop: '50px',
27
+ mobile: '36px'
28
+ },
29
+ fontWeight: 'regular',
30
+ lineHeight: {
31
+ desktop: '62px',
32
+ mobile: '48px'
33
+ }
34
+ },
35
+ lead: {
36
+ as: 'h2',
37
+ color: 'seaBlue.28',
38
+ fontSize: {
39
+ desktop: '28px',
40
+ mobile: '20px'
41
+ },
42
+ fontWeight: 'regular',
43
+ lineHeight: {
44
+ desktop: '38px',
45
+ mobile: '28px'
46
+ }
12
47
  },
13
48
  h2: {
14
49
  as: 'h2',
15
- fontSize: '32px',
16
- lineHeight: '40px'
50
+ fontSize: {
51
+ desktop: '32px',
52
+ mobile: '28px'
53
+ },
54
+ fontWeight: 'regular',
55
+ lineHeight: {
56
+ desktop: '42px',
57
+ mobile: '38px'
58
+ }
17
59
  },
18
60
  h3: {
19
61
  as: 'h3',
20
- fontSize: '24px',
62
+ fontSize: {
63
+ desktop: '24px',
64
+ mobile: '22px'
65
+ },
66
+ fontWeight: 'regular',
21
67
  lineHeight: '32px'
22
68
  },
23
69
  h4: {
24
70
  as: 'h4',
25
- fontSize: '20px',
26
- lineHeight: '28px'
71
+ fontSize: {
72
+ desktop: '20px',
73
+ mobile: '18px'
74
+ },
75
+ fontWeight: 'demi',
76
+ lineHeight: '24px'
27
77
  },
28
78
  h5: {
29
79
  as: 'h5',
30
- fontSize: '18px',
31
- lineHeight: '24px'
80
+ fontSize: {
81
+ desktop: '18px',
82
+ mobile: '16px'
83
+ },
84
+ fontWeight: 'demi',
85
+ lineHeight: {
86
+ desktop: '26px',
87
+ mobile: '22px'
88
+ }
32
89
  },
33
90
  h6: {
34
91
  as: 'h6',
35
92
  fontSize: '16px',
36
- lineHeight: '20px'
93
+ fontWeight: 'demi',
94
+ lineHeight: '22px'
37
95
  }
38
96
  }
39
97
 
@@ -20,7 +20,7 @@ export type IconProps = SvgProps &
20
20
  icon?: IconProp
21
21
  /** Name of the icon stored in Veracity CDN. */
22
22
  name?: IconProp
23
- /** Rotates the icon by given amout of degrees clockwise. */
23
+ /** Rotates the icon by given amount of degrees clockwise. */
24
24
  rotate?: number
25
25
  /** Uses a scale of 1-10 and multiply of 16px to define icon size. */
26
26
  scale?: number
package/src/icon/theme.ts CHANGED
@@ -20,6 +20,11 @@ const sizes = {
20
20
  lg: {
21
21
  height: 28,
22
22
  width: 28
23
+ },
24
+ /** the xl size is introduced for the xxl tabs; should not be listed. */
25
+ xl: {
26
+ height: 32,
27
+ width: 32
23
28
  }
24
29
  }
25
30
 
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './accordion'
2
2
  export * from './avatar'
3
+ export * from './badge'
3
4
  export * from './box'
4
5
  export * from './breadcrumbs'
5
6
  export * from './button'
@@ -14,7 +14,7 @@ import InputInput from './inputInput'
14
14
  export const InputBase = styled.divBox`
15
15
  align-items: center;
16
16
  background-color: white;
17
- border-radius: md;
17
+ border-radius: none;
18
18
  border-width: 1px;
19
19
  display: flex;
20
20
  flex-shrink: 0;
@@ -9,7 +9,7 @@ export const InputInputBase = styled.input`
9
9
  align-self: stretch;
10
10
  background-color: transparent;
11
11
  border: none;
12
- border-radius: md;
12
+ border-radius: none;
13
13
  flex: 1;
14
14
  font-size: inherit;
15
15
  min-width: 0;
package/src/link/link.tsx CHANGED
@@ -9,7 +9,7 @@ import LinkText from './linkText'
9
9
 
10
10
  export const LinkBase = styled.aBox`
11
11
  align-items: center;
12
- border-radius: sm;
12
+ border-radius: none;
13
13
  cursor: pointer;
14
14
  display: inline-flex;
15
15
  line-height: normal;
@@ -27,7 +27,6 @@ export const Link = vui<'a', LinkProps>((props, ref) => {
27
27
  const {
28
28
  children,
29
29
  className,
30
- colorScheme,
31
30
  decoration,
32
31
  hoverDecoration = 'underline',
33
32
  iconLeft,
@@ -42,7 +41,7 @@ export const Link = vui<'a', LinkProps>((props, ref) => {
42
41
  } = props
43
42
  const styles = useStyleConfig('Link', props)
44
43
 
45
- const context = useMemo(() => filterUndefined({ colorScheme, size, variant }), [colorScheme, size, variant])
44
+ const context = useMemo(() => filterUndefined({ size, variant }), [size, variant])
46
45
 
47
46
  const aliasedProps = filterUndefined({
48
47
  fontWeight: weight,
@@ -4,7 +4,7 @@ import { ThemingProps } from '../theme'
4
4
 
5
5
  export type LinkProps = SystemProps &
6
6
  ThemingProps<'Link'> & {
7
- /** Available theme colors for this component. @default blue */
7
+ /** Available theme colors for this component. @deprecated */
8
8
  colorScheme?: 'blue' | 'white'
9
9
  /** Alias for textDecoration prop. @deprecated */
10
10
  decoration?: TypographyProps['textDecoration']
package/src/link/theme.ts CHANGED
@@ -1,27 +1,25 @@
1
- import { Dict } from '../utils'
2
-
3
- function variantDefault(props: Dict) {
4
- const { colorScheme: c } = props
5
-
1
+ function variantDefault() {
6
2
  const container = {
7
- color: `${c}.80`,
8
- hoverColor: `${c}.60`
3
+ color: `seaBlue.28`,
4
+ hoverColor: `seaBlue.28`
9
5
  }
10
6
 
11
- if (c === 'white') {
12
- container.color = 'white'
13
- container.hoverColor = 'white'
7
+ return { container }
8
+ }
9
+
10
+ function variantWhite() {
11
+ const container = {
12
+ color: `white`,
13
+ hoverColor: `white`
14
14
  }
15
15
 
16
16
  return { container }
17
17
  }
18
18
 
19
- function variantLight(props: Dict) {
20
- const { colorScheme: c } = props
21
-
19
+ function variantLight() {
22
20
  const container = {
23
- color: `${c}.60`,
24
- hoverColor: `${c}.40`
21
+ color: `seaBlue.28`,
22
+ hoverColor: `seaBlue.28`
25
23
  }
26
24
 
27
25
  return { container }
@@ -36,7 +34,6 @@ const variantPlain = {
36
34
  const baseStyle = {}
37
35
 
38
36
  const defaultProps = {
39
- colorScheme: 'blue',
40
37
  size: 'md',
41
38
  variant: 'default'
42
39
  }
@@ -46,7 +43,8 @@ const parts = ['container', 'icon', 'text']
46
43
  const sizes = {
47
44
  sm: {
48
45
  container: {
49
- fontSize: 'sm'
46
+ fontSize: 'xs',
47
+ lineHeight: '16px'
50
48
  },
51
49
  icon: {
52
50
  size: 'xs'
@@ -54,7 +52,8 @@ const sizes = {
54
52
  },
55
53
  md: {
56
54
  container: {
57
- fontSize: 'md'
55
+ fontSize: 'sm',
56
+ lineHeight: '20px'
58
57
  },
59
58
  icon: {
60
59
  size: 'xs'
@@ -62,7 +61,17 @@ const sizes = {
62
61
  },
63
62
  lg: {
64
63
  container: {
65
- fontSize: 'lg'
64
+ fontSize: 'md',
65
+ lineHeight: '24px'
66
+ },
67
+ icon: {
68
+ size: 'sm'
69
+ }
70
+ },
71
+ xl: {
72
+ container: {
73
+ fontSize: 'lg',
74
+ lineHeight: '28px'
66
75
  },
67
76
  icon: {
68
77
  size: 'sm'
@@ -73,7 +82,8 @@ const sizes = {
73
82
  const variants = {
74
83
  default: variantDefault,
75
84
  light: variantLight,
76
- plain: variantPlain
85
+ plain: variantPlain,
86
+ white: variantWhite
77
87
  }
78
88
 
79
89
  export default {
@@ -29,11 +29,15 @@ export const ListItemBase = styled.liBox`
29
29
  transition-duration: fast;
30
30
 
31
31
  &[aria-disabled='true'] {
32
- background-color: disabled.bg;
33
- color: disabled.color;
32
+ background-color: disabled .bg;
33
+ color: disabled .color;
34
34
  cursor: not-allowed;
35
35
  user-select: none;
36
36
  }
37
+
38
+ &:focus-visible {
39
+ z-index: 1;
40
+ }
37
41
  `
38
42
 
39
43
  /**
@@ -2,35 +2,35 @@ import { NotificationStatusMapping } from './notification.types'
2
2
 
3
3
  export const notificationStatusMapping: NotificationStatusMapping = {
4
4
  error: {
5
- colorScheme: 'red',
6
5
  iconProps: {
7
6
  name: 'falTimesCircle'
8
- }
7
+ },
8
+ variant: 'subtleRed'
9
9
  },
10
10
  info: {
11
- colorScheme: 'blue',
12
11
  iconProps: {
13
12
  name: 'falInfoCircle'
14
- }
13
+ },
14
+ variant: 'subtleBlue'
15
15
  },
16
16
  loading: {
17
- colorScheme: 'blue',
18
17
  iconProps: {
19
18
  animation: 'vui-spin 0.6s linear infinite',
20
19
  name: 'fadSpinnerThird',
21
20
  pathFill: ['blue.40', 'blue.60']
22
- }
21
+ },
22
+ variant: 'subtleBlue'
23
23
  },
24
24
  success: {
25
- colorScheme: 'green',
26
25
  iconProps: {
27
26
  name: 'falCheckCircle'
28
- }
27
+ },
28
+ variant: 'subtleGreen'
29
29
  },
30
30
  warning: {
31
- colorScheme: 'yellow',
32
31
  iconProps: {
33
32
  name: 'falExclamationCircle'
34
- }
33
+ },
34
+ variant: 'subtleYellow'
35
35
  }
36
36
  }
@@ -20,7 +20,6 @@ export const Notification = vui<'div', NotificationProps>((props, ref) => {
20
20
  action,
21
21
  children,
22
22
  className,
23
- colorScheme: colorSchemeProp = 'blue',
24
23
  icon,
25
24
  onClose,
26
25
  size,
@@ -28,40 +27,46 @@ export const Notification = vui<'div', NotificationProps>((props, ref) => {
28
27
  statusMapping,
29
28
  text,
30
29
  title,
31
- variant,
30
+ variant: variantProp = 'subtleBlue',
31
+ verticalAlign,
32
32
  ...rest
33
33
  } = props
34
34
  const statuses = { ...notificationStatusMapping, ...statusMapping }
35
- const { colorScheme = colorSchemeProp } = statuses[status ?? ''] ?? {}
36
- const styles = useStyleConfig('Notification', { colorScheme, ...props })
35
+ const { variant = variantProp } = statuses[status ?? ''] ?? {}
36
+ const styles = useStyleConfig('Notification', { variant, ...props })
37
37
 
38
38
  const iconName = isString(icon) ? icon : statuses[status ?? '']?.iconProps?.name
39
39
 
40
- const context = filterUndefined<NotificationProps>({ colorScheme, size, status, variant })
40
+ const context = filterUndefined<NotificationProps>({ size, status })
41
+
42
+ const titleDisplay = action ? 'block' : 'inline-flex'
43
+
44
+ const alignSelf = verticalAlign === 'center' ? 'center' : 'flex-start'
41
45
 
42
46
  return (
43
47
  <NotificationProvider value={context}>
44
48
  <Box
45
49
  borderRadius="md"
50
+ borderWidth={1}
46
51
  className={cs('vui-notification', className)}
47
- px={1.5}
48
- py={1}
49
52
  ref={ref}
50
53
  w="fit-content"
51
54
  {...styles.container}
52
55
  {...rest}
53
56
  >
54
- {iconName ? <NotificationIcon name={iconName} /> : icon}
57
+ {iconName ? <NotificationIcon alignSelf={alignSelf} name={iconName} /> : icon}
55
58
 
56
59
  {children ?? (
57
- <NotificationText>
58
- {isReactText(title) ? <NotificationTitle text={title} /> : title} {text}
60
+ <NotificationText alignSelf={alignSelf}>
61
+ {isReactText(title) ? <NotificationTitle display={titleDisplay} text={title} /> : title} {text}
59
62
  </NotificationText>
60
63
  )}
61
64
 
62
65
  {action}
63
66
 
64
- {onClose && <NotificationButton icon="falTimes" onClick={onClose} />}
67
+ {onClose && (
68
+ <NotificationButton alignSelf={alignSelf} icon="falTimes" onClick={onClose} variant={variant} w="32px" />
69
+ )}
65
70
  </Box>
66
71
  </NotificationProvider>
67
72
  )
@@ -8,7 +8,7 @@ export type NotificationProps = Omit<BoxProps, 'size' | 'variant'> &
8
8
  ThemingProps<'Notification'> & {
9
9
  /** Socket displaying a button on the right. */
10
10
  action?: ReactNode
11
- /** Available theme colors for this component. @default blue */
11
+ /** Available theme colors for this component. @deprecated */
12
12
  colorScheme?: 'blue' | 'green' | 'red' | 'yellow'
13
13
  /** Socket displaying an icon on the left. */
14
14
  icon?: IconProp | JSX.Element
@@ -29,7 +29,7 @@ export type NotificationStatus = 'error' | 'info' | 'loading' | 'success' | 'war
29
29
  export type NotificationStatusMapping = Record<
30
30
  string,
31
31
  {
32
- colorScheme?: NotificationProps['colorScheme']
33
32
  iconProps: IconProps
33
+ variant?: NotificationProps['variant']
34
34
  }
35
35
  >
@@ -3,6 +3,7 @@ import React from 'react'
3
3
  import Button, { ButtonProps } from '../button'
4
4
  import { useStyleConfig, vui } from '../core'
5
5
  import { cs } from '../utils'
6
+ import { notificationStatusMapping } from './consts'
6
7
  import { useNotificationContext } from './context'
7
8
 
8
9
  /** Displays an action button within the Notification. */
@@ -11,16 +12,20 @@ export const NotificationButton = vui<'button', ButtonProps>((props, ref) => {
11
12
  const mergedProps = { ...useNotificationContext(), ...props }
12
13
  const styles = useStyleConfig('Notification', useNotificationContext())
13
14
 
15
+ const { status = '' } = mergedProps
16
+ const { variant } = notificationStatusMapping[status] ?? {}
17
+
14
18
  return (
15
19
  <Button
16
20
  className={cs('vui-notificationButton', className)}
17
- colorScheme={mergedProps.colorScheme}
18
- ml={1}
19
- mr={-0.5}
21
+ ml="0px"
22
+ mr="16px"
23
+ my="16px"
24
+ px="12px"
25
+ py="6px"
20
26
  ref={ref}
21
- size="sm"
22
- variant="text"
23
27
  {...styles.button}
28
+ variant={variant}
24
29
  {...rest}
25
30
  />
26
31
  )
@@ -8,18 +8,21 @@ import { useNotificationContext } from './context'
8
8
 
9
9
  /** Displays an icon based on the status within the Notification. */
10
10
  export const NotificationIcon = vui<'svg', IconProps>((props, ref) => {
11
- const { className, ...rest } = props
11
+ const { className, alignSelf, ...rest } = props
12
12
  const mergedProps = { ...useNotificationContext(), ...props }
13
13
  const styles = useStyleConfig('Notification', useNotificationContext())
14
14
 
15
15
  const { status = '' } = mergedProps
16
16
  const { iconProps } = notificationStatusMapping[status] ?? {}
17
17
 
18
+ const marginTop = alignSelf === 'center' ? '0' : '16px'
19
+
18
20
  return (
19
21
  <Icon
22
+ alignSelf={alignSelf}
20
23
  className={cs('vui-notificationIcon', className)}
21
- mr={1}
22
- my={0.5}
24
+ ml="16px"
25
+ mt={marginTop}
23
26
  ref={ref}
24
27
  size="md"
25
28
  {...styles.icon}