@fluentui/react-label 0.0.0-nightly-20220314-0419.1 → 0.0.0-nightly-20220317-0422.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": "Mon, 14 Mar 2022 04:29:20 GMT",
6
- "tag": "@fluentui/react-label_v0.0.0-nightly-20220314-0419.1",
7
- "version": "0.0.0-nightly-20220314-0419.1",
5
+ "date": "Thu, 17 Mar 2022 04:32:33 GMT",
6
+ "tag": "@fluentui/react-label_v0.0.0-nightly-20220317-0422.1",
7
+ "version": "0.0.0-nightly-20220317-0422.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": "seanmonahan@microsoft.com",
18
+ "package": "@fluentui/react-label",
19
+ "commit": "086a675fd0c648944ff4048450190a0a13467de3",
20
+ "comment": "Add static classnames to Label"
21
+ },
22
+ {
23
+ "author": "Humberto.Morimoto@microsoft.com",
24
+ "package": "@fluentui/react-label",
25
+ "commit": "19dbc6a15819f699b3313e2a9b822b8456b2a59c",
26
+ "comment": "Removing star exports."
27
+ },
16
28
  {
17
29
  "author": "beachball",
18
30
  "package": "@fluentui/react-label",
19
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220314-0419.1",
20
- "commit": "beb5c46f1c6605a128e9eecbeb156151afbfaebd"
31
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220317-0422.1",
32
+ "commit": "92725e01f18c7d9e976104f4399e9a42ac564df3"
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-20220314-0419.1",
26
- "commit": "beb5c46f1c6605a128e9eecbeb156151afbfaebd"
37
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220317-0422.1",
38
+ "commit": "92725e01f18c7d9e976104f4399e9a42ac564df3"
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-20220314-0419.1",
32
- "commit": "beb5c46f1c6605a128e9eecbeb156151afbfaebd"
43
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220317-0422.1",
44
+ "commit": "92725e01f18c7d9e976104f4399e9a42ac564df3"
33
45
  }
34
46
  ],
35
47
  "none": [
package/CHANGELOG.md CHANGED
@@ -1,20 +1,22 @@
1
1
  # Change Log - @fluentui/react-label
2
2
 
3
- This log was last generated on Mon, 14 Mar 2022 04:29:20 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 17 Mar 2022 04:32:33 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20220314-0419.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20220314-0419.1)
7
+ ## [0.0.0-nightly-20220317-0422.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20220317-0422.1)
8
8
 
