@idbrnd/design-system 1.12.1 → 1.12.2

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @idbrnd/design-system
2
2
 
3
- ![Version](https://img.shields.io/badge/version-1.12.1-4B5FE1?style=flat-square)
3
+ ![Version](https://img.shields.io/badge/version-1.12.2-4B5FE1?style=flat-square)
4
4
  ![React](https://img.shields.io/badge/React-18.3.1-61DAFB?style=flat-square&logo=react&logoColor=white)
5
5
  ![Vite](https://img.shields.io/badge/Vite-7.3.0-646CFF?style=flat-square&logo=vite&logoColor=white)
6
6
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.9.3-3178C6?style=flat-square&logo=typescript&logoColor=white)
@@ -3,11 +3,12 @@ export type PushBadgeVariant = 'dot' | 'number' | 'info';
3
3
  export interface PushBadgeProps {
4
4
  variant?: PushBadgeVariant;
5
5
  count?: number;
6
+ maxCount?: number;
6
7
  bgColor?: string;
7
8
  color?: string;
8
9
  disabled?: boolean;
9
10
  customStyle?: CSSProperties;
10
11
  className?: string;
11
12
  }
12
- declare function PushBadge({ variant, count, bgColor, color, disabled, customStyle, className }: PushBadgeProps): import("react/jsx-runtime").JSX.Element | null;
13
+ declare function PushBadge({ variant, count, maxCount, bgColor, color, disabled, customStyle, className }: PushBadgeProps): import("react/jsx-runtime").JSX.Element | null;
13
14
  export default PushBadge;
package/dist/index.js CHANGED
@@ -969,21 +969,22 @@ const Hr = "_badge_iiym7_1", Wr = "_dot_iiym7_16", qr = "_number_iiym7_23", Vr =
969
969
  function c0({
970
970
  variant: e = "number",
971
971
  count: t = 1,
972
- bgColor: n,
973
- color: o,
974
- disabled: s = !1,
975
- customStyle: l = {},
976
- className: r
972
+ maxCount: n = 999,
973
+ bgColor: o,
974
+ color: s,
975
+ disabled: l = !1,
976
+ customStyle: r = {},
977
+ className: c
977
978
  }) {
978
- if (s)
979
+ if (l)
979
980
  return null;
980
- const c = t > 999 ? "999+" : t, i = {
981
- ...n ? { backgroundColor: n } : {},
982
- ...o ? { color: o } : {},
983
- ...l
984
- }, d = [on.badge, on[e], r ?? ""].filter(Boolean).join(" ");
985
- return /* @__PURE__ */ T("span", { "data-idb-component": !0, className: d, style: i, children: [
986
- e === "number" ? c : null,
981
+ const i = t > n ? `${n}+` : t, d = {
982
+ ...o ? { backgroundColor: o } : {},
983
+ ...s ? { color: s } : {},
984
+ ...r
985
+ }, p = [on.badge, on[e], c ?? ""].filter(Boolean).join(" ");
986
+ return /* @__PURE__ */ T("span", { "data-idb-component": !0, className: p, style: d, children: [
987
+ e === "number" ? i : null,
987
988
  e === "info" ? "?" : null
988
989
  ] });
989
990
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idbrnd/design-system",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",