@fluentui/react-label 0.0.0-nightly-20230807-0415.1 → 0.0.0-nightly-20230809-0415.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-label",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 07 Aug 2023 04:22:32 GMT",
6
- "tag": "@fluentui/react-label_v0.0.0-nightly-20230807-0415.1",
7
- "version": "0.0.0-nightly-20230807-0415.1",
5
+ "date": "Wed, 09 Aug 2023 04:21:45 GMT",
6
+ "tag": "@fluentui/react-label_v0.0.0-nightly-20230809-0415.1",
7
+ "version": "0.0.0-nightly-20230809-0415.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,38 +16,38 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-label",
19
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230807-0415.1",
20
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
19
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230809-0415.1",
20
+ "commit": "08dd2480152cd21e536d2cdfcbb58d05cabc7971"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-label",
25
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230807-0415.1",
26
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
25
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230809-0415.1",
26
+ "commit": "08dd2480152cd21e536d2cdfcbb58d05cabc7971"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-label",
31
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230807-0415.1",
32
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
31
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230809-0415.1",
32
+ "commit": "08dd2480152cd21e536d2cdfcbb58d05cabc7971"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-label",
37
- "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230807-0415.1",
38
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
37
+ "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230809-0415.1",
38
+ "commit": "08dd2480152cd21e536d2cdfcbb58d05cabc7971"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-label",
43
- "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230807-0415.1",
44
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
43
+ "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230809-0415.1",
44
+ "commit": "08dd2480152cd21e536d2cdfcbb58d05cabc7971"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-label",
49
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230807-0415.1",
50
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
49
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230809-0415.1",
50
+ "commit": "08dd2480152cd21e536d2cdfcbb58d05cabc7971"
51
51
  }
52
52
  ]
53
53
  }
package/CHANGELOG.md CHANGED
@@ -1,23 +1,23 @@
1
1
  # Change Log - @fluentui/react-label
2
2
 
3
- This log was last generated on Mon, 07 Aug 2023 04:22:32 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 09 Aug 2023 04:21:45 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230807-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20230807-0415.1)
7
+ ## [0.0.0-nightly-20230809-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v0.0.0-nightly-20230809-0415.1)
8
8
 
9
- Mon, 07 Aug 2023 04:22:32 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.23..@fluentui/react-label_v0.0.0-nightly-20230807-0415.1)
9
+ Wed, 09 Aug 2023 04:21:45 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.1.23..@fluentui/react-label_v0.0.0-nightly-20230809-0415.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
16
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
17
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
18
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
19
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
20
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
15
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230809-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/08dd2480152cd21e536d2cdfcbb58d05cabc7971) by beachball)
16
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230809-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/08dd2480152cd21e536d2cdfcbb58d05cabc7971) by beachball)
17
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230809-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/08dd2480152cd21e536d2cdfcbb58d05cabc7971) by beachball)
18
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230809-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/08dd2480152cd21e536d2cdfcbb58d05cabc7971) by beachball)
19
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20230809-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/08dd2480152cd21e536d2cdfcbb58d05cabc7971) by beachball)
20
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230809-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/08dd2480152cd21e536d2cdfcbb58d05cabc7971) by beachball)
21
21
 
22
22
  ## [9.1.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.1.23)
23
23
 
@@ -1,8 +1,8 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of Label
5
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));
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ createElement(state.root, null, state.root.children, state.required && /*#__PURE__*/ createElement(state.required, null));
8
8
  };
