@fluentui/react-label 0.0.0-nightlyff78d1e27a20220217.1 → 0.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 (41) hide show
  1. package/CHANGELOG.json +405 -10
  2. package/CHANGELOG.md +192 -62
  3. package/MIGRATION.md +19 -6
  4. package/README.md +27 -5
  5. package/Spec.md +27 -67
  6. package/dist/{react-label.d.ts → index.d.ts} +19 -21
  7. package/{lib → dist}/tsdoc-metadata.json +0 -0
  8. package/lib/components/Label/Label.js.map +1 -1
  9. package/lib/components/Label/Label.types.js.map +1 -1
  10. package/lib/components/Label/renderLabel.js.map +1 -1
  11. package/lib/components/Label/useLabel.js +2 -2
  12. package/lib/components/Label/useLabel.js.map +1 -1
  13. package/lib/components/Label/useLabelStyles.js +10 -4
  14. package/lib/components/Label/useLabelStyles.js.map +1 -1
  15. package/lib/index.js +1 -1
  16. package/lib/index.js.map +1 -1
  17. package/lib-commonjs/components/Label/Label.js.map +1 -1
  18. package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
  19. package/lib-commonjs/components/Label/useLabel.js +2 -2
  20. package/lib-commonjs/components/Label/useLabel.js.map +1 -1
  21. package/lib-commonjs/components/Label/useLabelStyles.js +11 -5
  22. package/lib-commonjs/components/Label/useLabelStyles.js.map +1 -1
  23. package/lib-commonjs/index.js +32 -2
  24. package/lib-commonjs/index.js.map +1 -1
  25. package/package.json +17 -21
  26. package/lib/Label.d.ts +0 -1
  27. package/lib/components/Label/Label.d.ts +0 -6
  28. package/lib/components/Label/Label.types.d.ts +0 -38
  29. package/lib/components/Label/index.d.ts +0 -5
  30. package/lib/components/Label/renderLabel.d.ts +0 -5
  31. package/lib/components/Label/useLabel.d.ts +0 -12
  32. package/lib/components/Label/useLabelStyles.d.ts +0 -6
  33. package/lib/index.d.ts +0 -2
  34. package/lib-commonjs/Label.d.ts +0 -1
  35. package/lib-commonjs/components/Label/Label.d.ts +0 -6
  36. package/lib-commonjs/components/Label/Label.types.d.ts +0 -38
  37. package/lib-commonjs/components/Label/index.d.ts +0 -5
  38. package/lib-commonjs/components/Label/renderLabel.d.ts +0 -5
  39. package/lib-commonjs/components/Label/useLabel.d.ts +0 -12
  40. package/lib-commonjs/components/Label/useLabelStyles.d.ts +0 -6
  41. package/lib-commonjs/index.d.ts +0 -2
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@fluentui/react-label",
3
- "version": "0.0.0-nightlyff78d1e27a20220217.1",
3
+ "version": "0.0.0",
4
4
  "description": "Fluent UI React Label 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,29 +21,20 @@
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-label/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-label/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/eslint-plugin": "*",
30
30
  "@fluentui/react-conformance": "*",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightlyff78d1e27a20220217.1",
32
- "@fluentui/scripts": "^1.0.0",
33
- "@types/enzyme": "3.10.3",
34
- "@types/enzyme-adapter-react-16": "1.0.3",
35
- "@types/react": "16.9.42",
36
- "@types/react-dom": "16.9.10",
37
- "@types/react-test-renderer": "^16.0.0",
38
- "enzyme": "~3.10.0",
39
- "enzyme-adapter-react-16": "^1.15.0",
40
- "react": "16.8.6",
41
- "react-dom": "16.8.6",
42
- "react-test-renderer": "^16.3.0"
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220628-0417.1",
32
+ "@fluentui/scripts": "^1.0.0"
43
33
  },
44
34
  "dependencies": {
45
- "@fluentui/react-utilities": "0.0.0-nightlyff78d1e27a20220217.1",
46
- "@griffel/react": "1.0.0",
35
+ "@fluentui/react-theme": "^0.0.0",
36
+ "@fluentui/react-utilities": "^0.0.0",
37
+ "@griffel/react": "1.2.0",
47
38
  "tslib": "^2.1.0"
48
39
  },
49
40
  "peerDependencies": {
@@ -54,9 +45,14 @@
54
45
  },
55
46
  "beachball": {
56
47
  "disallowedChangeTypes": [
57
- "major",
58
- "minor",
59
- "patch"
48
+ "major"
60
49
  ]
50
+ },
51
+ "exports": {
52
+ ".": {
53
+ "types": "./lib/index.d.ts",
54
+ "import": "./lib/index.js",
55
+ "require": "./lib-commonjs/index.js"
56
+ }
61
57
  }
62
58
  }
