@fluentui/react-field 0.0.0-nightly-20231013-0415.1 → 0.0.0-nightly-20231016-0417.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-field",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 13 Oct 2023 04:22:35 GMT",
6
- "tag": "@fluentui/react-field_v0.0.0-nightly-20231013-0415.1",
7
- "version": "0.0.0-nightly-20231013-0415.1",
5
+ "date": "Mon, 16 Oct 2023 04:24:29 GMT",
6
+ "tag": "@fluentui/react-field_v0.0.0-nightly-20231016-0417.1",
7
+ "version": "0.0.0-nightly-20231016-0417.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,44 +16,44 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-field",
19
- "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20231013-0415.1",
20
- "commit": "2bfb7d28d93633dacbc12ff4c9782be7113a0b87"
19
+ "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20231016-0417.1",
20
+ "commit": "9ae318a652ff9867244c91fc0c1e63ab1d2d756e"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-field",
25
- "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20231013-0415.1",
26
- "commit": "2bfb7d28d93633dacbc12ff4c9782be7113a0b87"
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20231016-0417.1",
26
+ "commit": "9ae318a652ff9867244c91fc0c1e63ab1d2d756e"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-field",
31
- "comment": "Bump @fluentui/react-label to v0.0.0-nightly-20231013-0415.1",
32
- "commit": "2bfb7d28d93633dacbc12ff4c9782be7113a0b87"
31
+ "comment": "Bump @fluentui/react-label to v0.0.0-nightly-20231016-0417.1",
32
+ "commit": "9ae318a652ff9867244c91fc0c1e63ab1d2d756e"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-field",
37
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20231013-0415.1",
38
- "commit": "2bfb7d28d93633dacbc12ff4c9782be7113a0b87"
37
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20231016-0417.1",
38
+ "commit": "9ae318a652ff9867244c91fc0c1e63ab1d2d756e"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-field",
43
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20231013-0415.1",
44
- "commit": "2bfb7d28d93633dacbc12ff4c9782be7113a0b87"
43
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20231016-0417.1",
44
+ "commit": "9ae318a652ff9867244c91fc0c1e63ab1d2d756e"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-field",
49
- "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20231013-0415.1",
50
- "commit": "2bfb7d28d93633dacbc12ff4c9782be7113a0b87"
49
+ "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20231016-0417.1",
50
+ "commit": "9ae318a652ff9867244c91fc0c1e63ab1d2d756e"
51
51
  },
52
52
  {
53
53
  "author": "beachball",
54
54
  "package": "@fluentui/react-field",
55
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20231013-0415.1",
56
- "commit": "2bfb7d28d93633dacbc12ff4c9782be7113a0b87"
55
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20231016-0417.1",
56
+ "commit": "9ae318a652ff9867244c91fc0c1e63ab1d2d756e"
57
57
  }
58
58
  ]
59
59
  }
package/CHANGELOG.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # Change Log - @fluentui/react-field
2
2
 
3
- This log was last generated on Fri, 13 Oct 2023 04:22:35 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 16 Oct 2023 04:24:29 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20231013-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-field_v0.0.0-nightly-20231013-0415.1)
7
+ ## [0.0.0-nightly-20231016-0417.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-field_v0.0.0-nightly-20231016-0417.1)
8
8
 
