@particle-academy/react-fancy 4.19.0 → 4.19.1

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