@veracity/vui 1.7.0-redesign.6 → 1.7.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 (317) hide show
  1. package/dist/cjs/avatar/avatar.js +1 -1
  2. package/dist/cjs/button/button.d.ts +1 -1
  3. package/dist/cjs/button/button.d.ts.map +1 -1
  4. package/dist/cjs/button/button.js +23 -16
  5. package/dist/cjs/button/button.types.d.ts +4 -3
  6. package/dist/cjs/button/button.types.d.ts.map +1 -1
  7. package/dist/cjs/button/buttons.js +8 -8
  8. package/dist/cjs/button/consts.js +3 -3
  9. package/dist/cjs/button/theme.d.ts +44 -121
  10. package/dist/cjs/button/theme.d.ts.map +1 -1
  11. package/dist/cjs/button/theme.js +54 -135
  12. package/dist/cjs/buttonGroup/buttonGroup.d.ts.map +1 -1
  13. package/dist/cjs/buttonGroup/buttonGroup.js +5 -5
  14. package/dist/cjs/buttonGroup/buttonGroup.types.d.ts +3 -2
  15. package/dist/cjs/buttonGroup/buttonGroup.types.d.ts.map +1 -1
  16. package/dist/cjs/buttonGroup/helpers.d.ts.map +1 -1
  17. package/dist/cjs/buttonGroup/helpers.js +3 -2
  18. package/dist/cjs/buttonToggleGroup/buttonToggleGroup.d.ts.map +1 -1
  19. package/dist/cjs/buttonToggleGroup/buttonToggleGroup.js +1 -1
  20. package/dist/cjs/checkbox/checkbox.js +1 -1
  21. package/dist/cjs/copyToClipboard/copyToClipboard.js +1 -1
  22. package/dist/cjs/core/vuiProvider/globalStyle.d.ts.map +1 -1
  23. package/dist/cjs/core/vuiProvider/globalStyle.js +38 -56
  24. package/dist/cjs/footer/footerTrademark.js +1 -1
  25. package/dist/cjs/heading/theme.d.ts +1 -23
  26. package/dist/cjs/heading/theme.d.ts.map +1 -1
  27. package/dist/cjs/heading/theme.js +7 -29
  28. package/dist/cjs/icon/icon.types.d.ts +1 -1
  29. package/dist/cjs/icon/icon.types.d.ts.map +1 -1
  30. package/dist/cjs/icon/theme.d.ts +0 -5
  31. package/dist/cjs/icon/theme.d.ts.map +1 -1
  32. package/dist/cjs/icon/theme.js +0 -5
  33. package/dist/cjs/index.d.ts +0 -1
  34. package/dist/cjs/index.d.ts.map +1 -1
  35. package/dist/cjs/index.js +0 -1
  36. package/dist/cjs/input/input.js +1 -1
  37. package/dist/cjs/input/inputInput.js +1 -1
  38. package/dist/cjs/link/link.d.ts.map +1 -1
  39. package/dist/cjs/link/link.js +3 -3
  40. package/dist/cjs/link/link.types.d.ts +2 -0
  41. package/dist/cjs/link/link.types.d.ts.map +1 -1
  42. package/dist/cjs/link/theme.d.ts +4 -21
  43. package/dist/cjs/link/theme.d.ts.map +1 -1
  44. package/dist/cjs/link/theme.js +17 -30
  45. package/dist/cjs/list/listItem.d.ts.map +1 -1
  46. package/dist/cjs/list/listItem.js +2 -6
  47. package/dist/cjs/notification/consts.js +10 -10
  48. package/dist/cjs/notification/notification.d.ts.map +1 -1
  49. package/dist/cjs/notification/notification.js +8 -10
  50. package/dist/cjs/notification/notification.types.d.ts +2 -2
  51. package/dist/cjs/notification/notification.types.d.ts.map +1 -1
  52. package/dist/cjs/notification/notificationButton.d.ts.map +1 -1
  53. package/dist/cjs/notification/notificationButton.js +1 -5
  54. package/dist/cjs/notification/notificationIcon.d.ts.map +1 -1
  55. package/dist/cjs/notification/notificationIcon.js +2 -3
  56. package/dist/cjs/notification/notificationText.d.ts.map +1 -1
  57. package/dist/cjs/notification/notificationText.js +1 -1
  58. package/dist/cjs/notification/notificationTitle.d.ts +2 -2
  59. package/dist/cjs/notification/notificationTitle.d.ts.map +1 -1
  60. package/dist/cjs/notification/notificationTitle.js +2 -2
  61. package/dist/cjs/notification/theme.d.ts +16 -31
  62. package/dist/cjs/notification/theme.d.ts.map +1 -1
  63. package/dist/cjs/notification/theme.js +26 -32
  64. package/dist/cjs/p/theme.d.ts +8 -0
  65. package/dist/cjs/p/theme.d.ts.map +1 -1
  66. package/dist/cjs/p/theme.js +11 -3
  67. package/dist/cjs/progress/progress.js +1 -1
  68. package/dist/cjs/select/selectButton.js +1 -1
  69. package/dist/cjs/t/theme.d.ts +1 -10
  70. package/dist/cjs/t/theme.d.ts.map +1 -1
  71. package/dist/cjs/t/theme.js +1 -10
  72. package/dist/cjs/table/tbody.d.ts.map +1 -1
  73. package/dist/cjs/table/tbody.js +0 -4
  74. package/dist/cjs/table/theme.d.ts +0 -5
  75. package/dist/cjs/table/theme.d.ts.map +1 -1
  76. package/dist/cjs/table/theme.js +1 -6
  77. package/dist/cjs/tabs/tabs.types.d.ts +2 -2
  78. package/dist/cjs/tabs/tabs.types.d.ts.map +1 -1
  79. package/dist/cjs/tabs/tabsNavBar.d.ts.map +1 -1
  80. package/dist/cjs/tabs/tabsNavBar.js +5 -13
  81. package/dist/cjs/tabs/theme.d.ts +4 -40
  82. package/dist/cjs/tabs/theme.d.ts.map +1 -1
  83. package/dist/cjs/tabs/theme.js +4 -41
  84. package/dist/cjs/tag/tag.d.ts.map +1 -1
  85. package/dist/cjs/tag/tag.js +6 -9
  86. package/dist/cjs/tag/tag.types.d.ts +2 -3
  87. package/dist/cjs/tag/tag.types.d.ts.map +1 -1
  88. package/dist/cjs/tag/tagButton.js +1 -3
  89. package/dist/cjs/tag/theme.d.ts +32 -178
  90. package/dist/cjs/tag/theme.d.ts.map +1 -1
  91. package/dist/cjs/tag/theme.js +65 -182
  92. package/dist/cjs/textarea/textarea.js +1 -1
  93. package/dist/cjs/theme/components.d.ts +39 -497
  94. package/dist/cjs/theme/components.d.ts.map +1 -1
  95. package/dist/cjs/theme/components.js +68 -70
  96. package/dist/cjs/theme/defaultTheme.d.ts +46 -795
  97. package/dist/cjs/theme/defaultTheme.d.ts.map +1 -1
  98. package/dist/cjs/theme/foundations/colors.d.ts +0 -523
  99. package/dist/cjs/theme/foundations/colors.d.ts.map +1 -1
  100. package/dist/cjs/theme/foundations/colors.js +1 -389
  101. package/dist/cjs/theme/foundations/fontWeights.d.ts +1 -0
  102. package/dist/cjs/theme/foundations/fontWeights.d.ts.map +1 -1
  103. package/dist/cjs/theme/foundations/fontWeights.js +2 -1
  104. package/dist/cjs/theme/foundations/index.d.ts +1 -292
  105. package/dist/cjs/theme/foundations/index.d.ts.map +1 -1
  106. package/dist/cjs/theme/foundations/radii.d.ts +0 -5
  107. package/dist/cjs/theme/foundations/radii.d.ts.map +1 -1
  108. package/dist/cjs/theme/foundations/radii.js +3 -8
  109. package/dist/cjs/toast/toast.d.ts +1 -1
  110. package/dist/cjs/toast/toast.js +1 -1
  111. package/dist/cjs/toast/useToast.d.ts.map +1 -1
  112. package/dist/cjs/toast/useToast.js +1 -1
  113. package/dist/cjs/tutorial/tutorialCard.d.ts.map +1 -1
  114. package/dist/cjs/tutorial/tutorialCard.js +3 -3
  115. package/dist/esm/avatar/avatar.js +1 -1
  116. package/dist/esm/button/button.d.ts +1 -1
  117. package/dist/esm/button/button.d.ts.map +1 -1
  118. package/dist/esm/button/button.js +23 -16
  119. package/dist/esm/button/button.types.d.ts +4 -3
  120. package/dist/esm/button/button.types.d.ts.map +1 -1
  121. package/dist/esm/button/buttons.js +8 -8
  122. package/dist/esm/button/consts.js +3 -3
  123. package/dist/esm/button/theme.d.ts +44 -121
  124. package/dist/esm/button/theme.d.ts.map +1 -1
  125. package/dist/esm/button/theme.js +58 -135
  126. package/dist/esm/buttonGroup/buttonGroup.d.ts.map +1 -1
  127. package/dist/esm/buttonGroup/buttonGroup.js +6 -6
  128. package/dist/esm/buttonGroup/buttonGroup.types.d.ts +3 -2
  129. package/dist/esm/buttonGroup/buttonGroup.types.d.ts.map +1 -1
  130. package/dist/esm/buttonGroup/helpers.d.ts.map +1 -1
  131. package/dist/esm/buttonGroup/helpers.js +3 -2
  132. package/dist/esm/buttonToggleGroup/buttonToggleGroup.d.ts.map +1 -1
  133. package/dist/esm/buttonToggleGroup/buttonToggleGroup.js +1 -1
  134. package/dist/esm/checkbox/checkbox.js +1 -1
  135. package/dist/esm/copyToClipboard/copyToClipboard.js +1 -1
  136. package/dist/esm/core/vuiProvider/globalStyle.d.ts.map +1 -1
  137. package/dist/esm/core/vuiProvider/globalStyle.js +38 -56
  138. package/dist/esm/footer/footerTrademark.js +1 -1
  139. package/dist/esm/heading/theme.d.ts +1 -23
  140. package/dist/esm/heading/theme.d.ts.map +1 -1
  141. package/dist/esm/heading/theme.js +7 -29
  142. package/dist/esm/icon/icon.types.d.ts +1 -1
  143. package/dist/esm/icon/icon.types.d.ts.map +1 -1
  144. package/dist/esm/icon/theme.d.ts +0 -5
  145. package/dist/esm/icon/theme.d.ts.map +1 -1
  146. package/dist/esm/icon/theme.js +0 -5
  147. package/dist/esm/index.d.ts +0 -1
  148. package/dist/esm/index.d.ts.map +1 -1
  149. package/dist/esm/index.js +0 -1
  150. package/dist/esm/input/input.js +1 -1
  151. package/dist/esm/input/inputInput.js +1 -1
  152. package/dist/esm/link/link.d.ts.map +1 -1
  153. package/dist/esm/link/link.js +3 -3
  154. package/dist/esm/link/link.types.d.ts +2 -0
  155. package/dist/esm/link/link.types.d.ts.map +1 -1
  156. package/dist/esm/link/theme.d.ts +4 -21
  157. package/dist/esm/link/theme.d.ts.map +1 -1
  158. package/dist/esm/link/theme.js +17 -30
  159. package/dist/esm/list/listItem.d.ts.map +1 -1
  160. package/dist/esm/list/listItem.js +2 -6
  161. package/dist/esm/notification/consts.js +10 -10
  162. package/dist/esm/notification/notification.d.ts.map +1 -1
  163. package/dist/esm/notification/notification.js +9 -11
  164. package/dist/esm/notification/notification.types.d.ts +2 -2
  165. package/dist/esm/notification/notification.types.d.ts.map +1 -1
  166. package/dist/esm/notification/notificationButton.d.ts.map +1 -1
  167. package/dist/esm/notification/notificationButton.js +1 -4
  168. package/dist/esm/notification/notificationIcon.d.ts.map +1 -1
  169. package/dist/esm/notification/notificationIcon.js +2 -3
  170. package/dist/esm/notification/notificationText.d.ts.map +1 -1
  171. package/dist/esm/notification/notificationText.js +1 -1
  172. package/dist/esm/notification/notificationTitle.d.ts +2 -2
  173. package/dist/esm/notification/notificationTitle.d.ts.map +1 -1
  174. package/dist/esm/notification/notificationTitle.js +2 -2
  175. package/dist/esm/notification/theme.d.ts +16 -31
  176. package/dist/esm/notification/theme.d.ts.map +1 -1
  177. package/dist/esm/notification/theme.js +26 -32
  178. package/dist/esm/p/theme.d.ts +8 -0
  179. package/dist/esm/p/theme.d.ts.map +1 -1
  180. package/dist/esm/p/theme.js +11 -3
  181. package/dist/esm/progress/progress.js +1 -1
  182. package/dist/esm/select/selectButton.js +1 -1
  183. package/dist/esm/t/theme.d.ts +1 -10
  184. package/dist/esm/t/theme.d.ts.map +1 -1
  185. package/dist/esm/t/theme.js +1 -10
  186. package/dist/esm/table/tbody.d.ts.map +1 -1
  187. package/dist/esm/table/tbody.js +0 -4
  188. package/dist/esm/table/theme.d.ts +0 -5
  189. package/dist/esm/table/theme.d.ts.map +1 -1
  190. package/dist/esm/table/theme.js +1 -6
  191. package/dist/esm/tabs/tabs.types.d.ts +2 -2
  192. package/dist/esm/tabs/tabs.types.d.ts.map +1 -1
  193. package/dist/esm/tabs/tabsNavBar.d.ts.map +1 -1
  194. package/dist/esm/tabs/tabsNavBar.js +4 -12
  195. package/dist/esm/tabs/theme.d.ts +4 -40
  196. package/dist/esm/tabs/theme.d.ts.map +1 -1
  197. package/dist/esm/tabs/theme.js +4 -41
  198. package/dist/esm/tag/tag.d.ts.map +1 -1
  199. package/dist/esm/tag/tag.js +6 -9
  200. package/dist/esm/tag/tag.types.d.ts +2 -3
  201. package/dist/esm/tag/tag.types.d.ts.map +1 -1
  202. package/dist/esm/tag/tagButton.js +1 -3
  203. package/dist/esm/tag/theme.d.ts +32 -178
  204. package/dist/esm/tag/theme.d.ts.map +1 -1
  205. package/dist/esm/tag/theme.js +65 -182
  206. package/dist/esm/textarea/textarea.js +1 -1
  207. package/dist/esm/theme/components.d.ts +39 -497
  208. package/dist/esm/theme/components.d.ts.map +1 -1
  209. package/dist/esm/theme/components.js +0 -2
  210. package/dist/esm/theme/defaultTheme.d.ts +46 -795
  211. package/dist/esm/theme/defaultTheme.d.ts.map +1 -1
  212. package/dist/esm/theme/foundations/colors.d.ts +0 -523
  213. package/dist/esm/theme/foundations/colors.d.ts.map +1 -1
  214. package/dist/esm/theme/foundations/colors.js +0 -365
  215. package/dist/esm/theme/foundations/fontWeights.d.ts +1 -0
  216. package/dist/esm/theme/foundations/fontWeights.d.ts.map +1 -1
  217. package/dist/esm/theme/foundations/fontWeights.js +2 -1
  218. package/dist/esm/theme/foundations/index.d.ts +1 -292
  219. package/dist/esm/theme/foundations/index.d.ts.map +1 -1
  220. package/dist/esm/theme/foundations/radii.d.ts +0 -5
  221. package/dist/esm/theme/foundations/radii.d.ts.map +1 -1
  222. package/dist/esm/theme/foundations/radii.js +3 -8
  223. package/dist/esm/toast/toast.d.ts +1 -1
  224. package/dist/esm/toast/toast.js +1 -1
  225. package/dist/esm/toast/useToast.d.ts.map +1 -1
  226. package/dist/esm/toast/useToast.js +1 -1
  227. package/dist/esm/tutorial/tutorialCard.d.ts.map +1 -1
  228. package/dist/esm/tutorial/tutorialCard.js +3 -3
  229. package/package.json +1 -1
  230. package/src/avatar/avatar.tsx +1 -1
  231. package/src/button/button.tsx +28 -19
  232. package/src/button/button.types.ts +8 -4
  233. package/src/button/buttons.tsx +8 -8
  234. package/src/button/consts.ts +3 -3
  235. package/src/button/theme.ts +71 -143
  236. package/src/buttonGroup/buttonGroup.tsx +9 -6
  237. package/src/buttonGroup/buttonGroup.types.ts +3 -2
  238. package/src/buttonGroup/helpers.ts +4 -2
  239. package/src/buttonToggleGroup/buttonToggleGroup.tsx +2 -0
  240. package/src/checkbox/checkbox.tsx +1 -1
  241. package/src/copyToClipboard/copyToClipboard.tsx +1 -1
  242. package/src/core/vuiProvider/globalStyle.tsx +38 -56
  243. package/src/footer/footerTrademark.tsx +1 -1
  244. package/src/heading/theme.ts +7 -29
  245. package/src/icon/icon.types.ts +1 -1
  246. package/src/icon/theme.ts +0 -5
  247. package/src/index.ts +0 -1
  248. package/src/input/input.tsx +1 -1
  249. package/src/input/inputInput.tsx +1 -1
  250. package/src/link/link.tsx +3 -2
  251. package/src/link/link.types.ts +2 -0
  252. package/src/link/theme.ts +20 -30
  253. package/src/list/listItem.tsx +2 -6
  254. package/src/notification/consts.ts +10 -10
  255. package/src/notification/notification.tsx +11 -17
  256. package/src/notification/notification.types.ts +2 -2
  257. package/src/notification/notificationButton.tsx +5 -10
  258. package/src/notification/notificationIcon.tsx +3 -6
  259. package/src/notification/notificationText.tsx +1 -2
  260. package/src/notification/notificationTitle.tsx +9 -3
  261. package/src/notification/theme.ts +34 -32
  262. package/src/p/theme.ts +11 -3
  263. package/src/progress/progress.tsx +1 -1
  264. package/src/select/selectButton.tsx +1 -1
  265. package/src/t/theme.ts +1 -10
  266. package/src/table/tbody.tsx +0 -4
  267. package/src/table/theme.ts +1 -6
  268. package/src/tabs/tabs.types.ts +2 -2
  269. package/src/tabs/tabsNavBar.tsx +6 -23
  270. package/src/tabs/theme.ts +4 -41
  271. package/src/tag/tag.tsx +10 -11
  272. package/src/tag/tag.types.ts +31 -32
  273. package/src/tag/tagButton.tsx +2 -2
  274. package/src/tag/theme.ts +80 -183
  275. package/src/textarea/textarea.tsx +1 -1
  276. package/src/theme/components.ts +0 -2
  277. package/src/theme/foundations/colors.ts +0 -401
  278. package/src/theme/foundations/fontWeights.ts +2 -1
  279. package/src/theme/foundations/radii.ts +3 -8
  280. package/src/toast/toast.tsx +1 -1
  281. package/src/toast/useToast.tsx +1 -2
  282. package/src/tutorial/tutorialCard.tsx +3 -10
  283. package/dist/cjs/badge/badge.d.ts +0 -9
  284. package/dist/cjs/badge/badge.d.ts.map +0 -1
  285. package/dist/cjs/badge/badge.js +0 -35
  286. package/dist/cjs/badge/badge.types.d.ts +0 -17
  287. package/dist/cjs/badge/badge.types.d.ts.map +0 -1
  288. package/dist/cjs/badge/badge.types.js +0 -2
  289. package/dist/cjs/badge/index.d.ts +0 -3
  290. package/dist/cjs/badge/index.d.ts.map +0 -1
  291. package/dist/cjs/badge/index.js +0 -23
  292. package/dist/cjs/badge/theme.d.ts +0 -130
  293. package/dist/cjs/badge/theme.d.ts.map +0 -1
  294. package/dist/cjs/badge/theme.js +0 -135
  295. package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.d.ts +0 -85
  296. package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.d.ts.map +0 -1
  297. package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.js +0 -88
  298. package/dist/esm/badge/badge.d.ts +0 -9
  299. package/dist/esm/badge/badge.d.ts.map +0 -1
  300. package/dist/esm/badge/badge.js +0 -17
  301. package/dist/esm/badge/badge.types.d.ts +0 -17
  302. package/dist/esm/badge/badge.types.d.ts.map +0 -1
  303. package/dist/esm/badge/badge.types.js +0 -1
  304. package/dist/esm/badge/index.d.ts +0 -3
  305. package/dist/esm/badge/index.d.ts.map +0 -1
  306. package/dist/esm/badge/index.js +0 -2
  307. package/dist/esm/badge/theme.d.ts +0 -130
  308. package/dist/esm/badge/theme.d.ts.map +0 -1
  309. package/dist/esm/badge/theme.js +0 -133
  310. package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.d.ts +0 -85
  311. package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.d.ts.map +0 -1
  312. package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.js +0 -84
  313. package/src/badge/badge.tsx +0 -36
  314. package/src/badge/badge.types.ts +0 -17
  315. package/src/badge/index.ts +0 -2
  316. package/src/badge/theme.ts +0 -140
  317. package/src/onedesign-tokens/dist/js/es6/rem/button.js +0 -85
