@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 +34 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
|
20
|
-
primary: "
|
|
21
|
-
secondary: "bg-secondary text-secondary-foreground
|
|
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
|
|
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
|
|
31
|
-
orange: "status-restarting-badge
|
|
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
|
|
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
|
|
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
|
-
|
|
952
|
-
|
|
953
|
-
/* @__PURE__ */ jsxRuntime.
|
|
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
|
|
4134
|
-
|
|
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:
|
|
4147
|
+
className: `nav-item ${className}`,
|
|
4148
|
+
...dataProps,
|
|
4143
4149
|
children: [
|
|
4144
|
-
Icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4145
|
-
|
|
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 ${
|
|
4165
|
+
className: `nav-item w-full text-left ${className}`,
|
|
4166
|
+
...dataProps,
|
|
4166
4167
|
children: [
|
|
4167
|
-
Icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4168
|
-
|
|
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:
|
|
4181
|
+
className: `nav-item ${className}`,
|
|
4182
|
+
...dataProps,
|
|
4187
4183
|
children: [
|
|
4188
|
-
Icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4189
|
-
|
|
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
|
);
|