@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.
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { DivProps } from "../../types";
3
3
  export interface FormTitleProps extends DivProps {
4
4
  avatar?: ReactNode;
5
- desc?: string;
5
+ desc?: ReactNode;
6
6
  tag?: string;
7
7
  title: string;
8
8
  }
@@ -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
- declare const Form: import("react").ForwardRefExoticComponent<FormProps & import("react").RefAttributes<FormInstance<any>>>;
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 Form = /*#__PURE__*/forwardRef(function (_ref, ref) {
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.83.0",
3
+ "version": "1.84.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",