@fluentui/react-label 0.0.0-nightly-20220505-0419.1 → 0.0.0-nightly-20220510-0420.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-label",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 05 May 2022 04:32:01 GMT",
6
- "tag": "@fluentui/react-label_v0.0.0-nightly-20220505-0419.1",
7
- "version": "0.0.0-nightly-20220505-0419.1",
5
+ "date": "Tue, 10 May 2022 04:31:44 GMT",
6
+ "tag": "@fluentui/react-label_v0.0.0-nightly-20220510-0420.1",
7
+ "version": "0.0.0-nightly-20220510-0420.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -13,25 +13,44 @@
13
13
  "commit": "not available",
14
14
  "comment": "Release nightly v9"
15
15
  },
16
+ {
17
+ "author": "esteban.230@hotmail.com",
18
+ "package": "@fluentui/react-label",
19
+ "commit": "0fac2d7a6f35c5fcebaf30da68b9604410fe0eb9",
20
+ "comment": "update README and package version"
21
+ },
22
+ {
23
+ "author": "esteban.230@hotmail.com",
24
+ "package": "@fluentui/react-label",
25
+ "commit": "6b3b09b6f05e6a17a578a65fc36b606e3004efe9",
26
+ "comment": "Removing commons type from Label."
27
+ },
16
28
  {
17
29
  "author": "beachball",
18
30
  "package": "@fluentui/react-label",
19
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220505-0419.1",
20
- "commit": "6bbaced7ad19cd9172d1869027f73f1aa967547f"
31
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220510-0420.1",
32
+ "commit": "23be9682b20fba2ea59bbb882e2225b9bc81133a"
21
33
  },
22
34
  {
23
35
  "author": "beachball",
24
36
  "package": "@fluentui/react-label",
25
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220505-0419.1",
26
- "commit": "6bbaced7ad19cd9172d1869027f73f1aa967547f"
37
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220510-0420.1",
38
+ "commit": "23be9682b20fba2ea59bbb882e2225b9bc81133a"
27
39
  },
28
40
  {
29
41
  "author": "beachball",
30
42
  "package": "@fluentui/react-label",
31
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220505-0419.1",
32
- "commit": "6bbaced7ad19cd9172d1869027f73f1aa967547f"
43
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220510-0420.1",
44
+ "commit": "23be9682b20fba2ea59bbb882e2225b9bc81133a"
33
45
  }
34
- ],
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Thu, 05 May 2022 18:26:24 GMT",
51
+ "tag": "@fluentui/react-label_v9.0.0-beta.12",
52
+ "version": "9.0.0-beta.12",
53
+ "comments": {
35
54
  "none": [
36
55
  {
37
56
  "author": "esteban.230@hotmail.com",
@@ -39,6 +58,26 @@
39
58
  "commit": "700e11e12b3e06cb10a0196e91e64b5ee4867405",
40
59
  "comment": "Updating spec, fixing typos in types, and adding descriptions in stories."
41
60
  }
61
+ ],
62
+ "prerelease": [
63
+ {
64
+ "author": "beachball",
65
+ "package": "@fluentui/react-label",
66
+ "comment": "Bump @fluentui/react-theme to v9.0.0-rc.7",
67
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
68
+ },
69
+ {
70
+ "author": "beachball",
71
+ "package": "@fluentui/react-label",
72
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.8",
73
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
74
+ },
75
+ {
76
+ "author": "beachball",
77
+ "package": "@fluentui/react-label",
78
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5",
79
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
80
+ }
42
81
  ]
43
82
  }
44
83
  },
package/CHANGELOG.md CHANGED
@@ -1,20 +1,33 @@
1
1
  # Change Log - @fluentui/react-label
2
2
 
3
- This log was last generated on Thu, 05 May 2022 04:32:01 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 10 May 2022 04:31:44 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20220505-0419.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20220505-0419.1)
7
+ ## [0.0.0-nightly-20220510-0420.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20220510-0420.1)
8
8
 
9
- Thu, 05 May 2022 04:32:01 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.11..@fluentui/react-label_v0.0.0-nightly-20220505-0419.1)
9
+ Tue, 10 May 2022 04:31:44 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.12..@fluentui/react-label_v0.0.0-nightly-20220510-0420.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by email not defined)
15
- - Bump @fluentui/react-theme to v0.0.0-nightly-20220505-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/6bbaced7ad19cd9172d1869027f73f1aa967547f) by beachball)
16
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20220505-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/6bbaced7ad19cd9172d1869027f73f1aa967547f) by beachball)
17
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220505-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/6bbaced7ad19cd9172d1869027f73f1aa967547f) by beachball)
15
+ - update README and package version ([PR #22865](https://github.com/microsoft/fluentui/pull/22865) by esteban.230@hotmail.com)
16
+ - Removing commons type from Label. ([PR #22880](https://github.com/microsoft/fluentui/pull/22880) by esteban.230@hotmail.com)
17
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20220510-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/23be9682b20fba2ea59bbb882e2225b9bc81133a) by beachball)
18
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20220510-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/23be9682b20fba2ea59bbb882e2225b9bc81133a) by beachball)
19
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220510-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/23be9682b20fba2ea59bbb882e2225b9bc81133a) by beachball)
20
+
21
+ ## [9.0.0-beta.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.12)
22
+
23
+ Thu, 05 May 2022 18:26:24 GMT
24
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.11..@fluentui/react-label_v9.0.0-beta.12)
25
+
26
+ ### Changes
27
+
28
+ - Bump @fluentui/react-theme to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
29
+ - Bump @fluentui/react-utilities to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
30
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
18
31
 
