@lobehub/ui 1.83.0 → 1.84.0
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/es/Form/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormProps as AntFormProps, type FormInstance } from 'antd';
|
|
2
|
-
import { type ReactNode } from 'react';
|
|
3
|
-
import { type FormGroupProps } from './components/FormGroup';
|
|
4
|
-
import { type FormItemProps } from './components/FormItem';
|
|
2
|
+
import { type ReactNode, RefAttributes } from 'react';
|
|
3
|
+
import FormGroup, { type FormGroupProps } from './components/FormGroup';
|
|
4
|
+
import FormItem, { type FormItemProps } from './components/FormItem';
|
|
5
5
|
export interface ItemGroup {
|
|
6
6
|
children: FormItemProps[];
|
|
7
7
|
extra?: FormGroupProps['extra'];
|
|
@@ -14,5 +14,10 @@ export interface FormProps extends AntFormProps {
|
|
|
14
14
|
itemMinWidth?: FormItemProps['minWidth'];
|
|
15
15
|
items?: ItemGroup[];
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
export interface IForm {
|
|
18
|
+
(props: FormProps & RefAttributes<FormInstance>): ReactNode;
|
|
19
|
+
Group: typeof FormGroup;
|
|
20
|
+
Item: typeof FormItem;
|
|
21
|
+
}
|
|
22
|
+
declare const Form: IForm;
|
|
18
23
|
export default Form;
|
package/es/Form/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import FormItem from "./components/FormItem";
|
|
|
11
11
|
import { useStyles } from "./style";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
var
|
|
14
|
+
var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
15
15
|
var className = _ref.className,
|
|
16
16
|
itemMinWidth = _ref.itemMinWidth,
|
|
17
17
|
footer = _ref.footer,
|
|
@@ -46,4 +46,7 @@ var Form = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
46
46
|
})]
|
|
47
47
|
}));
|
|
48
48
|
});
|
|
49
|
+
var Form = FormParent;
|
|
50
|
+
Form.Item = FormItem;
|
|
51
|
+
Form.Group = FormGroup;
|
|
49
52
|
export default Form;
|