@lobehub/ui 1.120.5 → 1.120.7

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.
@@ -3,7 +3,7 @@ import { type ReactNode, RefAttributes } from 'react';
3
3
  import FormGroup, { type FormGroupProps } from './components/FormGroup';
4
4
  import FormItem, { type FormItemProps } from './components/FormItem';
5
5
  export interface ItemGroup {
6
- children: FormItemProps[];
6
+ children: FormItemProps[] | ReactNode;
7
7
  extra?: FormGroupProps['extra'];
8
8
  icon?: FormGroupProps['icon'];
9
9
  title: FormGroupProps['title'];
package/es/Form/index.js CHANGED
@@ -34,14 +34,14 @@ var FormParent = /*#__PURE__*/forwardRef(function (_ref, ref) {
34
34
  extra: group === null || group === void 0 ? void 0 : group.extra,
35
35
  icon: group === null || group === void 0 ? void 0 : group.icon,
36
36
  title: group.title,
37
- children: group.children.filter(function (item) {
37
+ children: Array.isArray(group.children) ? group.children.filter(function (item) {
38
38
  return !item.hidden;
39
39
  }).map(function (item, itemIndex) {
40
40
  return /*#__PURE__*/_jsx(FormItem, _objectSpread({
41
41
  divider: itemIndex !== 0,
42
42
  minWidth: itemMinWidth
43
43
  }, item), itemIndex);
44
- })
44
+ }) : group.children
45
45
  }, groupIndex);
46
46
  }), children, footer && /*#__PURE__*/_jsx(FormFooter, {
47
47
  children: footer
@@ -13,7 +13,7 @@ import { CHILDREN_CLASSNAME, useStyles } from "./style";
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  var SpotlightCard = /*#__PURE__*/memo(function (_ref) {
15
15
  var items = _ref.items,
16
- renderItem = _ref.renderItem,
16
+ Content = _ref.renderItem,
17
17
  className = _ref.className,
18
18
  _ref$columns = _ref.columns,
19
19
  columns = _ref$columns === void 0 ? 3 : _ref$columns,
@@ -75,12 +75,11 @@ var SpotlightCard = /*#__PURE__*/memo(function (_ref) {
75
75
  }, style)
76
76
  }, rest), {}, {
77
77
  children: items.map(function (item, index) {
78
- var children = renderItem(item);
79
78
  return /*#__PURE__*/_jsx(SpotlightCardItem, {
80
79
  borderRadius: borderRadius,
81
80
  className: CHILDREN_CLASSNAME,
82
81
  size: size,
83
- children: children
82
+ children: /*#__PURE__*/_jsx(Content, _objectSpread({}, item))
84
83
  }, index);
85
84
  })
86
85
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.120.5",
3
+ "version": "1.120.7",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -122,7 +122,7 @@
122
122
  "@types/lodash-es": "^4",
123
123
  "@types/pangu": "^4",
124
124
  "@types/query-string": "^6",
125
- "@types/react": "^18",
125
+ "@types/react": "18.2.40",
126
126
  "@types/react-dom": "^18",
127
127
  "@types/uuid": "^9",
128
128
  "@vitest/coverage-v8": "latest",