@fluentui/react-label 9.0.0-alpha.4 → 9.0.0-alpha.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/CHANGELOG.json +956 -1
  2. package/CHANGELOG.md +388 -2
  3. package/MIGRATION.md +25 -0
  4. package/README.md +22 -0
  5. package/Spec.md +146 -34
  6. package/dist/react-label.d.ts +42 -9
  7. package/lib/Label.js.map +1 -1
  8. package/lib/common/isConformant.d.ts +1 -1
  9. package/lib/common/isConformant.js +7 -5
  10. package/lib/common/isConformant.js.map +1 -1
  11. package/lib/components/Label/Label.d.ts +6 -2
  12. package/lib/components/Label/Label.js +5 -4
  13. package/lib/components/Label/Label.js.map +1 -1
  14. package/lib/components/Label/Label.types.d.ts +32 -7
  15. package/lib/components/Label/Label.types.js.map +1 -1
  16. package/lib/components/Label/index.js.map +1 -1
  17. package/lib/components/Label/renderLabel.d.ts +1 -1
  18. package/lib/components/Label/renderLabel.js +7 -3
  19. package/lib/components/Label/renderLabel.js.map +1 -1
  20. package/lib/components/Label/useLabel.d.ts +2 -1
  21. package/lib/components/Label/useLabel.js +43 -8
  22. package/lib/components/Label/useLabel.js.map +1 -1
  23. package/lib/components/Label/useLabelStyles.d.ts +1 -1
  24. package/lib/components/Label/useLabelStyles.js +43 -11
  25. package/lib/components/Label/useLabelStyles.js.map +1 -1
  26. package/lib/index.js.map +1 -1
  27. package/lib/tsdoc-metadata.json +1 -1
  28. package/lib-commonjs/Label.js +7 -2
  29. package/lib-commonjs/Label.js.map +1 -1
  30. package/lib-commonjs/common/isConformant.d.ts +1 -1
  31. package/lib-commonjs/common/isConformant.js +16 -7
  32. package/lib-commonjs/common/isConformant.js.map +1 -1
  33. package/lib-commonjs/components/Label/Label.d.ts +6 -2
  34. package/lib-commonjs/components/Label/Label.js +18 -9
  35. package/lib-commonjs/components/Label/Label.js.map +1 -1
  36. package/lib-commonjs/components/Label/Label.types.d.ts +32 -7
  37. package/lib-commonjs/components/Label/Label.types.js +4 -1
  38. package/lib-commonjs/components/Label/Label.types.js.map +1 -1
  39. package/lib-commonjs/components/Label/index.js +11 -2
  40. package/lib-commonjs/components/Label/index.js.map +1 -1
  41. package/lib-commonjs/components/Label/renderLabel.d.ts +1 -1
  42. package/lib-commonjs/components/Label/renderLabel.js +20 -7
  43. package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
  44. package/lib-commonjs/components/Label/useLabel.d.ts +2 -1
  45. package/lib-commonjs/components/Label/useLabel.js +52 -10
  46. package/lib-commonjs/components/Label/useLabel.js.map +1 -1
  47. package/lib-commonjs/components/Label/useLabelStyles.d.ts +1 -1
  48. package/lib-commonjs/components/Label/useLabelStyles.js +50 -12
  49. package/lib-commonjs/components/Label/useLabelStyles.js.map +1 -1
  50. package/lib-commonjs/index.js +7 -2
  51. package/lib-commonjs/index.js.map +1 -1
  52. package/package.json +14 -10
  53. package/config/api-extractor.json +0 -3
  54. package/config/tests.js +0 -7
  55. package/etc/react-label.api.md +0 -44
  56. package/just.config.ts +0 -3
  57. package/lib-amd/Label.d.ts +0 -1
  58. package/lib-amd/Label.js +0 -6
  59. package/lib-amd/Label.js.map +0 -1
  60. package/lib-amd/common/isConformant.d.ts +0 -4
  61. package/lib-amd/common/isConformant.js +0 -14
  62. package/lib-amd/common/isConformant.js.map +0 -1
  63. package/lib-amd/components/Label/Label.d.ts +0 -6
  64. package/lib-amd/components/Label/Label.js +0 -15
  65. package/lib-amd/components/Label/Label.js.map +0 -1
  66. package/lib-amd/components/Label/Label.types.d.ts +0 -24
  67. package/lib-amd/components/Label/Label.types.js +0 -5
  68. package/lib-amd/components/Label/Label.types.js.map +0 -1
  69. package/lib-amd/components/Label/index.d.ts +0 -5
  70. package/lib-amd/components/Label/index.js +0 -10
  71. package/lib-amd/components/Label/index.js.map +0 -1
  72. package/lib-amd/components/Label/renderLabel.d.ts +0 -5
  73. package/lib-amd/components/Label/renderLabel.js +0 -14
  74. package/lib-amd/components/Label/renderLabel.js.map +0 -1
  75. package/lib-amd/components/Label/useLabel.d.ts +0 -17
  76. package/lib-amd/components/Label/useLabel.js +0 -30
  77. package/lib-amd/components/Label/useLabel.js.map +0 -1
  78. package/lib-amd/components/Label/useLabelStyles.d.ts +0 -5
  79. package/lib-amd/components/Label/useLabelStyles.js +0 -25
  80. package/lib-amd/components/Label/useLabelStyles.js.map +0 -1
  81. package/lib-amd/index.d.ts +0 -2
  82. package/lib-amd/index.js +0 -6
  83. package/lib-amd/index.js.map +0 -1
  84. package/src/components/Label/Label.types.ts +0 -33
