@scriptonita/chess-football-ui 0.4.0 → 0.4.2

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
@@ -86,14 +86,14 @@ function GamePiece({ piece, isSelected, hasBall, onClick }) {
86
86
  onClick,
87
87
  style,
88
88
  className: cn(
89
- "relative w-[88%] h-[88%] flex items-center justify-center rounded-full cursor-pointer z-10 transition-transform",
89
+ "relative w-[88%] h-[88%] flex items-center justify-center rounded-full cursor-pointer z-10 transition-transform motion-reduce:transition-none",
90
90
  isSelected && "ring-4 ring-primary scale-110 z-30",
91
91
  piece.hasMovedThisTurn && "opacity-70"
92
92
  ),
93
93
  children: [
94
94
  /* @__PURE__ */ jsxRuntime.jsx(PieceIcon, { type: piece.type, side: piece.side }),
95
95
  hasBall && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-full ring-2 ring-orange-400 pointer-events-none" }),
96
- isSelected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-full animate-pulse ring-2 ring-yellow-400 ring-offset-2 ring-offset-transparent" })
96
+ isSelected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-full animate-pulse motion-reduce:animate-none ring-2 ring-yellow-400 ring-offset-2 ring-offset-transparent" })
97
97
  ]
98
98
  }
99
99
  );
@@ -399,7 +399,14 @@ function GameBoard({ userSide, showCoordinates = false, keyboardNav = true }) {
399
399
  isDisambiguateTarget && selectedPieceId && /* @__PURE__ */ jsxRuntime.jsxs(
400
400
  "div",
401
401
  {
402
- className: "absolute z-50 bottom-full mb-1 left-1/2 -translate-x-1/2 flex gap-1 bg-bg-secondary border border-border-subtle rounded-md p-1 shadow-xl pointer-events-auto whitespace-nowrap",
402
+ className: cn(
403
+ "absolute z-50 flex gap-1 bg-bg-secondary border border-border-subtle rounded-md p-1 shadow-xl pointer-events-auto whitespace-nowrap",
404
+ // The board container is `overflow-hidden` (for its rounded
405
+ // corners), so a popover that spills past an edge gets clipped.
406
+ // Anchor it inside the board on edge columns / the top row.
407
+ y === ROWS - 1 ? "top-full mt-1" : "bottom-full mb-1",
408
+ x === 0 ? "left-0" : x === COLS - 1 ? "right-0" : "left-1/2 -translate-x-1/2"
409
+ ),
403
410
  onClick: (e) => e.stopPropagation(),
404
411
  children: [
405
412
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -707,7 +714,7 @@ function PlayerInfo({ name, team, avatarUrl, isActive, actionPoints, maxActionPo
707
714
  ), children: name }),
708
715
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-1", align === "right" && "flex-row-reverse"), children: [
709
716
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-[10px] text-fg-muted uppercase", children: team }),
710
- isActive && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-accent-green animate-pulse", "aria-hidden": "true" })
717
+ isActive && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-accent-green animate-pulse motion-reduce:animate-none", "aria-hidden": "true" })
711
718
  ] }),
712
719
  /* @__PURE__ */ jsxRuntime.jsx(
713
720
  ActionPoints,
@@ -1328,7 +1335,7 @@ function HistoryChip({ lastMove, onClick, className }) {
1328
1335
  "bg-bg-surface border border-border-subtle",
1329
1336
  "font-mono text-[11px] text-fg-secondary",
1330
1337
  "hover:text-fg-primary hover:bg-bg-surface-elevated active:scale-95",
1331
- "transition-all duration-150",
1338
+ "transition-all duration-150 motion-reduce:transition-none",
1332
1339
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-green",
1333
1340
  className
1334
1341
  ),