bump
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@avocadi/ui",
|
"name": "@avocadi/ui",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.2.13",
|
"version": "0.2.14",
|
||||||
"description": "ui elements for avocadi",
|
"description": "ui elements for avocadi",
|
||||||
"private": false,
|
"private": false,
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
+6
-7
@@ -5,6 +5,10 @@ import { type HTMLMotionProps, motion } from "motion/react";
|
|||||||
import { forwardRef, type HTMLAttributes, type ReactNode } from "react";
|
import { forwardRef, type HTMLAttributes, type ReactNode } from "react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { CardDepthProvider, useCardDepth } from "./card-context";
|
import { CardDepthProvider, useCardDepth } from "./card-context";
|
||||||
|
import {
|
||||||
|
defaultTransitionCard,
|
||||||
|
defaultVariantsCard,
|
||||||
|
} from "./styles/animations";
|
||||||
|
|
||||||
const cardVariants = cva(
|
const cardVariants = cva(
|
||||||
`flex flex-col gap-2 ring-2 rounded-card
|
`flex flex-col gap-2 ring-2 rounded-card
|
||||||
@@ -69,13 +73,8 @@ export const AnimatedCard: React.FC<
|
|||||||
> = (props) => {
|
> = (props) => {
|
||||||
return (
|
return (
|
||||||
<MCard
|
<MCard
|
||||||
variants={{ enter: { scale: 1 }, from: { scale: 0 } }}
|
variants={defaultVariantsCard}
|
||||||
transition={{
|
transition={defaultTransitionCard}
|
||||||
type: "spring",
|
|
||||||
stiffness: 200,
|
|
||||||
damping: 15,
|
|
||||||
mass: 2,
|
|
||||||
}}
|
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Transition, Variants } from "motion";
|
import { stagger, type Transition, type Variants } from "motion";
|
||||||
|
|
||||||
export const defaultTransitionCard: Transition = {
|
export const defaultTransitionCard: Transition = {
|
||||||
type: "spring",
|
type: "spring",
|
||||||
@@ -7,13 +7,16 @@ export const defaultTransitionCard: Transition = {
|
|||||||
mass: 1,
|
mass: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const defaultAnimationStagger = {
|
export const defaultAnimationStagger: {
|
||||||
|
variants: Variants;
|
||||||
|
transition: Transition;
|
||||||
|
} = {
|
||||||
variants: {
|
variants: {
|
||||||
enter: {},
|
enter: {},
|
||||||
from: {},
|
from: {},
|
||||||
},
|
},
|
||||||
transition: {
|
transition: {
|
||||||
staggerChildren: 0.1,
|
delayChildren: stagger(0.1),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user