@@ -1,42 +1,75 @@
1
- import { ComponentProps } from '@fluentui/react-utilities';
2
- import { ComponentState } from '@fluentui/react-utilities';
1
+ import { ComponentPropsCompat } from '@fluentui/react-utilities';
2
+ import type { ComponentStateCompat } from '@fluentui/react-utilities';
3
+ import { ObjectShorthandPropsCompat } from '@fluentui/react-utilities';
3
4
  import * as React_2 from 'react';
5
+ import type { ShorthandPropsCompat } from '@fluentui/react-utilities';
4
6
 
5
7
  /**
6
8
  * A label component provides a title or name to a component.
7
9
  */
8
- export declare const Label: React_2.ForwardRefExoticComponent<LabelProps & React_2.RefAttributes<HTMLElement>>;
10
+ export declare const Label: React_2.ForwardRefExoticComponent<ComponentPropsCompat & React_2.LabelHTMLAttributes<HTMLLabelElement> & {
11
+ disabled?: boolean | undefined;
12
+ required?: string | number | boolean | React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | React_2.ReactNodeArray | React_2.ReactPortal | ObjectShorthandPropsCompat<ComponentPropsCompat> | null | undefined;
13
+ size?: "small" | "medium" | "large" | undefined;
14
+ strong?: boolean | undefined;
15
+ } & React_2.RefAttributes<HTMLElement>>;
9
16
 
10
17
  /**
11
18
  * Names of LabelProps that have a default value in useLabel
12
19
  */
13
- export declare type LabelDefaultedProps = never;
20
+ export declare type LabelDefaultedProps = 'size';
14
21
 
15
22
  /**
16
23
  * Label Props
17
24
  */
18
- export declare interface LabelProps extends ComponentProps, React_2.HTMLAttributes<HTMLElement> {
19
- }
25
+ export declare type LabelProps = ComponentPropsCompat & React_2.LabelHTMLAttributes<HTMLLabelElement> & {
26
+ /**
27
+ * Renders the label as disabled
28
+ * @defaultvalue false
29
+ */
30
+ disabled?: boolean;
31
+ /**
32
+ * Displays and indicator that the label is for a required field. The required prop can be set to true to display
33
+ * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
34
+ * @defaultvalue false
35
+ */
36
+ required?: boolean | ShorthandPropsCompat<ComponentPropsCompat>;
37
+ /**
38
+ * A label supports different sizes.
39
+ * @defaultvalue 'medium'
40
+ */
41
+ size?: 'small' | 'medium' | 'large';
42
+ /**
43
+ * A label supports semibold/strong fontweight.
44
+ * @defaultvalue false
45
+ */
46
+ strong?: boolean;
47
+ };
20
48
 
21
49
  /**
22
50
  * Names of the shorthand properties in LabelProps
23
51
  */
24
- export declare type LabelShorthandProps = never;
52
+ export declare type LabelShorthandProps = 'required';
25
53
 
