@geomak/ui 1.6.0 → 1.6.1

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
@@ -775,16 +775,13 @@ var VIEWPORT_CLASSES = {
775
775
  "bottom-center": "fixed bottom-4 left-1/2 flex flex-col-reverse items-center -translate-x-1/2"
776
776
  };
777
777
  function getInitialMotion(pos, reduced) {
778
- if (reduced) return { opacity: 0, x: 0, y: 0, scale: 1 };
779
- const right = pos.endsWith("right");
780
- const left = pos.endsWith("left");
781
- const center = pos.endsWith("center");
778
+ if (reduced) return { opacity: 0, y: 0, scale: 1 };
782
779
  const bottom = pos.startsWith("bottom");
783
780
  return {
784
781
  opacity: 0,
785
- x: right ? 40 : left ? -40 : 0,
786
- y: center ? bottom ? 12 : -12 : 0,
787
- scale: center ? 0.96 : 1
782
+ y: bottom ? 10 : -10,
783
+ // drop in from above (top) or rise from below (bottom)
784
+ scale: 0.94
788
785
  };
789
786
  }
790
787
  function TypeIcon({ type }) {
@@ -827,14 +824,13 @@ function NotificationItem({
827
824
  {
828
825
  layout: true,
829
826
  initial,
830
- animate: { opacity: 1, x: 0, y: 0, scale: 1 },
831
- exit: { ...initial, opacity: 0 },
827
+ animate: { opacity: 1, y: 0, scale: 1 },
828
+ exit: initial,
832
829
  transition: reduced ? { duration: 0 } : {
833
- opacity: { duration: 0.14 },
834
- x: { type: "tween", duration: 0.22, ease: [0.16, 1, 0.3, 1] },
835
- y: { type: "tween", duration: 0.22, ease: [0.16, 1, 0.3, 1] },
836
- scale: { type: "tween", duration: 0.22, ease: [0.16, 1, 0.3, 1] },
837
- layout: { duration: 0.18 }
830
+ opacity: { duration: 0.18 },
831
+ y: { type: "tween", duration: 0.24, ease: [0.16, 1, 0.3, 1] },
832
+ scale: { type: "tween", duration: 0.24, ease: [0.16, 1, 0.3, 1] },
833
+ layout: { duration: 0.2, ease: [0.16, 1, 0.3, 1] }
838
834
  },
839
835
  onMouseEnter: () => setHovered(true),
840
836
  onMouseLeave: () => setHovered(false),