@ambuj.bhaskar/react-component-library 0.24.11-alpha → 0.24.13-alpha

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.ts CHANGED
@@ -675,6 +675,7 @@ export declare type ButtonGroupProps = {
675
675
  color?: Color;
676
676
  gap?: CSSstring;
677
677
  width?: CSSstring;
678
+ size?: ButtonProps["size"];
678
679
  };
679
680
 
680
681
  export declare type ButtonProps = HTMLButtonProps & {
@@ -683,6 +684,7 @@ export declare type ButtonProps = HTMLButtonProps & {
683
684
  borderColor?: Color;
684
685
  textColor?: Color;
685
686
  iconColor?: Color;
687
+ iconBackgroundColor?: Color;
686
688
  width?: CSSstring;
687
689
  size?: Size;
688
690
  textSize?: TextSize;
package/dist/index.js CHANGED
@@ -11495,7 +11495,7 @@ const SG = /* @__PURE__ */ Ao(EG), gg = ({
11495
11495
  title: e,
11496
11496
  titleId: t,
11497
11497
  ...n
11498
- }, r) => /* @__PURE__ */ l.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", viewBox: "0 0 24 24", ref: r, "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ l.createElement("title", { id: t }, e) : null, /* @__PURE__ */ l.createElement("path", { fill: "#1F1F1F", d: "M15.529 15.164a.7.7 0 0 0 .442-1.328l-.442 1.328ZM12 13.25h-.7a.7.7 0 0 0 .479.664L12 13.25Zm.7-5.227a.7.7 0 1 0-1.4 0h1.4Zm3.05 6.477.221-.664-3.75-1.25-.221.664-.221.664 3.75 1.25.221-.664ZM12 13.25h.7V8.023h-1.4v5.227h.7ZM22 12h-.7a9.3 9.3 0 0 1-9.3 9.3v1.4c5.91 0 10.7-4.79 10.7-10.7H22ZM12 22v-.7A9.3 9.3 0 0 1 2.7 12H1.3c0 5.91 4.79 10.7 10.7 10.7V22ZM2 12h.7A9.3 9.3 0 0 1 12 2.7V1.3C6.09 1.3 1.3 6.09 1.3 12H2ZM12 2v.7a9.3 9.3 0 0 1 9.3 9.3h1.4c0-5.91-4.79-10.7-10.7-10.7V2Z" })), Aee = Me(pee), vee = ({
11498
+ }, r) => /* @__PURE__ */ l.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", viewBox: "0 0 24 24", ref: r, "aria-labelledby": t, ...n }, e ? /* @__PURE__ */ l.createElement("title", { id: t }, e) : null, /* @__PURE__ */ l.createElement("path", { fill: "currentColor", d: "M15.529 15.164a.7.7 0 0 0 .442-1.328l-.442 1.328ZM12 13.25h-.7a.7.7 0 0 0 .479.664L12 13.25Zm.7-5.227a.7.7 0 1 0-1.4 0h1.4Zm3.05 6.477.221-.664-3.75-1.25-.221.664-.221.664 3.75 1.25.221-.664ZM12 13.25h.7V8.023h-1.4v5.227h.7ZM22 12h-.7a9.3 9.3 0 0 1-9.3 9.3v1.4c5.91 0 10.7-4.79 10.7-10.7H22ZM12 22v-.7A9.3 9.3 0 0 1 2.7 12H1.3c0 5.91 4.79 10.7 10.7 10.7V22ZM2 12h.7A9.3 9.3 0 0 1 12 2.7V1.3C6.09 1.3 1.3 6.09 1.3 12H2ZM12 2v.7a9.3 9.3 0 0 1 9.3 9.3h1.4c0-5.91-4.79-10.7-10.7-10.7V2Z" })), Aee = Me(pee), vee = ({
11499
11499
  title: e,
11500
11500
  titleId: t,
11501
11501
  ...n
@@ -12417,41 +12417,50 @@ const SG = /* @__PURE__ */ Ao(EG), gg = ({
12417
12417
  borderColor: n,
12418
12418
  textColor: r,
12419
12419
  iconColor: o,
12420
+ iconBackgroundColor: i,
12420
12421
  // Size
12421
- width: i,
12422
- size: a = "s",
12423
- textSize: s,
12424
- iconSize: c,
12422
+ width: a,
12423
+ size: s = "s",
12424
+ textSize: c,
12425
+ iconSize: u,
12425
12426
  // Layout
12426
- gap: u = "0.25rem",
12427
- placement: d = "center",
12428
- iconPosition: h = "before",
12427
+ gap: d = "0.25rem",
12428
+ placement: h = "center",
12429
+ iconPosition: C = "before",
12429
12430
  // States
12430
- disabled: C = !1,
12431
- loading: m = !1,
12431
+ disabled: m = !1,
12432
+ loading: A = !1,
12432
12433
  // Content
12433
- content: A,
12434
- icon: v,
12434
+ content: v,
12435
+ icon: p,
12435
12436
  // Other
12436
- className: p,
12437
- ..._
12438
- }) => (c = c ?? G0e[a], s = s ?? Y0e[a], o = o ?? r, i = i ?? "max-content", v && !A && (d = "center", u = "0"), (m || !A) && (d = "center"), /* @__PURE__ */ z.jsx(
12437
+ className: _,
12438
+ ...w
12439
+ }) => (u = u ?? G0e[s], c = c ?? Y0e[s], o = o ?? r, a = a ?? "max-content", p && !v && (h = "center", d = "0"), (A || !v) && (h = "center"), /* @__PURE__ */ z.jsx(
12439
12440
  "button",
12440
12441
  {
12441
- className: `button ${C ? "disabled" : ""} ${e} size_${a} ${h} ${A ? "" : "icon_button"} ${p || ""} text_${s} ${h} ${i === "max-content" ? "hugging" : ""} `,
12442
+ className: `button ${m ? "disabled" : ""} ${e} size_${s} ${C} ${v ? "" : "icon_button"} ${_ || ""} text_${c} ${C} ${a === "max-content" ? "hugging" : ""} `,
12442
12443
  style: {
12443
- justifyContent: d,
12444
- width: i,
12445
- gap: u,
12444
+ justifyContent: h,
12445
+ width: a,
12446
+ gap: d,
12446
12447
  "--c_button_bg": t,
12447
12448
  "--c_button_border": n,
12448
12449
  "--c_button_text": r
12449
12450
  },
12450
- disabled: C || m,
12451
- ..._,
12452
- children: m ? /* @__PURE__ */ z.jsx(Ag, { color: r, size: Q0e[a] }) : /* @__PURE__ */ z.jsxs(z.Fragment, { children: [
12453
- v ? /* @__PURE__ */ z.jsx(mr, { name: v, color: o, size: c }) : /* @__PURE__ */ z.jsx(z.Fragment, {}),
12454
- /* @__PURE__ */ z.jsx("p", { children: A })
12451
+ disabled: m || A,
12452
+ ...w,
12453
+ children: A ? /* @__PURE__ */ z.jsx(Ag, { color: r, size: Q0e[s] }) : /* @__PURE__ */ z.jsxs(z.Fragment, { children: [
12454
+ p ? /* @__PURE__ */ z.jsx(
12455
+ mr,
12456
+ {
12457
+ name: p,
12458
+ color: o,
12459
+ size: u,
12460
+ background: i || "none"
12461
+ }
12462
+ ) : /* @__PURE__ */ z.jsx(z.Fragment, {}),
12463
+ /* @__PURE__ */ z.jsx("p", { children: v })
12455
12464
  ] })
12456
12465
  }
12457
12466
  )), Tb = Lj(
@@ -24937,23 +24946,26 @@ const CPe = ({
24937
24946
  },
24938
24947
  color: r,
24939
24948
  width: o,
24940
- gap: i
24941
- }) => /* @__PURE__ */ z.jsx("div", { className: "button_group", style: { gap: i }, children: e == null ? void 0 : e.map((a, s) => /* @__PURE__ */ z.jsx(
24949
+ size: i = "s",
24950
+ gap: a
24951
+ }) => /* @__PURE__ */ z.jsx("div", { className: "button_group", style: { gap: a }, children: e == null ? void 0 : e.map((s, c) => /* @__PURE__ */ z.jsx(
24942
24952
  _2,
24943
24953
  {
24944
24954
  variant: "primary",
24945
- content: a == null ? void 0 : a.label,
24946
- icon: a == null ? void 0 : a.icon,
24947
- iconPosition: (a == null ? void 0 : a.iconPosition) ?? "before",
24948
- textColor: a == null ? void 0 : a.contentColor,
24949
- iconColor: a == null ? void 0 : a.contentColor,
24950
- onClick: () => n(a.value),
24955
+ content: s == null ? void 0 : s.label,
24956
+ icon: s == null ? void 0 : s.icon,
24957
+ iconPosition: (s == null ? void 0 : s.iconPosition) ?? "before",
24958
+ textColor: s == null ? void 0 : s.contentColor,
24959
+ iconColor: s == null ? void 0 : s.contentColor,
24960
+ onClick: () => n(s.value),
24951
24961
  width: o,
24952
- className: `button_group_button ${s == 0 ? "first" : ""} ${s == e.length - 1 ? "last" : ""} ${a.value == t ? "active" : ""}`,
24962
+ className: `button_group_button ${c == 0 ? "first" : ""} ${c == e.length - 1 ? "last" : ""} ${s.value == t ? "active" : ""}`,
24953
24963
  backgroundColor: r,
24954
- borderColor: r
24964
+ borderColor: r,
24965
+ disabled: s.disabled,
24966
+ size: i
24955
24967
  },
24956
- a.value
24968
+ s.value
24957
24969
  )) });
24958
24970
  /*!
24959
24971
  * @kurkle/color v0.3.4