@lobehub/ui 1.122.1 → 1.122.2
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 { type IconProps } from "../..";
|
|
|
2
2
|
import { type CollapseProps } from 'antd';
|
|
3
3
|
import { type ReactNode } from 'react';
|
|
4
4
|
export type FormVariant = 'default' | 'block' | 'ghost' | 'pure';
|
|
5
|
-
export type ItemsType = '
|
|
5
|
+
export type ItemsType = 'group' | 'flat';
|
|
6
6
|
export declare const useStyles: (props?: FormVariant | undefined) => import("antd-style").ReturnStyles<{
|
|
7
7
|
flatGroup: string;
|
|
8
8
|
group: string;
|
package/es/Form/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
20
20
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
21
21
|
children = _ref.children,
|
|
22
22
|
_ref$itemsType = _ref.itemsType,
|
|
23
|
-
itemsType = _ref$itemsType === void 0 ? '
|
|
23
|
+
itemsType = _ref$itemsType === void 0 ? 'group' : _ref$itemsType,
|
|
24
24
|
_ref$variant = _ref.variant,
|
|
25
25
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
26
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -54,7 +54,7 @@ var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
54
54
|
layout: "horizontal",
|
|
55
55
|
ref: ref
|
|
56
56
|
}, rest), {}, {
|
|
57
|
-
children: [(items === null || items === void 0 ? void 0 : items.length) > 0 ? itemsType === '
|
|
57
|
+
children: [(items === null || items === void 0 ? void 0 : items.length) > 0 ? itemsType === 'group' ? items === null || items === void 0 ? void 0 : items.map(function (item, i) {
|
|
58
58
|
return mapTree(item, i);
|
|
59
59
|
}) : /*#__PURE__*/_jsx(FormGroup, {
|
|
60
60
|
itemsType: 'flat',
|