@gamecp/ui 0.1.39 → 0.1.40
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 +3 -21
- package/dist/index.d.ts +3 -21
- package/dist/index.js +9 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -75,7 +75,7 @@ interface CardProps extends AccordionCardProps, StatusCardProps {
|
|
|
75
75
|
maxHeight?: string;
|
|
76
76
|
headerBorder?: string;
|
|
77
77
|
headerBg?: string;
|
|
78
|
-
headerStatus?: 'online' | 'offline' | 'maintenance' | 'error' | 'restarting' | 'starting' | 'success' | 'info' | 'updating' | 'unknown';
|
|
78
|
+
headerStatus?: 'online' | 'offline' | 'maintenance' | 'error' | 'restarting' | 'starting' | 'success' | 'info' | 'updating' | 'terminating' | 'unknown';
|
|
79
79
|
}
|
|
80
80
|
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, }: CardProps): react_jsx_runtime.JSX.Element;
|
|
81
81
|
|
|
@@ -251,15 +251,6 @@ interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
251
251
|
}
|
|
252
252
|
declare const Link: React__default.ForwardRefExoticComponent<LinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
253
253
|
|
|
254
|
-
/**
|
|
255
|
-
* Get the sidebar nav item classes based on active state.
|
|
256
|
-
* Useful for extensions that need custom Link components.
|
|
257
|
-
*/
|
|
258
|
-
declare function getSidebarNavItemClasses(isActive: boolean, className?: string): string;
|
|
259
|
-
/**
|
|
260
|
-
* Get the sidebar nav icon classes.
|
|
261
|
-
*/
|
|
262
|
-
declare function getSidebarNavIconClasses(isActive?: boolean): string;
|
|
263
254
|
interface SidebarNavItemProps {
|
|
264
255
|
href: string;
|
|
265
256
|
icon?: IconType;
|
|
@@ -270,17 +261,8 @@ interface SidebarNavItemProps {
|
|
|
270
261
|
exact?: boolean;
|
|
271
262
|
onClick?: () => void;
|
|
272
263
|
isButton?: boolean;
|
|
273
|
-
/** Custom Link component for extensions that inject their own routing */
|
|
274
|
-
LinkComponent?: React__default.ComponentType<{
|
|
275
|
-
href: string;
|
|
276
|
-
className?: string;
|
|
277
|
-
onClick?: () => void;
|
|
278
|
-
children: React__default.ReactNode;
|
|
279
|
-
}>;
|
|
280
|
-
/** Custom pathname for extensions that inject their own routing context */
|
|
281
|
-
pathname?: string;
|
|
282
264
|
}
|
|
283
|
-
declare function SidebarNavItem({ href, icon: Icon, children, active, className, title, exact, onClick, isButton,
|
|
265
|
+
declare function SidebarNavItem({ href, icon: Icon, children, active, className, title, exact, onClick, isButton, }: SidebarNavItemProps): react_jsx_runtime.JSX.Element;
|
|
284
266
|
|
|
285
267
|
interface LoadingSpinnerProps {
|
|
286
268
|
message?: string;
|
|
@@ -1025,4 +1007,4 @@ declare function VariableInput({ name, label, value, onChange, placeholder, erro
|
|
|
1025
1007
|
|
|
1026
1008
|
declare const VERSION = "0.1.35";
|
|
1027
1009
|
|
|
1028
|
-
export { ActionButton, Badge, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, ConfirmDialog, type ConfirmDialogOptions, Container, DangerNotice, DataTable, DataTableActions, DataTableBody, DataTableCell, DataTableEmptyState, DataTableHeader, DataTableHeaderCell, DataTableLoadingState, DataTableRow, DropDownArrow, Dropdown, DropdownItem, EmptyState, ErrorAlert, ErrorMessage, FilterSelect, FilterToggleButton, FormInput, FormSection, Grid, IconButtonWithCount, InfoAlert, InfoBox, InfoNotice, Link, type LinkProps, LoadingSpinner, MobileSearchLayout, Modal, Notice, PageHeader, RefreshButton, SearchCard, SearchCardContent, SearchCardHeader, SearchInput, Select, SharedTooltip, SidebarNavItem, type SidebarNavItemProps, Skeleton, SkeletonCard, SkeletonEnvironmentsList, SkeletonForm, SkeletonGameCard, SkeletonGameServerCard, SkeletonGameServerCards, SkeletonGameServerTable, SkeletonGamesTable, SkeletonItem, SkeletonList, SkeletonNodeCard, SkeletonNodeCards, SkeletonNodeTable, SkeletonRecentActivity, SkeletonSearchCard, SkeletonStats, SkeletonTable, SkeletonTenantCard, SkeletonUserCard, SmartDropdown, SmartSelect, Spinner, StatusBadge, StickyActionsColumn, SuccessAlert, SuccessNotice, Switch, type SwitchVariant, Typography, UnsavedAlert, UnsavedChangesNotification, VERSION, VariableInput, VariableSelector, ViewToggle, WarningAlert, WarningNotice,
|
|
1010
|
+
export { ActionButton, Badge, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, ConfirmDialog, type ConfirmDialogOptions, Container, DangerNotice, DataTable, DataTableActions, DataTableBody, DataTableCell, DataTableEmptyState, DataTableHeader, DataTableHeaderCell, DataTableLoadingState, DataTableRow, DropDownArrow, Dropdown, DropdownItem, EmptyState, ErrorAlert, ErrorMessage, FilterSelect, FilterToggleButton, FormInput, FormSection, Grid, IconButtonWithCount, InfoAlert, InfoBox, InfoNotice, Link, type LinkProps, LoadingSpinner, MobileSearchLayout, Modal, Notice, PageHeader, RefreshButton, SearchCard, SearchCardContent, SearchCardHeader, SearchInput, Select, SharedTooltip, SidebarNavItem, type SidebarNavItemProps, Skeleton, SkeletonCard, SkeletonEnvironmentsList, SkeletonForm, SkeletonGameCard, SkeletonGameServerCard, SkeletonGameServerCards, SkeletonGameServerTable, SkeletonGamesTable, SkeletonItem, SkeletonList, SkeletonNodeCard, SkeletonNodeCards, SkeletonNodeTable, SkeletonRecentActivity, SkeletonSearchCard, SkeletonStats, SkeletonTable, SkeletonTenantCard, SkeletonUserCard, SmartDropdown, SmartSelect, Spinner, StatusBadge, StickyActionsColumn, SuccessAlert, SuccessNotice, Switch, type SwitchVariant, Typography, UnsavedAlert, UnsavedChangesNotification, VERSION, VariableInput, VariableSelector, ViewToggle, WarningAlert, WarningNotice, useConfirmDialog };
|
package/dist/index.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ interface CardProps extends AccordionCardProps, StatusCardProps {
|
|
|
75
75
|
maxHeight?: string;
|
|
76
76
|
headerBorder?: string;
|
|
77
77
|
headerBg?: string;
|
|
78
|
-
headerStatus?: 'online' | 'offline' | 'maintenance' | 'error' | 'restarting' | 'starting' | 'success' | 'info' | 'updating' | 'unknown';
|
|
78
|
+
headerStatus?: 'online' | 'offline' | 'maintenance' | 'error' | 'restarting' | 'starting' | 'success' | 'info' | 'updating' | 'terminating' | 'unknown';
|
|
79
79
|
}
|
|
80
80
|
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, }: CardProps): react_jsx_runtime.JSX.Element;
|
|
81
81
|
|
|
@@ -251,15 +251,6 @@ interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
251
251
|
}
|
|
252
252
|
declare const Link: React__default.ForwardRefExoticComponent<LinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
253
253
|
|
|
254
|
-
/**
|
|
255
|
-
* Get the sidebar nav item classes based on active state.
|
|
256
|
-
* Useful for extensions that need custom Link components.
|
|
257
|
-
*/
|
|
258
|
-
declare function getSidebarNavItemClasses(isActive: boolean, className?: string): string;
|
|
259
|
-
/**
|
|
260
|
-
* Get the sidebar nav icon classes.
|
|
261
|
-
*/
|
|
262
|
-
declare function getSidebarNavIconClasses(isActive?: boolean): string;
|
|
263
254
|
interface SidebarNavItemProps {
|
|
264
255
|
href: string;
|
|
265
256
|
icon?: IconType;
|
|
@@ -270,17 +261,8 @@ interface SidebarNavItemProps {
|
|
|
270
261
|
exact?: boolean;
|
|
271
262
|
onClick?: () => void;
|
|
272
263
|
isButton?: boolean;
|
|
273
|
-
/** Custom Link component for extensions that inject their own routing */
|
|
274
|
-
LinkComponent?: React__default.ComponentType<{
|
|
275
|
-
href: string;
|
|
276
|
-
className?: string;
|
|
277
|
-
onClick?: () => void;
|
|
278
|
-
children: React__default.ReactNode;
|
|
279
|
-
}>;
|
|
280
|
-
/** Custom pathname for extensions that inject their own routing context */
|
|
281
|
-
pathname?: string;
|
|
282
264
|
}
|
|
283
|
-
declare function SidebarNavItem({ href, icon: Icon, children, active, className, title, exact, onClick, isButton,
|
|
265
|
+
declare function SidebarNavItem({ href, icon: Icon, children, active, className, title, exact, onClick, isButton, }: SidebarNavItemProps): react_jsx_runtime.JSX.Element;
|
|
284
266
|
|
|
285
267
|
interface LoadingSpinnerProps {
|
|
286
268
|
message?: string;
|
|
@@ -1025,4 +1007,4 @@ declare function VariableInput({ name, label, value, onChange, placeholder, erro
|
|
|
1025
1007
|
|
|
1026
1008
|
declare const VERSION = "0.1.35";
|
|
1027
1009
|
|
|
1028
|
-
export { ActionButton, Badge, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, ConfirmDialog, type ConfirmDialogOptions, Container, DangerNotice, DataTable, DataTableActions, DataTableBody, DataTableCell, DataTableEmptyState, DataTableHeader, DataTableHeaderCell, DataTableLoadingState, DataTableRow, DropDownArrow, Dropdown, DropdownItem, EmptyState, ErrorAlert, ErrorMessage, FilterSelect, FilterToggleButton, FormInput, FormSection, Grid, IconButtonWithCount, InfoAlert, InfoBox, InfoNotice, Link, type LinkProps, LoadingSpinner, MobileSearchLayout, Modal, Notice, PageHeader, RefreshButton, SearchCard, SearchCardContent, SearchCardHeader, SearchInput, Select, SharedTooltip, SidebarNavItem, type SidebarNavItemProps, Skeleton, SkeletonCard, SkeletonEnvironmentsList, SkeletonForm, SkeletonGameCard, SkeletonGameServerCard, SkeletonGameServerCards, SkeletonGameServerTable, SkeletonGamesTable, SkeletonItem, SkeletonList, SkeletonNodeCard, SkeletonNodeCards, SkeletonNodeTable, SkeletonRecentActivity, SkeletonSearchCard, SkeletonStats, SkeletonTable, SkeletonTenantCard, SkeletonUserCard, SmartDropdown, SmartSelect, Spinner, StatusBadge, StickyActionsColumn, SuccessAlert, SuccessNotice, Switch, type SwitchVariant, Typography, UnsavedAlert, UnsavedChangesNotification, VERSION, VariableInput, VariableSelector, ViewToggle, WarningAlert, WarningNotice,
|
|
1010
|
+
export { ActionButton, Badge, type BadgeSize, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, ConfirmDialog, type ConfirmDialogOptions, Container, DangerNotice, DataTable, DataTableActions, DataTableBody, DataTableCell, DataTableEmptyState, DataTableHeader, DataTableHeaderCell, DataTableLoadingState, DataTableRow, DropDownArrow, Dropdown, DropdownItem, EmptyState, ErrorAlert, ErrorMessage, FilterSelect, FilterToggleButton, FormInput, FormSection, Grid, IconButtonWithCount, InfoAlert, InfoBox, InfoNotice, Link, type LinkProps, LoadingSpinner, MobileSearchLayout, Modal, Notice, PageHeader, RefreshButton, SearchCard, SearchCardContent, SearchCardHeader, SearchInput, Select, SharedTooltip, SidebarNavItem, type SidebarNavItemProps, Skeleton, SkeletonCard, SkeletonEnvironmentsList, SkeletonForm, SkeletonGameCard, SkeletonGameServerCard, SkeletonGameServerCards, SkeletonGameServerTable, SkeletonGamesTable, SkeletonItem, SkeletonList, SkeletonNodeCard, SkeletonNodeCards, SkeletonNodeTable, SkeletonRecentActivity, SkeletonSearchCard, SkeletonStats, SkeletonTable, SkeletonTenantCard, SkeletonUserCard, SmartDropdown, SmartSelect, Spinner, StatusBadge, StickyActionsColumn, SuccessAlert, SuccessNotice, Switch, type SwitchVariant, Typography, UnsavedAlert, UnsavedChangesNotification, VERSION, VariableInput, VariableSelector, ViewToggle, WarningAlert, WarningNotice, useConfirmDialog };
|
package/dist/index.js
CHANGED
|
@@ -287,6 +287,8 @@ function Card({
|
|
|
287
287
|
case "restarting":
|
|
288
288
|
case "updating":
|
|
289
289
|
return { border: "bg-orange", bg: "bg-orange/10" };
|
|
290
|
+
case "terminating":
|
|
291
|
+
return { border: "bg-destructive", bg: "bg-danger/10" };
|
|
290
292
|
case "unknown":
|
|
291
293
|
return { border: "bg-muted-foreground/30", bg: "bg-muted/10" };
|
|
292
294
|
default:
|
|
@@ -1060,8 +1062,8 @@ function DropdownItem({
|
|
|
1060
1062
|
flex items-start gap-3 border-b border-border/30 last:border-b-0
|
|
1061
1063
|
${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
1062
1064
|
${selected && !multiple ? "bg-primary text-primary-foreground" : variantClasses5[variant]}
|
|
1063
|
-
${focused && !selected ? "bg-muted/70 ring-
|
|
1064
|
-
${focused && selected ? "brightness-110 ring-
|
|
1065
|
+
${focused && !selected ? "bg-muted/70 ring-1 ring-primary/50 ring-inset" : ""}
|
|
1066
|
+
${focused && selected ? "brightness-110 ring-1 ring-primary-foreground/30" : ""}
|
|
1065
1067
|
`;
|
|
1066
1068
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1067
1069
|
"button",
|
|
@@ -4114,12 +4116,6 @@ var Link2 = React6.forwardRef(
|
|
|
4114
4116
|
);
|
|
4115
4117
|
Link2.displayName = "Link";
|
|
4116
4118
|
var Link_default = Link2;
|
|
4117
|
-
function getSidebarNavItemClasses(isActive, className = "") {
|
|
4118
|
-
return `group flex items-center gap-0 overflow-hidden rounded-md px-3 py-2 text-sm font-medium outline-hidden ring-sidebar-ring transition-[width,height,padding,background-color,color] duration-300 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 ${isActive ? "bg-primary text-primary-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"} ${className}`;
|
|
4119
|
-
}
|
|
4120
|
-
function getSidebarNavIconClasses(isActive = false) {
|
|
4121
|
-
return `mr-3 h-5 w-5 shrink-0 transition-all duration-300 ease-in-out${isActive ? " text-primary-foreground" : ""}`;
|
|
4122
|
-
}
|
|
4123
4119
|
function SidebarNavItem({
|
|
4124
4120
|
href,
|
|
4125
4121
|
icon: Icon,
|
|
@@ -4129,15 +4125,12 @@ function SidebarNavItem({
|
|
|
4129
4125
|
title,
|
|
4130
4126
|
exact = false,
|
|
4131
4127
|
onClick,
|
|
4132
|
-
isButton = false
|
|
4133
|
-
LinkComponent,
|
|
4134
|
-
pathname: externalPathname
|
|
4128
|
+
isButton = false
|
|
4135
4129
|
}) {
|
|
4136
|
-
const
|
|
4137
|
-
const pathname = externalPathname ?? nextPathname;
|
|
4130
|
+
const pathname = navigation.usePathname();
|
|
4138
4131
|
const isActive = active !== void 0 ? active : exact ? pathname === href : pathname === href || pathname?.startsWith(`${href}/`);
|
|
4139
|
-
const commonClasses =
|
|
4140
|
-
const iconClasses =
|
|
4132
|
+
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}`;
|
|
4133
|
+
const iconClasses = `mr-3 h-5 w-5 shrink-0 transition-all duration-300 ease-in-out${isActive ? " text-primary" : ""}`;
|
|
4141
4134
|
if (isButton) {
|
|
4142
4135
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4143
4136
|
"button",
|
|
@@ -4160,9 +4153,8 @@ function SidebarNavItem({
|
|
|
4160
4153
|
}
|
|
4161
4154
|
);
|
|
4162
4155
|
}
|
|
4163
|
-
const LinkEl = LinkComponent || Link__default.default;
|
|
4164
4156
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4165
|
-
|
|
4157
|
+
Link__default.default,
|
|
4166
4158
|
{
|
|
4167
4159
|
href,
|
|
4168
4160
|
onClick,
|
|
@@ -5561,8 +5553,6 @@ exports.VariableSelector = VariableSelector;
|
|
|
5561
5553
|
exports.ViewToggle = ViewToggle;
|
|
5562
5554
|
exports.WarningAlert = WarningAlert;
|
|
5563
5555
|
exports.WarningNotice = WarningNotice;
|
|
5564
|
-
exports.getSidebarNavIconClasses = getSidebarNavIconClasses;
|
|
5565
|
-
exports.getSidebarNavItemClasses = getSidebarNavItemClasses;
|
|
5566
5556
|
exports.useConfirmDialog = useConfirmDialog;
|
|
5567
5557
|
//# sourceMappingURL=index.js.map
|
|
5568
5558
|
//# sourceMappingURL=index.js.map
|