Merge remote-tracking branch 'upstream/dev' into theme_switcher

This commit is contained in:
Svilen Markov
2025-04-29 18:55:30 +01:00
parent 62e9c32082
commit a68805b55d
116 changed files with 8020 additions and 3095 deletions
+33
View File
@@ -0,0 +1,33 @@
export const easeOutQuint = 'cubic-bezier(0.22, 1, 0.36, 1)';
export function directions(anim, opt, ...dirs) {
return dirs.map(dir => anim({ direction: dir, ...opt }));
}
export function slideFade({
direction = 'left',
fill = 'backwards',
duration = 200,
distance = '1rem',
easing = 'ease',
offset = 0,
}) {
const axis = direction === 'left' || direction === 'right' ? 'X' : 'Y';
const negative = direction === 'left' || direction === 'up' ? '-' : '';
const amount = negative + distance;
return {
keyframes: [
{
offset: offset,
opacity: 0,
transform: `translate${axis}(${amount})`,
}
],
options: {
duration: duration,
easing: easing,
fill: fill,
},
};
}