@fluentui/react-field 0.0.0-nightly-20230222-0421.1 → 0.0.0-nightly-20230223-2115.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.swcrc +33 -0
- package/CHANGELOG.json +13 -13
- package/CHANGELOG.md +9 -9
- package/lib/Field.js.map +1 -1
- package/lib/components/Field/Field.js.map +1 -1
- package/lib/components/Field/Field.types.js +1 -1
- package/lib/components/Field/Field.types.js.map +1 -1
- package/lib/components/Field/index.js.map +1 -1
- package/lib/components/Field/renderField.js +2 -11
- package/lib/components/Field/renderField.js.map +1 -1
- package/lib/components/Field/useField.js +8 -9
- package/lib/components/Field/useField.js.map +1 -1
- package/lib/components/Field/useFieldStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/util/makeDeprecatedField.js +5 -7
- package/lib/util/makeDeprecatedField.js.map +1 -1
- package/lib-commonjs/Field.js +5 -4
- package/lib-commonjs/Field.js.map +1 -1
- package/lib-commonjs/components/Field/Field.js +16 -12
- package/lib-commonjs/components/Field/Field.js.map +1 -1
- package/lib-commonjs/components/Field/Field.types.js +5 -2
- package/lib-commonjs/components/Field/Field.types.js.map +1 -1
- package/lib-commonjs/components/Field/index.js +9 -8
- package/lib-commonjs/components/Field/index.js.map +1 -1
- package/lib-commonjs/components/Field/renderField.js +15 -26
- package/lib-commonjs/components/Field/renderField.js.map +1 -1
- package/lib-commonjs/components/Field/useField.js +94 -102
- package/lib-commonjs/components/Field/useField.js.map +1 -1
- package/lib-commonjs/components/Field/useFieldStyles.js +137 -96
- package/lib-commonjs/components/Field/useFieldStyles.js.map +1 -1
- package/lib-commonjs/index.js +21 -49
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/util/makeDeprecatedField.js +56 -72
- package/lib-commonjs/util/makeDeprecatedField.js.map +1 -1
- package/package.json +8 -8
package/lib-commonjs/index.js
CHANGED
@@ -1,52 +1,24 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
5
|
-
});
|
6
|
-
|
7
|
-
var
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
});
|
26
|
-
Object.defineProperty(exports, "useFieldStyles_unstable", {
|
27
|
-
enumerable: true,
|
28
|
-
get: function () {
|
29
|
-
return Field_1.useFieldStyles_unstable;
|
30
|
-
}
|
31
|
-
});
|
32
|
-
Object.defineProperty(exports, "useField_unstable", {
|
33
|
-
enumerable: true,
|
34
|
-
get: function () {
|
35
|
-
return Field_1.useField_unstable;
|
36
|
-
}
|
37
|
-
});
|
38
|
-
// eslint-disable-next-line deprecation/deprecation
|
39
|
-
var makeDeprecatedField_1 = /*#__PURE__*/require("./util/makeDeprecatedField");
|
40
|
-
Object.defineProperty(exports, "getDeprecatedFieldClassNames", {
|
41
|
-
enumerable: true,
|
42
|
-
get: function () {
|
43
|
-
return makeDeprecatedField_1.getDeprecatedFieldClassNames;
|
44
|
-
}
|
45
|
-
});
|
46
|
-
Object.defineProperty(exports, "makeDeprecatedField", {
|
47
|
-
enumerable: true,
|
48
|
-
get: function () {
|
49
|
-
return makeDeprecatedField_1.makeDeprecatedField;
|
50
|
-
}
|
51
|
-
});
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
Field: ()=>_field.Field,
|
13
|
+
fieldClassNames: ()=>_field.fieldClassNames,
|
14
|
+
renderField_unstable: ()=>_field.renderField_unstable,
|
15
|
+
useFieldStyles_unstable: ()=>_field.useFieldStyles_unstable,
|
16
|
+
useField_unstable: ()=>_field.useField_unstable,
|
17
|
+
getDeprecatedFieldClassNames: ()=>_makeDeprecatedField.getDeprecatedFieldClassNames,
|
18
|
+
makeDeprecatedField: ()=>_makeDeprecatedField.makeDeprecatedField
|
19
|
+
});
|
20
|
+
const _field = require("./Field");
|
21
|
+
const _makeDeprecatedField = require("./util/makeDeprecatedField");
|
22
|
+
//# sourceMappingURL=index.js.map
|
23
|
+
|
52
24
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Field, fieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from './Field';\n// eslint-disable-next-line deprecation/deprecation\nexport { getDeprecatedFieldClassNames, makeDeprecatedField } from './util/makeDeprecatedField';\n//# sourceMappingURL=index.js.map"],"names":["Field","fieldClassNames","renderField_unstable","useFieldStyles_unstable","useField_unstable","getDeprecatedFieldClassNames","makeDeprecatedField"],"mappings":";;;;;;;;;;;IAASA,KAAK,MAALA,YAAK;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;IAExFC,4BAA4B,MAA5BA,iDAA4B;IAAEC,mBAAmB,MAAnBA,wCAAmB;;uBAF+C;qCAEvC;CAClE,iCAAiC"}
|
@@ -1,79 +1,63 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
1
|
+
/* eslint-disable deprecation/deprecation */ "use strict";
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
makeDeprecatedField: ()=>makeDeprecatedField,
|
13
|
+
getDeprecatedFieldClassNames: ()=>getDeprecatedFieldClassNames
|
5
14
|
});
|
6
|
-
|
7
|
-
|
8
|
-
const
|
9
|
-
const
|
15
|
+
const _interopRequireDefault = require("@swc/helpers/lib/_interop_require_default.js").default;
|
16
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
17
|
+
const _extends = require("@swc/helpers/lib/_extends.js").default;
|
18
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
19
|
+
const _field = require("../Field");
|
10
20
|
/**
|
11
21
|
* Partition the props used by the Field itself, from the props that are passed to the underlying field component.
|
12
|
-
*/
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
size,
|
36
|
-
style,
|
37
|
-
validationMessage,
|
38
|
-
validationMessageIcon,
|
39
|
-
validationState,
|
40
|
-
...root
|
41
|
-
}, {
|
42
|
-
required,
|
43
|
-
size,
|
44
|
-
...restOfProps,
|
45
|
-
...control
|
46
|
-
}];
|
22
|
+
*/ function getPartitionedFieldProps(props) {
|
23
|
+
const { className , control , hint , label , orientation , required , root , size , style , validationMessage , validationMessageIcon , validationState ='none' , ...restOfProps } = props;
|
24
|
+
return [
|
25
|
+
{
|
26
|
+
className,
|
27
|
+
hint,
|
28
|
+
label,
|
29
|
+
orientation,
|
30
|
+
required,
|
31
|
+
size,
|
32
|
+
style,
|
33
|
+
validationMessage,
|
34
|
+
validationMessageIcon,
|
35
|
+
validationState,
|
36
|
+
...root
|
37
|
+
},
|
38
|
+
{
|
39
|
+
required,
|
40
|
+
size,
|
41
|
+
...restOfProps,
|
42
|
+
...control
|
43
|
+
}
|
44
|
+
];
|
47
45
|
}
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
*/
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
return React.createElement(Field_1.Field, {
|
60
|
-
...fieldProps
|
61
|
-
}, React.createElement(Control, {
|
62
|
-
...controlProps,
|
63
|
-
ref: ref
|
64
|
-
}));
|
65
|
-
});
|
66
|
-
DeprecatedField.displayName = displayName;
|
67
|
-
return DeprecatedField;
|
46
|
+
function makeDeprecatedField(Control) {
|
47
|
+
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
48
|
+
const { mapProps =(props)=>props , displayName =`${Control.displayName}Field` } = options;
|
49
|
+
const DeprecatedField = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
50
|
+
const [fieldProps, controlProps] = getPartitionedFieldProps(mapProps(props));
|
51
|
+
return /*#__PURE__*/ _react.createElement(_field.Field, _extends({}, fieldProps), /*#__PURE__*/ _react.createElement(Control, _extends({}, controlProps, {
|
52
|
+
ref: ref
|
53
|
+
})));
|
54
|
+
});
|
55
|
+
DeprecatedField.displayName = displayName;
|
56
|
+
return DeprecatedField;
|
68
57
|
}
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
const getDeprecatedFieldClassNames = controlRootClassName => ({
|
75
|
-
...Field_1.fieldClassNames,
|
76
|
-
control: controlRootClassName
|
77
|
-
});
|
78
|
-
exports.getDeprecatedFieldClassNames = getDeprecatedFieldClassNames;
|
58
|
+
const getDeprecatedFieldClassNames = (controlRootClassName)=>({
|
59
|
+
..._field.fieldClassNames,
|
60
|
+
control: controlRootClassName
|
61
|
+
}); //# sourceMappingURL=makeDeprecatedField.js.map
|
62
|
+
|
79
63
|
//# sourceMappingURL=makeDeprecatedField.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/util/makeDeprecatedField.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */import _extends from \"@swc/helpers/src/_extends.mjs\";\nimport * as React from 'react';\nimport { Field, fieldClassNames } from '../Field';\n/**\n * Partition the props used by the Field itself, from the props that are passed to the underlying field component.\n */\nfunction getPartitionedFieldProps(props) {\n const {\n className,\n control,\n hint,\n label,\n orientation,\n required,\n root,\n size,\n style,\n validationMessage,\n validationMessageIcon,\n validationState = 'none',\n ...restOfProps\n } = props;\n return [{\n className,\n hint,\n label,\n orientation,\n required,\n size,\n style,\n validationMessage,\n validationMessageIcon,\n validationState,\n ...root\n }, {\n required,\n size,\n ...restOfProps,\n ...control\n }];\n}\n/**\n * @deprecated Only for use to make deprecated [Control]Field shim components.\n * @internal\n */\nexport function makeDeprecatedField(Control) {\n let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n const {\n mapProps = props => props,\n displayName = `${Control.displayName}Field`\n } = options;\n const DeprecatedField = /*#__PURE__*/React.forwardRef((props, ref) => {\n const [fieldProps, controlProps] = getPartitionedFieldProps(mapProps(props));\n return /*#__PURE__*/React.createElement(Field, _extends({}, fieldProps), /*#__PURE__*/React.createElement(Control, _extends({}, controlProps, {\n ref: ref\n })));\n });\n DeprecatedField.displayName = displayName;\n return DeprecatedField;\n}\n/**\n * @deprecated Only for use to make deprecated [Control]Field shim components.\n * @internal\n */\nexport const getDeprecatedFieldClassNames = controlRootClassName => ({\n ...fieldClassNames,\n control: controlRootClassName\n});\n//# sourceMappingURL=makeDeprecatedField.js.map"],"names":["makeDeprecatedField","getDeprecatedFieldClassNames","getPartitionedFieldProps","props","className","control","hint","label","orientation","required","root","size","style","validationMessage","validationMessageIcon","validationState","restOfProps","Control","options","arguments","length","mapProps","displayName","DeprecatedField","React","forwardRef","ref","fieldProps","controlProps","createElement","Field","_extends","controlRootClassName","fieldClassNames"],"mappings":"AAAA,0CAA0C;;;;;;;;;;;IA6C1BA,mBAAmB,MAAnBA;IAmBHC,4BAA4B,MAA5BA;;;;yBAhEoD;6DAC1C;uBACgB;AACvC;;CAEC,GACD,SAASC,yBAAyBC,KAAK,EAAE;IACvC,MAAM,EACJC,UAAS,EACTC,QAAO,EACPC,KAAI,EACJC,MAAK,EACLC,YAAW,EACXC,SAAQ,EACRC,KAAI,EACJC,KAAI,EACJC,MAAK,EACLC,kBAAiB,EACjBC,sBAAqB,EACrBC,iBAAkB,OAAM,EACxB,GAAGC,aACJ,GAAGb;IACJ,OAAO;QAAC;YACNC;YACAE;YACAC;YACAC;YACAC;YACAE;YACAC;YACAC;YACAC;YACAC;YACA,GAAGL,IAAI;QACT;QAAG;YACDD;YACAE;YACA,GAAGK,WAAW;YACd,GAAGX,OAAO;QACZ;KAAE;AACJ;AAKO,SAASL,oBAAoBiB,OAAO,EAAE;IAC3C,IAAIC,UAAUC,UAAUC,MAAM,GAAG,KAAKD,SAAS,CAAC,EAAE,KAAK,KAAK,IAAIA,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC;IACjF,MAAM,EACJE,UAAWlB,CAAAA,QAASA,MAAK,EACzBmB,aAAc,CAAC,EAAEL,QAAQK,WAAW,CAAC,KAAK,CAAC,CAAA,EAC5C,GAAGJ;IACJ,MAAMK,kBAAkB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACtB,OAAOuB,MAAQ;QACpE,MAAM,CAACC,YAAYC,aAAa,GAAG1B,yBAAyBmB,SAASlB;QACrE,OAAO,WAAW,GAAEqB,OAAMK,aAAa,CAACC,YAAK,EAAEC,SAAS,CAAC,GAAGJ,aAAa,WAAW,GAAEH,OAAMK,aAAa,CAACZ,SAASc,SAAS,CAAC,GAAGH,cAAc;YAC5IF,KAAKA;QACP;IACF;IACAH,gBAAgBD,WAAW,GAAGA;IAC9B,OAAOC;AACT;AAKO,MAAMtB,+BAA+B+B,CAAAA,uBAAyB,CAAA;QACnE,GAAGC,sBAAe;QAClB5B,SAAS2B;IACX,CAAA,GACA,+CAA+C"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-field",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20230223-2115.1",
|
4
4
|
"description": "Fluent UI Field components",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -22,23 +22,23 @@
|
|
22
22
|
"storybook": "start-storybook",
|
23
23
|
"test": "jest --passWithNoTests",
|
24
24
|
"type-check": "tsc -b tsconfig.json",
|
25
|
-
"generate-api": "
|
25
|
+
"generate-api": "just-scripts generate-api"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
29
29
|
"@fluentui/react-conformance": "*",
|
30
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
30
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230223-2115.1",
|
31
31
|
"@fluentui/scripts-api-extractor": "*",
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@fluentui/react-context-selector": "0.0.0-nightly-
|
35
|
+
"@fluentui/react-context-selector": "0.0.0-nightly-20230223-2115.1",
|
36
36
|
"@fluentui/react-icons": "^2.0.175",
|
37
|
-
"@fluentui/react-label": "0.0.0-nightly-
|
38
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
39
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
37
|
+
"@fluentui/react-label": "0.0.0-nightly-20230223-2115.1",
|
38
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230223-2115.1",
|
39
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230223-2115.1",
|
40
40
|
"@griffel/react": "^1.5.2",
|
41
|
-
"
|
41
|
+
"@swc/helpers": "^0.4.14"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|
44
44
|
"@types/react": ">=16.8.0 <19.0.0",
|