@veracity/vui 1.7.0-redesign.6 → 1.7.1
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/accordion/accordion.types.d.ts +2 -0
- package/dist/cjs/accordion/accordion.types.d.ts.map +1 -1
- package/dist/cjs/accordion/accordionItemHorizontal.d.ts.map +1 -1
- package/dist/cjs/accordion/accordionItemHorizontal.js +3 -2
- package/dist/cjs/avatar/avatar.js +1 -1
- 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 +23 -16
- package/dist/cjs/button/button.types.d.ts +4 -3
- 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 +44 -121
- package/dist/cjs/button/theme.d.ts.map +1 -1
- package/dist/cjs/button/theme.js +54 -135
- 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 +3 -2
- 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 +3 -2
- 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 +38 -56
- package/dist/cjs/footer/footerTrademark.js +1 -1
- package/dist/cjs/heading/theme.d.ts +1 -23
- package/dist/cjs/heading/theme.d.ts.map +1 -1
- package/dist/cjs/heading/theme.js +7 -29
- 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 +0 -5
- package/dist/cjs/icon/theme.d.ts.map +1 -1
- package/dist/cjs/icon/theme.js +0 -5
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +0 -1
- 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 +2 -0
- package/dist/cjs/link/link.types.d.ts.map +1 -1
- package/dist/cjs/link/theme.d.ts +4 -21
- package/dist/cjs/link/theme.d.ts.map +1 -1
- package/dist/cjs/link/theme.js +17 -30
- package/dist/cjs/list/listItem.d.ts.map +1 -1
- package/dist/cjs/list/listItem.js +2 -6
- package/dist/cjs/notification/consts.js +10 -10
- package/dist/cjs/notification/notification.d.ts.map +1 -1
- package/dist/cjs/notification/notification.js +8 -10
- 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 +1 -5
- package/dist/cjs/notification/notificationIcon.d.ts.map +1 -1
- package/dist/cjs/notification/notificationIcon.js +2 -3
- 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 +16 -31
- package/dist/cjs/notification/theme.d.ts.map +1 -1
- package/dist/cjs/notification/theme.js +26 -32
- package/dist/cjs/p/theme.d.ts +8 -0
- package/dist/cjs/p/theme.d.ts.map +1 -1
- package/dist/cjs/p/theme.js +11 -3
- package/dist/cjs/progress/progress.js +1 -1
- package/dist/cjs/select/selectButton.js +1 -1
- package/dist/cjs/t/theme.d.ts +1 -10
- package/dist/cjs/t/theme.d.ts.map +1 -1
- package/dist/cjs/t/theme.js +1 -10
- package/dist/cjs/table/tbody.d.ts.map +1 -1
- package/dist/cjs/table/tbody.js +0 -4
- package/dist/cjs/table/theme.d.ts +0 -5
- package/dist/cjs/table/theme.d.ts.map +1 -1
- package/dist/cjs/table/theme.js +1 -6
- 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 +5 -13
- package/dist/cjs/tabs/theme.d.ts +4 -40
- package/dist/cjs/tabs/theme.d.ts.map +1 -1
- package/dist/cjs/tabs/theme.js +4 -41
- package/dist/cjs/tag/tag.d.ts.map +1 -1
- package/dist/cjs/tag/tag.js +6 -9
- package/dist/cjs/tag/tag.types.d.ts +2 -3
- package/dist/cjs/tag/tag.types.d.ts.map +1 -1
- package/dist/cjs/tag/tagButton.js +1 -3
- package/dist/cjs/tag/theme.d.ts +32 -178
- package/dist/cjs/tag/theme.d.ts.map +1 -1
- package/dist/cjs/tag/theme.js +65 -182
- package/dist/cjs/textarea/textarea.js +1 -1
- package/dist/cjs/theme/components.d.ts +39 -497
- package/dist/cjs/theme/components.d.ts.map +1 -1
- package/dist/cjs/theme/components.js +68 -70
- package/dist/cjs/theme/defaultTheme.d.ts +46 -795
- package/dist/cjs/theme/defaultTheme.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/colors.d.ts +0 -523
- package/dist/cjs/theme/foundations/colors.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/colors.js +1 -389
- package/dist/cjs/theme/foundations/fontWeights.d.ts +1 -0
- package/dist/cjs/theme/foundations/fontWeights.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/fontWeights.js +2 -1
- package/dist/cjs/theme/foundations/index.d.ts +1 -292
- package/dist/cjs/theme/foundations/index.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/radii.d.ts +0 -5
- package/dist/cjs/theme/foundations/radii.d.ts.map +1 -1
- package/dist/cjs/theme/foundations/radii.js +3 -8
- package/dist/cjs/toast/toast.d.ts +1 -1
- package/dist/cjs/toast/toast.js +1 -1
- 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/accordion/accordion.types.d.ts +2 -0
- package/dist/esm/accordion/accordion.types.d.ts.map +1 -1
- package/dist/esm/accordion/accordionItemHorizontal.d.ts.map +1 -1
- package/dist/esm/accordion/accordionItemHorizontal.js +3 -2
- package/dist/esm/avatar/avatar.js +1 -1
- 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 +23 -16
- package/dist/esm/button/button.types.d.ts +4 -3
- 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 +44 -121
- package/dist/esm/button/theme.d.ts.map +1 -1
- package/dist/esm/button/theme.js +58 -135
- 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 +3 -2
- 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 +3 -2
- 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 +38 -56
- package/dist/esm/footer/footerTrademark.js +1 -1
- package/dist/esm/heading/theme.d.ts +1 -23
- package/dist/esm/heading/theme.d.ts.map +1 -1
- package/dist/esm/heading/theme.js +7 -29
- 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 +0 -5
- package/dist/esm/icon/theme.d.ts.map +1 -1
- package/dist/esm/icon/theme.js +0 -5
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- 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 +2 -0
- package/dist/esm/link/link.types.d.ts.map +1 -1
- package/dist/esm/link/theme.d.ts +4 -21
- package/dist/esm/link/theme.d.ts.map +1 -1
- package/dist/esm/link/theme.js +17 -30
- package/dist/esm/list/listItem.d.ts.map +1 -1
- package/dist/esm/list/listItem.js +2 -6
- package/dist/esm/notification/consts.js +10 -10
- package/dist/esm/notification/notification.d.ts.map +1 -1
- package/dist/esm/notification/notification.js +9 -11
- 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 +1 -4
- package/dist/esm/notification/notificationIcon.d.ts.map +1 -1
- package/dist/esm/notification/notificationIcon.js +2 -3
- 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 +16 -31
- package/dist/esm/notification/theme.d.ts.map +1 -1
- package/dist/esm/notification/theme.js +26 -32
- package/dist/esm/p/theme.d.ts +8 -0
- package/dist/esm/p/theme.d.ts.map +1 -1
- package/dist/esm/p/theme.js +11 -3
- package/dist/esm/progress/progress.js +1 -1
- package/dist/esm/select/selectButton.js +1 -1
- package/dist/esm/t/theme.d.ts +1 -10
- package/dist/esm/t/theme.d.ts.map +1 -1
- package/dist/esm/t/theme.js +1 -10
- package/dist/esm/table/tbody.d.ts.map +1 -1
- package/dist/esm/table/tbody.js +0 -4
- package/dist/esm/table/theme.d.ts +0 -5
- package/dist/esm/table/theme.d.ts.map +1 -1
- package/dist/esm/table/theme.js +1 -6
- 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 +4 -12
- package/dist/esm/tabs/theme.d.ts +4 -40
- package/dist/esm/tabs/theme.d.ts.map +1 -1
- package/dist/esm/tabs/theme.js +4 -41
- package/dist/esm/tag/tag.d.ts.map +1 -1
- package/dist/esm/tag/tag.js +6 -9
- package/dist/esm/tag/tag.types.d.ts +2 -3
- package/dist/esm/tag/tag.types.d.ts.map +1 -1
- package/dist/esm/tag/tagButton.js +1 -3
- package/dist/esm/tag/theme.d.ts +32 -178
- package/dist/esm/tag/theme.d.ts.map +1 -1
- package/dist/esm/tag/theme.js +65 -182
- package/dist/esm/textarea/textarea.js +1 -1
- package/dist/esm/theme/components.d.ts +39 -497
- package/dist/esm/theme/components.d.ts.map +1 -1
- package/dist/esm/theme/components.js +0 -2
- package/dist/esm/theme/defaultTheme.d.ts +46 -795
- package/dist/esm/theme/defaultTheme.d.ts.map +1 -1
- package/dist/esm/theme/foundations/colors.d.ts +0 -523
- package/dist/esm/theme/foundations/colors.d.ts.map +1 -1
- package/dist/esm/theme/foundations/colors.js +0 -365
- package/dist/esm/theme/foundations/fontWeights.d.ts +1 -0
- package/dist/esm/theme/foundations/fontWeights.d.ts.map +1 -1
- package/dist/esm/theme/foundations/fontWeights.js +2 -1
- package/dist/esm/theme/foundations/index.d.ts +1 -292
- package/dist/esm/theme/foundations/index.d.ts.map +1 -1
- package/dist/esm/theme/foundations/radii.d.ts +0 -5
- package/dist/esm/theme/foundations/radii.d.ts.map +1 -1
- package/dist/esm/theme/foundations/radii.js +3 -8
- package/dist/esm/toast/toast.d.ts +1 -1
- package/dist/esm/toast/toast.js +1 -1
- 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 +2 -2
- package/src/accordion/accordion.types.ts +2 -0
- package/src/accordion/accordionItemHorizontal.tsx +4 -1
- package/src/avatar/avatar.tsx +1 -1
- package/src/button/button.tsx +28 -19
- package/src/button/button.types.ts +8 -4
- package/src/button/buttons.tsx +8 -8
- package/src/button/consts.ts +3 -3
- package/src/button/theme.ts +71 -143
- package/src/buttonGroup/buttonGroup.tsx +9 -6
- package/src/buttonGroup/buttonGroup.types.ts +3 -2
- package/src/buttonGroup/helpers.ts +4 -2
- package/src/buttonToggleGroup/buttonToggleGroup.tsx +2 -0
- package/src/checkbox/checkbox.tsx +1 -1
- package/src/copyToClipboard/copyToClipboard.tsx +1 -1
- package/src/core/vuiProvider/globalStyle.tsx +38 -56
- package/src/footer/footerTrademark.tsx +1 -1
- package/src/heading/theme.ts +7 -29
- package/src/icon/icon.types.ts +1 -1
- package/src/icon/theme.ts +0 -5
- package/src/index.ts +0 -1
- package/src/input/input.tsx +1 -1
- package/src/input/inputInput.tsx +1 -1
- package/src/link/link.tsx +3 -2
- package/src/link/link.types.ts +2 -0
- package/src/link/theme.ts +20 -30
- package/src/list/listItem.tsx +2 -6
- package/src/notification/consts.ts +10 -10
- package/src/notification/notification.tsx +11 -17
- package/src/notification/notification.types.ts +2 -2
- package/src/notification/notificationButton.tsx +5 -10
- package/src/notification/notificationIcon.tsx +3 -6
- package/src/notification/notificationText.tsx +1 -2
- package/src/notification/notificationTitle.tsx +9 -3
- package/src/notification/theme.ts +34 -32
- package/src/p/theme.ts +11 -3
- package/src/progress/progress.tsx +1 -1
- package/src/select/selectButton.tsx +1 -1
- package/src/t/theme.ts +1 -10
- package/src/table/tbody.tsx +0 -4
- package/src/table/theme.ts +1 -6
- package/src/tabs/tabs.types.ts +2 -2
- package/src/tabs/tabsNavBar.tsx +6 -23
- package/src/tabs/theme.ts +4 -41
- package/src/tag/tag.tsx +10 -11
- package/src/tag/tag.types.ts +31 -32
- package/src/tag/tagButton.tsx +2 -2
- package/src/tag/theme.ts +80 -183
- package/src/textarea/textarea.tsx +1 -1
- package/src/theme/components.ts +0 -2
- package/src/theme/foundations/colors.ts +0 -401
- package/src/theme/foundations/fontWeights.ts +2 -1
- package/src/theme/foundations/radii.ts +3 -8
- package/src/toast/toast.tsx +1 -1
- package/src/toast/useToast.tsx +1 -2
- package/src/tutorial/tutorialCard.tsx +3 -10
- package/dist/cjs/badge/badge.d.ts +0 -9
- package/dist/cjs/badge/badge.d.ts.map +0 -1
- package/dist/cjs/badge/badge.js +0 -35
- package/dist/cjs/badge/badge.types.d.ts +0 -17
- package/dist/cjs/badge/badge.types.d.ts.map +0 -1
- package/dist/cjs/badge/badge.types.js +0 -2
- package/dist/cjs/badge/index.d.ts +0 -3
- package/dist/cjs/badge/index.d.ts.map +0 -1
- package/dist/cjs/badge/index.js +0 -23
- package/dist/cjs/badge/theme.d.ts +0 -130
- package/dist/cjs/badge/theme.d.ts.map +0 -1
- package/dist/cjs/badge/theme.js +0 -135
- package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.d.ts +0 -85
- package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.d.ts.map +0 -1
- package/dist/cjs/onedesign-tokens/dist/js/es6/rem/button.js +0 -88
- package/dist/esm/badge/badge.d.ts +0 -9
- package/dist/esm/badge/badge.d.ts.map +0 -1
- package/dist/esm/badge/badge.js +0 -17
- package/dist/esm/badge/badge.types.d.ts +0 -17
- package/dist/esm/badge/badge.types.d.ts.map +0 -1
- package/dist/esm/badge/badge.types.js +0 -1
- package/dist/esm/badge/index.d.ts +0 -3
- package/dist/esm/badge/index.d.ts.map +0 -1
- package/dist/esm/badge/index.js +0 -2
- package/dist/esm/badge/theme.d.ts +0 -130
- package/dist/esm/badge/theme.d.ts.map +0 -1
- package/dist/esm/badge/theme.js +0 -133
- package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.d.ts +0 -85
- package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.d.ts.map +0 -1
- package/dist/esm/onedesign-tokens/dist/js/es6/rem/button.js +0 -84
- package/src/badge/badge.tsx +0 -36
- package/src/badge/badge.types.ts +0 -17
- package/src/badge/index.ts +0 -2
- package/src/badge/theme.ts +0 -140
- package/src/onedesign-tokens/dist/js/es6/rem/button.js +0 -85
package/src/link/theme.ts
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
const container = {
|
|
3
|
-
color: `seaBlue.28`,
|
|
4
|
-
hoverColor: `seaBlue.28`
|
|
5
|
-
}
|
|
1
|
+
import { Dict } from '../utils'
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
}
|
|
3
|
+
function variantDefault(props: Dict) {
|
|
4
|
+
const { colorScheme: c } = props
|
|
9
5
|
|
|
10
|
-
function variantWhite() {
|
|
11
6
|
const container = {
|
|
12
|
-
color:
|
|
13
|
-
hoverColor: `
|
|
7
|
+
color: `${c}.80`,
|
|
8
|
+
hoverColor: `${c}.60`
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (c === 'white') {
|
|
12
|
+
container.color = 'white'
|
|
13
|
+
container.hoverColor = 'white'
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
return { container }
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
function variantLight() {
|
|
19
|
+
function variantLight(props: Dict) {
|
|
20
|
+
const { colorScheme: c } = props
|
|
21
|
+
|
|
20
22
|
const container = {
|
|
21
|
-
color:
|
|
22
|
-
hoverColor:
|
|
23
|
+
color: `${c}.60`,
|
|
24
|
+
hoverColor: `${c}.40`
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
return { container }
|
|
@@ -34,6 +36,7 @@ const variantPlain = {
|
|
|
34
36
|
const baseStyle = {}
|
|
35
37
|
|
|
36
38
|
const defaultProps = {
|
|
39
|
+
colorScheme: 'blue',
|
|
37
40
|
size: 'md',
|
|
38
41
|
variant: 'default'
|
|
39
42
|
}
|
|
@@ -43,8 +46,7 @@ const parts = ['container', 'icon', 'text']
|
|
|
43
46
|
const sizes = {
|
|
44
47
|
sm: {
|
|
45
48
|
container: {
|
|
46
|
-
fontSize: '
|
|
47
|
-
lineHeight: '16px'
|
|
49
|
+
fontSize: 'sm'
|
|
48
50
|
},
|
|
49
51
|
icon: {
|
|
50
52
|
size: 'xs'
|
|
@@ -52,8 +54,7 @@ const sizes = {
|
|
|
52
54
|
},
|
|
53
55
|
md: {
|
|
54
56
|
container: {
|
|
55
|
-
fontSize: '
|
|
56
|
-
lineHeight: '20px'
|
|
57
|
+
fontSize: 'md'
|
|
57
58
|
},
|
|
58
59
|
icon: {
|
|
59
60
|
size: 'xs'
|
|
@@ -61,17 +62,7 @@ const sizes = {
|
|
|
61
62
|
},
|
|
62
63
|
lg: {
|
|
63
64
|
container: {
|
|
64
|
-
fontSize: '
|
|
65
|
-
lineHeight: '24px'
|
|
66
|
-
},
|
|
67
|
-
icon: {
|
|
68
|
-
size: 'sm'
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
xl: {
|
|
72
|
-
container: {
|
|
73
|
-
fontSize: 'lg',
|
|
74
|
-
lineHeight: '28px'
|
|
65
|
+
fontSize: 'lg'
|
|
75
66
|
},
|
|
76
67
|
icon: {
|
|
77
68
|
size: 'sm'
|
|
@@ -82,8 +73,7 @@ const sizes = {
|
|
|
82
73
|
const variants = {
|
|
83
74
|
default: variantDefault,
|
|
84
75
|
light: variantLight,
|
|
85
|
-
plain: variantPlain
|
|
86
|
-
white: variantWhite
|
|
76
|
+
plain: variantPlain
|
|
87
77
|
}
|
|
88
78
|
|
|
89
79
|
export default {
|
package/src/list/listItem.tsx
CHANGED
|
@@ -29,15 +29,11 @@ export const ListItemBase = styled.liBox`
|
|
|
29
29
|
transition-duration: fast;
|
|
30
30
|
|
|
31
31
|
&[aria-disabled='true'] {
|
|
32
|
-
background-color: disabled
|
|
33
|
-
color: disabled
|
|
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
|
-
}
|
|
41
37
|
`
|
|
42
38
|
|
|
43
39
|
/**
|
|
@@ -2,35 +2,35 @@ import { NotificationStatusMapping } from './notification.types'
|
|
|
2
2
|
|
|
3
3
|
export const notificationStatusMapping: NotificationStatusMapping = {
|
|
4
4
|
error: {
|
|
5
|
+
colorScheme: 'red',
|
|
5
6
|
iconProps: {
|
|
6
7
|
name: 'falTimesCircle'
|
|
7
|
-
}
|
|
8
|
-
variant: 'subtleRed'
|
|
8
|
+
}
|
|
9
9
|
},
|
|
10
10
|
info: {
|
|
11
|
+
colorScheme: 'blue',
|
|
11
12
|
iconProps: {
|
|
12
13
|
name: 'falInfoCircle'
|
|
13
|
-
}
|
|
14
|
-
variant: 'subtleBlue'
|
|
14
|
+
}
|
|
15
15
|
},
|
|
16
16
|
loading: {
|
|
17
|
+
colorScheme: 'blue',
|
|
17
18
|
iconProps: {
|
|
18
19
|
animation: 'vui-spin 0.6s linear infinite',
|
|
19
20
|
name: 'fadSpinnerThird',
|
|
20
21
|
pathFill: ['blue.40', 'blue.60']
|
|
21
|
-
}
|
|
22
|
-
variant: 'subtleBlue'
|
|
22
|
+
}
|
|
23
23
|
},
|
|
24
24
|
success: {
|
|
25
|
+
colorScheme: 'green',
|
|
25
26
|
iconProps: {
|
|
26
27
|
name: 'falCheckCircle'
|
|
27
|
-
}
|
|
28
|
-
variant: 'subtleGreen'
|
|
28
|
+
}
|
|
29
29
|
},
|
|
30
30
|
warning: {
|
|
31
|
+
colorScheme: 'yellow',
|
|
31
32
|
iconProps: {
|
|
32
33
|
name: 'falExclamationCircle'
|
|
33
|
-
}
|
|
34
|
-
variant: 'subtleYellow'
|
|
34
|
+
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -20,7 +20,7 @@ export const Notification = vui<'div', NotificationProps>((props, ref) => {
|
|
|
20
20
|
action,
|
|
21
21
|
children,
|
|
22
22
|
className,
|
|
23
|
-
colorScheme: colorSchemeProp,
|
|
23
|
+
colorScheme: colorSchemeProp = 'blue',
|
|
24
24
|
icon,
|
|
25
25
|
onClose,
|
|
26
26
|
size,
|
|
@@ -28,46 +28,40 @@ export const Notification = vui<'div', NotificationProps>((props, ref) => {
|
|
|
28
28
|
statusMapping,
|
|
29
29
|
text,
|
|
30
30
|
title,
|
|
31
|
-
variant
|
|
32
|
-
verticalAlign,
|
|
31
|
+
variant,
|
|
33
32
|
...rest
|
|
34
33
|
} = props
|
|
35
34
|
const statuses = { ...notificationStatusMapping, ...statusMapping }
|
|
36
|
-
const {
|
|
37
|
-
const styles = useStyleConfig('Notification', {
|
|
35
|
+
const { colorScheme = colorSchemeProp } = statuses[status ?? ''] ?? {}
|
|
36
|
+
const styles = useStyleConfig('Notification', { colorScheme, ...props })
|
|
38
37
|
|
|
39
38
|
const iconName = isString(icon) ? icon : statuses[status ?? '']?.iconProps?.name
|
|
40
39
|
|
|
41
|
-
const context = filterUndefined<NotificationProps>({ size, status })
|
|
42
|
-
|
|
43
|
-
const titleDisplay = action ? 'block' : 'inline-flex'
|
|
44
|
-
|
|
45
|
-
const alignSelf = verticalAlign === 'center' ? 'center' : 'flex-start'
|
|
40
|
+
const context = filterUndefined<NotificationProps>({ colorScheme, size, status, variant })
|
|
46
41
|
|
|
47
42
|
return (
|
|
48
43
|
<NotificationProvider value={context}>
|
|
49
44
|
<Box
|
|
50
45
|
borderRadius="md"
|
|
51
|
-
borderWidth={1}
|
|
52
46
|
className={cs('vui-notification', className)}
|
|
47
|
+
px={1.5}
|
|
48
|
+
py={1}
|
|
53
49
|
ref={ref}
|
|
54
50
|
w="fit-content"
|
|
55
51
|
{...styles.container}
|
|
56
52
|
{...rest}
|
|
57
53
|
>
|
|
58
|
-
{iconName ? <NotificationIcon
|
|
54
|
+
{iconName ? <NotificationIcon name={iconName} /> : icon}
|
|
59
55
|
|
|
60
56
|
{children ?? (
|
|
61
|
-
<NotificationText
|
|
62
|
-
{isReactText(title) ? <NotificationTitle
|
|
57
|
+
<NotificationText>
|
|
58
|
+
{isReactText(title) ? <NotificationTitle text={title} /> : title} {text}
|
|
63
59
|
</NotificationText>
|
|
64
60
|
)}
|
|
65
61
|
|
|
66
62
|
{action}
|
|
67
63
|
|
|
68
|
-
{onClose &&
|
|
69
|
-
<NotificationButton alignSelf={alignSelf} icon="falTimes" onClick={onClose} variant={variant} w="32px" />
|
|
70
|
-
)}
|
|
64
|
+
{onClose && <NotificationButton icon="falTimes" onClick={onClose} />}
|
|
71
65
|
</Box>
|
|
72
66
|
</NotificationProvider>
|
|
73
67
|
)
|
|
@@ -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. @default blue */
|
|
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']
|
|
32
33
|
iconProps: IconProps
|
|
33
|
-
variant?: NotificationProps['variant']
|
|
34
34
|
}
|
|
35
35
|
>
|
|
@@ -3,7 +3,6 @@ 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'
|
|
7
6
|
import { useNotificationContext } from './context'
|
|
8
7
|
|
|
9
8
|
/** Displays an action button within the Notification. */
|
|
@@ -12,20 +11,16 @@ export const NotificationButton = vui<'button', ButtonProps>((props, ref) => {
|
|
|
12
11
|
const mergedProps = { ...useNotificationContext(), ...props }
|
|
13
12
|
const styles = useStyleConfig('Notification', useNotificationContext())
|
|
14
13
|
|
|
15
|
-
const { status = '' } = mergedProps
|
|
16
|
-
const { variant } = notificationStatusMapping[status] ?? {}
|
|
17
|
-
|
|
18
14
|
return (
|
|
19
15
|
<Button
|
|
20
16
|
className={cs('vui-notificationButton', className)}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
px="12px"
|
|
25
|
-
py="6px"
|
|
17
|
+
colorScheme={mergedProps.colorScheme}
|
|
18
|
+
ml={1}
|
|
19
|
+
mr={-0.5}
|
|
26
20
|
ref={ref}
|
|
21
|
+
size="sm"
|
|
22
|
+
variant="text"
|
|
27
23
|
{...styles.button}
|
|
28
|
-
variant={variant}
|
|
29
24
|
{...rest}
|
|
30
25
|
/>
|
|
31
26
|
)
|
|
@@ -8,21 +8,18 @@ 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,
|
|
11
|
+
const { className, ...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
|
-
|
|
20
18
|
return (
|
|
21
19
|
<Icon
|
|
22
|
-
alignSelf={alignSelf}
|
|
23
20
|
className={cs('vui-notificationIcon', className)}
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
mr={1}
|
|
22
|
+
my={0.5}
|
|
26
23
|
ref={ref}
|
|
27
24
|
size="md"
|
|
28
25
|
{...styles.icon}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { useStyleConfig, vui } from '../core'
|
|
4
|
-
import {
|
|
4
|
+
import { H6, HeadingProps } from '../heading'
|
|
5
5
|
import { cs } from '../utils'
|
|
6
6
|
import { useNotificationContext } from './context'
|
|
7
7
|
|
|
8
8
|
/** Displays a title within the Notification. */
|
|
9
|
-
export const NotificationTitle = vui<'
|
|
9
|
+
export const NotificationTitle = vui<'h6', HeadingProps>((props, ref) => {
|
|
10
10
|
const { className, ...rest } = props
|
|
11
11
|
const styles = useStyleConfig('Notification', useNotificationContext())
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
|
-
<
|
|
14
|
+
<H6
|
|
15
|
+
className={cs('vui-notificationTitle', className)}
|
|
16
|
+
display="inline-flex"
|
|
17
|
+
ref={ref}
|
|
18
|
+
{...styles.title}
|
|
19
|
+
{...rest}
|
|
20
|
+
/>
|
|
15
21
|
)
|
|
16
22
|
})
|
|
17
23
|
|
|
@@ -1,7 +1,39 @@
|
|
|
1
|
+
import { Dict } from '../utils'
|
|
2
|
+
|
|
3
|
+
function variantSubtle(props: Dict) {
|
|
4
|
+
const { colorScheme: c } = props
|
|
5
|
+
|
|
6
|
+
const container = {
|
|
7
|
+
bg: `${c}.20`,
|
|
8
|
+
borderColor: `${c}.80`,
|
|
9
|
+
borderWidth: 1,
|
|
10
|
+
color: `${c}.90`
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const button = {
|
|
14
|
+
color: `${c}.90`,
|
|
15
|
+
hoverBg: `${c}.30`,
|
|
16
|
+
activeBg: `${c}.40`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (c === 'blue') {
|
|
20
|
+
container.color = 'blue.80'
|
|
21
|
+
button.color = 'blue.80'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (c === 'yellow') {
|
|
25
|
+
container.color = 'yellow.100'
|
|
26
|
+
button.color = 'yellow.100'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return { container, button }
|
|
30
|
+
}
|
|
31
|
+
|
|
1
32
|
const baseStyle = {}
|
|
2
33
|
|
|
3
34
|
const defaultProps = {
|
|
4
|
-
|
|
35
|
+
colorScheme: 'blue',
|
|
36
|
+
variant: 'subtle'
|
|
5
37
|
}
|
|
6
38
|
|
|
7
39
|
const parts = ['container', 'button', 'icon', 'text', 'title']
|
|
@@ -9,37 +41,7 @@ const parts = ['container', 'button', 'icon', 'text', 'title']
|
|
|
9
41
|
const sizes = {}
|
|
10
42
|
|
|
11
43
|
const variants = {
|
|
12
|
-
|
|
13
|
-
container: {
|
|
14
|
-
bg: 'skyBlue.95',
|
|
15
|
-
borderColor: 'seaBlue.28',
|
|
16
|
-
color: 'seaBlue.28'
|
|
17
|
-
},
|
|
18
|
-
button: {
|
|
19
|
-
borderColor: 'transparent'
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
subtleRed: {
|
|
23
|
-
container: {
|
|
24
|
-
bg: 'energyRed.95',
|
|
25
|
-
borderColor: 'energyRed.45',
|
|
26
|
-
color: 'energyRed.45'
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
subtleYellow: {
|
|
30
|
-
container: {
|
|
31
|
-
bg: 'sunflower.85',
|
|
32
|
-
borderColor: 'sunflower.15',
|
|
33
|
-
color: 'sunflower.15'
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
subtleGreen: {
|
|
37
|
-
container: {
|
|
38
|
-
bg: 'landGreen.95',
|
|
39
|
-
borderColor: 'landGreen.30',
|
|
40
|
-
color: 'landGreen.30'
|
|
41
|
-
}
|
|
42
|
-
}
|
|
44
|
+
subtle: variantSubtle
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
export default {
|
package/src/p/theme.ts
CHANGED
|
@@ -7,15 +7,23 @@ const defaultProps = {
|
|
|
7
7
|
const sizes = {
|
|
8
8
|
sm: {
|
|
9
9
|
fontSize: 'sm',
|
|
10
|
-
lineHeight: '
|
|
10
|
+
lineHeight: '18px'
|
|
11
11
|
},
|
|
12
12
|
md: {
|
|
13
13
|
fontSize: 'md',
|
|
14
|
-
lineHeight: '
|
|
14
|
+
lineHeight: '24px'
|
|
15
15
|
},
|
|
16
16
|
lg: {
|
|
17
17
|
fontSize: 'lg',
|
|
18
|
-
lineHeight: '
|
|
18
|
+
lineHeight: '28px'
|
|
19
|
+
},
|
|
20
|
+
xl: {
|
|
21
|
+
fontSize: '20px',
|
|
22
|
+
lineHeight: '30px'
|
|
23
|
+
},
|
|
24
|
+
xxl: {
|
|
25
|
+
fontSize: '24px',
|
|
26
|
+
lineHeight: '36px'
|
|
19
27
|
}
|
|
20
28
|
}
|
|
21
29
|
|
package/src/t/theme.ts
CHANGED
package/src/table/tbody.tsx
CHANGED
|
@@ -20,10 +20,6 @@ export const TbodyBase = styled.tbodyBox`
|
|
|
20
20
|
&[data-variant='striped'][data-selected='false']:nth-of-type(odd):not(:hover) td {
|
|
21
21
|
background-color: grey.10;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
&[data-variant='basic']:hover td {
|
|
25
|
-
background-color: transparent;
|
|
26
|
-
}
|
|
27
23
|
}
|
|
28
24
|
`
|
|
29
25
|
|
package/src/table/theme.ts
CHANGED
package/src/tabs/tabs.types.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { ThemingProps } from '../theme'
|
|
|
7
7
|
|
|
8
8
|
export type AnimationDirection = 'fadeLeft' | 'fadeRight' | 'fadeIn'
|
|
9
9
|
|
|
10
|
-
export type TabsSize = 'md' | 'sm' | 'lg' | 'xl'
|
|
11
|
-
export type NavBarIconSize = 'md' | 'xs' | 'sm' | 'lg' |
|
|
10
|
+
export type TabsSize = 'md' | 'sm' | 'lg' | 'xl'
|
|
11
|
+
export type NavBarIconSize = 'md' | 'xs' | 'sm' | 'lg' | undefined
|
|
12
12
|
|
|
13
13
|
export type TabsProps = SystemProps &
|
|
14
14
|
ThemingProps<'Tabs'> &
|
package/src/tabs/tabsNavBar.tsx
CHANGED
|
@@ -6,64 +6,47 @@ import { Icon } from '../icon'
|
|
|
6
6
|
import { List, ListItem } from '../list'
|
|
7
7
|
import { cs, Dict } from '../utils'
|
|
8
8
|
import { NavBarIconSize, TabNavBarProps } from './tabs.types'
|
|
9
|
-
import theme from './theme'
|
|
10
9
|
|
|
11
10
|
const iconSizeMapper: Dict = {
|
|
12
11
|
sm: 'xs',
|
|
13
12
|
md: 'sm',
|
|
14
13
|
lg: 'md',
|
|
15
|
-
xl: 'lg'
|
|
16
|
-
xxl: 'xl'
|
|
14
|
+
xl: 'lg'
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
export const TabsNavBar = vui<'div', TabNavBarProps>((props, ref) => {
|
|
20
18
|
const { tabs, onNavItemClick, activeNavItem, animationDirection, showBorder, size = 'md' } = props
|
|
21
19
|
const iconSize: NavBarIconSize = iconSizeMapper?.[size as string] || 'md'
|
|
22
20
|
|
|
23
|
-
const { sizes } = (theme as Dict) ?? {}
|
|
24
|
-
|
|
25
|
-
const fontSize = sizes[size ?? 'md'].tabsNavBar.fontSize
|
|
26
|
-
const h = sizes[size ?? 'md'].tabsNavBar.h
|
|
27
|
-
const borderWidth = sizes[size ?? 'md'].tabsNavBar.borderWidth
|
|
28
|
-
const py = sizes[size ?? 'md'].tabsNavBar.py
|
|
29
|
-
const iconMarginRight = size === 'xxl' ? '16px' : '8px'
|
|
30
|
-
|
|
31
21
|
return (
|
|
32
22
|
<List
|
|
33
|
-
borderBottom={showBorder ? '1px solid
|
|
23
|
+
borderBottom={showBorder ? '1px solid grey.40' : 'none'}
|
|
34
24
|
className={cs('vui-tabsNavBar')}
|
|
35
25
|
display="flex"
|
|
36
26
|
isInteractive
|
|
37
|
-
mb="20px"
|
|
38
27
|
ref={ref}
|
|
28
|
+
size={size}
|
|
39
29
|
w={1}
|
|
40
30
|
>
|
|
41
31
|
{tabs?.map?.(tab => (
|
|
42
32
|
<ListItem
|
|
43
|
-
activeBg="skyBlue.90"
|
|
44
33
|
className={`vui-tabsNavBarItem vui-tabsNavBarItem-${tab?.id}`}
|
|
45
|
-
color="seaBlue.28"
|
|
46
34
|
disabled={tab.disabled}
|
|
47
35
|
display="inline-flex"
|
|
48
|
-
fontSize={fontSize}
|
|
49
|
-
h={h}
|
|
50
|
-
hoverBg="skyBlue.85"
|
|
51
36
|
key={tab.id}
|
|
52
37
|
onClick={() => onNavItemClick?.(tab.id || 0)}
|
|
53
38
|
position="relative"
|
|
54
|
-
px="16px"
|
|
55
|
-
py={py}
|
|
56
39
|
>
|
|
57
40
|
<Box alignItems="center">
|
|
58
|
-
{!!tab.icon && <Icon mr={
|
|
41
|
+
{!!tab.icon && <Icon mr={1} name={tab.icon} size={iconSize} />}
|
|
59
42
|
{tab.title}
|
|
60
43
|
</Box>
|
|
61
44
|
{!tab.disabled && tab.id === activeNavItem && (
|
|
62
45
|
<Box
|
|
63
46
|
animation={animationDirection}
|
|
64
|
-
bg="
|
|
47
|
+
bg="prussian.80"
|
|
65
48
|
bottom="-1px"
|
|
66
|
-
h={
|
|
49
|
+
h={`${size === 'sm' ? 2 : 4}px`}
|
|
67
50
|
left={0}
|
|
68
51
|
position="absolute"
|
|
69
52
|
w={1}
|
package/src/tabs/theme.ts
CHANGED
|
@@ -5,47 +5,10 @@ const defaultProps = {}
|
|
|
5
5
|
const parts = ['container', 'tabsNavBar', 'tab']
|
|
6
6
|
|
|
7
7
|
const sizes = {
|
|
8
|
-
sm: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
h: '20px',
|
|
13
|
-
py: '4px'
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
md: {
|
|
17
|
-
tabsNavBar: {
|
|
18
|
-
borderWidth: '2px',
|
|
19
|
-
fontSize: 'sm',
|
|
20
|
-
// lineHeight: '20px',
|
|
21
|
-
h: '32px',
|
|
22
|
-
py: '6px'
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
lg: {
|
|
26
|
-
tabsNavBar: {
|
|
27
|
-
borderWidth: '3px',
|
|
28
|
-
fontSize: 'md',
|
|
29
|
-
h: 40,
|
|
30
|
-
py: '8px'
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
xl: {
|
|
34
|
-
tabsNavBar: {
|
|
35
|
-
borderWidth: '4px',
|
|
36
|
-
fontSize: 'lg',
|
|
37
|
-
h: 48,
|
|
38
|
-
py: '10px'
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
xxl: {
|
|
42
|
-
tabsNavBar: {
|
|
43
|
-
borderWidth: '4px',
|
|
44
|
-
fontSize: 'lg',
|
|
45
|
-
h: 56,
|
|
46
|
-
py: '12px'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
8
|
+
sm: {},
|
|
9
|
+
md: {},
|
|
10
|
+
lg: {},
|
|
11
|
+
xl: {}
|
|
49
12
|
}
|
|
50
13
|
|
|
51
14
|
const variants = {}
|