@fluentui/react-label 9.0.0-alpha.42 → 9.0.0-alpha.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/CHANGELOG.json +171 -7
  2. package/CHANGELOG.md +59 -7
  3. package/dist/react-label.d.ts +26 -41
  4. package/lib/Label.js.map +1 -1
  5. package/lib/common/isConformant.js.map +1 -1
  6. package/lib/components/Label/Label.d.ts +2 -5
  7. package/lib/components/Label/Label.js.map +1 -1
  8. package/lib/components/Label/Label.types.d.ts +15 -26
  9. package/lib/components/Label/Label.types.js.map +1 -1
  10. package/lib/components/Label/index.js.map +1 -1
  11. package/lib/components/Label/renderLabel.js +3 -3
  12. package/lib/components/Label/renderLabel.js.map +1 -1
  13. package/lib/components/Label/useLabel.d.ts +3 -4
  14. package/lib/components/Label/useLabel.js +28 -40
  15. package/lib/components/Label/useLabel.js.map +1 -1
  16. package/lib/components/Label/useLabelStyles.js +1 -1
  17. package/lib/components/Label/useLabelStyles.js.map +1 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib-commonjs/Label.js.map +1 -1
  20. package/lib-commonjs/common/isConformant.js.map +1 -1
  21. package/lib-commonjs/components/Label/Label.d.ts +2 -5
  22. package/lib-commonjs/components/Label/Label.js.map +1 -1
  23. package/lib-commonjs/components/Label/Label.types.d.ts +15 -26
  24. package/lib-commonjs/components/Label/Label.types.js.map +1 -1
  25. package/lib-commonjs/components/Label/index.js.map +1 -1
  26. package/lib-commonjs/components/Label/renderLabel.js +2 -2
  27. package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
  28. package/lib-commonjs/components/Label/useLabel.d.ts +3 -4
  29. package/lib-commonjs/components/Label/useLabel.js +30 -41
  30. package/lib-commonjs/components/Label/useLabel.js.map +1 -1
  31. package/lib-commonjs/components/Label/useLabelStyles.js +1 -1
  32. package/lib-commonjs/components/Label/useLabelStyles.js.map +1 -1
  33. package/lib-commonjs/index.js.map +1 -1
  34. package/package.json +6 -6
  35. package/lib-amd/Label.d.ts +0 -1
  36. package/lib-amd/Label.js +0 -6
  37. package/lib-amd/Label.js.map +0 -1
  38. package/lib-amd/common/isConformant.d.ts +0 -4
  39. package/lib-amd/common/isConformant.js +0 -15
  40. package/lib-amd/common/isConformant.js.map +0 -1
  41. package/lib-amd/components/Label/Label.d.ts +0 -10
  42. package/lib-amd/components/Label/Label.js +0 -15
  43. package/lib-amd/components/Label/Label.js.map +0 -1
  44. package/lib-amd/components/Label/Label.types.d.ts +0 -49
  45. package/lib-amd/components/Label/Label.types.js +0 -5
  46. package/lib-amd/components/Label/Label.types.js.map +0 -1
  47. package/lib-amd/components/Label/index.d.ts +0 -5
  48. package/lib-amd/components/Label/index.js +0 -10
  49. package/lib-amd/components/Label/index.js.map +0 -1
  50. package/lib-amd/components/Label/renderLabel.d.ts +0 -5
  51. package/lib-amd/components/Label/renderLabel.js +0 -16
  52. package/lib-amd/components/Label/renderLabel.js.map +0 -1
  53. package/lib-amd/components/Label/useLabel.d.ts +0 -18
  54. package/lib-amd/components/Label/useLabel.js +0 -53
  55. package/lib-amd/components/Label/useLabel.js.map +0 -1
  56. package/lib-amd/components/Label/useLabelStyles.d.ts +0 -5
  57. package/lib-amd/components/Label/useLabelStyles.js +0 -50
  58. package/lib-amd/components/Label/useLabelStyles.js.map +0 -1
  59. package/lib-amd/index.d.ts +0 -2
  60. package/lib-amd/index.js +0 -6
  61. package/lib-amd/index.js.map +0 -1
@@ -1,14 +1,12 @@
1
1
  import { __assign } from "tslib";
2
- import { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps } from '@fluentui/react-utilities';
3
+ import { resolveShorthand } from '@fluentui/react-utilities';
3
4
  /**
4
5
  * Array of all shorthand properties listed in LabelShorthandProps
5
6
  * {@docCatergory Label}
6
7
  */
7
8
 
