@gamecp/ui 0.1.36 → 0.1.39
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 +33 -7
- package/dist/index.d.ts +33 -7
- package/dist/index.js +247 -129
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +180 -64
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -27,6 +27,8 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
27
27
|
leftIcon?: React__default.ReactNode;
|
|
28
28
|
rightIcon?: React__default.ReactNode;
|
|
29
29
|
fullWidth?: boolean;
|
|
30
|
+
'aria-label'?: string;
|
|
31
|
+
'aria-describedby'?: string;
|
|
30
32
|
}
|
|
31
33
|
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
32
34
|
|
|
@@ -249,6 +251,15 @@ interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
249
251
|
}
|
|
250
252
|
declare const Link: React__default.ForwardRefExoticComponent<LinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
251
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;
|
|
252
263
|
interface SidebarNavItemProps {
|
|
253
264
|
href: string;
|
|
254
265
|
icon?: IconType;
|
|
@@ -259,8 +270,17 @@ interface SidebarNavItemProps {
|
|
|
259
270
|
exact?: boolean;
|
|
260
271
|
onClick?: () => void;
|
|
261
272
|
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;
|
|
262
282
|
}
|
|
263
|
-
declare function SidebarNavItem({ href, icon: Icon, children, active, className, title, exact, onClick, isButton, }: SidebarNavItemProps): react_jsx_runtime.JSX.Element;
|
|
283
|
+
declare function SidebarNavItem({ href, icon: Icon, children, active, className, title, exact, onClick, isButton, LinkComponent, pathname: externalPathname, }: SidebarNavItemProps): react_jsx_runtime.JSX.Element;
|
|
264
284
|
|
|
265
285
|
interface LoadingSpinnerProps {
|
|
266
286
|
message?: string;
|
|
@@ -690,6 +710,10 @@ interface IconButtonWithCountProps {
|
|
|
690
710
|
}
|
|
691
711
|
declare function IconButtonWithCount({ icon, label, count, onClick, onClear, showLabel, className, buttonClassName, countVariant, clearVariant, tooltipId, tooltipContent, clearTooltipId, clearTooltipContent, }: IconButtonWithCountProps): react_jsx_runtime.JSX.Element;
|
|
692
712
|
|
|
713
|
+
/**
|
|
714
|
+
* Render function that receives selection state for dynamic styling
|
|
715
|
+
*/
|
|
716
|
+
type SelectionAwareRenderer = (isSelected: boolean) => ReactNode;
|
|
693
717
|
/**
|
|
694
718
|
* Single dropdown item - flexible to support menus, selects, filters
|
|
695
719
|
*/
|
|
@@ -698,10 +722,10 @@ interface DropdownItem$1 {
|
|
|
698
722
|
value: string;
|
|
699
723
|
/** Display label - string or ReactNode */
|
|
700
724
|
label: ReactNode;
|
|
701
|
-
/** Optional description/subtitle */
|
|
702
|
-
description?: ReactNode;
|
|
703
|
-
/** Optional icon
|
|
704
|
-
icon?: ReactNode;
|
|
725
|
+
/** Optional description/subtitle - can be a function to receive selection state */
|
|
726
|
+
description?: ReactNode | SelectionAwareRenderer;
|
|
727
|
+
/** Optional icon - can be a function to receive selection state for dynamic styling */
|
|
728
|
+
icon?: ReactNode | SelectionAwareRenderer;
|
|
705
729
|
/** Whether this item is disabled */
|
|
706
730
|
disabled?: boolean;
|
|
707
731
|
/** Visual variant for the item */
|
|
@@ -818,12 +842,14 @@ interface DropdownItemProps {
|
|
|
818
842
|
selected?: boolean;
|
|
819
843
|
multiple?: boolean;
|
|
820
844
|
onClick: () => void;
|
|
845
|
+
focused?: boolean;
|
|
846
|
+
itemId?: string;
|
|
821
847
|
}
|
|
822
848
|
/**
|
|
823
849
|
* Single dropdown item renderer
|
|
824
850
|
* Supports icon, label, description, and selection state
|
|
825
851
|
*/
|
|
826
|
-
declare function DropdownItem({ item, selected, multiple, onClick, }: DropdownItemProps): react_jsx_runtime.JSX.Element;
|
|
852
|
+
declare function DropdownItem({ item, selected, multiple, onClick, focused, itemId, }: DropdownItemProps): react_jsx_runtime.JSX.Element;
|
|
827
853
|
|
|
828
854
|
interface SelectProps {
|
|
829
855
|
/** Options to choose from */
|
|
@@ -999,4 +1025,4 @@ declare function VariableInput({ name, label, value, onChange, placeholder, erro
|
|
|
999
1025
|
|
|
1000
1026
|
declare const VERSION = "0.1.35";
|
|
1001
1027
|
|
|
1002
|
-
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 };
|
|
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, getSidebarNavIconClasses, getSidebarNavItemClasses, useConfirmDialog };
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
27
27
|
leftIcon?: React__default.ReactNode;
|
|
28
28
|
rightIcon?: React__default.ReactNode;
|
|
29
29
|
fullWidth?: boolean;
|
|
30
|
+
'aria-label'?: string;
|
|
31
|
+
'aria-describedby'?: string;
|
|
30
32
|
}
|
|
31
33
|
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
32
34
|
|
|
@@ -249,6 +251,15 @@ interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
249
251
|
}
|
|
250
252
|
declare const Link: React__default.ForwardRefExoticComponent<LinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
251
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;
|
|
252
263
|
interface SidebarNavItemProps {
|
|
253
264
|
href: string;
|
|
254
265
|
icon?: IconType;
|
|
@@ -259,8 +270,17 @@ interface SidebarNavItemProps {
|
|
|
259
270
|
exact?: boolean;
|
|
260
271
|
onClick?: () => void;
|
|
261
272
|
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;
|
|
262
282
|
}
|
|
263
|
-
declare function SidebarNavItem({ href, icon: Icon, children, active, className, title, exact, onClick, isButton, }: SidebarNavItemProps): react_jsx_runtime.JSX.Element;
|
|
283
|
+
declare function SidebarNavItem({ href, icon: Icon, children, active, className, title, exact, onClick, isButton, LinkComponent, pathname: externalPathname, }: SidebarNavItemProps): react_jsx_runtime.JSX.Element;
|
|
264
284
|
|
|
265
285
|
interface LoadingSpinnerProps {
|
|
266
286
|
message?: string;
|
|
@@ -690,6 +710,10 @@ interface IconButtonWithCountProps {
|
|
|
690
710
|
}
|
|
691
711
|
declare function IconButtonWithCount({ icon, label, count, onClick, onClear, showLabel, className, buttonClassName, countVariant, clearVariant, tooltipId, tooltipContent, clearTooltipId, clearTooltipContent, }: IconButtonWithCountProps): react_jsx_runtime.JSX.Element;
|
|
692
712
|
|
|
713
|
+
/**
|
|
714
|
+
* Render function that receives selection state for dynamic styling
|
|
715
|
+
*/
|
|
716
|
+
type SelectionAwareRenderer = (isSelected: boolean) => ReactNode;
|
|
693
717
|
/**
|
|
694
718
|
* Single dropdown item - flexible to support menus, selects, filters
|
|
695
719
|
*/
|
|
@@ -698,10 +722,10 @@ interface DropdownItem$1 {
|
|
|
698
722
|
value: string;
|
|
699
723
|
/** Display label - string or ReactNode */
|
|
700
724
|
label: ReactNode;
|
|
701
|
-
/** Optional description/subtitle */
|
|
702
|
-
description?: ReactNode;
|
|
703
|
-
/** Optional icon
|
|
704
|
-
icon?: ReactNode;
|
|
725
|
+
/** Optional description/subtitle - can be a function to receive selection state */
|
|
726
|
+
description?: ReactNode | SelectionAwareRenderer;
|
|
727
|
+
/** Optional icon - can be a function to receive selection state for dynamic styling */
|
|
728
|
+
icon?: ReactNode | SelectionAwareRenderer;
|
|
705
729
|
/** Whether this item is disabled */
|
|
706
730
|
disabled?: boolean;
|
|
707
731
|
/** Visual variant for the item */
|
|
@@ -818,12 +842,14 @@ interface DropdownItemProps {
|
|
|
818
842
|
selected?: boolean;
|
|
819
843
|
multiple?: boolean;
|
|
820
844
|
onClick: () => void;
|
|
845
|
+
focused?: boolean;
|
|
846
|
+
itemId?: string;
|
|
821
847
|
}
|
|
822
848
|
/**
|
|
823
849
|
* Single dropdown item renderer
|
|
824
850
|
* Supports icon, label, description, and selection state
|
|
825
851
|
*/
|
|
826
|
-
declare function DropdownItem({ item, selected, multiple, onClick, }: DropdownItemProps): react_jsx_runtime.JSX.Element;
|
|
852
|
+
declare function DropdownItem({ item, selected, multiple, onClick, focused, itemId, }: DropdownItemProps): react_jsx_runtime.JSX.Element;
|
|
827
853
|
|
|
828
854
|
interface SelectProps {
|
|
829
855
|
/** Options to choose from */
|
|
@@ -999,4 +1025,4 @@ declare function VariableInput({ name, label, value, onChange, placeholder, erro
|
|
|
999
1025
|
|
|
1000
1026
|
declare const VERSION = "0.1.35";
|
|
1001
1027
|
|
|
1002
|
-
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 };
|
|
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, getSidebarNavIconClasses, getSidebarNavItemClasses, useConfirmDialog };
|