diff --git a/app/(site)/container.tsx b/app/(site)/container.tsx index 790a0f2..638a5da 100644 --- a/app/(site)/container.tsx +++ b/app/(site)/container.tsx @@ -1,15 +1,14 @@ 'use client'; -import { useEffect, useMemo, useRef } from 'react'; +import { forwardRef, ReactNode, UIEvent, useEffect, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; +import { Virtuoso, VirtuosoProps } from 'react-virtuoso'; import { useAtom } from 'jotai'; import { atomWithStorage } from 'jotai/utils'; -import { ArrowLeft, ArrowRight, SlidersHorizontal } from 'lucide-react'; -import { EffectCoverflow, Virtual } from 'swiper/modules'; -import { Swiper, SwiperProps, SwiperSlide } from 'swiper/react'; +import { SlidersHorizontal } from 'lucide-react'; import Card from '@/components/Movie/Card'; -import Movie from '@/components/Movie/Preview'; +import Preview from '@/components/Movie/Preview'; import { Button } from '@/components/ui/button'; import useMounted from '@/hooks/useMounted'; import useUrlToMagnet from '@/hooks/useUrlToMagnet'; @@ -21,22 +20,88 @@ import useRandomMovie from './useRandomMovie'; const isShowFilterAtom = atomWithStorage('is-show-filters', false); -const slideEffectProps: SwiperProps = { - effect: 'coverflow', - coverflowEffect: { - slideShadows: false, - depth: 200 - }, - virtual: { - addSlidesAfter: 3, - addSlidesBefore: 3 - }, - modules: [EffectCoverflow, Virtual] +const components: VirtuosoProps['components'] = { + Item: (props) =>
, + List: forwardRef(function List(props, ref) { + return ( +
+ ); + }), + Scroller: forwardRef(function Scroller(props, ref) { + return
; + }) +}; + +const Measurer = ({ children }: { children: (width: number) => ReactNode }) => { + const [ref, setRef] = useState(null); + const width = ref?.offsetWidth; + + return ( + <> +
+ {children(width || 0)} + + ); +}; + +const Carousel = ({ + movies, + index = 0, + width: initialWidth, + onIndexChange +}: { + movies?: Movie[]; + width: number; + index: number; + onIndexChange: (index: number) => void; +}) => { + const timeout = useRef(); + const isMobile = matchMedia('(max-width: 500px)').matches; + + const width = isMobile ? initialWidth : 300; + const height = isMobile ? (width * 3) / 2 : 450; + + const handleScroll = (event: UIEvent) => { + clearTimeout(timeout.current); + + timeout.current = setTimeout(() => { + const gap = 8; + const item = event.target as HTMLDivElement; + const itemWidth = item?.clientWidth + gap; + const scrollPosition = item?.scrollLeft; + + const index = Math.round(scrollPosition / itemWidth); + + onIndexChange(index); + }, 50); + }; + + return ( + { + clearTimeout(timeout.current); + + timeout.current = setTimeout(() => { + console.log(index); + // onIndexChange(index); + }, 100); + return ; + }} + /> + ); }; export default function Container() { const [isShowFilter, setIsShowFilter] = useAtom(isShowFilterAtom); - const { ref, hasPrevious, movies, movie, next, previous, index, onDrag, onIndexChange } = useRandomMovie(); + const { movies, movie, index, onIndexChange } = useRandomMovie(); const isMounted = useMounted(); const initialIndex = useRef(index); @@ -48,29 +113,6 @@ export default function Container() { queryClient.prefetchQuery({ queryKey: ['genres'], queryFn: () => genres() }); }, []); - const slides = useMemo( - () => ( - (ref.current = instance)} - lazyPreloadPrevNext={3} - longSwipesRatio={0.2} - speed={500} - initialSlide={initialIndex.current} - onActiveIndexChange={onIndexChange} - onTouchMove={(swiper) => onDrag(swiper)} - className='xs:w-[300px] w-full shrink-0' - {...slideEffectProps} - > - {movies?.map((movie, index) => ( - - - - ))} - - ), - [movies, onDrag, onIndexChange, ref] - ); - return ( <> {isShowFilter && } @@ -86,16 +128,15 @@ export default function Container() { , document.getElementById('actions')! )} - -
- - -
-
+ + {(width) => ( + } + /> + )} +
); diff --git a/app/(site)/useRandomMovie.ts b/app/(site)/useRandomMovie.ts index ce36e7f..1e3e6cb 100644 --- a/app/(site)/useRandomMovie.ts +++ b/app/(site)/useRandomMovie.ts @@ -1,8 +1,7 @@ 'use client'; -import { useCallback, useEffect, useRef, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { useQuery, useQueryClient } from '@tanstack/react-query'; -import { Swiper } from 'swiper/types'; import useFilters from '@/app/(site)/useFilters'; import { randomMovies } from '@/lib/api'; @@ -16,8 +15,6 @@ const useRandomMovie = () => { const { filters } = useFilters(); const indexByFilter = previousIndexes[JSON.stringify(filters)]; const [index, setIndex] = useState(indexByFilter); - const ref = useRef(); - const timeout = useRef(); const { data: movies, refetch } = useQuery({ queryKey: ['random-movie', filters], @@ -42,42 +39,21 @@ const useRandomMovie = () => { setIndex(indexByFilter || 0); }, [indexByFilter]); - const previous = () => ref.current?.slidePrev(); - - const next = () => ref.current?.slideNext(); - return { movies, movie: movies?.[index], hasPrevious: index > 0, onIndexChange: useCallback( - ({ activeIndex }: Swiper) => { - if ((activeIndex && activeIndex % UPDATE_RATE === 0) || movies!.length < UPDATE_RATE) { + (index: number) => { + if ((index && index % UPDATE_RATE === 0) || movies!.length < UPDATE_RATE) { refetch(); } - clearTimeout(timeout.current); - previousIndexes[JSON.stringify(filters)] = activeIndex; - timeout.current = setTimeout(() => { - setIndex(activeIndex); - }, 100); + previousIndexes[JSON.stringify(filters)] = index; + setIndex(index); }, [movies, filters] ), - onDrag: useCallback( - ({ activeIndex }: Swiper) => { - clearTimeout(timeout.current); - timeout.current = setTimeout(() => { - if (index === activeIndex) return; - - setIndex(activeIndex); - }, 100); - }, - [index] - ), - next, - previous, - index, - ref + index }; }; diff --git a/app/layout.tsx b/app/layout.tsx index 62e4b77..0695763 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -27,10 +27,15 @@ export default function RootLayout({ children }: { children: ReactNode }) { + + + -
+
+
+
{children}
diff --git a/components/Header/components/Navigation/index.tsx b/components/Header/components/Navigation/index.tsx index 7445052..b7b1b42 100644 --- a/components/Header/components/Navigation/index.tsx +++ b/components/Header/components/Navigation/index.tsx @@ -1,25 +1,20 @@ 'use client'; -import { useState } from 'react'; import { Menu } from 'lucide-react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; +import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuRadioGroup, - DropdownMenuRadioItem, - DropdownMenuTrigger -} from '@/components/ui/dropdown-menu'; -import { - NavigationMenu, - NavigationMenuItem, - NavigationMenuLink, - NavigationMenuList, - navigationMenuTriggerStyle -} from '@/components/ui/navigation-menu'; + Drawer, + DrawerClose, + DrawerContent, + DrawerDescription, + DrawerHeader, + DrawerTitle, + DrawerTrigger +} from '@/components/ui/drawer'; const paths = [ { path: '/popular', title: 'Popular' }, @@ -27,54 +22,61 @@ const paths = [ { path: '/favorites', title: 'Favorites' } ]; -interface Props { - className?: string; -} - -export function NavigationSmall({ className }: Props) { - const [isOpen, setIsOpen] = useState(false); +export function MobileNavigation() { const currentPath = usePathname(); return ( -
- - +
+ + - - - + + + + + + +
    {paths.map(({ path, title }) => ( - - setIsOpen(false)}> - {title} - - +
  • + + + +
  • ))} - - - +
+
+
); } -export default function Navigation({ className }: Props) { +export function DesktopNavigation() { const currentPath = usePathname(); return ( - - - {paths.map(({ path, title }) => ( - - - - {title} - - - - ))} - - +
    + {paths.map(({ path, title }) => ( +
  • + +
    + {currentPath === path ? ( + + {title} + + ) : ( + title + )} +
    + +
  • + ))} +
); } diff --git a/components/Header/index.tsx b/components/Header/index.tsx index f4f1a80..d1998be 100644 --- a/components/Header/index.tsx +++ b/components/Header/index.tsx @@ -3,23 +3,23 @@ import Link from 'next/link'; import { Badge } from '@/components/ui/badge'; -import Navigation, { NavigationSmall } from './components/Navigation'; +import { DesktopNavigation, MobileNavigation } from './components/Navigation'; import ToggleSearch from './components/Search'; import ToggleTheme from './components/ThemeToggle'; const Header: FC = () => ( -
+
-
+
- Movie advisor + Movie advisor - +
+
-
- +
diff --git a/components/Movie/Card.tsx b/components/Movie/Card.tsx index d2a1823..4401f2e 100644 --- a/components/Movie/Card.tsx +++ b/components/Movie/Card.tsx @@ -1,19 +1,19 @@ import { FC } from 'react'; -import { motion } from 'framer-motion'; import useFavorites, { useFavoritesMutation } from '@/app/(site)/favorites/useFavorites'; import Poster from '@/components/Movie/components/Poster'; import Rating from '@/components/Movie/components/Rating'; import Title from '@/components/Movie/components/Title'; +import { AspectRatio } from '@/components/ui/aspect-ratio'; import { cn } from '@/lib/utils'; interface Props { movie?: Movie; onClick?: () => void; - fit?: boolean; + className?: string; } -const Card: FC = ({ movie, onClick, fit }) => { +const Card: FC = ({ movie, onClick, className }) => { const { add, remove } = useFavoritesMutation(); const { map } = useFavorites(); @@ -24,38 +24,37 @@ const Card: FC = ({ movie, onClick, fit }) => { const handleToggleFavorite = () => (isFavorite ? remove(movie.id) : add(movie)); return ( -
- - - - -
-
-
+
+ +
+
+ +
+
+
{movie.release_date && ( - <span className='flex justify-end text-lg font-semibold'> - {new Date(movie.release_date).getFullYear()} - </span> + <span className='flex justify-end text-lg'>{new Date(movie.release_date).getFullYear()}</span> )} </div> + <div className='opacity-75 mb-[-5px]'> + <Rating + isFavorite={isFavorite} + toggleFavorite={handleToggleFavorite} + rating={movie.vote_average} + iconsFillColor='fill-white' + /> + </div> </div> </div> - <div className='absolute left-0 bottom-0 w-full bg-gradient-to-t from-black to-transparent h-20 text-white p-3 pb-2 flex flex-col justify-end opacity-75'> - <Rating - isFavorite={isFavorite} - toggleFavorite={handleToggleFavorite} - rating={movie.vote_average} - iconsFillColor='fill-white' - /> - </div> - </motion.div> + </AspectRatio> </div> ); }; diff --git a/components/Movie/List.tsx b/components/Movie/List.tsx index 47949df..25227cf 100644 --- a/components/Movie/List.tsx +++ b/components/Movie/List.tsx @@ -1,5 +1,5 @@ -import { FC, Fragment, useLayoutEffect, useMemo, useState } from 'react'; -import { motion } from 'framer-motion'; +import { FC, forwardRef, useMemo } from 'react'; +import { VirtuosoGrid, VirtuosoGridProps } from 'react-virtuoso'; import Card from '@/components/Movie/Card'; import { showPreviewModal } from '@/components/Movie/Preview'; @@ -31,6 +31,18 @@ const item = { } }; +const components: VirtuosoGridProps<Movie, { shows: Movie[]; onClick: (movie: Movie) => void }>['components'] = { + List: forwardRef(function List(props, ref) { + return <div {...props} className='flex gap-3 flex-wrap justify-center grow empty:hidden' ref={ref} />; + }), + Item: ({ context, 'data-index': index }) => { + const { shows, onClick } = context || {}; + const movie = shows?.[index]; + + return <Card movie={movie} onClick={() => onClick?.(movie!)} />; + } +}; + const List: FC<Props> = ({ pages, hasNextPage, @@ -39,27 +51,6 @@ const List: FC<Props> = ({ onPreviewClose, type = 'movie' }) => { - const [loader, setLoader] = useState<HTMLLIElement>(); - - useLayoutEffect(() => { - if (!loader || !hasNextPage) return; - - const observer = new IntersectionObserver( - ([{ isIntersecting }]) => { - if (!isIntersecting) return; - - fetchNextPage?.(); - }, - { - threshold: 1 - } - ); - - observer.observe(loader); - - return () => observer.disconnect(); - }, [fetchNextPage, loader, hasNextPage]); - const shows = useMemo( () => pages?.reduce((shows, page) => { @@ -71,29 +62,26 @@ const List: FC<Props> = ({ if (!shows.length) return null; + const context = { + shows, + onClick: (movie: Movie) => showPreviewModal({ movie, onClose: onPreviewClose, type }) + }; + + const handleFetchMore = () => { + if (!hasNextPage) return; + fetchNextPage?.(); + }; + return ( <> - <motion.ul - className='flex gap-3 flex-wrap justify-center grow empty:hidden' - variants={container} - initial={pages.length === 1 ? 'hidden' : false} - animate='visible' - > - {shows?.map((movie, index, array) => { - const isAnchor = Math.round(array.length / 2) === index; - - return ( - <motion.li - key={movie.id} - variants={item} - className='flex xs:w-auto w-full cursor-pointer' - ref={isAnchor ? (element) => setLoader(element!) : undefined} - > - <Card fit movie={movie} onClick={() => showPreviewModal({ movie, onClose: onPreviewClose, type })} /> - </motion.li> - ); - })} - </motion.ul> + <VirtuosoGrid + useWindowScroll + totalCount={shows.length} + endReached={handleFetchMore} + data={shows} + context={context} + components={components} + /> {withBottomGap && <div className='h-2 w-full' />} </> ); diff --git a/components/Movie/Preview/index.tsx b/components/Movie/Preview/index.tsx index 7fc3e5a..d520dbb 100644 --- a/components/Movie/Preview/index.tsx +++ b/components/Movie/Preview/index.tsx @@ -13,7 +13,6 @@ import Card from '../Card'; import Actions from './components/Actions'; interface Props { - fit?: boolean; movie?: Movie; className?: string; onClose?: () => void; @@ -22,29 +21,27 @@ interface Props { type?: ShowType; } -const Preview: FC<Props> = ({ movie, className, onClose, children, card, fit, type = 'movie' }) => { +const Preview: FC<Props> = ({ movie, className, onClose, children, card, type = 'movie' }) => { if (!movie) return null; return ( <div className={cn('rounded-xl text-card-foreground', { 'p-2': Boolean(onClose) }, className)}> - <div className='flex flex-col lg:flex-row max-w-[100%] gap-2'> - {card || ( - <div className='xs:w-[300px] w-full shrink-0 mx-auto'> - <Card fit={fit} movie={movie} /> - </div> - )} + <div className='flex flex-col md:flex-row max-w-[100%] gap-2'> + {card || <Card className='mx-auto' movie={movie} />} <div className='flex flex-col grow'> {children && <div className='flex hover-none:hidden w-full max-sm:mb-0 mb-2 gap-2'>{children}</div>} <div className='flex w-full gap-2'> <Actions type={type} movie={movie} onClose={onClose} /> </div> <Separator className='my-2' /> - <p key={movie.id} className='leading-7'> + <p key={movie.id} className='leading-7 mb-3'> {movie.overview} </p> + <div className='mt-auto grid grid-cols-1 rounded-lg'> + <Credits type={type} movieId={movie.id} onPersonClick={onClose} /> + </div> </div> </div> - <Credits type={type} movieId={movie.id} onPersonClick={onClose} /> </div> ); }; @@ -52,7 +49,6 @@ const Preview: FC<Props> = ({ movie, className, onClose, children, card, fit, ty export const showPreviewModal = create(({ onResolve, onClose, movie, type = 'movie' }: Props & InstanceProps<void>) => ( <Modal className='block p-0' onClose={onResolve}> <Preview - fit type={type} movie={movie} className='border-none' diff --git a/components/Movie/components/Credits/index.tsx b/components/Movie/components/Credits/index.tsx index f9dcf90..489860d 100644 --- a/components/Movie/components/Credits/index.tsx +++ b/components/Movie/components/Credits/index.tsx @@ -37,42 +37,48 @@ const Credits: FC<Props> = ({ movieId, onPersonClick, type = 'movie' }) => { return ( Boolean(credits?.length) && ( - <div className='overflow-auto no-scrollbar max-w-[100%] py-2 pb-3 mb-[-0.75rem]'> - <motion.ul className='flex gap-3' variants={container} initial='hidden' animate='visible' whileInView='visible'> - {credits?.map((actor) => ( - <motion.li - variants={item} - key={`${actor.id}_${actor.cast_id}`} - title={actor.name} - onTap={() => { - router.push(`/starring?actorId=${actor.id}&title=${encodeURIComponent(actor.name)}`); - onPersonClick?.(actor.id.toString()); - }} - className='p-2 rounded-lg border bg-card text-card-foreground self-end max-w-[150px] w-full shrink-0 cursor-pointer transition-shadow hover:shadow-lg' - > - {Boolean(actor.character) && ( - <p className='pb-2 overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.character}</p> + <motion.ul + className='flex gap-2 no-scrollbar overflow-auto rounded-lg snap-mandatory snap-x' + variants={container} + initial='hidden' + animate='visible' + whileInView='visible' + > + {credits?.map((actor) => ( + <motion.li + variants={item} + key={`${actor.id}_${actor.cast_id}`} + title={actor.name} + onTap={() => { + router.push(`/starring?actorId=${actor.id}&title=${encodeURIComponent(actor.name)}`); + onPersonClick?.(actor.id.toString()); + }} + className='bg-card text-card-foreground self-end max-w-[120px] w-full shrink-0 cursor-pointer transition-shadow hover:shadow-lg relative snap-start' + > + <div className='rounded-lg overflow-hidden'> + {actor.profile_path ? ( + <Image + unoptimized + height={180} + width={120} + src={`https://image.tmdb.org/t/p/w500/${actor.profile_path}`} + alt={actor.name} + /> + ) : ( + <div className='h-[180px] w-[120px] flex items-center justify-center rounded-lg'> + <User2 size={120} strokeWidth={1} /> + </div> )} - <div className='rounded-md overflow-hidden'> - {actor.profile_path ? ( - <Image - unoptimized - height={225} - width={150} - src={`https://image.tmdb.org/t/p/w500/${actor.profile_path}`} - alt={actor.name} - /> - ) : ( - <div className='w-[132px] h-[198px] flex items-center justify-center rounded-lg border'> - <User2 size={120} strokeWidth={1} /> - </div> - )} - </div> - <p className='pt-2 overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.name}</p> - </motion.li> - ))} - </motion.ul> - </div> + </div> + <div className='text-white text-sm absolute w-full h-full top-0 left-0 rounded-md flex flex-col justify-between p-2 py-1 card-gradient'> + <p className=' overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.name}</p> + {Boolean(actor.character) && ( + <p className='overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.character}</p> + )} + </div> + </motion.li> + ))} + </motion.ul> ) ); }; diff --git a/components/Movie/components/Poster/index.tsx b/components/Movie/components/Poster/index.tsx index b1a5d5d..e7ba63b 100644 --- a/components/Movie/components/Poster/index.tsx +++ b/components/Movie/components/Poster/index.tsx @@ -4,19 +4,18 @@ import { ImageOff } from 'lucide-react'; interface Props { title: string; poster: string; - size: number; } -const Poster: FC<Props> = ({ title, poster, size = 250 }) => { +const Poster: FC<Props> = ({ title, poster }) => { return poster ? ( <img - className='rounded-lg w-full h-full object-fill' + className='rounded-lg w-full h-full object-cover' src={`https://image.tmdb.org/t/p/w500/${poster}`} alt={title} /> ) : ( <div className={'w-full flex items-center justify-center rounded-lg grow'}> - <ImageOff size={size} strokeWidth={1} color='hsl(215.4 16.3% 46.9%)' /> + <ImageOff size={100} strokeWidth={1} color='hsl(215.4 16.3% 46.9%)' /> </div> ); }; diff --git a/components/Movie/components/Rating/index.tsx b/components/Movie/components/Rating/index.tsx index dfda653..c9f8ae2 100644 --- a/components/Movie/components/Rating/index.tsx +++ b/components/Movie/components/Rating/index.tsx @@ -26,7 +26,7 @@ const Rating: FC<Props> = ({ isFavorite, rating, toggleFavorite, iconsFillColor </motion.span> <span className='flex items-center'> <Star size={18} className={`mr-1 ${iconsFillColor}`} /> - <span className='font-semibold'>{rating?.toFixed(1)}</span> + <p className='mt-[3px]'>{rating?.toFixed(1)}</p> </span> </span> ); diff --git a/components/ui/aspect-ratio.tsx b/components/ui/aspect-ratio.tsx new file mode 100644 index 0000000..aaabffb --- /dev/null +++ b/components/ui/aspect-ratio.tsx @@ -0,0 +1,7 @@ +'use client'; + +import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio'; + +const AspectRatio = AspectRatioPrimitive.Root; + +export { AspectRatio }; diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsx index ac8de2b..e79cae8 100644 --- a/components/ui/dialog.tsx +++ b/components/ui/dialog.tsx @@ -154,6 +154,9 @@ const Modal: React.FC<{ return ( <Dialog open={open} onOpenChange={handleClose}> + <DialogHeader> + <DialogTitle /> + </DialogHeader> <DialogContent forceMount onClose={handleClose} className={className}> {children} </DialogContent> diff --git a/components/ui/drawer.tsx b/components/ui/drawer.tsx new file mode 100644 index 0000000..00e8218 --- /dev/null +++ b/components/ui/drawer.tsx @@ -0,0 +1,89 @@ +'use client'; + +import * as React from 'react'; +import { Drawer as DrawerPrimitive } from 'vaul'; + +import { cn } from '@/lib/utils'; + +const Drawer = ({ shouldScaleBackground = true, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => ( + <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} /> +); +Drawer.displayName = 'Drawer'; + +const DrawerTrigger = DrawerPrimitive.Trigger; + +const DrawerPortal = DrawerPrimitive.Portal; + +const DrawerClose = DrawerPrimitive.Close; + +const DrawerOverlay = React.forwardRef< + React.ElementRef<typeof DrawerPrimitive.Overlay>, + React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay> +>(({ className, ...props }, ref) => ( + <DrawerPrimitive.Overlay ref={ref} className={cn('fixed inset-0 z-50 bg-black/80', className)} {...props} /> +)); +DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName; + +const DrawerContent = React.forwardRef< + React.ElementRef<typeof DrawerPrimitive.Content>, + React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content> +>(({ className, children, ...props }, ref) => ( + <DrawerPortal> + <DrawerOverlay /> + <DrawerPrimitive.Content + ref={ref} + className={cn( + 'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background', + className + )} + {...props} + > + <div className='mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted' /> + {children} + </DrawerPrimitive.Content> + </DrawerPortal> +)); +DrawerContent.displayName = 'DrawerContent'; + +const DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => ( + <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} /> +); +DrawerHeader.displayName = 'DrawerHeader'; + +const DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => ( + <div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} /> +); +DrawerFooter.displayName = 'DrawerFooter'; + +const DrawerTitle = React.forwardRef< + React.ElementRef<typeof DrawerPrimitive.Title>, + React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title> +>(({ className, ...props }, ref) => ( + <DrawerPrimitive.Title + ref={ref} + className={cn('text-lg font-semibold leading-none tracking-tight', className)} + {...props} + /> +)); +DrawerTitle.displayName = DrawerPrimitive.Title.displayName; + +const DrawerDescription = React.forwardRef< + React.ElementRef<typeof DrawerPrimitive.Description>, + React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description> +>(({ className, ...props }, ref) => ( + <DrawerPrimitive.Description ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} /> +)); +DrawerDescription.displayName = DrawerPrimitive.Description.displayName; + +export { + Drawer, + DrawerClose, + DrawerContent, + DrawerDescription, + DrawerFooter, + DrawerHeader, + DrawerOverlay, + DrawerPortal, + DrawerTitle, + DrawerTrigger +}; diff --git a/components/ui/navigation-menu.tsx b/components/ui/navigation-menu.tsx deleted file mode 100644 index af73e42..0000000 --- a/components/ui/navigation-menu.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import * as React from 'react'; -import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'; -import { cva } from 'class-variance-authority'; -import { ChevronDown } from 'lucide-react'; - -import { cn } from '@/lib/utils'; - -const NavigationMenu = React.forwardRef< - React.ElementRef<typeof NavigationMenuPrimitive.Root>, - React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root> ->(({ className, children, ...props }, ref) => ( - <NavigationMenuPrimitive.Root - ref={ref} - className={cn('relative z-10 flex max-w-max flex-1 items-center justify-center', className)} - {...props} - > - {children} - <NavigationMenuViewport /> - </NavigationMenuPrimitive.Root> -)); -NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName; - -const NavigationMenuList = React.forwardRef< - React.ElementRef<typeof NavigationMenuPrimitive.List>, - React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List> ->(({ className, ...props }, ref) => ( - <NavigationMenuPrimitive.List - ref={ref} - className={cn('group flex flex-1 list-none items-center justify-center space-x-1', className)} - {...props} - /> -)); -NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName; - -const NavigationMenuItem = NavigationMenuPrimitive.Item; - -const navigationMenuTriggerStyle = cva( - 'group inline-flex h-10 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/90 data-[state=open]:bg-accent/50' -); - -const NavigationMenuTrigger = React.forwardRef< - React.ElementRef<typeof NavigationMenuPrimitive.Trigger>, - React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger> ->(({ className, children, ...props }, ref) => ( - <NavigationMenuPrimitive.Trigger - ref={ref} - className={cn(navigationMenuTriggerStyle(), 'group', className)} - {...props} - > - {children}{' '} - <ChevronDown - className='relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180' - aria-hidden='true' - /> - </NavigationMenuPrimitive.Trigger> -)); -NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName; - -const NavigationMenuContent = React.forwardRef< - React.ElementRef<typeof NavigationMenuPrimitive.Content>, - React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content> ->(({ className, ...props }, ref) => ( - <NavigationMenuPrimitive.Content - ref={ref} - className={cn( - 'left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ', - className - )} - {...props} - /> -)); -NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName; - -const NavigationMenuLink = NavigationMenuPrimitive.Link; - -const NavigationMenuViewport = React.forwardRef< - React.ElementRef<typeof NavigationMenuPrimitive.Viewport>, - React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport> ->(({ className, ...props }, ref) => ( - <div className={cn('absolute left-0 top-full flex justify-center')}> - <NavigationMenuPrimitive.Viewport - className={cn( - 'origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]', - className - )} - ref={ref} - {...props} - /> - </div> -)); -NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName; - -const NavigationMenuIndicator = React.forwardRef< - React.ElementRef<typeof NavigationMenuPrimitive.Indicator>, - React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator> ->(({ className, ...props }, ref) => ( - <NavigationMenuPrimitive.Indicator - ref={ref} - className={cn( - 'top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in', - className - )} - {...props} - > - <div className='relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md' /> - </NavigationMenuPrimitive.Indicator> -)); -NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName; - -export { - NavigationMenu, - NavigationMenuContent, - NavigationMenuIndicator, - NavigationMenuItem, - NavigationMenuLink, - NavigationMenuList, - NavigationMenuTrigger, - navigationMenuTriggerStyle, - NavigationMenuViewport -}; diff --git a/components/ui/scroll-area.tsx b/components/ui/scroll-area.tsx deleted file mode 100644 index 7d76676..0000000 --- a/components/ui/scroll-area.tsx +++ /dev/null @@ -1,48 +0,0 @@ -'use client' - -import * as React from 'react' -import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area' - -import { cn } from '@/lib/utils' - -const ScrollArea = React.forwardRef< - React.ElementRef<typeof ScrollAreaPrimitive.Root>, - React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> ->(({ className, children, ...props }, ref) => ( - <ScrollAreaPrimitive.Root - ref={ref} - className={cn('relative overflow-hidden', className)} - {...props} - > - <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]"> - {children} - </ScrollAreaPrimitive.Viewport> - <ScrollBar /> - <ScrollAreaPrimitive.Corner /> - </ScrollAreaPrimitive.Root> -)) -ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName - -const ScrollBar = React.forwardRef< - React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>, - React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> ->(({ className, orientation = 'vertical', ...props }, ref) => ( - <ScrollAreaPrimitive.ScrollAreaScrollbar - ref={ref} - orientation={orientation} - className={cn( - 'flex touch-none select-none transition-colors', - orientation === 'vertical' && - 'h-full w-2.5 border-l border-l-transparent p-[1px]', - orientation === 'horizontal' && - 'h-2.5 border-t border-t-transparent p-[1px]', - className - )} - {...props} - > - <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" /> - </ScrollAreaPrimitive.ScrollAreaScrollbar> -)) -ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName - -export { ScrollArea, ScrollBar } diff --git a/network/server.ts b/network/server.ts index c7a343a..2854fb7 100644 --- a/network/server.ts +++ b/network/server.ts @@ -1,15 +1,23 @@ -import axios, { AxiosResponse } from 'axios'; +class Server { + get<T>(url: string, {params}: { params?: Record<string, unknown> } = {}): Promise<T> { + const base = 'https://api.themoviedb.org/3'; -export const server = axios.create({ - baseURL: 'https://api.themoviedb.org/3', - headers: { - Authorization: `Bearer ${process.env.MOVIE_DB_TOKEN}`, - accept: 'application/json' + const serializedParams = Object.entries(params || {}).reduce((params, [key, value]) => { + if (!['', undefined, null].includes(value as string)) { + params.set(key, value as string); + } + return params; + }, new URLSearchParams()); + + return fetch(`${base}${url}?${serializedParams}`, { + cache: 'force-cache', + headers: { + Authorization: `Bearer ${process.env.MOVIE_DB_TOKEN}`, + } + }).then(response => response.json()); } -}); +} -const handleResponse = (response: AxiosResponse): AxiosResponse['data'] => response.data; - -server.interceptors.response.use(handleResponse); +export const server = new Server(); export default server; diff --git a/package-lock.json b/package-lock.json index 9373b01..8333450 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,8 @@ "name": "movie-advisor", "version": "0.1.0", "dependencies": { - "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-aspect-ratio": "^1.1.0", + "@radix-ui/react-dialog": "^1.1.1", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-hover-card": "^1.0.7", "@radix-ui/react-icons": "^1.3.0", @@ -43,11 +44,12 @@ "react-dom": "^18.2.0", "react-fast-marquee": "^1.6.0", "react-modal-promise": "^1.0.2", + "react-virtuoso": "^4.10.1", "swiper": "^11.0.7", "tailwind-merge": "^1.14.0", "tailwindcss-animate": "^1.0.6", "typescript": "5.1.6", - "vaul": "^0.8.0" + "vaul": "^0.8.9" }, "devDependencies": { "@tailwindcss/aspect-ratio": "^0.4.2", @@ -589,6 +591,81 @@ } } }, + "node_modules/@radix-ui/react-aspect-ratio": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.1.0.tgz", + "integrity": "sha512-dP87DM/Y7jFlPgUZTlhx6FF5CEzOiaxp2rBCKlaXlpH5Ip/9Fg5zZ9lDOQ5o/MOfUlf36eak14zoWYpgcgGoOg==", + "dependencies": { + "@radix-ui/react-primitive": "2.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", + "dependencies": { + "@radix-ui/react-slot": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-collection": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz", @@ -650,31 +727,30 @@ } }, "node_modules/@radix-ui/react-dialog": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz", - "integrity": "sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.1.tgz", + "integrity": "sha512-zysS+iU4YP3STKNS6USvFVqI4qqx8EpiwmT5TuCApVEBca+eRCbONi4EgzfNSuVnOXvC5UPHHMjs8RXO6DH9Bg==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "react-remove-scroll": "2.5.7" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -685,23 +761,55 @@ } } }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.0.tgz", + "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==" + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz", + "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz", - "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz", + "integrity": "sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-escape-keydown": "1.0.3" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-escape-keydown": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -712,21 +820,34 @@ } } }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.0.tgz", + "integrity": "sha512-w6XZNUPVv6xCpZUqb/yN9DL6auvpGX3C/ee6Hdi16v2UUy25HV2Q5bcflsiDyT/g5RwbPQ/GIT1vLkeRb+ITBw==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz", - "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz", + "integrity": "sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -737,19 +858,36 @@ } } }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz", - "integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==", + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz", + "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.1.tgz", + "integrity": "sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g==", + "dependencies": { + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-layout-effect": "1.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -760,6 +898,154 @@ } } }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.0.tgz", + "integrity": "sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", + "dependencies": { + "@radix-ui/react-slot": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", + "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", + "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-escape-keydown": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", + "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", + "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", + "dependencies": { + "react-remove-scroll-bar": "^2.3.4", + "react-style-singleton": "^2.2.1", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.0", + "use-sidecar": "^1.1.2" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-direction": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.1.tgz", @@ -5882,6 +6168,18 @@ } } }, + "node_modules/react-virtuoso": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/react-virtuoso/-/react-virtuoso-4.10.1.tgz", + "integrity": "sha512-vDBt9AarmCjPNshw3VxPXW355ZQKSO0p9vrAJ0pi04TB6aXk+qHWTu8NuaQ3ppcd/Ub1r5ryRA4fJ2QGuH0H0g==", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=16 || >=17 || >= 18", + "react-dom": ">=16 || >=17 || >= 18" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -6904,9 +7202,9 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/vaul": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/vaul/-/vaul-0.8.0.tgz", - "integrity": "sha512-9nUU2jIObJvJZxeQU1oVr/syKo5XqbRoOMoTEt0hHlWify4QZFlqTh6QSN/yxoKzNrMeEQzxbc3XC/vkPLOIqw==", + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/vaul/-/vaul-0.8.9.tgz", + "integrity": "sha512-gpmtmZRWDPP6niQh14JfRIFUYZVyfvAWyA/7rUINOfNlO/2K7uEvI5rLXEXkxZIRFyUZj+TPHLFMirkegPHjrw==", "dependencies": { "@radix-ui/react-dialog": "^1.0.4" }, @@ -7453,6 +7751,38 @@ "@radix-ui/react-primitive": "1.0.3" } }, + "@radix-ui/react-aspect-ratio": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.1.0.tgz", + "integrity": "sha512-dP87DM/Y7jFlPgUZTlhx6FF5CEzOiaxp2rBCKlaXlpH5Ip/9Fg5zZ9lDOQ5o/MOfUlf36eak14zoWYpgcgGoOg==", + "requires": { + "@radix-ui/react-primitive": "2.0.0" + }, + "dependencies": { + "@radix-ui/react-compose-refs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", + "requires": {} + }, + "@radix-ui/react-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", + "requires": { + "@radix-ui/react-slot": "1.1.0" + } + }, + "@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "requires": { + "@radix-ui/react-compose-refs": "1.1.0" + } + } + } + }, "@radix-ui/react-collection": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz", @@ -7482,58 +7812,151 @@ } }, "@radix-ui/react-dialog": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz", - "integrity": "sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.1.tgz", + "integrity": "sha512-zysS+iU4YP3STKNS6USvFVqI4qqx8EpiwmT5TuCApVEBca+eRCbONi4EgzfNSuVnOXvC5UPHHMjs8RXO6DH9Bg==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-context": "1.0.1", - "@radix-ui/react-dismissable-layer": "1.0.5", - "@radix-ui/react-focus-guards": "1.0.1", - "@radix-ui/react-focus-scope": "1.0.4", - "@radix-ui/react-id": "1.0.1", - "@radix-ui/react-portal": "1.0.4", - "@radix-ui/react-presence": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-slot": "1.0.2", - "@radix-ui/react-use-controllable-state": "1.0.1", + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-dismissable-layer": "1.1.0", + "@radix-ui/react-focus-guards": "1.1.0", + "@radix-ui/react-focus-scope": "1.1.0", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-portal": "1.1.1", + "@radix-ui/react-presence": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-slot": "1.1.0", + "@radix-ui/react-use-controllable-state": "1.1.0", "aria-hidden": "^1.1.1", - "react-remove-scroll": "2.5.5" + "react-remove-scroll": "2.5.7" }, "dependencies": { + "@radix-ui/primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.0.tgz", + "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==" + }, + "@radix-ui/react-compose-refs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", + "requires": {} + }, + "@radix-ui/react-context": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz", + "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==", + "requires": {} + }, "@radix-ui/react-dismissable-layer": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.5.tgz", - "integrity": "sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz", + "integrity": "sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.1", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1", - "@radix-ui/react-use-escape-keydown": "1.0.3" + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0", + "@radix-ui/react-use-escape-keydown": "1.1.0" } }, + "@radix-ui/react-focus-guards": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.0.tgz", + "integrity": "sha512-w6XZNUPVv6xCpZUqb/yN9DL6auvpGX3C/ee6Hdi16v2UUy25HV2Q5bcflsiDyT/g5RwbPQ/GIT1vLkeRb+ITBw==", + "requires": {} + }, "@radix-ui/react-focus-scope": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.0.4.tgz", - "integrity": "sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz", + "integrity": "sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.1", - "@radix-ui/react-primitive": "1.0.3", - "@radix-ui/react-use-callback-ref": "1.0.1" + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-callback-ref": "1.1.0" + } + }, + "@radix-ui/react-id": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz", + "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==", + "requires": { + "@radix-ui/react-use-layout-effect": "1.1.0" } }, "@radix-ui/react-portal": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.4.tgz", - "integrity": "sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.1.tgz", + "integrity": "sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g==", "requires": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-primitive": "1.0.3" + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-layout-effect": "1.1.0" + } + }, + "@radix-ui/react-presence": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.0.tgz", + "integrity": "sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ==", + "requires": { + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0" + } + }, + "@radix-ui/react-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", + "requires": { + "@radix-ui/react-slot": "1.1.0" + } + }, + "@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "requires": { + "@radix-ui/react-compose-refs": "1.1.0" + } + }, + "@radix-ui/react-use-callback-ref": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", + "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==", + "requires": {} + }, + "@radix-ui/react-use-controllable-state": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz", + "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==", + "requires": { + "@radix-ui/react-use-callback-ref": "1.1.0" + } + }, + "@radix-ui/react-use-escape-keydown": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz", + "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==", + "requires": { + "@radix-ui/react-use-callback-ref": "1.1.0" + } + }, + "@radix-ui/react-use-layout-effect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "requires": {} + }, + "react-remove-scroll": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", + "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", + "requires": { + "react-remove-scroll-bar": "^2.3.4", + "react-style-singleton": "^2.2.1", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.0", + "use-sidecar": "^1.1.2" } } } @@ -10824,6 +11247,12 @@ "tslib": "^2.0.0" } }, + "react-virtuoso": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/react-virtuoso/-/react-virtuoso-4.10.1.tgz", + "integrity": "sha512-vDBt9AarmCjPNshw3VxPXW355ZQKSO0p9vrAJ0pi04TB6aXk+qHWTu8NuaQ3ppcd/Ub1r5ryRA4fJ2QGuH0H0g==", + "requires": {} + }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -11493,9 +11922,9 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "vaul": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/vaul/-/vaul-0.8.0.tgz", - "integrity": "sha512-9nUU2jIObJvJZxeQU1oVr/syKo5XqbRoOMoTEt0hHlWify4QZFlqTh6QSN/yxoKzNrMeEQzxbc3XC/vkPLOIqw==", + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/vaul/-/vaul-0.8.9.tgz", + "integrity": "sha512-gpmtmZRWDPP6niQh14JfRIFUYZVyfvAWyA/7rUINOfNlO/2K7uEvI5rLXEXkxZIRFyUZj+TPHLFMirkegPHjrw==", "requires": { "@radix-ui/react-dialog": "^1.0.4" } diff --git a/package.json b/package.json index 09a8318..d012dd6 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "lint": "next lint" }, "dependencies": { - "@radix-ui/react-dialog": "^1.0.5", + "@radix-ui/react-aspect-ratio": "^1.1.0", + "@radix-ui/react-dialog": "^1.1.1", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-hover-card": "^1.0.7", "@radix-ui/react-icons": "^1.3.0", @@ -44,11 +45,11 @@ "react-dom": "^18.2.0", "react-fast-marquee": "^1.6.0", "react-modal-promise": "^1.0.2", - "swiper": "^11.0.7", + "react-virtuoso": "^4.10.1", "tailwind-merge": "^1.14.0", "tailwindcss-animate": "^1.0.6", "typescript": "5.1.6", - "vaul": "^0.8.0" + "vaul": "^0.8.9" }, "devDependencies": { "@tailwindcss/aspect-ratio": "^0.4.2", diff --git a/styles/index.css b/styles/index.css index f15a45d..fc6342f 100644 --- a/styles/index.css +++ b/styles/index.css @@ -101,4 +101,50 @@ -moz-user-select: none; -ms-user-select: none; user-select: none; + font-family: 'Poppins', sans-serif; + font-optical-sizing: auto; + font-weight: 400; + font-style: normal; +} + +/* html { + scroll-padding-top: 62px; + scroll-snap-type: y mandatory; +} */ + +.card-gradient { + background: linear-gradient( + rgba(0, 0, 0, 0.4) 0%, + rgba(0, 0, 0, 0.396) 2.83%, + rgba(0, 0, 0, 0.384) 5.67%, + rgba(0, 0, 0, 0.37) 8.5%, + rgba(0, 0, 0, 0.34) 11.33%, + rgba(0, 0, 0, 0.306) 14.17%, + rgba(0, 0, 0, 0.267) 17%, + rgba(0, 0, 0, 0.224) 19.83%, + rgba(0, 0, 0, 0.176) 22.67%, + rgba(0, 0, 0, 0.133) 25.5%, + rgba(0, 0, 0, 0.094) 28.33%, + rgba(0, 0, 0, 0.06) 31.17%, + rgba(0, 0, 0, 0.03) 34%, + rgba(0, 0, 0, 0.016) 36.83%, + rgba(0, 0, 0, 0.004) 39.67%, + rgba(0, 0, 0, 0) 42.5%, + rgba(0, 0, 0, 0) 57.5%, + rgba(0, 0, 0, 0.004) 60.33%, + rgba(0, 0, 0, 0.016) 63.17%, + rgba(0, 0, 0, 0.03) 66%, + rgba(0, 0, 0, 0.06) 68.83%, + rgba(0, 0, 0, 0.094) 71.67%, + rgba(0, 0, 0, 0.133) 74.5%, + rgba(0, 0, 0, 0.176) 77.33%, + rgba(0, 0, 0, 0.224) 80.17%, + rgba(0, 0, 0, 0.267) 83%, + rgba(0, 0, 0, 0.306) 85.83%, + rgba(0, 0, 0, 0.34) 88.67%, + rgba(0, 0, 0, 0.37) 91.5%, + rgba(0, 0, 0, 0.384) 94.33%, + rgba(0, 0, 0, 0.396) 97.17%, + rgba(0, 0, 0, 0.4) 100% + ); }