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
- preffix: n,
923
- suffix: r,
924
- variant: o = "primary",
925
- className: a,
926
- children: i,
927
- loading: l,
928
- iconOnly: c,
929
- dataTestid: u = "button-test-id",
930
- underline: d = !1,
931
- fullWidth: f = !1,
932
- ...m
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 g = () => l ? /* @__PURE__ */ ce.jsx(
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, p = (v) => v ? l ? g() : qf(v, rc(e)) : null, h = () => {
942
- const v = n || r, b = typeof i == "string";
943
- return l && !v ? g() : c ? qf(i, rc(e)) : b ? /* @__PURE__ */ ce.jsx(
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: d,
949
- children: i
949
+ underline: f,
950
+ children: l
950
951
  }
951
- ) : i;
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--${o}`,
960
+ `btn-v2--${a}`,
960
961
  `btn-v2--${e}`,
961
962
  {
962
- "btn-v2--icon-only": c,
963
- [`btn-v2--${o}--${t}`]: t,
964
- "btn-v2--full-width": f
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
- a
968
+ i
967
969
  ),
968
- "data-testid": u,
969
- ...m,
970
+ "data-testid": d,
971
+ ...g,
970
972
  children: [
971
- p(n),
972
- h(),
973
- p(r)
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ctc-component-library",
3
3
  "private": false,
4
- "version": "0.1.100",
4
+ "version": "0.3.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",