@fluentui/react-label 9.1.13 → 9.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/CHANGELOG.json +55 -1
  2. package/CHANGELOG.md +24 -2
  3. package/lib/Label.js +0 -1
  4. package/lib/Label.js.map +1 -1
  5. package/lib/components/Label/Label.js +5 -7
  6. package/lib/components/Label/Label.js.map +1 -1
  7. package/lib/components/Label/Label.types.js +1 -2
  8. package/lib/components/Label/Label.types.js.map +1 -1
  9. package/lib/components/Label/index.js +0 -1
  10. package/lib/components/Label/index.js.map +1 -1
  11. package/lib/components/Label/renderLabel.js +4 -9
  12. package/lib/components/Label/renderLabel.js.map +1 -1
  13. package/lib/components/Label/useLabel.js +20 -27
  14. package/lib/components/Label/useLabel.js.map +1 -1
  15. package/lib/components/Label/useLabelStyles.styles.js.map +1 -1
  16. package/lib/index.js +0 -1
  17. package/lib/index.js.map +1 -1
  18. package/lib-commonjs/Label.js +0 -3
  19. package/lib-commonjs/Label.js.map +1 -1
  20. package/lib-commonjs/components/Label/Label.js +1 -3
  21. package/lib-commonjs/components/Label/Label.js.map +1 -1
  22. package/lib-commonjs/components/Label/Label.types.js +0 -3
  23. package/lib-commonjs/components/Label/Label.types.js.map +1 -1
  24. package/lib-commonjs/components/Label/index.js +0 -3
  25. package/lib-commonjs/components/Label/index.js.map +1 -1
  26. package/lib-commonjs/components/Label/renderLabel.js +1 -3
  27. package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
  28. package/lib-commonjs/components/Label/useLabel.js +1 -3
  29. package/lib-commonjs/components/Label/useLabel.js.map +1 -1
  30. package/lib-commonjs/components/Label/useLabelStyles.styles.js +0 -2
  31. package/lib-commonjs/components/Label/useLabelStyles.styles.js.map +1 -1
  32. package/lib-commonjs/index.js +0 -3
  33. package/lib-commonjs/index.js.map +1 -1
  34. package/package.json +5 -5
package/CHANGELOG.json CHANGED
@@ -2,7 +2,61 @@
2
2
  "name": "@fluentui/react-label",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 24 May 2023 20:42:40 GMT",
5
+ "date": "Wed, 31 May 2023 06:42:57 GMT",
6
+ "tag": "@fluentui/react-label_v9.1.15",
7
+ "version": "9.1.15",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "seanmonahan@microsoft.com",
12
+ "package": "@fluentui/react-label",
13
+ "commit": "d640b972d7ac86bfb76ae6c6329f12cdd33b3b7c",
14
+ "comment": "chore: Update Griffel to v1.5.7."
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-label",
19
+ "comment": "Bump @fluentui/react-utilities to v9.9.2",
20
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-label",
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6",
26
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-label",
31
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22",
32
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "date": "Thu, 25 May 2023 10:00:48 GMT",
39
+ "tag": "@fluentui/react-label_v9.1.14",
40
+ "version": "9.1.14",
41
+ "comments": {
42
+ "patch": [
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui/react-label",
46
+ "comment": "Bump @fluentui/react-utilities to v9.9.1",
47
+ "commit": "8f7c1b7591b3e665ae39e1b22ab0f0b28fb795c4"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui/react-label",
52
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.5",
53
+ "commit": "8f7c1b7591b3e665ae39e1b22ab0f0b28fb795c4"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "date": "Wed, 24 May 2023 20:45:28 GMT",
6
60
  "tag": "@fluentui/react-label_v9.1.13",
7
61
  "version": "9.1.13",
8
62
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,34 @@
1
1
  # Change Log - @fluentui/react-label
2
2
 
3
- This log was last generated on Wed, 24 May 2023 20:42:40 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 31 May 2023 06:42:57 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.15)
8
+
9
+ Wed, 31 May 2023 06:42:57 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.14..@fluentui/react-label_v9.1.15)
11
+
12
+ ### Patches
13
+
14
+ - chore: Update Griffel to v1.5.7. ([PR #27925](https://github.com/microsoft/fluentui/pull/27925) by seanmonahan@microsoft.com)
15
+ - Bump @fluentui/react-utilities to v9.9.2 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
17
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
18
+
19
+ ## [9.1.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.14)
20
+
21
+ Thu, 25 May 2023 10:00:48 GMT
22
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.13..@fluentui/react-label_v9.1.14)
23
+
24
+ ### Patches
25
+
26
+ - Bump @fluentui/react-utilities to v9.9.1 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
27
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.5 ([PR #27988](https://github.com/microsoft/fluentui/pull/27988) by beachball)
28
+
7
29
  ## [9.1.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.13)
8
30
 
9
- Wed, 24 May 2023 20:42:40 GMT
31
+ Wed, 24 May 2023 20:45:28 GMT
10
32
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.12..@fluentui/react-label_v9.1.13)
11
33
 
12
34
  ### Patches
package/lib/Label.js CHANGED
@@ -1,2 +1 @@
1
1
  export * from './components/Label/index';
2
- //# sourceMappingURL=Label.js.map
package/lib/Label.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/Label.ts"],"sourcesContent":["export * from './components/Label/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"sources":["Label.ts"],"sourcesContent":["export * from './components/Label/index';\n"],"names":[],"mappings":"AAAA,cAAc,2BAA2B"}
@@ -5,12 +5,10 @@ import { useLabelStyles_unstable } from './useLabelStyles.styles';
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * A label component provides a title or name to a component.
8
- */
9
- export const Label = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useLabel_unstable(props, ref);
11
- useLabelStyles_unstable(state);
12
- useCustomStyleHook_unstable('useLabelStyles_unstable')(state);
13
- return renderLabel_unstable(state);
8
+ */ export const Label = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ const state = useLabel_unstable(props, ref);
10
+ useLabelStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useLabelStyles_unstable')(state);
12
+ return renderLabel_unstable(state);
14
13
  });
