@agentiffai/design 1.4.6 → 1.4.8

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
@@ -10534,6 +10534,7 @@ var PlatformGrid = ({
10534
10534
  const handlePostClick = (index) => {
10535
10535
  onActiveChange?.(index);
10536
10536
  };
10537
+ const isInteractiveTarget = (target) => target instanceof HTMLElement && target.closest("input, textarea, button, [contenteditable]") !== null;
10537
10538
  return /* @__PURE__ */ jsx(Grid, { "data-testid": "platform-grid", children: posts.map((post, index) => {
10538
10539
  const isEditing = editingIndex === index;
10539
10540
  const isActive = activeIndex === index;
@@ -10541,10 +10542,14 @@ var PlatformGrid = ({
10541
10542
  GridCell,
10542
10543
  {
10543
10544
  $isActive: isActive,
10544
- onClick: () => handlePostClick(index),
10545
+ onClick: (e) => {
10546
+ if (isInteractiveTarget(e.target)) return;
10547
+ handlePostClick(index);
10548
+ },
10545
10549
  role: "button",
10546
10550
  tabIndex: 0,
10547
10551
  onKeyDown: (e) => {
10552
+ if (isInteractiveTarget(e.target)) return;
10548
10553
  if (e.key === "Enter" || e.key === " ") {
10549
10554
  e.preventDefault();
10550
10555
  handlePostClick(index);