From c61b1b19bb115015f0cbc40206a0f3f26d8c9739 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Sun, 3 May 2026 18:38:18 +0200 Subject: [PATCH] bump --- package.json | 2 +- src/card.tsx | 13 ++++++------- src/styles/animations.ts | 9 ++++++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index c0dd153..85a12cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@avocadi/ui", "type": "module", - "version": "0.2.13", + "version": "0.2.14", "description": "ui elements for avocadi", "private": false, "files": [ diff --git a/src/card.tsx b/src/card.tsx index 808b855..4563b3c 100644 --- a/src/card.tsx +++ b/src/card.tsx @@ -5,6 +5,10 @@ import { type HTMLMotionProps, motion } from "motion/react"; import { forwardRef, type HTMLAttributes, type ReactNode } from "react"; import { cn } from "@/lib/utils"; import { CardDepthProvider, useCardDepth } from "./card-context"; +import { + defaultTransitionCard, + defaultVariantsCard, +} from "./styles/animations"; const cardVariants = cva( `flex flex-col gap-2 ring-2 rounded-card @@ -69,13 +73,8 @@ export const AnimatedCard: React.FC< > = (props) => { return ( ); diff --git a/src/styles/animations.ts b/src/styles/animations.ts index 72aefb4..eb68e70 100644 --- a/src/styles/animations.ts +++ b/src/styles/animations.ts @@ -1,4 +1,4 @@ -import type { Transition, Variants } from "motion"; +import { stagger, type Transition, type Variants } from "motion"; export const defaultTransitionCard: Transition = { type: "spring", @@ -7,13 +7,16 @@ export const defaultTransitionCard: Transition = { mass: 1, }; -export const defaultAnimationStagger = { +export const defaultAnimationStagger: { + variants: Variants; + transition: Transition; +} = { variants: { enter: {}, from: {}, }, transition: { - staggerChildren: 0.1, + delayChildren: stagger(0.1), }, };