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.animations.slideUp.js.map Maven / Gradle / Ivy
{"version":3,"file":"slideUp.js","sourceRoot":"","sources":["../../src/animations/slideUp.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,GAAG,CAAC,OAAoB,EAAE,EAAE;IACxC,sBAAsB;IACtB,IAAI,cAAmC,EACtC,UAAkB,EAClB,aAAqB,EACrB,SAAiB,EACjB,YAAoB,EACpB,MAAc,CAAC;IAEhB,sBAAsB;IACtB,IAAI,cAAsB,EACzB,gBAAwB,EACxB,mBAA2B,EAC3B,eAAuB,EACvB,kBAA0B,EAC1B,YAAoB,CAAC;IAEtB,MAAM,SAAS,GAAG,OAAO,CAAC;QACzB,WAAW,EAAE,GAAG,EAAE;YACjB,sBAAsB;YACtB,MAAM,EAAE,GAAG,OAAO,CAAC;YACnB,cAAc,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;YACtC,UAAU,GAAG,UAAU,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YACnD,aAAa,GAAG,UAAU,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YACzD,SAAS,GAAG,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YACjD,YAAY,GAAG,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;YACvD,MAAM,GAAG,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAE3C,sBAAsB;YACtB,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC;YACnC,gBAAgB,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC;YACvC,mBAAmB,GAAG,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;YAC7C,eAAe,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,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AM,GAAG,YAAY,CAAC;YACpC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;SAC/B;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","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"]}