@eqtylab/equality 2.2.1 → 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.cjs CHANGED
@@ -550,6 +550,7 @@ function Badge({
550
550
  size,
551
551
  closeable,
552
552
  handleClosable,
553
+ closeLabel = "Remove",
553
554
  truncate = false,
554
555
  truncateLength = 50,
555
556
  icon,
@@ -560,17 +561,24 @@ function Badge({
560
561
  }) {
561
562
  const effectiveIcon = icon ?? (variant ? defaultVariantIcons2[variant] : void 0);
562
563
  const renderClosable = () => {
563
- if (closeable && handleClosable)
564
+ if (closeable && handleClosable) {
564
565
  return /* @__PURE__ */ jsxRuntime.jsx(
565
566
  Button,
566
567
  {
568
+ type: "button",
567
569
  variant: "tertiary",
568
570
  size: "sm",
569
- onClick: handleClosable,
571
+ onPointerDown: (e) => e.stopPropagation(),
572
+ onClick: (e) => {
573
+ e.stopPropagation();
574
+ handleClosable();
575
+ },
576
+ "aria-label": closeLabel,
570
577
  className: styles7__default.default["closable-btn"],
571
578
  children: /* @__PURE__ */ jsxRuntime.jsx(XIcon, {})
572
579
  }
573
580
  );
581
+ }
574
582
  return null;
575
583
  };
576
584
  const renderChildren = () => {
@@ -849,6 +857,7 @@ var ResourceBadge = ({
849
857
  display = "both",
850
858
  closeable,
851
859
  handleClosable,
860
+ closeLabel,
852
861
  children
853
862
  }) => {
854
863
  const config = getTypeConfig(type);
@@ -861,6 +870,7 @@ var ResourceBadge = ({
861
870
  variant: null,
862
871
  closeable,
863
872
  handleClosable,
873
+ closeLabel,
864
874
  children: children ?? config.label
865
875
  }
866
876
  );