@@ -1 +1 @@
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"}
1
+ {"version":3,"sources":["renderLabel.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } 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 assertSlots<LabelSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.required && <state.required />}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","renderLabel_unstable","state","root","children","required"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC,QAAsB;IACzDF,YAAwBE;IAExB,qBACE,AAdJ,cAcKA,MAAMC,IAAI,QACRD,MAAMC,IAAI,CAACC,QAAQ,EACnBF,MAAMG,QAAQ,kBAAI,AAhBzB,cAgB0BH,MAAMG,QAAQ;AAGxC,EAAE"}
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps } from '@fluentui/react-utilities';
3
- import { resolveShorthand } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
4
3
  /**
5
4
  * Create the state required to render Label.
6
5
  *
@@ -13,10 +12,11 @@ import { resolveShorthand } from '@fluentui/react-utilities';
13
12
  const { disabled =false , required =false , weight ='regular' , size ='medium' } = props;
14
13
  return {
15
14
  disabled,
16
- required: resolveShorthand(required === true ? '*' : required || undefined, {
15
+ required: slot.optional(required === true ? '*' : required || undefined, {
17
16
  defaultProps: {
18
17
  'aria-hidden': 'true'
19
- }
18
+ },
19
+ elementType: 'span'
20
20
  }),
21
21
  weight,
22
22
  size,
@@ -24,9 +24,11 @@ import { resolveShorthand } from '@fluentui/react-utilities';
24
24
  root: 'label',
25
25
  required: 'span'
26
26
  },
27
- root: getNativeElementProps('label', {
27
+ root: slot.always(getNativeElementProps('label', {
28
28
  ref,
29
29
  ...props
30
+ }), {
31
+ elementType: 'label'
30
32
  })
31
33
  };
32
34
  };
@@ -1 +1 @@
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
+ {"version":3,"sources":["useLabel.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport type { LabelProps, LabelState } from './Label.types';\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: slot.optional(required === true ? '*' : required || undefined, {\n defaultProps: { 'aria-hidden': 'true' },\n elementType: 'span',\n }),\n weight,\n size,\n components: { root: 'label', required: 'span' },\n root: slot.always(getNativeElementProps('label', { ref, ...props }), { elementType: 'label' }),\n };\n};\n"],"names":["React","getNativeElementProps","slot","useLabel_unstable","props","ref","disabled","required","weight","size","optional","undefined","defaultProps","elementType","components","root","always"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AAGxE;;;;;;;;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,KAAKQ,QAAQ,CAACH,aAAa,IAAI,GAAG,MAAMA,YAAYI,SAAS,EAAE;YACvEC,cAAc;gBAAE,eAAe;YAAO;YACtCC,aAAa;QACf;QACAL;QACAC;QACAK,YAAY;YAAEC,MAAM;YAASR,UAAU;QAAO;QAC9CQ,MAAMb,KAAKc,MAAM,CAACf,sBAAsB,SAAS;YAAEI;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAES,aAAa;QAAQ;IAC9F;AACF,EAAE"}
@@ -9,6 +9,6 @@ Object.defineProperty(exports, "renderLabel_unstable", {
9
9
  const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const renderLabel_unstable = (state)=>{
12
- const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, state.root.children, slots.required && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.required, slotProps.required));
12
+ (0, _reactUtilities.assertSlots)(state);
13
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, state.root.children, state.required && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.required, null));
14
14
  };
@@ -1 +1 @@
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"}
1
+ {"version":3,"sources":["renderLabel.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Label\n */ export const renderLabel_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, state.root.children, state.required && /*#__PURE__*/ createElement(state.required, null));\n};\n"],"names":["renderLabel_unstable","state","assertSlots","createElement","root","children","required"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACvD;AAGjB,MAAMA,uBAAuB,CAACC,QAAQ;IAC7CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,8BAAa,EAACF,MAAMG,IAAI,EAAE,IAAI,EAAEH,MAAMG,IAAI,CAACC,QAAQ,EAAEJ,MAAMK,QAAQ,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACF,MAAMK,QAAQ,EAAE,IAAI;AAChJ"}
@@ -13,10 +13,11 @@ const useLabel_unstable = (props, ref)=>{
13
13
  const { disabled =false , required =false , weight ='regular' , size ='medium' } = props;
14
14
  return {
15
15
  disabled,
16
- required: (0, _reactUtilities.resolveShorthand)(required === true ? '*' : required || undefined, {
16
+ required: _reactUtilities.slot.optional(required === true ? '*' : required || undefined, {
17
17
  defaultProps: {
18
18
  'aria-hidden': 'true'
19
- }
19
+ },
20
+ elementType: 'span'
20
21
  }),
21
22
  weight,
22
23
  size,
@@ -24,9 +25,11 @@ const useLabel_unstable = (props, ref)=>{
24
25
  root: 'label',
25
26
  required: 'span'
26
27
  },
27
- root: (0, _reactUtilities.getNativeElementProps)('label', {
28
+ root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('label', {
28
29
  ref,
29
30
  ...props
31
+ }), {
32
+ elementType: 'label'
30
33
  })
31
34
  };
32
35
  };
@@ -1 +1 @@
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"}
1
+ {"version":3,"sources":["useLabel.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } 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: slot.optional(required === true ? '*' : required || undefined, {\n defaultProps: {\n 'aria-hidden': 'true'\n },\n elementType: 'span'\n }),\n weight,\n size,\n components: {\n root: 'label',\n required: 'span'\n },\n root: slot.always(getNativeElementProps('label', {\n ref,\n ...props\n }), {\n elementType: 'label'\n })\n };\n};\n"],"names":["useLabel_unstable","props","ref","disabled","required","weight","size","slot","optional","undefined","defaultProps","elementType","components","root","always","getNativeElementProps"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;gCACqB;AASjC,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,oBAAI,CAACC,QAAQ,CAACJ,aAAa,IAAI,GAAG,MAAMA,YAAYK,SAAS,EAAE;YACrEC,cAAc;gBACV,eAAe;YACnB;YACAC,aAAa;QACjB;QACAN;QACAC;QACAM,YAAY;YACRC,MAAM;YACNT,UAAU;QACd;QACAS,MAAMN,oBAAI,CAACO,MAAM,CAACC,IAAAA,qCAAqB,EAAC,SAAS;YAC7Cb;YACA,GAAGD,KAAK;QACZ,IAAI;YACAU,aAAa;QACjB;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-label",
3
- "version": "0.0.0-nightly-20230807-0415.1",
3
+ "version": "0.0.0-nightly-20230809-0415.1",
4
4
  "description": "Fluent UI React Label component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,17 +27,17 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
- "@fluentui/react-conformance": "0.0.0-nightly-20230807-0415.1",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230807-0415.1",
30
+ "@fluentui/react-conformance": "0.0.0-nightly-20230809-0415.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230809-0415.1",
32
32
  "@fluentui/scripts-api-extractor": "*",
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230807-0415.1",
37
- "@fluentui/react-theme": "0.0.0-nightly-20230807-0415.1",
38
- "@fluentui/react-utilities": "0.0.0-nightly-20230807-0415.1",
39
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230807-0415.1",
40
- "@griffel/react": "^1.5.7",
36
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230809-0415.1",
37
+ "@fluentui/react-theme": "0.0.0-nightly-20230809-0415.1",
38
+ "@fluentui/react-utilities": "0.0.0-nightly-20230809-0415.1",
39
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230809-0415.1",
40
+ "@griffel/react": "^1.5.14",
41
41
  "@swc/helpers": "^0.4.14"
42
42
  },
43
43
  "peerDependencies": {