Skip to content

Commit

Permalink
upgrade framer
Browse files Browse the repository at this point in the history
  • Loading branch information
SerhiiTsybulskyi committed Jan 16, 2025
1 parent 80ef7de commit a1a6235
Show file tree
Hide file tree
Showing 47 changed files with 116 additions and 46 deletions.
2 changes: 1 addition & 1 deletion docs/blocks/administration/Billing.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';

import { Card } from '../../../src/layout/Card';
import {
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/administration/Pricing.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';

import { toggleTheme, Toggle } from '../../../src/form/Toggle';
import { radioTheme, Radio } from '../../../src/form/Radio';
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/administration/Profile.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';

import {
Block,
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/administration/Team.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';

import { Card } from '../../../src/layout/Card';
import { Tabs, Tab, TabList, TabPanel } from '../../../src/layout/Tabs';
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/authentication/ForgotPassword.story.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import React from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Block, Card, Divider, Stack } from '../../../src/layout';
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/authentication/Login.story.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Controller, useForm } from 'react-hook-form';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';

import { Block, Card, Divider, Stack } from '../../../src/layout';
import { Checkbox, Input } from '../../../src/form';
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/authentication/Mfa.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';

import { Block } from '../../../src/layout/Block';
import { Button } from '../../../src/elements/Button';
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/authentication/Register.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { useForm, Controller } from 'react-hook-form';

import { Block } from '../../../src/layout/Block';
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/foundation/EmptyState.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { Card, Divider } from '../../../src/layout';
import { Button } from '../../../src/elements/Button';
import { Input } from '../../../src/form/Input';
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/foundation/Support.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { Controller, useForm } from 'react-hook-form';