26
54
  /**
27
55
  * Array of all shorthand properties listed in LabelShorthandProps
56
+ * {@docCatergory Label}
28
57
  */
29
58
  export declare const labelShorthandProps: LabelShorthandProps[];
30
59
 
31
60
  /**
32
61
  * State used in rendering Label
33
62
  */
34
- export declare interface LabelState extends ComponentState<LabelProps, LabelShorthandProps, LabelDefaultedProps> {
63
+ export declare type LabelState = ComponentStateCompat<LabelProps, LabelShorthandProps, LabelDefaultedProps> & {
35
64
  /**
36
65
  * Ref to the root element
37
66
  */
38
67
  ref: React_2.Ref<HTMLElement>;
39
- }
68
+ /**
69
+ * The required prop resolved to a slot object
70
+ */
71
+ required?: ObjectShorthandPropsCompat<ComponentPropsCompat>;
72
+ };
40
73
 
41
74
  /**
42
75
  * Render the final JSX of Label
package/lib/Label.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"../src/","sources":["Label.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './components/Label/index';\n"]}
1
+ {"version":3,"file":"Label.js","sourceRoot":"","sources":["../src/Label.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { IsConformantOptions } from '@fluentui/react-conformance';
1
+ import type { IsConformantOptions } from '@fluentui/react-conformance';
2
2
  export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
3
  componentPath?: string;
4
4
  }): void;
@@ -1,9 +1,11 @@
1
1
  import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
2
+ import makeStylesTests from '@fluentui/react-conformance-make-styles';
2
3
  export function isConformant(testInfo) {
3
- var defaultOptions = {
4
- asPropHandlesRef: true,
5
- componentPath: module.parent.filename.replace('.test', ''),
6
- };
7
- baseIsConformant(defaultOptions, testInfo);
4
+ var defaultOptions = {
5
+ asPropHandlesRef: true,
6
+ componentPath: module.parent.filename.replace('.test', ''),
7
+ extraTests: makeStylesTests
8
+ };
9
+ baseIsConformant(defaultOptions, testInfo);
8
10
  }
9
11
  //# sourceMappingURL=isConformant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isConformant.js","sourceRoot":"../src/","sources":["common/isConformant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAuB,MAAM,6BAA6B,CAAC;AAEpG,MAAM,UAAU,YAAY,CAC1B,QAAyF;IAEzF,IAAM,cAAc,GAAyC;QAC3D,gBAAgB,EAAE,IAAI;QACtB,aAAa,EAAE,MAAO,CAAC,MAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;KAC7D,CAAC;IAEF,gBAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import { isConformant as baseIsConformant, IsConformantOptions } from '@fluentui/react-conformance';\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 };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"]}
1
+ {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;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;AAH+C,GAA7D;AAMA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
- import { LabelProps } from './Label.types';
3
2
  /**
4
3
  * A label component provides a title or name to a component.
5
4
  */
6
- export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLElement>>;
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>>;
@@ -5,10 +5,11 @@ import { useLabelStyles } from './useLabelStyles';
5
5
  /**
6
6
  * A label component provides a title or name to a component.
7
7
  */
8
- export var Label = React.forwardRef(function (props, ref) {
9
- var state = useLabel(props, ref);
10
- useLabelStyles(state);
11
- return renderLabel(state);
8
+
9
+ export var Label = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
+ var state = useLabel(props, ref);
11
+ useLabelStyles(state);
12
+ return renderLabel(state);
12
13
  });
13
14
  Label.displayName = 'Label';
14
15
  //# sourceMappingURL=Label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"../src/","sources":["components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,IAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAA0B,UAAC,KAAK,EAAE,GAAG;IACxE,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAEnC,cAAc,CAAC,KAAK,CAAC,CAAC;IACtB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["import * as React from 'react';\nimport { useLabel } from './useLabel';\nimport { LabelProps } from './Label.types';\nimport { renderLabel } from './renderLabel';\nimport { useLabelStyles } from './useLabelStyles';\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
+ {"version":3,"sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,YAAzB;AACA,SAAS,WAAT,QAA4B,eAA5B;AACA,SAAS,cAAT,QAA+B,kBAA/B;AAGA;;AAEG;;AACH,OAAO,IAAM,KAAK,gBAAG,KAAK,CAAC,UAAN,CAA0C,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxE,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAD,EAAQ,GAAR,CAAtB;AAEA,EAAA,cAAc,CAAC,KAAD,CAAd;AACA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CALoB,CAAd;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourceRoot":""}
@@ -1,24 +1,49 @@
1
1
  import * as React from 'react';