19
32
  ## [9.0.0-beta.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.11)
20
33
 
package/README.md CHANGED
@@ -4,13 +4,15 @@
4
4
 
5
5
  These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
6
6
 
7
+ Labels provide a name or title to a component or group of components, e.g., text fields, checkboxes, radio buttons, and dropdown menus.
8
+
7
9
  ## Usage
8
10
 
9
- To use the `Label` component import it from `@fluentui/react-label` and use it as shown below.
11
+ To use the `Label` component import it from `@fluentui/react-components` and use it as shown below.
10
12
 
11
13
  ```tsx
12
14
  import * as React from 'react';
13
- import { Label } from '@fluentui/react-label';
15
+ import { Label } from '@fluentui/react-components';
14
16
  import { useId } from '@fluentui/react-utilities';
15
17
 
16
18
  export const labelExample = () => {
@@ -26,3 +28,14 @@ export const labelExample = () => {
26
28
  );
27
29
  };
28
30
  ```
31
+
32
+ See [Fluent UI Storybook](https://aka.ms/fluentui-storybook) for more detailed usage examples.
33
+
34
+ Alternatively, run Storybook locally with:
35
+
36
+ 1. `yarn start`
37
+ 2. Select `react-label` from the list.
38
+
39
+ ### Specification
40
+
41
+ See [Spec.md](./Spec.md).
package/dist/index.d.ts CHANGED
@@ -17,34 +17,31 @@ export declare const labelClassName = "fui-Label";
17
17
 
18
18
  export declare const labelClassNames: SlotClassNames<LabelSlots>;
19
19
 
20
- declare type LabelCommons = {
20
+ /**
21
+ * Label Props
22
+ */
23
+ export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & {
21
24
  /**
22
25
  * Renders the label as disabled
23
26
  * @default false
24
27
  */
25
- disabled: boolean;
28
+ disabled?: boolean;
29
+ /**
30
+ * Displays an indicator that the label is for a required field. The required prop can be set to true to display
31
+ * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
32
+ * @default false
33
+ */
34
+ required?: boolean | Slot<'span'>;
26
35
  /**
27
36
  * A label supports different sizes.
28
37
  * @default 'medium'
29
38
  */
30
- size: 'small' | 'medium' | 'large';
39
+ size?: 'small' | 'medium' | 'large';
31
40
  /**
32
41
  * A label supports semibold/strong fontweight.
33
42
  * @default false
34
43
  */
35
- strong: boolean;
36
- };
37
-
38
- /**
39
- * Label Props
40
- */
41
- export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
42
- /**
43
- * Displays an indicator that the label is for a required field. The required prop can be set to true to display
44
- * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
45
- * @default false
46
- */
47
- required?: boolean | Slot<'span'>;
44
+ strong?: boolean;
48
45
  };
49
46
 
50
47
  export declare type LabelSlots = {
@@ -55,7 +52,7 @@ export declare type LabelSlots = {
55
52
  /**
56
53
  * State used in rendering Label
57
54
  */
58
- export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
55
+ export declare type LabelState = ComponentState<LabelSlots> & Required<Pick<LabelProps, 'disabled' | 'size' | 'strong'>>;
59
56
 
60
57
  /**
61
58
  * Render the final JSX of Label
@@ -1,20 +1,29 @@
1
1
  import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- declare type LabelCommons = {
2
+ /**
3
+ * Label Props
4
+ */
5
+ export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & {
3
6
  /**
4
7
  * Renders the label as disabled
5
8
  * @default false
6
9
  */
7
- disabled: boolean;
10
+ disabled?: boolean;
11
+ /**
12
+ * Displays an indicator that the label is for a required field. The required prop can be set to true to display
13
+ * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
14
+ * @default false
15
+ */
16
+ required?: boolean | Slot<'span'>;
8
17
  /**
9
18
  * A label supports different sizes.
10
19
  * @default 'medium'
11
20
  */
12
- size: 'small' | 'medium' | 'large';
21
+ size?: 'small' | 'medium' | 'large';
13
22
  /**
14
23
  * A label supports semibold/strong fontweight.
15
24
  * @default false
16
25
  */
17
- strong: boolean;
26
+ strong?: boolean;
18
27
  };
19
28
  export declare type LabelSlots = {
20
29
  root: Slot<'label'>;
@@ -23,16 +32,4 @@ export declare type LabelSlots = {
23
32
  /**
24
33
  * State used in rendering Label
25
34
  */
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 an 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
- * @default false
35
- */
36
- required?: boolean | Slot<'span'>;
37
- };
38
- export {};
35
+ export declare type LabelState = ComponentState<LabelSlots> & Required<Pick<LabelProps, 'disabled' | 'size' | 'strong'>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Label.types.js","sourceRoot":"../src/","sources":["components/Label/Label.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\ntype LabelCommons = {\n /**\n * Renders the label as disabled\n * @default false\n */\n disabled: boolean;\n\n /**\n * A label supports different sizes.\n * @default 'medium'\n */\n size: 'small' | 'medium' | 'large';\n\n /**\n * A label supports semibold/strong fontweight.\n * @default false\n */\n strong: boolean;\n};\n\nexport type LabelSlots = {\n root: Slot<'label'>;\n required?: Slot<'span'>;\n};\n\n/**\n * State used in rendering Label\n */\nexport type LabelState = ComponentState<LabelSlots> & LabelCommons;\n\n/**\n * Label Props\n */\nexport type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> &\n Partial<LabelCommons> & {\n /**\n * Displays an indicator that the label is for a required field. The required prop can be set to true to display\n * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.\n * @default false\n */\n required?: boolean | Slot<'span'>;\n };\n"]}
1
+ {"version":3,"file":"Label.types.js","sourceRoot":"../src/","sources":["components/Label/Label.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Label Props\n */\nexport type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & {\n /**\n * Renders the label as disabled\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Displays an indicator that the label is for a required field. The required prop can be set to true to display\n * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.\n * @default false\n */\n required?: boolean | Slot<'span'>;\n\n /**\n * A label supports different sizes.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * A label supports semibold/strong fontweight.\n * @default false\n */\n strong?: boolean;\n};\n\nexport type LabelSlots = {\n root: Slot<'label'>;\n required?: Slot<'span'>;\n};\n\n/**\n * State used in rendering Label\n */\nexport type LabelState = ComponentState<LabelSlots> & Required<Pick<LabelProps, 'disabled' | 'size' | 'strong'>>;\n"]}
@@ -1,20 +1,29 @@
1
1
  import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- declare type LabelCommons = {
2
+ /**
3
+ * Label Props
4
+ */
5
+ export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & {
3
6
  /**
4
7
  * Renders the label as disabled
5
8
  * @default false
6
9
  */
7
- disabled: boolean;
10
+ disabled?: boolean;
11
+ /**
12
+ * Displays an indicator that the label is for a required field. The required prop can be set to true to display
13
+ * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
14
+ * @default false
15
+ */
16
+ required?: boolean | Slot<'span'>;
8
17
  /**
9
18
  * A label supports different sizes.
10
19
  * @default 'medium'
11
20
  */
12
- size: 'small' | 'medium' | 'large';
21
+ size?: 'small' | 'medium' | 'large';
13
22
  /**
14
23
  * A label supports semibold/strong fontweight.
15
24
  * @default false
16
25
  */
17
- strong: boolean;
26
+ strong?: boolean;
18
27
  };
19
28
  export declare type LabelSlots = {
20
29
  root: Slot<'label'>;
@@ -23,16 +32,4 @@ export declare type LabelSlots = {
23
32
  /**
24
33
  * State used in rendering Label
25
34
  */
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 an 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
- * @default false
35
- */
36
- required?: boolean | Slot<'span'>;
37
- };
38
- export {};
35
+ export declare type LabelState = ComponentState<LabelSlots> & Required<Pick<LabelProps, 'disabled' | 'size' | 'strong'>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-label",
3
- "version": "0.0.0-nightly-20220505-0419.1",
3
+ "version": "0.0.0-nightly-20220510-0420.1",
4
4
  "description": "Fluent UI React Label component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -28,12 +28,12 @@
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
30
  "@fluentui/react-conformance": "*",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220505-0419.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220510-0420.1",
32
32
  "@fluentui/scripts": "^1.0.0"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-theme": "0.0.0-nightly-20220505-0419.1",
36
- "@fluentui/react-utilities": "0.0.0-nightly-20220505-0419.1",
35
+ "@fluentui/react-theme": "0.0.0-nightly-20220510-0420.1",
36
+ "@fluentui/react-utilities": "0.0.0-nightly-20220510-0420.1",
37
37
  "@griffel/react": "1.0.3",
38
38
  "tslib": "^2.1.0"
39
39
  },