@gamecp/ui 0.1.26 → 0.1.27
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +16 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1925,7 +1925,7 @@ function SkeletonGamesTable({
|
|
|
1925
1925
|
/* @__PURE__ */ jsx("th", { className: "px-6 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Created" }),
|
|
1926
1926
|
/* @__PURE__ */ jsx("th", { className: "px-2 py-1 rounded-md backdrop-blur-sm text-center text-xs font-medium text-muted-foreground uppercase tracking-wider sticky right-0", children: "Actions" })
|
|
1927
1927
|
] }) }),
|
|
1928
|
-
/* @__PURE__ */ jsx("tbody", { className: "table-body-card", children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxs("tr", { className: "hover:bg-muted
|
|
1928
|
+
/* @__PURE__ */ jsx("tbody", { className: "table-body-card", children: Array.from({ length: items }).map((_, i) => /* @__PURE__ */ jsxs("tr", { className: "hover:bg-muted/50", children: [
|
|
1929
1929
|
/* @__PURE__ */ jsx("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
1930
1930
|
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 h-10 w-10", children: /* @__PURE__ */ jsx(SkeletonItem, { width: "w-10", height: "h-10", rounded: true }) }),
|
|
1931
1931
|
/* @__PURE__ */ jsxs("div", { className: "ml-4 min-w-0 flex-1", children: [
|
|
@@ -2664,7 +2664,8 @@ function Switch({
|
|
|
2664
2664
|
description,
|
|
2665
2665
|
className = "",
|
|
2666
2666
|
size = "md",
|
|
2667
|
-
variant = "default"
|
|
2667
|
+
variant = "default",
|
|
2668
|
+
labelPosition = "right"
|
|
2668
2669
|
}) {
|
|
2669
2670
|
const toggle = () => {
|
|
2670
2671
|
if (!disabled) {
|
|
@@ -2679,38 +2680,43 @@ function Switch({
|
|
|
2679
2680
|
const variants = {
|
|
2680
2681
|
default: {
|
|
2681
2682
|
checked: "bg-primary",
|
|
2682
|
-
unchecked: "bg-
|
|
2683
|
+
unchecked: "bg-input",
|
|
2683
2684
|
ring: "focus:ring-primary"
|
|
2684
2685
|
},
|
|
2685
2686
|
success: {
|
|
2686
2687
|
checked: "bg-success",
|
|
2687
|
-
unchecked: "bg-
|
|
2688
|
+
unchecked: "bg-input",
|
|
2688
2689
|
ring: "focus:ring-success"
|
|
2689
2690
|
},
|
|
2690
2691
|
danger: {
|
|
2691
2692
|
checked: "bg-destructive",
|
|
2692
|
-
unchecked: "bg-
|
|
2693
|
+
unchecked: "bg-input",
|
|
2693
2694
|
ring: "focus:ring-destructive"
|
|
2694
2695
|
},
|
|
2695
2696
|
warning: {
|
|
2696
2697
|
checked: "bg-warning",
|
|
2697
|
-
unchecked: "bg-
|
|
2698
|
+
unchecked: "bg-input",
|
|
2698
2699
|
ring: "focus:ring-warning"
|
|
2699
2700
|
},
|
|
2700
2701
|
info: {
|
|
2701
2702
|
checked: "bg-info",
|
|
2702
|
-
unchecked: "bg-
|
|
2703
|
+
unchecked: "bg-input",
|
|
2703
2704
|
ring: "focus:ring-info"
|
|
2704
2705
|
},
|
|
2705
2706
|
embedded: {
|
|
2706
2707
|
checked: "bg-success",
|
|
2707
|
-
unchecked: "bg-
|
|
2708
|
+
unchecked: "bg-input",
|
|
2708
2709
|
ring: "focus:ring-success"
|
|
2709
2710
|
}
|
|
2710
2711
|
};
|
|
2711
2712
|
const currentSize = sizes[size];
|
|
2712
2713
|
const currentVariant = variants[variant];
|
|
2713
|
-
|
|
2714
|
+
const LabelContent = /* @__PURE__ */ jsxs("div", { className: `${labelPosition === "left" ? "mr-3 flex-1 text-left" : "ml-3 w-fit"} flex flex-col justify-center gap-1`, children: [
|
|
2715
|
+
label && /* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-foreground cursor-pointer", onClick: toggle, children: label }),
|
|
2716
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-snug", children: description })
|
|
2717
|
+
] });
|
|
2718
|
+
return /* @__PURE__ */ jsxs("div", { className: `flex items-center ${labelPosition === "left" ? "justify-between" : ""} ${className}`, children: [
|
|
2719
|
+
labelPosition === "left" && (label || description) && LabelContent,
|
|
2714
2720
|
/* @__PURE__ */ jsx(
|
|
2715
2721
|
"button",
|
|
2716
2722
|
{
|
|
@@ -2740,10 +2746,7 @@ function Switch({
|
|
|
2740
2746
|
)
|
|
2741
2747
|
}
|
|
2742
2748
|
),
|
|
2743
|
-
(label || description) &&
|
|
2744
|
-
label && /* @__PURE__ */ jsx("label", { className: "font-medium text-foreground cursor-pointer", onClick: toggle, children: label }),
|
|
2745
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
|
|
2746
|
-
] })
|
|
2749
|
+
labelPosition === "right" && (label || description) && LabelContent
|
|
2747
2750
|
] });
|
|
2748
2751
|
}
|
|
2749
2752
|
var variantClasses4 = {
|