@fluentui/react-link 9.2.0 → 9.2.2
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.md
CHANGED
|
@@ -1,19 +1,44 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-link
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 18 Dec 2023 14:36:12 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.2.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.2.2)
|
|
8
|
+
|
|
9
|
+
Mon, 18 Dec 2023 14:36:12 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.2.1..@fluentui/react-link_v9.2.2)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.22 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
15
|
+
- Bump @fluentui/react-shared-contexts to v9.13.2 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
16
|
+
- Bump @fluentui/react-tabster to v9.16.0 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
17
|
+
- Bump @fluentui/react-utilities to v9.15.4 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
18
|
+
|
|
19
|
+
## [9.2.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.2.1)
|
|
20
|
+
|
|
21
|
+
Thu, 14 Dec 2023 09:58:44 GMT
|
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.2.0..@fluentui/react-link_v9.2.1)
|
|
23
|
+
|
|
24
|
+
### Patches
|
|
25
|
+
|
|
26
|
+
- fix: User-provided props win over defined defaults in Link component. ([PR #30062](https://github.com/microsoft/fluentui/pull/30062) by makotom@microsoft.com)
|
|
27
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.21 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
28
|
+
- Bump @fluentui/react-shared-contexts to v9.13.1 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
29
|
+
- Bump @fluentui/react-tabster to v9.15.1 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
30
|
+
- Bump @fluentui/react-utilities to v9.15.3 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
31
|
+
|
|
7
32
|
## [9.2.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.2.0)
|
|
8
33
|
|
|
9
|
-
Thu, 30 Nov 2023 13:
|
|
34
|
+
Thu, 30 Nov 2023 13:42:06 GMT
|
|
10
35
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.1.35..@fluentui/react-link_v9.2.0)
|
|
11
36
|
|
|
12
37
|
### Minor changes
|
|
13
38
|
|
|
14
39
|
- feat: Adding span as an option for Link to render as. ([PR #29937](https://github.com/microsoft/fluentui/pull/29937) by humbertomakotomorimoto@gmail.com)
|
|
15
|
-
- Bump @fluentui/react-jsx-runtime to v9.0.20 ([PR #
|
|
16
|
-
- Bump @fluentui/react-tabster to v9.15.0 ([PR #
|
|
40
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.20 ([PR #29929](https://github.com/microsoft/fluentui/pull/29929) by beachball)
|
|
41
|
+
- Bump @fluentui/react-tabster to v9.15.0 ([PR #29929](https://github.com/microsoft/fluentui/pull/29929) by beachball)
|
|
17
42
|
|
|
18
43
|
## [9.1.35](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.1.35)
|
|
19
44
|
|
|
@@ -12,10 +12,10 @@ import { useLinkState_unstable } from './useLinkState';
|
|
|
12
12
|
const elementType = props.as || (props.href ? 'a' : 'button');
|
|
13
13
|
// Casting is required here as `as` prop would break the union between `a`, `button` and `span` types
|
|
14
14
|
const propsWithAssignedAs = {
|
|
15
|
-
...props,
|
|
16
|
-
as: elementType,
|
|
17
15
|
role: elementType === 'span' ? 'button' : undefined,
|
|
18
|
-
type: elementType === 'button' ? 'button' : undefined
|
|
16
|
+
type: elementType === 'button' ? 'button' : undefined,
|
|
17
|
+
...props,
|
|
18
|
+
as: elementType
|
|
19
19
|
};
|
|
20
20
|
const state = {
|
|
21
21
|
// Props passed at the top-level
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useLink.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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 | HTMLSpanElement>,\n): LinkState => {\n const backgroundAppearance = useBackgroundAppearance();\n const { appearance = 'default', disabled = false, disabledFocusable = false, inline = false } = props;\n\n const elementType = props.as || (props.href ? 'a' : 'button');\n\n // Casting is required here as `as` prop would break the union between `a`, `button` and `span` types\n const propsWithAssignedAs = {\n
|
|
1
|
+
{"version":3,"sources":["useLink.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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 | HTMLSpanElement>,\n): LinkState => {\n const backgroundAppearance = useBackgroundAppearance();\n const { appearance = 'default', disabled = false, disabledFocusable = false, inline = false } = props;\n\n const elementType = props.as || (props.href ? 'a' : 'button');\n\n // Casting is required here as `as` prop would break the union between `a`, `button` and `span` types\n const propsWithAssignedAs = {\n role: elementType === 'span' ? 'button' : undefined,\n type: elementType === 'button' ? 'button' : undefined,\n ...props,\n as: elementType,\n } as LinkProps;\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: elementType,\n },\n\n root: slot.always(\n getIntrinsicElementProps<LinkProps>(elementType, {\n ref,\n ...propsWithAssignedAs,\n } as const),\n { elementType },\n ),\n backgroundAppearance,\n };\n\n useLinkState_unstable(state);\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","slot","useBackgroundAppearance","useLinkState_unstable","useLink_unstable","props","ref","backgroundAppearance","appearance","disabled","disabledFocusable","inline","elementType","as","href","propsWithAssignedAs","role","undefined","type","state","components","root","always"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,SAASC,uBAAuB,QAAQ,kCAAkC;AAC1E,SAASC,qBAAqB,QAAQ,iBAAiB;AAGvD;;;;CAIC,GACD,OAAO,MAAMC,mBAAmB,CAC9BC,OACAC;IAEA,MAAMC,uBAAuBL;IAC7B,MAAM,EAAEM,aAAa,SAAS,EAAEC,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAEC,SAAS,KAAK,EAAE,GAAGN;IAEhG,MAAMO,cAAcP,MAAMQ,EAAE,IAAKR,CAAAA,MAAMS,IAAI,GAAG,MAAM,QAAO;IAE3D,qGAAqG;IACrG,MAAMC,sBAAsB;QAC1BC,MAAMJ,gBAAgB,SAAS,WAAWK;QAC1CC,MAAMN,gBAAgB,WAAW,WAAWK;QAC5C,GAAGZ,KAAK;QACRQ,IAAID;IACN;IAEA,MAAMO,QAAmB;QACvB,gCAAgC;QAChCX;QACAC;QACAC;QACAC;QAEA,mBAAmB;QACnBS,YAAY;YACVC,MAAMT;QACR;QAEAS,MAAMpB,KAAKqB,MAAM,CACftB,yBAAoCY,aAAa;YAC/CN;YACA,GAAGS,mBAAmB;QACxB,IACA;YAAEH;QAAY;QAEhBL;IACF;IAEAJ,sBAAsBgB;IAEtB,OAAOA;AACT,EAAE"}
|
|
@@ -19,10 +19,10 @@ const useLink_unstable = (props, ref)=>{
|
|
|
19
19
|
const elementType = props.as || (props.href ? 'a' : 'button');
|
|
20
20
|
// Casting is required here as `as` prop would break the union between `a`, `button` and `span` types
|
|
21
21
|
const propsWithAssignedAs = {
|
|
22
|
-
...props,
|
|
23
|
-
as: elementType,
|
|
24
22
|
role: elementType === 'span' ? 'button' : undefined,
|
|
25
|
-
type: elementType === 'button' ? 'button' : undefined
|
|
23
|
+
type: elementType === 'button' ? 'button' : undefined,
|
|
24
|
+
...props,
|
|
25
|
+
as: elementType
|
|
26
26
|
};
|
|
27
27
|
const state = {
|
|
28
28
|
// Props passed at the top-level
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useLink.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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 elementType = props.as || (props.href ? 'a' : 'button');\n // Casting is required here as `as` prop would break the union between `a`, `button` and `span` types\n const propsWithAssignedAs = {\n
|
|
1
|
+
{"version":3,"sources":["useLink.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } 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 elementType = props.as || (props.href ? 'a' : 'button');\n // Casting is required here as `as` prop would break the union between `a`, `button` and `span` types\n const propsWithAssignedAs = {\n role: elementType === 'span' ? 'button' : undefined,\n type: elementType === 'button' ? 'button' : undefined,\n ...props,\n as: elementType\n };\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: elementType\n },\n root: slot.always(getIntrinsicElementProps(elementType, {\n ref,\n ...propsWithAssignedAs\n }), {\n elementType\n }),\n backgroundAppearance\n };\n useLinkState_unstable(state);\n return state;\n};\n"],"names":["useLink_unstable","props","ref","backgroundAppearance","useBackgroundAppearance","appearance","disabled","disabledFocusable","inline","elementType","as","href","propsWithAssignedAs","role","undefined","type","state","components","root","slot","always","getIntrinsicElementProps","useLinkState_unstable"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;gCACwB;qCACP;8BACF;AAK3B,MAAMA,mBAAmB,CAACC,OAAOC;IACxC,MAAMC,uBAAuBC,IAAAA,4CAAuB;IACpD,MAAM,EAAEC,aAAa,SAAS,EAAEC,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAEC,SAAS,KAAK,EAAE,GAAGP;IAChG,MAAMQ,cAAcR,MAAMS,EAAE,IAAKT,CAAAA,MAAMU,IAAI,GAAG,MAAM,QAAO;IAC3D,qGAAqG;IACrG,MAAMC,sBAAsB;QACxBC,MAAMJ,gBAAgB,SAAS,WAAWK;QAC1CC,MAAMN,gBAAgB,WAAW,WAAWK;QAC5C,GAAGb,KAAK;QACRS,IAAID;IACR;IACA,MAAMO,QAAQ;QACV,gCAAgC;QAChCX;QACAC;QACAC;QACAC;QACA,mBAAmB;QACnBS,YAAY;YACRC,MAAMT;QACV;QACAS,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAACZ,aAAa;YACpDP;YACA,GAAGU,mBAAmB;QAC1B,IAAI;YACAH;QACJ;QACAN;IACJ;IACAmB,IAAAA,mCAAqB,EAACN;IACtB,OAAOA;AACX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-link",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.2",
|
|
4
4
|
"description": "Fluent UI React Link component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@fluentui/keyboard-keys": "^9.0.7",
|
|
38
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
39
|
-
"@fluentui/react-shared-contexts": "^9.13.
|
|
40
|
-
"@fluentui/react-tabster": "^9.
|
|
38
|
+
"@fluentui/react-jsx-runtime": "^9.0.22",
|
|
39
|
+
"@fluentui/react-shared-contexts": "^9.13.2",
|
|
40
|
+
"@fluentui/react-tabster": "^9.16.0",
|
|
41
41
|
"@fluentui/react-theme": "^9.1.16",
|
|
42
|
-
"@fluentui/react-utilities": "^9.15.
|
|
42
|
+
"@fluentui/react-utilities": "^9.15.4",
|
|
43
43
|
"@griffel/react": "^1.5.14",
|
|
44
44
|
"@swc/helpers": "^0.5.1"
|
|
45
45
|
},
|