@lobehub/ui 1.155.2 → 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.
@@ -24,6 +24,7 @@ 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
@@ -80,4 +80,5 @@ var Form = FormParent;
80
80
  Form.Item = FormItem;
81
81
  Form.Group = FormGroup;
82
82
  Form.useForm = AntForm.useForm;
83
+ Form.Provider = AntForm.Provider;
83
84
  export default Form;
@@ -7,12 +7,13 @@ export interface FormModalProps extends PickModalProps, PickFormProps {
7
7
  classNames?: {
8
8
  form?: FormProps['className'];
9
9
  } & ModalProps['classNames'];
10
- finishButtonProps?: ModalProps['okButtonProps'];
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;
@@ -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", "finishButtonProps", "finishLoading", "onFinish", "finishText", "variant", "gap"],
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
- finishButtonProps = _ref.finishButtonProps,
47
- finishLoading = _ref.finishLoading,
46
+ submitButtonProps = _ref.submitButtonProps,
47
+ submitLoading = _ref.submitLoading,
48
48
  onFinish = _ref.onFinish,
49
- finishText = _ref.finishText,
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: finishLoading,
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: finishLoading,
117
+ loading: submitLoading,
118
+ onClick: onSubmit,
117
119
  type: 'primary'
118
- }, finishButtonProps), {}, {
120
+ }, submitButtonProps), {}, {
119
121
  style: _objectSpread({
120
122
  flex: 1
121
- }, finishButtonProps === null || finishButtonProps === void 0 ? void 0 : finishButtonProps.style),
122
- children: finishText || 'Submit'
123
+ }, submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.style),
124
+ children: submitText || 'Submit'
123
125
  }))
124
126
  })]
125
127
  }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.155.2",
3
+ "version": "1.155.3",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",