@fluentui/react-link 9.0.0-rc.7 → 9.0.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 (47) hide show
  1. package/CHANGELOG.json +341 -1
  2. package/CHANGELOG.md +229 -123
  3. package/MIGRATION.md +12 -16
  4. package/README.md +19 -12
  5. package/SPEC.md +2 -67
  6. package/dist/{react-link.d.ts → index.d.ts} +4 -10
  7. package/{lib → dist}/tsdoc-metadata.json +0 -0
  8. package/lib/components/Link/Link.js.map +1 -1
  9. package/lib/components/Link/Link.types.js.map +1 -1
  10. package/lib/components/Link/renderLink.js.map +1 -1
  11. package/lib/components/Link/useLink.js +4 -4
  12. package/lib/components/Link/useLink.js.map +1 -1
  13. package/lib/components/Link/useLinkState.js +2 -1
  14. package/lib/components/Link/useLinkState.js.map +1 -1
  15. package/lib/components/Link/useLinkStyles.js +12 -9
  16. package/lib/components/Link/useLinkStyles.js.map +1 -1
  17. package/lib/index.js +1 -2
  18. package/lib/index.js.map +1 -1
  19. package/lib-commonjs/components/Link/Link.js.map +1 -1
  20. package/lib-commonjs/components/Link/renderLink.js.map +1 -1
  21. package/lib-commonjs/components/Link/useLink.js +4 -4
  22. package/lib-commonjs/components/Link/useLink.js.map +1 -1
  23. package/lib-commonjs/components/Link/useLinkState.js +2 -1
  24. package/lib-commonjs/components/Link/useLinkState.js.map +1 -1
  25. package/lib-commonjs/components/Link/useLinkStyles.js +13 -10
  26. package/lib-commonjs/components/Link/useLinkStyles.js.map +1 -1
  27. package/lib-commonjs/index.js +1 -8
  28. package/lib-commonjs/index.js.map +1 -1
  29. package/package.json +11 -13
  30. package/lib/Link.d.ts +0 -1
  31. package/lib/components/Link/Link.d.ts +0 -6
  32. package/lib/components/Link/Link.types.d.ts +0 -33
  33. package/lib/components/Link/index.d.ts +0 -6
  34. package/lib/components/Link/renderLink.d.ts +0 -5
  35. package/lib/components/Link/useLink.d.ts +0 -8
  36. package/lib/components/Link/useLinkState.d.ts +0 -6
  37. package/lib/components/Link/useLinkStyles.d.ts +0 -8
  38. package/lib/index.d.ts +0 -2
  39. package/lib-commonjs/Link.d.ts +0 -1
  40. package/lib-commonjs/components/Link/Link.d.ts +0 -6
  41. package/lib-commonjs/components/Link/Link.types.d.ts +0 -33
  42. package/lib-commonjs/components/Link/index.d.ts +0 -6
  43. package/lib-commonjs/components/Link/renderLink.d.ts +0 -5
  44. package/lib-commonjs/components/Link/useLink.d.ts +0 -8
  45. package/lib-commonjs/components/Link/useLinkState.d.ts +0 -6
  46. package/lib-commonjs/components/Link/useLinkStyles.d.ts +0 -8
  47. package/lib-commonjs/index.d.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,MAAA,gBAAA,OAAA,CAAA,QAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,MAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,IAAA;AAAI;AAAJ,CAAA,E,CACA;;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,aAAA;AAAa;AAAb,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,cAAA;AAAc;AAAd,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,mBAAA;AAAmB;AAAnB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,qBAAA;AAAqB;AAArB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,wBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,sBAAA;AAAsB;AAAtB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,MAAA,CAAA,gBAAA;AAAgB;AAAhB,CAAA","sourcesContent":["export {\n Link,\n // eslint-disable-next-line deprecation/deprecation\n linkClassName,\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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,MAAA,gBAAA,OAAA,CAAA,QAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,MAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,MAAA,CAAA,IAAA;EAAI;AAAJ,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,MAAA,CAAA,cAAA;EAAc;AAAd,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,MAAA,CAAA,mBAAA;EAAmB;AAAnB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,MAAA,CAAA,qBAAA;EAAqB;AAArB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,wBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,MAAA,CAAA,sBAAA;EAAsB;AAAtB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,MAAA,CAAA,gBAAA;EAAgB;AAAhB,CAAA","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"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@fluentui/react-link",
3
- "version": "9.0.0-rc.7",
3
+ "version": "9.0.0",
4
4
  "description": "Fluent UI React Link component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
7
- "typings": "lib/index.d.ts",
7
+ "typings": "dist/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
@@ -21,23 +21,23 @@
21
21
  "start": "yarn storybook",
22
22
  "test": "jest --passWithNoTests",
23
23
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
24
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-link/src && yarn docs",
25
- "storybook": "node ../../scripts/storybook/runner",
24
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-link/src && yarn docs",
25
+ "storybook": "node ../../../scripts/storybook/runner",
26
26
  "type-check": "tsc -b tsconfig.json"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fluentui/a11y-testing": "^0.1.0",
30
30
  "@fluentui/eslint-plugin": "*",
31
31
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-griffel": "9.0.0-beta.4",
32
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.9",
33
33
  "@fluentui/scripts": "^1.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/keyboard-keys": "9.0.0-rc.4",
37
- "@fluentui/react-tabster": "9.0.0-rc.7",
38
- "@fluentui/react-theme": "9.0.0-rc.5",
39
- "@fluentui/react-utilities": "9.0.0-rc.6",
40
- "@griffel/react": "1.0.3",
36
+ "@fluentui/keyboard-keys": "^9.0.0",
37
+ "@fluentui/react-tabster": "^9.0.0",
38
+ "@fluentui/react-theme": "^9.0.0",
39
+ "@fluentui/react-utilities": "^9.0.0",
40
+ "@griffel/react": "1.2.0",
41
41
  "tslib": "^2.1.0"
42
42
  },
