@fluentui/react-textarea 9.3.38 → 9.3.41
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 +124 -1
- package/CHANGELOG.md +42 -2
- package/lib/components/Textarea/useTextarea.js +1 -2
- package/lib/components/Textarea/useTextarea.js.map +1 -1
- package/lib-commonjs/components/Textarea/useTextarea.js +1 -2
- package/lib-commonjs/components/Textarea/useTextarea.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,130 @@
|
|
|
2
2
|
"name": "@fluentui/react-textarea",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 26 Sep 2023 17:44:18 GMT",
|
|
6
|
+
"tag": "@fluentui/react-textarea_v9.3.41",
|
|
7
|
+
"version": "9.3.41",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "yuanboxue@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-textarea",
|
|
13
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
|
|
14
|
+
"comment": "chore: trigger manual version bump after broken release"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-textarea",
|
|
19
|
+
"comment": "Bump @fluentui/react-field to v9.1.31",
|
|
20
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-textarea",
|
|
25
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.1",
|
|
26
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-textarea",
|
|
31
|
+
"comment": "Bump @fluentui/react-theme to v9.1.14",
|
|
32
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-textarea",
|
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.5",
|
|
38
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-textarea",
|
|
43
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
|
|
44
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Tue, 26 Sep 2023 15:31:44 GMT",
|
|
51
|
+
"tag": "@fluentui/react-textarea_v9.3.40",
|
|
52
|
+
"version": "9.3.40",
|
|
53
|
+
"comments": {
|
|
54
|
+
"patch": [
|
|
55
|
+
{
|
|
56
|
+
"author": "martinhochel@microsoft.com",
|
|
57
|
+
"package": "@fluentui/react-textarea",
|
|
58
|
+
"commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
|
|
59
|
+
"comment": "fix: bump swc core to mitigate transpilation memory leaks"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "@fluentui/react-textarea",
|
|
64
|
+
"comment": "Bump @fluentui/react-field to v9.1.30",
|
|
65
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"author": "beachball",
|
|
69
|
+
"package": "@fluentui/react-textarea",
|
|
70
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.0",
|
|
71
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"author": "beachball",
|
|
75
|
+
"package": "@fluentui/react-textarea",
|
|
76
|
+
"comment": "Bump @fluentui/react-theme to v9.1.13",
|
|
77
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"author": "beachball",
|
|
81
|
+
"package": "@fluentui/react-textarea",
|
|
82
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.4",
|
|
83
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"author": "beachball",
|
|
87
|
+
"package": "@fluentui/react-textarea",
|
|
88
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
|
|
89
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"date": "Wed, 20 Sep 2023 17:47:44 GMT",
|
|
96
|
+
"tag": "@fluentui/react-textarea_v9.3.39",
|
|
97
|
+
"version": "9.3.39",
|
|
98
|
+
"comments": {
|
|
99
|
+
"patch": [
|
|
100
|
+
{
|
|
101
|
+
"author": "martinhochel@microsoft.com",
|
|
102
|
+
"package": "@fluentui/react-textarea",
|
|
103
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0",
|
|
104
|
+
"comment": "chore: trigger manual version bump after broken release"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"author": "beachball",
|
|
108
|
+
"package": "@fluentui/react-textarea",
|
|
109
|
+
"comment": "Bump @fluentui/react-field to v9.1.29",
|
|
110
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"author": "beachball",
|
|
114
|
+
"package": "@fluentui/react-textarea",
|
|
115
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.8.1",
|
|
116
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"author": "beachball",
|
|
120
|
+
"package": "@fluentui/react-textarea",
|
|
121
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.10",
|
|
122
|
+
"commit": "41d0ed0376ad79f1f5f5c4c7487515a1c6be35f0"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"date": "Wed, 20 Sep 2023 14:59:53 GMT",
|
|
6
129
|
"tag": "@fluentui/react-textarea_v9.3.38",
|
|
7
130
|
"version": "9.3.38",
|
|
8
131
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,52 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-textarea
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 26 Sep 2023 17:44:18 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.3.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.41)
|
|
8
|
+
|
|
9
|
+
Tue, 26 Sep 2023 17:44:18 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.40..@fluentui/react-textarea_v9.3.41)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-field to v9.1.31 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
16
|
+
- Bump @fluentui/react-shared-contexts to v9.9.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
17
|
+
- Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
18
|
+
- Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
19
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
20
|
+
|
|
21
|
+
## [9.3.40](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.40)
|
|
22
|
+
|
|
23
|
+
Tue, 26 Sep 2023 15:31:44 GMT
|
|
24
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.39..@fluentui/react-textarea_v9.3.40)
|
|
25
|
+
|
|
26
|
+
### Patches
|
|
27
|
+
|
|
28
|
+
- fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
|
|
29
|
+
- Bump @fluentui/react-field to v9.1.30 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
30
|
+
- Bump @fluentui/react-shared-contexts to v9.9.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
31
|
+
- Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
32
|
+
- Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
33
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
34
|
+
|
|
35
|
+
## [9.3.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.39)
|
|
36
|
+
|
|
37
|
+
Wed, 20 Sep 2023 17:47:44 GMT
|
|
38
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.38..@fluentui/react-textarea_v9.3.39)
|
|
39
|
+
|
|
40
|
+
### Patches
|
|
41
|
+
|
|
42
|
+
- chore: trigger manual version bump after broken release ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by martinhochel@microsoft.com)
|
|
43
|
+
- Bump @fluentui/react-field to v9.1.29 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
|
|
44
|
+
- Bump @fluentui/react-shared-contexts to v9.8.1 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
|
|
45
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.10 ([PR #29197](https://github.com/microsoft/fluentui/pull/29197) by beachball)
|
|
46
|
+
|
|
7
47
|
## [9.3.38](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.38)
|
|
8
48
|
|
|
9
|
-
Wed, 20 Sep 2023 14:
|
|
49
|
+
Wed, 20 Sep 2023 14:59:53 GMT
|
|
10
50
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.37..@fluentui/react-textarea_v9.3.38)
|
|
11
51
|
|
|
12
52
|
### 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
|
-
|
|
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;
|
|
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
|
-
|
|
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
|
|
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.
|
|
3
|
+
"version": "9.3.41",
|
|
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.
|
|
37
|
-
"@fluentui/react-shared-contexts": "^9.
|
|
38
|
-
"@fluentui/react-theme": "^9.1.
|
|
39
|
-
"@fluentui/react-utilities": "^9.13.
|
|
40
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
36
|
+
"@fluentui/react-field": "^9.1.31",
|
|
37
|
+
"@fluentui/react-shared-contexts": "^9.9.1",
|
|
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
|
},
|