UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

9 lines 6.38 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/animations")):"function"==typeof define&&define.amd?define("ng-zorro-antd/core/animation",["exports","@angular/animations"],e):e(((t=t||self)["ng-zorro-antd"]=t["ng-zorro-antd"]||{},t["ng-zorro-antd"].core=t["ng-zorro-antd"].core||{},t["ng-zorro-antd"].core.animation={}),t.ng.animations)}(this,(function(t,e){"use strict"; /** * @license * Copyright Alibaba.com All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */var a=function(){function t(){}return t.SLOW="0.3s",t.BASE="0.2s",t.FAST="0.1s",t}();var i=function(){function t(){}return t.EASE_BASE_OUT="cubic-bezier(0.7, 0.3, 0.1, 1)",t.EASE_BASE_IN="cubic-bezier(0.9, 0, 0.3, 0.7)",t.EASE_OUT="cubic-bezier(0.215, 0.61, 0.355, 1)",t.EASE_IN="cubic-bezier(0.55, 0.055, 0.675, 0.19)",t.EASE_IN_OUT="cubic-bezier(0.645, 0.045, 0.355, 1)",t.EASE_OUT_BACK="cubic-bezier(0.12, 0.4, 0.29, 1.46)",t.EASE_IN_BACK="cubic-bezier(0.71, -0.46, 0.88, 0.6)",t.EASE_IN_OUT_BACK="cubic-bezier(0.71, -0.46, 0.29, 1.46)",t.EASE_OUT_CIRC="cubic-bezier(0.08, 0.82, 0.17, 1)",t.EASE_IN_CIRC="cubic-bezier(0.6, 0.04, 0.98, 0.34)",t.EASE_IN_OUT_CIRC="cubic-bezier(0.78, 0.14, 0.15, 0.86)",t.EASE_OUT_QUINT="cubic-bezier(0.23, 1, 0.32, 1)",t.EASE_IN_QUINT="cubic-bezier(0.755, 0.05, 0.855, 0.06)",t.EASE_IN_OUT_QUINT="cubic-bezier(0.86, 0, 0.07, 1)",t}();var n=e.trigger("collapseMotion",[e.state("expanded",e.style({height:"*"})),e.state("collapsed",e.style({height:0,overflow:"hidden"})),e.state("hidden",e.style({height:0,overflow:"hidden",borderTopWidth:"0"})),e.transition("expanded => collapsed",e.animate("150ms "+i.EASE_IN_OUT)),e.transition("expanded => hidden",e.animate("150ms "+i.EASE_IN_OUT)),e.transition("collapsed => expanded",e.animate("150ms "+i.EASE_IN_OUT)),e.transition("hidden => expanded",e.animate("150ms "+i.EASE_IN_OUT))]),o=e.trigger("treeCollapseMotion",[e.transition("* => *",[e.query("nz-tree-node:leave",[e.style({overflow:"hidden"}),e.stagger(0,[e.animate("150ms "+i.EASE_IN_OUT,e.style({height:0}))])],{optional:!0}),e.query("nz-tree-node:enter",[e.style({overflow:"hidden",height:0}),e.stagger(0,[e.animate("150ms "+i.EASE_IN_OUT,e.style({overflow:"hidden",height:"*"}))])],{optional:!0})])]),r=e.trigger("fadeMotion",[e.transition(":enter",[e.style({opacity:0}),e.animate(""+a.BASE,e.style({opacity:1}))]),e.transition(":leave",[e.style({opacity:1}),e.animate(""+a.BASE,e.style({opacity:0}))])]),s=e.trigger("helpMotion",[e.transition(":enter",[e.style({opacity:0,transform:"translateY(-5px)"}),e.animate(a.SLOW+" "+i.EASE_IN_OUT,e.style({opacity:1,transform:"translateY(0)"}))]),e.transition(":leave",[e.style({opacity:1,transform:"translateY(0)"}),e.animate(a.SLOW+" "+i.EASE_IN_OUT,e.style({opacity:0,transform:"translateY(-5px)"}))])]),l=e.trigger("moveUpMotion",[e.transition("* => enter",[e.style({transformOrigin:"0 0",transform:"translateY(-100%)",opacity:0}),e.animate(""+a.BASE,e.style({transformOrigin:"0 0",transform:"translateY(0%)",opacity:1}))]),e.transition("* => leave",[e.style({transformOrigin:"0 0",transform:"translateY(0%)",opacity:1}),e.animate(""+a.BASE,e.style({transformOrigin:"0 0",transform:"translateY(-100%)",opacity:0}))])]),c=e.trigger("notificationMotion",[e.state("enterRight",e.style({opacity:1,transform:"translateX(0)"})),e.transition("* => enterRight",[e.style({opacity:0,transform:"translateX(5%)"}),e.animate("100ms linear")]),e.state("enterLeft",e.style({opacity:1,transform:"translateX(0)"})),e.transition("* => enterLeft",[e.style({opacity:0,transform:"translateX(-5%)"}),e.animate("100ms linear")]),e.state("leave",e.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 0%"})),e.transition("* => leave",[e.style({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"}),e.animate("100ms linear")])]),m=a.BASE+" "+i.EASE_OUT_QUINT,y=a.BASE+" "+i.EASE_IN_QUINT,f=e.trigger("slideMotion",[e.state("bottom",e.style({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"})),e.state("top",e.style({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 100%"})),e.transition("void => bottom",[e.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 0%"}),e.animate(m)]),e.transition("bottom => void",[e.animate(y,e.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 0%"}))]),e.transition("void => top",[e.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 100%"}),e.animate(m)]),e.transition("top => void",[e.animate(y,e.style({opacity:0,transform:"scaleY(0.8)",transformOrigin:"0% 100%"}))])]),E=e.trigger("slideAlertMotion",[e.transition(":leave",[e.style({opacity:1,transform:"scaleY(1)",transformOrigin:"0% 0%"}),e.animate(a.SLOW+" "+i.EASE_IN_OUT_CIRC,e.style({opacity:0,transform:"scaleY(0)",transformOrigin:"0% 0%"}))])]),p=e.trigger("zoomMotion",[e.transition(":enter",[e.style({opacity:0,transform:"scale(0.2)"}),e.animate(a.BASE+" "+i.EASE_OUT_CIRC,e.style({opacity:1,transform:"scale(1)"}))]),e.transition(":leave",[e.style({opacity:1,transform:"scale(1)"}),e.animate(a.BASE+" "+i.EASE_IN_OUT_CIRC,e.style({opacity:0,transform:"scale(0.2)"}))])]),_=e.trigger("zoomBigMotion",[e.transition("void => active",[e.style({opacity:0,transform:"scale(0.8)"}),e.animate(a.BASE+" "+i.EASE_OUT_CIRC,e.style({opacity:1,transform:"scale(1)"}))]),e.transition("active => void",[e.style({opacity:1,transform:"scale(1)"}),e.animate(a.BASE+" "+i.EASE_IN_OUT_CIRC,e.style({opacity:0,transform:"scale(0.8)"}))])]),d=e.trigger("zoomBadgeMotion",[e.transition(":enter",[e.style({opacity:0,transform:"scale(0) translate(50%, -50%)"}),e.animate(a.SLOW+" "+i.EASE_OUT_BACK,e.style({opacity:1,transform:"scale(1) translate(50%, -50%)"}))]),e.transition(":leave",[e.style({opacity:1,transform:"scale(1) translate(50%, -50%)"}),e.animate(a.SLOW+" "+i.EASE_IN_BACK,e.style({opacity:0,transform:"scale(0) translate(50%, -50%)"}))])]);t.AnimationCurves=i,t.AnimationDuration=a,t.collapseMotion=n,t.fadeMotion=r,t.helpMotion=s,t.moveUpMotion=l,t.notificationMotion=c,t.slideAlertMotion=E,t.slideMotion=f,t.treeCollapseMotion=o,t.zoomBadgeMotion=d,t.zoomBigMotion=_,t.zoomMotion=p,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=ng-zorro-antd-core-animation.umd.min.js.map