@fluentui/react-input 9.2.9 → 9.2.11
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 +81 -1
- package/CHANGELOG.md +26 -2
- package/lib/components/Input/Input.js +0 -1
- package/lib/components/Input/Input.js.map +1 -1
- package/lib/components/Input/renderInput.js +8 -5
- package/lib/components/Input/renderInput.js.map +1 -1
- package/lib/components/Input/useInput.js +0 -3
- package/lib/components/Input/useInput.js.map +1 -1
- package/lib/components/Input/useInputStyles.js +224 -232
- package/lib/components/Input/useInputStyles.js.map +1 -1
- package/lib/components/InputField/InputField.js.map +1 -1
- package/lib-commonjs/Input.js +0 -2
- package/lib-commonjs/Input.js.map +1 -1
- package/lib-commonjs/InputField.js +0 -2
- package/lib-commonjs/InputField.js.map +1 -1
- package/lib-commonjs/components/Input/Input.js +0 -6
- package/lib-commonjs/components/Input/Input.js.map +1 -1
- package/lib-commonjs/components/Input/Input.types.js.map +1 -1
- package/lib-commonjs/components/Input/index.js +0 -6
- package/lib-commonjs/components/Input/index.js.map +1 -1
- package/lib-commonjs/components/Input/renderInput.js +8 -9
- package/lib-commonjs/components/Input/renderInput.js.map +1 -1
- package/lib-commonjs/components/Input/useInput.js +0 -6
- package/lib-commonjs/components/Input/useInput.js.map +1 -1
- package/lib-commonjs/components/Input/useInputStyles.js +224 -236
- package/lib-commonjs/components/Input/useInputStyles.js.map +1 -1
- package/lib-commonjs/components/InputField/InputField.js +0 -4
- package/lib-commonjs/components/InputField/InputField.js.map +1 -1
- package/lib-commonjs/components/InputField/index.js +0 -2
- package/lib-commonjs/components/InputField/index.js.map +1 -1
- package/lib-commonjs/index.js +0 -4
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,87 @@
|
|
|
2
2
|
"name": "@fluentui/react-input",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 09 Jan 2023 14:31:49 GMT",
|
|
6
|
+
"tag": "@fluentui/react-input_v9.2.11",
|
|
7
|
+
"version": "9.2.11",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui/react-input",
|
|
13
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.14",
|
|
14
|
+
"commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-input",
|
|
19
|
+
"comment": "Bump @fluentui/react-utilities to v9.4.0",
|
|
20
|
+
"commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-input",
|
|
25
|
+
"comment": "Bump @fluentui/react-text to v9.1.12",
|
|
26
|
+
"commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Wed, 04 Jan 2023 01:40:09 GMT",
|
|
33
|
+
"tag": "@fluentui/react-input_v9.2.10",
|
|
34
|
+
"version": "9.2.10",
|
|
35
|
+
"comments": {
|
|
36
|
+
"none": [
|
|
37
|
+
{
|
|
38
|
+
"author": "martinhochel@microsoft.com",
|
|
39
|
+
"package": "@fluentui/react-input",
|
|
40
|
+
"commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
|
|
41
|
+
"comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "martinhochel@microsoft.com",
|
|
45
|
+
"package": "@fluentui/react-input",
|
|
46
|
+
"commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
|
|
47
|
+
"comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"patch": [
|
|
51
|
+
{
|
|
52
|
+
"author": "olfedias@microsoft.com",
|
|
53
|
+
"package": "@fluentui/react-input",
|
|
54
|
+
"commit": "2c38f1e4ae07b2b60df596efe11015a68f166dbf",
|
|
55
|
+
"comment": "chore: Update Griffel to latest version"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"author": "beachball",
|
|
59
|
+
"package": "@fluentui/react-input",
|
|
60
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.13",
|
|
61
|
+
"commit": "3e322d15529451be153e97298873253e21af4082"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"author": "beachball",
|
|
65
|
+
"package": "@fluentui/react-input",
|
|
66
|
+
"comment": "Bump @fluentui/react-utilities to v9.3.1",
|
|
67
|
+
"commit": "3e322d15529451be153e97298873253e21af4082"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"author": "beachball",
|
|
71
|
+
"package": "@fluentui/react-input",
|
|
72
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19",
|
|
73
|
+
"commit": "3e322d15529451be153e97298873253e21af4082"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"author": "beachball",
|
|
77
|
+
"package": "@fluentui/react-input",
|
|
78
|
+
"comment": "Bump @fluentui/react-text to v9.1.11",
|
|
79
|
+
"commit": "3e322d15529451be153e97298873253e21af4082"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"date": "Wed, 21 Dec 2022 10:20:29 GMT",
|
|
6
86
|
"tag": "@fluentui/react-input_v9.2.9",
|
|
7
87
|
"version": "9.2.9",
|
|
8
88
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-input
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 09 Jan 2023 14:31:49 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.2.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-input_v9.2.11)
|
|
8
|
+
|
|
9
|
+
Mon, 09 Jan 2023 14:31:49 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-input_v9.2.10..@fluentui/react-input_v9.2.11)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.14 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
|
|
15
|
+
- Bump @fluentui/react-utilities to v9.4.0 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
|
|
16
|
+
- Bump @fluentui/react-text to v9.1.12 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
|
|
17
|
+
|
|
18
|
+
## [9.2.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-input_v9.2.10)
|
|
19
|
+
|
|
20
|
+
Wed, 04 Jan 2023 01:40:09 GMT
|
|
21
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-input_v9.2.9..@fluentui/react-input_v9.2.10)
|
|
22
|
+
|
|
23
|
+
### Patches
|
|
24
|
+
|
|
25
|
+
- chore: Update Griffel to latest version ([PR #26045](https://github.com/microsoft/fluentui/pull/26045) by olfedias@microsoft.com)
|
|
26
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.13 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
|
|
27
|
+
- Bump @fluentui/react-utilities to v9.3.1 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
|
|
28
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
|
|
29
|
+
- Bump @fluentui/react-text to v9.1.11 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
|
|
30
|
+
|
|
7
31
|
## [9.2.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-input_v9.2.9)
|
|
8
32
|
|
|
9
|
-
Wed, 21 Dec 2022 10:
|
|
33
|
+
Wed, 21 Dec 2022 10:20:29 GMT
|
|
10
34
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-input_v9.2.8..@fluentui/react-input_v9.2.9)
|
|
11
35
|
|
|
12
36
|
### Patches
|
|
@@ -5,7 +5,6 @@ import { useInputStyles_unstable } from './useInputStyles';
|
|
|
5
5
|
/**
|
|
6
6
|
* The Input component allows people to enter and edit text.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
8
|
export const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
9
|
const state = useInput_unstable(props, ref);
|
|
11
10
|
useInputStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,uBAAuB,QAAQ,kBAAkB;AAI1D;;;AAGA,OAAO,MAAMC,KAAK,gBAAoCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACpF,MAAMC,KAAK,GAAGP,iBAAiB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE3CJ,uBAAuB,CAACK,KAAK,CAAC;EAC9B,OAAON,oBAAoB,CAACM,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFJ,KAAK,CAACK,WAAW,GAAG,OAAO","names":["React","useInput_unstable","renderInput_unstable","useInputStyles_unstable","Input","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-input/src/components/Input/Input.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useInput_unstable } from './useInput';\nimport { renderInput_unstable } from './renderInput';\nimport { useInputStyles_unstable } from './useInputStyles';\nimport type { InputProps } from './Input.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * The Input component allows people to enter and edit text.\n */\nexport const Input: ForwardRefComponent<InputProps> = React.forwardRef((props, ref) => {\n const state = useInput_unstable(props, ref);\n\n useInputStyles_unstable(state);\n return renderInput_unstable(state);\n});\n\nInput.displayName = 'Input';\n"]}
|
|
@@ -3,16 +3,19 @@ import { getSlots } from '@fluentui/react-utilities';
|
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of Input
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
export const renderInput_unstable = state => {
|
|
8
7
|
const {
|
|
9
8
|
slots,
|
|
10
9
|
slotProps
|
|
11
10
|
} = getSlots(state);
|
|
12
|
-
return /*#__PURE__*/React.createElement(slots.root, {
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
11
|
+
return /*#__PURE__*/React.createElement(slots.root, {
|
|
12
|
+
...slotProps.root
|
|
13
|
+
}, slots.contentBefore && /*#__PURE__*/React.createElement(slots.contentBefore, {
|
|
14
|
+
...slotProps.contentBefore
|
|
15
|
+
}), /*#__PURE__*/React.createElement(slots.input, {
|
|
16
|
+
...slotProps.input
|
|
17
|
+
}), slots.contentAfter && /*#__PURE__*/React.createElement(slots.contentAfter, {
|
|
18
|
+
...slotProps.contentAfter
|
|
16
19
|
}));
|
|
17
20
|
};
|
|
18
21
|
//# sourceMappingURL=renderInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,oBAAoB,GAAIC,KAAiB,IAAI;EACxD,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAaE,KAAK,CAAC;EACxD,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BF,KAAK,CAACG,aAAa,iBAAIP,oBAACI,KAAK,CAACG,aAAa;IAAA,GAAKF,SAAS,CAACE;EAAa,EAAI,eAC5EP,oBAACI,KAAK,CAACI,KAAK;IAAA,GAAKH,SAAS,CAACG;EAAK,EAAI,EACnCJ,KAAK,CAACK,YAAY,iBAAIT,oBAACI,KAAK,CAACK,YAAY;IAAA,GAAKJ,SAAS,CAACI;EAAY,EAAI,CAC9D;AAEjB,CAAC","names":["React","getSlots","renderInput_unstable","state","slots","slotProps","root","contentBefore","input","contentAfter"],"sourceRoot":"../src/","sources":["packages/react-components/react-input/src/components/Input/renderInput.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { InputSlots, InputState } from './Input.types';\n\n/**\n * Render the final JSX of Input\n */\nexport const renderInput_unstable = (state: InputState) => {\n const { slots, slotProps } = getSlots<InputSlots>(state);\n return (\n <slots.root {...slotProps.root}>\n {slots.contentBefore && <slots.contentBefore {...slotProps.contentBefore} />}\n <slots.input {...slotProps.input} />\n {slots.contentAfter && <slots.contentAfter {...slotProps.contentAfter} />}\n </slots.root>\n );\n};\n"]}
|
|
@@ -8,19 +8,16 @@ import { getPartitionedNativeProps, resolveShorthand, useControllableState, useE
|
|
|
8
8
|
* @param props - props from this instance of Input
|
|
9
9
|
* @param ref - reference to `<input>` element of Input
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
11
|
export const useInput_unstable = (props, ref) => {
|
|
13
12
|
const {
|
|
14
13
|
size = 'medium',
|
|
15
14
|
appearance = 'outline',
|
|
16
15
|
onChange
|
|
17
16
|
} = props;
|
|
18
|
-
|
|
19
17
|
if (process.env.NODE_ENV !== 'production' && (appearance === 'filled-darker-shadow' || appearance === 'filled-lighter-shadow')) {
|
|
20
18
|
// eslint-disable-next-line no-console
|
|
21
19
|
console.error("The 'filled-darker-shadow' and 'filled-lighter-shadow' appearances are deprecated and will be removed in the" + ' future.');
|
|
22
20
|
}
|
|
23
|
-
|
|
24
21
|
const [value, setValue] = useControllableState({
|
|
25
22
|
state: props.value,
|
|
26
23
|
defaultState: props.defaultValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AACA,SACEA,yBAAyB,EACzBC,gBAAgB,EAChBC,oBAAoB,EACpBC,gBAAgB,QACX,2BAA2B;AAGlC;;;;;;;;;AASA,OAAO,MAAMC,iBAAiB,GAAG,CAACC,KAAiB,EAAEC,GAAgC,KAAgB;EACnG,MAAM;IAAEC,IAAI,GAAG,QAAQ;IAAEC,UAAU,GAAG,SAAS;IAAEC;EAAQ,CAAE,GAAGJ,KAAK;EAEnE,IACEK,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,KACpCJ,UAAU,KAAK,sBAAsB,IAAIA,UAAU,KAAK,uBAAuB,CAAC,EACjF;IACA;IACAK,OAAO,CAACC,KAAK,CACX,8GAA8G,GAC5G,UAAU,CACb;;EAGH,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGd,oBAAoB,CAAC;IAC7Ce,KAAK,EAAEZ,KAAK,CAACU,KAAK;IAClBG,YAAY,EAAEb,KAAK,CAACc,YAAY;IAChCC,YAAY,EAAE;GACf,CAAC;EAEF,MAAMC,WAAW,GAAGrB,yBAAyB,CAAC;IAC5CK,KAAK;IACLiB,kBAAkB,EAAE,OAAO;IAC3BC,iBAAiB,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc;GAChE,CAAC;EAEF,MAAMN,KAAK,GAAe;IACxBV,IAAI;IACJC,UAAU;IACVgB,UAAU,EAAE;MACVC,IAAI,EAAE,MAAM;MACZC,KAAK,EAAE,OAAO;MACdC,aAAa,EAAE,MAAM;MACrBC,YAAY,EAAE;KACf;IACDF,KAAK,EAAEzB,gBAAgB,CAACI,KAAK,CAACqB,KAAK,EAAE;MACnCG,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZC,IAAI,EAAE,MAAM;QACZzB,GAAG;QACH,GAAGe,WAAW,CAACW;;KAElB,CAAC;IACFJ,YAAY,EAAE3B,gBAAgB,CAACI,KAAK,CAACuB,YAAY,CAAC;IAClDD,aAAa,EAAE1B,gBAAgB,CAACI,KAAK,CAACsB,aAAa,CAAC;IACpDF,IAAI,EAAExB,gBAAgB,CAACI,KAAK,CAACoB,IAAI,EAAE;MACjCI,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAET,WAAW,CAACI;KAC3B;GACF;EAEDR,KAAK,CAACS,KAAK,CAACX,KAAK,GAAGA,KAAK;EACzBE,KAAK,CAACS,KAAK,CAACjB,QAAQ,GAAGN,gBAAgB,CAAC8B,EAAE,IAAG;IAC3C,MAAMC,QAAQ,GAAGD,EAAE,CAACE,MAAM,CAACpB,KAAK;IAChCN,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGwB,EAAE,EAAE;MAAElB,KAAK,EAAEmB;IAAQ,CAAE,CAAC;IACnClB,QAAQ,CAACkB,QAAQ,CAAC;EACpB,CAAC,CAAC;EAEF,OAAOjB,KAAK;AACd,CAAC","names":["getPartitionedNativeProps","resolveShorthand","useControllableState","useEventCallback","useInput_unstable","props","ref","size","appearance","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"],"sourceRoot":"../src/","sources":["packages/react-components/react-input/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';\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 { size = 'medium', appearance = '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"]}
|