@fluentui/react-field 9.0.0-beta.2 → 9.1.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,48 @@
2
2
  "name": "@fluentui/react-field",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 12 Apr 2023 09:28:16 GMT",
5
+ "date": "Mon, 17 Apr 2023 17:50:01 GMT",
6
+ "tag": "@fluentui/react-field_v9.1.0",
7
+ "version": "9.1.0",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "behowell@microsoft.com",
12
+ "package": "@fluentui/react-field",
13
+ "commit": "273116e8efaf4230474a0f214e9adbb5f556e5de",
14
+ "comment": "chore: Remove utilities for deprecated shim InputField, etc. components"
15
+ }
16
+ ],
17
+ "minor": [
18
+ {
19
+ "author": "behowell@microsoft.com",
20
+ "package": "@fluentui/react-field",
21
+ "commit": "36f98c3a49334e4ea9b22774691560d11010f2e7",
22
+ "comment": "feat: Release Field component as stable"
23
+ },
24
+ {
25
+ "author": "beachball",
26
+ "package": "@fluentui/react-field",
27
+ "comment": "Bump @fluentui/react-context-selector to v9.1.18",
28
+ "commit": "35d247e0b6a8c2b22e69942afbabe18043e59585"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@fluentui/react-field",
33
+ "comment": "Bump @fluentui/react-label to v9.1.9",
34
+ "commit": "35d247e0b6a8c2b22e69942afbabe18043e59585"
35
+ },
36
+ {
37
+ "author": "beachball",
38
+ "package": "@fluentui/react-field",
39
+ "comment": "Bump @fluentui/react-utilities to v9.8.0",
40
+ "commit": "35d247e0b6a8c2b22e69942afbabe18043e59585"
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ {
46
+ "date": "Wed, 12 Apr 2023 09:31:44 GMT",
6
47
  "tag": "@fluentui/react-field_v9.0.0-beta.2",
7
48
  "version": "9.0.0-beta.2",
8
49
  "comments": {
@@ -17,19 +58,19 @@
17
58
  "author": "beachball",
18
59
  "package": "@fluentui/react-field",
19
60
  "comment": "Bump @fluentui/react-context-selector to v9.1.17",
20
- "commit": "b48890859f5ce28fe12fd40f6bda26ed486c5e47"
61
+ "commit": "45cb6089b0f5f464ae0dd9e9cba7e199a9d67cd8"
21
62
  },
22
63
  {
23
64
  "author": "beachball",
24
65
  "package": "@fluentui/react-field",
25
66
  "comment": "Bump @fluentui/react-label to v9.1.8",
26
- "commit": "b48890859f5ce28fe12fd40f6bda26ed486c5e47"
67
+ "commit": "45cb6089b0f5f464ae0dd9e9cba7e199a9d67cd8"
27
68
  },
28
69
  {
29
70
  "author": "beachball",
30
71
  "package": "@fluentui/react-field",
31
72
  "comment": "Bump @fluentui/react-utilities to v9.7.4",
32
- "commit": "b48890859f5ce28fe12fd40f6bda26ed486c5e47"
73
+ "commit": "45cb6089b0f5f464ae0dd9e9cba7e199a9d67cd8"
33
74
  }
34
75
  ]
35
76
  }
package/CHANGELOG.md CHANGED
@@ -1,20 +1,36 @@
1
1
  # Change Log - @fluentui/react-field
2
2
 
3
- This log was last generated on Wed, 12 Apr 2023 09:28:16 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 17 Apr 2023 17:50:01 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-field_v9.1.0)
8
+
9
+ Mon, 17 Apr 2023 17:50:01 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-field_v9.0.0-beta.2..@fluentui/react-field_v9.1.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: Release Field component as stable ([PR #27493](https://github.com/microsoft/fluentui/pull/27493) by behowell@microsoft.com)
15
+ - Bump @fluentui/react-context-selector to v9.1.18 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
16
+ - Bump @fluentui/react-label to v9.1.9 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
17
+ - Bump @fluentui/react-utilities to v9.8.0 ([PR #27564](https://github.com/microsoft/fluentui/pull/27564) by beachball)
18
+
19
+ ### Patches
20
+
21
+ - chore: Remove utilities for deprecated shim InputField, etc. components ([PR #27492](https://github.com/microsoft/fluentui/pull/27492) by behowell@microsoft.com)
22
+
7
23
  ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-field_v9.0.0-beta.2)
8
24
 
9
- Wed, 12 Apr 2023 09:28:16 GMT
25
+ Wed, 12 Apr 2023 09:31:44 GMT
10
26
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-field_v9.0.0-beta.1..@fluentui/react-field_v9.0.0-beta.2)
11
27
 
12
28
  ### Changes
13
29
 
14
30
  - fix: Make contextValues argument required on renderField_unstable ([PR #27436](https://github.com/microsoft/fluentui/pull/27436) by behowell@microsoft.com)
15
- - Bump @fluentui/react-context-selector to v9.1.17 ([commit](https://github.com/microsoft/fluentui/commit/b48890859f5ce28fe12fd40f6bda26ed486c5e47) by beachball)
16
- - Bump @fluentui/react-label to v9.1.8 ([commit](https://github.com/microsoft/fluentui/commit/b48890859f5ce28fe12fd40f6bda26ed486c5e47) by beachball)
17
- - Bump @fluentui/react-utilities to v9.7.4 ([commit](https://github.com/microsoft/fluentui/commit/b48890859f5ce28fe12fd40f6bda26ed486c5e47) by beachball)
31
+ - Bump @fluentui/react-context-selector to v9.1.17 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
32
+ - Bump @fluentui/react-label to v9.1.8 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
33
+ - Bump @fluentui/react-utilities to v9.7.4 ([PR #27274](https://github.com/microsoft/fluentui/pull/27274) by beachball)
18
34
 
19
35
  ## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-field_v9.0.0-beta.1)
20
36
 
package/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  **React Field component for [Fluent UI React](https://react.fluentui.dev/)**
4
4
 
5
- These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
6
-
7
5
  ## Description
8
6
 
9
7
  Field adds a label, validation message, and hint text to a control. Any single form control can be used as the child of the Field.
@@ -13,7 +11,7 @@ Field adds a label, validation message, and hint text to a control. Any single f
13
11
  To import Field:
14
12
 
15
13
  ```js
16
- import { Field } from '@fluentui/react-components/unstable';
14
+ import { Field } from '@fluentui/react-components';
17
15
  ```
18
16
 
19
17
  ### Examples
package/dist/index.d.ts CHANGED
@@ -2,21 +2,12 @@
2
2
 
3
3
  import type { ComponentProps } from '@fluentui/react-utilities';
4
4
  import type { ComponentState } from '@fluentui/react-utilities';
5
- import { ForwardRefComponent } from '@fluentui/react-utilities';
5
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
6
6
  import { Label } from '@fluentui/react-label';
7
7
  import * as React_2 from 'react';
8
8
  import type { Slot } from '@fluentui/react-utilities';
9
9
  import type { SlotClassNames } from '@fluentui/react-utilities';
10
10
 
11
- /**
12
- * @deprecated Only for use to make deprecated [Control]Field shim components.
13
- * @internal
14
- */
15
- export declare type DeprecatedFieldProps<ControlProps> = ControlProps & {
16
- root?: FieldProps;
17
- control?: ControlProps;
18
- } & Pick<FieldProps, 'className' | 'hint' | 'label' | 'orientation' | 'style' | 'validationMessage' | 'validationMessageIcon' | 'validationState'>;
19
-
20
11
  export declare const Field: ForwardRefComponent<FieldProps>;
21
12
 
22
13
  export declare const fieldClassNames: SlotClassNames<FieldSlots>;
@@ -164,28 +155,6 @@ export declare type FieldState = ComponentState<Required<FieldSlots>> & Required
164
155
  generatedControlId: string;
165
156
  };
166
157
 
167
- /**
168
- * @deprecated Only for use to make deprecated [Control]Field shim components.
169
- * @internal
170
- */
171
- export declare const getDeprecatedFieldClassNames: (controlRootClassName: string) => {
172
- control: string;
173
- root: string;
174
- label: string;
175
- validationMessage: string;
176
- validationMessageIcon: string;
177
- hint: string;
178
- };
179
-
180
- /**
181
- * @deprecated Only for use to make deprecated [Control]Field shim components.
182
- * @internal
183
- */
184
- export declare function makeDeprecatedField<ControlProps>(Control: React_2.ComponentType<ControlProps>, options?: {
185
- mapProps?: (props: DeprecatedFieldProps<ControlProps>) => DeprecatedFieldProps<ControlProps>;
186
- displayName?: string;
187
- }): ForwardRefComponent<DeprecatedFieldProps<ControlProps>>;
188
-
189
158
  /**
190
159
  * Render the final JSX of Field
191
160
  */
package/lib/index.js CHANGED
@@ -1,5 +1,3 @@
1
1
  export { Field, fieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from './Field';
2
2
  export { FieldContextProvider, useFieldContext_unstable, useFieldContextValues_unstable, useFieldControlProps_unstable } from './contexts/index';
3
- // eslint-disable-next-line deprecation/deprecation
4
- export { getDeprecatedFieldClassNames, makeDeprecatedField } from './util/makeDeprecatedField';
5
3
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Field","fieldClassNames","renderField_unstable","useFieldStyles_unstable","useField_unstable","FieldContextProvider","useFieldContext_unstable","useFieldContextValues_unstable","useFieldControlProps_unstable","getDeprecatedFieldClassNames","makeDeprecatedField"],"sources":["../src/index.ts"],"sourcesContent":["export { Field, fieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from './Field';\nexport type {\n FieldContextValue,\n FieldContextValues,\n FieldControlProps,\n FieldProps,\n FieldSlots,\n FieldState,\n} from './Field';\nexport {\n FieldContextProvider,\n useFieldContext_unstable,\n useFieldContextValues_unstable,\n useFieldControlProps_unstable,\n} from './contexts/index';\nexport type { FieldControlPropsOptions } from './contexts/index';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { getDeprecatedFieldClassNames, makeDeprecatedField } from './util/makeDeprecatedField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { DeprecatedFieldProps } from './util/makeDeprecatedField';\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ;AASzG,SACEC,oBAAoB,EACpBC,wBAAwB,EACxBC,8BAA8B,EAC9BC,6BAA6B,QACxB;AAGP;AACA,SAASC,4BAA4B,EAAEC,mBAAmB,QAAQ"}
1
+ {"version":3,"names":["Field","fieldClassNames","renderField_unstable","useFieldStyles_unstable","useField_unstable","FieldContextProvider","useFieldContext_unstable","useFieldContextValues_unstable","useFieldControlProps_unstable"],"sources":["../src/index.ts"],"sourcesContent":["export { Field, fieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from './Field';\nexport type {\n FieldContextValue,\n FieldContextValues,\n FieldControlProps,\n FieldProps,\n FieldSlots,\n FieldState,\n} from './Field';\nexport {\n FieldContextProvider,\n useFieldContext_unstable,\n useFieldContextValues_unstable,\n useFieldControlProps_unstable,\n} from './contexts/index';\nexport type { FieldControlPropsOptions } from './contexts/index';\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ;AASzG,SACEC,oBAAoB,EACpBC,wBAAwB,EACxBC,8BAA8B,EAC9BC,6BAA6B,QACxB"}
@@ -17,13 +17,10 @@ _export(exports, {
17
17
  FieldContextProvider: ()=>_index.FieldContextProvider,
18
18
  useFieldContext_unstable: ()=>_index.useFieldContext_unstable,
19
19
  useFieldContextValues_unstable: ()=>_index.useFieldContextValues_unstable,
20
- useFieldControlProps_unstable: ()=>_index.useFieldControlProps_unstable,
21
- getDeprecatedFieldClassNames: ()=>_makeDeprecatedField.getDeprecatedFieldClassNames,
22
- makeDeprecatedField: ()=>_makeDeprecatedField.makeDeprecatedField
20
+ useFieldControlProps_unstable: ()=>_index.useFieldControlProps_unstable
23
21
  });
24
22
  const _field = require("./Field");
25
23
  const _index = require("./contexts/index");
26
- const _makeDeprecatedField = require("./util/makeDeprecatedField");
27
24
  //# sourceMappingURL=index.js.map
28
25
 
29
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Field, fieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from './Field';\nexport { FieldContextProvider, useFieldContext_unstable, useFieldContextValues_unstable, useFieldControlProps_unstable } from './contexts/index';\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","FieldContextProvider","useFieldContext_unstable","useFieldContextValues_unstable","useFieldControlProps_unstable","getDeprecatedFieldClassNames","makeDeprecatedField"],"mappings":";;;;;;;;;;;IAASA,KAAK,MAALA,YAAK;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;IACxFC,oBAAoB,MAApBA,2BAAoB;IAAEC,wBAAwB,MAAxBA,+BAAwB;IAAEC,8BAA8B,MAA9BA,qCAA8B;IAAEC,6BAA6B,MAA7BA,oCAA6B;IAE7GC,4BAA4B,MAA5BA,iDAA4B;IAAEC,mBAAmB,MAAnBA,wCAAmB;;uBAH+C;uBACqB;qCAE5D;CAClE,iCAAiC"}
1
+ {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Field, fieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from './Field';\nexport { FieldContextProvider, useFieldContext_unstable, useFieldContextValues_unstable, useFieldControlProps_unstable } from './contexts/index';\n//# sourceMappingURL=index.js.map"],"names":["Field","fieldClassNames","renderField_unstable","useFieldStyles_unstable","useField_unstable","FieldContextProvider","useFieldContext_unstable","useFieldContextValues_unstable","useFieldControlProps_unstable"],"mappings":";;;;;;;;;;;IAASA,KAAK,MAALA,YAAK;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;IACxFC,oBAAoB,MAApBA,2BAAoB;IAAEC,wBAAwB,MAAxBA,+BAAwB;IAAEC,8BAA8B,MAA9BA,qCAA8B;IAAEC,6BAA6B,MAA7BA,oCAA6B;;uBADb;uBACqB;CAC9H,iCAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-field",
3
- "version": "9.0.0-beta.2",
3
+ "version": "9.1.0",
4
4
  "description": "Fluent UI Field components",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -32,11 +32,11 @@
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-context-selector": "^9.1.17",
35
+ "@fluentui/react-context-selector": "^9.1.18",
36
36
  "@fluentui/react-icons": "^2.0.196",
37
- "@fluentui/react-label": "^9.1.8",
37
+ "@fluentui/react-label": "^9.1.9",
38
38
  "@fluentui/react-theme": "^9.1.7",
39
- "@fluentui/react-utilities": "^9.7.4",
39
+ "@fluentui/react-utilities": "^9.8.0",
40
40
  "@griffel/react": "^1.5.2",
41
41
  "@swc/helpers": "^0.4.14"
42
42
  },
@@ -49,8 +49,7 @@
49
49
  "beachball": {
50
50
  "disallowedChangeTypes": [
51
51
  "major",
52
- "minor",
53
- "patch"
52
+ "prerelease"
54
53
  ]
55
54
  },
56
55
  "exports": {
@@ -1,68 +0,0 @@
1
- /* eslint-disable deprecation/deprecation */import * as React from 'react';
2
- import { Field, fieldClassNames } from '../Field';
3
- /**
4
- * Partition the props used by the Field itself, from the props that are passed to the underlying field component.
5
- */
6
- function getPartitionedFieldProps(props) {
7
- const {
8
- className,
9
- control,
10
- hint,
11
- label,
12
- orientation,
13
- required,
14
- root,
15
- size,
16
- style,
17
- validationMessage,
18
- validationMessageIcon,
19
- validationState = 'none',
20
- ...restOfProps
21
- } = props;
22
- return [{
23
- className,
24
- hint,
25
- label,
26
- orientation,
27
- required,
28
- size,
29
- style,
30
- validationMessage,
31
- validationMessageIcon,
32
- validationState,
33
- ...root
34
- }, {
35
- required,
36
- size,
37
- ...restOfProps,
38
- ...control
39
- }];
40
- }
41
- /**
42
- * @deprecated Only for use to make deprecated [Control]Field shim components.
43
- * @internal
44
- */
45
- export function makeDeprecatedField(Control, options = {}) {
46
- const {
47
- mapProps = props => props,
48
- displayName = `${Control.displayName}Field`
49
- } = options;
50
- const DeprecatedField = /*#__PURE__*/React.forwardRef((props, ref) => {
51
- const [fieldProps, controlProps] = getPartitionedFieldProps(mapProps(props));
52
- return /*#__PURE__*/React.createElement(Field, fieldProps, /*#__PURE__*/React.createElement(Control, {
53
- ...controlProps,
54
- ref: ref
55
- }));
56
- });
57
- DeprecatedField.displayName = displayName;
58
- return DeprecatedField;
59
- }
60
- /**
61
- * @deprecated Only for use to make deprecated [Control]Field shim components.
62
- * @internal
63
- */
64
- export const getDeprecatedFieldClassNames = controlRootClassName => ({
65
- ...fieldClassNames,
66
- control: controlRootClassName
67
- });
68
- //# sourceMappingURL=makeDeprecatedField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","Field","fieldClassNames","getPartitionedFieldProps","props","className","control","hint","label","orientation","required","root","size","style","validationMessage","validationMessageIcon","validationState","restOfProps","makeDeprecatedField","Control","options","mapProps","displayName","DeprecatedField","forwardRef","ref","fieldProps","controlProps","createElement","getDeprecatedFieldClassNames","controlRootClassName"],"sources":["../../src/util/makeDeprecatedField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport * as React from 'react';\nimport { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { FieldProps } from '../Field';\nimport { Field, fieldClassNames } from '../Field';\n\n/**\n * @deprecated Only for use to make deprecated [Control]Field shim components.\n * @internal\n */\nexport type DeprecatedFieldProps<ControlProps> = ControlProps & {\n root?: FieldProps;\n control?: ControlProps;\n} & Pick<\n FieldProps,\n | 'className'\n | 'hint'\n | 'label'\n | 'orientation'\n | 'style'\n | 'validationMessage'\n | 'validationMessageIcon'\n | 'validationState'\n >;\n\n/**\n * Partition the props used by the Field itself, from the props that are passed to the underlying field component.\n */\nfunction getPartitionedFieldProps<ControlProps>(\n props: DeprecatedFieldProps<ControlProps> & Pick<FieldProps, 'required' | 'size'>,\n) {\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\n return [\n {\n className,\n hint,\n label,\n orientation,\n required,\n size,\n style,\n validationMessage,\n validationMessageIcon,\n validationState,\n ...root,\n },\n {\n required,\n size,\n ...restOfProps,\n ...control,\n },\n ];\n}\n\n/**\n * @deprecated Only for use to make deprecated [Control]Field shim components.\n * @internal\n */\nexport function makeDeprecatedField<ControlProps>(\n Control: React.ComponentType<ControlProps>,\n options: {\n mapProps?: (props: DeprecatedFieldProps<ControlProps>) => DeprecatedFieldProps<ControlProps>;\n displayName?: string;\n } = {},\n) {\n const { mapProps = props => props, displayName = `${Control.displayName}Field` } = options;\n\n const DeprecatedField = React.forwardRef((props, ref) => {\n const [fieldProps, controlProps] = getPartitionedFieldProps(mapProps(props));\n return (\n <Field {...fieldProps}>\n {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}\n <Control {...(controlProps as any)} ref={ref as any} />\n </Field>\n );\n }) as ForwardRefComponent<DeprecatedFieldProps<ControlProps>>;\n\n DeprecatedField.displayName = displayName;\n\n return DeprecatedField;\n}\n\n/**\n * @deprecated Only for use to make deprecated [Control]Field shim components.\n * @internal\n */\nexport const getDeprecatedFieldClassNames = (controlRootClassName: string) => ({\n ...fieldClassNames,\n control: controlRootClassName,\n});\n"],"mappings":"AAAA,4CACA,YAAYA,KAAA,MAAW;AAGvB,SAASC,KAAK,EAAEC,eAAe,QAAQ;AAqBvC;;;AAGA,SAASC,yBACPC,KAAiF,EACjF;EACA,MAAM;IACJC,SAAA;IACAC,OAAA;IACAC,IAAA;IACAC,KAAA;IACAC,WAAA;IACAC,QAAA;IACAC,IAAA;IACAC,IAAA;IACAC,KAAA;IACAC,iBAAA;IACAC,qBAAA;IACAC,eAAA,GAAkB;IAClB,GAAGC;EAAA,CACJ,GAAGb,KAAA;EAEJ,OAAO,CACL;IACEC,SAAA;IACAE,IAAA;IACAC,KAAA;IACAC,WAAA;IACAC,QAAA;IACAE,IAAA;IACAC,KAAA;IACAC,iBAAA;IACAC,qBAAA;IACAC,eAAA;IACA,GAAGL;EACL,GACA;IACED,QAAA;IACAE,IAAA;IACA,GAAGK,WAAW;IACd,GAAGX;EACL,EACD;AACH;AAEA;;;;AAIA,OAAO,SAASY,oBACdC,OAA0C,EAC1CC,OAAA,GAGI,CAAC,CAAC,EACN;EACA,MAAM;IAAEC,QAAA,GAAWjB,KAAA,IAASA,KAAA;IAAOkB,WAAA,GAAe,GAAEH,OAAA,CAAQG,WAAY;EAAM,CAAE,GAAGF,OAAA;EAEnF,MAAMG,eAAA,gBAAkBvB,KAAA,CAAMwB,UAAU,CAAC,CAACpB,KAAA,EAAOqB,GAAA,KAAQ;IACvD,MAAM,CAACC,UAAA,EAAYC,YAAA,CAAa,GAAGxB,wBAAA,CAAyBkB,QAAA,CAASjB,KAAA;IACrE,oBACEJ,KAAA,CAAA4B,aAAA,CAAC3B,KAAA,EAAUyB,UAAA,eAET1B,KAAA,CAAA4B,aAAA,CAACT,OAAA;MAAS,GAAIQ,YAAY;MAAUF,GAAA,EAAKA;;EAG/C;EAEAF,eAAA,CAAgBD,WAAW,GAAGA,WAAA;EAE9B,OAAOC,eAAA;AACT;AAEA;;;;AAIA,OAAO,MAAMM,4BAAA,GAAgCC,oBAAA,KAAkC;EAC7E,GAAG5B,eAAe;EAClBI,OAAA,EAASwB;AACX"}
@@ -1,61 +0,0 @@
1
- /* eslint-disable deprecation/deprecation */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
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
14
- });
15
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
16
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
17
- const _field = require("../Field");
18
- /**
19
- * Partition the props used by the Field itself, from the props that are passed to the underlying field component.
20
- */ function getPartitionedFieldProps(props) {
21
- const { className , control , hint , label , orientation , required , root , size , style , validationMessage , validationMessageIcon , validationState ='none' , ...restOfProps } = props;
22
- return [
23
- {
24
- className,
25
- hint,
26
- label,
27
- orientation,
28
- required,
29
- size,
30
- style,
31
- validationMessage,
32
- validationMessageIcon,
33
- validationState,
34
- ...root
35
- },
36
- {
37
- required,
38
- size,
39
- ...restOfProps,
40
- ...control
41
- }
42
- ];
43
- }
44
- function makeDeprecatedField(Control, options = {}) {
45
- const { mapProps =(props)=>props , displayName =`${Control.displayName}Field` } = options;
46
- const DeprecatedField = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
47
- const [fieldProps, controlProps] = getPartitionedFieldProps(mapProps(props));
48
- return /*#__PURE__*/ _react.createElement(_field.Field, fieldProps, /*#__PURE__*/ _react.createElement(Control, {
49
- ...controlProps,
50
- ref: ref
51
- }));
52
- });
53
- DeprecatedField.displayName = displayName;
54
- return DeprecatedField;
55
- }
56
- const getDeprecatedFieldClassNames = (controlRootClassName)=>({
57
- ..._field.fieldClassNames,
58
- control: controlRootClassName
59
- }); //# sourceMappingURL=makeDeprecatedField.js.map
60
-
61
- //# sourceMappingURL=makeDeprecatedField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../lib/util/makeDeprecatedField.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */import * 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, options = {}) {\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, fieldProps, /*#__PURE__*/React.createElement(Control, {\n ...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","mapProps","displayName","DeprecatedField","React","forwardRef","ref","fieldProps","controlProps","createElement","Field","controlRootClassName","fieldClassNames"],"mappings":"AAAA,0CAA0C;;;;;;;;;;;IA4C1BA,mBAAmB,MAAnBA;IAmBHC,4BAA4B,MAA5BA;;;6DA/DsD;uBAC5B;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,EAAEC,UAAU,CAAC,CAAC,EAAE;IACzD,MAAM,EACJC,UAAWhB,CAAAA,QAASA,MAAK,EACzBiB,aAAc,CAAC,EAAEH,QAAQG,WAAW,CAAC,KAAK,CAAC,CAAA,EAC5C,GAAGF;IACJ,MAAMG,kBAAkB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACpB,OAAOqB,MAAQ;QACpE,MAAM,CAACC,YAAYC,aAAa,GAAGxB,yBAAyBiB,SAAShB;QACrE,OAAO,WAAW,GAAEmB,OAAMK,aAAa,CAACC,YAAK,EAAEH,YAAY,WAAW,GAAEH,OAAMK,aAAa,CAACV,SAAS;YACnG,GAAGS,YAAY;YACfF,KAAKA;QACP;IACF;IACAH,gBAAgBD,WAAW,GAAGA;IAC9B,OAAOC;AACT;AAKO,MAAMpB,+BAA+B4B,CAAAA,uBAAyB,CAAA;QACnE,GAAGC,sBAAe;QAClBzB,SAASwB;IACX,CAAA,GACA,+CAA+C"}