@veracity/vui 1.9.2 → 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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
package/dist/esm/button/theme.js
CHANGED
|
@@ -1,61 +1,11 @@
|
|
|
1
|
-
function variantOutlined(props) {
|
|
2
|
-
const { colorScheme: c } = props;
|
|
3
|
-
const container = {
|
|
4
|
-
...variantText(props)?.container,
|
|
5
|
-
borderColor: `${c}.80`,
|
|
6
|
-
hoverBorderColor: `${c}.80`,
|
|
7
|
-
focusRing: 3
|
|
8
|
-
};
|
|
9
|
-
return { container };
|
|
10
|
-
}
|
|
11
|
-
function variantSolid(props) {
|
|
12
|
-
const { colorScheme: c } = props;
|
|
13
|
-
const container = {
|
|
14
|
-
hoverBg: `${c}.90`,
|
|
15
|
-
hoverBorderColor: `${c}.90`,
|
|
16
|
-
activeBg: `${c}.100`,
|
|
17
|
-
bg: `${c}.80`,
|
|
18
|
-
borderColor: `${c}.80`,
|
|
19
|
-
borderWidth: 1,
|
|
20
|
-
color: 'white'
|
|
21
|
-
};
|
|
22
|
-
// Special cases
|
|
23
|
-
if (c === 'prussian') {
|
|
24
|
-
container.activeBg = 'prussian.50';
|
|
25
|
-
container.hoverBg = 'prussian.60';
|
|
26
|
-
container.hoverBorderColor = 'prussian.60';
|
|
27
|
-
}
|
|
28
|
-
return { container };
|
|
29
|
-
}
|
|
30
|
-
function variantText(props) {
|
|
31
|
-
const { colorScheme: c } = props;
|
|
32
|
-
const container = {
|
|
33
|
-
hoverBg: `${c}.20`,
|
|
34
|
-
hoverBorderColor: `${c}.20`,
|
|
35
|
-
activeBg: `${c}.30`,
|
|
36
|
-
bg: 'transparent',
|
|
37
|
-
borderColor: 'transparent',
|
|
38
|
-
borderWidth: 1,
|
|
39
|
-
color: `${c}.80`,
|
|
40
|
-
focusRing: 2
|
|
41
|
-
};
|
|
42
|
-
// Special cases
|
|
43
|
-
if (c === 'prussian') {
|
|
44
|
-
container.activeBg = 'blue.30';
|
|
45
|
-
container.hoverBg = 'blue.20';
|
|
46
|
-
container.hoverBorderColor = 'blue.20';
|
|
47
|
-
}
|
|
48
|
-
return { container };
|
|
49
|
-
}
|
|
50
1
|
const baseStyle = {};
|
|
51
2
|
const defaultProps = {
|
|
52
|
-
colorScheme: 'prussian',
|
|
53
3
|
size: 'md',
|
|
54
|
-
variant: '
|
|
4
|
+
variant: 'primaryDark'
|
|
55
5
|
};
|
|
56
6
|
const parts = ['container', 'icon', 'text'];
|
|
57
7
|
const sizes = {
|
|
58
|
-
|
|
8
|
+
sm: {
|
|
59
9
|
container: {
|
|
60
10
|
fontSize: 'sm',
|
|
61
11
|
h: 24,
|
|
@@ -67,7 +17,7 @@ const sizes = {
|
|
|
67
17
|
},
|
|
68
18
|
text: {}
|
|
69
19
|
},
|
|
70
|
-
|
|
20
|
+
md: {
|
|
71
21
|
container: {
|
|
72
22
|
fontSize: 'sm',
|
|
73
23
|
h: 32,
|
|
@@ -79,7 +29,7 @@ const sizes = {
|
|
|
79
29
|
},
|
|
80
30
|
text: {}
|
|
81
31
|
},
|
|
82
|
-
|
|
32
|
+
lg: {
|
|
83
33
|
container: {
|
|
84
34
|
fontSize: 'md',
|
|
85
35
|
h: 40,
|
|
@@ -91,7 +41,7 @@ const sizes = {
|
|
|
91
41
|
},
|
|
92
42
|
text: {}
|
|
93
43
|
},
|
|
94
|
-
|
|
44
|
+
xl: {
|
|
95
45
|
container: {
|
|
96
46
|
fontSize: 'lg',
|
|
97
47
|
h: 48,
|
|
@@ -105,9 +55,221 @@ const sizes = {
|
|
|
105
55
|
}
|
|
106
56
|
};
|
|
107
57
|
const variants = {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
58
|
+
primaryDark: {
|
|
59
|
+
container: {
|
|
60
|
+
bg: 'buttonTypePrimaryDefaultBackgroundColorDark',
|
|
61
|
+
borderColor: 'buttonTypePrimaryDefaultBorderColorDark',
|
|
62
|
+
color: 'buttonTypePrimaryDefaultTextColorDark',
|
|
63
|
+
hoverBg: 'buttonTypePrimaryHoverBackgroundColorDark',
|
|
64
|
+
hoverBorderColor: 'buttonTypePrimaryHoverBorderColorDark',
|
|
65
|
+
hoverColor: 'buttonTypePrimaryHoverTextColorDark',
|
|
66
|
+
activeBg: 'buttonTypePrimaryActiveBackgroundColorDark',
|
|
67
|
+
activeBorderColor: 'buttonTypePrimaryActiveBorderColorDark',
|
|
68
|
+
activeColor: 'buttonTypePrimaryActiveTextColorDark'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
primaryLight: {
|
|
72
|
+
container: {
|
|
73
|
+
bg: 'buttonTypePrimaryDefaultBackgroundColorLight',
|
|
74
|
+
borderColor: 'buttonTypePrimaryDefaultBorderColorLight',
|
|
75
|
+
color: 'buttonTypePrimaryDefaultTextColorLight',
|
|
76
|
+
hoverBg: 'buttonTypePrimaryHoverBackgroundColorLight',
|
|
77
|
+
hoverBorderColor: 'buttonTypePrimaryHoverBorderColorLight',
|
|
78
|
+
hoverColor: 'buttonTypePrimaryHoverTextColorLight',
|
|
79
|
+
activeBg: 'buttonTypePrimaryActiveBackgroundColorLight',
|
|
80
|
+
activeBorderColor: 'buttonTypePrimaryActiveBorderColorLight',
|
|
81
|
+
activeColor: 'buttonTypePrimaryActiveTextColorLight'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
secondaryDark: {
|
|
85
|
+
container: {
|
|
86
|
+
bg: 'buttonTypeSecondaryDefaultBackgroundColorDark',
|
|
87
|
+
borderColor: 'buttonTypeSecondaryDefaultBorderColorDark',
|
|
88
|
+
color: 'buttonTypeSecondaryDefaultTextColorDark',
|
|
89
|
+
// discussed with Jesus, the decision was made on 2-may-2022 that OneDesign designers will update to VUI shade
|
|
90
|
+
// hover will change from 90 to 85
|
|
91
|
+
hoverBg: 'buttonTypeSecondaryHoverBackgroundColorDark',
|
|
92
|
+
hoverBorderColor: 'buttonTypeSecondaryHoverBorderColorDark',
|
|
93
|
+
hoverColor: 'buttonTypeSecondaryHoverTextColorDark',
|
|
94
|
+
// discussed with Jesus, the decision was made on 2-may-2022 that OneDesign designers will update to VUI shade
|
|
95
|
+
// active will change from 95% to 90%
|
|
96
|
+
activeBg: 'buttonTypeSecondaryActiveBackgroundColorDark',
|
|
97
|
+
activeBorderColor: 'buttonTypeSecondaryActiveBorderColorDark',
|
|
98
|
+
activeColor: 'buttonTypeSecondaryActiveTextColorDark'
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
secondaryLight: {
|
|
102
|
+
container: {
|
|
103
|
+
bg: 'buttonTypeSecondaryDefaultBackgroundColorLight',
|
|
104
|
+
borderColor: 'buttonTypeSecondaryDefaultBorderColorLight',
|
|
105
|
+
color: 'buttonTypeSecondaryDefaultTextColorLight',
|
|
106
|
+
hoverBg: 'buttonTypeSecondaryHoverBackgroundColorLight',
|
|
107
|
+
hoverBorderColor: 'buttonTypeSecondaryHoverBorderColorLight',
|
|
108
|
+
hoverColor: 'buttonTypeSecondaryHoverTextColorLight',
|
|
109
|
+
activeBg: 'buttonTypeSecondaryActiveBackgroundColorLight',
|
|
110
|
+
activeBorderColor: 'buttonTypeSecondaryActiveBorderColorLight',
|
|
111
|
+
activeColor: 'buttonTypeSecondaryActiveTextColorLight'
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
tertiaryDark: {
|
|
115
|
+
container: {
|
|
116
|
+
bg: 'buttonTypeTertiaryDefaultBackgroundColorDark',
|
|
117
|
+
borderColor: 'buttonTypeTertiaryDefaultBorderColorDark',
|
|
118
|
+
color: 'buttonTypeTertiaryDefaultTextColorDark',
|
|
119
|
+
hoverBg: 'buttonTypeTertiaryHoverBackgroundColorDark',
|
|
120
|
+
hoverBorderColor: 'buttonTypeTertiaryHoverBorderColorDark',
|
|
121
|
+
hoverColor: 'buttonTypeTertiaryHoverTextColorDark',
|
|
122
|
+
activeBg: 'buttonTypeTertiaryActiveBackgroundColorDark',
|
|
123
|
+
activeBorderColor: 'buttonTypeTertiaryActiveBorderColorDark',
|
|
124
|
+
activeColor: 'buttonTypeTertiaryActiveTextColorDark'
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
tertiaryLight: {
|
|
128
|
+
container: {
|
|
129
|
+
bg: 'buttonTypeTertiaryDefaultBackgroundColorLight',
|
|
130
|
+
borderColor: 'buttonTypeTertiaryDefaultBorderColorLight',
|
|
131
|
+
color: 'buttonTypeTertiaryDefaultTextColorLight',
|
|
132
|
+
hoverBg: 'buttonTypeTertiaryHoverBackgroundColorLight',
|
|
133
|
+
hoverBorderColor: 'buttonTypeTertiaryHoverBorderColorLight',
|
|
134
|
+
hoverColor: 'buttonTypeTertiaryHoverTextColorLight',
|
|
135
|
+
activeBg: 'buttonTypeTertiaryActiveBackgroundColorLight',
|
|
136
|
+
activeBorderColor: 'buttonTypeTertiaryActiveBorderColorLight',
|
|
137
|
+
activeColor: 'buttonTypeTertiaryActiveTextColorLight'
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
solidBlue: {
|
|
141
|
+
container: {
|
|
142
|
+
bg: 'seaBlue.28',
|
|
143
|
+
borderColor: 'seaBlue.28',
|
|
144
|
+
color: 'white',
|
|
145
|
+
disabledBg: 'darkBlue.75',
|
|
146
|
+
disabledBorderColor: 'darkBlue.75',
|
|
147
|
+
disabledColor: 'white',
|
|
148
|
+
// proper order next: hover, focus, active
|
|
149
|
+
hoverBg: 'seaBlue.20',
|
|
150
|
+
hoverBorderColor: 'seaBlue.20',
|
|
151
|
+
focusBg: 'seaBlue.28',
|
|
152
|
+
activeBg: 'seaBlue.35',
|
|
153
|
+
activeBorderColor: 'seaBlue.35'
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
blueOutlined: {
|
|
157
|
+
container: {
|
|
158
|
+
bg: 'white',
|
|
159
|
+
borderColor: 'seaBlue.28',
|
|
160
|
+
color: 'seaBlue.28',
|
|
161
|
+
disabledBg: 'white',
|
|
162
|
+
disabledBorderColor: 'darkBlue.75',
|
|
163
|
+
disabledColor: 'darkBlue.75',
|
|
164
|
+
hoverBg: 'skyBlue.85',
|
|
165
|
+
hoverBorderColor: 'seaBlue.35',
|
|
166
|
+
// focusBg: 'white',
|
|
167
|
+
activeBg: 'skyBlue.90',
|
|
168
|
+
activeBorderColor: 'seaBlue.35'
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
blueText: {
|
|
172
|
+
container: {
|
|
173
|
+
bg: 'transparent',
|
|
174
|
+
borderColor: 'transparent',
|
|
175
|
+
color: 'seaBlue.28',
|
|
176
|
+
disabledBg: 'white',
|
|
177
|
+
disabledBorderColor: 'white',
|
|
178
|
+
disabledColor: 'darkBlue.75',
|
|
179
|
+
hoverBg: 'skyBlue.85',
|
|
180
|
+
hoverBorderColor: 'skyBlue.85',
|
|
181
|
+
focusBg: 'transparent',
|
|
182
|
+
activeBg: 'skyBlue.90',
|
|
183
|
+
activeBorderColor: 'skyBlue.90'
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
solidGreen: {
|
|
187
|
+
container: {
|
|
188
|
+
bg: 'landGreen.35',
|
|
189
|
+
borderColor: 'landGreen.35',
|
|
190
|
+
color: 'white',
|
|
191
|
+
disabledBg: 'landGreen.70',
|
|
192
|
+
disabledBorderColor: 'landGreen.70',
|
|
193
|
+
disabledColor: 'white',
|
|
194
|
+
hoverBg: 'landGreen.25',
|
|
195
|
+
hoverBorderColor: 'landGreen.25',
|
|
196
|
+
focusBg: 'landGreen.35',
|
|
197
|
+
activeBg: 'landGreen.41',
|
|
198
|
+
activeBorderColor: 'landGreen.41'
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
solidRed: {
|
|
202
|
+
container: {
|
|
203
|
+
bg: 'energyRed.45',
|
|
204
|
+
borderColor: 'energyRed.45',
|
|
205
|
+
color: 'white',
|
|
206
|
+
disabledBg: 'energyRed.80',
|
|
207
|
+
disabledBorderColor: 'energyRed.80',
|
|
208
|
+
disabledColor: 'white',
|
|
209
|
+
// proper order is important next: hover > focus > active
|
|
210
|
+
hoverBg: 'energyRed.35',
|
|
211
|
+
hoverBorderColor: 'energyRed.35',
|
|
212
|
+
focusBg: 'energyRed.45',
|
|
213
|
+
activeBg: 'energyRed.50',
|
|
214
|
+
activeBorderColor: 'energyRed.50'
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
// subtleBlue is an internal variant, used in notification; based on primaryDark
|
|
218
|
+
subtleBlue: {
|
|
219
|
+
container: {
|
|
220
|
+
bg: 'transparent',
|
|
221
|
+
borderColor: 'transparent',
|
|
222
|
+
color: 'seaBlue.28',
|
|
223
|
+
disabledBg: 'white',
|
|
224
|
+
disabledBorderColor: 'darkBlue.75',
|
|
225
|
+
disabledColor: 'darkBlue.75',
|
|
226
|
+
// proper order is important next: hover > focus > active
|
|
227
|
+
hoverBg: 'skyBlue.90',
|
|
228
|
+
hoverBorderColor: 'skyBlue.90',
|
|
229
|
+
focusBg: 'transparent',
|
|
230
|
+
activeBg: 'skyBlue.85',
|
|
231
|
+
activeBorderColor: 'skyBlue.85'
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
// subtleRed is an internal variant, used in notification; based on primaryDark
|
|
235
|
+
subtleRed: {
|
|
236
|
+
container: {
|
|
237
|
+
bg: 'transparent',
|
|
238
|
+
borderColor: 'transparent',
|
|
239
|
+
// proper order is important next: hover > focus > active
|
|
240
|
+
hoverBg: 'energyRed.90',
|
|
241
|
+
hoverBorderColor: 'energyRed.90',
|
|
242
|
+
focusBg: 'transparent',
|
|
243
|
+
activeBg: 'energyRed.85',
|
|
244
|
+
color: 'energyRed.45'
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
// subtleYellow is an internal variant, used in notification; based on primaryDark
|
|
248
|
+
subtleYellow: {
|
|
249
|
+
container: {
|
|
250
|
+
bg: 'transparent',
|
|
251
|
+
borderColor: 'transparent',
|
|
252
|
+
// proper order is important next: hover > focus > active
|
|
253
|
+
hoverBg: 'sunflower.70',
|
|
254
|
+
hoverBorderColor: 'sunflower.70',
|
|
255
|
+
focusBg: 'transparent',
|
|
256
|
+
activeBg: 'sunflower.65',
|
|
257
|
+
color: 'sunflower.15'
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
// subtleGreen is an internal variant, used in notification; based on primaryDark
|
|
261
|
+
subtleGreen: {
|
|
262
|
+
container: {
|
|
263
|
+
bg: 'transparent',
|
|
264
|
+
borderColor: 'transparent',
|
|
265
|
+
// proper order is important next: hover > focus > active
|
|
266
|
+
hoverBg: 'landGreen.90',
|
|
267
|
+
hoverBorderColor: 'landGreen.90',
|
|
268
|
+
focusBg: 'transparent',
|
|
269
|
+
activeBg: 'landGreen.85',
|
|
270
|
+
color: 'landGreen.30'
|
|
271
|
+
}
|
|
272
|
+
}
|
|
111
273
|
};
|
|
112
274
|
export default {
|
|
113
275
|
baseStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonGroup.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/buttonGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAItD,eAAO,MAAM,eAAe;;sBAA2D,MAAM;SA2C5F,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"buttonGroup.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/buttonGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAItD,eAAO,MAAM,eAAe;;sBAA2D,MAAM;SA2C5F,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,yDActB,CAAA;AAEF,eAAe,WAAW,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { styled, th, vui } from '../core';
|
|
3
|
-
import { activeClassName,
|
|
3
|
+
import { activeClassName, cs, filterUndefined } from '../utils';
|
|
4
4
|
import { ButtonGroupProvider } from './context';
|
|
5
5
|
import { getInnerBorderColor } from './helpers';
|
|
6
6
|
export const ButtonGroupBase = styled.divBox `
|
|
@@ -39,12 +39,12 @@ export const ButtonGroupBase = styled.divBox `
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
> *:disabled {
|
|
42
|
-
border-color: disabled.border;
|
|
42
|
+
border-color: disabled .border;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
//
|
|
46
46
|
> .${activeClassName} {
|
|
47
|
-
background-color: ${p => th.color(
|
|
47
|
+
background-color: ${p => th.color('skyBlue.90')};
|
|
48
48
|
}
|
|
49
49
|
`;
|
|
50
50
|
/**
|
|
@@ -52,9 +52,9 @@ export const ButtonGroupBase = styled.divBox `
|
|
|
52
52
|
* Exposes some props to the children via context.
|
|
53
53
|
*/
|
|
54
54
|
export const ButtonGroup = vui((props, ref) => {
|
|
55
|
-
const { className,
|
|
56
|
-
const context = useMemo(() => filterUndefined({
|
|
55
|
+
const { className, disabled, innerBorderColor, size, variant = 'secondaryDark', ...rest } = props;
|
|
56
|
+
const context = useMemo(() => filterUndefined({ disabled, size, variant }), [disabled, size, variant]);
|
|
57
57
|
return (React.createElement(ButtonGroupProvider, { value: context },
|
|
58
|
-
React.createElement(ButtonGroupBase, { className: cs('vui-buttonGroup', className), ...{
|
|
58
|
+
React.createElement(ButtonGroupBase, { className: cs('vui-buttonGroup', className), ...{ innerBorderColor: innerBorderColor ? innerBorderColor : getInnerBorderColor(props), ref }, ...rest })));
|
|
59
59
|
});
|
|
60
60
|
export default ButtonGroup;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ButtonColorScheme } from '../button/button.types';
|
|
2
1
|
import { SystemProps } from '../system';
|
|
3
2
|
import { ThemingProps } from '../theme';
|
|
4
3
|
export declare type ButtonGroupProps = SystemProps & ThemingProps<'ButtonGroup'> & {
|
|
5
|
-
/** Available theme colors for this component. */
|
|
6
|
-
colorScheme?:
|
|
4
|
+
/** Available theme colors for this component. @deprecated */
|
|
5
|
+
colorScheme?: string;
|
|
7
6
|
/** Makes all wrapped buttons disabled. */
|
|
8
7
|
disabled?: boolean;
|
|
9
8
|
/** Border color between the buttons. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonGroup.types.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/buttonGroup.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"buttonGroup.types.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/buttonGroup.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,oBAAY,gBAAgB,GAAG,WAAW,GACxC,YAAY,CAAC,aAAa,CAAC,GAAG;IAC5B,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/buttonGroup/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAMnE"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/** Returns appropriate color for the border between the buttons. */
|
|
2
2
|
export function getInnerBorderColor(props) {
|
|
3
|
-
const {
|
|
3
|
+
const { disabled, variant } = props;
|
|
4
4
|
if (disabled)
|
|
5
5
|
return 'disabled.border';
|
|
6
|
-
|
|
7
|
-
return `${colorScheme}.${shade}`;
|
|
6
|
+
return `${variant}`;
|
|
8
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonToggleGroup.d.ts","sourceRoot":"","sources":["../../../src/buttonToggleGroup/buttonToggleGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAElE;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,
|
|
1
|
+
{"version":3,"file":"buttonToggleGroup.d.ts","sourceRoot":"","sources":["../../../src/buttonToggleGroup/buttonToggleGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAElE;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,gBAU9D,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -6,6 +6,6 @@ import { cs, dimmedBorderColor } from '../utils';
|
|
|
6
6
|
*/
|
|
7
7
|
export const ButtonToggleGroup = (props) => {
|
|
8
8
|
const { className, isDimmedBorder } = props;
|
|
9
|
-
return (React.createElement(ButtonGroup, { className: cs('vui-buttonToggleGroup', className),
|
|
9
|
+
return (React.createElement(ButtonGroup, { className: cs('vui-buttonToggleGroup', className), innerBorderColor: isDimmedBorder ? dimmedBorderColor : '', ...props }));
|
|
10
10
|
};
|
|
11
11
|
export default ButtonToggleGroup;
|
|
@@ -5,7 +5,7 @@ import T from '../t';
|
|
|
5
5
|
import { cs, filterUndefined } from '../utils';
|
|
6
6
|
import { useCheckboxGroupContext } from './context';
|
|
7
7
|
const CheckboxControl = styled.spanBox `
|
|
8
|
-
border-radius:
|
|
8
|
+
border-radius: none;
|
|
9
9
|
display: inline-flex;
|
|
10
10
|
flex-shrink: 0;
|
|
11
11
|
position: relative;
|
|
@@ -12,7 +12,7 @@ import { useCopyToClipboard } from './useCopyToClipboard';
|
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
export const CopyToClipboard = vui((props, ref) => {
|
|
15
|
-
const { disabled, copyText, className, size = '
|
|
15
|
+
const { disabled, copyText, className, size = 'sm', variant = 'tertiaryDark', ...rest } = props;
|
|
16
16
|
const { copy, isCopyDisabled } = useCopyToClipboard(copyText);
|
|
17
17
|
return (React.createElement(Button, { className: cs('vui-copy-to-clipboard', className), disabled: disabled || isCopyDisabled, icon: "falCopy", onClick: () => copy(), ref: ref, size: size, variant: variant, ...rest }));
|
|
18
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalStyle.d.ts","sourceRoot":"","sources":["../../../../src/core/vuiProvider/globalStyle.tsx"],"names":[],"mappings":"AAMA,aAAK,gBAAgB,GAAG;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED;;;;;;GAMG;;AACH,
|
|
1
|
+
{"version":3,"file":"globalStyle.d.ts","sourceRoot":"","sources":["../../../../src/core/vuiProvider/globalStyle.tsx"],"names":[],"mappings":"AAMA,aAAK,gBAAgB,GAAG;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED;;;;;;GAMG;;AACH,wBA2EC"}
|
|
@@ -11,62 +11,79 @@ import fontFaces from './fontFaces';
|
|
|
11
11
|
* - CSS variables for each theme value
|
|
12
12
|
*/
|
|
13
13
|
export default createGlobalStyle `
|
|
14
|
-
|
|
14
|
+
${fontFaces}
|
|
15
|
+
:root {
|
|
16
|
+
${generateCSSVariables}
|
|
17
|
+
}
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
* {
|
|
20
|
+
--x-ring-color: var(--vui-colors-focusColor);
|
|
21
|
+
// Fixes a box-shadow issue between some parent and child components
|
|
22
|
+
--x-shadow: 0 0 0 0 transparent;
|
|
23
|
+
}
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
--x-shadow: 0 0 0 0 transparent;
|
|
24
|
-
}
|
|
25
|
+
button {
|
|
26
|
+
--x-ring-color: transparent;
|
|
27
|
+
}
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
button:focus-visible, li:focus-visible {
|
|
30
|
+
--x-ring-color: var(--vui-colors-focusColor);
|
|
31
|
+
outline: var(--vui-colors-focusColor) solid 3px;
|
|
32
|
+
z-index: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
${p => p.globalStyle &&
|
|
27
36
|
css `
|
|
28
37
|
body {
|
|
29
|
-
color:
|
|
38
|
+
color: sandstone 0.1;
|
|
30
39
|
font-family: avenir;
|
|
31
40
|
font-size: md;
|
|
32
41
|
}
|
|
42
|
+
|
|
43
|
+
h1,
|
|
44
|
+
h2,
|
|
45
|
+
h3,
|
|
46
|
+
h4,
|
|
47
|
+
h5 {
|
|
48
|
+
color: darkBlue 0.18;
|
|
49
|
+
}
|
|
33
50
|
`}
|
|
34
51
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
52
|
+
@keyframes vui-bounce {
|
|
53
|
+
${bounce}
|
|
54
|
+
}
|
|
38
55
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
56
|
+
@keyframes vui-fadeDown {
|
|
57
|
+
${fadeDown}
|
|
58
|
+
}
|
|
42
59
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
60
|
+
@keyframes vui-fadeIn {
|
|
61
|
+
${fadeIn}
|
|
62
|
+
}
|
|
46
63
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
64
|
+
@keyframes vui-fadeLeft {
|
|
65
|
+
${fadeLeft}
|
|
66
|
+
}
|
|
50
67
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
68
|
+
@keyframes vui-fadeOut {
|
|
69
|
+
${fadeOut}
|
|
70
|
+
}
|
|
54
71
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
72
|
+
@keyframes vui-fadeRight {
|
|
73
|
+
${fadeRight}
|
|
74
|
+
}
|
|
58
75
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
76
|
+
@keyframes vui-fadeUp {
|
|
77
|
+
${fadeUp}
|
|
78
|
+
}
|
|
62
79
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
80
|
+
@keyframes vui-pulse {
|
|
81
|
+
${pulse}
|
|
82
|
+
}
|
|
66
83
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
84
|
+
@keyframes vui-spin {
|
|
85
|
+
${spin}
|
|
86
|
+
}
|
|
70
87
|
`;
|
|
71
88
|
/** Recursively maps through all theme styles and generates a set of CSS properties. */
|
|
72
89
|
function generateCSSVariables() {
|
|
@@ -13,7 +13,7 @@ export const FooterTrademark = vui((props, ref) => {
|
|
|
13
13
|
const styles = useStyleConfig('Footer', useFooterContext());
|
|
14
14
|
return (React.createElement(Box, { className: cs('vui-footerTrademark', className), ref: ref, w: "100%", wrap: true, ...styles.trademark, ...rest },
|
|
15
15
|
React.createElement(FooterColumn, { centerV: true, flex: { xs: '0 0 100%', md: '0 0 25%' } },
|
|
16
|
-
React.createElement(Link, {
|
|
16
|
+
React.createElement(Link, { fontWeight: "demi", href: linkedIn ?? defaultLinkedInUrl, iconLeft: React.createElement(Link.Icon, { mr: 1, name: "fabLinkedin", size: "sm" }), isExternal: true, variant: "white" }, "Follow us")),
|
|
17
17
|
React.createElement(FooterColumn, { centerV: true, flex: { xs: '0 0 100%', md: '0 0 75%' } },
|
|
18
18
|
React.createElement(T, { size: "xs" },
|
|
19
19
|
React.createElement(T, { size: "xs", weight: "demi" }, "Veracity by DNV"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../src/heading/heading.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,eAAO,MAAM,WAAW,8HAGvB,CAAA;AAED,6FAA6F;AAC7F,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../src/heading/heading.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,eAAO,MAAM,WAAW,8HAGvB,CAAA;AAED,6FAA6F;AAC7F,eAAO,MAAM,OAAO,oDAmClB,CAAA;AAEF,eAAe,OAAO,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { omitThemingProps, styled, useStyleConfig, vui } from '../core';
|
|
2
|
+
import { omitThemingProps, styled, useStyleConfig, useUp, vui } from '../core';
|
|
3
3
|
import { cs, filterUndefined } from '../utils';
|
|
4
4
|
export const HeadingBase = styled.h2Box `
|
|
5
5
|
font-weight: demi;
|
|
@@ -9,6 +9,7 @@ export const HeadingBase = styled.h2Box `
|
|
|
9
9
|
export const Heading = vui((props, ref) => {
|
|
10
10
|
const { align, casing, children, className, decoration, text, weight, ...rest } = omitThemingProps(props);
|
|
11
11
|
const styles = useStyleConfig('Heading', props);
|
|
12
|
+
const { fontSize, lineHeight, ...restStyles } = styles;
|
|
12
13
|
const hClassName = props.size ? `vui-${props.size}` : '';
|
|
13
14
|
const aliasedProps = filterUndefined({
|
|
14
15
|
fontWeight: weight,
|
|
@@ -16,6 +17,11 @@ export const Heading = vui((props, ref) => {
|
|
|
16
17
|
textDecoration: decoration,
|
|
17
18
|
textTransform: casing
|
|
18
19
|
});
|
|
19
|
-
|
|
20
|
+
const isDesktop = useUp(993);
|
|
21
|
+
const fontSizeDesktop = fontSize?.desktop || fontSize;
|
|
22
|
+
const fontSizeMobile = fontSize?.mobile || fontSize;
|
|
23
|
+
const lineHeightDesktop = lineHeight?.desktop || lineHeight;
|
|
24
|
+
const lineHeightMobile = lineHeight?.mobile || lineHeight;
|
|
25
|
+
return (React.createElement(HeadingBase, { className: cs('vui-heading', hClassName, className), fontSize: isDesktop ? fontSizeDesktop : fontSizeMobile, lineHeight: isDesktop ? lineHeightDesktop : lineHeightMobile, ref: ref, ...restStyles, ...aliasedProps, ...rest }, children ?? text));
|
|
20
26
|
});
|
|
21
27
|
export default Heading;
|
|
@@ -13,4 +13,5 @@ export declare type HeadingProps = SystemProps & ThemingProps<'Heading'> & {
|
|
|
13
13
|
/** Alias for fontWeight prop. @deprecated */
|
|
14
14
|
weight?: TypographyProps['fontWeight'];
|
|
15
15
|
};
|
|
16
|
+
export declare type HeadingSize = 'title' | 'lead' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
16
17
|
//# sourceMappingURL=heading.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.types.d.ts","sourceRoot":"","sources":["../../../src/heading/heading.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,oBAAY,YAAY,GAAG,WAAW,GACpC,YAAY,CAAC,SAAS,CAAC,GAAG;IACxB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACpC,gDAAgD;IAChD,MAAM,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,CAAA;IACzC,iDAAiD;IACjD,UAAU,CAAC,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAA;IAC9C,uDAAuD;IACvD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAA;CACvC,CAAA"}
|
|
1
|
+
{"version":3,"file":"heading.types.d.ts","sourceRoot":"","sources":["../../../src/heading/heading.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,oBAAY,YAAY,GAAG,WAAW,GACpC,YAAY,CAAC,SAAS,CAAC,GAAG;IACxB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACpC,gDAAgD;IAChD,MAAM,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,CAAA;IACzC,iDAAiD;IACjD,UAAU,CAAC,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAA;IAC9C,uDAAuD;IACvD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAA;CACvC,CAAA;AAEH,oBAAY,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA"}
|