@gamecp/ui 0.1.39 → 0.1.41

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.mjs CHANGED
@@ -280,6 +280,8 @@ function Card({
280
280
  case "restarting":
281
281
  case "updating":
282
282
  return { border: "bg-orange", bg: "bg-orange/10" };
283
+ case "terminating":
284
+ return { border: "bg-destructive", bg: "bg-danger/10" };
283
285
  case "unknown":
284
286
  return { border: "bg-muted-foreground/30", bg: "bg-muted/10" };
285
287
  default:
@@ -1053,8 +1055,8 @@ function DropdownItem({
1053
1055
  flex items-start gap-3 border-b border-border/30 last:border-b-0
1054
1056
  ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
1055
1057
  ${selected && !multiple ? "bg-primary text-primary-foreground" : variantClasses5[variant]}
1056
- ${focused && !selected ? "bg-muted/70 ring-2 ring-primary/50 ring-inset" : ""}
1057
- ${focused && selected ? "brightness-110 ring-2 ring-primary-foreground/30" : ""}
1058
+ ${focused && !selected ? "bg-muted/70 ring-1 ring-primary/50 ring-inset" : ""}
1059
+ ${focused && selected ? "brightness-110 ring-1 ring-primary-foreground/30" : ""}
1058
1060
  `;
1059
1061
  return /* @__PURE__ */ jsxs(
1060
1062
  "button",
@@ -3547,7 +3549,7 @@ function FormInput({
3547
3549
  /* @__PURE__ */ jsxs(
3548
3550
  "div",
3549
3551
  {
3550
- className: `relative flex-1 ${footerDescription ? "border-r-2 border-info/50 hover:border-info rounded-r-sm cursor-help transition-colors" : ""}`,
3552
+ className: `relative flex-1 ${footerDescription ? "cursor-help" : ""}`,
3551
3553
  "data-tooltip-id": footerDescription ? `${uniqueId}-help` : void 0,
3552
3554
  children: [
3553
3555
  /* @__PURE__ */ jsx(
@@ -3566,7 +3568,7 @@ function FormInput({
3566
3568
  } : handleSelectChange,
3567
3569
  options: options || [],
3568
3570
  placeholder: placeholder || "Select an option...",
3569
- className: `${error ? "form-input-error" : ""} ${inputClassName}`,
3571
+ className: `${error ? "form-input-error" : ""} ${footerDescription ? "border-r-2 border-r-info/50 hover:border-r-info transition-colors" : ""} ${inputClassName}`,
3570
3572
  multiple: multiSelect,
3571
3573
  width: selectWidth,
3572
3574
  searchable,
@@ -3598,7 +3600,7 @@ function FormInput({
3598
3600
  /* @__PURE__ */ jsx(
3599
3601
  "div",
3600
3602
  {
3601
- className: `relative flex-1 ${footerDescription ? "border-r-2 border-info/50 hover:border-info rounded-r-sm cursor-help transition-colors" : ""}`,
3603
+ className: `relative flex-1 ${footerDescription ? "cursor-help" : ""}`,
3602
3604
  "data-tooltip-id": footerDescription ? `${uniqueId}-help` : void 0,
3603
3605
  children: /* @__PURE__ */ jsx(
3604
3606
  "textarea",
@@ -3617,7 +3619,7 @@ function FormInput({
3617
3619
  maxLength,
3618
3620
  "aria-invalid": error ? "true" : "false",
3619
3621
  "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
3620
- className: `form-input ${error ? "form-input-error" : ""} ${inputClassName}`
3622
+ className: `form-input ${error ? "form-input-error" : ""} ${footerDescription ? "border-r-2 border-r-info/50 hover:border-r-info transition-colors" : ""} ${inputClassName}`
3621
3623
  }
3622
3624
  )
3623
3625
  }
@@ -3635,7 +3637,7 @@ function FormInput({
3635
3637
  ] }) : type === "color" ? /* @__PURE__ */ jsxs(
3636
3638
  "div",
3637
3639
  {
3638
- className: `flex items-center space-x-3 ${footerDescription ? "border-r-2 border-info/50 hover:border-info pr-2 rounded-r-sm cursor-help transition-colors" : ""}`,
3640
+ className: `flex items-center space-x-3 ${footerDescription ? "cursor-help" : ""}`,
3639
3641
  "data-tooltip-id": footerDescription ? `${uniqueId}-help` : void 0,
3640
3642
  children: [
3641
3643
  /* @__PURE__ */ jsxs("div", { className: "relative w-10 h-10 border border-input rounded-md overflow-hidden bg-card", children: [
@@ -3705,7 +3707,7 @@ function FormInput({
3705
3707
  /* @__PURE__ */ jsxs(
3706
3708
  "div",
3707
3709
  {
3708
- className: `relative flex-1 ${footerDescription ? "border-r-2 border-info/50 hover:border-info rounded-r-sm cursor-help transition-colors" : ""}`,
3710
+ className: `relative flex-1 ${footerDescription ? "cursor-help" : ""}`,
3709
3711
  "data-tooltip-id": footerDescription ? `${uniqueId}-help` : void 0,
3710
3712
  children: [
3711
3713
  /* @__PURE__ */ jsx(
@@ -3727,7 +3729,7 @@ function FormInput({
3727
3729
  onBlur,
3728
3730
  "aria-invalid": error ? "true" : "false",
3729
3731
  "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
3730
- className: `form-input ${error ? "form-input-error" : ""} ${readOnly ? "bg-muted cursor-default" : ""} ${copyable ? "pr-20" : "pr-10"} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`
3732
+ className: `form-input ${error ? "form-input-error" : ""} ${readOnly ? "bg-muted cursor-default" : ""} ${copyable ? "pr-20" : "pr-10"} ${footerDescription ? "border-r-2 border-r-info/50 hover:border-r-info transition-colors" : ""} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`
3731
3733
  }
3732
3734
  ),
3733
3735
  shouldShowIcons(type) && (() => {
@@ -3795,7 +3797,7 @@ function FormInput({
3795
3797
  ] }) : /* @__PURE__ */ jsxs(
3796
3798
  "div",
3797
3799
  {
3798
- className: `flex items-center ${variablePicker ? "input-group" : ""} ${footerDescription ? "border-r-2 border-info/50 hover:border-info rounded-r-sm cursor-help transition-colors" : ""}`,
3800
+ className: `flex items-center ${variablePicker ? "input-group" : ""} ${footerDescription ? "cursor-help" : ""}`,
3799
3801
  "data-tooltip-id": footerDescription ? `${uniqueId}-help` : void 0,
3800
3802
  children: [
3801
3803
  /* @__PURE__ */ jsxs("div", { className: "relative group flex-1", children: [
@@ -3822,7 +3824,7 @@ function FormInput({
3822
3824
  onBlur,
3823
3825
  "aria-invalid": error ? "true" : "false",
3824
3826
  "aria-describedby": error ? `${name}-error` : description ? `${name}-description` : void 0,
3825
- className: `form-input ${error ? "form-input-error" : ""} ${readOnly ? "bg-muted cursor-default" : ""} ${copyable ? "pr-10" : ""} ${variablePicker ? "rounded-r-none border-r-0" : ""} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`
3827
+ className: `form-input ${error ? "form-input-error" : ""} ${readOnly ? "bg-muted cursor-default" : ""} ${copyable ? "pr-10" : ""} ${variablePicker ? "rounded-r-none border-r-0" : ""} ${footerDescription && !variablePicker ? "border-r-2 border-r-info/50 hover:border-r-info transition-colors" : ""} ${getInputPaddingClasses(type, getIconConfig(icon))} ${inputClassName}`
3826
3828
  }
3827
3829
  ),
3828
3830
  shouldShowIcons(type) && (() => {
@@ -4107,12 +4109,6 @@ var Link2 = forwardRef(
4107
4109
  );
4108
4110
  Link2.displayName = "Link";
4109
4111
  var Link_default = Link2;
4110
- function getSidebarNavItemClasses(isActive, className = "") {
4111
- 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}`;
4112
- }
4113
- function getSidebarNavIconClasses(isActive = false) {
4114
- return `mr-3 h-5 w-5 shrink-0 transition-all duration-300 ease-in-out${isActive ? " text-primary-foreground" : ""}`;
4115
- }
4116
4112
  function SidebarNavItem({
4117
4113
  href,
4118
4114
  icon: Icon,
@@ -4122,22 +4118,20 @@ function SidebarNavItem({
4122
4118
  title,
4123
4119
  exact = false,
4124
4120
  onClick,
4125
- isButton = false,
4126
- LinkComponent,
4127
- pathname: externalPathname
4121
+ isButton = false
4128
4122
  }) {
4129
- const nextPathname = usePathname();
4130
- const pathname = externalPathname ?? nextPathname;
4123
+ const pathname = usePathname();
4131
4124
  const isActive = active !== void 0 ? active : exact ? pathname === href : pathname === href || pathname?.startsWith(`${href}/`);
4132
- const commonClasses = getSidebarNavItemClasses(isActive, className);
4133
- const iconClasses = getSidebarNavIconClasses(isActive);
4125
+ 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}`;
4126
+ const iconClasses = `mr-3 h-5 w-5 shrink-0 transition-all duration-300 ease-in-out${isActive ? " text-primary" : ""}`;
4134
4127
  if (isButton) {
4135
4128
  return /* @__PURE__ */ jsxs(
4136
4129
  "button",
4137
4130
  {
4138
4131
  type: "button",
4139
4132
  onClick,
4140
- title,
4133
+ "data-tooltip-id": title ? "global-tooltip" : void 0,
4134
+ "data-tooltip-content": title,
4141
4135
  "aria-current": isActive ? "page" : void 0,
4142
4136
  className: `w-full text-left ${commonClasses}`,
4143
4137
  children: [
@@ -4153,12 +4147,13 @@ function SidebarNavItem({
4153
4147
  }
4154
4148
  );
4155
4149
  }
4156
- const LinkEl = LinkComponent || Link;
4157
4150
  return /* @__PURE__ */ jsxs(
4158
- LinkEl,
4151
+ Link,
4159
4152
  {
4160
4153
  href,
4161
4154
  onClick,
4155
+ "data-tooltip-id": title ? "global-tooltip" : void 0,
4156
+ "data-tooltip-content": title,
4162
4157
  className: commonClasses,
4163
4158
  children: [
4164
4159
  Icon && /* @__PURE__ */ jsx(
@@ -5472,6 +5467,6 @@ function ViewToggle({
5472
5467
  // src/index.ts
5473
5468
  var VERSION = "0.1.35";
5474
5469
 
5475
- export { ActionButton, Badge, Button_default as Button, Card, ConfirmDialog_default as ConfirmDialog, Container, DangerNotice, DataTable, DataTableActions, DataTableBody, DataTableCell, DataTableEmptyState, DataTableHeader, DataTableHeaderCell, DataTableLoadingState, DataTableRow, DropDownArrow, Dropdown, DropdownItem, EmptyState_default as EmptyState, ErrorAlert, ErrorMessage, FilterSelect, FilterToggleButton, FormInput, FormSection, Grid, IconButtonWithCount, InfoAlert, InfoBox, InfoNotice, Link_default as Link, LoadingSpinner_default as LoadingSpinner, MobileSearchLayout, Modal, Notice, PageHeader, RefreshButton, SearchCard, SearchCardContent, SearchCardHeader, SearchInput, Select, SharedTooltip, SidebarNavItem, Skeleton, SkeletonCard, SkeletonEnvironmentsList, SkeletonForm, SkeletonGameCard, SkeletonGameServerCard, SkeletonGameServerCards, SkeletonGameServerTable, SkeletonGamesTable, SkeletonItem, SkeletonList, SkeletonNodeCard, SkeletonNodeCards, SkeletonNodeTable, SkeletonRecentActivity, SkeletonSearchCard, SkeletonStats, SkeletonTable, SkeletonTenantCard, SkeletonUserCard, SmartDropdown, SmartSelect, Spinner_default as Spinner, StatusBadge, StickyActionsColumn, SuccessAlert, SuccessNotice, Switch, Typography, UnsavedAlert, UnsavedChangesNotification, VERSION, VariableInput, VariableSelector, ViewToggle, WarningAlert, WarningNotice, getSidebarNavIconClasses, getSidebarNavItemClasses, useConfirmDialog };
5470
+ export { ActionButton, Badge, Button_default as Button, Card, ConfirmDialog_default as ConfirmDialog, Container, DangerNotice, DataTable, DataTableActions, DataTableBody, DataTableCell, DataTableEmptyState, DataTableHeader, DataTableHeaderCell, DataTableLoadingState, DataTableRow, DropDownArrow, Dropdown, DropdownItem, EmptyState_default as EmptyState, ErrorAlert, ErrorMessage, FilterSelect, FilterToggleButton, FormInput, FormSection, Grid, IconButtonWithCount, InfoAlert, InfoBox, InfoNotice, Link_default as Link, LoadingSpinner_default as LoadingSpinner, MobileSearchLayout, Modal, Notice, PageHeader, RefreshButton, SearchCard, SearchCardContent, SearchCardHeader, SearchInput, Select, SharedTooltip, SidebarNavItem, Skeleton, SkeletonCard, SkeletonEnvironmentsList, SkeletonForm, SkeletonGameCard, SkeletonGameServerCard, SkeletonGameServerCards, SkeletonGameServerTable, SkeletonGamesTable, SkeletonItem, SkeletonList, SkeletonNodeCard, SkeletonNodeCards, SkeletonNodeTable, SkeletonRecentActivity, SkeletonSearchCard, SkeletonStats, SkeletonTable, SkeletonTenantCard, SkeletonUserCard, SmartDropdown, SmartSelect, Spinner_default as Spinner, StatusBadge, StickyActionsColumn, SuccessAlert, SuccessNotice, Switch, Typography, UnsavedAlert, UnsavedChangesNotification, VERSION, VariableInput, VariableSelector, ViewToggle, WarningAlert, WarningNotice, useConfirmDialog };
5476
5471
  //# sourceMappingURL=index.mjs.map
5477
5472
  //# sourceMappingURL=index.mjs.map