import { Block, Card } from '../../../src/layout';
Expand Down
2 changes: 1 addition & 1 deletion docs/blocks/foundation/Timeline.story.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import React from 'react';
import {
Avatar,
Expand Down
70 changes: 70 additions & 0 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
"date-fns": "^3.6.0",
"ellipsize": "^0.5.1",
"focus-trap-react": "^10.2.3",
"framer-motion": "^10.16.16",
"fuse.js": "^6.6.2",
"human-format": "^1.2.0",
"motion": "^11.18.0",
"name-initials": "^0.1.3",
"pluralize": "^8.0.0",
"react-fast-compare": "^3.2.2",
Expand Down
2 changes: 1 addition & 1 deletion src/data/Sort/Sort.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, PropsWithChildren, useCallback } from 'react';
import { AnimatePresence, motion } from 'framer-motion';
import { AnimatePresence, motion } from 'motion/react';
import { DownArrowIcon } from './DownArrowIcon';
import { getNextDirection, SortDirection } from './utils';
import { twMerge } from 'tailwind-merge';
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Avatar/Avatar.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Outline.args = {

export const RoundedWithImage = Template.bind({});
RoundedWithImage.args = {
src: 'https://goodcode.us/static/austin-d1a2c5249336c31662b8ee6d4e169b2b.jpg',
src: 'https://i.pravatar.cc/128',
size: 50,
rounded: true
};
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Badge/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, forwardRef, LegacyRef } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { BadgeTheme } from './BadgeTheme';
import { useComponentTheme } from '@/utils';
import { twMerge } from 'tailwind-merge';
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, forwardRef, LegacyRef, useContext } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { ButtonGroupContext } from './ButtonGroupContext';
import { useComponentTheme } from '@/utils';
import { twMerge } from 'tailwind-merge';
Expand Down
2 changes: 1 addition & 1 deletion src/elements/Loader/DotsLoader.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { DotsLoaderTheme } from './DotsLoaderTheme';
import { useComponentTheme } from '@/utils';
import { twMerge } from 'tailwind-merge';
Expand Down
2 changes: 1 addition & 1 deletion src/form/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AnimatePresence, motion } from 'framer-motion';
import { AnimatePresence, motion } from 'motion/react';
import React, { FC, useCallback, useMemo, useState } from 'react';
import { Button } from '@/elements/Button';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/form/Calendar/CalendarDays/CalendarDays.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
isNextWeekEmpty,
isPreviousWeekEmpty
} from '@/form/Calendar/utils';
import { AnimatePresence, motion } from 'framer-motion';
import { AnimatePresence, motion } from 'motion/react';
import { cn, useComponentTheme } from '@/utils';
import { CalendarTheme } from '@/form/Calendar/CalendarTheme';
import { twMerge } from 'tailwind-merge';
Expand Down
2 changes: 1 addition & 1 deletion src/form/Calendar/CalendarRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
sub,
format
} from 'date-fns';
import { AnimatePresence, motion } from 'framer-motion';
import { AnimatePresence, motion } from 'motion/react';
import { Button } from '@/elements';
import { CalendarProps } from './Calendar';
import { CalendarDays } from './CalendarDays';
Expand Down
2 changes: 1 addition & 1 deletion src/form/Calendar/CalendarYears/CalendarYears.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, useMemo } from 'react';
import { AnimatePresence, motion } from 'framer-motion';
import { AnimatePresence, motion } from 'motion/react';
import { Button } from '@/elements';
import { cn, useComponentTheme } from '@/utils';
import { CalendarTheme } from '@/form/Calendar/CalendarTheme';
Expand Down
2 changes: 1 addition & 1 deletion src/form/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, {
ReactNode,
useCallback
} from 'react';
import { motion, useMotionValue, useTransform } from 'framer-motion';
import { motion, useMotionValue, useTransform } from 'motion/react';
import { twMerge } from 'tailwind-merge';
import { CheckboxTheme } from './CheckboxTheme';
import { useComponentTheme } from '@/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/form/Radio/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, {
useContext,
useMemo
} from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { RadioGroupContext } from './RadioGroupContext';
import { cn, useComponentTheme } from '@/utils';
import { RadioTheme } from './RadioTheme';
Expand Down
2 changes: 1 addition & 1 deletion src/form/Range/RangeDouble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React, {
useMemo,
useLayoutEffect
} from 'react';
import { motion, useMotionValue } from 'framer-motion';
import { motion, useMotionValue } from 'motion/react';
import { RangeProps, RangeTooltip } from './RangeTooltip';
import { twMerge } from 'tailwind-merge';
import { cn, useComponentTheme } from '@/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/form/Range/RangeSingle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React, {
FC,
useMemo
} from 'react';
import { motion, useMotionValue } from 'framer-motion';
import { motion, useMotionValue } from 'motion/react';
import { RangeProps, RangeTooltip } from './RangeTooltip';
import { twMerge } from 'tailwind-merge';
import { cn, useComponentTheme } from '@/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/form/Range/RangeTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { AnimatePresence, motion } from 'framer-motion';
import { AnimatePresence, motion } from 'motion/react';
import { RangeTheme } from './RangeTheme';
import { useComponentTheme } from '@/utils';

Expand Down
2 changes: 1 addition & 1 deletion src/form/Select/SelectMenu/SelectMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, Fragment, useCallback } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { SelectOptionProps, SelectValue } from '@/form/Select/SelectOption';
import Highlighter from 'react-highlight-words';
import { GroupOptions, GroupOption } from '@/form/Select/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/form/Toggle/Toggle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, forwardRef, LegacyRef } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { ToggleTheme } from './ToggleTheme';
import { cn, useComponentTheme } from '@/utils';

Expand Down
2 changes: 1 addition & 1 deletion src/layers/Backdrop/Backdrop.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, MouseEvent } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { cn, useComponentTheme } from '@/utils';

