@janovix/blocks 1.0.0-rc.5 → 1.0.0-rc.6

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.js CHANGED
@@ -9643,6 +9643,12 @@ function AvatarEditor({
9643
9643
  setPosition({ x: 0, y: 0 });
9644
9644
  };
9645
9645
  img.src = imageSource;
9646
+ } else {
9647
+ setImage(null);
9648
+ setImageLoaded(false);
9649
+ setZoom(1);
9650
+ setRotation(0);
9651
+ setPosition({ x: 0, y: 0 });
9646
9652
  }
9647
9653
  }, [imageSource]);
9648
9654
  const generateOutput = useCallback(() => {
@@ -10966,18 +10972,32 @@ function NotificationsWidget({
10966
10972
  const config = typeConfig[notification.type || "info"];
10967
10973
  const Icon = config.icon;
10968
10974
  const hasLink = !!notification.href;
10975
+ const handleClick = () => handleNotificationClick(notification);
10976
+ const handleKeyDown = (e) => {
10977
+ if (e.key === "Enter" || e.key === " ") {
10978
+ e.preventDefault();
10979
+ handleNotificationClick(notification);
10980
+ }
10981
+ };
10982
+ const MotionElement = hasLink ? motion.button : motion.div;
10983
+ const interactionProps = hasLink ? {
10984
+ role: "button",
10985
+ tabIndex: 0,
10986
+ onClick: handleClick,
10987
+ onKeyDown: handleKeyDown
10988
+ } : {};
10969
10989
  return /* @__PURE__ */ jsxs(
10970
- motion.div,
10990
+ MotionElement,
10971
10991
  {
10972
10992
  initial: { opacity: 0, y: -10 },
10973
10993
  animate: { opacity: 1, y: 0 },
10974
10994
  className: cn(
10975
- "relative flex gap-3 px-4 py-3 transition-colors group",
10995
+ "relative flex gap-3 px-4 py-3 transition-colors group w-full text-left border-0 bg-transparent",
10976
10996
  hasLink && "cursor-pointer hover:bg-muted/50",
10977
10997
  !hasLink && "cursor-default",
10978
10998
  !notification.read && "bg-primary/5"
10979
10999
  ),
10980
- onClick: () => handleNotificationClick(notification),
11000
+ ...interactionProps,
10981
11001
  children: [
10982
11002
  /* @__PURE__ */ jsx(
10983
11003
  "div",