@abdellatifui/react 3.2.86 → 3.2.87

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.
Files changed (2) hide show
  1. package/dist/nextgen.js +7 -8
  2. package/package.json +1 -1
package/dist/nextgen.js CHANGED
@@ -28475,6 +28475,7 @@ const ShadcnTabs = forwardRef((props, ref) => {
28475
28475
  useEffect(() => {
28476
28476
  if (tabs?.length > 0) {
28477
28477
  tabs.map((tab) => {
28478
+ if (!tab.value) tab.value = useRandomId();
28478
28479
  if (tab?.default) {
28479
28480
  setDefaultTab(tab?.value);
28480
28481
  onChange({ event: null, ...tab, currentTab: defaultTab, props, ref }, tab.value);
@@ -28566,17 +28567,15 @@ const ShadcnTabs = forwardRef((props, ref) => {
28566
28567
  ]
28567
28568
  }
28568
28569
  ) }),
28569
- body && _tabs?.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn(
28570
- "w-full h-fit relative",
28571
- theme === "modern" ? "border border-gray-200/60 rounded-md bg-white/50 backdrop-blur-sm p-4 mt-3 shadow-sm" : "border-solid border border-gray-200 p-1 my-1 rounded bg-[#fafafa]",
28572
- bodyClassName
28573
- ), children: _tabs?.map?.((tab) => {
28570
+ body && _tabs?.length > 0 && _tabs?.map((tab) => {
28574
28571
  const id2 = useRandomId();
28575
28572
  tab.tabs = _tabs;
28576
28573
  tab.props = props;
28577
- if (!tab.value) tab.value = id2;
28578
- return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { id: id2, value: tab.value, theme, className: "m-0 p-0", children: tab?.content || /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) }, id2);
28579
- }) })
28574
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Activity, { mode: tab?.value == defaultTab ? "visible" : "hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn(
28575
+ "w-full p-0 m-0",
28576
+ bodyClassName
28577
+ ), children: tab?.content }) }, id2);
28578
+ })
28580
28579
  ] });
28581
28580
  });
28582
28581
  const TTextArea = forwardRef((props, ref) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@abdellatifui/react",
3
3
  "private": false,
4
- "version": "3.2.86",
4
+ "version": "3.2.87",
5
5
  "type": "module",
6
6
  "types": "dist/nextgen.d.ts",
7
7
  "files": [