@geomak/ui 6.2.2 → 6.2.3

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.cjs CHANGED
@@ -2994,6 +2994,7 @@ function TableBody({
2994
2994
  getRowKey
2995
2995
  }) {
2996
2996
  const [expanded, setExpanded] = React12.useState(() => /* @__PURE__ */ new Set());
2997
+ const reduced = framerMotion.useReducedMotion();
2997
2998
  const toggleRow = (rowKey) => {
2998
2999
  setExpanded((prev) => {
2999
3000
  const next = new Set(prev);
@@ -3035,7 +3036,19 @@ function TableBody({
3035
3036
  ]
3036
3037
  }
3037
3038
  ),
3038
- hasExpand && isExpanded && /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "bg-surface", children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: expandColCount, className: "p-0 border-b border-border", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3", children: expandRow.expandComponent?.(row) }) }) })
3039
+ hasExpand && /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "bg-surface", children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: expandColCount, className: "p-0", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
3040
+ framerMotion.motion.div,
3041
+ {
3042
+ initial: { height: 0, opacity: 0 },
3043
+ animate: { height: "auto", opacity: 1 },
3044
+ exit: { height: 0, opacity: 0 },
3045
+ transition: reduced ? { duration: 0 } : { height: { duration: 0.28, ease: [0.16, 1, 0.3, 1] }, opacity: { duration: 0.2 } },
3046
+ style: { overflow: "hidden" },
3047
+ className: "border-b border-border",
3048
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3", children: expandRow.expandComponent?.(row) })
3049
+ },
3050
+ "expand"
3051
+ ) }) }) })
3039
3052
  ] }, rowKey);
3040
3053
  }) });
3041
3054
  }