@fluentui/react-link 9.0.3 → 9.0.5
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 +97 -3
- package/CHANGELOG.md +30 -4
- package/lib/components/Link/useLink.js +2 -0
- package/lib/components/Link/useLink.js.map +1 -1
- package/lib/components/Link/useLinkStyles.js +24 -25
- package/lib/components/Link/useLinkStyles.js.map +1 -1
- package/lib-commonjs/components/Link/useLink.js +2 -0
- package/lib-commonjs/components/Link/useLink.js.map +1 -1
- package/lib-commonjs/components/Link/useLinkStyles.js +24 -25
- package/lib-commonjs/components/Link/useLinkStyles.js.map +1 -1
- package/package.json +10 -9
- package/dist/tsdoc-metadata.json +0 -11
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,101 @@
|
|
|
2
2
|
"name": "@fluentui/react-link",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Thu,
|
|
5
|
+
"date": "Thu, 15 Sep 2022 09:44:28 GMT",
|
|
6
|
+
"tag": "@fluentui/react-link_v9.0.5",
|
|
7
|
+
"version": "9.0.5",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "sarah.higley@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-link",
|
|
13
|
+
"commit": "f17b8604209a099d354c212077832516dcfbbae2",
|
|
14
|
+
"comment": "fix: add type=button when rendered as a button"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "humberto_makoto@hotmail.com",
|
|
18
|
+
"package": "@fluentui/react-link",
|
|
19
|
+
"commit": "f97dc9f0f713bdf845cdd250d3b2d2993a0a5a0d",
|
|
20
|
+
"comment": "fix: Replacing bottom border styles with text decoration underline."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "olfedias@microsoft.com",
|
|
24
|
+
"package": "@fluentui/react-link",
|
|
25
|
+
"commit": "e610024474cfe5d45f61501a8b6a21daf4c794a2",
|
|
26
|
+
"comment": "chore: Update Griffel to latest version"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-link",
|
|
31
|
+
"comment": "Bump @fluentui/react-tabster to v9.1.1",
|
|
32
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-link",
|
|
37
|
+
"comment": "Bump @fluentui/react-theme to v9.1.0",
|
|
38
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-link",
|
|
43
|
+
"comment": "Bump @fluentui/react-utilities to v9.1.0",
|
|
44
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui/react-link",
|
|
49
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13",
|
|
50
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"none": [
|
|
54
|
+
{
|
|
55
|
+
"author": "martinhochel@microsoft.com",
|
|
56
|
+
"package": "@fluentui/react-link",
|
|
57
|
+
"commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
|
|
58
|
+
"comment": "chore: update package scaffold"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"date": "Wed, 03 Aug 2022 16:03:51 GMT",
|
|
65
|
+
"tag": "@fluentui/react-link_v9.0.4",
|
|
66
|
+
"version": "9.0.4",
|
|
67
|
+
"comments": {
|
|
68
|
+
"patch": [
|
|
69
|
+
{
|
|
70
|
+
"author": "miroslav.stastny@microsoft.com",
|
|
71
|
+
"package": "@fluentui/react-link",
|
|
72
|
+
"commit": "08563664778fd80284561d3c9d254307a0a32362",
|
|
73
|
+
"comment": "chore: Bump Griffel dependencies"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"author": "beachball",
|
|
77
|
+
"package": "@fluentui/react-link",
|
|
78
|
+
"comment": "Bump @fluentui/react-tabster to v9.1.0",
|
|
79
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"author": "beachball",
|
|
83
|
+
"package": "@fluentui/react-link",
|
|
84
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12",
|
|
85
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"none": [
|
|
89
|
+
{
|
|
90
|
+
"author": "lingfangao@hotmail.com",
|
|
91
|
+
"package": "@fluentui/react-link",
|
|
92
|
+
"commit": "99cc385631d04a76ee10ebc143cb9fecd99640b6",
|
|
93
|
+
"comment": "chore: Add `prerelease` as disallowed changetype for 9.0.0 packages"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"date": "Thu, 14 Jul 2022 21:21:12 GMT",
|
|
6
100
|
"tag": "@fluentui/react-link_v9.0.3",
|
|
7
101
|
"version": "9.0.3",
|
|
8
102
|
"comments": {
|
|
@@ -17,13 +111,13 @@
|
|
|
17
111
|
"author": "beachball",
|
|
18
112
|
"package": "@fluentui/react-link",
|
|
19
113
|
"comment": "Bump @fluentui/react-tabster to v9.0.3",
|
|
20
|
-
"commit": "
|
|
114
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
|
21
115
|
},
|
|
22
116
|
{
|
|
23
117
|
"author": "beachball",
|
|
24
118
|
"package": "@fluentui/react-link",
|
|
25
119
|
"comment": "Bump @fluentui/react-utilities to v9.0.2",
|
|
26
|
-
"commit": "
|
|
120
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
|
27
121
|
}
|
|
28
122
|
]
|
|
29
123
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,45 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-link
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
3
|
+
This log was last generated on Thu, 15 Sep 2022 09:44:28 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.5)
|
|
8
|
+
|
|
9
|
+
Thu, 15 Sep 2022 09:44:28 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.4..@fluentui/react-link_v9.0.5)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- fix: add type=button when rendered as a button ([PR #24327](https://github.com/microsoft/fluentui/pull/24327) by sarah.higley@microsoft.com)
|
|
15
|
+
- fix: Replacing bottom border styles with text decoration underline. ([PR #24734](https://github.com/microsoft/fluentui/pull/24734) by humberto_makoto@hotmail.com)
|
|
16
|
+
- chore: Update Griffel to latest version ([PR #24221](https://github.com/microsoft/fluentui/pull/24221) by olfedias@microsoft.com)
|
|
17
|
+
- Bump @fluentui/react-tabster to v9.1.1 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
18
|
+
- Bump @fluentui/react-theme to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
19
|
+
- Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
20
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
|
21
|
+
|
|
22
|
+
## [9.0.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.4)
|
|
23
|
+
|
|
24
|
+
Wed, 03 Aug 2022 16:03:51 GMT
|
|
25
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.3..@fluentui/react-link_v9.0.4)
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- chore: Bump Griffel dependencies ([PR #24114](https://github.com/microsoft/fluentui/pull/24114) by miroslav.stastny@microsoft.com)
|
|
30
|
+
- Bump @fluentui/react-tabster to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
|
31
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
|
32
|
+
|
|
7
33
|
## [9.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.3)
|
|
8
34
|
|
|
9
|
-
Thu, 14 Jul 2022 21:
|
|
35
|
+
Thu, 14 Jul 2022 21:21:12 GMT
|
|
10
36
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.2..@fluentui/react-link_v9.0.3)
|
|
11
37
|
|
|
12
38
|
### Patches
|
|
13
39
|
|
|
14
40
|
- fix: Fixing bad version bump of @fluentui/react-utilities. ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by Humberto.Morimoto@microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-tabster to v9.0.3 ([PR #
|
|
16
|
-
- Bump @fluentui/react-utilities to v9.0.2 ([PR #
|
|
41
|
+
- Bump @fluentui/react-tabster to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
|
42
|
+
- Bump @fluentui/react-utilities to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
|
17
43
|
|
|
18
44
|
## [9.0.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.2)
|
|
19
45
|
|
|
@@ -14,6 +14,7 @@ export const useLink_unstable = (props, ref) => {
|
|
|
14
14
|
inline = false
|
|
15
15
|
} = props;
|
|
16
16
|
const as = props.as || (props.href ? 'a' : 'button');
|
|
17
|
+
const type = as === 'button' ? 'button' : undefined;
|
|
17
18
|
const state = {
|
|
18
19
|
// Props passed at the top-level
|
|
19
20
|
appearance,
|
|
@@ -26,6 +27,7 @@ export const useLink_unstable = (props, ref) => {
|
|
|
26
27
|
},
|
|
27
28
|
root: getNativeElementProps(as, {
|
|
28
29
|
ref,
|
|
30
|
+
type,
|
|
29
31
|
...props,
|
|
30
32
|
as
|
|
31
33
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Link/useLink.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AAGA;;;;AAIG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAC9B,KAD8B,EAE9B,GAF8B,KAGjB;EACb,MAAM;IAAE,UAAU,GAAG,SAAf;IAA0B,QAAQ,GAAG,KAArC;IAA4C,iBAAiB,GAAG,KAAhE;IAAuE,MAAM,GAAG;EAAhF,IAA0F,KAAhG;EACA,MAAM,EAAE,GAAG,KAAK,CAAC,EAAN,KAAa,KAAK,CAAC,IAAN,GAAa,GAAb,GAAmB,QAAhC,CAAX;EAEA,MAAM,KAAK,GAAc;IACvB;IACA,UAFuB;IAGvB,QAHuB;IAIvB,iBAJuB;IAKvB,MALuB;IAOvB;IACA,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CARW;IAYvB,IAAI,EAAE,qBAAqB,CAAC,EAAD,EAAK;MAC9B,GAD8B;MAE9B,GAAG,
|
|
1
|
+
{"version":3,"sources":["components/Link/useLink.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AAGA;;;;AAIG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAC9B,KAD8B,EAE9B,GAF8B,KAGjB;EACb,MAAM;IAAE,UAAU,GAAG,SAAf;IAA0B,QAAQ,GAAG,KAArC;IAA4C,iBAAiB,GAAG,KAAhE;IAAuE,MAAM,GAAG;EAAhF,IAA0F,KAAhG;EACA,MAAM,EAAE,GAAG,KAAK,CAAC,EAAN,KAAa,KAAK,CAAC,IAAN,GAAa,GAAb,GAAmB,QAAhC,CAAX;EACA,MAAM,IAAI,GAAG,EAAE,KAAK,QAAP,GAAkB,QAAlB,GAA6B,SAA1C;EAEA,MAAM,KAAK,GAAc;IACvB;IACA,UAFuB;IAGvB,QAHuB;IAIvB,iBAJuB;IAKvB,MALuB;IAOvB;IACA,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CARW;IAYvB,IAAI,EAAE,qBAAqB,CAAC,EAAD,EAAK;MAC9B,GAD8B;MAE9B,IAF8B;MAG9B,GAAG,KAH2B;MAI9B;IAJ8B,CAAL;EAZJ,CAAzB;EAoBA,qBAAqB,CAAC,KAAD,CAArB;EAEA,OAAO,KAAP;AACD,CA/BM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useLinkState_unstable } from './useLinkState';\nimport type { LinkProps, LinkState } from './Link.types';\n\n/**\n * Given user props, defines default props for the Link, calls useLinkState_unstable, and returns processed state.\n * @param props - User provided props to the Link component.\n * @param ref - User provided ref to be passed to the Link component.\n */\nexport const useLink_unstable = (\n props: LinkProps,\n ref: React.Ref<HTMLAnchorElement | HTMLButtonElement>,\n): LinkState => {\n const { appearance = 'default', disabled = false, disabledFocusable = false, inline = false } = props;\n const as = props.as || (props.href ? 'a' : 'button');\n const type = as === 'button' ? 'button' : undefined;\n\n const state: LinkState = {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n inline,\n\n // Slots definition\n components: {\n root: 'a',\n },\n\n root: getNativeElementProps(as, {\n ref,\n type,\n ...props,\n as,\n }),\n };\n\n useLinkState_unstable(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -8,19 +8,13 @@ export const linkClassNames = {
|
|
|
8
8
|
const useStyles = /*#__PURE__*/__styles({
|
|
9
9
|
"focusIndicator": {
|
|
10
10
|
"Brovlpu": "ftqa4ok",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
11
|
+
"B486eqv": "f2hkw1w",
|
|
12
|
+
"D1zc2y": "fuz7n5u",
|
|
13
|
+
"Brv2fdy": "f1g95kj2",
|
|
14
|
+
"Gw2sc7": "f6kc4ag"
|
|
15
15
|
},
|
|
16
16
|
"root": {
|
|
17
17
|
"De3pzq": "f3rmtva",
|
|
18
|
-
"icvyot": "f1ern45e",
|
|
19
|
-
"wvpqe5": ["f1deefiw", "f1n71otn"],
|
|
20
|
-
"vrafjx": ["f1n71otn", "f1deefiw"],
|
|
21
|
-
"B9xav0g": "f1q5o8ev",
|
|
22
|
-
"oivjwe": "fg706s2",
|
|
23
|
-
"Bn0qgzm": "f1vxd6vx",
|
|
24
18
|
"B7ck84d": "f1ewtqcl",
|
|
25
19
|
"sj55zd": "fyind8e",
|
|
26
20
|
"Bceei9c": "f1k6fduh",
|
|
@@ -40,43 +34,48 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
40
34
|
"Bmxbyg5": "f1vmzxwi",
|
|
41
35
|
"fsow6f": ["f1o700av", "fes3tcz"],
|
|
42
36
|
"w71qe1": "f1iuv45f",
|
|
37
|
+
"Bkioxbp": "f1cmlufx",
|
|
43
38
|
"ygn44y": "f9n3di6",
|
|
44
39
|
"famaaq": "f1ids18y",
|
|
45
|
-
"
|
|
40
|
+
"Bde5pd6": "f1tx3yz7",
|
|
46
41
|
"Bi91k9c": "f1deo86v",
|
|
47
|
-
"
|
|
42
|
+
"i089h6": "f1eh06m1",
|
|
48
43
|
"lj723h": "f1iescvh"
|
|
49
44
|
},
|
|
45
|
+
"button": {
|
|
46
|
+
"icvyot": "f1ern45e",
|
|
47
|
+
"vrafjx": ["f1n71otn", "f1deefiw"],
|
|
48
|
+
"oivjwe": "f1h8hb77",
|
|
49
|
+
"wvpqe5": ["f1deefiw", "f1n71otn"]
|
|
50
|
+
},
|
|
50
51
|
"href": {
|
|
51
52
|
"Be2twd7": "fjoy568"
|
|
52
53
|
},
|
|
53
54
|
"subtle": {
|
|
54
55
|
"sj55zd": "fkfq4zb",
|
|
55
|
-
"
|
|
56
|
+
"Bde5pd6": "f1tx3yz7",
|
|
56
57
|
"Bi91k9c": "fnwyq0v",
|
|
57
|
-
"
|
|
58
|
+
"i089h6": "f1eh06m1",
|
|
58
59
|
"lj723h": "flvvhsy"
|
|
59
60
|
},
|
|
60
61
|
"inline": {
|
|
61
|
-
"
|
|
62
|
-
},
|
|
63
|
-
"inlineSubtle": {
|
|
64
|
-
"B9xav0g": "fskmnqw"
|
|
62
|
+
"w71qe1": "f13mvf36"
|
|
65
63
|
},
|
|
66
64
|
"disabled": {
|
|
67
|
-
"
|
|
65
|
+
"w71qe1": "f1iuv45f",
|
|
68
66
|
"sj55zd": "f1s2aq7o",
|
|
69
67
|
"Bceei9c": "fdrzuqr",
|
|
70
|
-
"
|
|
68
|
+
"Bde5pd6": "fbnuktb",
|
|
71
69
|
"Bi91k9c": "fvgxktp",
|
|
72
|
-
"
|
|
70
|
+
"i089h6": "fljg2da",
|
|
73
71
|
"lj723h": "f19wldhg"
|
|
74
72
|
}
|
|
75
73
|
}, {
|
|
76
74
|
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
75
|
+
"i": [".f2hkw1w:focus-visible{outline-style:none;}"],
|
|
76
|
+
"d": [".fuz7n5u.fui-focus-visible{text-decoration-color:var(--colorStrokeFocus2);}", ".f1g95kj2.fui-focus-visible{text-decoration-line:underline;}", ".f6kc4ag.fui-focus-visible{text-decoration-style:double;}", ".f3rmtva{background-color:transparent;}", ".f1ewtqcl{box-sizing:border-box;}", ".fyind8e{color:var(--colorBrandForegroundLink);}", ".f1k6fduh{cursor:pointer;}", ".f1w7gpdv{display:inline;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".fqv5qza{overflow-x:inherit;}", ".f1vmzxwi{overflow-y:inherit;}", ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}", ".f1iuv45f{text-decoration-line:none;}", ".f1cmlufx{text-decoration-thickness:var(--strokeWidthThin);}", ".f9n3di6{text-overflow:inherit;}", ".f1ids18y{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".fjoy568{font-size:inherit;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f13mvf36{text-decoration-line:underline;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".fdrzuqr{cursor:not-allowed;}"],
|
|
77
|
+
"h": [".f1tx3yz7:hover{text-decoration-line:underline;}", ".f1deo86v:hover{color:var(--colorBrandForegroundLinkHover);}", ".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}", ".fbnuktb:hover{text-decoration-line:none;}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}"],
|
|
78
|
+
"a": [".f1eh06m1:active{text-decoration-line:underline;}", ".f1iescvh:active{color:var(--colorBrandForegroundLinkPressed);}", ".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}", ".fljg2da:active{text-decoration-line:none;}", ".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}"]
|
|
80
79
|
});
|
|
81
80
|
|
|
82
81
|
export const useLinkStyles_unstable = state => {
|
|
@@ -87,7 +86,7 @@ export const useLinkStyles_unstable = state => {
|
|
|
87
86
|
inline,
|
|
88
87
|
root
|
|
89
88
|
} = state;
|
|
90
|
-
state.root.className = mergeClasses(linkClassNames.root, styles.root, styles.focusIndicator, root.as === 'a' && root.href && styles.href,
|
|
89
|
+
state.root.className = mergeClasses(linkClassNames.root, styles.root, styles.focusIndicator, root.as === 'a' && root.href && styles.href, root.as === 'button' && styles.button, appearance === 'subtle' && styles.subtle, inline && styles.inline, disabled && styles.disabled, state.root.className);
|
|
91
90
|
return state;
|
|
92
91
|
};
|
|
93
92
|
//# 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;AAIA,OAAO,MAAM,cAAc,GAA8B;EACvD,IAAI,EAAE;AADiD,CAAlD;;AAIP,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;
|
|
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,OAAO,MAAM,cAAc,GAA8B;EACvD,IAAI,EAAE;AADiD,CAAlD;;AAIP,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA,EAAlB;;AA+EA,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAgC;EACpE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM;IAAE,UAAF;IAAc,QAAd;IAAwB,MAAxB;IAAgC;EAAhC,IAAyC,KAA/C;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,cAAc,CAAC,IADkB,EAEjC,MAAM,CAAC,IAF0B,EAGjC,MAAM,CAAC,cAH0B,EAIjC,IAAI,CAAC,EAAL,KAAY,GAAZ,IAAmB,IAAI,CAAC,IAAxB,IAAgC,MAAM,CAAC,IAJN,EAKjC,IAAI,CAAC,EAAL,KAAY,QAAZ,IAAwB,MAAM,CAAC,MALE,EAMjC,UAAU,KAAK,QAAf,IAA2B,MAAM,CAAC,MAND,EAOjC,MAAM,IAAI,MAAM,CAAC,MAPgB,EAQjC,QAAQ,IAAI,MAAM,CAAC,QARc,EASjC,KAAK,CAAC,IAAN,CAAW,SATsB,CAAnC;EAYA,OAAO,KAAP;AACD,CAjBM","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\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nconst useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n }),\n // Common styles.\n root: {\n backgroundColor: 'transparent',\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 textDecorationThickness: tokens.strokeWidthThin,\n textOverflow: 'inherit',\n userSelect: 'text',\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n // Overrides when the Link renders as a button.\n button: {\n ...shorthands.borderStyle('none'),\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 textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Hover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n // Overrides when the Link is rendered inline within text.\n inline: {\n textDecorationLine: 'underline',\n },\n // Overrides when the Link is disabled.\n disabled: {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n\n ':hover': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n const { appearance, disabled, inline, root } = state;\n\n state.root.className = mergeClasses(\n linkClassNames.root,\n styles.root,\n styles.focusIndicator,\n root.as === 'a' && root.href && styles.href,\n root.as === 'button' && styles.button,\n appearance === 'subtle' && styles.subtle,\n inline && styles.inline,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -23,6 +23,7 @@ const useLink_unstable = (props, ref) => {
|
|
|
23
23
|
inline = false
|
|
24
24
|
} = props;
|
|
25
25
|
const as = props.as || (props.href ? 'a' : 'button');
|
|
26
|
+
const type = as === 'button' ? 'button' : undefined;
|
|
26
27
|
const state = {
|
|
27
28
|
// Props passed at the top-level
|
|
28
29
|
appearance,
|
|
@@ -35,6 +36,7 @@ const useLink_unstable = (props, ref) => {
|
|
|
35
36
|
},
|
|
36
37
|
root: react_utilities_1.getNativeElementProps(as, {
|
|
37
38
|
ref,
|
|
39
|
+
type,
|
|
38
40
|
...props,
|
|
39
41
|
as
|
|
40
42
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Link/useLink.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,gBAAgB,GAAG,CAC9B,KAD8B,EAE9B,GAF8B,KAGjB;EACb,MAAM;IAAE,UAAU,GAAG,SAAf;IAA0B,QAAQ,GAAG,KAArC;IAA4C,iBAAiB,GAAG,KAAhE;IAAuE,MAAM,GAAG;EAAhF,IAA0F,KAAhG;EACA,MAAM,EAAE,GAAG,KAAK,CAAC,EAAN,KAAa,KAAK,CAAC,IAAN,GAAa,GAAb,GAAmB,QAAhC,CAAX;EAEA,MAAM,KAAK,GAAc;IACvB;IACA,UAFuB;IAGvB,QAHuB;IAIvB,iBAJuB;IAKvB,MALuB;IAOvB;IACA,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CARW;IAYvB,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,EAAtB,EAA0B;MAC9B,GAD8B;MAE9B,GAAG,
|
|
1
|
+
{"version":3,"sources":["components/Link/useLink.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,gBAAgB,GAAG,CAC9B,KAD8B,EAE9B,GAF8B,KAGjB;EACb,MAAM;IAAE,UAAU,GAAG,SAAf;IAA0B,QAAQ,GAAG,KAArC;IAA4C,iBAAiB,GAAG,KAAhE;IAAuE,MAAM,GAAG;EAAhF,IAA0F,KAAhG;EACA,MAAM,EAAE,GAAG,KAAK,CAAC,EAAN,KAAa,KAAK,CAAC,IAAN,GAAa,GAAb,GAAmB,QAAhC,CAAX;EACA,MAAM,IAAI,GAAG,EAAE,KAAK,QAAP,GAAkB,QAAlB,GAA6B,SAA1C;EAEA,MAAM,KAAK,GAAc;IACvB;IACA,UAFuB;IAGvB,QAHuB;IAIvB,iBAJuB;IAKvB,MALuB;IAOvB;IACA,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CARW;IAYvB,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,EAAtB,EAA0B;MAC9B,GAD8B;MAE9B,IAF8B;MAG9B,GAAG,KAH2B;MAI9B;IAJ8B,CAA1B;EAZiB,CAAzB;EAoBA,cAAA,CAAA,qBAAA,CAAsB,KAAtB;EAEA,OAAO,KAAP;AACD,CA/BM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useLinkState_unstable } from './useLinkState';\nimport type { LinkProps, LinkState } from './Link.types';\n\n/**\n * Given user props, defines default props for the Link, calls useLinkState_unstable, and returns processed state.\n * @param props - User provided props to the Link component.\n * @param ref - User provided ref to be passed to the Link component.\n */\nexport const useLink_unstable = (\n props: LinkProps,\n ref: React.Ref<HTMLAnchorElement | HTMLButtonElement>,\n): LinkState => {\n const { appearance = 'default', disabled = false, disabledFocusable = false, inline = false } = props;\n const as = props.as || (props.href ? 'a' : 'button');\n const type = as === 'button' ? 'button' : undefined;\n\n const state: LinkState = {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n inline,\n\n // Slots definition\n components: {\n root: 'a',\n },\n\n root: getNativeElementProps(as, {\n ref,\n type,\n ...props,\n as,\n }),\n };\n\n useLinkState_unstable(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -18,19 +18,13 @@ exports.linkClassNames = {
|
|
|
18
18
|
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
19
19
|
"focusIndicator": {
|
|
20
20
|
"Brovlpu": "ftqa4ok",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
21
|
+
"B486eqv": "f2hkw1w",
|
|
22
|
+
"D1zc2y": "fuz7n5u",
|
|
23
|
+
"Brv2fdy": "f1g95kj2",
|
|
24
|
+
"Gw2sc7": "f6kc4ag"
|
|
25
25
|
},
|
|
26
26
|
"root": {
|
|
27
27
|
"De3pzq": "f3rmtva",
|
|
28
|
-
"icvyot": "f1ern45e",
|
|
29
|
-
"wvpqe5": ["f1deefiw", "f1n71otn"],
|
|
30
|
-
"vrafjx": ["f1n71otn", "f1deefiw"],
|
|
31
|
-
"B9xav0g": "f1q5o8ev",
|
|
32
|
-
"oivjwe": "fg706s2",
|
|
33
|
-
"Bn0qgzm": "f1vxd6vx",
|
|
34
28
|
"B7ck84d": "f1ewtqcl",
|
|
35
29
|
"sj55zd": "fyind8e",
|
|
36
30
|
"Bceei9c": "f1k6fduh",
|
|
@@ -50,43 +44,48 @@ const useStyles = /*#__PURE__*/react_1.__styles({
|
|
|
50
44
|
"Bmxbyg5": "f1vmzxwi",
|
|
51
45
|
"fsow6f": ["f1o700av", "fes3tcz"],
|
|
52
46
|
"w71qe1": "f1iuv45f",
|
|
47
|
+
"Bkioxbp": "f1cmlufx",
|
|
53
48
|
"ygn44y": "f9n3di6",
|
|
54
49
|
"famaaq": "f1ids18y",
|
|
55
|
-
"
|
|
50
|
+
"Bde5pd6": "f1tx3yz7",
|
|
56
51
|
"Bi91k9c": "f1deo86v",
|
|
57
|
-
"
|
|
52
|
+
"i089h6": "f1eh06m1",
|
|
58
53
|
"lj723h": "f1iescvh"
|
|
59
54
|
},
|
|
55
|
+
"button": {
|
|
56
|
+
"icvyot": "f1ern45e",
|
|
57
|
+
"vrafjx": ["f1n71otn", "f1deefiw"],
|
|
58
|
+
"oivjwe": "f1h8hb77",
|
|
59
|
+
"wvpqe5": ["f1deefiw", "f1n71otn"]
|
|
60
|
+
},
|
|
60
61
|
"href": {
|
|
61
62
|
"Be2twd7": "fjoy568"
|
|
62
63
|
},
|
|
63
64
|
"subtle": {
|
|
64
65
|
"sj55zd": "fkfq4zb",
|
|
65
|
-
"
|
|
66
|
+
"Bde5pd6": "f1tx3yz7",
|
|
66
67
|
"Bi91k9c": "fnwyq0v",
|
|
67
|
-
"
|
|
68
|
+
"i089h6": "f1eh06m1",
|
|
68
69
|
"lj723h": "flvvhsy"
|
|
69
70
|
},
|
|
70
71
|
"inline": {
|
|
71
|
-
"
|
|
72
|
-
},
|
|
73
|
-
"inlineSubtle": {
|
|
74
|
-
"B9xav0g": "fskmnqw"
|
|
72
|
+
"w71qe1": "f13mvf36"
|
|
75
73
|
},
|
|
76
74
|
"disabled": {
|
|
77
|
-
"
|
|
75
|
+
"w71qe1": "f1iuv45f",
|
|
78
76
|
"sj55zd": "f1s2aq7o",
|
|
79
77
|
"Bceei9c": "fdrzuqr",
|
|
80
|
-
"
|
|
78
|
+
"Bde5pd6": "fbnuktb",
|
|
81
79
|
"Bi91k9c": "fvgxktp",
|
|
82
|
-
"
|
|
80
|
+
"i089h6": "fljg2da",
|
|
83
81
|
"lj723h": "f19wldhg"
|
|
84
82
|
}
|
|
85
83
|
}, {
|
|
86
84
|
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
85
|
+
"i": [".f2hkw1w:focus-visible{outline-style:none;}"],
|
|
86
|
+
"d": [".fuz7n5u.fui-focus-visible{text-decoration-color:var(--colorStrokeFocus2);}", ".f1g95kj2.fui-focus-visible{text-decoration-line:underline;}", ".f6kc4ag.fui-focus-visible{text-decoration-style:double;}", ".f3rmtva{background-color:transparent;}", ".f1ewtqcl{box-sizing:border-box;}", ".fyind8e{color:var(--colorBrandForegroundLink);}", ".f1k6fduh{cursor:pointer;}", ".f1w7gpdv{display:inline;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".fqv5qza{overflow-x:inherit;}", ".f1vmzxwi{overflow-y:inherit;}", ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}", ".f1iuv45f{text-decoration-line:none;}", ".f1cmlufx{text-decoration-thickness:var(--strokeWidthThin);}", ".f9n3di6{text-overflow:inherit;}", ".f1ids18y{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".fjoy568{font-size:inherit;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f13mvf36{text-decoration-line:underline;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".fdrzuqr{cursor:not-allowed;}"],
|
|
87
|
+
"h": [".f1tx3yz7:hover{text-decoration-line:underline;}", ".f1deo86v:hover{color:var(--colorBrandForegroundLinkHover);}", ".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}", ".fbnuktb:hover{text-decoration-line:none;}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}"],
|
|
88
|
+
"a": [".f1eh06m1:active{text-decoration-line:underline;}", ".f1iescvh:active{color:var(--colorBrandForegroundLinkPressed);}", ".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}", ".fljg2da:active{text-decoration-line:none;}", ".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}"]
|
|
90
89
|
});
|
|
91
90
|
|
|
92
91
|
const useLinkStyles_unstable = state => {
|
|
@@ -97,7 +96,7 @@ const useLinkStyles_unstable = state => {
|
|
|
97
96
|
inline,
|
|
98
97
|
root
|
|
99
98
|
} = state;
|
|
100
|
-
state.root.className = react_1.mergeClasses(exports.linkClassNames.root, styles.root, styles.focusIndicator, root.as === 'a' && root.href && styles.href,
|
|
99
|
+
state.root.className = react_1.mergeClasses(exports.linkClassNames.root, styles.root, styles.focusIndicator, root.as === 'a' && root.href && styles.href, root.as === 'button' && styles.button, appearance === 'subtle' && styles.subtle, inline && styles.inline, disabled && styles.disabled, state.root.className);
|
|
101
100
|
return state;
|
|
102
101
|
};
|
|
103
102
|
|
|
@@ -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;;AAIa,OAAA,CAAA,cAAA,GAA4C;EACvD,IAAI,EAAE;AADiD,CAA5C;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;
|
|
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,OAAA,CAAA,cAAA,GAA4C;EACvD,IAAI,EAAE;AADiD,CAA5C;;AAIb,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA,EAAlB;;AA+EO,MAAM,sBAAsB,GAAI,KAAD,IAAgC;EACpE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM;IAAE,UAAF;IAAc,QAAd;IAAwB,MAAxB;IAAgC;EAAhC,IAAyC,KAA/C;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,cAAA,CAAe,IADM,EAErB,MAAM,CAAC,IAFc,EAGrB,MAAM,CAAC,cAHc,EAIrB,IAAI,CAAC,EAAL,KAAY,GAAZ,IAAmB,IAAI,CAAC,IAAxB,IAAgC,MAAM,CAAC,IAJlB,EAKrB,IAAI,CAAC,EAAL,KAAY,QAAZ,IAAwB,MAAM,CAAC,MALV,EAMrB,UAAU,KAAK,QAAf,IAA2B,MAAM,CAAC,MANb,EAOrB,MAAM,IAAI,MAAM,CAAC,MAPI,EAQrB,QAAQ,IAAI,MAAM,CAAC,QARE,EASrB,KAAK,CAAC,IAAN,CAAW,SATU,CAAvB;EAYA,OAAO,KAAP;AACD,CAjBM;;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\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nconst useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n }),\n // Common styles.\n root: {\n backgroundColor: 'transparent',\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 textDecorationThickness: tokens.strokeWidthThin,\n textOverflow: 'inherit',\n userSelect: 'text',\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n // Overrides when the Link renders as a button.\n button: {\n ...shorthands.borderStyle('none'),\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 textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Hover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n // Overrides when the Link is rendered inline within text.\n inline: {\n textDecorationLine: 'underline',\n },\n // Overrides when the Link is disabled.\n disabled: {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n\n ':hover': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n const { appearance, disabled, inline, root } = state;\n\n state.root.className = mergeClasses(\n linkClassNames.root,\n styles.root,\n styles.focusIndicator,\n root.as === 'a' && root.href && styles.href,\n root.as === 'button' && styles.button,\n appearance === 'subtle' && styles.subtle,\n inline && styles.inline,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-link",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.5",
|
|
4
4
|
"description": "Fluent UI React Link component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -21,23 +21,23 @@
|
|
|
21
21
|
"start": "yarn storybook",
|
|
22
22
|
"test": "jest --passWithNoTests",
|
|
23
23
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
|
24
|
-
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-link/src && yarn docs",
|
|
25
|
-
"storybook": "
|
|
24
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-link/src && yarn docs",
|
|
25
|
+
"storybook": "start-storybook",
|
|
26
26
|
"type-check": "tsc -b tsconfig.json"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
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.
|
|
32
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.13",
|
|
33
33
|
"@fluentui/scripts": "^1.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@fluentui/keyboard-keys": "^9.0.0",
|
|
37
|
-
"@fluentui/react-tabster": "^9.
|
|
38
|
-
"@fluentui/react-theme": "^9.
|
|
39
|
-
"@fluentui/react-utilities": "^9.0
|
|
40
|
-
"@griffel/react": "^1.
|
|
37
|
+
"@fluentui/react-tabster": "^9.1.1",
|
|
38
|
+
"@fluentui/react-theme": "^9.1.0",
|
|
39
|
+
"@fluentui/react-utilities": "^9.1.0",
|
|
40
|
+
"@griffel/react": "^1.3.0",
|
|
41
41
|
"tslib": "^2.1.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"beachball": {
|
|
50
50
|
"disallowedChangeTypes": [
|
|
51
|
-
"major"
|
|
51
|
+
"major",
|
|
52
|
+
"prerelease"
|
|
52
53
|
]
|
|
53
54
|
},
|
|
54
55
|
"exports": {
|
package/dist/tsdoc-metadata.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.18.1"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|