mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
1 line
50 KiB
JSON
1 line
50 KiB
JSON
|
|
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-7a8b7a1c.js';\nimport { b as getIonMode } from './ionic-global-63a97a32.js';\nimport { i as isCancel, e as prepareOverlay, d as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-a62f858b.js';\nimport { s as sanitizeDOMString } from './index-9e3fe806.js';\nimport { g as getClassMap, c as createColorClasses } from './theme-ff3fc52f.js';\nimport { c as createAnimation } from './animation-822d986b.js';\nimport './hardware-back-button-4a6b37fb.js';\nimport './helpers-1457892a.js';\n\n/**\n * iOS Toast Enter Animation\n */\nconst iosEnterAnimation = (baseEl, position) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const hostEl = baseEl.host || baseEl;\n const wrapperEl = baseEl.querySelector('.toast-wrapper');\n const bottom = `calc(-10px - var(--ion-safe-area-bottom, 0px))`;\n const top = `calc(10px + var(--ion-safe-area-top, 0px))`;\n wrapperAnimation.addElement(wrapperEl);\n switch (position) {\n case 'top':\n wrapperAnimation.fromTo('transform', 'translateY(-100%)', `translateY(${top})`);\n break;\n case 'middle':\n const topPosition = Math.floor(hostEl.clientHeight / 2 - wrapperEl.clientHeight / 2);\n wrapperEl.style.top = `${topPosition}px`;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n default:\n wrapperAnimation.fromTo('transform', 'translateY(100%)', `translateY(${bottom})`);\n break;\n }\n return baseAnimation.addElement(hostEl).easing('cubic-bezier(.155,1.105,.295,1.12)').duration(400).addAnimation(wrapperAnimation);\n};\n\n/**\n * iOS Toast Leave Animation\n */\nconst iosLeaveAnimation = (baseEl, position) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const hostEl = baseEl.host || baseEl;\n const wrapperEl = baseEl.querySelector('.toast-wrapper');\n const bottom = `calc(-10px - var(--ion-safe-area-bottom, 0px))`;\n const top = `calc(10px + var(--ion-safe-area-top, 0px))`;\n wrapperAnimation.addElement(wrapperEl);\n switch (position) {\n case 'top':\n wrapperAnimation.fromTo('transform', `translateY(${top})`, 'translateY(-100%)');\n break;\n case 'middle':\n wrapperAnimation.fromTo('opacity', 0.99, 0);\n break;\n default:\n wrapperAnimation.fromTo('transform', `translateY(${bottom})`, 'translateY(100%)');\n break;\n }\n return baseAnimation.addElement(hostEl).easing('cubic-bezier(.36,.66,.04,1)').duration(300).addAnimation(wrapperAnimation);\n};\n\n/**\n * MD Toast Enter Animation\n */\nconst mdEnterAnimation = (baseEl, position) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const hostEl = baseEl.host || baseEl;\n const wrapperEl = baseEl.querySelector('.toast-wrapper');\n const bottom = `calc(8px + var(--ion-safe-area-bottom, 0px))`;\n const top = `calc(8px + var(--ion-safe-area-top, 0px))`;\n wrapperAnimation.addElement(wrapperEl);\n switch (position) {\n case 'top':\n wrapperEl.style.top = top;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n case 'middle':\n const topPosition = Math.floor(hostEl.clientHeight / 2 - wrapperEl.clientHeight / 2);\n wrapperEl.style.top = `${topPosition}px`;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n default:\n wrapperEl.style.bottom = bottom;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n }\n return baseAnimation.addElement(hostEl).easing('cubic-bezier(.36,.66,.04,1)').duration(400).addAnimation(wrapperAnimation);\n};\n\n/**\n * md Toast Leave Animation\n */\nconst mdLeaveAnimation = baseEl => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const hostEl = baseEl.host || baseEl;\n
|