@fluentui/react-link 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +33 -11
  2. package/README.md +11 -0
  3. package/lib/components/Link/Link.js.map +1 -1
  4. package/lib/components/Link/Link.module.css +124 -0
  5. package/lib/components/Link/Link.types.js.map +1 -1
  6. package/lib/components/Link/index.js.map +1 -1
  7. package/lib/components/Link/renderLink.js +2 -2
  8. package/lib/components/Link/renderLink.js.map +1 -1
  9. package/lib/components/Link/useLink.js.map +1 -1
  10. package/lib/components/Link/useLinkState.js.map +1 -1
  11. package/lib/components/Link/useLinkStyles.styles.css.js +9 -0
  12. package/lib/components/Link/useLinkStyles.styles.css.js.map +1 -0
  13. package/lib/components/Link/useLinkStyles.styles.raw.css.js +9 -0
  14. package/lib/components/Link/useLinkStyles.styles.raw.css.js.map +1 -0
  15. package/lib/components/Link/useLinkStyles.styles.raw.js.map +1 -1
  16. package/lib/contexts/index.js.map +1 -1
  17. package/lib/contexts/linkContext.js.map +1 -1
  18. package/lib-commonjs/Link.cjs +11 -11
  19. package/lib-commonjs/Link.cjs.map +1 -1
  20. package/lib-commonjs/components/Link/Link.cjs.map +1 -1
  21. package/lib-commonjs/components/Link/Link.module.css +124 -0
  22. package/lib-commonjs/components/Link/Link.types.cjs.map +1 -1
  23. package/lib-commonjs/components/Link/index.cjs +8 -8
  24. package/lib-commonjs/components/Link/index.cjs.map +1 -1
  25. package/lib-commonjs/components/Link/renderLink.cjs.map +1 -1
  26. package/lib-commonjs/components/Link/useLink.cjs +3 -3
  27. package/lib-commonjs/components/Link/useLink.cjs.map +1 -1
  28. package/lib-commonjs/components/Link/useLinkState.cjs.map +1 -1
  29. package/lib-commonjs/components/Link/useLinkStyles.styles.cjs +3 -3
  30. package/lib-commonjs/components/Link/useLinkStyles.styles.cjs.map +1 -1
  31. package/lib-commonjs/components/Link/useLinkStyles.styles.css.cjs +28 -0
  32. package/lib-commonjs/components/Link/useLinkStyles.styles.css.cjs.map +1 -0
  33. package/lib-commonjs/components/Link/useLinkStyles.styles.raw.cjs +3 -3
  34. package/lib-commonjs/components/Link/useLinkStyles.styles.raw.cjs.map +1 -1
  35. package/lib-commonjs/components/Link/useLinkStyles.styles.raw.css.cjs +28 -0
  36. package/lib-commonjs/components/Link/useLinkStyles.styles.raw.css.cjs.map +1 -0
  37. package/lib-commonjs/contexts/index.cjs +4 -4
  38. package/lib-commonjs/contexts/index.cjs.map +1 -1
  39. package/lib-commonjs/contexts/linkContext.cjs +4 -4
  40. package/lib-commonjs/contexts/linkContext.cjs.map +1 -1
  41. package/lib-commonjs/index.cjs +11 -11
  42. package/lib-commonjs/index.cjs.map +1 -1
  43. package/package.json +14 -14
  44. package/dist/metadata/api/api-root.json +0 -1
  45. package/dist/metadata/index.json +0 -1
package/CHANGELOG.md CHANGED
@@ -1,23 +1,45 @@
1
1
  # Change Log - @fluentui/react-link
2
2
 
3
- <!-- This log was last generated on Tue, 06 Oct 2026 11:40:24 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Sat, 31 Oct 2026 11:08:46 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [9.74.7-experimental.cli-api.20261006-ccaa611d58.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.74.7-experimental.cli-api.20261006-ccaa611d58.0)
7
+ ## [9.75.0-experimental.css-modules.20261031-810ab07afb.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
8
8
 
9
- Tue, 06 Oct 2026 11:40:24 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.8.4..@fluentui/react-link_v9.74.7-experimental.cli-api.20261006-ccaa611d58.0)
9
+ Sat, 31 Oct 2026 11:08:46 GMT
11
10
 
12
11
  ### Changes
13
12
 
