diff --git a/client/package-lock.json b/client/package-lock.json index 165d073..2a135fa 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -12,6 +12,7 @@ "axios": "^1.10.0", "chart.js": "^4.5.0", "firebase": "^11.9.1", + "framer-motion": "^12.23.12", "jspdf": "^3.0.1", "jspdf-autotable": "^5.0.2", "lucide-react": "^0.522.0", @@ -3371,6 +3372,33 @@ "node": ">= 6" } }, + "node_modules/framer-motion": { + "version": "12.23.12", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.12.tgz", + "integrity": "sha512-6e78rdVtnBvlEVgu6eFEAgG9v3wLnYEboM8I5O5EXvfKC8gxGQB8wXJdhkMy10iVcn05jl6CNw7/HTsTCfwcWg==", + "license": "MIT", + "dependencies": { + "motion-dom": "^12.23.12", + "motion-utils": "^12.23.6", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -4098,6 +4126,21 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/motion-dom": { + "version": "12.23.12", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.23.12.tgz", + "integrity": "sha512-RcR4fvMCTESQBD/uKQe49D5RUeDOokkGRmz4ceaJKDBgHYtZtntC/s2vLvY38gqGaytinij/yi3hMcWVcEF5Kw==", + "license": "MIT", + "dependencies": { + "motion-utils": "^12.23.6" + } + }, + "node_modules/motion-utils": { + "version": "12.23.6", + "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.23.6.tgz", + "integrity": "sha512-eAWoPgr4eFEOFfg2WjIsMoqJTW6Z8MTUCgn/GZ3VRpClWBdnbjryiA3ZSNLyxCTmCQx4RmYX6jX1iWHbenUPNQ==", + "license": "MIT" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", diff --git a/client/package.json b/client/package.json index 9ef6783..3487298 100644 --- a/client/package.json +++ b/client/package.json @@ -14,6 +14,7 @@ "axios": "^1.10.0", "chart.js": "^4.5.0", "firebase": "^11.9.1", + "framer-motion": "^12.23.12", "jspdf": "^3.0.1", "jspdf-autotable": "^5.0.2", "lucide-react": "^0.522.0", diff --git a/client/src/components/Card.jsx b/client/src/components/Card.jsx index 992c799..fc47166 100644 --- a/client/src/components/Card.jsx +++ b/client/src/components/Card.jsx @@ -1,15 +1,36 @@ +import {motion} from 'framer-motion' export default function Card({ icon, title, description, className = "" }) { return ( -
-
{icon}
+ {icon} + -

{title}

+ + {title} + -

{description}

+ {description} +
-
+ ); } \ No newline at end of file diff --git a/client/src/components/ContactForm.jsx b/client/src/components/ContactForm.jsx index be022ad..4b6ce43 100644 --- a/client/src/components/ContactForm.jsx +++ b/client/src/components/ContactForm.jsx @@ -1,8 +1,39 @@ import { useState } from "react"; import axios from "axios"; import { FaPaperPlane } from "react-icons/fa"; +import { variantsContext } from "../context/motionContext"; +import { useContext } from "react"; +import { AnimatePresence, motion } from "framer-motion"; export default function ContactForm() { + const sharedData = useContext(variantsContext); + const { textvariant} = + sharedData; + + const [showSelect, setShowSelect]=useState(true) + + + + const containerVariant={ + hidden:{heigh:0, opacity:0}, + visible:{heigh:'auto', opacity:1 , + transition:{when:'beforeChildren', delay: 1, duration: 1, ease: "easeOut", + delayChildren:0.4, staggerChildren:0.3, staggerDirection:1 + }, + }, + exit:{heigh:0, opacity:0, + transition:{when:'afterChildren', staggerDirection:-1} + } + } + + const childVariant={ + hidden:{x:-20, opacity:0}, + visible:{x:0, opacity:1, + transition:{ease:'easeOut', duration:0.6} + } + } + + const [formData, setFormData] = useState({ name: "", email: "", @@ -81,20 +112,33 @@ export default function ContactForm() { return (
-

+ Send us a Message -

+
- - +
- - +
- - + +
- - +
- -