15
14
  Label.displayName = 'Label';
16
- //# sourceMappingURL=Label.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useLabel_unstable","renderLabel_unstable","useLabelStyles_unstable","useCustomStyleHook_unstable","Label","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/Label/Label.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles.styles';\nimport type { LabelProps } from './Label.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A label component provides a title or name to a component.\n */\nexport const Label: ForwardRefComponent<LabelProps> = React.forwardRef((props, ref) => {\n const state = useLabel_unstable(props, ref);\n\n useLabelStyles_unstable(state);\n\n useCustomStyleHook_unstable('useLabelStyles_unstable')(state);\n\n return renderLabel_unstable(state);\n});\n\nLabel.displayName = 'Label';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,iBAAiB,QAAQ;AAClC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,uBAAuB,QAAQ;AAGxC,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,KAAA,gBAAyCL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrF,MAAMC,KAAA,GAAQR,iBAAA,CAAkBM,KAAA,EAAOC,GAAA;EAEvCL,uBAAA,CAAwBM,KAAA;EAExBL,2BAAA,CAA4B,2BAA2BK,KAAA;EAEvD,OAAOP,oBAAA,CAAqBO,KAAA;AAC9B;AAEAJ,KAAA,CAAMK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Label.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles.styles';\nimport type { LabelProps } from './Label.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A label component provides a title or name to a component.\n */\nexport const Label: ForwardRefComponent<LabelProps> = React.forwardRef((props, ref) => {\n const state = useLabel_unstable(props, ref);\n\n useLabelStyles_unstable(state);\n\n useCustomStyleHook_unstable('useLabelStyles_unstable')(state);\n\n return renderLabel_unstable(state);\n});\n\nLabel.displayName = 'Label';\n"],"names":["React","useLabel_unstable","renderLabel_unstable","useLabelStyles_unstable","useCustomStyleHook_unstable","Label","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,0BAA0B;AAGlE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,sBAAyCL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACrF,MAAMC,QAAQR,kBAAkBM,OAAOC;IAEvCL,wBAAwBM;IAExBL,4BAA4B,2BAA2BK;IAEvD,OAAOP,qBAAqBO;AAC9B,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=Label.types.js.map
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/Label/Label.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Label Props\n */\nexport type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & {\n /**\n * Renders the label as disabled\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Displays an indicator that the label is for a required field. The required prop can be set to true to display\n * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.\n * @default false\n */\n required?: boolean | Slot<'span'>;\n\n /**\n * A label supports different sizes.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * A label supports regular and semibold fontweight.\n * @default regular\n */\n weight?: 'regular' | 'semibold';\n};\n\nexport type LabelSlots = {\n root: Slot<'label'>;\n required?: Slot<'span'>;\n};\n\n/**\n * State used in rendering Label\n */\nexport type LabelState = ComponentState<LabelSlots> & Required<Pick<LabelProps, 'disabled' | 'size' | 'weight'>>;\n"],"mappings":"AAAA"}
1
+ {"version":3,"sources":["Label.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Label Props\n */\nexport type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & {\n /**\n * Renders the label as disabled\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Displays an indicator that the label is for a required field. The required prop can be set to true to display\n * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.\n * @default false\n */\n required?: boolean | Slot<'span'>;\n\n /**\n * A label supports different sizes.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * A label supports regular and semibold fontweight.\n * @default regular\n */\n weight?: 'regular' | 'semibold';\n};\n\nexport type LabelSlots = {\n root: Slot<'label'>;\n required?: Slot<'span'>;\n};\n\n/**\n * State used in rendering Label\n */\nexport type LabelState = ComponentState<LabelSlots> & Required<Pick<LabelProps, 'disabled' | 'size' | 'weight'>>;\n"],"names":[],"mappings":"AAAA,WAwCiH"}
@@ -3,4 +3,3 @@ export * from './Label.types';
3
3
  export * from './renderLabel';
4
4
  export * from './useLabel';
5
5
  export * from './useLabelStyles.styles';
6
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/Label/index.ts"],"sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,0BAA0B"}
@@ -1,13 +1,8 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
2
  import { getSlotsNext } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of Label