2
- import { ComponentProps, ComponentState } from '@fluentui/react-utilities';
2
+ import type { ComponentPropsCompat, ComponentStateCompat, ObjectShorthandPropsCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Label Props
5
5
  */
6
- export interface LabelProps extends ComponentProps, React.HTMLAttributes<HTMLElement> {
7
- }
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
+ };
8
29
  /**
9
30
  * Names of the shorthand properties in LabelProps
10
31
  */
11
- export declare type LabelShorthandProps = never;
32
+ export declare type LabelShorthandProps = 'required';
12
33
  /**
13
34
  * Names of LabelProps that have a default value in useLabel
14
35
  */
15
- export declare type LabelDefaultedProps = never;
36
+ export declare type LabelDefaultedProps = 'size';
16
37
  /**
17
38
  * State used in rendering Label
18
39
  */
19
- export interface LabelState extends ComponentState<LabelProps, LabelShorthandProps, LabelDefaultedProps> {
40
+ export declare type LabelState = ComponentStateCompat<LabelProps, LabelShorthandProps, LabelDefaultedProps> & {
20
41
  /**
21
42
  * Ref to the root element
22
43
  */
23
44
  ref: React.Ref<HTMLElement>;
24
- }
45
+ /**
46
+ * The required prop resolved to a slot object
47
+ */
48
+ required?: ObjectShorthandPropsCompat<ComponentPropsCompat>;
49
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"Label.types.js","sourceRoot":"../src/","sources":["components/Label/Label.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { ComponentProps, ComponentState } from '@fluentui/react-utilities';\n\n/**\n * Label Props\n */\nexport interface LabelProps extends ComponentProps, React.HTMLAttributes<HTMLElement> {\n /*\n * TODO Add props and slots here\n * Any slot property should be listed in the labelShorthandProps array below\n * Any property that has a default value should be listed in LabelDefaultedProps as e.g. 'size' | 'icon'\n */\n}\n\n/**\n * Names of the shorthand properties in LabelProps\n */\nexport type LabelShorthandProps = never; // TODO add shorthand property names\n\n/**\n * Names of LabelProps that have a default value in useLabel\n */\nexport type LabelDefaultedProps = never; // TODO add names of properties with default values\n\n/**\n * State used in rendering Label\n */\nexport interface LabelState extends ComponentState<LabelProps, LabelShorthandProps, LabelDefaultedProps> {\n /**\n * Ref to the root element\n */\n ref: React.Ref<HTMLElement>;\n}\n"]}
1
+ {"version":3,"file":"Label.types.js","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Label/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { LabelState } from './Label.types';
1
+ import type { LabelState } from './Label.types';
2
2
  /**
3
3
  * Render the final JSX of Label
4
4
  */
@@ -1,12 +1,16 @@
1
1
  import { __assign } from "tslib";
2
2
  import * as React from 'react';
3
- import { getSlots } from '@fluentui/react-utilities';
3
+ import { getSlotsCompat } from '@fluentui/react-utilities';
4
4
  import { labelShorthandProps } from './useLabel';
5
5
  /**
6
6
  * Render the final JSX of Label
7
7
  */
8
+
8
9
  export var renderLabel = function (state) {
9
- var _a = getSlots(state, labelShorthandProps), slots = _a.slots, slotProps = _a.slotProps;
10
- return (React.createElement(slots.root, __assign({}, slotProps.root), state.children));
10
+ var _a = getSlotsCompat(state, labelShorthandProps),
11
+ slots = _a.slots,
12
+ slotProps = _a.slotProps;
13
+
14
+ return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), state.children, state.required && /*#__PURE__*/React.createElement(slots.required, __assign({}, slotProps.required)));
11
15
  };
