@gamecp/ui 0.1.18 → 0.1.20
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.d.mts +10 -7
- package/dist/index.d.ts +10 -7
- package/dist/index.js +102 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +102 -74
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import * as React$1 from 'react';
|
|
|
3
3
|
import React__default, { ButtonHTMLAttributes, ReactNode, AnchorHTMLAttributes } from 'react';
|
|
4
4
|
import { IconType } from 'react-icons';
|
|
5
5
|
|
|
6
|
-
type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'gray' | 'purple' | 'pink' | 'indigo' | '
|
|
6
|
+
type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'gray' | 'purple' | 'pink' | 'indigo' | 'amber' | 'orange' | 'teal' | 'cyan' | 'lime' | 'emerald' | 'rose' | 'sky' | 'violet' | 'fuchsia' | 'amber' | 'custom';
|
|
7
7
|
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
8
8
|
interface BadgeProps {
|
|
9
9
|
children: React__default.ReactNode;
|
|
@@ -37,7 +37,7 @@ interface BaseCardProps {
|
|
|
37
37
|
disabled?: boolean;
|
|
38
38
|
}
|
|
39
39
|
type CardPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
40
|
-
type BorderAccent = 'none' | '
|
|
40
|
+
type BorderAccent = 'none' | 'success' | 'info' | 'danger' | 'amber' | 'purple' | 'orange' | 'gray';
|
|
41
41
|
type CardVariant = 'default' | 'elevated' | 'outlined' | 'filled';
|
|
42
42
|
interface InteractiveCardProps extends BaseCardProps {
|
|
43
43
|
hover?: boolean;
|
|
@@ -48,7 +48,7 @@ interface HeaderCardProps extends InteractiveCardProps {
|
|
|
48
48
|
subtitle?: string;
|
|
49
49
|
description?: string;
|
|
50
50
|
icon?: IconType;
|
|
51
|
-
iconColor?: '
|
|
51
|
+
iconColor?: 'success' | 'info' | 'danger' | 'amber' | 'purple' | 'orange' | 'gray' | 'indigo' | 'pink';
|
|
52
52
|
iconSize?: 'sm' | 'md' | 'lg';
|
|
53
53
|
actionButton?: ReactNode;
|
|
54
54
|
headerClassName?: string;
|
|
@@ -72,15 +72,18 @@ interface CardProps extends AccordionCardProps, StatusCardProps {
|
|
|
72
72
|
minHeight?: string;
|
|
73
73
|
maxHeight?: string;
|
|
74
74
|
id?: string;
|
|
75
|
+
headerBorder?: string;
|
|
76
|
+
headerBg?: string;
|
|
77
|
+
headerStatus?: 'online' | 'offline' | 'maintenance' | 'error' | 'restarting' | 'starting' | 'success' | 'info' | 'updating' | 'unknown';
|
|
75
78
|
}
|
|
76
|
-
declare function Card({ children, className, onClick, disabled, padding, borderAccent, variant, overflow, minHeight, maxHeight, hover, clickable, title, subtitle, description, icon: Icon, iconColor, iconSize, actionButton, headerClassName, accordion, defaultExpanded, onToggle, contentClassName, status, statusIcon, statusText, id, }: CardProps): react_jsx_runtime.JSX.Element;
|
|
79
|
+
declare function Card({ children, className, onClick, disabled, padding, borderAccent, variant, overflow, minHeight, maxHeight, hover, clickable, title, subtitle, description, icon: Icon, iconColor, iconSize, actionButton, headerClassName, accordion, defaultExpanded, onToggle, contentClassName, status, statusIcon, statusText, headerBorder, headerBg, headerStatus, id, }: CardProps): react_jsx_runtime.JSX.Element;
|
|
77
80
|
|
|
78
81
|
interface ConfirmDialogOptions {
|
|
79
82
|
title: string;
|
|
80
83
|
message: string;
|
|
81
84
|
confirmText: string;
|
|
82
85
|
cancelText?: string;
|
|
83
|
-
confirmButtonColor?: '
|
|
86
|
+
confirmButtonColor?: 'danger' | 'info' | 'success';
|
|
84
87
|
}
|
|
85
88
|
interface ConfirmDialogProps {
|
|
86
89
|
isOpen: boolean;
|
|
@@ -101,7 +104,7 @@ declare function ConfirmDialog({ isOpen, options, onConfirm, onCancel }: Confirm
|
|
|
101
104
|
* title: 'Delete Item',
|
|
102
105
|
* message: 'Are you sure you want to delete this item?',
|
|
103
106
|
* confirmText: 'Delete',
|
|
104
|
-
* confirmButtonColor: '
|
|
107
|
+
* confirmButtonColor: 'danger'
|
|
105
108
|
* });
|
|
106
109
|
*
|
|
107
110
|
* if (confirmed) {
|
|
@@ -597,7 +600,7 @@ declare function SharedTooltip({ id, place, offset, delayShow, delayHide, classN
|
|
|
597
600
|
|
|
598
601
|
interface SpinnerProps {
|
|
599
602
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
600
|
-
color?: 'primary' | '
|
|
603
|
+
color?: 'primary' | 'info' | 'white' | 'current';
|
|
601
604
|
className?: string;
|
|
602
605
|
}
|
|
603
606
|
declare const Spinner: React__default.FC<SpinnerProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as React$1 from 'react';
|
|
|
3
3
|
import React__default, { ButtonHTMLAttributes, ReactNode, AnchorHTMLAttributes } from 'react';
|
|
4
4
|
import { IconType } from 'react-icons';
|
|
5
5
|
|
|
6
|
-
type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'gray' | 'purple' | 'pink' | 'indigo' | '
|
|
6
|
+
type BadgeVariant = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'gray' | 'purple' | 'pink' | 'indigo' | 'amber' | 'orange' | 'teal' | 'cyan' | 'lime' | 'emerald' | 'rose' | 'sky' | 'violet' | 'fuchsia' | 'amber' | 'custom';
|
|
7
7
|
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
8
8
|
interface BadgeProps {
|
|
9
9
|
children: React__default.ReactNode;
|
|
@@ -37,7 +37,7 @@ interface BaseCardProps {
|
|
|
37
37
|
disabled?: boolean;
|
|
38
38
|
}
|
|
39
39
|
type CardPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
40
|
-
type BorderAccent = 'none' | '
|
|
40
|
+
type BorderAccent = 'none' | 'success' | 'info' | 'danger' | 'amber' | 'purple' | 'orange' | 'gray';
|
|
41
41
|
type CardVariant = 'default' | 'elevated' | 'outlined' | 'filled';
|
|
42
42
|
interface InteractiveCardProps extends BaseCardProps {
|
|
43
43
|
hover?: boolean;
|
|
@@ -48,7 +48,7 @@ interface HeaderCardProps extends InteractiveCardProps {
|
|
|
48
48
|
subtitle?: string;
|
|
49
49
|
description?: string;
|
|
50
50
|
icon?: IconType;
|
|
51
|
-
iconColor?: '
|
|
51
|
+
iconColor?: 'success' | 'info' | 'danger' | 'amber' | 'purple' | 'orange' | 'gray' | 'indigo' | 'pink';
|
|
52
52
|
iconSize?: 'sm' | 'md' | 'lg';
|
|
53
53
|
actionButton?: ReactNode;
|
|
54
54
|
headerClassName?: string;
|
|
@@ -72,15 +72,18 @@ interface CardProps extends AccordionCardProps, StatusCardProps {
|
|
|
72
72
|
minHeight?: string;
|
|
73
73
|
maxHeight?: string;
|
|
74
74
|
id?: string;
|
|
75
|
+
headerBorder?: string;
|
|
76
|
+
headerBg?: string;
|
|
77
|
+
headerStatus?: 'online' | 'offline' | 'maintenance' | 'error' | 'restarting' | 'starting' | 'success' | 'info' | 'updating' | 'unknown';
|
|
75
78
|
}
|
|
76
|
-
declare function Card({ children, className, onClick, disabled, padding, borderAccent, variant, overflow, minHeight, maxHeight, hover, clickable, title, subtitle, description, icon: Icon, iconColor, iconSize, actionButton, headerClassName, accordion, defaultExpanded, onToggle, contentClassName, status, statusIcon, statusText, id, }: CardProps): react_jsx_runtime.JSX.Element;
|
|
79
|
+
declare function Card({ children, className, onClick, disabled, padding, borderAccent, variant, overflow, minHeight, maxHeight, hover, clickable, title, subtitle, description, icon: Icon, iconColor, iconSize, actionButton, headerClassName, accordion, defaultExpanded, onToggle, contentClassName, status, statusIcon, statusText, headerBorder, headerBg, headerStatus, id, }: CardProps): react_jsx_runtime.JSX.Element;
|
|
77
80
|
|
|
78
81
|
interface ConfirmDialogOptions {
|
|
79
82
|
title: string;
|
|
80
83
|
message: string;
|
|
81
84
|
confirmText: string;
|
|
82
85
|
cancelText?: string;
|
|
83
|
-
confirmButtonColor?: '
|
|
86
|
+
confirmButtonColor?: 'danger' | 'info' | 'success';
|
|
84
87
|
}
|
|
85
88
|
interface ConfirmDialogProps {
|
|
86
89
|
isOpen: boolean;
|
|
@@ -101,7 +104,7 @@ declare function ConfirmDialog({ isOpen, options, onConfirm, onCancel }: Confirm
|
|
|
101
104
|
* title: 'Delete Item',
|
|
102
105
|
* message: 'Are you sure you want to delete this item?',
|
|
103
106
|
* confirmText: 'Delete',
|
|
104
|
-
* confirmButtonColor: '
|
|
107
|
+
* confirmButtonColor: 'danger'
|
|
105
108
|
* });
|
|
106
109
|
*
|
|
107
110
|
* if (confirmed) {
|
|
@@ -597,7 +600,7 @@ declare function SharedTooltip({ id, place, offset, delayShow, delayHide, classN
|
|
|
597
600
|
|
|
598
601
|
interface SpinnerProps {
|
|
599
602
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
600
|
-
color?: 'primary' | '
|
|
603
|
+
color?: 'primary' | 'info' | 'white' | 'current';
|
|
601
604
|
className?: string;
|
|
602
605
|
}
|
|
603
606
|
declare const Spinner: React__default.FC<SpinnerProps>;
|
package/dist/index.js
CHANGED
|
@@ -16,28 +16,27 @@ var NextLink__default = /*#__PURE__*/_interopDefault(NextLink);
|
|
|
16
16
|
|
|
17
17
|
// src/Badge.tsx
|
|
18
18
|
var badgeVariants = {
|
|
19
|
-
default: "bg-
|
|
19
|
+
default: "bg-muted text-foreground border-border",
|
|
20
20
|
primary: "bg-primary-100 text-primary-800 border-primary-200",
|
|
21
|
-
secondary: "bg-
|
|
21
|
+
secondary: "bg-muted text-foreground border-border",
|
|
22
22
|
success: "bg-success text-success-dark border-success-light",
|
|
23
|
-
warning: "bg-
|
|
24
|
-
error: "bg-
|
|
23
|
+
warning: "bg-amber/20 text-yellow-800 border-amber/30",
|
|
24
|
+
error: "bg-danger/20 text-danger border-danger/30",
|
|
25
25
|
info: "bg-muted text-muted-foreground border-ring",
|
|
26
|
-
gray: "bg-
|
|
26
|
+
gray: "bg-muted text-foreground border-border",
|
|
27
27
|
purple: "bg-purple-100 text-purple-800 border-purple-200",
|
|
28
|
-
pink: "bg-pink
|
|
29
|
-
indigo: "bg-indigo
|
|
30
|
-
|
|
31
|
-
orange: "bg-orange-100 text-orange-800 border-orange-200",
|
|
28
|
+
pink: "bg-pink/20 text-pink border-pink-200",
|
|
29
|
+
indigo: "bg-indigo/20 text-indigo border-indigo-200",
|
|
30
|
+
orange: "bg-orange/20 text-orange-800 border-orange/30",
|
|
32
31
|
teal: "bg-teal-100 text-teal-800 border-teal-200",
|
|
33
|
-
cyan: "bg-cyan
|
|
32
|
+
cyan: "bg-cyan/20 text-cyan-800 border-cyan-200",
|
|
34
33
|
lime: "bg-lime-100 text-lime-800 border-lime-200",
|
|
35
|
-
emerald: "bg-emerald
|
|
34
|
+
emerald: "bg-emerald/20 text-emerald-800 border-emerald-200",
|
|
36
35
|
rose: "bg-rose-100 text-rose-800 border-rose-200",
|
|
37
36
|
sky: "bg-sky-100 text-sky-800 border-sky-200",
|
|
38
37
|
violet: "bg-violet-100 text-violet-800 border-violet-200",
|
|
39
38
|
fuchsia: "bg-fuchsia-100 text-fuchsia-800 border-fuchsia-200",
|
|
40
|
-
amber: "bg-amber
|
|
39
|
+
amber: "bg-amber/20 text-amber-800 border-amber/30"
|
|
41
40
|
};
|
|
42
41
|
var badgeSizes = {
|
|
43
42
|
sm: "px-2 py-0.5 text-xs",
|
|
@@ -72,7 +71,7 @@ var variantClasses = {
|
|
|
72
71
|
primary: "bg-primary text-primary-foreground hover:bg-primary/90 border-transparent",
|
|
73
72
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",
|
|
74
73
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 border-transparent",
|
|
75
|
-
danger: "bg-
|
|
74
|
+
danger: "bg-danger text-white hover:bg-danger border-transparent",
|
|
76
75
|
ghost: "bg-transparent hover:bg-muted hover:text-foreground border-transparent",
|
|
77
76
|
link: "bg-transparent text-primary underline-offset-4 hover:underline border-transparent p-0",
|
|
78
77
|
outline: "bg-transparent border-border hover:bg-muted hover:text-foreground"
|
|
@@ -192,13 +191,13 @@ var paddingClasses = {
|
|
|
192
191
|
};
|
|
193
192
|
var borderAccentClasses = {
|
|
194
193
|
none: "",
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
purple: "border-l-4 border-l-purple
|
|
200
|
-
orange: "border-l-4 border-l-orange
|
|
201
|
-
gray: "border-l-4 border-l-gray
|
|
194
|
+
success: "border-l-4 border-l-success",
|
|
195
|
+
info: "border-l-4 border-l-info",
|
|
196
|
+
danger: "border-l-4 border-l-danger",
|
|
197
|
+
amber: "border-l-4 border-l-amber",
|
|
198
|
+
purple: "border-l-4 border-l-purple",
|
|
199
|
+
orange: "border-l-4 border-l-orange",
|
|
200
|
+
gray: "border-l-4 border-l-gray"
|
|
202
201
|
};
|
|
203
202
|
var variantClasses2 = {
|
|
204
203
|
default: "card",
|
|
@@ -207,15 +206,15 @@ var variantClasses2 = {
|
|
|
207
206
|
filled: "bg-muted rounded-lg border border-border"
|
|
208
207
|
};
|
|
209
208
|
var iconColorClasses = {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
purple: "text-purple
|
|
215
|
-
orange: "text-orange
|
|
209
|
+
success: "text-success",
|
|
210
|
+
info: "text-info",
|
|
211
|
+
danger: "text-danger",
|
|
212
|
+
amber: "text-amber",
|
|
213
|
+
purple: "text-purple",
|
|
214
|
+
orange: "text-orange",
|
|
216
215
|
gray: "text-muted-foreground",
|
|
217
|
-
indigo: "text-indigo
|
|
218
|
-
pink: "text-pink
|
|
216
|
+
indigo: "text-indigo",
|
|
217
|
+
pink: "text-pink"
|
|
219
218
|
};
|
|
220
219
|
var iconSizeClasses = {
|
|
221
220
|
sm: "w-4 h-4",
|
|
@@ -223,10 +222,10 @@ var iconSizeClasses = {
|
|
|
223
222
|
lg: "w-8 h-8"
|
|
224
223
|
};
|
|
225
224
|
var statusClasses = {
|
|
226
|
-
success: "bg-success
|
|
227
|
-
warning: "bg-
|
|
228
|
-
error: "bg-
|
|
229
|
-
info: "bg-
|
|
225
|
+
success: "bg-success/10 border-success",
|
|
226
|
+
warning: "bg-amber/10 border-amber",
|
|
227
|
+
error: "bg-danger/10 border-danger",
|
|
228
|
+
info: "bg-info/10 border-info",
|
|
230
229
|
neutral: "bg-muted border-border"
|
|
231
230
|
};
|
|
232
231
|
function Card({
|
|
@@ -246,7 +245,7 @@ function Card({
|
|
|
246
245
|
subtitle,
|
|
247
246
|
description,
|
|
248
247
|
icon: Icon,
|
|
249
|
-
iconColor = "
|
|
248
|
+
iconColor = "info",
|
|
250
249
|
iconSize = "md",
|
|
251
250
|
actionButton,
|
|
252
251
|
headerClassName = "",
|
|
@@ -257,14 +256,42 @@ function Card({
|
|
|
257
256
|
status,
|
|
258
257
|
statusIcon,
|
|
259
258
|
statusText,
|
|
259
|
+
headerBorder,
|
|
260
|
+
headerBg,
|
|
261
|
+
headerStatus,
|
|
260
262
|
id
|
|
261
263
|
}) {
|
|
262
264
|
const [isExpanded, setIsExpanded] = React4.useState(defaultExpanded);
|
|
265
|
+
const getHeaderStatusClasses = (status2) => {
|
|
266
|
+
switch (status2) {
|
|
267
|
+
case "online":
|
|
268
|
+
case "success":
|
|
269
|
+
return { border: "bg-success", bg: "status-running-bg-50" };
|
|
270
|
+
case "offline":
|
|
271
|
+
case "error":
|
|
272
|
+
return { border: "bg-destructive", bg: "status-error-bg-50" };
|
|
273
|
+
case "maintenance":
|
|
274
|
+
case "starting":
|
|
275
|
+
case "info":
|
|
276
|
+
return { border: "bg-warning", bg: "status-starting-bg-50" };
|
|
277
|
+
case "restarting":
|
|
278
|
+
case "updating":
|
|
279
|
+
return { border: "bg-orange", bg: "status-restarting-bg-50" };
|
|
280
|
+
case "unknown":
|
|
281
|
+
return { border: "bg-muted-foreground/30", bg: "bg-muted/10" };
|
|
282
|
+
default:
|
|
283
|
+
return { border: headerBorder, bg: headerBg };
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
const statusClassesMapped = getHeaderStatusClasses(headerStatus);
|
|
287
|
+
const activeHeaderBorder = statusClassesMapped?.border || headerBorder;
|
|
288
|
+
const activeHeaderBg = statusClassesMapped?.bg || headerBg;
|
|
263
289
|
const baseClasses = [
|
|
264
290
|
variantClasses2[variant],
|
|
265
291
|
paddingClasses[padding],
|
|
266
292
|
borderAccentClasses[borderAccent],
|
|
267
|
-
overflow !== "visible" ? `overflow-${overflow}` : "",
|
|
293
|
+
overflow !== "visible" || activeHeaderBorder ? `overflow-${overflow === "visible" && activeHeaderBorder ? "hidden" : overflow}` : "",
|
|
294
|
+
activeHeaderBorder ? "relative" : "",
|
|
268
295
|
hover ? "hover:shadow-md transition-shadow" : "",
|
|
269
296
|
clickable || onClick ? "cursor-pointer" : "",
|
|
270
297
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
@@ -292,7 +319,8 @@ function Card({
|
|
|
292
319
|
style,
|
|
293
320
|
onClick: clickable || onClick ? handleClick : void 0,
|
|
294
321
|
children: [
|
|
295
|
-
|
|
322
|
+
activeHeaderBorder && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 left-0 right-0 flex justify-center z-10 pointer-events-none", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-1.5 w-24 ${activeHeaderBorder} rounded-b-xl shadow-sm` }) }),
|
|
323
|
+
(title || subtitle || description || Icon || actionButton || status) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${activeHeaderBg ? activeHeaderBg + " " : ""}${headerClassName}${activeHeaderBorder ? " pt-6 pb-4 px-4" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
296
324
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3 flex-1 min-w-0", children: [
|
|
297
325
|
Icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${iconColorClasses[iconColor]} flex-shrink-0`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: iconSizeClasses[iconSize] }) }),
|
|
298
326
|
statusIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: statusIcon }),
|
|
@@ -500,7 +528,7 @@ function Modal({
|
|
|
500
528
|
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
501
529
|
framerMotion.motion.div,
|
|
502
530
|
{
|
|
503
|
-
className: `modal-backdrop fixed inset-0 w-screen h-screen flex items-center ${customStyles.backdrop?.includes("justify-") ? customStyles.backdrop : customStyles.backdrop ? `${customStyles.backdrop} justify-center` : "justify-center bg-black/10"} z-
|
|
531
|
+
className: `modal-backdrop fixed inset-0 w-screen h-screen flex items-center ${customStyles.backdrop?.includes("justify-") ? customStyles.backdrop : customStyles.backdrop ? `${customStyles.backdrop} justify-center` : "justify-center bg-black/10"} z-50 m-0 ${fullScreen ? "p-0" : "p-4"}`,
|
|
504
532
|
variants: backdropVariants,
|
|
505
533
|
initial: "hidden",
|
|
506
534
|
animate: isOpen ? "visible" : "hidden",
|
|
@@ -515,7 +543,7 @@ function Modal({
|
|
|
515
543
|
"aria-labelledby": title ? "modal-title-plain" : void 0,
|
|
516
544
|
"aria-describedby": ariaDescribedBy || "modal-content-plain",
|
|
517
545
|
tabIndex: -1,
|
|
518
|
-
className: `w-full flex flex-col overflow-hidden relative
|
|
546
|
+
className: `w-full flex flex-col overflow-hidden relative ${customStyles.container || "bg-card shadow-xl"} ${fullScreen ? "h-full rounded-none" : `rounded-lg ${className} ${sizeClasses3[size]} max-h-[90vh]`}`,
|
|
519
547
|
variants: modalVariants,
|
|
520
548
|
initial: "hidden",
|
|
521
549
|
animate: isOpen ? "visible" : "exit",
|
|
@@ -542,7 +570,7 @@ function Modal({
|
|
|
542
570
|
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
543
571
|
framerMotion.motion.div,
|
|
544
572
|
{
|
|
545
|
-
className: `modal-backdrop fixed inset-0 w-screen h-screen bg-black/10 flex items-center ${customStyles.backdrop || "justify-center"} z-
|
|
573
|
+
className: `modal-backdrop fixed inset-0 w-screen h-screen bg-black/10 flex items-center ${customStyles.backdrop || "justify-center"} z-50 m-0 ${fullScreen ? "p-0" : "p-4"}`,
|
|
546
574
|
variants: backdropVariants,
|
|
547
575
|
initial: "hidden",
|
|
548
576
|
animate: isOpen ? "visible" : "hidden",
|
|
@@ -557,7 +585,7 @@ function Modal({
|
|
|
557
585
|
"aria-labelledby": title ? "modal-title" : void 0,
|
|
558
586
|
"aria-describedby": ariaDescribedBy || "modal-content",
|
|
559
587
|
tabIndex: -1,
|
|
560
|
-
className: `bg-card border border-border shadow-xl w-full flex flex-col overflow-hidden relative
|
|
588
|
+
className: `bg-card border border-border shadow-xl w-full flex flex-col overflow-hidden relative ${fullScreen ? "h-full rounded-none" : `rounded-lg ${customStyles.container || className || sizeClasses3[size]} max-h-[90vh]`}`,
|
|
561
589
|
variants: modalVariants,
|
|
562
590
|
initial: "hidden",
|
|
563
591
|
animate: isOpen ? "visible" : "exit",
|
|
@@ -617,14 +645,14 @@ function Modal({
|
|
|
617
645
|
);
|
|
618
646
|
}
|
|
619
647
|
function ConfirmDialog({ isOpen, options, onConfirm, onCancel }) {
|
|
620
|
-
const { title, message, confirmText, cancelText = "Cancel", confirmButtonColor = "
|
|
648
|
+
const { title, message, confirmText, cancelText = "Cancel", confirmButtonColor = "info" } = options;
|
|
621
649
|
const getConfirmVariant = () => {
|
|
622
650
|
switch (confirmButtonColor) {
|
|
623
|
-
case "
|
|
651
|
+
case "danger":
|
|
624
652
|
return "danger";
|
|
625
|
-
case "
|
|
653
|
+
case "success":
|
|
626
654
|
return "primary";
|
|
627
|
-
case "
|
|
655
|
+
case "info":
|
|
628
656
|
default:
|
|
629
657
|
return "primary";
|
|
630
658
|
}
|
|
@@ -1893,7 +1921,7 @@ function SkeletonGamesTable({
|
|
|
1893
1921
|
"div",
|
|
1894
1922
|
{
|
|
1895
1923
|
className: `overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg ${className}`,
|
|
1896
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-
|
|
1924
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-border", children: [
|
|
1897
1925
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-muted", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
1898
1926
|
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Game" }),
|
|
1899
1927
|
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Type" }),
|
|
@@ -2080,7 +2108,7 @@ function FormInput({
|
|
|
2080
2108
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2081
2109
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "form-label", children: [
|
|
2082
2110
|
label,
|
|
2083
|
-
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
2111
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-danger ml-1", children: "*" })
|
|
2084
2112
|
] }),
|
|
2085
2113
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-secondary-foreground", children: description }),
|
|
2086
2114
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2098,7 +2126,7 @@ function FormInput({
|
|
|
2098
2126
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2099
2127
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "form-label", children: [
|
|
2100
2128
|
label,
|
|
2101
|
-
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
2129
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-danger ml-1", children: "*" })
|
|
2102
2130
|
] }),
|
|
2103
2131
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-secondary-foreground", children: description }),
|
|
2104
2132
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
@@ -2110,7 +2138,7 @@ function FormInput({
|
|
|
2110
2138
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2111
2139
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "form-label", children: [
|
|
2112
2140
|
label,
|
|
2113
|
-
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
2141
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-danger ml-1", children: "*" })
|
|
2114
2142
|
] }),
|
|
2115
2143
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-secondary-foreground", children: description }),
|
|
2116
2144
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
@@ -2380,7 +2408,7 @@ function FormInput({
|
|
|
2380
2408
|
className: "absolute inset-y-0 right-8 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-colors duration-200 z-10",
|
|
2381
2409
|
"aria-label": `Copy ${label}`,
|
|
2382
2410
|
title: copied ? "Copied!" : `Copy ${label}`,
|
|
2383
|
-
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiCheckLine, { className: "w-4 h-4 text-
|
|
2411
|
+
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiCheckLine, { className: "w-4 h-4 text-success", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ri.RiFileCopyLine, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
2384
2412
|
}
|
|
2385
2413
|
),
|
|
2386
2414
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2446,7 +2474,7 @@ function FormInput({
|
|
|
2446
2474
|
className: `absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground hover:text-foreground transition-all duration-200 z-10`,
|
|
2447
2475
|
"aria-label": `Copy ${label}`,
|
|
2448
2476
|
title: copied ? "Copied!" : `Copy ${label}`,
|
|
2449
|
-
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiCheckLine, { className: "w-4 h-4 text-
|
|
2477
|
+
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(ri.RiCheckLine, { className: "w-4 h-4 text-success", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(ri.RiFileCopyLine, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
2450
2478
|
}
|
|
2451
2479
|
),
|
|
2452
2480
|
clearable && !copyable && value !== "" && value !== null && value !== void 0 && !disabled && !readOnly && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2511,15 +2539,15 @@ function Grid({
|
|
|
2511
2539
|
}
|
|
2512
2540
|
var variantStyles = {
|
|
2513
2541
|
default: "bg-accent border-border text-muted-foreground",
|
|
2514
|
-
warning: "bg-
|
|
2515
|
-
info: "bg-
|
|
2516
|
-
success: "bg-
|
|
2542
|
+
warning: "bg-amber/10 border-amber text-amber",
|
|
2543
|
+
info: "bg-info/10 border-info text-info",
|
|
2544
|
+
success: "bg-success/10 border-success text-success"
|
|
2517
2545
|
};
|
|
2518
2546
|
var titleStyles = {
|
|
2519
2547
|
default: "text-foreground",
|
|
2520
|
-
warning: "text-
|
|
2521
|
-
info: "text-
|
|
2522
|
-
success: "text-
|
|
2548
|
+
warning: "text-amber",
|
|
2549
|
+
info: "text-info",
|
|
2550
|
+
success: "text-success"
|
|
2523
2551
|
};
|
|
2524
2552
|
function InfoBox({
|
|
2525
2553
|
title,
|
|
@@ -2723,7 +2751,7 @@ var Spinner = ({
|
|
|
2723
2751
|
};
|
|
2724
2752
|
const colorClasses2 = {
|
|
2725
2753
|
primary: "border-primary-600",
|
|
2726
|
-
|
|
2754
|
+
info: "border-info",
|
|
2727
2755
|
white: "border-white",
|
|
2728
2756
|
current: "border-current"
|
|
2729
2757
|
};
|
|
@@ -2877,8 +2905,8 @@ function StatusBadge({
|
|
|
2877
2905
|
const variantClasses5 = {
|
|
2878
2906
|
default: "bg-muted text-muted-foreground",
|
|
2879
2907
|
success: "bg-success text-success-dark",
|
|
2880
|
-
warning: "bg-
|
|
2881
|
-
error: "bg-
|
|
2908
|
+
warning: "bg-amber/20 text-yellow-800",
|
|
2909
|
+
error: "bg-danger/20 text-danger",
|
|
2882
2910
|
info: "bg-primary-100 text-primary-800"
|
|
2883
2911
|
};
|
|
2884
2912
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `badge ${variantClasses5[variant]}`, children: status });
|
|
@@ -2943,9 +2971,9 @@ function CountBadge({
|
|
|
2943
2971
|
const variantClasses5 = {
|
|
2944
2972
|
primary: "bg-ring ",
|
|
2945
2973
|
secondary: "bg-muted0 ",
|
|
2946
|
-
success: "bg-
|
|
2947
|
-
warning: "bg-
|
|
2948
|
-
error: "bg-
|
|
2974
|
+
success: "bg-success ",
|
|
2975
|
+
warning: "bg-amber ",
|
|
2976
|
+
error: "bg-danger "
|
|
2949
2977
|
};
|
|
2950
2978
|
if (count <= 0) return null;
|
|
2951
2979
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2976,8 +3004,8 @@ function ClearButton({
|
|
|
2976
3004
|
lg: "w-5 h-5"
|
|
2977
3005
|
};
|
|
2978
3006
|
const variantClasses5 = {
|
|
2979
|
-
overlay: "absolute -top-1 -right-1 bg-
|
|
2980
|
-
inline: "bg-
|
|
3007
|
+
overlay: "absolute -top-1 -right-1 bg-danger rounded-full flex items-center justify-center hover:bg-danger transition-colors cursor-pointer",
|
|
3008
|
+
inline: "bg-danger rounded-full flex items-center justify-center hover:bg-danger transition-colors",
|
|
2981
3009
|
ghost: "text-muted-foreground hover:text-muted-foreground transition-colors"
|
|
2982
3010
|
};
|
|
2983
3011
|
const baseProps = {
|
|
@@ -3113,49 +3141,49 @@ function ActionButton({
|
|
|
3113
3141
|
return {
|
|
3114
3142
|
icon: fill ? ri.RiPlayCircleFill : ri.RiPlayCircleLine,
|
|
3115
3143
|
label: t.activate,
|
|
3116
|
-
className: "bg-emerald
|
|
3144
|
+
className: "bg-emerald/10 text-emerald hover:bg-emerald/20 hover:text-emerald-700 border border-emerald-200 transition-all duration-300 ease-in-out"
|
|
3117
3145
|
};
|
|
3118
3146
|
case "view":
|
|
3119
3147
|
return {
|
|
3120
3148
|
icon: fill ? ri.RiEyeFill : ri.RiEyeLine,
|
|
3121
3149
|
label: t.view,
|
|
3122
|
-
className: "bg-muted text-muted-foreground hover:bg-
|
|
3150
|
+
className: "bg-muted text-muted-foreground hover:bg-muted hover:text-foreground border border-border transition-all duration-300 ease-in-out"
|
|
3123
3151
|
};
|
|
3124
3152
|
case "metrics":
|
|
3125
3153
|
return {
|
|
3126
3154
|
icon: fill ? ri.RiBarChartFill : ri.RiBarChartLine,
|
|
3127
3155
|
label: t.metrics,
|
|
3128
|
-
className: "bg-purple
|
|
3156
|
+
className: "bg-purple/10 text-purple-600 hover:bg-purple-100 hover:text-purple-700 border border-purple-200 transition-all duration-300 ease-in-out"
|
|
3129
3157
|
};
|
|
3130
3158
|
case "start":
|
|
3131
3159
|
return {
|
|
3132
3160
|
icon: fill ? ri.RiPlayFill : ri.RiPlayLine,
|
|
3133
3161
|
label: t.start,
|
|
3134
|
-
className: "bg-
|
|
3162
|
+
className: "bg-success/10 text-success hover:bg-success/20 hover:text-success border border-success transition-all duration-300 ease-in-out"
|
|
3135
3163
|
};
|
|
3136
3164
|
case "stop":
|
|
3137
3165
|
return {
|
|
3138
3166
|
icon: fill ? ri.RiStopFill : ri.RiStopLine,
|
|
3139
3167
|
label: t.stop,
|
|
3140
|
-
className: "bg-
|
|
3168
|
+
className: "bg-danger/10 text-danger hover:bg-danger/20 hover:text-danger border border-danger transition-all duration-300 ease-in-out"
|
|
3141
3169
|
};
|
|
3142
3170
|
case "restart":
|
|
3143
3171
|
return {
|
|
3144
3172
|
icon: fill ? ri.RiRestartFill : ri.RiRestartLine,
|
|
3145
3173
|
label: t.restart,
|
|
3146
|
-
className: "bg-orange
|
|
3174
|
+
className: "bg-orange/10 text-orange hover:bg-orange/20 hover:text-orange-700 border border-orange/30 transition-all duration-300 ease-in-out"
|
|
3147
3175
|
};
|
|
3148
3176
|
case "pause":
|
|
3149
3177
|
return {
|
|
3150
3178
|
icon: fill ? ri.RiPauseFill : ri.RiPauseLine,
|
|
3151
3179
|
label: t.pause,
|
|
3152
|
-
className: "bg-
|
|
3180
|
+
className: "bg-amber/10 text-amber hover:bg-amber/20 hover:text-amber border border-amber transition-all duration-300 ease-in-out"
|
|
3153
3181
|
};
|
|
3154
3182
|
case "clone":
|
|
3155
3183
|
return {
|
|
3156
3184
|
icon: fill ? ri.RiFileCopyFill : ri.RiFileCopyLine,
|
|
3157
3185
|
label: t.clone,
|
|
3158
|
-
className: "bg-indigo
|
|
3186
|
+
className: "bg-indigo/10 text-indigo hover:bg-indigo/20 hover:text-indigo-700 border border-indigo-200 transition-all duration-300 ease-in-out"
|
|
3159
3187
|
};
|
|
3160
3188
|
default:
|
|
3161
3189
|
return null;
|
|
@@ -3166,10 +3194,10 @@ function ActionButton({
|
|
|
3166
3194
|
primary: "btn-primary",
|
|
3167
3195
|
secondary: "btn-secondary",
|
|
3168
3196
|
danger: "btn-danger",
|
|
3169
|
-
success: "bg-
|
|
3170
|
-
warning: "bg-
|
|
3197
|
+
success: "bg-success/10 text-success hover:bg-success/20 hover:text-success border border-success transition-all duration-300 ease-in-out",
|
|
3198
|
+
warning: "bg-amber/10 text-amber hover:bg-amber/20 hover:text-amber border border-amber transition-all duration-300 ease-in-out",
|
|
3171
3199
|
info: "bg-muted text-muted-foreground hover:bg-primary hover:text-primary-foreground border border-ring transition-all duration-300 ease-in-out",
|
|
3172
|
-
metrics: "bg-purple
|
|
3200
|
+
metrics: "bg-purple/10 text-purple-600 hover:bg-purple-100 hover:text-purple-700 border border-purple-200 transition-all duration-300 ease-in-out"
|
|
3173
3201
|
};
|
|
3174
3202
|
let variantClass = variantConfig ? variantConfig.className : variant ? variantClasses5[variant] : "";
|
|
3175
3203
|
if (terminalMode && variantClass) {
|