@lobehub/ui 1.155.1 → 1.155.3
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 +2 -1
- package/es/Form/index.js +1 -1
- package/es/FormModal/index.d.ts +4 -3
- package/es/FormModal/index.js +11 -9
- package/package.json +1 -1
package/es/Form/index.d.ts
CHANGED
|
@@ -19,11 +19,12 @@ export interface FormProps extends Omit<AntFormProps, 'variant'> {
|
|
|
19
19
|
itemsType?: ItemsType;
|
|
20
20
|
variant?: FormVariant;
|
|
21
21
|
}
|
|
22
|
-
export { FormInstance } from 'antd';
|
|
22
|
+
export type { FormInstance } from 'antd';
|
|
23
23
|
export interface IForm {
|
|
24
24
|
(props: FormProps & RefAttributes<FormInstance>): ReactNode;
|
|
25
25
|
Group: typeof FormGroup;
|
|
26
26
|
Item: typeof FormItem;
|
|
27
|
+
Provider: typeof AntForm.Provider;
|
|
27
28
|
useForm: typeof AntForm.useForm;
|
|
28
29
|
}
|
|
29
30
|
declare const Form: IForm;
|
package/es/Form/index.js
CHANGED
|
@@ -76,9 +76,9 @@ var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
76
76
|
})]
|
|
77
77
|
}));
|
|
78
78
|
});
|
|
79
|
-
export { FormInstance } from 'antd';
|
|
80
79
|
var Form = FormParent;
|
|
81
80
|
Form.Item = FormItem;
|
|
82
81
|
Form.Group = FormGroup;
|
|
83
82
|
Form.useForm = AntForm.useForm;
|
|
83
|
+
Form.Provider = AntForm.Provider;
|
|
84
84
|
export default Form;
|
package/es/FormModal/index.d.ts
CHANGED
|
@@ -7,12 +7,13 @@ export interface FormModalProps extends PickModalProps, PickFormProps {
|
|
|
7
7
|
classNames?: {
|
|
8
8
|
form?: FormProps['className'];
|
|
9
9
|
} & ModalProps['classNames'];
|
|
10
|
-
|
|
11
|
-
finishLoading?: ModalProps['confirmLoading'];
|
|
12
|
-
finishText?: ModalProps['okText'];
|
|
10
|
+
onSubmit?: ModalProps['onOk'];
|
|
13
11
|
styles?: {
|
|
14
12
|
form?: FormProps['style'];
|
|
15
13
|
} & ModalProps['styles'];
|
|
14
|
+
submitButtonProps?: ModalProps['okButtonProps'];
|
|
15
|
+
submitLoading?: ModalProps['confirmLoading'];
|
|
16
|
+
submitText?: ModalProps['okText'];
|
|
16
17
|
}
|
|
17
18
|
declare const FormModal: import("react").ForwardRefExoticComponent<FormModalProps & import("react").RefAttributes<FormInstance<any>>>;
|
|
18
19
|
export default FormModal;
|
package/es/FormModal/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["classNames", "className", "style", "closable", "styles", "children", "allowFullscreen", "title", "wrapClassName", "afterOpenChange", "width", "onCancel", "centered", "open", "afterClose", "destroyOnClose", "closeIcon", "paddings", "maxHeight", "enableResponsive", "zIndex", "mask", "getContainer", "keyboard", "focusTriggerAfterClose", "forceRender", "loading", "footer", "
|
|
3
|
+
var _excluded = ["classNames", "className", "style", "closable", "styles", "children", "allowFullscreen", "title", "wrapClassName", "afterOpenChange", "width", "onCancel", "centered", "open", "afterClose", "destroyOnClose", "closeIcon", "paddings", "maxHeight", "enableResponsive", "zIndex", "mask", "getContainer", "keyboard", "focusTriggerAfterClose", "forceRender", "loading", "footer", "submitButtonProps", "submitLoading", "onFinish", "submitText", "variant", "gap", "onSubmit"],
|
|
4
4
|
_excluded2 = ["form", "footer"],
|
|
5
5
|
_excluded3 = ["form", "footer"];
|
|
6
6
|
import { Button } from 'antd';
|
|
@@ -43,13 +43,14 @@ var FormModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
43
43
|
forceRender = _ref.forceRender,
|
|
44
44
|
loading = _ref.loading,
|
|
45
45
|
footer = _ref.footer,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
submitButtonProps = _ref.submitButtonProps,
|
|
47
|
+
submitLoading = _ref.submitLoading,
|
|
48
48
|
onFinish = _ref.onFinish,
|
|
49
|
-
|
|
49
|
+
submitText = _ref.submitText,
|
|
50
50
|
_ref$variant = _ref.variant,
|
|
51
51
|
variant = _ref$variant === void 0 ? 'pure' : _ref$variant,
|
|
52
52
|
gap = _ref.gap,
|
|
53
|
+
onSubmit = _ref.onSubmit,
|
|
53
54
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
54
55
|
var _useResponsive = useResponsive(),
|
|
55
56
|
mobile = _useResponsive.mobile;
|
|
@@ -71,7 +72,7 @@ var FormModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
71
72
|
classNames: modalClassNames,
|
|
72
73
|
closable: closable,
|
|
73
74
|
closeIcon: closeIcon,
|
|
74
|
-
confirmLoading:
|
|
75
|
+
confirmLoading: submitLoading,
|
|
75
76
|
destroyOnClose: destroyOnClose,
|
|
76
77
|
enableResponsive: enableResponsive,
|
|
77
78
|
focusTriggerAfterClose: focusTriggerAfterClose,
|
|
@@ -113,13 +114,14 @@ var FormModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
113
114
|
children: footer || /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
114
115
|
block: true,
|
|
115
116
|
htmlType: "submit",
|
|
116
|
-
loading:
|
|
117
|
+
loading: submitLoading,
|
|
118
|
+
onClick: onSubmit,
|
|
117
119
|
type: 'primary'
|
|
118
|
-
},
|
|
120
|
+
}, submitButtonProps), {}, {
|
|
119
121
|
style: _objectSpread({
|
|
120
122
|
flex: 1
|
|
121
|
-
},
|
|
122
|
-
children:
|
|
123
|
+
}, submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.style),
|
|
124
|
+
children: submitText || 'Submit'
|
|
123
125
|
}))
|
|
124
126
|
})]
|
|
125
127
|
}))
|