@fluentui/react-input 9.4.6 → 9.4.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
CHANGED
|
@@ -2,28 +2,55 @@
|
|
|
2
2
|
"name": "@fluentui/react-input",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Thu,
|
|
6
|
-
"tag": "@fluentui/react-input_v9.4.
|
|
7
|
-
"version": "9.4.
|
|
5
|
+
"date": "Thu, 06 Apr 2023 23:59:48 GMT",
|
|
6
|
+
"tag": "@fluentui/react-input_v9.4.8",
|
|
7
|
+
"version": "9.4.8",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "behowell@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-input",
|
|
13
|
+
"commit": "5a8d7a29645b3b500eb7145d2e42ac34fcafc4c6",
|
|
14
|
+
"comment": "chore: Hook up FieldContext for use inside a Field"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "behowell@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-input",
|
|
19
|
+
"commit": "eee5716e76dc6a5bef9316546a352694bbe5750a",
|
|
20
|
+
"comment": "chore: Update package version of react-field"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-input",
|
|
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-input_v9.4.7",
|
|
34
|
+
"version": "9.4.7",
|
|
8
35
|
"comments": {
|
|
9
36
|
"patch": [
|
|
10
37
|
{
|
|
11
38
|
"author": "beachball",
|
|
12
39
|
"package": "@fluentui/react-input",
|
|
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-input",
|
|
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
|
"author": "beachball",
|
|
24
51
|
"package": "@fluentui/react-input",
|
|
25
|
-
"comment": "Bump @fluentui/react-text to v9.3.
|
|
26
|
-
"commit": "
|
|
52
|
+
"comment": "Bump @fluentui/react-text to v9.3.4",
|
|
53
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
27
54
|
}
|
|
28
55
|
]
|
|
29
56
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-input
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
3
|
+
This log was last generated on Thu, 06 Apr 2023 23:59:48 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.4.
|
|
7
|
+
## [9.4.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-input_v9.4.8)
|
|
8
8
|
|
|
9
|
-
Thu,
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-input_v9.4.
|
|
9
|
+
Thu, 06 Apr 2023 23:59:48 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-input_v9.4.7..@fluentui/react-input_v9.4.8)
|
|
11
11
|
|
|
12
12
|
### Patches
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- Bump @fluentui/react-
|
|
14
|
+
- chore: Hook up FieldContext for use inside a Field ([PR #27399](https://github.com/microsoft/fluentui/pull/27399) by behowell@microsoft.com)
|
|
15
|
+
- chore: Update package version of react-field ([PR #27458](https://github.com/microsoft/fluentui/pull/27458) 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.4.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-input_v9.4.7)
|
|
19
|
+
|
|
20
|
+
Tue, 04 Apr 2023 18:44:50 GMT
|
|
21
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-input_v9.4.5..@fluentui/react-input_v9.4.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)
|
|
27
|
+
- Bump @fluentui/react-text to v9.3.4 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
17
28
|
|
|
18
29
|
## [9.4.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-input_v9.4.5)
|
|
19
30
|
|
|
@@ -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,11 @@ import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-co
|
|
|
11
12
|
* @param ref - reference to `<input>` element of Input
|
|
12
13
|
*/
|
|
13
14
|
export const useInput_unstable = (props, ref) => {
|
|
15
|
+
props = useFieldControlProps_unstable(props, {
|
|
16
|
+
supportsLabelFor: true,
|
|
17
|
+
supportsRequired: true,
|
|
18
|
+
supportsSize: true
|
|
19
|
+
});
|
|
14
20
|
const overrides = useOverrides();
|
|
15
21
|
var _overrides_inputDefaultAppearance;
|
|
16
22
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","getPartitionedNativeProps","resolveShorthand","useControllableState","useEventCallback","useOverrides_unstable","useOverrides","useInput_unstable","props","ref","overrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","onChange","process","env","NODE_ENV","console","error","value","setValue","state","defaultState","defaultValue","initialState","nativeProps","primarySlotTagName","excludedPropNames","components","root","input","contentBefore","contentAfter","required","defaultProps","type","primary","ev","newValue","target"],"sources":["../../../src/components/Input/useInput.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getPartitionedNativeProps,\n resolveShorthand,\n useControllableState,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport type { InputProps, InputState } from './Input.types';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Input.\n *\n * The returned state can be modified with hooks such as useInputStyles_unstable,\n * before being passed to renderInput_unstable.\n *\n * @param props - props from this instance of Input\n * @param ref - reference to `<input>` element of Input\n */\nexport const useInput_unstable = (props: InputProps, ref: React.Ref<HTMLInputElement>): InputState => {\n const overrides = useOverrides();\n\n const { size = 'medium', appearance = overrides.inputDefaultAppearance ?? 'outline', onChange } = 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: '',\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['size', 'onChange', 'value', 'defaultValue'],\n });\n\n const state: InputState = {\n size,\n appearance,\n components: {\n root: 'span',\n input: 'input',\n contentBefore: 'span',\n contentAfter: 'span',\n },\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'text',\n ref,\n ...nativeProps.primary,\n },\n }),\n contentAfter: resolveShorthand(props.contentAfter),\n contentBefore: resolveShorthand(props.contentBefore),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root,\n }),\n };\n\n state.input.value = value;\n state.input.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,iBAAA,GAAoBA,CAACC,KAAA,EAAmBC,GAAA,KAAiD;
|
|
1
|
+
{"version":3,"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","resolveShorthand","useControllableState","useEventCallback","useOverrides_unstable","useOverrides","useInput_unstable","props","ref","supportsLabelFor","supportsRequired","supportsSize","overrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","onChange","process","env","NODE_ENV","console","error","value","setValue","state","defaultState","defaultValue","initialState","nativeProps","primarySlotTagName","excludedPropNames","components","root","input","contentBefore","contentAfter","required","defaultProps","type","primary","ev","newValue","target"],"sources":["../../../src/components/Input/useInput.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 { InputProps, InputState } from './Input.types';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Input.\n *\n * The returned state can be modified with hooks such as useInputStyles_unstable,\n * before being passed to renderInput_unstable.\n *\n * @param props - props from this instance of Input\n * @param ref - reference to `<input>` element of Input\n */\nexport const useInput_unstable = (props: InputProps, ref: React.Ref<HTMLInputElement>): InputState => {\n props = useFieldControlProps_unstable(props, { supportsLabelFor: true, supportsRequired: true, supportsSize: true });\n\n const overrides = useOverrides();\n\n const { size = 'medium', appearance = overrides.inputDefaultAppearance ?? 'outline', onChange } = 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: '',\n });\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['size', 'onChange', 'value', 'defaultValue'],\n });\n\n const state: InputState = {\n size,\n appearance,\n components: {\n root: 'span',\n input: 'input',\n contentBefore: 'span',\n contentAfter: 'span',\n },\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'text',\n ref,\n ...nativeProps.primary,\n },\n }),\n contentAfter: resolveShorthand(props.contentAfter),\n contentBefore: resolveShorthand(props.contentBefore),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root,\n }),\n };\n\n state.input.value = value;\n state.input.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;AAC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AA,EAAU,IAAI;MACdC,YAAA,EAAc;QACZC,IAAA,EAAM;QACN/B,GAAA;QACA,GAAGqB,WAAA,CAAYW;MACjB;IACF;IACAJ,YAAA,EAAcnC,gBAAA,CAAiBM,KAAA,CAAM6B,YAAY;IACjDD,aAAA,EAAelC,gBAAA,CAAiBM,KAAA,CAAM4B,aAAa;IACnDF,IAAA,EAAMhC,gBAAA,CAAiBM,KAAA,CAAM0B,IAAI,EAAE;MACjCI,QAAA,EAAU,IAAI;MACdC,YAAA,EAAcT,WAAA,CAAYI;IAC5B;EACF;EAEAR,KAAA,CAAMS,KAAK,CAACX,KAAK,GAAGA,KAAA;EACpBE,KAAA,CAAMS,KAAK,CAACjB,QAAQ,GAAGd,gBAAA,CAAiBsC,EAAA,IAAM;IAC5C,MAAMC,QAAA,GAAWD,EAAA,CAAGE,MAAM,CAACpB,KAAK;IAChCN,QAAA,aAAAA,QAAA,uBAAAA,QAAA,CAAWwB,EAAA,EAAI;MAAElB,KAAA,EAAOmB;IAAS;IACjClB,QAAA,CAASkB,QAAA;EACX;EAEA,OAAOjB,KAAA;AACT"}
|
|
@@ -8,9 +8,15 @@ Object.defineProperty(exports, "useInput_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 useInput_unstable = (props, ref)=>{
|
|
15
|
+
props = (0, _reactField.useFieldControlProps_unstable)(props, {
|
|
16
|
+
supportsLabelFor: true,
|
|
17
|
+
supportsRequired: true,
|
|
18
|
+
supportsSize: true
|
|
19
|
+
});
|
|
14
20
|
const overrides = (0, _reactSharedContexts.useOverrides_unstable)();
|
|
15
21
|
var _overrides_inputDefaultAppearance;
|
|
16
22
|
const { size ='medium' , appearance =(_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline' , onChange } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Input/useInput.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 Input.\n *\n * The returned state can be modified with hooks such as useInputStyles_unstable,\n * before being passed to renderInput_unstable.\n *\n * @param props - props from this instance of Input\n * @param ref - reference to `<input>` element of Input\n */\nexport const useInput_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 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: ''\n });\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['size', 'onChange', 'value', 'defaultValue']\n });\n const state = {\n size,\n appearance,\n components: {\n root: 'span',\n input: 'input',\n contentBefore: 'span',\n contentAfter: 'span'\n },\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'text',\n ref,\n ...nativeProps.primary\n }\n }),\n contentAfter: resolveShorthand(props.contentAfter),\n contentBefore: resolveShorthand(props.contentBefore),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root\n })\n };\n state.input.value = value;\n state.input.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=useInput.js.map"],"names":["useInput_unstable","props","ref","overrides","useOverrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","onChange","process","env","NODE_ENV","console","error","value","setValue","useControllableState","state","defaultState","defaultValue","initialState","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","components","root","input","contentBefore","contentAfter","resolveShorthand","required","defaultProps","type","primary","useEventCallback","ev","newValue","target"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Input/useInput.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 Input.\n *\n * The returned state can be modified with hooks such as useInputStyles_unstable,\n * before being passed to renderInput_unstable.\n *\n * @param props - props from this instance of Input\n * @param ref - reference to `<input>` element of Input\n */\nexport const useInput_unstable = (props, ref) => {\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 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: ''\n });\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['size', 'onChange', 'value', 'defaultValue']\n });\n const state = {\n size,\n appearance,\n components: {\n root: 'span',\n input: 'input',\n contentBefore: 'span',\n contentAfter: 'span'\n },\n input: resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n type: 'text',\n ref,\n ...nativeProps.primary\n }\n }),\n contentAfter: resolveShorthand(props.contentAfter),\n contentBefore: resolveShorthand(props.contentBefore),\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: nativeProps.root\n })\n };\n state.input.value = value;\n state.input.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=useInput.js.map"],"names":["useInput_unstable","props","ref","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","supportsSize","overrides","useOverrides","_overrides_inputDefaultAppearance","size","appearance","inputDefaultAppearance","onChange","process","env","NODE_ENV","console","error","value","setValue","useControllableState","state","defaultState","defaultValue","initialState","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","components","root","input","contentBefore","contentAfter","resolveShorthand","required","defaultProps","type","primary","useEventCallback","ev","newValue","target"],"mappings":";;;;+BAaaA;;aAAAA;;;6DAbU;4BACuB;gCACsD;qCAC9C;AAU/C,MAAMA,oBAAoB,CAACC,OAAOC,MAAQ;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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CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-input",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.8",
|
|
4
4
|
"description": "Fluent UI React Input component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
|
29
29
|
"@fluentui/react-conformance": "*",
|
|
30
30
|
"@fluentui/react-conformance-griffel": "9.0.0-beta.20",
|
|
31
|
-
"@fluentui/react-text": "^9.3.
|
|
31
|
+
"@fluentui/react-text": "^9.3.4",
|
|
32
32
|
"@fluentui/scripts-api-extractor": "*",
|
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-field": "9.0.0-
|
|
36
|
+
"@fluentui/react-field": "9.0.0-beta.1",
|
|
37
37
|
"@fluentui/react-shared-contexts": "^9.3.3",
|
|
38
38
|
"@fluentui/react-theme": "^9.1.7",
|
|
39
|
-
"@fluentui/react-utilities": "^9.7.
|
|
39
|
+
"@fluentui/react-utilities": "^9.7.3",
|
|
40
40
|
"@griffel/react": "^1.5.2",
|
|
41
41
|
"@swc/helpers": "^0.4.14"
|
|
42
42
|
},
|