@trackunit/react-components 2.2.18-alpha-6a7012a9db5.0 → 2.2.18
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/index.cjs.js +61 -11
- package/index.esm.js +61 -11
- package/package.json +6 -6
- package/src/components/buttons/shared/Button.variants.d.ts +1 -0
package/index.cjs.js
CHANGED
|
@@ -765,7 +765,7 @@ const cvaButton = cssClassVarianceUtilities.cvaMerge([
|
|
|
765
765
|
"focus:bg-danger-200",
|
|
766
766
|
"focus:text-danger-800",
|
|
767
767
|
"focus:border-danger-800",
|
|
768
|
-
"disabled:bg-neutral-
|
|
768
|
+
"disabled:bg-neutral-200",
|
|
769
769
|
"disabled:text-neutral-400",
|
|
770
770
|
],
|
|
771
771
|
ghost: [
|
|
@@ -844,7 +844,20 @@ const cvaButton = cssClassVarianceUtilities.cvaMerge([
|
|
|
844
844
|
false: "",
|
|
845
845
|
},
|
|
846
846
|
disabled: {
|
|
847
|
-
true: [
|
|
847
|
+
true: [
|
|
848
|
+
"cursor-not-allowed",
|
|
849
|
+
"bg-neutral-200",
|
|
850
|
+
"hover:bg-neutral-200",
|
|
851
|
+
"focus:bg-neutral-200",
|
|
852
|
+
"active:bg-neutral-200",
|
|
853
|
+
"text-neutral-400",
|
|
854
|
+
"hover:text-neutral-400",
|
|
855
|
+
"focus:text-neutral-400",
|
|
856
|
+
"active:text-neutral-400",
|
|
857
|
+
"hover:border-neutral-300",
|
|
858
|
+
"focus:border-neutral-300",
|
|
859
|
+
"active:border-neutral-300",
|
|
860
|
+
],
|
|
848
861
|
false: [],
|
|
849
862
|
},
|
|
850
863
|
loading: {
|
|
@@ -926,25 +939,62 @@ const cvaButtonPrefixSuffix = cssClassVarianceUtilities.cvaMerge(["flex", "items
|
|
|
926
939
|
primary: [],
|
|
927
940
|
"primary-danger": [],
|
|
928
941
|
secondary: [
|
|
929
|
-
"text-neutral-
|
|
930
|
-
"group-focus:text-neutral-
|
|
931
|
-
"group-hover:text-neutral-
|
|
932
|
-
"group-active:text-neutral-
|
|
942
|
+
"text-neutral-500",
|
|
943
|
+
"group-focus:text-neutral-500",
|
|
944
|
+
"group-hover:text-neutral-600",
|
|
945
|
+
"group-active:text-neutral-700",
|
|
933
946
|
],
|
|
934
947
|
"secondary-danger": [],
|
|
935
948
|
ghost: [],
|
|
936
949
|
"ghost-neutral": [
|
|
937
|
-
"text-neutral-
|
|
938
|
-
"group-focus:text-neutral-
|
|
939
|
-
"group-hover:text-neutral-
|
|
940
|
-
"group-active:text-neutral-
|
|
950
|
+
"text-neutral-500",
|
|
951
|
+
"group-focus:text-neutral-500",
|
|
952
|
+
"group-hover:text-neutral-600",
|
|
953
|
+
"group-active:text-neutral-700",
|
|
941
954
|
],
|
|
942
955
|
filled: [],
|
|
943
956
|
},
|
|
957
|
+
disabled: {
|
|
958
|
+
true: [],
|
|
959
|
+
false: [],
|
|
960
|
+
},
|
|
944
961
|
},
|
|
962
|
+
compoundVariants: [
|
|
963
|
+
{
|
|
964
|
+
variant: "secondary",
|
|
965
|
+
disabled: true,
|
|
966
|
+
className: [
|
|
967
|
+
"text-neutral-400",
|
|
968
|
+
"group-focus:text-neutral-400",
|
|
969
|
+
"group-hover:text-neutral-400",
|
|
970
|
+
"group-active:text-neutral-400",
|
|
971
|
+
],
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
variant: "ghost-neutral",
|
|
975
|
+
disabled: true,
|
|
976
|
+
className: [
|
|
977
|
+
"text-neutral-300",
|
|
978
|
+
"group-focus:text-neutral-300",
|
|
979
|
+
"group-hover:text-neutral-300",
|
|
980
|
+
"group-active:text-neutral-300",
|
|
981
|
+
],
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
variant: "ghost",
|
|
985
|
+
disabled: true,
|
|
986
|
+
className: [
|
|
987
|
+
"text-neutral-300",
|
|
988
|
+
"group-focus:text-neutral-300",
|
|
989
|
+
"group-hover:text-neutral-300",
|
|
990
|
+
"group-active:text-neutral-300",
|
|
991
|
+
],
|
|
992
|
+
},
|
|
993
|
+
],
|
|
945
994
|
defaultVariants: {
|
|
946
995
|
size: "medium",
|
|
947
996
|
variant: "primary",
|
|
997
|
+
disabled: false,
|
|
948
998
|
},
|
|
949
999
|
});
|
|
950
1000
|
const cvaIconButton = cssClassVarianceUtilities.cvaMerge([], {
|
|
@@ -1024,7 +1074,7 @@ const Button = ({ onClick, children, loading = false, disabled = false, classNam
|
|
|
1024
1074
|
disabled: disabled || loading,
|
|
1025
1075
|
type,
|
|
1026
1076
|
};
|
|
1027
|
-
return (jsxRuntime.jsxs(Comp, { ...sharedCompProps, ...(asChild ? {} : buttonSpecificProps), children: [loading ? (jsxRuntime.jsx(Spinner, { centering: "vertically", className: cvaButtonSpinner({ variant }), containerClassName: cvaButtonSpinnerContainer(), size: "small" })) : null, prefix !== null && prefix !== undefined && !loading ? (jsxRuntime.jsx("div", { className: cvaButtonPrefixSuffix({ size, variant }), children: prefix })) : null, jsxRuntime.jsx(reactSlot.Slottable, { children: children }), suffix !== null && suffix !== undefined && !loading ? (jsxRuntime.jsx("div", { className: cvaButtonPrefixSuffix({ size, variant }), children: suffix })) : null] }));
|
|
1077
|
+
return (jsxRuntime.jsxs(Comp, { ...sharedCompProps, ...(asChild ? {} : buttonSpecificProps), children: [loading ? (jsxRuntime.jsx(Spinner, { centering: "vertically", className: cvaButtonSpinner({ variant }), containerClassName: cvaButtonSpinnerContainer(), size: "small" })) : null, prefix !== null && prefix !== undefined && !loading ? (jsxRuntime.jsx("div", { className: cvaButtonPrefixSuffix({ size, variant, disabled: disabled || loading }), children: prefix })) : null, jsxRuntime.jsx(reactSlot.Slottable, { children: children }), suffix !== null && suffix !== undefined && !loading ? (jsxRuntime.jsx("div", { className: cvaButtonPrefixSuffix({ size, variant, disabled: disabled || loading }), children: suffix })) : null] }));
|
|
1028
1078
|
};
|
|
1029
1079
|
Button.displayName = "Button";
|
|
1030
1080
|
|
package/index.esm.js
CHANGED
|
@@ -763,7 +763,7 @@ const cvaButton = cvaMerge([
|
|
|
763
763
|
"focus:bg-danger-200",
|
|
764
764
|
"focus:text-danger-800",
|
|
765
765
|
"focus:border-danger-800",
|
|
766
|
-
"disabled:bg-neutral-
|
|
766
|
+
"disabled:bg-neutral-200",
|
|
767
767
|
"disabled:text-neutral-400",
|
|
768
768
|
],
|
|
769
769
|
ghost: [
|
|
@@ -842,7 +842,20 @@ const cvaButton = cvaMerge([
|
|
|
842
842
|
false: "",
|
|
843
843
|
},
|
|
844
844
|
disabled: {
|
|
845
|
-
true: [
|
|
845
|
+
true: [
|
|
846
|
+
"cursor-not-allowed",
|
|
847
|
+
"bg-neutral-200",
|
|
848
|
+
"hover:bg-neutral-200",
|
|
849
|
+
"focus:bg-neutral-200",
|
|
850
|
+
"active:bg-neutral-200",
|
|
851
|
+
"text-neutral-400",
|
|
852
|
+
"hover:text-neutral-400",
|
|
853
|
+
"focus:text-neutral-400",
|
|
854
|
+
"active:text-neutral-400",
|
|
855
|
+
"hover:border-neutral-300",
|
|
856
|
+
"focus:border-neutral-300",
|
|
857
|
+
"active:border-neutral-300",
|
|
858
|
+
],
|
|
846
859
|
false: [],
|
|
847
860
|
},
|
|
848
861
|
loading: {
|
|
@@ -924,25 +937,62 @@ const cvaButtonPrefixSuffix = cvaMerge(["flex", "items-center"], {
|
|
|
924
937
|
primary: [],
|
|
925
938
|
"primary-danger": [],
|
|
926
939
|
secondary: [
|
|
927
|
-
"text-neutral-
|
|
928
|
-
"group-focus:text-neutral-
|
|
929
|
-
"group-hover:text-neutral-
|
|
930
|
-
"group-active:text-neutral-
|
|
940
|
+
"text-neutral-500",
|
|
941
|
+
"group-focus:text-neutral-500",
|
|
942
|
+
"group-hover:text-neutral-600",
|
|
943
|
+
"group-active:text-neutral-700",
|
|
931
944
|
],
|
|
932
945
|
"secondary-danger": [],
|
|
933
946
|
ghost: [],
|
|
934
947
|
"ghost-neutral": [
|
|
935
|
-
"text-neutral-
|
|
936
|
-
"group-focus:text-neutral-
|
|
937
|
-
"group-hover:text-neutral-
|
|
938
|
-
"group-active:text-neutral-
|
|
948
|
+
"text-neutral-500",
|
|
949
|
+
"group-focus:text-neutral-500",
|
|
950
|
+
"group-hover:text-neutral-600",
|
|
951
|
+
"group-active:text-neutral-700",
|
|
939
952
|
],
|
|
940
953
|
filled: [],
|
|
941
954
|
},
|
|
955
|
+
disabled: {
|
|
956
|
+
true: [],
|
|
957
|
+
false: [],
|
|
958
|
+
},
|
|
942
959
|
},
|
|
960
|
+
compoundVariants: [
|
|
961
|
+
{
|
|
962
|
+
variant: "secondary",
|
|
963
|
+
disabled: true,
|
|
964
|
+
className: [
|
|
965
|
+
"text-neutral-400",
|
|
966
|
+
"group-focus:text-neutral-400",
|
|
967
|
+
"group-hover:text-neutral-400",
|
|
968
|
+
"group-active:text-neutral-400",
|
|
969
|
+
],
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
variant: "ghost-neutral",
|
|
973
|
+
disabled: true,
|
|
974
|
+
className: [
|
|
975
|
+
"text-neutral-300",
|
|
976
|
+
"group-focus:text-neutral-300",
|
|
977
|
+
"group-hover:text-neutral-300",
|
|
978
|
+
"group-active:text-neutral-300",
|
|
979
|
+
],
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
variant: "ghost",
|
|
983
|
+
disabled: true,
|
|
984
|
+
className: [
|
|
985
|
+
"text-neutral-300",
|
|
986
|
+
"group-focus:text-neutral-300",
|
|
987
|
+
"group-hover:text-neutral-300",
|
|
988
|
+
"group-active:text-neutral-300",
|
|
989
|
+
],
|
|
990
|
+
},
|
|
991
|
+
],
|
|
943
992
|
defaultVariants: {
|
|
944
993
|
size: "medium",
|
|
945
994
|
variant: "primary",
|
|
995
|
+
disabled: false,
|
|
946
996
|
},
|
|
947
997
|
});
|
|
948
998
|
const cvaIconButton = cvaMerge([], {
|
|
@@ -1022,7 +1072,7 @@ const Button = ({ onClick, children, loading = false, disabled = false, classNam
|
|
|
1022
1072
|
disabled: disabled || loading,
|
|
1023
1073
|
type,
|
|
1024
1074
|
};
|
|
1025
|
-
return (jsxs(Comp, { ...sharedCompProps, ...(asChild ? {} : buttonSpecificProps), children: [loading ? (jsx(Spinner, { centering: "vertically", className: cvaButtonSpinner({ variant }), containerClassName: cvaButtonSpinnerContainer(), size: "small" })) : null, prefix !== null && prefix !== undefined && !loading ? (jsx("div", { className: cvaButtonPrefixSuffix({ size, variant }), children: prefix })) : null, jsx(Slottable, { children: children }), suffix !== null && suffix !== undefined && !loading ? (jsx("div", { className: cvaButtonPrefixSuffix({ size, variant }), children: suffix })) : null] }));
|
|
1075
|
+
return (jsxs(Comp, { ...sharedCompProps, ...(asChild ? {} : buttonSpecificProps), children: [loading ? (jsx(Spinner, { centering: "vertically", className: cvaButtonSpinner({ variant }), containerClassName: cvaButtonSpinnerContainer(), size: "small" })) : null, prefix !== null && prefix !== undefined && !loading ? (jsx("div", { className: cvaButtonPrefixSuffix({ size, variant, disabled: disabled || loading }), children: prefix })) : null, jsx(Slottable, { children: children }), suffix !== null && suffix !== undefined && !loading ? (jsx("div", { className: cvaButtonPrefixSuffix({ size, variant, disabled: disabled || loading }), children: suffix })) : null] }));
|
|
1026
1076
|
};
|
|
1027
1077
|
Button.displayName = "Button";
|
|
1028
1078
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "2.2.18
|
|
3
|
+
"version": "2.2.18",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"migrations": "./migrations.json",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"@floating-ui/react": "^0.26.25",
|
|
15
15
|
"string-ts": "^2.0.0",
|
|
16
16
|
"tailwind-merge": "^2.0.0",
|
|
17
|
-
"@trackunit/ui-design-tokens": "1.13.
|
|
18
|
-
"@trackunit/css-class-variance-utilities": "1.13.
|
|
19
|
-
"@trackunit/shared-utils": "1.15.
|
|
20
|
-
"@trackunit/ui-icons": "1.13.
|
|
17
|
+
"@trackunit/ui-design-tokens": "1.13.74",
|
|
18
|
+
"@trackunit/css-class-variance-utilities": "1.13.75",
|
|
19
|
+
"@trackunit/shared-utils": "1.15.78",
|
|
20
|
+
"@trackunit/ui-icons": "1.13.76",
|
|
21
21
|
"es-toolkit": "^1.39.10",
|
|
22
22
|
"@tanstack/react-virtual": "^3.14.3",
|
|
23
23
|
"dequal": "^2.0.3",
|
|
24
24
|
"fflate": "^0.8.2",
|
|
25
25
|
"superjson": "^2.2.6",
|
|
26
26
|
"zod": "^3.25.76",
|
|
27
|
-
"@trackunit/i18n-library-translation": "2.1.
|
|
27
|
+
"@trackunit/i18n-library-translation": "2.1.16"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "^19.0.0",
|
|
@@ -13,6 +13,7 @@ export declare const cvaButtonSpinner: (props?: ({
|
|
|
13
13
|
export declare const cvaButtonPrefixSuffix: (props?: ({
|
|
14
14
|
size?: "small" | "medium" | "large" | "extraSmall" | null | undefined;
|
|
15
15
|
variant?: "filled" | "primary" | "primary-danger" | "secondary" | "secondary-danger" | "ghost" | "ghost-neutral" | null | undefined;
|
|
16
|
+
disabled?: boolean | null | undefined;
|
|
16
17
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
18
|
export declare const cvaIconButton: (props?: ({
|
|
18
19
|
size?: "small" | "medium" | "large" | null | undefined;
|