@gamecp/ui 0.1.41 → 0.1.42

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.mjs CHANGED
@@ -4118,12 +4118,34 @@ function SidebarNavItem({
4118
4118
  title,
4119
4119
  exact = false,
4120
4120
  onClick,
4121
- isButton = false
4121
+ isButton = false,
4122
+ disabled = false
4122
4123
  }) {
4123
4124
  const pathname = usePathname();
4124
4125
  const isActive = active !== void 0 ? active : exact ? pathname === href : pathname === href || pathname?.startsWith(`${href}/`);
4125
- const commonClasses = `group flex items-center gap-0 overflow-hidden rounded-md px-3 py-2 text-sm font-medium outline-hidden ring-sidebar-ring transition-all duration-300 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 ${isActive ? "bg-primary/15 backdrop-blur-md border border-primary/30 text-primary shadow-[0_0_12px_-3px_hsl(var(--primary)/0.2)] hover:bg-primary/20 hover:border-primary/50 hover:shadow-[0_0_16px_-2px_hsl(var(--primary)/0.3)]" : "border border-transparent text-sidebar-foreground hover:bg-sidebar-accent/50 hover:backdrop-blur-sm hover:border-sidebar-foreground/10 hover:text-sidebar-accent-foreground active:bg-sidebar-accent"} ${className}`;
4126
+ const commonClasses = `group flex items-center gap-0 overflow-hidden rounded-md px-3 py-2 text-sm font-medium outline-hidden ring-sidebar-ring transition-all duration-300 focus-visible:ring-2 ${disabled ? "pointer-events-none opacity-35 cursor-not-allowed" : ""} ${isActive ? "bg-primary/15 backdrop-blur-md border border-primary/30 text-primary shadow-[0_0_12px_-3px_hsl(var(--primary)/0.2)] hover:bg-primary/20 hover:border-primary/50 hover:shadow-[0_0_16px_-2px_hsl(var(--primary)/0.3)]" : "border border-transparent text-sidebar-foreground hover:bg-sidebar-accent/50 hover:backdrop-blur-sm hover:border-sidebar-foreground/10 hover:text-sidebar-accent-foreground active:bg-sidebar-accent"} ${className}`;
4126
4127
  const iconClasses = `mr-3 h-5 w-5 shrink-0 transition-all duration-300 ease-in-out${isActive ? " text-primary" : ""}`;
4128
+ if (disabled) {
4129
+ return /* @__PURE__ */ jsxs(
4130
+ "span",
4131
+ {
4132
+ "data-tooltip-id": "global-tooltip",
4133
+ "data-tooltip-content": title || "Not available",
4134
+ "aria-disabled": "true",
4135
+ className: commonClasses,
4136
+ children: [
4137
+ Icon && /* @__PURE__ */ jsx(
4138
+ Icon,
4139
+ {
4140
+ className: iconClasses,
4141
+ "aria-hidden": "true"
4142
+ }
4143
+ ),
4144
+ /* @__PURE__ */ jsx("span", { children })
4145
+ ]
4146
+ }
4147
+ );
4148
+ }
4127
4149
  if (isButton) {
4128
4150
  return /* @__PURE__ */ jsxs(
4129
4151
  "button",