5
- */
6
- export const renderLabel_unstable = state => {
7
- const {
8
- slots,
9
- slotProps
10
- } = getSlotsNext(state);
11
- return /*#__PURE__*/createElement(slots.root, slotProps.root, state.root.children, slots.required && /*#__PURE__*/createElement(slots.required, slotProps.required));
5
+ */ export const renderLabel_unstable = (state)=>{
6
+ const { slots , slotProps } = getSlotsNext(state);
7
+ return /*#__PURE__*/ createElement(slots.root, slotProps.root, state.root.children, slots.required && /*#__PURE__*/ createElement(slots.required, slotProps.required));
12
8
  };
13
- //# sourceMappingURL=renderLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createElement","getSlotsNext","renderLabel_unstable","state","slots","slotProps","root","children","required"],"sources":["../../../src/components/Label/renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { LabelState, LabelSlots } from './Label.types';\n\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel_unstable = (state: LabelState) => {\n const { slots, slotProps } = getSlotsNext<LabelSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.root.children}\n {slots.required && <slots.required {...slotProps.required} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,YAAY,QAAQ;AAG7B;;;AAGA,OAAO,MAAMC,oBAAA,GAAwBC,KAAA,IAAsB;EACzD,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,YAAA,CAAyBE,KAAA;EAEtD,oBACEH,aAdJ,CAcKI,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI,EAC3BH,KAAA,CAAMG,IAAI,CAACC,QAAQ,EACnBH,KAAA,CAAMI,QAAQ,iBAAIR,aAhBzB,CAgB0BI,KAAA,CAAMI,QAAQ,EAAKH,SAAA,CAAUG,QAAQ;AAG/D"}
1
+ {"version":3,"sources":["renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { LabelState, LabelSlots } from './Label.types';\n\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel_unstable = (state: LabelState) => {\n const { slots, slotProps } = getSlotsNext<LabelSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.root.children}\n {slots.required && <slots.required {...slotProps.required} />}\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","renderLabel_unstable","state","slots","slotProps","root","children","required"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC,QAAsB;IACzD,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAAyBE;IAEtD,qBACE,AAdJ,cAcKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAC3BH,MAAMG,IAAI,CAACC,QAAQ,EACnBH,MAAMI,QAAQ,kBAAI,AAhBzB,cAgB0BJ,MAAMI,QAAQ,EAAKH,UAAUG,QAAQ;AAG/D,EAAE"}
@@ -9,31 +9,24 @@ import { resolveShorthand } from '@fluentui/react-utilities';
9
9
  *
10
10
  * @param props - props from this instance of Label
11
11
  * @param ref - reference to root HTMLElement of Label
12
- */
13
- export const useLabel_unstable = (props, ref) => {
14
- const {
15
- disabled = false,
16
- required = false,
17
- weight = 'regular',
18
- size = 'medium'
19
- } = props;
20
- return {
21
- disabled,
22
- required: resolveShorthand(required === true ? '*' : required || undefined, {
23
- defaultProps: {
24
- 'aria-hidden': 'true'
25
- }
26
- }),
27
- weight,
28
- size,
29
- components: {
30
- root: 'label',
31
- required: 'span'
32
- },
33
- root: getNativeElementProps('label', {
34
- ref,
35
- ...props
36
- })
37
- };
12
+ */ export const useLabel_unstable = (props, ref)=>{
13
+ const { disabled =false , required =false , weight ='regular' , size ='medium' } = props;
14
+ return {
15
+ disabled,
16
+ required: resolveShorthand(required === true ? '*' : required || undefined, {
17
+ defaultProps: {
18
+ 'aria-hidden': 'true'
19
+ }
20
+ }),
21
+ weight,
22
+ size,
23
+ components: {
24
+ root: 'label',
25
+ required: 'span'
26
+ },
27
+ root: getNativeElementProps('label', {
28
+ ref,
29
+ ...props
30
+ })
31
+ };
38
32
  };
39
- //# sourceMappingURL=useLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getNativeElementProps","resolveShorthand","useLabel_unstable","props","ref","disabled","required","weight","size","undefined","defaultProps","components","root"],"sources":["../../../src/components/Label/useLabel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { LabelProps, LabelState } from './Label.types';\nimport { resolveShorthand } from '@fluentui/react-utilities';\n\n/**\n * Create the state required to render Label.\n *\n * The returned state can be modified with hooks such as useLabelStyles_unstable,\n * before being passed to renderLabel_unstable.\n *\n * @param props - props from this instance of Label\n * @param ref - reference to root HTMLElement of Label\n */\nexport const useLabel_unstable = (props: LabelProps, ref: React.Ref<HTMLElement>): LabelState => {\n const { disabled = false, required = false, weight = 'regular', size = 'medium' } = props;\n return {\n disabled,\n required: resolveShorthand(required === true ? '*' : required || undefined, {\n defaultProps: { 'aria-hidden': 'true' },\n }),\n weight,\n size,\n components: { root: 'label', required: 'span' },\n root: getNativeElementProps('label', { ref, ...props }),\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,QAAQ;AAEtC,SAASC,gBAAgB,QAAQ;AAEjC;;;;;;;;;AASA,OAAO,MAAMC,iBAAA,GAAoBA,CAACC,KAAA,EAAmBC,GAAA,KAA4C;EAC/F,MAAM;IAAEC,QAAA,GAAW,KAAK;IAAEC,QAAA,GAAW,KAAK;IAAEC,MAAA,GAAS;IAAWC,IAAA,GAAO;EAAQ,CAAE,GAAGL,KAAA;EACpF,OAAO;IACLE,QAAA;IACAC,QAAA,EAAUL,gBAAA,CAAiBK,QAAA,KAAa,IAAI,GAAG,MAAMA,QAAA,IAAYG,SAAS,EAAE;MAC1EC,YAAA,EAAc;QAAE,eAAe;MAAO;IACxC;IACAH,MAAA;IACAC,IAAA;IACAG,UAAA,EAAY;MAAEC,IAAA,EAAM;MAASN,QAAA,EAAU;IAAO;IAC9CM,IAAA,EAAMZ,qBAAA,CAAsB,SAAS;MAAEI,GAAA;MAAK,GAAGD;IAAM;EACvD;AACF"}
1
+ {"version":3,"sources":["useLabel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { LabelProps, LabelState } from './Label.types';\nimport { resolveShorthand } from '@fluentui/react-utilities';\n\n/**\n * Create the state required to render Label.\n *\n * The returned state can be modified with hooks such as useLabelStyles_unstable,\n * before being passed to renderLabel_unstable.\n *\n * @param props - props from this instance of Label\n * @param ref - reference to root HTMLElement of Label\n */\nexport const useLabel_unstable = (props: LabelProps, ref: React.Ref<HTMLElement>): LabelState => {\n const { disabled = false, required = false, weight = 'regular', size = 'medium' } = props;\n return {\n disabled,\n required: resolveShorthand(required === true ? '*' : required || undefined, {\n defaultProps: { 'aria-hidden': 'true' },\n }),\n weight,\n size,\n components: { root: 'label', required: 'span' },\n root: getNativeElementProps('label', { ref, ...props }),\n };\n};\n"],"names":["React","getNativeElementProps","resolveShorthand","useLabel_unstable","props","ref","disabled","required","weight","size","undefined","defaultProps","components","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC,MAA4C;IAC/F,MAAM,EAAEC,UAAW,KAAK,CAAA,EAAEC,UAAW,KAAK,CAAA,EAAEC,QAAS,UAAS,EAAEC,MAAO,SAAQ,EAAE,GAAGL;IACpF,OAAO;QACLE;QACAC,UAAUL,iBAAiBK,aAAa,IAAI,GAAG,MAAMA,YAAYG,SAAS,EAAE;YAC1EC,cAAc;gBAAE,eAAe;YAAO;QACxC;QACAH;QACAC;QACAG,YAAY;YAAEC,MAAM;YAASN,UAAU;QAAO;QAC9CM,MAAMZ,sBAAsB,SAAS;YAAEI;YAAK,GAAGD,KAAK;QAAC;IACvD;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","tokens","labelClassNames","root","required","useStyles","Bahqtrf","sj55zd","disabled","uwmqm3","requiredDisabled","small","Be2twd7","Bg96gwp","medium","large","Bhrd7zp","semibold","d","useLabelStyles_unstable","state","styles","className","size","weight"],"sources":["../../../src/components/Label/useLabelStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { LabelSlots, LabelState } from './Label.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const labelClassNames: SlotClassNames<LabelSlots> = {\n root: 'fui-Label',\n required: 'fui-Label__required',\n};\n\n/**\n * Styles for the label\n */\nconst useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1,\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: '4px', // TODO: Once spacing tokens are added, change this to Horizontal XS\n },\n\n requiredDisabled: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200,\n },\n\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n\n semibold: {\n fontWeight: tokens.fontWeightSemibold,\n },\n});\n\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = (state: LabelState): LabelState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n labelClassNames.root,\n styles.root,\n state.disabled && styles.disabled,\n styles[state.size],\n state.weight === 'semibold' && styles.semibold,\n state.root.className,\n );\n\n if (state.required) {\n state.required.className = mergeClasses(\n labelClassNames.required,\n styles.required,\n state.disabled && styles.requiredDisabled,\n state.required.className,\n );\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ;AACzC,SAASC,MAAM,QAAQ;AAIvB,OAAO,MAAMC,eAAA,GAA8C;EACzDC,IAAA,EAAM;EACNC,QAAA,EAAU;AACZ;AAEA;;;AAGA,MAAMC,SAAA,gBAAYN,QAAA;EAAAI,IAAA;IAAAG,OAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAD,MAAA;EAAA;EAAAH,QAAA;IAAAG,MAAA;IAAAE,MAAA;EAAA;EAAAC,gBAAA;IAAAH,MAAA;EAAA;EAAAI,KAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAF,OAAA;IAAAC,OAAA;EAAA;EAAAE,KAAA;IAAAH,OAAA;IAAAC,OAAA;IAAAG,OAAA;EAAA;EAAAC,QAAA;IAAAD,OAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,EAsClB;AAEA;;;AAGA,OAAO,MAAMC,uBAAA,GAA2BC,KAAA,IAAkC;EACxE,MAAMC,MAAA,GAAShB,SAAA;EACfe,KAAA,CAAMjB,IAAI,CAACmB,SAAS,GAAGtB,YAAA,CACrBE,eAAA,CAAgBC,IAAI,EACpBkB,MAAA,CAAOlB,IAAI,EACXiB,KAAA,CAAMZ,QAAQ,IAAIa,MAAA,CAAOb,QAAQ,EACjCa,MAAM,CAACD,KAAA,CAAMG,IAAI,CAAC,EAClBH,KAAA,CAAMI,MAAM,KAAK,cAAcH,MAAA,CAAOJ,QAAQ,EAC9CG,KAAA,CAAMjB,IAAI,CAACmB,SAAS;EAGtB,IAAIF,KAAA,CAAMhB,QAAQ,EAAE;IAClBgB,KAAA,CAAMhB,QAAQ,CAACkB,SAAS,GAAGtB,YAAA,CACzBE,eAAA,CAAgBE,QAAQ,EACxBiB,MAAA,CAAOjB,QAAQ,EACfgB,KAAA,CAAMZ,QAAQ,IAAIa,MAAA,CAAOX,gBAAgB,EACzCU,KAAA,CAAMhB,QAAQ,CAACkB,SAAS;EAE5B;EAEA,OAAOF,KAAA;AACT"}
1
+ {"version":3,"names":["__styles","mergeClasses","tokens","labelClassNames","root","required","useStyles","Bahqtrf","sj55zd","disabled","uwmqm3","requiredDisabled","small","Be2twd7","Bg96gwp","medium","large","Bhrd7zp","semibold","d","useLabelStyles_unstable","state","styles","className","size","weight"],"sources":["useLabelStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const labelClassNames = {\n root: 'fui-Label',\n required: 'fui-Label__required'\n};\n/**\n * Styles for the label\n */ const useStyles = makeStyles({\n root: {\n fontFamily: tokens.fontFamilyBase,\n color: tokens.colorNeutralForeground1\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled\n },\n required: {\n color: tokens.colorPaletteRedForeground3,\n paddingLeft: '4px'\n },\n requiredDisabled: {\n color: tokens.colorNeutralForegroundDisabled\n },\n small: {\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.lineHeightBase200\n },\n medium: {\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300\n },\n large: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n fontWeight: tokens.fontWeightSemibold\n },\n semibold: {\n fontWeight: tokens.fontWeightSemibold\n }\n});\n/**\n * Apply styling to the Label slots based on the state\n */ export const useLabelStyles_unstable = (state)=>{\n const styles = useStyles();\n state.root.className = mergeClasses(labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.weight === 'semibold' && styles.semibold, state.root.className);\n if (state.required) {\n state.required.className = mergeClasses(labelClassNames.required, styles.required, state.disabled && styles.requiredDisabled, state.required.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,eAAe,GAAG;EAC3BC,IAAI,EAAE,WAAW;EACjBC,QAAQ,EAAE;AACd,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGN,QAAA;EAAAI,IAAA;IAAAG,OAAA;IAAAC,MAAA;EAAA;EAAAC,QAAA;IAAAD,MAAA;EAAA;EAAAH,QAAA;IAAAG,MAAA;IAAAE,MAAA;EAAA;EAAAC,gBAAA;IAAAH,MAAA;EAAA;EAAAI,KAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAF,OAAA;IAAAC,OAAA;EAAA;EAAAE,KAAA;IAAAH,OAAA;IAAAC,OAAA;IAAAG,OAAA;EAAA;EAAAC,QAAA;IAAAD,OAAA;EAAA;AAAA;EAAAE,CAAA;AAAA,CA+BrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,uBAAuB,GAAIC,KAAK,IAAG;EAChD,MAAMC,MAAM,GAAGhB,SAAS,CAAC,CAAC;EAC1Be,KAAK,CAACjB,IAAI,CAACmB,SAAS,GAAGtB,YAAY,CAACE,eAAe,CAACC,IAAI,EAAEkB,MAAM,CAAClB,IAAI,EAAEiB,KAAK,CAACZ,QAAQ,IAAIa,MAAM,CAACb,QAAQ,EAAEa,MAAM,CAACD,KAAK,CAACG,IAAI,CAAC,EAAEH,KAAK,CAACI,MAAM,KAAK,UAAU,IAAIH,MAAM,CAACJ,QAAQ,EAAEG,KAAK,CAACjB,IAAI,CAACmB,SAAS,CAAC;EACnM,IAAIF,KAAK,CAAChB,QAAQ,EAAE;IAChBgB,KAAK,CAAChB,QAAQ,CAACkB,SAAS,GAAGtB,YAAY,CAACE,eAAe,CAACE,QAAQ,EAAEiB,MAAM,CAACjB,QAAQ,EAAEgB,KAAK,CAACZ,QAAQ,IAAIa,MAAM,CAACX,gBAAgB,EAAEU,KAAK,CAAChB,QAAQ,CAACkB,SAAS,CAAC;EAC3J;EACA,OAAOF,KAAK;AAChB,CAAC"}
package/lib/index.js CHANGED
@@ -1,2 +1 @@
1
1
  export { Label, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';
2
- //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Label","labelClassNames","renderLabel_unstable","useLabelStyles_unstable","useLabel_unstable"],"sources":["../src/index.ts"],"sourcesContent":["export { Label, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';\nexport type { LabelProps, LabelSlots, LabelState } from './Label';\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { Label, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';\nexport type { LabelProps, LabelSlots, LabelState } from './Label';\n"],"names":["Label","labelClassNames","renderLabel_unstable","useLabelStyles_unstable","useLabel_unstable"],"mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ,UAAU"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/Label/index"), exports);
7
- //# sourceMappingURL=Label.js.map
8
-
9
- //# sourceMappingURL=Label.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/Label.js"],"sourcesContent":["export * from './components/Label/index';\n//# sourceMappingURL=Label.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
1
+ {"version":3,"sources":["Label.js"],"sourcesContent":["export * from './components/Label/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -18,6 +18,4 @@ const Label = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
18
18
  (0, _reactSharedContexts.useCustomStyleHook_unstable)('useLabelStyles_unstable')(state);
19
19
  return (0, _renderLabel.renderLabel_unstable)(state);
20
20
  });
21
- Label.displayName = 'Label'; //# sourceMappingURL=Label.js.map
22
-
23
- //# sourceMappingURL=Label.js.map
21
+ Label.displayName = 'Label';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Label/Label.js"],"sourcesContent":["import * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A label component provides a title or name to a component.\n */\nexport const Label = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useLabel_unstable(props, ref);\n useLabelStyles_unstable(state);\n useCustomStyleHook_unstable('useLabelStyles_unstable')(state);\n return renderLabel_unstable(state);\n});\nLabel.displayName = 'Label';\n//# sourceMappingURL=Label.js.map"],"names":["Label","React","forwardRef","props","ref","state","useLabel_unstable","useLabelStyles_unstable","useCustomStyleHook_unstable","renderLabel_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;0BACW;6BACG;sCACG;qCACI;AAIrC,MAAMA,QAAQ,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACjE,MAAMC,QAAQC,IAAAA,2BAAiB,EAACH,OAAOC;IACvCG,IAAAA,6CAAuB,EAACF;IACxBG,IAAAA,gDAA2B,EAAC,2BAA2BH;IACvD,OAAOI,IAAAA,iCAAoB,EAACJ;AAC9B;AACAL,MAAMU,WAAW,GAAG,SACpB,iCAAiC"}
1
+ {"version":3,"sources":["Label.js"],"sourcesContent":["import * as React from 'react';\nimport { useLabel_unstable } from './useLabel';\nimport { renderLabel_unstable } from './renderLabel';\nimport { useLabelStyles_unstable } from './useLabelStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A label component provides a title or name to a component.\n */ export const Label = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useLabel_unstable(props, ref);\n useLabelStyles_unstable(state);\n useCustomStyleHook_unstable('useLabelStyles_unstable')(state);\n return renderLabel_unstable(state);\n});\nLabel.displayName = 'Label';\n"],"names":["Label","React","forwardRef","props","ref","state","useLabel_unstable","useLabelStyles_unstable","useCustomStyleHook_unstable","renderLabel_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;0BACW;6BACG;sCACG;qCACI;AAGjC,MAAMA,QAAQ,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAClE,MAAMC,QAAQC,IAAAA,2BAAiB,EAACH,OAAOC;IACvCG,IAAAA,6CAAuB,EAACF;IACxBG,IAAAA,gDAA2B,EAAC,2BAA2BH;IACvD,OAAOI,IAAAA,iCAAoB,EAACJ;AAChC;AACAL,MAAMU,WAAW,GAAG"}
@@ -2,6 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- //# sourceMappingURL=Label.types.js.map
6
-
7
- //# sourceMappingURL=Label.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Label/Label.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=Label.types.js.map"],"names":[],"mappings":";;;;CACA,uCAAuC"}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -8,6 +8,3 @@ _exportStar(require("./Label.types"), exports);
8
8
  _exportStar(require("./renderLabel"), exports);
9
9
  _exportStar(require("./useLabel"), exports);
10
10
  _exportStar(require("./useLabelStyles.styles"), exports);
11
- //# sourceMappingURL=index.js.map
12
-
13
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Label/index.js"],"sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
@@ -11,6 +11,4 @@ const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const renderLabel_unstable = (state)=>{
12
12
  const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
13
  return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, state.root.children, slots.required && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.required, slotProps.required));
14
- }; //# sourceMappingURL=renderLabel.js.map
15
-
16
- //# sourceMappingURL=renderLabel.js.map
14
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Label/renderLabel.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n return /*#__PURE__*/createElement(slots.root, slotProps.root, state.root.children, slots.required && /*#__PURE__*/createElement(slots.required, slotProps.required));\n};\n//# sourceMappingURL=renderLabel.js.map"],"names":["renderLabel_unstable","state","slots","slotProps","getSlotsNext","createElement","root","children","required"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,uBAAuBC,CAAAA,QAAS;IAC3C,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAEL,MAAMK,IAAI,CAACC,QAAQ,EAAEL,MAAMM,QAAQ,IAAI,WAAW,GAAEH,IAAAA,8BAAa,EAACH,MAAMM,QAAQ,EAAEL,UAAUK,QAAQ;AACpK,GACA,uCAAuC"}
1
+ {"version":3,"sources":["renderLabel.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Label\n */ export const renderLabel_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, state.root.children, slots.required && /*#__PURE__*/ createElement(slots.required, slotProps.required));\n};\n"],"names":["renderLabel_unstable","state","slots","slotProps","getSlotsNext","createElement","root","children","required"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,uBAAuB,CAACC,QAAQ;IAC7C,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAEL,MAAMK,IAAI,CAACC,QAAQ,EAAEL,MAAMM,QAAQ,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMM,QAAQ,EAAEL,UAAUK,QAAQ;AACxK"}
@@ -29,6 +29,4 @@ const useLabel_unstable = (props, ref)=>{
29
29
  ...props
30
30
  })
31
31
  };
32
- }; //# sourceMappingURL=useLabel.js.map
33
-
34
- //# sourceMappingURL=useLabel.js.map
32
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Label/useLabel.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { resolveShorthand } from '@fluentui/react-utilities';\n/**\n * Create the state required to render Label.\n *\n * The returned state can be modified with hooks such as useLabelStyles_unstable,\n * before being passed to renderLabel_unstable.\n *\n * @param props - props from this instance of Label\n * @param ref - reference to root HTMLElement of Label\n */\nexport const useLabel_unstable = (props, ref) => {\n const {\n disabled = false,\n required = false,\n weight = 'regular',\n size = 'medium'\n } = props;\n return {\n disabled,\n required: resolveShorthand(required === true ? '*' : required || undefined, {\n defaultProps: {\n 'aria-hidden': 'true'\n }\n }),\n weight,\n size,\n components: {\n root: 'label',\n required: 'span'\n },\n root: getNativeElementProps('label', {\n ref,\n ...props\n })\n };\n};\n//# sourceMappingURL=useLabel.js.map"],"names":["useLabel_unstable","props","ref","disabled","required","weight","size","resolveShorthand","undefined","defaultProps","components","root","getNativeElementProps"],"mappings":";;;;+BAYaA;;aAAAA;;;6DAZU;gCACe;AAW/B,MAAMA,oBAAoB,CAACC,OAAOC,MAAQ;IAC/C,MAAM,EACJC,UAAW,KAAK,CAAA,EAChBC,UAAW,KAAK,CAAA,EAChBC,QAAS,UAAS,EAClBC,MAAO,SAAQ,EAChB,GAAGL;IACJ,OAAO;QACLE;QACAC,UAAUG,IAAAA,gCAAgB,EAACH,aAAa,IAAI,GAAG,MAAMA,YAAYI,SAAS,EAAE;YAC1EC,cAAc;gBACZ,eAAe;YACjB;QACF;QACAJ;QACAC;QACAI,YAAY;YACVC,MAAM;YACNP,UAAU;QACZ;QACAO,MAAMC,IAAAA,qCAAqB,EAAC,SAAS;YACnCV;YACA,GAAGD,KAAK;QACV;IACF;AACF,GACA,oCAAoC"}
1
+ {"version":3,"sources":["useLabel.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { resolveShorthand } from '@fluentui/react-utilities';\n/**\n * Create the state required to render Label.\n *\n * The returned state can be modified with hooks such as useLabelStyles_unstable,\n * before being passed to renderLabel_unstable.\n *\n * @param props - props from this instance of Label\n * @param ref - reference to root HTMLElement of Label\n */ export const useLabel_unstable = (props, ref)=>{\n const { disabled =false , required =false , weight ='regular' , size ='medium' } = props;\n return {\n disabled,\n required: resolveShorthand(required === true ? '*' : required || undefined, {\n defaultProps: {\n 'aria-hidden': 'true'\n }\n }),\n weight,\n size,\n components: {\n root: 'label',\n required: 'span'\n },\n root: getNativeElementProps('label', {\n ref,\n ...props\n })\n };\n};\n"],"names":["useLabel_unstable","props","ref","disabled","required","weight","size","resolveShorthand","undefined","defaultProps","components","root","getNativeElementProps"],"mappings":";;;;+BAWiBA;;aAAAA;;;6DAXM;gCACe;AAU3B,MAAMA,oBAAoB,CAACC,OAAOC,MAAM;IAC/C,MAAM,EAAEC,UAAU,KAAK,CAAA,EAAGC,UAAU,KAAK,CAAA,EAAGC,QAAQ,UAAS,EAAGC,MAAM,SAAQ,EAAG,GAAGL;IACpF,OAAO;QACHE;QACAC,UAAUG,IAAAA,gCAAgB,EAACH,aAAa,IAAI,GAAG,MAAMA,YAAYI,SAAS,EAAE;YACxEC,cAAc;gBACV,eAAe;YACnB;QACJ;QACAJ;QACAC;QACAI,YAAY;YACRC,MAAM;YACNP,UAAU;QACd;QACAO,MAAMC,IAAAA,qCAAqB,EAAC,SAAS;YACjCV;YACA,GAAGD,KAAK;QACZ;IACJ;AACJ"}
@@ -78,5 +78,3 @@ const useLabelStyles_unstable = (state)=>{
78
78
  }
79
79
  return state;
80
80
  }; //# sourceMappingURL=useLabelStyles.styles.js.map
81
-
82
- //# sourceMappingURL=useLabelStyles.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Label/useLabelStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const labelClassNames = {\n root: 'fui-Label',\n required: 'fui-Label__required'\n};\n/**\n * Styles for the label\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bahqtrf: \"fk6fouc\",\n sj55zd: \"f19n0e5\"\n },\n disabled: {\n sj55zd: \"f1s2aq7o\"\n },\n required: {\n sj55zd: \"f1whyuy6\",\n uwmqm3: [\"fycuoez\", \"f8wuabp\"]\n },\n requiredDisabled: {\n sj55zd: \"f1s2aq7o\"\n },\n small: {\n Be2twd7: \"fy9rknc\",\n Bg96gwp: \"fwrc4pm\"\n },\n medium: {\n Be2twd7: \"fkhj508\",\n Bg96gwp: \"f1i3iumi\"\n },\n large: {\n Be2twd7: \"fod5ikn\",\n Bg96gwp: \"faaz57k\",\n Bhrd7zp: \"fl43uef\"\n },\n semibold: {\n Bhrd7zp: \"fl43uef\"\n }\n}, {\n d: [\".fk6fouc{font-family:var(--fontFamilyBase);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".f1whyuy6{color:var(--colorPaletteRedForeground3);}\", \".fycuoez{padding-left:4px;}\", \".f8wuabp{padding-right:4px;}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".fwrc4pm{line-height:var(--lineHeightBase200);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".faaz57k{line-height:var(--lineHeightBase400);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\"]\n});\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.weight === 'semibold' && styles.semibold, state.root.className);\n if (state.required) {\n state.required.className = mergeClasses(labelClassNames.required, styles.required, state.disabled && styles.requiredDisabled, state.required.className);\n }\n return state;\n};\n//# sourceMappingURL=useLabelStyles.styles.js.map"],"names":["labelClassNames","useLabelStyles_unstable","root","required","useStyles","__styles","Bahqtrf","sj55zd","disabled","uwmqm3","requiredDisabled","small","Be2twd7","Bg96gwp","medium","large","Bhrd7zp","semibold","d","state","styles","className","mergeClasses","size","weight"],"mappings":";;;;;;;;;;;IAEaA,eAAe,MAAfA;IA4CAC,uBAAuB,MAAvBA;;uBA9C0B;AAEhC,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,UAAU;AACZ;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCH,MAAM;QACJI,SAAS;QACTC,QAAQ;IACV;IACAC,UAAU;QACRD,QAAQ;IACV;IACAJ,UAAU;QACRI,QAAQ;QACRE,QAAQ;YAAC;YAAW;SAAU;IAChC;IACAC,kBAAkB;QAChBH,QAAQ;IACV;IACAI,OAAO;QACLC,SAAS;QACTC,SAAS;IACX;IACAC,QAAQ;QACNF,SAAS;QACTC,SAAS;IACX;IACAE,OAAO;QACLH,SAAS;QACTC,SAAS;QACTG,SAAS;IACX;IACAC,UAAU;QACRD,SAAS;IACX;AACF,GAAG;IACDE,GAAG;QAAC;QAAgD;QAAmD;QAA2D;QAAuD;QAA+B;QAAgC;QAA+C;QAAmD;QAA+C;QAAoD;QAA+C;QAAmD;KAAmD;AACpnB;AAIO,MAAMjB,0BAA0BkB,CAAAA,QAAS;IAC9C,MAAMC,SAAShB;IACfe,MAAMjB,IAAI,CAACmB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,gBAAgBE,IAAI,EAAEkB,OAAOlB,IAAI,EAAEiB,MAAMX,QAAQ,IAAIY,OAAOZ,QAAQ,EAAEY,MAAM,CAACD,MAAMI,IAAI,CAAC,EAAEJ,MAAMK,MAAM,KAAK,cAAcJ,OAAOH,QAAQ,EAAEE,MAAMjB,IAAI,CAACmB,SAAS;IAClM,IAAIF,MAAMhB,QAAQ,EAAE;QAClBgB,MAAMhB,QAAQ,CAACkB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,gBAAgBG,QAAQ,EAAEiB,OAAOjB,QAAQ,EAAEgB,MAAMX,QAAQ,IAAIY,OAAOV,gBAAgB,EAAES,MAAMhB,QAAQ,CAACkB,SAAS;IACxJ,CAAC;IACD,OAAOF;AACT,GACA,iDAAiD"}
1
+ {"version":3,"sources":["useLabelStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const labelClassNames = {\n root: 'fui-Label',\n required: 'fui-Label__required'\n};\n/**\n * Styles for the label\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bahqtrf: \"fk6fouc\",\n sj55zd: \"f19n0e5\"\n },\n disabled: {\n sj55zd: \"f1s2aq7o\"\n },\n required: {\n sj55zd: \"f1whyuy6\",\n uwmqm3: [\"fycuoez\", \"f8wuabp\"]\n },\n requiredDisabled: {\n sj55zd: \"f1s2aq7o\"\n },\n small: {\n Be2twd7: \"fy9rknc\",\n Bg96gwp: \"fwrc4pm\"\n },\n medium: {\n Be2twd7: \"fkhj508\",\n Bg96gwp: \"f1i3iumi\"\n },\n large: {\n Be2twd7: \"fod5ikn\",\n Bg96gwp: \"faaz57k\",\n Bhrd7zp: \"fl43uef\"\n },\n semibold: {\n Bhrd7zp: \"fl43uef\"\n }\n}, {\n d: [\".fk6fouc{font-family:var(--fontFamilyBase);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".f1whyuy6{color:var(--colorPaletteRedForeground3);}\", \".fycuoez{padding-left:4px;}\", \".f8wuabp{padding-right:4px;}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".fwrc4pm{line-height:var(--lineHeightBase200);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".faaz57k{line-height:var(--lineHeightBase400);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\"]\n});\n/**\n * Apply styling to the Label slots based on the state\n */\nexport const useLabelStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(labelClassNames.root, styles.root, state.disabled && styles.disabled, styles[state.size], state.weight === 'semibold' && styles.semibold, state.root.className);\n if (state.required) {\n state.required.className = mergeClasses(labelClassNames.required, styles.required, state.disabled && styles.requiredDisabled, state.required.className);\n }\n return state;\n};\n//# sourceMappingURL=useLabelStyles.styles.js.map"],"names":["labelClassNames","useLabelStyles_unstable","root","required","useStyles","__styles","Bahqtrf","sj55zd","disabled","uwmqm3","requiredDisabled","small","Be2twd7","Bg96gwp","medium","large","Bhrd7zp","semibold","d","state","styles","className","mergeClasses","size","weight"],"mappings":";;;;;;;;;;;IAEaA,eAAe,MAAfA;IA4CAC,uBAAuB,MAAvBA;;uBA9C0B;AAEhC,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,UAAU;AACZ;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCH,MAAM;QACJI,SAAS;QACTC,QAAQ;IACV;IACAC,UAAU;QACRD,QAAQ;IACV;IACAJ,UAAU;QACRI,QAAQ;QACRE,QAAQ;YAAC;YAAW;SAAU;IAChC;IACAC,kBAAkB;QAChBH,QAAQ;IACV;IACAI,OAAO;QACLC,SAAS;QACTC,SAAS;IACX;IACAC,QAAQ;QACNF,SAAS;QACTC,SAAS;IACX;IACAE,OAAO;QACLH,SAAS;QACTC,SAAS;QACTG,SAAS;IACX;IACAC,UAAU;QACRD,SAAS;IACX;AACF,GAAG;IACDE,GAAG;QAAC;QAAgD;QAAmD;QAA2D;QAAuD;QAA+B;QAAgC;QAA+C;QAAmD;QAA+C;QAAoD;QAA+C;QAAmD;KAAmD;AACpnB;AAIO,MAAMjB,0BAA0BkB,CAAAA,QAAS;IAC9C,MAAMC,SAAShB;IACfe,MAAMjB,IAAI,CAACmB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,gBAAgBE,IAAI,EAAEkB,OAAOlB,IAAI,EAAEiB,MAAMX,QAAQ,IAAIY,OAAOZ,QAAQ,EAAEY,MAAM,CAACD,MAAMI,IAAI,CAAC,EAAEJ,MAAMK,MAAM,KAAK,cAAcJ,OAAOH,QAAQ,EAAEE,MAAMjB,IAAI,CAACmB,SAAS;IAClM,IAAIF,MAAMhB,QAAQ,EAAE;QAClBgB,MAAMhB,QAAQ,CAACkB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,gBAAgBG,QAAQ,EAAEiB,OAAOjB,QAAQ,EAAEgB,MAAMX,QAAQ,IAAIY,OAAOV,gBAAgB,EAAES,MAAMhB,QAAQ,CAACkB,SAAS;IACxJ,CAAC;IACD,OAAOF;AACT,GACA,iDAAiD"}
@@ -16,6 +16,3 @@ _export(exports, {
16
16
  useLabel_unstable: ()=>_label.useLabel_unstable
17
17
  });
18
18
  const _label = require("./Label");
19
- //# sourceMappingURL=index.js.map
20
-
21
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Label, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';\n//# sourceMappingURL=index.js.map"],"names":["Label","labelClassNames","renderLabel_unstable","useLabelStyles_unstable","useLabel_unstable"],"mappings":";;;;;;;;;;;IAASA,KAAK,MAALA,YAAK;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;;uBAAQ;CACzG,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { Label, labelClassNames, renderLabel_unstable, useLabelStyles_unstable, useLabel_unstable } from './Label';\n"],"names":["Label","labelClassNames","renderLabel_unstable","useLabelStyles_unstable","useLabel_unstable"],"mappings":";;;;;;;;;;;IAASA,KAAK,MAALA,YAAK;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;;uBAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-label",
3
- "version": "9.1.13",
3
+ "version": "9.1.15",
4
4
  "description": "Fluent UI React Label component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -28,16 +28,16 @@
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
30
  "@fluentui/react-conformance": "*",
31
- "@fluentui/react-conformance-griffel": "9.0.0-beta.21",
31
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.22",
32
32
  "@fluentui/scripts-api-extractor": "*",
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
36
  "@fluentui/react-shared-contexts": "^9.5.0",
37
37
  "@fluentui/react-theme": "^9.1.8",
38
- "@fluentui/react-utilities": "^9.9.0",
39
- "@fluentui/react-jsx-runtime": "9.0.0-alpha.4",
40
- "@griffel/react": "^1.5.2",
38
+ "@fluentui/react-utilities": "^9.9.2",
39
+ "@fluentui/react-jsx-runtime": "9.0.0-alpha.6",
40
+ "@griffel/react": "^1.5.7",
41
41
  "@swc/helpers": "^0.4.14"
42
42
  },
43
43
  "peerDependencies": {