@nation-a/ui 0.10.7 → 0.10.8

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
@@ -10079,6 +10079,12 @@ function P({ size: C = 24, color: n = "currentColor", ...o }) {
10079
10079
  }
10080
10080
  const Tag = React.forwardRef(({ imageSrc, text, onDeleteClick, ...rest }, ref) => {
10081
10081
  const StyledTag = styled(ark.div, tagRecipe);
10082
+ const handleClickDelete = (e) => {
10083
+ e.stopPropagation();
10084
+ if (onDeleteClick) {
10085
+ onDeleteClick();
10086
+ }
10087
+ };
10082
10088
  return /* @__PURE__ */ jsxRuntime.jsxs(StyledTag, { avatar: !!imageSrc, ref, ...rest, children: [
10083
10089
  imageSrc ? /* @__PURE__ */ jsxRuntime.jsx(
10084
10090
  styled.img,
@@ -10089,7 +10095,7 @@ const Tag = React.forwardRef(({ imageSrc, text, onDeleteClick, ...rest }, ref) =
10089
10095
  }
10090
10096
  ) : null,
10091
10097
  text,
10092
- onDeleteClick ? /* @__PURE__ */ jsxRuntime.jsx(P, { size: 12, onClick: onDeleteClick, cursor: "pointer" }) : null
10098
+ onDeleteClick ? /* @__PURE__ */ jsxRuntime.jsx(P, { size: 12, onClick: handleClickDelete, className: css$1({ cursor: "pointer" }) }) : null
10093
10099
  ] });
10094
10100
  });
10095
10101
  Tag.displayName = "Tag";