Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
package.dist.prod.animations.slideUp.js.map Maven / Gradle / Ivy
{
"version": 3,
"sources": ["../../../src/animations/slideUp.ts"],
"sourcesContent": ["import animate, { duration } from \"./animate.js\";\n\nconst slideUp = (element: HTMLElement) => {\n\t// Get Computed styles\n\tlet computedStyles: CSSStyleDeclaration,\n\t\tpaddingTop: number,\n\t\tpaddingBottom: number,\n\t\tmarginTop: number,\n\t\tmarginBottom: number,\n\t\theight: number;\n\n\t// Store inline styles\n\tlet storedOverflow: string,\n\t\tstoredPaddingTop: string,\n\t\tstoredPaddingBottom: string,\n\t\tstoredMarginTop: string,\n\t\tstoredMarginBottom: string,\n\t\tstoredHeight: string;\n\n\tconst animation = animate({\n\t\tbeforeStart: () => {\n\t\t\t// Get Computed styles\n\t\t\tconst el = element;\n\t\t\tcomputedStyles = getComputedStyle(el);\n\t\t\tpaddingTop = parseFloat(computedStyles.paddingTop);\n\t\t\tpaddingBottom = parseFloat(computedStyles.paddingBottom);\n\t\t\tmarginTop = parseFloat(computedStyles.marginTop);\n\t\t\tmarginBottom = parseFloat(computedStyles.marginBottom);\n\t\t\theight = parseFloat(computedStyles.height);\n\n\t\t\t// Store inline styles\n\t\t\tstoredOverflow = el.style.overflow;\n\t\t\tstoredPaddingTop = el.style.paddingTop;\n\t\t\tstoredPaddingBottom = el.style.paddingBottom;\n\t\t\tstoredMarginTop = el.style.marginTop;\n\t\t\tstoredMarginBottom = el.style.marginBottom;\n\t\t\tstoredHeight = el.style.height;\n\n\t\t\tel.style.overflow = \"hidden\";\n\t\t},\n\t\tduration,\n\t\telement,\n\t\tadvance: progress => {\n\t\t\telement.style.paddingTop = `${paddingTop - (paddingTop * progress)}px`;\n\t\t\telement.style.paddingBottom = `${paddingBottom - (paddingBottom * progress)}px`;\n\t\t\telement.style.marginTop = `${marginTop - (marginTop * progress)}px`;\n\t\t\telement.style.marginBottom = `${marginBottom - (marginBottom * progress)}px`;\n\t\t\telement.style.height = `${height - (height * progress)}px`;\n\t\t},\n\t});\n\n\tanimation.promise().then(reason => {\n\t\tif (!(reason instanceof Error)) {\n\t\t\telement.style.overflow = storedOverflow;\n\t\t\telement.style.paddingTop = storedPaddingTop;\n\t\t\telement.style.paddingBottom = storedPaddingBottom;\n\t\t\telement.style.marginTop = storedMarginTop;\n\t\t\telement.style.marginBottom = storedMarginBottom;\n\t\t\telement.style.height = storedHeight;\n\t\t\telement.style.display = \"none\";\n\t\t}\n\t});\n\n\treturn animation;\n};\n\nexport default slideUp;\n"],
"mappings": "aAAA,OAAOA,GAAW,YAAAC,MAAgB,eAElC,MAAMC,EAAWC,GAAyB,CAEzC,IAAIC,EACHC,EACAC,EACAC,EACAC,EACAC,EAGGC,EACHC,EACAC,EACAC,EACAC,EACAC,EAED,MAAMC,EAAYhB,EAAQ,CACzB,YAAa,IAAM,CAElB,MAAMiB,EAAKd,EACXC,EAAiB,iBAAiBa,CAAE,EACpCZ,EAAa,WAAWD,EAAe,UAAU,EACjDE,EAAgB,WAAWF,EAAe,aAAa,EACvDG,EAAY,WAAWH,EAAe,SAAS,EAC/CI,EAAe,WAAWJ,EAAe,YAAY,EACrDK,EAAS,WAAWL,EAAe,MAAM,EAGzCM,EAAiBO,EAAG,MAAM,SAC1BN,EAAmBM,EAAG,MAAM,WAC5BL,EAAsBK,EAAG,MAAM,cAC/BJ,EAAkBI,EAAG,MAAM,UAC3BH,EAAqBG,EAAG,MAAM,aAC9BF,EAAeE,EAAG,MAAM,OAExBA,EAAG,MAAM,SAAW,QACrB,EACA,SAAAhB,EACA,QAAAE,EACA,QAASe,GAAY,CACpBf,EAAQ,MAAM,WAAa,GAAGE,EAAcA,EAAaa,CAAS,KAClEf,EAAQ,MAAM,cAAgB,GAAGG,EAAiBA,EAAgBY,CAAS,KAC3Ef,EAAQ,MAAM,UAAY,GAAGI,EAAaA,EAAYW,CAAS,KAC/Df,EAAQ,MAAM,aAAe,GAAGK,EAAgBA,EAAeU,CAAS,KACxEf,EAAQ,MAAM,OAAS,GAAGM,EAAUA,EAASS,CAAS,IACvD,CACD,CAAC,EAED,OAAAF,EAAU,QAAQ,EAAE,KAAKG,GAAU,CAC5BA,aAAkB,QACvBhB,EAAQ,MAAM,SAAWO,EACzBP,EAAQ,MAAM,WAAaQ,EAC3BR,EAAQ,MAAM,cAAgBS,EAC9BT,EAAQ,MAAM,UAAYU,EAC1BV,EAAQ,MAAM,aAAeW,EAC7BX,EAAQ,MAAM,OAASY,EACvBZ,EAAQ,MAAM,QAAU,OAE1B,CAAC,EAEMa,CACR,EAEA,eAAed",
"names": ["animate", "duration", "slideUp", "element", "computedStyles", "paddingTop", "paddingBottom", "marginTop", "marginBottom", "height", "storedOverflow", "storedPaddingTop", "storedPaddingBottom", "storedMarginTop", "storedMarginBottom", "storedHeight", "animation", "el", "progress", "reason"]
}