88 faShekelSign ,
99 faLiraSign ,
1010} from '@fortawesome/free-solid-svg-icons' ;
11+ import { cubicBezier , spring } from 'framer-motion' ;
1112import moment from 'moment' ;
1213
1314export const HOST = process . env . NODE_ENV !== 'production' ? 'localhost' : window . location . hostname ;
@@ -325,30 +326,38 @@ export const ANIMATION_FINAL_STATE = { opacity: 1, scale: 1 };
325326export const ANIMATION_TRANSITION = {
326327 duration : COUNTUP_DURATION ,
327328 delay : 0 ,
328- ease : [ 0 , 0.71 , 0.2 , 1.01 ] ,
329+ ease : cubicBezier ( 0 , 0.71 , 0.2 , 1.01 ) ,
329330} ;
330331export const ANIMATION_DELAYED_TRANSITION = {
331332 duration : COUNTUP_DURATION ,
332333 delay : 0.5 ,
333- ease : [ 0 , 0.71 , 0.2 , 1.01 ] ,
334+ ease : cubicBezier ( 0 , 0.71 , 0.2 , 1.01 ) ,
334335} ;
335336
336337export const OPACITY_VARIANTS = { visible : { opacity : 1 } , hidden : { opacity : 0 } } ;
337- export const SPRING_VARIANTS = { type : ' spring' , stiffness : 400 , damping : 25 } ;
338- export const BOUNCY_SPRING_VARIANTS_1 = { type : ' spring' , stiffness : 600 , damping : 20 } ;
339- export const BOUNCY_SPRING_VARIANTS_2 = { type : ' spring' , stiffness : 700 , damping : 10 } ;
340- export const BOUNCY_SPRING_VARIANTS_3 = { type : ' spring' , stiffness : 400 , damping : 8 , delay : 0.2 } ;
341- export const BOUNCY_SPRING_VARIANTS_4 = { type : ' spring' , stiffness : 250 , damping : 15 } ;
338+ export const SPRING_VARIANTS = { type : spring , stiffness : 400 , damping : 25 } ;
339+ export const BOUNCY_SPRING_VARIANTS_1 = { type : spring , stiffness : 600 , damping : 20 } ;
340+ export const BOUNCY_SPRING_VARIANTS_2 = { type : spring , stiffness : 700 , damping : 10 } ;
341+ export const BOUNCY_SPRING_VARIANTS_3 = { type : spring , stiffness : 400 , damping : 8 , delay : 0.2 } ;
342+ export const BOUNCY_SPRING_VARIANTS_4 = { type : spring , stiffness : 250 , damping : 15 } ;
342343export const STAGERRED_SPRING_VARIANTS_1 = {
343344 hidden : { pathLength : 0 , opacity : 0 } ,
344- visible : i => {
345- const delay = 0 + i * 0.5 ;
345+ visible : ( i : number ) => {
346+ const delay = i * 0.5 ;
346347 return {
347348 pathLength : 1 ,
348349 opacity : 1 ,
349350 transition : {
350- pathLength : { delay, type : 'spring' , duration : COUNTUP_DURATION , bounce : 0 } ,
351- opacity : { delay, duration : 0.02 } ,
351+ pathLength : {
352+ delay,
353+ type : spring ,
354+ duration : COUNTUP_DURATION ,
355+ bounce : 0 ,
356+ } ,
357+ opacity : {
358+ delay,
359+ duration : 0.02 ,
360+ } ,
352361 } ,
353362 } ;
354363 } ,
@@ -360,20 +369,20 @@ export const STAGERRED_SPRING_VARIANTS_2 = {
360369 return {
361370 x : 0 ,
362371 transition : {
363- x : { delay, type : ' spring' , stiffness : 700 , damping : 10 } ,
372+ x : { delay, type : spring , stiffness : 700 , damping : 10 } ,
364373 } ,
365374 } ;
366375 } ,
367376} ;
368377
369378export const STAGERRED_SPRING_VARIANTS_3 = {
370379 hidden : { y : - 10 } ,
371- visible : i => {
380+ visible : ( i : number ) => {
372381 const delay = 0 + i * 0.5 ;
373382 return {
374383 y : 0 ,
375384 transition : {
376- y : { delay, type : ' spring' , stiffness : 700 , damping : 4 } ,
385+ y : { delay, type : spring , stiffness : 700 , damping : 4 } ,
377386 } ,
378387 } ;
379388 } ,
@@ -386,7 +395,7 @@ export const STAGERRED_SPRING_VARIANTS_4 = {
386395 return {
387396 opacity : 1 ,
388397 transition : {
389- opacity : { delay, type : ' spring' , stiffness : 500 , damping : 3 } ,
398+ opacity : { delay, type : spring , stiffness : 500 , damping : 3 } ,
390399 } ,
391400 } ;
392401 } ,
@@ -403,4 +412,4 @@ export const STAGERRED_COLOR_DRAIN = {
403412 } ,
404413 } ;
405414 } ,
406- } ;
415+ } as const ;
0 commit comments