@fluentui/react-textarea 9.3.6 → 9.3.8
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 +34 -7
- package/CHANGELOG.md +17 -6
- package/lib/components/Textarea/useTextarea.js +7 -0
- package/lib/components/Textarea/useTextarea.js.map +1 -1
- package/lib-commonjs/components/Textarea/useTextarea.js +7 -0
- package/lib-commonjs/components/Textarea/useTextarea.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,22 +2,49 @@
|
|
|
2
2
|
"name": "@fluentui/react-textarea",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Thu,
|
|
6
|
-
"tag": "@fluentui/react-textarea_v9.3.
|
|
7
|
-
"version": "9.3.
|
|
5
|
+
"date": "Thu, 06 Apr 2023 23:59:54 GMT",
|
|
6
|
+
"tag": "@fluentui/react-textarea_v9.3.8",
|
|
7
|
+
"version": "9.3.8",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "behowell@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-textarea",
|
|
13
|
+
"commit": "eee5716e76dc6a5bef9316546a352694bbe5750a",
|
|
14
|
+
"comment": "chore: Update package version of react-field"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "behowell@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-textarea",
|
|
19
|
+
"commit": "5a8d7a29645b3b500eb7145d2e42ac34fcafc4c6",
|
|
20
|
+
"comment": "chore: Hook up FieldContext for use inside a Field"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-textarea",
|
|
25
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-beta.1",
|
|
26
|
+
"commit": "7a46cab3d31a233b89b7188e994b24712af5393c"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Tue, 04 Apr 2023 18:44:50 GMT",
|
|
33
|
+
"tag": "@fluentui/react-textarea_v9.3.7",
|
|
34
|
+
"version": "9.3.7",
|
|
8
35
|
"comments": {
|
|
9
36
|
"patch": [
|
|
10
37
|
{
|
|
11
38
|
"author": "beachball",
|
|
12
39
|
"package": "@fluentui/react-textarea",
|
|
13
|
-
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.
|
|
14
|
-
"commit": "
|
|
40
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.29",
|
|
41
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
15
42
|
},
|
|
16
43
|
{
|
|
17
44
|
"author": "beachball",
|
|
18
45
|
"package": "@fluentui/react-textarea",
|
|
19
|
-
"comment": "Bump @fluentui/react-
|
|
20
|
-
"commit": "
|
|
46
|
+
"comment": "Bump @fluentui/react-utilities to v9.7.3",
|
|
47
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
21
48
|
}
|
|
22
49
|
]
|
|
23
50
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-textarea
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
3
|
+
This log was last generated on Thu, 06 Apr 2023 23:59:54 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.3.
|
|
7
|
+
## [9.3.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.8)
|
|
8
8
|
|
|
9
|
-
Thu,
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.
|
|
9
|
+
Thu, 06 Apr 2023 23:59:54 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.7..@fluentui/react-textarea_v9.3.8)
|
|
11
11
|
|
|
12
12
|
### Patches
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
14
|
+
- chore: Update package version of react-field ([PR #27458](https://github.com/microsoft/fluentui/pull/27458) by behowell@microsoft.com)
|
|
15
|
+
- chore: Hook up FieldContext for use inside a Field ([PR #27399](https://github.com/microsoft/fluentui/pull/27399) by behowell@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-field to v9.0.0-beta.1 ([PR #27420](https://github.com/microsoft/fluentui/pull/27420) by beachball)
|
|
17
|
+
|
|
18
|
+
## [9.3.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.7)
|
|
19
|
+
|
|
20
|
+
Tue, 04 Apr 2023 18:44:50 GMT
|
|
21
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-textarea_v9.3.5..@fluentui/react-textarea_v9.3.7)
|
|
22
|
+
|
|
23
|
+
### Patches
|
|
24
|
+
|
|
25
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.29 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
26
|
+
- Bump @fluentui/react-utilities to v9.7.3 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
16
27
|
|
|
17
28
|
## [9.3.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-textarea_v9.3.5)
|
|
18
29
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { useFieldControlProps_unstable } from '@fluentui/react-field';
|
|
2
3
|
import { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback } from '@fluentui/react-utilities';
|
|
3
4
|
import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';
|
|
4
5
|
/**
|
|
@@ -11,6 +12,12 @@ import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-co
|
|
|
11
12
|
* @param ref - reference to root HTMLElement of Textarea
|
|
12
13
|
*/
|
|
13
14
|
export const useTextarea_unstable = (props, ref) => {
|
|
15
|
+
// Merge props from surrounding <Field>, if any
|
|
16
|
+
props = useFieldControlProps_unstable(props, {
|
|
17
|
+
supportsLabelFor: true,
|
|
18
|
+
supportsRequired: true,
|
|
19
|
+
supportsSize: true
|
|
20
|
+
});
|
|
14
21
|
const overrides = useOverrides();
|
|
15
22
|
var _overrides_inputDefaultAppearance;
|
|
16
23
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","getPartitionedNativeProps","resolveShorthand","useControllableState","useEventCallback","useOverrides_unstable","useOverrides","useTextarea_unstable","props","ref","overrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","resize","onChange","process","env","NODE_ENV","console","error","value","setValue","state","defaultState","defaultValue","initialState","undefined","nativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","required","defaultProps","primary","ev","newValue","target"],"sources":["../../../src/components/Textarea/useTextarea.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getPartitionedNativeProps,\n resolveShorthand,\n useControllableState,\n useEventCallback,\n} 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 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: resolveShorthand(props.textarea, {\n required: true,\n defaultProps: {\n ref,\n ...nativeProps.primary,\n },\n }),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root,\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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SACEC,yBAAyB,EACzBC,gBAAgB,EAChBC,oBAAoB,EACpBC,gBAAgB,QACX;AAEP,SAASC,qBAAA,IAAyBC,YAAY,QAAQ;AAEtD;;;;;;;;;AASA,OAAO,MAAMC,oBAAA,GAAuBA,CAACC,KAAA,EAAsBC,GAAA,KAAuD;EAChH,MAAMC,SAAA,
|
|
1
|
+
{"version":3,"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","resolveShorthand","useControllableState","useEventCallback","useOverrides_unstable","useOverrides","useTextarea_unstable","props","ref","supportsLabelFor","supportsRequired","supportsSize","overrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","resize","onChange","process","env","NODE_ENV","console","error","value","setValue","state","defaultState","defaultValue","initialState","undefined","nativeProps","primarySlotTagName","excludedPropNames","components","root","textarea","required","defaultProps","primary","ev","newValue","target"],"sources":["../../../src/components/Textarea/useTextarea.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport {\n getPartitionedNativeProps,\n resolveShorthand,\n useControllableState,\n useEventCallback,\n} 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: resolveShorthand(props.textarea, {\n required: true,\n defaultProps: {\n ref,\n ...nativeProps.primary,\n },\n }),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root,\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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,6BAA6B,QAAQ;AAC9C,SACEC,yBAAyB,EACzBC,gBAAgB,EAChBC,oBAAoB,EACpBC,gBAAgB,QACX;AAEP,SAASC,qBAAA,IAAyBC,YAAY,QAAQ;AAEtD;;;;;;;;;AASA,OAAO,MAAMC,oBAAA,GAAuBA,CAACC,KAAA,EAAsBC,GAAA,KAAuD;EAChH;EACAD,KAAA,GAAQR,6BAAA,CAA8BQ,KAAA,EAAO;IAAEE,gBAAA,EAAkB,IAAI;IAAEC,gBAAA,EAAkB,IAAI;IAAEC,YAAA,EAAc;EAAK;EAElH,MAAMC,SAAA,GAAYP,YAAA;MAIHQ,iCAAA;EAFf,MAAM;IACJC,IAAA,GAAO;IACPC,UAAA,GAAa,CAAAF,iCAAA,GAAAD,SAAA,CAAUI,sBAAsB,cAAhCH,iCAAA,cAAAA,iCAAA,GAAoC,SAAS;IAC1DI,MAAA,GAAS;IACTC;EAAQ,CACT,GAAGX,KAAA;EAEJ,IACEY,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,iBACxBN,UAAA,KAAe,0BAA0BA,UAAA,KAAe,uBAAsB,GAC/E;IACA;IACAO,OAAA,CAAQC,KAAK,CACX,iHACE;EAEN;EAEA,MAAM,CAACC,KAAA,EAAOC,QAAA,CAAS,GAAGvB,oBAAA,CAAqB;IAC7CwB,KAAA,EAAOnB,KAAA,CAAMiB,KAAK;IAClBG,YAAA,EAAcpB,KAAA,CAAMqB,YAAY;IAChCC,YAAA,EAAcC;EAChB;EAEA,MAAMC,WAAA,GAAc/B,yBAAA,CAA0B;IAC5CO,KAAA;IACAyB,kBAAA,EAAoB;IACpBC,iBAAA,EAAmB,CAAC,YAAY,SAAS;EAC3C;EAEA,MAAMP,KAAA,GAAuB;IAC3BZ,IAAA;IACAC,UAAA;IACAE,MAAA;IACAiB,UAAA,EAAY;MACVC,IAAA,EAAM;MACNC,QAAA,EAAU;IACZ;IACAA,QAAA,EAAUnC,gBAAA,CAAiBM,KAAA,CAAM6B,QAAQ,EAAE;MACzCC,QAAA,EAAU,IAAI;MACdC,YAAA,EAAc;QACZ9B,GAAA;QACA,GAAGuB,WAAA,CAAYQ;MACjB;IACF;IACAJ,IAAA,EAAMlC,gBAAA,CAAiBM,KAAA,CAAM4B,IAAI,EAAE;MACjCE,QAAA,EAAU,IAAI;MACdC,YAAA,EAAcP,WAAA,CAAYI;IAC5B;EACF;EAEAT,KAAA,CAAMU,QAAQ,CAACZ,KAAK,GAAGA,KAAA;EACvBE,KAAA,CAAMU,QAAQ,CAAClB,QAAQ,GAAGf,gBAAA,CAAiBqC,EAAA,IAAM;IAC/C,MAAMC,QAAA,GAAWD,EAAA,CAAGE,MAAM,CAAClB,KAAK;IAChCN,QAAA,aAAAA,QAAA,uBAAAA,QAAA,CAAWsB,EAAA,EAAI;MAAEhB,KAAA,EAAOiB;IAAS;IACjChB,QAAA,CAASgB,QAAA;EACX;EAEA,OAAOf,KAAA;AACT"}
|
|
@@ -8,9 +8,16 @@ Object.defineProperty(exports, "useTextarea_unstable", {
|
|
|
8
8
|
});
|
|
9
9
|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
+
const _reactField = require("@fluentui/react-field");
|
|
11
12
|
const _reactUtilities = require("@fluentui/react-utilities");
|
|
12
13
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
|
13
14
|
const useTextarea_unstable = (props, ref)=>{
|
|
15
|
+
// Merge props from surrounding <Field>, if any
|
|
16
|
+
props = (0, _reactField.useFieldControlProps_unstable)(props, {
|
|
17
|
+
supportsLabelFor: true,
|
|
18
|
+
supportsRequired: true,
|
|
19
|
+
supportsSize: true
|
|
20
|
+
});
|
|
14
21
|
const overrides = (0, _reactSharedContexts.useOverrides_unstable)();
|
|
15
22
|
var _overrides_inputDefaultAppearance;
|
|
16
23
|
const { size ='medium' , appearance =(_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline' , resize ='none' , onChange } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Textarea/useTextarea.js"],"sourcesContent":["import * as React from 'react';\nimport { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback } 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 */\nexport const useTextarea_unstable = (props, ref) => {\n const overrides = useOverrides();\n var _overrides_inputDefaultAppearance;\n const {\n size = 'medium',\n appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline',\n resize = 'none',\n onChange\n } = 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: ['onChange', 'value', 'defaultValue']\n });\n const state = {\n size,\n appearance,\n resize,\n components: {\n root: 'span',\n textarea: 'textarea'\n },\n textarea: resolveShorthand(props.textarea, {\n required: true,\n defaultProps: {\n ref,\n ...nativeProps.primary\n }\n }),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root\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//# sourceMappingURL=useTextarea.js.map"],"names":["useTextarea_unstable","props","ref","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","resolveShorthand","required","defaultProps","primary","useEventCallback","ev","newValue","target"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Textarea/useTextarea.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, resolveShorthand, useControllableState, useEventCallback } 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 */\nexport 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 {\n size = 'medium',\n appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline',\n resize = 'none',\n onChange\n } = 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: ['onChange', 'value', 'defaultValue']\n });\n const state = {\n size,\n appearance,\n resize,\n components: {\n root: 'span',\n textarea: 'textarea'\n },\n textarea: resolveShorthand(props.textarea, {\n required: true,\n defaultProps: {\n ref,\n ...nativeProps.primary\n }\n }),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root\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//# sourceMappingURL=useTextarea.js.map"],"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","resolveShorthand","required","defaultProps","primary","useEventCallback","ev","newValue","target"],"mappings":";;;;+BAaaA;;aAAAA;;;6DAbU;4BACuB;gCACsD;qCAC9C;AAU/C,MAAMA,uBAAuB,CAACC,OAAOC,MAAQ;IAClD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QAC3CG,kBAAkB,IAAI;QACtBC,kBAAkB,IAAI;QACtBC,cAAc,IAAI;IACpB;IACA,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EACJC,MAAO,SAAQ,EACfC,YAAa,AAACF,CAAAA,oCAAoCF,UAAUK,sBAAsB,AAAD,MAAO,IAAI,IAAIH,sCAAsC,KAAK,IAAIA,oCAAoC,SAAS,CAAA,EAC5LI,QAAS,OAAM,EACfC,SAAQ,EACT,GAAGb;IACJ,IAAIc,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBAAiBN,CAAAA,eAAe,0BAA0BA,eAAe,uBAAsB,GAAI;QAC9H,sCAAsC;QACtCO,QAAQC,KAAK,CAAC,iHAAiH;IACjI,CAAC;IACD,MAAM,CAACC,OAAOC,SAAS,GAAGC,IAAAA,oCAAoB,EAAC;QAC7CC,OAAOtB,MAAMmB,KAAK;QAClBI,cAAcvB,MAAMwB,YAAY;QAChCC,cAAcC;IAChB;IACA,MAAMC,cAAcC,IAAAA,yCAAyB,EAAC;QAC5C5B;QACA6B,oBAAoB;QACpBC,mBAAmB;YAAC;YAAY;YAAS;SAAe;IAC1D;IACA,MAAMR,QAAQ;QACZb;QACAC;QACAE;QACAmB,YAAY;YACVC,MAAM;YACNC,UAAU;QACZ;QACAA,UAAUC,IAAAA,gCAAgB,EAAClC,MAAMiC,QAAQ,EAAE;YACzCE,UAAU,IAAI;YACdC,cAAc;gBACZnC;gBACA,GAAG0B,YAAYU,OAAO;YACxB;QACF;QACAL,MAAME,IAAAA,gCAAgB,EAAClC,MAAMgC,IAAI,EAAE;YACjCG,UAAU,IAAI;YACdC,cAAcT,YAAYK,IAAI;QAChC;IACF;IACAV,MAAMW,QAAQ,CAACd,KAAK,GAAGA;IACvBG,MAAMW,QAAQ,CAACpB,QAAQ,GAAGyB,IAAAA,gCAAgB,EAACC,CAAAA,KAAM;QAC/C,MAAMC,WAAWD,GAAGE,MAAM,CAACtB,KAAK;QAChCN,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAAS0B,IAAI;YAC/DpB,OAAOqB;QACT,EAAE;QACFpB,SAASoB;IACX;IACA,OAAOlB;AACT,GACA,uCAAuC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-textarea",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.8",
|
|
4
4
|
"description": "Fluent UI TextArea component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@fluentui/react-field": "9.0.0-
|
|
35
|
+
"@fluentui/react-field": "9.0.0-beta.1",
|
|
36
36
|
"@fluentui/react-shared-contexts": "^9.3.3",
|
|
37
37
|
"@fluentui/react-theme": "^9.1.7",
|
|
38
|
-
"@fluentui/react-utilities": "^9.7.
|
|
38
|
+
"@fluentui/react-utilities": "^9.7.3",
|
|
39
39
|
"@griffel/react": "^1.5.2",
|
|
40
40
|
"@swc/helpers": "^0.4.14"
|
|
41
41
|
},
|