{"version":3,"file":"9141.esm.js","mappings":";6JAsBA,MAAMA,UAAqBC,IAAAA,UAAgBC,WAAAA,GAAA,SAAAC,YAAAC,EAAAA,EAAAA,GAAA,+BA8BhB,KACvBC,KAAKC,UAAUC,SAASF,KAAKG,MAAMC,gBAAgB,KACpDL,EAAAA,EAAAA,GAAA,0BAEmBM,IAClB,IAAMC,EAAgBN,KAAKC,UAAUM,GAAGF,GACxCC,EAAcE,YAAYR,KAAKG,MAAMC,iBACrCE,EAAcJ,SAASF,KAAKG,MAAMM,gBAE9BJ,IADiBL,KAAKC,UAAUS,OAAS,GAE3CC,cAAcX,KAAKY,cACrB,GACD,CA5BDC,iBAAAA,GACEb,KAAKC,UAAYa,IAAEd,KAAKe,WAAWC,WACnChB,KAAKiB,yBACLC,YAAW,KACT,IAAIb,EAAkB,EACtBL,KAAKY,cAAgBO,aAAY,KAC/BnB,KAAKoB,kBAAkBf,GACvBA,GAAoC,CAAC,GACpCL,KAAKG,MAAMkB,SAAS,GACtBrB,KAAKG,MAAMmB,aAChB,CAEAC,oBAAAA,GACEZ,cAAcX,KAAKqB,SACrB,CAgBAG,MAAAA,GACE,OAAO5B,IAAAA,cAAA,QAAM6B,IAAKC,GAAM1B,KAAKe,UAAYW,GAAK1B,KAAKG,MAAMa,SAC3D,GACDjB,EAAAA,EAAAA,GA/CKJ,EAAY,eASM,CACpB2B,aAAc,EACdD,SAAU,MAsCd","sources":["webpack:///./transfer/components/staggerGroup.js"],"sourcesContent":["import React from 'react'\nimport $ from 'jquery'\n\n/**\n * Use by wrapping any structure whose *immediate* children you want to animate sequentially:\n * \n *
\n *

Hello!

\n *
\n *
\n * \n *
\n *
\n *\n * In the above case we animate in both divs one after the other. They'll both start with \".before\" applied, then\n * \".after\" will be applied at the interval in ms supplied as prop (and \".before\" will be removed)... You should\n * put the transition rule in the \".after\" style, and you should basically just think about having \".after\" undo\n * what \".before\" styled.\n */\n\nimport PropTypes from 'prop-types'\n\nclass StaggerGroup extends React.Component {\n static propTypes = {\n children: PropTypes.node,\n initialDelay: PropTypes.number, // time in ms before first animation happens\n interval: PropTypes.number, // pace in ms that animations happens, one after the other\n beforeClassName: PropTypes.string,\n afterClassName: PropTypes.string,\n }\n\n static defaultProps = {\n initialDelay: 0,\n interval: 400,\n }\n\n componentDidMount() {\n this.$children = $(this.wrapperEl).children()\n this.setAllBeforeClassNames()\n setTimeout(() => {\n let currentChildIdx = 0\n this.setIntervalID = setInterval(() => {\n this.setAfterClassName(currentChildIdx)\n currentChildIdx = currentChildIdx + 1\n }, this.props.interval)\n }, this.props.initialDelay)\n }\n\n componentWillUnmount() {\n clearInterval(this.interval)\n }\n\n setAllBeforeClassNames = () => {\n this.$children.addClass(this.props.beforeClassName)\n }\n\n setAfterClassName = currentChildIdx => {\n const $currentChild = this.$children.eq(currentChildIdx)\n $currentChild.removeClass(this.props.beforeClassName)\n $currentChild.addClass(this.props.afterClassName)\n const lastChildIdx = this.$children.length - 1\n if (currentChildIdx === lastChildIdx) {\n clearInterval(this.setIntervalID)\n }\n }\n\n render() {\n return (this.wrapperEl = c)}>{this.props.children}\n }\n}\n\nexport default StaggerGroup\n"],"names":["StaggerGroup","React","constructor","arguments","_defineProperty","this","$children","addClass","props","beforeClassName","currentChildIdx","$currentChild","eq","removeClass","afterClassName","length","clearInterval","setIntervalID","componentDidMount","$","wrapperEl","children","setAllBeforeClassNames","setTimeout","setInterval","setAfterClassName","interval","initialDelay","componentWillUnmount","render","ref","c"],"sourceRoot":""}