@instructure/ui-form-field 11.7.9-snapshot-5 → 11.7.10
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.md +8 -2
- package/es/FormField/v2/index.js +1 -6
- package/es/FormFieldGroup/v2/index.js +20 -12
- package/es/FormFieldLayout/v2/index.js +39 -5
- package/es/FormFieldLayout/v2/styles.js +2 -2
- package/lib/FormField/v2/index.js +1 -6
- package/lib/FormFieldGroup/v2/index.js +19 -11
- package/lib/FormFieldLayout/v2/index.js +39 -5
- package/lib/FormFieldLayout/v2/styles.js +2 -2
- package/package.json +14 -14
- package/src/FormField/v2/README.md +28 -2
- package/src/FormField/v2/index.tsx +1 -5
- package/src/FormField/v2/props.ts +10 -3
- package/src/FormFieldGroup/v2/index.tsx +21 -9
- package/src/FormFieldGroup/v2/props.ts +18 -3
- package/src/FormFieldLayout/v2/index.tsx +64 -8
- package/src/FormFieldLayout/v2/props.ts +39 -6
- package/src/FormFieldLayout/v2/styles.ts +2 -2
- package/src/exports/b.ts +4 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/FormField/v2/index.d.ts.map +1 -1
- package/types/FormField/v2/props.d.ts +10 -3
- package/types/FormField/v2/props.d.ts.map +1 -1
- package/types/FormFieldGroup/v2/index.d.ts +7 -4
- package/types/FormFieldGroup/v2/index.d.ts.map +1 -1
- package/types/FormFieldGroup/v2/props.d.ts +8 -3
- package/types/FormFieldGroup/v2/props.d.ts.map +1 -1
- package/types/FormFieldLayout/v2/index.d.ts.map +1 -1
- package/types/FormFieldLayout/v2/props.d.ts +34 -7
- package/types/FormFieldLayout/v2/props.d.ts.map +1 -1
- package/types/exports/b.d.ts +1 -1
- package/types/exports/b.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormField/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;GAIG;AACH,cAAM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,WAAW,SAAc;IAChC,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,MAAM,CAAC,YAAY,4DAAe;IAClC,MAAM,CAAC,YAAY;QACjB,MAAM;QACN,MAAM;QACN,UAAU;QACV,MAAM;MACP;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAQ9B;IAED,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormField/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;GAIG;AACH,cAAM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,WAAW,SAAc;IAChC,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,MAAM,CAAC,YAAY,4DAAe;IAClC,MAAM,CAAC,YAAY;QACjB,MAAM;QACN,MAAM;QACN,UAAU;QACV,MAAM;MACP;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAQ9B;IAED,MAAM,qDAeL;CACF;eAEc,SAAS;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { OtherHTMLAttributes } from '@instructure/shared-types';
|
|
3
3
|
import type { FormMessage } from '../../utils/v1/FormPropTypes';
|
|
4
4
|
import type { Spacing } from '@instructure/emotion';
|
|
5
|
+
import type { FormFieldLayoutChildren } from '../../FormFieldLayout/v2/props';
|
|
5
6
|
type FormFieldOwnProps = {
|
|
6
7
|
label: React.ReactNode;
|
|
7
8
|
/**
|
|
@@ -21,11 +22,17 @@ type FormFieldOwnProps = {
|
|
|
21
22
|
*/
|
|
22
23
|
messagesId?: string;
|
|
23
24
|
/**
|
|
24
|
-
* id for the label element
|
|
25
|
-
*
|
|
25
|
+
* `id` for the label/legend element. Useful when the control is not a
|
|
26
|
+
* [labelable](https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Content_categories#labelable)
|
|
27
|
+
* element (e.g. a custom widget), and needs to reference the label via
|
|
28
|
+
* `aria-labelledby`.
|
|
26
29
|
*/
|
|
27
30
|
labelId?: string;
|
|
28
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The form control. Can be a function that receives `{ describedBy }`, so
|
|
33
|
+
* the control can reference the messages via `aria-describedby`.
|
|
34
|
+
*/
|
|
35
|
+
children?: FormFieldLayoutChildren;
|
|
29
36
|
inline?: boolean;
|
|
30
37
|
layout?: 'stacked' | 'inline';
|
|
31
38
|
labelAlign?: 'start' | 'end';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormField/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormField/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,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,QAAA,MAAM,YAAY,EAAE,eAkBnB,CAAA;AAED,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
import type { FormFieldGroupProps } from './props';
|
|
3
|
+
import type { FormFieldLayoutChildrenParams } from '../../FormFieldLayout/v2/props';
|
|
3
4
|
/**
|
|
4
5
|
---
|
|
5
6
|
category: components
|
|
@@ -15,7 +16,7 @@ declare class FormFieldGroup extends Component<FormFieldGroupProps> {
|
|
|
15
16
|
messagesId?: string;
|
|
16
17
|
disabled?: boolean;
|
|
17
18
|
readOnly?: boolean;
|
|
18
|
-
children?:
|
|
19
|
+
children?: import("../../FormFieldLayout/v2/props.js").FormFieldLayoutChildren;
|
|
19
20
|
layout?: 'stacked' | 'columns' | 'inline';
|
|
20
21
|
rowSpacing?: 'none' | 'small' | 'medium' | 'large';
|
|
21
22
|
colSpacing?: 'none' | 'small' | 'medium' | 'large';
|
|
@@ -32,14 +33,16 @@ declare class FormFieldGroup extends Component<FormFieldGroupProps> {
|
|
|
32
33
|
vAlign: string;
|
|
33
34
|
isGroup: boolean;
|
|
34
35
|
};
|
|
36
|
+
constructor(props: FormFieldGroupProps);
|
|
37
|
+
private readonly _defaultId;
|
|
35
38
|
ref: Element | null;
|
|
36
39
|
handleRef: (el: Element | null) => void;
|
|
37
40
|
componentDidMount(): void;
|
|
38
41
|
componentDidUpdate(): void;
|
|
39
42
|
get invalid(): boolean;
|
|
40
|
-
renderColumns(): import("@emotion/react/jsx-runtime").JSX.Element[] | null | undefined;
|
|
41
|
-
renderChildren(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
42
|
-
renderFields(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
43
|
+
renderColumns(params: FormFieldLayoutChildrenParams): import("@emotion/react/jsx-runtime").JSX.Element[] | null | undefined;
|
|
44
|
+
renderChildren(params: FormFieldLayoutChildrenParams): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
|
+
renderFields(params: FormFieldLayoutChildrenParams): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
43
46
|
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
47
|
}
|
|
45
48
|
export default FormFieldGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldGroup/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EACL,SAAS,EAKV,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldGroup/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EACL,SAAS,EAKV,MAAM,OAAO,CAAA;AAkBd,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAA;AAEnF;;;;GAIG;AACH,cAEM,cAAe,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACzD,MAAM,CAAC,WAAW,SAAmB;IACrC,MAAM,CAAC,QAAQ,CAAC,WAAW,oBAAmB;IAE9C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;QACjB,EAAE;QACF,QAAQ;QACR,UAAU;QACV,UAAU;QACV,MAAM;QACN,OAAO;MACR;IAED,YAAY,KAAK,EAAE,mBAAmB,EAGrC;IAED,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;IAEnC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAQ9B;IAED,iBAAiB,SAEhB;IAED,kBAAkB,SAEjB;IAED,IAAI,OAAO,YAOV;IAED,aAAa,CAAC,MAAM,EAAE,6BAA6B,yEAmBlD;IAED,cAAc,CAAC,MAAM,EAAE,6BAA6B,oDAcnD;IAED,YAAY,CAAC,MAAM,EAAE,6BAA6B,oDAQjD;IAED,MAAM,qDA+CL;CACF;eAEc,cAAc;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AsElementType, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
2
2
|
import type { WithStyleProps, ComponentStyle, Spacing } from '@instructure/emotion';
|
|
3
|
-
import type { FormFieldLayoutOwnProps } from '../../FormFieldLayout/v2/props';
|
|
3
|
+
import type { FormFieldLayoutChildren, FormFieldLayoutOwnProps } from '../../FormFieldLayout/v2/props';
|
|
4
4
|
import type { FormMessage } from '../../utils/v1/FormPropTypes';
|
|
5
|
+
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils';
|
|
5
6
|
type FormFieldGroupOwnProps = {
|
|
6
7
|
description: React.ReactNode;
|
|
7
8
|
/**
|
|
@@ -28,7 +29,11 @@ type FormFieldGroupOwnProps = {
|
|
|
28
29
|
* Whether the field group is read-only. When true, error and success messages will be hidden.
|
|
29
30
|
*/
|
|
30
31
|
readOnly?: boolean;
|
|
31
|
-
|
|
32
|
+
/**
|
|
33
|
+
* The form controls. Can be a function that receives `{ describedBy }`, so
|
|
34
|
+
* the controls can reference the group messages via `aria-describedby`.
|
|
35
|
+
*/
|
|
36
|
+
children?: FormFieldLayoutChildren;
|
|
32
37
|
layout?: 'stacked' | 'columns' | 'inline';
|
|
33
38
|
rowSpacing?: 'none' | 'small' | 'medium' | 'large';
|
|
34
39
|
colSpacing?: 'none' | 'small' | 'medium' | 'large';
|
|
@@ -47,7 +52,7 @@ type FormFieldGroupOwnProps = {
|
|
|
47
52
|
};
|
|
48
53
|
type PropKeys = keyof FormFieldGroupOwnProps;
|
|
49
54
|
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
50
|
-
type FormFieldGroupProps = FormFieldGroupOwnProps & WithStyleProps<null, FormFieldGroupStyle> & OtherHTMLAttributes<FormFieldGroupOwnProps> & Omit<FormFieldLayoutOwnProps, 'messages' | 'messagesId' | 'vAlign' | 'layout' | 'label' | 'children'>;
|
|
55
|
+
type FormFieldGroupProps = FormFieldGroupOwnProps & WithStyleProps<null, FormFieldGroupStyle> & OtherHTMLAttributes<FormFieldGroupOwnProps> & WithDeterministicIdProps & Omit<FormFieldLayoutOwnProps, 'id' | 'messages' | 'messagesId' | 'vAlign' | 'layout' | 'label' | 'children'>;
|
|
51
56
|
type FormFieldGroupStyle = ComponentStyle<'formFieldGroup'>;
|
|
52
57
|
declare const allowedProps: AllowedPropKeys;
|
|
53
58
|
export type { FormFieldGroupProps, FormFieldGroupStyle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormFieldGroup/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,OAAO,EACR,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormFieldGroup/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,OAAO,EACR,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAE3E,KAAK,sBAAsB,GAAG;IAC5B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B;;OAEG;IACH,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB;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CAAA;AAED,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v2/index.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v2/index.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAwBzC;;;;GAIG;AACH,QAAA,MAAM,eAAe;;4GA2OpB,CAAA;eAIc,eAAe;AAC9B,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -3,14 +3,34 @@ import type { ComponentStyle, NewThemeOverrideProp, Spacing } from '@instructure
|
|
|
3
3
|
import type { FormMessage } from '../../utils/v1/FormPropTypes';
|
|
4
4
|
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils';
|
|
5
5
|
import type { NewComponentTypes } from '@instructure/ui-themes';
|
|
6
|
+
type FormFieldLayoutChildrenParams = {
|
|
7
|
+
/**
|
|
8
|
+
* The id of the rendered messages, or `undefined` when no messages are
|
|
9
|
+
* shown. Add it to the control's `aria-describedby`.
|
|
10
|
+
*/
|
|
11
|
+
describedBy?: string;
|
|
12
|
+
};
|
|
13
|
+
type FormFieldLayoutChildren = React.ReactNode | ((params: FormFieldLayoutChildrenParams) => React.ReactNode);
|
|
6
14
|
type FormFieldLayoutOwnProps = {
|
|
15
|
+
/**
|
|
16
|
+
* The label text. Will be appended by a `*` if this field is required.
|
|
17
|
+
*/
|
|
7
18
|
label: React.ReactNode;
|
|
8
19
|
/**
|
|
9
|
-
*
|
|
20
|
+
* The id of the form control (=the child of this component). It's applied as the
|
|
21
|
+
* [for](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/for)
|
|
22
|
+
* attribute of the label, so the control needs to have the same `id`.
|
|
23
|
+
* Not used when rendering as a `fieldset` (group)
|
|
10
24
|
*/
|
|
11
|
-
id
|
|
25
|
+
id: string;
|
|
12
26
|
/**
|
|
13
|
-
*
|
|
27
|
+
* The element type to render as, `div` be default.
|
|
28
|
+
*
|
|
29
|
+
* Also determines how the `label` will be rendered:
|
|
30
|
+
* If its value is `fieldset` (for form groups), it be rendered in a
|
|
31
|
+
* [legend](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/legend),
|
|
32
|
+
* for all other cases it will be in a
|
|
33
|
+
* [label](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/label).
|
|
14
34
|
*/
|
|
15
35
|
as?: AsElementType;
|
|
16
36
|
/**
|
|
@@ -25,11 +45,18 @@ type FormFieldLayoutOwnProps = {
|
|
|
25
45
|
*/
|
|
26
46
|
messagesId?: string;
|
|
27
47
|
/**
|
|
28
|
-
* id for the label element
|
|
29
|
-
*
|
|
48
|
+
* `id` for the label/legend element. Useful when the control is not a
|
|
49
|
+
* [labelable](https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Content_categories#labelable)
|
|
50
|
+
* element (e.g. a custom widget), and needs to reference the label via
|
|
51
|
+
* `aria-labelledby={labelId}`.
|
|
30
52
|
*/
|
|
31
53
|
labelId?: string;
|
|
32
|
-
|
|
54
|
+
/**
|
|
55
|
+
* The form control(s). Can be a function that receives
|
|
56
|
+
* `{ describedBy }`, so the control can reference the messages via
|
|
57
|
+
* `aria-describedby`.
|
|
58
|
+
*/
|
|
59
|
+
children?: FormFieldLayoutChildren;
|
|
33
60
|
/**
|
|
34
61
|
* If `true` use an inline layout -- content will flow on the left/right side
|
|
35
62
|
* of this component
|
|
@@ -90,6 +117,6 @@ type FormFieldStyleProps = {
|
|
|
90
117
|
hasVisibleLabel: boolean;
|
|
91
118
|
isGroup: boolean;
|
|
92
119
|
};
|
|
93
|
-
export type { FormFieldStyleProps, FormFieldLayoutProps, FormFieldLayoutStyle, FormFieldLayoutOwnProps };
|
|
120
|
+
export type { FormFieldLayoutChildren, FormFieldLayoutChildrenParams, FormFieldStyleProps, FormFieldLayoutProps, FormFieldLayoutStyle, FormFieldLayoutOwnProps };
|
|
94
121
|
export { allowedProps };
|
|
95
122
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,OAAO,EACR,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,OAAO,EACR,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,KAAK,6BAA6B,GAAG;IACnC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,KAAK,uBAAuB,GACxB,KAAK,CAAC,SAAS,GACf,CAAC,CA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AAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,oBAAoB,GAAG,uBAAuB,GACjD,oBAAoB,CAAC,UAAU,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAC,GACtE,mBAAmB,CAAC,uBAAuB,CAAC,GAC5C,wBAAwB,CAAA;AAE1B,KAAK,oBAAoB,GAAG,cAAc,CACtC,iBAAiB,GACjB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,CACrB,CAAA;AACD,QAAA,MAAM,YAAY,EAAE,eAmBnB,CAAA;AAED,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,OAAO,CAAA;IACpB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,eAAe,EAAE,OAAO,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACxB,CAAA;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/types/exports/b.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ export type { FormMessageType, FormMessage, FormMessageChild } from '../utils/v1
|
|
|
7
7
|
export type { FormFieldOwnProps, FormFieldProps } from '../FormField/v2/props';
|
|
8
8
|
export type { FormFieldMessageProps } from '../FormFieldMessage/v2/props';
|
|
9
9
|
export type { FormFieldMessagesProps } from '../FormFieldMessages/v2/props';
|
|
10
|
-
export type { FormFieldLayoutProps } from '../FormFieldLayout/v2/props';
|
|
10
|
+
export type { FormFieldLayoutProps, FormFieldLayoutChildrenParams } from '../FormFieldLayout/v2/props';
|
|
11
11
|
export type { FormFieldGroupProps } from '../FormFieldGroup/v2/props';
|
|
12
12
|
//# sourceMappingURL=b.d.ts.map
|
package/types/exports/b.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"b.d.ts","sourceRoot":"","sources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