@fluentui/react-link 9.1.28 → 9.1.30

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 CHANGED
@@ -2,7 +2,55 @@
2
2
  "name": "@fluentui/react-link",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 12 Oct 2023 14:52:34 GMT",
5
+ "date": "Mon, 23 Oct 2023 09:48:56 GMT",
6
+ "tag": "@fluentui/react-link_v9.1.30",
7
+ "version": "9.1.30",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-link",
13
+ "comment": "Bump @fluentui/react-tabster to v9.14.1",
14
+ "commit": "e4ef1febe8a185dddc10f8936944d177d50bc396"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 18 Oct 2023 17:54:04 GMT",
21
+ "tag": "@fluentui/react-link_v9.1.29",
22
+ "version": "9.1.29",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "bernardo.sunderhus@gmail.com",
27
+ "package": "@fluentui/react-link",
28
+ "commit": "967882a55a7333effea42e4c24a64e8547309116",
29
+ "comment": "chore: migrate from getNativeElementProps to getIntrinsicElementProps"
30
+ },
31
+ {
32
+ "author": "beachball",
33
+ "package": "@fluentui/react-link",
34
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.18",
35
+ "commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
36
+ },
37
+ {
38
+ "author": "beachball",
39
+ "package": "@fluentui/react-link",
40
+ "comment": "Bump @fluentui/react-tabster to v9.14.0",
41
+ "commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui/react-link",
46
+ "comment": "Bump @fluentui/react-utilities to v9.15.1",
47
+ "commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
48
+ }
49
+ ]
50
+ }
51
+ },
52
+ {
53
+ "date": "Thu, 12 Oct 2023 14:55:44 GMT",
6
54
  "tag": "@fluentui/react-link_v9.1.28",
7
55
  "version": "9.1.28",
8
56
  "comments": {
@@ -11,7 +59,7 @@
11
59
  "author": "beachball",
12
60
  "package": "@fluentui/react-link",
13
61
  "comment": "Bump @fluentui/react-jsx-runtime to v9.0.17",
14
- "commit": "1a52f5b27e2f71f7257c470bc9c7552ea5e07867"
62
+ "commit": "8178c3cae60005bc21137aa1f3e766e18cdb4a30"
15
63
  }
16
64
  ]
17
65
  }
package/CHANGELOG.md CHANGED
@@ -1,17 +1,38 @@
1
1
  # Change Log - @fluentui/react-link
2
2
 