@@ -1,14 +1,77 @@
1
+ import { Dict } from '../utils'
2
+
3
+ function variantOutlined(props: Dict) {
4
+ const { colorScheme: c } = props
5
+
6
+ const container = {
7
+ ...variantText(props)?.container,
8
+ borderColor: `${c}.80`,
9
+ hoverBorderColor: `${c}.80`,
10
+ focusRing: 3
11
+ }
12
+
13
+ return { container }
14
+ }
15
+
16
+ function variantSolid(props: Dict) {
17
+ const { colorScheme: c } = props
18
+
19
+ const container = {
20
+ hoverBg: `${c}.90`,
21
+ hoverBorderColor: `${c}.90`,
22
+ activeBg: `${c}.100`,
23
+ bg: `${c}.80`,
24
+ borderColor: `${c}.80`,
25
+ borderWidth: 1,
26
+ color: 'white'
27
+ }
28
+
29
+ // Special cases
30
+ if (c === 'prussian') {
31
+ container.activeBg = 'prussian.50'
32
+ container.hoverBg = 'prussian.60'
33
+ container.hoverBorderColor = 'prussian.60'
34
+ }
35
+
36
+ return { container }
37
+ }
38
+
39
+ function variantText(props: Dict) {
40
+ const { colorScheme: c } = props
41
+
42
+ const container = {
43
+ hoverBg: `${c}.20`,
44
+ hoverBorderColor: `${c}.20`,
45
+ activeBg: `${c}.30`,
46
+ bg: 'transparent',
47
+ borderColor: 'transparent',
48
+ borderWidth: 1,
49
+ color: `${c}.80`,
50
+ focusRing: 2
51
+ }
52
+
53
+ // Special cases
54
+ if (c === 'prussian') {
55
+ container.activeBg = 'blue.30'
56
+ container.hoverBg = 'blue.20'
57
+ container.hoverBorderColor = 'blue.20'
58
+ }
59
+
60
+ return { container }
61
+ }
62
+
1
63
  const baseStyle = {}
