@fluentui/react-link 9.0.25 → 9.0.27

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,49 @@
2
2
  "name": "@fluentui/react-link",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 15 Feb 2023 11:41:24 GMT",
5
+ "date": "Fri, 10 Mar 2023 07:11:11 GMT",
6
+ "tag": "@fluentui/react-link_v9.0.27",
7
+ "version": "9.0.27",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-link",
13
+ "comment": "Bump @fluentui/react-tabster to v9.5.5",
14
+ "commit": "3cefc38eed17e3f37cd38fca9099cc9d700cd584"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-link",
19
+ "comment": "Bump @fluentui/react-utilities to v9.6.2",
20
+ "commit": "3cefc38eed17e3f37cd38fca9099cc9d700cd584"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Wed, 08 Mar 2023 17:42:51 GMT",
27
+ "tag": "@fluentui/react-link_v9.0.26",
28
+ "version": "9.0.26",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "author": "beachball",
33
+ "package": "@fluentui/react-link",
34
+ "comment": "Bump @fluentui/react-tabster to v9.5.4",
35
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
36
+ },
37
+ {
38
+ "author": "beachball",
39
+ "package": "@fluentui/react-link",
40
+ "comment": "Bump @fluentui/react-utilities to v9.6.1",
41
+ "commit": "e0d11faf97f6466f4cd23ed18266cf1e80094f56"
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ "date": "Wed, 15 Feb 2023 11:44:52 GMT",
6
48
  "tag": "@fluentui/react-link_v9.0.25",
7
49
  "version": "9.0.25",
8
50
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,32 @@
1
1
  # Change Log - @fluentui/react-link
2
2
 
3
- This log was last generated on Wed, 15 Feb 2023 11:41:24 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 10 Mar 2023 07:11:11 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.27)
8
+
9
+ Fri, 10 Mar 2023 07:11:11 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.26..@fluentui/react-link_v9.0.27)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-tabster to v9.5.5 ([PR #27157](https://github.com/microsoft/fluentui/pull/27157) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.6.2 ([PR #27157](https://github.com/microsoft/fluentui/pull/27157) by beachball)
16
+
17
+ ## [9.0.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.26)
18
+
19
+ Wed, 08 Mar 2023 17:42:51 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.25..@fluentui/react-link_v9.0.26)
21
+
22
+ ### Patches
23
+
24
+ - Bump @fluentui/react-tabster to v9.5.4 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
25
+ - Bump @fluentui/react-utilities to v9.6.1 ([PR #27127](https://github.com/microsoft/fluentui/pull/27127) by beachball)
26
+
7
27
  ## [9.0.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.0.25)
8
28
 
9
- Wed, 15 Feb 2023 11:41:24 GMT
29
+ Wed, 15 Feb 2023 11:44:52 GMT
10
30
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.0.24..@fluentui/react-link_v9.0.25)
11
31
 
12
32
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,mBAAmB,QAAQ,cAAc;AAIlD;;;AAGA,OAAO,MAAMC,IAAI,gBAAmCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAClF,MAAMC,KAAK,GAAGP,gBAAgB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE1CL,sBAAsB,CAACM,KAAK,CAAC;EAE7B,OAAOL,mBAAmB,CAACK,KAAK,CAAC;EACjC;AACF,CAAC,CAAmC;;AAEpCJ,IAAI,CAACK,WAAW,GAAG,MAAM","names":["React","useLink_unstable","useLinkStyles_unstable","renderLink_unstable","Link","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/Link.tsx"],"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
+ {"version":3,"names":["React","useLink_unstable","useLinkStyles_unstable","renderLink_unstable","Link","forwardRef","props","ref","state","displayName"],"sources":["../src/packages/react-components/react-link/src/components/Link/Link.tsx"],"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"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,mBAAmB,QAAQ,cAAc;AAIlD;;;AAGA,OAAO,MAAMC,IAAI,gBAAmCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAClF,MAAMC,KAAK,GAAGP,gBAAgB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE1CL,sBAAsB,CAACM,KAAK,CAAC;EAE7B,OAAOL,mBAAmB,CAACK,KAAK,CAAC;EACjC;AACF,CAAC,CAAmC;;AAEpCJ,IAAI,CAACK,WAAW,GAAG,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,mBAAmB,GAAIC,KAAgB,IAAI;EACtD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAYE,KAAK,CAAC;EAEvD,oBAAOH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,EAAI;AAC3C,CAAC","names":["React","getSlots","renderLink_unstable","state","slots","slotProps","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/renderLink.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { LinkSlots, LinkState } from './Link.types';\n\n/**\n * Renders a Link component by passing the state defined props to the appropriate slots.\n */\nexport const renderLink_unstable = (state: LinkState) => {\n const { slots, slotProps } = getSlots<LinkSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
1
+ {"version":3,"names":["React","getSlots","renderLink_unstable","state","slots","slotProps","createElement","root"],"sources":["../src/packages/react-components/react-link/src/components/Link/renderLink.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { LinkSlots, LinkState } from './Link.types';\n\n/**\n * Renders a Link component by passing the state defined props to the appropriate slots.\n */\nexport const renderLink_unstable = (state: LinkState) => {\n const { slots, slotProps } = getSlots<LinkSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,mBAAmB,GAAIC,KAAgB,IAAI;EACtD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAYE,KAAK,CAAC;EAEvD,oBAAOH,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,EAAI;AAC3C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AACjE,SAASC,qBAAqB,QAAQ,gBAAgB;AAGtD;;;;;AAKA,OAAO,MAAMC,gBAAgB,GAAG,CAC9BC,KAAgB,EAChBC,GAAqD,KACxC;EACb,MAAM;IAAEC,UAAU,GAAG,SAAS;IAAEC,QAAQ,GAAG,KAAK;IAAEC,iBAAiB,GAAG,KAAK;IAAEC,MAAM,GAAG;EAAK,CAAE,GAAGL,KAAK;EACrG,MAAMM,EAAE,GAAGN,KAAK,CAACM,EAAE,KAAKN,KAAK,CAACO,IAAI,GAAG,GAAG,GAAG,QAAQ,CAAC;EACpD,MAAMC,IAAI,GAAGF,EAAE,KAAK,QAAQ,GAAG,QAAQ,GAAGG,SAAS;EAEnD,MAAMC,KAAK,GAAc;IACvB;IACAR,UAAU;IACVC,QAAQ;IACRC,iBAAiB;IACjBC,MAAM;IAEN;IACAM,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IAEDA,IAAI,EAAEf,qBAAqB,CAACS,EAAE,EAAE;MAC9BL,GAAG;MACHO,IAAI;MACJ,GAAGR,KAAK;MACRM;KACD;GACF;EAEDR,qBAAqB,CAACY,KAAK,CAAC;EAE5B,OAAOA,KAAK;AACd,CAAC","names":["getNativeElementProps","useLinkState_unstable","useLink_unstable","props","ref","appearance","disabled","disabledFocusable","inline","as","href","type","undefined","state","components","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/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"]}
1
+ {"version":3,"names":["getNativeElementProps","useLinkState_unstable","useLink_unstable","props","ref","appearance","disabled","disabledFocusable","inline","as","href","type","undefined","state","components","root"],"sources":["../src/packages/react-components/react-link/src/components/Link/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"],"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AACjE,SAASC,qBAAqB,QAAQ,gBAAgB;AAGtD;;;;;AAKA,OAAO,MAAMC,gBAAgB,GAAGA,CAC9BC,KAAgB,EAChBC,GAAqD,KACxC;EACb,MAAM;IAAEC,UAAU,GAAG,SAAS;IAAEC,QAAQ,GAAG,KAAK;IAAEC,iBAAiB,GAAG,KAAK;IAAEC,MAAM,GAAG;EAAK,CAAE,GAAGL,KAAK;EACrG,MAAMM,EAAE,GAAGN,KAAK,CAACM,EAAE,KAAKN,KAAK,CAACO,IAAI,GAAG,GAAG,GAAG,QAAQ,CAAC;EACpD,MAAMC,IAAI,GAAGF,EAAE,KAAK,QAAQ,GAAG,QAAQ,GAAGG,SAAS;EAEnD,MAAMC,KAAK,GAAc;IACvB;IACAR,UAAU;IACVC,QAAQ;IACRC,iBAAiB;IACjBC,MAAM;IAEN;IACAM,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IAEDA,IAAI,EAAEf,qBAAqB,CAACS,EAAE,EAAE;MAC9BL,GAAG;MACHO,IAAI;MACJ,GAAGR,KAAK;MACRM;KACD;GACF;EAEDR,qBAAqB,CAACY,KAAK,CAAC;EAE5B,OAAOA,KAAK;AACd,CAAC"}
@@ -1 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AE;MAC7Ec,EAAE,CAACC,cAAc,EAAE;MACnBD,EAAE,CAACG,eAAe,EAAE;KACrB,MAAM;MACLX,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAGQ,EAAE,CAAC;;EAEnB,CAAC;EAED;EACAZ,KAAK,CAACC,QAAQ,GAAGA,QAAQ,IAAIC,iBAAiB;EAC9CF,KAAK,CAACQ,IAAI,CAAC,eAAe,CAAC,GAAGP,QAAQ,IAAIC,iBAAiB,IAAIS,SAAS;EACxE,IAAIX,KAAK,CAACQ,IAAI,CAACC,EAAE,KAAK,QAAQ,EAAE;IAC9BT,KAAK,CAACQ,IAAI,CAACP,QAAQ,GAAGA,QAAQ,IAAI,CAACC,iBAAiB;;EAGtD,OAAOF,KAAK;AACd,CAAC","names":["Enter","Space","useLinkState_unstable","state","disabled","disabledFocusable","onClick","onKeyDown","role","tabIndex","type","root","as","href","undefined","ev","preventDefault","key","stopPropagation"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/useLinkState.ts"],"sourcesContent":["import * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport type { LinkState } from './Link.types';\n\n/**\n * The useLinkState_unstable hook processes the Link state.\n * @param state - Link state to mutate.\n */\nexport const useLinkState_unstable = (state: LinkState): LinkState => {\n const { disabled, disabledFocusable } = state;\n const { onClick, onKeyDown, role, tabIndex, type } = state.root;\n\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 ?? (disabled && !disabledFocusable ? undefined : 0);\n\n // Add role=\"link\" for disabled and disabledFocusable links.\n if (disabled || disabledFocusable) {\n state.root.role = role || 'link';\n }\n }\n // Add type=\"button\" for button elements.\n else {\n state.root.type = type || 'button';\n }\n\n // Disallow click event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onClick = (ev: React.MouseEvent<HTMLAnchorElement & HTMLButtonElement>) => {\n if (disabled || disabledFocusable) {\n ev.preventDefault();\n } else {\n onClick?.(ev);\n }\n };\n\n // Disallow keydown event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onKeyDown = (ev: React.KeyboardEvent<HTMLAnchorElement & HTMLButtonElement>) => {\n if ((disabled || disabledFocusable) && (ev.key === Enter || ev.key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onKeyDown?.(ev);\n }\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\n return state;\n};\n"]}
1
+ {"version":3,"names":["Enter","Space","useLinkState_unstable","state","disabled","disabledFocusable","onClick","onKeyDown","role","tabIndex","type","root","as","href","undefined","ev","preventDefault","key","stopPropagation"],"sources":["../src/packages/react-components/react-link/src/components/Link/useLinkState.ts"],"sourcesContent":["import * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport type { LinkState } from './Link.types';\n\n/**\n * The useLinkState_unstable hook processes the Link state.\n * @param state - Link state to mutate.\n */\nexport const useLinkState_unstable = (state: LinkState): LinkState => {\n const { disabled, disabledFocusable } = state;\n const { onClick, onKeyDown, role, tabIndex, type } = state.root;\n\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 ?? (disabled && !disabledFocusable ? undefined : 0);\n\n // Add role=\"link\" for disabled and disabledFocusable links.\n if (disabled || disabledFocusable) {\n state.root.role = role || 'link';\n }\n }\n // Add type=\"button\" for button elements.\n else {\n state.root.type = type || 'button';\n }\n\n // Disallow click event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onClick = (ev: React.MouseEvent<HTMLAnchorElement & HTMLButtonElement>) => {\n if (disabled || disabledFocusable) {\n ev.preventDefault();\n } else {\n onClick?.(ev);\n }\n };\n\n // Disallow keydown event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onKeyDown = (ev: React.KeyboardEvent<HTMLAnchorElement & HTMLButtonElement>) => {\n if ((disabled || disabledFocusable) && (ev.key === Enter || ev.key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onKeyDown?.(ev);\n }\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\n return state;\n};\n"],"mappings":"AACA,SAASA,KAAK,EAAEC,KAAK,QAAQ,yBAAyB;AAGtD;;;;AAIA,OAAO,MAAMC,qBAAqB,GAAIC,KAAgB,IAAe;EACnE,MAAM;IAAEC,QAAQ;IAAEC;EAAiB,CAAE,GAAGF,KAAK;EAC7C,MAAM;IAAEG,OAAO;IAAEC,SAAS;IAAEC,IAAI;IAAEC,QAAQ;IAAEC;EAAI,CAAE,GAAGP,KAAK,CAACQ,IAAI;EAE/D;EACA,IAAIR,KAAK,CAACQ,IAAI,CAACC,EAAE,KAAK,GAAG,EAAE;IACzBT,KAAK,CAACQ,IAAI,CAACE,IAAI,GAAGT,QAAQ,GAAGU,SAAS,GAAGX,KAAK,CAACQ,IAAI,CAACE,IAAI;IACxDV,KAAK,CAACQ,IAAI,CAACF,QAAQ,GAAGA,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAKL,QAAQ,IAAI,CAACC,iBAAiB,GAAGS,SAAS,GAAG,CAAE;IAElF;IACA,IAAIV,QAAQ,IAAIC,iBAAiB,EAAE;MACjCF,KAAK,CAACQ,IAAI,CAACH,IAAI,GAAGA,IAAI,IAAI,MAAM;;;EAGpC;EAAA,KACK;IACHL,KAAK,CAACQ,IAAI,CAACD,IAAI,GAAGA,IAAI,IAAI,QAAQ;;EAGpC;EACAP,KAAK,CAACQ,IAAI,CAACL,OAAO,GAAIS,EAA2D,IAAI;IACnF,IAAIX,QAAQ,IAAIC,iBAAiB,EAAE;MACjCU,E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AA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA,EA6EhB;AAEF,OAAO,MAAMC,sBAAsB,GAAIC,KAAgB,IAAe;EACpE,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1B,MAAM;IAAEI,UAAU;IAAEC,QAAQ;IAAEC,MAAM;IAAEP;EAAI,CAAE,GAAGG,KAAK;EAEpDA,KAAK,CAACH,IAAI,CAACQ,SAAS,GAAGZ,YAAY,CACjCG,cAAc,CAACC,IAAI,EACnBI,MAAM,CAACJ,IAAI,EACXI,MAAM,CAACK,cAAc,EACrBT,IAAI,CAACU,EAAE,KAAK,GAAG,IAAIV,IAAI,CAACW,IAAI,IAAIP,MAAM,CAACO,IAAI,EAC3CX,IAAI,CAACU,EAAE,KAAK,QAAQ,IAAIN,MAAM,CAACQ,MAAM,EACrCP,UAAU,KAAK,QAAQ,IAAID,MAAM,CAACS,MAAM,EACxCN,MAAM,IAAIH,MAAM,CAACG,MAAM,EACvBD,QAAQ,IAAIF,MAAM,CAACE,QAAQ,EAC3BH,KAAK,CAACH,IAAI,CAACQ,SAAS,CACrB;EAED,OAAOL,KAAK;AACd,CAAC","names":["shorthands","mergeClasses","createCustomFocusIndicatorStyle","tokens","linkClassNames","root","useStyles","useLinkStyles_unstable","state","styles","appearance","disabled","inline","className","focusIndicator","as","href","button","subtle"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/useLinkStyles.ts"],"sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LinkSlots, LinkState } from './Link.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nconst useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n }),\n // Common styles.\n root: {\n backgroundColor: 'transparent',\n boxSizing: 'border-box',\n color: tokens.colorBrandForegroundLink,\n cursor: 'pointer',\n display: 'inline',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n ...shorthands.overflow('inherit'),\n textAlign: 'left',\n textDecorationLine: 'none',\n textDecorationThickness: tokens.strokeWidthThin,\n textOverflow: 'inherit',\n userSelect: 'text',\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n // Overrides when the Link renders as a button.\n button: {\n ...shorthands.borderStyle('none'),\n },\n // Overrides when an href is present so the Link renders as an anchor.\n href: {\n fontSize: 'inherit',\n },\n // Overrides when the Link appears subtle.\n subtle: {\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Hover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n // Overrides when the Link is rendered inline within text.\n inline: {\n textDecorationLine: 'underline',\n },\n // Overrides when the Link is disabled.\n disabled: {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n\n ':hover': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n const { appearance, disabled, inline, root } = state;\n\n state.root.className = mergeClasses(\n linkClassNames.root,\n styles.root,\n styles.focusIndicator,\n root.as === 'a' && root.href && styles.href,\n root.as === 'button' && styles.button,\n appearance === 'subtle' && styles.subtle,\n inline && styles.inline,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"]}
1
+ {"version":3,"names":["shorthands","__styles","mergeClasses","createCustomFocusIndicatorStyle","tokens","linkClassNames","root","useStyles","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","useLinkStyles_unstable","state","styles","appearance","className","as"],"sources":["../src/packages/react-components/react-link/src/components/Link/useLinkStyles.ts"],"sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LinkSlots, LinkState } from './Link.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nconst useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n }),\n // Common styles.\n root: {\n backgroundColor: 'transparent',\n boxSizing: 'border-box',\n color: tokens.colorBrandForegroundLink,\n cursor: 'pointer',\n display: 'inline',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n ...shorthands.overflow('inherit'),\n textAlign: 'left',\n textDecorationLine: 'none',\n textDecorationThickness: tokens.strokeWidthThin,\n textOverflow: 'inherit',\n userSelect: 'text',\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n // Overrides when the Link renders as a button.\n button: {\n ...shorthands.borderStyle('none'),\n },\n // Overrides when an href is present so the Link renders as an anchor.\n href: {\n fontSize: 'inherit',\n },\n // Overrides when the Link appears subtle.\n subtle: {\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Hover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n // Overrides when the Link is rendered inline within text.\n inline: {\n textDecorationLine: 'underline',\n },\n // Overrides when the Link is disabled.\n disabled: {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n\n ':hover': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n const { appearance, disabled, inline, root } = state;\n\n state.root.className = mergeClasses(\n linkClassNames.root,\n styles.root,\n styles.focusIndicator,\n root.as === 'a' && root.href && styles.href,\n root.as === 'button' && styles.button,\n appearance === 'subtle' && styles.subtle,\n inline && styles.inline,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAAC,QAAA,EAAcC,YAAY,QAAQ,gBAAgB;AACrE,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE,SAASC,MAAM,QAAQ,uBAAuB;AAI9C,OAAO,MAAMC,cAAc,GAA8B;EAC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,EACXmD,MAAM,CAACjD,cAAc,EACrBF,IAAI,CAACsD,EAAE,KAAK,GAAG,IAAItD,IAAI,CAACwC,IAAI,IAAIW,MAAM,CAACX,IAAI,EAC3CxC,IAAI,CAACsD,EAAE,KAAK,QAAQ,IAAIH,MAAM,CAAChB,MAAM,EACrCiB,UAAU,KAAK,QAAQ,IAAID,MAAM,CAACV,MAAM,EACxCC,MAAM,IAAIS,MAAM,CAACT,MAAM,EACvBC,QAAQ,IAAIQ,MAAM,CAACR,QAAQ,EAC3BO,KAAK,CAAClD,IAAI,CAACqD,SAAS,CACrB;EAED,OAAOH,KAAK;AACd,CAAC"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,SACEA,IAAI,EACJC,cAAc,EACdC,mBAAmB,EACnBC,qBAAqB,EACrBC,sBAAsB,EACtBC,gBAAgB,QACX,QAAQ","names":["Link","linkClassNames","renderLink_unstable","useLinkState_unstable","useLinkStyles_unstable","useLink_unstable"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/index.ts"],"sourcesContent":["export {\n Link,\n linkClassNames,\n renderLink_unstable,\n useLinkState_unstable,\n useLinkStyles_unstable,\n useLink_unstable,\n} from './Link';\nexport type { LinkProps, LinkSlots, LinkState } from './Link';\n"]}
1
+ {"version":3,"names":["Link","linkClassNames","renderLink_unstable","useLinkState_unstable","useLinkStyles_unstable","useLink_unstable"],"sources":["../src/packages/react-components/react-link/src/index.ts"],"sourcesContent":["export {\n Link,\n linkClassNames,\n renderLink_unstable,\n useLinkState_unstable,\n useLinkStyles_unstable,\n useLink_unstable,\n} from './Link';\nexport type { LinkProps, LinkSlots, LinkState } from './Link';\n"],"mappings":"AAAA,SACEA,IAAI,EACJC,cAAc,EACdC,mBAAmB,EACnBC,qBAAqB,EACrBC,sBAAsB,EACtBC,gBAAgB,QACX,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/Link.ts"],"sourcesContent":["export * from './components/Link/index';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-link/src/Link.ts"],"sourcesContent":["export * from './components/Link/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,6BAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,YAAI,gBAAmCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAClF,MAAMC,KAAK,GAAGC,0BAAgB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE1CG,sCAAsB,CAACF,KAAK,CAAC;EAE7B,OAAOG,gCAAmB,CAACH,KAAK,CAAC;EACjC;AACF,CAAC,CAAmC;;AAEpCL,YAAI,CAACS,WAAW,GAAG,MAAM","names":["exports","React","forwardRef","props","ref","state","useLink_1","useLinkStyles_1","renderLink_1","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/Link.tsx"],"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
+ {"version":3,"names":["React","require","useLink_1","useLinkStyles_1","renderLink_1","exports","Link","forwardRef","props","ref","state","useLink_unstable","useLinkStyles_unstable","renderLink_unstable","displayName"],"sources":["../src/packages/react-components/react-link/src/components/Link/Link.tsx"],"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"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,SAAA,gBAAAD,OAAA;AACA,MAAAE,eAAA,gBAAAF,OAAA;AACA,MAAAG,YAAA,gBAAAH,OAAA;AAIA;;;AAGaI,OAAA,CAAAC,IAAI,gBAAmCN,KAAK,CAACO,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAClF,MAAMC,KAAK,GAAGR,SAAA,CAAAS,gBAAgB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE1CN,eAAA,CAAAS,sBAAsB,CAACF,KAAK,CAAC;EAE7B,OAAON,YAAA,CAAAS,mBAAmB,CAACH,KAAK,CAAC;EACjC;AACF,CAAC,CAAmC;;AAEpCL,OAAA,CAAAC,IAAI,CAACQ,WAAW,GAAG,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["../src/packages/react-components/react-link/src/components/Link/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'>>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/index.ts"],"sourcesContent":["export * from './Link';\nexport * from './Link.types';\nexport * from './renderLink';\nexport * from './useLink';\nexport * from './useLinkState';\nexport * from './useLinkStyles';\n"]}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-link/src/components/Link/index.ts"],"sourcesContent":["export * from './Link';\nexport * from './Link.types';\nexport * from './renderLink';\nexport * from './useLink';\nexport * from './useLinkState';\nexport * from './useLinkStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,YAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,eAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,oBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,mBAAmB,GAAIC,KAAgB,IAAI;EACtD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAYH,KAAK,CAAC;EAEvD,OAAOI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AAJYC,2BAAmB","names":["renderLink_unstable","state","slots","slotProps","react_utilities_1","React","root","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/renderLink.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { LinkSlots, LinkState } from './Link.types';\n\n/**\n * Renders a Link component by passing the state defined props to the appropriate slots.\n */\nexport const renderLink_unstable = (state: LinkState) => {\n const { slots, slotProps } = getSlots<LinkSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
1
+ {"version":3,"names":["React","require","react_utilities_1","renderLink_unstable","state","slots","slotProps","getSlots","createElement","root","exports"],"sources":["../src/packages/react-components/react-link/src/components/Link/renderLink.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { LinkSlots, LinkState } from './Link.types';\n\n/**\n * Renders a Link component by passing the state defined props to the appropriate slots.\n */\nexport const renderLink_unstable = (state: LinkState) => {\n const { slots, slotProps } = getSlots<LinkSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,mBAAmB,GAAIC,KAAgB,IAAI;EACtD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAYH,KAAK,CAAC;EAEvD,OAAOJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AAJYC,OAAA,CAAAP,mBAAmB,GAAAA,mBAAA"}
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AACA;AACA;AAGA;;;;;AAKO,MAAMA,gBAAgB,GAAG,CAC9BC,KAAgB,EAChBC,GAAqD,KACxC;EACb,MAAM;IAAEC,UAAU,GAAG,SAAS;IAAEC,QAAQ,GAAG,KAAK;IAAEC,iBAAiB,GAAG,KAAK;IAAEC,MAAM,GAAG;EAAK,CAAE,GAAGL,KAAK;EACrG,MAAMM,EAAE,GAAGN,KAAK,CAACM,EAAE,KAAKN,KAAK,CAACO,IAAI,GAAG,GAAG,GAAG,QAAQ,CAAC;EACpD,MAAMC,IAAI,GAAGF,EAAE,KAAK,QAAQ,GAAG,QAAQ,GAAGG,SAAS;EAEnD,MAAMC,KAAK,GAAc;IACvB;IACAR,UAAU;IACVC,QAAQ;IACRC,iBAAiB;IACjBC,MAAM;IAEN;IACAM,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IAEDA,IAAI,EAAEC,uCAAqB,CAACP,EAAE,EAAE;MAC9BL,GAAG;MACHO,IAAI;MACJ,GAAGR,KAAK;MACRM;KACD;GACF;EAEDQ,oCAAqB,CAACJ,KAAK,CAAC;EAE5B,OAAOA,KAAK;AACd,CAAC;AA/BYK,wBAAgB","names":["useLink_unstable","props","ref","appearance","disabled","disabledFocusable","inline","as","href","type","undefined","state","components","root","react_utilities_1","useLinkState_1","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/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"]}
1
+ {"version":3,"names":["react_utilities_1","require","useLinkState_1","useLink_unstable","props","ref","appearance","disabled","disabledFocusable","inline","as","href","type","undefined","state","components","root","getNativeElementProps","useLinkState_unstable","exports"],"sources":["../src/packages/react-components/react-link/src/components/Link/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"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AACA,MAAAC,cAAA,gBAAAD,OAAA;AAGA;;;;;AAKO,MAAME,gBAAgB,GAAGA,CAC9BC,KAAgB,EAChBC,GAAqD,KACxC;EACb,MAAM;IAAEC,UAAU,GAAG,SAAS;IAAEC,QAAQ,GAAG,KAAK;IAAEC,iBAAiB,GAAG,KAAK;IAAEC,MAAM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K,CAACQ,IAAI,CAACH,IAAI,GAAGA,IAAI,IAAI,MAAM;;;EAGpC;EAAA,KACK;IACHL,KAAK,CAACQ,IAAI,CAACD,IAAI,GAAGA,IAAI,IAAI,QAAQ;;EAGpC;EACAP,KAAK,CAACQ,IAAI,CAACL,OAAO,GAAIS,EAA2D,IAAI;IACnF,IAAIX,QAAQ,IAAIC,iBAAiB,EAAE;MACjCU,EAAE,CAACC,cAAc,EAAE;KACpB,MAAM;MACLV,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGS,EAAE,CAAC;;EAEjB,CAAC;EAED;EACAZ,KAAK,CAACQ,IAAI,CAACJ,SAAS,GAAIQ,EAA8D,IAAI;IACxF,IAAI,CAACX,QAAQ,IAAIC,iBAAiB,MAAMU,EAAE,CAACE,GAAG,KAAKC,qBAAK,IAAIH,EAAE,CAACE,GAAG,KAAKC,qBAAK,CAAC,EAAE;MAC7EH,EAAE,CAACC,cAAc,EAAE;MACnBD,EAAE,CAACI,eAAe,EAAE;KACrB,MAAM;MACLZ,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAGQ,EAAE,CAAC;;EAEnB,CAAC;EAED;EACAZ,KAAK,CAACC,QAAQ,GAAGA,QAAQ,IAAIC,iBAAiB;EAC9CF,KAAK,CAACQ,IAAI,CAAC,eAAe,CAAC,GAAGP,QAAQ,IAAIC,iBAAiB,IAAIS,SAAS;EACxE,IAAIX,KAAK,CAACQ,IAAI,CAACC,EAAE,KAAK,QAAQ,EAAE;IAC9BT,KAAK,CAACQ,IAAI,CAACP,QAAQ,GAAGA,QAAQ,IAAI,CAACC,iBAAiB;;EAGtD,OAAOF,KAAK;AACd,CAAC;AA9CYiB,6BAAqB","names":["useLinkState_unstable","state","disabled","disabledFocusable","onClick","onKeyDown","role","tabIndex","type","root","as","href","undefined","ev","preventDefault","key","keyboard_keys_1","stopPropagation","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/useLinkState.ts"],"sourcesContent":["import * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport type { LinkState } from './Link.types';\n\n/**\n * The useLinkState_unstable hook processes the Link state.\n * @param state - Link state to mutate.\n */\nexport const useLinkState_unstable = (state: LinkState): LinkState => {\n const { disabled, disabledFocusable } = state;\n const { onClick, onKeyDown, role, tabIndex, type } = state.root;\n\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 ?? (disabled && !disabledFocusable ? undefined : 0);\n\n // Add role=\"link\" for disabled and disabledFocusable links.\n if (disabled || disabledFocusable) {\n state.root.role = role || 'link';\n }\n }\n // Add type=\"button\" for button elements.\n else {\n state.root.type = type || 'button';\n }\n\n // Disallow click event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onClick = (ev: React.MouseEvent<HTMLAnchorElement & HTMLButtonElement>) => {\n if (disabled || disabledFocusable) {\n ev.preventDefault();\n } else {\n onClick?.(ev);\n }\n };\n\n // Disallow keydown event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onKeyDown = (ev: React.KeyboardEvent<HTMLAnchorElement & HTMLButtonElement>) => {\n if ((disabled || disabledFocusable) && (ev.key === Enter || ev.key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onKeyDown?.(ev);\n }\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\n return state;\n};\n"]}
1
+ {"version":3,"names":["keyboard_keys_1","require","useLinkState_unstable","state","disabled","disabledFocusable","onClick","onKeyDown","role","tabIndex","type","root","as","href","undefined","ev","preventDefault","key","Enter","Space","stopPropagation","exports"],"sources":["../src/packages/react-components/react-link/src/components/Link/useLinkState.ts"],"sourcesContent":["import * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport type { LinkState } from './Link.types';\n\n/**\n * The useLinkState_unstable hook processes the Link state.\n * @param state - Link state to mutate.\n */\nexport const useLinkState_unstable = (state: LinkState): LinkState => {\n const { disabled, disabledFocusable } = state;\n const { onClick, onKeyDown, role, tabIndex, type } = state.root;\n\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 ?? (disabled && !disabledFocusable ? undefined : 0);\n\n // Add role=\"link\" for disabled and disabledFocusable links.\n if (disabled || disabledFocusable) {\n state.root.role = role || 'link';\n }\n }\n // Add type=\"button\" for button elements.\n else {\n state.root.type = type || 'button';\n }\n\n // Disallow click event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onClick = (ev: React.MouseEvent<HTMLAnchorElement & HTMLButtonElement>) => {\n if (disabled || disabledFocusable) {\n ev.preventDefault();\n } else {\n onClick?.(ev);\n }\n };\n\n // Disallow keydown event when component is disabled and eat events when disabledFocusable is set to true.\n state.root.onKeyDown = (ev: React.KeyboardEvent<HTMLAnchorElement & HTMLButtonElement>) => {\n if ((disabled || disabledFocusable) && (ev.key === Enter || ev.key === Space)) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onKeyDown?.(ev);\n }\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\n return state;\n};\n"],"mappings":";;;;;;AACA,MAAAA,eAAA,gBAAAC,OAAA;AAGA;;;;AAIO,MAAMC,qBAAqB,GAAIC,KAAgB,IAAe;EACnE,MAAM;IAAEC,QAAQ;IAAEC;EAAiB,CAAE,GAAGF,KAAK;EAC7C,MAAM;IAAEG,OAAO;IAAEC,SAAS;IAAEC,IAAI;IAAEC,QAAQ;IAAEC;EAAI,CAAE,GAAGP,KAAK,CAACQ,IAAI;EAE/D;EACA,IAAIR,KAAK,CAACQ,IAAI,C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EACrCP,UAAU,KAAK,QAAQ,IAAID,MAAM,CAACS,MAAM,EACxCN,MAAM,IAAIH,MAAM,CAACG,MAAM,EACvBD,QAAQ,IAAIF,MAAM,CAACE,QAAQ,EAC3BH,KAAK,CAACJ,IAAI,CAACS,SAAS,CACrB;EAED,OAAOL,KAAK;AACd,CAAC;AAjBYL,8BAAsB","names":["exports","root","useStyles","react_1","useLinkStyles_unstable","state","styles","appearance","disabled","inline","className","focusIndicator","as","href","button","subtle"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/components/Link/useLinkStyles.ts"],"sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LinkSlots, LinkState } from './Link.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nconst useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n }),\n // Common styles.\n root: {\n backgroundColor: 'transparent',\n boxSizing: 'border-box',\n color: tokens.colorBrandForegroundLink,\n cursor: 'pointer',\n display: 'inline',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n ...shorthands.overflow('inherit'),\n textAlign: 'left',\n textDecorationLine: 'none',\n textDecorationThickness: tokens.strokeWidthThin,\n textOverflow: 'inherit',\n userSelect: 'text',\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n // Overrides when the Link renders as a button.\n button: {\n ...shorthands.borderStyle('none'),\n },\n // Overrides when an href is present so the Link renders as an anchor.\n href: {\n fontSize: 'inherit',\n },\n // Overrides when the Link appears subtle.\n subtle: {\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Hover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n // Overrides when the Link is rendered inline within text.\n inline: {\n textDecorationLine: 'underline',\n },\n // Overrides when the Link is disabled.\n disabled: {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n\n ':hover': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n const { appearance, disabled, inline, root } = state;\n\n state.root.className = mergeClasses(\n linkClassNames.root,\n styles.root,\n styles.focusIndicator,\n root.as === 'a' && root.href && styles.href,\n root.as === 'button' && styles.button,\n appearance === 'subtle' && styles.subtle,\n inline && styles.inline,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"]}
1
+ {"version":3,"names":["react_1","require","react_tabster_1","react_theme_1","exports","linkClassNames","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","useLinkStyles_unstable","state","styles","appearance","className","mergeClasses","as"],"sources":["../src/packages/react-components/react-link/src/components/Link/useLinkStyles.ts"],"sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LinkSlots, LinkState } from './Link.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nconst useStyles = makeStyles({\n focusIndicator: createCustomFocusIndicatorStyle({\n textDecorationColor: tokens.colorStrokeFocus2,\n textDecorationLine: 'underline',\n textDecorationStyle: 'double',\n }),\n // Common styles.\n root: {\n backgroundColor: 'transparent',\n boxSizing: 'border-box',\n color: tokens.colorBrandForegroundLink,\n cursor: 'pointer',\n display: 'inline',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n ...shorthands.margin(0),\n ...shorthands.padding(0),\n ...shorthands.overflow('inherit'),\n textAlign: 'left',\n textDecorationLine: 'none',\n textDecorationThickness: tokens.strokeWidthThin,\n textOverflow: 'inherit',\n userSelect: 'text',\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n // Overrides when the Link renders as a button.\n button: {\n ...shorthands.borderStyle('none'),\n },\n // Overrides when an href is present so the Link renders as an anchor.\n href: {\n fontSize: 'inherit',\n },\n // Overrides when the Link appears subtle.\n subtle: {\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Hover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n // Overrides when the Link is rendered inline within text.\n inline: {\n textDecorationLine: 'underline',\n },\n // Overrides when the Link is disabled.\n disabled: {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n\n ':hover': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n textDecorationLine: 'none',\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n const { appearance, disabled, inline, root } = state;\n\n state.root.className = mergeClasses(\n linkClassNames.root,\n styles.root,\n styles.focusIndicator,\n root.as === 'a' && root.href && styles.href,\n root.as === 'button' && styles.button,\n appearance === 'subtle' && styles.subtle,\n inline && styles.inline,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"mappings":";;;;;;AAAA,MAAAA,OAAA,gBAAAC,OAAA;AACA,MAAAC,eAAA,gBAAAD,OAAA;AACA,MAAAE,aAAA,gBAAAF,OAAA;AAIaG,OAAA,CAAAC,cAAc,GAA8B;EACvDC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,gBAAGP,OAAA,CAAAQ,QAAU;EAAAC,cAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAR,IAAA;IAAAS,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;EA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AAAC;EAAAC;IAAA,oCAAsB;EAAA;AAAA;AACtBF;EAAAC;EAAAC;IAAA,8BAAgB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-link/src/index.ts"],"sourcesContent":["export {\n Link,\n linkClassNames,\n renderLink_unstable,\n useLinkState_unstable,\n useLinkStyles_unstable,\n useLink_unstable,\n} from './Link';\nexport type { LinkProps, LinkSlots, LinkState } from './Link';\n"]}
1
+ {"version":3,"names":["Link_1","require","Object","defineProperty","exports","enumerable","get","Link","linkClassNames","renderLink_unstable","useLinkState_unstable","useLinkStyles_unstable","useLink_unstable"],"sources":["../src/packages/react-components/react-link/src/index.ts"],"sourcesContent":["export {\n Link,\n linkClassNames,\n renderLink_unstable,\n useLinkState_unstable,\n useLinkStyles_unstable,\n useLink_unstable,\n} from './Link';\nexport type { LinkProps, LinkSlots, LinkState } from './Link';\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,gBAAAC,OAAA;AACEC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,MAAA,CAAAO,IAAI;EAAA;AAAA;AACJL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,MAAA,CAAAQ,cAAc;EAAA;AAAA;AACdN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,MAAA,CAAAS,mBAAmB;EAAA;AAAA;AACnBP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,MAAA,CAAAU,qBAAqB;EAAA;AAAA;AACrBR,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,MAAA,CAAAW,sBAAsB;EAAA;AAAA;AACtBT,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,MAAA,CAAAY,gBAAgB;EAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-link",
3
- "version": "9.0.25",
3
+ "version": "9.0.27",
4
4
  "description": "Fluent UI React Link component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -34,9 +34,9 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@fluentui/keyboard-keys": "^9.0.1",
37
- "@fluentui/react-tabster": "^9.5.3",
37
+ "@fluentui/react-tabster": "^9.5.5",
38
38
  "@fluentui/react-theme": "^9.1.5",
39
- "@fluentui/react-utilities": "^9.6.0",
39
+ "@fluentui/react-utilities": "^9.6.2",
40
40
  "@griffel/react": "^1.5.2",
41
41
  "tslib": "^2.1.0"
42
42
  },