UNPKG

flowtoken-next

Version:

![flow token demo](https://nextjs-omega-five-46.vercel.app/demo.gif)

172 lines (155 loc) 2.47 kB
/** * CSS styles converted to JavaScript objects for better compatibility with modern bundlers */ export const animationsStyles = ` @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes blurIn { from { opacity: 0; filter: blur(5px); } to { opacity: 1; filter: blur(0px); } } @keyframes typewriter { from { width: 0; overflow: hidden; } to { width: fit-content; } } @keyframes slideInFromLeft { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0%); opacity: 1; } } @keyframes fadeAndScale { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } } @keyframes colorTransition { from { color: red; } to { color: black; } } @keyframes rotateIn { from { transform: rotate(-360deg); opacity: 0; } to { transform: rotate(0deg); opacity: 1; } } @keyframes bounceIn { 0%, 40%, 80%, 100% { transform: translateY(0); } 20% { transform: translateY(-10%); } 60% { transform: translateY(-5%); } } @keyframes elastic { 0%, 100% { transform: scale(1); } 10% { transform: scale(1.2); } } @keyframes highlight { from { background-color: yellow; } to { background-color: transparent; } } @keyframes blurAndSharpen { from { filter: blur(5px); opacity: 0; } to { filter: blur(0); opacity: 1; } } @keyframes dropIn { from { transform: translateY(-10%); opacity: 0; } to { transform: translateY(0); opacity: 1; } } @keyframes slideUp { from { transform: translateY(10%); opacity: 0; } to { transform: translateY(0); opacity: 1; } } @keyframes wave { from { transform: translateY(0); } 50% { transform: translateY(-10%); } to { transform: translateY(0); } } `; export const customListsStyles = ` .custom-li { list-style-type: disc; animation: var(--marker-animation, fadeIn 1s ease-in-out); margin-left: 20px; } .custom-li::marker { animation: var(--marker-animation, fadeIn 1s ease-in-out); } `; export function injectStyles() { if (typeof document !== 'undefined') { const styleElement = document.createElement('style'); styleElement.textContent = animationsStyles + customListsStyles; document.head.appendChild(styleElement); } }