@fluentui/react-textarea 9.3.39 → 9.3.42

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,7 +2,118 @@
2
2
  "name": "@fluentui/react-textarea",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 20 Sep 2023 17:40:51 GMT",
5
+ "date": "Mon, 02 Oct 2023 08:53:05 GMT",
6
+ "tag": "@fluentui/react-textarea_v9.3.42",
7
+ "version": "9.3.42",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-textarea",
13
+ "comment": "Bump @fluentui/react-field to v9.1.32",
14
+ "commit": "18ddec93bdb85a009bc1392058c52b2ea336340e"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-textarea",
19
+ "comment": "Bump @fluentui/react-shared-contexts to v9.9.2",
20
+ "commit": "18ddec93bdb85a009bc1392058c52b2ea336340e"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Tue, 26 Sep 2023 17:49:13 GMT",
27
+ "tag": "@fluentui/react-textarea_v9.3.41",
28
+ "version": "9.3.41",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "author": "yuanboxue@microsoft.com",
33
+ "package": "@fluentui/react-textarea",
34
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
35
+ "comment": "chore: trigger manual version bump after broken release"
36
+ },
37
+ {
38
+ "author": "beachball",
39
+ "package": "@fluentui/react-textarea",
40
+ "comment": "Bump @fluentui/react-field to v9.1.31",
41
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui/react-textarea",
46
+ "comment": "Bump @fluentui/react-shared-contexts to v9.9.1",
47
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui/react-textarea",
52
+ "comment": "Bump @fluentui/react-theme to v9.1.14",
53
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui/react-textarea",
58
+ "comment": "Bump @fluentui/react-utilities to v9.13.5",
59
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-textarea",
64
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
65
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
66
+ }
67
+ ]
68
+ }
69
+ },
70
+ {
71
+ "date": "Tue, 26 Sep 2023 15:31:44 GMT",
72
+ "tag": "@fluentui/react-textarea_v9.3.40",
73
+ "version": "9.3.40",
74
+ "comments": {
75
+ "patch": [
76
+ {
77
+ "author": "martinhochel@microsoft.com",
78
+ "package": "@fluentui/react-textarea",
79
+ "commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
80
+ "comment": "fix: bump swc core to mitigate transpilation memory leaks"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@fluentui/react-textarea",
85
+ "comment": "Bump @fluentui/react-field to v9.1.30",
86
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
87
+ },
88
+ {
89
+ "author": "beachball",
90
+ "package": "@fluentui/react-textarea",
91
+ "comment": "Bump @fluentui/react-shared-contexts to v9.9.0",
92
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
93
+ },
94
+ {
95
+ "author": "beachball",
96
+ "package": "@fluentui/react-textarea",
97
+ "comment": "Bump @fluentui/react-theme to v9.1.13",
98
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
99
+ },
100
+ {
101
+ "author": "beachball",
102
+ "package": "@fluentui/react-textarea",
103
+ "comment": "Bump @fluentui/react-utilities to v9.13.4",
104
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
105
+ },
106
+ {
107
+ "author": "beachball",
108
+ "package": "@fluentui/react-textarea",
109
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
110
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
111
+ }
112
+ ]
113
+ }
114
+ },
115
+ {
116
+ "date": "Wed, 20 Sep 2023 17:47:44 GMT",
6
117
  "tag": "@fluentui/react-textarea_v9.3.39",
7
118
  "version": "9.3.39",
8
119
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,50 @@
1
1
  # Change Log - @fluentui/react-textarea
2
2
 
3
- This log was last generated on Wed, 20 Sep 2023 17:40:51 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 02 Oct 2023 08:53:05 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.3.42](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.42)
8
+
9
+ Mon, 02 Oct 2023 08:53:05 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.41..@fluentui/react-textarea_v9.3.42)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-field to v9.1.32 ([PR #29351](https://github.com/microsoft/fluentui/pull/29351) by beachball)
15
+ - Bump @fluentui/react-shared-contexts to v9.9.2 ([PR #29351](https://github.com/microsoft/fluentui/pull/29351) by beachball)
16
+
17
+ ## [9.3.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.41)
18
+
19
+ Tue, 26 Sep 2023 17:49:13 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.40..@fluentui/react-textarea_v9.3.41)
21
+
22
+ ### Patches
23
+
24
+ - chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
25
+ - Bump @fluentui/react-field to v9.1.31 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
26
+ - Bump @fluentui/react-shared-contexts to v9.9.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
27
+ - Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
28
+ - Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
29
+ - Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
30
+
31
+ ## [9.3.40](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.40)
32
+
33
+ Tue, 26 Sep 2023 15:31:44 GMT
34
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.39..@fluentui/react-textarea_v9.3.40)
35
+
36
+ ### Patches
37
+
38
+ - fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
39
+ - Bump @fluentui/react-field to v9.1.30 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
40
+ - Bump @fluentui/react-shared-contexts to v9.9.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
41
+ - Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
42
+ - Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
43
+ - Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
44
+
7
45
  ## [9.3.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.39)
8
46
 
9
- Wed, 20 Sep 2023 17:40:51 GMT
47
+ Wed, 20 Sep 2023 17:47:44 GMT
10
48
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.38..@fluentui/react-textarea_v9.3.39)
11
49
 
12
50
  ### Patches
@@ -60,9 +60,8 @@ import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-co
60
60
  };
