ctc-component-library 0.1.100 → 0.3.0
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.es.js
CHANGED
|
@@ -919,36 +919,37 @@ const rc = (e) => ({
|
|
|
919
919
|
}), up = ({
|
|
920
920
|
size: e = "small",
|
|
921
921
|
primaryVariant: t,
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
922
|
+
secondaryVariant: n,
|
|
923
|
+
preffix: r,
|
|
924
|
+
suffix: o,
|
|
925
|
+
variant: a = "primary",
|
|
926
|
+
className: i,
|
|
927
|
+
children: l,
|
|
928
|
+
loading: c,
|
|
929
|
+
iconOnly: u,
|
|
930
|
+
dataTestid: d = "button-test-id",
|
|
931
|
+
underline: f = !1,
|
|
932
|
+
fullWidth: m = !1,
|
|
933
|
+
...g
|
|
933
934
|
}) => {
|
|
934
|
-
const
|
|
935
|
+
const p = () => c ? /* @__PURE__ */ ce.jsx(
|
|
935
936
|
mn,
|
|
936
937
|
{
|
|
937
938
|
iconName: "progress_activity",
|
|
938
939
|
customClassName: "btn-v2__loader",
|
|
939
940
|
size: rc(e)
|
|
940
941
|
}
|
|
941
|
-
) : null,
|
|
942
|
-
const
|
|
943
|
-
return
|
|
942
|
+
) : null, h = (b) => b ? c ? p() : qf(b, rc(e)) : null, v = () => {
|
|
943
|
+
const b = r || o, y = typeof l == "string";
|
|
944
|
+
return c && !b ? p() : u ? qf(l, rc(e)) : y ? /* @__PURE__ */ ce.jsx(
|
|
944
945
|
Ut,
|
|
945
946
|
{
|
|
946
947
|
variant: Bx(e),
|
|
947
948
|
className: "btn__text",
|
|
948
|
-
underline:
|
|
949
|
-
children:
|
|
949
|
+
underline: f,
|
|
950
|
+
children: l
|
|
950
951
|
}
|
|
951
|
-
) :
|
|
952
|
+
) : l;
|
|
952
953
|
};
|
|
953
954
|
return /* @__PURE__ */ ce.jsxs(
|
|
954
955
|
"button",
|
|
@@ -956,21 +957,22 @@ const rc = (e) => ({
|
|
|
956
957
|
type: "button",
|
|
957
958
|
className: ee(
|
|
958
959
|
"btn-v2",
|
|
959
|
-
`btn-v2--${
|
|
960
|
+
`btn-v2--${a}`,
|
|
960
961
|
`btn-v2--${e}`,
|
|
961
962
|
{
|
|
962
|
-
"btn-v2--icon-only":
|
|
963
|
-
[`btn-v2--${
|
|
964
|
-
|
|
963
|
+
"btn-v2--icon-only": u,
|
|
964
|
+
[`btn-v2--${a}--${t}`]: t,
|
|
965
|
+
[`btn-v2--${a}--${n}`]: n,
|
|
966
|
+
"btn-v2--full-width": m
|
|
965
967
|
},
|
|
966
|
-
|
|
968
|
+
i
|
|
967
969
|
),
|
|
968
|
-
"data-testid":
|
|
969
|
-
...
|
|
970
|
+
"data-testid": d,
|
|
971
|
+
...g,
|
|
970
972
|
children: [
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
973
|
+
h(r),
|
|
974
|
+
v(),
|
|
975
|
+
h(o)
|
|
974
976
|
]
|
|
975
977
|
}
|
|
976
978
|
);
|
|
@@ -17,9 +17,11 @@ export interface ButtonProps {
|
|
|
17
17
|
onClick?: () => void;
|
|
18
18
|
}
|
|
19
19
|
type PrimaryVariant = 'neutral' | 'success' | 'error' | 'skyblue';
|
|
20
|
+
type SecondaryVariant = 'skyblue';
|
|
20
21
|
export interface ButtonPropsV2 extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
21
22
|
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
22
23
|
primaryVariant?: PrimaryVariant;
|
|
24
|
+
secondaryVariant?: SecondaryVariant;
|
|
23
25
|
size?: 'small' | 'medium' | 'big';
|
|
24
26
|
disabled?: boolean;
|
|
25
27
|
preffix?: React.ReactNode;
|