@fluentui/react-label 0.0.0-nightlyebf02572f720211207.1 → 0.0.0-nightlyf8be6a7c6520220106.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,49 +2,55 @@
2
2
  "name": "@fluentui/react-label",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 07 Dec 2021 04:14:33 GMT",
6
- "tag": "@fluentui/react-label_v0.0.0-nightlyebf02572f720211207.1",
7
- "version": "0.0.0-nightlyebf02572f720211207.1",
5
+ "date": "Thu, 06 Jan 2022 04:30:08 GMT",
6
+ "tag": "@fluentui/react-label_v0.0.0-nightlyf8be6a7c6520220106.1",
7
+ "version": "0.0.0-nightlyf8be6a7c6520220106.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
11
11
  "author": "email not defined",
12
12
  "package": "@fluentui/react-label",
13
- "commit": "2523b8c9da23ec860780244563814b63ba963043",
13
+ "commit": "9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8",
14
14
  "comment": "Release nightly v9"
15
15
  },
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-label",
19
- "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlyebf02572f720211207.1",
20
- "commit": "2523b8c9da23ec860780244563814b63ba963043"
19
+ "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlyf8be6a7c6520220106.1",
20
+ "commit": "9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-label",
25
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyebf02572f720211207.1",
26
- "commit": "2523b8c9da23ec860780244563814b63ba963043"
25
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyf8be6a7c6520220106.1",
26
+ "commit": "9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-label",
31
- "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlyebf02572f720211207.1",
32
- "commit": "2523b8c9da23ec860780244563814b63ba963043"
31
+ "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlyf8be6a7c6520220106.1",
32
+ "commit": "9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-label",
37
- "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyebf02572f720211207.1",
38
- "commit": "2523b8c9da23ec860780244563814b63ba963043"
37
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyf8be6a7c6520220106.1",
38
+ "commit": "9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-label",
43
- "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyebf02572f720211207.1",
44
- "commit": "2523b8c9da23ec860780244563814b63ba963043"
43
+ "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyf8be6a7c6520220106.1",
44
+ "commit": "9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8"
45
45
  }
46
46
  ],
