@gamecp/ui 0.1.44 → 0.1.46

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
@@ -16,19 +16,19 @@ var Link__default = /*#__PURE__*/_interopDefault(Link);
16
16
 
17
17
  // src/Badge.tsx
18
18
  var badgeVariants = {
19
- default: "bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",
20
- primary: "bg-primary text-primary-foreground border-transparent hover:bg-primary/80",
21
- secondary: "bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",
22
- success: "status-running-badge border-transparent",
23
- warning: "status-starting-badge border-transparent",
24
- error: "status-error-badge border-transparent",
25
- info: "bg-muted text-muted-foreground border-ring",
26
- gray: "bg-muted text-muted-foreground border-border",
19
+ default: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
20
+ primary: "badge-primary",
21
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
22
+ success: "status-running-badge",
23
+ warning: "status-starting-badge",
24
+ error: "status-error-badge",
25
+ info: "bg-muted text-muted-foreground",
26
+ gray: "bg-muted text-muted-foreground",
27
27
  purple: "badge-purple",
28
28
  pink: "badge-pink",
29
29
  indigo: "badge-indigo",
30
- yellow: "status-starting-badge border-transparent",
31
- orange: "status-restarting-badge border-transparent",
30
+ yellow: "status-starting-badge",
31
+ orange: "status-restarting-badge",
32
32
  teal: "badge-teal",
33
33
  cyan: "badge-cyan",
34
34
  lime: "badge-lime",
@@ -37,7 +37,7 @@ var badgeVariants = {
37
37
  sky: "badge-sky",
38
38
  violet: "badge-violet",
39
39
  fuchsia: "badge-fuchsia",
40
- amber: "status-starting-badge border-transparent"
40
+ amber: "status-starting-badge"
41
41
  };
42
42
  var badgeSizes = {
43
43
  sm: "px-2 py-0.5 text-xs",
@@ -51,7 +51,7 @@ function Badge({
51
51
  className = "",
52
52
  customColors
53
53
  }) {
54
- const baseClasses = "inline-flex items-center font-medium rounded-full border";
54
+ const baseClasses = "inline-flex items-center font-medium rounded-full";
55
55
  const variantClasses5 = variant === "custom" ? "" : badgeVariants[variant];
56
56
  const sizeClasses5 = badgeSizes[size];
57
57
  const customStyles = variant === "custom" && customColors ? {
@@ -948,9 +948,12 @@ function ConfirmDialog({ isOpen, options, onConfirm, onCancel }) {
948
948
  return "primary";
949
949
  }
950
950
  };
951
- return /* @__PURE__ */ jsxRuntime.jsx(Modal, { isOpen, onClose: onCancel, title, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
952
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground", children: message }),
953
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 justify-end", children: [
951
+ const isDanger = confirmButtonColor === "danger";
952
+ return /* @__PURE__ */ jsxRuntime.jsx(Modal, { isOpen, onClose: onCancel, title: "", className: "max-w-md", footer: null, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center text-center py-4 px-2", children: [
953
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-12 h-12 rounded-full flex items-center justify-center mb-4 ${isDanger ? "bg-danger/10" : "bg-info/10"}`, children: /* @__PURE__ */ jsxRuntime.jsx(ri.RiErrorWarningLine, { className: `w-6 h-6 ${isDanger ? "text-danger" : "text-info"}` }) }),
954
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground mb-2", children: title }),
955
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed mb-6", children: message }),
956
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3 w-full justify-center", children: [
954
957
  /* @__PURE__ */ jsxRuntime.jsx(Button_default, { variant: "secondary", onClick: onCancel, children: cancelText }),
955
958
  /* @__PURE__ */ jsxRuntime.jsx(Button_default, { variant: getConfirmVariant(), onClick: onConfirm, autoFocus: true, children: confirmText })
956
959
  ] })
@@ -4130,8 +4133,10 @@ function SidebarNavItem({
4130
4133
  }) {
4131
4134
  const pathname = navigation.usePathname();
4132
4135
  const isActive = active !== void 0 ? active : exact ? pathname === href : pathname === href || pathname?.startsWith(`${href}/`);
4133
- 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}`;
4134
- const iconClasses = `mr-3 h-5 w-5 shrink-0 transition-all duration-300 ease-in-out${isActive ? " text-primary" : ""}`;
4136
+ const dataProps = {
4137
+ "data-active": String(isActive),
4138
+ "data-disabled": String(disabled)
4139
+ };
4135
4140
  if (disabled) {
4136
4141
  return /* @__PURE__ */ jsxRuntime.jsxs(
4137
4142
  "span",
@@ -4139,16 +4144,11 @@ function SidebarNavItem({
4139
4144
  "data-tooltip-id": "global-tooltip",
4140
4145
  "data-tooltip-content": title || "Not available",
4141
4146
  "aria-disabled": "true",
4142
- className: commonClasses,
4147
+ className: `nav-item ${className}`,
4148
+ ...dataProps,
4143
4149
  children: [
4144
- Icon && /* @__PURE__ */ jsxRuntime.jsx(
4145
- Icon,
4146
- {
4147
- className: iconClasses,
4148
- "aria-hidden": "true"
4149
- }
4150
- ),
4151
- /* @__PURE__ */ jsxRuntime.jsx("span", { children })
4150
+ Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "nav-item-icon", "aria-hidden": "true" }),
4151
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nav-item-label", children })
4152
4152
  ]
4153
4153
  }
4154
4154
  );
@@ -4162,16 +4162,11 @@ function SidebarNavItem({
4162
4162
  "data-tooltip-id": title ? "global-tooltip" : void 0,
4163
4163
  "data-tooltip-content": title,
4164
4164
  "aria-current": isActive ? "page" : void 0,
4165
- className: `w-full text-left ${commonClasses}`,
4165
+ className: `nav-item w-full text-left ${className}`,
4166
+ ...dataProps,
4166
4167
  children: [
4167
- Icon && /* @__PURE__ */ jsxRuntime.jsx(
4168
- Icon,
4169
- {
4170
- className: iconClasses,
4171
- "aria-hidden": "true"
4172
- }
4173
- ),
4174
- /* @__PURE__ */ jsxRuntime.jsx("span", { children })
4168
+ Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "nav-item-icon", "aria-hidden": "true" }),
4169
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nav-item-label", children })
4175
4170
  ]
4176
4171
  }
4177
4172
  );
@@ -4183,16 +4178,11 @@ function SidebarNavItem({
4183
4178
  onClick,
4184
4179
  "data-tooltip-id": title ? "global-tooltip" : void 0,
4185
4180
  "data-tooltip-content": title,
4186
- className: commonClasses,
4181
+ className: `nav-item ${className}`,
4182
+ ...dataProps,
4187
4183
  children: [
4188
- Icon && /* @__PURE__ */ jsxRuntime.jsx(
4189
- Icon,
4190
- {
4191
- className: iconClasses,
4192
- "aria-hidden": "true"
4193
- }
4194
- ),
4195
- /* @__PURE__ */ jsxRuntime.jsx("span", { children })
4184
+ Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "nav-item-icon", "aria-hidden": "true" }),
4185
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nav-item-label", children })
4196
4186
  ]
4197
4187
  }
4198
4188
  );