diff --git a/package-lock.json b/package-lock.json index 6ff14d2..bd30bdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "clsx": "^2.1.1", "cmdk": "^1.1.1", "dmenu-plus-frontned": "file:", - "framer-motion": "^12.20.1", + "framer-motion": "^12.23.3", "iconsax-react": "^0.0.8", "lucide-react": "^0.525.0", "next": "15.3.4", @@ -4078,13 +4078,13 @@ } }, "node_modules/framer-motion": { - "version": "12.20.1", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.20.1.tgz", - "integrity": "sha512-NW2t2GHQcNvLHq18JyNVY15VKrwru+nkNyhLdqf4MbxbGhxZcSDi68iNcAy6O1nG0yYAQJbLioBIH1Kmg8Xr1g==", + "version": "12.23.3", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.3.tgz", + "integrity": "sha512-llmLkf44zuIZOPSrE4bl4J0UTg6bav+rlKEfMRKgvDMXqBrUtMg6cspoQeRVK3nqRLxTmAJhfGXk39UDdZD7Kw==", "license": "MIT", "dependencies": { - "motion-dom": "^12.20.1", - "motion-utils": "^12.19.0", + "motion-dom": "^12.23.2", + "motion-utils": "^12.23.2", "tslib": "^2.4.0" }, "peerDependencies": { @@ -5418,18 +5418,18 @@ } }, "node_modules/motion-dom": { - "version": "12.20.1", - "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.20.1.tgz", - "integrity": "sha512-XyveLJ9dmQTmaEsP9RlcuoNFxWlRIGdasdPJBB4aOwPr8bRcJdhltudAbiEjRQBmsGD30sjJdaEjhkHsAHapLQ==", + "version": "12.23.2", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.23.2.tgz", + "integrity": "sha512-73j6xDHX/NvVh5L5oS1ouAVnshsvmApOq4F3VZo5MkYSD/YVsVLal4Qp9wvVgJM9uU2bLZyc0Sn8B9c/MMKk4g==", "license": "MIT", "dependencies": { - "motion-utils": "^12.19.0" + "motion-utils": "^12.23.2" } }, "node_modules/motion-utils": { - "version": "12.19.0", - "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.19.0.tgz", - "integrity": "sha512-BuFTHINYmV07pdWs6lj6aI63vr2N4dg0vR+td0rtrdpWOhBzIkEklZyLcvKBoEtwSqx8Jg06vUB5RS0xDiUybw==", + "version": "12.23.2", + "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.23.2.tgz", + "integrity": "sha512-cIEXlBlXAOUyiAtR0S+QPQUM9L3Diz23Bo+zM420NvSd/oPQJwg6U+rT+WRTpp0rizMsBGQOsAwhWIfglUcZfA==", "license": "MIT" }, "node_modules/ms": { diff --git a/package.json b/package.json index 5c56f94..b6c3f85 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "clsx": "^2.1.1", "cmdk": "^1.1.1", "dmenu-plus-frontned": "file:", - "framer-motion": "^12.20.1", + "framer-motion": "^12.23.3", "iconsax-react": "^0.0.8", "lucide-react": "^0.525.0", "next": "15.3.4", diff --git a/src/app/[name]/page.tsx b/src/app/[name]/page.tsx index bfbeeea..076b970 100644 --- a/src/app/[name]/page.tsx +++ b/src/app/[name]/page.tsx @@ -234,7 +234,7 @@ const MenuIndex = () => { - +
{
- +
{sortings.map((v, i) => { return ( diff --git a/src/components/bottomsheet/AnimatedBottomSheet.tsx b/src/components/bottomsheet/AnimatedBottomSheet.tsx index 45fe1db..abbe63c 100644 --- a/src/components/bottomsheet/AnimatedBottomSheet.tsx +++ b/src/components/bottomsheet/AnimatedBottomSheet.tsx @@ -9,7 +9,7 @@ type Props = { const AnimatedBottomSheet = (props: Props) => { return ( - +
- +
{ e.stopPropagation(); }} diff --git a/src/components/overlays/BlurredOverlayContainer.tsx b/src/components/overlays/BlurredOverlayContainer.tsx index bb7d1e8..020dc69 100644 --- a/src/components/overlays/BlurredOverlayContainer.tsx +++ b/src/components/overlays/BlurredOverlayContainer.tsx @@ -1,20 +1,26 @@ 'use client' -import React, { useEffect, useState } from 'react' +import React, { ReactNode, useEffect, useState } from 'react' +import { motion, Variants } from "framer-motion"; +import clsx from 'clsx'; export type BlurredOverlayContainerProps = { visible: boolean - bgOpacity?: string - changeDelay?: string - effectdelay?: string -} & React.DetailedHTMLProps, HTMLDivElement> + bgOpacity?: number + inDelay?: number + outDelay?: number + transitionDelay?: number + children: ReactNode +} & React.ComponentProps const BlurredOverlayContainer = ({ visible = true, - bgOpacity = '30', - changeDelay = '0', - effectdelay = '0', + bgOpacity = 30, + inDelay = 0, + outDelay = 0, + transitionDelay: transitionDelay = 0, children, + className, onClick, ...props }: BlurredOverlayContainerProps) => { @@ -23,34 +29,55 @@ const BlurredOverlayContainer = ({ useEffect(() => { if (visible) { // Show immediately or after delay - const timeout = setTimeout(() => setLoaded(true), +changeDelay) + const timeout = setTimeout(() => setLoaded(true), inDelay) return () => clearTimeout(timeout) } else { // Hide with delay (matches opacity transition duration) - const timeout = setTimeout(() => setLoaded(false), +changeDelay) // 300ms matches Tailwind transition + const timeout = setTimeout(() => setLoaded(false), outDelay) // 300ms matches Tailwind transition return () => clearTimeout(timeout) } - }, [visible, changeDelay]) + }, [visible, inDelay, outDelay]) - const zClass = - visible || loaded ? 'z-50' : !visible && !loaded ? '-z-50' : 'z-0' + const variants: Variants = { + hidden: { + opacity: 0, + transition: { + delay: transitionDelay / 1000, + duration: 0.3, + ease: 'easeInOut', + }, + }, + visible: { + opacity: 1, + transition: { + delay: transitionDelay / 1000, + duration: 0.3, + ease: 'easeInOut', + }, + }, + }; return ( -
{children} -
+ ) }