Skip to content

Commit

Permalink
framer-motion->motion
Browse files Browse the repository at this point in the history
  • Loading branch information
lerte committed Dec 15, 2024
1 parent 95dae32 commit 1675dfc
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 77 deletions.
2 changes: 1 addition & 1 deletion apps/docs/src/components/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import React from 'react'
import { motion } from 'framer-motion'
import { motion } from 'motion/react'

const Logo = ({ height }: React.ComponentProps<'svg'>) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/views/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { RefObject, useEffect, useRef, useState, useTransition } from 'react'
import DocPreview from '@/components/DocPreview'
import icons from './icons.json'
import { toast } from 'sonner'
import { useInView } from 'framer-motion'
import { useInView } from 'motion/react'

const IconWrapper = ({
children,
Expand Down
3 changes: 1 addition & 2 deletions packages/actify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"es-toolkit": "^1.29.0",
"motion": "12.0.0-alpha.2",
"popmotion": "^11.0.5",
"motion": "^11.14.4",
"react-aria": "^3.36.0",
"react-aria-components": "^1.5.0",
"react-stately": "^3.34.0"
Expand Down
3 changes: 1 addition & 2 deletions packages/actify/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ export default [
external: [
'clsx',
'react',
'motion',
'tslib',
'date-fns',
'react-dom',
'popmotion',
'framer-motion',
'@babel/runtime'
],
plugins: [
Expand Down
4 changes: 1 addition & 3 deletions packages/actify/src/components/Carousel/CarouselContent.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
'use client'

import { AnimatePresence, motion } from 'framer-motion'
import { AnimatePresence, motion, wrap } from 'motion/react'
import React, { Children, isValidElement, useEffect } from 'react'

import { useCarousel } from './CarouselContext'
import { wrap } from 'popmotion'

const variants = {
enter: (direction: number) => {
Expand Down Expand Up @@ -51,7 +50,6 @@ const CarouselContent = ({ children }: React.ComponentProps<'div'>) => {
<AnimatePresence initial={false} custom={direction}>
{Children.map(children, (child, index) => {
if (isValidElement(child)) {
// @ts-expect-error
const MotionComponent = motion(child.type)
if (current == index) {
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/actify/src/components/Field/Field.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SupportingText, SupportingTextProps } from './SupportingText'
import { cubicBezier, motion } from 'framer-motion'
import { cubicBezier, motion } from 'motion/react'

import React from 'react'
import clsx from 'clsx'
Expand Down
2 changes: 1 addition & 1 deletion packages/actify/src/components/Lists/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React, { useId } from 'react'

import { ListContext } from './ListContext'
import { Transition } from 'framer-motion'
import { Transition } from 'motion/react'
import clsx from 'clsx'
import styles from './list.module.css'

Expand Down
2 changes: 1 addition & 1 deletion packages/actify/src/components/Lists/ListContext.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { Transition } from 'framer-motion'
import { Transition } from 'motion/react'
import { createContext } from 'react'

const ListContext = createContext({
Expand Down
2 changes: 1 addition & 1 deletion packages/actify/src/components/Lists/ListGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import React, {
import { Icon } from './../Icon'
import { ListContext } from './ListContext'
import clsx from 'clsx'
import { motion } from 'framer-motion'
import { motion } from 'motion/react'
import styles from './list-group.module.css'

interface ListItemProps extends React.ComponentProps<'li'> {
Expand Down
2 changes: 1 addition & 1 deletion packages/actify/src/components/Lists/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, { useContext, useId, useMemo, useState } from 'react'
import { ListContext } from './ListContext'
import { Ripple } from './../Ripple'
import clsx from 'clsx'
import { motion } from 'framer-motion'
import { motion } from 'motion/react'
import styles from './list-item.module.css'

interface ListItemProps extends React.ComponentProps<'li'> {
Expand Down
2 changes: 1 addition & 1 deletion packages/actify/src/components/Menus/MenuPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from 'react-aria-components'

import React from 'react'
import { motion } from 'framer-motion'
import { motion } from 'motion/react'
import styles from './menu-popover.module.css'

export interface PopoverProps extends Omit<AriaPopoverProps, 'children'> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { AnimatePresence, motion } from 'framer-motion'
import { AnimatePresence, motion } from 'motion/react'
import React, { useEffect, useState } from 'react'

import clsx from 'clsx'
Expand Down
2 changes: 1 addition & 1 deletion packages/actify/src/components/Tooltips/TooltipGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { createContext, useId } from 'react'

import { LayoutGroup } from 'framer-motion'
import { LayoutGroup } from 'motion/react'
import { Placement } from 'react-aria'

export const TooltipGroupContext = createContext<{
Expand Down
94 changes: 34 additions & 60 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1675dfc

Please sign in to comment.