2
64
 
3
65
  const defaultProps = {
66
+ colorScheme: 'prussian',
4
67
  size: 'md',
5
- variant: 'primaryDark'
68
+ variant: 'solid'
6
69
  }
7
70
 
8
71
  const parts = ['container', 'icon', 'text']
9
72
 
10
73
  const sizes = {
11
- sm: {
74
+ xs: {
12
75
  container: {
13
76
  fontSize: 'sm',
14
77
  h: 24,
@@ -20,7 +83,7 @@ const sizes = {
20
83
  },
21
84
  text: {}
22
85
  },
23
- md: {
86
+ sm: {
24
87
  container: {
25
88
  fontSize: 'sm',
26
89
  h: 32,
@@ -32,7 +95,7 @@ const sizes = {
32
95
  },
33
96
  text: {}
34
97
  },
35
- lg: {
98
+ md: {
36
99
  container: {
37
100
  fontSize: 'md',
38
101
  h: 40,
@@ -44,7 +107,7 @@ const sizes = {
44
107
  },
45
108
  text: {}
46
109
  },
47
- xl: {
110
+ lg: {
48
111
  container: {
49
112
  fontSize: 'lg',
50
113
  h: 48,
@@ -59,144 +122,9 @@ const sizes = {
59
122
  }
60
123
 
61
124
  const variants = {
62
- primaryDark: {
63
- container: {
64
- bg: 'buttonTypePrimaryDefaultBackgroundColorDark',
65
- borderColor: 'buttonTypePrimaryDefaultBorderColorDark',
66
- color: 'buttonTypePrimaryDefaultTextColorDark',
67
- hoverBg: 'buttonTypePrimaryHoverBackgroundColorDark',
68
- hoverBorderColor: 'buttonTypePrimaryHoverBorderColorDark',
69
- hoverColor: 'buttonTypePrimaryHoverTextColorDark',
70
- activeBg: 'buttonTypePrimaryActiveBackgroundColorDark',
71
- activeBorderColor: 'buttonTypePrimaryActiveBorderColorDark',
72
- activeColor: 'buttonTypePrimaryActiveTextColorDark'
73
- }
74
- },
75
-
76
- secondaryDark: {
77
- container: {
78
- bg: 'buttonTypeSecondaryDefaultBackgroundColorDark',
79
- borderColor: 'buttonTypeSecondaryDefaultBorderColorDark',
80
- color: 'buttonTypeSecondaryDefaultTextColorDark',
81
- // discussed with Jesus, the decision was made on 2-may-2022 that OneDesign designers will update to VUI shade
82
- // hover will change from 90 to 85
83
- hoverBg: 'buttonTypeSecondaryHoverBackgroundColorDark',
84
- hoverBorderColor: 'buttonTypeSecondaryHoverBorderColorDark',
85
- hoverColor: 'buttonTypeSecondaryHoverTextColorDark',
86
- // discussed with Jesus, the decision was made on 2-may-2022 that OneDesign designers will update to VUI shade
87
- // active will change from 95% to 90%
88
- activeBg: 'buttonTypeSecondaryActiveBackgroundColorDark',
89
- activeBorderColor: 'buttonTypeSecondaryActiveBorderColorDark',
90
- activeColor: 'buttonTypeSecondaryActiveTextColorDark'
91
- }
92
- },
93
-
94
- tertiaryDark: {
95
- container: {
96
- bg: 'buttonTypeTertiaryDefaultBackgroundColorDark',
97
- borderColor: 'buttonTypeTertiaryDefaultBorderColorDark',
98
- color: 'buttonTypeTertiaryDefaultTextColorDark',
99
- hoverBg: 'buttonTypeTertiaryHoverBackgroundColorDark',
100
- hoverBorderColor: 'buttonTypeTertiaryHoverBorderColorDark',
101
- hoverColor: 'buttonTypeTertiaryHoverTextColorDark',
102
- activeBg: 'buttonTypeTertiaryActiveBackgroundColorDark',
103
- activeBorderColor: 'buttonTypeTertiaryActiveBorderColorDark',
104
- activeColor: 'buttonTypeTertiaryActiveTextColorDark'
105
- }
106
- },
107
-
108
- solidGreen: {
109
- container: {
110
- bg: 'landGreen.35',
111
- borderColor: 'landGreen.35',
112
- color: 'white',
113
- disabledBg: 'landGreen.70',
114
- disabledBorderColor: 'landGreen.70',
115
- disabledColor: 'white',
116
- hoverBg: 'landGreen.25',
117
- hoverBorderColor: 'landGreen.25',
118
- focusBg: 'landGreen.35',
119
- activeBg: 'landGreen.41',
120
- activeBorderColor: 'landGreen.41'
121
- }
122
- },
123
-
124
- solidRed: {
125
- container: {
126
- bg: 'energyRed.45',
127
- borderColor: 'energyRed.45',
128
- color: 'white',
129
- disabledBg: 'energyRed.80',
130
- disabledBorderColor: 'energyRed.80',
131
- disabledColor: 'white',
132
- // proper order is important next: hover > focus > active
133
- hoverBg: 'energyRed.35',
134
- hoverBorderColor: 'energyRed.35',
135
- focusBg: 'energyRed.45',
136
- activeBg: 'energyRed.50',
137
- activeBorderColor: 'energyRed.50'
138
- }
139
- },
140
-
141
- // subtleBlue is an internal variant, used in notification; based on primaryDark
142
- subtleBlue: {
143
- container: {
144
- bg: 'transparent',
145
- borderColor: 'transparent',
146
- color: 'seaBlue.28',
147
- disabledBg: 'white',
148
- disabledBorderColor: 'darkBlue.75',
149
- disabledColor: 'darkBlue.75',
150
- // proper order is important next: hover > focus > active
151
- hoverBg: 'skyBlue.90',
152
- hoverBorderColor: 'skyBlue.90',
153
- focusBg: 'transparent',
154
- activeBg: 'skyBlue.85',
155
- activeBorderColor: 'skyBlue.85'
156
- }
157
- },
158
-
159
- // subtleRed is an internal variant, used in notification; based on primaryDark
160
- subtleRed: {
161
- container: {
162
- bg: 'transparent',
163
- borderColor: 'transparent',
164
- // proper order is important next: hover > focus > active
165
- hoverBg: 'energyRed.90',
166
- hoverBorderColor: 'energyRed.90',
167
- focusBg: 'transparent',
168
- activeBg: 'energyRed.85',
169
- color: 'energyRed.45'
170
- }
171
- },
172
-
173
- // subtleYellow is an internal variant, used in notification; based on primaryDark
174
- subtleYellow: {
175
- container: {
176
- bg: 'transparent',
177
- borderColor: 'transparent',
178
- // proper order is important next: hover > focus > active
179
- hoverBg: 'sunflower.70',
180
- hoverBorderColor: 'sunflower.70',
181
- focusBg: 'transparent',
182
- activeBg: 'sunflower.65',
183
- color: 'sunflower.15'
184
- }
185
- },
186
-
187
- // subtleGreen is an internal variant, used in notification; based on primaryDark
188
- subtleGreen: {
189
- container: {
190
- bg: 'transparent',
191
- borderColor: 'transparent',
192
- // proper order is important next: hover > focus > active
193
- hoverBg: 'landGreen.90',
194
- hoverBorderColor: 'landGreen.90',
195
- focusBg: 'transparent',
196
- activeBg: 'landGreen.85',
197
- color: 'landGreen.30'
198
- }
199
- }
125
+ outlined: variantOutlined,
126
+ solid: variantSolid,
127
+ text: variantText
200
128
  }
201
129
 
202
130
  export default {
@@ -1,7 +1,7 @@
1
1
  import React, { useMemo } from 'react'
2
2
 
3
3
  import { styled, th, vui } from '../core'
4
- import { activeClassName, cs, filterUndefined } from '../utils'
4
+ import { activeClassName, activeItemShade, cs, filterUndefined } from '../utils'
5
5
  import { ButtonGroupProps } from './buttonGroup.types'
6
6
  import { ButtonGroupProvider } from './context'
7
7
  import { getInnerBorderColor } from './helpers'
@@ -42,12 +42,12 @@ export const ButtonGroupBase = styled.divBox<{ colorScheme?: string; innerBorder
42
42
  }
43
43
 
44
44
  > *:disabled {
45
- border-color: disabled .border;
45
+ border-color: disabled.border;
46
46
  }
47
47
 
48
48
  //
49
49
  > .${activeClassName} {
50
- background-color: ${p => th.color('skyBlue.90')};
50
+ background-color: ${p => th.color(`${p.colorScheme}.${activeItemShade}`)};
51
51
  }
52
52
  `
53
53
 
@@ -56,15 +56,18 @@ export const ButtonGroupBase = styled.divBox<{ colorScheme?: string; innerBorder
56
56
  * Exposes some props to the children via context.
57
57
  */
58
58
  export const ButtonGroup = vui<'div', ButtonGroupProps>((props, ref) => {
59
- const { className, disabled, innerBorderColor, size, variant = 'secondaryDark', ...rest } = props
59
+ const { className, colorScheme, disabled, innerBorderColor, size, variant, ...rest } = props
60
60
 
61
- const context = useMemo(() => filterUndefined({ disabled, size, variant }), [disabled, size, variant])
61
+ const context = useMemo(
62
+ () => filterUndefined({ colorScheme, disabled, size, variant }),
63
+ [colorScheme, disabled, size, variant]
64
+ )
62
65
 
63
66
  return (
64
67
  <ButtonGroupProvider value={context}>
65
68
  <ButtonGroupBase
66
69
  className={cs('vui-buttonGroup', className)}
67
- {...{ innerBorderColor: innerBorderColor ? innerBorderColor : getInnerBorderColor(props), ref }}
70
+ {...{ colorScheme, innerBorderColor: innerBorderColor ? innerBorderColor : getInnerBorderColor(props), ref }}
68
71
  {...rest}
69
72
  />
70
73
  </ButtonGroupProvider>
@@ -1,10 +1,11 @@
1
+ import { ButtonColorScheme } from '../button/button.types'
1
2
  import { SystemProps } from '../system'
2
3
  import { ThemingProps } from '../theme'
3
4
 
4
5
  export type ButtonGroupProps = SystemProps &
5
6
  ThemingProps<'ButtonGroup'> & {
6
- /** Available theme colors for this component. @deprecated */
7
- colorScheme?: string
7
+ /** Available theme colors for this component. */
8
+ colorScheme?: ButtonColorScheme
8
9
  /** Makes all wrapped buttons disabled. */
9
10
  disabled?: boolean
10
11
  /** Border color between the buttons. */
@@ -2,9 +2,11 @@ import { ButtonGroupProps } from './buttonGroup.types'
2
2
 
3
3
  /** Returns appropriate color for the border between the buttons. */
4
4
  export function getInnerBorderColor(props: ButtonGroupProps): string {
5
- const { disabled, variant } = props
5
+ const { colorScheme = 'prussian', disabled, variant = 'solid' } = props
6
6
 
7
7
  if (disabled) return 'disabled.border'
8
8
 
9
- return `${variant}`
9
+ const shade = variant === 'solid' ? '100' : '80'
10
+
11
+ return `${colorScheme}.${shade}`
10
12
  }
@@ -13,7 +13,9 @@ export const ButtonToggleGroup = (props: ButtonToggleGroupProps) => {
13
13
  return (
14
14
  <ButtonGroup
15
15
  className={cs('vui-buttonToggleGroup', className)}
16
+ colorScheme="blue"
16
17
  innerBorderColor={isDimmedBorder ? dimmedBorderColor : ''}
18
+ variant="outlined"
17
19
  {...props}
18
20
  />
19
21
  )
@@ -8,7 +8,7 @@ import { CheckboxProps, CheckboxStyleProps } from './checkbox.types'
8
8
  import { useCheckboxGroupContext } from './context'
9
9
 
10
10
  const CheckboxControl = styled.spanBox`
11
- border-radius: none;
11
+ border-radius: sm;
12
12
  display: inline-flex;
13
13
  flex-shrink: 0;
14
14
  position: relative;
@@ -15,7 +15,7 @@ import { useCopyToClipboard } from './useCopyToClipboard'
15
15
  *
16
16
  */
17
17
  export const CopyToClipboard = vui<'button', CopyToClipboardProps>((props, ref) => {
18
- const { disabled, copyText, className, size = 'sm', variant = 'tertiaryDark', ...rest } = props
18
+ const { disabled, copyText, className, size = 'xs', variant = 'text', ...rest } = props
19
19
 
20
20
  const { copy, isCopyDisabled } = useCopyToClipboard(copyText)
21
21
 
@@ -16,81 +16,63 @@ type GlobalStyleProps = {
16
16
  * - CSS variables for each theme value
17
17
  */
18
18
  export default createGlobalStyle<GlobalStyleProps>`
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
- z-index: 1;
29
- }
19
+ ${fontFaces}
30
20
 
31
- button {
32
- --x-ring-color: transparent;
33
- }
21
+ :root {
22
+ ${generateCSSVariables}
23
+ }
34
24
 
35
- button:focus-visible, li:focus-visible {
36
- --x-ring-color: var(--vui-colors-focusColor);
37
- outline: var(--vui-colors-focusColor) solid 3px;
38
- z-index: 1;
39
- }
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
+ }
40
30
 
41
- ${p =>
31
+ ${p =>
42
32
  p.globalStyle &&
43
33
  css`
44
34
  body {
45
- color: sandstone 0.1;
35
+ color: prussian.80;
46
36
  font-family: avenir;
47
37
  font-size: md;
48
38
  }
49
-
50
- h1,
51
- h2,
52
- h3,
53
- h4,
54
- h5 {
55
- color: darkBlue 0.18;
56
- }
57
39
  `}
58
40
 
59
- @keyframes vui-bounce {
60
- ${bounce}
61
- }
41
+ @keyframes vui-bounce {
42
+ ${bounce}
43
+ }
62
44
 
63
- @keyframes vui-fadeDown {
64
- ${fadeDown}
65
- }
45
+ @keyframes vui-fadeDown {
46
+ ${fadeDown}
47
+ }
66
48
 
67
- @keyframes vui-fadeIn {
68
- ${fadeIn}
69
- }
49
+ @keyframes vui-fadeIn {
50
+ ${fadeIn}
51
+ }
70
52
 
71
- @keyframes vui-fadeLeft {
72
- ${fadeLeft}
73
- }
53
+ @keyframes vui-fadeLeft {
54
+ ${fadeLeft}
55
+ }
74
56
 
75
- @keyframes vui-fadeOut {
76
- ${fadeOut}
77
- }
57
+ @keyframes vui-fadeOut {
58
+ ${fadeOut}
59
+ }
78
60
 
79
- @keyframes vui-fadeRight {
80
- ${fadeRight}
81
- }
61
+ @keyframes vui-fadeRight {
62
+ ${fadeRight}
63
+ }
82
64
 
83
- @keyframes vui-fadeUp {
84
- ${fadeUp}
85
- }
65
+ @keyframes vui-fadeUp {
66
+ ${fadeUp}
67
+ }
86
68
 
87
- @keyframes vui-pulse {
88
- ${pulse}
89
- }
69
+ @keyframes vui-pulse {
70
+ ${pulse}
71
+ }
90
72
 
91
- @keyframes vui-spin {
92
- ${spin}
93
- }
73
+ @keyframes vui-spin {
74
+ ${spin}
75
+ }
94
76
  `
95
77
 
96
78
  /** 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"
23
24
  fontWeight="demi"
24
25
  href={linkedIn ?? defaultLinkedInUrl}
25
26
  iconLeft={<Link.Icon mr={1} name="fabLinkedin" size="sm" />}
26
27
  isExternal
27
- variant="white"
28
28
  >
29
29
  Follow us
30
30
  </Link>
@@ -1,61 +1,39 @@
1
- const baseStyle = {
2
- color: 'darkBlue.18'
3
- }
1
+ const baseStyle = {}
4
2
 
5
3
  const defaultProps = {
6
4
  size: 'h2'
7
5
  }
8
6
 
9
7
  const sizes = {
10
- title: {
11
- as: 'h1',
12
- fontFamily: 'DNV Display',
13
- fontSize: '64px',
14
- fontWeight: 'medium',
15
- lineHeight: '74px'
16
- },
17
8
  h1: {
18
9
  as: 'h1',
19
- fontSize: '50px',
20
- fontWeight: 'regular',
21
- lineHeight: '62px'
22
- },
23
- lead: {
24
- as: 'h2',
25
- color: 'seaBlue.28',
26
- fontSize: '28px',
27
- fontWeight: 'regular',
28
- lineHeight: '38px'
10
+ fontSize: '40px',
11
+ lineHeight: '52px'
29
12
  },
30
13
  h2: {
31
14
  as: 'h2',
32
15
  fontSize: '32px',
33
- fontWeight: 'regular',
34
- lineHeight: '42px'
16
+ lineHeight: '40px'
35
17
  },
36
18
  h3: {
37
19
  as: 'h3',
38
20
  fontSize: '24px',
39
- fontWeight: 'regular',
40
21
  lineHeight: '32px'
41
22
  },
42
23
  h4: {
43
24
  as: 'h4',
44
25
  fontSize: '20px',
45
- fontWeight: 'demi',
46
- lineHeight: '24px'
26
+ lineHeight: '28px'
47
27
  },
48
28
  h5: {
49
29
  as: 'h5',
50
30
  fontSize: '18px',
51
- fontWeight: 'demi',
52
- lineHeight: '26px'
31
+ lineHeight: '24px'
53
32
  },
54
33
  h6: {
55
34
  as: 'h6',
56
35
  fontSize: '16px',
57
- fontWeight: 'demi',
58
- lineHeight: '22px'
36
+ lineHeight: '20px'
59
37
  }
60
38
  }
61
39
 
@@ -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 amount of degrees clockwise. */
23
+ /** Rotates the icon by given amout 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,11 +20,6 @@ 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
28
23
  }
29
24
  }
30
25
 
package/src/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export * from './accordion'
2
2
  export * from './avatar'
3
- export * from './badge'
4
3
  export * from './box'
5
4
  export * from './button'
6
5
  export * from './buttonGroup'
@@ -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: none;
17
+ border-radius: md;
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: none;
12
+ border-radius: md;
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: none;
12
+ border-radius: sm;
13
13
  cursor: pointer;
14
14
  display: inline-flex;
15
15
  line-height: normal;
@@ -27,6 +27,7 @@ export const Link = vui<'a', LinkProps>((props, ref) => {
27
27
  const {
28
28
  children,
29
29
  className,
30
+ colorScheme,
30
31
  decoration,
31
32
  hoverDecoration = 'underline',
32
33
  iconLeft,
@@ -41,7 +42,7 @@ export const Link = vui<'a', LinkProps>((props, ref) => {
41
42
  } = props
42
43
  const styles = useStyleConfig('Link', props)
43
44
 
44
- const context = useMemo(() => filterUndefined({ size, variant }), [size, variant])
45
+ const context = useMemo(() => filterUndefined({ colorScheme, size, variant }), [colorScheme, size, variant])
45
46
 
46
47
  const aliasedProps = filterUndefined({
47
48
  fontWeight: weight,
@@ -4,6 +4,8 @@ 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 */
8
+ colorScheme?: 'blue' | 'white'
7
9
  /** Alias for textDecoration prop. @deprecated */
8
10
  decoration?: TypographyProps['textDecoration']
9
11
  /** Alias for hoverTextDecoration prop. @deprecated */