@fluentui/react-link 9.0.45 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +75 -1
- package/CHANGELOG.md +26 -2
- package/dist/index.d.ts +4 -1
- package/lib/components/Link/Link.types.js.map +1 -1
- package/lib/components/Link/useLink.js +4 -1
- package/lib/components/Link/useLink.js.map +1 -1
- package/lib/components/Link/useLinkStyles.styles.js +11 -5
- package/lib/components/Link/useLinkStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Link/useLink.js +4 -1
- package/lib-commonjs/components/Link/useLink.js.map +1 -1
- package/lib-commonjs/components/Link/useLinkStyles.styles.js +13 -5
- package/lib-commonjs/components/Link/useLinkStyles.styles.js.map +1 -1
- package/package.json +5 -4
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,81 @@
|
|
|
2
2
|
"name": "@fluentui/react-link",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 03 Jul 2023 11:53:59 GMT",
|
|
6
|
+
"tag": "@fluentui/react-link_v9.1.0",
|
|
7
|
+
"version": "9.1.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "lingfan.gao@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-link",
|
|
13
|
+
"commit": "7ad45a9f4e696e416c4420286cbac3f57a4b3a6f",
|
|
14
|
+
"comment": "feat: Add styles for inverted background"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-link",
|
|
19
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.10",
|
|
20
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-link",
|
|
25
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.6.0",
|
|
26
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-link",
|
|
31
|
+
"comment": "Bump @fluentui/react-tabster to v9.9.2",
|
|
32
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-link",
|
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v9.10.1",
|
|
38
|
+
"commit": "e7a838bfd1ce4b077d265295fcbef8dc2177e724"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"date": "Wed, 28 Jun 2023 11:12:27 GMT",
|
|
45
|
+
"tag": "@fluentui/react-link_v9.0.46",
|
|
46
|
+
"version": "9.0.46",
|
|
47
|
+
"comments": {
|
|
48
|
+
"none": [
|
|
49
|
+
{
|
|
50
|
+
"author": "martinhochel@microsoft.com",
|
|
51
|
+
"package": "@fluentui/react-link",
|
|
52
|
+
"commit": "fbe878e9c9785588197481f172c42c2c0a230292",
|
|
53
|
+
"comment": "fix: update .npmignore to unify v8 packages and exclude project.json"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"patch": [
|
|
57
|
+
{
|
|
58
|
+
"author": "beachball",
|
|
59
|
+
"package": "@fluentui/react-link",
|
|
60
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.9",
|
|
61
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"author": "beachball",
|
|
65
|
+
"package": "@fluentui/react-link",
|
|
66
|
+
"comment": "Bump @fluentui/react-tabster to v9.9.1",
|
|
67
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"author": "beachball",
|
|
71
|
+
"package": "@fluentui/react-link",
|
|
72
|
+
"comment": "Bump @fluentui/react-utilities to v9.10.0",
|
|
73
|
+
"commit": "08de131d5f3346e001dcd8d2f0f3809c698f16d7"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"date": "Tue, 27 Jun 2023 11:21:23 GMT",
|
|
6
80
|
"tag": "@fluentui/react-link_v9.0.45",
|
|
7
81
|
"version": "9.0.45",
|
|
8
82
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-link
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 03 Jul 2023 11:53:59 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.1.0)
|
|
8
|
+
|
|
9
|
+
Mon, 03 Jul 2023 11:53:59 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.46..@fluentui/react-link_v9.1.0)
|
|
11
|
+
|
|
12
|
+
### Minor changes
|
|
13
|
+
|
|
14
|
+
- feat: Add styles for inverted background ([PR #28341](https://github.com/microsoft/fluentui/pull/28341) by lingfan.gao@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.10 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
16
|
+
- Bump @fluentui/react-shared-contexts to v9.6.0 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
17
|
+
- Bump @fluentui/react-tabster to v9.9.2 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
18
|
+
- Bump @fluentui/react-utilities to v9.10.1 ([PR #28399](https://github.com/microsoft/fluentui/pull/28399) by beachball)
|
|
19
|
+
|
|
20
|
+
## [9.0.46](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.46)
|
|
21
|
+
|
|
22
|
+
Wed, 28 Jun 2023 11:12:27 GMT
|
|
23
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.45..@fluentui/react-link_v9.0.46)
|
|
24
|
+
|
|
25
|
+
### Patches
|
|
26
|
+
|
|
27
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.9 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
28
|
+
- Bump @fluentui/react-tabster to v9.9.1 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
29
|
+
- Bump @fluentui/react-utilities to v9.10.0 ([PR #28320](https://github.com/microsoft/fluentui/pull/28320) by beachball)
|
|
30
|
+
|
|
7
31
|
## [9.0.45](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.45)
|
|
8
32
|
|
|
9
|
-
Tue, 27 Jun 2023 11:
|
|
33
|
+
Tue, 27 Jun 2023 11:21:23 GMT
|
|
10
34
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.44..@fluentui/react-link_v9.0.45)
|
|
11
35
|
|
|
12
36
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BackgroundAppearanceContextValue } from '@fluentui/react-shared-contexts';
|
|
1
2
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
2
3
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
3
4
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
@@ -44,7 +45,9 @@ export declare type LinkSlots = {
|
|
|
44
45
|
root: Slot<'a', 'button'>;
|
|
45
46
|
};
|
|
46
47
|
|
|
47
|
-
export declare type LinkState = ComponentState<LinkSlots> & Required<Pick<LinkProps, 'appearance' | 'disabled' | 'disabledFocusable' | 'inline'
|
|
48
|
+
export declare type LinkState = ComponentState<LinkSlots> & Required<Pick<LinkProps, 'appearance' | 'disabled' | 'disabledFocusable' | 'inline'>> & {
|
|
49
|
+
backgroundAppearance?: BackgroundAppearanceContextValue;
|
|
50
|
+
};
|
|
48
51
|
|
|
49
52
|
/**
|
|
50
53
|
* Renders a Link component by passing the state defined props to the appropriate slots.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Link.types.ts"],"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'
|
|
1
|
+
{"version":3,"sources":["Link.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { BackgroundAppearanceContextValue } from '@fluentui/react-shared-contexts';\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 backgroundAppearance?: BackgroundAppearanceContextValue;\n };\n"],"names":[],"mappings":"AAAA,WAyCI"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
3
|
+
import { useBackgroundAppearance } from '@fluentui/react-shared-contexts';
|
|
3
4
|
import { useLinkState_unstable } from './useLinkState';
|
|
4
5
|
/**
|
|
5
6
|
* Given user props, defines default props for the Link, calls useLinkState_unstable, and returns processed state.
|
|
6
7
|
* @param props - User provided props to the Link component.
|
|
7
8
|
* @param ref - User provided ref to be passed to the Link component.
|
|
8
9
|
*/ export const useLink_unstable = (props, ref)=>{
|
|
10
|
+
const backgroundAppearance = useBackgroundAppearance();
|
|
9
11
|
const { appearance ='default' , disabled =false , disabledFocusable =false , inline =false } = props;
|
|
10
12
|
const as = props.as || (props.href ? 'a' : 'button');
|
|
11
13
|
const type = as === 'button' ? 'button' : undefined;
|
|
@@ -24,7 +26,8 @@ import { useLinkState_unstable } from './useLinkState';
|
|
|
24
26
|
type,
|
|
25
27
|
...props,
|
|
26
28
|
as
|
|
27
|
-
})
|
|
29
|
+
}),
|
|
30
|
+
backgroundAppearance
|
|
28
31
|
};
|
|
29
32
|
useLinkState_unstable(state);
|
|
30
33
|
return state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useLink.ts"],"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"],"names":["React","getNativeElementProps","useLinkState_unstable","useLink_unstable","props","ref","appearance","disabled","disabledFocusable","inline","as","href","type","undefined","state","components","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,qBAAqB,QAAQ,iBAAiB;AAGvD;;;;CAIC,GACD,OAAO,MAAMC,mBAAmB,CAC9BC,OACAC,MACc;IACd,MAAM,
|
|
1
|
+
{"version":3,"sources":["useLink.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\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 backgroundAppearance = useBackgroundAppearance();\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 backgroundAppearance,\n };\n\n useLinkState_unstable(state);\n\n return state;\n};\n"],"names":["React","getNativeElementProps","useBackgroundAppearance","useLinkState_unstable","useLink_unstable","props","ref","backgroundAppearance","appearance","disabled","disabledFocusable","inline","as","href","type","undefined","state","components","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,uBAAuB,QAAQ,kCAAkC;AAC1E,SAASC,qBAAqB,QAAQ,iBAAiB;AAGvD;;;;CAIC,GACD,OAAO,MAAMC,mBAAmB,CAC9BC,OACAC,MACc;IACd,MAAMC,uBAAuBL;IAC7B,MAAM,EAAEM,YAAa,UAAS,EAAEC,UAAW,KAAK,CAAA,EAAEC,mBAAoB,KAAK,CAAA,EAAEC,QAAS,KAAK,CAAA,EAAE,GAAGN;IAChG,MAAMO,KAAKP,MAAMO,EAAE,IAAKP,CAAAA,MAAMQ,IAAI,GAAG,MAAM,QAAQ,AAAD;IAClD,MAAMC,OAAOF,OAAO,WAAW,WAAWG,SAAS;IAEnD,MAAMC,QAAmB;QACvB,gCAAgC;QAChCR;QACAC;QACAC;QACAC;QAEA,mBAAmB;QACnBM,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMjB,sBAAsBW,IAAI;YAC9BN;YACAQ;YACA,GAAGT,KAAK;YACRO;QACF;QACAL;IACF;IAEAJ,sBAAsBa;IAEtB,OAAOA;AACT,EAAE"}
|
|
@@ -67,11 +67,16 @@ const useStyles = /*#__PURE__*/__styles({
|
|
|
67
67
|
Bi91k9c: "fvgxktp",
|
|
68
68
|
i089h6: "fljg2da",
|
|
69
69
|
lj723h: "f19wldhg"
|
|
70
|
+
},
|
|
71
|
+
inverted: {
|
|
72
|
+
sj55zd: "f1qz2gb0",
|
|
73
|
+
Bi91k9c: "f1mlt8il",
|
|
74
|
+
lj723h: "f1hsd4st"
|
|
70
75
|
}
|
|
71
76
|
}, {
|
|
72
|
-
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;}", ".f1nev41a[data-fui-focus-visible]{outline-style:none;}", ".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;}"],
|
|
73
|
-
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);}"],
|
|
74
|
-
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);}"]
|
|
77
|
+
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;}", ".f1nev41a[data-fui-focus-visible]{outline-style:none;}", ".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;}", ".f1qz2gb0{color:var(--colorBrandForegroundInverted);}"],
|
|
78
|
+
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);}", ".f1mlt8il:hover{color:var(--colorBrandForegroundInvertedHover);}"],
|
|
79
|
+
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);}", ".f1hsd4st:active{color:var(--colorBrandForegroundInvertedPressed);}"]
|
|
75
80
|
});
|
|
76
81
|
export const useLinkStyles_unstable = state => {
|
|
77
82
|
const styles = useStyles();
|
|
@@ -79,9 +84,10 @@ export const useLinkStyles_unstable = state => {
|
|
|
79
84
|
appearance,
|
|
80
85
|
disabled,
|
|
81
86
|
inline,
|
|
82
|
-
root
|
|
87
|
+
root,
|
|
88
|
+
backgroundAppearance
|
|
83
89
|
} = state;
|
|
84
|
-
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);
|
|
90
|
+
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, backgroundAppearance === 'inverted' && styles.inverted, inline && styles.inline, disabled && styles.disabled, state.root.className);
|
|
85
91
|
return state;
|
|
86
92
|
};
|
|
87
93
|
//# sourceMappingURL=useLinkStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["shorthands","__styles","mergeClasses","createCustomFocusIndicatorStyle","tokens","linkClassNames","root","useStyles","focusIndicator","Bttzg6e","B3uz8dt","B6ihwck","g9k6zt","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","d","h","a","useLinkStyles_unstable","state","styles","appearance","className","as"],"sources":["useLinkStyles.styles.js"],"sourcesContent":["import { shorthands, makeStyles, 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 = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n outlineStyle: 'none'\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 ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover\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 ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Hover\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 ':hover': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled\n },\n ':active': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled\n }\n }\n});\nexport const useLinkStyles_unstable = (state)=>{\n const styles = useStyles();\n const { appearance , disabled , inline , root } = 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"],"mappings":"AAAA,SAASA,UAAU,EAAAC,QAAA,EAAcC,YAAY,QAAQ,gBAAgB;AACrE,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,cAAc,GAAG;EAC1BC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,gBAAGN,QAAA;EAAAO,cAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAN,IAAA;IAAAO,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,IAAA;IAAA1B,OAAA;EAAA;EAAA2B,MAAA;IAAA/B,MAAA;IAAAqB,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAQ,MAAA;IAAAf,MAAA;EAAA;EAAAgB,QAAA;IAAAhB,MAAA;IAAAjB,MAAA;IAAAC,OAAA;IAAAoB,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;AAAA;
|
|
1
|
+
{"version":3,"names":["shorthands","__styles","mergeClasses","createCustomFocusIndicatorStyle","tokens","linkClassNames","root","useStyles","focusIndicator","Bttzg6e","B3uz8dt","B6ihwck","g9k6zt","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","inverted","d","h","a","useLinkStyles_unstable","state","styles","appearance","backgroundAppearance","className","as"],"sources":["useLinkStyles.styles.js"],"sourcesContent":["import { shorthands, makeStyles, 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 = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n outlineStyle: 'none'\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 ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover\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 ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Hover\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 ':hover': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled\n },\n ':active': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled\n }\n },\n inverted: {\n color: tokens.colorBrandForegroundInverted,\n ':hover': {\n color: tokens.colorBrandForegroundInvertedHover\n },\n ':active': {\n color: tokens.colorBrandForegroundInvertedPressed\n }\n }\n});\nexport const useLinkStyles_unstable = (state)=>{\n const styles = useStyles();\n const { appearance , disabled , inline , root , backgroundAppearance } = 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, backgroundAppearance === 'inverted' && styles.inverted, inline && styles.inline, disabled && styles.disabled, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAAC,QAAA,EAAcC,YAAY,QAAQ,gBAAgB;AACrE,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,cAAc,GAAG;EAC1BC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,gBAAGN,QAAA;EAAAO,cAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAN,IAAA;IAAAO,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,IAAA;IAAA1B,OAAA;EAAA;EAAA2B,MAAA;IAAA/B,MAAA;IAAAqB,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAQ,MAAA;IAAAf,MAAA;EAAA;EAAAgB,QAAA;IAAAhB,MAAA;IAAAjB,MAAA;IAAAC,OAAA;IAAAoB,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAU,QAAA;IAAAlC,MAAA;IAAAsB,OAAA;IAAAE,MAAA;EAAA;AAAA;EAAAW,CAAA;EAAAC,CAAA;EAAAC,CAAA;AAAA,CAiFjB,CAAC;AACF,OAAO,MAAMC,sBAAsB,GAAIC,KAAK,IAAG;EAC3C,MAAMC,MAAM,GAAGhD,SAAS,CAAC,CAAC;EAC1B,MAAM;IAAEiD,UAAU;IAAGR,QAAQ;IAAGD,MAAM;IAAGzC,IAAI;IAAGmD;EAAsB,CAAC,GAAGH,KAAK;EAC/EA,KAAK,CAAChD,IAAI,CAACoD,SAAS,GAAGxD,YAAY,CAACG,cAAc,CAACC,IAAI,EAAEiD,MAAM,CAACjD,IAAI,EAAEiD,MAAM,CAAC/C,cAAc,EAAEF,IAAI,CAACqD,EAAE,KAAK,GAAG,IAAIrD,IAAI,CAACuC,IAAI,IAAIU,MAAM,CAACV,IAAI,EAAEvC,IAAI,CAACqD,EAAE,KAAK,QAAQ,IAAIJ,MAAM,CAACf,MAAM,EAAEgB,UAAU,KAAK,QAAQ,IAAID,MAAM,CAACT,MAAM,EAAEW,oBAAoB,KAAK,UAAU,IAAIF,MAAM,CAACN,QAAQ,EAAEF,MAAM,IAAIQ,MAAM,CAACR,MAAM,EAAEC,QAAQ,IAAIO,MAAM,CAACP,QAAQ,EAAEM,KAAK,CAAChD,IAAI,CAACoD,SAAS,CAAC;EAC9V,OAAOJ,KAAK;AAChB,CAAC"}
|
|
@@ -9,8 +9,10 @@ Object.defineProperty(exports, "useLink_unstable", {
|
|
|
9
9
|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
11
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
|
+
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
|
12
13
|
const _useLinkState = require("./useLinkState");
|
|
13
14
|
const useLink_unstable = (props, ref)=>{
|
|
15
|
+
const backgroundAppearance = (0, _reactSharedContexts.useBackgroundAppearance)();
|
|
14
16
|
const { appearance ='default' , disabled =false , disabledFocusable =false , inline =false } = props;
|
|
15
17
|
const as = props.as || (props.href ? 'a' : 'button');
|
|
16
18
|
const type = as === 'button' ? 'button' : undefined;
|
|
@@ -29,7 +31,8 @@ const useLink_unstable = (props, ref)=>{
|
|
|
29
31
|
type,
|
|
30
32
|
...props,
|
|
31
33
|
as
|
|
32
|
-
})
|
|
34
|
+
}),
|
|
35
|
+
backgroundAppearance
|
|
33
36
|
};
|
|
34
37
|
(0, _useLinkState.useLinkState_unstable)(state);
|
|
35
38
|
return state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useLink.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useLinkState_unstable } from './useLinkState';\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 */ export const useLink_unstable = (props, ref)=>{\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 const state = {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n inline,\n // Slots definition\n components: {\n root: 'a'\n },\n root: getNativeElementProps(as, {\n ref,\n type,\n ...props,\n as\n })\n };\n useLinkState_unstable(state);\n return state;\n};\n"],"names":["useLink_unstable","props","ref","appearance","disabled","disabledFocusable","inline","as","href","type","undefined","state","components","root","getNativeElementProps","useLinkState_unstable"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["useLink.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\nimport { useLinkState_unstable } from './useLinkState';\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 */ export const useLink_unstable = (props, ref)=>{\n const backgroundAppearance = useBackgroundAppearance();\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 const state = {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n inline,\n // Slots definition\n components: {\n root: 'a'\n },\n root: getNativeElementProps(as, {\n ref,\n type,\n ...props,\n as\n }),\n backgroundAppearance\n };\n useLinkState_unstable(state);\n return state;\n};\n"],"names":["useLink_unstable","props","ref","backgroundAppearance","useBackgroundAppearance","appearance","disabled","disabledFocusable","inline","as","href","type","undefined","state","components","root","getNativeElementProps","useLinkState_unstable"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;gCACe;qCACE;8BACF;AAK3B,MAAMA,mBAAmB,CAACC,OAAOC,MAAM;IAC9C,MAAMC,uBAAuBC,IAAAA,4CAAuB;IACpD,MAAM,EAAEC,YAAY,UAAS,EAAGC,UAAU,KAAK,CAAA,EAAGC,mBAAmB,KAAK,CAAA,EAAGC,QAAQ,KAAK,CAAA,EAAG,GAAGP;IAChG,MAAMQ,KAAKR,MAAMQ,EAAE,IAAKR,CAAAA,MAAMS,IAAI,GAAG,MAAM,QAAQ,AAAD;IAClD,MAAMC,OAAOF,OAAO,WAAW,WAAWG,SAAS;IACnD,MAAMC,QAAQ;QACV,gCAAgC;QAChCR;QACAC;QACAC;QACAC;QACA,mBAAmB;QACnBM,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,IAAAA,qCAAqB,EAACP,IAAI;YAC5BP;YACAS;YACA,GAAGV,KAAK;YACRQ;QACJ;QACAN;IACJ;IACAc,IAAAA,mCAAqB,EAACJ;IACtB,OAAOA;AACX"}
|
|
@@ -100,6 +100,11 @@ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
|
100
100
|
Bi91k9c: "fvgxktp",
|
|
101
101
|
i089h6: "fljg2da",
|
|
102
102
|
lj723h: "f19wldhg"
|
|
103
|
+
},
|
|
104
|
+
inverted: {
|
|
105
|
+
sj55zd: "f1qz2gb0",
|
|
106
|
+
Bi91k9c: "f1mlt8il",
|
|
107
|
+
lj723h: "f1hsd4st"
|
|
103
108
|
}
|
|
104
109
|
}, {
|
|
105
110
|
d: [
|
|
@@ -139,26 +144,29 @@ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
|
139
144
|
".fkfq4zb{color:var(--colorNeutralForeground2);}",
|
|
140
145
|
".f13mvf36{text-decoration-line:underline;}",
|
|
141
146
|
".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",
|
|
142
|
-
".fdrzuqr{cursor:not-allowed;}"
|
|
147
|
+
".fdrzuqr{cursor:not-allowed;}",
|
|
148
|
+
".f1qz2gb0{color:var(--colorBrandForegroundInverted);}"
|
|
143
149
|
],
|
|
144
150
|
h: [
|
|
145
151
|
".f1tx3yz7:hover{text-decoration-line:underline;}",
|
|
146
152
|
".f1deo86v:hover{color:var(--colorBrandForegroundLinkHover);}",
|
|
147
153
|
".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}",
|
|
148
154
|
".fbnuktb:hover{text-decoration-line:none;}",
|
|
149
|
-
".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}"
|
|
155
|
+
".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}",
|
|
156
|
+
".f1mlt8il:hover{color:var(--colorBrandForegroundInvertedHover);}"
|
|
150
157
|
],
|
|
151
158
|
a: [
|
|
152
159
|
".f1eh06m1:active{text-decoration-line:underline;}",
|
|
153
160
|
".f1iescvh:active{color:var(--colorBrandForegroundLinkPressed);}",
|
|
154
161
|
".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}",
|
|
155
162
|
".fljg2da:active{text-decoration-line:none;}",
|
|
156
|
-
".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}"
|
|
163
|
+
".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}",
|
|
164
|
+
".f1hsd4st:active{color:var(--colorBrandForegroundInvertedPressed);}"
|
|
157
165
|
]
|
|
158
166
|
});
|
|
159
167
|
const useLinkStyles_unstable = (state)=>{
|
|
160
168
|
const styles = useStyles();
|
|
161
|
-
const { appearance , disabled , inline , root } = state;
|
|
162
|
-
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
|
+
const { appearance , disabled , inline , root , backgroundAppearance } = state;
|
|
170
|
+
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, backgroundAppearance === 'inverted' && styles.inverted, inline && styles.inline, disabled && styles.disabled, state.root.className);
|
|
163
171
|
return state;
|
|
164
172
|
}; //# sourceMappingURL=useLinkStyles.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useLinkStyles.styles.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 Bttzg6e: \"fhgqx19\",\n B3uz8dt: \"f1olyrje\",\n B6ihwck: \"f1p93eir\",\n g9k6zt: \"f1nev41a\"\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 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;}\", \".f1nev41a[data-fui-focus-visible]{outline-style:none;}\", \".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.styles.js.map"],"names":["linkClassNames","useLinkStyles_unstable","root","useStyles","__styles","focusIndicator","Bttzg6e","B3uz8dt","B6ihwck","g9k6zt","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","d","h","a","state","styles","appearance","className","mergeClasses","as"],"mappings":";;;;;;;;;;;IAGaA,cAAc,MAAdA;
|
|
1
|
+
{"version":3,"sources":["useLinkStyles.styles.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 Bttzg6e: \"fhgqx19\",\n B3uz8dt: \"f1olyrje\",\n B6ihwck: \"f1p93eir\",\n g9k6zt: \"f1nev41a\"\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 inverted: {\n sj55zd: \"f1qz2gb0\",\n Bi91k9c: \"f1mlt8il\",\n lj723h: \"f1hsd4st\"\n }\n}, {\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;}\", \".f1nev41a[data-fui-focus-visible]{outline-style:none;}\", \".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;}\", \".f1qz2gb0{color:var(--colorBrandForegroundInverted);}\"],\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);}\", \".f1mlt8il:hover{color:var(--colorBrandForegroundInvertedHover);}\"],\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);}\", \".f1hsd4st:active{color:var(--colorBrandForegroundInvertedPressed);}\"]\n});\nexport const useLinkStyles_unstable = state => {\n const styles = useStyles();\n const {\n appearance,\n disabled,\n inline,\n root,\n backgroundAppearance\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, backgroundAppearance === 'inverted' && styles.inverted, inline && styles.inline, disabled && styles.disabled, state.root.className);\n return state;\n};\n//# sourceMappingURL=useLinkStyles.styles.js.map"],"names":["linkClassNames","useLinkStyles_unstable","root","useStyles","__styles","focusIndicator","Bttzg6e","B3uz8dt","B6ihwck","g9k6zt","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","inverted","d","h","a","state","styles","appearance","backgroundAppearance","className","mergeClasses","as"],"mappings":";;;;;;;;;;;IAGaA,cAAc,MAAdA;IA6EAC,sBAAsB,MAAtBA;;uBAhFsC;AAG5C,MAAMD,iBAAiB;IAC5BE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,gBAAgB;QACdC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;IACV;IACAP,MAAM;QACJQ,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;IACAU,UAAU;QACRlC,QAAQ;QACRsB,SAAS;QACTE,QAAQ;IACV;AACF,GAAG;IACDW,GAAG;QAAC;QAAqF;QAAsE;QAAoE;QAA0D;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;QAAiC;KAAwD;IAC/nDC,GAAG;QAAC;QAAoD;QAAgE;QAA8D;QAA8C;QAAgE;KAAmE;IACvWC,GAAG;QAAC;QAAqD;QAAmE;QAAiE;QAA+C;QAAkE;KAAsE;AACtX;AACO,MAAMhD,yBAAyBiD,CAAAA,QAAS;IAC7C,MAAMC,SAAShD;IACf,MAAM,EACJiD,WAAU,EACVP,SAAQ,EACRD,OAAM,EACN1C,KAAI,EACJmD,qBAAoB,EACrB,GAAGH;IACJA,MAAMhD,IAAI,CAACoD,SAAS,GAAGC,IAAAA,mBAAY,EAACvD,eAAeE,IAAI,EAAEiD,OAAOjD,IAAI,EAAEiD,OAAO9C,cAAc,EAAEH,KAAKsD,EAAE,KAAK,OAAOtD,KAAKwC,IAAI,IAAIS,OAAOT,IAAI,EAAExC,KAAKsD,EAAE,KAAK,YAAYL,OAAOd,MAAM,EAAEe,eAAe,YAAYD,OAAOR,MAAM,EAAEU,yBAAyB,cAAcF,OAAOL,QAAQ,EAAEF,UAAUO,OAAOP,MAAM,EAAEC,YAAYM,OAAON,QAAQ,EAAEK,MAAMhD,IAAI,CAACoD,SAAS;IAC7V,OAAOJ;AACT,GACA,gDAAgD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-link",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "Fluent UI React Link component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -35,10 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@fluentui/keyboard-keys": "^9.0.3",
|
|
38
|
-
"@fluentui/react-jsx-runtime": "9.0.0-alpha.
|
|
39
|
-
"@fluentui/react-
|
|
38
|
+
"@fluentui/react-jsx-runtime": "9.0.0-alpha.10",
|
|
39
|
+
"@fluentui/react-shared-contexts": "^9.6.0",
|
|
40
|
+
"@fluentui/react-tabster": "^9.9.2",
|
|
40
41
|
"@fluentui/react-theme": "^9.1.9",
|
|
41
|
-
"@fluentui/react-utilities": "^9.
|
|
42
|
+
"@fluentui/react-utilities": "^9.10.1",
|
|
42
43
|
"@griffel/react": "^1.5.7",
|
|
43
44
|
"@swc/helpers": "^0.4.14"
|
|
44
45
|
},
|