43
43
  "peerDependencies": {
@@ -48,9 +48,7 @@
48
48
  },
49
49
  "beachball": {
50
50
  "disallowedChangeTypes": [
51
- "major",
52
- "minor",
53
- "patch"
51
+ "major"
54
52
  ]
55
53
  },
56
54
  "exports": {
package/lib/Link.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components/Link/index';
@@ -1,6 +0,0 @@
1
- import type { LinkProps } from './Link.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A Link is a reference to data that a user can follow by clicking or tapping it.
5
- */
6
- export declare const Link: ForwardRefComponent<LinkProps>;
@@ -1,33 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type LinkSlots = {
3
- /**
4
- * Root of the component that renders as either an <a> or a <button> tag.
5
- */
6
- root: Slot<'a', 'button'>;
7
- };
8
- declare type LinkCommons = {
9
- /**
10
- * A link can appear either with its default style or subtle.
11
- * If not specified, the link appears with its default styling.
12
- */
13
- appearance?: 'subtle';
14
- /**
15
- * Whether the link is disabled.
16
- * @default false
17
- */
18
- disabled?: boolean;
19
- /**
20
- * When set, allows the link to be focusable even when it has been disabled. This is used in scenarios where it is
21
- * important to keep a consistent tab order for screen reader and keyboard users.
22
- * @default false
23
- */
24
- disabledFocusable?: boolean;
25
- /**
26
- * If true, changes styling when the link is being used alongside other text content.
27
- * @default false
28
- */
29
- inline?: boolean;
30
- };
31
- export declare type LinkProps = ComponentProps<LinkSlots> & LinkCommons;
32
- export declare type LinkState = ComponentState<LinkSlots> & LinkCommons;
33
- export {};
@@ -1,6 +0,0 @@
1
- export * from './Link';
2
- export * from './Link.types';
3
- export * from './renderLink';
4
- export * from './useLink';
5
- export * from './useLinkState';
6
- export * from './useLinkStyles';
@@ -1,5 +0,0 @@
1
- import type { LinkState } from './Link.types';
2
- /**
3
- * Renders a Link component by passing the state defined props to the appropriate slots.
4
- */
5
- export declare const renderLink_unstable: (state: LinkState) => JSX.Element;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import type { LinkProps, LinkState } from './Link.types';
3
- /**
4
- * Given user props, defines default props for the Link, calls useLinkState_unstable, and returns processed state.
5
- * @param props - User provided props to the Link component.
6
- * @param ref - User provided ref to be passed to the Link component.
7
- */
8
- export declare const useLink_unstable: (props: LinkProps, ref: React.Ref<HTMLAnchorElement | HTMLButtonElement>) => LinkState;
@@ -1,6 +0,0 @@
1
- import type { LinkState } from './Link.types';
2
- /**
3
- * The useLinkState_unstable hook processes the Link state.
4
- * @param state - Link state to mutate.
5
- */
6
- export declare const useLinkState_unstable: (state: LinkState) => LinkState;
@@ -1,8 +0,0 @@
1
- import type { LinkSlots, LinkState } from './Link.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `linkClassNames.root` instead.
5
- */
6
- export declare const linkClassName = "fui-Link";
7
- export declare const linkClassNames: SlotClassNames<LinkSlots>;
8
- export declare const useLinkStyles_unstable: (state: LinkState) => LinkState;
package/lib/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { Link, linkClassName, linkClassNames, renderLink_unstable, useLinkState_unstable, useLinkStyles_unstable, useLink_unstable, } from './Link';
2
- export type { LinkProps, LinkSlots, LinkState } from './Link';
@@ -1 +0,0 @@
1
- export * from './components/Link/index';
@@ -1,6 +0,0 @@
1
- import type { LinkProps } from './Link.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A Link is a reference to data that a user can follow by clicking or tapping it.
5
- */
6
- export declare const Link: ForwardRefComponent<LinkProps>;
@@ -1,33 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type LinkSlots = {
3
- /**
4
- * Root of the component that renders as either an <a> or a <button> tag.
5
- */
6
- root: Slot<'a', 'button'>;
7
- };
8
- declare type LinkCommons = {
9
- /**
10
- * A link can appear either with its default style or subtle.
11
- * If not specified, the link appears with its default styling.
12
- */
13
- appearance?: 'subtle';
14
- /**
15
- * Whether the link is disabled.
16
- * @default false
17
- */
18
- disabled?: boolean;
19
- /**
20
- * When set, allows the link to be focusable even when it has been disabled. This is used in scenarios where it is
21
- * important to keep a consistent tab order for screen reader and keyboard users.
22
- * @default false
23
- */
24
- disabledFocusable?: boolean;
25
- /**
26
- * If true, changes styling when the link is being used alongside other text content.
27
- * @default false
28
- */
29
- inline?: boolean;
30
- };
31
- export declare type LinkProps = ComponentProps<LinkSlots> & LinkCommons;
32
- export declare type LinkState = ComponentState<LinkSlots> & LinkCommons;
33
- export {};
@@ -1,6 +0,0 @@
1
- export * from './Link';
2
- export * from './Link.types';
3
- export * from './renderLink';
4
- export * from './useLink';
5
- export * from './useLinkState';
6
- export * from './useLinkStyles';
@@ -1,5 +0,0 @@
1
- import type { LinkState } from './Link.types';
2
- /**
3
- * Renders a Link component by passing the state defined props to the appropriate slots.
4
- */
5
- export declare const renderLink_unstable: (state: LinkState) => JSX.Element;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import type { LinkProps, LinkState } from './Link.types';
3
- /**
4
- * Given user props, defines default props for the Link, calls useLinkState_unstable, and returns processed state.
5
- * @param props - User provided props to the Link component.
6
- * @param ref - User provided ref to be passed to the Link component.
7
- */
8
- export declare const useLink_unstable: (props: LinkProps, ref: React.Ref<HTMLAnchorElement | HTMLButtonElement>) => LinkState;
@@ -1,6 +0,0 @@
1
- import type { LinkState } from './Link.types';
2
- /**
3
- * The useLinkState_unstable hook processes the Link state.
4
- * @param state - Link state to mutate.
5
- */
6
- export declare const useLinkState_unstable: (state: LinkState) => LinkState;
@@ -1,8 +0,0 @@
1
- import type { LinkSlots, LinkState } from './Link.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `linkClassNames.root` instead.
5
- */
6
- export declare const linkClassName = "fui-Link";
7
- export declare const linkClassNames: SlotClassNames<LinkSlots>;
8
- export declare const useLinkStyles_unstable: (state: LinkState) => LinkState;
@@ -1,2 +0,0 @@
1
- export { Link, linkClassName, linkClassNames, renderLink_unstable, useLinkState_unstable, useLinkStyles_unstable, useLink_unstable, } from './Link';
2
- export type { LinkProps, LinkSlots, LinkState } from './Link';