@fluentui/react-link 9.0.0-rc.4 → 9.0.0-rc.7
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/CHANGELOG.json +120 -1
- package/CHANGELOG.md +39 -2
- package/dist/react-link.d.ts +6 -0
- package/lib/components/Link/useLinkStyles.d.ts +6 -1
- package/lib/components/Link/useLinkStyles.js +8 -1
- package/lib/components/Link/useLinkStyles.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Link/useLinkStyles.d.ts +6 -1
- package/lib-commonjs/components/Link/useLinkStyles.js +9 -2
- package/lib-commonjs/components/Link/useLinkStyles.js.map +1 -1
- package/lib-commonjs/index.d.ts +2 -1
- package/lib-commonjs/index.js +45 -2
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +15 -18
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,126 @@
|
|
|
2
2
|
"name": "@fluentui/react-link",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 25 Apr 2022 09:31:20 GMT",
|
|
6
|
+
"tag": "@fluentui/react-link_v9.0.0-rc.7",
|
|
7
|
+
"version": "9.0.0-rc.7",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui/react-link",
|
|
13
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.7",
|
|
14
|
+
"commit": "02ca1d3c198452c1693067f5f18bd01b2ed5d6e6"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Tue, 19 Apr 2022 19:16:45 GMT",
|
|
21
|
+
"tag": "@fluentui/react-link_v9.0.0-rc.6",
|
|
22
|
+
"version": "9.0.0-rc.6",
|
|
23
|
+
"comments": {
|
|
24
|
+
"prerelease": [
|
|
25
|
+
{
|
|
26
|
+
"author": "olfedias@microsoft.com",
|
|
27
|
+
"package": "@fluentui/react-link",
|
|
28
|
+
"commit": "e569d6e04d83cbcc6225e61db52ff81d2addd363",
|
|
29
|
+
"comment": "chore: Update Griffel to latest version"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
33
|
+
"package": "@fluentui/react-link",
|
|
34
|
+
"commit": "9c7743e4df78f4ab9c3c8d009c532b60b0356198",
|
|
35
|
+
"comment": "Removing star exports."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "seanmonahan@microsoft.com",
|
|
39
|
+
"package": "@fluentui/react-link",
|
|
40
|
+
"commit": "086a675fd0c648944ff4048450190a0a13467de3",
|
|
41
|
+
"comment": "Add static classnames to Link"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@fluentui/react-link",
|
|
46
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.6",
|
|
47
|
+
"commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@fluentui/react-link",
|
|
52
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.5",
|
|
53
|
+
"commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui/react-link",
|
|
58
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.6",
|
|
59
|
+
"commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "@fluentui/react-link",
|
|
64
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.4",
|
|
65
|
+
"commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"none": [
|
|
69
|
+
{
|
|
70
|
+
"author": "mgodbolt@microsoft.com",
|
|
71
|
+
"package": "@fluentui/react-link",
|
|
72
|
+
"commit": "905e46db07ada986fd7885531f72a71b7bbaabdc",
|
|
73
|
+
"comment": "create v9 api extractor config and set all v9 packags to use it, suppress forgotten export"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"author": "elcraig@microsoft.com",
|
|
77
|
+
"package": "@fluentui/react-link",
|
|
78
|
+
"commit": "b7f17e976f9e058f39c9fce4f0f9bb6eb4dfa577",
|
|
79
|
+
"comment": "Update React dev deps and hoist them to the repo root"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"date": "Fri, 04 Mar 2022 05:17:37 GMT",
|
|
86
|
+
"tag": "@fluentui/react-link_v9.0.0-rc.5",
|
|
87
|
+
"version": "9.0.0-rc.5",
|
|
88
|
+
"comments": {
|
|
89
|
+
"prerelease": [
|
|
90
|
+
{
|
|
91
|
+
"author": "dzearing@microsoft.com",
|
|
92
|
+
"package": "@fluentui/react-link",
|
|
93
|
+
"commit": "f2f1c0ea948cc3517eeb442c05433eb0918def29",
|
|
94
|
+
"comment": "Adding explicit export maps on all consumer packages for FUIR 8 and 9."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"author": "beachball",
|
|
98
|
+
"package": "@fluentui/react-link",
|
|
99
|
+
"comment": "Bump @fluentui/keyboard-keys to v9.0.0-rc.4",
|
|
100
|
+
"commit": "1494f0b620f6d5aae7f0aef33fc9e8f6eb7f8749"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"author": "beachball",
|
|
104
|
+
"package": "@fluentui/react-link",
|
|
105
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.5",
|
|
106
|
+
"commit": "1494f0b620f6d5aae7f0aef33fc9e8f6eb7f8749"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"author": "beachball",
|
|
110
|
+
"package": "@fluentui/react-link",
|
|
111
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.4",
|
|
112
|
+
"commit": "1494f0b620f6d5aae7f0aef33fc9e8f6eb7f8749"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"author": "beachball",
|
|
116
|
+
"package": "@fluentui/react-link",
|
|
117
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.5",
|
|
118
|
+
"commit": "1494f0b620f6d5aae7f0aef33fc9e8f6eb7f8749"
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"date": "Tue, 01 Mar 2022 02:17:37 GMT",
|
|
6
125
|
"tag": "@fluentui/react-link_v9.0.0-rc.4",
|
|
7
126
|
"version": "9.0.0-rc.4",
|
|
8
127
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,49 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-link
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 25 Apr 2022 09:31:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-rc.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.0-rc.7)
|
|
8
|
+
|
|
9
|
+
Mon, 25 Apr 2022 09:31:20 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.0-rc.6..@fluentui/react-link_v9.0.0-rc.7)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.7 ([PR #22601](https://github.com/microsoft/fluentui/pull/22601) by beachball)
|
|
15
|
+
|
|
16
|
+
## [9.0.0-rc.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.0-rc.6)
|
|
17
|
+
|
|
18
|
+
Tue, 19 Apr 2022 19:16:45 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.0-rc.5..@fluentui/react-link_v9.0.0-rc.6)
|
|
20
|
+
|
|
21
|
+
### Changes
|
|
22
|
+
|
|
23
|
+
- chore: Update Griffel to latest version ([PR #21976](https://github.com/microsoft/fluentui/pull/21976) by olfedias@microsoft.com)
|
|
24
|
+
- Removing star exports. ([PR #22112](https://github.com/microsoft/fluentui/pull/22112) by Humberto.Morimoto@microsoft.com)
|
|
25
|
+
- Add static classnames to Link ([PR #21960](https://github.com/microsoft/fluentui/pull/21960) by seanmonahan@microsoft.com)
|
|
26
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
|
|
27
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.5 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
|
|
28
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
|
|
29
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.4 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
|
|
30
|
+
|
|
31
|
+
## [9.0.0-rc.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.0-rc.5)
|
|
32
|
+
|
|
33
|
+
Fri, 04 Mar 2022 05:17:37 GMT
|
|
34
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.0-rc.4..@fluentui/react-link_v9.0.0-rc.5)
|
|
35
|
+
|
|
36
|
+
### Changes
|
|
37
|
+
|
|
38
|
+
- Adding explicit export maps on all consumer packages for FUIR 8 and 9. ([PR #21508](https://github.com/microsoft/fluentui/pull/21508) by dzearing@microsoft.com)
|
|
39
|
+
- Bump @fluentui/keyboard-keys to v9.0.0-rc.4 ([PR #21947](https://github.com/microsoft/fluentui/pull/21947) by beachball)
|
|
40
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.5 ([PR #21947](https://github.com/microsoft/fluentui/pull/21947) by beachball)
|
|
41
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.4 ([PR #21947](https://github.com/microsoft/fluentui/pull/21947) by beachball)
|
|
42
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.5 ([PR #21947](https://github.com/microsoft/fluentui/pull/21947) by beachball)
|
|
43
|
+
|
|
7
44
|
## [9.0.0-rc.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.0-rc.4)
|
|
8
45
|
|
|
9
|
-
Tue, 01 Mar 2022 02:
|
|
46
|
+
Tue, 01 Mar 2022 02:17:37 GMT
|
|
10
47
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.0-rc.3..@fluentui/react-link_v9.0.0-rc.4)
|
|
11
48
|
|
|
12
49
|
### Changes
|
package/dist/react-link.d.ts
CHANGED
|
@@ -3,14 +3,20 @@ import type { ComponentState } from '@fluentui/react-utilities';
|
|
|
3
3
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
4
4
|
import * as React_2 from 'react';
|
|
5
5
|
import type { Slot } from '@fluentui/react-utilities';
|
|
6
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* A Link is a reference to data that a user can follow by clicking or tapping it.
|
|
9
10
|
*/
|
|
10
11
|
export declare const Link: ForwardRefComponent<LinkProps>;
|
|
11
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use `linkClassNames.root` instead.
|
|
15
|
+
*/
|
|
12
16
|
export declare const linkClassName = "fui-Link";
|
|
13
17
|
|
|
18
|
+
export declare const linkClassNames: SlotClassNames<LinkSlots>;
|
|
19
|
+
|
|
14
20
|
declare type LinkCommons = {
|
|
15
21
|
/**
|
|
16
22
|
* A link can appear either with its default style or subtle.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import type { LinkState } from './Link.types';
|
|
1
|
+
import type { LinkSlots, LinkState } from './Link.types';
|
|
2
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `linkClassNames.root` instead.
|
|
5
|
+
*/
|
|
2
6
|
export declare const linkClassName = "fui-Link";
|
|
7
|
+
export declare const linkClassNames: SlotClassNames<LinkSlots>;
|
|
3
8
|
export declare const useLinkStyles_unstable: (state: LinkState) => LinkState;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { shorthands, __styles, mergeClasses } from '@griffel/react';
|
|
2
2
|
import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
|
|
3
3
|
import { tokens } from '@fluentui/react-theme';
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `linkClassNames.root` instead.
|
|
6
|
+
*/
|
|
7
|
+
|
|
4
8
|
export const linkClassName = 'fui-Link';
|
|
9
|
+
export const linkClassNames = {
|
|
10
|
+
root: 'fui-Link'
|
|
11
|
+
};
|
|
5
12
|
|
|
6
13
|
const useStyles = /*#__PURE__*/__styles({
|
|
7
14
|
"focusIndicator": {
|
|
@@ -77,7 +84,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
77
84
|
|
|
78
85
|
export const useLinkStyles_unstable = state => {
|
|
79
86
|
const styles = useStyles();
|
|
80
|
-
state.root.className = mergeClasses(
|
|
87
|
+
state.root.className = mergeClasses(linkClassNames.root, styles.root, styles.focusIndicator, state.root.as === 'a' && state.root.href && styles.href, state.appearance === 'subtle' && styles.subtle, state.inline && styles.inline, state.appearance === 'subtle' && state.inline && styles.inlineSubtle, state.root['aria-disabled'] && styles.disabled, state.root.className);
|
|
81
88
|
return state;
|
|
82
89
|
};
|
|
83
90
|
//# sourceMappingURL=useLinkStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Link/useLinkStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,gBAArD;AACA,SAAS,+BAAT,QAAgD,yBAAhD;AACA,SAAS,MAAT,QAAuB,uBAAvB;
|
|
1
|
+
{"version":3,"sources":["components/Link/useLinkStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,gBAArD;AACA,SAAS,+BAAT,QAAgD,yBAAhD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA;;AAEG;;AACH,OAAO,MAAM,aAAa,GAAG,UAAtB;AACP,OAAO,MAAM,cAAc,GAA8B;AACvD,EAAA,IAAI,EAAE;AADiD,CAAlD;;AAIP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAmFA,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAgC;AACpE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,cAAc,CAAC,IADkB,EAEjC,MAAM,CAAC,IAF0B,EAGjC,MAAM,CAAC,cAH0B,EAIjC,KAAK,CAAC,IAAN,CAAW,EAAX,KAAkB,GAAlB,IAAyB,KAAK,CAAC,IAAN,CAAW,IAApC,IAA4C,MAAM,CAAC,IAJlB,EAKjC,KAAK,CAAC,UAAN,KAAqB,QAArB,IAAiC,MAAM,CAAC,MALP,EAMjC,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MANU,EAOjC,KAAK,CAAC,UAAN,KAAqB,QAArB,IAAiC,KAAK,CAAC,MAAvC,IAAiD,MAAM,CAAC,YAPvB,EAQjC,KAAK,CAAC,IAAN,CAAW,eAAX,KAA+B,MAAM,CAAC,QARL,EASjC,KAAK,CAAC,IAAN,CAAW,SATsB,CAAnC;AAYA,SAAO,KAAP;AACD,CAfM","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LinkSlots, LinkState } from './Link.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\n/**\n * @deprecated Use `linkClassNames.root` instead.\n */\nexport const linkClassName = 'fui-Link';\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nconst useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n }),\n // Common styles.\n root: {\n backgroundColor: 'transparent',\n borderTopStyle: 'none',\n borderLeftStyle: 'none',\n borderRightStyle: 'none',\n borderBottomColor: 'transparent',\n borderBottomStyle: 'solid',\n borderBottomWidth: tokens.strokeWidthThin,\n boxSizing: 'border-box',\n color: tokens.colorBrandForegroundLink,\n cursor: 'pointer',\n display: 'inline',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n ...shorthands.overflow('inherit'),\n textAlign: 'left',\n textDecorationLine: 'none',\n textOverflow: 'inherit',\n userSelect: 'text',\n\n ':hover': {\n borderBottomColor: tokens.colorBrandForegroundLinkHover,\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n borderBottomColor: tokens.colorBrandForegroundLinkPressed,\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n // Overrides when an href is present so the Link renders as an anchor.\n href: {\n fontSize: 'inherit',\n },\n // Overrides when the Link appears subtle.\n subtle: {\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n borderBottomColor: tokens.colorNeutralForeground2Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n\n ':active': {\n borderBottomColor: tokens.colorNeutralForeground2Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n // Overrides when the Link is rendered inline within text.\n inline: {\n borderBottomColor: tokens.colorBrandForegroundLink,\n },\n // Overrides when the Link is rendered inline within text and appears subtle.\n inlineSubtle: {\n borderBottomColor: tokens.colorNeutralForeground2,\n },\n // Overrides when the Link is disabled.\n disabled: {\n borderBottomColor: 'transparent',\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n\n ':hover': {\n borderBottomColor: 'transparent',\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n borderBottomColor: 'transparent',\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n linkClassNames.root,\n styles.root,\n styles.focusIndicator,\n state.root.as === 'a' && state.root.href && styles.href,\n state.appearance === 'subtle' && styles.subtle,\n state.inline && styles.inline,\n state.appearance === 'subtle' && state.inline && styles.inlineSubtle,\n state.root['aria-disabled'] && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Link, linkClassName, linkClassNames, renderLink_unstable, useLinkState_unstable, useLinkStyles_unstable, useLink_unstable, } from './Link';
|
|
2
|
+
export type { LinkProps, LinkSlots, LinkState } from './Link';
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,SACE,IADF,EAEE;AACA,aAHF,EAIE,cAJF,EAKE,mBALF,EAME,qBANF,EAOE,sBAPF,EAQE,gBARF,QASO,QATP","sourcesContent":["export {\n Link,\n // eslint-disable-next-line deprecation/deprecation\n linkClassName,\n linkClassNames,\n renderLink_unstable,\n useLinkState_unstable,\n useLinkStyles_unstable,\n useLink_unstable,\n} from './Link';\nexport type { LinkProps, LinkSlots, LinkState } from './Link';\n"],"sourceRoot":"../src/"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import type { LinkState } from './Link.types';
|
|
1
|
+
import type { LinkSlots, LinkState } from './Link.types';
|
|
2
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `linkClassNames.root` instead.
|
|
5
|
+
*/
|
|
2
6
|
export declare const linkClassName = "fui-Link";
|
|
7
|
+
export declare const linkClassNames: SlotClassNames<LinkSlots>;
|
|
3
8
|
export declare const useLinkStyles_unstable: (state: LinkState) => LinkState;
|
|
@@ -3,15 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useLinkStyles_unstable = exports.linkClassName = void 0;
|
|
6
|
+
exports.useLinkStyles_unstable = exports.linkClassNames = exports.linkClassName = void 0;
|
|
7
7
|
|
|
8
8
|
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
9
|
|
|
10
10
|
const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
|
|
11
11
|
|
|
12
12
|
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use `linkClassNames.root` instead.
|
|
15
|
+
*/
|
|
16
|
+
|
|
13
17
|
|
|
14
18
|
exports.linkClassName = 'fui-Link';
|
|
19
|
+
exports.linkClassNames = {
|
|
20
|
+
root: 'fui-Link'
|
|
21
|
+
};
|
|
15
22
|
|
|
16
23
|
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
17
24
|
"focusIndicator": {
|
|
@@ -87,7 +94,7 @@ const useStyles = /*#__PURE__*/react_1.__styles({
|
|
|
87
94
|
|
|
88
95
|
const useLinkStyles_unstable = state => {
|
|
89
96
|
const styles = useStyles();
|
|
90
|
-
state.root.className = react_1.mergeClasses(exports.
|
|
97
|
+
state.root.className = react_1.mergeClasses(exports.linkClassNames.root, styles.root, styles.focusIndicator, state.root.as === 'a' && state.root.href && styles.href, state.appearance === 'subtle' && styles.subtle, state.inline && styles.inline, state.appearance === 'subtle' && state.inline && styles.inlineSubtle, state.root['aria-disabled'] && styles.disabled, state.root.className);
|
|
91
98
|
return state;
|
|
92
99
|
};
|
|
93
100
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Link/useLinkStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;
|
|
1
|
+
{"version":3,"sources":["components/Link/useLinkStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,aAAA,GAAgB,UAAhB;AACA,OAAA,CAAA,cAAA,GAA4C;AACvD,EAAA,IAAI,EAAE;AADiD,CAA5C;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAmFO,MAAM,sBAAsB,GAAI,KAAD,IAAgC;AACpE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,cAAA,CAAe,IADM,EAErB,MAAM,CAAC,IAFc,EAGrB,MAAM,CAAC,cAHc,EAIrB,KAAK,CAAC,IAAN,CAAW,EAAX,KAAkB,GAAlB,IAAyB,KAAK,CAAC,IAAN,CAAW,IAApC,IAA4C,MAAM,CAAC,IAJ9B,EAKrB,KAAK,CAAC,UAAN,KAAqB,QAArB,IAAiC,MAAM,CAAC,MALnB,EAMrB,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MANF,EAOrB,KAAK,CAAC,UAAN,KAAqB,QAArB,IAAiC,KAAK,CAAC,MAAvC,IAAiD,MAAM,CAAC,YAPnC,EAQrB,KAAK,CAAC,IAAN,CAAW,eAAX,KAA+B,MAAM,CAAC,QARjB,EASrB,KAAK,CAAC,IAAN,CAAW,SATU,CAAvB;AAYA,SAAO,KAAP;AACD,CAfM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LinkSlots, LinkState } from './Link.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\n/**\n * @deprecated Use `linkClassNames.root` instead.\n */\nexport const linkClassName = 'fui-Link';\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nconst useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n }),\n // Common styles.\n root: {\n backgroundColor: 'transparent',\n borderTopStyle: 'none',\n borderLeftStyle: 'none',\n borderRightStyle: 'none',\n borderBottomColor: 'transparent',\n borderBottomStyle: 'solid',\n borderBottomWidth: tokens.strokeWidthThin,\n boxSizing: 'border-box',\n color: tokens.colorBrandForegroundLink,\n cursor: 'pointer',\n display: 'inline',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n ...shorthands.overflow('inherit'),\n textAlign: 'left',\n textDecorationLine: 'none',\n textOverflow: 'inherit',\n userSelect: 'text',\n\n ':hover': {\n borderBottomColor: tokens.colorBrandForegroundLinkHover,\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n borderBottomColor: tokens.colorBrandForegroundLinkPressed,\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n // Overrides when an href is present so the Link renders as an anchor.\n href: {\n fontSize: 'inherit',\n },\n // Overrides when the Link appears subtle.\n subtle: {\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n borderBottomColor: tokens.colorNeutralForeground2Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n\n ':active': {\n borderBottomColor: tokens.colorNeutralForeground2Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n // Overrides when the Link is rendered inline within text.\n inline: {\n borderBottomColor: tokens.colorBrandForegroundLink,\n },\n // Overrides when the Link is rendered inline within text and appears subtle.\n inlineSubtle: {\n borderBottomColor: tokens.colorNeutralForeground2,\n },\n // Overrides when the Link is disabled.\n disabled: {\n borderBottomColor: 'transparent',\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n\n ':hover': {\n borderBottomColor: 'transparent',\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n borderBottomColor: 'transparent',\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n linkClassNames.root,\n styles.root,\n styles.focusIndicator,\n state.root.as === 'a' && state.root.href && styles.href,\n state.appearance === 'subtle' && styles.subtle,\n state.inline && styles.inline,\n state.appearance === 'subtle' && state.inline && styles.inlineSubtle,\n state.root['aria-disabled'] && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Link, linkClassName, linkClassNames, renderLink_unstable, useLinkState_unstable, useLinkStyles_unstable, useLink_unstable, } from './Link';
|
|
2
|
+
export type { LinkProps, LinkSlots, LinkState } from './Link';
|
package/lib-commonjs/index.js
CHANGED
|
@@ -3,8 +3,51 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.useLink_unstable = exports.useLinkStyles_unstable = exports.useLinkState_unstable = exports.renderLink_unstable = exports.linkClassNames = exports.linkClassName = exports.Link = void 0;
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
var Link_1 = /*#__PURE__*/require("./Link");
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Object.defineProperty(exports, "Link", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return Link_1.Link;
|
|
14
|
+
}
|
|
15
|
+
}); // eslint-disable-next-line deprecation/deprecation
|
|
16
|
+
|
|
17
|
+
Object.defineProperty(exports, "linkClassName", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return Link_1.linkClassName;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "linkClassNames", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () {
|
|
26
|
+
return Link_1.linkClassNames;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "renderLink_unstable", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () {
|
|
32
|
+
return Link_1.renderLink_unstable;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "useLinkState_unstable", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () {
|
|
38
|
+
return Link_1.useLinkState_unstable;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "useLinkStyles_unstable", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () {
|
|
44
|
+
return Link_1.useLinkStyles_unstable;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "useLink_unstable", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () {
|
|
50
|
+
return Link_1.useLink_unstable;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
10
53
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,MAAA,gBAAA,OAAA,CAAA,QAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,MAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,IAAA;AAAI;AAAJ,CAAA,E,CACA;;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,aAAA;AAAa;AAAb,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,cAAA;AAAc;AAAd,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,mBAAA;AAAmB;AAAnB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,qBAAA;AAAqB;AAArB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,wBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,sBAAA;AAAsB;AAAtB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,gBAAA;AAAgB;AAAhB,CAAA","sourcesContent":["export {\n Link,\n // eslint-disable-next-line deprecation/deprecation\n linkClassName,\n linkClassNames,\n renderLink_unstable,\n useLinkState_unstable,\n useLinkStyles_unstable,\n useLink_unstable,\n} from './Link';\nexport type { LinkProps, LinkSlots, LinkState } from './Link';\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-link",
|
|
3
|
-
"version": "9.0.0-rc.
|
|
3
|
+
"version": "9.0.0-rc.7",
|
|
4
4
|
"description": "Fluent UI React Link component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -29,25 +29,15 @@
|
|
|
29
29
|
"@fluentui/a11y-testing": "^0.1.0",
|
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
|
31
31
|
"@fluentui/react-conformance": "*",
|
|
32
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
|
33
|
-
"@fluentui/scripts": "^1.0.0"
|
|
34
|
-
"@types/enzyme": "3.10.3",
|
|
35
|
-
"@types/enzyme-adapter-react-16": "1.0.3",
|
|
36
|
-
"@types/react": "16.9.42",
|
|
37
|
-
"@types/react-dom": "16.9.10",
|
|
38
|
-
"@types/react-test-renderer": "^16.0.0",
|
|
39
|
-
"enzyme": "~3.10.0",
|
|
40
|
-
"enzyme-adapter-react-16": "^1.15.0",
|
|
41
|
-
"react": "16.8.6",
|
|
42
|
-
"react-dom": "16.8.6",
|
|
43
|
-
"react-test-renderer": "^16.3.0"
|
|
32
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.4",
|
|
33
|
+
"@fluentui/scripts": "^1.0.0"
|
|
44
34
|
},
|
|
45
35
|
"dependencies": {
|
|
46
|
-
"@fluentui/keyboard-keys": "9.0.0-rc.
|
|
47
|
-
"@fluentui/react-tabster": "9.0.0-rc.
|
|
48
|
-
"@fluentui/react-theme": "9.0.0-rc.
|
|
49
|
-
"@fluentui/react-utilities": "9.0.0-rc.
|
|
50
|
-
"@griffel/react": "1.0.
|
|
36
|
+
"@fluentui/keyboard-keys": "9.0.0-rc.4",
|
|
37
|
+
"@fluentui/react-tabster": "9.0.0-rc.7",
|
|
38
|
+
"@fluentui/react-theme": "9.0.0-rc.5",
|
|
39
|
+
"@fluentui/react-utilities": "9.0.0-rc.6",
|
|
40
|
+
"@griffel/react": "1.0.3",
|
|
51
41
|
"tslib": "^2.1.0"
|
|
52
42
|
},
|
|
53
43
|
"peerDependencies": {
|
|
@@ -62,5 +52,12 @@
|
|
|
62
52
|
"minor",
|
|
63
53
|
"patch"
|
|
64
54
|
]
|
|
55
|
+
},
|
|
56
|
+
"exports": {
|
|
57
|
+
".": {
|
|
58
|
+
"types": "./lib/index.d.ts",
|
|
59
|
+
"import": "./lib/index.js",
|
|
60
|
+
"require": "./lib-commonjs/index.js"
|
|
61
|
+
}
|
|
65
62
|
}
|
|
66
63
|
}
|