12
16
  //# sourceMappingURL=renderLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderLabel.js","sourceRoot":"../src/","sources":["components/Label/renderLabel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,KAAiB;IACrC,IAAA,KAAuB,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC,EAAzD,KAAK,WAAA,EAAE,SAAS,eAAyC,CAAC;IAElE,OAAO,CACL,oBAAC,KAAK,CAAC,IAAI,eAAK,SAAS,CAAC,IAAI,GAE3B,KAAK,CAAC,QAAQ,CACJ,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { LabelState } from './Label.types';\nimport { labelShorthandProps } from './useLabel';\n\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel = (state: LabelState) => {\n const { slots, slotProps } = getSlots(state, labelShorthandProps);\n\n return (\n <slots.root {...slotProps.root}>\n {/* TODO Add additional slots in the appropriate place */}\n {state.children}\n </slots.root>\n );\n};\n"]}
1
+ {"version":3,"sources":["../../../src/components/Label/renderLabel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,2BAA/B;AACA,SAAS,mBAAT,QAAoC,YAApC;AAGA;;AAEG;;AACH,OAAO,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,cAAc,CAAC,KAAD,EAAQ,mBAAR,CAArC;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,QADT,EAEG,KAAK,CAAC,QAAN,iBAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAFrB,CADF;AAMD,CATM","sourceRoot":""}
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
- import { LabelProps, LabelShorthandProps, LabelState } from './Label.types';
2
+ import type { LabelProps, LabelShorthandProps, LabelState } from './Label.types';
3
3
  /**
4
4
  * Array of all shorthand properties listed in LabelShorthandProps
5
+ * {@docCatergory Label}
5
6
  */
6
7
  export declare const labelShorthandProps: LabelShorthandProps[];
7
8
  /**
@@ -1,11 +1,14 @@
1
+ import { __assign } from "tslib";
1
2
  import { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';
2
3
  /**
3
4
  * Array of all shorthand properties listed in LabelShorthandProps
5
+ * {@docCatergory Label}
4
6
  */
5
- export var labelShorthandProps = [
6
- /* TODO add shorthand property names */
7
- ];
8
- var mergeProps = makeMergeProps({ deepMerge: labelShorthandProps });
7
+
8
+ export var labelShorthandProps = ['required'];
9
+ var mergeProps = /*#__PURE__*/makeMergeProps({
10
+ deepMerge: labelShorthandProps
11
+ });
9
12
  /**
10
13
  * Create the state required to render Label.
11
14
  *
@@ -16,10 +19,42 @@ var mergeProps = makeMergeProps({ deepMerge: labelShorthandProps });
16
19
  * @param ref - reference to root HTMLElement of Label
17
20
  * @param defaultProps - (optional) default prop values provided by the implementing type
18
21
  */
22
+
19
23
  export var useLabel = function (props, ref, defaultProps) {
20
- var state = mergeProps({
21
- ref: ref,
22
- }, defaultProps && resolveShorthandProps(defaultProps, labelShorthandProps), resolveShorthandProps(props, labelShorthandProps));
23
- return state;
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: {
46
+ children: '*'
47
+ }
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);
24
59
  };
25
60
  //# sourceMappingURL=useLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLabel.js","sourceRoot":"../src/","sources":["components/Label/useLabel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlF;;GAEG;AACH,MAAM,CAAC,IAAM,mBAAmB,GAA0B;AACxD,uCAAuC;CACxC,CAAC;AAEF,IAAM,UAAU,GAAG,cAAc,CAAa,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;AAElF;;;;;;;;;GASG;AACH,MAAM,CAAC,IAAM,QAAQ,GAAG,UAAC,KAAiB,EAAE,GAA2B,EAAE,YAAyB;IAChG,IAAM,KAAK,GAAG,UAAU,CACtB;QACE,GAAG,KAAA;KACJ,EACD,YAAY,IAAI,qBAAqB,CAAC,YAAY,EAAE,mBAAmB,CAAC,EACxE,qBAAqB,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAClD,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';\nimport { LabelProps, LabelShorthandProps, LabelState } from './Label.types';\n\n/**\n * Array of all shorthand properties listed in LabelShorthandProps\n */\nexport const labelShorthandProps: LabelShorthandProps[] = [\n /* TODO add shorthand property names */\n];\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 },\n defaultProps && resolveShorthandProps(defaultProps, labelShorthandProps),\n resolveShorthandProps(props, labelShorthandProps),\n );\n\n return state;\n};\n"]}