9
- Mon, 14 Mar 2022 04:29:20 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.9..@fluentui/react-label_v0.0.0-nightly-20220314-0419.1)
9
+ Thu, 17 Mar 2022 04:32:33 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.9..@fluentui/react-label_v0.0.0-nightly-20220317-0422.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-20220314-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/beb5c46f1c6605a128e9eecbeb156151afbfaebd) by beachball)
16
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20220314-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/beb5c46f1c6605a128e9eecbeb156151afbfaebd) by beachball)
17
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220314-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/beb5c46f1c6605a128e9eecbeb156151afbfaebd) by beachball)
15
+ - Add static classnames to Label ([PR #21960](https://github.com/microsoft/fluentui/pull/21960) by seanmonahan@microsoft.com)
16
+ - Removing star exports. ([PR #22138](https://github.com/microsoft/fluentui/pull/22138) by Humberto.Morimoto@microsoft.com)
17
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20220317-0422.1 ([commit](https://github.com/microsoft/fluentui/commit/92725e01f18c7d9e976104f4399e9a42ac564df3) by beachball)
18
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20220317-0422.1 ([commit](https://github.com/microsoft/fluentui/commit/92725e01f18c7d9e976104f4399e9a42ac564df3) by beachball)
19
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220317-0422.1 ([commit](https://github.com/microsoft/fluentui/commit/92725e01f18c7d9e976104f4399e9a42ac564df3) by beachball)
18
20
 
19
21
  ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.9)
20
22
 
@@ -3,14 +3,20 @@ import type { ComponentState } from '@fluentui/react-utilities';
3
3
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
4
4
  import * as React_2 from 'react';
5
5
  import type { Slot } from '@fluentui/react-utilities';
6
+ import type { SlotClassNames } from '@fluentui/react-utilities';
6
7
 
7
8
  /**
8
9
  * A label component provides a title or name to a component.
9
10
  */
10
11
  export declare const Label: ForwardRefComponent<LabelProps>;
11
12
 
13
+ /**
14
+ * @deprecated Use `labelClassNames.root` instead.
15
+ */
12
16
  export declare const labelClassName = "fui-Label";
13
17
 
18
+ export declare const labelClassNames: SlotClassNames<LabelSlots>;
19
+
14
20
  declare type LabelCommons = {
15
21
  /**
16
22
  * Renders the label as disabled
@@ -1,5 +1,10 @@
1
- import type { LabelState } from './Label.types';
1
+ import type { LabelSlots, LabelState } from './Label.types';
2
+ import type { SlotClassNames } from '@fluentui/react-utilities';
3
+ /**
4
+ * @deprecated Use `labelClassNames.root` instead.
5
+ */
2
6
  export declare const labelClassName = "fui-Label";
7
+ export declare const labelClassNames: SlotClassNames<LabelSlots>;
3
8
  /**
4
9
  * Apply styling to the Label slots based on the state
5
10
  */
@@ -1,6 +1,14 @@
1
1
  import { __styles, mergeClasses } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
+ /**
4
+ * @deprecated Use `labelClassNames.root` instead.
5
+ */
6
+
3
7
  export const labelClassName = 'fui-Label';
8
+ export const labelClassNames = {
9
+ root: 'fui-Label',
10
+ required: 'fui-Label__required'
11
+ };
4
12
  /**
5
13
  * Styles for the label
6
14
  */
@@ -43,10 +51,10 @@ const useStyles = /*#__PURE__*/__styles({
43
51
 
44
52
  export const useLabelStyles_unstable = state => {
45
53
  const styles = useStyles();
46
- state.root.className = mergeClasses(labelClassName, styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);
54
+ state.root.className = mergeClasses(labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);
47
55
 
48
56
  if (state.required) {
49
- state.required.className = mergeClasses(styles.required, state.required.className);
57
+ state.required.className = mergeClasses(labelClassNames.required, styles.required, state.required.className);
50
58
  }
51
59
 
52
60
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/useLabelStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,cAAc,GAAG,WAAvB;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAoCA;;AAEG;;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAkC;AACvE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,cADiC,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAHQ,EAIjC,MAAM,CAAC,KAAK,CAAC,IAAP,CAJ2B,EAKjC,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MALU,EAMjC,KAAK,CAAC,IAAN,CAAW,SANsB,CAAnC;;AASA,MAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,IAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,YAAY,CAAC,MAAM,CAAC,QAAR,EAAkB,KAAK,CAAC,QAAN,CAAe,SAAjC,CAAvC;AACD;;AAED,SAAO,KAAP;AACD,CAhBM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LabelState } from './Label.types';\n\nexport const labelClassName = 'fui-Label';\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1,\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: '4px', // TODO: Once spacing tokens are added, change this to Horizontal XS\n },\n\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n\n strong: {\n fontWeight: tokens.fontWeightSemibold,\n },\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = (state: LabelState): LabelState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n labelClassName,\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.strong && styles.strong,\n state.root.className,\n );\n\n if (state.required) {\n state.required.className = mergeClasses(styles.required, state.required.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Label/useLabelStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,GAAG,WAAvB;AACP,OAAO,MAAM,eAAe,GAA+B;AACzD,EAAA,IAAI,EAAE,WADmD;AAEzD,EAAA,QAAQ,EAAE;AAF+C,CAApD;AAKP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAoCA;;AAEG;;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAkC;AACvE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,eAAe,CAAC,IADiB,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAHQ,EAIjC,MAAM,CAAC,KAAK,CAAC,IAAP,CAJ2B,EAKjC,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MALU,EAMjC,KAAK,CAAC,IAAN,CAAW,SANsB,CAAnC;;AASA,MAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,IAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,YAAY,CAAC,eAAe,CAAC,QAAjB,EAA2B,MAAM,CAAC,QAAlC,EAA4C,KAAK,CAAC,QAAN,CAAe,SAA3D,CAAvC;AACD;;AAED,SAAO,KAAP;AACD,CAhBM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LabelSlots, LabelState } from './Label.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\n/**\n * @deprecated Use `labelClassNames.root` instead.\n */\nexport const labelClassName = 'fui-Label';\nexport const labelClassNames: SlotClassNames<LabelSlots> = {\n root: 'fui-Label',\n required: 'fui-Label__required',\n};\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1,\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: '4px', // TODO: Once spacing tokens are added, change this to Horizontal XS\n },\n\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n\n strong: {\n fontWeight: tokens.fontWeightSemibold,\n },\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = (state: LabelState): LabelState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n labelClassNames.root,\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.strong && styles.strong,\n state.root.className,\n );\n\n if (state.required) {\n state.required.className = mergeClasses(labelClassNames.required, styles.required, state.required.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export {};
2
- export * from './Label';
1
+ export { Label, labelClassName, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable, } from './Label';
2
+ export type { LabelProps, LabelSlots, LabelState } from './Label';
package/lib/index.js CHANGED
@@ -1,2 +1,3 @@
1
- export * from './Label';
1
+ export { Label, // eslint-disable-next-line deprecation/deprecation
2
+ labelClassName, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';
2
3
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC","sourcesContent":["// TODO: replace with real exports\nexport {};\nexport * from './Label';\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,SACE,KADF,EAEE;AACA,cAHF,EAIE,eAJF,EAKE,oBALF,EAME,uBANF,EAOE,iBAPF,QAQO,SARP","sourcesContent":["export {\n Label,\n // eslint-disable-next-line deprecation/deprecation\n labelClassName,\n labelClassNames,\n renderLabel_unstable,\n useLabelStyles_unstable,\n useLabel_unstable,\n} from './Label';\nexport type { LabelProps, LabelSlots, LabelState } from './Label';\n"],"sourceRoot":"../src/"}
@@ -1,5 +1,10 @@
1
- import type { LabelState } from './Label.types';
1
+ import type { LabelSlots, LabelState } from './Label.types';
2
+ import type { SlotClassNames } from '@fluentui/react-utilities';
3
+ /**
4
+ * @deprecated Use `labelClassNames.root` instead.
5
+ */
2
6
  export declare const labelClassName = "fui-Label";
7
+ export declare const labelClassNames: SlotClassNames<LabelSlots>;
3
8
  /**
4
9
  * Apply styling to the Label slots based on the state
5
10
  */
@@ -3,13 +3,21 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useLabelStyles_unstable = exports.labelClassName = void 0;
6
+ exports.useLabelStyles_unstable = exports.labelClassNames = exports.labelClassName = void 0;
7
7
 
8
8
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
10
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
+ /**
12
+ * @deprecated Use `labelClassNames.root` instead.
13
+ */
14
+
11
15
 
12
16
  exports.labelClassName = 'fui-Label';
17
+ exports.labelClassNames = {
18
+ root: 'fui-Label',
19
+ required: 'fui-Label__required'
20
+ };
13
21
  /**
14
22
  * Styles for the label
15
23
  */
@@ -52,10 +60,10 @@ const useStyles = /*#__PURE__*/react_1.__styles({
52
60
 
53
61
  const useLabelStyles_unstable = state => {
54
62
  const styles = useStyles();
55
- state.root.className = react_1.mergeClasses(exports.labelClassName, styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);
63
+ state.root.className = react_1.mergeClasses(exports.labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);
56
64
 
57
65
  if (state.required) {
58
- state.required.className = react_1.mergeClasses(styles.required, state.required.className);
66
+ state.required.className = react_1.mergeClasses(exports.labelClassNames.required, styles.required, state.required.className);
59
67
  }
60
68
 
61
69
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/useLabelStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,cAAA,GAAiB,WAAjB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAoCA;;AAEG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAAkC;AACvE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,cADqB,EAErB,MAAM,CAAC,IAFc,EAGrB,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAHJ,EAIrB,MAAM,CAAC,KAAK,CAAC,IAAP,CAJe,EAKrB,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MALF,EAMrB,KAAK,CAAC,IAAN,CAAW,SANU,CAAvB;;AASA,MAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,IAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,OAAA,CAAA,YAAA,CAAa,MAAM,CAAC,QAApB,EAA8B,KAAK,CAAC,QAAN,CAAe,SAA7C,CAA3B;AACD;;AAED,SAAO,KAAP;AACD,CAhBM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LabelState } from './Label.types';\n\nexport const labelClassName = 'fui-Label';\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1,\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: '4px', // TODO: Once spacing tokens are added, change this to Horizontal XS\n },\n\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n\n strong: {\n fontWeight: tokens.fontWeightSemibold,\n },\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = (state: LabelState): LabelState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n labelClassName,\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.strong && styles.strong,\n state.root.className,\n );\n\n if (state.required) {\n state.required.className = mergeClasses(styles.required, state.required.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Label/useLabelStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,cAAA,GAAiB,WAAjB;AACA,OAAA,CAAA,eAAA,GAA8C;AACzD,EAAA,IAAI,EAAE,WADmD;AAEzD,EAAA,QAAQ,EAAE;AAF+C,CAA9C;AAKb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAoCA;;AAEG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAAkC;AACvE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,eAAA,CAAgB,IADK,EAErB,MAAM,CAAC,IAFc,EAGrB,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAHJ,EAIrB,MAAM,CAAC,KAAK,CAAC,IAAP,CAJe,EAKrB,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MALF,EAMrB,KAAK,CAAC,IAAN,CAAW,SANU,CAAvB;;AASA,MAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,IAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,eAAA,CAAgB,QAA7B,EAAuC,MAAM,CAAC,QAA9C,EAAwD,KAAK,CAAC,QAAN,CAAe,SAAvE,CAA3B;AACD;;AAED,SAAO,KAAP;AACD,CAhBM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LabelSlots, LabelState } from './Label.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\n/**\n * @deprecated Use `labelClassNames.root` instead.\n */\nexport const labelClassName = 'fui-Label';\nexport const labelClassNames: SlotClassNames<LabelSlots> = {\n root: 'fui-Label',\n required: 'fui-Label__required',\n};\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1,\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: '4px', // TODO: Once spacing tokens are added, change this to Horizontal XS\n },\n\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n\n strong: {\n fontWeight: tokens.fontWeightSemibold,\n },\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = (state: LabelState): LabelState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n labelClassNames.root,\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.strong && styles.strong,\n state.root.className,\n );\n\n if (state.required) {\n state.required.className = mergeClasses(labelClassNames.required, styles.required, state.required.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,2 +1,2 @@
1
- export {};
2
- export * from './Label';
1
+ export { Label, labelClassName, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable, } from './Label';
2
+ export type { LabelProps, LabelSlots, LabelState } from './Label';
@@ -3,8 +3,45 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.useLabel_unstable = exports.useLabelStyles_unstable = exports.renderLabel_unstable = exports.labelClassNames = exports.labelClassName = exports.Label = void 0;
6
7
 
7
- const tslib_1 = /*#__PURE__*/require("tslib");
8
+ var Label_1 = /*#__PURE__*/require("./Label");
8
9
 
9
- tslib_1.__exportStar(require("./Label"), exports);
10
+ Object.defineProperty(exports, "Label", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return Label_1.Label;
14
+ }
15
+ }); // eslint-disable-next-line deprecation/deprecation
16
+
17
+ Object.defineProperty(exports, "labelClassName", {
18
+ enumerable: true,
19
+ get: function () {
20
+ return Label_1.labelClassName;
21
+ }
22
+ });
23
+ Object.defineProperty(exports, "labelClassNames", {
24
+ enumerable: true,
25
+ get: function () {
26
+ return Label_1.labelClassNames;
27
+ }
28
+ });
29
+ Object.defineProperty(exports, "renderLabel_unstable", {
30
+ enumerable: true,
31
+ get: function () {
32
+ return Label_1.renderLabel_unstable;
33
+ }
34
+ });
35
+ Object.defineProperty(exports, "useLabelStyles_unstable", {
36
+ enumerable: true,
37
+ get: function () {
38
+ return Label_1.useLabelStyles_unstable;
39
+ }
40
+ });
41
+ Object.defineProperty(exports, "useLabel_unstable", {
42
+ enumerable: true,
43
+ get: function () {
44
+ return Label_1.useLabel_unstable;
45
+ }
46
+ });
10
47
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAEA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA","sourcesContent":["// TODO: replace with real exports\nexport {};\nexport * from './Label';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,OAAA,gBAAA,OAAA,CAAA,SAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,OAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,OAAA,CAAA,KAAA;AAAK;AAAL,CAAA,E,CACA;;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,OAAA,CAAA,cAAA;AAAc;AAAd,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,OAAA,CAAA,eAAA;AAAe;AAAf,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,sBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,OAAA,CAAA,oBAAA;AAAoB;AAApB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,OAAA,CAAA,uBAAA;AAAuB;AAAvB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,mBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,OAAA,CAAA,iBAAA;AAAiB;AAAjB,CAAA","sourcesContent":["export {\n Label,\n // eslint-disable-next-line deprecation/deprecation\n labelClassName,\n labelClassNames,\n renderLabel_unstable,\n useLabelStyles_unstable,\n useLabel_unstable,\n} from './Label';\nexport type { LabelProps, LabelSlots, LabelState } from './Label';\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-label",
3
- "version": "0.0.0-nightly-20220314-0419.1",
3
+ "version": "0.0.0-nightly-20220317-0422.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-20220314-0419.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220317-0422.1",
32
32
  "@fluentui/scripts": "^1.0.0"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-theme": "0.0.0-nightly-20220314-0419.1",
36
- "@fluentui/react-utilities": "0.0.0-nightly-20220314-0419.1",
35
+ "@fluentui/react-theme": "0.0.0-nightly-20220317-0422.1",
36
+ "@fluentui/react-utilities": "0.0.0-nightly-20220317-0422.1",
37
37
  "@griffel/react": "1.0.0",
38
38
  "tslib": "^2.1.0"
39
39
  },