package/lib/Label.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components/Label/index';
@@ -1,6 +0,0 @@
1
- import type { LabelProps } from './Label.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A label component provides a title or name to a component.
5
- */
6
- export declare const Label: ForwardRefComponent<LabelProps>;
@@ -1,38 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- declare type LabelCommons = {
3
- /**
4
- * Renders the label as disabled
5
- * @defaultvalue false
6
- */
7
- disabled: boolean;
8
- /**
9
- * A label supports different sizes.
10
- * @defaultvalue 'medium'
11
- */
12
- size: 'small' | 'medium' | 'large';
13
- /**
14
- * A label supports semibold/strong fontweight.
15
- * @defaultvalue false
16
- */
17
- strong: boolean;
18
- };
19
- export declare type LabelSlots = {
20
- root: Slot<'label'>;
21
- required?: Slot<'span'>;
22
- };
23
- /**
24
- * State used in rendering Label
25
- */
26
- export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
27
- /**
28
- * Label Props
29
- */
30
- export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
31
- /**
32
- * Displays and indicator that the label is for a required field. The required prop can be set to true to display
33
- * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
34
- * @defaultvalue false
35
- */
36
- required?: boolean | Slot<'span'>;
37
- };
38
- export {};
@@ -1,5 +0,0 @@
1
- export * from './Label';
2
- export * from './Label.types';
3
- export * from './renderLabel';
4
- export * from './useLabel';
5
- export * from './useLabelStyles';
@@ -1,5 +0,0 @@
1
- import type { LabelState } from './Label.types';
2
- /**
3
- * Render the final JSX of Label
4
- */
5
- export declare const renderLabel_unstable: (state: LabelState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { LabelProps, LabelState } from './Label.types';
3
- /**
4
- * Create the state required to render Label.
5
- *
6
- * The returned state can be modified with hooks such as useLabelStyles_unstable,
7
- * before being passed to renderLabel_unstable.
8
- *
9
- * @param props - props from this instance of Label
10
- * @param ref - reference to root HTMLElement of Label
11
- */
12
- export declare const useLabel_unstable: (props: LabelProps, ref: React.Ref<HTMLElement>) => LabelState;
@@ -1,6 +0,0 @@
1
- import type { LabelState } from './Label.types';
2
- export declare const labelClassName = "fui-Label";
3
- /**
4
- * Apply styling to the Label slots based on the state
5
- */
6
- export declare const useLabelStyles_unstable: (state: LabelState) => LabelState;
package/lib/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- export * from './Label';
@@ -1 +0,0 @@
1
- export * from './components/Label/index';
@@ -1,6 +0,0 @@
1
- import type { LabelProps } from './Label.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * A label component provides a title or name to a component.
5
- */
6
- export declare const Label: ForwardRefComponent<LabelProps>;
@@ -1,38 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- declare type LabelCommons = {
3
- /**
4
- * Renders the label as disabled
5
- * @defaultvalue false
6
- */
7
- disabled: boolean;
8
- /**
9
- * A label supports different sizes.
10
- * @defaultvalue 'medium'
11
- */
12
- size: 'small' | 'medium' | 'large';
13
- /**
14
- * A label supports semibold/strong fontweight.
15
- * @defaultvalue false
16
- */
17
- strong: boolean;
18
- };
19
- export declare type LabelSlots = {
20
- root: Slot<'label'>;
21
- required?: Slot<'span'>;
22
- };
23
- /**
24
- * State used in rendering Label
25
- */
26
- export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
27
- /**
28
- * Label Props
29
- */
30
- export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
31
- /**
32
- * Displays and indicator that the label is for a required field. The required prop can be set to true to display
33
- * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
34
- * @defaultvalue false
35
- */
36
- required?: boolean | Slot<'span'>;
37
- };
38
- export {};
@@ -1,5 +0,0 @@
1
- export * from './Label';
2
- export * from './Label.types';
3
- export * from './renderLabel';
4
- export * from './useLabel';
5
- export * from './useLabelStyles';
@@ -1,5 +0,0 @@
1
- import type { LabelState } from './Label.types';
2
- /**
3
- * Render the final JSX of Label
4
- */
5
- export declare const renderLabel_unstable: (state: LabelState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { LabelProps, LabelState } from './Label.types';
3
- /**
4
- * Create the state required to render Label.
5
- *
6
- * The returned state can be modified with hooks such as useLabelStyles_unstable,
7
- * before being passed to renderLabel_unstable.
8
- *
9
- * @param props - props from this instance of Label
10
- * @param ref - reference to root HTMLElement of Label
11
- */
12
- export declare const useLabel_unstable: (props: LabelProps, ref: React.Ref<HTMLElement>) => LabelState;
@@ -1,6 +0,0 @@
1
- import type { LabelState } from './Label.types';
2
- export declare const labelClassName = "fui-Label";
3
- /**
4
- * Apply styling to the Label slots based on the state
5
- */
6
- export declare const useLabelStyles_unstable: (state: LabelState) => LabelState;
@@ -1,2 +0,0 @@
1
- export {};
2
- export * from './Label';