@particle-academy/react-fancy 4.19.0 → 5.0.0

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
@@ -12542,7 +12542,13 @@ function SidebarItem({
12542
12542
  "aria-disabled": disabled || void 0,
12543
12543
  title: collapsed ? title : void 0,
12544
12544
  className: cn(
12545
- "flex items-center rounded-md text-sm font-medium transition-colors",
12545
+ // `w-full` matters when the Tag is a <button>: form controls size to
12546
+ // FIT-CONTENT, not to their parent, so a long label made the item wider
12547
+ // than the sidebar and an ancestor clipped the overflow — which reads as
12548
+ // a label cut off mid-word rather than an ellipsis. Without this,
12549
+ // `min-w-0` on the label below can never engage, because the item is
12550
+ // never under width pressure in the first place.
12551
+ "flex w-full items-center rounded-md text-sm font-medium transition-colors",
12546
12552
  "outline-none focus-visible:ring-2 focus-visible:ring-blue-500",
12547
12553
  collapsed ? "justify-center px-2 py-2" : "gap-2 px-3 py-2",
12548
12554
  active ? "bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100" : "text-zinc-600 hover:bg-zinc-50 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800/50 dark:hover:text-zinc-100",
@@ -12554,7 +12560,7 @@ function SidebarItem({
12554
12560
  showLetters && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold uppercase", children: getLetters(children) }),
12555
12561
  !collapsed && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12556
12562
  icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: icon }),
12557
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate text-left", children }),
12563
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-left", children }),
12558
12564
  badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: badge })
12559
12565
  ] })
12560
12566
  ]