8
- export var labelShorthandProps = ['required'];
9
- var mergeProps = /*#__PURE__*/makeMergeProps({
10
- deepMerge: labelShorthandProps
11
- });
9
+ export var labelShorthandProps = ['root', 'required'];
12
10
  /**
13
11
  * Create the state required to render Label.
14
12
  *
@@ -17,44 +15,34 @@ var mergeProps = /*#__PURE__*/makeMergeProps({
17
15
  *
18
16
  * @param props - props from this instance of Label
19
17
  * @param ref - reference to root HTMLElement of Label
20
- * @param defaultProps - (optional) default prop values provided by the implementing type
21
18
  */
22
19
 
23
- export var useLabel = function (props, ref, defaultProps) {
24
- var state = mergeProps({
25
- ref: ref,
26
- as: 'label',
27
- size: 'medium',
28
- required: {
29
- as: 'span'
30
- }
31
- }, defaultProps && resolveLabelShorthandProps(defaultProps), resolveLabelShorthandProps(props));
32
- return state;
33
- };
34
- /**
35
- * Label will first need to check if required is a boolean or shorthandprops,
36
- * this allows for the required prop to handle both the default asterisk for required
37
- * or a custom required text.
38
- */
39
-
40
- var resolveLabelShorthandProps = function (props) {
41
- var propsNormalized;
42
-
43
- if (props.required === true) {
44
- propsNormalized = __assign(__assign({}, props), {
45
- required: {
20
+ export var useLabel = function (props, ref) {
21
+ var _a = props.disabled,
22
+ disabled = _a === void 0 ? false : _a,
23
+ _b = props.required,
24
+ required = _b === void 0 ? false : _b,
25
+ _c = props.strong,
26
+ strong = _c === void 0 ? false : _c,
27
+ _d = props.size,
28
+ size = _d === void 0 ? 'medium' : _d;
29
+ return {
30
+ disabled: disabled,
31
+ required: resolveShorthand(required === false ? null : required, {
32
+ required: !!required,
33
+ defaultProps: {
46
34
  children: '*'
47
35
  }
48
- });
49
- } else if (props.required === false) {
50
- propsNormalized = __assign(__assign({}, props), {
51
- required: undefined
52
- });
53
- } else {
54
- // TypeScript needs a nudge to figure out that props.required won't be a boolean here
55
- propsNormalized = props;
56
- }
57
-
58
- return resolveShorthandProps(propsNormalized, labelShorthandProps);
36
+ }),
37
+ strong: strong,
38
+ size: size,
39
+ components: {
40
+ root: 'label',
41
+ required: 'span'
42
+ },
43
+ root: getNativeElementProps('label', __assign({
44
+ ref: ref
45
+ }, props))
46
+ };
59
47
  };
60
48
  //# sourceMappingURL=useLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/useLabel.tsx"],"names":[],"mappings":";AACA,SAAS,cAAT,EAAyB,qBAAzB,QAAsD,2BAAtD;AAGA;;;AAGG;;AACH,OAAO,IAAM,mBAAmB,GAA0B,CAAC,UAAD,CAAnD;AAEP,IAAM,UAAU,gBAAG,cAAc,CAAa;AAAE,EAAA,SAAS,EAAE;AAAb,CAAb,CAAjC;AAEA;;;;;;;;;AASG;;AACH,OAAO,IAAM,QAAQ,GAAG,UAAC,KAAD,EAAoB,GAApB,EAAiD,YAAjD,EAA0E;AAChG,MAAM,KAAK,GAAG,UAAU,CACtB;AACE,IAAA,GAAG,EAAA,GADL;AAEE,IAAA,EAAE,EAAE,OAFN;AAGE,IAAA,IAAI,EAAE,QAHR;AAIE,IAAA,QAAQ,EAAE;AACR,MAAA,EAAE,EAAE;AADI;AAJZ,GADsB,EAStB,YAAY,IAAI,0BAA0B,CAAC,YAAD,CATpB,EAUtB,0BAA0B,CAAC,KAAD,CAVJ,CAAxB;AAaA,SAAO,KAAP;AACD,CAfM;AAiBP;;;;AAIG;;AACH,IAAM,0BAA0B,GAAG,UAAC,KAAD,EAAkB;AACnD,MAAI,eAAJ;;AACA,MAAI,KAAK,CAAC,QAAN,KAAmB,IAAvB,EAA6B;AAC3B,IAAA,eAAe,GAAA,QAAA,CAAA,QAAA,CAAA,EAAA,EAAQ,KAAR,CAAA,EAAa;AAAE,MAAA,QAAQ,EAAE;AAAE,QAAA,QAAQ,EAAE;AAAZ;AAAZ,KAAb,CAAf;AACD,GAFD,MAEO,IAAI,KAAK,CAAC,QAAN,KAAmB,KAAvB,EAA8B;AACnC,IAAA,eAAe,GAAA,QAAA,CAAA,QAAA,CAAA,EAAA,EAAQ,KAAR,CAAA,EAAa;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAb,CAAf;AACD,GAFM,MAEA;AACL;AACA,IAAA,eAAe,GAAG,KAAlB;AACD;;AAED,SAAO,qBAAqB,CAAC,eAAD,EAAkB,mBAAlB,CAA5B;AACD,CAZD","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';\nimport type { LabelProps, LabelShorthandProps, LabelState } from './Label.types';\n\n/**\n * Array of all shorthand properties listed in LabelShorthandProps\n * {@docCatergory Label}\n */\nexport const labelShorthandProps: LabelShorthandProps[] = ['required'];\n\nconst mergeProps = makeMergeProps<LabelState>({ deepMerge: labelShorthandProps });\n\n/**\n * Create the state required to render Label.\n *\n * The returned state can be modified with hooks such as useLabelStyles,\n * before being passed to renderLabel.\n *\n * @param props - props from this instance of Label\n * @param ref - reference to root HTMLElement of Label\n * @param defaultProps - (optional) default prop values provided by the implementing type\n */\nexport const useLabel = (props: LabelProps, ref: React.Ref<HTMLElement>, defaultProps?: LabelProps): LabelState => {\n const state = mergeProps(\n {\n ref,\n as: 'label',\n size: 'medium',\n required: {\n as: 'span',\n },\n },\n defaultProps && resolveLabelShorthandProps(defaultProps),\n resolveLabelShorthandProps(props),\n );\n\n return state;\n};\n\n/**\n * Label will first need to check if required is a boolean or shorthandprops,\n * this allows for the required prop to handle both the default asterisk for required\n * or a custom required text.\n */\nconst resolveLabelShorthandProps = (props: LabelProps) => {\n let propsNormalized;\n if (props.required === true) {\n propsNormalized = { ...props, required: { children: '*' } };\n } else if (props.required === false) {\n propsNormalized = { ...props, required: undefined };\n } else {\n // TypeScript needs a nudge to figure out that props.required won't be a boolean here\n propsNormalized = props as LabelProps & { required?: Exclude<LabelProps['required'], boolean> };\n }\n\n return resolveShorthandProps(propsNormalized, labelShorthandProps);\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Label/useLabel.tsx"],"names":[],"mappings":";AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,gBAAT,QAAiC,2BAAjC;AAEA;;;AAGG;;AACH,OAAO,IAAM,mBAAmB,GAA4B,CAAC,MAAD,EAAS,UAAT,CAArD;AAEP;;;;;;;;AAQG;;AACH,OAAO,IAAM,QAAQ,GAAG,UAAC,KAAD,EAAoB,GAApB,EAA+C;AAC7D,MAAA,EAAA,GAAwE,KAAK,CAA7D,QAAhB;AAAA,MAAA,QAAQ,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAAhB;AAAA,MAAkB,EAAA,GAAsD,KAAK,CAA3C,QAAlC;AAAA,MAAkB,QAAQ,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAAlC;AAAA,MAAoC,EAAA,GAAoC,KAAK,CAA3B,MAAlD;AAAA,MAAoC,MAAM,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAAlD;AAAA,MAAoD,EAAA,GAAoB,KAAK,CAAV,IAAnE;AAAA,MAAoD,IAAI,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EAAnE;AACR,SAAO;AACL,IAAA,QAAQ,EAAA,QADH;AAEL,IAAA,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,KAAK,KAAb,GAAqB,IAArB,GAA4B,QAA7B,EAAuC;AAC/D,MAAA,QAAQ,EAAE,CAAC,CAAC,QADmD;AAE/D,MAAA,YAAY,EAAE;AAAE,QAAA,QAAQ,EAAE;AAAZ;AAFiD,KAAvC,CAFrB;AAML,IAAA,MAAM,EAAA,MAND;AAOL,IAAA,IAAI,EAAA,IAPC;AAQL,IAAA,UAAU,EAAE;AAAE,MAAA,IAAI,EAAE,OAAR;AAAiB,MAAA,QAAQ,EAAE;AAA3B,KARP;AASL,IAAA,IAAI,EAAE,qBAAqB,CAAC,OAAD,EAAQ,QAAA,CAAA;AAAI,MAAA,GAAG,EAAA;AAAP,KAAA,EAAY,KAAZ,CAAR;AATtB,GAAP;AAWD,CAbM","sourceRoot":""}
@@ -41,7 +41,7 @@ var useStyles = /*#__PURE__*/__styles({
41
41
 
42
42
  export var useLabelStyles = function (state) {
43
43
  var styles = useStyles();
44
- state.className = mergeClasses(styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.className);
44
+ state.root.className = mergeClasses(styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);
45
45
 
46
46
  if (state.required) {
47
47
  state.required.className = mergeClasses(styles.required, state.required.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/useLabelStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AAGA;;AAEG;;AACH,IAAM,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,IAAM,cAAc,GAAG,UAAC,KAAD,EAAkB;AAC9C,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,SAAN,GAAkB,YAAY,CAC5B,MAAM,CAAC,IADqB,EAE5B,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAFG,EAG5B,MAAM,CAAC,KAAK,CAAC,IAAP,CAHsB,EAI5B,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MAJK,EAK5B,KAAK,CAAC,SALsB,CAA9B;;AAQA,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,CAfM","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport type { LabelState } from './Label.types';\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: theme => ({\n fontFamily: theme.global.type.fontFamilies.base,\n color: theme.alias.color.neutral.neutralForeground1,\n }),\n\n disabled: theme => ({\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n }),\n\n required: theme => ({\n color: theme.alias.color.red.foreground3,\n paddingLeft: '4px', // TODO: Once spacing tokens are added, change this to Horizontal XS\n }),\n\n small: theme => ({\n fontSize: theme.global.type.fontSizes.base[200],\n lineHeight: theme.global.type.lineHeights.base[200],\n }),\n\n medium: theme => ({\n fontSize: theme.global.type.fontSizes.base[300],\n lineHeight: theme.global.type.lineHeights.base[300],\n }),\n\n large: theme => ({\n fontSize: theme.global.type.fontSizes.base[400],\n lineHeight: theme.global.type.lineHeights.base[400],\n fontWeight: theme.global.type.fontWeights.semibold,\n }),\n\n strong: theme => ({\n fontWeight: theme.global.type.fontWeights.semibold,\n }),\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles = (state: LabelState): LabelState => {\n const styles = useStyles();\n state.className = mergeClasses(\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.strong && styles.strong,\n state.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":["../../../src/components/Label/useLabelStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AAGA;;AAEG;;AACH,IAAM,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,IAAM,cAAc,GAAG,UAAC,KAAD,EAAkB;AAC9C,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,MAAM,CAAC,IAD0B,EAEjC,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAFQ,EAGjC,MAAM,CAAC,KAAK,CAAC,IAAP,CAH2B,EAIjC,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MAJU,EAKjC,KAAK,CAAC,IAAN,CAAW,SALsB,CAAnC;;AAQA,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,CAfM","sourceRoot":""}
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,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Label.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Label/index';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../src/Label.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,IAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAEA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,UAAU,EAAE,+BAAA,CAAA;AAH+C,GAA7D;AAMA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAVD,OAAA,CAAA,YAAA,GAAA,YAAA","sourcesContent":["import { isConformant as baseIsConformant } from '@fluentui/react-conformance';\nimport type { IsConformantOptions, TestObject } from '@fluentui/react-conformance';\nimport makeStylesTests from '@fluentui/react-conformance-make-styles';\n\nexport function isConformant<TProps = {}>(\n testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },\n) {\n const defaultOptions: Partial<IsConformantOptions<TProps>> = {\n asPropHandlesRef: true,\n componentPath: module!.parent!.filename.replace('.test', ''),\n extraTests: makeStylesTests as TestObject<TProps>,\n };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,IAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAEA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,UAAU,EAAE,+BAAA,CAAA;AAH+C,GAA7D;AAMA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAVD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
@@ -2,9 +2,6 @@ import * as React from 'react';
2
2
  /**
3
3
  * A label component provides a title or name to a component.
4
4
  */
5
- export declare const Label: React.ForwardRefExoticComponent<import("@fluentui/react-utilities").ComponentPropsCompat & React.LabelHTMLAttributes<HTMLLabelElement> & {
6
- disabled?: boolean | undefined;
7
- required?: string | number | boolean | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ObjectShorthandPropsCompat<import("@fluentui/react-utilities").ComponentPropsCompat> | null | undefined;
8
- size?: "small" | "medium" | "large" | undefined;
9
- strong?: boolean | undefined;
5
+ export declare const Label: React.ForwardRefExoticComponent<Pick<import("@fluentui/react-utilities").ComponentProps<import("./Label.types").LabelSlots, "root">, "form" | "slot" | "style" | "title" | "key" | "htmlFor" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as"> & Partial<import("./Label.types").LabelCommons> & {
6
+ required?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ObjectShorthandProps<React.HTMLAttributes<HTMLElement>> | null | undefined;
10
7
  } & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/Label.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAQ,KAAK,CAAC,UAAN,CAA0C,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxE,MAAM,KAAK,GAAG,UAAA,CAAA,QAAA,CAAS,KAAT,EAAgB,GAAhB,CAAd;AAEA,EAAA,gBAAA,CAAA,cAAA,CAAe,KAAf;AACA,SAAO,aAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CALoB,CAAR;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useLabel } from './useLabel';\nimport { renderLabel } from './renderLabel';\nimport { useLabelStyles } from './useLabelStyles';\nimport type { LabelProps } from './Label.types';\n\n/**\n * A label component provides a title or name to a component.\n */\nexport const Label = React.forwardRef<HTMLElement, LabelProps>((props, ref) => {\n const state = useLabel(props, ref);\n\n useLabelStyles(state);\n return renderLabel(state);\n});\n\nLabel.displayName = 'Label';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAQ,KAAK,CAAC,UAAN,CAA0C,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxE,MAAM,KAAK,GAAG,UAAA,CAAA,QAAA,CAAS,KAAT,EAAgB,GAAhB,CAAd;AAEA,EAAA,gBAAA,CAAA,cAAA,CAAe,KAAf;AACA,SAAO,aAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CALoB,CAAR;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourceRoot":""}
@@ -1,49 +1,38 @@
1
+ import type { ComponentProps, ComponentState, IntrinsicShorthandProps, ObjectShorthandProps } from '@fluentui/react-utilities';
1
2
  import * as React from 'react';
2
- import type { ComponentPropsCompat, ComponentStateCompat, ObjectShorthandPropsCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Label Props
5
5
  */
6
- export declare type LabelProps = ComponentPropsCompat & React.LabelHTMLAttributes<HTMLLabelElement> & {
6
+ export declare type LabelCommons = {
7
7
  /**
8
8
  * Renders the label as disabled
9
9
  * @defaultvalue false
10
10
  */
11
- disabled?: boolean;
12
- /**
13
- * Displays and indicator that the label is for a required field. The required prop can be set to true to display
14
- * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
15
- * @defaultvalue false
16
- */
17
- required?: boolean | ShorthandPropsCompat<ComponentPropsCompat>;
11
+ disabled: boolean;
18
12
  /**
19
13
  * A label supports different sizes.
20
14
  * @defaultvalue 'medium'
21
15
  */
22
- size?: 'small' | 'medium' | 'large';
16
+ size: 'small' | 'medium' | 'large';
23
17
  /**
24
18
  * A label supports semibold/strong fontweight.
25
19
  * @defaultvalue false
26
20
  */
27
- strong?: boolean;
21
+ strong: boolean;
22
+ };
23
+ export declare type LabelSlots = {
24
+ root: IntrinsicShorthandProps<'label'>;
25
+ required?: IntrinsicShorthandProps<'span'>;
28
26
  };
29
- /**
30
- * Names of the shorthand properties in LabelProps
31
- */
32
- export declare type LabelShorthandProps = 'required';
33
- /**
34
- * Names of LabelProps that have a default value in useLabel
35
- */
36
- export declare type LabelDefaultedProps = 'size';
37
27
  /**
38
28
  * State used in rendering Label
39
29
  */
40
- export declare type LabelState = ComponentStateCompat<LabelProps, LabelShorthandProps, LabelDefaultedProps> & {
41
- /**
42
- * Ref to the root element
43
- */
44
- ref: React.Ref<HTMLElement>;
30
+ export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
31
+ export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
45
32
  /**
46
- * The required prop resolved to a slot object
33
+ * Displays and indicator that the label is for a required field. The required prop can be set to true to display
34
+ * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
35
+ * @defaultvalue false
47
36
  */
48
- required?: ObjectShorthandPropsCompat<ComponentPropsCompat>;
37
+ required?: boolean | ObjectShorthandProps<React.HTMLAttributes<HTMLElement>> | React.ReactNode;
49
38
  };
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -18,11 +18,11 @@ var useLabel_1 = /*#__PURE__*/require("./useLabel");
18
18
 
19
19
 
20
20
  var renderLabel = function (state) {
21
- var _a = react_utilities_1.getSlotsCompat(state, useLabel_1.labelShorthandProps),
21
+ var _a = react_utilities_1.getSlots(state, useLabel_1.labelShorthandProps),
22
22
  slots = _a.slots,
23
23
  slotProps = _a.slotProps;
24
24
 
25
- return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), state.children, state.required && React.createElement(slots.required, tslib_1.__assign({}, slotProps.required)));
25
+ return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), state.root.children, React.createElement(slots.required, tslib_1.__assign({}, slotProps.required)));
26
26
  };
27
27
 
28
28
  exports.renderLabel = renderLabel;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/renderLabel.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,iBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,UAAA,CAAA,mBAAtB,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,QADT,EAEG,KAAK,CAAC,QAAN,IAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAFrB,CADF;AAMD,CATM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { labelShorthandProps } from './useLabel';\nimport type { LabelState } from './Label.types';\n\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel = (state: LabelState) => {\n const { slots, slotProps } = getSlotsCompat(state, labelShorthandProps);\n\n return (\n <slots.root {...slotProps.root}>\n {state.children}\n {state.required && <slots.required {...slotProps.required} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Label/renderLabel.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,EAA4B,UAAA,CAAA,mBAA5B,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,IAAN,CAAW,QADd,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAFF,CADF;AAMD,CATM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX","sourceRoot":""}
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
- import type { LabelProps, LabelShorthandProps, LabelState } from './Label.types';
2
+ import type { LabelProps, LabelSlots, LabelState } from './Label.types';
3
3
  /**
4
4
  * Array of all shorthand properties listed in LabelShorthandProps
5
5
  * {@docCatergory Label}
6
6
  */
7
- export declare const labelShorthandProps: LabelShorthandProps[];
7
+ export declare const labelShorthandProps: Array<keyof LabelSlots>;
8
8
  /**
9
9
  * Create the state required to render Label.
10
10
  *
@@ -13,6 +13,5 @@ export declare const labelShorthandProps: LabelShorthandProps[];
13
13
  *
14
14
  * @param props - props from this instance of Label
15
15
  * @param ref - reference to root HTMLElement of Label
16
- * @param defaultProps - (optional) default prop values provided by the implementing type
17
16
  */
18
- export declare const useLabel: (props: LabelProps, ref: React.Ref<HTMLElement>, defaultProps?: LabelProps | undefined) => LabelState;
17
+ export declare const useLabel: (props: LabelProps, ref: React.Ref<HTMLElement>) => LabelState;
@@ -8,16 +8,15 @@ exports.useLabel = exports.labelShorthandProps = void 0;
8
8
  var tslib_1 = /*#__PURE__*/require("tslib");
9
9
 
10
10
  var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+
12
+ var react_utilities_2 = /*#__PURE__*/require("@fluentui/react-utilities");
11
13
  /**
12
14
  * Array of all shorthand properties listed in LabelShorthandProps
13
15
  * {@docCatergory Label}
14
16
  */
15
17
 
16
18
 
17
- exports.labelShorthandProps = ['required'];
18
- var mergeProps = /*#__PURE__*/react_utilities_1.makeMergeProps({
19
- deepMerge: exports.labelShorthandProps
20
- });
19
+ exports.labelShorthandProps = ['root', 'required'];
21
20
  /**
22
21
  * Create the state required to render Label.
23
22
  *
@@ -26,46 +25,36 @@ var mergeProps = /*#__PURE__*/react_utilities_1.makeMergeProps({
26
25
  *
27
26
  * @param props - props from this instance of Label
28
27
  * @param ref - reference to root HTMLElement of Label
29
- * @param defaultProps - (optional) default prop values provided by the implementing type
30
- */
31
-
32
- var useLabel = function (props, ref, defaultProps) {
33
- var state = mergeProps({
34
- ref: ref,
35
- as: 'label',
36
- size: 'medium',
37
- required: {
38
- as: 'span'
39
- }
40
- }, defaultProps && resolveLabelShorthandProps(defaultProps), resolveLabelShorthandProps(props));
41
- return state;
42
- };
43
-
44
- exports.useLabel = useLabel;
45
- /**
46
- * Label will first need to check if required is a boolean or shorthandprops,
47
- * this allows for the required prop to handle both the default asterisk for required
48
- * or a custom required text.
49
28
  */
50
29
 
51
- var resolveLabelShorthandProps = function (props) {
52
- var propsNormalized;
53
-
54
- if (props.required === true) {
55
- propsNormalized = tslib_1.__assign(tslib_1.__assign({}, props), {
56
- required: {
30
+ var useLabel = function (props, ref) {
31
+ var _a = props.disabled,
32
+ disabled = _a === void 0 ? false : _a,
33
+ _b = props.required,
34
+ required = _b === void 0 ? false : _b,
35
+ _c = props.strong,
36
+ strong = _c === void 0 ? false : _c,
37
+ _d = props.size,
38
+ size = _d === void 0 ? 'medium' : _d;
39
+ return {
40
+ disabled: disabled,
41
+ required: react_utilities_2.resolveShorthand(required === false ? null : required, {
42
+ required: !!required,
43
+ defaultProps: {
57
44
  children: '*'
58
45
  }
59
- });
60
- } else if (props.required === false) {
61
- propsNormalized = tslib_1.__assign(tslib_1.__assign({}, props), {
62
- required: undefined
63
- });
64
- } else {
65
- // TypeScript needs a nudge to figure out that props.required won't be a boolean here
66
- propsNormalized = props;
67
- }
68
-
69
- return react_utilities_1.resolveShorthandProps(propsNormalized, exports.labelShorthandProps);
46
+ }),
47
+ strong: strong,
48
+ size: size,
49
+ components: {
50
+ root: 'label',
51
+ required: 'span'
52
+ },
53
+ root: react_utilities_1.getNativeElementProps('label', tslib_1.__assign({
54
+ ref: ref
55
+ }, props))
56
+ };
70
57
  };
58
+
59
+ exports.useLabel = useLabel;
71
60
  //# sourceMappingURL=useLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/useLabel.tsx"],"names":[],"mappings":";;;;;;;;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;AAGG;;;AACU,OAAA,CAAA,mBAAA,GAA6C,CAAC,UAAD,CAA7C;AAEb,IAAM,UAAU,gBAAG,iBAAA,CAAA,cAAA,CAA2B;AAAE,EAAA,SAAS,EAAE,OAAA,CAAA;AAAb,CAA3B,CAAnB;AAEA;;;;;;;;;AASG;;AACI,IAAM,QAAQ,GAAG,UAAC,KAAD,EAAoB,GAApB,EAAiD,YAAjD,EAA0E;AAChG,MAAM,KAAK,GAAG,UAAU,CACtB;AACE,IAAA,GAAG,EAAA,GADL;AAEE,IAAA,EAAE,EAAE,OAFN;AAGE,IAAA,IAAI,EAAE,QAHR;AAIE,IAAA,QAAQ,EAAE;AACR,MAAA,EAAE,EAAE;AADI;AAJZ,GADsB,EAStB,YAAY,IAAI,0BAA0B,CAAC,YAAD,CATpB,EAUtB,0BAA0B,CAAC,KAAD,CAVJ,CAAxB;AAaA,SAAO,KAAP;AACD,CAfM;;AAAM,OAAA,CAAA,QAAA,GAAQ,QAAR;AAiBb;;;;AAIG;;AACH,IAAM,0BAA0B,GAAG,UAAC,KAAD,EAAkB;AACnD,MAAI,eAAJ;;AACA,MAAI,KAAK,CAAC,QAAN,KAAmB,IAAvB,EAA6B;AAC3B,IAAA,eAAe,GAAA,OAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EAAQ,KAAR,CAAA,EAAa;AAAE,MAAA,QAAQ,EAAE;AAAE,QAAA,QAAQ,EAAE;AAAZ;AAAZ,KAAb,CAAf;AACD,GAFD,MAEO,IAAI,KAAK,CAAC,QAAN,KAAmB,KAAvB,EAA8B;AACnC,IAAA,eAAe,GAAA,OAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EAAQ,KAAR,CAAA,EAAa;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAb,CAAf;AACD,GAFM,MAEA;AACL;AACA,IAAA,eAAe,GAAG,KAAlB;AACD;;AAED,SAAO,iBAAA,CAAA,qBAAA,CAAsB,eAAtB,EAAuC,OAAA,CAAA,mBAAvC,CAAP;AACD,CAZD","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';\nimport type { LabelProps, LabelShorthandProps, LabelState } from './Label.types';\n\n/**\n * Array of all shorthand properties listed in LabelShorthandProps\n * {@docCatergory Label}\n */\nexport const labelShorthandProps: LabelShorthandProps[] = ['required'];\n\nconst mergeProps = makeMergeProps<LabelState>({ deepMerge: labelShorthandProps });\n\n/**\n * Create the state required to render Label.\n *\n * The returned state can be modified with hooks such as useLabelStyles,\n * before being passed to renderLabel.\n *\n * @param props - props from this instance of Label\n * @param ref - reference to root HTMLElement of Label\n * @param defaultProps - (optional) default prop values provided by the implementing type\n */\nexport const useLabel = (props: LabelProps, ref: React.Ref<HTMLElement>, defaultProps?: LabelProps): LabelState => {\n const state = mergeProps(\n {\n ref,\n as: 'label',\n size: 'medium',\n required: {\n as: 'span',\n },\n },\n defaultProps && resolveLabelShorthandProps(defaultProps),\n resolveLabelShorthandProps(props),\n );\n\n return state;\n};\n\n/**\n * Label will first need to check if required is a boolean or shorthandprops,\n * this allows for the required prop to handle both the default asterisk for required\n * or a custom required text.\n */\nconst resolveLabelShorthandProps = (props: LabelProps) => {\n let propsNormalized;\n if (props.required === true) {\n propsNormalized = { ...props, required: { children: '*' } };\n } else if (props.required === false) {\n propsNormalized = { ...props, required: undefined };\n } else {\n // TypeScript needs a nudge to figure out that props.required won't be a boolean here\n propsNormalized = props as LabelProps & { required?: Exclude<LabelProps['required'], boolean> };\n }\n\n return resolveShorthandProps(propsNormalized, labelShorthandProps);\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Label/useLabel.tsx"],"names":[],"mappings":";;;;;;;;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;;AAGG;;;AACU,OAAA,CAAA,mBAAA,GAA+C,CAAC,MAAD,EAAS,UAAT,CAA/C;AAEb;;;;;;;;AAQG;;AACI,IAAM,QAAQ,GAAG,UAAC,KAAD,EAAoB,GAApB,EAA+C;AAC7D,MAAA,EAAA,GAAwE,KAAK,CAA7D,QAAhB;AAAA,MAAA,QAAQ,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAAhB;AAAA,MAAkB,EAAA,GAAsD,KAAK,CAA3C,QAAlC;AAAA,MAAkB,QAAQ,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAAlC;AAAA,MAAoC,EAAA,GAAoC,KAAK,CAA3B,MAAlD;AAAA,MAAoC,MAAM,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAAlD;AAAA,MAAoD,EAAA,GAAoB,KAAK,CAAV,IAAnE;AAAA,MAAoD,IAAI,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EAAnE;AACR,SAAO;AACL,IAAA,QAAQ,EAAA,QADH;AAEL,IAAA,QAAQ,EAAE,iBAAA,CAAA,gBAAA,CAAiB,QAAQ,KAAK,KAAb,GAAqB,IAArB,GAA4B,QAA7C,EAAuD;AAC/D,MAAA,QAAQ,EAAE,CAAC,CAAC,QADmD;AAE/D,MAAA,YAAY,EAAE;AAAE,QAAA,QAAQ,EAAE;AAAZ;AAFiD,KAAvD,CAFL;AAML,IAAA,MAAM,EAAA,MAND;AAOL,IAAA,IAAI,EAAA,IAPC;AAQL,IAAA,UAAU,EAAE;AAAE,MAAA,IAAI,EAAE,OAAR;AAAiB,MAAA,QAAQ,EAAE;AAA3B,KARP;AASL,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,OAAtB,EAA6B,OAAA,CAAA,QAAA,CAAA;AAAI,MAAA,GAAG,EAAA;AAAP,KAAA,EAAY,KAAZ,CAA7B;AATD,GAAP;AAWD,CAbM;;AAAM,OAAA,CAAA,QAAA,GAAQ,QAAR","sourceRoot":""}
@@ -49,7 +49,7 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
49
49
 
50
50
  var useLabelStyles = function (state) {
51
51
  var styles = useStyles();
52
- state.className = react_make_styles_1.mergeClasses(styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.className);
52
+ state.root.className = react_make_styles_1.mergeClasses(styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.root.className);
53
53
 
54
54
  if (state.required) {
55
55
  state.required.className = react_make_styles_1.mergeClasses(styles.required, state.required.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/useLabelStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAGA;;AAEG;;;AACH,IAAM,SAAS,gBAAG,mBAAA,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,IAAM,cAAc,GAAG,UAAC,KAAD,EAAkB;AAC9C,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,SAAN,GAAkB,mBAAA,CAAA,YAAA,CAChB,MAAM,CAAC,IADS,EAEhB,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAFT,EAGhB,MAAM,CAAC,KAAK,CAAC,IAAP,CAHU,EAIhB,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MAJP,EAKhB,KAAK,CAAC,SALU,CAAlB;;AAQA,MAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,IAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,mBAAA,CAAA,YAAA,CAAa,MAAM,CAAC,QAApB,EAA8B,KAAK,CAAC,QAAN,CAAe,SAA7C,CAA3B;AACD;;AAED,SAAO,KAAP;AACD,CAfM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport type { LabelState } from './Label.types';\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: theme => ({\n fontFamily: theme.global.type.fontFamilies.base,\n color: theme.alias.color.neutral.neutralForeground1,\n }),\n\n disabled: theme => ({\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n }),\n\n required: theme => ({\n color: theme.alias.color.red.foreground3,\n paddingLeft: '4px', // TODO: Once spacing tokens are added, change this to Horizontal XS\n }),\n\n small: theme => ({\n fontSize: theme.global.type.fontSizes.base[200],\n lineHeight: theme.global.type.lineHeights.base[200],\n }),\n\n medium: theme => ({\n fontSize: theme.global.type.fontSizes.base[300],\n lineHeight: theme.global.type.lineHeights.base[300],\n }),\n\n large: theme => ({\n fontSize: theme.global.type.fontSizes.base[400],\n lineHeight: theme.global.type.lineHeights.base[400],\n fontWeight: theme.global.type.fontWeights.semibold,\n }),\n\n strong: theme => ({\n fontWeight: theme.global.type.fontWeights.semibold,\n }),\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles = (state: LabelState): LabelState => {\n const styles = useStyles();\n state.className = mergeClasses(\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.strong && styles.strong,\n state.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":["../../../src/components/Label/useLabelStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAGA;;AAEG;;;AACH,IAAM,SAAS,gBAAG,mBAAA,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,IAAM,cAAc,GAAG,UAAC,KAAD,EAAkB;AAC9C,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CACrB,MAAM,CAAC,IADc,EAErB,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAFJ,EAGrB,MAAM,CAAC,KAAK,CAAC,IAAP,CAHe,EAIrB,KAAK,CAAC,MAAN,IAAgB,MAAM,CAAC,MAJF,EAKrB,KAAK,CAAC,IAAN,CAAW,SALU,CAAvB;;AAQA,MAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,IAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,mBAAA,CAAA,YAAA,CAAa,MAAM,CAAC,QAApB,EAA8B,KAAK,CAAC,QAAN,CAAe,SAA7C,CAA3B;AACD;;AAED,SAAO,KAAP;AACD,CAfM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd","sourceRoot":""}
@@ -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":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAEA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA","sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-label",
3
- "version": "9.0.0-alpha.42",
3
+ "version": "9.0.0-alpha.46",
4
4
  "description": "Label component for FluentUI library.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -25,11 +25,11 @@
25
25
  "storybook": "start-storybook"
26
26
  },
27
27
  "devDependencies": {
28
- "@fluentui/babel-make-styles": "9.0.0-alpha.51",
28
+ "@fluentui/babel-make-styles": "9.0.0-alpha.55",
29
29
  "@fluentui/eslint-plugin": "*",
30
- "@fluentui/jest-serializer-make-styles": "9.0.0-alpha.44",
30
+ "@fluentui/jest-serializer-make-styles": "9.0.0-alpha.48",
31
31
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-make-styles": "9.0.0-alpha.13",
32
+ "@fluentui/react-conformance-make-styles": "9.0.0-alpha.17",
33
33
  "@fluentui/scripts": "^1.0.0",
34
34
  "@types/enzyme": "3.10.3",
35
35
  "@types/enzyme-adapter-react-16": "1.0.3",
@@ -43,8 +43,8 @@
43
43
  "react-test-renderer": "^16.3.0"
44
44
  },
45
45
  "dependencies": {
46
- "@fluentui/react-make-styles": "9.0.0-alpha.69",
47
- "@fluentui/react-utilities": "9.0.0-alpha.49",
46
+ "@fluentui/react-make-styles": "9.0.0-alpha.73",
47
+ "@fluentui/react-utilities": "9.0.0-alpha.53",
48
48
  "tslib": "^2.1.0"
49
49
  },
50
50
  "peerDependencies": {
@@ -1 +0,0 @@
1
- export * from './components/Label/index';
package/lib-amd/Label.js DELETED
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/Label/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=Label.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"../src/","sources":["Label.ts"],"names":[],"mappings":";;;IAAA,uCAAyC","sourcesContent":["export * from './components/Label/index';\n"]}
@@ -1,4 +0,0 @@
1
- import type { IsConformantOptions } from '@fluentui/react-conformance';
2
- export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
- componentPath?: string;
4
- }): void;
@@ -1,15 +0,0 @@
1
- define(["require", "exports", "@fluentui/react-conformance", "@fluentui/react-conformance-make-styles"], function (require, exports, react_conformance_1, react_conformance_make_styles_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.isConformant = void 0;
5
- function isConformant(testInfo) {
6
- var defaultOptions = {
7
- asPropHandlesRef: true,
8
- componentPath: module.parent.filename.replace('.test', ''),
9
- extraTests: react_conformance_make_styles_1.default,
10
- };
11
- react_conformance_1.isConformant(defaultOptions, testInfo);
12
- }
13
- exports.isConformant = isConformant;
14
- });
15
- //# sourceMappingURL=isConformant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isConformant.js","sourceRoot":"../src/","sources":["common/isConformant.ts"],"names":[],"mappings":";;;;IAIA,SAAgB,YAAY,CAC1B,QAAyF;QAEzF,IAAM,cAAc,GAAyC;YAC3D,gBAAgB,EAAE,IAAI;YACtB,aAAa,EAAE,MAAO,CAAC,MAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YAC5D,UAAU,EAAE,uCAAqC;SAClD,CAAC;QAEF,gCAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAVD,oCAUC","sourcesContent":["import { isConformant as baseIsConformant } from '@fluentui/react-conformance';\nimport type { IsConformantOptions, TestObject } from '@fluentui/react-conformance';\nimport makeStylesTests from '@fluentui/react-conformance-make-styles';\n\nexport function isConformant<TProps = {}>(\n testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },\n) {\n const defaultOptions: Partial<IsConformantOptions<TProps>> = {\n asPropHandlesRef: true,\n componentPath: module!.parent!.filename.replace('.test', ''),\n extraTests: makeStylesTests as TestObject<TProps>,\n };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"]}
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * A label component provides a title or name to a component.
4
- */
5
- export declare const Label: React.ForwardRefExoticComponent<import("@fluentui/react-utilities").ComponentPropsCompat & React.LabelHTMLAttributes<HTMLLabelElement> & {
6
- disabled?: boolean | undefined;
7
- required?: string | number | boolean | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ObjectShorthandPropsCompat<import("@fluentui/react-utilities").ComponentPropsCompat> | null | undefined;
8
- size?: "small" | "medium" | "large" | undefined;
9
- strong?: boolean | undefined;
10
- } & React.RefAttributes<HTMLElement>>;
@@ -1,15 +0,0 @@
1
- define(["require", "exports", "react", "./useLabel", "./renderLabel", "./useLabelStyles"], function (require, exports, React, useLabel_1, renderLabel_1, useLabelStyles_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Label = void 0;
5
- /**
6
- * A label component provides a title or name to a component.
7
- */
8
- exports.Label = React.forwardRef(function (props, ref) {
9
- var state = useLabel_1.useLabel(props, ref);
10
- useLabelStyles_1.useLabelStyles(state);
11
- return renderLabel_1.renderLabel(state);
12
- });
13
- exports.Label.displayName = 'Label';
14
- });
15
- //# sourceMappingURL=Label.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"../src/","sources":["components/Label/Label.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACU,QAAA,KAAK,GAAG,KAAK,CAAC,UAAU,CAA0B,UAAC,KAAK,EAAE,GAAG;QACxE,IAAM,KAAK,GAAG,mBAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEnC,+BAAc,CAAC,KAAK,CAAC,CAAC;QACtB,OAAO,yBAAW,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,aAAK,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["import * as React from 'react';\nimport { useLabel } from './useLabel';\nimport { renderLabel } from './renderLabel';\nimport { useLabelStyles } from './useLabelStyles';\nimport type { LabelProps } from './Label.types';\n\n/**\n * A label component provides a title or name to a component.\n */\nexport const Label = React.forwardRef<HTMLElement, LabelProps>((props, ref) => {\n const state = useLabel(props, ref);\n\n useLabelStyles(state);\n return renderLabel(state);\n});\n\nLabel.displayName = 'Label';\n"]}
@@ -1,49 +0,0 @@
1
- import * as React from 'react';
2
- import type { ComponentPropsCompat, ComponentStateCompat, ObjectShorthandPropsCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';
3
- /**
4
- * Label Props
5
- */
6
- export declare type LabelProps = ComponentPropsCompat & React.LabelHTMLAttributes<HTMLLabelElement> & {
7
- /**
8
- * Renders the label as disabled
9
- * @defaultvalue false
10
- */
11
- disabled?: boolean;
12
- /**
13
- * Displays and indicator that the label is for a required field. The required prop can be set to true to display
14
- * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
15
- * @defaultvalue false
16
- */
17
- required?: boolean | ShorthandPropsCompat<ComponentPropsCompat>;
18
- /**
19
- * A label supports different sizes.
20
- * @defaultvalue 'medium'
21
- */
22
- size?: 'small' | 'medium' | 'large';
23
- /**
24
- * A label supports semibold/strong fontweight.
25
- * @defaultvalue false
26
- */
27
- strong?: boolean;
28
- };
29
- /**
30
- * Names of the shorthand properties in LabelProps
31
- */
32
- export declare type LabelShorthandProps = 'required';
33
- /**
34
- * Names of LabelProps that have a default value in useLabel
35
- */
36
- export declare type LabelDefaultedProps = 'size';
37
- /**
38
- * State used in rendering Label
39
- */
40
- export declare type LabelState = ComponentStateCompat<LabelProps, LabelShorthandProps, LabelDefaultedProps> & {
41
- /**
42
- * Ref to the root element
43
- */
44
- ref: React.Ref<HTMLElement>;
45
- /**
46
- * The required prop resolved to a slot object
47
- */
48
- required?: ObjectShorthandPropsCompat<ComponentPropsCompat>;
49
- };
@@ -1,5 +0,0 @@
1
- define(["require", "exports"], function (require, exports) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- });
5
- //# sourceMappingURL=Label.types.js.map