Skip to content

Commit

Permalink
update to use motion (#12373)
Browse files Browse the repository at this point in the history
  • Loading branch information
esizer authored Dec 27, 2024
1 parent 7e0d653 commit 27ae535
Show file tree
Hide file tree
Showing 21 changed files with 54 additions and 32 deletions.
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"@tanstack/react-table": "^8.20.6",
"dataloader": "^2.2.3",
"date-fns": "^3.6.0",
"framer-motion": "^11.15.0",
"graphql": "^16.10.0",
"lodash": "^4.17.21",
"motion": "^11.15.0",
"react": "^18.3.1",
"react-dom": "^18.2.0",
"react-helmet-async": "^2.0.5",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Context/ContextProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HelmetProvider } from "react-helmet-async";
import { MotionConfig, LazyMotion, domAnimation } from "framer-motion";
import { MotionConfig, LazyMotion, domAnimation } from "motion/react";
import { ReactNode } from "react";

import { AppInsightsProvider } from "@gc-digital-talent/app-insights";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Layout/IAPLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Fragment } from "react";
import { useIntl } from "react-intl";
import { useLocation, Outlet, ScrollRestoration } from "react-router";
import { ApplicationInsights } from "@microsoft/applicationinsights-web";
import { AnimatePresence } from "framer-motion";
import { AnimatePresence } from "motion/react";

import {
NestedLanguageProvider,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useRef, useState } from "react";
import { useIntl } from "react-intl";
import { AnimatePresence, m, usePresence } from "framer-motion";
import { AnimatePresence, m, usePresence } from "motion/react";
import BellAlertIcon from "@heroicons/react/24/outline/BellAlertIcon";
import BellAlertIconSm from "@heroicons/react/20/solid/BellAlertIcon";
import XMarkIcon from "@heroicons/react/20/solid/XMarkIcon";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/SelfDeclaration/CommunityIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AnimatePresence, m } from "framer-motion";
import { AnimatePresence, m } from "motion/react";
import { useFormContext } from "react-hook-form";

import firstNationsOn from "~/assets/img/first-nations-true.webp";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/SpinnerIcon/SpinnerIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { m, useReducedMotion } from "framer-motion";
import { m, useReducedMotion } from "motion/react";
import ArrowPathIcon from "@heroicons/react/20/solid/ArrowPathIcon";

import { IconProps } from "@gc-digital-talent/ui";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/Home/IAPHomePage/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useIntl } from "react-intl";
import { m } from "framer-motion";
import { m } from "motion/react";
import orderBy from "lodash/orderBy";
import { useSearchParams } from "react-router";
import { useQuery } from "urql";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default defineConfig(({ command }) => ({
"@microsoft/applicationinsights-react-js",
"@microsoft/applicationinsights-web",
],
framer: ["framer-motion"],
motion: ["motion"],
graphql: ["@gc-digital-talent/graphql"],
react: ["react", "react-dom"],
router: ["react-router", "react-router"],
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@tiptap/starter-kit": "^2.10.4",
"date-fns": "^3.6.0",
"downshift": "^9.0.8",
"framer-motion": "^11.15.0",
"lodash": "^4.17.21",
"motion": "^11.15.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import get from "lodash/get";
import { useFormContext } from "react-hook-form";
import { useReducedMotion } from "framer-motion";
import { useReducedMotion } from "motion/react";
import { ReactNode, Fragment } from "react";

import Field from "../Field";
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/components/Combobox/Input.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 XMarkIcon from "@heroicons/react/24/outline/XMarkIcon";
import ChevronDownIcon from "@heroicons/react/24/outline/ChevronDownIcon";
import MagnifyingGlassIcon from "@heroicons/react/24/outline/MagnifyingGlassIcon";
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/components/Combobox/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useIntl } from "react-intl";
import CheckIcon from "@heroicons/react/20/solid/CheckIcon";
import ArrowPathIcon from "@heroicons/react/24/solid/ArrowPathIcon";
import { motion, useReducedMotion } from "framer-motion";
import { motion, useReducedMotion } from "motion/react";
import omit from "lodash/omit";
import {
DetailedHTMLProps,
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/components/RadioGroup/RadioGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useFormContext } from "react-hook-form";
import { useReducedMotion } from "framer-motion";
import { useReducedMotion } from "motion/react";
import { ReactNode } from "react";

import Field from "../Field";
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/components/Repeater/Repeater.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { motion, useReducedMotion } from "framer-motion";
import { motion, useReducedMotion } from "motion/react";
import { useIntl } from "react-intl";
import ArrowUpIcon from "@heroicons/react/24/solid/ArrowUpIcon";
import ArrowDownIcon from "@heroicons/react/24/solid/ArrowDownIcon";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LazyMotion, MotionConfig, domAnimation } from "framer-motion";
import { LazyMotion, MotionConfig, domAnimation } from "motion/react";
import isChromatic from "chromatic/isChromatic";
import { StoryFn } from "@storybook/react";

Expand Down
2 changes: 1 addition & 1 deletion packages/storybook-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"@storybook/react": "^8.4.7",
"@urql/core": "^5.1.0",
"chromatic": "^11.20.2",
"framer-motion": "^11.15.0",
"graphql": "^16.10.0",
"lodash": "^4.17.21",
"motion": "^11.15.0",
"react-helmet-async": "^2.0.5",
"react-router": "^7.1.1",
"urql": "^4.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"@radix-ui/react-toggle": "^1.1.1",
"@radix-ui/react-toggle-group": "^1.1.1",
"chromatic": "^11.20.2",
"framer-motion": "^11.15.0",
"lodash": "^4.17.21",
"motion": "^11.15.0",
"react-csv-downloader": "^3.2.0",
"react-dom": "^18.2.0",
"react-focus-lock": "^2.13.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/CardRepeater/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { m, useReducedMotion } from "framer-motion";
import { m, useReducedMotion } from "motion/react";
import { useIntl } from "react-intl";
import ArrowDownIcon from "@heroicons/react/20/solid/ArrowDownIcon";
import ArrowUpIcon from "@heroicons/react/20/solid/ArrowUpIcon";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/Loading/Loading.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { m, useReducedMotion } from "framer-motion";
import { m, useReducedMotion } from "motion/react";
import { HTMLProps, ReactNode } from "react";

export interface LoadingProps extends HTMLProps<HTMLDivElement> {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/NavMenu/NavMenuWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
import FocusLock from "react-focus-lock";
import { m, AnimatePresence, useReducedMotion } from "framer-motion";
import { m, AnimatePresence, useReducedMotion } from "motion/react";
import {
KeyboardEventHandler,
ReactNode,
Expand Down
46 changes: 34 additions & 12 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 27ae535

Please sign in to comment.