@fluentui/react-link 9.0.30 → 9.0.31
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/.swcrc +30 -0
- package/CHANGELOG.json +52 -1
- package/CHANGELOG.md +17 -2
- package/lib/Link.js.map +1 -1
- package/lib/components/Link/Link.js.map +1 -1
- package/lib/components/Link/Link.types.js.map +1 -1
- package/lib/components/Link/index.js.map +1 -1
- package/lib/components/Link/renderLink.js +1 -3
- package/lib/components/Link/renderLink.js.map +1 -1
- package/lib/components/Link/useLink.js +1 -0
- package/lib/components/Link/useLink.js.map +1 -1
- package/lib/components/Link/useLinkState.js +2 -3
- package/lib/components/Link/useLinkState.js.map +1 -1
- package/lib/components/Link/useLinkStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Link.js +5 -4
- package/lib-commonjs/Link.js.map +1 -1
- package/lib-commonjs/components/Link/Link.js +16 -16
- package/lib-commonjs/components/Link/Link.js.map +1 -1
- package/lib-commonjs/components/Link/Link.types.js +3 -2
- package/lib-commonjs/components/Link/Link.types.js.map +1 -1
- package/lib-commonjs/components/Link/index.js +10 -9
- package/lib-commonjs/components/Link/index.js.map +1 -1
- package/lib-commonjs/components/Link/renderLink.js +13 -18
- package/lib-commonjs/components/Link/renderLink.js.map +1 -1
- package/lib-commonjs/components/Link/useLink.js +34 -40
- package/lib-commonjs/components/Link/useLink.js.map +1 -1
- package/lib-commonjs/components/Link/useLinkState.js +45 -56
- package/lib-commonjs/components/Link/useLinkState.js.map +1 -1
- package/lib-commonjs/components/Link/useLinkStyles.js +165 -90
- package/lib-commonjs/components/Link/useLinkStyles.js.map +1 -1
- package/lib-commonjs/index.js +17 -39
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +9 -8
- package/lib-amd/Link.js +0 -6
- package/lib-amd/Link.js.map +0 -1
- package/lib-amd/components/Link/Link.js +0 -16
- package/lib-amd/components/Link/Link.js.map +0 -1
- package/lib-amd/components/Link/Link.types.js +0 -5
- package/lib-amd/components/Link/Link.types.js.map +0 -1
- package/lib-amd/components/Link/index.js +0 -11
- package/lib-amd/components/Link/index.js.map +0 -1
- package/lib-amd/components/Link/renderLink.js +0 -14
- package/lib-amd/components/Link/renderLink.js.map +0 -1
- package/lib-amd/components/Link/useLink.js +0 -31
- package/lib-amd/components/Link/useLink.js.map +0 -1
- package/lib-amd/components/Link/useLinkState.js +0 -54
- package/lib-amd/components/Link/useLinkState.js.map +0 -1
- package/lib-amd/components/Link/useLinkStyles.js +0 -67
- package/lib-amd/components/Link/useLinkStyles.js.map +0 -1
- package/lib-amd/index.js +0 -12
- package/lib-amd/index.js.map +0 -1
|
@@ -1,63 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
disabled,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// Add href and tabIndex=0 for anchor elements.
|
|
25
|
-
if (state.root.as === 'a') {
|
|
26
|
-
state.root.href = disabled ? undefined : state.root.href;
|
|
27
|
-
state.root.tabIndex = tabIndex !== null && tabIndex !== void 0 ? tabIndex : disabled && !disabledFocusable ? undefined : 0;
|
|
28
|
-
// Add role="link" for disabled and disabledFocusable links.
|
|
29
|
-
if (disabled || disabledFocusable) {
|
|
30
|
-
state.root.role = role || 'link';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
// Add type="button" for button elements.
|
|
34
|
-
else {
|
|
35
|
-
state.root.type = type || 'button';
|
|
36
|
-
}
|
|
37
|
-
// Disallow click event when component is disabled and eat events when disabledFocusable is set to true.
|
|
38
|
-
state.root.onClick = ev => {
|
|
39
|
-
if (disabled || disabledFocusable) {
|
|
40
|
-
ev.preventDefault();
|
|
5
|
+
Object.defineProperty(exports, "useLinkState_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>useLinkState_unstable
|
|
8
|
+
});
|
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
+
const _keyboardKeys = require("@fluentui/keyboard-keys");
|
|
12
|
+
const useLinkState_unstable = (state)=>{
|
|
13
|
+
const { disabled , disabledFocusable } = state;
|
|
14
|
+
const { onClick , onKeyDown , role , tabIndex , type } = state.root;
|
|
15
|
+
// Add href and tabIndex=0 for anchor elements.
|
|
16
|
+
if (state.root.as === 'a') {
|
|
17
|
+
state.root.href = disabled ? undefined : state.root.href;
|
|
18
|
+
state.root.tabIndex = tabIndex !== null && tabIndex !== void 0 ? tabIndex : disabled && !disabledFocusable ? undefined : 0;
|
|
19
|
+
// Add role="link" for disabled and disabledFocusable links.
|
|
20
|
+
if (disabled || disabledFocusable) {
|
|
21
|
+
state.root.role = role || 'link';
|
|
22
|
+
}
|
|
41
23
|
} else {
|
|
42
|
-
|
|
24
|
+
state.root.type = type || 'button';
|
|
43
25
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
26
|
+
// Disallow click event when component is disabled and eat events when disabledFocusable is set to true.
|
|
27
|
+
state.root.onClick = (ev)=>{
|
|
28
|
+
if (disabled || disabledFocusable) {
|
|
29
|
+
ev.preventDefault();
|
|
30
|
+
} else {
|
|
31
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(ev);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
// Disallow keydown event when component is disabled and eat events when disabledFocusable is set to true.
|
|
35
|
+
state.root.onKeyDown = (ev)=>{
|
|
36
|
+
if ((disabled || disabledFocusable) && (ev.key === _keyboardKeys.Enter || ev.key === _keyboardKeys.Space)) {
|
|
37
|
+
ev.preventDefault();
|
|
38
|
+
ev.stopPropagation();
|
|
39
|
+
} else {
|
|
40
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(ev);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
// Set the aria-disabled and disabled props correctly.
|
|
44
|
+
state.disabled = disabled || disabledFocusable;
|
|
45
|
+
state.root['aria-disabled'] = disabled || disabledFocusable || undefined;
|
|
46
|
+
if (state.root.as === 'button') {
|
|
47
|
+
state.root.disabled = disabled && !disabledFocusable;
|
|
52
48
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
state.root['aria-disabled'] = disabled || disabledFocusable || undefined;
|
|
57
|
-
if (state.root.as === 'button') {
|
|
58
|
-
state.root.disabled = disabled && !disabledFocusable;
|
|
59
|
-
}
|
|
60
|
-
return state;
|
|
61
|
-
};
|
|
62
|
-
exports.useLinkState_unstable = useLinkState_unstable;
|
|
49
|
+
return state;
|
|
50
|
+
}; //# sourceMappingURL=useLinkState.js.map
|
|
51
|
+
|
|
63
52
|
//# sourceMappingURL=useLinkState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Link/useLinkState.js"],"sourcesContent":["import * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\n/**\n * The useLinkState_unstable hook processes the Link state.\n * @param state - Link state to mutate.\n */\nexport const useLinkState_unstable = state => {\n const {\n disabled,\n disabledFocusable\n } = state;\n const {\n onClick,\n onKeyDown,\n role,\n tabIndex,\n type\n } = state.root;\n // Add href and tabIndex=0 for anchor elements.\n if (state.root.as === 'a') {\n state.root.href = disabled ? undefined : state.root.href;\n state.root.tabIndex = tabIndex !== null && tabIndex !== void 0 ? tabIndex : disabled && !disabledFocusable ? undefined : 0;\n // Add role=\"link\" for disabled and disabledFocusable links.\n if (disabled || disabledFocusable) {\n state.root.role = role || 'link';\n }\n } else {\n state.root.type = type || 'button';\n }\n // Disallow click event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onClick = ev => {\n if (disabled || disabledFocusable) {\n ev.preventDefault();\n } else {\n onClick === null || onClick === void 0 ? void 0 : onClick(ev);\n }\n };\n // Disallow keydown event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onKeyDown = ev => {\n if ((disabled || disabledFocusable) && (ev.key === Enter || ev.key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(ev);\n }\n };\n // Set the aria-disabled and disabled props correctly.\n state.disabled = disabled || disabledFocusable;\n state.root['aria-disabled'] = disabled || disabledFocusable || undefined;\n if (state.root.as === 'button') {\n state.root.disabled = disabled && !disabledFocusable;\n }\n return state;\n};\n//# sourceMappingURL=useLinkState.js.map"],"names":["useLinkState_unstable","state","disabled","disabledFocusable","onClick","onKeyDown","role","tabIndex","type","root","as","href","undefined","ev","preventDefault","key","Enter","Space","stopPropagation"],"mappings":";;;;+BAMaA;;aAAAA;;;6DANU;8BACM;AAKtB,MAAMA,wBAAwBC,CAAAA,QAAS;IAC5C,MAAM,EACJC,SAAQ,EACRC,kBAAiB,EAClB,GAAGF;IACJ,MAAM,EACJG,QAAO,EACPC,UAAS,EACTC,KAAI,EACJC,SAAQ,EACRC,KAAI,EACL,GAAGP,MAAMQ,IAAI;IACd,+CAA+C;IAC/C,IAAIR,MAAMQ,IAAI,CAACC,EAAE,KAAK,KAAK;QACzBT,MAAMQ,IAAI,CAACE,IAAI,GAAGT,WAAWU,YAAYX,MAAMQ,IAAI,CAACE,IAAI;QACxDV,MAAMQ,IAAI,CAACF,QAAQ,GAAGA,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAIA,WAAWL,YAAY,CAACC,oBAAoBS,YAAY,CAAC;QAC1H,4DAA4D;QAC5D,IAAIV,YAAYC,mBAAmB;YACjCF,MAAMQ,IAAI,CAACH,IAAI,GAAGA,QAAQ;QAC5B,CAAC;IACH,OAAO;QACLL,MAAMQ,IAAI,CAACD,IAAI,GAAGA,QAAQ;IAC5B,CAAC;IACD,wGAAwG;IACxGP,MAAMQ,IAAI,CAACL,OAAO,GAAGS,CAAAA,KAAM;QACzB,IAAIX,YAAYC,mBAAmB;YACjCU,GAAGC,cAAc;QACnB,OAAO;YACLV,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQS,GAAG;QAC/D,CAAC;IACH;IACA,0GAA0G;IAC1GZ,MAAMQ,IAAI,CAACJ,SAAS,GAAGQ,CAAAA,KAAM;QAC3B,IAAI,AAACX,CAAAA,YAAYC,iBAAgB,KAAOU,CAAAA,GAAGE,GAAG,KAAKC,mBAAK,IAAIH,GAAGE,GAAG,KAAKE,mBAAK,AAAD,GAAI;YAC7EJ,GAAGC,cAAc;YACjBD,GAAGK,eAAe;QACpB,OAAO;YACLb,cAAc,IAAI,IAAIA,cAAc,KAAK,IAAI,KAAK,IAAIA,UAAUQ,GAAG;QACrE,CAAC;IACH;IACA,sDAAsD;IACtDZ,MAAMC,QAAQ,GAAGA,YAAYC;IAC7BF,MAAMQ,IAAI,CAAC,gBAAgB,GAAGP,YAAYC,qBAAqBS;IAC/D,IAAIX,MAAMQ,IAAI,CAACC,EAAE,KAAK,UAAU;QAC9BT,MAAMQ,IAAI,CAACP,QAAQ,GAAGA,YAAY,CAACC;IACrC,CAAC;IACD,OAAOF;AACT,GACA,wCAAwC"}
|
|
@@ -1,97 +1,172 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
linkClassNames: ()=>linkClassNames,
|
|
13
|
+
useLinkStyles_unstable: ()=>useLinkStyles_unstable
|
|
5
14
|
});
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
|
10
|
-
exports.linkClassNames = {
|
|
11
|
-
root: 'fui-Link'
|
|
15
|
+
const _react = require("@griffel/react");
|
|
16
|
+
const linkClassNames = {
|
|
17
|
+
root: 'fui-Link'
|
|
12
18
|
};
|
|
13
|
-
const useStyles = /*#__PURE__*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
19
|
+
const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
20
|
+
focusIndicator: {
|
|
21
|
+
Brovlpu: "ftqa4ok",
|
|
22
|
+
B486eqv: "f2hkw1w",
|
|
23
|
+
Bttzg6e: "fhgqx19",
|
|
24
|
+
B3uz8dt: "f1olyrje",
|
|
25
|
+
B6ihwck: "f1p93eir"
|
|
26
|
+
},
|
|
27
|
+
root: {
|
|
28
|
+
De3pzq: "f3rmtva",
|
|
29
|
+
B7ck84d: "f1ewtqcl",
|
|
30
|
+
sj55zd: "fyind8e",
|
|
31
|
+
Bceei9c: "f1k6fduh",
|
|
32
|
+
mc9l5x: "f1w7gpdv",
|
|
33
|
+
Bahqtrf: "fk6fouc",
|
|
34
|
+
Be2twd7: "fkhj508",
|
|
35
|
+
Bhrd7zp: "figsok6",
|
|
36
|
+
B6of3ja: "f1hu3pq6",
|
|
37
|
+
t21cq0: [
|
|
38
|
+
"f11qmguv",
|
|
39
|
+
"f1tyq0we"
|
|
40
|
+
],
|
|
41
|
+
jrapky: "f19f4twv",
|
|
42
|
+
Frg6f3: [
|
|
43
|
+
"f1tyq0we",
|
|
44
|
+
"f11qmguv"
|
|
45
|
+
],
|
|
46
|
+
z8tnut: "f1g0x7ka",
|
|
47
|
+
z189sj: [
|
|
48
|
+
"fhxju0i",
|
|
49
|
+
"f1cnd47f"
|
|
50
|
+
],
|
|
51
|
+
Byoj8tv: "f1qch9an",
|
|
52
|
+
uwmqm3: [
|
|
53
|
+
"f1cnd47f",
|
|
54
|
+
"fhxju0i"
|
|
55
|
+
],
|
|
56
|
+
B68tc82: "fqv5qza",
|
|
57
|
+
Bmxbyg5: "f1vmzxwi",
|
|
58
|
+
fsow6f: [
|
|
59
|
+
"f1o700av",
|
|
60
|
+
"fes3tcz"
|
|
61
|
+
],
|
|
62
|
+
w71qe1: "f1iuv45f",
|
|
63
|
+
Bkioxbp: "f1cmlufx",
|
|
64
|
+
ygn44y: "f9n3di6",
|
|
65
|
+
famaaq: "f1ids18y",
|
|
66
|
+
Bde5pd6: "f1tx3yz7",
|
|
67
|
+
Bi91k9c: "f1deo86v",
|
|
68
|
+
i089h6: "f1eh06m1",
|
|
69
|
+
lj723h: "f1iescvh"
|
|
70
|
+
},
|
|
71
|
+
button: {
|
|
72
|
+
icvyot: "f1ern45e",
|
|
73
|
+
vrafjx: [
|
|
74
|
+
"f1n71otn",
|
|
75
|
+
"f1deefiw"
|
|
76
|
+
],
|
|
77
|
+
oivjwe: "f1h8hb77",
|
|
78
|
+
wvpqe5: [
|
|
79
|
+
"f1deefiw",
|
|
80
|
+
"f1n71otn"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
href: {
|
|
84
|
+
Be2twd7: "fjoy568"
|
|
85
|
+
},
|
|
86
|
+
subtle: {
|
|
87
|
+
sj55zd: "fkfq4zb",
|
|
88
|
+
Bde5pd6: "f1tx3yz7",
|
|
89
|
+
Bi91k9c: "fnwyq0v",
|
|
90
|
+
i089h6: "f1eh06m1",
|
|
91
|
+
lj723h: "flvvhsy"
|
|
92
|
+
},
|
|
93
|
+
inline: {
|
|
94
|
+
w71qe1: "f13mvf36"
|
|
95
|
+
},
|
|
96
|
+
disabled: {
|
|
97
|
+
w71qe1: "f1iuv45f",
|
|
98
|
+
sj55zd: "f1s2aq7o",
|
|
99
|
+
Bceei9c: "fdrzuqr",
|
|
100
|
+
Bde5pd6: "fbnuktb",
|
|
101
|
+
Bi91k9c: "fvgxktp",
|
|
102
|
+
i089h6: "fljg2da",
|
|
103
|
+
lj723h: "f19wldhg"
|
|
104
|
+
}
|
|
78
105
|
}, {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
106
|
+
f: [
|
|
107
|
+
".ftqa4ok:focus{outline-style:none;}"
|
|
108
|
+
],
|
|
109
|
+
i: [
|
|
110
|
+
".f2hkw1w:focus-visible{outline-style:none;}"
|
|
111
|
+
],
|
|
112
|
+
d: [
|
|
113
|
+
".fhgqx19[data-fui-focus-visible]{text-decoration-color:var(--colorStrokeFocus2);}",
|
|
114
|
+
".f1olyrje[data-fui-focus-visible]{text-decoration-line:underline;}",
|
|
115
|
+
".f1p93eir[data-fui-focus-visible]{text-decoration-style:double;}",
|
|
116
|
+
".f3rmtva{background-color:transparent;}",
|
|
117
|
+
".f1ewtqcl{box-sizing:border-box;}",
|
|
118
|
+
".fyind8e{color:var(--colorBrandForegroundLink);}",
|
|
119
|
+
".f1k6fduh{cursor:pointer;}",
|
|
120
|
+
".f1w7gpdv{display:inline;}",
|
|
121
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
122
|
+
".fkhj508{font-size:var(--fontSizeBase300);}",
|
|
123
|
+
".figsok6{font-weight:var(--fontWeightRegular);}",
|
|
124
|
+
".f1hu3pq6{margin-top:0;}",
|
|
125
|
+
".f11qmguv{margin-right:0;}",
|
|
126
|
+
".f1tyq0we{margin-left:0;}",
|
|
127
|
+
".f19f4twv{margin-bottom:0;}",
|
|
128
|
+
".f1g0x7ka{padding-top:0;}",
|
|
129
|
+
".fhxju0i{padding-right:0;}",
|
|
130
|
+
".f1cnd47f{padding-left:0;}",
|
|
131
|
+
".f1qch9an{padding-bottom:0;}",
|
|
132
|
+
".fqv5qza{overflow-x:inherit;}",
|
|
133
|
+
".f1vmzxwi{overflow-y:inherit;}",
|
|
134
|
+
".f1o700av{text-align:left;}",
|
|
135
|
+
".fes3tcz{text-align:right;}",
|
|
136
|
+
".f1iuv45f{text-decoration-line:none;}",
|
|
137
|
+
".f1cmlufx{text-decoration-thickness:var(--strokeWidthThin);}",
|
|
138
|
+
".f9n3di6{text-overflow:inherit;}",
|
|
139
|
+
".f1ids18y{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}",
|
|
140
|
+
".f1ern45e{border-top-style:none;}",
|
|
141
|
+
".f1n71otn{border-right-style:none;}",
|
|
142
|
+
".f1deefiw{border-left-style:none;}",
|
|
143
|
+
".f1h8hb77{border-bottom-style:none;}",
|
|
144
|
+
".fjoy568{font-size:inherit;}",
|
|
145
|
+
".fkfq4zb{color:var(--colorNeutralForeground2);}",
|
|
146
|
+
".f13mvf36{text-decoration-line:underline;}",
|
|
147
|
+
".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",
|
|
148
|
+
".fdrzuqr{cursor:not-allowed;}"
|
|
149
|
+
],
|
|
150
|
+
h: [
|
|
151
|
+
".f1tx3yz7:hover{text-decoration-line:underline;}",
|
|
152
|
+
".f1deo86v:hover{color:var(--colorBrandForegroundLinkHover);}",
|
|
153
|
+
".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}",
|
|
154
|
+
".fbnuktb:hover{text-decoration-line:none;}",
|
|
155
|
+
".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}"
|
|
156
|
+
],
|
|
157
|
+
a: [
|
|
158
|
+
".f1eh06m1:active{text-decoration-line:underline;}",
|
|
159
|
+
".f1iescvh:active{color:var(--colorBrandForegroundLinkPressed);}",
|
|
160
|
+
".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}",
|
|
161
|
+
".fljg2da:active{text-decoration-line:none;}",
|
|
162
|
+
".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}"
|
|
163
|
+
]
|
|
84
164
|
});
|
|
85
|
-
const useLinkStyles_unstable = state
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
appearance,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
} = state;
|
|
93
|
-
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);
|
|
94
|
-
return state;
|
|
95
|
-
};
|
|
96
|
-
exports.useLinkStyles_unstable = useLinkStyles_unstable;
|
|
165
|
+
const useLinkStyles_unstable = (state)=>{
|
|
166
|
+
const styles = useStyles();
|
|
167
|
+
const { appearance , disabled , inline , root } = state;
|
|
168
|
+
state.root.className = (0, _react.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);
|
|
169
|
+
return state;
|
|
170
|
+
}; //# sourceMappingURL=useLinkStyles.js.map
|
|
171
|
+
|
|
97
172
|
//# sourceMappingURL=useLinkStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Link/useLinkStyles.js"],"sourcesContent":["import { shorthands, __styles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nexport const linkClassNames = {\n root: 'fui-Link'\n};\nconst useStyles = /*#__PURE__*/__styles({\n focusIndicator: {\n Brovlpu: \"ftqa4ok\",\n B486eqv: \"f2hkw1w\",\n Bttzg6e: \"fhgqx19\",\n B3uz8dt: \"f1olyrje\",\n B6ihwck: \"f1p93eir\"\n },\n root: {\n De3pzq: \"f3rmtva\",\n B7ck84d: \"f1ewtqcl\",\n sj55zd: \"fyind8e\",\n Bceei9c: \"f1k6fduh\",\n mc9l5x: \"f1w7gpdv\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n B6of3ja: \"f1hu3pq6\",\n t21cq0: [\"f11qmguv\", \"f1tyq0we\"],\n jrapky: \"f19f4twv\",\n Frg6f3: [\"f1tyq0we\", \"f11qmguv\"],\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"fhxju0i\", \"f1cnd47f\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"f1cnd47f\", \"fhxju0i\"],\n B68tc82: \"fqv5qza\",\n Bmxbyg5: \"f1vmzxwi\",\n fsow6f: [\"f1o700av\", \"fes3tcz\"],\n w71qe1: \"f1iuv45f\",\n Bkioxbp: \"f1cmlufx\",\n ygn44y: \"f9n3di6\",\n famaaq: \"f1ids18y\",\n Bde5pd6: \"f1tx3yz7\",\n Bi91k9c: \"f1deo86v\",\n i089h6: \"f1eh06m1\",\n lj723h: \"f1iescvh\"\n },\n button: {\n icvyot: \"f1ern45e\",\n vrafjx: [\"f1n71otn\", \"f1deefiw\"],\n oivjwe: \"f1h8hb77\",\n wvpqe5: [\"f1deefiw\", \"f1n71otn\"]\n },\n href: {\n Be2twd7: \"fjoy568\"\n },\n subtle: {\n sj55zd: \"fkfq4zb\",\n Bde5pd6: \"f1tx3yz7\",\n Bi91k9c: \"fnwyq0v\",\n i089h6: \"f1eh06m1\",\n lj723h: \"flvvhsy\"\n },\n inline: {\n w71qe1: \"f13mvf36\"\n },\n disabled: {\n w71qe1: \"f1iuv45f\",\n sj55zd: \"f1s2aq7o\",\n Bceei9c: \"fdrzuqr\",\n Bde5pd6: \"fbnuktb\",\n Bi91k9c: \"fvgxktp\",\n i089h6: \"fljg2da\",\n lj723h: \"f19wldhg\"\n }\n}, {\n f: [\".ftqa4ok:focus{outline-style:none;}\"],\n i: [\".f2hkw1w:focus-visible{outline-style:none;}\"],\n d: [\".fhgqx19[data-fui-focus-visible]{text-decoration-color:var(--colorStrokeFocus2);}\", \".f1olyrje[data-fui-focus-visible]{text-decoration-line:underline;}\", \".f1p93eir[data-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;}\"],\n 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);}\"],\n 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);}\"]\n});\nexport const useLinkStyles_unstable = state => {\n const styles = useStyles();\n const {\n appearance,\n disabled,\n inline,\n root\n } = state;\n 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);\n return state;\n};\n//# sourceMappingURL=useLinkStyles.js.map"],"names":["linkClassNames","useLinkStyles_unstable","root","useStyles","__styles","focusIndicator","Brovlpu","B486eqv","Bttzg6e","B3uz8dt","B6ihwck","De3pzq","B7ck84d","sj55zd","Bceei9c","mc9l5x","Bahqtrf","Be2twd7","Bhrd7zp","B6of3ja","t21cq0","jrapky","Frg6f3","z8tnut","z189sj","Byoj8tv","uwmqm3","B68tc82","Bmxbyg5","fsow6f","w71qe1","Bkioxbp","ygn44y","famaaq","Bde5pd6","Bi91k9c","i089h6","lj723h","button","icvyot","vrafjx","oivjwe","wvpqe5","href","subtle","inline","disabled","f","i","d","h","a","state","styles","appearance","className","mergeClasses","as"],"mappings":";;;;;;;;;;;IAGaA,cAAc,MAAdA;IA2EAC,sBAAsB,MAAtBA;;uBA9EsC;AAG5C,MAAMD,iBAAiB;IAC5BE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,gBAAgB;QACdC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;IACAR,MAAM;QACJS,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;QACTC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;IACV;IACAC,QAAQ;QACNC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;IAClC;IACAC,MAAM;QACJ1B,SAAS;IACX;IACA2B,QAAQ;QACN/B,QAAQ;QACRqB,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;IACV;IACAQ,QAAQ;QACNf,QAAQ;IACV;IACAgB,UAAU;QACRhB,QAAQ;QACRjB,QAAQ;QACRC,SAAS;QACToB,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;IACV;AACF,GAAG;IACDU,GAAG;QAAC;KAAsC;IAC1CC,GAAG;QAAC;KAA8C;IAClDC,GAAG;QAAC;QAAqF;QAAsE;QAAoE;QAA2C;QAAqC;QAAoD;QAA8B;QAA8B;QAAgD;QAA+C;QAAmD;QAA4B;QAA8B;QAA6B;QAA+B;QAA6B;QAA8B;QAA8B;QAAgC;QAAiC;QAAkC;QAA+B;QAA+B;QAAyC;QAAgE;QAAoC;QAAoG;QAAqC;QAAuC;QAAsC;QAAwC;QAAgC;QAAmD;QAA8C;QAA2D;KAAgC;IAC5gDC,GAAG;QAAC;QAAoD;QAAgE;QAA8D;QAA8C;KAA+D;IACnSC,GAAG;QAAC;QAAqD;QAAmE;QAAiE;QAA+C;KAAiE;AAC/S;AACO,MAAMlD,yBAAyBmD,CAAAA,QAAS;IAC7C,MAAMC,SAASlD;IACf,MAAM,EACJmD,WAAU,EACVR,SAAQ,EACRD,OAAM,EACN3C,KAAI,EACL,GAAGkD;IACJA,MAAMlD,IAAI,CAACqD,SAAS,GAAGC,IAAAA,mBAAY,EAACxD,eAAeE,IAAI,EAAEmD,OAAOnD,IAAI,EAAEmD,OAAOhD,cAAc,EAAEH,KAAKuD,EAAE,KAAK,OAAOvD,KAAKyC,IAAI,IAAIU,OAAOV,IAAI,EAAEzC,KAAKuD,EAAE,KAAK,YAAYJ,OAAOf,MAAM,EAAEgB,eAAe,YAAYD,OAAOT,MAAM,EAAEC,UAAUQ,OAAOR,MAAM,EAAEC,YAAYO,OAAOP,QAAQ,EAAEM,MAAMlD,IAAI,CAACqD,SAAS;IACrS,OAAOH;AACT,GACA,yCAAyC"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -1,44 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.useLink_unstable = exports.useLinkStyles_unstable = exports.useLinkState_unstable = exports.renderLink_unstable = exports.linkClassNames = exports.Link = void 0;
|
|
7
|
-
var Link_1 = /*#__PURE__*/require("./Link");
|
|
8
|
-
Object.defineProperty(exports, "Link", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () {
|
|
11
|
-
return Link_1.Link;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "linkClassNames", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return Link_1.linkClassNames;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "renderLink_unstable", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () {
|
|
23
|
-
return Link_1.renderLink_unstable;
|
|
24
|
-
}
|
|
3
|
+
value: true
|
|
25
4
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return Link_1.useLink_unstable;
|
|
42
|
-
}
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Link: ()=>_link.Link,
|
|
13
|
+
linkClassNames: ()=>_link.linkClassNames,
|
|
14
|
+
renderLink_unstable: ()=>_link.renderLink_unstable,
|
|
15
|
+
useLinkState_unstable: ()=>_link.useLinkState_unstable,
|
|
16
|
+
useLinkStyles_unstable: ()=>_link.useLinkStyles_unstable,
|
|
17
|
+
useLink_unstable: ()=>_link.useLink_unstable
|
|
43
18
|
});
|
|
19
|
+
const _link = require("./Link");
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
21
|
+
|
|
44
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Link, linkClassNames, renderLink_unstable, useLinkState_unstable, useLinkStyles_unstable, useLink_unstable } from './Link';\n//# sourceMappingURL=index.js.map"],"names":["Link","linkClassNames","renderLink_unstable","useLinkState_unstable","useLinkStyles_unstable","useLink_unstable"],"mappings":";;;;;;;;;;;IAASA,IAAI,MAAJA,UAAI;IAAEC,cAAc,MAAdA,oBAAc;IAAEC,mBAAmB,MAAnBA,yBAAmB;IAAEC,qBAAqB,MAArBA,2BAAqB;IAAEC,sBAAsB,MAAtBA,4BAAsB;IAAEC,gBAAgB,MAAhBA,sBAAgB;;sBAAQ;CAC3H,iCAAiC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-link",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.31",
|
|
4
4
|
"description": "Fluent UI React Link component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -22,23 +22,23 @@
|
|
|
22
22
|
"test": "jest --passWithNoTests",
|
|
23
23
|
"storybook": "start-storybook",
|
|
24
24
|
"type-check": "tsc -b tsconfig.json",
|
|
25
|
-
"generate-api": "
|
|
25
|
+
"generate-api": "just-scripts generate-api"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluentui/a11y-testing": "^0.1.0",
|
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
|
30
30
|
"@fluentui/react-conformance": "*",
|
|
31
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
|
31
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.20",
|
|
32
32
|
"@fluentui/scripts-api-extractor": "*",
|
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/keyboard-keys": "^9.0.
|
|
37
|
-
"@fluentui/react-tabster": "^9.6.
|
|
38
|
-
"@fluentui/react-theme": "^9.1.
|
|
39
|
-
"@fluentui/react-utilities": "^9.7.
|
|
36
|
+
"@fluentui/keyboard-keys": "^9.0.2",
|
|
37
|
+
"@fluentui/react-tabster": "^9.6.1",
|
|
38
|
+
"@fluentui/react-theme": "^9.1.7",
|
|
39
|
+
"@fluentui/react-utilities": "^9.7.2",
|
|
40
40
|
"@griffel/react": "^1.5.2",
|
|
41
|
-
"
|
|
41
|
+
"@swc/helpers": "^0.4.14"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@types/react": ">=16.8.0 <19.0.0",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"exports": {
|
|
56
56
|
".": {
|
|
57
57
|
"types": "./dist/index.d.ts",
|
|
58
|
+
"node": "./lib-commonjs/index.js",
|
|
58
59
|
"import": "./lib/index.js",
|
|
59
60
|
"require": "./lib-commonjs/index.js"
|
|
60
61
|
},
|
package/lib-amd/Link.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./components/Link/index"], function (require, exports, tslib_1, index_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(index_1, exports);
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=Link.js.map
|
package/lib-amd/Link.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-link/src/Link.ts"],"names":[],"mappings":";;;IAAA,uCAAwC","sourcesContent":["export * from './components/Link/index';\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "react", "./useLink", "./useLinkStyles", "./renderLink"], function (require, exports, React, useLink_1, useLinkStyles_1, renderLink_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Link = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* A Link is a reference to data that a user can follow by clicking or tapping it.
|
|
7
|
-
*/
|
|
8
|
-
exports.Link = React.forwardRef(function (props, ref) {
|
|
9
|
-
var state = useLink_1.useLink_unstable(props, ref);
|
|
10
|
-
useLinkStyles_1.useLinkStyles_unstable(state);
|
|
11
|
-
return renderLink_1.renderLink_unstable(state);
|
|
12
|
-
// Work around some small mismatches in inferred types which don't matter in practice
|
|
13
|
-
});
|
|
14
|
-
exports.Link.displayName = 'Link';
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=Link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-link/src/components/Link/Link.tsx"],"names":[],"mappings":";;;;IAOA;;OAEG;IACU,QAAA,IAAI,GAAmC,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC9E,IAAM,KAAK,GAAG,0BAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAE3C,sCAAsB,CAAC,KAAK,CAAC,CAAC;QAE9B,OAAO,gCAAmB,CAAC,KAAK,CAAC,CAAC;QAClC,qFAAqF;IACvF,CAAC,CAAmC,CAAC;IAErC,YAAI,CAAC,WAAW,GAAG,MAAM,CAAC","sourcesContent":["import * as React from 'react';\nimport { useLink_unstable } from './useLink';\nimport { useLinkStyles_unstable } from './useLinkStyles';\nimport { renderLink_unstable } from './renderLink';\nimport type { LinkProps } from './Link.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * A Link is a reference to data that a user can follow by clicking or tapping it.\n */\nexport const Link: ForwardRefComponent<LinkProps> = React.forwardRef((props, ref) => {\n const state = useLink_unstable(props, ref);\n\n useLinkStyles_unstable(state);\n\n return renderLink_unstable(state);\n // Work around some small mismatches in inferred types which don't matter in practice\n}) as ForwardRefComponent<LinkProps>;\n\nLink.displayName = 'Link';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Link.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-link/src/components/Link/Link.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type LinkSlots = {\n /**\n * Root of the component that renders as either an <a> or a <button> tag.\n */\n root: Slot<'a', 'button'>;\n};\n\nexport type LinkProps = ComponentProps<LinkSlots> & {\n /**\n * A link can appear either with its default style or subtle.\n * If not specified, the link appears with its default styling.\n * @default 'default'\n */\n appearance?: 'default' | 'subtle';\n\n /**\n * Whether the link is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * When set, allows the link to be focusable even when it has been disabled. This is used in scenarios where it is\n * important to keep a consistent tab order for screen reader and keyboard users.\n * @default false\n */\n disabledFocusable?: boolean;\n\n /**\n * If true, changes styling when the link is being used alongside other text content.\n * @default false\n */\n inline?: boolean;\n};\n\nexport type LinkState = ComponentState<LinkSlots> &\n Required<Pick<LinkProps, 'appearance' | 'disabled' | 'disabledFocusable' | 'inline'>>;\n"]}
|