@eqtylab/equality 2.2.2 → 2.2.3

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.cts CHANGED
@@ -878,7 +878,7 @@ declare const TruncatedDescription: ({ className, description, maxLength, }: Tru
878
878
 
879
879
  declare const iconVariants: (props?: ({
880
880
  size?: "xs" | "sm" | "md" | "lg" | null | undefined;
881
- background?: "circle" | "square" | "transparent" | null | undefined;
881
+ background?: "square" | "circle" | "transparent" | null | undefined;
882
882
  } & class_variance_authority_types.ClassProp) | undefined) => string;
883
883
  declare const iconElevationVariants: (props?: ({
884
884
  elevation?: string | number | null | undefined;
package/dist/index.d.ts CHANGED
@@ -878,7 +878,7 @@ declare const TruncatedDescription: ({ className, description, maxLength, }: Tru
878
878
 
879
879
  declare const iconVariants: (props?: ({
880
880
  size?: "xs" | "sm" | "md" | "lg" | null | undefined;
881
- background?: "circle" | "square" | "transparent" | null | undefined;
881
+ background?: "square" | "circle" | "transparent" | null | undefined;
882
882
  } & class_variance_authority_types.ClassProp) | undefined) => string;
883
883
  declare const iconElevationVariants: (props?: ({
884
884
  elevation?: string | number | null | undefined;
package/dist/index.js CHANGED
@@ -457,19 +457,25 @@ function Badge({
457
457
  }) {
458
458
  const effectiveIcon = icon ?? (variant ? defaultVariantIcons2[variant] : void 0);
459
459
  const renderClosable = () => {
460
- if (!closeable) return null;
461
- return /* @__PURE__ */ jsx(
462
- Button,
463
- {
464
- type: "button",
465
- variant: "tertiary",
466
- size: "sm",
467
- onClick: handleClosable,
468
- "aria-label": closeLabel,
469
- className: styles7["closable-btn"],
470
- children: /* @__PURE__ */ jsx(XIcon, {})
471
- }
472
- );
460
+ if (closeable && handleClosable) {
461
+ return /* @__PURE__ */ jsx(
462
+ Button,
463
+ {
464
+ type: "button",
465
+ variant: "tertiary",
466
+ size: "sm",
467
+ onPointerDown: (e) => e.stopPropagation(),
468
+ onClick: (e) => {
469
+ e.stopPropagation();
470
+ handleClosable();
471
+ },
472
+ "aria-label": closeLabel,
473
+ className: styles7["closable-btn"],
474
+ children: /* @__PURE__ */ jsx(XIcon, {})
475
+ }
476
+ );
477
+ }
478
+ return null;
473
479
  };
474
480
  const renderChildren = () => {
475
481
  const children = props.children;