@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
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { useStyleConfig, vui } from '../core'
|
|
4
|
-
import {
|
|
4
|
+
import { T, TProps } from '../t'
|
|
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<'span', TProps>((props, ref) => {
|
|
10
10
|
const { className, ...rest } = props
|
|
11
11
|
const styles = useStyleConfig('Notification', useNotificationContext())
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
|
-
<
|
|
15
|
-
className={cs('vui-notificationTitle', className)}
|
|
16
|
-
display="inline-flex"
|
|
17
|
-
ref={ref}
|
|
18
|
-
{...styles.title}
|
|
19
|
-
{...rest}
|
|
20
|
-
/>
|
|
14
|
+
<T className={cs('vui-notificationTitle', className)} fontWeight="demi" ref={ref} {...styles.title} {...rest} />
|
|
21
15
|
)
|
|
22
16
|
})
|
|
23
17
|
|
|
@@ -1,39 +1,7 @@
|
|
|
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
|
-
|
|
32
1
|
const baseStyle = {}
|
|
33
2
|
|
|
34
3
|
const defaultProps = {
|
|
35
|
-
|
|
36
|
-
variant: 'subtle'
|
|
4
|
+
variant: 'subtleBlue'
|
|
37
5
|
}
|
|
38
6
|
|
|
39
7
|
const parts = ['container', 'button', 'icon', 'text', 'title']
|
|
@@ -41,7 +9,37 @@ const parts = ['container', 'button', 'icon', 'text', 'title']
|
|
|
41
9
|
const sizes = {}
|
|
42
10
|
|
|
43
11
|
const variants = {
|
|
44
|
-
|
|
12
|
+
subtleBlue: {
|
|
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
|
+
}
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
export default {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly
|
|
3
|
+
* Generated on Thu, 17 Feb 2022 11:35:15 GMT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export const buttonSizeLargeFontSize = "1.125rem";
|
|
7
|
+
export const buttonSizeLargeLineHeight = "1.75rem";
|
|
8
|
+
export const buttonSizeLargePadding = "0.5rem 1rem";
|
|
9
|
+
export const buttonSizeMediumFontSize = "1rem";
|
|
10
|
+
export const buttonSizeMediumLineHeight = "1.5rem";
|
|
11
|
+
export const buttonSizeMediumPadding = "0.25rem calc(0.25rem * 3)";
|
|
12
|
+
export const buttonSizeSmallFontSize = "0.875rem";
|
|
13
|
+
export const buttonSizeSmallLineHeight = "1.25rem";
|
|
14
|
+
export const buttonSizeSmallPadding = "calc(0.25rem / 2) 0.5rem";
|
|
15
|
+
export const buttonSizeDefaultFontSize = "1rem";
|
|
16
|
+
export const buttonSizeDefaultLineHeight = "1.5rem";
|
|
17
|
+
export const buttonSizeDefaultPadding = "0.25rem calc(0.25rem * 3)";
|
|
18
|
+
export const buttonTypePrimaryDefaultBorderColorDark = "hsla(0, 0%, 0%, 0)";
|
|
19
|
+
export const buttonTypePrimaryDefaultBorderColorLight = "hsla(0, 0%, 0%, 0)";
|
|
20
|
+
export const buttonTypePrimaryDefaultBackgroundColorDark = "hsla(218, 100%, 28%, 1)";
|
|
21
|
+
export const buttonTypePrimaryDefaultBackgroundColorLight = "hsla(139, 100%, 78%, 1)";
|
|
22
|
+
export const buttonTypePrimaryDefaultTextColorDark = "hsla(40, 3%, 100%, 1)";
|
|
23
|
+
export const buttonTypePrimaryDefaultTextColorLight = "hsla(223, 67%, 18%, 1)";
|
|
24
|
+
export const buttonTypePrimaryHoverBorderColorDark = "hsla(0, 0%, 0%, 0)";
|
|
25
|
+
export const buttonTypePrimaryHoverBorderColorLight = "hsla(0, 0%, 0%, 0)";
|
|
26
|
+
export const buttonTypePrimaryHoverBackgroundColorDark = "hsla(218, 100%, 20%, 1)";
|
|
27
|
+
export const buttonTypePrimaryHoverBackgroundColorLight = "hsla(139, 100%, 70%, 1)";
|
|
28
|
+
export const buttonTypePrimaryHoverTextColorDark = "hsla(40, 3%, 100%, 1)";
|
|
29
|
+
export const buttonTypePrimaryHoverTextColorLight = "hsla(223, 67%, 18%, 1)";
|
|
30
|
+
export const buttonTypePrimaryActiveBorderColorDark = "hsla(0, 0%, 0%, 0)";
|
|
31
|
+
export const buttonTypePrimaryActiveBorderColorLight = "hsla(0, 0%, 0%, 0)";
|
|
32
|
+
export const buttonTypePrimaryActiveBackgroundColorDark = "hsla(218, 100%, 35%, 1)";
|
|
33
|
+
export const buttonTypePrimaryActiveBackgroundColorLight = "hsla(139, 100%, 85%, 1)";
|
|
34
|
+
export const buttonTypePrimaryActiveTextColorDark = "hsla(40, 3%, 100%, 1)";
|
|
35
|
+
export const buttonTypePrimaryActiveTextColorLight = "hsla(223, 67%, 18%, 1)";
|
|
36
|
+
export const buttonTypePrimaryFocusOutline = "0.25rem solid hsla(196, 100%, 43%, 1)";
|
|
37
|
+
export const buttonTypeSecondaryDefaultBorderColorDark = "hsla(218, 100%, 28%, 1)";
|
|
38
|
+
export const buttonTypeSecondaryDefaultBorderColorLight = "hsla(139, 100%, 78%, 1)";
|
|
39
|
+
export const buttonTypeSecondaryDefaultBackgroundColorDark = "hsla(0, 0%, 0%, 0)";
|
|
40
|
+
export const buttonTypeSecondaryDefaultBackgroundColorLight = "hsla(0, 0%, 0%, 0)";
|
|
41
|
+
export const buttonTypeSecondaryDefaultTextColorDark = "hsla(218, 100%, 28%, 1)";
|
|
42
|
+
export const buttonTypeSecondaryDefaultTextColorLight = "hsla(139, 100%, 78%, 1)";
|
|
43
|
+
export const buttonTypeSecondaryHoverBorderColorDark = "hsla(218, 100%, 28%, 1)";
|
|
44
|
+
export const buttonTypeSecondaryHoverBorderColorLight = "hsla(139, 100%, 78%, 1)";
|
|
45
|
+
export const buttonTypeSecondaryHoverBackgroundColorDark = "hsla(196, 74%, 90%, 1)";
|
|
46
|
+
export const buttonTypeSecondaryHoverBackgroundColorLight = "hsla(218, 100%, 25%, 1)";
|
|
47
|
+
export const buttonTypeSecondaryHoverTextColorDark = "hsla(218, 100%, 28%, 1)";
|
|
48
|
+
export const buttonTypeSecondaryHoverTextColorLight = "hsla(139, 100%, 78%, 1)";
|
|
49
|
+
export const buttonTypeSecondaryActiveBorderColorDark = "hsla(218, 100%, 28%, 1)";
|
|
50
|
+
export const buttonTypeSecondaryActiveBorderColorLight = "hsla(139, 100%, 78%, 1)";
|
|
51
|
+
export const buttonTypeSecondaryActiveBackgroundColorDark = "hsla(196, 74%, 95%, 1)";
|
|
52
|
+
export const buttonTypeSecondaryActiveBackgroundColorLight = "hsla(218, 100%, 35%, 1)";
|
|
53
|
+
export const buttonTypeSecondaryActiveTextColorDark = "hsla(218, 100%, 28%, 1)";
|
|
54
|
+
export const buttonTypeSecondaryActiveTextColorLight = "hsla(139, 100%, 78%, 1)";
|
|
55
|
+
export const buttonTypeSecondaryFocusOutline = "0.25rem solid hsla(196, 100%, 43%, 1)";
|
|
56
|
+
export const buttonTypeTertiaryDefaultBorderColorDark = "hsla(0, 0%, 0%, 0)";
|
|
57
|
+
export const buttonTypeTertiaryDefaultBorderColorLight = "hsla(0, 0%, 0%, 0)";
|
|
58
|
+
export const buttonTypeTertiaryDefaultBackgroundColorDark = "hsla(0, 0%, 0%, 0)";
|
|
59
|
+
export const buttonTypeTertiaryDefaultBackgroundColorLight = "hsla(0, 0%, 0%, 0)";
|
|
60
|
+
export const buttonTypeTertiaryDefaultTextColorDark = "hsla(218, 100%, 28%, 1)";
|
|
61
|
+
export const buttonTypeTertiaryDefaultTextColorLight = "hsla(139, 100%, 78%, 1)";
|
|
62
|
+
export const buttonTypeTertiaryHoverBorderColorDark = "hsla(0, 0%, 0%, 0)";
|
|
63
|
+
export const buttonTypeTertiaryHoverBorderColorLight = "hsla(0, 0%, 0%, 0)";
|
|
64
|
+
export const buttonTypeTertiaryHoverBackgroundColorDark = "hsla(196, 74%, 90%, 1)";
|
|
65
|
+
export const buttonTypeTertiaryHoverBackgroundColorLight = "hsla(218, 100%, 25%, 1)";
|
|
66
|
+
export const buttonTypeTertiaryHoverTextColorDark = "hsla(218, 100%, 28%, 1)";
|
|
67
|
+
export const buttonTypeTertiaryHoverTextColorLight = "hsla(139, 100%, 78%, 1)";
|
|
68
|
+
export const buttonTypeTertiaryActiveBorderColorDark = "hsla(0, 0%, 0%, 0)";
|
|
69
|
+
export const buttonTypeTertiaryActiveBorderColorLight = "hsla(0, 0%, 0%, 0)";
|
|
70
|
+
export const buttonTypeTertiaryActiveBackgroundColorDark = "hsla(196, 74%, 95%, 1)";
|
|
71
|
+
export const buttonTypeTertiaryActiveBackgroundColorLight = "hsla(218, 100%, 35%, 1)";
|
|
72
|
+
export const buttonTypeTertiaryActiveTextColorDark = "hsla(218, 100%, 28%, 1)";
|
|
73
|
+
export const buttonTypeTertiaryActiveTextColorLight = "hsla(139, 100%, 78%, 1)";
|
|
74
|
+
export const buttonTypeTertiaryFocusOutline = "0.25rem solid hsla(196, 100%, 43%, 1)";
|
|
75
|
+
export const buttonDisabledCursor = "default";
|
|
76
|
+
export const buttonDisabledOpacity = "50%";
|
|
77
|
+
export const buttonBorderStyle = "solid";
|
|
78
|
+
export const buttonBorderWidth = "calc(0.125rem / 2)";
|
|
79
|
+
export const buttonFontFamily = "'Avenir Next', Arial, sans-serif";
|
|
80
|
+
export const buttonFontSize = "1rem";
|
|
81
|
+
export const buttonLineHeight = "1.5rem";
|
|
82
|
+
export const buttonFontWeight = "500";
|
|
83
|
+
export const buttonPadding = "calc(0.25rem * 1.5) calc(0.25rem * 3)";
|
|
84
|
+
export const buttonTransition = "all 0.15s ease-in-out";
|
|
85
|
+
export const buttonCursor = "pointer";
|
package/src/p/theme.ts
CHANGED
|
@@ -7,23 +7,15 @@ const defaultProps = {
|
|
|
7
7
|
const sizes = {
|
|
8
8
|
sm: {
|
|
9
9
|
fontSize: 'sm',
|
|
10
|
-
lineHeight: '
|
|
10
|
+
lineHeight: '22px'
|
|
11
11
|
},
|
|
12
12
|
md: {
|
|
13
13
|
fontSize: 'md',
|
|
14
|
-
lineHeight: '
|
|
14
|
+
lineHeight: '26px'
|
|
15
15
|
},
|
|
16
16
|
lg: {
|
|
17
17
|
fontSize: 'lg',
|
|
18
|
-
lineHeight: '
|
|
19
|
-
},
|
|
20
|
-
xl: {
|
|
21
|
-
fontSize: '20px',
|
|
22
|
-
lineHeight: '30px'
|
|
23
|
-
},
|
|
24
|
-
xxl: {
|
|
25
|
-
fontSize: '24px',
|
|
26
|
-
lineHeight: '36px'
|
|
18
|
+
lineHeight: '32px'
|
|
27
19
|
}
|
|
28
20
|
}
|
|
29
21
|
|
|
@@ -49,7 +49,7 @@ export const Sidemenu = vui<'div', SidemenuProps>((props, ref) => {
|
|
|
49
49
|
: children}
|
|
50
50
|
</Box>
|
|
51
51
|
<Box borderTop={border} className="vui-sidemenu-bottom" w="100%">
|
|
52
|
-
<Button borderRadius={0} onClick={toggle} variant="
|
|
52
|
+
<Button borderRadius={0} onClick={toggle} variant="tertiaryDark" w="100%">
|
|
53
53
|
<Icon name={icon} position="absolute" right={iconRight} />
|
|
54
54
|
</Button>
|
|
55
55
|
</Box>
|
|
@@ -49,7 +49,7 @@ export const SidemenuItem = vui<'button', SidemenuItemProps>((props, ref) => {
|
|
|
49
49
|
justifyContent="space-between"
|
|
50
50
|
onClick={() => onClick?.()}
|
|
51
51
|
p={0}
|
|
52
|
-
variant="
|
|
52
|
+
variant="tertiaryDark"
|
|
53
53
|
w="100%"
|
|
54
54
|
{...rest}
|
|
55
55
|
>
|
|
@@ -60,8 +60,8 @@ export const SidemenuItem = vui<'button', SidemenuItemProps>((props, ref) => {
|
|
|
60
60
|
icon={displayChildren ? 'falChevronUp' : 'falChevronDown'}
|
|
61
61
|
mr={1}
|
|
62
62
|
onClick={toggle}
|
|
63
|
-
size="
|
|
64
|
-
variant="
|
|
63
|
+
size="sm"
|
|
64
|
+
variant="tertiaryDark"
|
|
65
65
|
/>
|
|
66
66
|
)}
|
|
67
67
|
</Button>
|
package/src/t/theme.ts
CHANGED
package/src/table/tbody.tsx
CHANGED
|
@@ -20,6 +20,10 @@ 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
|
+
}
|
|
23
27
|
}
|
|
24
28
|
`
|
|
25
29
|
|
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' | undefined
|
|
10
|
+
export type TabsSize = 'md' | 'sm' | 'lg' | 'xl' | 'xxl'
|
|
11
|
+
export type NavBarIconSize = 'md' | 'xs' | 'sm' | 'lg' | 'xl' | undefined
|
|
12
12
|
|
|
13
13
|
export type TabsProps = SystemProps &
|
|
14
14
|
ThemingProps<'Tabs'> &
|
package/src/tabs/tabsNavBar.tsx
CHANGED
|
@@ -6,47 +6,64 @@ 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'
|
|
9
10
|
|
|
10
11
|
const iconSizeMapper: Dict = {
|
|
11
12
|
sm: 'xs',
|
|
12
13
|
md: 'sm',
|
|
13
14
|
lg: 'md',
|
|
14
|
-
xl: 'lg'
|
|
15
|
+
xl: 'lg',
|
|
16
|
+
xxl: 'xl'
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
export const TabsNavBar = vui<'div', TabNavBarProps>((props, ref) => {
|
|
18
20
|
const { tabs, onNavItemClick, activeNavItem, animationDirection, showBorder, size = 'md' } = props
|
|
19
21
|
const iconSize: NavBarIconSize = iconSizeMapper?.[size as string] || 'md'
|
|
20
22
|
|
|
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
|
+
|
|
21
31
|
return (
|
|
22
32
|
<List
|
|
23
|
-
borderBottom={showBorder ? '1px solid
|
|
33
|
+
borderBottom={showBorder ? '1px solid sandstone.79' : 'none'}
|
|
24
34
|
className={cs('vui-tabsNavBar')}
|
|
25
35
|
display="flex"
|
|
26
36
|
isInteractive
|
|
37
|
+
mb="20px"
|
|
27
38
|
ref={ref}
|
|
28
|
-
size={size}
|
|
29
39
|
w={1}
|
|
30
40
|
>
|
|
31
41
|
{tabs?.map?.(tab => (
|
|
32
42
|
<ListItem
|
|
43
|
+
activeBg="skyBlue.90"
|
|
33
44
|
className={`vui-tabsNavBarItem vui-tabsNavBarItem-${tab?.id}`}
|
|
45
|
+
color="seaBlue.28"
|
|
34
46
|
disabled={tab.disabled}
|
|
35
47
|
display="inline-flex"
|
|
48
|
+
fontSize={fontSize}
|
|
49
|
+
h={h}
|
|
50
|
+
hoverBg="skyBlue.85"
|
|
36
51
|
key={tab.id}
|
|
37
52
|
onClick={() => onNavItemClick?.(tab.id || 0)}
|
|
38
53
|
position="relative"
|
|
54
|
+
px="16px"
|
|
55
|
+
py={py}
|
|
39
56
|
>
|
|
40
57
|
<Box alignItems="center">
|
|
41
|
-
{!!tab.icon && <Icon mr={
|
|
58
|
+
{!!tab.icon && <Icon mr={iconMarginRight} name={tab.icon} size={iconSize} />}
|
|
42
59
|
{tab.title}
|
|
43
60
|
</Box>
|
|
44
61
|
{!tab.disabled && tab.id === activeNavItem && (
|
|
45
62
|
<Box
|
|
46
63
|
animation={animationDirection}
|
|
47
|
-
bg="
|
|
64
|
+
bg="seaBlue.28"
|
|
48
65
|
bottom="-1px"
|
|
49
|
-
h={
|
|
66
|
+
h={borderWidth}
|
|
50
67
|
left={0}
|
|
51
68
|
position="absolute"
|
|
52
69
|
w={1}
|
package/src/tabs/theme.ts
CHANGED
|
@@ -5,10 +5,47 @@ const defaultProps = {}
|
|
|
5
5
|
const parts = ['container', 'tabsNavBar', 'tab']
|
|
6
6
|
|
|
7
7
|
const sizes = {
|
|
8
|
-
sm: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
sm: {
|
|
9
|
+
tabsNavBar: {
|
|
10
|
+
borderWidth: '2px',
|
|
11
|
+
fontSize: 'xs',
|
|
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
|
+
}
|
|
12
49
|
}
|
|
13
50
|
|
|
14
51
|
const variants = {}
|
package/src/tag/tag.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import TagText from './tagText'
|
|
|
10
10
|
|
|
11
11
|
export const TagBase = styled.spanBox`
|
|
12
12
|
align-items: center;
|
|
13
|
-
border-radius:
|
|
13
|
+
border-radius: xl;
|
|
14
14
|
display: inline-flex;
|
|
15
15
|
font-weight: medium;
|
|
16
16
|
justify-content: center;
|
|
@@ -26,8 +26,8 @@ export const TagBase = styled.spanBox`
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
&[aria-disabled='true'] {
|
|
29
|
-
background-color: disabled.bg;
|
|
30
|
-
color: disabled.color;
|
|
29
|
+
background-color: disabled .bg;
|
|
30
|
+
color: disabled .color;
|
|
31
31
|
cursor: not-allowed;
|
|
32
32
|
user-select: none;
|
|
33
33
|
}
|
|
@@ -42,13 +42,12 @@ export const Tag = vui<'span', TagProps>((props, ref) => {
|
|
|
42
42
|
casing,
|
|
43
43
|
children,
|
|
44
44
|
className,
|
|
45
|
-
colorScheme = 'blue',
|
|
46
45
|
disabled,
|
|
47
46
|
icon,
|
|
48
47
|
iconLeft,
|
|
49
48
|
iconRight,
|
|
50
49
|
isFullWidth,
|
|
51
|
-
isInteractive = props.onClick !== undefined,
|
|
50
|
+
isInteractive = props.onClick !== undefined && props.onDelete === undefined,
|
|
52
51
|
isRound,
|
|
53
52
|
isTruncated = true,
|
|
54
53
|
itemLeft,
|
|
@@ -57,20 +56,21 @@ export const Tag = vui<'span', TagProps>((props, ref) => {
|
|
|
57
56
|
onDelete,
|
|
58
57
|
size = 'md',
|
|
59
58
|
text,
|
|
60
|
-
variant = '
|
|
59
|
+
variant = 'subtleBlue',
|
|
61
60
|
weight,
|
|
62
61
|
...rest
|
|
63
62
|
} = props
|
|
64
63
|
const styles = useStyleConfig('Tag', props)
|
|
65
64
|
const { activeBg, h, hoverBg, spaceX: spaceXBase = 0, ...tagStyles } = styles.container
|
|
66
65
|
|
|
67
|
-
const context = useMemo(
|
|
68
|
-
() => filterUndefined({ colorScheme, disabled, size, variant }),
|
|
69
|
-
[colorScheme, disabled, size, variant]
|
|
70
|
-
)
|
|
66
|
+
const context = useMemo(() => filterUndefined({ disabled, size, variant }), [disabled, size, variant])
|
|
71
67
|
|
|
72
68
|
const spaceX = spaceXBase / 8
|
|
73
|
-
|
|
69
|
+
let spaceXText = (spaceXBase + 4) / 8
|
|
70
|
+
if (size === 'xs') {
|
|
71
|
+
spaceXText = spaceXBase / 8
|
|
72
|
+
}
|
|
73
|
+
|
|
74
74
|
const pl = icon || itemLeft || iconLeft ? spaceX : spaceXText
|
|
75
75
|
const pr = icon || itemRight || iconRight ? spaceX : spaceXText
|
|
76
76
|
|
package/src/tag/tag.types.ts
CHANGED
|
@@ -2,34 +2,35 @@ import { IconProp } from '../icon'
|
|
|
2
2
|
import { SystemProps, TypographyProps } from '../system'
|
|
3
3
|
import { ThemingProps } from '../theme'
|
|
4
4
|
|
|
5
|
-
export type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
5
|
+
export type TagInnerProps = {
|
|
6
|
+
/** Alias for textTransform prop. @deprecated */
|
|
7
|
+
casing?: TypographyProps['textTransform']
|
|
8
|
+
/** Available theme colors for this component. @deprecated */
|
|
9
|
+
colorScheme?: 'blue' | 'green' | 'grey' | 'prussian' | 'red' | 'yellow'
|
|
10
|
+
/** Displays tag and its content in disabled state with appropriate styling. */
|
|
11
|
+
disabled?: boolean
|
|
12
|
+
/** Icon that replaces any other content. */
|
|
13
|
+
icon?: IconProp | JSX.Element
|
|
14
|
+
/** Socket displaying icon on the left side. */
|
|
15
|
+
iconLeft?: IconProp | JSX.Element
|
|
16
|
+
/** Socket displaying icon on the right side. */
|
|
17
|
+
iconRight?: IconProp | JSX.Element
|
|
18
|
+
/** Makes the button take full width of the container. @deprecated */
|
|
19
|
+
isFullWidth?: boolean
|
|
20
|
+
/** Makes item clickable and focusable with appropriate styling. The tag will be automatically interactive if the onClick is defined and onDelete is undefined */
|
|
21
|
+
isInteractive?: boolean
|
|
22
|
+
/** Rounds the borders. @default false */
|
|
23
|
+
isRound?: boolean
|
|
24
|
+
/** Socket displaying a custom item on the left. */
|
|
25
|
+
itemLeft?: React.ReactNode
|
|
26
|
+
/** Socket displaying a custom item on right left. */
|
|
27
|
+
itemRight?: React.ReactNode
|
|
28
|
+
/** If provided, displays a remove button with this function as onClick. */
|
|
29
|
+
onDelete?: () => void
|
|
30
|
+
/** Socket displaying text as alternative to children. */
|
|
31
|
+
text?: React.ReactNode
|
|
32
|
+
/** Alias for fontWeight prop. @deprecated */
|
|
33
|
+
weight?: TypographyProps['fontWeight']
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type TagProps = SystemProps & ThemingProps<'Tag'> & TagInnerProps
|
package/src/tag/tagButton.tsx
CHANGED
|
@@ -15,13 +15,12 @@ export const TagButton = vui<'button', ButtonProps>((props, ref) => {
|
|
|
15
15
|
<Button
|
|
16
16
|
borderColor="transparent"
|
|
17
17
|
className={cs('vui-tagButton', className)}
|
|
18
|
-
colorScheme={mergedProps.colorScheme}
|
|
19
18
|
disabled={mergedProps.disabled}
|
|
20
19
|
hoverBorderColor="transparent"
|
|
21
20
|
icon="falTimes"
|
|
22
21
|
mr={-0.5}
|
|
23
22
|
ref={ref}
|
|
24
|
-
variant=
|
|
23
|
+
variant={mergedProps.variant}
|
|
25
24
|
{...styles.button}
|
|
26
25
|
{...rest}
|
|
27
26
|
/>
|