1
+ {"version":3,"sources":["../../../src/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","sourceRoot":""}
@@ -1,4 +1,4 @@
1
- import { LabelState } from './Label.types';
1
+ import type { LabelState } from './Label.types';
2
2
  /**
3
3
  * Apply styling to the Label slots based on the state
4
4
  */
@@ -1,20 +1,52 @@
1
- import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';
1
+ import { __styles, mergeClasses } from '@fluentui/react-make-styles';
2
2
  /**
3
- * Styles for the root slot
3
+ * Styles for the label
4
4
  */
5
- var useStyles = makeStyles({
6
- root: function (theme) { return ({
7
- // TODO Add default styles for the root element
8
- }); },
5
+
6
+ var useStyles = /*#__PURE__*/__styles({
7
+ "root": {
8
+ "Bahqtrf": "f1kx028l",
9
+ "sj55zd": "f16th3vw"
10
+ },
11
+ "disabled": {
12
+ "sj55zd": "f1eu23ty"
13
+ },
14
+ "required": {
15
+ "sj55zd": "f1pp183j",
16
+ "uwmqm3": ["fycuoez", "f8wuabp"]
17
+ },
18
+ "small": {
19
+ "Be2twd7": "ft25vac",
20
+ "Bg96gwp": "f6u047o"
21
+ },
22
+ "medium": {
23
+ "Be2twd7": "flcnb0",
24
+ "Bg96gwp": "f1syuwty"
25
+ },
26
+ "large": {
27
+ "Be2twd7": "f1y5x3qd",
28
+ "Bg96gwp": "f1r32vcg",
29
+ "Bhrd7zp": "fss2gpl"
30
+ },
31
+ "strong": {
32
+ "Bhrd7zp": "fss2gpl"
33
+ }
34
+ }, {
35
+ "d": [".f1kx028l{font-family:var(--global-type-fontFamilies-base);}", ".f16th3vw{color:var(--alias-color-neutral-neutralForeground1);}", ".f1eu23ty{color:var(--alias-color-neutral-neutralForegroundDisabled);}", ".f1pp183j{color:var(--alias-color-red-foreground3);}", ".fycuoez{padding-left:4px;}", ".f8wuabp{padding-right:4px;}", ".ft25vac{font-size:var(--global-type-fontSizes-base-200);}", ".f6u047o{line-height:var(--global-type-lineHeights-base-200);}", ".flcnb0{font-size:var(--global-type-fontSizes-base-300);}", ".f1syuwty{line-height:var(--global-type-lineHeights-base-300);}", ".f1y5x3qd{font-size:var(--global-type-fontSizes-base-400);}", ".f1r32vcg{line-height:var(--global-type-lineHeights-base-400);}", ".fss2gpl{font-weight:var(--global-type-fontWeights-semibold);}"]
9
36
  });
10
37
  /**
11
38
  * Apply styling to the Label slots based on the state
12
39
  */
40
+
41
+
13
42
  export var useLabelStyles = function (state) {
14
- var styles = useStyles();
15
- state.className = mergeClasses(styles.root, state.className);
16
- // TODO Add class names to slots, for example:
17
- // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);
18
- return state;
43
+ var styles = useStyles();
44
+ state.className = mergeClasses(styles.root, state.disabled && styles.disabled, styles[state.size], state.strong && styles.strong, state.className);
45
+
46
+ if (state.required) {
47
+ state.required.className = mergeClasses(styles.required, state.required.className);
48
+ }
49
+
50
+ return state;
19
51
  };
20
52
  //# sourceMappingURL=useLabelStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLabelStyles.js","sourceRoot":"../src/","sources":["components/Label/useLabelStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGvE;;GAEG;AACH,IAAM,SAAS,GAAG,UAAU,CAAC;IAC3B,IAAI,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;IACd,+CAA+C;KAChD,CAAC,EAFa,CAEb;CAGH,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,KAAiB;IAC9C,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAE7D,8CAA8C;IAC9C,gFAAgF;IAEhF,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport { LabelState } from './Label.types';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: theme => ({\n // TODO Add default styles for the root element\n }),\n\n // TODO add additional classes for different states and/or slots\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(styles.root, state.className);\n\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n\n return state;\n};\n"]}
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,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","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"}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.13.0"
8
+ "packageVersion": "7.18.1"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var tslib_1 = /*#__PURE__*/require("tslib");
8
+
4
9
  tslib_1.__exportStar(require("./components/Label/index"), exports);
5
10
  //# sourceMappingURL=Label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"../src/","sources":["Label.ts"],"names":[],"mappings":";;;AAAA,mEAAyC","sourcesContent":["export * from './components/Label/index';\n"]}
1
+ {"version":3,"sources":["../src/Label.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1,4 +1,4 @@
1
- import { IsConformantOptions } from '@fluentui/react-conformance';
1
+ import type { IsConformantOptions } from '@fluentui/react-conformance';
2
2
  export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
3
3
  componentPath?: string;
4
4
  }): void;
@@ -1,13 +1,22 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.isConformant = void 0;
4
- var react_conformance_1 = require("@fluentui/react-conformance");
7
+
8
+ var react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
9
+
10
+ var react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
11
+
5
12
  function isConformant(testInfo) {
6
- var defaultOptions = {
7
- asPropHandlesRef: true,
8
- componentPath: module.parent.filename.replace('.test', ''),
9
- };
10
- react_conformance_1.isConformant(defaultOptions, testInfo);
13
+ var defaultOptions = {
14
+ asPropHandlesRef: true,
15
+ componentPath: module.parent.filename.replace('.test', ''),
16
+ extraTests: react_conformance_make_styles_1.default
17
+ };
18
+ react_conformance_1.isConformant(defaultOptions, testInfo);
11
19
  }
20
+
12
21
  exports.isConformant = isConformant;
13
22
  //# sourceMappingURL=isConformant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isConformant.js","sourceRoot":"../src/","sources":["common/isConformant.ts"],"names":[],"mappings":";;;AAAA,iEAAoG;AAEpG,SAAgB,YAAY,CAC1B,QAAyF;IAEzF,IAAM,cAAc,GAAyC;QAC3D,gBAAgB,EAAE,IAAI;QACtB,aAAa,EAAE,MAAO,CAAC,MAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;KAC7D,CAAC;IAEF,gCAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC;AATD,oCASC","sourcesContent":["import { isConformant as baseIsConformant, IsConformantOptions } from '@fluentui/react-conformance';\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 };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"]}
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":""}
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
- import { LabelProps } from './Label.types';
3
2
  /**
4
3
  * A label component provides a title or name to a component.
5
4
  */
6
- export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLElement>>;
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,17 +1,26 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.Label = void 0;
4
- var React = require("react");
5
- var useLabel_1 = require("./useLabel");
6
- var renderLabel_1 = require("./renderLabel");
7
- var useLabelStyles_1 = require("./useLabelStyles");
7
+
8
+ var React = /*#__PURE__*/require("react");
9
+
10
+ var useLabel_1 = /*#__PURE__*/require("./useLabel");
11
+
12
+ var renderLabel_1 = /*#__PURE__*/require("./renderLabel");
13
+
14
+ var useLabelStyles_1 = /*#__PURE__*/require("./useLabelStyles");
8
15
  /**
9
16
  * A label component provides a title or name to a component.
10
17
  */
11
- exports.Label = React.forwardRef(function (props, ref) {
12
- var state = useLabel_1.useLabel(props, ref);
13
- useLabelStyles_1.useLabelStyles(state);
14
- return renderLabel_1.renderLabel(state);
18
+
19
+
20
+ exports.Label = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
+ var state = useLabel_1.useLabel(props, ref);
22
+ useLabelStyles_1.useLabelStyles(state);
23
+ return renderLabel_1.renderLabel(state);
15
24
  });
16
25
  exports.Label.displayName = 'Label';
17
26
  //# sourceMappingURL=Label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"../src/","sources":["components/Label/Label.tsx"],"names":[],"mappings":";;;AAAA,6BAA+B;AAC/B,uCAAsC;AAEtC,6CAA4C;AAC5C,mDAAkD;AAElD;;GAEG;AACU,QAAA,KAAK,GAAG,KAAK,CAAC,UAAU,CAA0B,UAAC,KAAK,EAAE,GAAG;IACxE,IAAM,KAAK,GAAG,mBAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAEnC,+BAAc,CAAC,KAAK,CAAC,CAAC;IACtB,OAAO,yBAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,aAAK,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["import * as React from 'react';\nimport { useLabel } from './useLabel';\nimport { LabelProps } from './Label.types';\nimport { renderLabel } from './renderLabel';\nimport { useLabelStyles } from './useLabelStyles';\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
+ {"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":""}