@plasmicpkgs/antd5 0.0.208 → 0.0.210

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/dist/index.js CHANGED
@@ -8428,8 +8428,10 @@ const AntdTabItem = ({ children }) => {
8428
8428
  return /* @__PURE__ */ React__default.default.createElement("div", null, children);
8429
8429
  };
8430
8430
  function getTabItems(items) {
8431
- var _a;
8432
- return ((_a = items == null ? void 0 : items.type) == null ? void 0 : _a.name) == AntdTabItem.name ? [items] : items == null ? void 0 : items.props.children;
8431
+ var _a, _b, _c;
8432
+ if (!React__default.default.isValidElement(items) && Array.isArray(items))
8433
+ return [...items];
8434
+ return ((_a = items == null ? void 0 : items.type) == null ? void 0 : _a.name) == AntdTabItem.name ? [items] : (_c = (_b = items == null ? void 0 : items.props) == null ? void 0 : _b.children) == null ? void 0 : _c.flat(1);
8433
8435
  }
8434
8436
  function getTabItemKeys(items) {
8435
8437
  const keys = [];
@@ -8479,13 +8481,12 @@ function AntdTabs(props) {
8479
8481
  [animateTabBar, animateTabContent, animated]
8480
8482
  );
8481
8483
  const items = React.useMemo(() => {
8482
- if (!React__default.default.isValidElement(itemsRaw))
8483
- return [];
8484
8484
  const tabItems = getTabItems(itemsRaw);
8485
8485
  return tabItems.map((currentItem) => {
8486
+ var _a2;
8486
8487
  return __spreadProps$3(__spreadValues$3({}, currentItem.props), {
8487
8488
  key: currentItem.key,
8488
- children: /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, currentItem.props.children)
8489
+ children: /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, (_a2 = currentItem.props) == null ? void 0 : _a2.children)
8489
8490
  });
8490
8491
  }).filter((i) => i != null);
8491
8492
  }, [itemsRaw]);