@fluentui/react-label 0.0.0-nightly-20220506-0417.1 → 0.0.0-nightly-20220511-0419.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 +21 -9
- package/CHANGELOG.md +9 -7
- package/README.md +15 -2
- package/dist/index.d.ts +14 -17
- package/lib/components/Label/Label.types.d.ts +14 -17
- package/lib/components/Label/Label.types.js.map +1 -1
- package/lib-commonjs/components/Label/Label.types.d.ts +14 -17
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-label",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-label_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Wed, 11 May 2022 04:31:15 GMT",
|
6
|
+
"tag": "@fluentui/react-label_v0.0.0-nightly-20220511-0419.1",
|
7
|
+
"version": "0.0.0-nightly-20220511-0419.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -13,23 +13,35 @@
|
|
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-
|
20
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220511-0419.1",
|
32
|
+
"commit": "03a572202e24fe35d789f3009dc25922a002061e"
|
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-
|
26
|
-
"commit": "
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220511-0419.1",
|
38
|
+
"commit": "03a572202e24fe35d789f3009dc25922a002061e"
|
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-
|
32
|
-
"commit": "
|
43
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220511-0419.1",
|
44
|
+
"commit": "03a572202e24fe35d789f3009dc25922a002061e"
|
33
45
|
}
|
34
46
|
]
|
35
47
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
# Change Log - @fluentui/react-label
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Wed, 11 May 2022 04:31:15 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20220511-0419.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20220511-0419.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.12..@fluentui/react-label_v0.0.0-nightly-
|
9
|
+
Wed, 11 May 2022 04:31:15 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-20220511-0419.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
|
-
-
|
16
|
-
-
|
17
|
-
- Bump @fluentui/react-
|
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-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
|
19
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
|
18
20
|
|
19
21
|
## [9.0.0-beta.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.12)
|
20
22
|
|
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-
|
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-
|
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
|
-
|
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
|
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
|
39
|
+
size?: 'small' | 'medium' | 'large';
|
31
40
|
/**
|
32
41
|
* A label supports semibold/strong fontweight.
|
33
42
|
* @default false
|
34
43
|
*/
|
35
|
-
strong
|
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> &
|
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
|
-
|
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
|
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
|
21
|
+
size?: 'small' | 'medium' | 'large';
|
13
22
|
/**
|
14
23
|
* A label supports semibold/strong fontweight.
|
15
24
|
* @default false
|
16
25
|
*/
|
17
|
-
strong
|
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> &
|
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\
|
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
|
-
|
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
|
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
|
21
|
+
size?: 'small' | 'medium' | 'large';
|
13
22
|
/**
|
14
23
|
* A label supports semibold/strong fontweight.
|
15
24
|
* @default false
|
16
25
|
*/
|
17
|
-
strong
|
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> &
|
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-
|
3
|
+
"version": "0.0.0-nightly-20220511-0419.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-
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20220511-0419.1",
|
32
32
|
"@fluentui/scripts": "^1.0.0"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
36
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
35
|
+
"@fluentui/react-theme": "0.0.0-nightly-20220511-0419.1",
|
36
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20220511-0419.1",
|
37
37
|
"@griffel/react": "1.0.3",
|
38
38
|
"tslib": "^2.1.0"
|
39
39
|
},
|