@veracity/vui 2.28.8-beta.0 → 2.28.8-beta.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/link/link.d.ts.map +1 -1
- package/dist/cjs/link/link.js +8 -16
- package/dist/cjs/link/link.js.map +1 -1
- package/dist/esm/link/link.d.ts.map +1 -1
- package/dist/esm/link/link.js +8 -16
- package/dist/esm/link/link.js.map +1 -1
- package/dist/tsconfig.legacy.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/link/link.tsx +10 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veracity/vui",
|
|
3
|
-
"version": "2.28.8-beta.
|
|
3
|
+
"version": "2.28.8-beta.1",
|
|
4
4
|
"description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
package/src/link/link.tsx
CHANGED
|
@@ -17,25 +17,17 @@ export const LinkBase = styled.aBox.attrs((props: LinkProps) => ({
|
|
|
17
17
|
display: inline-flex;
|
|
18
18
|
line-height: normal;
|
|
19
19
|
outline: none;
|
|
20
|
-
text-decoration: none;
|
|
21
|
-
transition-duration: instant;
|
|
22
20
|
width: fit-content;
|
|
23
|
-
position: relative;
|
|
24
21
|
|
|
25
|
-
&:not(.vui-listItemLink) > span
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
left: 0;
|
|
30
|
-
width: 100%;
|
|
31
|
-
height: ${props => (props.isUnderlined ? '1px' : 0)};
|
|
32
|
-
background-color: currentColor;
|
|
33
|
-
opacity: ${props => (props.isUnderlined ? 1 : 0)};
|
|
22
|
+
&:not(.vui-listItemLink) > span {
|
|
23
|
+
text-decoration-line: ${props => (props.isUnderlined ? 'underline' : 'none')};
|
|
24
|
+
text-decoration-thickness: 1px;
|
|
25
|
+
text-underline-offset: 2px;
|
|
34
26
|
}
|
|
35
27
|
|
|
36
|
-
& > span:hover
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
& > span:hover {
|
|
29
|
+
text-decoration-line: underline;
|
|
30
|
+
text-decoration-thickness: ${props => (props.isUnderlined ? '2px' : '1px')};
|
|
39
31
|
}
|
|
40
32
|
`
|
|
41
33
|
|
|
@@ -58,8 +50,8 @@ export const Link = vui<'a', LinkProps>((props, ref) => {
|
|
|
58
50
|
weight,
|
|
59
51
|
...rest
|
|
60
52
|
} = props
|
|
61
|
-
const styles = useStyleConfig('Link', props)
|
|
62
53
|
|
|
54
|
+
const styles = useStyleConfig('Link', props)
|
|
63
55
|
const context = useMemo(() => filterUndefined({ size, variant }), [size, variant])
|
|
64
56
|
|
|
65
57
|
const aliasedProps = filterUndefined({
|
|
@@ -80,7 +72,7 @@ export const Link = vui<'a', LinkProps>((props, ref) => {
|
|
|
80
72
|
{...rest}
|
|
81
73
|
>
|
|
82
74
|
{isString(iconLeft) ? <LinkIcon mr={1} name={iconLeft} /> : iconLeft}
|
|
83
|
-
<T
|
|
75
|
+
<T>{children ?? (isReactText(text) ? <LinkText text={text} /> : text)}</T>
|
|
84
76
|
{isString(iconRight) ? <LinkIcon ml={1} name={iconRight} /> : iconRight}
|
|
85
77
|
</LinkBase>
|
|
86
78
|
</LinkProvider>
|
|
@@ -93,4 +85,5 @@ export const Link = vui<'a', LinkProps>((props, ref) => {
|
|
|
93
85
|
Link.Icon = LinkIcon
|
|
94
86
|
Link.Text = LinkText
|
|
95
87
|
Link.displayName = 'Link'
|
|
88
|
+
|
|
96
89
|
export default Link
|