9
- Fri, 13 Oct 2023 04:22:35 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-field_v9.1.37..@fluentui/react-field_v0.0.0-nightly-20231013-0415.1)
9
+ Mon, 16 Oct 2023 04:24:29 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-field_v9.1.37..@fluentui/react-field_v0.0.0-nightly-20231016-0417.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-context-selector to v0.0.0-nightly-20231013-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/2bfb7d28d93633dacbc12ff4c9782be7113a0b87) by beachball)
16
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20231013-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/2bfb7d28d93633dacbc12ff4c9782be7113a0b87) by beachball)
17
- - Bump @fluentui/react-label to v0.0.0-nightly-20231013-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/2bfb7d28d93633dacbc12ff4c9782be7113a0b87) by beachball)
18
- - Bump @fluentui/react-theme to v0.0.0-nightly-20231013-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/2bfb7d28d93633dacbc12ff4c9782be7113a0b87) by beachball)
19
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20231013-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/2bfb7d28d93633dacbc12ff4c9782be7113a0b87) by beachball)
20
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20231013-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/2bfb7d28d93633dacbc12ff4c9782be7113a0b87) by beachball)
21
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20231013-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/2bfb7d28d93633dacbc12ff4c9782be7113a0b87) by beachball)
15
+ - Bump @fluentui/react-context-selector to v0.0.0-nightly-20231016-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/9ae318a652ff9867244c91fc0c1e63ab1d2d756e) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20231016-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/9ae318a652ff9867244c91fc0c1e63ab1d2d756e) by beachball)
17
+ - Bump @fluentui/react-label to v0.0.0-nightly-20231016-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/9ae318a652ff9867244c91fc0c1e63ab1d2d756e) by beachball)
18
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20231016-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/9ae318a652ff9867244c91fc0c1e63ab1d2d756e) by beachball)
19
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20231016-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/9ae318a652ff9867244c91fc0c1e63ab1d2d756e) by beachball)
20
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20231016-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/9ae318a652ff9867244c91fc0c1e63ab1d2d756e) by beachball)
21
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20231016-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/9ae318a652ff9867244c91fc0c1e63ab1d2d756e) by beachball)
22
22
 
23
23
  ## [9.1.37](https://github.com/microsoft/fluentui/tree/@fluentui/react-field_v9.1.37)
24
24
 
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { CheckmarkCircle12Filled, ErrorCircle12Filled, Warning12Filled } from '@fluentui/react-icons';
3
3
  import { Label } from '@fluentui/react-label';