47
47
  "none": [
48
+ {
49
+ "author": "elcraig@microsoft.com",
50
+ "package": "@fluentui/react-label",
51
+ "commit": "d892c7f79c543b6008634ecd669b75b5108cad46",
52
+ "comment": "Relocate comment about props to the correct type, and update spec to accurately reflect props"
53
+ },
48
54
  {
49
55
  "author": "andredias@microsoft.com",
50
56
  "package": "@fluentui/react-label",
package/CHANGELOG.md CHANGED
@@ -1,22 +1,22 @@
1
1
  # Change Log - @fluentui/react-label
2
2
 
3
- This log was last generated on Tue, 07 Dec 2021 04:14:33 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 06 Jan 2022 04:30:08 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightlyebf02572f720211207.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightlyebf02572f720211207.1)
7
+ ## [0.0.0-nightlyf8be6a7c6520220106.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightlyf8be6a7c6520220106.1)
8
8
 
9
- Tue, 07 Dec 2021 04:14:33 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.4..@fluentui/react-label_v0.0.0-nightlyebf02572f720211207.1)
9
+ Thu, 06 Jan 2022 04:30:08 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.4..@fluentui/react-label_v0.0.0-nightlyf8be6a7c6520220106.1)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by email not defined)
15
- - Bump @fluentui/react-make-styles to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball)
16
- - Bump @fluentui/react-utilities to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball)
17
- - Bump @fluentui/babel-make-styles to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball)
18
- - Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball)
19
- - Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyebf02572f720211207.1 ([commit](https://github.com/microsoft/fluentui/commit/2523b8c9da23ec860780244563814b63ba963043) by beachball)
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8) by email not defined)
15
+ - Bump @fluentui/react-make-styles to v0.0.0-nightlyf8be6a7c6520220106.1 ([commit](https://github.com/microsoft/fluentui/commit/9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8) by beachball)
16
+ - Bump @fluentui/react-utilities to v0.0.0-nightlyf8be6a7c6520220106.1 ([commit](https://github.com/microsoft/fluentui/commit/9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8) by beachball)
17
+ - Bump @fluentui/babel-make-styles to v0.0.0-nightlyf8be6a7c6520220106.1 ([commit](https://github.com/microsoft/fluentui/commit/9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8) by beachball)
18
+ - Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyf8be6a7c6520220106.1 ([commit](https://github.com/microsoft/fluentui/commit/9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8) by beachball)
19
+ - Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyf8be6a7c6520220106.1 ([commit](https://github.com/microsoft/fluentui/commit/9b6d690fccd3a42a9ce2fed55d90f3eeb80edaa8) by beachball)
20
20
 
21
21
  ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.4)
22
22
 
package/Spec.md CHANGED
@@ -75,55 +75,48 @@ The Label component should be simple as shown below. It will just need the text
75
75
  ## API
76
76
 
77
77
  ```ts
78
- /**
79
- * Label Props
80
- */
81
- export type LabelProps = ComponentProps &
82
- React.LabelHTMLAttributes<HTMLElement> & {
83
- /**
84
- * Renders the label as disabled
85
- * @defaultvalue false
86
- */
87
- disabled?: boolean;
88
-
89
- /**
90
- * Whether the associated form field is required or not. If true it will be an asterisk, otherwise it will be what is provided.
91
- * @defaultvalue false
92
- */
93
- required?: boolean | ShorthandProps<ComponentProps>;
78
+ export type LabelCommons = {
79
+ /**
80
+ * Renders the label as disabled
81
+ * @defaultvalue false
82
+ */
83
+ disabled: boolean;
94
84
 
95
- /**
96
- * A label supports different font sizes, see tokens for reference.
97
- * @defaultvalue 'medium'
98
- */
99
- size?: 'small' | 'medium' | 'large';
85
+ /**
86
+ * A label supports different sizes.
87
+ * @defaultvalue 'medium'
88
+ */
89
+ size: 'small' | 'medium' | 'large';
100
90
 
101
- /**
102
- * A label supports semibold/strong fontweight. When size is set to large, label strong will be set by default.
103
- * @defaultvalue false
104
- */
105
- strong?: boolean;
106
- };
91
+ /**
92
+ * A label supports semibold/strong fontweight.
93
+ * @defaultvalue false
94
+ */
95
+ strong: boolean;
96
+ };
107
97
 
108
- /**
109
- * Names of the shorthand properties in LabelProps
110
- */
111
- export type LabelShorthandProps = 'required';
98
+ export type LabelSlots = {
99
+ root: IntrinsicShorthandProps<'label'>;
100
+ required?: IntrinsicShorthandProps<'span'>;
101
+ };
112
102
 
113
103
  /**
114
- * Names of LabelProps that have a default value in useLabel
104
+ * State used in rendering Label
115
105
  */
116
- export type LabelDefaultedProps = never;
106
+ export type LabelState = ComponentState<LabelSlots> & LabelCommons;
117
107
 
118
108
  /**
119
- * State used in rendering Label
109
+ * Label Props
120
110
  */
121
- export type LabelState = ComponentState<LabelProps, LabelShorthandProps, LabelDefaultedProps> & {
122
- /**
123
- * Ref to the root element
124
- */
125
- ref: React.Ref<HTMLElement>;
126
- };
111
+ export type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> &
112
+ Partial<LabelCommons> & {
113
+ /**
114
+ * Displays and indicator that the label is for a required field. The required prop can be set to true to display
115
+ * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
116
+ * @defaultvalue false
117
+ */
118
+ required?: boolean | ObjectShorthandProps<React.HTMLAttributes<HTMLElement>> | React.ReactNode;
119
+ };
127
120
  ```
128
121
 
129
122
  ## Structure
@@ -12,9 +12,6 @@ export declare const Label: ForwardRefComponent<LabelProps>;
12
12
 
13
13
  export declare const labelClassName = "fui-Label";
14
14
 
15
- /**
16
- * Label Props
17
- */
18
15
  export declare type LabelCommons = {
19
16
  /**
20
17
  * Renders the label as disabled
@@ -33,6 +30,9 @@ export declare type LabelCommons = {
33
30
  strong: boolean;
34
31
  };
35
32
 
33
+ /**
34
+ * Label Props
35
+ */
36
36
  export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
37
37
  /**
38
38
  * Displays and indicator that the label is for a required field. The required prop can be set to true to display
@@ -1,8 +1,5 @@
1
1
  import type { ComponentProps, ComponentState, IntrinsicShorthandProps, ObjectShorthandProps } from '@fluentui/react-utilities';
2
2
  import * as React from 'react';
3
- /**
4
- * Label Props
5
- */
6
3
  export declare type LabelCommons = {
7
4
  /**
8
5
  * Renders the label as disabled
@@ -28,6 +25,9 @@ export declare type LabelSlots = {
28
25
  * State used in rendering Label
29
26
  */
30
27
  export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
28
+ /**
29
+ * Label Props
30
+ */
31
31
  export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
32
32
  /**
33
33
  * Displays and indicator that the label is for a required field. The required prop can be set to true to display
@@ -10,6 +10,8 @@ export const renderLabel = state => {
10
10
  slots,
11
11
  slotProps
12
12
  } = getSlots(state, labelShorthandProps);
13
- return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), state.root.children, /*#__PURE__*/React.createElement(slots.required, Object.assign({}, slotProps.required)));
13
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
14
+ }, state.root.children, /*#__PURE__*/React.createElement(slots.required, { ...slotProps.required
15
+ }));
14
16
  };
15
17
  //# sourceMappingURL=renderLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Label/renderLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,mBAAT,QAAoC,YAApC;AAGA;;AAEG;;AACH,OAAO,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAa,KAAb,EAAoB,mBAApB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,IAAN,CAAW,QADd,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAFF,CADF;AAMD,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Label/renderLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,mBAAT,QAAoC,YAApC;AAGA;;AAEG;;AACH,OAAO,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAa,KAAb,EAAoB,mBAApB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,IAAN,CAAW,QADd,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;AAAf,GAAf,CAFF,CADF;AAMD,CATM","sourceRoot":""}
@@ -1,8 +1,5 @@
1
1
  import type { ComponentProps, ComponentState, IntrinsicShorthandProps, ObjectShorthandProps } from '@fluentui/react-utilities';
2
2
  import * as React from 'react';
3
- /**
4
- * Label Props
5
- */
6
3
  export declare type LabelCommons = {
7
4
  /**
8
5
  * Renders the label as disabled
@@ -28,6 +25,9 @@ export declare type LabelSlots = {
28
25
  * State used in rendering Label
29
26
  */
30
27
  export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
28
+ /**
29
+ * Label Props
30
+ */
31
31
  export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
32
32
  /**
33
33
  * Displays and indicator that the label is for a required field. The required prop can be set to true to display
@@ -20,7 +20,9 @@ const renderLabel = state => {
20
20
  slots,
21
21
  slotProps
22
22
  } = react_utilities_1.getSlots(state, useLabel_1.labelShorthandProps);
23
- return React.createElement(slots.root, Object.assign({}, slotProps.root), state.root.children, React.createElement(slots.required, Object.assign({}, slotProps.required)));
23
+ return React.createElement(slots.root, { ...slotProps.root
24
+ }, state.root.children, React.createElement(slots.required, { ...slotProps.required
25
+ }));
24
26
  };
25
27
 
26
28
  exports.renderLabel = renderLabel;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Label/renderLabel.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,EAA4B,UAAA,CAAA,mBAA5B,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,IAAN,CAAW,QADd,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAFF,CADF;AAMD,CATM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Label/renderLabel.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,EAA4B,UAAA,CAAA,mBAA5B,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,IAAN,CAAW,QADd,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;AAAf,GAAf,CAFF,CADF;AAMD,CATM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX","sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-label",
3
- "version": "0.0.0-nightlyebf02572f720211207.1",
3
+ "version": "0.0.0-nightlyf8be6a7c6520220106.1",
4
4
  "description": "Label component for FluentUI library.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -26,11 +26,11 @@
26
26
  "type-check": "tsc -b tsconfig.json"
27
27
  },
28
28
  "devDependencies": {
29
- "@fluentui/babel-make-styles": "0.0.0-nightlyebf02572f720211207.1",
29
+ "@fluentui/babel-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
30
30
  "@fluentui/eslint-plugin": "*",
31
- "@fluentui/jest-serializer-make-styles": "0.0.0-nightlyebf02572f720211207.1",
31
+ "@fluentui/jest-serializer-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
32
32
  "@fluentui/react-conformance": "*",
33
- "@fluentui/react-conformance-make-styles": "0.0.0-nightlyebf02572f720211207.1",
33
+ "@fluentui/react-conformance-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
34
34
  "@fluentui/scripts": "^1.0.0",
35
35
  "@types/enzyme": "3.10.3",
36
36
  "@types/enzyme-adapter-react-16": "1.0.3",
@@ -44,8 +44,8 @@
44
44
  "react-test-renderer": "^16.3.0"
45
45
  },
46
46
  "dependencies": {
47
- "@fluentui/react-make-styles": "0.0.0-nightlyebf02572f720211207.1",
48
- "@fluentui/react-utilities": "0.0.0-nightlyebf02572f720211207.1",
47
+ "@fluentui/react-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
48
+ "@fluentui/react-utilities": "0.0.0-nightlyf8be6a7c6520220106.1",
49
49
  "tslib": "^2.1.0"
50
50
  },
51
51
  "peerDependencies": {