Skip to content

Commit

Permalink
chore(deps): update dependency framer-motion to v11.15.0 (#8084)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Espen Hovlandsdal <[email protected]>
  • Loading branch information
renovate[bot] and rexxars authored Dec 17, 2024
1 parent 04d5aa2 commit 260faec
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 60 deletions.
5 changes: 3 additions & 2 deletions dev/test-studio/components/TranslateExample.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {InfoFilledIcon} from '@sanity/icons'
import {Card, Stack, Text} from '@sanity/ui'
import {forwardRef} from 'react'
import {Translate, useTranslation} from 'sanity'

export function TranslateExample() {
export const TranslateExample = forwardRef(function TranslateExample() {
const {t} = useTranslation('testStudio')
return (
<Card padding={4}>
Expand Down Expand Up @@ -60,4 +61,4 @@ export function TranslateExample() {
</Stack>
</Card>
)
}
})
2 changes: 1 addition & 1 deletion packages/sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
"execa": "^2.0.0",
"exif-component": "^1.0.1",
"form-data": "^4.0.0",
"framer-motion": "11.0.8",
"framer-motion": "11.15.0",
"get-it": "^8.6.5",
"get-random-values-esm": "1.0.2",
"groq-js": "^1.14.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {useTranslation} from '../../../../i18n'
import {CommentDisabledIcon} from '../../../components'
import {commentsLocaleNamespace} from '../../../i18n'

const MotionPopover = styled(motion(Popover))`
const MotionPopover = styled(motion.create(Popover))`
user-select: none;
`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {hasCommentMessageValue} from '../../../helpers'

const POPOVER_FALLBACK_PLACEMENTS: PopoverProps['fallbackPlacements'] = ['bottom', 'top']

const MotionPopover = motion(Popover)
const MotionPopover = motion.create(Popover)

const RootStack = styled(Stack)`
width: 250px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const CursorDot = styled.div`
}
`

const UserBox = styled(motion(Box))(({theme}) => {
const UserBox = styled(motion.create(Box))(({theme}) => {
const radius = getTheme_v2(theme)?.radius[4]

return css`
Expand All @@ -102,7 +102,7 @@ const UserBox = styled(motion(Box))(({theme}) => {
`
})

const UserText = styled(motion(Text))`
const UserText = styled(motion.create(Text))`
color: var(--presence-cursor-fg);
mix-blend-mode: unset;
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const StyledDialog = styled(Dialog)(({theme}: {theme: Theme}) => {
`
})

const MotionFlex = motion(Flex)
const MotionFlex = motion.create(Flex)

interface TreeEditingDialogProps {
onPathFocus: (path: Path) => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const SidebarCard = styled(Card)`
flex-direction: column;
`

const SidebarStack = styled(motion(Stack))`
const SidebarStack = styled(motion.create(Stack))`
overflow-x: hidden;
`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Root = styled(Layer)`
height: 100%;
`

const BackdropMotion = styled(motion(Card))`
const BackdropMotion = styled(motion.create(Card))`
position: absolute;
top: 0;
left: 0;
Expand All @@ -62,7 +62,7 @@ const BackdropMotion = styled(motion(Card))`
background: var(--card-shadow-penumbra-color);
`

const InnerCardMotion = styled(motion(Card))`
const InnerCardMotion = styled(motion.create(Card))`
position: relative;
pointer-events: all;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {useRef, useState} from 'react'
import FocusLock from 'react-focus-lock'
import {styled} from 'styled-components'

import {useTranslation} from '../../../../../i18n'
import {supportsTouch} from '../../../../../util'
import {
POPOVER_INPUT_PADDING,
Expand Down Expand Up @@ -53,7 +52,7 @@ const OVERLAY_VARIANTS: Variants = {

const Y_POSITION = 12 // vh

const MotionOverlay = styled(motion(Card))`
const MotionOverlay = styled(motion.create(Card))`
background-color: var(--card-backdrop-color);
bottom: 0;
left: 0;
Expand All @@ -62,7 +61,7 @@ const MotionOverlay = styled(motion(Card))`
top: 0;
`

const SearchMotionCard = styled(motion(Card))`
const SearchMotionCard = styled(motion.create(Card))`
display: flex !important;
flex-direction: column;
left: 50%;
Expand All @@ -88,10 +87,9 @@ export function SearchPopover({
}: SearchPopoverProps) {
const [inputElement, setInputElement] = useState<HTMLInputElement | null>(null)

const popoverElement = useRef<HTMLElement | null>(null)
const popoverElement = useRef<HTMLDivElement | null>(null)

const {isTopLayer, zIndex} = useLayer()
const {t} = useTranslation()

const {
onClose: onSearchClose,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const VARIANTS: Variants = {
visible: {opacity: 1, x: 0},
}

const MotionStack = styled(motion(Stack))``
const MotionStack = styled(motion.create(Stack))``

interface TasksActivityLogProps {
onChange: (patch: FormPatch | PatchEvent | FormPatch[]) => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const RootFlex = styled(Flex)(({theme}) => {
`
})

const SidebarMotionLayer = styled(motion(Layer))(({theme}) => {
const SidebarMotionLayer = styled(motion.create(Layer))(({theme}) => {
const media = theme.sanity.media

return css`
Expand Down
52 changes: 10 additions & 42 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 260faec

Please sign in to comment.