Skip to content

Commit 8b8bb2d

Browse files
committed
feat: animations vanilla extract
1 parent 8265fe9 commit 8b8bb2d

File tree

10 files changed

+297
-51
lines changed

10 files changed

+297
-51
lines changed

.changeset/moody-carrots-drive.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@ultraviolet/ui": major
3+
---
4+
5+
**BREAKING CHANGE** Remove all emotion animation, replace with vanilla-extract animation by default. To use the Emotion animation, add `Emotion` to the name of the animation:
6+
```js
7+
import { fadeIn } from '@ultraviolet/ui' // vanilla-extract animation
8+
import { fadeInEmotion } from '@ultraviolet/ui' // Emotion animation
9+
```

packages/plus/src/components/EstimateCost/Components/components.css.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { theme } from '@ultraviolet/themes'
2-
import { zoomInVanillaExtract } from '@ultraviolet/ui'
2+
import { zoomIn } from '@ultraviolet/ui'
33
import { createVar, style } from '@vanilla-extract/css'
44
import { recipe } from '@vanilla-extract/recipes'
55

@@ -40,7 +40,7 @@ export const estimateCostItemResourceName = recipe({
4040
variants: {
4141
animated: {
4242
true: {
43-
animation: `800ms ${zoomInVanillaExtract}`,
43+
animation: `800ms ${zoomIn}`,
4444
},
4545
},
4646
},
@@ -66,7 +66,7 @@ export const estimateCostResourceName = recipe({
6666
},
6767
isAnimated: {
6868
true: {
69-
animation: `${zoomInVanillaExtract} 800ms`,
69+
animation: `${zoomIn} 800ms`,
7070
},
7171
},
7272
},

packages/plus/src/components/Navigation/components/items.css.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { theme } from '@ultraviolet/themes'
22
import { style, styleVariants } from '@vanilla-extract/css'
33
import { ANIMATION_DURATION } from '../constants'
44
import { shrinkHeight } from '../animations.css'
5-
import { fadeInVanillaExtract } from '@ultraviolet/ui'
5+
import { fadeIn } from '@ultraviolet/ui'
66
import { recipe } from '@vanilla-extract/recipes'
77

88
export const navigationItemMenuContainer = style({ width: 180 })
@@ -236,10 +236,10 @@ export const navigationItemPinnedButton = style({
236236

237237
export const navigationItemAnimatedIcon = styleVariants({
238238
expand: {
239-
animation: `${fadeInVanillaExtract} ${ANIMATION_DURATION}ms ease-in-out`,
239+
animation: `${fadeIn} ${ANIMATION_DURATION}ms ease-in-out`,
240240
},
241241
collapse: {
242-
animation: `${fadeInVanillaExtract} ${ANIMATION_DURATION}ms ease-in-out reverse`,
242+
animation: `${fadeIn} ${ANIMATION_DURATION}ms ease-in-out reverse`,
243243
},
244244
})
245245

packages/ui/src/components/ActionBar/styles.css.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { theme } from '@ultraviolet/themes'
2-
import { fadeInVanillaExtract } from '../../utils'
2+
import { fadeIn } from '../../utils'
33
import { createVar, style } from '@vanilla-extract/css'
44

55
export const rankActionBar = createVar()
@@ -10,7 +10,7 @@ export const stackActionBar = style({
1010
})
1111

1212
export const actionBar = style({
13-
animation: `${fadeInVanillaExtract} 0.2s ease-in-out`,
13+
animation: `${fadeIn} 0.2s ease-in-out`,
1414
backgroundColor: theme.colors.other.elevation.background.fixed,
1515
borderRadius: theme.radii.default,
1616
boxShadow: `${theme.shadows.fixed[0]}, ${theme.shadows.fixed[1]}`,

packages/ui/src/components/Modal/styles.css.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { theme } from '@ultraviolet/themes'
22
import { createVar, style } from '@vanilla-extract/css'
33
import { recipe } from '@vanilla-extract/recipes'
44
import { MODAL_PLACEMENT, MODAL_WIDTH } from './constants'
5-
import { slideFromBottomVanillaExtract } from '../../utils'
5+
import { slideFromBottom } from '../../utils'
66

77
export const topModal = createVar()
88
export const positionModal = createVar()
@@ -96,7 +96,7 @@ export const modal = recipe({
9696
},
9797
animation: {
9898
true: {
99-
animation: `${slideFromBottomVanillaExtract} 0.3s ease-in-out forwards`,
99+
animation: `${slideFromBottom} 0.3s ease-in-out forwards`,
100100
},
101101
},
102102
positivePosition: {

packages/ui/src/components/Status/styles.css.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { theme } from '@ultraviolet/themes'
22
import { recipe } from '@vanilla-extract/recipes'
3-
import { pingVanillaExtract } from '../../utils'
3+
import { ping } from '../../utils'
44
import { SENTIMENTS } from './constant'
55

66
const HEIGHT = '10px'
@@ -39,7 +39,7 @@ export const animatedCircleStatus = recipe({
3939
...baseCircle,
4040
position: 'absolute',
4141
opacity: 0.75,
42-
animation: `${pingVanillaExtract} 1.1s cubic-bezier(0, 0, 0.2, 1) infinite`,
42+
animation: `${ping} 1.1s cubic-bezier(0, 0, 0.2, 1) infinite`,
4343
},
4444
variants: {
4545
sentiment: sentimentsCircleStatus,

packages/ui/src/index.ts

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,61 @@ export {
1111
export {
1212
Breakpoint,
1313
bounce,
14+
bounceEmotion,
1415
down,
1516
fadeIn,
16-
fadeInVanillaExtract,
17+
fadeInEmotion,
1718
fadeOut,
19+
fadeOutEmotion,
1820
flash,
21+
flashEmotion,
1922
getUUID,
2023
normalize,
2124
ping,
22-
pingVanillaExtract,
25+
pingEmotion,
2326
pulse,
27+
pulseEmotion,
2428
quickScaleDown,
29+
quickScaleDownEmotion,
2530
scaleBack,
31+
scaleBackEmotion,
2632
scaleDown,
33+
scaleDownEmotion,
2734
scaleForward,
35+
scaleForwardEmotion,
2836
scaleUp,
37+
scaleUpEmotion,
2938
sketchIn,
39+
sketchInEmotion,
3040
sketchOut,
41+
sketchOutEmotion,
3142
slideDownLarge,
43+
slideDownLargeEmotion,
3244
slideFromBottom,
33-
slideFromBottomVanillaExtract,
45+
slideFromBottomEmotion,
3446
slideFromLeft,
47+
slideFromLeftEmotion,
3548
slideFromRight,
49+
slideFromRightEmotion,
3650
slideFromTop,
51+
slideFromTopEmotion,
3752
slideToBottom,
53+
slideToBottomEmotion,
3854
slideToLeft,
55+
slideToLeftEmotion,
3956
slideToRight,
57+
slideToRightEmotion,
4058
slideToTop,
59+
slideToTopEmotion,
4160
slideUpLarge,
61+
slideUpLargeEmotion,
4262
unfoldIn,
63+
unfoldInEmotion,
4364
unfoldOut,
65+
unfoldOutEmotion,
4466
up,
4567
zoomIn,
46-
zoomInVanillaExtract,
68+
zoomInEmotion,
4769
zoomOut,
70+
zoomOutEmotion,
4871
} from './utils'

packages/ui/src/utils/animationVanillaExtract.css.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)