@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.
- package/dist/cjs/avatar/avatar.js +1 -1
- package/dist/cjs/badge/badge.d.ts +9 -0
- package/dist/cjs/badge/badge.d.ts.map +1 -0
- package/dist/cjs/badge/badge.js +35 -0
- package/dist/cjs/badge/badge.types.d.ts +17 -0
- package/dist/cjs/badge/badge.types.d.ts.map +1 -0
- package/dist/cjs/badge/badge.types.js +2 -0
- package/dist/cjs/badge/index.d.ts +3 -0
- package/dist/cjs/badge/index.d.ts.map +1 -0
- package/dist/cjs/badge/index.js +23 -0
- package/dist/cjs/badge/theme.d.ts +130 -0
- package/dist/cjs/badge/theme.d.ts.map +1 -0
- package/dist/cjs/badge/theme.js +135 -0
- package/dist/cjs/button/button.d.ts +1 -1
- package/dist/cjs/button/button.d.ts.map +1 -1
- package/dist/cjs/button/button.js +16 -23
- package/dist/cjs/button/button.types.d.ts +3 -4
- package/dist/cjs/button/button.types.d.ts.map +1 -1
- package/dist/cjs/button/buttons.js +8 -8
- package/dist/cjs/button/consts.js +3 -3
- package/dist/cjs/button/theme.d.ts +204 -44
- package/dist/cjs/button/theme.d.ts.map +1 -1
- package/dist/cjs/button/theme.js +220 -54
- package/dist/cjs/buttonGroup/buttonGroup.d.ts.map +1 -1
- package/dist/cjs/buttonGroup/buttonGroup.js +5 -5
- package/dist/cjs/buttonGroup/buttonGroup.types.d.ts +2 -3
- package/dist/cjs/buttonGroup/buttonGroup.types.d.ts.map +1 -1
- package/dist/cjs/buttonGroup/helpers.d.ts.map +1 -1
- package/dist/cjs/buttonGroup/helpers.js +2 -3
- package/dist/cjs/buttonToggleGroup/buttonToggleGroup.d.ts.map +1 -1
- package/dist/cjs/buttonToggleGroup/buttonToggleGroup.js +1 -1
- package/dist/cjs/checkbox/checkbox.js +1 -1
- package/dist/cjs/copyToClipboard/copyToClipboard.js +1 -1
- package/dist/cjs/core/vuiProvider/globalStyle.d.ts.map +1 -1
- package/dist/cjs/core/vuiProvider/globalStyle.js +55 -38
- package/dist/cjs/footer/footerTrademark.js +1 -1
- package/dist/cjs/heading/heading.d.ts.map +1 -1
- package/dist/cjs/heading/heading.js +7 -1
- package/dist/cjs/heading/heading.types.d.ts +1 -0
- package/dist/cjs/heading/heading.types.d.ts.map +1 -1
- package/dist/cjs/heading/theme.d.ts +67 -9
- package/dist/cjs/heading/theme.d.ts.map +1 -1
- package/dist/cjs/heading/theme.js +69 -11
- package/dist/cjs/icon/icon.types.d.ts +1 -1
- package/dist/cjs/icon/icon.types.d.ts.map +1 -1
- package/dist/cjs/icon/theme.d.ts +5 -0
- package/dist/cjs/icon/theme.d.ts.map +1 -1
- package/dist/cjs/icon/theme.js +5 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/input/input.js +1 -1
- package/dist/cjs/input/inputInput.js +1 -1
- package/dist/cjs/link/link.d.ts.map +1 -1
- package/dist/cjs/link/link.js +3 -3
- package/dist/cjs/link/link.types.d.ts +1 -1
- package/dist/cjs/link/link.types.d.ts.map +1 -1
- package/dist/cjs/link/theme.d.ts +21 -4
- package/dist/cjs/link/theme.d.ts.map +1 -1
- package/dist/cjs/link/theme.js +30 -17
- package/dist/cjs/list/listItem.d.ts.map +1 -1
- package/dist/cjs/list/listItem.js +6 -2
- package/dist/cjs/notification/consts.js +10 -10
- package/dist/cjs/notification/notification.d.ts.map +1 -1
- package/dist/cjs/notification/notification.js +10 -8
- package/dist/cjs/notification/notification.types.d.ts +2 -2
- package/dist/cjs/notification/notification.types.d.ts.map +1 -1
- package/dist/cjs/notification/notificationButton.d.ts.map +1 -1
- package/dist/cjs/notification/notificationButton.js +5 -1
- package/dist/cjs/notification/notificationIcon.d.ts.map +1 -1
- package/dist/cjs/notification/notificationIcon.js +3 -2
- package/dist/cjs/notification/notificationText.d.ts.map +1 -1
- package/dist/cjs/notification/notificationText.js +1 -1
- package/dist/cjs/notification/notificationTitle.d.ts +2 -2
- package/dist/cjs/notification/notificationTitle.d.ts.map +1 -1
- package/dist/cjs/notification/notificationTitle.js +2 -2
- package/dist/cjs/notification/theme.d.ts +31 -16
- package/dist/cjs/notification/theme.d.ts.map +1 -1
- package/dist/cjs/notification/theme.js +32 -26
- package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.d.ts +85 -0
- package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.d.ts.map +1 -0
- package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.js +88 -0
- package/dist/cjs/p/theme.d.ts +0 -8
- package/dist/cjs/p/theme.d.ts.map +1 -1
- package/dist/cjs/p/theme.js +3 -11
- package/dist/cjs/progress/progress.js +1 -1
- package/dist/cjs/select/selectButton.js +1 -1
- package/dist/cjs/sidemenu/sidemenu.js +1 -1
- package/dist/cjs/sidemenu/sidemenuItem.js +2 -2
- package/dist/cjs/t/theme.d.ts +10 -1
- package/dist/cjs/t/theme.d.ts.map +1 -1
- package/dist/cjs/t/theme.js +10 -1
- package/dist/cjs/table/tbody.d.ts.map +1 -1
- package/dist/cjs/table/tbody.js +4 -0
- package/dist/cjs/table/theme.d.ts +5 -0
- package/dist/cjs/table/theme.d.ts.map +1 -1
- package/dist/cjs/table/theme.js +6 -1
- package/dist/cjs/tabs/tabs.types.d.ts +2 -2
- package/dist/cjs/tabs/tabs.types.d.ts.map +1 -1
- package/dist/cjs/tabs/tabsNavBar.d.ts.map +1 -1
- package/dist/cjs/tabs/tabsNavBar.js +13 -5
- package/dist/cjs/tabs/theme.d.ts +40 -4
- package/dist/cjs/tabs/theme.d.ts.map +1 -1
- package/dist/cjs/tabs/theme.js +41 -4
- package/dist/cjs/tag/tag.js +9 -6
- package/dist/cjs/tag/tag.types.d.ts +4 -3
- package/dist/cjs/tag/tag.types.d.ts.map +1 -1
- package/dist/cjs/tag/tagButton.d.ts.map +1 -1
- package/dist/cjs/tag/tagButton.js +1 -1
- package/dist/cjs/tag/theme.d.ts +178 -32
- package/dist/cjs/tag/theme.d.ts.map +1 -1
- package/dist/cjs/tag/theme.js +182 -65
- package/dist/cjs/textarea/textarea.js +1 -1
- package/dist/cjs/theme/components.d.ts +624 -47
- package/dist/cjs/theme/components.d.ts.map +1 -1
- package/dist/cjs/theme/components.js +76 -74
- package/dist/cjs/theme/defaultTheme.d.ts +916 -48
- package/dist/cjs/theme/defaultTheme.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/colors.d.ts +523 -0
- package/dist/cjs/theme/foundations/colors.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/colors.js +389 -1
- package/dist/cjs/theme/foundations/fontWeights.d.ts +0 -1
- package/dist/cjs/theme/foundations/fontWeights.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/fontWeights.js +1 -2
- package/dist/cjs/theme/foundations/index.d.ts +292 -1
- package/dist/cjs/theme/foundations/index.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/radii.d.ts +5 -0
- package/dist/cjs/theme/foundations/radii.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/radii.js +8 -3
- package/dist/cjs/toast/useToast.d.ts.map +1 -1
- package/dist/cjs/toast/useToast.js +1 -1
- package/dist/cjs/tutorial/tutorialCard.d.ts.map +1 -1
- package/dist/cjs/tutorial/tutorialCard.js +3 -3
- package/dist/esm/avatar/avatar.js +1 -1
- package/dist/esm/badge/badge.d.ts +9 -0
- package/dist/esm/badge/badge.d.ts.map +1 -0
- package/dist/esm/badge/badge.js +17 -0
- package/dist/esm/badge/badge.types.d.ts +17 -0
- package/dist/esm/badge/badge.types.d.ts.map +1 -0
- package/dist/esm/badge/badge.types.js +1 -0
- package/dist/esm/badge/index.d.ts +3 -0
- package/dist/esm/badge/index.d.ts.map +1 -0
- package/dist/esm/badge/index.js +2 -0
- package/dist/esm/badge/theme.d.ts +130 -0
- package/dist/esm/badge/theme.d.ts.map +1 -0
- package/dist/esm/badge/theme.js +133 -0
- package/dist/esm/button/button.d.ts +1 -1
- package/dist/esm/button/button.d.ts.map +1 -1
- package/dist/esm/button/button.js +16 -23
- package/dist/esm/button/button.types.d.ts +3 -4
- package/dist/esm/button/button.types.d.ts.map +1 -1
- package/dist/esm/button/buttons.js +8 -8
- package/dist/esm/button/consts.js +3 -3
- package/dist/esm/button/theme.d.ts +204 -44
- package/dist/esm/button/theme.d.ts.map +1 -1
- package/dist/esm/button/theme.js +220 -58
- package/dist/esm/buttonGroup/buttonGroup.d.ts.map +1 -1
- package/dist/esm/buttonGroup/buttonGroup.js +6 -6
- package/dist/esm/buttonGroup/buttonGroup.types.d.ts +2 -3
- package/dist/esm/buttonGroup/buttonGroup.types.d.ts.map +1 -1
- package/dist/esm/buttonGroup/helpers.d.ts.map +1 -1
- package/dist/esm/buttonGroup/helpers.js +2 -3
- package/dist/esm/buttonToggleGroup/buttonToggleGroup.d.ts.map +1 -1
- package/dist/esm/buttonToggleGroup/buttonToggleGroup.js +1 -1
- package/dist/esm/checkbox/checkbox.js +1 -1
- package/dist/esm/copyToClipboard/copyToClipboard.js +1 -1
- package/dist/esm/core/vuiProvider/globalStyle.d.ts.map +1 -1
- package/dist/esm/core/vuiProvider/globalStyle.js +55 -38
- package/dist/esm/footer/footerTrademark.js +1 -1
- package/dist/esm/heading/heading.d.ts.map +1 -1
- package/dist/esm/heading/heading.js +8 -2
- package/dist/esm/heading/heading.types.d.ts +1 -0
- package/dist/esm/heading/heading.types.d.ts.map +1 -1
- package/dist/esm/heading/theme.d.ts +67 -9
- package/dist/esm/heading/theme.d.ts.map +1 -1
- package/dist/esm/heading/theme.js +69 -11
- package/dist/esm/icon/icon.types.d.ts +1 -1
- package/dist/esm/icon/icon.types.d.ts.map +1 -1
- package/dist/esm/icon/theme.d.ts +5 -0
- package/dist/esm/icon/theme.d.ts.map +1 -1
- package/dist/esm/icon/theme.js +5 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/input/input.js +1 -1
- package/dist/esm/input/inputInput.js +1 -1
- package/dist/esm/link/link.d.ts.map +1 -1
- package/dist/esm/link/link.js +3 -3
- package/dist/esm/link/link.types.d.ts +1 -1
- package/dist/esm/link/link.types.d.ts.map +1 -1
- package/dist/esm/link/theme.d.ts +21 -4
- package/dist/esm/link/theme.d.ts.map +1 -1
- package/dist/esm/link/theme.js +30 -17
- package/dist/esm/list/listItem.d.ts.map +1 -1
- package/dist/esm/list/listItem.js +6 -2
- package/dist/esm/notification/consts.js +10 -10
- package/dist/esm/notification/notification.d.ts.map +1 -1
- package/dist/esm/notification/notification.js +11 -9
- package/dist/esm/notification/notification.types.d.ts +2 -2
- package/dist/esm/notification/notification.types.d.ts.map +1 -1
- package/dist/esm/notification/notificationButton.d.ts.map +1 -1
- package/dist/esm/notification/notificationButton.js +4 -1
- package/dist/esm/notification/notificationIcon.d.ts.map +1 -1
- package/dist/esm/notification/notificationIcon.js +3 -2
- package/dist/esm/notification/notificationText.d.ts.map +1 -1
- package/dist/esm/notification/notificationText.js +1 -1
- package/dist/esm/notification/notificationTitle.d.ts +2 -2
- package/dist/esm/notification/notificationTitle.d.ts.map +1 -1
- package/dist/esm/notification/notificationTitle.js +2 -2
- package/dist/esm/notification/theme.d.ts +31 -16
- package/dist/esm/notification/theme.d.ts.map +1 -1
- package/dist/esm/notification/theme.js +32 -26
- package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.d.ts +85 -0
- package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.d.ts.map +1 -0
- package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.js +84 -0
- package/dist/esm/p/theme.d.ts +0 -8
- package/dist/esm/p/theme.d.ts.map +1 -1
- package/dist/esm/p/theme.js +3 -11
- package/dist/esm/progress/progress.js +1 -1
- package/dist/esm/select/selectButton.js +1 -1
- package/dist/esm/sidemenu/sidemenu.js +1 -1
- package/dist/esm/sidemenu/sidemenuItem.js +2 -2
- package/dist/esm/t/theme.d.ts +10 -1
- package/dist/esm/t/theme.d.ts.map +1 -1
- package/dist/esm/t/theme.js +10 -1
- package/dist/esm/table/tbody.d.ts.map +1 -1
- package/dist/esm/table/tbody.js +4 -0
- package/dist/esm/table/theme.d.ts +5 -0
- package/dist/esm/table/theme.d.ts.map +1 -1
- package/dist/esm/table/theme.js +6 -1
- package/dist/esm/tabs/tabs.types.d.ts +2 -2
- package/dist/esm/tabs/tabs.types.d.ts.map +1 -1
- package/dist/esm/tabs/tabsNavBar.d.ts.map +1 -1
- package/dist/esm/tabs/tabsNavBar.js +12 -4
- package/dist/esm/tabs/theme.d.ts +40 -4
- package/dist/esm/tabs/theme.d.ts.map +1 -1
- package/dist/esm/tabs/theme.js +41 -4
- package/dist/esm/tag/tag.js +9 -6
- package/dist/esm/tag/tag.types.d.ts +4 -3
- package/dist/esm/tag/tag.types.d.ts.map +1 -1
- package/dist/esm/tag/tagButton.d.ts.map +1 -1
- package/dist/esm/tag/tagButton.js +1 -1
- package/dist/esm/tag/theme.d.ts +178 -32
- package/dist/esm/tag/theme.d.ts.map +1 -1
- package/dist/esm/tag/theme.js +182 -65
- package/dist/esm/textarea/textarea.js +1 -1
- package/dist/esm/theme/components.d.ts +624 -47
- package/dist/esm/theme/components.d.ts.map +1 -1
- package/dist/esm/theme/components.js +2 -0
- package/dist/esm/theme/defaultTheme.d.ts +916 -48
- package/dist/esm/theme/defaultTheme.d.ts.map +1 -1
- package/dist/esm/theme/foundations/colors.d.ts +523 -0
- package/dist/esm/theme/foundations/colors.d.ts.map +1 -1
- package/dist/esm/theme/foundations/colors.js +365 -0
- package/dist/esm/theme/foundations/fontWeights.d.ts +0 -1
- package/dist/esm/theme/foundations/fontWeights.d.ts.map +1 -1
- package/dist/esm/theme/foundations/fontWeights.js +1 -2
- package/dist/esm/theme/foundations/index.d.ts +292 -1
- package/dist/esm/theme/foundations/index.d.ts.map +1 -1
- package/dist/esm/theme/foundations/radii.d.ts +5 -0
- package/dist/esm/theme/foundations/radii.d.ts.map +1 -1
- package/dist/esm/theme/foundations/radii.js +8 -3
- package/dist/esm/toast/useToast.d.ts.map +1 -1
- package/dist/esm/toast/useToast.js +1 -1
- package/dist/esm/tutorial/tutorialCard.d.ts.map +1 -1
- package/dist/esm/tutorial/tutorialCard.js +3 -3
- package/package.json +1 -1
- package/src/avatar/avatar.tsx +1 -1
- package/src/badge/badge.tsx +36 -0
- package/src/badge/badge.types.ts +17 -0
- package/src/badge/index.ts +2 -0
- package/src/badge/theme.ts +140 -0
- package/src/button/button.tsx +19 -28
- package/src/button/button.types.ts +4 -8
- package/src/button/buttons.tsx +8 -8
- package/src/button/consts.ts +3 -3
- package/src/button/theme.ts +229 -71
- package/src/buttonGroup/buttonGroup.tsx +6 -9
- package/src/buttonGroup/buttonGroup.types.ts +2 -3
- package/src/buttonGroup/helpers.ts +2 -4
- package/src/buttonToggleGroup/buttonToggleGroup.tsx +0 -2
- package/src/checkbox/checkbox.tsx +1 -1
- package/src/copyToClipboard/copyToClipboard.tsx +1 -1
- package/src/core/vuiProvider/globalStyle.tsx +55 -38
- package/src/footer/footerTrademark.tsx +1 -1
- package/src/heading/heading.tsx +19 -2
- package/src/heading/heading.types.ts +2 -0
- package/src/heading/theme.ts +69 -11
- package/src/icon/icon.types.ts +1 -1
- package/src/icon/theme.ts +5 -0
- package/src/index.ts +1 -0
- package/src/input/input.tsx +1 -1
- package/src/input/inputInput.tsx +1 -1
- package/src/link/link.tsx +2 -3
- package/src/link/link.types.ts +1 -1
- package/src/link/theme.ts +30 -20
- package/src/list/listItem.tsx +6 -2
- package/src/notification/consts.ts +10 -10
- package/src/notification/notification.tsx +16 -11
- package/src/notification/notification.types.ts +2 -2
- package/src/notification/notificationButton.tsx +10 -5
- package/src/notification/notificationIcon.tsx +6 -3
- package/src/notification/notificationText.tsx +2 -1
- package/src/notification/notificationTitle.tsx +3 -9
- package/src/notification/theme.ts +32 -34
- package/src/onedesign-tokens/dist/js/es6/rem/button.js +85 -0
- package/src/p/theme.ts +3 -11
- package/src/progress/progress.tsx +1 -1
- package/src/select/selectButton.tsx +1 -1
- package/src/sidemenu/sidemenu.tsx +1 -1
- package/src/sidemenu/sidemenuItem.tsx +3 -3
- package/src/t/theme.ts +10 -1
- package/src/table/tbody.tsx +4 -0
- package/src/table/theme.ts +6 -1
- package/src/tabs/tabs.types.ts +2 -2
- package/src/tabs/tabsNavBar.tsx +23 -6
- package/src/tabs/theme.ts +41 -4
- package/src/tag/tag.tsx +11 -11
- package/src/tag/tag.types.ts +32 -31
- package/src/tag/tagButton.tsx +1 -2
- package/src/tag/theme.ts +183 -80
- package/src/textarea/textarea.tsx +1 -1
- package/src/theme/components.ts +2 -0
- package/src/theme/foundations/colors.ts +401 -0
- package/src/theme/foundations/fontWeights.ts +1 -2
- package/src/theme/foundations/radii.ts +8 -3
- package/src/toast/useToast.tsx +2 -1
- 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
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
button {
|
|
31
|
+
--x-ring-color: transparent;
|
|
32
|
+
}
|
|
24
33
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
40
|
+
${p =>
|
|
32
41
|
p.globalStyle &&
|
|
33
42
|
css`
|
|
34
43
|
body {
|
|
35
|
-
color:
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
@keyframes vui-bounce {
|
|
59
|
+
${bounce}
|
|
60
|
+
}
|
|
44
61
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
62
|
+
@keyframes vui-fadeDown {
|
|
63
|
+
${fadeDown}
|
|
64
|
+
}
|
|
48
65
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
66
|
+
@keyframes vui-fadeIn {
|
|
67
|
+
${fadeIn}
|
|
68
|
+
}
|
|
52
69
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
70
|
+
@keyframes vui-fadeLeft {
|
|
71
|
+
${fadeLeft}
|
|
72
|
+
}
|
|
56
73
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
74
|
+
@keyframes vui-fadeOut {
|
|
75
|
+
${fadeOut}
|
|
76
|
+
}
|
|
60
77
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
78
|
+
@keyframes vui-fadeRight {
|
|
79
|
+
${fadeRight}
|
|
80
|
+
}
|
|
64
81
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
82
|
+
@keyframes vui-fadeUp {
|
|
83
|
+
${fadeUp}
|
|
84
|
+
}
|
|
68
85
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
86
|
+
@keyframes vui-pulse {
|
|
87
|
+
${pulse}
|
|
88
|
+
}
|
|
72
89
|
|
|
73
|
-
|
|
74
|
-
|
|
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>
|
package/src/heading/heading.tsx
CHANGED
|
@@ -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
|
|
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
|
)
|
package/src/heading/theme.ts
CHANGED
|
@@ -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:
|
|
11
|
-
|
|
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:
|
|
16
|
-
|
|
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:
|
|
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:
|
|
26
|
-
|
|
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:
|
|
31
|
-
|
|
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
|
-
|
|
93
|
+
fontWeight: 'demi',
|
|
94
|
+
lineHeight: '22px'
|
|
37
95
|
}
|
|
38
96
|
}
|
|
39
97
|
|
package/src/icon/icon.types.ts
CHANGED
|
@@ -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
|
|
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
package/src/index.ts
CHANGED
package/src/input/input.tsx
CHANGED
package/src/input/inputInput.tsx
CHANGED
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:
|
|
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({
|
|
44
|
+
const context = useMemo(() => filterUndefined({ size, variant }), [size, variant])
|
|
46
45
|
|
|
47
46
|
const aliasedProps = filterUndefined({
|
|
48
47
|
fontWeight: weight,
|
package/src/link/link.types.ts
CHANGED
|
@@ -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. @
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
function variantDefault(props: Dict) {
|
|
4
|
-
const { colorScheme: c } = props
|
|
5
|
-
|
|
1
|
+
function variantDefault() {
|
|
6
2
|
const container = {
|
|
7
|
-
color:
|
|
8
|
-
hoverColor:
|
|
3
|
+
color: `seaBlue.28`,
|
|
4
|
+
hoverColor: `seaBlue.28`
|
|
9
5
|
}
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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(
|
|
20
|
-
const { colorScheme: c } = props
|
|
21
|
-
|
|
19
|
+
function variantLight() {
|
|
22
20
|
const container = {
|
|
23
|
-
color:
|
|
24
|
-
hoverColor:
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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 {
|
package/src/list/listItem.tsx
CHANGED
|
@@ -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 {
|
|
36
|
-
const styles = useStyleConfig('Notification', {
|
|
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>({
|
|
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 &&
|
|
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. @
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
|
|
24
|
+
ml="16px"
|
|
25
|
+
mt={marginTop}
|
|
23
26
|
ref={ref}
|
|
24
27
|
size="md"
|
|
25
28
|
{...styles.icon}
|