import { BackdropTheme } from './BackdropTheme';
Expand Down
2 changes: 1 addition & 1 deletion src/layers/ContextMenu/ContextMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, ReactNode, useState, useCallback, useEffect } from 'react';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { ConnectedOverlay, ConnectedOverlayProps } from '@/utils';
import { useId } from '@/utils';
import FocusTrap from 'focus-trap-react';
Expand Down
2 changes: 1 addition & 1 deletion src/layers/Dialog/Dialog.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { MotionProps } from 'framer-motion';
import { MotionProps } from 'motion/react';
import { Dialog } from './Dialog';
import { useDialog } from './useDialog';
import { Button } from '../../elements';
Expand Down
2 changes: 1 addition & 1 deletion src/layers/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classNames from 'classnames';
import { GlobalOverlay, GlobalOverlayProps } from '@/utils/Overlay';
import { useId, CloneElement } from '@/utils';
import FocusTrap from 'focus-trap-react';
import { motion, MotionProps } from 'framer-motion';
import { motion, MotionProps } from 'motion/react';
import { twMerge } from 'tailwind-merge';
import { DialogHeader, DialogHeaderProps } from './DialogHeader';
import { useComponentTheme } from '@/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/layers/Drawer/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { FC, ReactElement } from 'react';
import FocusTrap from 'focus-trap-react';
import { useId, CloneElement } from '@/utils';
import { GlobalOverlay, GlobalOverlayProps } from '@/utils/Overlay';
import { motion, MotionProps } from 'framer-motion';
import { motion, MotionProps } from 'motion/react';
import { variants } from './variants';
import { DrawerHeader, DrawerHeaderProps } from './DrawerHeader';
import { twMerge } from 'tailwind-merge';
Expand Down
2 changes: 1 addition & 1 deletion src/layers/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MiddlewareState, size } from '@floating-ui/react';
import { ConnectedOverlay, OverlayEvent } from '@/utils/Overlay';
import { Modifiers, Placement } from '@/utils/Position';
import { useId } from '@/utils';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { twMerge } from 'tailwind-merge';
import { MenuTheme } from './MenuTheme';
import { useComponentTheme } from '@/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/layers/Notification/Notification.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC, ReactNode, useCallback, useEffect, useRef } from 'react';
import { NotificationOptions } from './NotificationsContext';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { twMerge } from 'tailwind-merge';
import { NotificationTheme } from './NotificationTheme';
import { useComponentTheme } from '@/utils';
Expand Down
2 changes: 1 addition & 1 deletion src/layers/Notification/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React, {
useMemo,
JSXElementConstructor
} from 'react';
import { AnimatePresence, motion } from 'framer-motion';
import { AnimatePresence, motion } from 'motion/react';
import { twMerge } from 'tailwind-merge';

import { Notification } from './Notification';
Expand Down
2 changes: 1 addition & 1 deletion src/layers/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC, useState, useRef, useEffect, ReactNode } from 'react';
import { ConnectedOverlay, TriggerTypes } from '@/utils/Overlay';
import { Modifiers, Placement, ReferenceObject } from '@/utils/Position';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';
import { twMerge } from 'tailwind-merge';
import { useTooltipState } from './useTooltipState';
import { TooltipTheme } from './TooltipTheme';
Expand Down
2 changes: 1 addition & 1 deletion src/layout/Collapse/Collapse.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import { motion, AnimatePresence } from 'motion/react';
import { CollapseTheme } from './CollapseTheme';
import { useComponentTheme } from '@/utils';
import { twMerge } from 'tailwind-merge';
Expand Down
2 changes: 1 addition & 1 deletion src/layout/Motion/MotionGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, ReactNode } from 'react';
import { HTMLMotionProps, motion } from 'framer-motion';
import { HTMLMotionProps, motion } from 'motion/react';

export const groupVariants = {
initial: {
Expand Down
2 changes: 1 addition & 1 deletion src/layout/Motion/MotionItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, ReactNode } from 'react';
import { HTMLMotionProps, motion } from 'framer-motion';
import { HTMLMotionProps, motion } from 'motion/react';

export const verticalVariant = {
initial: {
Expand Down
2 changes: 1 addition & 1 deletion src/layout/Tabs/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { FC, PropsWithChildren } from 'react';
import { Button } from '@/elements/Button';
import { TabsTheme } from './TabsTheme';
import { useComponentTheme, cn } from '@/utils';
import { motion } from 'framer-motion';
import { motion } from 'motion/react';

export interface TabProps extends PropsWithChildren {
/**
Expand Down
Loading

0 comments on commit a1a6235

Please sign in to comment.