chore: move animations in tailwind.css

Resolves #25
This commit is contained in:
Benjamin Canac
2024-04-03 17:08:16 +02:00
parent 17c7256864
commit 5f2a9ddc2e
13 changed files with 212 additions and 348 deletions

View File

@@ -1,9 +1,25 @@
export default {
slots: {
content: 'flex items-center gap-1 bg-white dark:bg-gray-900 text-gray-900 dark:text-white shadow rounded ring ring-gray-200 dark:ring-gray-800 h-6 px-2 py-1 text-xs select-none will-change-[transform,opacity] data-[state=delayed-open]:data-[side=top]:animate-[tooltip-down_200ms_ease-out] data-[state=delayed-open]:data-[side=right]:animate-[tooltip-left_200ms_ease-out] data-[state=delayed-open]:data-[side=left]:animate-[tooltip-right_200ms_ease-out] data-[state=delayed-open]:data-[side=bottom]:animate-[tooltip-up_200ms_ease-out]',
content: 'flex items-center gap-1 bg-white dark:bg-gray-900 text-gray-900 dark:text-white shadow rounded ring ring-gray-200 dark:ring-gray-800 h-6 px-2 py-1 text-xs select-none will-change-[transform,opacity]',
arrow: 'fill-gray-200 dark:fill-gray-800',
text: 'truncate',
// eslint-disable-next-line quotes
shortcuts: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['·'] before:mr-0.5`
},
variants: {
side: {
top: {
content: 'data-[state=delayed-open]:animate-[slide-in-from-top-and-fade_200ms_ease-out]'
},
right: {
content: 'data-[state=delayed-open]:animate-[slide-in-from-right-and-fade_200ms_ease-out]'
},
bottom: {
content: 'data-[state=delayed-open]:animate-[slide-in-from-bottom-and-fade_200ms_ease-out]'
},
left: {
content: 'data-[state=delayed-open]:animate-[slide-in-from-left-and-fade_200ms_ease-out]'
}
}
}
}