14
- - Release 9.74.7-experimental.cli-api.20261006-ccaa611d58 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
15
- - Bump @fluentui/keyboard-keys to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
- - Bump @fluentui/react-jsx-runtime to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
- - Bump @fluentui/react-shared-contexts to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
- - Bump @fluentui/react-tabster to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
- - Bump @fluentui/react-theme to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
- - Bump @fluentui/react-utilities to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
13
+ - Release 9.75.0-experimental.css-modules.20261031-810ab07afb ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
14
+ - Bump @fluentui/keyboard-keys to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
15
+ - Bump @fluentui/react-jsx-runtime to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-shared-contexts to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-theme to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
+
21
+ ## [9.8.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.8.6)
22
+
23
+ Mon, 19 Oct 2026 16:49:01 GMT
24
+
25
+ ### Patches
26
+
27
+ - Bump @fluentui/react-jsx-runtime to v9.4.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
28
+ - Bump @fluentui/react-tabster to v9.26.19 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
29
+ - Bump @fluentui/react-utilities to v9.27.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
30
+
31
+ ## [9.8.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.8.5)
32
+
33
+ Tue, 22 Sep 2026 11:25:40 GMT
34
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-link_v9.8.4..@fluentui/react-link_v9.8.5)
35
+
36
+ ### Patches
37
+
38
+ - fix: remove unused react-dom and @types/react-dom peer dependencies, mark @types/react as optional ([PR #36559](https://github.com/microsoft/fluentui/pull/36559) by martinhochel@microsoft.com)
39
+ - Bump @fluentui/react-jsx-runtime to v9.4.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
40
+ - Bump @fluentui/react-shared-contexts to v9.26.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
41
+ - Bump @fluentui/react-tabster to v9.26.18 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
42
+ - Bump @fluentui/react-utilities to v9.26.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
21
43
 
22
44
  ## [9.8.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-link_v9.8.4)
23
45
 
package/README.md CHANGED
@@ -37,3 +37,14 @@ See [SPEC.md](./SPEC.md).
37
37
  ### Migration Guide
38
38
 
39
39
  If you're upgrading to Fluent UI v9 see [MIGRATION.md](./MIGRATION.md) for guidance on updating to the latest Link implementation.
40
+
41
+ ## Opt-in CSS Modules styles
42
+
43
+ The `use*Styles.styles.css` modules beside the existing Griffel hooks provide opt-in,
44
+ layered CSS alternatives with the same exports. Configure the bundler to replace
45
+ `.styles` with `.styles.css.ts` for source imports and `.styles.js` with
46
+ `.styles.css.js` for built imports. Load CSS Modules as default class-name maps and
47
+ retain the package CSS assets. Default component imports still use Griffel.
48
+ Composed components require their own style alternatives; this does not remove
49
+ all reachable Griffel dependencies. Browser, forced-colors, RTL, and visual-regression
50
+ parity must be validated before switching defaults.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Link/Link.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useLink_unstable } from './useLink';\nimport { useLinkStyles_unstable } from './useLinkStyles.styles';\nimport { renderLink_unstable } from './renderLink';\nimport type { LinkProps } from './Link.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 useCustomStyleHook_unstable('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"],"names":["React","useLink_unstable","useLinkStyles_unstable","renderLink_unstable","useCustomStyleHook_unstable","Link","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,eAAY;AAC7C,SAASC,sBAAsB,QAAQ,4BAAyB;AAChE,SAASC,mBAAmB,QAAQ,kBAAe;AAGnD,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,qBAAuCL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3E,MAAMC,QAAQR,iBAAiBM,OAAOC;IAEtCN,uBAAuBO;IAEvBL,4BAA4B,0BAA0BK;IAEtD,OAAON,oBAAoBM;AAC3B,qFAAqF;AACvF,GAAqC;AAErCJ,KAAKK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useLink_unstable } from './useLink';\nimport { useLinkStyles_unstable } from './useLinkStyles.styles';\nimport { renderLink_unstable } from './renderLink';\nimport type { LinkProps } from './Link.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 useCustomStyleHook_unstable('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"],"names":["React","useLink_unstable","useLinkStyles_unstable","renderLink_unstable","useCustomStyleHook_unstable","Link","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,eAAY;AAC7C,SAASC,sBAAsB,QAAQ,4BAAyB;AAChE,SAASC,mBAAmB,QAAQ,kBAAe;AAGnD,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,qBAAuCL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3E,MAAMC,QAAQR,iBAAiBM,OAAOC;IAEtCN,uBAAuBO;IAEvBL,4BAA4B,0BAA0BK;IAEtD,OAAON,oBAAoBM;AAC3B,qFAAqF;AACvF,GAAqC;AAErCJ,KAAKK,WAAW,GAAG"}
@@ -0,0 +1,124 @@
1
+ @layer fluentui {
2
+ .root {
3
+ background-color: transparent;
4
+ box-sizing: border-box;
5
+ color: var(--colorBrandForegroundLink);
6
+ cursor: pointer;
7
+ display: inline;
8
+ font-family: var(--fontFamilyBase);
9
+ font-size: var(--fontSizeBase300);
10
+ font-weight: var(--fontWeightRegular);
11
+ margin: 0;
12
+ padding: 0;
13
+ overflow: inherit;
14
+ text-align: left;
15
+ &:dir(rtl) {
16
+ text-align: right;
17
+ }
18
+ text-decoration-line: none;
19
+ text-decoration-thickness: var(--strokeWidthThin);
20
+ text-overflow: inherit;
21
+ user-select: text;
22
+ &:focus-visible {
23
+ outline-style: none;
24
+ }
25
+
26
+ &:hover {
27
+ text-decoration-line: underline;
28
+ color: var(--colorBrandForegroundLinkHover);
29
+ }
30
+
31
+ &:active {
32
+ text-decoration-line: underline;
33
+ color: var(--colorBrandForegroundLinkPressed);
34
+ }
35
+ }
36
+
37
+ .root:where(.button) {
38
+ border-top-style: none;
39
+ border-inline-end-style: none;
40
+ border-bottom-style: none;
41
+ border-inline-start-style: none;
42
+ }
43
+
44
+ .root:where(.href) {
45
+ font-size: inherit;
46
+ }
47
+
48
+ .root:where(.subtle) {
49
+ color: var(--colorNeutralForeground2Link);
50
+ &:hover {
51
+ text-decoration-line: underline;
52
+ color: var(--colorNeutralForeground2LinkHover);
53
+ }
54
+
55
+ &:active {
56
+ text-decoration-line: underline;
57
+ color: var(--colorNeutralForeground2LinkPressed);
58
+ }
59
+ }
60
+
61
+ .root:where(.inverted) {
62
+ color: var(--colorBrandForegroundInverted);
63
+ &:hover {
64
+ color: var(--colorBrandForegroundInverted);
65
+ }
66
+
67
+ &:active {
68
+ color: var(--colorBrandForegroundInverted);
69
+ }
70
+ }
71
+
72
+ .root:where(.brand) {
73
+ color: var(--colorNeutralForegroundInvertedLink);
74
+ &:hover {
75
+ color: var(--colorNeutralForegroundInvertedLinkHover);
76
+ }
77
+
78
+ &:active {
79
+ color: var(--colorNeutralForegroundInvertedLinkPressed);
80
+ }
81
+ }
82
+
83
+ .root:where(.inline) {
84
+ text-decoration-line: underline;
85
+ }
86
+
87
+ .root:where(.disabled) {
88
+ text-decoration-line: none;
89
+ color: var(--colorNeutralForegroundDisabled);
90
+ cursor: not-allowed;
91
+ &:hover {
92
+ text-decoration-line: none;
93
+ color: var(--colorNeutralForegroundDisabled);
94
+ }
95
+
96
+ &:active {
97
+ text-decoration-line: none;
98
+ color: var(--colorNeutralForegroundDisabled);
99
+ }
100
+
101
+ @media (forced-colors: active) {
102
+ color: GrayText;
103
+ &:hover {
104
+ color: GrayText;
105
+ }
106
+
107
+ &:active {
108
+ color: GrayText;
109
+ }
110
+ }
111
+ }
112
+
113
+ .root {
114
+ &[data-fui-focus-visible] {
115
+ text-decoration-color: var(--colorStrokeFocus2);
116
+ text-decoration-line: underline;
117
+ text-decoration-style: double;
118
+ outline-style: none;
119
+ }
120
+ &:where(.disabled)[data-fui-focus-visible] {
121
+ text-decoration-line: none;
122
+ }
123
+ }
124
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Link/Link.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { 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' | 'span'>;\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\n/**\n * Link props without design-specific props (appearance, inline).\n * Use this when building a base link that is unstyled or uses a custom design system.\n */\nexport type LinkBaseProps = DistributiveOmit<LinkProps, 'appearance' | 'inline'>;\n\nexport type LinkState = ComponentState<LinkSlots> &\n Required<Pick<LinkProps, 'appearance' | 'disabled' | 'disabledFocusable' | 'inline'>> & {\n backgroundAppearance?: BackgroundAppearanceContextValue;\n };\n\n/**\n * Link state without design-specific state (appearance, backgroundAppearance, inline).\n */\nexport type LinkBaseState = DistributiveOmit<LinkState, 'appearance' | 'backgroundAppearance' | 'inline'>;\n"],"names":[],"mappings":"AAiDA;;CAEC,GACD,WAA0G"}
1
+ {"version":3,"sources":["../../../src/components/Link/Link.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { 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' | 'span'>;\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\n/**\n * Link props without design-specific props (appearance, inline).\n * Use this when building a base link that is unstyled or uses a custom design system.\n */\nexport type LinkBaseProps = DistributiveOmit<LinkProps, 'appearance' | 'inline'>;\n\nexport type LinkState = ComponentState<LinkSlots> &\n Required<Pick<LinkProps, 'appearance' | 'disabled' | 'disabledFocusable' | 'inline'>> & {\n backgroundAppearance?: BackgroundAppearanceContextValue;\n };\n\n/**\n * Link state without design-specific state (appearance, backgroundAppearance, inline).\n */\nexport type LinkBaseState = DistributiveOmit<LinkState, 'appearance' | 'backgroundAppearance' | 'inline'>;\n"],"names":[],"mappings":"AAiDA;;CAEC,GACD,WAA0G"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Link/index.ts"],"sourcesContent":["export { Link } from './Link';\nexport type { LinkBaseProps, LinkBaseState, LinkProps, LinkSlots, LinkState } from './Link.types';\nexport { renderLink_unstable } from './renderLink';\nexport { useLink_unstable, useLinkBase_unstable } from './useLink';\nexport { useLinkState_unstable } from './useLinkState';\nexport { linkClassNames, useLinkStyles_unstable } from './useLinkStyles.styles';\n"],"names":["Link","renderLink_unstable","useLink_unstable","useLinkBase_unstable","useLinkState_unstable","linkClassNames","useLinkStyles_unstable"],"mappings":"AAAA,SAASA,IAAI,QAAQ,YAAS;AAE9B,SAASC,mBAAmB,QAAQ,kBAAe;AACnD,SAASC,gBAAgB,EAAEC,oBAAoB,QAAQ,eAAY;AACnE,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,cAAc,EAAEC,sBAAsB,QAAQ,4BAAyB"}
1
+ {"version":3,"sources":["../../../src/components/Link/index.ts"],"sourcesContent":["export { Link } from './Link';\nexport type { LinkBaseProps, LinkBaseState, LinkProps, LinkSlots, LinkState } from './Link.types';\nexport { renderLink_unstable } from './renderLink';\nexport { useLink_unstable, useLinkBase_unstable } from './useLink';\nexport { useLinkState_unstable } from './useLinkState';\nexport { linkClassNames, useLinkStyles_unstable } from './useLinkStyles.styles';\n"],"names":["Link","renderLink_unstable","useLink_unstable","useLinkBase_unstable","useLinkState_unstable","linkClassNames","useLinkStyles_unstable"],"mappings":"AAAA,SAASA,IAAI,QAAQ,YAAS;AAE9B,SAASC,mBAAmB,QAAQ,kBAAe;AACnD,SAASC,gBAAgB,EAAEC,oBAAoB,QAAQ,eAAY;AACnE,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,cAAc,EAAEC,sBAAsB,QAAQ,4BAAyB"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Renders a Link component by passing the state defined props to the appropriate slots.
5
5
  */ export const renderLink_unstable = (state)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Link/renderLink.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { LinkSlots, LinkBaseState } 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: LinkBaseState): JSXElement => {\n assertSlots<LinkSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderLink_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,sBAAsB,CAACC;IAClCF,YAAuBE;IAEvB,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Link/renderLink.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { LinkSlots, LinkBaseState } 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: LinkBaseState): JSXElement => {\n assertSlots<LinkSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderLink_unstable","state","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,sBAAsB,CAACC;IAClCF,YAAuBE;IAEvB,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Link/useLink.ts"],"sourcesContent":["'use client';\n\nimport type * 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 { LinkBaseProps, LinkBaseState, LinkProps, LinkState } from './Link.types';\nimport { useLinkContext } from '../../contexts/linkContext';\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 { inline: inlineContext } = useLinkContext();\n const { appearance = 'default', inline: inlineProp, ...baseProps } = props;\n\n const state = useLinkBase_unstable(baseProps, ref);\n\n return {\n appearance,\n backgroundAppearance,\n inline: inlineProp ?? !!inlineContext,\n ...state,\n };\n};\n\n/**\n * Base hook for Link component, which manages state related to ARIA, keyboard handling,\n * disabled behavior, and slot structure. This hook excludes design-specific props (appearance, inline).\n *\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 useLinkBase_unstable = (\n props: LinkBaseProps,\n ref: React.Ref<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>,\n): LinkBaseState => {\n const { disabled = false, disabledFocusable = 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 LinkBaseProps;\n\n const state: LinkBaseState = {\n // Props passed at the top-level\n disabled,\n disabledFocusable,\n\n // Slots definition\n components: {\n root: elementType,\n },\n\n root: slot.always(\n getIntrinsicElementProps<LinkBaseProps>(elementType, {\n ref,\n ...propsWithAssignedAs,\n } as const),\n { elementType },\n ),\n };\n\n useLinkState_unstable(state);\n\n return state;\n};\n"],"names":["getIntrinsicElementProps","slot","useBackgroundAppearance","useLinkState_unstable","useLinkContext","useLink_unstable","props","ref","backgroundAppearance","inline","inlineContext","appearance","inlineProp","baseProps","state","useLinkBase_unstable","disabled","disabledFocusable","elementType","as","href","propsWithAssignedAs","role","undefined","type","components","root","always"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,SAASC,uBAAuB,QAAQ,kCAAkC;AAC1E,SAASC,qBAAqB,QAAQ,oBAAiB;AAEvD,SAASC,cAAc,QAAQ,gCAA6B;AAE5D;;;;CAIC,GACD,OAAO,MAAMC,mBAAmB,CAC9BC,OACAC;IAEA,MAAMC,uBAAuBN;IAC7B,MAAM,EAAEO,QAAQC,aAAa,EAAE,GAAGN;IAClC,MAAM,EAAEO,aAAa,SAAS,EAAEF,QAAQG,UAAU,EAAE,GAAGC,WAAW,GAAGP;IAErE,MAAMQ,QAAQC,qBAAqBF,WAAWN;IAE9C,OAAO;QACLI;QACAH;QACAC,QAAQG,uBAAAA,wBAAAA,aAAc,CAAC,CAACF;QACxB,GAAGI,KAAK;IACV;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMC,uBAAuB,CAClCT,OACAC;IAEA,MAAM,EAAES,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAE,GAAGX;IAExD,MAAMY,cAAcZ,MAAMa,EAAE,IAAKb,CAAAA,MAAMc,IAAI,GAAG,MAAM,QAAO;IAE3D,qGAAqG;IACrG,MAAMC,sBAAsB;QAC1BC,MAAMJ,gBAAgB,SAAS,WAAWK;QAC1CC,MAAMN,gBAAgB,WAAW,WAAWK;QAC5C,GAAGjB,KAAK;QACRa,IAAID;IACN;IAEA,MAAMJ,QAAuB;QAC3B,gCAAgC;QAChCE;QACAC;QAEA,mBAAmB;QACnBQ,YAAY;YACVC,MAAMR;QACR;QAEAQ,MAAMzB,KAAK0B,MAAM,CACf3B,yBAAwCkB,aAAa;YACnDX;YACA,GAAGc,mBAAmB;QACxB,IACA;YAAEH;QAAY;IAElB;IAEAf,sBAAsBW;IAEtB,OAAOA;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Link/useLink.ts"],"sourcesContent":["'use client';\n\nimport type * 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 { LinkBaseProps, LinkBaseState, LinkProps, LinkState } from './Link.types';\nimport { useLinkContext } from '../../contexts/linkContext';\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 { inline: inlineContext } = useLinkContext();\n const { appearance = 'default', inline: inlineProp, ...baseProps } = props;\n\n const state = useLinkBase_unstable(baseProps, ref);\n\n return {\n appearance,\n backgroundAppearance,\n inline: inlineProp ?? !!inlineContext,\n ...state,\n };\n};\n\n/**\n * Base hook for Link component, which manages state related to ARIA, keyboard handling,\n * disabled behavior, and slot structure. This hook excludes design-specific props (appearance, inline).\n *\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 useLinkBase_unstable = (\n props: LinkBaseProps,\n ref: React.Ref<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>,\n): LinkBaseState => {\n const { disabled = false, disabledFocusable = 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 LinkBaseProps;\n\n const state: LinkBaseState = {\n // Props passed at the top-level\n disabled,\n disabledFocusable,\n\n // Slots definition\n components: {\n root: elementType,\n },\n\n root: slot.always(\n getIntrinsicElementProps<LinkBaseProps>(elementType, {\n ref,\n ...propsWithAssignedAs,\n } as const),\n { elementType },\n ),\n };\n\n useLinkState_unstable(state);\n\n return state;\n};\n"],"names":["getIntrinsicElementProps","slot","useBackgroundAppearance","useLinkState_unstable","useLinkContext","useLink_unstable","props","ref","backgroundAppearance","inline","inlineContext","appearance","inlineProp","baseProps","state","useLinkBase_unstable","disabled","disabledFocusable","elementType","as","href","propsWithAssignedAs","role","undefined","type","components","root","always"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,SAASC,uBAAuB,QAAQ,kCAAkC;AAC1E,SAASC,qBAAqB,QAAQ,oBAAiB;AAEvD,SAASC,cAAc,QAAQ,gCAA6B;AAE5D;;;;CAIC,GACD,OAAO,MAAMC,mBAAmB,CAC9BC,OACAC;IAEA,MAAMC,uBAAuBN;IAC7B,MAAM,EAAEO,QAAQC,aAAa,EAAE,GAAGN;IAClC,MAAM,EAAEO,aAAa,SAAS,EAAEF,QAAQG,UAAU,EAAE,GAAGC,WAAW,GAAGP;IAErE,MAAMQ,QAAQC,qBAAqBF,WAAWN;IAE9C,OAAO;QACLI;QACAH;QACAC,MAAM,EAAEG,uBAAAA,wBAAAA,aAAc,CAAC,CAACF;QACxB,GAAGI,KAAK;IACV;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMC,uBAAuB,CAClCT,OACAC;IAEA,MAAM,EAAES,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAE,GAAGX;IAExD,MAAMY,cAAcZ,MAAMa,EAAE,IAAKb,CAAAA,MAAMc,IAAI,GAAG,MAAM,QAAO;IAE3D,qGAAqG;IACrG,MAAMC,sBAAsB;QAC1BC,MAAMJ,gBAAgB,SAAS,WAAWK;QAC1CC,MAAMN,gBAAgB,WAAW,WAAWK;QAC5C,GAAGjB,KAAK;QACRa,IAAID;IACN;IAEA,MAAMJ,QAAuB;QAC3B,gCAAgC;QAChCE;QACAC;QAEA,mBAAmB;QACnBQ,YAAY;YACVC,MAAMR;QACR;QAEAQ,MAAMzB,KAAK0B,MAAM,CACf3B,yBAAwCkB,aAAa;YACnDX;YACA,GAAGc,mBAAmB;QACxB,IACA;YAAEH;QAAY;IAElB;IAEAf,sBAAsBW;IAEtB,OAAOA;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Link/useLinkState.ts"],"sourcesContent":["import type * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport type { LinkBaseState } 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: LinkBaseState): LinkBaseState => {\n const { disabled, disabledFocusable } = state;\n const { onClick, onKeyDown, role, tabIndex } = state.root;\n\n // Add href for anchor elements.\n if (state.root.as === 'a') {\n state.root.href = disabled ? undefined : state.root.href;\n\n // Add role=\"link\" for disabled and disabledFocusable links.\n if (disabled || disabledFocusable) {\n state.root.role = role || 'link';\n }\n }\n\n // Add tabIndex=0 for anchor and span elements.\n if (state.root.as === 'a' || state.root.as === 'span') {\n state.root.tabIndex = tabIndex ?? (disabled && !disabledFocusable ? undefined : 0);\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 const keyPressed = ev.key === Enter || ev.key === Space;\n\n if ((disabled || disabledFocusable) && keyPressed) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onKeyDown?.(ev);\n // if there is already onKeyDown provided - respect it\n if (state.root.as === 'span' && !!state.root.onClick && !onKeyDown && keyPressed) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\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"],"names":["Enter","Space","useLinkState_unstable","state","disabled","disabledFocusable","onClick","onKeyDown","role","tabIndex","root","as","href","undefined","ev","preventDefault","keyPressed","key","stopPropagation","currentTarget","click"],"mappings":"AACA,SAASA,KAAK,EAAEC,KAAK,QAAQ,0BAA0B;AAGvD;;;CAGC,GACD,OAAO,MAAMC,wBAAwB,CAACC;IACpC,MAAM,EAAEC,QAAQ,EAAEC,iBAAiB,EAAE,GAAGF;IACxC,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGN,MAAMO,IAAI;IAEzD,gCAAgC;IAChC,IAAIP,MAAMO,IAAI,CAACC,EAAE,KAAK,KAAK;QACzBR,MAAMO,IAAI,CAACE,IAAI,GAAGR,WAAWS,YAAYV,MAAMO,IAAI,CAACE,IAAI;QAExD,4DAA4D;QAC5D,IAAIR,YAAYC,mBAAmB;YACjCF,MAAMO,IAAI,CAACF,IAAI,GAAGA,QAAQ;QAC5B;IACF;IAEA,+CAA+C;IAC/C,IAAIL,MAAMO,IAAI,CAACC,EAAE,KAAK,OAAOR,MAAMO,IAAI,CAACC,EAAE,KAAK,QAAQ;QACrDR,MAAMO,IAAI,CAACD,QAAQ,GAAGA,qBAAAA,sBAAAA,WAAaL,YAAY,CAACC,oBAAoBQ,YAAY;IAClF;IAEA,wGAAwG;IACxGV,MAAMO,IAAI,CAACJ,OAAO,GAAG,CAACQ;QACpB,IAAIV,YAAYC,mBAAmB;YACjCS,GAAGC,cAAc;QACnB,OAAO;YACLT,oBAAAA,8BAAAA,QAAUQ;QACZ;IACF;IAEA,0GAA0G;IAC1GX,MAAMO,IAAI,CAACH,SAAS,GAAG,CAACO;QACtB,MAAME,aAAaF,GAAGG,GAAG,KAAKjB,SAASc,GAAGG,GAAG,KAAKhB;QAElD,IAAI,AAACG,CAAAA,YAAYC,iBAAgB,KAAMW,YAAY;YACjDF,GAAGC,cAAc;YACjBD,GAAGI,eAAe;QACpB,OAAO;YACLX,sBAAAA,gCAAAA,UAAYO;YACZ,sDAAsD;YACtD,IAAIX,MAAMO,IAAI,CAACC,EAAE,KAAK,UAAU,CAAC,CAACR,MAAMO,IAAI,CAACJ,OAAO,IAAI,CAACC,aAAaS,YAAY;gBAChFF,GAAGC,cAAc;gBACjBD,GAAGK,aAAa,CAACC,KAAK;YACxB;QACF;IACF;IAEA,sDAAsD;IACtDjB,MAAMC,QAAQ,GAAGA,YAAYC;IAC7BF,MAAMO,IAAI,CAAC,gBAAgB,GAAGN,YAAYC,qBAAqBQ;IAC/D,IAAIV,MAAMO,IAAI,CAACC,EAAE,KAAK,UAAU;QAC9BR,MAAMO,IAAI,CAACN,QAAQ,GAAGA,YAAY,CAACC;IACrC;IAEA,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Link/useLinkState.ts"],"sourcesContent":["import type * as React from 'react';\nimport { Enter, Space } from '@fluentui/keyboard-keys';\nimport type { LinkBaseState } 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: LinkBaseState): LinkBaseState => {\n const { disabled, disabledFocusable } = state;\n const { onClick, onKeyDown, role, tabIndex } = state.root;\n\n // Add href for anchor elements.\n if (state.root.as === 'a') {\n state.root.href = disabled ? undefined : state.root.href;\n\n // Add role=\"link\" for disabled and disabledFocusable links.\n if (disabled || disabledFocusable) {\n state.root.role = role || 'link';\n }\n }\n\n // Add tabIndex=0 for anchor and span elements.\n if (state.root.as === 'a' || state.root.as === 'span') {\n state.root.tabIndex = tabIndex ?? (disabled && !disabledFocusable ? undefined : 0);\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 const keyPressed = ev.key === Enter || ev.key === Space;\n\n if ((disabled || disabledFocusable) && keyPressed) {\n ev.preventDefault();\n ev.stopPropagation();\n } else {\n onKeyDown?.(ev);\n // if there is already onKeyDown provided - respect it\n if (state.root.as === 'span' && !!state.root.onClick && !onKeyDown && keyPressed) {\n ev.preventDefault();\n ev.currentTarget.click();\n }\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"],"names":["Enter","Space","useLinkState_unstable","state","disabled","disabledFocusable","onClick","onKeyDown","role","tabIndex","root","as","href","undefined","ev","preventDefault","keyPressed","key","stopPropagation","currentTarget","click"],"mappings":"AACA,SAASA,KAAK,EAAEC,KAAK,QAAQ,0BAA0B;AAGvD;;;CAGC,GACD,OAAO,MAAMC,wBAAwB,CAACC;IACpC,MAAM,EAAEC,QAAQ,EAAEC,iBAAiB,EAAE,GAAGF;IACxC,MAAM,EAAEG,OAAO,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGN,MAAMO,IAAI;IAEzD,gCAAgC;IAChC,IAAIP,MAAMO,IAAI,CAACC,EAAE,KAAK,KAAK;QACzBR,MAAMO,IAAI,CAACE,IAAI,GAAGR,WAAWS,YAAYV,MAAMO,IAAI,CAACE,IAAI;QAExD,4DAA4D;QAC5D,IAAIR,YAAYC,mBAAmB;YACjCF,MAAMO,IAAI,CAACF,IAAI,GAAGA,QAAQ;QAC5B;IACF;IAEA,+CAA+C;IAC/C,IAAIL,MAAMO,IAAI,CAACC,EAAE,KAAK,OAAOR,MAAMO,IAAI,CAACC,EAAE,KAAK,QAAQ;QACrDR,MAAMO,IAAI,CAACD,QAAQ,GAAGA,qBAAAA,sBAAAA,WAAaL,YAAY,CAACC,oBAAoBQ,YAAY;IAClF;IAEA,wGAAwG;IACxGV,MAAMO,IAAI,CAACJ,OAAO,GAAG,CAACQ;QACpB,IAAIV,YAAYC,mBAAmB;YACjCS,GAAGC,cAAc;QACnB,OAAO;YACLT,oBAAAA,8BAAAA,QAAUQ;QACZ;IACF;IAEA,0GAA0G;IAC1GX,MAAMO,IAAI,CAACH,SAAS,GAAG,CAACO;QACtB,MAAME,aAAaF,GAAGG,GAAG,KAAKjB,SAASc,GAAGG,GAAG,KAAKhB;QAElD,IAAI,AAACG,CAAAA,YAAYC,iBAAgB,KAAMW,YAAY;YACjDF,GAAGC,cAAc;YACjBD,GAAGI,eAAe;QACpB,OAAO;YACLX,sBAAAA,gCAAAA,UAAYO;YACZ,sDAAsD;YACtD,IAAIX,MAAMO,IAAI,CAACC,EAAE,KAAK,UAAU,CAAC,CAACR,MAAMO,IAAI,CAACJ,OAAO,IAAI,CAACC,aAAaS,YAAY;gBAChFF,GAAGC,cAAc;gBACjBD,GAAGK,aAAa,CAACC,KAAK;YACxB;QACF;IACF;IAEA,sDAAsD;IACtDjB,MAAMC,QAAQ,GAAGA,YAAYC;IAC7BF,MAAMO,IAAI,CAAC,gBAAgB,GAAGN,YAAYC,qBAAqBQ;IAC/D,IAAIV,MAAMO,IAAI,CAACC,EAAE,KAAK,UAAU;QAC9BR,MAAMO,IAAI,CAACN,QAAQ,GAAGA,YAAY,CAACC;IACrC;IAEA,OAAOF;AACT,EAAE"}
@@ -0,0 +1,9 @@
1
+ import { clsx } from "clsx";
2
+ import styles from "./Link.module.css";
3
+ export const linkClassNames = {
4
+ root: 'fui-Link'
5
+ };
6
+ export const useLinkStyles_unstable = (state)=>{
7
+ state.root.className = clsx(linkClassNames.root, styles.root, state.root.as === 'a' && state.root.href && styles.href, state.root.as === 'button' && styles.button, styles[state.appearance], state.backgroundAppearance && styles[state.backgroundAppearance], state.inline && styles.inline, state.disabled && styles.disabled, state.root.className);
8
+ return state;
9
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Link/useLinkStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { LinkSlots, LinkState } from './Link.types';\nimport styles from './Link.module.css';\n\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n state.root.className = clsx(\n linkClassNames.root,\n styles.root,\n state.root.as === 'a' && state.root.href && styles.href,\n state.root.as === 'button' && styles.button,\n styles[state.appearance],\n state.backgroundAppearance && styles[state.backgroundAppearance],\n state.inline && styles.inline,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["clsx","styles","linkClassNames","root","useLinkStyles_unstable","state","className","as","href","button","appearance","backgroundAppearance","inline","disabled"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,oBAAoB;AAEvC,OAAO,MAAMC,iBAA4C;IACvDC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,yBAAyB,CAACC;IACrCA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KACrBE,eAAeC,IAAI,EACnBF,OAAOE,IAAI,EACXE,MAAMF,IAAI,CAACI,EAAE,KAAK,OAAOF,MAAMF,IAAI,CAACK,IAAI,IAAIP,OAAOO,IAAI,EACvDH,MAAMF,IAAI,CAACI,EAAE,KAAK,YAAYN,OAAOQ,MAAM,EAC3CR,MAAM,CAACI,MAAMK,UAAU,CAAC,EACxBL,MAAMM,oBAAoB,IAAIV,MAAM,CAACI,MAAMM,oBAAoB,CAAC,EAChEN,MAAMO,MAAM,IAAIX,OAAOW,MAAM,EAC7BP,MAAMQ,QAAQ,IAAIZ,OAAOY,QAAQ,EACjCR,MAAMF,IAAI,CAACG,SAAS;IAGtB,OAAOD;AACT,EAAE"}
@@ -0,0 +1,9 @@
1
+ import { clsx } from "clsx";
2
+ import styles from "./Link.module.css";
3
+ export const linkClassNames = {
4
+ root: 'fui-Link'
5
+ };
6
+ export const useLinkStyles_unstable = (state)=>{
7
+ state.root.className = clsx(linkClassNames.root, styles.root, state.root.as === 'a' && state.root.href && styles.href, state.root.as === 'button' && styles.button, styles[state.appearance], state.backgroundAppearance && styles[state.backgroundAppearance], state.inline && styles.inline, state.disabled && styles.disabled, state.root.className);
8
+ return state;
9
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Link/useLinkStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { LinkSlots, LinkState } from './Link.types';\nimport styles from './Link.module.css';\n\nexport const linkClassNames: SlotClassNames<LinkSlots> = {\n root: 'fui-Link',\n};\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n state.root.className = clsx(\n linkClassNames.root,\n styles.root,\n state.root.as === 'a' && state.root.href && styles.href,\n state.root.as === 'button' && styles.button,\n styles[state.appearance],\n state.backgroundAppearance && styles[state.backgroundAppearance],\n state.inline && styles.inline,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["clsx","styles","linkClassNames","root","useLinkStyles_unstable","state","className","as","href","button","appearance","backgroundAppearance","inline","disabled"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,oBAAoB;AAEvC,OAAO,MAAMC,iBAA4C;IACvDC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,yBAAyB,CAACC;IACrCA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KACrBE,eAAeC,IAAI,EACnBF,OAAOE,IAAI,EACXE,MAAMF,IAAI,CAACI,EAAE,KAAK,OAAOF,MAAMF,IAAI,CAACK,IAAI,IAAIP,OAAOO,IAAI,EACvDH,MAAMF,IAAI,CAACI,EAAE,KAAK,YAAYN,OAAOQ,MAAM,EAC3CR,MAAM,CAACI,MAAMK,UAAU,CAAC,EACxBL,MAAMM,oBAAoB,IAAIV,MAAM,CAACI,MAAMM,oBAAoB,CAAC,EAChEN,MAAMO,MAAM,IAAIX,OAAOW,MAAM,EAC7BP,MAAMQ,QAAQ,IAAIZ,OAAOY,QAAQ,EACjCR,MAAMF,IAAI,CAACG,SAAS;IAGtB,OAAOD;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Link/useLinkStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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 outlineStyle: 'none',\n }),\n // Common styles.\n root: {\n ':focus-visible': {\n outlineStyle: 'none',\n },\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 margin: '0',\n padding: '0',\n 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.colorNeutralForeground2Link,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2LinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2LinkPressed,\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 // There is no native disabled state for links, so we need to explicitly style the disabled state for high contrast mode.\n '@media (forced-colors: active)': {\n color: 'GrayText',\n\n ':hover': {\n color: 'GrayText',\n },\n\n ':active': {\n color: 'GrayText',\n },\n },\n },\n inverted: {\n color: tokens.colorBrandForegroundInverted,\n ':hover': {\n color: tokens.colorBrandForegroundInverted,\n },\n ':active': {\n color: tokens.colorBrandForegroundInverted,\n },\n },\n brand: {\n color: tokens.colorNeutralForegroundInvertedLink,\n ':hover': {\n color: tokens.colorNeutralForegroundInvertedLinkHover,\n },\n ':active': {\n color: tokens.colorNeutralForegroundInvertedLinkPressed,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n const { appearance, disabled, inline, root, backgroundAppearance } = state;\n\n // eslint-disable-next-line react-hooks/immutability\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 backgroundAppearance === 'inverted' && styles.inverted,\n backgroundAppearance === 'brand' && styles.brand,\n inline && styles.inline,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["shorthands","makeStyles","mergeClasses","createCustomFocusIndicatorStyle","tokens","linkClassNames","root","useStyles","focusIndicator","textDecorationColor","colorStrokeFocus2","textDecorationLine","textDecorationStyle","outlineStyle","backgroundColor","boxSizing","color","colorBrandForegroundLink","cursor","display","fontFamily","fontFamilyBase","fontSize","fontSizeBase300","fontWeight","fontWeightRegular","margin","padding","overflow","textAlign","textDecorationThickness","strokeWidthThin","textOverflow","userSelect","colorBrandForegroundLinkHover","colorBrandForegroundLinkPressed","button","borderStyle","href","subtle","colorNeutralForeground2Link","colorNeutralForeground2LinkHover","colorNeutralForeground2LinkPressed","inline","disabled","colorNeutralForegroundDisabled","inverted","colorBrandForegroundInverted","brand","colorNeutralForegroundInvertedLink","colorNeutralForegroundInvertedLinkHover","colorNeutralForegroundInvertedLinkPressed","useLinkStyles_unstable","state","styles","appearance","backgroundAppearance","className","as"],"mappings":"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"}
1
+ {"version":3,"sources":["../../../src/components/Link/useLinkStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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 outlineStyle: 'none',\n }),\n // Common styles.\n root: {\n ':focus-visible': {\n outlineStyle: 'none',\n },\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 margin: '0',\n padding: '0',\n 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.colorNeutralForeground2Link,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2LinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorNeutralForeground2LinkPressed,\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 // There is no native disabled state for links, so we need to explicitly style the disabled state for high contrast mode.\n '@media (forced-colors: active)': {\n color: 'GrayText',\n\n ':hover': {\n color: 'GrayText',\n },\n\n ':active': {\n color: 'GrayText',\n },\n },\n },\n inverted: {\n color: tokens.colorBrandForegroundInverted,\n ':hover': {\n color: tokens.colorBrandForegroundInverted,\n },\n ':active': {\n color: tokens.colorBrandForegroundInverted,\n },\n },\n brand: {\n color: tokens.colorNeutralForegroundInvertedLink,\n ':hover': {\n color: tokens.colorNeutralForegroundInvertedLinkHover,\n },\n ':active': {\n color: tokens.colorNeutralForegroundInvertedLinkPressed,\n },\n },\n});\n\nexport const useLinkStyles_unstable = (state: LinkState): LinkState => {\n const styles = useStyles();\n const { appearance, disabled, inline, root, backgroundAppearance } = state;\n\n // eslint-disable-next-line react-hooks/immutability\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 backgroundAppearance === 'inverted' && styles.inverted,\n backgroundAppearance === 'brand' && styles.brand,\n inline && styles.inline,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["shorthands","makeStyles","mergeClasses","createCustomFocusIndicatorStyle","tokens","linkClassNames","root","useStyles","focusIndicator","textDecorationColor","colorStrokeFocus2","textDecorationLine","textDecorationStyle","outlineStyle","backgroundColor","boxSizing","color","colorBrandForegroundLink","cursor","display","fontFamily","fontFamilyBase","fontSize","fontSizeBase300","fontWeight","fontWeightRegular","margin","padding","overflow","textAlign","textDecorationThickness","strokeWidthThin","textOverflow","userSelect","colorBrandForegroundLinkHover","colorBrandForegroundLinkPressed","button","borderStyle","href","subtle","colorNeutralForeground2Link","colorNeutralForeground2LinkHover","colorNeutralForeground2LinkPressed","inline","disabled","colorNeutralForegroundDisabled","inverted","colorBrandForegroundInverted","brand","colorNeutralForegroundInvertedLink","colorNeutralForegroundInvertedLinkHover","colorNeutralForegroundInvertedLinkPressed","useLinkStyles_unstable","state","styles","appearance","backgroundAppearance","className","as"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export type { LinkContextValue } from './linkContext';\nexport { LinkContextProvider, linkContextDefaultValue, useLinkContext } from './linkContext';\n"],"names":["LinkContextProvider","linkContextDefaultValue","useLinkContext"],"mappings":"AACA,SAASA,mBAAmB,EAAEC,uBAAuB,EAAEC,cAAc,QAAQ,mBAAgB"}
1
+ {"version":3,"sources":["../../src/contexts/index.ts"],"sourcesContent":["export type { LinkContextValue } from './linkContext';\nexport { LinkContextProvider, linkContextDefaultValue, useLinkContext } from './linkContext';\n"],"names":["LinkContextProvider","linkContextDefaultValue","useLinkContext"],"mappings":"AACA,SAASA,mBAAmB,EAAEC,uBAAuB,EAAEC,cAAc,QAAQ,mBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/linkContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type LinkContextValue = {\n inline?: boolean;\n};\n\nconst LinkContext = React.createContext<LinkContextValue | undefined>(undefined);\n\nexport const linkContextDefaultValue: LinkContextValue = {\n inline: false,\n};\n\nexport const LinkContextProvider = LinkContext.Provider;\nexport const useLinkContext = (): LinkContextValue => React.useContext(LinkContext) ?? linkContextDefaultValue;\n"],"names":["React","LinkContext","createContext","undefined","linkContextDefaultValue","inline","LinkContextProvider","Provider","useLinkContext","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAM/B,MAAMC,cAAcD,MAAME,aAAa,CAA+BC;AAEtE,OAAO,MAAMC,0BAA4C;IACvDC,QAAQ;AACV,EAAE;AAEF,OAAO,MAAMC,sBAAsBL,YAAYM,QAAQ,CAAC;AACxD,OAAO,MAAMC,iBAAiB;QAAwBR;WAAAA,CAAAA,oBAAAA,MAAMS,UAAU,CAACR,0BAAjBD,+BAAAA,oBAAiCI;EAAwB"}
1
+ {"version":3,"sources":["../../src/contexts/linkContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type LinkContextValue = {\n inline?: boolean;\n};\n\nconst LinkContext = React.createContext<LinkContextValue | undefined>(undefined);\n\nexport const linkContextDefaultValue: LinkContextValue = {\n inline: false,\n};\n\nexport const LinkContextProvider = LinkContext.Provider;\nexport const useLinkContext = (): LinkContextValue => React.useContext(LinkContext) ?? linkContextDefaultValue;\n"],"names":["React","LinkContext","createContext","undefined","linkContextDefaultValue","inline","LinkContextProvider","Provider","useLinkContext","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAM/B,MAAMC,cAAcD,MAAME,aAAa,CAA+BC;AAEtE,OAAO,MAAMC,0BAA4C;IACvDC,QAAQ;AACV,EAAE;AAEF,OAAO,MAAMC,sBAAsBL,YAAYM,QAAQ,CAAC;AACxD,OAAO,MAAMC,iBAAiB;QAAwBR;YAAAA,oBAAAA,MAAMS,UAAU,CAACR,0BAAjBD,+BAAAA,oBAAiCI;EAAwB"}
@@ -5,38 +5,38 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Link: function() {
12
+ get Link () {
13
13
  return _index.Link;
14
14
  },
15
- LinkContextProvider: function() {
15
+ get LinkContextProvider () {
16
16
  return _index1.LinkContextProvider;
17
17
  },
18
- linkClassNames: function() {
18
+ get linkClassNames () {
19
19
  return _index.linkClassNames;
20
20
  },
21
- linkContextDefaultValue: function() {
21
+ get linkContextDefaultValue () {
22
22
  return _index1.linkContextDefaultValue;
23
23
  },
24
- renderLink_unstable: function() {
24
+ get renderLink_unstable () {
25
25
  return _index.renderLink_unstable;
26
26
  },
27
- useLinkBase_unstable: function() {
27
+ get useLinkBase_unstable () {
28
28
  return _index.useLinkBase_unstable;
29
29
  },
30
- useLinkContext: function() {
30
+ get useLinkContext () {
31
31
  return _index1.useLinkContext;
32
32
  },
33
- useLinkState_unstable: function() {
33
+ get useLinkState_unstable () {
34
34
  return _index.useLinkState_unstable;
35
35
  },
36
- useLinkStyles_unstable: function() {
36
+ get useLinkStyles_unstable () {
37
37
  return _index.useLinkStyles_unstable;
38
38
  },
39
- useLink_unstable: function() {
39
+ get useLink_unstable () {
40
40
  return _index.useLink_unstable;
41
41
  }
42
42
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Link.ts"],"sourcesContent":["export type { LinkProps, LinkSlots, LinkState, LinkBaseProps, LinkBaseState } from './components/Link/index';\nexport {\n Link,\n linkClassNames,\n renderLink_unstable,\n useLinkState_unstable,\n useLinkStyles_unstable,\n useLink_unstable,\n useLinkBase_unstable,\n} from './components/Link/index';\nexport type { LinkContextValue } from './contexts';\nexport { LinkContextProvider, linkContextDefaultValue, useLinkContext } from './contexts';\n"],"names":["Link","linkClassNames","renderLink_unstable","useLinkState_unstable","useLinkStyles_unstable","useLink_unstable","useLinkBase_unstable","LinkContextProvider","linkContextDefaultValue","useLinkContext"],"mappings":";;;;;;;;;;;IAEEA;0BAAI;;uBASsB;eAAnBO;;;eARPN,qBAAc;;;eAQcO,+BAAuB;;;eAPnDN,0BAAmB;;;eAInBI,2BAAoB;;;eAGiCG,sBAAc;;;eANnEN,4BAAqB;;0BACC;eAAtBC;;;eACAC,uBAAgB;;;uBAEX,6BAA0B;wBAE4C,sBAAa"}
1
+ {"version":3,"sources":["../src/Link.ts"],"sourcesContent":["export type { LinkProps, LinkSlots, LinkState, LinkBaseProps, LinkBaseState } from './components/Link/index';\nexport {\n Link,\n linkClassNames,\n renderLink_unstable,\n useLinkState_unstable,\n useLinkStyles_unstable,\n useLink_unstable,\n useLinkBase_unstable,\n} from './components/Link/index';\nexport type { LinkContextValue } from './contexts';\nexport { LinkContextProvider, linkContextDefaultValue, useLinkContext } from './contexts';\n"],"names":["Link","linkClassNames","renderLink_unstable","useLinkState_unstable","useLinkStyles_unstable","useLink_unstable","useLinkBase_unstable","LinkContextProvider","linkContextDefaultValue","useLinkContext"],"mappings":";;;;;;;;;;;;eAEEA,WAAI;;;eASGO,2BAAmB;;;eAR1BN,qBAAc;;;eAQcO,+BAAuB;;;eAPnDN,0BAAmB;;;eAInBI,2BAAoB;;;eAGiCG,sBAAc;;;eANnEN,4BAAqB;;;eACrBC,6BAAsB;;;eACtBC,uBAAgB;;;uBAEX,6BAA0B;wBAE4C,sBAAa"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Link/Link.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useLink_unstable } from './useLink';\nimport { useLinkStyles_unstable } from './useLinkStyles.styles';\nimport { renderLink_unstable } from './renderLink';\nimport type { LinkProps } from './Link.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 useCustomStyleHook_unstable('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"],"names":["React","useLink_unstable","useLinkStyles_unstable","renderLink_unstable","useCustomStyleHook_unstable","Link","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;yBACE,eAAY;qCACN,4BAAyB;4BAC5B,kBAAe;qCAGP,kCAAkC;AAKvE,MAAMK,OAAAA,WAAAA,GAAuCL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3E,MAAMC,YAAQR,yBAAAA,EAAiBM,OAAOC;QAEtCN,2CAAAA,EAAuBO;QAEvBL,gDAAAA,EAA4B,0BAA0BK;IAEtD,WAAON,+BAAAA,EAAoBM;AAC3B,qFAAqF;AACvF,GAAqC;AAErCJ,KAAKK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useLink_unstable } from './useLink';\nimport { useLinkStyles_unstable } from './useLinkStyles.styles';\nimport { renderLink_unstable } from './renderLink';\nimport type { LinkProps } from './Link.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 useCustomStyleHook_unstable('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"],"names":["React","useLink_unstable","useLinkStyles_unstable","renderLink_unstable","useCustomStyleHook_unstable","Link","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;yBACE,eAAY;qCACN,4BAAyB;4BAC5B,kBAAe;qCAGP,kCAAkC;AAKvE,MAAMK,OAAAA,WAAAA,GAAuCL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3E,MAAMC,YAAQR,yBAAAA,EAAiBM,OAAOC;QAEtCN,2CAAAA,EAAuBO;QAEvBL,gDAAAA,EAA4B,0BAA0BK;IAEtD,WAAON,+BAAAA,EAAoBM;AAC3B,qFAAqF;AACvF,GAAqC;AAErCJ,KAAKK,WAAW,GAAG"}
@@ -0,0 +1,124 @@
1
+ @layer fluentui {
2
+ .root {
3
+ background-color: transparent;
4
+ box-sizing: border-box;
5
+ color: var(--colorBrandForegroundLink);
6
+ cursor: pointer;
7
+ display: inline;
8
+ font-family: var(--fontFamilyBase);
9
+ font-size: var(--fontSizeBase300);
10
+ font-weight: var(--fontWeightRegular);
11
+ margin: 0;
12
+ padding: 0;
13
+ overflow: inherit;
14
+ text-align: left;
15
+ &:dir(rtl) {
16
+ text-align: right;
17
+ }
18
+ text-decoration-line: none;
19
+ text-decoration-thickness: var(--strokeWidthThin);
20
+ text-overflow: inherit;
21
+ user-select: text;
22
+ &:focus-visible {
23
+ outline-style: none;
24
+ }
25
+
26
+ &:hover {
27
+ text-decoration-line: underline;
28
+ color: var(--colorBrandForegroundLinkHover);
29
+ }
30
+
31
+ &:active {
32
+ text-decoration-line: underline;
33
+ color: var(--colorBrandForegroundLinkPressed);
34
+ }
35
+ }
36
+
37
+ .root:where(.button) {
38
+ border-top-style: none;
39
+ border-inline-end-style: none;
40
+ border-bottom-style: none;
41
+ border-inline-start-style: none;
42
+ }
43
+
44
+ .root:where(.href) {
45
+ font-size: inherit;
46
+ }
47
+
48
+ .root:where(.subtle) {
49
+ color: var(--colorNeutralForeground2Link);
50
+ &:hover {
51
+ text-decoration-line: underline;
52
+ color: var(--colorNeutralForeground2LinkHover);
53
+ }
54
+
55
+ &:active {
56
+ text-decoration-line: underline;
57
+ color: var(--colorNeutralForeground2LinkPressed);
58
+ }
59
+ }
60
+
61
+ .root:where(.inverted) {
62
+ color: var(--colorBrandForegroundInverted);
63
+ &:hover {
64
+ color: var(--colorBrandForegroundInverted);
65
+ }
66
+
67
+ &:active {
68
+ color: var(--colorBrandForegroundInverted);
69
+ }
70
+ }
71
+
72
+ .root:where(.brand) {
73
+ color: var(--colorNeutralForegroundInvertedLink);
74
+ &:hover {
75
+ color: var(--colorNeutralForegroundInvertedLinkHover);
76
+ }
77
+
78
+ &:active {
79
+ color: var(--colorNeutralForegroundInvertedLinkPressed);
80
+ }
81
+ }
82
+
83
+ .root:where(.inline) {
84
+ text-decoration-line: underline;
85
+ }
86
+
87
+ .root:where(.disabled) {
88
+ text-decoration-line: none;
89
+ color: var(--colorNeutralForegroundDisabled);
90
+ cursor: not-allowed;
91
+ &:hover {
92
+ text-decoration-line: none;
93
+ color: var(--colorNeutralForegroundDisabled);
94
+ }
95
+
96
+ &:active {
97
+ text-decoration-line: none;
98
+ color: var(--colorNeutralForegroundDisabled);
99
+ }
100
+
101
+ @media (forced-colors: active) {
102
+ color: GrayText;
103
+ &:hover {
104
+ color: GrayText;
105
+ }
106
+
107
+ &:active {
108
+ color: GrayText;
109
+ }
110
+ }
111
+ }
112
+
113
+ .root {
114
+ &[data-fui-focus-visible] {
115
+ text-decoration-color: var(--colorStrokeFocus2);
116
+ text-decoration-line: underline;
117
+ text-decoration-style: double;
118
+ outline-style: none;
119
+ }
120
+ &:where(.disabled)[data-fui-focus-visible] {
121
+ text-decoration-line: none;
122
+ }
123
+ }
124
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Link/Link.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { 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' | 'span'>;\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\n/**\n * Link props without design-specific props (appearance, inline).\n * Use this when building a base link that is unstyled or uses a custom design system.\n */\nexport type LinkBaseProps = DistributiveOmit<LinkProps, 'appearance' | 'inline'>;\n\nexport type LinkState = ComponentState<LinkSlots> &\n Required<Pick<LinkProps, 'appearance' | 'disabled' | 'disabledFocusable' | 'inline'>> & {\n backgroundAppearance?: BackgroundAppearanceContextValue;\n };\n\n/**\n * Link state without design-specific state (appearance, backgroundAppearance, inline).\n */\nexport type LinkBaseState = DistributiveOmit<LinkState, 'appearance' | 'backgroundAppearance' | 'inline'>;\n"],"names":[],"mappings":"AAiDA;;CAEC,GACD,WAA0G"}
1
+ {"version":3,"sources":["../../../src/components/Link/Link.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { 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' | 'span'>;\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\n/**\n * Link props without design-specific props (appearance, inline).\n * Use this when building a base link that is unstyled or uses a custom design system.\n */\nexport type LinkBaseProps = DistributiveOmit<LinkProps, 'appearance' | 'inline'>;\n\nexport type LinkState = ComponentState<LinkSlots> &\n Required<Pick<LinkProps, 'appearance' | 'disabled' | 'disabledFocusable' | 'inline'>> & {\n backgroundAppearance?: BackgroundAppearanceContextValue;\n };\n\n/**\n * Link state without design-specific state (appearance, backgroundAppearance, inline).\n */\nexport type LinkBaseState = DistributiveOmit<LinkState, 'appearance' | 'backgroundAppearance' | 'inline'>;\n"],"names":[],"mappings":"AAiDA;;CAEC,GACD,WAA0G"}