4
- import { getNativeElementProps, useId, slot } from '@fluentui/react-utilities';
4
+ import { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';
5
5
  const validationMessageIcons = {
6
6
  error: /*#__PURE__*/ React.createElement(ErrorCircle12Filled, null),
7
7
  warning: /*#__PURE__*/ React.createElement(Warning12Filled, null),
@@ -20,7 +20,7 @@ const validationMessageIcons = {
20
20
  const { children, orientation = 'vertical', required = false, validationState = props.validationMessage ? 'error' : 'none', size = 'medium' } = props;
21
21
  const baseId = useId('field-');
22
22
  const generatedControlId = baseId + '__control';
23
- const root = slot.always(getNativeElementProps('div', {
23
+ const root = slot.always(getIntrinsicElementProps('div', {
24
24
  ...props,
25
25
  ref
26
26
  }, /*excludedPropNames:*/ [
@@ -1 +1 @@
1
- {"version":3,"sources":["useField.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { CheckmarkCircle12Filled, ErrorCircle12Filled, Warning12Filled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getNativeElementProps, useId, slot } from '@fluentui/react-utilities';\nimport type { FieldProps, FieldState } from './Field.types';\n\nconst validationMessageIcons = {\n error: <ErrorCircle12Filled />,\n warning: <Warning12Filled />,\n success: <CheckmarkCircle12Filled />,\n none: undefined,\n} as const;\n\n/**\n * Create the state required to render Field.\n *\n * The returned state can be modified with hooks such as useFieldStyles_unstable,\n * before being passed to renderField_unstable.\n *\n * @param props - Props passed to this field\n * @param ref - Ref to the root\n */\nexport const useField_unstable = (props: FieldProps, ref: React.Ref<HTMLDivElement>): FieldState => {\n const {\n children,\n orientation = 'vertical',\n required = false,\n validationState = props.validationMessage ? 'error' : 'none',\n size = 'medium',\n } = props;\n\n const baseId = useId('field-');\n const generatedControlId = baseId + '__control';\n\n const root = slot.always(getNativeElementProps('div', { ...props, ref }, /*excludedPropNames:*/ ['children']), {\n elementType: 'div',\n });\n const label = slot.optional(props.label, {\n defaultProps: { htmlFor: generatedControlId, id: baseId + '__label', required, size },\n elementType: Label,\n });\n const validationMessage = slot.optional(props.validationMessage, {\n defaultProps: { id: baseId + '__validationMessage', role: validationState === 'error' ? 'alert' : undefined },\n elementType: 'div',\n });\n const hint = slot.optional(props.hint, { defaultProps: { id: baseId + '__hint' }, elementType: 'div' });\n const defaultIcon = validationMessageIcons[validationState];\n const validationMessageIcon = slot.optional(props.validationMessageIcon, {\n renderByDefault: !!defaultIcon,\n defaultProps: { children: defaultIcon },\n elementType: 'span',\n });\n return {\n children,\n generatedControlId,\n orientation,\n required,\n size,\n validationState,\n components: { root: 'div', label: Label, validationMessage: 'div', validationMessageIcon: 'span', hint: 'div' },\n root,\n label,\n validationMessageIcon,\n validationMessage,\n hint,\n };\n};\n"],"names":["React","CheckmarkCircle12Filled","ErrorCircle12Filled","Warning12Filled","Label","getNativeElementProps","useId","slot","validationMessageIcons","error","warning","success","none","undefined","useField_unstable","props","ref","children","orientation","required","validationState","validationMessage","size","baseId","generatedControlId","root","always","elementType","label","optional","defaultProps","htmlFor","id","role","hint","defaultIcon","validationMessageIcon","renderByDefault","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,uBAAuB,EAAEC,mBAAmB,EAAEC,eAAe,QAAQ,wBAAwB;AACtG,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,qBAAqB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAG/E,MAAMC,yBAAyB;IAC7BC,qBAAO,oBAACP;IACRQ,uBAAS,oBAACP;IACVQ,uBAAS,oBAACV;IACVW,MAAMC;AACR;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EACJC,QAAQ,EACRC,cAAc,UAAU,EACxBC,WAAW,KAAK,EAChBC,kBAAkBL,MAAMM,iBAAiB,GAAG,UAAU,MAAM,EAC5DC,OAAO,QAAQ,EAChB,GAAGP;IAEJ,MAAMQ,SAASjB,MAAM;IACrB,MAAMkB,qBAAqBD,SAAS;IAEpC,MAAME,OAAOlB,KAAKmB,MAAM,CAACrB,sBAAsB,OAAO;QAAE,GAAGU,KAAK;QAAEC;IAAI,GAAG,oBAAoB,GAAG;QAAC;KAAW,GAAG;QAC7GW,aAAa;IACf;IACA,MAAMC,QAAQrB,KAAKsB,QAAQ,CAACd,MAAMa,KAAK,EAAE;QACvCE,cAAc;YAAEC,SAASP;YAAoBQ,IAAIT,SAAS;YAAWJ;YAAUG;QAAK;QACpFK,aAAavB;IACf;IACA,MAAMiB,oBAAoBd,KAAKsB,QAAQ,CAACd,MAAMM,iBAAiB,EAAE;QAC/DS,cAAc;YAAEE,IAAIT,SAAS;YAAuBU,MAAMb,oBAAoB,UAAU,UAAUP;QAAU;QAC5Gc,aAAa;IACf;IACA,MAAMO,OAAO3B,KAAKsB,QAAQ,CAACd,MAAMmB,IAAI,EAAE;QAAEJ,cAAc;YAAEE,IAAIT,SAAS;QAAS;QAAGI,aAAa;IAAM;IACrG,MAAMQ,cAAc3B,sBAAsB,CAACY,gBAAgB;IAC3D,MAAMgB,wBAAwB7B,KAAKsB,QAAQ,CAACd,MAAMqB,qBAAqB,EAAE;QACvEC,iBAAiB,CAAC,CAACF;QACnBL,cAAc;YAAEb,UAAUkB;QAAY;QACtCR,aAAa;IACf;IACA,OAAO;QACLV;QACAO;QACAN;QACAC;QACAG;QACAF;QACAkB,YAAY;YAAEb,MAAM;YAAOG,OAAOxB;YAAOiB,mBAAmB;YAAOe,uBAAuB;YAAQF,MAAM;QAAM;QAC9GT;QACAG;QACAQ;QACAf;QACAa;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useField.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { CheckmarkCircle12Filled, ErrorCircle12Filled, Warning12Filled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport type { FieldProps, FieldState } from './Field.types';\n\nconst validationMessageIcons = {\n error: <ErrorCircle12Filled />,\n warning: <Warning12Filled />,\n success: <CheckmarkCircle12Filled />,\n none: undefined,\n} as const;\n\n/**\n * Create the state required to render Field.\n *\n * The returned state can be modified with hooks such as useFieldStyles_unstable,\n * before being passed to renderField_unstable.\n *\n * @param props - Props passed to this field\n * @param ref - Ref to the root\n */\nexport const useField_unstable = (props: FieldProps, ref: React.Ref<HTMLDivElement>): FieldState => {\n const {\n children,\n orientation = 'vertical',\n required = false,\n validationState = props.validationMessage ? 'error' : 'none',\n size = 'medium',\n } = props;\n\n const baseId = useId('field-');\n const generatedControlId = baseId + '__control';\n\n const root = slot.always(getIntrinsicElementProps('div', { ...props, ref }, /*excludedPropNames:*/ ['children']), {\n elementType: 'div',\n });\n const label = slot.optional(props.label, {\n defaultProps: { htmlFor: generatedControlId, id: baseId + '__label', required, size },\n elementType: Label,\n });\n const validationMessage = slot.optional(props.validationMessage, {\n defaultProps: { id: baseId + '__validationMessage', role: validationState === 'error' ? 'alert' : undefined },\n elementType: 'div',\n });\n const hint = slot.optional(props.hint, { defaultProps: { id: baseId + '__hint' }, elementType: 'div' });\n const defaultIcon = validationMessageIcons[validationState];\n const validationMessageIcon = slot.optional(props.validationMessageIcon, {\n renderByDefault: !!defaultIcon,\n defaultProps: { children: defaultIcon },\n elementType: 'span',\n });\n return {\n children,\n generatedControlId,\n orientation,\n required,\n size,\n validationState,\n components: { root: 'div', label: Label, validationMessage: 'div', validationMessageIcon: 'span', hint: 'div' },\n root,\n label,\n validationMessageIcon,\n validationMessage,\n hint,\n };\n};\n"],"names":["React","CheckmarkCircle12Filled","ErrorCircle12Filled","Warning12Filled","Label","getIntrinsicElementProps","useId","slot","validationMessageIcons","error","warning","success","none","undefined","useField_unstable","props","ref","children","orientation","required","validationState","validationMessage","size","baseId","generatedControlId","root","always","elementType","label","optional","defaultProps","htmlFor","id","role","hint","defaultIcon","validationMessageIcon","renderByDefault","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,uBAAuB,EAAEC,mBAAmB,EAAEC,eAAe,QAAQ,wBAAwB;AACtG,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,wBAAwB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAGlF,MAAMC,yBAAyB;IAC7BC,qBAAO,oBAACP;IACRQ,uBAAS,oBAACP;IACVQ,uBAAS,oBAACV;IACVW,MAAMC;AACR;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EACJC,QAAQ,EACRC,cAAc,UAAU,EACxBC,WAAW,KAAK,EAChBC,kBAAkBL,MAAMM,iBAAiB,GAAG,UAAU,MAAM,EAC5DC,OAAO,QAAQ,EAChB,GAAGP;IAEJ,MAAMQ,SAASjB,MAAM;IACrB,MAAMkB,qBAAqBD,SAAS;IAEpC,MAAME,OAAOlB,KAAKmB,MAAM,CAACrB,yBAAyB,OAAO;QAAE,GAAGU,KAAK;QAAEC;IAAI,GAAG,oBAAoB,GAAG;QAAC;KAAW,GAAG;QAChHW,aAAa;IACf;IACA,MAAMC,QAAQrB,KAAKsB,QAAQ,CAACd,MAAMa,KAAK,EAAE;QACvCE,cAAc;YAAEC,SAASP;YAAoBQ,IAAIT,SAAS;YAAWJ;YAAUG;QAAK;QACpFK,aAAavB;IACf;IACA,MAAMiB,oBAAoBd,KAAKsB,QAAQ,CAACd,MAAMM,iBAAiB,EAAE;QAC/DS,cAAc;YAAEE,IAAIT,SAAS;YAAuBU,MAAMb,oBAAoB,UAAU,UAAUP;QAAU;QAC5Gc,aAAa;IACf;IACA,MAAMO,OAAO3B,KAAKsB,QAAQ,CAACd,MAAMmB,IAAI,EAAE;QAAEJ,cAAc;YAAEE,IAAIT,SAAS;QAAS;QAAGI,aAAa;IAAM;IACrG,MAAMQ,cAAc3B,sBAAsB,CAACY,gBAAgB;IAC3D,MAAMgB,wBAAwB7B,KAAKsB,QAAQ,CAACd,MAAMqB,qBAAqB,EAAE;QACvEC,iBAAiB,CAAC,CAACF;QACnBL,cAAc;YAAEb,UAAUkB;QAAY;QACtCR,aAAa;IACf;IACA,OAAO;QACLV;QACAO;QACAN;QACAC;QACAG;QACAF;QACAkB,YAAY;YAAEb,MAAM;YAAOG,OAAOxB;YAAOiB,mBAAmB;YAAOe,uBAAuB;YAAQF,MAAM;QAAM;QAC9GT;QACAG;QACAQ;QACAf;QACAa;IACF;AACF,EAAE"}
@@ -23,7 +23,7 @@ const useField_unstable = (props, ref)=>{
23
23
  const { children, orientation = 'vertical', required = false, validationState = props.validationMessage ? 'error' : 'none', size = 'medium' } = props;
24
24
  const baseId = (0, _reactutilities.useId)('field-');
25
25
  const generatedControlId = baseId + '__control';
26
- const root = _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', {
26
+ const root = _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
27
27
  ...props,
28
28
  ref
29
29
  }, /*excludedPropNames:*/ [
@@ -1 +1 @@
1
- {"version":3,"sources":["useField.js"],"sourcesContent":["import * as React from 'react';\nimport { CheckmarkCircle12Filled, ErrorCircle12Filled, Warning12Filled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getNativeElementProps, useId, slot } from '@fluentui/react-utilities';\nconst validationMessageIcons = {\n error: /*#__PURE__*/ React.createElement(ErrorCircle12Filled, null),\n warning: /*#__PURE__*/ React.createElement(Warning12Filled, null),\n success: /*#__PURE__*/ React.createElement(CheckmarkCircle12Filled, null),\n none: undefined\n};\n/**\n * Create the state required to render Field.\n *\n * The returned state can be modified with hooks such as useFieldStyles_unstable,\n * before being passed to renderField_unstable.\n *\n * @param props - Props passed to this field\n * @param ref - Ref to the root\n */ export const useField_unstable = (props, ref)=>{\n const { children, orientation = 'vertical', required = false, validationState = props.validationMessage ? 'error' : 'none', size = 'medium' } = props;\n const baseId = useId('field-');\n const generatedControlId = baseId + '__control';\n const root = slot.always(getNativeElementProps('div', {\n ...props,\n ref\n }, /*excludedPropNames:*/ [\n 'children'\n ]), {\n elementType: 'div'\n });\n const label = slot.optional(props.label, {\n defaultProps: {\n htmlFor: generatedControlId,\n id: baseId + '__label',\n required,\n size\n },\n elementType: Label\n });\n const validationMessage = slot.optional(props.validationMessage, {\n defaultProps: {\n id: baseId + '__validationMessage',\n role: validationState === 'error' ? 'alert' : undefined\n },\n elementType: 'div'\n });\n const hint = slot.optional(props.hint, {\n defaultProps: {\n id: baseId + '__hint'\n },\n elementType: 'div'\n });\n const defaultIcon = validationMessageIcons[validationState];\n const validationMessageIcon = slot.optional(props.validationMessageIcon, {\n renderByDefault: !!defaultIcon,\n defaultProps: {\n children: defaultIcon\n },\n elementType: 'span'\n });\n return {\n children,\n generatedControlId,\n orientation,\n required,\n size,\n validationState,\n components: {\n root: 'div',\n label: Label,\n validationMessage: 'div',\n validationMessageIcon: 'span',\n hint: 'div'\n },\n root,\n label,\n validationMessageIcon,\n validationMessage,\n hint\n };\n};\n"],"names":["useField_unstable","validationMessageIcons","error","React","createElement","ErrorCircle12Filled","warning","Warning12Filled","success","CheckmarkCircle12Filled","none","undefined","props","ref","children","orientation","required","validationState","validationMessage","size","baseId","useId","generatedControlId","root","slot","always","getNativeElementProps","elementType","label","optional","defaultProps","htmlFor","id","Label","role","hint","defaultIcon","validationMessageIcon","renderByDefault","components"],"mappings":";;;;+BAkBiBA;;;eAAAA;;;;iEAlBM;4BACuD;4BACxD;gCAC6B;AACnD,MAAMC,yBAAyB;IAC3BC,OAAO,WAAW,GAAGC,OAAMC,aAAa,CAACC,+BAAmB,EAAE;IAC9DC,SAAS,WAAW,GAAGH,OAAMC,aAAa,CAACG,2BAAe,EAAE;IAC5DC,SAAS,WAAW,GAAGL,OAAMC,aAAa,CAACK,mCAAuB,EAAE;IACpEC,MAAMC;AACV;AASW,MAAMX,oBAAoB,CAACY,OAAOC;IACzC,MAAM,EAAEC,QAAQ,EAAEC,cAAc,UAAU,EAAEC,WAAW,KAAK,EAAEC,kBAAkBL,MAAMM,iBAAiB,GAAG,UAAU,MAAM,EAAEC,OAAO,QAAQ,EAAE,GAAGP;IAChJ,MAAMQ,SAASC,IAAAA,qBAAK,EAAC;IACrB,MAAMC,qBAAqBF,SAAS;IACpC,MAAMG,OAAOC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;QAClD,GAAGd,KAAK;QACRC;IACJ,GAAG,oBAAoB,GAAG;QACtB;KACH,GAAG;QACAc,aAAa;IACjB;IACA,MAAMC,QAAQJ,oBAAI,CAACK,QAAQ,CAACjB,MAAMgB,KAAK,EAAE;QACrCE,cAAc;YACVC,SAAST;YACTU,IAAIZ,SAAS;YACbJ;YACAG;QACJ;QACAQ,aAAaM,iBAAK;IACtB;IACA,MAAMf,oBAAoBM,oBAAI,CAACK,QAAQ,CAACjB,MAAMM,iBAAiB,EAAE;QAC7DY,cAAc;YACVE,IAAIZ,SAAS;YACbc,MAAMjB,oBAAoB,UAAU,UAAUN;QAClD;QACAgB,aAAa;IACjB;IACA,MAAMQ,OAAOX,oBAAI,CAACK,QAAQ,CAACjB,MAAMuB,IAAI,EAAE;QACnCL,cAAc;YACVE,IAAIZ,SAAS;QACjB;QACAO,aAAa;IACjB;IACA,MAAMS,cAAcnC,sBAAsB,CAACgB,gBAAgB;IAC3D,MAAMoB,wBAAwBb,oBAAI,CAACK,QAAQ,CAACjB,MAAMyB,qBAAqB,EAAE;QACrEC,iBAAiB,CAAC,CAACF;QACnBN,cAAc;YACVhB,UAAUsB;QACd;QACAT,aAAa;IACjB;IACA,OAAO;QACHb;QACAQ;QACAP;QACAC;QACAG;QACAF;QACAsB,YAAY;YACRhB,MAAM;YACNK,OAAOK,iBAAK;YACZf,mBAAmB;YACnBmB,uBAAuB;YACvBF,MAAM;QACV;QACAZ;QACAK;QACAS;QACAnB;QACAiB;IACJ;AACJ"}
1
+ {"version":3,"sources":["useField.js"],"sourcesContent":["import * as React from 'react';\nimport { CheckmarkCircle12Filled, ErrorCircle12Filled, Warning12Filled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nconst validationMessageIcons = {\n error: /*#__PURE__*/ React.createElement(ErrorCircle12Filled, null),\n warning: /*#__PURE__*/ React.createElement(Warning12Filled, null),\n success: /*#__PURE__*/ React.createElement(CheckmarkCircle12Filled, null),\n none: undefined\n};\n/**\n * Create the state required to render Field.\n *\n * The returned state can be modified with hooks such as useFieldStyles_unstable,\n * before being passed to renderField_unstable.\n *\n * @param props - Props passed to this field\n * @param ref - Ref to the root\n */ export const useField_unstable = (props, ref)=>{\n const { children, orientation = 'vertical', required = false, validationState = props.validationMessage ? 'error' : 'none', size = 'medium' } = props;\n const baseId = useId('field-');\n const generatedControlId = baseId + '__control';\n const root = slot.always(getIntrinsicElementProps('div', {\n ...props,\n ref\n }, /*excludedPropNames:*/ [\n 'children'\n ]), {\n elementType: 'div'\n });\n const label = slot.optional(props.label, {\n defaultProps: {\n htmlFor: generatedControlId,\n id: baseId + '__label',\n required,\n size\n },\n elementType: Label\n });\n const validationMessage = slot.optional(props.validationMessage, {\n defaultProps: {\n id: baseId + '__validationMessage',\n role: validationState === 'error' ? 'alert' : undefined\n },\n elementType: 'div'\n });\n const hint = slot.optional(props.hint, {\n defaultProps: {\n id: baseId + '__hint'\n },\n elementType: 'div'\n });\n const defaultIcon = validationMessageIcons[validationState];\n const validationMessageIcon = slot.optional(props.validationMessageIcon, {\n renderByDefault: !!defaultIcon,\n defaultProps: {\n children: defaultIcon\n },\n elementType: 'span'\n });\n return {\n children,\n generatedControlId,\n orientation,\n required,\n size,\n validationState,\n components: {\n root: 'div',\n label: Label,\n validationMessage: 'div',\n validationMessageIcon: 'span',\n hint: 'div'\n },\n root,\n label,\n validationMessageIcon,\n validationMessage,\n hint\n };\n};\n"],"names":["useField_unstable","validationMessageIcons","error","React","createElement","ErrorCircle12Filled","warning","Warning12Filled","success","CheckmarkCircle12Filled","none","undefined","props","ref","children","orientation","required","validationState","validationMessage","size","baseId","useId","generatedControlId","root","slot","always","getIntrinsicElementProps","elementType","label","optional","defaultProps","htmlFor","id","Label","role","hint","defaultIcon","validationMessageIcon","renderByDefault","components"],"mappings":";;;;+BAkBiBA;;;eAAAA;;;;iEAlBM;4BACuD;4BACxD;gCACgC;AACtD,MAAMC,yBAAyB;IAC3BC,OAAO,WAAW,GAAGC,OAAMC,aAAa,CAACC,+BAAmB,EAAE;IAC9DC,SAAS,WAAW,GAAGH,OAAMC,aAAa,CAACG,2BAAe,EAAE;IAC5DC,SAAS,WAAW,GAAGL,OAAMC,aAAa,CAACK,mCAAuB,EAAE;IACpEC,MAAMC;AACV;AASW,MAAMX,oBAAoB,CAACY,OAAOC;IACzC,MAAM,EAAEC,QAAQ,EAAEC,cAAc,UAAU,EAAEC,WAAW,KAAK,EAAEC,kBAAkBL,MAAMM,iBAAiB,GAAG,UAAU,MAAM,EAAEC,OAAO,QAAQ,EAAE,GAAGP;IAChJ,MAAMQ,SAASC,IAAAA,qBAAK,EAAC;IACrB,MAAMC,qBAAqBF,SAAS;IACpC,MAAMG,OAAOC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;QACrD,GAAGd,KAAK;QACRC;IACJ,GAAG,oBAAoB,GAAG;QACtB;KACH,GAAG;QACAc,aAAa;IACjB;IACA,MAAMC,QAAQJ,oBAAI,CAACK,QAAQ,CAACjB,MAAMgB,KAAK,EAAE;QACrCE,cAAc;YACVC,SAAST;YACTU,IAAIZ,SAAS;YACbJ;YACAG;QACJ;QACAQ,aAAaM,iBAAK;IACtB;IACA,MAAMf,oBAAoBM,oBAAI,CAACK,QAAQ,CAACjB,MAAMM,iBAAiB,EAAE;QAC7DY,cAAc;YACVE,IAAIZ,SAAS;YACbc,MAAMjB,oBAAoB,UAAU,UAAUN;QAClD;QACAgB,aAAa;IACjB;IACA,MAAMQ,OAAOX,oBAAI,CAACK,QAAQ,CAACjB,MAAMuB,IAAI,EAAE;QACnCL,cAAc;YACVE,IAAIZ,SAAS;QACjB;QACAO,aAAa;IACjB;IACA,MAAMS,cAAcnC,sBAAsB,CAACgB,gBAAgB;IAC3D,MAAMoB,wBAAwBb,oBAAI,CAACK,QAAQ,CAACjB,MAAMyB,qBAAqB,EAAE;QACrEC,iBAAiB,CAAC,CAACF;QACnBN,cAAc;YACVhB,UAAUsB;QACd;QACAT,aAAa;IACjB;IACA,OAAO;QACHb;QACAQ;QACAP;QACAC;QACAG;QACAF;QACAsB,YAAY;YACRhB,MAAM;YACNK,OAAOK,iBAAK;YACZf,mBAAmB;YACnBmB,uBAAuB;YACvBF,MAAM;QACV;QACAZ;QACAK;QACAS;QACAnB;QACAiB;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-field",
3
- "version": "0.0.0-nightly-20231013-0415.1",
3
+ "version": "0.0.0-nightly-20231016-0417.1",
4
4
  "description": "Fluent UI Field components",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,18 +27,18 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
- "@fluentui/react-conformance": "0.0.0-nightly-20231013-0415.1",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20231013-0415.1",
30
+ "@fluentui/react-conformance": "0.0.0-nightly-20231016-0417.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20231016-0417.1",
32
32
  "@fluentui/scripts-api-extractor": "*",
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-context-selector": "0.0.0-nightly-20231013-0415.1",
36
+ "@fluentui/react-context-selector": "0.0.0-nightly-20231016-0417.1",
37
37
  "@fluentui/react-icons": "^2.0.217",
38
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20231013-0415.1",
39
- "@fluentui/react-label": "0.0.0-nightly-20231013-0415.1",
40
- "@fluentui/react-theme": "0.0.0-nightly-20231013-0415.1",
41
- "@fluentui/react-utilities": "0.0.0-nightly-20231013-0415.1",
38
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20231016-0417.1",
39
+ "@fluentui/react-label": "0.0.0-nightly-20231016-0417.1",
40
+ "@fluentui/react-theme": "0.0.0-nightly-20231016-0417.1",
41
+ "@fluentui/react-utilities": "0.0.0-nightly-20231016-0417.1",
42
42
  "@griffel/react": "^1.5.14",
43
43
  "@swc/helpers": "^0.5.1"
44
44
  },