Skip to content

Commit

Permalink
feat(tailwind-plugins): added base missing keyframe animations
Browse files Browse the repository at this point in the history
  • Loading branch information
Powerplex committed Aug 25, 2023
1 parent 342255f commit fcfaf65
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 12 deletions.
1 change: 1 addition & 0 deletions package-lock.json

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

58 changes: 46 additions & 12 deletions packages/utils/tailwind-plugins/animations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,47 @@ module.exports = plugin.withOptions(
theme: {
extend: {
keyframes: {
slideTop: {
fadeIn: {
'0%': { opacity: 0 },
'100%': { opacity: 1 },
},
fadeOut: {
'0%': { opacity: 1 },
'100%': { opacity: 0 },
},
// slideIn
slideInTop: {
'0%': { transform: 'translateY(-100%)' },
'100%': { transform: 'translateY(0)' },
},
slideInRight: {
'0%': { transform: 'translateX(100%)' },
'100%': { transform: 'translateX(0)' },
},
slideInBottom: {
'0%': { transform: 'translateY(100%)' },
'100%': { transform: 'translateY(0)' },
},
slideInLeft: {
'0%': { transform: 'translateX(-100%)' },
'100%': { transform: 'translateX(0)' },
},
// slideOut
slideOutTop: {
'0%': { transform: 'translateY(0)' },
'100%': { transform: 'translateY(-100px)' },
'100%': { transform: 'translateY(-100%)' },
},
slideRight: {
slideOutRight: {
'0%': { transform: 'translateX(0)' },
'100%': { transform: 'translateX(100px)' },
'100%': { transform: 'translateX(100%)' },
},
slideBottom: {
slideOutBottom: {
'0%': { transform: 'translateY(0)' },
'100%': { transform: 'translateY(100px)' },
'100%': { transform: 'translateY(100%)' },
},
slideLeft: {
slideOutLeft: {
'0%': { transform: 'translateX(0)' },
'100%': { transform: 'translateX(-100px)' },
'100%': { transform: 'translateX(-100%)' },
},
standaloneIndeterminateBar: {
'0%': {
Expand All @@ -147,10 +173,18 @@ module.exports = plugin.withOptions(
},
},
animation: {
'slide-top': 'slideTop 0.5s ease-in-out',
'slide-right': 'slideRight 0.5s ease-in-out',
'slide-bottom': 'slideBottom 0.5s ease-in-out',
'slide-left': 'slideLeft 0.5s ease-in-out',
'fade-in': 'fadeIn 0.25s cubic-bezier(0.2, 0, 0, 1)',
'fade-out': 'fadeOut 0.25s cubic-bezier(0.2, 0, 0, 1)',
// slideIn
'slide-in-top': 'slideInTop 0.4s cubic-bezier(0.05, 0.7, 0.1, 1)',
'slide-in-right': 'slideInRight 0.4s cubic-bezier(0.05, 0.7, 0.1, 1)',
'slide-in-bottom': 'slideInBottom 0.4s cubic-bezier(0.05, 0.7, 0.1, 1)',
'slide-in-left': 'slideInLeft 0.4s cubic-bezier(0.05, 0.7, 0.1, 1)',
// slideOut
'slide-out-top': 'slideOutTop 0.4s cubic-bezier(0.05, 0.7, 0.1, 1)',
'slide-out-right': 'slideOutRight 0.4s cubic-bezier(0.05, 0.7, 0.1, 1)',
'slide-out-bottom': 'slideOutBottom 0.4s cubic-bezier(0.05, 0.7, 0.1, 1)',
'slide-out-left': 'slideOutLeft 0.4s cubic-bezier(0.05, 0.7, 0.1, 1)',
'standalone-indeterminate-bar':
'standaloneIndeterminateBar 1.5s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite normal none running',
},
Expand Down

0 comments on commit fcfaf65

Please sign in to comment.