@sanity/ui 2.0.0-beta.13 → 2.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/ui",
3
- "version": "2.0.0-beta.13",
3
+ "version": "2.0.0-beta.14",
4
4
  "sideEffects": false,
5
5
  "types": "./dist/index.d.ts",
6
6
  "source": "./exports/index.ts",
@@ -134,7 +134,7 @@ export function ToastProvider(props: ToastProviderProps): React.ReactElement {
134
134
  <motion.div
135
135
  animate={{opacity: 1, y: 0, scale: 1}}
136
136
  exit={{opacity: 0, scale: 0.5, transition: {duration: 0.2}}}
137
- initial={{opacity: 0, y: 32, scale: 0.25}}
137
+ initial={{opacity: 0, y: 32, scale: 0.25, willChange: 'transform'}}
138
138
  key={id}
139
139
  layout="position"
140
140
  transition={{type: 'spring', damping: 30, stiffness: 400}}
@@ -99,9 +99,10 @@ export const PopoverCard = memo(
99
99
  top: y,
100
100
  width,
101
101
  zIndex,
102
+ willChange: animate ? 'transform' : undefined,
102
103
  ...style,
103
104
  }),
104
- [originX, originY, strategy, style, width, x, y, zIndex],
105
+ [animate, originX, originY, strategy, style, width, x, y, zIndex],
105
106
  )
106
107
 
107
108
  const arrowStyle: CSSProperties = useMemo(
@@ -57,9 +57,10 @@ export const TooltipCard = memo(
57
57
  () => ({
58
58
  originX,
59
59
  originY,
60
+ willChange: animate ? 'transform' : undefined,
60
61
  ...style,
61
62
  }),
62
- [originX, originY, style],
63
+ [animate, originX, originY, style],
63
64
  )
64
65
 
65
66
  const arrowStyle: CSSProperties = useMemo(