61
61
  state.textarea.value = value;
62
62
  state.textarea.onChange = useEventCallback((ev)=>{
63
- var _onChange;
64
63
  const newValue = ev.target.value;
65
- (_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(ev, {
64
+ onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
66
65
  value: newValue
67
66
  });
68
67
  setValue(newValue);
@@ -1 +1 @@
1
- {"version":3,"sources":["useTextarea.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';\nimport type { TextareaProps, TextareaState } from './Textarea.types';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Textarea.\n *\n * The returned state can be modified with hooks such as useTextareaStyles_unstable,\n * before being passed to renderTextarea_unstable.\n *\n * @param props - props from this instance of Textarea\n * @param ref - reference to root HTMLElement of Textarea\n */\nexport const useTextarea_unstable = (props: TextareaProps, ref: React.Ref<HTMLTextAreaElement>): TextareaState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, { supportsLabelFor: true, supportsRequired: true, supportsSize: true });\n\n const overrides = useOverrides();\n\n const {\n size = 'medium',\n appearance = overrides.inputDefaultAppearance ?? 'outline',\n resize = 'none',\n onChange,\n } = props;\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')\n ) {\n // eslint-disable-next-line no-console\n console.error(\n \"The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the\" +\n ' future.',\n );\n }\n\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: undefined,\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'textarea',\n excludedPropNames: ['onChange', 'value', 'defaultValue'],\n });\n\n const state: TextareaState = {\n size,\n appearance,\n resize,\n components: {\n root: 'span',\n textarea: 'textarea',\n },\n textarea: slot.always(props.textarea, {\n defaultProps: {\n ref,\n ...nativeProps.primary,\n },\n elementType: 'textarea',\n }),\n root: slot.always(props.root, {\n defaultProps: nativeProps.root,\n elementType: 'span',\n }),\n };\n\n state.textarea.value = value;\n state.textarea.onChange = useEventCallback(ev => {\n const newValue = ev.target.value;\n onChange?.(ev, { value: newValue });\n setValue(newValue);\n });\n\n return state;\n};\n"],"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","useControllableState","useEventCallback","slot","useOverrides_unstable","useOverrides","useTextarea_unstable","props","ref","supportsLabelFor","supportsRequired","supportsSize","overrides","size","appearance","inputDefaultAppearance","resize","onChange","process","env","NODE_ENV","console","error","value","setValue","state","defaultState","defaultValue","initialState","undefined","nativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","always","defaultProps","primary","elementType","ev","newValue","target"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,yBAAyB,EAAEC,oBAAoB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAEpH,SAASC,yBAAyBC,YAAY,QAAQ,kCAAkC;AAExF;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,+CAA+C;IAC/CD,QAAQR,8BAA8BQ,OAAO;QAAEE,kBAAkB;QAAMC,kBAAkB;QAAMC,cAAc;IAAK;IAElH,MAAMC,YAAYP;QAIHO;IAFf,MAAM,EACJC,OAAO,QAAQ,EACfC,aAAaF,CAAAA,oCAAAA,UAAUG,sBAAsB,cAAhCH,+CAAAA,oCAAoC,SAAS,EAC1DI,SAAS,MAAM,EACfC,QAAQ,EACT,GAAGV;IAEJ,IACEW,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBACxBN,CAAAA,eAAe,0BAA0BA,eAAe,uBAAsB,GAC/E;QACA,sCAAsC;QACtCO,QAAQC,KAAK,CACX,iHACE;IAEN;IAEA,MAAM,CAACC,OAAOC,SAAS,GAAGvB,qBAAqB;QAC7CwB,OAAOlB,MAAMgB,KAAK;QAClBG,cAAcnB,MAAMoB,YAAY;QAChCC,cAAcC;IAChB;IAEA,MAAMC,cAAc9B,0BAA0B;QAC5CO;QACAwB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAY;YAAS;SAAe;IAC1D;IAEA,MAAMP,QAAuB;QAC3BZ;QACAC;QACAE;QACAiB,YAAY;YACVC,MAAM;YACNC,UAAU;QACZ;QACAA,UAAUhC,KAAKiC,MAAM,CAAC7B,MAAM4B,QAAQ,EAAE;YACpCE,cAAc;gBACZ7B;gBACA,GAAGsB,YAAYQ,OAAO;YACxB;YACAC,aAAa;QACf;QACAL,MAAM/B,KAAKiC,MAAM,CAAC7B,MAAM2B,IAAI,EAAE;YAC5BG,cAAcP,YAAYI,IAAI;YAC9BK,aAAa;QACf;IACF;IAEAd,MAAMU,QAAQ,CAACZ,KAAK,GAAGA;IACvBE,MAAMU,QAAQ,CAAClB,QAAQ,GAAGf,iBAAiBsC,CAAAA;YAEzCvB;QADA,MAAMwB,WAAWD,GAAGE,MAAM,CAACnB,KAAK;SAChCN,YAAAA,sBAAAA,gCAAAA,UAAWuB,IAAI;YAAEjB,OAAOkB;QAAS;QACjCjB,SAASiB;IACX;IAEA,OAAOhB;AACT,EAAE"}
1
+ {"version":3,"sources":["useTextarea.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';\nimport type { TextareaProps, TextareaState } from './Textarea.types';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Textarea.\n *\n * The returned state can be modified with hooks such as useTextareaStyles_unstable,\n * before being passed to renderTextarea_unstable.\n *\n * @param props - props from this instance of Textarea\n * @param ref - reference to root HTMLElement of Textarea\n */\nexport const useTextarea_unstable = (props: TextareaProps, ref: React.Ref<HTMLTextAreaElement>): TextareaState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, { supportsLabelFor: true, supportsRequired: true, supportsSize: true });\n\n const overrides = useOverrides();\n\n const {\n size = 'medium',\n appearance = overrides.inputDefaultAppearance ?? 'outline',\n resize = 'none',\n onChange,\n } = props;\n\n if (\n process.env.NODE_ENV !== 'production' &&\n (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')\n ) {\n // eslint-disable-next-line no-console\n console.error(\n \"The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the\" +\n ' future.',\n );\n }\n\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: undefined,\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'textarea',\n excludedPropNames: ['onChange', 'value', 'defaultValue'],\n });\n\n const state: TextareaState = {\n size,\n appearance,\n resize,\n components: {\n root: 'span',\n textarea: 'textarea',\n },\n textarea: slot.always(props.textarea, {\n defaultProps: {\n ref,\n ...nativeProps.primary,\n },\n elementType: 'textarea',\n }),\n root: slot.always(props.root, {\n defaultProps: nativeProps.root,\n elementType: 'span',\n }),\n };\n\n state.textarea.value = value;\n state.textarea.onChange = useEventCallback(ev => {\n const newValue = ev.target.value;\n onChange?.(ev, { value: newValue });\n setValue(newValue);\n });\n\n return state;\n};\n"],"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","useControllableState","useEventCallback","slot","useOverrides_unstable","useOverrides","useTextarea_unstable","props","ref","supportsLabelFor","supportsRequired","supportsSize","overrides","size","appearance","inputDefaultAppearance","resize","onChange","process","env","NODE_ENV","console","error","value","setValue","state","defaultState","defaultValue","initialState","undefined","nativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","always","defaultProps","primary","elementType","ev","newValue","target"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,yBAAyB,EAAEC,oBAAoB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAEpH,SAASC,yBAAyBC,YAAY,QAAQ,kCAAkC;AAExF;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,+CAA+C;IAC/CD,QAAQR,8BAA8BQ,OAAO;QAAEE,kBAAkB;QAAMC,kBAAkB;QAAMC,cAAc;IAAK;IAElH,MAAMC,YAAYP;QAIHO;IAFf,MAAM,EACJC,OAAO,QAAQ,EACfC,aAAaF,CAAAA,oCAAAA,UAAUG,sBAAsB,cAAhCH,+CAAAA,oCAAoC,SAAS,EAC1DI,SAAS,MAAM,EACfC,QAAQ,EACT,GAAGV;IAEJ,IACEW,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBACxBN,CAAAA,eAAe,0BAA0BA,eAAe,uBAAsB,GAC/E;QACA,sCAAsC;QACtCO,QAAQC,KAAK,CACX,iHACE;IAEN;IAEA,MAAM,CAACC,OAAOC,SAAS,GAAGvB,qBAAqB;QAC7CwB,OAAOlB,MAAMgB,KAAK;QAClBG,cAAcnB,MAAMoB,YAAY;QAChCC,cAAcC;IAChB;IAEA,MAAMC,cAAc9B,0BAA0B;QAC5CO;QACAwB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAY;YAAS;SAAe;IAC1D;IAEA,MAAMP,QAAuB;QAC3BZ;QACAC;QACAE;QACAiB,YAAY;YACVC,MAAM;YACNC,UAAU;QACZ;QACAA,UAAUhC,KAAKiC,MAAM,CAAC7B,MAAM4B,QAAQ,EAAE;YACpCE,cAAc;gBACZ7B;gBACA,GAAGsB,YAAYQ,OAAO;YACxB;YACAC,aAAa;QACf;QACAL,MAAM/B,KAAKiC,MAAM,CAAC7B,MAAM2B,IAAI,EAAE;YAC5BG,cAAcP,YAAYI,IAAI;YAC9BK,aAAa;QACf;IACF;IAEAd,MAAMU,QAAQ,CAACZ,KAAK,GAAGA;IACvBE,MAAMU,QAAQ,CAAClB,QAAQ,GAAGf,iBAAiBsC,CAAAA;QACzC,MAAMC,WAAWD,GAAGE,MAAM,CAACnB,KAAK;QAChCN,qBAAAA,+BAAAA,SAAWuB,IAAI;YAAEjB,OAAOkB;QAAS;QACjCjB,SAASiB;IACX;IAEA,OAAOhB;AACT,EAAE"}
@@ -63,9 +63,8 @@ const useTextarea_unstable = (props, ref)=>{
63
63
  };
64
64
  state.textarea.value = value;
65
65
  state.textarea.onChange = (0, _reactutilities.useEventCallback)((ev)=>{
66
- var _onChange;
67
66
  const newValue = ev.target.value;
68
- (_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(ev, {
67
+ onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
69
68
  value: newValue
70
69
  });
71
70
  setValue(newValue);
@@ -1 +1 @@
1
- {"version":3,"sources":["useTextarea.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n/**\n * Create the state required to render Textarea.\n *\n * The returned state can be modified with hooks such as useTextareaStyles_unstable,\n * before being passed to renderTextarea_unstable.\n *\n * @param props - props from this instance of Textarea\n * @param ref - reference to root HTMLElement of Textarea\n */ export const useTextarea_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true,\n supportsSize: true\n });\n const overrides = useOverrides();\n var _overrides_inputDefaultAppearance;\n const { size = 'medium', appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline', resize = 'none', onChange } = props;\n if (process.env.NODE_ENV !== 'production' && (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')) {\n // eslint-disable-next-line no-console\n console.error(\"The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the\" + ' future.');\n }\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: undefined\n });\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'textarea',\n excludedPropNames: [\n 'onChange',\n 'value',\n 'defaultValue'\n ]\n });\n const state = {\n size,\n appearance,\n resize,\n components: {\n root: 'span',\n textarea: 'textarea'\n },\n textarea: slot.always(props.textarea, {\n defaultProps: {\n ref,\n ...nativeProps.primary\n },\n elementType: 'textarea'\n }),\n root: slot.always(props.root, {\n defaultProps: nativeProps.root,\n elementType: 'span'\n })\n };\n state.textarea.value = value;\n state.textarea.onChange = useEventCallback((ev)=>{\n var _onChange;\n const newValue = ev.target.value;\n (_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(ev, {\n value: newValue\n });\n setValue(newValue);\n });\n return state;\n};\n"],"names":["useTextarea_unstable","props","ref","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","supportsSize","overrides","useOverrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","resize","onChange","process","env","NODE_ENV","console","error","value","setValue","useControllableState","state","defaultState","defaultValue","initialState","undefined","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","slot","always","defaultProps","primary","elementType","useEventCallback","ev","_onChange","newValue","target"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;4BACuB;gCAC0C;qCAClC;AAS3C,MAAMA,uBAAuB,CAACC,OAAOC;IAC5C,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QACzCG,kBAAkB;QAClBC,kBAAkB;QAClBC,cAAc;IAClB;IACA,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EAAEC,OAAO,QAAQ,EAAEC,aAAa,AAACF,CAAAA,oCAAoCF,UAAUK,sBAAsB,AAAD,MAAO,QAAQH,sCAAsC,KAAK,IAAIA,oCAAoC,SAAS,EAAEI,SAAS,MAAM,EAAEC,QAAQ,EAAE,GAAGb;IACrP,IAAIc,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBAAiBN,CAAAA,eAAe,0BAA0BA,eAAe,uBAAsB,GAAI;QAC5H,sCAAsC;QACtCO,QAAQC,KAAK,CAAC,iHAAiH;IACnI;IACA,MAAM,CAACC,OAAOC,SAAS,GAAGC,IAAAA,oCAAoB,EAAC;QAC3CC,OAAOtB,MAAMmB,KAAK;QAClBI,cAAcvB,MAAMwB,YAAY;QAChCC,cAAcC;IAClB;IACA,MAAMC,cAAcC,IAAAA,yCAAyB,EAAC;QAC1C5B;QACA6B,oBAAoB;QACpBC,mBAAmB;YACf;YACA;YACA;SACH;IACL;IACA,MAAMR,QAAQ;QACVb;QACAC;QACAE;QACAmB,YAAY;YACRC,MAAM;YACNC,UAAU;QACd;QACAA,UAAUC,oBAAI,CAACC,MAAM,CAACnC,MAAMiC,QAAQ,EAAE;YAClCG,cAAc;gBACVnC;gBACA,GAAG0B,YAAYU,OAAO;YAC1B;YACAC,aAAa;QACjB;QACAN,MAAME,oBAAI,CAACC,MAAM,CAACnC,MAAMgC,IAAI,EAAE;YAC1BI,cAAcT,YAAYK,IAAI;YAC9BM,aAAa;QACjB;IACJ;IACAhB,MAAMW,QAAQ,CAACd,KAAK,GAAGA;IACvBG,MAAMW,QAAQ,CAACpB,QAAQ,GAAG0B,IAAAA,gCAAgB,EAAC,CAACC;QACxC,IAAIC;QACJ,MAAMC,WAAWF,GAAGG,MAAM,CAACxB,KAAK;QAC/BsB,CAAAA,YAAY5B,QAAO,MAAO,QAAQ4B,cAAc,KAAK,IAAI,KAAK,IAAIA,UAAUD,IAAI;YAC7ErB,OAAOuB;QACX;QACAtB,SAASsB;IACb;IACA,OAAOpB;AACX"}
1
+ {"version":3,"sources":["useTextarea.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useControllableState, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n/**\n * Create the state required to render Textarea.\n *\n * The returned state can be modified with hooks such as useTextareaStyles_unstable,\n * before being passed to renderTextarea_unstable.\n *\n * @param props - props from this instance of Textarea\n * @param ref - reference to root HTMLElement of Textarea\n */ export const useTextarea_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true,\n supportsSize: true\n });\n const overrides = useOverrides();\n var _overrides_inputDefaultAppearance;\n const { size = 'medium', appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline', resize = 'none', onChange } = props;\n if (process.env.NODE_ENV !== 'production' && (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')) {\n // eslint-disable-next-line no-console\n console.error(\"The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the\" + ' future.');\n }\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: undefined\n });\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'textarea',\n excludedPropNames: [\n 'onChange',\n 'value',\n 'defaultValue'\n ]\n });\n const state = {\n size,\n appearance,\n resize,\n components: {\n root: 'span',\n textarea: 'textarea'\n },\n textarea: slot.always(props.textarea, {\n defaultProps: {\n ref,\n ...nativeProps.primary\n },\n elementType: 'textarea'\n }),\n root: slot.always(props.root, {\n defaultProps: nativeProps.root,\n elementType: 'span'\n })\n };\n state.textarea.value = value;\n state.textarea.onChange = useEventCallback((ev)=>{\n const newValue = ev.target.value;\n onChange === null || onChange === void 0 ? void 0 : onChange(ev, {\n value: newValue\n });\n setValue(newValue);\n });\n return state;\n};\n"],"names":["useTextarea_unstable","props","ref","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","supportsSize","overrides","useOverrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","resize","onChange","process","env","NODE_ENV","console","error","value","setValue","useControllableState","state","defaultState","defaultValue","initialState","undefined","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","slot","always","defaultProps","primary","elementType","useEventCallback","ev","newValue","target"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;4BACuB;gCAC0C;qCAClC;AAS3C,MAAMA,uBAAuB,CAACC,OAAOC;IAC5C,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QACzCG,kBAAkB;QAClBC,kBAAkB;QAClBC,cAAc;IAClB;IACA,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EAAEC,OAAO,QAAQ,EAAEC,aAAa,AAACF,CAAAA,oCAAoCF,UAAUK,sBAAsB,AAAD,MAAO,QAAQH,sCAAsC,KAAK,IAAIA,oCAAoC,SAAS,EAAEI,SAAS,MAAM,EAAEC,QAAQ,EAAE,GAAGb;IACrP,IAAIc,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBAAiBN,CAAAA,eAAe,0BAA0BA,eAAe,uBAAsB,GAAI;QAC5H,sCAAsC;QACtCO,QAAQC,KAAK,CAAC,iHAAiH;IACnI;IACA,MAAM,CAACC,OAAOC,SAAS,GAAGC,IAAAA,oCAAoB,EAAC;QAC3CC,OAAOtB,MAAMmB,KAAK;QAClBI,cAAcvB,MAAMwB,YAAY;QAChCC,cAAcC;IAClB;IACA,MAAMC,cAAcC,IAAAA,yCAAyB,EAAC;QAC1C5B;QACA6B,oBAAoB;QACpBC,mBAAmB;YACf;YACA;YACA;SACH;IACL;IACA,MAAMR,QAAQ;QACVb;QACAC;QACAE;QACAmB,YAAY;YACRC,MAAM;YACNC,UAAU;QACd;QACAA,UAAUC,oBAAI,CAACC,MAAM,CAACnC,MAAMiC,QAAQ,EAAE;YAClCG,cAAc;gBACVnC;gBACA,GAAG0B,YAAYU,OAAO;YAC1B;YACAC,aAAa;QACjB;QACAN,MAAME,oBAAI,CAACC,MAAM,CAACnC,MAAMgC,IAAI,EAAE;YAC1BI,cAAcT,YAAYK,IAAI;YAC9BM,aAAa;QACjB;IACJ;IACAhB,MAAMW,QAAQ,CAACd,KAAK,GAAGA;IACvBG,MAAMW,QAAQ,CAACpB,QAAQ,GAAG0B,IAAAA,gCAAgB,EAAC,CAACC;QACxC,MAAMC,WAAWD,GAAGE,MAAM,CAACvB,KAAK;QAChCN,aAAa,QAAQA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAAS2B,IAAI;YAC7DrB,OAAOsB;QACX;QACArB,SAASqB;IACb;IACA,OAAOnB;AACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-textarea",
3
- "version": "9.3.39",
3
+ "version": "9.3.42",
4
4
  "description": "Fluent UI TextArea component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -33,11 +33,11 @@
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-field": "^9.1.29",
37
- "@fluentui/react-shared-contexts": "^9.8.1",
38
- "@fluentui/react-theme": "^9.1.12",
39
- "@fluentui/react-utilities": "^9.13.3",
40
- "@fluentui/react-jsx-runtime": "^9.0.10",
36
+ "@fluentui/react-field": "^9.1.32",
37
+ "@fluentui/react-shared-contexts": "^9.9.2",
38
+ "@fluentui/react-theme": "^9.1.14",
39
+ "@fluentui/react-utilities": "^9.13.5",
40
+ "@fluentui/react-jsx-runtime": "^9.0.12",
41
41
  "@griffel/react": "^1.5.14",
42
42
  "@swc/helpers": "^0.5.1"
43
43
  },