3
- This log was last generated on Thu, 12 Oct 2023 14:52:34 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 23 Oct 2023 09:48:56 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.30](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.1.30)
8
+
9
+ Mon, 23 Oct 2023 09:48:56 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.1.29..@fluentui/react-link_v9.1.30)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-tabster to v9.14.1 ([commit](https://github.com/microsoft/fluentui/commit/e4ef1febe8a185dddc10f8936944d177d50bc396) by beachball)
15
+
16
+ ## [9.1.29](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.1.29)
17
+
18
+ Wed, 18 Oct 2023 17:54:04 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.1.28..@fluentui/react-link_v9.1.29)
20
+
21
+ ### Patches
22
+
23
+ - chore: migrate from getNativeElementProps to getIntrinsicElementProps ([PR #29499](https://github.com/microsoft/fluentui/pull/29499) by bernardo.sunderhus@gmail.com)
24
+ - Bump @fluentui/react-jsx-runtime to v9.0.18 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
25
+ - Bump @fluentui/react-tabster to v9.14.0 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
26
+ - Bump @fluentui/react-utilities to v9.15.1 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
27
+
7
28
  ## [9.1.28](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.1.28)
8
29
 
9
- Thu, 12 Oct 2023 14:52:34 GMT
30
+ Thu, 12 Oct 2023 14:55:44 GMT
10
31
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.1.27..@fluentui/react-link_v9.1.28)
11
32
 
12
33
  ### Patches
13
34
 
14
- - Bump @fluentui/react-jsx-runtime to v9.0.17 ([PR #29488](https://github.com/microsoft/fluentui/pull/29488) by beachball)
35
+ - Bump @fluentui/react-jsx-runtime to v9.0.17 ([PR #29513](https://github.com/microsoft/fluentui/pull/29513) by beachball)
15
36
 
16
37
  ## [9.1.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.1.27)
17
38
 
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, slot } from '@fluentui/react-utilities';
2
+ import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
3
3
  import { useBackgroundAppearance } from '@fluentui/react-shared-contexts';
4
4
  import { useLinkState_unstable } from './useLinkState';
5
5
  /**
@@ -9,8 +9,12 @@ import { useLinkState_unstable } from './useLinkState';
9
9
  */ export const useLink_unstable = (props, ref)=>{
10
10
  const backgroundAppearance = useBackgroundAppearance();
11
11
  const { appearance = 'default', disabled = false, disabledFocusable = false, inline = false } = props;
12
- const as = props.as || (props.href ? 'a' : 'button');
13
- const type = as === 'button' ? 'button' : undefined;
12
+ const elementType = props.as || (props.href ? 'a' : 'button');
13
+ // Casting is required here as `as` prop would break the union between `a` and `button` types
14
+ const propsWithAssignedAs = {
15
+ ...props,
16
+ as: elementType
17
+ };
14
18
  const state = {
15
19
  // Props passed at the top-level
16
20
  appearance,
@@ -19,15 +23,14 @@ import { useLinkState_unstable } from './useLinkState';
19
23
  inline,
20
24
  // Slots definition
21
25
  components: {
22
- root: 'a'
26
+ root: elementType
23
27
  },
24
- root: slot.always(getNativeElementProps(as, {
28
+ root: slot.always(getIntrinsicElementProps(elementType, {
25
29
  ref,
26
- type,
27
- ...props,
28
- as
30
+ type: elementType === 'button' ? 'button' : undefined,
31
+ ...propsWithAssignedAs
29
32
  }), {
30
- elementType: 'a'
33
+ elementType
31
34
  }),
32
35
  backgroundAppearance
33
36
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useLink.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, 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>,\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: slot.always(\n getNativeElementProps(as, {\n ref,\n type,\n ...props,\n as,\n }),\n { elementType: 'a' },\n ),\n backgroundAppearance,\n };\n\n useLinkState_unstable(state);\n\n return state;\n};\n"],"names":["React","getNativeElementProps","slot","useBackgroundAppearance","useLinkState_unstable","useLink_unstable","props","ref","backgroundAppearance","appearance","disabled","disabledFocusable","inline","as","href","type","undefined","state","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,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;IAChG,MAAMO,KAAKP,MAAMO,EAAE,IAAKP,CAAAA,MAAMQ,IAAI,GAAG,MAAM,QAAO;IAClD,MAAMC,OAAOF,OAAO,WAAW,WAAWG;IAE1C,MAAMC,QAAmB;QACvB,gCAAgC;QAChCR;QACAC;QACAC;QACAC;QAEA,mBAAmB;QACnBM,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMjB,KAAKkB,MAAM,CACfnB,sBAAsBY,IAAI;YACxBN;YACAQ;YACA,GAAGT,KAAK;YACRO;QACF,IACA;YAAEQ,aAAa;QAAI;QAErBb;IACF;IAEAJ,sBAAsBa;IAEtB,OAAOA;AACT,EAAE"}
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>,\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` and `button` types\n const propsWithAssignedAs = { ...props, as: elementType } 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 type: elementType === 'button' ? 'button' : undefined,\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","state","components","root","always","type","undefined"],"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,6FAA6F;IAC7F,MAAMC,sBAAsB;QAAE,GAAGV,KAAK;QAAEQ,IAAID;IAAY;IAExD,MAAMI,QAAmB;QACvB,gCAAgC;QAChCR;QACAC;QACAC;QACAC;QAEA,mBAAmB;QACnBM,YAAY;YACVC,MAAMN;QACR;QAEAM,MAAMjB,KAAKkB,MAAM,CACfnB,yBAAoCY,aAAa;YAC/CN;YACAc,MAAMR,gBAAgB,WAAW,WAAWS;YAC5C,GAAGN,mBAAmB;QACxB,IACA;YAAEH;QAAY;QAEhBL;IACF;IAEAJ,sBAAsBa;IAEtB,OAAOA;AACT,EAAE"}
@@ -16,8 +16,12 @@ const _useLinkState = require("./useLinkState");
16
16
  const useLink_unstable = (props, ref)=>{
17
17
  const backgroundAppearance = (0, _reactsharedcontexts.useBackgroundAppearance)();
18
18
  const { appearance = 'default', disabled = false, disabledFocusable = false, inline = false } = props;
19
- const as = props.as || (props.href ? 'a' : 'button');
20
- const type = as === 'button' ? 'button' : undefined;
19
+ const elementType = props.as || (props.href ? 'a' : 'button');
20
+ // Casting is required here as `as` prop would break the union between `a` and `button` types
21
+ const propsWithAssignedAs = {
22
+ ...props,
23
+ as: elementType
24
+ };
21
25
  const state = {
22
26
  // Props passed at the top-level
23
27
  appearance,
@@ -26,15 +30,14 @@ const useLink_unstable = (props, ref)=>{
26
30
  inline,
27
31
  // Slots definition
28
32
  components: {
29
- root: 'a'
33
+ root: elementType
30
34
  },
31
- root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)(as, {
35
+ root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(elementType, {
32
36
  ref,
33
- type,
34
- ...props,
35
- as
37
+ type: elementType === 'button' ? 'button' : undefined,
38
+ ...propsWithAssignedAs
36
39
  }), {
37
- elementType: 'a'
40
+ elementType
38
41
  }),
39
42
  backgroundAppearance
40
43
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useLink.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, 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 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: slot.always(getNativeElementProps(as, {\n ref,\n type,\n ...props,\n as\n }), {\n elementType: 'a'\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","slot","always","getNativeElementProps","elementType","useLinkState_unstable"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;gCACqB;qCACJ;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,KAAKR,MAAMQ,EAAE,IAAKR,CAAAA,MAAMS,IAAI,GAAG,MAAM,QAAO;IAClD,MAAMC,OAAOF,OAAO,WAAW,WAAWG;IAC1C,MAAMC,QAAQ;QACV,gCAAgC;QAChCR;QACAC;QACAC;QACAC;QACA,mBAAmB;QACnBM,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAACT,IAAI;YACxCP;YACAS;YACA,GAAGV,KAAK;YACRQ;QACJ,IAAI;YACAU,aAAa;QACjB;QACAhB;IACJ;IACAiB,IAAAA,mCAAqB,EAACP;IACtB,OAAOA;AACX"}
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` and `button` types\n const propsWithAssignedAs = {\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 type: elementType === 'button' ? 'button' : undefined,\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","state","components","root","slot","always","getIntrinsicElementProps","type","undefined","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,6FAA6F;IAC7F,MAAMC,sBAAsB;QACxB,GAAGX,KAAK;QACRS,IAAID;IACR;IACA,MAAMI,QAAQ;QACV,gCAAgC;QAChCR;QACAC;QACAC;QACAC;QACA,mBAAmB;QACnBM,YAAY;YACRC,MAAMN;QACV;QACAM,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAACT,aAAa;YACpDP;YACAiB,MAAMV,gBAAgB,WAAW,WAAWW;YAC5C,GAAGR,mBAAmB;QAC1B,IAAI;YACAH;QACJ;QACAN;IACJ;IACAkB,IAAAA,mCAAqB,EAACR;IACtB,OAAOA;AACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-link",
3
- "version": "9.1.28",
3
+ "version": "9.1.30",
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.6",
38
- "@fluentui/react-jsx-runtime": "^9.0.17",
38
+ "@fluentui/react-jsx-runtime": "^9.0.18",
39
39
  "@fluentui/react-shared-contexts": "^9.10.0",
40
- "@fluentui/react-tabster": "^9.13.6",
40
+ "@fluentui/react-tabster": "^9.14.1",
41
41
  "@fluentui/react-theme": "^9.1.14",
42
- "@fluentui/react-utilities": "^9.15.0",
42
+ "@fluentui/react-utilities": "^9.15.1",
43
43
  "@griffel/react": "^1.5.14",
44
44
  "@swc/helpers": "^0.5.1"
45
45
  },